Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
timlinux committed Oct 24, 2008
1 parent bb42f46 commit 3649a3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/core/qgssearchstring.cpp
Expand Up @@ -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 );
Expand All @@ -65,7 +65,7 @@ bool QgsSearchString::setString( QString str )
// empty string
if ( str == "" )
{
setEmpty();
clear();
return true;
}

Expand All @@ -87,7 +87,7 @@ bool QgsSearchString::setTree( QgsSearchTreeNode* tree )
{
if ( tree == NULL )
{
setEmpty();
clear();
}
else
{
Expand All @@ -103,7 +103,7 @@ bool QgsSearchString::isEmpty()
return ( mTree == NULL );
}

void QgsSearchString::setEmpty()
void QgsSearchString::clear()
{
delete mTree;
mTree = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgssearchstring.h
Expand Up @@ -66,7 +66,7 @@ class CORE_EXPORT QgsSearchString
bool isEmpty();

//! clear search string
void setEmpty();
void clear();

private:
//! search string and coresponding tree
Expand Down

0 comments on commit 3649a3f

Please sign in to comment.