--- a/logsui/logscntfinder/src/logscntentry.cpp Fri Aug 06 14:57:47 2010 +0300
+++ b/logsui/logscntfinder/src/logscntentry.cpp Mon Aug 23 18:14:51 2010 +0300
@@ -343,15 +343,17 @@
bool LogsCntEntry::match( const QString& pattern ) const
{
bool match = false;
- LogsPredictiveTranslator* translator = LogsPredictiveTranslator::instance();
-
- //direct match with phone number is enough
- match = ( type() == EntryTypeHistory &&
- mPhoneNumber.mTranslatedText.startsWith( pattern ) ) ||
- doSimpleMatch( pattern );
-
- match = !match && translator->hasPatternSeparators( pattern ) ?
- doComplexMatch( translator->patternTokens( pattern) ) : match;
+ if ( pattern.length() > 0 ) {
+ LogsPredictiveTranslator* translator = LogsPredictiveTranslator::instance();
+
+ //direct match with phone number is enough
+ match = ( type() == EntryTypeHistory &&
+ mPhoneNumber.mTranslatedText.startsWith( pattern ) ) ||
+ doSimpleMatch( pattern );
+
+ match = !match && translator->hasPatternSeparators( pattern ) ?
+ doComplexMatch( translator->patternTokens( pattern) ) : match;
+ }
return match;
}