From 3d519ff2a2adb89da3066e0e8434813455416031 Mon Sep 17 00:00:00 2001 From: Jakub Jaszczynski Date: Mon, 16 Aug 2010 11:06:41 +0200 Subject: [PATCH] add "*" to end of word when this word have't wildcard --- trunk/src/plugins/xdxf/src/xdxfplugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trunk/src/plugins/xdxf/src/xdxfplugin.cpp b/trunk/src/plugins/xdxf/src/xdxfplugin.cpp index 7f26868..48db52b 100644 --- a/trunk/src/plugins/xdxf/src/xdxfplugin.cpp +++ b/trunk/src/plugins/xdxf/src/xdxfplugin.cpp @@ -68,6 +68,8 @@ QString XdxfPlugin::infoNote() const { QList XdxfPlugin::searchWordList(QString word, int limit) { //if(_settings->value("cached") == "true") + if(word.indexOf("*")==-1 && word.indexOf("?")==-1) + word+="*"; if(isCached()) return searchWordListCache(word,limit); return searchWordListFile(word, limit); @@ -111,8 +113,6 @@ QList XdxfPlugin::searchWordListFile(QString word, int limit) { word = removeAccents(word); stopped = false; - if(word.indexOf("*")==-1) - word+="*"; QRegExp regWord(word); regWord.setCaseSensitivity(Qt::CaseInsensitive); regWord.setPatternSyntax(QRegExp::Wildcard); @@ -437,7 +437,7 @@ bool XdxfPlugin::makeCache(QString dir) { while (!reader.atEnd() && !stopped) { QCoreApplication::processEvents(); - usleep(50); + // usleep(50); reader.readNext(); if(reader.tokenType() == QXmlStreamReader::StartElement) { -- 1.7.9.5