Merge branch 'cache' of ssh://drop.maemo.org/git/mdictionary into cache
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Mon, 16 Aug 2010 07:24:49 +0000 (09:24 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Mon, 16 Aug 2010 07:24:49 +0000 (09:24 +0200)
1  2 
trunk/src/plugins/xdxf/src/xdxfplugin.cpp

@@@ -83,10 -83,12 +83,12 @@@ QList<Translation*> XdxfPlugin::searchW
          }
  
          stopped = false;
-         if(word.indexOf("*")==-1)
+         if(word.indexOf("*")==-1 && word.indexOf("?")== 0)
              word+="%";
          word = word.replace("*", "%");
+         word = word.replace("?", "_");
          word = removeAccents(word);
+         qDebug() << word;
  
          QSqlQuery cur(db);
          cur.prepare("select word from dict where word like ? limit ?");
@@@ -429,7 -431,7 +431,7 @@@ bool XdxfPlugin::makeCache(QString dir
      while (!reader.atEnd() && !stopped) {
  
          QCoreApplication::processEvents();
 -        //usleep(50);
 +        usleep(50);
          reader.readNext();
  
          if(reader.tokenType() == QXmlStreamReader::StartElement) {