summaryrefslogtreecommitdiffstats
path: root/kdict/dict.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdict/dict.cpp')
-rw-r--r--kdict/dict.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kdict/dict.cpp b/kdict/dict.cpp
index 74395d4a..11d5e12b 100644
--- a/kdict/dict.cpp
+++ b/kdict/dict.cpp
@@ -3,7 +3,7 @@
dict.cpp (part of The KDE Dictionary Client)
Copyright (C) 2000-2001 Christian Gebauer <gebauer@kde.org>
- (C) by Matthias Hölzer 1998
+ (C) by Matthias H�lzer 1998
This file is distributed under the Artistic License.
See LICENSE for details.
@@ -201,21 +201,21 @@ void DictAsyncClient::define()
job->strategy = ".";
if (!match())
return;
- job->result = TQString::null;
+ job->result = TQString();
if (job->numFetched == 0) {
resultAppend("<body>\n<p class=\"heading\">\n");
- resultAppend(i18n("No definitions found for \'%1'.").arg(job->query));
+ resultAppend(i18n("No definitions found for \'%1'.").tqarg(job->query));
resultAppend("</p>\n</html></body>");
} else {
// html header...
resultAppend("<body>\n<p class=\"heading\">\n");
- resultAppend(i18n("No definitions found for \'%1\'. Perhaps you mean:").arg(job->query));
+ resultAppend(i18n("No definitions found for \'%1\'. Perhaps you mean:").tqarg(job->query));
resultAppend("</p>\n<table width=\"100%\" cols=2>\n");
TQString lastDb;
TQStringList::iterator it;
for (it = job->matches.begin(); it != job->matches.end(); ++it) {
- int pos = (*it).find(' ');
+ int pos = (*it).tqfind(' ');
if (pos != -1) {
if (lastDb != (*it).left(pos)) {
if (lastDb.length() > 0)
@@ -352,7 +352,7 @@ bool DictAsyncClient::getDefinitions()
}
} else {
job->error = JobData::ErrServerError;
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(thisLine);
doQuit();
return false;
@@ -430,7 +430,7 @@ bool DictAsyncClient::getDefinitions()
}
resultAppend("</p></pre>\n");
- if (hashList.find(context.hexDigest())>=0) // duplicate??
+ if (hashList.tqfind(context.hexDigest())>=0) // duplicate??
job->result.truncate(oldResPos); // delete the whole definition
else {
hashList.append(context.hexDigest());
@@ -591,7 +591,7 @@ void DictAsyncClient::showDbInfo()
// html header...
resultAppend("<body>\n<p class=\"heading\">\n");
- resultAppend(i18n("Database Information [%1]:").arg(job->query));
+ resultAppend(i18n("Database Information [%1]:").tqarg(job->query));
resultAppend("</p>\n<pre><p class=\"definition\">\n");
bool done(false);
@@ -792,13 +792,13 @@ void DictAsyncClient::openConnection()
if (ks.status() == IO_LookupError)
job->error = JobData::ErrBadHost;
else if (ks.status() == IO_ConnectError) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrConnect;
} else if (ks.status() == IO_TimeOutError)
job->error = JobData::ErrTimeout;
else {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(KExtendedSocket::strError(ks.status(), errno));
job->error = JobData::ErrCommunication;
}
@@ -898,7 +898,7 @@ bool DictAsyncClient::waitForRead()
if (ret == -1) { // select failed
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -918,7 +918,7 @@ bool DictAsyncClient::waitForRead()
}
if (FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -930,7 +930,7 @@ bool DictAsyncClient::waitForRead()
}
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
job->error = JobData::ErrCommunication;
}
closeSocket();
@@ -961,7 +961,7 @@ bool DictAsyncClient::waitForWrite()
if (ret == -1) { // select failed
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -981,7 +981,7 @@ bool DictAsyncClient::waitForWrite()
}
if (FD_ISSET(tcpSocket,&fdsR)||FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
}
@@ -992,7 +992,7 @@ bool DictAsyncClient::waitForWrite()
return true;
}
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
job->error = JobData::ErrCommunication;
}
closeSocket();
@@ -1032,7 +1032,7 @@ bool DictAsyncClient::sendBuffer()
ret = KSocks::self()->write(tcpSocket,&cmdBuffer.data()[done],todo);
if (ret <= 0) {
if (job) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(strerror(errno));
job->error = JobData::ErrCommunication;
}
@@ -1077,7 +1077,7 @@ bool DictAsyncClient::getNextLine()
} while ((received<0)&&(errno==EINTR)); // don't get tricked by signals
if (received <= 0) {
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(i18n("The connection is broken."));
job->error = JobData::ErrCommunication;
closeSocket();
@@ -1121,7 +1121,7 @@ void DictAsyncClient::handleErrors()
int len = strlen(thisLine);
if (len>80)
len = 80;
- job->result = TQString::null;
+ job->result = TQString();
resultAppend(codec->toUnicode(thisLine,len));
switch (strtol(thisLine,0L,0)) {
@@ -1364,10 +1364,10 @@ void DictInterface::clientDone()
{
TQString message;
- cleanPipes(); // read from pipe so that notifier doesn´t fire again
+ cleanPipes(); // read from pipe so that notifier doesn�t fire again
if (jobList.isEmpty()) {
- kdDebug(5004) << "This shouldn´t happen, the client-thread signaled termination, but the job list is empty" << endl;
+ kdDebug(5004) << "This shouldn�t happen, the client-thread signaled termination, but the job list is empty" << endl;
return; // strange..
}
@@ -1407,7 +1407,7 @@ void DictInterface::clientDone()
message = i18n("One definition found");
break;
default:
- message = i18n("%1 definitions found").arg(job->numFetched);
+ message = i18n("%1 definitions found").tqarg(job->numFetched);
}
} else {
switch (job->numFetched) {
@@ -1418,7 +1418,7 @@ void DictInterface::clientDone()
message = i18n(" One definition fetched ");
break;
default:
- message = i18n(" %1 definitions fetched ").arg(job->numFetched);
+ message = i18n(" %1 definitions fetched ").tqarg(job->numFetched);
}
}
emit stopped(message);
@@ -1433,7 +1433,7 @@ void DictInterface::clientDone()
message = i18n(" One matching definition found ");
break;
default:
- message = i18n(" %1 matching definitions found ").arg(job->numFetched);
+ message = i18n(" %1 matching definitions found ").tqarg(job->numFetched);
}
emit stopped(message);
emit matchReady(job->matches);
@@ -1451,17 +1451,17 @@ void DictInterface::clientDone()
errMsg += job->result;
break;
case JobData::ErrTimeout:
- errMsg = i18n("A delay occurred which exceeded the\ncurrent timeout limit of %1 seconds.\nYou can modify this limit in the Preferences Dialog.").arg(global->timeout);
+ errMsg = i18n("A delay occurred which exceeded the\ncurrent timeout limit of %1 seconds.\nYou can modify this limit in the Preferences Dialog.").tqarg(global->timeout);
break;
case JobData::ErrBadHost:
- errMsg = i18n("Unable to connect to:\n%1:%2\n\nCannot resolve hostname.").arg(job->server).arg(job->port);
+ errMsg = i18n("Unable to connect to:\n%1:%2\n\nCannot resolve hostname.").tqarg(job->server).tqarg(job->port);
break;
case JobData::ErrConnect:
- errMsg = i18n("Unable to connect to:\n%1:%2\n\n").arg(job->server).arg(job->port);
+ errMsg = i18n("Unable to connect to:\n%1:%2\n\n").tqarg(job->server).tqarg(job->port);
errMsg += job->result;
break;
case JobData::ErrRefused:
- errMsg = i18n("Unable to connect to:\n%1:%2\n\nThe server refused the connection.").arg(job->server).arg(job->port);
+ errMsg = i18n("Unable to connect to:\n%1:%2\n\nThe server refused the connection.").tqarg(job->server).tqarg(job->port);
break;
case JobData::ErrNotAvailable:
errMsg = i18n("The server is temporarily unavailable.");
@@ -1488,7 +1488,7 @@ void DictInterface::clientDone()
errMsg = i18n("No strategies available.");
break;
case JobData::ErrServerError:
- errMsg = i18n("The server sent an unexpected reply:\n\"%1\"\nThis shouldn't happen, please consider\nwriting a bug report").arg(job->result);
+ errMsg = i18n("The server sent an unexpected reply:\n\"%1\"\nThis shouldn't happen, please consider\nwriting a bug report").tqarg(job->result);
break;
case JobData::ErrMsgTooLong:
errMsg = i18n("The server sent a response with a text line\nthat was too long.\n(RFC 2229: max. 1024 characters/6144 octets)");
@@ -1521,7 +1521,7 @@ JobData* DictInterface::generateQuery(JobData::QueryType type, TQString query)
return 0L;
if (query.length()>300) // shorten if necessary
query.truncate(300);
- query = query.replace(TQRegExp("[\"\\]"), ""); // remove remaining illegal chars...
+ query = query.tqreplace(TQRegExp("[\"\\]"), ""); // remove remaining illegal chars...
if (query.isEmpty())
return 0L;
@@ -1537,7 +1537,7 @@ JobData* DictInterface::generateQuery(JobData::QueryType type, TQString query)
if ((global->currentDatabase > 0)&& // database set
(global->currentDatabase < global->databaseSets.count()+1)) {
for (int i = 0;i<(int)global->serverDatabases.count();i++)
- if ((global->databaseSets.at(global->currentDatabase-1))->findIndex(global->serverDatabases[i])>0)
+ if ((global->databaseSets.at(global->currentDatabase-1))->tqfindIndex(global->serverDatabases[i])>0)
newjob->databases.append(global->serverDatabases[i].utf8().data());
if (newjob->databases.count()==0) {
KMessageBox::sorry(global->topLevel, i18n("Please select at least one database."));
@@ -1570,7 +1570,7 @@ void DictInterface::startClient()
{
cleanPipes();
if (jobList.isEmpty()) {
- kdDebug(5004) << "This shouldn´t happen, startClient called, but clientList is empty" << endl;
+ kdDebug(5004) << "This shouldn�t happen, startClient called, but clientList is empty" << endl;
return;
}