Skip to content

Commit

Permalink
API updates: use clear() instead of setString() on qgssearchstring
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9541 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 24, 2008
1 parent 7bd5e8d commit 1fab12a
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 1fab12a

Please sign in to comment.