From 99a2774ca6f1cab334de5d43fe36fc44ae889a4c Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 12 Jun 2011 01:36:19 +0000 Subject: TQt4 convert kdesdk This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../modules/dbsearchengine/KDBSearchEngine.cpp | 70 +++++----- .../modules/dbsearchengine/KDBSearchEngine.h | 15 +- .../kbabeldict/modules/dbsearchengine/database.cpp | 28 ++-- .../kbabeldict/modules/dbsearchengine/database.h | 11 +- .../kbabeldict/modules/dbsearchengine/dbscan.cpp | 18 +-- kbabel/kbabeldict/modules/dbsearchengine/dbscan.h | 11 +- .../modules/dbsearchengine/dbse_factory.cpp | 8 +- .../modules/dbsearchengine/dbse_factory.h | 7 +- .../modules/dbsearchengine/dbseprefwidget.ui | 152 ++++++++++----------- .../kbabeldict/modules/dbsearchengine/makemsgdb.C | 4 +- .../modules/dbsearchengine/preferenceswidget.cpp | 16 +-- .../modules/dbsearchengine/preferenceswidget.h | 3 +- .../modules/dbsearchengine2/KDBSearchEngine2.cpp | 26 ++-- .../modules/dbsearchengine2/KDBSearchEngine2.h | 7 +- .../modules/dbsearchengine2/algorithms.cpp | 4 +- .../modules/dbsearchengine2/algorithms.h | 11 +- .../modules/dbsearchengine2/database.cpp | 46 +++---- .../kbabeldict/modules/dbsearchengine2/database.h | 4 +- .../modules/dbsearchengine2/dbentries.cpp | 8 +- .../kbabeldict/modules/dbsearchengine2/dbscan.cpp | 16 +-- kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h | 6 +- kbabel/kbabeldict/modules/dbsearchengine2/dbse2.ui | 116 ++++++++-------- .../modules/dbsearchengine2/dbse2_factory.cpp | 8 +- .../modules/dbsearchengine2/dbse2_factory.h | 7 +- .../modules/dbsearchengine2/dbseprefwidget.ui | 152 ++++++++++----------- .../modules/dbsearchengine2/preferenceswidget.cpp | 10 +- .../modules/dbsearchengine2/preferenceswidget.h | 3 +- .../modules/dbsearchengine2/sourcedialog.ui | 40 +++--- .../kbabeldict/modules/poauxiliary/pa_factory.cpp | 14 +- kbabel/kbabeldict/modules/poauxiliary/pa_factory.h | 13 +- .../kbabeldict/modules/poauxiliary/poauxiliary.cpp | 52 +++---- .../kbabeldict/modules/poauxiliary/poauxiliary.h | 11 +- .../modules/poauxiliary/preferenceswidget.cpp | 14 +- .../modules/poauxiliary/preferenceswidget.h | 9 +- kbabel/kbabeldict/modules/poauxiliary/pwidget.ui | 6 +- .../modules/pocompendium/compendiumdata.cpp | 16 +-- .../modules/pocompendium/compendiumdata.h | 11 +- .../kbabeldict/modules/pocompendium/pc_factory.cpp | 14 +- .../kbabeldict/modules/pocompendium/pc_factory.h | 13 +- .../modules/pocompendium/pocompendium.cpp | 96 ++++++------- .../kbabeldict/modules/pocompendium/pocompendium.h | 13 +- .../modules/pocompendium/preferenceswidget.cpp | 14 +- .../modules/pocompendium/preferenceswidget.h | 9 +- kbabel/kbabeldict/modules/pocompendium/pwidget.ui | 6 +- kbabel/kbabeldict/modules/tmx/pc_factory.cpp | 14 +- kbabel/kbabeldict/modules/tmx/pc_factory.h | 13 +- .../kbabeldict/modules/tmx/preferenceswidget.cpp | 14 +- kbabel/kbabeldict/modules/tmx/preferenceswidget.h | 9 +- kbabel/kbabeldict/modules/tmx/pwidget.ui | 32 ++--- kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp | 98 ++++++------- kbabel/kbabeldict/modules/tmx/tmxcompendium.h | 13 +- .../kbabeldict/modules/tmx/tmxcompendiumdata.cpp | 12 +- kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h | 11 +- 53 files changed, 681 insertions(+), 653 deletions(-) (limited to 'kbabel/kbabeldict/modules') diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp index 5c5c6a6d..3e658255 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp @@ -18,11 +18,11 @@ * * * In addition, as a special exception, the copyright holders give * * permission to link the code of this program with any edition of * - * the Qt library by Trolltech AS, Norway (or with modified versions * - * of Qt that use the same license as Qt), and distribute linked * + * the TQt library by Trolltech AS, Norway (or with modified versions * + * of TQt that use the same license as TQt), and distribute linked * * combinations including the two. You must obey the GNU General * * Public License in all respects for all of the code used other than * - * Qt. If you modify this file, you may extend this exception to * + * TQt. If you modify this file, you may extend this exception to * * your version of the file, but you are not obligated to do so. If * * you do not wish to do so, delete this exception statement from * * your version. * @@ -72,8 +72,8 @@ using namespace KBabel; -KDBSearchEngine::KDBSearchEngine (TQObject * parent, const char *name): -SearchEngine (parent, name) +KDBSearchEngine::KDBSearchEngine (TQObject * tqparent, const char *name): +SearchEngine (tqparent, name) { edited = "unknown"; dm = 0; //Database Manager @@ -124,7 +124,7 @@ KDBSearchEngine::loadDatabase (TQString database, bool noask = false) i18n ("Database folder does not exist:\n%1\n" "Do you want to create it now?"). - arg (database), TQString::null, i18n("Create Folder"), i18n("Do Not Create")) == + arg (database), TQString(), i18n("Create Folder"), i18n("Do Not Create")) == KMessageBox::Yes) { asked = true; @@ -255,7 +255,7 @@ KDBSearchEngine::loadDatabase (TQString database, bool noask = false) if (asked || KMessageBox::questionYesNo (0, i18n - ("Database files not found.\nDo you want to create them now?"), TQString::null, i18n("Create"), i18n("Do Not Create")) + ("Database files not found.\nDo you want to create them now?"), TQString(), i18n("Create"), i18n("Do Not Create")) == KMessageBox::Yes) { //fprintf(stderr,"SI\n"); @@ -559,7 +559,7 @@ KDBSearchEngine::repeat () bool ok = false; min = - QInputDialog::getInteger (i18n ("Minimum Repetition"), + TQInputDialog::getInteger (i18n ("Minimum Repetition"), i18n ("Insert the minimum number of repetitions for a string:"), 2, 1, 999999, 1, &ok); @@ -607,7 +607,7 @@ KDBSearchEngine::repeat () if (tot >= min && !inlibs) { id = item.key; - id = id.replace ("\n", "\"\n\""); + id = id.tqreplace ("\n", "\"\n\""); mle->append (txt.arg (tot).arg (ntra).arg (id)); } @@ -667,7 +667,7 @@ KDBSearchEngine::startSearchNow (int searchmode) bool allkey = (searchmode == MD_ALL_GOOD_KEYS); - bool equal, contains, contained, regexp, intra; + bool equal, tqcontains, contained, regexp, intra; intra = searchmode & MD_IN_TRANSLATION; @@ -700,12 +700,12 @@ KDBSearchEngine::startSearchNow (int searchmode) int pos; for (i = 0; i < len; i++) { - while ((pos = idMod->find (remchar.at (i))) != -1) + while ((pos = idMod->tqfind (remchar.at (i))) != -1) idMod->remove (pos, 1); } if (comm) - idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE) + idMod->tqreplace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE) if (norm) @@ -773,7 +773,7 @@ KDBSearchEngine::startSearchNow (int searchmode) // Emit progress, process event and check stop now if (count % step == 0) { - emit progress (100 * count / /*QMAX( */ + emit progress (100 * count / /*TQMAX( */ totalprogress /*,1) */ ); kapp->processEvents (100); @@ -802,12 +802,12 @@ KDBSearchEngine::startSearchNow (int searchmode) //Remove character in list of character to be ignored for (i = 0; i < len; i++) - while ((pos = msgId.find (remchar.at (i))) != -1) + while ((pos = msgId.tqfind (remchar.at (i))) != -1) msgId.remove (pos, 1); //Remove context information from id found if (comm) - msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), ""); + msgId.tqreplace (TQRegExp ("\\_\\:.*\\\\n"), ""); if (norm) @@ -838,14 +838,14 @@ KDBSearchEngine::startSearchNow (int searchmode) //Remove character in list of character to be ignored for (i = 0; i < len; i++) while ((pos = - msgId.find (remchar.at (i))) != + msgId.tqfind (remchar.at (i))) != -1) msgId.remove (pos, 1); //Remove context information from id found if (comm) msgId. - replace (TQRegExp ("\\_\\:.*\\\\n"), + tqreplace (TQRegExp ("\\_\\:.*\\\\n"), ""); @@ -867,12 +867,12 @@ KDBSearchEngine::startSearchNow (int searchmode) equal = false; if (rules & Contains) - contains = idMod->contains (msgId); + tqcontains = idMod->tqcontains (msgId); else - contains = false; + tqcontains = false; if (rules & Contained) - contained = msgId.contains (*idMod); + contained = msgId.tqcontains (*idMod); else contained = false; @@ -887,7 +887,7 @@ KDBSearchEngine::startSearchNow (int searchmode) } while (intra && nn < item.numTra); - if (equal || contains || contained || regexp || allkey) + if (equal || tqcontains || contained || regexp || allkey) { if (equal) @@ -1034,7 +1034,7 @@ KDBSearchEngine::startSingleSearch (TQString searchString, in = reg.search (searchString, in + len); len = reg.matchedLength (); TQString regToAdd = searchString; - regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*"); + regToAdd.tqreplace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*"); regToAdd.append ("$"); regToAdd.prepend ("^"); // fprintf(stderr,"%s",(const char *)regToAdd.local8Bit()); @@ -1203,10 +1203,10 @@ KDBSearchEngine::readSettings (KConfigBase * config) } PrefWidget * -KDBSearchEngine::preferencesWidget (TQWidget * parent) +KDBSearchEngine::preferencesWidget (TQWidget * tqparent) { - pw = new PreferencesWidget (parent); + pw = new PreferencesWidget (tqparent); setSettings (); connect (pw, TQT_SIGNAL (restoreNow ()), this, TQT_SLOT (setSettings ())); connect (pw, TQT_SIGNAL (applyNow ()), this, TQT_SLOT (updateSettings ())); @@ -1406,19 +1406,19 @@ KDBSearchEngine::about () const } -QString +TQString KDBSearchEngine::name () const { return i18n ("Translation Database"); } -QString +TQString KDBSearchEngine::id () const { return TQString ("KDBSearchEngine"); } -QString +TQString KDBSearchEngine::lastError () { return lasterror; @@ -1552,11 +1552,11 @@ KDBSearchEngine::setLastError (const TQString & er) lasterror = er; } -QString +TQString KDBSearchEngine::translate (const TQString & text, const uint pluralForm) { if (!openDb ()) - return TQString::null; + return TQString(); /* if(!dbOpened) @@ -1566,7 +1566,7 @@ if(!dbOpened) { //emit anerror hasError(i18n("Database not opened")); - return TQString::null; + return TQString(); } } */ @@ -1574,7 +1574,7 @@ if(!dbOpened) DataBaseItem dbit = dm->getItem (text); if (dbit.isNull ()) - return TQString::null; + return TQString(); if (dbit.numTra == 1) return dbit.translations[0].translation; @@ -1744,9 +1744,9 @@ TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase, int in = 0, len = 0; - QString + TQString keyst = dm->getKey (min); - QRegExp + TQRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+"); while ((in = reg.search (keyst, in + len)) != -1) { @@ -1798,7 +1798,7 @@ TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase, for (int j = 0; j < nres; j++) { - QString + TQString strkey = dm->getKey (resloc[j]); int stdscore = KDBSearchEngine::score (phrase, strkey); @@ -1811,7 +1811,7 @@ TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase, in = 0, len = 0, nword = 0; int remove = retnot ? common : 0; - QRegExp + TQRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+"); while ((in = reg.search (strkey, in + len)) != -1) { diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h index d948bbd4..d884f233 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h +++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h @@ -15,11 +15,11 @@ * * * In addition, as a special exception, the copyright holders give * * permission to link the code of this program with any edition of * - * the Qt library by Trolltech AS, Norway (or with modified versions * - * of Qt that use the same license as Qt), and distribute linked * + * the TQt library by Trolltech AS, Norway (or with modified versions * + * of TQt that use the same license as TQt), and distribute linked * * combinations including the two. You must obey the GNU General * * Public License in all respects for all of the code used other than * - * Qt. If you modify this file, you may extend this exception to * + * TQt. If you modify this file, you may extend this exception to * * your version of the file, but you are not obligated to do so. If * * you do not wish to do so, delete this exception statement from * * your version. * @@ -67,7 +67,7 @@ class SearchEntry int rules; }; -class KeyAndScore : public QString +class KeyAndScore : public TQString { public: KeyAndScore(); @@ -94,11 +94,12 @@ class CatalogDescription class KDBSearchEngine : public SearchEngine { Q_OBJECT + TQ_OBJECT public: - KDBSearchEngine(TQObject *parent=0,const char *name=0); + KDBSearchEngine(TQObject *tqparent=0,const char *name=0); ~KDBSearchEngine(); enum Rules {Equal = 1, Contains = 2, Contained = 4, RegExp = 8}; enum FormatRules { Dots = 1, Ampersand = 2, FirstWordUpper = 4, //Not yet used @@ -163,7 +164,7 @@ public: /* Sets the rules to decide when 2 string match (Uppercase and remove char are not set here) - 1 = EQUAL + 1 = ETQUAL 2 = SEARCH STRING IS CONTAINED IN DATABASE STRING (use with care, if you search nothing it will produce a dangerouse output) 4 = DATABASE STRING IS CONTAINED IN SEARCH STRING (it exclude msgid "") @@ -193,7 +194,7 @@ public: virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(TQWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *tqparent); virtual const KAboutData *about() const; diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp index 0847d594..cb5ebae1 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp @@ -19,11 +19,11 @@ * * * In addition, as a special exception, the copyright holders give * * permission to link the code of this program with any edition of * - * the Qt library by Trolltech AS, Norway (or with modified versions * - * of Qt that use the same license as Qt), and distribute linked * + * the TQt library by Trolltech AS, Norway (or with modified versions * + * of TQt that use the same license as TQt), and distribute linked * * combinations including the two. You must obey the GNU General * * Public License in all respects for all of the code used other than * - * Qt. If you modify this file, you may extend this exception to * + * TQt. If you modify this file, you may extend this exception to * * your version of the file, but you are not obligated to do so. If * * you do not wish to do so, delete this exception statement from * * your version. * @@ -294,8 +294,8 @@ DataBaseItem::toRawData (char *_data) DataBaseManager::DataBaseManager (TQString directory, TQString lang, - TQObject * parent, const char *name): -TQObject (parent, name) + TQObject * tqparent, const char *name): +TQObject (tqparent, name) { TQString filename; @@ -782,7 +782,7 @@ DataBaseManager::createDataBase (TQString directory, rename (filename.local8Bit (), filename.local8Bit () + ",old"); -//kdDebug(0) << TQString("Creating %1").arg(filename) << endl; +//kdDebug(0) << TQString("Creating %1").tqarg(filename) << endl; iAmOk = true; @@ -889,7 +889,7 @@ DataBaseManager::getCatalogInfo (int n) return InfoItem (); } -// kdDebug(0) << TQString("Trad %1").arg(ret) << endl; +// kdDebug(0) << TQString("Trad %1").tqarg(ret) << endl; InfoItem it ((char *) data.data, language); //free(data.data); // Read docu for this!!!! @@ -1000,7 +1000,7 @@ DataBaseManager::loadInfo () TQValueList < TQString > DataBaseManager::wordsIn (TQString string) { - QString + TQString a; TQValueList < TQString > words; int @@ -1015,7 +1015,7 @@ TQValueList < TQString > DataBaseManager::wordsIn (TQString string) int c = 0; //words.setAutoDelete(true); //Not sure... check if it is en. - QString + TQString m; for (i = 0; i < l; i++) if (a[i].isLetterOrNumber ()) @@ -1324,7 +1324,7 @@ DataBaseManager::appendKey (TQString _key) else ret = *(uint32 *) key.data; -//kdDebug(0) << TQString("Append result %1,err = %1").arg(ret).arg(err) << endl; +//kdDebug(0) << TQString("Append result %1,err = %1").tqarg(ret).tqarg(err) << endl; free (data.data); @@ -1333,7 +1333,7 @@ DataBaseManager::appendKey (TQString _key) } -QString +TQString DataBaseManager::getKey (uint32 n) { @@ -1349,11 +1349,11 @@ DataBaseManager::getKey (uint32 n) //Check for errors int ret = indexDb->get (indexDb, 0, &key, &data, 0); //DB_SET_RECNO); if (ret) - return TQString::null; + return TQString(); return TQString::fromUtf8 ((char *) data.data); -// kdDebug(0) << TQString("Trad %1").arg(ret) << endl; +// kdDebug(0) << TQString("Trad %1").tqarg(ret) << endl; } @@ -1446,7 +1446,7 @@ DataBaseManager::putNewTranslation (TQString key, TQString tran, int catalog, isThisOne = (*ittr).translation == msgstr; // is there the catnum we are looking for? - if ((*ittr).infoRef.find (catnum) != (*ittr).infoRef.end ()) + if ((*ittr).infoRef.tqfind (catnum) != (*ittr).infoRef.end ()) { found_catalog_info = true; if (ow && !isThisOne) diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.h b/kbabel/kbabeldict/modules/dbsearchengine/database.h index 3e68e01d..05a09955 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/database.h +++ b/kbabel/kbabeldict/modules/dbsearchengine/database.h @@ -16,11 +16,11 @@ * * * In addition, as a special exception, the copyright holders give * * permission to link the code of this program with any edition of * - * the Qt library by Trolltech AS, Norway (or with modified versions * - * of Qt that use the same license as Qt), and distribute linked * + * the TQt library by Trolltech AS, Norway (or with modified versions * + * of TQt that use the same license as TQt), and distribute linked * * combinations including the two. You must obey the GNU General * * Public License in all respects for all of the code used other than * - * Qt. If you modify this file, you may extend this exception to * + * TQt. If you modify this file, you may extend this exception to * * your version of the file, but you are not obligated to do so. If * * you do not wish to do so, delete this exception statement from * * your version. * @@ -155,10 +155,11 @@ class DataBaseItem uint32 location; }; -class DataBaseManager : public QObject +class DataBaseManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /* @@ -175,7 +176,7 @@ class DataBaseManager : public QObject */ - DataBaseManager(TQString directory,TQString lang,TQObject *parent=0,const char *name=0); + DataBaseManager(TQString directory,TQString lang,TQObject *tqparent=0,const char *name=0); ~DataBaseManager(); /* Create a new databse structure. diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp index 0ee1ba4b..fd3ed7f1 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp @@ -18,11 +18,11 @@ * * * In addition, as a special exception, the copyright holders give * * permission to link the code of this program with any edition of * - * the Qt library by Trolltech AS, Norway (or with modified versions * - * of Qt that use the same license as Qt), and distribute linked * + * the TQt library by Trolltech AS, Norway (or with modified versions * + * of TQt that use the same license as TQt), and distribute linked * * combinations including the two. You must obey the GNU General * * Public License in all respects for all of the code used other than * - * Qt. If you modify this file, you may extend this exception to * + * TQt. If you modify this file, you may extend this exception to * * your version of the file, but you are not obligated to do so. If * * you do not wish to do so, delete this exception statement from * * your version. * @@ -39,7 +39,7 @@ using namespace KBabel; PoScanner::PoScanner(DataBaseManager *dbm, - TQObject *parent,const char *name):TQObject(parent,name) + TQObject *tqparent,const char *name):TQObject(tqparent,name) { dm=dbm; removeOldCatalogTranslation=false; //Check if this flag do something. @@ -57,7 +57,7 @@ if (!called) { pb=true; count=0;} called=true; -kdDebug(0) << TQString("cat: %1, %2").arg(pathName).arg(pattern) << endl; +kdDebug(0) << TQString("cat: %1, %2").tqarg(pathName).tqarg(pattern) << endl; if(pb) {emit patternStarted(); @@ -65,7 +65,7 @@ emit patternProgress(0); } TQDir d(pathName,pattern); d.setMatchAllDirs(true); - const QFileInfoList* files = d.entryInfoList(); + const TQFileInfoList* files = d.entryInfoList(); tot=files->count(); TQPtrListIterator it(*files); kdDebug(0) << tot << endl; @@ -120,7 +120,7 @@ InfoItem cinfo; Catalog * catalog=new Catalog(this,"ScanPoCatalog"); -TQString location=fileName.right(fileName.length()-fileName.findRev("/")-1); +TQString location=fileName.right(fileName.length()-fileName.tqfindRev("/")-1); connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int))); emit filename(location); emit fileProgress(0); @@ -128,7 +128,7 @@ emit fileLoading(0); KURL u(fileName); -ConversionStatus rr=catalog->openURL(u); +ConversiontqStatus rr=catalog->openURL(u); if(rr != OK && rr !=RECOVERED_PARSE_ERROR ) { delete catalog; @@ -149,7 +149,7 @@ tot=catalog->numberOfEntries(); bool fuzzy; bool untra; -//kdDebug(0) << TQString("Tot: %1").arg(tot) << endl; +//kdDebug(0) << TQString("Tot: %1").tqarg(tot) << endl; for (i=0;i #include "database.h" -class PoScanner : public QObject +class PoScanner : public TQObject { Q_OBJECT + TQ_OBJECT public: - PoScanner(DataBaseManager *dbm,TQObject *parent=0,const char *name=0); + PoScanner(DataBaseManager *dbm,TQObject *tqparent=0,const char *name=0); /* Scan a single PO file. diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp index 86975874..599ace4c 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp @@ -21,8 +21,8 @@ KInstance *DbSeFactory::s_instance = 0; KAboutData *DbSeFactory::s_about = 0; -DbSeFactory::DbSeFactory( TQObject *parent, const char *name) - : KLibFactory(parent,name) +DbSeFactory::DbSeFactory( TQObject *tqparent, const char *name) + : KLibFactory(tqparent,name) { } @@ -42,7 +42,7 @@ DbSeFactory::~DbSeFactory() } -TQObject *DbSeFactory::createObject( TQObject *parent, const char *name, +TQObject *DbSeFactory::createObject( TQObject *tqparent, const char *name, const char *classname, const TQStringList &) { if(TQCString(classname) != "SearchEngine") @@ -51,7 +51,7 @@ TQObject *DbSeFactory::createObject( TQObject *parent, const char *name, return 0; } - KDBSearchEngine *se = new KDBSearchEngine(parent,name); + KDBSearchEngine *se = new KDBSearchEngine(tqparent,name); emit objectCreated(se); return se; diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h index 7ae4f20b..b146b021 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h +++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h @@ -8,12 +8,13 @@ class KAboutData; class DbSeFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - DbSeFactory( TQObject *parent=0, const char *name=0); + DbSeFactory( TQObject *tqparent=0, const char *name=0); ~DbSeFactory(); - virtual TQObject *createObject( TQObject *parent=0, const char *name=0, - const char *classname="TQObject", + virtual TQObject *createObject( TQObject *tqparent=0, const char *name=0, + const char *classname=TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui b/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui index d18ecaef..73e15117 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui +++ b/kbabel/kbabeldict/modules/dbsearchengine/dbseprefwidget.ui @@ -1,11 +1,11 @@ DBSearchEnginePref Andrea Rizzi <rizzi@kde.org> - + DBSEPrefWidget - + 0 0 @@ -23,14 +23,14 @@ 6 - + TabWidget6 - + Widget4 @@ -47,7 +47,7 @@ 6 - + ButtonGroup2 @@ -64,7 +64,7 @@ 6 - + allRB @@ -77,7 +77,7 @@ according to the rules defined in tabs <strong> Generic </strong> and <strong>Match</strong> - + slistRB @@ -92,7 +92,7 @@ and <strong>Match</strong> This is the best way to search because the <em>good keys</em> list probably contains all the keys that match with your query. However, it is smaller than the whole database. - + rlistRB @@ -105,7 +105,7 @@ This is the best way to search because the <em>good keys</em> list p - + caseSensitiveCB @@ -116,7 +116,7 @@ This is the best way to search because the <em>good keys</em> list p <qml>If it is checked the search will be case sensitive. It is ignored if you use <em>Return the list of "good keys"</em> search mode. - + normalizeCB @@ -131,7 +131,7 @@ This is the best way to search because the <em>good keys</em> list p It also substitutes groups of more than one space character with only one space character. - + removeContextCB @@ -145,7 +145,7 @@ It also substitutes groups of more than one space character with only one space Remove, if exists, the _:comment - + Layout11 @@ -159,7 +159,7 @@ It also substitutes groups of more than one space character with only one space 6 - + TextLabel3 @@ -179,7 +179,7 @@ It also substitutes groups of more than one space character with only one space 0 - + 0 20 @@ -201,7 +201,7 @@ It also substitutes groups of more than one space character with only one space - + Widget5 @@ -218,7 +218,7 @@ It also substitutes groups of more than one space character with only one space 6 - + ButtonGroup1 @@ -245,7 +245,7 @@ It also substitutes groups of more than one space character with only one space Fixed - + 20 20 @@ -262,14 +262,14 @@ It also substitutes groups of more than one space character with only one space Fixed - + 20 20 - + containedCB @@ -280,18 +280,18 @@ It also substitutes groups of more than one space character with only one space Match if query is contained in database string - + containsCB - Query contains + Query tqcontains Match if query contains the database string - + normalTextRB @@ -305,7 +305,7 @@ It also substitutes groups of more than one space character with only one space Consider the search string as normal text. - + equalCB @@ -332,14 +332,14 @@ It also substitutes groups of more than one space character with only one space Fixed - + 20 20 - + RegExpRB @@ -352,7 +352,7 @@ It also substitutes groups of more than one space character with only one space - + GroupBox3 @@ -384,14 +384,14 @@ If you search for <em>My name is Andrea</em> and you have activated Fixed - + 20 20 - + oneWordSubCB @@ -415,14 +415,14 @@ If you search for <em>My name is Andrea</em> and you have activated Fixed - + 20 20 - + TextLabel1 @@ -430,7 +430,7 @@ If you search for <em>My name is Andrea</em> and you have activated Max number of words in the query: - + twoWordSubSB @@ -444,7 +444,7 @@ If you search for <em>My name is Andrea</em> and you have activated 10 - + twoWordSubCB @@ -458,7 +458,7 @@ If you search for <em>My name is Andrea</em> and you have activated true - + TextLabel2 @@ -466,7 +466,7 @@ If you search for <em>My name is Andrea</em> and you have activated Max number of words in the query: - + Layout7 @@ -480,14 +480,14 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + TextLabel5_3 [A-Za-z0-9_% - + AlignVCenter|AlignRight @@ -498,7 +498,7 @@ If you search for <em>My name is Andrea</em> and you have activated regExpLE - + TextLabel6_2 @@ -508,7 +508,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + TextLabel4 @@ -516,7 +516,7 @@ If you search for <em>My name is Andrea</em> and you have activated Local characters for regular expressions: - + oneWordSubSB @@ -545,7 +545,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + Widget6 @@ -562,7 +562,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + TextLabel7_2 @@ -575,7 +575,7 @@ If you search for <em>My name is Andrea</em> and you have activated dirInput - + autoAddCB_2 @@ -592,7 +592,7 @@ If you search for <em>My name is Andrea</em> and you have activated Automatically add an entry to the database if a new translation is notified by someone (may be kbabel) - + Layout3 @@ -606,7 +606,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + TextLabel1_4 @@ -614,7 +614,7 @@ If you search for <em>My name is Andrea</em> and you have activated Auto added entry author: - + authorLE @@ -624,7 +624,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + scanFilePB @@ -632,7 +632,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scan Single PO File... - + scanPB_2 @@ -640,7 +640,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scan Folder... - + scanrecPB @@ -648,7 +648,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scan Folder && Subfolders... - + Layout5 @@ -662,7 +662,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + filenameLB @@ -670,7 +670,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scanning file: - + entriesLB @@ -680,7 +680,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + Layout4 @@ -694,7 +694,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + processPB @@ -711,7 +711,7 @@ If you search for <em>My name is Andrea</em> and you have activated false - + TextLabel1_3 @@ -719,7 +719,7 @@ If you search for <em>My name is Andrea</em> and you have activated Total progress: - + TextLabel3_3 @@ -727,7 +727,7 @@ If you search for <em>My name is Andrea</em> and you have activated Processing file: - + totalPB @@ -741,7 +741,7 @@ If you search for <em>My name is Andrea</em> and you have activated true - + loadingPB @@ -755,7 +755,7 @@ If you search for <em>My name is Andrea</em> and you have activated true - + TextLabel2_3 @@ -765,7 +765,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + exportPB @@ -776,7 +776,7 @@ If you search for <em>My name is Andrea</em> and you have activated Export... - + statPB @@ -787,7 +787,7 @@ If you search for <em>My name is Andrea</em> and you have activated Statistics - + repeatPB @@ -797,7 +797,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + tab @@ -814,7 +814,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + GroupBox4 @@ -838,7 +838,7 @@ Finally you can set the maximum number of entries in the list. 6 - + TextLabel3_2 @@ -849,7 +849,7 @@ Finally you can set the maximum number of entries in the list. RichText - + thresholdSL @@ -863,7 +863,7 @@ Finally you can set the maximum number of entries in the list. Horizontal - + SpinBox5 @@ -877,7 +877,7 @@ Finally you can set the maximum number of entries in the list. 50 - + TextLabel2_2 @@ -885,7 +885,7 @@ Finally you can set the maximum number of entries in the list. Minimum number of query words in the key (%): - + maxSB @@ -896,7 +896,7 @@ Finally you can set the maximum number of entries in the list. 30 - + SpinBox6 @@ -910,7 +910,7 @@ Finally you can set the maximum number of entries in the list. 50 - + TextLabel4_2 @@ -918,7 +918,7 @@ Finally you can set the maximum number of entries in the list. Max list length: - + thresholdOrigSL @@ -934,7 +934,7 @@ Finally you can set the maximum number of entries in the list. - + GroupBox3_2 @@ -951,7 +951,7 @@ Finally you can set the maximum number of entries in the list. 6 - + TextLabel1_2 @@ -959,7 +959,7 @@ Finally you can set the maximum number of entries in the list. Discard words more frequent than: - + freqSB @@ -976,7 +976,7 @@ Finally you can set the maximum number of entries in the list. 100 - + nothingCB @@ -1032,5 +1032,5 @@ Finally you can set the maximum number of entries in the list. klocale.h kseparator.h - + diff --git a/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C b/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C index a83d947b..74a09037 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C +++ b/kbabel/kbabeldict/modules/dbsearchengine/makemsgdb.C @@ -116,9 +116,9 @@ nmax++; normalizestr(a); // printf("#%s#\n",a); -// while (st.find("#~")==0) +// while (st.tqfind("#~")==0) // st = st.right(st.length()-2); -// while (st.find(" ")==0) +// while (st.tqfind(" ")==0) // st = st.right(st.length()-1); if(isAMsgId) nextIsFuzzy=false; diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp index 562f0835..c81a8562 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp @@ -14,18 +14,18 @@ #include "dbseprefwidget.h" #include "preferenceswidget.h" -PreferencesWidget::PreferencesWidget(TQWidget *parent, const char* name) - : PrefWidget(parent,name) +PreferencesWidget::PreferencesWidget(TQWidget *tqparent, const char* name) + : PrefWidget(tqparent,name) { - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); // TQLabel *label = new TQLabel(i18n("Settings for KDE database search engine"),this); -// layout->addWidget(label); +// tqlayout->addWidget(label); dbpw = new DBSearchEnginePref(this); dbpw->dirInput->setMode(KFile::Directory | KFile::LocalOnly); - layout->addWidget(dbpw); - resize(TQSize(200,200).expandedTo(minimumSizeHint())); + tqlayout->addWidget(dbpw); + resize(TQSize(200,200).expandedTo(tqminimumSizeHint())); // connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1())); @@ -99,12 +99,12 @@ TQString defaultDir; void PreferencesWidget::setName(TQString n) { -dbpw->filenameLB->setText(i18n("Scanning file: %1").arg(n)); +dbpw->filenameLB->setText(i18n("Scanning file: %1").tqarg(n)); } void PreferencesWidget::setEntries(int i) { -dbpw->entriesLB->setText(i18n("Entries added: %1").arg(i)); +dbpw->entriesLB->setText(i18n("Entries added: %1").tqarg(i)); } diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h index 5cd1fed8..134c60bd 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h @@ -7,9 +7,10 @@ class PreferencesWidget : public PrefWidget { Q_OBJECT + TQ_OBJECT public: - PreferencesWidget(TQWidget *parent=0, const char* name=0); + PreferencesWidget(TQWidget *tqparent=0, const char* name=0); virtual ~PreferencesWidget(); virtual void apply(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp index 41f4319d..36f66fc1 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp @@ -18,11 +18,11 @@ * * * In addition, as a special exception, the copyright holders give * * permission to link the code of this program with any edition of * - * the Qt library by Trolltech AS, Norway (or with modified versions * - * of Qt that use the same license as Qt), and distribute linked * + * the TQt library by Trolltech AS, Norway (or with modified versions * + * of TQt that use the same license as TQt), and distribute linked * * combinations including the two. You must obey the GNU General * * Public License in all respects for all of the code used other than * - * Qt. If you modify this file, you may extend this exception to * + * TQt. If you modify this file, you may extend this exception to * * your version of the file, but you are not obligated to do so. If * * you do not wish to do so, delete this exception statement from * * your version. * @@ -47,8 +47,8 @@ #include #define i18n (const char *) -KDBSearchEngine2::KDBSearchEngine2(TQObject *parent,const char*name) - : SearchEngine(parent,name) +KDBSearchEngine2::KDBSearchEngine2(TQObject *tqparent,const char*name) + : SearchEngine(tqparent,name) { pw=0; dbDirectory="."; @@ -250,15 +250,15 @@ void KDBSearchEngine2::stringChanged( TQString orig, TQString translated if(!init()) return; //if(translated.isEmpty()) return; InputInfo ii; - if(description.find("fuzzy",false)==-1) + if(description.tqfind("fuzzy",false)==-1) di->addEntry(orig,translated,&ii); } -PrefWidget * KDBSearchEngine2::preferencesWidget(TQWidget *parent) +PrefWidget * KDBSearchEngine2::preferencesWidget(TQWidget *tqparent) { - pw = new KDB2PreferencesWidget(parent); + pw = new KDB2PreferencesWidget(tqparent); kdDebug(0) << "new KDB2 preferences widget" << endl; setSettings(); connect(pw,TQT_SIGNAL(restoreNow()),this,TQT_SLOT(setSettings())); @@ -499,7 +499,7 @@ void KDBSearchEngine2::scanNowPressed() TQString sourceName; sourceName=pw->dbpw->sourceList->currentText(); if(!init()) return; - if(sources.contains(sourceName)) + if(sources.tqcontains(sourceName)) { TQValueList urls=sources[sourceName].urls(); PoScanner ps(di); @@ -538,7 +538,7 @@ void KDBSearchEngine2::editSource() TQString sourceName; sourceName=pw->dbpw->sourceList->currentText(); - if(sources.contains(sourceName)) + if(sources.tqcontains(sourceName)) { bool nameIsNew; TQString newName; @@ -554,7 +554,7 @@ void KDBSearchEngine2::editSource() { return; } - nameIsNew=sources.contains(newName); + nameIsNew=sources.tqcontains(newName); if(newName!=sourceName && !nameIsNew) { @@ -602,13 +602,13 @@ void KDBSearchEngine2::addSource() if(sd.exec()==TQDialog::Accepted) { newName= sd.sourceName->text(); - nameIsNew=!sources.contains(newName); + nameIsNew=!sources.tqcontains(newName); } else { return; } - // nameIsNew=sources.contains(newName); + // nameIsNew=sources.tqcontains(newName); if(!nameIsNew) { KMessageBox::error(0,i18n("The name you chose is already used.\nPlease change the source name."), diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h index fb9cff70..89a32571 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h @@ -22,10 +22,11 @@ Andrea Rizzi class KDBSearchEngine2 : public SearchEngine { Q_OBJECT + TQ_OBJECT public: - KDBSearchEngine2(TQObject *parent=0, const char *name=0); + KDBSearchEngine2(TQObject *tqparent=0, const char *name=0); virtual ~KDBSearchEngine2(); //init if needed. @@ -77,9 +78,9 @@ class KDBSearchEngine2 : public SearchEngine * search engine. The returned widget should not be bigger than * 400x400. If you need more space, you maybe want to use * a tabbed widget. - * @param parent the parent of the returned widget + * @param tqparent the tqparent of the returned widget */ - virtual PrefWidget* preferencesWidget(TQWidget *parent); + virtual PrefWidget* preferencesWidget(TQWidget *tqparent); /** @returns information about this SearchEngine */ virtual const KAboutData *about() const; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp index 466b68e5..ab3d14b1 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp @@ -145,7 +145,7 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const TQString for(ResultList::iterator it1=r.begin();it1!=r.end() &&!di->stopNow(); ++it1) { TQString chunkTranslation= (*it1).result(); - if(!translationUsed.contains(chunkTranslation)) + if(!translationUsed.tqcontains(chunkTranslation)) { translationUsed[chunkTranslation]=true; kdDebug(0) << "a translation is: " << chunkTranslation << endl; @@ -330,7 +330,7 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const TQString & TQString re=di->format(di->simple(*it,true),query); QueryResult r(re,ori,score); for(TQPtrListIterator it(querychunks); it.current() && di->stopNow() ; ++it){ - ori=ori.replace(TQRegExp((*it)->chunkString(),false),""+(*it)->chunkString()+""); + ori=ori.tqreplace(TQRegExp((*it)->chunkString(),false),""+(*it)->chunkString()+""); } r.setRichOriginal(ori); if(!di->stopNow()) diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h index aa049f85..e2c5db67 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h @@ -16,9 +16,10 @@ #include "chunk.h" #include -class AbstractSearchAlgorithm : public QObject +class AbstractSearchAlgorithm : public TQObject { Q_OBJECT + TQ_OBJECT public: typedef TQValueList ResultList; @@ -47,6 +48,7 @@ class AbstractSearchAlgorithm : public QObject class ExactSearchAlgorithm : public AbstractSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: ExactSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {} @@ -56,6 +58,7 @@ class ExactSearchAlgorithm : public AbstractSearchAlgorithm class AlphaSearchAlgorithm : public AbstractSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: AlphaSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {} @@ -65,6 +68,7 @@ class AlphaSearchAlgorithm : public AbstractSearchAlgorithm class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: SentenceArchiveSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ; @@ -74,6 +78,7 @@ class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: ChunkByChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets); @@ -90,6 +95,7 @@ class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm class FuzzyChunkSearchAlgorithm : public AbstractSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: FuzzyChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets); @@ -105,6 +111,7 @@ class FuzzyChunkSearchAlgorithm : public AbstractSearchAlgorithm class GenericSearchAlgorithm : public AbstractSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: GenericSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ; @@ -123,6 +130,7 @@ class GenericSearchAlgorithm : public AbstractSearchAlgorithm class CorrelationSearchAlgorithm : public AbstractSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: CorrelationSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {} virtual ResultList exec(const TQString& query); @@ -133,6 +141,7 @@ class CorrelationSearchAlgorithm : public AbstractSearchAlgorithm class SingleWordSearchAlgorithm : public GenericSearchAlgorithm { Q_OBJECT + TQ_OBJECT public: SingleWordSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets); virtual DataBaseInterface::ResultList exec(const TQString& query); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp index 0631f7ad..e5250274 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp @@ -174,7 +174,7 @@ DataBaseInterface::MainEntry DataBaseInterface::get(const TQString& query,Search // kdDebug(0) << "MAINDB->GET returned: " << r << endl; if(counter%5==0) kapp->processEvents(100); // kdDebug(0) << "events processed" << endl; - return qMakePair(k,d); + return tqMakePair(k,d); } @@ -282,7 +282,7 @@ bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo TQStringList wt=words(*otIt); for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it) { - if(correlationDiff.contains(*it)) + if(correlationDiff.tqcontains(*it)) correlationDiff[*it]--; else correlationDiff[*it]=-1; @@ -299,7 +299,7 @@ bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo TQStringList wt=words(*otIt); for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it) { - if(correlationDiff.contains(*it)) + if(correlationDiff.tqcontains(*it)) correlationDiff[*it]++; else correlationDiff[*it]=1; @@ -408,7 +408,7 @@ TQMap DataBaseInterface::correlation(TQString word,SearchFilter MainEntry e=get(k->getString(),filter); TQStringList trad=e.second.getTranslations(); - nocck=words(k->getString()).contains(sword); + nocck=words(k->getString()).tqcontains(sword); for( TQStringList::iterator it2=trad.begin();it2!=trad.end();++it2) { @@ -465,7 +465,7 @@ TQStringList DataBaseInterface::words(TQString s) int pos; do { - pos=str.find(TQRegExp("\\s")); + pos=str.tqfind(TQRegExp("\\s")); // if(!simple(str.left(pos)).isEmpty()) // list.append(simple(str.left(pos))); if(!str.left(pos).isEmpty()) @@ -484,13 +484,13 @@ TQString DataBaseInterface::simple(TQString str,bool ck) else res=str.lower(); //lowercase //FIXME: uncoment the foll. line (check speed) - res=res.replace(TQRegExp("(<(.*)>)(.*)()"),"\\3"); //remove enclosing tags + res=res.tqreplace(TQRegExp("(<(.*)>)(.*)()"),"\\3"); //remove enclosing tags //Try to get rid of regexps. - // res=res.replace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char - // res=res.replace(TQRegExp("(('|-|_)+)")," "); //strip non-word char - // res=res.replace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char + // res=res.tqreplace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char + // res=res.tqreplace(TQRegExp("(('|-|_)+)")," "); //strip non-word char + // res=res.tqreplace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char TQString r; TQChar c; @@ -607,16 +607,16 @@ TQString DataBaseInterface::format(TQString _s,TQString t) //FIXME use regexp TQString s=_s; - TQString noTagT=t.replace(TQRegExp("(<(.*)>)(.*)()"),"\\3"); - TQChar first=noTagT[noTagT.find(TQRegExp("\\w"))]; + TQString noTagT=t.tqreplace(TQRegExp("(<(.*)>)(.*)()"),"\\3"); + TQChar first=noTagT[noTagT.tqfind(TQRegExp("\\w"))]; bool firstCapital=isUpper(first); /* -bool dotsAtEnd=(t.find("...")+3==t.length()); -bool gtgtAtEnd=(t.find(">>")+2==t.length()); -bool ltltAtEnd=(t.find("<<")==t.length()-2); +bool dotsAtEnd=(t.tqfind("...")+3==t.length()); +bool gtgtAtEnd=(t.tqfind(">>")+2==t.length()); +bool ltltAtEnd=(t.tqfind("<<")==t.length()-2); -bool columnAtEnd=(t.find(":")+1==t.length()); +bool columnAtEnd=(t.tqfind(":")+1==t.length()); */ bool allupper=(t.upper()==t); @@ -643,13 +643,13 @@ if(columnAtEnd) if(allupper) s=s.upper(); - int pos=t.find(TQRegExp("&")); + int pos=t.tqfind(TQRegExp("&")); if(pos>=0) { - TQChar accel=t[t.find(TQRegExp("&"))+1]; + TQChar accel=t[t.tqfind(TQRegExp("&"))+1]; if(accel!='&') { - pos=s.find(accel,false); + pos=s.tqfind(accel,false); if(pos<0) pos=0; s.insert(pos,"&"); @@ -685,8 +685,8 @@ TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,T //kdDebug(0) << "phRegExp: " << phRegExp << endl; //kdDebug(0) << "cap[" << i << "]: "<< *capit<< endl; - stringReplace = stringReplace.replace(TQRegExp(phRegExp),*capit); - stringSearch = stringSearch.replace(TQRegExp(phRegExp),*capit); + stringReplace = stringReplace.tqreplace(TQRegExp(phRegExp),*capit); + stringSearch = stringSearch.tqreplace(TQRegExp(phRegExp),*capit); i++; } @@ -694,7 +694,7 @@ TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,T // kdDebug(0) << "stringReplace " << stringReplace << endl; TQRegExp stringSearchRegExp = TQRegExp(stringSearch); // kdDebug(0) << "before: "<get(&k,&d); if(counter%5==0) kapp->processEvents(100); - return qMakePair(k,d); + return tqMakePair(k,d); } @@ -748,5 +748,5 @@ DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const TQString & qu -//#include "database.moc.cpp" +//#include "database.tqmoc.cpp" diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.h b/kbabel/kbabeldict/modules/dbsearchengine2/database.h index d6ed3482..113d7704 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/database.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.h @@ -153,13 +153,13 @@ class SearchFilter -class DataBaseInterface : public QObject +class DataBaseInterface : public TQObject { public: //move result list typedef to AbstractAlgorthm or somewhere else typedef TQValueList ResultList; - typedef QPair MainEntry; + typedef TQPair MainEntry; DataBaseInterface( TQString dir, DBSESettings *sets); ~DataBaseInterface(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp index efa7e44d..0958b801 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp @@ -71,13 +71,13 @@ void DBItemMainData::read(TQDataStream *s) void DBItemMainData::write(TQDataStream *s) { - *s << (Q_UINT32)indexnumber << translations; + *s << (TQ_UINT32)indexnumber << translations; } void DBItemMainData::addTranslation(TQString str, unsigned int ref) { //get(); - if(translations[str].find(ref)==translations[str].end()) // If it do not exists + if(translations[str].tqfind(ref)==translations[str].end()) // If it do not exists translations[str].append(ref); //add a new reference. else { @@ -106,7 +106,7 @@ TQMapIterator > it2; { //Dirty hack it2=it; it++; - if(it2.data().find(ref)!=it2.data().end()) + if(it2.data().tqfind(ref)!=it2.data().end()) removeTranslation(it2.key(),ref); } @@ -142,7 +142,7 @@ list.clear(); void DBItemMultiIndex::addEntry(unsigned int index) { // get(); - if(list.find(index)==list.end()) + if(list.tqfind(index)==list.end()) { list.append(index); qHeapSort(list); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp index 7c2d8564..b7e64c2b 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp @@ -39,7 +39,7 @@ void MessagesSource::writeConfig(KConfigBase *config) config->writeEntry("LocationType",type); config->writeEntry("ProjectName",projectName); config->writeEntry("ProjectKeywords",projectKeywords); - config->writeEntry("Status",status); + config->writeEntry("tqStatus",status); } void MessagesSource::readConfig(KConfigBase *config) @@ -48,7 +48,7 @@ void MessagesSource::readConfig(KConfigBase *config) type=config->readNumEntry("LocationType",0); projectName=config->readEntry("ProjectName"); projectKeywords=config->readEntry("ProjectKeywords"); - status=config->readEntry("Status"); + status=config->readEntry("tqStatus"); } @@ -87,7 +87,7 @@ TQValueList MessagesSource::filesInDir(KURL url,bool recursive) TQDir d(url.path()); d.setMatchAllDirs(true); kdDebug(0) << d.count() << " files in dir "<< url.path()< it(*files); @@ -120,7 +120,7 @@ TQValueList MessagesSource::filesInDir(KURL url,bool recursive) //FIXME: clean this class PoScanner::PoScanner(DataBaseInterface *dbi, - TQObject *parent,const char *name):TQObject(parent,name) + TQObject *tqparent,const char *name):TQObject(tqparent,name) { di=dbi; removeOldCatalogTranslation=true; @@ -138,7 +138,7 @@ if (!called) { pb=true; count=0;} called=true; -kdDebug(0) << TQString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl; +kdDebug(0) << TQString("Scanning: %1, %2").tqarg(pathName).tqarg(pattern) << endl; if(pb) { @@ -147,7 +147,7 @@ emit patternProgress(0); } TQDir d(pathName,pattern); d.setMatchAllDirs(true); - const QFileInfoList* files = d.entryInfoList(); + const TQFileInfoList* files = d.entryInfoList(); tot=files->count(); TQPtrListIterator it(*files); kdDebug(0) << tot << endl; @@ -203,7 +203,7 @@ emit fileStarted(); Catalog * catalog=new Catalog(this,"ScanPoCatalog"); TQString pretty=u.prettyURL(); -TQString location=pretty.right(pretty.length()-pretty.findRev("/")-1); +TQString location=pretty.right(pretty.length()-pretty.tqfindRev("/")-1); connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int))); emit filename(location); @@ -212,7 +212,7 @@ emit fileLoading(0); bool error; -ConversionStatus rr=catalog->openURL(u); +ConversiontqStatus rr=catalog->openURL(u); if(rr != OK && rr !=RECOVERED_PARSE_ERROR ) { delete catalog; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h index e4cdf7da..3036f70c 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h @@ -69,13 +69,13 @@ class MessagesSource }; -class PoScanner : public QObject +class PoScanner : public TQObject { - Q_OBJECT; + TQ_OBJECT; public: - PoScanner(DataBaseInterface *dbi,TQObject *parent=0,const char *name=0); + PoScanner(DataBaseInterface *dbi,TQObject *tqparent=0,const char *name=0); /* Scan a single PO file. diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2.ui b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2.ui index 327a9d9d..348900e5 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2.ui +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2.ui @@ -1,10 +1,10 @@ DBSearchEnginePrefWidget - + Form1 - + 0 0 @@ -16,11 +16,11 @@ unnamed - + tabWidget2 - + tab @@ -31,7 +31,7 @@ unnamed - + groupBox1 @@ -42,7 +42,7 @@ unnamed - + textLabel1 @@ -55,7 +55,7 @@ dbDirectory - + autoUpdate @@ -65,7 +65,7 @@ - + groupBox2 @@ -76,7 +76,7 @@ unnamed - + textLabel2 @@ -84,7 +84,7 @@ Author: - + checkBox2 @@ -109,7 +109,7 @@ Expanding - + 20 40 @@ -118,7 +118,7 @@ - + tab @@ -129,7 +129,7 @@ unnamed - + textLabel5 @@ -147,7 +147,7 @@ Expanding - + 20 40 @@ -168,7 +168,7 @@ Horizontal - + groupBox3 @@ -179,7 +179,7 @@ unnamed - + textLabel3_2 @@ -197,7 +197,7 @@ scoreGlossary - + textLabel3_2_2 @@ -205,7 +205,7 @@ Score: - + useSentence @@ -213,7 +213,7 @@ Fuzzy sentence archive - + useGlossary @@ -221,7 +221,7 @@ Glossary - + useExact @@ -244,7 +244,7 @@ scoreSentence - + useDivide @@ -252,7 +252,7 @@ Sentence by sentence - + useAlpha @@ -260,7 +260,7 @@ Alphanumeric - + textLabel3_2_3 @@ -268,7 +268,7 @@ Score: - + textLabel3_2_4 @@ -276,7 +276,7 @@ Score: - + textLabel3 @@ -289,7 +289,7 @@ scoreAlpha - + textLabel3_2_6 @@ -297,7 +297,7 @@ Score: - + textLabel3_2_5 @@ -305,7 +305,7 @@ Score: - + useWordByWord @@ -313,7 +313,7 @@ Word by word - + useDynamic @@ -328,7 +328,7 @@ - + textLabel4 @@ -348,7 +348,7 @@ - + tab @@ -359,7 +359,7 @@ unnamed - + groupBox4 @@ -380,14 +380,14 @@ Fixed - + 20 20 - + firstCapital @@ -395,7 +395,7 @@ First capital letter match - + allCapital @@ -403,7 +403,7 @@ All capital letter match - + accelerator @@ -411,7 +411,7 @@ Accelerator symbol (&&) - + sameLetter @@ -421,7 +421,7 @@ - + groupBox5 @@ -432,7 +432,7 @@ unnamed - + textLabel1_2 @@ -445,7 +445,7 @@ kLineEdit1_2 - + Enabled @@ -496,7 +496,7 @@ Expanding - + 20 20 @@ -511,7 +511,7 @@ Delete - + addRule @@ -519,7 +519,7 @@ Add - + textLabel3_3 @@ -537,7 +537,7 @@ kLineEdit2 - + textLabel2_2 @@ -549,7 +549,7 @@ - + tab @@ -560,18 +560,18 @@ unnamed - + groupBox6 Options - + checkLang - + 20 30 @@ -583,11 +583,11 @@ Check language - + useFilters - + 20 60 @@ -599,11 +599,11 @@ Use current filters - + dateToday - + 20 90 @@ -616,7 +616,7 @@ - + groupBox7 @@ -627,7 +627,7 @@ unnamed - + editSource @@ -669,7 +669,7 @@ Expanding - + 20 40 @@ -684,7 +684,7 @@ Scan All - + sourceList @@ -693,7 +693,7 @@ - + tab @@ -706,7 +706,7 @@ - + klineedit.h kpushbutton.h diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp index 55f6a16f..0c65710c 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp @@ -22,8 +22,8 @@ KInstance *DbSe2Factory::s_instance = 0; KAboutData *DbSe2Factory::s_about = 0; -DbSe2Factory::DbSe2Factory( TQObject *parent, const char *name) - : KLibFactory(parent,name) +DbSe2Factory::DbSe2Factory( TQObject *tqparent, const char *name) + : KLibFactory(tqparent,name) { } @@ -43,7 +43,7 @@ DbSe2Factory::~DbSe2Factory() } -TQObject *DbSe2Factory::createObject( TQObject *parent, const char *name, +TQObject *DbSe2Factory::createObject( TQObject *tqparent, const char *name, const char *classname, const TQStringList &) { if(TQCString(classname) != "SearchEngine") @@ -52,7 +52,7 @@ TQObject *DbSe2Factory::createObject( TQObject *parent, const char *name, return 0; } - KDBSearchEngine2 *se = new KDBSearchEngine2(parent,name); + KDBSearchEngine2 *se = new KDBSearchEngine2(tqparent,name); emit objectCreated(se); return se; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h index 2b70184a..2f1b98ca 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h @@ -8,12 +8,13 @@ class KAboutData; class DbSe2Factory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - DbSe2Factory( TQObject *parent=0, const char *name=0); + DbSe2Factory( TQObject *tqparent=0, const char *name=0); ~DbSe2Factory(); - virtual TQObject *createObject( TQObject *parent=0, const char *name=0, - const char *classname="TQObject", + virtual TQObject *createObject( TQObject *tqparent=0, const char *name=0, + const char *classname=TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui b/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui index c233265f..a9820329 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbseprefwidget.ui @@ -1,11 +1,11 @@ DBSearchEnginePref Andrea Rizzi <rizzi@kde.org> - + DBSEPrefWidget - + 0 0 @@ -26,14 +26,14 @@ 6 - + TabWidget6 - + Widget4 @@ -50,7 +50,7 @@ 6 - + ButtonGroup2 @@ -67,7 +67,7 @@ 6 - + allRB @@ -80,7 +80,7 @@ according to the rules defined in tabs <strong> Generic </strong> and <strong>Match</strong> - + slistRB @@ -95,7 +95,7 @@ and <strong>Match</strong> This is the best way to search because the <em>good keys</em> list probably contains all the keys that match with your query. However, it is smaller than the whole database. - + rlistRB @@ -108,7 +108,7 @@ This is the best way to search because the <em>good keys</em> list p - + caseSensitiveCB @@ -119,7 +119,7 @@ This is the best way to search because the <em>good keys</em> list p <qml>If it is checked the search will be case sensitive. It is ignored if you use <em>Return the list of "good keys"</em> search mode. - + normalizeCB @@ -134,7 +134,7 @@ This is the best way to search because the <em>good keys</em> list p It also substitutes groups of more than one space character with only one space character. - + removeContextCB @@ -148,7 +148,7 @@ It also substitutes groups of more than one space character with only one space Remove, if exists, the _:comment - + Layout11 @@ -162,7 +162,7 @@ It also substitutes groups of more than one space character with only one space 6 - + TextLabel3 @@ -182,7 +182,7 @@ It also substitutes groups of more than one space character with only one space 0 - + 0 20 @@ -204,7 +204,7 @@ It also substitutes groups of more than one space character with only one space - + Widget5 @@ -221,7 +221,7 @@ It also substitutes groups of more than one space character with only one space 6 - + ButtonGroup1 @@ -248,7 +248,7 @@ It also substitutes groups of more than one space character with only one space Fixed - + 20 20 @@ -265,14 +265,14 @@ It also substitutes groups of more than one space character with only one space Fixed - + 20 20 - + containedCB @@ -283,18 +283,18 @@ It also substitutes groups of more than one space character with only one space Match if query is contained in database string - + containsCB - Query contains + Query tqcontains Match if query contains the database string - + normalTextRB @@ -308,7 +308,7 @@ It also substitutes groups of more than one space character with only one space Consider the search string as normal text. - + equalCB @@ -335,14 +335,14 @@ It also substitutes groups of more than one space character with only one space Fixed - + 20 20 - + RegExpRB @@ -355,7 +355,7 @@ It also substitutes groups of more than one space character with only one space - + GroupBox3 @@ -387,14 +387,14 @@ If you search for <em>My name is Andrea</em> and you have activated Fixed - + 20 20 - + oneWordSubCB @@ -418,14 +418,14 @@ If you search for <em>My name is Andrea</em> and you have activated Fixed - + 20 20 - + TextLabel1 @@ -433,7 +433,7 @@ If you search for <em>My name is Andrea</em> and you have activated Max number of words in the query: - + twoWordSubSB @@ -447,7 +447,7 @@ If you search for <em>My name is Andrea</em> and you have activated 10 - + twoWordSubCB @@ -461,7 +461,7 @@ If you search for <em>My name is Andrea</em> and you have activated true - + TextLabel2 @@ -469,7 +469,7 @@ If you search for <em>My name is Andrea</em> and you have activated Max number of words in the query: - + Layout7 @@ -483,14 +483,14 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + TextLabel5_3 [A-Za-z0-9_% - + AlignVCenter|AlignRight @@ -501,7 +501,7 @@ If you search for <em>My name is Andrea</em> and you have activated regExpLE - + TextLabel6_2 @@ -511,7 +511,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + TextLabel4 @@ -519,7 +519,7 @@ If you search for <em>My name is Andrea</em> and you have activated Local characters for regular expressions: - + oneWordSubSB @@ -548,7 +548,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + Widget6 @@ -565,7 +565,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + TextLabel7_2 @@ -578,7 +578,7 @@ If you search for <em>My name is Andrea</em> and you have activated dirInput - + autoAddCB_2 @@ -595,7 +595,7 @@ If you search for <em>My name is Andrea</em> and you have activated Automatically add an entry to the database if a new translation is notified by someone (may be kbabel) - + Layout3 @@ -609,7 +609,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + TextLabel1_4 @@ -617,7 +617,7 @@ If you search for <em>My name is Andrea</em> and you have activated Auto added entry author: - + authorLE @@ -627,7 +627,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + scanFilePB @@ -635,7 +635,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scan Single PO File - + scanPB_2 @@ -643,7 +643,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scan Folder - + scanrecPB @@ -651,7 +651,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scan Folder && Subfolders - + Layout5 @@ -665,7 +665,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + filenameLB @@ -673,7 +673,7 @@ If you search for <em>My name is Andrea</em> and you have activated Scanning file: - + entriesLB @@ -683,7 +683,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + Layout4 @@ -697,7 +697,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + processPB @@ -714,7 +714,7 @@ If you search for <em>My name is Andrea</em> and you have activated false - + TextLabel1_3 @@ -722,7 +722,7 @@ If you search for <em>My name is Andrea</em> and you have activated Total progress: - + TextLabel3_3 @@ -730,7 +730,7 @@ If you search for <em>My name is Andrea</em> and you have activated Processing file: - + totalPB @@ -744,7 +744,7 @@ If you search for <em>My name is Andrea</em> and you have activated true - + loadingPB @@ -758,7 +758,7 @@ If you search for <em>My name is Andrea</em> and you have activated true - + TextLabel2_3 @@ -768,7 +768,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + exportPB @@ -779,7 +779,7 @@ If you search for <em>My name is Andrea</em> and you have activated Export... - + statPB @@ -790,7 +790,7 @@ If you search for <em>My name is Andrea</em> and you have activated Statistics - + repeatPB @@ -800,7 +800,7 @@ If you search for <em>My name is Andrea</em> and you have activated - + tab @@ -817,7 +817,7 @@ If you search for <em>My name is Andrea</em> and you have activated 6 - + GroupBox4 @@ -841,7 +841,7 @@ Finally you can set the maximum number of entries in the list. 6 - + TextLabel3_2 @@ -852,7 +852,7 @@ Finally you can set the maximum number of entries in the list. RichText - + thresholdSL @@ -866,7 +866,7 @@ Finally you can set the maximum number of entries in the list. Horizontal - + SpinBox5 @@ -880,7 +880,7 @@ Finally you can set the maximum number of entries in the list. 50 - + TextLabel2_2 @@ -888,7 +888,7 @@ Finally you can set the maximum number of entries in the list. Minimum number of query words in the key (%): - + maxSB @@ -899,7 +899,7 @@ Finally you can set the maximum number of entries in the list. 30 - + SpinBox6 @@ -913,7 +913,7 @@ Finally you can set the maximum number of entries in the list. 50 - + TextLabel4_2 @@ -921,7 +921,7 @@ Finally you can set the maximum number of entries in the list. Max list length: - + thresholdOrigSL @@ -937,7 +937,7 @@ Finally you can set the maximum number of entries in the list. - + GroupBox3_2 @@ -954,7 +954,7 @@ Finally you can set the maximum number of entries in the list. 6 - + TextLabel1_2 @@ -962,7 +962,7 @@ Finally you can set the maximum number of entries in the list. Discard words more frequent than: - + freqSB @@ -979,7 +979,7 @@ Finally you can set the maximum number of entries in the list. 100 - + nothingCB @@ -1035,5 +1035,5 @@ Finally you can set the maximum number of entries in the list. klocale.h kseparator.h - + diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp index 76aef878..ba16327c 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp @@ -15,17 +15,17 @@ #include "dbse2.h" #include "preferenceswidget.h" -KDB2PreferencesWidget::KDB2PreferencesWidget(TQWidget *parent, const char* name) - : PrefWidget(parent,name) +KDB2PreferencesWidget::KDB2PreferencesWidget(TQWidget *tqparent, const char* name) + : PrefWidget(tqparent,name) { - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); // TQLabel *label = new TQLabel(i18n("Settings for KDE Database Search Engine"),this); -// layout->addWidget(label); +// tqlayout->addWidget(label); dbpw = new DBSearchEnginePrefWidget(this); dbpw->dbDirectory->setMode(KFile::Directory | KFile::LocalOnly); dbpw->show(); - layout->addWidget(dbpw); + tqlayout->addWidget(dbpw); setMinimumSize(300,300); standard(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h index 1f706902..68e283bd 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h @@ -7,9 +7,10 @@ class KDB2PreferencesWidget : public PrefWidget { Q_OBJECT + TQ_OBJECT public: - KDB2PreferencesWidget(TQWidget *parent=0, const char* name=0); + KDB2PreferencesWidget(TQWidget *tqparent=0, const char* name=0); virtual ~KDB2PreferencesWidget(); virtual void apply(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/sourcedialog.ui b/kbabel/kbabeldict/modules/dbsearchengine2/sourcedialog.ui index 3f4030a0..9447f794 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/sourcedialog.ui +++ b/kbabel/kbabeldict/modules/dbsearchengine2/sourcedialog.ui @@ -1,10 +1,10 @@ SourceDialog - + SourceDialog - + 0 0 @@ -29,7 +29,7 @@ Expanding - + 40 20 @@ -52,18 +52,18 @@ &Cancel - + groupBox1 Additional Informations - + textLabel6 - + 11 76 @@ -72,14 +72,14 @@ - Status: + tqStatus: projectName - + 125 22 @@ -92,7 +92,7 @@ projectKeywords - + 125 49 @@ -105,7 +105,7 @@ status - + 125 76 @@ -117,11 +117,11 @@ true - + textLabel4 - + 11 22 @@ -133,11 +133,11 @@ Project name: - + textLabel5 - + 11 49 @@ -150,7 +150,7 @@ - + groupBox2 @@ -186,7 +186,7 @@ type - + textLabel1 @@ -199,7 +199,7 @@ sourceLocation - + textLabel3 @@ -215,7 +215,7 @@ Setup Filter... - + textLabel2 @@ -223,7 +223,7 @@ Location: - + useFilter @@ -251,7 +251,7 @@ reject() - + kpushbutton.h kpushbutton.h diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp index c8d8c1db..730424f1 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -54,8 +54,8 @@ KInstance *PaFactory::s_instance = 0; KAboutData *PaFactory::s_about = 0; -PaFactory::PaFactory( TQObject *parent, const char *name) - : KLibFactory(parent,name) +PaFactory::PaFactory( TQObject *tqparent, const char *name) + : KLibFactory(tqparent,name) { } @@ -75,7 +75,7 @@ PaFactory::~PaFactory() } -TQObject *PaFactory::createObject( TQObject *parent, const char *name +TQObject *PaFactory::createObject( TQObject *tqparent, const char *name , const char *classname, const TQStringList &) { if(TQCString(classname) != "SearchEngine") @@ -84,7 +84,7 @@ TQObject *PaFactory::createObject( TQObject *parent, const char *name return 0; } - return new PoAuxiliary(parent,name); + return new PoAuxiliary(tqparent,name); } diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h index 901351c7..7c92e008 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h +++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -42,12 +42,13 @@ class KAboutData; class PaFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - PaFactory( TQObject *parent=0, const char *name=0); + PaFactory( TQObject *tqparent=0, const char *name=0); ~PaFactory(); - virtual TQObject *createObject( TQObject *parent=0, const char *name=0 - , const char *classname="TQObject" + virtual TQObject *createObject( TQObject *tqparent=0, const char *name=0 + , const char *classname=TQOBJECT_OBJECT_NAME_STRING , const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp index eae86d65..cc726ad8 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -50,8 +50,8 @@ using namespace KBabel; -PoAuxiliary::PoAuxiliary(TQObject *parent, const char *name) - : SearchEngine(parent, name) +PoAuxiliary::PoAuxiliary(TQObject *tqparent, const char *name) + : SearchEngine(tqparent, name) { catalog = new Catalog(this, "PoAuxiliary::catalog"); prefWidget=0; @@ -124,9 +124,9 @@ void PoAuxiliary::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *parent) +PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *tqparent) { - prefWidget = new AuxiliaryPreferencesWidget(parent,"pocompendium_prefwidget"); + prefWidget = new AuxiliaryPreferencesWidget(tqparent,"pocompendium_prefwidget"); connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); connect(prefWidget, TQT_SIGNAL(restoreSettings()) , this, TQT_SLOT(restoreSettings())); @@ -184,7 +184,7 @@ bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFi kapp->processEvents(100); - text.replace("\n",""); + text.tqreplace("\n",""); Entry *entry = msgidDict[text]; if(entry) @@ -358,27 +358,27 @@ void PoAuxiliary::loadAuxiliary() TQString path=url; - if(path.contains("@LANG@")) + if(path.tqcontains("@LANG@")) { - path.replace("@LANG@",langCode); + path.tqreplace("@LANG@",langCode); } - if(path.contains("@PACKAGE@")) + if(path.tqcontains("@PACKAGE@")) { - int pos=package.findRev("/"); + int pos=package.tqfindRev("/"); if( pos<0 ) pos=0; - path.replace("@PACKAGE@",package.mid(pos)); + path.tqreplace("@PACKAGE@",package.mid(pos)); } - if(path.contains("@PACKAGEDIR@")) + if(path.tqcontains("@PACKAGEDIR@")) { TQString packagedir; - int pos=package.findRev("/"); + int pos=package.tqfindRev("/"); if( pos > 0 ) packagedir=package.left(pos); else packagedir=""; - path.replace("@PACKAGEDIR@",packagedir); + path.tqreplace("@PACKAGEDIR@",packagedir); kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl; } TQRegExp reg("@DIR[0-9]+@"); - if(path.contains(reg)) + if(path.tqcontains(reg)) { int pos=reg.search(path); int len = reg.matchedLength(); @@ -393,7 +393,7 @@ void PoAuxiliary::loadAuxiliary() { TQString dir=directory(editedFile,number); TQString s("@DIR%1@"); - path.replace(s.arg(number),dir); + path.tqreplace(s.tqarg(number),dir); pos+=dir.length(); } @@ -427,7 +427,7 @@ void PoAuxiliary::loadAuxiliary() connect(catalog, TQT_SIGNAL(signalProgress(int)) , this, TQT_SIGNAL(progress(int))); - ConversionStatus stat = catalog->openURL(u); + ConversiontqStatus stat = catalog->openURL(u); if( stat != OK && stat != RECOVERED_PARSE_ERROR) { kdDebug(KBABEL_SEARCH) << "error while opening file " << u.prettyURL() << endl; @@ -436,7 +436,7 @@ void PoAuxiliary::loadAuxiliary() { error = true; errorMsg = i18n("Error while trying to open file for PO Auxiliary module:\n%1") - .arg(u.prettyURL()); + .tqarg(u.prettyURL()); emit hasError(errorMsg); } } @@ -461,7 +461,7 @@ void PoAuxiliary::loadAuxiliary() Entry *e = new Entry; // FIXME: should care about plural forms e->orig = catalog->msgid(i).first(); - e->orig.replace("\n",""); + e->orig.tqreplace("\n",""); kdWarning() << "PoAuxialiary does not support plural forms" << endl; e->translation = catalog->msgstr(i).first(); e->comment = catalog->comment(i); @@ -491,7 +491,7 @@ void PoAuxiliary::loadAuxiliary() void PoAuxiliary::setEditedFile(const TQString& file) { - if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url)) + if(initialized && (url.tqcontains("@DIR") || KURL::isRelativeURL(url)) && file!=editedFile && !loadTimer->isActive() ) { initialized=false; @@ -503,7 +503,7 @@ void PoAuxiliary::setEditedFile(const TQString& file) void PoAuxiliary::setEditedPackage(const TQString& pack) { - if(initialized && url.contains("@PACKAGE@") && pack!=package + if(initialized && url.tqcontains("@PACKAGE@") && pack!=package && !loadTimer->isActive() ) { initialized=false; @@ -515,7 +515,7 @@ void PoAuxiliary::setEditedPackage(const TQString& pack) void PoAuxiliary::setLanguageCode(const TQString& lang) { - if(initialized && url.contains("@LANG@") && lang!=langCode + if(initialized && url.tqcontains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) { initialized=false; @@ -538,7 +538,7 @@ TQString PoAuxiliary::translate(const TQString& text, uint pluralForm) if(error) { - return TQString::null; + return TQString(); } Entry *entry = msgidDict[text]; @@ -547,7 +547,7 @@ TQString PoAuxiliary::translate(const TQString& text, uint pluralForm) return entry->translation; } - return TQString::null; + return TQString(); } diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h index 7ada1d52..0ad4c635 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h +++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -50,9 +50,10 @@ class AuxiliaryPreferencesWidget; class PoAuxiliary : public SearchEngine { Q_OBJECT + TQ_OBJECT public: - PoAuxiliary(TQObject *parent=0, const char *name=0); + PoAuxiliary(TQObject *tqparent=0, const char *name=0); virtual ~PoAuxiliary(); virtual bool isReady() const; @@ -64,7 +65,7 @@ public: virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(TQWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *tqparent); virtual const KAboutData *about() const; diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp index 5a534ecf..2c984c46 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -43,14 +43,14 @@ #include "preferenceswidget.h" #include "pwidget.h" -AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *parent, const char* name) - : PrefWidget(parent,name) +AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *tqparent, const char* name) + : PrefWidget(tqparent,name) , changed(false) { - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); prefWidget = new PWidget(this); - layout->addWidget(prefWidget); + tqlayout->addWidget(prefWidget); connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&)) diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h index 3f0862b2..e967d958 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -42,9 +42,10 @@ class PWidget; class AuxiliaryPreferencesWidget : public PrefWidget { Q_OBJECT + TQ_OBJECT public: - AuxiliaryPreferencesWidget(TQWidget *parent=0, const char* name=0); + AuxiliaryPreferencesWidget(TQWidget *tqparent=0, const char* name=0); virtual ~AuxiliaryPreferencesWidget(); virtual void apply(); diff --git a/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui b/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui index 8179caed..aa9e6710 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui +++ b/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui @@ -7,7 +7,7 @@ PWidget - geometry + tqgeometry 0 0 @@ -92,14 +92,14 @@ The following variables will be replaced in the path if available: Expanding - sizeHint + tqsizeHint 20 20 - sizeHint + tqsizeHint 20 20 diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp index 9eb816bd..f5c37dd5 100644 --- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -42,8 +42,8 @@ using namespace KBabel; -CompendiumData::CompendiumData(TQObject *parent) - : TQObject(parent) +CompendiumData::CompendiumData(TQObject *tqparent) + : TQObject(tqparent) , _active(false) , _error(false) , _initialized(false) @@ -53,7 +53,7 @@ CompendiumData::CompendiumData(TQObject *parent) , _wordDict(9887) , _textonlyDict(9887) { - _catalog = new Catalog(this, "CompendiumData::catalog", TQString::null); + _catalog = new Catalog(this, "CompendiumData::catalog", TQString()); _exactDict.setAutoDelete(true); _allDict.setAutoDelete(true); _wordDict.setAutoDelete(true); @@ -79,7 +79,7 @@ bool CompendiumData::load(KURL url) emit progressStarts(i18n("Loading PO compendium")); connect(_catalog, TQT_SIGNAL(signalProgress(int)), this, TQT_SIGNAL(progress(int))); - ConversionStatus stat=_catalog->openURL(url); + ConversiontqStatus stat=_catalog->openURL(url); disconnect(_catalog, TQT_SIGNAL(signalProgress(int)) , this, TQT_SIGNAL(progress(int))); @@ -91,7 +91,7 @@ bool CompendiumData::load(KURL url) _error = true; _errorMsg = i18n("Error while trying to read file for PO Compendium module:\n%1") - .arg(url.prettyURL()); + .tqarg(url.prettyURL()); emit progressEnds(); diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h index d5668b4a..6d229d74 100644 --- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h +++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -46,12 +46,13 @@ namespace KBabel class Catalog; } -class CompendiumData : public QObject +class CompendiumData : public TQObject { Q_OBJECT + TQ_OBJECT public: - CompendiumData(TQObject *parent=0); + CompendiumData(TQObject *tqparent=0); bool load(KURL url); diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp index 37ae63a4..0d3d2d24 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -54,8 +54,8 @@ KInstance *PcFactory::s_instance = 0; KAboutData *PcFactory::s_about = 0; -PcFactory::PcFactory( TQObject *parent, const char *name) - : KLibFactory(parent,name) +PcFactory::PcFactory( TQObject *tqparent, const char *name) + : KLibFactory(tqparent,name) { } @@ -75,7 +75,7 @@ PcFactory::~PcFactory() } -TQObject *PcFactory::createObject( TQObject *parent, const char *name +TQObject *PcFactory::createObject( TQObject *tqparent, const char *name , const char *classname, const TQStringList &) { if(TQCString(classname) != "SearchEngine") @@ -84,7 +84,7 @@ TQObject *PcFactory::createObject( TQObject *parent, const char *name return 0; } - return new PoCompendium(parent,name); + return new PoCompendium(tqparent,name); } diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h index 1b0b8820..b92cfcb0 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h +++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -42,12 +42,13 @@ class KAboutData; class PcFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - PcFactory( TQObject *parent=0, const char *name=0); + PcFactory( TQObject *tqparent=0, const char *name=0); ~PcFactory(); - virtual TQObject *createObject( TQObject *parent=0, const char *name=0 - , const char *classname="TQObject" + virtual TQObject *createObject( TQObject *tqparent=0, const char *name=0 + , const char *classname=TQOBJECT_OBJECT_NAME_STRING , const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp index 5220f88a..1911be72 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -63,8 +63,8 @@ using namespace KBabel; static KStaticDeleter< TQDict > compDataDeleter; TQDict *PoCompendium::_compDict = 0; -PoCompendium::PoCompendium(TQObject *parent, const char *name) - : SearchEngine(parent, name) +PoCompendium::PoCompendium(TQObject *tqparent, const char *name) + : SearchEngine(tqparent, name) { prefWidget=0; data=0; @@ -160,9 +160,9 @@ void PoCompendium::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *PoCompendium::preferencesWidget(TQWidget *parent) +PrefWidget *PoCompendium::preferencesWidget(TQWidget *tqparent) { - prefWidget = new CompendiumPreferencesWidget(parent,"pocompendium_prefwidget"); + prefWidget = new CompendiumPreferencesWidget(tqparent,"pocompendium_prefwidget"); kdDebug(KBABEL_SEARCH) << "PreferencesWidget is " << prefWidget << endl; connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); connect(prefWidget, TQT_SIGNAL(restoreSettings()) @@ -232,7 +232,7 @@ bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm, TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { - if(foundIndices.contains(*it)) + if(foundIndices.tqcontains(*it)) { continue; } @@ -288,7 +288,7 @@ bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrLi TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { - if(foundIndices.contains(*it)) + if(foundIndices.tqcontains(*it)) { continue; } @@ -346,12 +346,12 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr if(stop) break; - if(foundIndices.contains(*it)) + if(foundIndices.tqcontains(*it)) { continue; } - if(checkedIndices.contains(*it)) + if(checkedIndices.tqcontains(*it)) { continue; } @@ -397,7 +397,7 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr s=" "+*wit+" "; o=" "+origStr+" "; } - if(o.contains(s)) + if(o.tqcontains(s)) { found=true; } @@ -421,7 +421,7 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr if(!found && matchContains && !wholeWords) { - TQString s=maskString(searchStr); + TQString s=tqmaskString(searchStr); TQRegExp searchReg(s); if(searchReg.search(origStr) >= 0) @@ -430,7 +430,7 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr if(!found && matchIsContained && !wholeWords) { - TQString s=maskString(origStr); + TQString s=tqmaskString(origStr); TQRegExp reg(s); if(reg.search(searchStr) >= 0) @@ -445,7 +445,7 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - TQString s=maskString(*wit2); + TQString s=tqmaskString(*wit2); TQRegExp reg(s); if(reg.search(origStr) >= 0) @@ -491,7 +491,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr TQRegExp searchReg; if(matchContains) { - TQString s=maskString(searchStr); + TQString s=tqmaskString(searchStr); searchReg.setPattern(s); } @@ -519,7 +519,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr emit progress( 50+(50*(checkCounter+1))/catalogInfo.total); } - if(checkedIndices.contains(i)) + if(checkedIndices.tqcontains(i)) { continue; } @@ -532,7 +532,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr continue; } - if(foundIndices.contains(i)) + if(foundIndices.tqcontains(i)) { continue; } @@ -564,7 +564,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr if(!found && matchIsContained) { - TQString s=maskString(origStr); + TQString s=tqmaskString(origStr); TQRegExp reg(s); if(reg.search(searchStr) >= 0) @@ -580,7 +580,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - TQString s=maskString(*wit2); + TQString s=tqmaskString(*wit2); if(wholeWords) { @@ -689,7 +689,7 @@ bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const Sear // search without whitespace searchTextOnly(searchStr, pluralForm, results, foundIndices, checkedIndices); - // now, search based on words (contains, is contained, etc) + // now, search based on words (tqcontains, is contained, etc) searchWords(searchStr, pluralForm, results, foundIndices, checkedIndices); @@ -797,9 +797,9 @@ void PoCompendium::slotLoadCompendium() TQString path=url; - if(path.contains("@LANG@")) + if(path.tqcontains("@LANG@")) { - path.replace("@LANG@",langCode); + path.tqreplace("@LANG@",langCode); } KURL u=KCmdLineArgs::makeURL(path.local8Bit()); realURL = u.url(); @@ -864,21 +864,21 @@ void PoCompendium::recheckData() loading=false; } -TQString PoCompendium::maskString(TQString s) +TQString PoCompendium::tqmaskString(TQString s) { - s.replace("\\","\\\\"); - s.replace("\?","\\?"); - s.replace("[","\\["); - s.replace(".","\\."); - s.replace("*","\\*"); - s.replace("+","\\+"); - s.replace("^","\\^"); - s.replace("$","\\$"); - s.replace("(","\\("); - s.replace(")","\\)"); - s.replace("{","\\{"); - s.replace("}","\\}"); - s.replace("|","\\|"); + s.tqreplace("\\","\\\\"); + s.tqreplace("\?","\\?"); + s.tqreplace("[","\\["); + s.tqreplace(".","\\."); + s.tqreplace("*","\\*"); + s.tqreplace("+","\\+"); + s.tqreplace("^","\\^"); + s.tqreplace("$","\\$"); + s.tqreplace("(","\\("); + s.tqreplace(")","\\)"); + s.tqreplace("{","\\{"); + s.tqreplace("}","\\}"); + s.tqreplace("|","\\|"); return s; } @@ -917,7 +917,7 @@ void PoCompendium::addResult(SearchResult *result, TQPtrList& res) void PoCompendium::setLanguageCode(const TQString& lang) { - if(initialized && url.contains("@LANG@") && lang!=langCode + if(initialized && url.tqcontains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) { initialized=false; @@ -938,7 +938,7 @@ TQString PoCompendium::translate(const TQString& text, uint pluralForm) if(error || !data || data->active()) { - return TQString::null; + return TQString(); } @@ -950,7 +950,7 @@ TQString PoCompendium::translate(const TQString& text, uint pluralForm) return data->catalog()->msgstr(*index).first(); } - return TQString::null; + return TQString(); } TQString PoCompendium::fuzzyTranslation(const TQString& text, int &score, const uint pluralForm) @@ -965,7 +965,7 @@ TQString PoCompendium::fuzzyTranslation(const TQString& text, int &score, const if(error || !data || data->active()) { - return TQString::null; + return TQString(); } // try to find fuzzy string @@ -1029,7 +1029,7 @@ TQString PoCompendium::fuzzyTranslation(const TQString& text, int &score, const return data->catalog()->msgstr(best_matching).first(); } - return TQString::null; + return TQString(); } @@ -1041,7 +1041,7 @@ TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const ui } if(isSearching()) - return TQString::null; + return TQString(); clearResults(); stop = false; @@ -1058,13 +1058,13 @@ TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const ui if(error || !data) { active = false; - return TQString::null; + return TQString(); } if(data->active()) { active = false; - return TQString::null; + return TQString(); } emit started(); @@ -1120,7 +1120,7 @@ TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const ui return res.first()->translation; } - // now, search based on words (contains, is contained, etc) + // now, search based on words (tqcontains, is contained, etc) searchWords(searchStr, pluralForm, res, foundIndices, checkedIndices); if( matchNGram || @@ -1145,7 +1145,7 @@ TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const ui sc = 0; - return TQString::null; + return TQString(); } @@ -1181,7 +1181,7 @@ void PoCompendium::unregisterData() void PoCompendium::registerData() { - data = compendiumDict()->find(realURL); + data = compendiumDict()->tqfind(realURL); if(!data) { data = new CompendiumData; diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h index 50ef9428..70386572 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h +++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -51,9 +51,10 @@ class TQTimer; class PoCompendium : public SearchEngine { Q_OBJECT + TQ_OBJECT public: - PoCompendium(TQObject *parent=0, const char *name=0); + PoCompendium(TQObject *tqparent=0, const char *name=0); virtual ~PoCompendium(); virtual bool isReady() const; @@ -67,7 +68,7 @@ public: virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(TQWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *tqparent); virtual const KAboutData *about() const; @@ -98,7 +99,7 @@ protected slots: protected: void loadCompendium(); void addResult(SearchResult *, TQPtrList& allResults); - TQString maskString(TQString string); + TQString tqmaskString(TQString string); void registerData(); void unregisterData(); diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp index 1f3a8b37..9cbeb381 100644 --- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -44,14 +44,14 @@ #include "preferenceswidget.h" #include "pwidget.h" -CompendiumPreferencesWidget::CompendiumPreferencesWidget(TQWidget *parent, const char* name) - : PrefWidget(parent,name) +CompendiumPreferencesWidget::CompendiumPreferencesWidget(TQWidget *tqparent, const char* name) + : PrefWidget(tqparent,name) , changed(false) { - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); prefWidget = new CompendiumPWidget(this); - layout->addWidget(prefWidget); + tqlayout->addWidget(prefWidget); connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool)) , this, TQT_SLOT(setChanged())); diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h index 3a22bc31..e67a00d9 100644 --- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -42,9 +42,10 @@ class CompendiumPWidget; class CompendiumPreferencesWidget : public PrefWidget { Q_OBJECT + TQ_OBJECT public: - CompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0); + CompendiumPreferencesWidget(TQWidget *tqparent=0, const char* name=0); virtual ~CompendiumPreferencesWidget(); virtual void apply(); diff --git a/kbabel/kbabeldict/modules/pocompendium/pwidget.ui b/kbabel/kbabeldict/modules/pocompendium/pwidget.ui index 8f54b087..f1883a88 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pwidget.ui +++ b/kbabel/kbabeldict/modules/pocompendium/pwidget.ui @@ -8,7 +8,7 @@ PWidget - geometry + tqgeometry 0 0 @@ -236,14 +236,14 @@ Expanding - sizeHint + tqsizeHint 20 20 - sizeHint + tqsizeHint 20 20 diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp index eaea5194..772eae41 100644 --- a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp +++ b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -54,8 +54,8 @@ KInstance *PcFactory::s_instance = 0; KAboutData *PcFactory::s_about = 0; -PcFactory::PcFactory( TQObject *parent, const char *name) - : KLibFactory(parent,name) +PcFactory::PcFactory( TQObject *tqparent, const char *name) + : KLibFactory(tqparent,name) { } @@ -75,7 +75,7 @@ PcFactory::~PcFactory() } -TQObject *PcFactory::createObject( TQObject *parent, const char *name +TQObject *PcFactory::createObject( TQObject *tqparent, const char *name , const char *classname, const TQStringList &) { if(TQCString(classname) != "SearchEngine") @@ -84,7 +84,7 @@ TQObject *PcFactory::createObject( TQObject *parent, const char *name return 0; } - return new TmxCompendium(parent,name); + return new TmxCompendium(tqparent,name); } diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.h b/kbabel/kbabeldict/modules/tmx/pc_factory.h index 74739e0a..f4337116 100644 --- a/kbabel/kbabeldict/modules/tmx/pc_factory.h +++ b/kbabel/kbabeldict/modules/tmx/pc_factory.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -44,12 +44,13 @@ class KAboutData; class PcFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - PcFactory( TQObject *parent=0, const char *name=0); + PcFactory( TQObject *tqparent=0, const char *name=0); ~PcFactory(); - virtual TQObject *createObject( TQObject *parent=0, const char *name=0 - , const char *classname="TQObject" + virtual TQObject *createObject( TQObject *tqparent=0, const char *name=0 + , const char *classname=TQOBJECT_OBJECT_NAME_STRING , const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp index 85d38294..16200985 100644 --- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -46,14 +46,14 @@ #include "preferenceswidget.h" #include "pwidget.h" -TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(TQWidget *parent, const char* name) - : PrefWidget(parent,name) +TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(TQWidget *tqparent, const char* name) + : PrefWidget(tqparent,name) , changed(false) { - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); prefWidget = new TmxCompendiumPWidget(this); - layout->addWidget(prefWidget); + tqlayout->addWidget(prefWidget); connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool)) , this, TQT_SLOT(setChanged())); diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h index e2a4b900..a91aff42 100644 --- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -44,9 +44,10 @@ class TmxCompendiumPWidget; class TmxCompendiumPreferencesWidget : public PrefWidget { Q_OBJECT + TQ_OBJECT public: - TmxCompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0); + TmxCompendiumPreferencesWidget(TQWidget *tqparent=0, const char* name=0); virtual ~TmxCompendiumPreferencesWidget(); virtual void apply(); diff --git a/kbabel/kbabeldict/modules/tmx/pwidget.ui b/kbabel/kbabeldict/modules/tmx/pwidget.ui index ef6c9967..15600c7d 100644 --- a/kbabel/kbabeldict/modules/tmx/pwidget.ui +++ b/kbabel/kbabeldict/modules/tmx/pwidget.ui @@ -1,10 +1,10 @@ TmxCompendiumPWidget - + TMXPWidget - + 0 0 @@ -22,7 +22,7 @@ 6 - + GroupBox1 @@ -46,7 +46,7 @@ - + ButtonGroup1 @@ -63,7 +63,7 @@ 6 - + Layout4 @@ -77,7 +77,7 @@ 6 - + wholeBtn @@ -85,7 +85,7 @@ Onl&y whole words - + caseBtn @@ -95,7 +95,7 @@ - + TextLabel3 @@ -103,7 +103,7 @@ A text matches if: - + Layout3 @@ -117,7 +117,7 @@ 6 - + equalBtn @@ -125,7 +125,7 @@ E&qual to searched text - + hasWordBtn @@ -133,7 +133,7 @@ Contains a &word of searched text - + isContainedBtn @@ -141,7 +141,7 @@ Co&ntained in searched text - + ngramBtn @@ -149,7 +149,7 @@ &Similar to searched text - + containsBtn @@ -171,7 +171,7 @@ Expanding - + 20 20 @@ -209,7 +209,7 @@ kseparator.h - + kurlrequester.h diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp index 415992bf..fd5fcd29 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -58,8 +58,8 @@ static KStaticDeleter< TQDict > compDataDeleter; TQDict *TmxCompendium::_compDict = 0; -TmxCompendium::TmxCompendium(TQObject *parent, const char *name) - : SearchEngine(parent, name) +TmxCompendium::TmxCompendium(TQObject *tqparent, const char *name) + : SearchEngine(tqparent, name) { prefWidget=0; data=0; @@ -152,9 +152,9 @@ void TmxCompendium::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *TmxCompendium::preferencesWidget(TQWidget *parent) +PrefWidget *TmxCompendium::preferencesWidget(TQWidget *tqparent) { - prefWidget = new TmxCompendiumPreferencesWidget(parent,"tmxcompendium_prefwidget"); + prefWidget = new TmxCompendiumPreferencesWidget(tqparent,"tmxcompendium_prefwidget"); connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); connect(prefWidget, TQT_SIGNAL(restoreSettings()) , this, TQT_SLOT(restoreSettings())); @@ -240,8 +240,8 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = TQString::null; - info->description = TQString::null; + info->translator = TQString(); + info->description = TQString(); result->descriptions.append(info); results.append(result); @@ -267,7 +267,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { - if(foundIndices.contains(*it)) + if(foundIndices.tqcontains(*it)) { continue; } @@ -294,8 +294,8 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = TQString::null; - info->description = TQString::null; + info->translator = TQString(); + info->description = TQString(); result->descriptions.append(info); addResult(result); @@ -319,12 +319,12 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea if(stop) break; - if(foundIndices.contains(*it)) + if(foundIndices.tqcontains(*it)) { continue; } - if(checkedIndices.contains(*it)) + if(checkedIndices.tqcontains(*it)) { continue; } @@ -365,7 +365,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea s=" "+*wit+" "; o=" "+origStr+" "; } - if(o.contains(s)) + if(o.tqcontains(s)) { found=true; } @@ -389,7 +389,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea if(!found && matchContains && !wholeWords) { - TQString s=maskString(searchStr); + TQString s=tqmaskString(searchStr); TQRegExp searchReg(s); if(searchReg.search(origStr) >= 0) @@ -398,7 +398,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea if(!found && matchIsContained && !wholeWords) { - TQString s=maskString(origStr); + TQString s=tqmaskString(origStr); TQRegExp reg(s); if(reg.search(searchStr) >= 0) @@ -413,7 +413,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - TQString s=maskString(*wit2); + TQString s=tqmaskString(*wit2); TQRegExp reg(s); if(reg.search(origStr) >= 0) @@ -436,8 +436,8 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = TQString::null; - info->description = TQString::null; + info->translator = TQString(); + info->description = TQString(); result->descriptions.append(info); addResult(result); @@ -454,7 +454,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea TQRegExp searchReg; if(matchContains) { - TQString s=maskString(searchStr); + TQString s=tqmaskString(searchStr); searchReg.setPattern(s); } @@ -471,7 +471,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea i++; - if(checkedIndices.contains(i)) + if(checkedIndices.tqcontains(i)) { continue; } @@ -479,7 +479,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea checkedIndices.append(i); checkCounter++; - if(foundIndices.contains(i)) + if(foundIndices.tqcontains(i)) { continue; } @@ -523,7 +523,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea if(!found && matchIsContained) { - TQString s=maskString(origStr); + TQString s=tqmaskString(origStr); TQRegExp reg(s); if(reg.search(searchStr) >= 0) @@ -538,7 +538,7 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - TQString s=maskString(*wit2); + TQString s=tqmaskString(*wit2); if(wholeWords) { @@ -577,8 +577,8 @@ bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const Sea TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = TQString::null; - info->description = TQString::null; + info->translator = TQString(); + info->description = TQString(); result->descriptions.append(info); addResult(result); @@ -687,9 +687,9 @@ void TmxCompendium::slotLoadCompendium() TQString path=url; - if(path.contains("@LANG@")) + if(path.tqcontains("@LANG@")) { - path.replace("@LANG@",langCode); + path.tqreplace("@LANG@",langCode); } KURL u=KCmdLineArgs::makeURL(path.local8Bit()); realURL = u.url(); @@ -746,21 +746,21 @@ void TmxCompendium::recheckData() loading=false; } -TQString TmxCompendium::maskString(TQString s) const +TQString TmxCompendium::tqmaskString(TQString s) const { - s.replace('\\',"\\\\"); - s.replace('?',"\\?"); - s.replace('[',"\\["); - s.replace('.',"\\."); - s.replace('*',"\\*"); - s.replace('+',"\\+"); - s.replace('^',"\\^"); - s.replace('$',"\\$"); - s.replace('(',"\\("); - s.replace(')',"\\)"); - s.replace('{',"\\{"); - s.replace('}',"\\}"); - s.replace('|',"\\|"); + s.tqreplace('\\',"\\\\"); + s.tqreplace('?',"\\?"); + s.tqreplace('[',"\\["); + s.tqreplace('.',"\\."); + s.tqreplace('*',"\\*"); + s.tqreplace('+',"\\+"); + s.tqreplace('^',"\\^"); + s.tqreplace('$',"\\$"); + s.tqreplace('(',"\\("); + s.tqreplace(')',"\\)"); + s.tqreplace('{',"\\{"); + s.tqreplace('}',"\\}"); + s.tqreplace('|',"\\|"); return s; } @@ -797,7 +797,7 @@ void TmxCompendium::addResult(SearchResult *result) void TmxCompendium::setLanguageCode(const TQString& lang) { - if(initialized && url.contains("@LANG@") && lang!=langCode + if(initialized && url.tqcontains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) { initialized=false; @@ -818,7 +818,7 @@ TQString TmxCompendium::translate(const TQString& text, uint pluralForm) if(error || !data || data->active()) { - return TQString::null; + return TQString(); } @@ -829,7 +829,7 @@ TQString TmxCompendium::translate(const TQString& text, uint pluralForm) return data->msgstr(*index); } - return TQString::null; + return TQString(); } TQString TmxCompendium::fuzzyTranslation(const TQString& text, int &score, uint pluralForm) @@ -844,7 +844,7 @@ TQString TmxCompendium::fuzzyTranslation(const TQString& text, int &score, uint if(error || !data || data->active()) { - return TQString::null; + return TQString(); } // try to find fuzzy string @@ -907,7 +907,7 @@ TQString TmxCompendium::fuzzyTranslation(const TQString& text, int &score, uint return data->msgstr(best_matching); } - return TQString::null; + return TQString(); } @@ -943,7 +943,7 @@ void TmxCompendium::unregisterData() void TmxCompendium::registerData() { - data = compendiumDict()->find(realURL); + data = compendiumDict()->tqfind(realURL); if(!data) { data = new TmxCompendiumData; diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h index d09e81c9..e6b76f53 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -50,9 +50,10 @@ class TQTimer; class TmxCompendium : public SearchEngine { Q_OBJECT + TQ_OBJECT public: - TmxCompendium(TQObject *parent=0, const char *name=0); + TmxCompendium(TQObject *tqparent=0, const char *name=0); virtual ~TmxCompendium(); virtual bool isReady() const; @@ -65,7 +66,7 @@ public: virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(TQWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *tqparent); virtual const KAboutData *about() const; @@ -96,7 +97,7 @@ protected slots: protected: void loadCompendium(); void addResult(SearchResult *); - TQString maskString(TQString string) const; + TQString tqmaskString(TQString string) const; void registerData(); void unregisterData(); diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp index 7893e837..739379e1 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -47,8 +47,8 @@ using namespace KBabel; -TmxCompendiumData::TmxCompendiumData(TQObject *parent) - : TQObject(parent) +TmxCompendiumData::TmxCompendiumData(TQObject *tqparent) + : TQObject(tqparent) , _active(false) , _error(false) , _initialized(false) @@ -117,7 +117,7 @@ bool TmxCompendiumData::load(const KURL& url, const TQString& language) _errorMsg = i18n("Error while trying to read file for TMX Compendium module:\n" "%1\n" "Reason: %2") - .arg(url.prettyURL()).arg(_errorMsg); + .tqarg(url.prettyURL()).tqarg(_errorMsg); kdDebug(KBABEL_SEARCH) << "Error: " << _errorMsg << endl; diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h index ce2692a1..325fb9b5 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -44,12 +44,13 @@ #include #include -class TmxCompendiumData : public QObject +class TmxCompendiumData : public TQObject { Q_OBJECT + TQ_OBJECT public: - TmxCompendiumData(TQObject *parent=0); + TmxCompendiumData(TQObject *tqparent=0); bool load(const KURL& url, const TQString& language); -- cgit v1.2.1