summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp')
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp322
1 files changed, 161 insertions, 161 deletions
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
index ac55335d..5c5c6a6d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
@@ -28,10 +28,10 @@
* your version. *
*/
-#include <qtextedit.h>
-#include <qprogressdialog.h>
+#include <tqtextedit.h>
+#include <tqprogressdialog.h>
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kdebug.h>
@@ -52,17 +52,17 @@
#include <sys/time.h>
#include "preferenceswidget.h"
#include "dbse_factory.h"
-#include <qprogressbar.h>
-#include <qpushbutton.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kconfig.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qmemarray.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqmemarray.h>
#include "database.h"
@@ -72,7 +72,7 @@
using namespace KBabel;
-KDBSearchEngine::KDBSearchEngine (QObject * parent, const char *name):
+KDBSearchEngine::KDBSearchEngine (TQObject * parent, const char *name):
SearchEngine (parent, name)
{
edited = "unknown";
@@ -82,8 +82,8 @@ SearchEngine (parent, name)
dbOpened = false;
dbname = "";
lasterror = i18n ("No error");
- connect (this, SIGNAL (hasError (const QString &)),
- SLOT (setLastError (const QString &)));
+ connect (this, TQT_SIGNAL (hasError (const TQString &)),
+ TQT_SLOT (setLastError (const TQString &)));
IAmReady = true; // I don't know if it is a good idea, no DB loaded!!!
@@ -104,7 +104,7 @@ KDBSearchEngine::~KDBSearchEngine ()
bool
-KDBSearchEngine::loadDatabase (QString database, bool noask = false)
+KDBSearchEngine::loadDatabase (TQString database, bool noask = false)
{
bool ret = true;
bool asked = false;
@@ -116,7 +116,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
dm = 0;
}
- QDir dir (database);
+ TQDir dir (database);
if (!dir.exists ())
{
if (asked
@@ -124,19 +124,19 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
i18n
("Database folder does not exist:\n%1\n"
"Do you want to create it now?").
- arg (database), QString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
+ arg (database), TQString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
KMessageBox::Yes)
{
asked = true;
- QStringList dirList;
+ TQStringList dirList;
while (!dir.exists () && !dir.dirName ().isEmpty ())
{
dirList.prepend (dir.dirName ());
dir.setPath (dir.path () + "/..");
}
- for (QStringList::Iterator it = dirList.begin ();
+ for (TQStringList::Iterator it = dirList.begin ();
it != dirList.end (); ++it)
{
if (!dir.mkdir (*it))
@@ -161,10 +161,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (ret)
{
// test, if there are both of ,old and standard databases
- QString transFile = database + "/translations." + lang + ".db";
+ TQString transFile = database + "/translations." + lang + ".db";
- bool oldstuff = QFile::exists (transFile + ",old");
- bool newstuff = QFile::exists (transFile);
+ bool oldstuff = TQFile::exists (transFile + ",old");
+ bool newstuff = TQFile::exists (transFile);
if (oldstuff && newstuff)
{
@@ -188,11 +188,11 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KMessageBox::Yes)
{
// remove the new files
- QFile::remove (transFile);
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile);
+ TQFile::remove (database + "/wordsindex." + lang +
".db");
- QFile::remove (database + "/keysindex." + lang + ".db");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/keysindex." + lang + ".db");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db");
// rename the old files
@@ -216,12 +216,12 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KURL (database + "/catalogsinfo." + lang +
".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang +
".db,old");
- QFile::remove (database + "/keysindex." + lang +
+ TQFile::remove (database + "/keysindex." + lang +
".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
}
@@ -241,10 +241,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
(database + "/catalogsinfo." + lang + ".db,old"),
KURL (database + "/catalogsinfo." + lang + ".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang + ".db,old");
- QFile::remove (database + "/keysindex." + lang + ".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang + ".db,old");
+ TQFile::remove (database + "/keysindex." + lang + ".db,old");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
@@ -255,7 +255,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (asked
|| KMessageBox::questionYesNo (0,
i18n
- ("Database files not found.\nDo you want to create them now?"), QString::null, i18n("Create"), i18n("Do Not Create"))
+ ("Database files not found.\nDo you want to create them now?"), TQString::null, i18n("Create"), i18n("Do Not Create"))
== KMessageBox::Yes)
{
//fprintf(stderr,"SI\n");
@@ -312,7 +312,7 @@ KDBSearchEngine::setCaseSensitive (bool sensitive)
*/
void
-KDBSearchEngine::setRemoveCharString (QString chartoremove)
+KDBSearchEngine::setRemoveCharString (TQString chartoremove)
{
remchar = chartoremove;
}
@@ -336,12 +336,12 @@ KDBSearchEngine::isSearching () const
*/
int
-KDBSearchEngine::addSearchString (QString searchString, int rule)
+KDBSearchEngine::addSearchString (TQString searchString, int rule)
{
if (searching || scanInProgress)
return -1;
SearchEntry e;
- e.string = QString (searchString);
+ e.string = TQString (searchString);
e.rules = rule;
searchStringList.append (e);
return searchStringList.count ();
@@ -354,7 +354,7 @@ KDBSearchEngine::addSearchString (QString searchString, int rule)
*/
bool
-KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
+KDBSearchEngine::startSearch (const TQString & str, uint pluralForm,
const SearchFilter * filter)
{
@@ -376,7 +376,7 @@ KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
}
bool
-KDBSearchEngine::startSearchInTranslation (QString s)
+KDBSearchEngine::startSearchInTranslation (TQString s)
{
if (autoUpdate)
@@ -418,8 +418,8 @@ KDBSearchEngine::openDb (bool noask = false)
bool
KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
- QValueList < SearchResult > &resultList,
- QString & error)
+ TQValueList < SearchResult > &resultList,
+ TQString & error)
{
int count = 0;
@@ -452,7 +452,7 @@ KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
return false;
}
- QString package = filter->location ();
+ TQString package = filter->location ();
int step = (totalRecord / 30) + 1;
int ntra, nref;
@@ -544,17 +544,17 @@ KDBSearchEngine::repeat ()
kdDebug (0) << "No kdelibs.po found!" << endl;
- QProgressDialog *pd =
- new QProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
+ TQProgressDialog *pd =
+ new TQProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
100);
- connect (this, SIGNAL (progress (int)), pd, SLOT (setProgress (int)));
- connect (this, SIGNAL (finished ()), pd, SLOT (close ()));
- connect (pd, SIGNAL (cancelled ()), this, SLOT (stopSearch ()));
+ connect (this, TQT_SIGNAL (progress (int)), pd, TQT_SLOT (setProgress (int)));
+ connect (this, TQT_SIGNAL (finished ()), pd, TQT_SLOT (close ()));
+ connect (pd, TQT_SIGNAL (cancelled ()), this, TQT_SLOT (stopSearch ()));
- QString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
- QString id;
+ TQString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
+ TQString id;
int min;
bool ok = false;
@@ -571,7 +571,7 @@ KDBSearchEngine::repeat ()
progressStarts (i18n ("Searching repeated string"));
- static QTextEdit *mle = new QTextEdit ();
+ static TQTextEdit *mle = new TQTextEdit ();
mle->clear ();
bool inlibs;
@@ -671,10 +671,10 @@ KDBSearchEngine::startSearchNow (int searchmode)
intra = searchmode & MD_IN_TRANSLATION;
- QString msgIdFound;
- QString msgId;
- QString msgStr;
- //QString msgIdRequested;
+ TQString msgIdFound;
+ TQString msgId;
+ TQString msgStr;
+ //TQString msgIdRequested;
SearchResult *aresult;
TranslationInfo *adescription;
SearchList searchList;
@@ -682,13 +682,13 @@ KDBSearchEngine::startSearchNow (int searchmode)
len = remchar.length ();
int n, m; //,word;
- QString *id;
+ TQString *id;
- QString mainRequest = searchStringList[0].string;
+ TQString mainRequest = searchStringList[0].string;
SearchList::Iterator it, it1;
- QString *idMod;
+ TQString *idMod;
bool foundSomething = false;
searchList = searchStringList; //Create a copy and modify it
@@ -705,7 +705,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
}
if (comm)
- idMod->replace (QRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
+ idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
if (norm)
@@ -728,7 +728,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Now we can browse the whole db or the "good keys"
- QValueList < KeyAndScore > goodkeys;
+ TQValueList < KeyAndScore > goodkeys;
int totalprogress;
bool gk = (searchmode == MD_GOOD_KEYS) || allkey;
@@ -807,7 +807,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
- msgId.replace (QRegExp ("\\_\\:.*\\\\n"), "");
+ msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), "");
if (norm)
@@ -845,7 +845,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
msgId.
- replace (QRegExp ("\\_\\:.*\\\\n"),
+ replace (TQRegExp ("\\_\\:.*\\\\n"),
"");
@@ -878,7 +878,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
if (!foundExact && (rules & RegExp))
{
- QRegExp reg (*idMod);
+ TQRegExp reg (*idMod);
regexp = (reg.search (msgId) != -1);
}
else
@@ -996,7 +996,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
*/
bool
-KDBSearchEngine::startSingleSearch (QString searchString,
+KDBSearchEngine::startSingleSearch (TQString searchString,
unsigned int pattern1Limit,
unsigned int /*pattern2Limit */ ,
bool inTranslation)
@@ -1013,7 +1013,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
- QRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
+ TQRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
while ((in = reg.search (searchString, in + len)) != -1)
{
nw++;
@@ -1033,7 +1033,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
{
in = reg.search (searchString, in + len);
len = reg.matchedLength ();
- QString regToAdd = searchString;
+ TQString regToAdd = searchString;
regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
regToAdd.append ("$");
regToAdd.prepend ("^");
@@ -1055,7 +1055,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
Start a search for a list of string
*/
-//bool KDBSearchEngine::startListSearch(QPtrList<QString> searchStrList)
+//bool KDBSearchEngine::startListSearch(TQPtrList<TQString> searchStrList)
//{
// searchStringList=searchStrList;
// return startSearchNow();
@@ -1067,7 +1067,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
void
-KDBSearchEngine::setLanguageCode (const QString & ll)
+KDBSearchEngine::setLanguageCode (const TQString & ll)
{
if (ll == lang)
return;
@@ -1079,8 +1079,8 @@ KDBSearchEngine::setLanguageCode (const QString & ll)
}
void
-KDBSearchEngine::setLanguage (const QString & languageCode,
- const QString & /*languageName */ )
+KDBSearchEngine::setLanguage (const TQString & languageCode,
+ const TQString & /*languageName */ )
{
setLanguageCode (languageCode);
}
@@ -1147,17 +1147,17 @@ KDBSearchEngine::saveSettings (KConfigBase * config)
void
KDBSearchEngine::readSettings (KConfigBase * config)
{
- QString newName;
+ TQString newName;
KConfigGroupSaver cgs (config, "KDBSearchEngine");
- QString defaultLang;
- QString oldLang = lang;
+ TQString defaultLang;
+ TQString oldLang = lang;
Defaults::Identity def;
defaultLang = def.languageCode ();
lang = config->readEntry ("Language", defaultLang);
- QString defaultDir;
+ TQString defaultDir;
KStandardDirs *dirs = KGlobal::dirs ();
if (dirs)
{
@@ -1203,20 +1203,20 @@ KDBSearchEngine::readSettings (KConfigBase * config)
}
PrefWidget *
-KDBSearchEngine::preferencesWidget (QWidget * parent)
+KDBSearchEngine::preferencesWidget (TQWidget * parent)
{
pw = new PreferencesWidget (parent);
setSettings ();
- connect (pw, SIGNAL (restoreNow ()), this, SLOT (setSettings ()));
- connect (pw, SIGNAL (applyNow ()), this, SLOT (updateSettings ()));
- connect (pw, SIGNAL (destroyed ()), this, SLOT (prefDestr ()));
- connect (pw->dbpw->scanPB_2, SIGNAL (clicked ()), this, SLOT (scan ()));
- connect (pw->dbpw->scanrecPB, SIGNAL (clicked ()), this,
- SLOT (scanRecur ()));
- connect (pw->dbpw->scanFilePB, SIGNAL (clicked ()), this,
- SLOT (scanFile ()));
- connect (pw->dbpw->repeatPB, SIGNAL (clicked ()), this, SLOT (repeat ()));
+ connect (pw, TQT_SIGNAL (restoreNow ()), this, TQT_SLOT (setSettings ()));
+ connect (pw, TQT_SIGNAL (applyNow ()), this, TQT_SLOT (updateSettings ()));
+ connect (pw, TQT_SIGNAL (destroyed ()), this, TQT_SLOT (prefDestr ()));
+ connect (pw->dbpw->scanPB_2, TQT_SIGNAL (clicked ()), this, TQT_SLOT (scan ()));
+ connect (pw->dbpw->scanrecPB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanRecur ()));
+ connect (pw->dbpw->scanFilePB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanFile ()));
+ connect (pw->dbpw->repeatPB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (repeat ()));
return pw;
@@ -1233,7 +1233,7 @@ KDBSearchEngine::scanRecur ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
i18n
@@ -1246,32 +1246,32 @@ KDBSearchEngine::scanRecur ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int))); //Kbabel progress bar
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int))); //Kbabel progress bar
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
sca->scanPattern (cvsdir, "*.po", true);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1292,7 +1292,7 @@ KDBSearchEngine::scan ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
@@ -1304,32 +1304,32 @@ KDBSearchEngine::scan ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanPattern (cvsdir, "*.po", false);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1350,7 +1350,7 @@ KDBSearchEngine::scanFile ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
pw->dbpw->totalPB->setProgress (0);
cvsdir =
@@ -1363,31 +1363,31 @@ KDBSearchEngine::scanFile ()
}
if (pw)
{
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (fileProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning file %1").arg (directory (cvsdir, 0)));
- connect (sca, SIGNAL (fileFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (fileFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanFile (cvsdir);
- sca->disconnect (SIGNAL (fileProgress (int)), this,
- SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- sca->disconnect (SIGNAL (fileFinished ()), this,
- SIGNAL (progressEnds ()));
+ sca->disconnect (TQT_SIGNAL (fileProgress (int)), this,
+ TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ sca->disconnect (TQT_SIGNAL (fileFinished ()), this,
+ TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1415,7 +1415,7 @@ KDBSearchEngine::name () const
QString
KDBSearchEngine::id () const
{
- return QString ("KDBSearchEngine");
+ return TQString ("KDBSearchEngine");
}
QString
@@ -1488,7 +1488,7 @@ KDBSearchEngine::updateSettings ()
if (pw == 0)
return;
- QString newName = pw->dbpw->dirInput->url ();
+ TQString newName = pw->dbpw->dirInput->url ();
if (newName != dbname)
{
@@ -1547,16 +1547,16 @@ KDBSearchEngine::updateSettings ()
}
void
-KDBSearchEngine::setLastError (const QString & er)
+KDBSearchEngine::setLastError (const TQString & er)
{
lasterror = er;
}
QString
-KDBSearchEngine::translate (const QString & text, const uint pluralForm)
+KDBSearchEngine::translate (const TQString & text, const uint pluralForm)
{
if (!openDb ())
- return QString::null;
+ return TQString::null;
/*
if(!dbOpened)
@@ -1566,7 +1566,7 @@ if(!dbOpened)
{
//emit anerror
hasError(i18n("Database not opened"));
- return QString::null;
+ return TQString::null;
}
}
*/
@@ -1574,7 +1574,7 @@ if(!dbOpened)
DataBaseItem dbit = dm->getItem (text);
if (dbit.isNull ())
- return QString::null;
+ return TQString::null;
if (dbit.numTra == 1)
return dbit.translations[0].translation;
@@ -1592,34 +1592,34 @@ if(!dbOpened)
}
-QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
+TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase,
int threshold,
int thresholdorig,
uint32 max)
{
- QValueList < QString > wordlist;
+ TQValueList < TQString > wordlist;
if (!openDb ())
{
- QValueList < KeyAndScore > a;
+ TQValueList < KeyAndScore > a;
return a;
}
progressStarts (i18n ("Searching words"));
- QValueList < QString >::Iterator wlit;
+ TQValueList < TQString >::Iterator wlit;
wordlist = dm->wordsIn (phrase);
int
nw = wordlist.count ();
-//QMemArray<WordItem> wi(nw);
- QMemArray < uint32 > numofloc (nw), currentloc (nw);
- QMemArray < int >
+//TQMemArray<WordItem> wi(nw);
+ TQMemArray < uint32 > numofloc (nw), currentloc (nw);
+ TQMemArray < int >
score (nw);
- QMemArray < uint32 * >loc (nw), locorig (nw);
- QValueList < uint32 > resloc;
- QValueList < int >
+ TQMemArray < uint32 * >loc (nw), locorig (nw);
+ TQValueList < uint32 > resloc;
+ TQValueList < int >
resfound;
- QValueList < KeyAndScore > keylist;
+ TQValueList < KeyAndScore > keylist;
//wi.resize(wordlist.count());
int
totalprogress = 0;
@@ -1837,7 +1837,7 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
KeyAndScore
key (strkey, sc);
-// kdDebug(0) << (QString) key << " [" << key.score << "]" << endl;
+// kdDebug(0) << (TQString) key << " [" << key.score << "]" << endl;
keylist.append (key);
}
@@ -1852,12 +1852,12 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
}
void
-KDBSearchEngine::stringChanged (const QStringList & o,
- const QString & translated, const uint,
- const QString &)
+KDBSearchEngine::stringChanged (const TQStringList & o,
+ const TQString & translated, const uint,
+ const TQString &)
{
- QString orig = o.first (); // FIXME: plural forms
+ TQString orig = o.first (); // FIXME: plural forms
// skip empty originals or translated texts
if (orig.isEmpty () || translated.isEmpty ())
@@ -1879,19 +1879,19 @@ KDBSearchEngine::stringChanged (const QStringList & o,
}
void
-KDBSearchEngine::setEditedFile (const QString & file)
+KDBSearchEngine::setEditedFile (const TQString & file)
{
edited = file; //kdDebug(0) << edited << endl;
}
-KeyAndScore::KeyAndScore (const QString & a, int sc):
-QString (a)
+KeyAndScore::KeyAndScore (const TQString & a, int sc):
+TQString (a)
{
score = sc;
}
-KeyAndScore::KeyAndScore ():QString ()
+KeyAndScore::KeyAndScore ():TQString ()
{
score = 0;
}