diff options
Diffstat (limited to 'src/app/VFS/krquery.cpp')
| -rw-r--r-- | src/app/VFS/krquery.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/app/VFS/krquery.cpp b/src/app/VFS/krquery.cpp index 7ceeca9..7d4507c 100644 --- a/src/app/VFS/krquery.cpp +++ b/src/app/VFS/krquery.cpp @@ -163,11 +163,11 @@ bool KRQuery::matchCommon( const TQString &nameIn, const TQStringList &matchList if( ndx != -1 ) // but the end of the filename is OK name = nameIn.mid( ndx + 1 ); - unsigned int len; for ( unsigned int i = 0; i < excludeList.count(); ++i ) { - TQRegExp( *excludeList.at( i ), matchesCaseSensitive, true ).match( name, 0, ( int* ) & len ); - if ( len == name.length() ) return false; + TQRegExp re = TQRegExp( *excludeList.at( i ), matchesCaseSensitive, true ); + re.search( name, 0 ); + if ( re.matchedLength() == name.length() ) return false; } if( matchList.count() == 0 ) @@ -175,8 +175,9 @@ bool KRQuery::matchCommon( const TQString &nameIn, const TQStringList &matchList for ( unsigned int i = 0; i < matchList.count(); ++i ) { - TQRegExp( *matchList.at( i ), matchesCaseSensitive, true ).match( name, 0, ( int* ) & len ); - if ( len == name.length() ) return true; + TQRegExp re = TQRegExp( *matchList.at( i ), matchesCaseSensitive, true ); + re.search( name, 0 ); + if ( re.matchedLength() == name.length() ) return true; } return false; } |
