mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
API updates: use clear() instead of setString() on qgssearchstring
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9541 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
bb42f4683e
commit
3649a3fc02
@ -42,7 +42,7 @@ QgsSearchString::QgsSearchString( const QgsSearchString& str )
|
||||
|
||||
QgsSearchString& QgsSearchString::operator=( const QgsSearchString & str )
|
||||
{
|
||||
setEmpty();
|
||||
clear();
|
||||
|
||||
if ( str.mTree )
|
||||
mTree = new QgsSearchTreeNode( *str.mTree );
|
||||
@ -65,7 +65,7 @@ bool QgsSearchString::setString( QString str )
|
||||
// empty string
|
||||
if ( str == "" )
|
||||
{
|
||||
setEmpty();
|
||||
clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ bool QgsSearchString::setTree( QgsSearchTreeNode* tree )
|
||||
{
|
||||
if ( tree == NULL )
|
||||
{
|
||||
setEmpty();
|
||||
clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -103,7 +103,7 @@ bool QgsSearchString::isEmpty()
|
||||
return ( mTree == NULL );
|
||||
}
|
||||
|
||||
void QgsSearchString::setEmpty()
|
||||
void QgsSearchString::clear()
|
||||
{
|
||||
delete mTree;
|
||||
mTree = NULL;
|
||||
|
@ -66,7 +66,7 @@ class CORE_EXPORT QgsSearchString
|
||||
bool isEmpty();
|
||||
|
||||
//! clear search string
|
||||
void setEmpty();
|
||||
void clear();
|
||||
|
||||
private:
|
||||
//! search string and coresponding tree
|
||||
|
Loading…
x
Reference in New Issue
Block a user