Added a comment to clarify purpose of notQuery

This commit is contained in:
Jerzy Kozera 2013-08-10 16:01:52 +01:00
parent 8f0fb1c299
commit c5afea729f

View File

@ -78,6 +78,7 @@ void ZealDocsetsRegistry::_runQuery(const QString& rawQuery, int queryNum)
if(withSubStrings) { if(withSubStrings) {
// if less than 100 found starting with query, search all substrings // if less than 100 found starting with query, search all substrings
curQuery = "%"+preparedQuery; curQuery = "%"+preparedQuery;
// don't return 'starting with' results twice
if(types[name] == ZDASH) { if(types[name] == ZDASH) {
notQuery = QString(" and not (ztokenname like '%1%' escape '\\' or ztokenname like '%.%1%' escape '\\') ").arg(preparedQuery); notQuery = QString(" and not (ztokenname like '%1%' escape '\\' or ztokenname like '%.%1%' escape '\\') ").arg(preparedQuery);
} else { } else {