mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Add a convenience constructor from QString to QgsSearchString
git-svn-id: http://svn.osgeo.org/qgis/trunk@13944 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
50734ac052
commit
e9828f8ef3
@ -9,6 +9,10 @@ class QgsSearchString
|
|||||||
//! constructor
|
//! constructor
|
||||||
QgsSearchString();
|
QgsSearchString();
|
||||||
|
|
||||||
|
//! construct and parse a string
|
||||||
|
//! @note added in v1.6
|
||||||
|
QgsSearchString( const QString & str );
|
||||||
|
|
||||||
//! copy constructor - makes also copy of search tree
|
//! copy constructor - makes also copy of search tree
|
||||||
QgsSearchString( const QgsSearchString& str );
|
QgsSearchString( const QgsSearchString& str );
|
||||||
|
|
||||||
|
@ -30,6 +30,11 @@ QgsSearchString::QgsSearchString()
|
|||||||
mTree = NULL;
|
mTree = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QgsSearchString::QgsSearchString( const QString & str )
|
||||||
|
{
|
||||||
|
mTree = NULL;
|
||||||
|
setString( str );
|
||||||
|
}
|
||||||
|
|
||||||
QgsSearchString::QgsSearchString( const QgsSearchString& str )
|
QgsSearchString::QgsSearchString( const QgsSearchString& str )
|
||||||
{
|
{
|
||||||
@ -62,8 +67,10 @@ QgsSearchString::~QgsSearchString()
|
|||||||
|
|
||||||
bool QgsSearchString::setString( QString str )
|
bool QgsSearchString::setString( QString str )
|
||||||
{
|
{
|
||||||
|
mParserErrorMsg.clear();
|
||||||
|
|
||||||
// empty string
|
// empty string
|
||||||
if ( str == "" )
|
if ( str.isEmpty() )
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
return true;
|
return true;
|
||||||
@ -107,5 +114,5 @@ void QgsSearchString::clear()
|
|||||||
{
|
{
|
||||||
delete mTree;
|
delete mTree;
|
||||||
mTree = NULL;
|
mTree = NULL;
|
||||||
mString = "";
|
mString.clear();
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,13 @@ class QgsSearchTreeNode;
|
|||||||
class CORE_EXPORT QgsSearchString
|
class CORE_EXPORT QgsSearchString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! constructor
|
//! construct an empty string
|
||||||
QgsSearchString();
|
QgsSearchString();
|
||||||
|
|
||||||
|
//! construct and parse a string
|
||||||
|
//! @note added in v1.6
|
||||||
|
QgsSearchString( const QString & str );
|
||||||
|
|
||||||
//! copy constructor - makes also copy of search tree
|
//! copy constructor - makes also copy of search tree
|
||||||
QgsSearchString( const QgsSearchString& str );
|
QgsSearchString( const QgsSearchString& str );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user