Copyright 2010 Comarch S.A.
*******************************************************************************/
-
-/*! \file stardictplugin.cpp
+/*!
+ \file StarDictPlugin.cpp
+ \author Jakub Jaszczynski
*/
#include "StarDictPlugin.h"
QString idxPath = settings()->value("idxFileName");
StarDictReader * reader = StarDictReaderFactory::createReader(idxPath);
QString fkey;
- qint64 offset = 0, len = 0;
- QRegExp keyword(word, Qt::CaseInsensitive, QRegExp::Wildcard);
+ qint64 offset = 0,
+ len = 0;
if( word.indexOf("*")==-1 && word.indexOf("?")==-1 &&
word.indexOf("_")==-1 && word.indexOf("%")==-1)
word+="*";
+ QRegExp keyword(word, Qt::CaseInsensitive, QRegExp::Wildcard);
if((settings()->value("idxoffsetbits") == "32") ||
(settings()->value("idxoffsetbits") == ""))
if(keyword.exactMatch(fkey)) {
TranslationStarDict tran(fkey, infoNote(), this);
- qDebug() << "off/len" << offset << len;
+ // qDebug() << "off/len" << offset << len;
int id = translations.indexOf(tran);
if(id == -1) {
tran.add(offset, len);
result+="</t>";
}
-// Dont know whether mDictionary would ever handle binary stardict format
+// W & P Dont know whether mDictionary would ever handle binary stardict format
// to be honest dont see any kind of adventages (can't find any binary dict)
/*
}
return &_icon;
}
-
-int StarDictPlugin::countWords() {
- return 0;
-}
-
-
-void StarDictPlugin::clean() {
-
-}
-
-
Q_EXPORT_PLUGIN2(stardict, StarDictPlugin)