summaryrefslogtreecommitdiffstats
path: root/kioslaves
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kioslaves
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslaves')
-rw-r--r--kioslaves/imap4/imap4.cc314
-rw-r--r--kioslaves/imap4/imap4.h58
-rw-r--r--kioslaves/imap4/imapcommand.cc126
-rw-r--r--kioslaves/imap4/imapcommand.h140
-rw-r--r--kioslaves/imap4/imapinfo.cc12
-rw-r--r--kioslaves/imap4/imapinfo.h16
-rw-r--r--kioslaves/imap4/imaplist.cc6
-rw-r--r--kioslaves/imap4/imaplist.h22
-rw-r--r--kioslaves/imap4/imapparser.cc260
-rw-r--r--kioslaves/imap4/imapparser.h118
-rw-r--r--kioslaves/imap4/mailaddress.cc28
-rw-r--r--kioslaves/imap4/mailaddress.h40
-rw-r--r--kioslaves/imap4/mailheader.cc36
-rw-r--r--kioslaves/imap4/mailheader.h52
-rw-r--r--kioslaves/imap4/mimehdrline.cc22
-rw-r--r--kioslaves/imap4/mimehdrline.h16
-rw-r--r--kioslaves/imap4/mimeheader.cc148
-rw-r--r--kioslaves/imap4/mimeheader.h184
-rw-r--r--kioslaves/imap4/mimeio.cc18
-rw-r--r--kioslaves/imap4/mimeio.h30
-rw-r--r--kioslaves/imap4/rfcdecoder.cc76
-rw-r--r--kioslaves/imap4/rfcdecoder.h40
-rw-r--r--kioslaves/imap4/selectinfo.h12
-rw-r--r--kioslaves/mbox/mbox.cc16
-rw-r--r--kioslaves/mbox/mbox.h4
-rw-r--r--kioslaves/mbox/readmbox.cc28
-rw-r--r--kioslaves/mbox/readmbox.h18
-rw-r--r--kioslaves/mbox/stat.cc10
-rw-r--r--kioslaves/mbox/stat.h2
-rw-r--r--kioslaves/mbox/urlinfo.cc26
-rw-r--r--kioslaves/mbox/urlinfo.h12
-rw-r--r--kioslaves/opengroupware/opengroupware.cpp46
-rw-r--r--kioslaves/opengroupware/opengroupware.h12
-rw-r--r--kioslaves/opengroupware/webdavhandler.cpp32
-rw-r--r--kioslaves/opengroupware/webdavhandler.h24
-rw-r--r--kioslaves/sieve/sieve.cpp118
-rw-r--r--kioslaves/sieve/sieve.h34
37 files changed, 1078 insertions, 1078 deletions
diff --git a/kioslaves/imap4/imap4.cc b/kioslaves/imap4/imap4.cc
index eeef10fd..1cfd5602 100644
--- a/kioslaves/imap4/imap4.cc
+++ b/kioslaves/imap4/imap4.cc
@@ -78,9 +78,9 @@ extern "C" {
}
#endif
-#include <qbuffer.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kprotocolmanager.h>
#include <kmessagebox.h>
#include <kdebug.h>
@@ -161,7 +161,7 @@ sigchld_handler (int signo)
}
}
-IMAP4Protocol::IMAP4Protocol (const QCString & pool, const QCString & app, bool isSSL):TCPSlaveBase ((isSSL ? 993 : 143),
+IMAP4Protocol::IMAP4Protocol (const TQCString & pool, const TQCString & app, bool isSSL):TCPSlaveBase ((isSSL ? 993 : 143),
(isSSL ? IMAP_SSL_PROTOCOL : IMAP_PROTOCOL), pool,
app, isSSL), imapParser (), mimeIO (), outputBuffer(outputCache)
{
@@ -172,7 +172,7 @@ IMAP4Protocol::IMAP4Protocol (const QCString & pool, const QCString & app, bool
readBufferLen = 0;
cacheOutput = false;
decodeContent = false;
- mTimeOfLastNoop = QDateTime();
+ mTimeOfLastNoop = TQDateTime();
}
IMAP4Protocol::~IMAP4Protocol ()
@@ -186,7 +186,7 @@ IMAP4Protocol::get (const KURL & _url)
{
if (!makeLogin()) return;
kdDebug(7116) << "IMAP4::get - " << _url.prettyURL() << endl;
- QString aBox, aSequence, aType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aType, aSection, aValidity, aDelimiter, aInfo;
enum IMAP_TYPE aEnum =
parseURL (_url, aBox, aSection, aType, aSequence, aValidity, aDelimiter, aInfo);
if (aEnum != ITYPE_ATTACH)
@@ -227,7 +227,7 @@ IMAP4Protocol::get (const KURL & _url)
// * Otherwise, it specifies the exact data items to request. In this case, all
// the logic is in the app.
- QString aUpper = aSection.upper();
+ TQString aUpper = aSection.upper();
if (aUpper.find ("STRUCTURE") != -1)
{
aSection = "BODYSTRUCTURE";
@@ -267,26 +267,26 @@ IMAP4Protocol::get (const KURL & _url)
("Content-Type: multipart/digest; boundary=\"IMAPDIGEST\"\r\n", 55);
if (selectInfo.recentAvailable ())
outputLineStr ("X-Recent: " +
- QString::number(selectInfo.recent ()) + "\r\n");
+ TQString::number(selectInfo.recent ()) + "\r\n");
if (selectInfo.countAvailable ())
- outputLineStr ("X-Count: " + QString::number(selectInfo.count ()) +
+ outputLineStr ("X-Count: " + TQString::number(selectInfo.count ()) +
"\r\n");
if (selectInfo.unseenAvailable ())
outputLineStr ("X-Unseen: " +
- QString::number(selectInfo.unseen ()) + "\r\n");
+ TQString::number(selectInfo.unseen ()) + "\r\n");
if (selectInfo.uidValidityAvailable ())
outputLineStr ("X-uidValidity: " +
- QString::number(selectInfo.uidValidity ()) +
+ TQString::number(selectInfo.uidValidity ()) +
"\r\n");
if (selectInfo.uidNextAvailable ())
outputLineStr ("X-UidNext: " +
- QString::number(selectInfo.uidNext ()) + "\r\n");
+ TQString::number(selectInfo.uidNext ()) + "\r\n");
if (selectInfo.flagsAvailable ())
- outputLineStr ("X-Flags: " + QString::number(selectInfo.flags ()) +
+ outputLineStr ("X-Flags: " + TQString::number(selectInfo.flags ()) +
"\r\n");
if (selectInfo.permanentFlagsAvailable ())
outputLineStr ("X-PermanentFlags: " +
- QString::number(selectInfo.permanentFlags ()) + "\r\n");
+ TQString::number(selectInfo.permanentFlags ()) + "\r\n");
if (selectInfo.readWriteAvailable ()) {
if (selectInfo.readWrite()) {
outputLine ("X-Access: Read/Write\r\n", 22);
@@ -295,7 +295,7 @@ IMAP4Protocol::get (const KURL & _url)
}
}
outputLine ("\r\n", 2);
- flushOutput(QString::null);
+ flushOutput(TQString::null);
cacheOutput = false;
}
@@ -304,11 +304,11 @@ IMAP4Protocol::get (const KURL & _url)
if (aSequence != "0:0")
{
- QString contentEncoding;
+ TQString contentEncoding;
if (aEnum == ITYPE_ATTACH && decodeContent)
{
// get the MIME header and fill getLastHandled()
- QString mySection = aSection;
+ TQString mySection = aSection;
mySection.replace("]", ".MIME]");
cmd = sendCommand (imapCommand::clientFetch (aSequence, mySection));
do
@@ -356,15 +356,15 @@ IMAP4Protocol::get (const KURL & _url)
cacheOutput = true;
if (cache && cache->getUid () != 0)
outputLineStr ("X-UID: " +
- QString::number(cache->getUid ()) + "\r\n");
+ TQString::number(cache->getUid ()) + "\r\n");
if (cache && cache->getSize () != 0)
outputLineStr ("X-Length: " +
- QString::number(cache->getSize ()) + "\r\n");
+ TQString::number(cache->getSize ()) + "\r\n");
if (cache && !cache->getDate ().isEmpty())
outputLineStr ("X-Date: " + cache->getDate () + "\r\n");
if (cache && cache->getFlags () != 0)
outputLineStr ("X-Flags: " +
- QString::number(cache->getFlags ()) + "\r\n");
+ TQString::number(cache->getFlags ()) + "\r\n");
} else cacheOutput = true;
if ( lastone && !decodeContent )
lastone->outputPart (*this);
@@ -385,7 +385,7 @@ IMAP4Protocol::get (const KURL & _url)
}
// just to keep everybody happy when no data arrived
- data (QByteArray ());
+ data (TQByteArray ());
finished ();
relayEnabled = false;
@@ -407,7 +407,7 @@ IMAP4Protocol::listDir (const KURL & _url)
return;
}
- QString myBox, mySequence, myLType, mySection, myValidity, myDelimiter, myInfo;
+ TQString myBox, mySequence, myLType, mySection, myValidity, myDelimiter, myInfo;
// parseURL with caching
enum IMAP_TYPE myType =
parseURL (_url, myBox, mySection, myLType, mySequence, myValidity,
@@ -417,7 +417,7 @@ IMAP4Protocol::listDir (const KURL & _url)
if (myType == ITYPE_DIR || myType == ITYPE_DIR_AND_BOX)
{
- QString listStr = myBox;
+ TQString listStr = myBox;
imapCommand *cmd;
if (!listStr.isEmpty () && !listStr.endsWith(myDelimiter) &&
@@ -436,7 +436,7 @@ IMAP4Protocol::listDir (const KURL & _url)
(myLType == "LSUB" || myLType == "LSUBNOCHECK")));
if (cmd->result () == "OK")
{
- QString mailboxName;
+ TQString mailboxName;
UDSEntry entry;
UDSAtom atom;
KURL aURL = _url;
@@ -448,13 +448,13 @@ IMAP4Protocol::listDir (const KURL & _url)
if (myLType == "LSUB")
{
// fire the same command as LIST to check if the box really exists
- QValueList<imapList> listResponsesSave = listResponses;
+ TQValueList<imapList> listResponsesSave = listResponses;
doCommand (imapCommand::clientList ("", listStr, false));
- for (QValueListIterator < imapList > it = listResponsesSave.begin ();
+ for (TQValueListIterator < imapList > it = listResponsesSave.begin ();
it != listResponsesSave.end (); ++it)
{
bool boxOk = false;
- for (QValueListIterator < imapList > it2 = listResponses.begin ();
+ for (TQValueListIterator < imapList > it2 = listResponses.begin ();
it2 != listResponses.end (); ++it2)
{
if ((*it2).name() == (*it).name())
@@ -474,7 +474,7 @@ IMAP4Protocol::listDir (const KURL & _url)
}
else // LIST or LSUBNOCHECK
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
doListEntry (aURL, myBox, (*it), (mySection != "FOLDERONLY"));
@@ -495,12 +495,12 @@ IMAP4Protocol::listDir (const KURL & _url)
&& myLType != "LIST" && myLType != "LSUB" && myLType != "LSUBNOCHECK")
{
KURL aURL = _url;
- aURL.setQuery (QString::null);
- const QString encodedUrl = aURL.url(0, 106); // utf-8
+ aURL.setQuery (TQString::null);
+ const TQString encodedUrl = aURL.url(0, 106); // utf-8
if (!_url.query ().isEmpty ())
{
- QString query = KURL::decode_string (_url.query ());
+ TQString query = KURL::decode_string (_url.query ());
query = query.right (query.length () - 1);
if (!query.isEmpty())
{
@@ -519,15 +519,15 @@ IMAP4Protocol::listDir (const KURL & _url)
}
completeQueue.removeRef (cmd);
- QStringList list = getResults ();
+ TQStringList list = getResults ();
int stretch = 0;
if (selectInfo.uidNextAvailable ())
- stretch = QString::number(selectInfo.uidNext ()).length ();
+ stretch = TQString::number(selectInfo.uidNext ()).length ();
UDSEntry entry;
imapCache fake;
- for (QStringList::ConstIterator it = list.begin(); it != list.end();
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end();
++it)
{
fake.setUid((*it).toULong());
@@ -566,7 +566,7 @@ IMAP4Protocol::listDir (const KURL & _url)
KURL newUrl = _url;
newUrl.setPath ("/" + myBox + ";UIDVALIDITY=" +
- QString::number(selectInfo.uidValidity ()));
+ TQString::number(selectInfo.uidValidity ()));
kdDebug(7116) << "IMAP4::listDir - redirecting to " << newUrl.prettyURL() << endl;
redirection (newUrl);
@@ -579,7 +579,7 @@ IMAP4Protocol::listDir (const KURL & _url)
int stretch = 0;
if (selectInfo.uidNextAvailable ())
- stretch = QString::number(selectInfo.uidNext ()).length ();
+ stretch = TQString::number(selectInfo.uidNext ()).length ();
// kdDebug(7116) << selectInfo.uidNext() << "d used to stretch " << stretch << endl;
UDSEntry entry;
@@ -622,8 +622,8 @@ IMAP4Protocol::listDir (const KURL & _url)
}
void
-IMAP4Protocol::setHost (const QString & _host, int _port,
- const QString & _user, const QString & _pass)
+IMAP4Protocol::setHost (const TQString & _host, int _port,
+ const TQString & _user, const TQString & _pass)
{
if (myHost != _host || myPort != _port || myUser != _user || myPass != _pass)
{ // what's the point of doing 4 string compares to avoid 4 string copies?
@@ -638,7 +638,7 @@ IMAP4Protocol::setHost (const QString & _host, int _port,
}
void
-IMAP4Protocol::parseRelay (const QByteArray & buffer)
+IMAP4Protocol::parseRelay (const TQByteArray & buffer)
{
if (relayEnabled) {
// relay data immediately
@@ -665,7 +665,7 @@ IMAP4Protocol::parseRelay (ulong len)
}
-bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
+bool IMAP4Protocol::parseRead(TQByteArray & buffer, ulong len, ulong relay)
{
char buf[8192];
while (buffer.size() < len)
@@ -681,7 +681,7 @@ bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
}
if (relay > buffer.size())
{
- QByteArray relayData;
+ TQByteArray relayData;
ssize_t relbuf = relay - buffer.size();
int currentRelay = QMIN(relbuf, readLen);
relayData.setRawData(buf, currentRelay);
@@ -689,7 +689,7 @@ bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
relayData.resetRawData(buf, currentRelay);
}
{
- QBuffer stream (buffer);
+ TQBuffer stream (buffer);
stream.open (IO_WriteOnly);
stream.at (buffer.size ());
stream.writeBlock (buf, readLen);
@@ -700,7 +700,7 @@ bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
}
-bool IMAP4Protocol::parseReadLine (QByteArray & buffer, ulong relay)
+bool IMAP4Protocol::parseReadLine (TQByteArray & buffer, ulong relay)
{
if (myHost.isEmpty()) return FALSE;
@@ -712,7 +712,7 @@ bool IMAP4Protocol::parseReadLine (QByteArray & buffer, ulong relay)
if (copyLen < readBufferLen) copyLen++;
if (relay > 0)
{
- QByteArray relayData;
+ TQByteArray relayData;
if (copyLen < (ssize_t) relay)
relay = copyLen;
@@ -723,7 +723,7 @@ bool IMAP4Protocol::parseReadLine (QByteArray & buffer, ulong relay)
}
// append to buffer
{
- QBuffer stream (buffer);
+ TQBuffer stream (buffer);
stream.open (IO_WriteOnly);
stream.at (buffer.size ());
@@ -776,7 +776,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
{
kdDebug(7116) << "IMAP4::put - " << _url.prettyURL() << endl;
// KIO::TCPSlaveBase::put(_url,permissions,overwrite,resume);
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
enum IMAP_TYPE aType =
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
@@ -796,14 +796,14 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
}
else
{
- QPtrList < QByteArray > bufferList;
+ TQPtrList < TQByteArray > bufferList;
int length = 0;
int result;
// Loop until we got 'dataEnd'
do
{
- QByteArray *buffer = new QByteArray ();
+ TQByteArray *buffer = new TQByteArray ();
dataReq (); // Request for data
result = readData (*buffer);
if (result > 0)
@@ -832,7 +832,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
bool sendOk = true;
ulong wrote = 0;
- QByteArray *buffer;
+ TQByteArray *buffer;
// send data to server
while (!bufferList.isEmpty () && sendOk)
{
@@ -874,7 +874,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
{
if (hasCapability("UIDPLUS"))
{
- QString uid = cmd->resultInfo();
+ TQString uid = cmd->resultInfo();
if (uid.find("APPENDUID") != -1)
{
uid = uid.section(" ", 2, 2);
@@ -911,7 +911,7 @@ void
IMAP4Protocol::mkdir (const KURL & _url, int)
{
kdDebug(7116) << "IMAP4::mkdir - " << _url.prettyURL() << endl;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL(_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
kdDebug(7116) << "IMAP4::mkdir - create " << aBox << endl;
imapCommand *cmd = doCommand (imapCommand::clientCreate(aBox));
@@ -961,8 +961,8 @@ void
IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
{
kdDebug(7116) << "IMAP4::copy - [" << (overwrite ? "Overwrite" : "NoOverwrite") << "] " << src.prettyURL() << " -> " << dest.prettyURL() << endl;
- QString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
- QString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
+ TQString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
+ TQString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
enum IMAP_TYPE sType =
parseURL (src, sBox, sSection, sLType, sSequence, sValidity, sDelimiter, sInfo);
enum IMAP_TYPE dType =
@@ -979,8 +979,8 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
{
KURL testDir = dest;
- QString subDir = dBox.right (dBox.length () - dBox.findRev ('/'));
- QString topDir = dBox.left (sub);
+ TQString subDir = dBox.right (dBox.length () - dBox.findRev ('/'));
+ TQString topDir = dBox.left (sub);
testDir.setPath ("/" + topDir);
dType =
parseURL (testDir, topDir, dSection, dLType, dSequence, dValidity,
@@ -1048,7 +1048,7 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
} else {
if (hasCapability("UIDPLUS"))
{
- QString uid = cmd->resultInfo();
+ TQString uid = cmd->resultInfo();
if (uid.find("COPYUID") != -1)
{
uid = uid.section(" ", 2, 3);
@@ -1071,7 +1071,7 @@ void
IMAP4Protocol::del (const KURL & _url, bool isFile)
{
kdDebug(7116) << "IMAP4::del - [" << (isFile ? "File" : "NoFile") << "] " << _url.prettyURL() << endl;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
enum IMAP_TYPE aType =
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
@@ -1201,7 +1201,7 @@ IMAP4Protocol::del (const KURL & _url, bool isFile)
* Note that the namespace can be empty
* Unsubscribe: data = 'U' + URL (KURL)
* Subscribe: data = 'u' + URL (KURL)
- * Change the status: data = 'S' + URL (KURL) + Flags (QCString)
+ * Change the status: data = 'S' + URL (KURL) + Flags (TQCString)
* ACL commands: data = 'A' + command + URL (KURL) + command-dependent args
* AnnotateMore commands: data = 'M' + 'G'et/'S'et + URL + entry + command-dependent args
* Search: data = 'E' + URL (KURL)
@@ -1209,12 +1209,12 @@ IMAP4Protocol::del (const KURL & _url, bool isFile)
* Custom command: data = 'X' + 'N'ormal/'E'xtended + command + command-dependent args
*/
void
-IMAP4Protocol::special (const QByteArray & aData)
+IMAP4Protocol::special (const TQByteArray & aData)
{
kdDebug(7116) << "IMAP4Protocol::special" << endl;
if (!makeLogin()) return;
- QDataStream stream(aData, IO_ReadOnly);
+ TQDataStream stream(aData, IO_ReadOnly);
int tmp;
stream >> tmp;
@@ -1264,7 +1264,7 @@ IMAP4Protocol::special (const QByteArray & aData)
// unsubscribe
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
imapCommand *cmd = doCommand(imapCommand::clientUnsubscribe(aBox));
if (cmd->result () != "OK")
@@ -1285,7 +1285,7 @@ IMAP4Protocol::special (const QByteArray & aData)
// subscribe
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
imapCommand *cmd = doCommand(imapCommand::clientSubscribe(aBox));
if (cmd->result () != "OK")
@@ -1341,15 +1341,15 @@ IMAP4Protocol::special (const QByteArray & aData)
{
// status
KURL _url;
- QCString newFlags;
+ TQCString newFlags;
stream >> _url >> newFlags;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
if (!assureBox(aBox, false)) return;
// make sure we only touch flags we know
- QCString knownFlags = "\\SEEN \\ANSWERED \\FLAGGED \\DRAFT";
+ TQCString knownFlags = "\\SEEN \\ANSWERED \\FLAGGED \\DRAFT";
const imapInfo info = getSelected();
if ( info.permanentFlagsAvailable() && (info.permanentFlags() & imapInfo::User) ) {
knownFlags += " KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $TODO $WATCHED $IGNORED";
@@ -1386,10 +1386,10 @@ IMAP4Protocol::special (const QByteArray & aData)
// seen
KURL _url;
bool seen;
- QCString newFlags;
+ TQCString newFlags;
stream >> _url >> seen;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
if ( !assureBox(aBox, true) ) // read-only because changing SEEN should be possible even then
return;
@@ -1426,24 +1426,24 @@ IMAP4Protocol::special (const QByteArray & aData)
}
default:
kdWarning(7116) << "Unknown command in special(): " << tmp << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(tmp)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(tmp)) );
break;
}
}
void
-IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
+IMAP4Protocol::specialACLCommand( int command, TQDataStream& stream )
{
// All commands start with the URL to the box
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
switch( command ) {
case 'S': // SETACL
{
- QString user, acl;
+ TQString user, acl;
stream >> user >> acl;
kdDebug(7116) << "SETACL " << aBox << " " << user << " " << acl << endl;
imapCommand *cmd = doCommand(imapCommand::clientSetACL(aBox, user, acl));
@@ -1462,7 +1462,7 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
}
case 'D': // DELETEACL
{
- QString user;
+ TQString user;
stream >> user;
kdDebug(7116) << "DELETEACL " << aBox << " " << user << endl;
imapCommand *cmd = doCommand(imapCommand::clientDeleteACL(aBox, user));
@@ -1503,7 +1503,7 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
case 'L': // LISTRIGHTS
{
// Do we need this one? It basically shows which rights are tied together, but that's all?
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
break;
}
case 'M': // MYRIGHTS
@@ -1518,7 +1518,7 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
.arg(cmd->resultInfo()));
return;
}
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "myrights results: " << lst << endl;
if ( !lst.isEmpty() ) {
Q_ASSERT( lst.count() == 1 );
@@ -1529,17 +1529,17 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
}
default:
kdWarning(7116) << "Unknown special ACL command:" << command << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
}
}
void
-IMAP4Protocol::specialSearchCommand( QDataStream& stream )
+IMAP4Protocol::specialSearchCommand( TQDataStream& stream )
{
kdDebug(7116) << "IMAP4Protocol::specialSearchCommand" << endl;
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
if (!assureBox(aBox, false)) return;
@@ -1553,7 +1553,7 @@ IMAP4Protocol::specialSearchCommand( QDataStream& stream )
return;
}
completeQueue.removeRef(cmd);
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "IMAP4Protocol::specialSearchCommand '" << aSection <<
"' returns " << lst << endl;
infoMessage( lst.join( " " ) );
@@ -1562,11 +1562,11 @@ IMAP4Protocol::specialSearchCommand( QDataStream& stream )
}
void
-IMAP4Protocol::specialCustomCommand( QDataStream& stream )
+IMAP4Protocol::specialCustomCommand( TQDataStream& stream )
{
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand" << endl;
- QString command, arguments;
+ TQString command, arguments;
int type;
stream >> type;
stream >> command >> arguments;
@@ -1588,7 +1588,7 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
return;
}
completeQueue.removeRef(cmd);
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand '" << command <<
":" << arguments <<
"' returns " << lst << endl;
@@ -1602,13 +1602,13 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
*/
if ( type == 'E' ) {
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand: extended mode" << endl;
- imapCommand *cmd = sendCommand (imapCommand::clientCustom( command, QString() ));
+ imapCommand *cmd = sendCommand (imapCommand::clientCustom( command, TQString() ));
while ( !parseLoop () ) ;
// see if server is waiting
if (!cmd->isComplete () && !getContinuation ().isEmpty ())
{
- const QByteArray buffer = arguments.utf8();
+ const TQByteArray buffer = arguments.utf8();
// send data to server
bool sendOk = (write (buffer.data (), buffer.size ()) == (ssize_t)buffer.size ());
@@ -1632,7 +1632,7 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
completeQueue.removeRef (cmd);
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand: returns " << lst << endl;
infoMessage( lst.join( " " ) );
@@ -1641,12 +1641,12 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
}
void
-IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
+IMAP4Protocol::specialAnnotateMoreCommand( int command, TQDataStream& stream )
{
// All commands start with the URL to the box
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
switch( command ) {
@@ -1654,10 +1654,10 @@ IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
{
// Params:
// KURL URL of the mailbox
- // QString entry (should be an actual entry name, no % or *; empty for server entries)
- // QMap<QString,QString> attributes (name and value)
- QString entry;
- QMap<QString, QString> attributes;
+ // TQString entry (should be an actual entry name, no % or *; empty for server entries)
+ // TQMap<TQString,TQString> attributes (name and value)
+ TQString entry;
+ TQMap<TQString, TQString> attributes;
stream >> entry >> attributes;
kdDebug(7116) << "SETANNOTATION " << aBox << " " << entry << " " << attributes.count() << " attributes" << endl;
imapCommand *cmd = doCommand(imapCommand::clientSetAnnotation(aBox, entry, attributes));
@@ -1678,10 +1678,10 @@ IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
{
// Params:
// KURL URL of the mailbox
- // QString entry (should be an actual entry name, no % or *; empty for server entries)
- // QStringList attributes (list of attributes to be retrieved, possibly with % or *)
- QString entry;
- QStringList attributeNames;
+ // TQString entry (should be an actual entry name, no % or *; empty for server entries)
+ // TQStringList attributes (list of attributes to be retrieved, possibly with % or *)
+ TQString entry;
+ TQStringList attributeNames;
stream >> entry >> attributeNames;
kdDebug(7116) << "GETANNOTATION " << aBox << " " << entry << " " << attributeNames << endl;
imapCommand *cmd = doCommand(imapCommand::clientGetAnnotation(aBox, entry, attributeNames));
@@ -1704,21 +1704,21 @@ IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
}
default:
kdWarning(7116) << "Unknown special annotate command:" << command << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
}
}
void
-IMAP4Protocol::specialQuotaCommand( int command, QDataStream& stream )
+IMAP4Protocol::specialQuotaCommand( int command, TQDataStream& stream )
{
// All commands start with the URL to the box
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
switch( command ) {
- case 'R': // GETQUOTAROOT
+ case 'R': // GEQUOTAROOT
{
kdDebug(7116) << "QUOTAROOT " << aBox << endl;
imapCommand *cmd = doCommand(imapCommand::clientGetQuotaroot( aBox ) );
@@ -1734,21 +1734,21 @@ IMAP4Protocol::specialQuotaCommand( int command, QDataStream& stream )
finished();
break;
}
- case 'G': // GETQUOTA
+ case 'G': // GEQUOTA
{
- kdDebug(7116) << "GETQUOTA command" << endl;
+ kdDebug(7116) << "GEQUOTA command" << endl;
kdWarning(7116) << "UNIMPLEMENTED" << endl;
break;
}
- case 'S': // SETQUOTA
+ case 'S': // SEQUOTA
{
- kdDebug(7116) << "SETQUOTA command" << endl;
+ kdDebug(7116) << "SEQUOTA command" << endl;
kdWarning(7116) << "UNIMPLEMENTED" << endl;
break;
}
default:
kdWarning(7116) << "Unknown special quota command:" << command << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
}
}
@@ -1756,8 +1756,8 @@ void
IMAP4Protocol::rename (const KURL & src, const KURL & dest, bool overwrite)
{
kdDebug(7116) << "IMAP4::rename - [" << (overwrite ? "Overwrite" : "NoOverwrite") << "] " << src.prettyURL() << " -> " << dest.prettyURL() << endl;
- QString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
- QString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
+ TQString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
+ TQString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
enum IMAP_TYPE sType =
parseURL (src, sBox, sSection, sLType, sSequence, sValidity, sDelimiter, sInfo, false);
enum IMAP_TYPE dType =
@@ -1815,11 +1815,11 @@ IMAP4Protocol::slave_status ()
{
bool connected = (getState() != ISTATE_NO) && isConnectionValid();
kdDebug(7116) << "IMAP4::slave_status " << connected << endl;
- slaveStatus ( connected ? myHost : QString::null, connected );
+ slaveStatus ( connected ? myHost : TQString::null, connected );
}
void
-IMAP4Protocol::dispatch (int command, const QByteArray & data)
+IMAP4Protocol::dispatch (int command, const TQByteArray & data)
{
kdDebug(7116) << "IMAP4::dispatch - command=" << command << endl;
KIO::TCPSlaveBase::dispatch (command, data);
@@ -1829,7 +1829,7 @@ void
IMAP4Protocol::stat (const KURL & _url)
{
kdDebug(7116) << "IMAP4::stat - " << _url.prettyURL() << endl;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
// parseURL with caching
enum IMAP_TYPE aType =
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter,
@@ -1857,7 +1857,7 @@ IMAP4Protocol::stat (const KURL & _url)
setState(ISTATE_LOGIN);
}
bool ok = false;
- QString cmdInfo;
+ TQString cmdInfo;
if (aType == ITYPE_MSG || aType == ITYPE_ATTACH)
ok = true;
else
@@ -1873,7 +1873,7 @@ IMAP4Protocol::stat (const KURL & _url)
imapCommand *cmd = doCommand (imapCommand::clientList ("", aBox));
if (cmd->result () == "OK")
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
if (aBox == (*it).name ()) found = true;
@@ -1890,7 +1890,7 @@ IMAP4Protocol::stat (const KURL & _url)
|| (aSection == "UNSEEN" && getStatus().unseenAvailable()))
{
atom.m_uds = UDS_SIZE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = (aSection == "UIDNEXT") ? getStatus().uidNext()
: getStatus().unseen();
entry.append(atom);
@@ -1924,7 +1924,7 @@ IMAP4Protocol::stat (const KURL & _url)
KURL newUrl = _url;
newUrl.setPath ("/" + aBox + ";UIDVALIDITY=" +
- QString::number(validity));
+ TQString::number(validity));
kdDebug(7116) << "IMAP4::stat - redirecting to " << newUrl.prettyURL() << endl;
redirection (newUrl);
}
@@ -1953,7 +1953,7 @@ IMAP4Protocol::stat (const KURL & _url)
{
case ITYPE_DIR:
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
break;
@@ -1961,7 +1961,7 @@ IMAP4Protocol::stat (const KURL & _url)
case ITYPE_BOX:
case ITYPE_DIR_AND_BOX:
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
break;
@@ -1969,7 +1969,7 @@ IMAP4Protocol::stat (const KURL & _url)
case ITYPE_MSG:
case ITYPE_ATTACH:
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFREG;
entry.append (atom);
break;
@@ -2007,7 +2007,7 @@ void IMAP4Protocol::closeConnection()
completeQueue.clear();
sentQueue.clear();
lastHandled = 0;
- currentBox = QString::null;
+ currentBox = TQString::null;
readBufferLen = 0;
}
@@ -2033,13 +2033,13 @@ bool IMAP4Protocol::makeLogin ()
unhandled.clear ();
if (!alreadyConnected) while (!parseLoop ()) ; //get greeting
- QString greeting;
+ TQString greeting;
if (!unhandled.isEmpty()) greeting = unhandled.first().stripWhiteSpace();
unhandled.clear (); //get rid of it
cmd = doCommand (new imapCommand ("CAPABILITY", ""));
kdDebug(7116) << "IMAP4: setHost: capability" << endl;
- for (QStringList::Iterator it = imapCapabilities.begin ();
+ for (TQStringList::Iterator it = imapCapabilities.begin ();
it != imapCapabilities.end (); ++it)
{
kdDebug(7116) << "'" << (*it) << "'" << endl;
@@ -2057,7 +2057,7 @@ bool IMAP4Protocol::makeLogin ()
if (metaData("nologin") == "on") return TRUE;
- if (myTLS == "on" && !hasCapability(QString("STARTTLS")))
+ if (myTLS == "on" && !hasCapability(TQString("STARTTLS")))
{
error(ERR_COULD_NOT_LOGIN, i18n("The server does not support TLS.\n"
"Disable this security feature to connect unencrypted."));
@@ -2065,7 +2065,7 @@ bool IMAP4Protocol::makeLogin ()
return false;
}
if ((myTLS == "on" || (canUseTLS() && myTLS != "off")) &&
- hasCapability(QString("STARTTLS")))
+ hasCapability(TQString("STARTTLS")))
{
imapCommand *cmd = doCommand (imapCommand::clientStartTLS());
if (cmd->result () == "OK")
@@ -2076,7 +2076,7 @@ bool IMAP4Protocol::makeLogin ()
{
kdDebug(7116) << "TLS mode has been enabled." << endl;
imapCommand *cmd2 = doCommand (new imapCommand ("CAPABILITY", ""));
- for (QStringList::Iterator it = imapCapabilities.begin ();
+ for (TQStringList::Iterator it = imapCapabilities.begin ();
it != imapCapabilities.end (); ++it)
{
kdDebug(7116) << "'" << (*it) << "'" << endl;
@@ -2092,14 +2092,14 @@ bool IMAP4Protocol::makeLogin ()
}
if (myAuth.isEmpty () || myAuth == "*") {
- if (hasCapability (QString ("LOGINDISABLED"))) {
+ if (hasCapability (TQString ("LOGINDISABLED"))) {
error (ERR_COULD_NOT_LOGIN, i18n("LOGIN is disabled by the server."));
closeConnection();
return false;
}
}
else {
- if (!hasCapability (QString ("AUTH=") + myAuth)) {
+ if (!hasCapability (TQString ("AUTH=") + myAuth)) {
error (ERR_COULD_NOT_LOGIN, i18n("The authentication method %1 is not "
"supported by the server.").arg(myAuth));
closeConnection();
@@ -2107,7 +2107,7 @@ bool IMAP4Protocol::makeLogin ()
}
}
- if ( greeting.contains( QRegExp( "Cyrus IMAP4 v2.1" ) ) ) {
+ if ( greeting.contains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) {
removeCapability( "ANNOTATEMORE" );
}
@@ -2120,7 +2120,7 @@ bool IMAP4Protocol::makeLogin ()
kdDebug(7116) << "IMAP4::makeLogin - open_PassDlg said user=" << myUser << " pass=xx" << endl;
- QString resultInfo;
+ TQString resultInfo;
if (myAuth.isEmpty () || myAuth == "*")
{
if (myUser.isEmpty () || myPass.isEmpty ()) {
@@ -2161,7 +2161,7 @@ bool IMAP4Protocol::makeLogin ()
cmd = doCommand( imapCommand::clientList("", "") );
if (cmd->result () == "OK")
{
- QValueListIterator < imapList > it = listResponses.begin();
+ TQValueListIterator < imapList > it = listResponses.begin();
if ( it == listResponses.end() )
{
// empty answer - this is a buggy imap server
@@ -2175,13 +2175,13 @@ bool IMAP4Protocol::makeLogin ()
}
if ( it != listResponses.end() )
{
- namespaceToDelimiter[QString::null] = (*it).hierarchyDelimiter();
+ namespaceToDelimiter[TQString::null] = (*it).hierarchyDelimiter();
kdDebug(7116) << "makeLogin - delimiter for empty ns='" <<
(*it).hierarchyDelimiter() << "'" << endl;
if ( !hasCapability("NAMESPACE") )
{
// server does not support namespaces
- QString nsentry = QString::number( 0 ) + "=="
+ TQString nsentry = TQString::number( 0 ) + "=="
+ (*it).hierarchyDelimiter();
imapNamespaces.append( nsentry );
}
@@ -2196,10 +2196,10 @@ bool IMAP4Protocol::makeLogin ()
}
void
-IMAP4Protocol::parseWriteLine (const QString & aStr)
+IMAP4Protocol::parseWriteLine (const TQString & aStr)
{
//kdDebug(7116) << "Writing: " << aStr << endl;
- QCString writer = aStr.utf8();
+ TQCString writer = aStr.utf8();
int len = writer.length();
// append CRLF if necessary
@@ -2251,15 +2251,15 @@ IMAP4Protocol::doListEntry (const KURL & _url, int stretch, imapCache * cache,
bool withFlags, bool withSubject)
{
KURL aURL = _url;
- aURL.setQuery (QString::null);
- const QString encodedUrl = aURL.url(0, 106); // utf-8
+ aURL.setQuery (TQString::null);
+ const TQString encodedUrl = aURL.url(0, 106); // utf-8
doListEntry(encodedUrl, stretch, cache, withFlags, withSubject);
}
void
-IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache * cache,
+IMAP4Protocol::doListEntry (const TQString & encodedUrl, int stretch, imapCache * cache,
bool withFlags, bool withSubject)
{
if (cache)
@@ -2269,7 +2269,7 @@ IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache *
entry.clear ();
- const QString uid = QString::number(cache->getUid());
+ const TQString uid = TQString::number(cache->getUid());
atom.m_uds = UDS_NAME;
atom.m_str = uid;
@@ -2296,7 +2296,7 @@ IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache *
entry.append (atom);
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFREG;
entry.append (atom);
@@ -2322,18 +2322,18 @@ IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache *
}
void
-IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
+IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox,
const imapList & item, bool appendPath)
{
KURL aURL = _url;
- aURL.setQuery (QString::null);
+ aURL.setQuery (TQString::null);
UDSEntry entry;
UDSAtom atom;
int hdLen = item.hierarchyDelimiter().length();
{
// mailboxName will be appended to the path if appendPath is true
- QString mailboxName = item.name ();
+ TQString mailboxName = item.name ();
// some beautification
if (mailboxName.find (myBox) == 0 && mailboxName.length() > myBox.length())
@@ -2379,7 +2379,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
// explicitly set this as a directory for KFileDialog
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
}
@@ -2393,7 +2393,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
// explicitly set this as a directory for KFileDialog
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
}
@@ -2406,7 +2406,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
}
atom.m_uds = UDS_URL;
- QString path = aURL.path();
+ TQString path = aURL.path();
atom.m_str = aURL.url (0, 106); // utf-8
if (appendPath)
{
@@ -2446,10 +2446,10 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
}
enum IMAP_TYPE
-IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
- QString & _section, QString & _type, QString & _uid,
- QString & _validity, QString & _hierarchyDelimiter,
- QString & _info, bool cache)
+IMAP4Protocol::parseURL (const KURL & _url, TQString & _box,
+ TQString & _section, TQString & _type, TQString & _uid,
+ TQString & _validity, TQString & _hierarchyDelimiter,
+ TQString & _info, bool cache)
{
enum IMAP_TYPE retVal;
retVal = ITYPE_UNKNOWN;
@@ -2458,7 +2458,7 @@ IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
// kdDebug(7116) << "URL: query - '" << KURL::decode_string(_url.query()) << "'" << endl;
// get the delimiter
- QString myNamespace = namespaceForBox( _box );
+ TQString myNamespace = namespaceForBox( _box );
kdDebug(7116) << "IMAP4::parseURL - namespace=" << myNamespace << endl;
if ( namespaceToDelimiter.contains(myNamespace) )
{
@@ -2487,7 +2487,7 @@ IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
cmd = doCommand (imapCommand::clientList ("", _box));
if (cmd->result () == "OK")
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
//kdDebug(7116) << "IMAP4::parseURL - checking " << _box << " to " << (*it).name() << endl;
@@ -2576,7 +2576,7 @@ IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
}
int
-IMAP4Protocol::outputLine (const QCString & _str, int len)
+IMAP4Protocol::outputLine (const TQCString & _str, int len)
{
if (len == -1) {
len = _str.length();
@@ -2593,7 +2593,7 @@ IMAP4Protocol::outputLine (const QCString & _str, int len)
return 0;
}
- QByteArray temp;
+ TQByteArray temp;
bool relay = relayEnabled;
relayEnabled = true;
@@ -2605,7 +2605,7 @@ IMAP4Protocol::outputLine (const QCString & _str, int len)
return 0;
}
-void IMAP4Protocol::flushOutput(QString contentEncoding)
+void IMAP4Protocol::flushOutput(TQString contentEncoding)
{
// send out cached data to the application
if (outputBufferIndex == 0)
@@ -2615,7 +2615,7 @@ void IMAP4Protocol::flushOutput(QString contentEncoding)
if (decodeContent)
{
// get the coding from the MIME header
- QByteArray decoded;
+ TQByteArray decoded;
if (contentEncoding.find("quoted-printable", 0, false) == 0)
decoded = KCodecs::quotedPrintableDecode(outputCache);
else if (contentEncoding.find("base64", 0, false) == 0)
@@ -2623,7 +2623,7 @@ void IMAP4Protocol::flushOutput(QString contentEncoding)
else
decoded = outputCache;
- QString mimetype = KMimeType::findByContent( decoded )->name();
+ TQString mimetype = KMimeType::findByContent( decoded )->name();
kdDebug(7116) << "IMAP4::flushOutput - mimeType " << mimetype << endl;
mimeType(mimetype);
decodeContent = false;
@@ -2654,7 +2654,7 @@ ssize_t IMAP4Protocol::myRead(void *data, ssize_t len)
}
bool
-IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
+IMAP4Protocol::assureBox (const TQString & aBox, bool readonly)
{
if (aBox.isEmpty()) return false;
@@ -2667,7 +2667,7 @@ IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
selectInfo = imapInfo();
cmd = doCommand (imapCommand::clientSelect (aBox, readonly));
bool ok = cmd->result() == "OK";
- QString cmdInfo = cmd->resultInfo();
+ TQString cmdInfo = cmd->resultInfo();
completeQueue.removeRef (cmd);
if (!ok)
@@ -2676,7 +2676,7 @@ IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
cmd = doCommand (imapCommand::clientList ("", aBox));
if (cmd->result () == "OK")
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
if (aBox == (*it).name ()) found = true;
@@ -2702,10 +2702,10 @@ IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
// Doing this means a server roundtrip and since assureBox is called
// after every mail, we do it with a timeout.
kdDebug(7116) << "IMAP4Protocol::assureBox - reusing box" << endl;
- if ( mTimeOfLastNoop.secsTo( QDateTime::currentDateTime() ) > 10 ) {
+ if ( mTimeOfLastNoop.secsTo( TQDateTime::currentDateTime() ) > 10 ) {
cmd = doCommand (imapCommand::clientNoop ());
completeQueue.removeRef (cmd);
- mTimeOfLastNoop = QDateTime::currentDateTime();
+ mTimeOfLastNoop = TQDateTime::currentDateTime();
kdDebug(7116) << "IMAP4Protocol::assureBox - noop timer fired" << endl;
}
}
diff --git a/kioslaves/imap4/imap4.h b/kioslaves/imap4/imap4.h
index b86a3815..9920ecac 100644
--- a/kioslaves/imap4/imap4.h
+++ b/kioslaves/imap4/imap4.h
@@ -28,7 +28,7 @@
#include "mimeio.h"
#include <kio/tcpslavebase.h>
-#include <qbuffer.h>
+#include <tqbuffer.h>
#define IMAP_BUFFER 8192
@@ -55,14 +55,14 @@ class IMAP4Protocol:public
public:
// reimplement the TCPSlave
- IMAP4Protocol (const QCString & pool, const QCString & app, bool isSSL);
+ IMAP4Protocol (const TQCString & pool, const TQCString & app, bool isSSL);
virtual ~IMAP4Protocol ();
virtual void openConnection();
virtual void closeConnection();
- virtual void setHost (const QString & _host, int _port, const QString & _user,
- const QString & _pass);
+ virtual void setHost (const TQString & _host, int _port, const TQString & _user,
+ const TQString & _pass);
/**
* @brief get a message or part of a message
* the data is normally send as we get it from the server
@@ -83,13 +83,13 @@ public:
* @brief Capabilites, NOOP, (Un)subscribe, Change status,
* Change ACL
*/
- virtual void special (const QByteArray & data);
+ virtual void special (const TQByteArray & data);
/**
* @brief list a directory/mailbox
*/
virtual void listDir (const KURL & _url);
virtual void setSubURL (const KURL & _url);
- virtual void dispatch (int command, const QByteArray & data);
+ virtual void dispatch (int command, const TQByteArray & data);
/**
* @brief create a mailbox
*/
@@ -103,7 +103,7 @@ public:
/** @brief reimplement the parser
* relay hook to send the fetched data directly to an upper level
*/
- virtual void parseRelay (const QByteArray & buffer);
+ virtual void parseRelay (const TQByteArray & buffer);
/** @brief reimplement the parser
* relay hook to announce the fetched data directly to an upper level
@@ -112,26 +112,26 @@ public:
/** @brief reimplement the parser
* read at least len bytes */
- virtual bool parseRead (QByteArray &buffer,ulong len,ulong relay=0);
+ virtual bool parseRead (TQByteArray &buffer,ulong len,ulong relay=0);
/** @brief reimplement the parser
* @brief read at least a line (up to CRLF) */
- virtual bool parseReadLine (QByteArray & buffer, ulong relay = 0);
+ virtual bool parseReadLine (TQByteArray & buffer, ulong relay = 0);
/** @brief reimplement the parser
* @brief write argument to the server */
- virtual void parseWriteLine (const QString &);
+ virtual void parseWriteLine (const TQString &);
/** @brief reimplement the mimeIO */
- virtual int outputLine (const QCString & _str, int len = -1);
+ virtual int outputLine (const TQCString & _str, int len = -1);
/** @brief send out cached data to the application */
- virtual void flushOutput(QString contentEncoding = QString::null);
+ virtual void flushOutput(TQString contentEncoding = TQString::null);
protected:
// select or examine the box if needed
- bool assureBox (const QString & aBox, bool readonly);
+ bool assureBox (const TQString & aBox, bool readonly);
ssize_t myRead(void *data, ssize_t len);
@@ -143,15 +143,15 @@ protected:
* set to ITYPE_DIR_AND_BOX
*/
enum IMAP_TYPE
- parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity,
- QString & _hierarchyDelimiter, QString & _info,
+ parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity,
+ TQString & _hierarchyDelimiter, TQString & _info,
bool cache = false);
- QString getMimeType (enum IMAP_TYPE);
+ TQString getMimeType (enum IMAP_TYPE);
bool makeLogin ();
- void outputLineStr (const QString & _str)
+ void outputLineStr (const TQString & _str)
{
outputLine (_str.latin1 (), _str.length());
}
@@ -163,43 +163,43 @@ protected:
* If @p appendPath is true the foldername will be appended
* to the path of @p url
*/
- void doListEntry (const KURL & url, const QString & myBox,
+ void doListEntry (const KURL & url, const TQString & myBox,
const imapList & item, bool appendPath = true);
/** Send an ACL command which is identified by @p command */
- void specialACLCommand( int command, QDataStream& stream );
+ void specialACLCommand( int command, TQDataStream& stream );
/** Send an annotation command which is identified by @p command */
- void specialAnnotateMoreCommand( int command, QDataStream& stream );
- void specialQuotaCommand( int command, QDataStream& stream );
+ void specialAnnotateMoreCommand( int command, TQDataStream& stream );
+ void specialQuotaCommand( int command, TQDataStream& stream );
/** Search current folder, the search string is passed as SECTION */
- void specialSearchCommand( QDataStream& );
+ void specialSearchCommand( TQDataStream& );
/** Send a custom command to the server */
- void specialCustomCommand( QDataStream& );
+ void specialCustomCommand( TQDataStream& );
private:
// This method behaves like the above method but takes an already encoded url,
// so you don't have to call KURL::url() for every mail.
- void doListEntry (const QString & encodedUrl, int stretch, imapCache * cache = NULL,
+ void doListEntry (const TQString & encodedUrl, int stretch, imapCache * cache = NULL,
bool withFlags = FALSE, bool withSubject = FALSE);
- QString myHost, myUser, myPass, myAuth, myTLS;
+ TQString myHost, myUser, myPass, myAuth, myTLS;
int myPort;
bool mySSL;
bool relayEnabled, cacheOutput, decodeContent;
- QByteArray outputCache;
- QBuffer outputBuffer;
+ TQByteArray outputCache;
+ TQBuffer outputBuffer;
Q_ULONG outputBufferIndex;
KIO::filesize_t mProcessedSize;
char readBuffer[IMAP_BUFFER];
ssize_t readBufferLen;
int readSize;
- QDateTime mTimeOfLastNoop;
+ TQDateTime mTimeOfLastNoop;
};
#endif
diff --git a/kioslaves/imap4/imapcommand.cc b/kioslaves/imap4/imapcommand.cc
index e5eee776..ae26f0ab 100644
--- a/kioslaves/imap4/imapcommand.cc
+++ b/kioslaves/imap4/imapcommand.cc
@@ -43,8 +43,8 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <kprotocolmanager.h>
#include <ksock.h>
@@ -58,10 +58,10 @@
imapCommand::imapCommand ()
{
mComplete = false;
- mId = QString::null;
+ mId = TQString::null;
}
-imapCommand::imapCommand (const QString & command, const QString & parameter)
+imapCommand::imapCommand (const TQString & command, const TQString & parameter)
// aCommand(NULL),
// mResult(NULL),
// mParameter(NULL)
@@ -69,7 +69,7 @@ imapCommand::imapCommand (const QString & command, const QString & parameter)
mComplete = false;
aCommand = command;
aParameter = parameter;
- mId = QString::null;
+ mId = TQString::null;
}
bool
@@ -78,38 +78,38 @@ imapCommand::isComplete ()
return mComplete;
}
-const QString &
+const TQString &
imapCommand::result ()
{
return mResult;
}
-const QString &
+const TQString &
imapCommand::resultInfo ()
{
return mResultInfo;
}
-const QString &
+const TQString &
imapCommand::id ()
{
return mId;
}
-const QString &
+const TQString &
imapCommand::parameter ()
{
return aParameter;
}
-const QString &
+const TQString &
imapCommand::command ()
{
return aCommand;
}
void
-imapCommand::setId (const QString & id)
+imapCommand::setId (const TQString & id)
{
if (mId.isEmpty ())
mId = id;
@@ -122,25 +122,25 @@ imapCommand::setComplete ()
}
void
-imapCommand::setResult (const QString & result)
+imapCommand::setResult (const TQString & result)
{
mResult = result;
}
void
-imapCommand::setResultInfo (const QString & result)
+imapCommand::setResultInfo (const TQString & result)
{
mResultInfo = result;
}
void
-imapCommand::setCommand (const QString & command)
+imapCommand::setCommand (const TQString & command)
{
aCommand = command;
}
void
-imapCommand::setParameter (const QString & parameter)
+imapCommand::setParameter (const TQString & parameter)
{
aParameter = parameter;
}
@@ -161,16 +161,16 @@ imapCommand::clientNoop ()
}
imapCommand *
-imapCommand::clientFetch (ulong uid, const QString & fields, bool nouid)
+imapCommand::clientFetch (ulong uid, const TQString & fields, bool nouid)
{
return clientFetch (uid, uid, fields, nouid);
}
imapCommand *
-imapCommand::clientFetch (ulong fromUid, ulong toUid, const QString & fields,
+imapCommand::clientFetch (ulong fromUid, ulong toUid, const TQString & fields,
bool nouid)
{
- QString uid = QString::number(fromUid);
+ TQString uid = TQString::number(fromUid);
if (fromUid != toUid)
{
@@ -178,13 +178,13 @@ imapCommand::clientFetch (ulong fromUid, ulong toUid, const QString & fields,
if (toUid < fromUid)
uid += "*";
else
- uid += QString::number(toUid);
+ uid += TQString::number(toUid);
}
return clientFetch (uid, fields, nouid);
}
imapCommand *
-imapCommand::clientFetch (const QString & sequence, const QString & fields,
+imapCommand::clientFetch (const TQString & sequence, const TQString & fields,
bool nouid)
{
return new imapCommand (nouid ? "FETCH" : "UID FETCH",
@@ -192,23 +192,23 @@ imapCommand::clientFetch (const QString & sequence, const QString & fields,
}
imapCommand *
-imapCommand::clientList (const QString & reference, const QString & path,
+imapCommand::clientList (const TQString & reference, const TQString & path,
bool lsub)
{
return new imapCommand (lsub ? "LSUB" : "LIST",
- QString ("\"") + rfcDecoder::toIMAP (reference) +
+ TQString ("\"") + rfcDecoder::toIMAP (reference) +
"\" \"" + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientSelect (const QString & path, bool examine)
+imapCommand::clientSelect (const TQString & path, bool examine)
{
Q_UNUSED(examine);
/** @note We use always SELECT, because UW-IMAP doesn't check for new mail, when
used with the "mbox driver" and the folder is opened with EXAMINE
and Courier can't append to a mailbox that is in EXAMINE state */
return new imapCommand ("SELECT",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
@@ -218,7 +218,7 @@ imapCommand::clientClose()
}
imapCommand *
-imapCommand::clientCopy (const QString & box, const QString & sequence,
+imapCommand::clientCopy (const TQString & box, const TQString & sequence,
bool nouid)
{
return new imapCommand (nouid ? "COPY" : "UID COPY",
@@ -226,74 +226,74 @@ imapCommand::clientCopy (const QString & box, const QString & sequence,
}
imapCommand *
-imapCommand::clientAppend (const QString & box, const QString & flags,
+imapCommand::clientAppend (const TQString & box, const TQString & flags,
ulong size)
{
return new imapCommand ("APPEND",
"\"" + rfcDecoder::toIMAP (box) + "\" " +
((flags.isEmpty()) ? "" : ("(" + flags + ") ")) +
- "{" + QString::number(size) + "}");
+ "{" + TQString::number(size) + "}");
}
imapCommand *
-imapCommand::clientStatus (const QString & path, const QString & parameters)
+imapCommand::clientStatus (const TQString & path, const TQString & parameters)
{
return new imapCommand ("STATUS",
- QString ("\"") + rfcDecoder::toIMAP (path) +
+ TQString ("\"") + rfcDecoder::toIMAP (path) +
"\" (" + parameters + ")");
}
imapCommand *
-imapCommand::clientCreate (const QString & path)
+imapCommand::clientCreate (const TQString & path)
{
return new imapCommand ("CREATE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientDelete (const QString & path)
+imapCommand::clientDelete (const TQString & path)
{
return new imapCommand ("DELETE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientSubscribe (const QString & path)
+imapCommand::clientSubscribe (const TQString & path)
{
return new imapCommand ("SUBSCRIBE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientUnsubscribe (const QString & path)
+imapCommand::clientUnsubscribe (const TQString & path)
{
return new imapCommand ("UNSUBSCRIBE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
imapCommand::clientExpunge ()
{
- return new imapCommand ("EXPUNGE", QString (""));
+ return new imapCommand ("EXPUNGE", TQString (""));
}
imapCommand *
-imapCommand::clientRename (const QString & src, const QString & dest)
+imapCommand::clientRename (const TQString & src, const TQString & dest)
{
return new imapCommand ("RENAME",
- QString ("\"") + rfcDecoder::toIMAP (src) +
+ TQString ("\"") + rfcDecoder::toIMAP (src) +
"\" \"" + rfcDecoder::toIMAP (dest) + "\"");
}
imapCommand *
-imapCommand::clientSearch (const QString & search, bool nouid)
+imapCommand::clientSearch (const TQString & search, bool nouid)
{
return new imapCommand (nouid ? "SEARCH" : "UID SEARCH", search);
}
imapCommand *
-imapCommand::clientStore (const QString & set, const QString & item,
- const QString & data, bool nouid)
+imapCommand::clientStore (const TQString & set, const TQString & item,
+ const TQString & data, bool nouid)
{
return new imapCommand (nouid ? "STORE" : "UID STORE",
set + " " + item + " (" + data + ")");
@@ -312,50 +312,50 @@ imapCommand::clientStartTLS ()
}
imapCommand *
-imapCommand::clientSetACL( const QString& box, const QString& user, const QString& acl )
+imapCommand::clientSetACL( const TQString& box, const TQString& user, const TQString& acl )
{
- return new imapCommand ("SETACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("SETACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\" \"" + rfcDecoder::toIMAP (acl) + "\"");
}
imapCommand *
-imapCommand::clientDeleteACL( const QString& box, const QString& user )
+imapCommand::clientDeleteACL( const TQString& box, const TQString& user )
{
- return new imapCommand ("DELETEACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("DELETEACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\"");
}
imapCommand *
-imapCommand::clientGetACL( const QString& box )
+imapCommand::clientGetACL( const TQString& box )
{
- return new imapCommand ("GETACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("GETACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\"");
}
imapCommand *
-imapCommand::clientListRights( const QString& box, const QString& user )
+imapCommand::clientListRights( const TQString& box, const TQString& user )
{
- return new imapCommand ("LISTRIGHTS", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("LISTRIGHTS", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\"");
}
imapCommand *
-imapCommand::clientMyRights( const QString& box )
+imapCommand::clientMyRights( const TQString& box )
{
- return new imapCommand ("MYRIGHTS", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("MYRIGHTS", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\"");
}
imapCommand *
-imapCommand::clientSetAnnotation( const QString& box, const QString& entry, const QMap<QString, QString>& attributes )
+imapCommand::clientSetAnnotation( const TQString& box, const TQString& entry, const TQMap<TQString, TQString>& attributes )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box)
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (entry)
+ "\" (";
- for( QMap<QString,QString>::ConstIterator it = attributes.begin(); it != attributes.end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = attributes.begin(); it != attributes.end(); ++it ) {
parameter += "\"";
parameter += rfcDecoder::toIMAP (it.key());
parameter += "\" \"";
@@ -369,16 +369,16 @@ imapCommand::clientSetAnnotation( const QString& box, const QString& entry, cons
}
imapCommand *
-imapCommand::clientGetAnnotation( const QString& box, const QString& entry, const QStringList& attributeNames )
+imapCommand::clientGetAnnotation( const TQString& box, const TQString& entry, const TQStringList& attributeNames )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box)
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (entry)
+ "\" ";
if ( attributeNames.count() == 1 )
parameter += "\"" + rfcDecoder::toIMAP (attributeNames.first()) + '"';
else {
parameter += '(';
- for( QStringList::ConstIterator it = attributeNames.begin(); it != attributeNames.end(); ++it ) {
+ for( TQStringList::ConstIterator it = attributeNames.begin(); it != attributeNames.end(); ++it ) {
parameter += "\"" + rfcDecoder::toIMAP (*it) + "\" ";
}
// Turn last space into a ')'
@@ -394,14 +394,14 @@ imapCommand::clientNamespace()
}
imapCommand *
-imapCommand::clientGetQuotaroot( const QString& box )
+imapCommand::clientGetQuotaroot( const TQString& box )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box) + '"';
- return new imapCommand ("GETQUOTAROOT", parameter);
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box) + '"';
+ return new imapCommand ("GEQUOTAROOT", parameter);
}
imapCommand *
-imapCommand::clientCustom( const QString& command, const QString& arguments )
+imapCommand::clientCustom( const TQString& command, const TQString& arguments )
{
return new imapCommand (command, arguments);
}
diff --git a/kioslaves/imap4/imapcommand.h b/kioslaves/imap4/imapcommand.h
index f06c5af8..f91b9329 100644
--- a/kioslaves/imap4/imapcommand.h
+++ b/kioslaves/imap4/imapcommand.h
@@ -23,9 +23,9 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
/**
* @brief encapulate a IMAP command
@@ -43,13 +43,13 @@ public:
*/
imapCommand ();
/**
- * @fn imapCommand (const QString & command, const QString & parameter);
+ * @fn imapCommand (const TQString & command, const TQString & parameter);
* @brief Constructor
* @param command Imap command
* @param parameter Parameters to the command
* @return none
*/
- imapCommand (const QString & command, const QString & parameter);
+ imapCommand (const TQString & command, const TQString & parameter);
/**
* @fn bool isComplete ();
* @brief is it complete?
@@ -57,43 +57,43 @@ public:
*/
bool isComplete ();
/**
- * @fn const QString & result ();
+ * @fn const TQString & result ();
* @brief get the result of the command
* @return The result, i.e. first word of the result line, like OK
*/
- const QString & result ();
+ const TQString & result ();
/**
- * @fn const QString & resultInfo ();
+ * @fn const TQString & resultInfo ();
* @brief get information about the result
* @return Information about the result, i.e. the rest of the result line
*/
- const QString & resultInfo ();
+ const TQString & resultInfo ();
/**
- * @fn const QString & parameter ();
+ * @fn const TQString & parameter ();
* @brief get the parameter
* @return the parameter
*/
- const QString & parameter ();
+ const TQString & parameter ();
/**
- * @fn const QString & command ();
+ * @fn const TQString & command ();
* @brief get the command
* @return the command
*/
- const QString & command ();
+ const TQString & command ();
/**
- * @fn const QString & id ();
+ * @fn const TQString & id ();
* @brief get the id
* @return the id
*/
- const QString & id ();
+ const TQString & id ();
/**
- * @fn void setId (const QString &);
+ * @fn void setId (const TQString &);
* @brief set the id
* @param id the id used by the command
* @return none
*/
- void setId (const QString &);
+ void setId (const TQString &);
/**
* @fn void setComplete ();
* @brief set the completed state
@@ -101,42 +101,42 @@ public:
*/
void setComplete ();
/**
- * @fn void setResult (const QString &);
+ * @fn void setResult (const TQString &);
* @brief set the completed state
* @param result the command result
* @return none
*/
- void setResult (const QString &);
+ void setResult (const TQString &);
/**
- * @fn void setResultInfo (const QString &);
+ * @fn void setResultInfo (const TQString &);
* @brief set the completed state
* @param result the command result information
* @return none
*/
- void setResultInfo (const QString &);
+ void setResultInfo (const TQString &);
/**
- * @fn void setCommand (const QString &);
+ * @fn void setCommand (const TQString &);
* @brief set the command
* @param command the imap command
* @return none
*/
- void setCommand (const QString &);
+ void setCommand (const TQString &);
/**
- * @fn void setParameter (const QString &);
+ * @fn void setParameter (const TQString &);
* @brief set the command parameter(s)
* @param parameter the comand parameter(s)
* @return none
*/
- void setParameter (const QString &);
+ void setParameter (const TQString &);
/**
- * @fn const QString getStr ();
+ * @fn const TQString getStr ();
* @brief returns the data to send to the server
* The function returns the complete data to be sent to
* the server (\<id\> \<command\> [\<parameter\>])
* @return the data to send to the server
* @todo possibly rename function to be clear of it's purpose
*/
- const QString getStr ();
+ const TQString getStr ();
/**
* @fn static imapCommand *clientNoop ();
@@ -145,7 +145,7 @@ public:
*/
static imapCommand *clientNoop ();
/**
- * @fn static imapCommand *clientFetch (ulong uid, const QString & fields, bool nouid = false);
+ * @fn static imapCommand *clientFetch (ulong uid, const TQString & fields, bool nouid = false);
* @brief Create a FETCH command
* @param uid Uid of the message to fetch
* @param fields options to pass to the server
@@ -153,10 +153,10 @@ public:
* @return a FETCH imapCommand
* Fetch a single uid
*/
- static imapCommand *clientFetch (ulong uid, const QString & fields,
+ static imapCommand *clientFetch (ulong uid, const TQString & fields,
bool nouid = false);
/**
- * @fn static imapCommand *clientFetch (ulong fromUid, ulong toUid, const QString & fields, bool nouid = false);
+ * @fn static imapCommand *clientFetch (ulong fromUid, ulong toUid, const TQString & fields, bool nouid = false);
* @brief Create a FETCH command
* @param fromUid start uid of the messages to fetch
* @param toUid last uid of the messages to fetch
@@ -166,10 +166,10 @@ public:
* Fetch a range of uids
*/
static imapCommand *clientFetch (ulong fromUid, ulong toUid,
- const QString & fields, bool nouid =
+ const TQString & fields, bool nouid =
false);
/**
- * @fn static imapCommand *clientFetch (const QString & sequence, const QString & fields, bool nouid = false);
+ * @fn static imapCommand *clientFetch (const TQString & sequence, const TQString & fields, bool nouid = false);
* @brief Create a FETCH command
* @param sequence a IMAP FETCH sequence string
* @param fields options to pass to the server
@@ -178,27 +178,27 @@ public:
* Fetch a range of uids. The other clientFetch functions are just
* wrappers around this function.
*/
- static imapCommand *clientFetch (const QString & sequence,
- const QString & fields, bool nouid =
+ static imapCommand *clientFetch (const TQString & sequence,
+ const TQString & fields, bool nouid =
false);
/**
- * @fn static imapCommand *clientList (const QString & reference, const QString & path, bool lsub = false);
+ * @fn static imapCommand *clientList (const TQString & reference, const TQString & path, bool lsub = false);
* @brief Create a LIST command
* @param reference
* @param path The path to list
* @param lsub Perform a LIST or a LSUB command
* @return a LIST imapCommand
*/
- static imapCommand *clientList (const QString & reference,
- const QString & path, bool lsub = false);
+ static imapCommand *clientList (const TQString & reference,
+ const TQString & path, bool lsub = false);
/**
- * @fn static imapCommand *clientSelect (const QString & path, bool examine = false);
+ * @fn static imapCommand *clientSelect (const TQString & path, bool examine = false);
* @brief Create a SELECT command
* @param path The path to select
* @param lsub Perform a SELECT or a EXAMINE command
* @return a SELECT imapCommand
*/
- static imapCommand *clientSelect (const QString & path, bool examine =
+ static imapCommand *clientSelect (const TQString & path, bool examine =
false);
/**
* @fn static imapCommand *clientClose();
@@ -212,8 +212,8 @@ public:
* @param parameters
* @return a STATUS imapCommand
*/
- static imapCommand *clientStatus (const QString & path,
- const QString & parameters);
+ static imapCommand *clientStatus (const TQString & path,
+ const TQString & parameters);
/**
* @brief Create a COPY command
* @param box
@@ -221,8 +221,8 @@ public:
* @param nouid Perform a COPY or UID COPY command
* @return a COPY imapCommand
*/
- static imapCommand *clientCopy (const QString & box,
- const QString & sequence, bool nouid =
+ static imapCommand *clientCopy (const TQString & box,
+ const TQString & sequence, bool nouid =
false);
/**
* @brief Create a APPEND command
@@ -231,32 +231,32 @@ public:
* @param size
* @return a APPEND imapCommand
*/
- static imapCommand *clientAppend (const QString & box,
- const QString & flags, ulong size);
+ static imapCommand *clientAppend (const TQString & box,
+ const TQString & flags, ulong size);
/**
* @brief Create a CREATE command
* @param path
* @return a CREATE imapCommand
*/
- static imapCommand *clientCreate (const QString & path);
+ static imapCommand *clientCreate (const TQString & path);
/**
* @brief Create a DELETE command
* @param path
* @return a DELETE imapCommand
*/
- static imapCommand *clientDelete (const QString & path);
+ static imapCommand *clientDelete (const TQString & path);
/**
* @brief Create a SUBSCRIBE command
* @param path
* @return a SUBSCRIBE imapCommand
*/
- static imapCommand *clientSubscribe (const QString & path);
+ static imapCommand *clientSubscribe (const TQString & path);
/**
* @brief Create a UNSUBSCRIBE command
* @param path
* @return a UNSUBSCRIBE imapCommand
*/
- static imapCommand *clientUnsubscribe (const QString & path);
+ static imapCommand *clientUnsubscribe (const TQString & path);
/**
* @brief Create a EXPUNGE command
* @return a EXPUNGE imapCommand
@@ -268,15 +268,15 @@ public:
* @param dest Destination
* @return a RENAME imapCommand
*/
- static imapCommand *clientRename (const QString & src,
- const QString & dest);
+ static imapCommand *clientRename (const TQString & src,
+ const TQString & dest);
/**
* @brief Create a SEARCH command
* @param search
* @param nouid Perform a UID SEARCH or a SEARCH command
* @return a SEARCH imapCommand
*/
- static imapCommand *clientSearch (const QString & search, bool nouid =
+ static imapCommand *clientSearch (const TQString & search, bool nouid =
false);
/**
* @brief Create a STORE command
@@ -286,8 +286,8 @@ public:
* @param nouid Perform a UID STORE or a STORE command
* @return a STORE imapCommand
*/
- static imapCommand *clientStore (const QString & set, const QString & item,
- const QString & data, bool nouid = false);
+ static imapCommand *clientStore (const TQString & set, const TQString & item,
+ const TQString & data, bool nouid = false);
/**
* @brief Create a LOGOUT command
* @return a LOGOUT imapCommand
@@ -307,7 +307,7 @@ public:
* @param acl access right modification (starting with optional +/-)
* @return a SETACL imapCommand
*/
- static imapCommand *clientSetACL ( const QString& box, const QString& user, const QString& acl );
+ static imapCommand *clientSetACL ( const TQString& box, const TQString& user, const TQString& acl );
/**
* @brief Create a DELETEACL command
@@ -315,14 +315,14 @@ public:
* @param user authentication identifier
* @return a DELETEACL imapCommand
*/
- static imapCommand *clientDeleteACL ( const QString& box, const QString& user );
+ static imapCommand *clientDeleteACL ( const TQString& box, const TQString& user );
/**
* @brief Create a GETACL command
* @param box mailbox name
* @return a GETACL imapCommand
*/
- static imapCommand *clientGetACL ( const QString& box );
+ static imapCommand *clientGetACL ( const TQString& box );
/**
* @brief Create a LISTRIGHTS command
@@ -330,14 +330,14 @@ public:
* @param user authentication identifier
* @return a LISTRIGHTS imapCommand
*/
- static imapCommand *clientListRights ( const QString& box, const QString& user );
+ static imapCommand *clientListRights ( const TQString& box, const TQString& user );
/**
* @brief Create a MYRIGHTS command
* @param box mailbox name
* @return a MYRIGHTS imapCommand
*/
- static imapCommand *clientMyRights ( const QString& box );
+ static imapCommand *clientMyRights ( const TQString& box );
//////////// ANNOTATEMORE support /////////////
/**
@@ -347,7 +347,7 @@ public:
* @param attributes map of attribute names + values
* @return a SETANNOTATION imapCommand
*/
- static imapCommand *clientSetAnnotation ( const QString& box, const QString& entry, const QMap<QString, QString>& attributes );
+ static imapCommand *clientSetAnnotation ( const TQString& box, const TQString& entry, const TQMap<TQString, TQString>& attributes );
/**
* @brief Create a GETANNOTATION command
@@ -356,7 +356,7 @@ public:
* @param attributeNames attribute specifier
* @return a GETANNOTATION imapCommand
*/
- static imapCommand *clientGetAnnotation ( const QString& box, const QString& entry, const QStringList& attributeNames );
+ static imapCommand *clientGetAnnotation ( const TQString& box, const TQString& entry, const TQStringList& attributeNames );
/**
* @brief Create a NAMESPACE command
@@ -365,11 +365,11 @@ public:
static imapCommand *clientNamespace ();
/**
- * @brief Create a GETQUOTAROOT command
+ * @brief Create a GEQUOTAROOT command
* @param box mailbox name
- * @return a GETQUOTAROOT imapCommand
+ * @return a GEQUOTAROOT imapCommand
*/
- static imapCommand *clientGetQuotaroot ( const QString& box );
+ static imapCommand *clientGetQuotaroot ( const TQString& box );
/**
* @brief Create a custom command
@@ -377,15 +377,15 @@ public:
* @param arguments The custom arguments
* @return a custom imapCommand
*/
- static imapCommand *clientCustom ( const QString& command, const QString& arguments );
+ static imapCommand *clientCustom ( const TQString& command, const TQString& arguments );
protected:
- QString aCommand;
- QString mId;
+ TQString aCommand;
+ TQString mId;
bool mComplete;
- QString aParameter;
- QString mResult;
- QString mResultInfo;
+ TQString aParameter;
+ TQString mResult;
+ TQString mResultInfo;
private:
imapCommand & operator = (const imapCommand &);
diff --git a/kioslaves/imap4/imapinfo.cc b/kioslaves/imap4/imapinfo.cc
index d06618d7..4d1fc805 100644
--- a/kioslaves/imap4/imapinfo.cc
+++ b/kioslaves/imap4/imapinfo.cc
@@ -107,7 +107,7 @@ imapInfo & imapInfo::operator = (const imapInfo & mi)
return *this;
}
-imapInfo::imapInfo (const QStringList & list):count_ (0),
+imapInfo::imapInfo (const TQStringList & list):count_ (0),
recent_ (0),
unseen_ (0),
uidValidity_ (0),
@@ -123,12 +123,12 @@ uidNextAvailable_ (false),
flagsAvailable_ (false),
permanentFlagsAvailable_ (false), readWriteAvailable_ (false)
{
- for (QStringList::ConstIterator it (list.begin ()); it != list.end (); ++it)
+ for (TQStringList::ConstIterator it (list.begin ()); it != list.end (); ++it)
{
- QString line (*it);
+ TQString line (*it);
line.truncate(line.length() - 2);
- QStringList tokens(QStringList::split (' ', line));
+ TQStringList tokens(TQStringList::split (' ', line));
kdDebug(7116) << "Processing: " << line << endl;
if (tokens[0] != "*")
@@ -191,7 +191,7 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false)
}
-ulong imapInfo::_flags (const QCString & inFlags)
+ulong imapInfo::_flags (const TQCString & inFlags)
{
ulong flags = 0;
parseString flagsString;
@@ -202,7 +202,7 @@ ulong imapInfo::_flags (const QCString & inFlags)
while (!flagsString.isEmpty () && flagsString[0] != ')')
{
- QCString entry = imapParser::parseOneWordC(flagsString).upper();
+ TQCString entry = imapParser::parseOneWordC(flagsString).upper();
if (entry.isEmpty ())
flagsString.clear();
diff --git a/kioslaves/imap4/imapinfo.h b/kioslaves/imap4/imapinfo.h
index 068e6db5..73505449 100644
--- a/kioslaves/imap4/imapinfo.h
+++ b/kioslaves/imap4/imapinfo.h
@@ -23,8 +23,8 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
//class handling the info we get on EXAMINE and SELECT
class imapInfo
@@ -50,11 +50,11 @@ public:
imapInfo ();
- imapInfo (const QStringList &);
+ imapInfo (const TQStringList &);
imapInfo (const imapInfo &);
imapInfo & operator = (const imapInfo &);
- static ulong _flags (const QCString &);
+ static ulong _flags (const TQCString &);
void setCount (ulong l)
{
@@ -92,7 +92,7 @@ public:
flags_ = l;
}
- void setFlags (const QCString & inFlag)
+ void setFlags (const TQCString & inFlag)
{
flagsAvailable_ = true;
flags_ = _flags (inFlag);
@@ -104,7 +104,7 @@ public:
permanentFlags_ = l;
}
- void setPermanentFlags (const QCString & inFlag)
+ void setPermanentFlags (const TQCString & inFlag)
{
permanentFlagsAvailable_ = true;
permanentFlags_ = _flags (inFlag);
@@ -201,14 +201,14 @@ public:
return readWriteAvailable_;
}
- QCString alert() const
+ TQCString alert() const
{
return alert_;
}
private:
- QCString alert_;
+ TQCString alert_;
ulong count_;
ulong recent_;
diff --git a/kioslaves/imap4/imaplist.cc b/kioslaves/imap4/imaplist.cc
index 6054535c..b15c821d 100644
--- a/kioslaves/imap4/imaplist.cc
+++ b/kioslaves/imap4/imaplist.cc
@@ -81,7 +81,7 @@ imapList & imapList::operator = (const imapList & lr)
return *this;
}
-imapList::imapList (const QString & inStr, imapParser &parser)
+imapList::imapList (const TQString & inStr, imapParser &parser)
: parser_(&parser),
noInferiors_ (false),
noSelect_ (false),
@@ -103,13 +103,13 @@ hasNoChildren_ (false)
hierarchyDelimiter_ = parser_->parseOneWordC(s);
if (hierarchyDelimiter_ == "NIL")
- hierarchyDelimiter_ = QString::null;
+ hierarchyDelimiter_ = TQString::null;
name_ = rfcDecoder::fromIMAP (parser_->parseLiteral (s)); // decode modified UTF7
}
void imapList::parseAttributes( parseString & str )
{
- QCString attribute, orig;
+ TQCString attribute, orig;
while ( !str.isEmpty () && str[0] != ')' )
{
diff --git a/kioslaves/imap4/imaplist.h b/kioslaves/imap4/imaplist.h
index 5945011f..9aa01f78 100644
--- a/kioslaves/imap4/imaplist.h
+++ b/kioslaves/imap4/imaplist.h
@@ -23,8 +23,8 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
class parseString;
class imapParser;
@@ -35,7 +35,7 @@ class imapList
public:
imapList ();
- imapList (const QString &, imapParser &);
+ imapList (const TQString &, imapParser &);
imapList (const imapList &);
imapList & operator = (const imapList &);
@@ -43,25 +43,25 @@ public:
void parseAttributes( parseString & );
// return all atributes concatenated
- QString attributesAsString() const
+ TQString attributesAsString() const
{
return attributes_.join(",");
}
- QString hierarchyDelimiter () const
+ TQString hierarchyDelimiter () const
{
return hierarchyDelimiter_;
}
- void setHierarchyDelimiter (const QString & _str)
+ void setHierarchyDelimiter (const TQString & _str)
{
hierarchyDelimiter_ = _str;
}
- QString name () const
+ TQString name () const
{
return name_;
}
- void setName (const QString & _str)
+ void setName (const TQString & _str)
{
name_ = _str;
}
@@ -123,15 +123,15 @@ public:
private:
imapParser* parser_;
- QString hierarchyDelimiter_;
- QString name_;
+ TQString hierarchyDelimiter_;
+ TQString name_;
bool noInferiors_;
bool noSelect_;
bool marked_;
bool unmarked_;
bool hasChildren_;
bool hasNoChildren_;
- QStringList attributes_;
+ TQStringList attributes_;
};
#endif
diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc
index cf3465a4..e4294bd0 100644
--- a/kioslaves/imap4/imapparser.cc
+++ b/kioslaves/imap4/imapparser.cc
@@ -47,10 +47,10 @@ extern "C" {
}
#endif
-#include <qregexp.h>
-#include <qbuffer.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -103,11 +103,11 @@ imapParser::doCommand (imapCommand * aCmd)
imapCommand *
imapParser::sendCommand (imapCommand * aCmd)
{
- aCmd->setId (QString::number(commandCounter++));
+ aCmd->setId (TQString::number(commandCounter++));
sentQueue.append (aCmd);
continuation.resize(0);
- const QString& command = aCmd->command();
+ const TQString& command = aCmd->command();
if (command == "SELECT" || command == "EXAMINE")
{
@@ -120,7 +120,7 @@ imapParser::sendCommand (imapCommand * aCmd)
else if (command == "CLOSE")
{
// we no longer have a box open
- currentBox = QString::null;
+ currentBox = TQString::null;
}
else if (command.find ("SEARCH") != -1
|| command == "GETACL"
@@ -128,8 +128,8 @@ imapParser::sendCommand (imapCommand * aCmd)
|| command == "MYRIGHTS"
|| command == "GETANNOTATION"
|| command == "NAMESPACE"
- || command == "GETQUOTAROOT"
- || command == "GETQUOTA"
+ || command == "GEQUOTAROOT"
+ || command == "GEQUOTA"
|| command == "X-GET-OTHER-USERS"
|| command == "X-GET-DELEGATES"
|| command == "X-GET-OUT-OF-OFFICE")
@@ -146,8 +146,8 @@ imapParser::sendCommand (imapCommand * aCmd)
}
bool
-imapParser::clientLogin (const QString & aUser, const QString & aPass,
- QString & resultInfo)
+imapParser::clientLogin (const TQString & aUser, const TQString & aPass,
+ TQString & resultInfo)
{
imapCommand *cmd;
bool retVal = false;
@@ -216,7 +216,7 @@ static bool sasl_interact( KIO::SlaveBase *slave, KIO::AuthInfo &ai, void *in )
bool
imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
- const QString & aFQDN, const QString & aAuth, bool isSSL, QString & resultInfo)
+ const TQString & aFQDN, const TQString & aAuth, bool isSSL, TQString & resultInfo)
{
bool retVal = false;
#ifdef HAVE_LIBSASL2
@@ -226,7 +226,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
const char *out = 0;
uint outlen = 0;
const char *mechusing = 0;
- QByteArray tmp, challenge;
+ TQByteArray tmp, challenge;
kdDebug(7116) << "aAuth: " << aAuth << " FQDN: " << aFQDN << " isSSL: " << isSSL << endl;
@@ -242,7 +242,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_OK ) {
kdDebug(7116) << "sasl_client_new failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
return false;
}
@@ -260,7 +260,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_CONTINUE && result != SASL_OK ) {
kdDebug(7116) << "sasl_client_start failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
sasl_dispose( &conn );
return false;
}
@@ -270,10 +270,10 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
// then lets try it
- QString firstCommand = aAuth;
+ TQString firstCommand = aAuth;
if ( !challenge.isEmpty() ) {
firstCommand += " ";
- firstCommand += QString::fromLatin1( challenge.data(), challenge.size() );
+ firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() );
}
cmd = sendCommand (new imapCommand ("AUTHENTICATE", firstCommand.latin1()));
@@ -285,11 +285,11 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if (!continuation.isEmpty())
{
-// kdDebug(7116) << "S: " << QCString(continuation.data(),continuation.size()+1) << endl;
+// kdDebug(7116) << "S: " << TQCString(continuation.data(),continuation.size()+1) << endl;
if ( continuation.size() > 4 ) {
tmp.setRawData( continuation.data() + 2, continuation.size() - 4 );
KCodecs::base64Decode( tmp, challenge );
-// kdDebug(7116) << "S-1: " << QCString(challenge.data(),challenge.size()+1) << endl;
+// kdDebug(7116) << "S-1: " << TQCString(challenge.data(),challenge.size()+1) << endl;
tmp.resetRawData( continuation.data() + 2, continuation.size() - 4 );
}
@@ -309,16 +309,16 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_CONTINUE && result != SASL_OK ) {
kdDebug(7116) << "sasl_client_step failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
sasl_dispose( &conn );
return false;
}
tmp.setRawData( out, outlen );
-// kdDebug(7116) << "C-1: " << QCString(tmp.data(),tmp.size()+1) << endl;
+// kdDebug(7116) << "C-1: " << TQCString(tmp.data(),tmp.size()+1) << endl;
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
-// kdDebug(7116) << "C: " << QCString(challenge.data(),challenge.size()+1) << endl;
+// kdDebug(7116) << "C: " << TQCString(challenge.data(),challenge.size()+1) << endl;
parseWriteLine (challenge);
continuation.resize(0);
}
@@ -343,7 +343,7 @@ imapParser::parseUntagged (parseString & result)
//kdDebug(7116) << "imapParser::parseUntagged - '" << result.cstr() << "'" << endl;
parseOneWordC(result); // *
- QByteArray what = parseLiteral (result); // see whats coming next
+ TQByteArray what = parseLiteral (result); // see whats coming next
switch (what[0])
{
@@ -478,7 +478,7 @@ imapParser::parseUntagged (parseString & result)
ulong number;
bool valid;
- number = QCString(what, what.size() + 1).toUInt(&valid);
+ number = TQCString(what, what.size() + 1).toUInt(&valid);
if (valid)
{
what = parseLiteral (result);
@@ -498,7 +498,7 @@ imapParser::parseUntagged (parseString & result)
case 'F':
if (qstrncmp(what, "FETCH", what.size()) == 0)
{
- seenUid = QString::null;
+ seenUid = TQString::null;
parseFetch (number, result);
}
break;
@@ -506,7 +506,7 @@ imapParser::parseUntagged (parseString & result)
case 'S':
if (qstrncmp(what, "STORE", what.size()) == 0) // deprecated store
{
- seenUid = QString::null;
+ seenUid = TQString::null;
parseFetch (number, result);
}
break;
@@ -528,8 +528,8 @@ imapParser::parseUntagged (parseString & result)
void
-imapParser::parseResult (QByteArray & result, parseString & rest,
- const QString & command)
+imapParser::parseResult (TQByteArray & result, parseString & rest,
+ const TQString & command)
{
if (command == "SELECT")
selectInfo.setReadWrite(true);
@@ -537,7 +537,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
if (rest[0] == '[')
{
rest.pos++;
- QCString option = parseOneWordC(rest, TRUE);
+ TQCString option = parseOneWordC(rest, TRUE);
switch (option[0])
{
@@ -564,7 +564,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
else if (option == "PERMANENTFLAGS")
{
uint end = rest.data.find(']', rest.pos);
- QCString flags(rest.data.data() + rest.pos, end - rest.pos);
+ TQCString flags(rest.data.data() + rest.pos, end - rest.pos);
selectInfo.setPermanentFlags (flags);
rest.pos = end;
}
@@ -645,7 +645,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
{
if (currentState == ISTATE_SELECT)
currentState = ISTATE_LOGIN;
- currentBox = QString::null;
+ currentBox = TQString::null;
}
kdDebug(7116) << "imapParser::parseResult - current box is now " << currentBox << endl;
}
@@ -660,7 +660,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
{
if (currentState == ISTATE_SELECT)
currentState = ISTATE_LOGIN;
- currentBox = QString::null;
+ currentBox = TQString::null;
}
kdDebug(7116) << "imapParser::parseResult - current box is now " << currentBox << endl;
}
@@ -674,8 +674,8 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
void imapParser::parseCapability (parseString & result)
{
- QCString temp( result.cstr() );
- imapCapabilities = QStringList::split ( ' ', KPIM::kAsciiToLower( temp.data() ) );
+ TQCString temp( result.cstr() );
+ imapCapabilities = TQStringList::split ( ' ', KPIM::kAsciiToLower( temp.data() ) );
}
void imapParser::parseFlags (parseString & result)
@@ -715,7 +715,7 @@ void imapParser::parseListRights (parseString & result)
parseOneWordC (result); // skip user id
int outlen = 1;
while ( outlen ) {
- QCString word = parseOneWordC (result, false, &outlen);
+ TQCString word = parseOneWordC (result, false, &outlen);
lastResults.append (word);
}
}
@@ -726,7 +726,7 @@ void imapParser::parseAcl (parseString & result)
int outlen = 1;
// The result is user1 perm1 user2 perm2 etc. The caller will sort it out.
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append (word);
}
}
@@ -744,7 +744,7 @@ void imapParser::parseAnnotation (parseString & result)
int outlen = 1;
// The result is name1 value1 name2 value2 etc. The caller will sort it out.
while ( outlen && !result.isEmpty() && result[0] != ')' ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append (word);
}
}
@@ -755,7 +755,7 @@ void imapParser::parseQuota (parseString & result)
// quota_response ::= "QUOTA" SP astring SP quota_list
// quota_list ::= "(" #quota_resource ")"
// quota_resource ::= atom SP number SP number
- QCString root = parseOneWordC( result );
+ TQCString root = parseOneWordC( result );
if ( root.isEmpty() ) {
lastResults.append( "" );
} else {
@@ -765,10 +765,10 @@ void imapParser::parseQuota (parseString & result)
return;
result.pos++;
skipWS (result);
- QStringList triplet;
+ TQStringList triplet;
int outlen = 1;
while ( outlen && !result.isEmpty() && result[0] != ')' ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
triplet.append(word);
}
lastResults.append( triplet.join(" ") );
@@ -782,10 +782,10 @@ void imapParser::parseQuotaRoot (parseString & result)
skipWS (result);
if ( result.isEmpty() )
return;
- QStringList roots;
+ TQStringList roots;
int outlen = 1;
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
roots.append (word);
}
lastResults.append( roots.isEmpty()? "" : roots.join(" ") );
@@ -794,7 +794,7 @@ void imapParser::parseQuotaRoot (parseString & result)
void imapParser::parseCustom (parseString & result)
{
int outlen = 1;
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append( word );
}
@@ -805,12 +805,12 @@ void imapParser::parseOtherUser (parseString & result)
void imapParser::parseDelegate (parseString & result)
{
- const QString email = parseOneWordC( result );
+ const TQString email = parseOneWordC( result );
- QStringList rights;
+ TQStringList rights;
int outlen = 1;
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC( result, false, false, &outlen );
+ TQCString word = parseLiteralC( result, false, false, &outlen );
rights.append( word );
}
@@ -819,13 +819,13 @@ void imapParser::parseDelegate (parseString & result)
void imapParser::parseOutOfOffice (parseString & result)
{
- const QString state = parseOneWordC (result);
+ const TQString state = parseOneWordC (result);
parseOneWordC (result); // skip encoding
int outlen = 1;
- QCString msg = parseLiteralC (result, false, false, &outlen);
+ TQCString msg = parseLiteralC (result, false, false, &outlen);
- lastResults.append( state + "^" + QString::fromUtf8( msg ) );
+ lastResults.append( state + "^" + TQString::fromUtf8( msg ) );
}
void imapParser::parseMyRights (parseString & result)
@@ -841,7 +841,7 @@ void imapParser::parseSearch (parseString & result)
while (parseOneNumber (result, value))
{
- lastResults.append (QString::number(value));
+ lastResults.append (TQString::number(value));
}
}
@@ -860,7 +860,7 @@ void imapParser::parseStatus (parseString & inWords)
{
ulong value;
- QCString label = parseOneWordC(inWords);
+ TQCString label = parseOneWordC(inWords);
if (parseOneNumber (inWords, value))
{
if (label == "MESSAGES")
@@ -893,7 +893,7 @@ void imapParser::parseExpunge (ulong value, parseString & result)
Q_UNUSED(result);
}
-void imapParser::parseAddressList (parseString & inWords, QPtrList<mailAddress>& list)
+void imapParser::parseAddressList (parseString & inWords, TQPtrList<mailAddress>& list)
{
if (inWords.isEmpty())
return;
@@ -957,7 +957,7 @@ mailHeader * imapParser::parseEnvelope (parseString & inWords)
//subject
envelope->setSubject(parseLiteralC(inWords));
- QPtrList<mailAddress> list;
+ TQPtrList<mailAddress> list;
list.setAutoDelete(true);
//from
@@ -1015,10 +1015,10 @@ mailHeader * imapParser::parseEnvelope (parseString & inWords)
// parse parameter pairs into a dictionary
// caller must clean up the dictionary items
-QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
+TQAsciiDict < TQString > imapParser::parseDisposition (parseString & inWords)
{
- QCString disposition;
- QAsciiDict < QString > retVal (17, false);
+ TQCString disposition;
+ TQAsciiDict < TQString > retVal (17, false);
// return value is a shallow copy
retVal.setAutoDelete (false);
@@ -1044,7 +1044,7 @@ QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
if (!disposition.isEmpty ())
{
- retVal.insert ("content-disposition", new QString(disposition));
+ retVal.insert ("content-disposition", new TQString(disposition));
}
return retVal;
@@ -1052,9 +1052,9 @@ QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
// parse parameter pairs into a dictionary
// caller must clean up the dictionary items
-QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
+TQAsciiDict < TQString > imapParser::parseParameters (parseString & inWords)
{
- QAsciiDict < QString > retVal (17, false);
+ TQAsciiDict < TQString > retVal (17, false);
// return value is a shallow copy
retVal.setAutoDelete (false);
@@ -1071,9 +1071,9 @@ QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
while (!inWords.isEmpty () && inWords[0] != ')')
{
- QCString l1 = parseLiteralC(inWords);
- QCString l2 = parseLiteralC(inWords);
- retVal.insert (l1, new QString(l2));
+ TQCString l1 = parseLiteralC(inWords);
+ TQCString l2 = parseLiteralC(inWords);
+ retVal.insert (l1, new TQString(l2));
}
if (inWords[0] != ')')
@@ -1086,11 +1086,11 @@ QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
}
mimeHeader * imapParser::parseSimplePart (parseString & inWords,
- QString & inSection, mimeHeader * localPart)
+ TQString & inSection, mimeHeader * localPart)
{
- QCString subtype;
- QCString typeStr;
- QAsciiDict < QString > parameters (17, false);
+ TQCString subtype;
+ TQCString typeStr;
+ TQAsciiDict < TQString > parameters (17, false);
ulong size;
parameters.setAutoDelete (true);
@@ -1117,7 +1117,7 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
//body parameter parenthesized list
parameters = parseParameters (inWords);
{
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
@@ -1170,12 +1170,12 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
// body disposition
parameters = parseDisposition (inWords);
{
- QString *disposition = parameters["content-disposition"];
+ TQString *disposition = parameters["content-disposition"];
if (disposition)
localPart->setDisposition (disposition->ascii ());
parameters.remove ("content-disposition");
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
localPart->setDispositionParm (it.currentKey (),
@@ -1207,7 +1207,7 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
}
mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
- QString & inSection, mimeHeader * localPart)
+ TQString & inSection, mimeHeader * localPart)
{
bool init = false;
if (inSection.isEmpty())
@@ -1230,9 +1230,9 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
if (inWords[0] == '(')
{
- QByteArray subtype;
- QAsciiDict < QString > parameters (17, false);
- QString outSection;
+ TQByteArray subtype;
+ TQAsciiDict < TQString > parameters (17, false);
+ TQString outSection;
parameters.setAutoDelete (true);
if (!localPart)
localPart = new mimeHeader;
@@ -1258,7 +1258,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// is multipart (otherwise its a simplepart and handled later)
while (inWords[0] == '(')
{
- outSection = QString::number(++section);
+ outSection = TQString::number(++section);
if (!init)
outSection = inSection + "." + outSection;
mimeHeader *subpart = parseBodyStructure (inWords, outSection, 0);
@@ -1273,7 +1273,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// fetch parameters
parameters = parseParameters (inWords);
{
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
@@ -1286,12 +1286,12 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// body disposition
parameters = parseDisposition (inWords);
{
- QString *disposition = parameters["content-disposition"];
+ TQString *disposition = parameters["content-disposition"];
if (disposition)
localPart->setDisposition (disposition->ascii ());
parameters.remove ("content-disposition");
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
localPart->setDispositionParm (it.currentKey (),
@@ -1339,8 +1339,8 @@ void imapParser::parseBody (parseString & inWords)
// see if we got a part specifier
if (inWords[0] == '[')
{
- QCString specifier;
- QCString label;
+ TQCString specifier;
+ TQCString label;
inWords.pos++;
specifier = parseOneWordC (inWords, TRUE);
@@ -1378,7 +1378,7 @@ void imapParser::parseBody (parseString & inWords)
{
kdDebug(7116) << "imapParser::parseBody - reading " << envelope << " " << seenUid.ascii () << endl;
// fill it up with data
- QString theHeader = parseLiteralC(inWords, true);
+ TQString theHeader = parseLiteralC(inWords, true);
mimeIOQString myIO;
myIO.setString (theHeader);
@@ -1390,7 +1390,7 @@ void imapParser::parseBody (parseString & inWords)
{
// BODY[HEADER.FIELDS (References)] {n}
//kdDebug(7116) << "imapParser::parseBody - HEADER.FIELDS: "
- // << QCString(label.data(), label.size()+1) << endl;
+ // << TQCString(label.data(), label.size()+1) << endl;
if (label == "REFERENCES")
{
mailHeader *envelope = 0;
@@ -1405,7 +1405,7 @@ void imapParser::parseBody (parseString & inWords)
}
else
{
- QCString references = parseLiteralC(inWords, true);
+ TQCString references = parseLiteralC(inWords, true);
int start = references.find ('<');
int end = references.findRev ('>');
if (start < end)
@@ -1423,7 +1423,7 @@ void imapParser::parseBody (parseString & inWords)
if (specifier.find(".MIME") != -1)
{
mailHeader *envelope = new mailHeader;
- QString theHeader = parseLiteralC(inWords, false);
+ TQString theHeader = parseLiteralC(inWords, false);
mimeIOQString myIO;
myIO.setString (theHeader);
envelope->parseHeader (myIO);
@@ -1453,7 +1453,7 @@ void imapParser::parseBody (parseString & inWords)
{
kdDebug(7116) << "imapParser::parseBody - reading " << envelope << " " << seenUid.ascii () << endl;
// fill it up with data
- QString section;
+ TQString section;
mimeHeader *body = parseBodyStructure (inWords, section, envelope);
if (body != envelope)
delete body;
@@ -1477,7 +1477,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
parseSentence (inWords);
else
{
- QCString word = parseLiteralC(inWords, false, true);
+ TQCString word = parseLiteralC(inWords, false, true);
switch (word[0])
{
@@ -1528,11 +1528,11 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
envelope = lastHandled->getHeader ();
// fill it up with data
- QString section;
+ TQString section;
mimeHeader *body =
parseBodyStructure (inWords, section, envelope);
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
if (body) body->serialize(stream);
parseRelay(data);
@@ -1583,7 +1583,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
case 'I':
if (word == "INTERNALDATE")
{
- QCString date = parseOneWordC(inWords);
+ TQCString date = parseOneWordC(inWords);
if (!lastHandled) lastHandled = new imapCache();
lastHandled->setDate(date);
}
@@ -1674,9 +1674,9 @@ void imapParser::parseNamespace (parseString & result)
if ( result[0] != '(' )
return;
- QString delimEmpty;
- if ( namespaceToDelimiter.contains( QString::null ) )
- delimEmpty = namespaceToDelimiter[QString::null];
+ TQString delimEmpty;
+ if ( namespaceToDelimiter.contains( TQString::null ) )
+ delimEmpty = namespaceToDelimiter[TQString::null];
namespaceToDelimiter.clear();
imapNamespaces.clear();
@@ -1696,9 +1696,9 @@ void imapParser::parseNamespace (parseString & result)
++ns;
}
// namespace prefix
- QCString prefix = parseOneWordC( result );
+ TQCString prefix = parseOneWordC( result );
// delimiter
- QCString delim = parseOneWordC( result );
+ TQCString delim = parseOneWordC( result );
kdDebug(7116) << "imapParser::parseNamespace ns='" << prefix <<
"',delim='" << delim << "'" << endl;
if ( ns == 0 )
@@ -1706,8 +1706,8 @@ void imapParser::parseNamespace (parseString & result)
// at least one personal ns
personalAvailable = true;
}
- QString nsentry = QString::number( ns ) + "=" + QString(prefix) +
- "=" + QString(delim);
+ TQString nsentry = TQString::number( ns ) + "=" + TQString(prefix) +
+ "=" + TQString(delim);
imapNamespaces.append( nsentry );
if ( prefix.right( 1 ) == delim ) {
// strip delimiter to get a correct entry for comparisons
@@ -1733,12 +1733,12 @@ void imapParser::parseNamespace (parseString & result)
}
if ( !delimEmpty.isEmpty() ) {
// remember default delimiter
- namespaceToDelimiter[QString::null] = delimEmpty;
+ namespaceToDelimiter[TQString::null] = delimEmpty;
if ( !personalAvailable )
{
// at least one personal ns would be nice
kdDebug(7116) << "imapParser::parseNamespace - registering own personal ns" << endl;
- QString nsentry = "0==" + delimEmpty;
+ TQString nsentry = "0==" + delimEmpty;
imapNamespaces.append( nsentry );
}
}
@@ -1774,11 +1774,11 @@ int imapParser::parseLoop ()
break;
default:
{
- QCString tag = parseLiteralC(result);
+ TQCString tag = parseLiteralC(result);
if (current->id() == tag.data())
{
result.data.resize(result.data.size() - 2); // tie off CRLF
- QByteArray resultCode = parseLiteral (result); //the result
+ TQByteArray resultCode = parseLiteral (result); //the result
current->setResult (resultCode);
current->setResultInfo(result.cstr());
current->setComplete ();
@@ -1791,7 +1791,7 @@ int imapParser::parseLoop ()
else
{
kdDebug(7116) << "imapParser::parseLoop - unknown tag '" << tag << "'" << endl;
- QCString cstr = tag + " " + result.cstr();
+ TQCString cstr = tag + " " + result.cstr();
result.data = cstr;
result.pos = 0;
result.data.resize(cstr.length());
@@ -1805,7 +1805,7 @@ int imapParser::parseLoop ()
}
void
-imapParser::parseRelay (const QByteArray & buffer)
+imapParser::parseRelay (const TQByteArray & buffer)
{
Q_UNUSED(buffer);
qWarning
@@ -1820,7 +1820,7 @@ imapParser::parseRelay (ulong len)
("imapParser::parseRelay - virtual function not reimplemented - announcement lost");
}
-bool imapParser::parseRead (QByteArray & buffer, ulong len, ulong relay)
+bool imapParser::parseRead (TQByteArray & buffer, ulong len, ulong relay)
{
Q_UNUSED(buffer);
Q_UNUSED(len);
@@ -1830,7 +1830,7 @@ bool imapParser::parseRead (QByteArray & buffer, ulong len, ulong relay)
return FALSE;
}
-bool imapParser::parseReadLine (QByteArray & buffer, ulong relay)
+bool imapParser::parseReadLine (TQByteArray & buffer, ulong relay)
{
Q_UNUSED(buffer);
Q_UNUSED(relay);
@@ -1840,7 +1840,7 @@ bool imapParser::parseReadLine (QByteArray & buffer, ulong relay)
}
void
-imapParser::parseWriteLine (const QString & str)
+imapParser::parseWriteLine (const TQString & str)
{
Q_UNUSED(str);
qWarning
@@ -1848,25 +1848,25 @@ imapParser::parseWriteLine (const QString & str)
}
void
-imapParser::parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity, QString & _info)
+imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity, TQString & _info)
{
- QStringList parameters;
+ TQStringList parameters;
_box = _url.path ();
kdDebug(7116) << "imapParser::parseURL " << _box << endl;
int paramStart = _box.find("/;");
if ( paramStart > -1 )
{
- QString paramString = _box.right( _box.length() - paramStart-2 );
- parameters = QStringList::split (';', paramString); //split parameters
+ TQString paramString = _box.right( _box.length() - paramStart-2 );
+ parameters = TQStringList::split (';', paramString); //split parameters
_box.truncate( paramStart ); // strip parameters
}
// extract parameters
- for (QStringList::ConstIterator it (parameters.begin ());
+ for (TQStringList::ConstIterator it (parameters.begin ());
it != parameters.end (); ++it)
{
- QString temp = (*it);
+ TQString temp = (*it);
int pt = temp.find ('/');
if (pt > 0)
@@ -1906,17 +1906,17 @@ imapParser::parseURL (const KURL & _url, QString & _box, QString & _section,
}
-QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopAtBracket, int *outlen) {
+TQCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopAtBracket, int *outlen) {
if (!inWords.isEmpty() && inWords[0] == '{')
{
- QCString retVal;
+ TQCString retVal;
ulong runLen = inWords.find ('}', 1);
if (runLen > 0)
{
bool proper;
ulong runLenSave = runLen + 1;
- QCString tmpstr(runLen);
+ TQCString tmpstr(runLen);
inWords.takeMidNoResize(tmpstr, 1, runLen - 1);
runLen = tmpstr.toULong (&proper);
inWords.pos += runLenSave;
@@ -1925,7 +1925,7 @@ QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopA
//now get the literal from the server
if (relay)
parseRelay (runLen);
- QByteArray rv;
+ TQByteArray rv;
parseRead (rv, runLen, relay ? runLen : 0);
rv.resize(QMAX(runLen, rv.size())); // what's the point?
retVal = b2c(rv);
@@ -1956,12 +1956,12 @@ QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopA
}
// does not know about literals ( {7} literal )
-QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, int *outLen)
+TQCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, int *outLen)
{
uint retValSize = 0;
uint len = inWords.length();
if (len == 0) {
- return QCString();
+ return TQCString();
}
if (len > 0 && inWords[0] == '"')
@@ -1976,7 +1976,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
}
if (i < len)
{
- QCString retVal(i);
+ TQCString retVal(i);
inWords.pos++;
inWords.takeLeftNoResize(retVal, i - 1);
len = i - 1;
@@ -2000,7 +2000,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
else
{
kdDebug(7116) << "imapParser::parseOneWord - error parsing unmatched \"" << endl;
- QCString retVal = inWords.cstr();
+ TQCString retVal = inWords.cstr();
retValSize = len;
inWords.clear();
if (outLen) {
@@ -2021,7 +2021,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
break;
}
- QCString retVal(i+1);
+ TQCString retVal(i+1);
inWords.takeLeftNoResize(retVal, i);
retValSize = i;
inWords.pos += i;
@@ -2045,11 +2045,11 @@ bool imapParser::parseOneNumber (parseString & inWords, ulong & num)
return valid;
}
-bool imapParser::hasCapability (const QString & cap)
+bool imapParser::hasCapability (const TQString & cap)
{
- QString c = cap.lower();
+ TQString c = cap.lower();
// kdDebug(7116) << "imapParser::hasCapability - Looking for '" << cap << "'" << endl;
- for (QStringList::ConstIterator it = imapCapabilities.begin ();
+ for (TQStringList::ConstIterator it = imapCapabilities.begin ();
it != imapCapabilities.end (); ++it)
{
// kdDebug(7116) << "imapParser::hasCapability - Examining '" << (*it) << "'" << endl;
@@ -2061,20 +2061,20 @@ bool imapParser::hasCapability (const QString & cap)
return false;
}
-void imapParser::removeCapability (const QString & cap)
+void imapParser::removeCapability (const TQString & cap)
{
imapCapabilities.remove(cap.lower());
}
-QString imapParser::namespaceForBox( const QString & box )
+TQString imapParser::namespaceForBox( const TQString & box )
{
kdDebug(7116) << "imapParse::namespaceForBox " << box << endl;
- QString myNamespace;
+ TQString myNamespace;
if ( !box.isEmpty() )
{
- QValueList<QString> list = namespaceToDelimiter.keys();
- QString cleanPrefix;
- for ( QValueList<QString>::Iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<TQString> list = namespaceToDelimiter.keys();
+ TQString cleanPrefix;
+ for ( TQValueList<TQString>::Iterator it = list.begin(); it != list.end(); ++it )
{
if ( !(*it).isEmpty() && box.find( *it ) != -1 )
return (*it);
diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h
index 74fad145..61bc2a80 100644
--- a/kioslaves/imap4/imapparser.h
+++ b/kioslaves/imap4/imapparser.h
@@ -24,10 +24,10 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qasciidict.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqasciidict.h>
#include <kio/authinfo.h>
#include <kio/slavebase.h>
@@ -55,10 +55,10 @@ public:
parseString() { pos = 0; }
char operator[](uint i) const { return data[i + pos]; }
bool isEmpty() const { return pos >= data.size(); }
- QCString cstr() const
+ TQCString cstr() const
{
- if (pos >= data.size()) return QCString();
- return QCString(data.data() + pos, data.size() - pos + 1);
+ if (pos >= data.size()) return TQCString();
+ return TQCString(data.data() + pos, data.size() - pos + 1);
}
int find(char c, int index = 0)
{
@@ -66,24 +66,24 @@ public:
return (res == -1) ? res : (res - pos);
}
// Warning: does not check for going past end of "data"
- void takeLeft(QCString& dest, uint len) const
+ void takeLeft(TQCString& dest, uint len) const
{
dest.resize(len + 1);
qmemmove(dest.data(), data.data() + pos, len);
}
// Warning: does not check for going past end of "data"
- void takeLeftNoResize(QCString& dest, uint len) const
+ void takeLeftNoResize(TQCString& dest, uint len) const
{
qmemmove(dest.data(), data.data() + pos, len);
}
// Warning: does not check for going past end of "data"
- void takeMid(QCString& dest, uint start, uint len) const
+ void takeMid(TQCString& dest, uint start, uint len) const
{
dest.resize(len + 1);
qmemmove(dest.data(), data.data() + pos + start, len);
}
// Warning: does not check for going past end of "data"
- void takeMidNoResize(QCString& dest, uint start, uint len) const
+ void takeMidNoResize(TQCString& dest, uint start, uint len) const
{
qmemmove(dest.data(), data.data() + pos + start, len);
}
@@ -96,12 +96,12 @@ public:
{
return data.size() - pos;
}
- void fromString(const QString &s)
+ void fromString(const TQString &s)
{
clear();
data.duplicate(s.latin1(), s.length());
}
- QByteArray data;
+ TQByteArray data;
uint pos;
};
@@ -157,11 +157,11 @@ public:
myFlags = inFlags;
}
- QCString getDate ()
+ TQCString getDate ()
{
return myDate;
}
- void setDate (const QCString & _str)
+ void setDate (const TQCString & _str)
{
myDate = _str;
}
@@ -171,7 +171,7 @@ public:
myHeader = NULL;
mySize = 0;
myFlags = 0;
- myDate = QCString();
+ myDate = TQCString();
myUid = 0;
}
@@ -180,7 +180,7 @@ protected:
ulong mySize;
ulong myFlags;
ulong myUid;
- QCString myDate;
+ TQCString myDate;
};
@@ -208,7 +208,7 @@ public:
void setState(enum IMAP_STATE state) { currentState = state; }
/* @brief return the currently selected mailbox */
- const QString getCurrentBox ()
+ const TQString getCurrentBox ()
{
return rfcDecoder::fromIMAP(currentBox);
};
@@ -234,7 +234,7 @@ public:
* @param resultInfo The resultinfo from the command
* @return success or failure
*/
- bool clientLogin (const QString & aUser, const QString & aPass, QString & resultInfo);
+ bool clientLogin (const TQString & aUser, const TQString & aPass, TQString & resultInfo);
/**
* @brief non-plaintext login
* @param aUser Username
@@ -244,8 +244,8 @@ public:
* @param resultInfo The resultinfo from the command
* @return success or failure
*/
- bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai, const QString & aFQDN,
- const QString & aAuth, bool isSSL, QString & resultInfo);
+ bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai, const TQString & aFQDN,
+ const TQString & aAuth, bool isSSL, TQString & resultInfo);
/**
* main loop for the parser
@@ -262,8 +262,8 @@ public:
/** @brief parse a RECENT line */
void parseRecent (ulong value, parseString & result);
/** @brief parse a RESULT line */
- void parseResult (QByteArray & result, parseString & rest,
- const QString & command = QString::null);
+ void parseResult (TQByteArray & result, parseString & rest,
+ const TQString & command = TQString::null);
/** @brief parse a CAPABILITY line */
void parseCapability (parseString & result);
/** @brief parse a FLAGS line */
@@ -312,7 +312,7 @@ public:
/** read a envelope from imap and parse the addresses */
mailHeader *parseEnvelope (parseString & inWords);
/** @brief parse an address list and return a list of addresses */
- void parseAddressList (parseString & inWords, QPtrList<mailAddress>& list);
+ void parseAddressList (parseString & inWords, TQPtrList<mailAddress>& list);
/** @brief parse an address and return the ref again */
const mailAddress& parseAddress (parseString & inWords, mailAddress& buffer);
@@ -321,38 +321,38 @@ public:
/** parse the body structure recursively */
mimeHeader *parseBodyStructure (parseString & inWords,
- QString & section, mimeHeader * inHeader = 0);
+ TQString & section, mimeHeader * inHeader = 0);
/** parse only one not nested part */
- mimeHeader *parseSimplePart (parseString & inWords, QString & section,
+ mimeHeader *parseSimplePart (parseString & inWords, TQString & section,
mimeHeader * localPart = 0);
/** parse a parameter list (name value pairs) */
- QAsciiDict < QString > parseParameters (parseString & inWords);
+ TQAsciiDict < TQString > parseParameters (parseString & inWords);
/**
* parse the disposition list (disposition (name value pairs))
* the disposition has the key 'content-disposition'
*/
- QAsciiDict < QString > parseDisposition (parseString & inWords);
+ TQAsciiDict < TQString > parseDisposition (parseString & inWords);
// reimplement these
/** relay hook to send the fetched data directly to an upper level */
- virtual void parseRelay (const QByteArray & buffer);
+ virtual void parseRelay (const TQByteArray & buffer);
/** relay hook to announce the fetched data directly to an upper level
*/
virtual void parseRelay (ulong);
/** read at least len bytes */
- virtual bool parseRead (QByteArray & buffer, ulong len, ulong relay = 0);
+ virtual bool parseRead (TQByteArray & buffer, ulong len, ulong relay = 0);
/** read at least a line (up to CRLF) */
- virtual bool parseReadLine (QByteArray & buffer, ulong relay = 0);
+ virtual bool parseReadLine (TQByteArray & buffer, ulong relay = 0);
/** write argument to server */
- virtual void parseWriteLine (const QString &);
+ virtual void parseWriteLine (const TQString &);
// generic parser routines
@@ -360,33 +360,33 @@ public:
void parseSentence (parseString & inWords);
/** parse a literal or word, may require more data */
- QCString parseLiteralC(parseString & inWords, bool relay = false,
+ TQCString parseLiteralC(parseString & inWords, bool relay = false,
bool stopAtBracket = false, int *outlen = 0);
- inline QByteArray parseLiteral (parseString & inWords, bool relay = false,
+ inline TQByteArray parseLiteral (parseString & inWords, bool relay = false,
bool stopAtBracket = false) {
int len = 0; // string size
- // Choice: we can create an extra QCString, or we can get the buffer in
+ // Choice: we can create an extra TQCString, or we can get the buffer in
// the wrong size to start. Let's try option b.
- QCString tmp = parseLiteralC(inWords, relay, stopAtBracket, &len);
- return QByteArray().duplicate(tmp.data(), len);
+ TQCString tmp = parseLiteralC(inWords, relay, stopAtBracket, &len);
+ return TQByteArray().duplicate(tmp.data(), len);
}
// static parser routines, can be used elsewhere
- static QCString b2c(const QByteArray &ba)
- { return QCString(ba.data(), ba.size() + 1); }
+ static TQCString b2c(const TQByteArray &ba)
+ { return TQCString(ba.data(), ba.size() + 1); }
/** parse one word (maybe quoted) upto next space " ) ] } */
- static QCString parseOneWordC (parseString & inWords,
+ static TQCString parseOneWordC (parseString & inWords,
bool stopAtBracket = FALSE, int *len = 0);
/** parse one number using parseOneWord */
static bool parseOneNumber (parseString & inWords, ulong & num);
/** extract the box,section,list type, uid, uidvalidity,info from an url */
- static void parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity,
- QString & _info);
+ static void parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity,
+ TQString & _info);
/** @brief return the last handled foo
@@ -398,7 +398,7 @@ public:
};
/** @brief return the last results */
- const QStringList & getResults ()
+ const TQStringList & getResults ()
{
return lastResults;
};
@@ -414,15 +414,15 @@ public:
return selectInfo;
};
- const QByteArray & getContinuation ()
+ const TQByteArray & getContinuation ()
{
return continuation;
};
/** @brief see if server has a capability */
- bool hasCapability (const QString &);
+ bool hasCapability (const TQString &);
- void removeCapability (const QString & cap);
+ void removeCapability (const TQString & cap);
static inline void skipWS (parseString & inWords)
{
@@ -435,7 +435,7 @@ public:
}
/** @brief find the namespace for the given box */
- QString namespaceForBox( const QString & box );
+ TQString namespaceForBox( const TQString & box );
protected:
@@ -444,7 +444,7 @@ protected:
enum IMAP_STATE currentState;
/** the box selected */
- QString currentBox;
+ TQString currentBox;
/** @brief here we store the result from select/examine and unsolicited updates */
imapInfo selectInfo;
@@ -453,43 +453,43 @@ protected:
imapInfo lastStatus;
/** @brief the results from the capabilities, split at ' ' */
- QStringList imapCapabilities;
+ TQStringList imapCapabilities;
/** @brief the results from list/lsub/listrights commands */
- QValueList < imapList > listResponses;
+ TQValueList < imapList > listResponses;
/** @brief queues handling the running commands */
- QPtrList < imapCommand > sentQueue; // no autodelete
- QPtrList < imapCommand > completeQueue; // autodelete !!
+ TQPtrList < imapCommand > sentQueue; // no autodelete
+ TQPtrList < imapCommand > completeQueue; // autodelete !!
/**
* everything we didn't handle, everything but the greeting is bogus
*/
- QStringList unhandled;
+ TQStringList unhandled;
/** the last continuation request (there MUST not be more than one pending) */
- QByteArray continuation;
+ TQByteArray continuation;
/** the last uid seen while a fetch */
- QString seenUid;
+ TQString seenUid;
imapCache *lastHandled;
ulong commandCounter;
/** @brief the results from search/acl commands */
- QStringList lastResults;
+ TQStringList lastResults;
/**
* @brief namespace prefix - delimiter association
* The namespace is cleaned before so that it does not contain the delimiter
*/
- QMap<QString, QString> namespaceToDelimiter;
+ TQMap<TQString, TQString> namespaceToDelimiter;
/**
* @brief list of namespaces in the form: section=namespace=delimiter
* section is 0 (personal), 1 (other users) or 2 (shared)
*/
- QStringList imapNamespaces;
+ TQStringList imapNamespaces;
private:
diff --git a/kioslaves/imap4/mailaddress.cc b/kioslaves/imap4/mailaddress.cc
index a70b2d59..227defa9 100644
--- a/kioslaves/imap4/mailaddress.cc
+++ b/kioslaves/imap4/mailaddress.cc
@@ -93,15 +93,15 @@ mailAddress::parseAddress (char *aCStr)
{
case '"':
advance = mimeHdrLine::parseQuoted ('"', '"', aCStr);
- rawFullName += QCString (aCStr, advance + 1);
+ rawFullName += TQCString (aCStr, advance + 1);
break;
case '(':
advance = mimeHdrLine::parseQuoted ('(', ')', aCStr);
- rawComment += QCString (aCStr, advance + 1);
+ rawComment += TQCString (aCStr, advance + 1);
break;
case '<':
advance = mimeHdrLine::parseQuoted ('<', '>', aCStr);
- user = QCString (aCStr, advance + 1); // copy it
+ user = TQCString (aCStr, advance + 1); // copy it
len = advance;
user = user.mid (1, len - 2); // strip <>
len -= 2;
@@ -116,7 +116,7 @@ mailAddress::parseAddress (char *aCStr)
{
if (*aCStr != ',')
{
- rawFullName += QCString (aCStr, advance + 1);
+ rawFullName += TQCString (aCStr, advance + 1);
if (mimeHdrLine::skipWS ((const char *) &aCStr[advance]) > 0)
{
rawFullName += ' ';
@@ -199,7 +199,7 @@ mailAddress::parseAddress (char *aCStr)
const QCString
mailAddress::getStr ()
{
- QCString retVal(128); // Should be generally big enough
+ TQCString retVal(128); // Should be generally big enough
if (!rawFullName.isEmpty ())
{
@@ -231,7 +231,7 @@ mailAddress::isEmpty () const
}
void
-mailAddress::setFullName (const QString & _str)
+mailAddress::setFullName (const TQString & _str)
{
rawFullName = rfcDecoder::encodeRFC2047String (_str).latin1 ();
}
@@ -242,13 +242,13 @@ mailAddress::getFullName () const
}
void
-mailAddress::setCommentRaw (const QCString & _str)
+mailAddress::setCommentRaw (const TQCString & _str)
{
rawComment = _str;
}
void
-mailAddress::setComment (const QString & _str)
+mailAddress::setComment (const TQString & _str)
{
rawComment = rfcDecoder::encodeRFC2047String (_str).latin1 ();
}
@@ -258,7 +258,7 @@ mailAddress::getComment () const
return rfcDecoder::decodeRFC2047String (rawComment);
}
-const QCString &
+const TQCString &
mailAddress::getCommentRaw () const
{
return rawComment;
@@ -267,7 +267,7 @@ mailAddress::getCommentRaw () const
QString
mailAddress::emailAddrAsAnchor (const mailAddress & adr, bool shortAdr)
{
- QString retVal;
+ TQString retVal;
if (!adr.getFullName ().isEmpty ())
{
// should do some umlaut escaping
@@ -288,7 +288,7 @@ mailAddress::emailAddrAsAnchor (const mailAddress & adr, bool shortAdr)
if (!adr.getUser ().isEmpty ())
{
- QString mail;
+ TQString mail;
mail = adr.getUser ();
if (!mail.isEmpty () && !adr.getHost ().isEmpty ())
mail += "@" + adr.getHost ();
@@ -299,10 +299,10 @@ mailAddress::emailAddrAsAnchor (const mailAddress & adr, bool shortAdr)
}
QString
-mailAddress::emailAddrAsAnchor (const QPtrList < mailAddress > &list, bool value)
+mailAddress::emailAddrAsAnchor (const TQPtrList < mailAddress > &list, bool value)
{
- QString retVal;
- QPtrListIterator < mailAddress > it (list);
+ TQString retVal;
+ TQPtrListIterator < mailAddress > it (list);
while (it.current ())
{
diff --git a/kioslaves/imap4/mailaddress.h b/kioslaves/imap4/mailaddress.h
index 4ee68a39..644034b2 100644
--- a/kioslaves/imap4/mailaddress.h
+++ b/kioslaves/imap4/mailaddress.h
@@ -23,9 +23,9 @@
*
*********************************************************************/
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include "rfcdecoder.h"
class mailAddress
@@ -37,45 +37,45 @@ public:
mailAddress (const mailAddress &);
mailAddress & operator = (const mailAddress &);
- void setUser (const QCString & aUser)
+ void setUser (const TQCString & aUser)
{
user = aUser;
}
- const QCString & getUser () const
+ const TQCString & getUser () const
{
return user;
}
- void setHost (const QCString & aHost)
+ void setHost (const TQCString & aHost)
{
host = aHost;
}
- const QCString & getHost () const
+ const TQCString & getHost () const
{
return host;
}
- void setFullName (const QString & aFull);
- const QString getFullName () const;
+ void setFullName (const TQString & aFull);
+ const TQString getFullName () const;
- void setComment (const QString & aComment);
- void setCommentRaw (const QCString &);
- const QString getComment () const;
- const QCString & getCommentRaw () const;
+ void setComment (const TQString & aComment);
+ void setCommentRaw (const TQCString &);
+ const TQString getComment () const;
+ const TQCString & getCommentRaw () const;
int parseAddress (char *);
- const QCString getStr ();
+ const TQCString getStr ();
bool isEmpty () const;
- static QString emailAddrAsAnchor (const mailAddress &, bool);
- static QString emailAddrAsAnchor (const QPtrList < mailAddress > &, bool);
+ static TQString emailAddrAsAnchor (const mailAddress &, bool);
+ static TQString emailAddrAsAnchor (const TQPtrList < mailAddress > &, bool);
void clear();
private:
- QCString user;
- QCString host;
- QCString rawFullName;
- QCString rawComment;
+ TQCString user;
+ TQCString host;
+ TQCString rawFullName;
+ TQCString rawComment;
};
#endif
diff --git a/kioslaves/imap4/mailheader.cc b/kioslaves/imap4/mailheader.cc
index 960e5ba5..dea9ce5f 100644
--- a/kioslaves/imap4/mailheader.cc
+++ b/kioslaves/imap4/mailheader.cc
@@ -36,8 +36,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine)
{
mimeHdrLine *addLine = new mimeHdrLine (inLine);
- const QCString label(addLine->getLabel());
- const QCString value(addLine->getValue());
+ const TQCString label(addLine->getLabel());
+ const TQCString value(addLine->getValue());
if (!qstricmp (label, "Return-Path")) {
returnpathAdr.parseAddress (value.data ());
@@ -109,18 +109,18 @@ mailHeader::addHdrLine (mimeHdrLine * inLine)
void
mailHeader::outputHeader (mimeIO & useIO)
{
- static const QCString __returnPath("Return-Path: ", 14);
- static const QCString __from ("From: ", 7);
- static const QCString __sender ("Sender: ", 9);
- static const QCString __replyTo ("Reply-To: ", 11);
- static const QCString __to ("To: ", 5);
- static const QCString __cc ("CC: ", 5);
- static const QCString __bcc ("BCC: ", 6);
- static const QCString __subject ("Subject: ", 10);
- static const QCString __messageId ("Message-ID: ", 13);
- static const QCString __inReplyTo ("In-Reply-To: ", 14);
- static const QCString __references("References: ", 13);
- static const QCString __date ("Date: ", 7);
+ static const TQCString __returnPath("Return-Path: ", 14);
+ static const TQCString __from ("From: ", 7);
+ static const TQCString __sender ("Sender: ", 9);
+ static const TQCString __replyTo ("Reply-To: ", 11);
+ static const TQCString __to ("To: ", 5);
+ static const TQCString __cc ("CC: ", 5);
+ static const TQCString __bcc ("BCC: ", 6);
+ static const TQCString __subject ("Subject: ", 10);
+ static const TQCString __messageId ("Message-ID: ", 13);
+ static const TQCString __inReplyTo ("In-Reply-To: ", 14);
+ static const TQCString __references("References: ", 13);
+ static const TQCString __date ("Date: ", 7);
if (!returnpathAdr.isEmpty())
useIO.outputMimeLine(__returnPath + returnpathAdr.getStr());
@@ -156,7 +156,7 @@ mailHeader::outputHeader (mimeIO & useIO)
int
mailHeader::parseAddressList (const char *inCStr,
- QPtrList < mailAddress > *aList)
+ TQPtrList < mailAddress > *aList)
{
int advance = 0;
int skip = 1;
@@ -187,11 +187,11 @@ mailHeader::parseAddressList (const char *inCStr,
}
QCString
-mailHeader::getAddressStr (QPtrList < mailAddress > *aList)
+mailHeader::getAddressStr (TQPtrList < mailAddress > *aList)
{
- QCString retVal;
+ TQCString retVal;
- QPtrListIterator < mailAddress > it = QPtrListIterator < mailAddress > (*aList);
+ TQPtrListIterator < mailAddress > it = TQPtrListIterator < mailAddress > (*aList);
while (it.current ())
{
retVal += it.current ()->getStr ();
diff --git a/kioslaves/imap4/mailheader.h b/kioslaves/imap4/mailheader.h
index 0586b3a0..633d61b7 100644
--- a/kioslaves/imap4/mailheader.h
+++ b/kioslaves/imap4/mailheader.h
@@ -66,29 +66,29 @@ public:
replytoAdr = _adr;
}
- const QCString& getMessageId ()
+ const TQCString& getMessageId ()
{
return messageID;
}
- void setMessageId (const QCString & _str)
+ void setMessageId (const TQCString & _str)
{
messageID = _str;
}
- const QCString& getInReplyTo ()
+ const TQCString& getInReplyTo ()
{
return inReplyTo;
}
- void setInReplyTo (const QCString & _str)
+ void setInReplyTo (const TQCString & _str)
{
inReplyTo = _str;
}
- const QCString& getReferences ()
+ const TQCString& getReferences ()
{
return references;
}
- void setReferences (const QCString & _str)
+ void setReferences (const TQCString & _str)
{
references = _str;
}
@@ -96,14 +96,14 @@ public:
/**
* set a unicode subject
*/
- void setSubject (const QString & _str)
+ void setSubject (const TQString & _str)
{
_subject = rfcDecoder::encodeRFC2047String(_str).latin1();
}
/**
* set a encoded subject
*/
- void setSubjectEncoded (const QCString & _str)
+ void setSubjectEncoded (const TQCString & _str)
{
_subject = _str.simplifyWhiteSpace();
}
@@ -111,14 +111,14 @@ public:
/**
* get the unicode subject
*/
- const QString getSubject ()
+ const TQString getSubject ()
{
return rfcDecoder::decodeRFC2047String(_subject);
}
/**
* get the encoded subject
*/
- const QCString& getSubjectEncoded ()
+ const TQCString& getSubjectEncoded ()
{
return _subject;
}
@@ -126,7 +126,7 @@ public:
/**
* set the date
*/
- void setDate (const QCString & _str)
+ void setDate (const TQCString & _str)
{
mDate = _str;
}
@@ -134,27 +134,27 @@ public:
/**
* get the date
*/
- const QCString& date ()
+ const TQCString& date ()
{
return mDate;
}
- static int parseAddressList (const char *, QPtrList < mailAddress > *);
- static QCString getAddressStr (QPtrList < mailAddress > *);
- QPtrList < mailAddress > &to ()
+ static int parseAddressList (const char *, TQPtrList < mailAddress > *);
+ static TQCString getAddressStr (TQPtrList < mailAddress > *);
+ TQPtrList < mailAddress > &to ()
{
return toAdr;
}
- QPtrList < mailAddress > &cc ()
+ TQPtrList < mailAddress > &cc ()
{
return ccAdr;
}
- QPtrList < mailAddress > &bcc ()
+ TQPtrList < mailAddress > &bcc ()
{
return bccAdr;
}
#ifdef KMAIL_COMPATIBLE
- QString subject ()
+ TQString subject ()
{
return getSubject ();
}
@@ -172,19 +172,19 @@ public:
#endif
private:
- QPtrList < mailAddress > toAdr;
- QPtrList < mailAddress > ccAdr;
- QPtrList < mailAddress > bccAdr;
+ TQPtrList < mailAddress > toAdr;
+ TQPtrList < mailAddress > ccAdr;
+ TQPtrList < mailAddress > bccAdr;
mailAddress fromAdr;
mailAddress senderAdr;
mailAddress returnpathAdr;
mailAddress replytoAdr;
- QCString _subject;
- QCString mDate;
+ TQCString _subject;
+ TQCString mDate;
int gmt_offset;
- QCString messageID;
- QCString inReplyTo;
- QCString references;
+ TQCString messageID;
+ TQCString inReplyTo;
+ TQCString references;
};
#endif
diff --git a/kioslaves/imap4/mimehdrline.cc b/kioslaves/imap4/mimehdrline.cc
index 9b03ec92..0706d04c 100644
--- a/kioslaves/imap4/mimehdrline.cc
+++ b/kioslaves/imap4/mimehdrline.cc
@@ -40,7 +40,7 @@ mimeValue ((const char *) NULL), mimeLabel ((const char *) NULL)
{
}
-mimeHdrLine::mimeHdrLine (const QCString & aLabel, const QCString & aValue):
+mimeHdrLine::mimeHdrLine (const TQCString & aLabel, const TQCString & aValue):
mimeValue (aValue),
mimeLabel (aLabel)
{
@@ -69,11 +69,11 @@ mimeHdrLine::appendStr (const char *inCStr)
{
if (skip > 0)
{
- mimeValue += QCString (aCStr, skip + 1);
+ mimeValue += TQCString (aCStr, skip + 1);
aCStr += skip;
retVal += skip;
skip = parseFullLine (aCStr);
- mimeValue += QCString (aCStr, skip + 1);
+ mimeValue += TQCString (aCStr, skip + 1);
retVal += skip;
aCStr += skip;
}
@@ -96,8 +96,8 @@ mimeHdrLine::setStr (const char *inCStr)
int retVal = 0;
char *aCStr = (char *) inCStr;
// char *begin = aCStr;
- mimeLabel = QCString ((const char *) NULL);
- mimeValue = QCString ((const char *) NULL);
+ mimeLabel = TQCString ((const char *) NULL);
+ mimeValue = TQCString ((const char *) NULL);
if (aCStr)
{
@@ -113,7 +113,7 @@ mimeHdrLine::setStr (const char *inCStr)
retVal = 0;
else
{
- mimeLabel = QCString (aCStr, label); //length including zero
+ mimeLabel = TQCString (aCStr, label); //length including zero
retVal += label;
aCStr += label;
}
@@ -127,7 +127,7 @@ mimeHdrLine::setStr (const char *inCStr)
aCStr += skip;
retVal += skip;
skip = parseFullLine (aCStr);
- mimeValue = QCString (aCStr, skip + 1);
+ mimeValue = TQCString (aCStr, skip + 1);
retVal += skip;
aCStr += skip;
}
@@ -465,14 +465,14 @@ mimeHdrLine::parseSeparator (char separator, const char *inCStr)
/** return the label */
-const QCString&
+const TQCString&
mimeHdrLine::getLabel ()
{
return mimeLabel;
}
/** return the value */
-const QCString&
+const TQCString&
mimeHdrLine::getValue ()
{
return mimeValue;
@@ -481,10 +481,10 @@ mimeHdrLine::getValue ()
// FIXME: very inefficient still
QCString
-mimeHdrLine::truncateLine(QCString aLine, unsigned int truncate)
+mimeHdrLine::truncateLine(TQCString aLine, unsigned int truncate)
{
int cutHere;
- QCString retVal;
+ TQCString retVal;
uint len = aLine.length();
// see if we have a line of the form "key: value" (like "Subject: bla")
diff --git a/kioslaves/imap4/mimehdrline.h b/kioslaves/imap4/mimehdrline.h
index ae8fdd57..e31c1864 100644
--- a/kioslaves/imap4/mimehdrline.h
+++ b/kioslaves/imap4/mimehdrline.h
@@ -19,8 +19,8 @@
#define MIMEHDRLINE_H
-#include <qcstring.h>
-#include <qasciidict.h>
+#include <tqcstring.h>
+#include <tqasciidict.h>
/**
*@author Sven Carstens
@@ -31,17 +31,17 @@ class mimeHdrLine
public:
mimeHdrLine ();
mimeHdrLine (mimeHdrLine *);
- mimeHdrLine (const QCString &, const QCString &);
+ mimeHdrLine (const TQCString &, const TQCString &);
~mimeHdrLine ();
/** parse a Line into the class
and report characters slurped */
int setStr (const char *);
int appendStr (const char *);
/** return the value */
- const QCString& getValue ();
+ const TQCString& getValue ();
/** return the label */
- const QCString& getLabel ();
- static QCString truncateLine (QCString, unsigned int truncate = 80);
+ const TQCString& getLabel ();
+ static TQCString truncateLine (TQCString, unsigned int truncate = 80);
static int parseSeparator (char, const char *);
static int parseQuoted (char, char, const char *);
/** skip all white space characters */
@@ -54,10 +54,10 @@ and report characters slurped */
protected: // Protected attributes
/** contains the Value
*/
- QCString mimeValue;
+ TQCString mimeValue;
/** contains the Label of the line
*/
- QCString mimeLabel;
+ TQCString mimeLabel;
protected: // Protected methods
/** parses a continuated line */
int parseFullLine (const char *);
diff --git a/kioslaves/imap4/mimeheader.cc b/kioslaves/imap4/mimeheader.cc
index 17d3a3fd..676e0d72 100644
--- a/kioslaves/imap4/mimeheader.cc
+++ b/kioslaves/imap4/mimeheader.cc
@@ -20,7 +20,7 @@
#include "mailheader.h"
#include "rfcdecoder.h"
-#include <qregexp.h>
+#include <tqregexp.h>
// #include <iostream.h>
#include <kglobal.h>
@@ -50,9 +50,9 @@ mimeHeader::~mimeHeader ()
}
/*
-QPtrList<mimeHeader> mimeHeader::getAllParts()
+TQPtrList<mimeHeader> mimeHeader::getAllParts()
{
- QPtrList<mimeHeader> retVal;
+ TQPtrList<mimeHeader> retVal;
// caller is responsible for clearing
retVal.setAutoDelete( false );
@@ -85,7 +85,7 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
{
int skip;
char *aCStr = addLine->getValue ().data ();
- QDict < QString > *aList = 0;
+ TQDict < TQString > *aList = 0;
skip = mimeHdrLine::parseSeparator (';', aCStr);
if (skip > 0)
@@ -102,7 +102,7 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
if (aCStr[skip - 1] == ';')
cut++;
}
- QCString mimeValue = QCString (aCStr, skip - cut + 1); // cutting of one because of 0x00
+ TQCString mimeValue = TQCString (aCStr, skip - cut + 1); // cutting of one because of 0x00
if (!qstricmp (addLine->getLabel (), "Content-Disposition"))
@@ -147,9 +147,9 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
{
if (skip > 0)
{
- addParameter (QCString (aCStr, skip).simplifyWhiteSpace(), aList);
+ addParameter (TQCString (aCStr, skip).simplifyWhiteSpace(), aList);
// cout << "-- '" << aParm.data() << "'" << endl;
- mimeValue = QCString (addLine->getValue ().data (), skip);
+ mimeValue = TQCString (addLine->getValue ().data (), skip);
aCStr += skip;
}
else
@@ -161,16 +161,16 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
}
void
-mimeHeader::addParameter (const QCString& aParameter, QDict < QString > *aList)
+mimeHeader::addParameter (const TQCString& aParameter, TQDict < TQString > *aList)
{
if ( !aList )
return;
- QString *aValue;
- QCString aLabel;
+ TQString *aValue;
+ TQCString aLabel;
int pos = aParameter.find ('=');
// cout << aParameter.left(pos).data();
- aValue = new QString ();
+ aValue = new TQString ();
aValue->setLatin1 (aParameter.right (aParameter.length () - pos - 1));
aLabel = aParameter.left (pos);
if ((*aValue)[0] == '"')
@@ -181,48 +181,48 @@ mimeHeader::addParameter (const QCString& aParameter, QDict < QString > *aList)
}
QString
-mimeHeader::getDispositionParm (const QCString& aStr)
+mimeHeader::getDispositionParm (const TQCString& aStr)
{
return getParameter (aStr, &dispositionList);
}
QString
-mimeHeader::getTypeParm (const QCString& aStr)
+mimeHeader::getTypeParm (const TQCString& aStr)
{
return getParameter (aStr, &typeList);
}
void
-mimeHeader::setDispositionParm (const QCString& aLabel, const QString& aValue)
+mimeHeader::setDispositionParm (const TQCString& aLabel, const TQString& aValue)
{
setParameter (aLabel, aValue, &dispositionList);
return;
}
void
-mimeHeader::setTypeParm (const QCString& aLabel, const QString& aValue)
+mimeHeader::setTypeParm (const TQCString& aLabel, const TQString& aValue)
{
setParameter (aLabel, aValue, &typeList);
}
-QDictIterator < QString > mimeHeader::getDispositionIterator ()
+TQDictIterator < TQString > mimeHeader::getDispositionIterator ()
{
- return QDictIterator < QString > (dispositionList);
+ return TQDictIterator < TQString > (dispositionList);
}
-QDictIterator < QString > mimeHeader::getTypeIterator ()
+TQDictIterator < TQString > mimeHeader::getTypeIterator ()
{
- return QDictIterator < QString > (typeList);
+ return TQDictIterator < TQString > (typeList);
}
-QPtrListIterator < mimeHdrLine > mimeHeader::getOriginalIterator ()
+TQPtrListIterator < mimeHdrLine > mimeHeader::getOriginalIterator ()
{
- return QPtrListIterator < mimeHdrLine > (originalHdrLines);
+ return TQPtrListIterator < mimeHdrLine > (originalHdrLines);
}
-QPtrListIterator < mimeHdrLine > mimeHeader::getAdditionalIterator ()
+TQPtrListIterator < mimeHdrLine > mimeHeader::getAdditionalIterator ()
{
- return QPtrListIterator < mimeHdrLine > (additionalHdrLines);
+ return TQPtrListIterator < mimeHdrLine > (additionalHdrLines);
}
void
@@ -230,41 +230,41 @@ mimeHeader::outputHeader (mimeIO & useIO)
{
if (!getDisposition ().isEmpty ())
{
- useIO.outputMimeLine (QCString ("Content-Disposition: ")
+ useIO.outputMimeLine (TQCString ("Content-Disposition: ")
+ getDisposition ()
+ outputParameter (&dispositionList));
}
if (!getType ().isEmpty ())
{
- useIO.outputMimeLine (QCString ("Content-Type: ")
+ useIO.outputMimeLine (TQCString ("Content-Type: ")
+ getType () + outputParameter (&typeList));
}
if (!getDescription ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-Description: ") +
+ useIO.outputMimeLine (TQCString ("Content-Description: ") +
getDescription ());
if (!getID ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-ID: ") + getID ());
+ useIO.outputMimeLine (TQCString ("Content-ID: ") + getID ());
if (!getMD5 ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-MD5: ") + getMD5 ());
+ useIO.outputMimeLine (TQCString ("Content-MD5: ") + getMD5 ());
if (!getEncoding ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-Transfer-Encoding: ") +
+ useIO.outputMimeLine (TQCString ("Content-Transfer-Encoding: ") +
getEncoding ());
- QPtrListIterator < mimeHdrLine > ait = getAdditionalIterator ();
+ TQPtrListIterator < mimeHdrLine > ait = getAdditionalIterator ();
while (ait.current ())
{
useIO.outputMimeLine (ait.current ()->getLabel () + ": " +
ait.current ()->getValue ());
++ait;
}
- useIO.outputMimeLine (QCString (""));
+ useIO.outputMimeLine (TQCString (""));
}
QString
-mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
+mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
{
- QString retVal, *found;
+ TQString retVal, *found;
if (aDict)
{
//see if it is a normal parameter
@@ -276,12 +276,12 @@ mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
if (!found)
{
//continuated parameter
- QString decoded, encoded;
+ TQString decoded, encoded;
int part = 0;
do
{
- QCString search;
+ TQCString search;
search.setNum (part);
search = aStr + "*" + search;
found = aDict->find (search);
@@ -305,7 +305,7 @@ mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
else
{
retVal =
- rfcDecoder::decodeRFC2231String (QCString ("''") +
+ rfcDecoder::decodeRFC2231String (TQCString ("''") +
encoded.local8Bit ());
}
}
@@ -324,12 +324,12 @@ mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
}
void
-mimeHeader::setParameter (const QCString& aLabel, const QString& aValue,
- QDict < QString > *aDict)
+mimeHeader::setParameter (const TQCString& aLabel, const TQString& aValue,
+ TQDict < TQString > *aDict)
{
bool encoded = true;
uint vlen, llen;
- QString val = aValue;
+ TQString val = aValue;
if (aDict)
{
@@ -350,8 +350,8 @@ mimeHeader::setParameter (const QCString& aLabel, const QString& aValue,
// by 1 or 2 in order to prevent an encoded character from being
// split in half
int i = 0;
- QString shortValue;
- QCString shortLabel;
+ TQString shortValue;
+ TQCString shortLabel;
while (!val.isEmpty ())
{
@@ -391,24 +391,24 @@ mimeHeader::setParameter (const QCString& aLabel, const QString& aValue,
//kdDebug(7116) << "mimeHeader::setParameter() - shortLabel = '" << shortLabel << "'" << endl;
//kdDebug(7116) << "mimeHeader::setParameter() - shortValue = '" << shortValue << "'" << endl;
//kdDebug(7116) << "mimeHeader::setParameter() - val = '" << val << "'" << endl;
- aDict->insert (shortLabel, new QString (shortValue));
+ aDict->insert (shortLabel, new TQString (shortValue));
i++;
}
}
else
{
- aDict->insert (aLabel, new QString (val));
+ aDict->insert (aLabel, new TQString (val));
}
}
}
QCString
-mimeHeader::outputParameter (QDict < QString > *aDict)
+mimeHeader::outputParameter (TQDict < TQString > *aDict)
{
- QCString retVal;
+ TQCString retVal;
if (aDict)
{
- QDictIterator < QString > it (*aDict);
+ TQDictIterator < TQString > it (*aDict);
while (it.current ())
{
retVal += (";\n\t" + it.currentKey () + "=").latin1 ();
@@ -431,8 +431,8 @@ mimeHeader::outputParameter (QDict < QString > *aDict)
void
mimeHeader::outputPart (mimeIO & useIO)
{
- QPtrListIterator < mimeHeader > nestedParts = getNestedIterator ();
- QCString boundary;
+ TQPtrListIterator < mimeHeader > nestedParts = getNestedIterator ();
+ TQCString boundary;
if (!getTypeParm ("boundary").isEmpty ())
boundary = getTypeParm ("boundary").latin1 ();
@@ -455,11 +455,11 @@ mimeHeader::outputPart (mimeIO & useIO)
}
int
-mimeHeader::parsePart (mimeIO & useIO, const QString& boundary)
+mimeHeader::parsePart (mimeIO & useIO, const TQString& boundary)
{
int retVal = 0;
bool mbox = false;
- QCString preNested, postNested;
+ TQCString preNested, postNested;
mbox = parseHeader (useIO);
kdDebug(7116) << "mimeHeader::parsePart - parsing part '" << getType () << "'" << endl;
@@ -496,19 +496,19 @@ mimeHeader::parsePart (mimeIO & useIO, const QString& boundary)
}
int
-mimeHeader::parseBody (mimeIO & useIO, QCString & messageBody,
- const QString& boundary, bool mbox)
+mimeHeader::parseBody (mimeIO & useIO, TQCString & messageBody,
+ const TQString& boundary, bool mbox)
{
- QCString inputStr;
- QCString buffer;
- QString partBoundary;
- QString partEnd;
+ TQCString inputStr;
+ TQCString buffer;
+ TQString partBoundary;
+ TQString partEnd;
int retVal = 0; //default is last part
if (!boundary.isEmpty ())
{
- partBoundary = QString ("--") + boundary;
- partEnd = QString ("--") + boundary + "--";
+ partBoundary = TQString ("--") + boundary;
+ partEnd = TQString ("--") + boundary + "--";
}
while (useIO.inputLine (inputStr))
@@ -550,7 +550,7 @@ mimeHeader::parseHeader (mimeIO & useIO)
bool mbox = false;
bool first = true;
mimeHdrLine my_line;
- QCString inputStr;
+ TQCString inputStr;
kdDebug(7116) << "mimeHeader::parseHeader - starting parsing" << endl;
while (useIO.inputLine (inputStr))
@@ -581,13 +581,13 @@ mimeHeader::parseHeader (mimeIO & useIO)
}
mimeHeader *
-mimeHeader::bodyPart (const QString & _str)
+mimeHeader::bodyPart (const TQString & _str)
{
// see if it is nested a little deeper
int pt = _str.find('.');
if (pt != -1)
{
- QString tempStr = _str;
+ TQString tempStr = _str;
mimeHeader *tempPart;
tempStr = _str.right (_str.length () - pt - 1);
@@ -617,12 +617,12 @@ mimeHeader::bodyPart (const QString & _str)
return nestedParts.at (_str.toULong () - 1);
}
-void mimeHeader::serialize(QDataStream& stream)
+void mimeHeader::serialize(TQDataStream& stream)
{
int nestedcount = nestedParts.count();
if (nestedParts.isEmpty() && nestedMessage)
nestedcount = 1;
- stream << nestedcount << contentType << QString (getTypeParm ("name")) << _contentDescription
+ stream << nestedcount << contentType << TQString (getTypeParm ("name")) << _contentDescription
<< _contentDisposition << contentEncoding << contentLength << partSpecifier;
// serialize nested message
if (nestedMessage)
@@ -631,7 +631,7 @@ void mimeHeader::serialize(QDataStream& stream)
// serialize nested parts
if (!nestedParts.isEmpty())
{
- QPtrListIterator < mimeHeader > it(nestedParts);
+ TQPtrListIterator < mimeHeader > it(nestedParts);
mimeHeader* part;
while ( (part = it.current()) != 0 )
{
@@ -647,16 +647,16 @@ QString
mimeHeader::bodyDecoded ()
{
kdDebug(7116) << "mimeHeader::bodyDecoded" << endl;
- QByteArray temp;
+ TQByteArray temp;
temp = bodyDecodedBinary ();
- return QString::fromLatin1 (temp.data (), temp.count ());
+ return TQString::fromLatin1 (temp.data (), temp.count ());
}
QByteArray
mimeHeader::bodyDecodedBinary ()
{
- QByteArray retVal;
+ TQByteArray retVal;
if (contentEncoding.find ("quoted-printable", 0, false) == 0)
retVal = KCodecs::quotedPrintableDecode(postMultipartBody);
@@ -669,15 +669,15 @@ mimeHeader::bodyDecodedBinary ()
}
void
-mimeHeader::setBodyEncodedBinary (const QByteArray & _arr)
+mimeHeader::setBodyEncodedBinary (const TQByteArray & _arr)
{
setBodyEncoded (_arr);
}
void
-mimeHeader::setBodyEncoded (const QByteArray & _arr)
+mimeHeader::setBodyEncoded (const TQByteArray & _arr)
{
- QByteArray setVal;
+ TQByteArray setVal;
kdDebug(7116) << "mimeHeader::setBodyEncoded - in size " << _arr.size () << endl;
if (contentEncoding.find ("quoted-printable", 0, false) == 0)
@@ -695,11 +695,11 @@ mimeHeader::setBodyEncoded (const QByteArray & _arr)
QString
mimeHeader::iconName ()
{
- QString fileName;
+ TQString fileName;
// FIXME: bug? Why throw away this data?
fileName =
- KMimeType::mimeType (contentType.lower ())->icon (QString::null, false);
+ KMimeType::mimeType (contentType.lower ())->icon (TQString::null, false);
fileName =
KGlobal::instance ()->iconLoader ()->iconPath (fileName, KIcon::Desktop);
// if (fileName.isEmpty())
@@ -726,8 +726,8 @@ mimeHeader::headerAsString ()
QString
mimeHeader::magicSetType (bool aAutoDecode)
{
- QString mimetype;
- QByteArray body;
+ TQString mimetype;
+ TQByteArray body;
KMimeMagicResult *result;
KMimeMagic::self ()->setFollowLinks (TRUE); // is it necessary ?
diff --git a/kioslaves/imap4/mimeheader.h b/kioslaves/imap4/mimeheader.h
index a56ec6cb..0eb46630 100644
--- a/kioslaves/imap4/mimeheader.h
+++ b/kioslaves/imap4/mimeheader.h
@@ -18,8 +18,8 @@
#ifndef MIMEHEADER_H
#define MIMEHEADER_H
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include "mimehdrline.h"
#include "mimeio.h"
@@ -40,75 +40,75 @@ public:
virtual void outputPart (mimeIO &);
- QCString outputParameter (QDict < QString > *);
+ TQCString outputParameter (TQDict < TQString > *);
- int parsePart (mimeIO &, const QString&);
- int parseBody (mimeIO &, QCString &, const QString&, bool mbox = false);
+ int parsePart (mimeIO &, const TQString&);
+ int parseBody (mimeIO &, TQCString &, const TQString&, bool mbox = false);
// parse a header. returns true if it had a leading 'From ' line
bool parseHeader (mimeIO &);
- QString getDispositionParm (const QCString&);
- void setDispositionParm (const QCString&, const QString&);
- QDictIterator < QString > getDispositionIterator ();
+ TQString getDispositionParm (const TQCString&);
+ void setDispositionParm (const TQCString&, const TQString&);
+ TQDictIterator < TQString > getDispositionIterator ();
- QString getTypeParm (const QCString&);
- void setTypeParm (const QCString&, const QString&);
- QDictIterator < QString > getTypeIterator ();
+ TQString getTypeParm (const TQCString&);
+ void setTypeParm (const TQCString&, const TQString&);
+ TQDictIterator < TQString > getTypeIterator ();
// recursively serialize all important contents to the QDataStream
- void serialize(QDataStream& stream);
+ void serialize(TQDataStream& stream);
- const QCString& getType ()
+ const TQCString& getType ()
{
return contentType;
}
- void setType (const QCString & _str)
+ void setType (const TQCString & _str)
{
contentType = _str;
}
- const QCString& getDescription ()
+ const TQCString& getDescription ()
{
return _contentDescription;
}
- void setDescription (const QCString & _str)
+ void setDescription (const TQCString & _str)
{
_contentDescription = _str;
}
- QCString getDisposition ()
+ TQCString getDisposition ()
{
return _contentDisposition;
}
- void setDisposition (const QCString & _str)
+ void setDisposition (const TQCString & _str)
{
_contentDisposition = _str;
}
- QCString getEncoding ()
+ TQCString getEncoding ()
{
return contentEncoding;
}
- void setEncoding (const QCString & _str)
+ void setEncoding (const TQCString & _str)
{
contentEncoding = _str;
}
- QCString getMD5 ()
+ TQCString getMD5 ()
{
return contentMD5;
}
- void setMD5 (const QCString & _str)
+ void setMD5 (const TQCString & _str)
{
contentMD5 = _str;
}
- QCString getID ()
+ TQCString getID ()
{
return contentID;
}
- void setID (const QCString & _str)
+ void setID (const TQCString & _str)
{
contentID = _str;
}
@@ -122,44 +122,44 @@ public:
contentLength = _len;
}
- const QString & getPartSpecifier ()
+ const TQString & getPartSpecifier ()
{
return partSpecifier;
}
- void setPartSpecifier (const QString & _str)
+ void setPartSpecifier (const TQString & _str)
{
partSpecifier = _str;
}
- QPtrListIterator < mimeHdrLine > getOriginalIterator ();
- QPtrListIterator < mimeHdrLine > getAdditionalIterator ();
- void setContent (const QCString &aContent)
+ TQPtrListIterator < mimeHdrLine > getOriginalIterator ();
+ TQPtrListIterator < mimeHdrLine > getAdditionalIterator ();
+ void setContent (const TQCString &aContent)
{
mimeContent = aContent;
}
- QCString getContent ()
+ TQCString getContent ()
{
return mimeContent;
}
- QCString getBody ()
+ TQCString getBody ()
{
return preMultipartBody + postMultipartBody;
}
- QCString getPreBody ()
+ TQCString getPreBody ()
{
return preMultipartBody;
}
- void setPreBody (QCString & inBody)
+ void setPreBody (TQCString & inBody)
{
preMultipartBody = inBody;
}
- QCString getPostBody ()
+ TQCString getPostBody ()
{
return postMultipartBody;
}
- void setPostBody (QCString & inBody)
+ void setPostBody (TQCString & inBody)
{
postMultipartBody = inBody;
contentLength = inBody.length ();
@@ -181,9 +181,9 @@ public:
{
nestedParts.append (inPart);
}
- QPtrListIterator < mimeHeader > getNestedIterator ()
+ TQPtrListIterator < mimeHeader > getNestedIterator ()
{
- return QPtrListIterator < mimeHeader > (nestedParts);
+ return TQPtrListIterator < mimeHeader > (nestedParts);
}
// clears all parts and deletes them from memory
@@ -205,7 +205,7 @@ public:
}
// return the specified body part or NULL
- mimeHeader *bodyPart (const QString &);
+ mimeHeader *bodyPart (const TQString &);
#ifdef KMAIL_COMPATIBLE
ulong msgSize ()
@@ -222,115 +222,115 @@ public:
(*ret) = nestedParts.at (which);
return nestedParts.at (which);
}
- void write (const QString &)
+ void write (const TQString &)
{
}
- QString typeStr ()
+ TQString typeStr ()
{
- return QString (contentType.left (contentType.find ('/')));
+ return TQString (contentType.left (contentType.find ('/')));
}
- void setTypeStr (const QString & _str)
+ void setTypeStr (const TQString & _str)
{
- contentType = QCString (_str.latin1 ()) + "/" + subtypeStr ().latin1 ();
+ contentType = TQCString (_str.latin1 ()) + "/" + subtypeStr ().latin1 ();
}
- QString subtypeStr ()
+ TQString subtypeStr ()
{
- return QString (contentType.
+ return TQString (contentType.
right (contentType.length () - contentType.find ('/') -
1));
}
- void setSubtypeStr (const QString & _str)
+ void setSubtypeStr (const TQString & _str)
{
- contentType = QCString (typeStr ().latin1 ()) + "/" + _str.latin1 ();
+ contentType = TQCString (typeStr ().latin1 ()) + "/" + _str.latin1 ();
}
- QString cteStr ()
+ TQString cteStr ()
{
- return QString (getEncoding ());
+ return TQString (getEncoding ());
}
- void setCteStr (const QString & _str)
+ void setCteStr (const TQString & _str)
{
setEncoding (_str.latin1 ());
}
- QString contentDisposition ()
+ TQString contentDisposition ()
{
- return QString (_contentDisposition);
+ return TQString (_contentDisposition);
}
- QString body ()
+ TQString body ()
{
- return QString (postMultipartBody);
+ return TQString (postMultipartBody);
}
- QString charset ()
+ TQString charset ()
{
return getTypeParm ("charset");
}
- QString bodyDecoded ();
- void setBodyEncoded (const QByteArray &);
- void setBodyEncodedBinary (const QByteArray &);
- QByteArray bodyDecodedBinary ();
- QString name ()
+ TQString bodyDecoded ();
+ void setBodyEncoded (const TQByteArray &);
+ void setBodyEncodedBinary (const TQByteArray &);
+ TQByteArray bodyDecodedBinary ();
+ TQString name ()
{
- return QString (getTypeParm ("name"));
+ return TQString (getTypeParm ("name"));
}
- void setName (const QString & _str)
+ void setName (const TQString & _str)
{
setTypeParm ("name", _str);
}
- QString fileName ()
+ TQString fileName ()
{
- return QString (getDispositionParm ("filename"));
+ return TQString (getDispositionParm ("filename"));
}
- QString contentDescription ()
+ TQString contentDescription ()
{
- return QString (rfcDecoder::decodeRFC2047String (_contentDescription));
+ return TQString (rfcDecoder::decodeRFC2047String (_contentDescription));
}
- void setContentDescription (const QString & _str)
+ void setContentDescription (const TQString & _str)
{
_contentDescription = rfcDecoder::encodeRFC2047String (_str).latin1 ();
}
- QString msgIdMD5 ()
+ TQString msgIdMD5 ()
{
- return QString (contentMD5);
+ return TQString (contentMD5);
}
- QString iconName ();
- QString magicSetType (bool aAutoDecode = true);
- QString headerAsString ();
+ TQString iconName ();
+ TQString magicSetType (bool aAutoDecode = true);
+ TQString headerAsString ();
ulong size ()
{
return 0;
}
- void fromString (const QByteArray &)
+ void fromString (const TQByteArray &)
{;
}
- void setContentDisposition (const QString & _str)
+ void setContentDisposition (const TQString & _str)
{
setDisposition (_str.latin1 ());
}
#endif
protected:
- static void addParameter (const QCString&, QDict < QString > *);
- static QString getParameter (const QCString&, QDict < QString > *);
- static void setParameter (const QCString&, const QString&, QDict < QString > *);
+ static void addParameter (const TQCString&, TQDict < TQString > *);
+ static TQString getParameter (const TQCString&, TQDict < TQString > *);
+ static void setParameter (const TQCString&, const TQString&, TQDict < TQString > *);
- QPtrList < mimeHdrLine > originalHdrLines;
+ TQPtrList < mimeHdrLine > originalHdrLines;
private:
- QPtrList < mimeHdrLine > additionalHdrLines;
- QDict < QString > typeList;
- QDict < QString > dispositionList;
- QCString contentType;
- QCString _contentDisposition;
- QCString contentEncoding;
- QCString _contentDescription;
- QCString contentID;
- QCString contentMD5;
+ TQPtrList < mimeHdrLine > additionalHdrLines;
+ TQDict < TQString > typeList;
+ TQDict < TQString > dispositionList;
+ TQCString contentType;
+ TQCString _contentDisposition;
+ TQCString contentEncoding;
+ TQCString _contentDescription;
+ TQCString contentID;
+ TQCString contentMD5;
unsigned long contentLength;
- QCString mimeContent;
- QCString preMultipartBody;
- QCString postMultipartBody;
+ TQCString mimeContent;
+ TQCString preMultipartBody;
+ TQCString postMultipartBody;
mimeHeader *nestedMessage;
- QPtrList < mimeHeader > nestedParts;
- QString partSpecifier;
+ TQPtrList < mimeHeader > nestedParts;
+ TQString partSpecifier;
};
diff --git a/kioslaves/imap4/mimeio.cc b/kioslaves/imap4/mimeio.cc
index 7a41c843..5adf28f9 100644
--- a/kioslaves/imap4/mimeio.cc
+++ b/kioslaves/imap4/mimeio.cc
@@ -31,7 +31,7 @@ mimeIO::~mimeIO ()
}
int
-mimeIO::inputLine (QCString & aLine)
+mimeIO::inputLine (TQCString & aLine)
{
char input;
@@ -47,7 +47,7 @@ mimeIO::inputLine (QCString & aLine)
}
int
-mimeIO::outputLine (const QCString & aLine, int len)
+mimeIO::outputLine (const TQCString & aLine, int len)
{
int i;
@@ -62,10 +62,10 @@ mimeIO::outputLine (const QCString & aLine, int len)
}
int
-mimeIO::outputMimeLine (const QCString & inLine)
+mimeIO::outputMimeLine (const TQCString & inLine)
{
int retVal = 0;
- QCString aLine = inLine;
+ TQCString aLine = inLine;
int len = inLine.length();
int theLF = aLine.findRev ('\n');
@@ -127,7 +127,7 @@ mimeIO::setCRLF (const char *aCRLF)
crlfLen = strlen(aCRLF);
}
-mimeIOQFile::mimeIOQFile (const QString & aName):
+mimeIOQFile::mimeIOQFile (const TQString & aName):
mimeIO (),
myFile (aName)
{
@@ -140,13 +140,13 @@ mimeIOQFile::~mimeIOQFile ()
}
int
-mimeIOQFile::outputLine (const QCString &, int)
+mimeIOQFile::outputLine (const TQCString &, int)
{
return 0;
}
int
-mimeIOQFile::inputLine (QCString & data)
+mimeIOQFile::inputLine (TQCString & data)
{
data.resize( 1024 );
myFile.readLine (data.data(), 1024);
@@ -163,7 +163,7 @@ mimeIOQString::~mimeIOQString ()
}
int
-mimeIOQString::outputLine (const QCString & _str, int len)
+mimeIOQString::outputLine (const TQCString & _str, int len)
{
if (len == -1) {
len = _str.length();
@@ -173,7 +173,7 @@ mimeIOQString::outputLine (const QCString & _str, int len)
}
int
-mimeIOQString::inputLine (QCString & _str)
+mimeIOQString::inputLine (TQCString & _str)
{
if (theString.isEmpty ())
return 0;
diff --git a/kioslaves/imap4/mimeio.h b/kioslaves/imap4/mimeio.h
index 0de2fbd4..e14861a8 100644
--- a/kioslaves/imap4/mimeio.h
+++ b/kioslaves/imap4/mimeio.h
@@ -18,8 +18,8 @@
#ifndef MIMEIO_H
#define MIMEIO_H
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqfile.h>
/**
*@author Sven Carstens
@@ -31,29 +31,29 @@ public:
mimeIO ();
virtual ~ mimeIO ();
- virtual int outputLine (const QCString &, int len = -1);
- virtual int outputMimeLine (const QCString &);
- virtual int inputLine (QCString &);
+ virtual int outputLine (const TQCString &, int len = -1);
+ virtual int outputMimeLine (const TQCString &);
+ virtual int inputLine (TQCString &);
virtual int outputChar (char);
virtual int inputChar (char &);
void setCRLF (const char *);
protected:
- QCString theCRLF;
+ TQCString theCRLF;
int crlfLen;
};
class mimeIOQFile:public mimeIO
{
public:
- mimeIOQFile (const QString &);
+ mimeIOQFile (const TQString &);
virtual ~ mimeIOQFile ();
- virtual int outputLine (const QCString &, int len = -1);
- virtual int inputLine (QCString &);
+ virtual int outputLine (const TQCString &, int len = -1);
+ virtual int inputLine (TQCString &);
protected:
- QFile myFile;
+ TQFile myFile;
};
class mimeIOQString:public mimeIO
@@ -61,19 +61,19 @@ class mimeIOQString:public mimeIO
public:
mimeIOQString ();
virtual ~ mimeIOQString ();
- virtual int outputLine (const QCString &, int len = -1);
- virtual int inputLine (QCString &);
- const QString& getString () const
+ virtual int outputLine (const TQCString &, int len = -1);
+ virtual int inputLine (TQCString &);
+ const TQString& getString () const
{
return theString;
}
- void setString (const QString & _str)
+ void setString (const TQString & _str)
{
theString = _str;
}
protected:
- QString theString;
+ TQString theString;
};
#endif
diff --git a/kioslaves/imap4/rfcdecoder.cc b/kioslaves/imap4/rfcdecoder.cc
index 0e2bc9f7..0aa237d6 100644
--- a/kioslaves/imap4/rfcdecoder.cc
+++ b/kioslaves/imap4/rfcdecoder.cc
@@ -28,9 +28,9 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qtextcodec.h>
-#include <qbuffer.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
#include <kmdcodec.h>
// This part taken from rfc 2192 IMAP URL Scheme. C. Newman. September 1997.
@@ -52,14 +52,14 @@ static unsigned char base64chars[] =
/* Convert an IMAP mailbox to a Unicode path
*/
-QString rfcDecoder::fromIMAP (const QString & inSrc)
+TQString rfcDecoder::fromIMAP (const TQString & inSrc)
{
unsigned char c, i, bitcount;
unsigned long ucs4, utf16, bitbuf;
unsigned char base64[256], utf8[6];
unsigned long srcPtr = 0;
- QCString dst;
- QCString src = inSrc.ascii ();
+ TQCString dst;
+ TQCString src = inSrc.ascii ();
uint srcLen = inSrc.length();
/* initialize modified base64 decoding table */
@@ -151,14 +151,14 @@ QString rfcDecoder::fromIMAP (const QString & inSrc)
++srcPtr;
}
}
- return QString::fromUtf8 (dst.data ());
+ return TQString::fromUtf8 (dst.data ());
}
/* replace " with \" and \ with \\ " and \ characters */
-QString rfcDecoder::quoteIMAP(const QString &src)
+TQString rfcDecoder::quoteIMAP(const TQString &src)
{
uint len = src.length();
- QString result;
+ TQString result;
result.reserve(2 * len);
for (unsigned int i = 0; i < len; i++)
{
@@ -172,12 +172,12 @@ QString rfcDecoder::quoteIMAP(const QString &src)
/* Convert Unicode path to modified UTF-7 IMAP mailbox
*/
-QString rfcDecoder::toIMAP (const QString & inSrc)
+TQString rfcDecoder::toIMAP (const TQString & inSrc)
{
unsigned int utf8pos, utf8total, c, utf7mode, bitstogo, utf16flag;
unsigned long ucs4, bitbuf;
- QCString src = inSrc.utf8 ();
- QString dst;
+ TQCString src = inSrc.utf8 ();
+ TQString dst;
ulong srcPtr = 0;
utf7mode = 0;
@@ -292,9 +292,9 @@ QString rfcDecoder::toIMAP (const QString & inSrc)
}
//-----------------------------------------------------------------------------
-QString rfcDecoder::decodeQuoting(const QString &aStr)
+TQString rfcDecoder::decodeQuoting(const TQString &aStr)
{
- QString result;
+ TQString result;
unsigned int strLength(aStr.length());
for (unsigned int i = 0; i < strLength ; i++)
{
@@ -305,46 +305,46 @@ QString rfcDecoder::decodeQuoting(const QString &aStr)
}
//-----------------------------------------------------------------------------
-QTextCodec *
-rfcDecoder::codecForName (const QString & _str)
+TQTextCodec *
+rfcDecoder::codecForName (const TQString & _str)
{
if (_str.isEmpty ())
return NULL;
- return QTextCodec::codecForName (_str.lower ().
+ return TQTextCodec::codecForName (_str.lower ().
replace ("windows", "cp").latin1 ());
}
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2047String (const QString & _str)
+rfcDecoder::decodeRFC2047String (const TQString & _str)
{
- QString throw_away;
+ TQString throw_away;
return decodeRFC2047String (_str, throw_away);
}
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset)
+rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset)
{
- QString throw_away;
+ TQString throw_away;
return decodeRFC2047String (_str, charset, throw_away);
}
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
- QString & language)
+rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset,
+ TQString & language)
{
//do we have a rfc string
if (_str.find("=?") < 0)
return _str;
- QCString aStr = _str.ascii (); // QString.length() means Unicode chars
- QCString result;
+ TQCString aStr = _str.ascii (); // TQString.length() means Unicode chars
+ TQCString result;
char *pos, *beg, *end, *mid = NULL;
- QCString str;
+ TQCString str;
char encoding = 0, ch;
bool valid;
const int maxLen = 200;
@@ -370,7 +370,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
valid = FALSE;
else
{
- charset = QCString (beg, i - 1); // -2 + 1 for the zero
+ charset = TQCString (beg, i - 1); // -2 + 1 for the zero
int pt = charset.findRev('*');
if (pt != -1)
{
@@ -407,7 +407,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
{
ch = *pos;
*pos = '\0';
- str = QCString (mid).left ((int) (mid - pos - 1));
+ str = TQCString (mid).left ((int) (mid - pos - 1));
if (encoding == 'Q')
{
// decode quoted printable text
@@ -427,7 +427,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
*pos = ch;
int len = str.length();
for (i = 0; i < len; i++)
- result += (char) (QChar) str[i];
+ result += (char) (TQChar) str[i];
pos = end - 1;
}
@@ -443,7 +443,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
}
if (!charset.isEmpty ())
{
- QTextCodec *aCodec = codecForName (charset.ascii ());
+ TQTextCodec *aCodec = codecForName (charset.ascii ());
if (aCodec)
{
// kdDebug(7116) << "Codec is " << aCodec->name() << endl;
@@ -458,7 +458,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
const char especials[17] = "()<>@,;:\"/[]?.= ";
const QString
-rfcDecoder::encodeRFC2047String (const QString & _str)
+rfcDecoder::encodeRFC2047String (const TQString & _str)
{
if (_str.isEmpty ())
return _str;
@@ -468,7 +468,7 @@ rfcDecoder::encodeRFC2047String (const QString & _str)
int rptr = 0;
// My stats show this number results in 12 resize() out of 73,000
int resultLen = 3 * _str.length() / 2;
- QCString result(resultLen);
+ TQCString result(resultLen);
while (*latin)
{
@@ -572,7 +572,7 @@ rfcDecoder::encodeRFC2047String (const QString & _str)
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::encodeRFC2231String (const QString & _str)
+rfcDecoder::encodeRFC2231String (const TQString & _str)
{
if (_str.isEmpty ())
return _str;
@@ -593,7 +593,7 @@ rfcDecoder::encodeRFC2231String (const QString & _str)
free(latin);
return _str.ascii ();
}
- QCString result;
+ TQCString result;
l = latin;
while (*l)
{
@@ -626,7 +626,7 @@ rfcDecoder::encodeRFC2231String (const QString & _str)
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2231String (const QString & _str)
+rfcDecoder::decodeRFC2231String (const TQString & _str)
{
int p = _str.find ('\'');
@@ -641,9 +641,9 @@ rfcDecoder::decodeRFC2231String (const QString & _str)
return _str;
//first is charset or empty
- QString charset = _str.left (p);
- QString st = _str.mid (l + 1);
- QString language = _str.mid (p + 1, l - p - 1);
+ TQString charset = _str.left (p);
+ TQString st = _str.mid (l + 1);
+ TQString language = _str.mid (p + 1, l - p - 1);
//kdDebug(7116) << "Charset: " << charset << " Language: " << language << endl;
diff --git a/kioslaves/imap4/rfcdecoder.h b/kioslaves/imap4/rfcdecoder.h
index 1df5c0da..98a34dc7 100644
--- a/kioslaves/imap4/rfcdecoder.h
+++ b/kioslaves/imap4/rfcdecoder.h
@@ -23,7 +23,7 @@
*
*********************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
class QTextCodec;
@@ -40,50 +40,50 @@ public:
/** Convert an IMAP mailbox to a Unicode path
*/
- static QString fromIMAP (const QString & src);
+ static TQString fromIMAP (const TQString & src);
/** Convert Unicode path to modified UTF-7 IMAP mailbox
*/
- static QString toIMAP (const QString & inSrc);
+ static TQString toIMAP (const TQString & inSrc);
/** replace " with \" and \ with \\ " and \ characters */
- static QString quoteIMAP (const QString & src);
+ static TQString quoteIMAP (const TQString & src);
/** remove \ from a string
* @bug I'm pretty sure this doesn't do what the author meant it to do
*/
- static QString decodeQuoting(const QString &aStr);
+ static TQString decodeQuoting(const TQString &aStr);
/**
* fetch a codec by name
* @return Text Codec object
*/
- static QTextCodec *codecForName (const QString &);
+ static TQTextCodec *codecForName (const TQString &);
// decoder for RFC2047 and RFC1522
/** decode a RFC2047 String */
- static const QString decodeRFC2047String (const QString & _str,
- QString & charset,
- QString & language);
+ static const TQString decodeRFC2047String (const TQString & _str,
+ TQString & charset,
+ TQString & language);
/** decode a RFC2047 String */
- static const QString decodeRFC2047String (const QString & _str,
- QString & charset);
+ static const TQString decodeRFC2047String (const TQString & _str,
+ TQString & charset);
/** decode a RFC2047 String */
- static const QString decodeRFC2047String (const QString & _str);
+ static const TQString decodeRFC2047String (const TQString & _str);
// encoder for RFC2047 and RFC1522
/** encode a RFC2047 String */
- static const QString encodeRFC2047String (const QString & _str,
- QString & charset,
- QString & language);
+ static const TQString encodeRFC2047String (const TQString & _str,
+ TQString & charset,
+ TQString & language);
/** encode a RFC2047 String */
- static const QString encodeRFC2047String (const QString & _str,
- QString & charset);
+ static const TQString encodeRFC2047String (const TQString & _str,
+ TQString & charset);
/** encode a RFC2047 String */
- static const QString encodeRFC2047String (const QString & _str);
+ static const TQString encodeRFC2047String (const TQString & _str);
/** encode a RFC2231 String */
- static const QString encodeRFC2231String (const QString & _str);
+ static const TQString encodeRFC2231String (const TQString & _str);
/** decode a RFC2231 String */
- static const QString decodeRFC2231String (const QString & _str);
+ static const TQString decodeRFC2231String (const TQString & _str);
};
#endif
diff --git a/kioslaves/imap4/selectinfo.h b/kioslaves/imap4/selectinfo.h
index c059a952..bf75a85b 100644
--- a/kioslaves/imap4/selectinfo.h
+++ b/kioslaves/imap4/selectinfo.h
@@ -23,8 +23,8 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
//class handling the info we get on EXAMINE and SELECT
class imapInfo
@@ -32,11 +32,11 @@ class imapInfo
public:
imapInfo ();
- imapInfo (const QStringList &);
+ imapInfo (const TQStringList &);
imapInfo (const imapInfo &);
imapInfo & operator = (const imapInfo &);
- ulong _flags (const QString &) const;
+ ulong _flags (const TQString &) const;
void setCount (ulong l)
{
@@ -74,7 +74,7 @@ public:
flags_ = l;
}
- void setFlags (const QString & inFlag)
+ void setFlags (const TQString & inFlag)
{
flagsAvailable_ = true;
flags_ = _flags (inFlag);
@@ -86,7 +86,7 @@ public:
permanentFlags_ = l;
}
- void setPermanentFlags (const QString & inFlag)
+ void setPermanentFlags (const TQString & inFlag)
{
permanentFlagsAvailable_ = true;
permanentFlags_ = _flags (inFlag);
diff --git a/kioslaves/mbox/mbox.cc b/kioslaves/mbox/mbox.cc
index 8ad8d09a..1828401b 100644
--- a/kioslaves/mbox/mbox.cc
+++ b/kioslaves/mbox/mbox.cc
@@ -22,8 +22,8 @@
#include "stat.h"
#include "urlinfo.h"
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -58,7 +58,7 @@ int kdemain( int argc, char * argv[] )
return 0;
}
-MBoxProtocol::MBoxProtocol( const QCString& arg1, const QCString& arg2 )
+MBoxProtocol::MBoxProtocol( const TQCString& arg1, const TQCString& arg2 )
: KIO::SlaveBase( "mbox2", arg1, arg2 ),
m_errorState( true )
{
@@ -74,8 +74,8 @@ void MBoxProtocol::get( const KURL& url )
m_errorState = false;
UrlInfo info( url, UrlInfo::message );
- QString line;
- QByteArray ba_line;
+ TQString line;
+ TQByteArray ba_line;
if( info.type() == UrlInfo::invalid && !m_errorState )
{
@@ -89,7 +89,7 @@ void MBoxProtocol::get( const KURL& url )
{
line = mbox.currentLine();
line += '\n';
- ba_line = QCString( line.utf8() );
+ ba_line = TQCString( line.utf8() );
ba_line.truncate( ba_line.size() - 1 ); //Removing training '\0'
data( ba_line );
mbox.nextLine();
@@ -97,7 +97,7 @@ void MBoxProtocol::get( const KURL& url )
if( !m_errorState )
{
- data( QByteArray() );
+ data( TQByteArray() );
finished();
}
}
@@ -160,7 +160,7 @@ void MBoxProtocol::mimetype( const KURL& url )
finished();
}
-void MBoxProtocol::emitError( int errno, const QString& arg )
+void MBoxProtocol::emitError( int errno, const TQString& arg )
{
m_errorState = true;
error( errno, arg );
diff --git a/kioslaves/mbox/mbox.h b/kioslaves/mbox/mbox.h
index 4d3768bd..c8741bf2 100644
--- a/kioslaves/mbox/mbox.h
+++ b/kioslaves/mbox/mbox.h
@@ -34,7 +34,7 @@ public:
/**
* Constructor, for the parameters, See KIO::SlaveBase
*/
- MBoxProtocol( const QCString&, const QCString& );
+ MBoxProtocol( const TQCString&, const TQCString& );
/**
* Empty destructor
*/
@@ -72,7 +72,7 @@ public:
* @param errno The error number to be thrown
* @param arg The argument of the error message of the error number.
*/
- void emitError( int errno, const QString& arg );
+ void emitError( int errno, const TQString& arg );
private:
bool m_errorState;
};
diff --git a/kioslaves/mbox/readmbox.cc b/kioslaves/mbox/readmbox.cc
index c7513c6e..35b24db4 100644
--- a/kioslaves/mbox/readmbox.cc
+++ b/kioslaves/mbox/readmbox.cc
@@ -26,10 +26,10 @@
#include <kdebug.h>
#include <kio/global.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -41,8 +41,8 @@ ReadMBox::ReadMBox( const UrlInfo* info, MBoxProtocol* parent, bool onlynew, boo
: MBoxFile( info, parent ),
m_file( 0 ),
m_stream( 0 ),
- m_current_line( new QString( QString::null ) ),
- m_current_id( new QString( QString::null ) ),
+ m_current_line( new TQString( TQString::null ) ),
+ m_current_id( new TQString( TQString::null ) ),
m_atend( true ),
m_prev_time( 0 ),
m_only_new( onlynew ),
@@ -69,12 +69,12 @@ ReadMBox::~ReadMBox()
close();
}
-QString ReadMBox::currentLine() const
+TQString ReadMBox::currentLine() const
{
return *m_current_line;
}
-QString ReadMBox::currentID() const
+TQString ReadMBox::currentID() const
{
return *m_current_id;
}
@@ -88,7 +88,7 @@ bool ReadMBox::nextLine()
m_atend = m_current_line->isNull();
if( m_atend ) // Cursor was at EOF
{
- *m_current_id = QString::null;
+ *m_current_id = TQString::null;
m_prev_status = m_status;
return true;
}
@@ -116,7 +116,7 @@ bool ReadMBox::nextLine()
return false;
}
-bool ReadMBox::searchMessage( const QString& id )
+bool ReadMBox::searchMessage( const TQString& id )
{
if( !m_stream )
return false;
@@ -166,7 +166,7 @@ bool ReadMBox::open( bool savetime )
{
if( savetime )
{
- QFileInfo info( m_info->filename() );
+ TQFileInfo info( m_info->filename() );
m_prev_time = new utimbuf;
m_prev_time->actime = info.lastRead().toTime_t();
@@ -176,14 +176,14 @@ bool ReadMBox::open( bool savetime )
if( m_file )
return false; //File already open
- m_file = new QFile( m_info->filename() );
+ m_file = new TQFile( m_info->filename() );
if( !m_file->open( IO_ReadOnly ) )
{
delete m_file;
m_file = 0;
return false;
}
- m_stream = new QTextStream( m_file );
+ m_stream = new TQTextStream( m_file );
skipMessage();
return true;
@@ -199,6 +199,6 @@ void ReadMBox::close()
delete m_file; m_file = 0;
if( m_prev_time )
- utime( QFile::encodeName( m_info->filename() ), m_prev_time );
+ utime( TQFile::encodeName( m_info->filename() ), m_prev_time );
}
diff --git a/kioslaves/mbox/readmbox.h b/kioslaves/mbox/readmbox.h
index 01b813df..6fb7394c 100644
--- a/kioslaves/mbox/readmbox.h
+++ b/kioslaves/mbox/readmbox.h
@@ -53,16 +53,16 @@ public:
/**
* This functions return the current line
- * @return The line last read, or QString::null if there wasn't such last line
+ * @return The line last read, or TQString::null if there wasn't such last line
*/
- QString currentLine() const;
+ TQString currentLine() const;
/**
* This function returns the current id. The id is the first line of an email,
* and is used in filenaming. The id normally starts with "From ".
- * @return The current ID, or QString::null if no id was found yet.
+ * @return The current ID, or TQString::null if no id was found yet.
*/
- QString currentID() const;
+ TQString currentID() const;
/**
* This function reads the next line. The next line can be read by the currentLine()
@@ -78,7 +78,7 @@ public:
* @param id The id of the message to be found.
* @return true if the message was found, false otherwise.
*/
- bool searchMessage( const QString& id );
+ bool searchMessage( const TQString& id );
/**
* Skips all lines which belongs to the current message. The cursor is on the first line
@@ -117,10 +117,10 @@ private:
void close();
private:
- QFile* m_file;
- QTextStream* m_stream;
- QString* m_current_line;
- QString* m_current_id;
+ TQFile* m_file;
+ TQTextStream* m_stream;
+ TQString* m_current_line;
+ TQString* m_current_id;
bool m_atend;
struct utimbuf* m_prev_time;
diff --git a/kioslaves/mbox/stat.cc b/kioslaves/mbox/stat.cc
index e3418cbb..c34f0bce 100644
--- a/kioslaves/mbox/stat.cc
+++ b/kioslaves/mbox/stat.cc
@@ -40,7 +40,7 @@ KIO::UDSEntry Stat::stat( ReadMBox& mbox, const UrlInfo& info )
{
kdDebug() << "Stat::stat()" << endl;
KIO::UDSEntry entry;
- QString url;
+ TQString url;
if( info.type() == UrlInfo::invalid )
return entry;
@@ -50,7 +50,7 @@ KIO::UDSEntry Stat::stat( ReadMBox& mbox, const UrlInfo& info )
Stat::addAtom( entry, KIO::UDS_FILE_TYPE, S_IFREG );
Stat::addAtom( entry, KIO::UDS_MIME_TYPE, "message/rfc822" );
- url = QString( "mbox:%1/%2" ).arg( info.filename(), mbox.currentID() );
+ url = TQString( "mbox:%1/%2" ).arg( info.filename(), mbox.currentID() );
Stat::addAtom( entry, KIO::UDS_URL, url );
if( mbox.currentID().isEmpty() )
Stat::addAtom( entry, KIO::UDS_NAME, "foobar" );
@@ -79,7 +79,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info )
{
kdDebug() << "statMessage( " << info.url() << " )" << endl;
KIO::UDSEntry entry;
- QString url = QString( "mbox:%1" ).arg( info.url() );
+ TQString url = TQString( "mbox:%1" ).arg( info.url() );
//Specific things for a message
Stat::addAtom( entry, KIO::UDS_FILE_TYPE, S_IFREG );
@@ -92,7 +92,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info )
return entry;
}
-void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, const QString& str )
+void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, const TQString& str )
{
KIO::UDSAtom atom;
atom.m_uds = uds;
@@ -107,7 +107,7 @@ void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, long lng )
{
KIO::UDSAtom atom;
atom.m_uds = uds;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = lng;
entry.append( atom );
diff --git a/kioslaves/mbox/stat.h b/kioslaves/mbox/stat.h
index f26f4338..c7474d82 100644
--- a/kioslaves/mbox/stat.h
+++ b/kioslaves/mbox/stat.h
@@ -75,7 +75,7 @@ public:
*/
static KIO::UDSEntry statMessage( const UrlInfo& info );
private:
- static void addAtom( KIO::UDSEntry& entry, unsigned int key, const QString& value );
+ static void addAtom( KIO::UDSEntry& entry, unsigned int key, const TQString& value );
static void addAtom( KIO::UDSEntry& entry, unsigned int key, const long value );
};
diff --git a/kioslaves/mbox/urlinfo.cc b/kioslaves/mbox/urlinfo.cc
index 710dc6f0..2153afb1 100644
--- a/kioslaves/mbox/urlinfo.cc
+++ b/kioslaves/mbox/urlinfo.cc
@@ -21,13 +21,13 @@
#include <kdebug.h>
#include <kurl.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
UrlInfo::UrlInfo( const KURL& url, const UrlType type )
: m_type( invalid ),
- m_filename( new QString ),
- m_id( new QString )
+ m_filename( new TQString ),
+ m_id( new TQString )
{
calculateInfo( url, type );
}
@@ -38,7 +38,7 @@ UrlInfo::~UrlInfo()
delete m_id;
}
-QString UrlInfo::mimetype() const
+TQString UrlInfo::mimetype() const
{
switch( m_type )
{
@@ -52,17 +52,17 @@ QString UrlInfo::mimetype() const
}
}
-QString UrlInfo::filename() const
+TQString UrlInfo::filename() const
{
return *m_filename;
}
-QString UrlInfo::id() const
+TQString UrlInfo::id() const
{
return *m_id;
}
-QString UrlInfo::url() const
+TQString UrlInfo::url() const
{
return *m_filename + "/" + *m_id;
}
@@ -87,8 +87,8 @@ void UrlInfo::calculateInfo( const KURL& url, const UrlType type )
bool UrlInfo::isDirectory( const KURL& url )
{
//Check is url is in the form mbox://{filename}
- QString filename = url.path();
- QFileInfo info;
+ TQString filename = url.path();
+ TQFileInfo info;
//Remove ending /
while( filename.length() > 1 && filename.right( 1 ) == "/" )
@@ -101,7 +101,7 @@ bool UrlInfo::isDirectory( const KURL& url )
//Setting paramaters
*m_filename = filename;
- *m_id = QString::null;
+ *m_id = TQString::null;
m_type = directory;
kdDebug() << "urlInfo::isDirectory( " << url << " )" << endl;
return true;
@@ -109,8 +109,8 @@ bool UrlInfo::isDirectory( const KURL& url )
bool UrlInfo::isMessage( const KURL& url )
{
- QString path = url.path();
- QFileInfo info;
+ TQString path = url.path();
+ TQFileInfo info;
int cutindex = path.findRev( '/' );
//Does it contain at least one /?
diff --git a/kioslaves/mbox/urlinfo.h b/kioslaves/mbox/urlinfo.h
index c3177db5..feebd689 100644
--- a/kioslaves/mbox/urlinfo.h
+++ b/kioslaves/mbox/urlinfo.h
@@ -52,21 +52,21 @@ public:
/**
* @return the mimetype of the url
*/
- QString mimetype() const;
+ TQString mimetype() const;
/**
* @return The location of the mbox-file
*/
- QString filename() const;
+ TQString filename() const;
/**
* @return The id given in the url.
*/
- QString id() const;
+ TQString id() const;
/**
* @return the while url as QString
*/
- QString url() const;
+ TQString url() const;
private:
void calculateInfo( const KURL& url, const UrlType type );
@@ -75,8 +75,8 @@ private:
private:
UrlType m_type;
- QString *m_filename;
- QString *m_id;
+ TQString *m_filename;
+ TQString *m_id;
};
#endif
diff --git a/kioslaves/opengroupware/opengroupware.cpp b/kioslaves/opengroupware/opengroupware.cpp
index 76abeb10..55525aff 100644
--- a/kioslaves/opengroupware/opengroupware.cpp
+++ b/kioslaves/opengroupware/opengroupware.cpp
@@ -84,8 +84,8 @@ int kdemain( int argc, char **argv )
return 0;
}
-OpenGroupware::OpenGroupware( const QCString &protocol, const QCString &pool,
- const QCString &app )
+OpenGroupware::OpenGroupware( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app )
: SlaveBase( protocol, pool, app )
{
}
@@ -103,7 +103,7 @@ void OpenGroupware::get( const KURL &url )
mimeType( "text/plain" );
- QString path = url.path();
+ TQString path = url.path();
debugMessage( "Path: " + path );
if ( path.startsWith( "/freebusy/" ) ) {
@@ -113,7 +113,7 @@ void OpenGroupware::get( const KURL &url )
} else if ( path.startsWith( "/addressbook/" ) ) {
getAddressbook( url );
} else {
- QString error = i18n("Unknown path. Known paths are '/freebusy/', "
+ TQString error = i18n("Unknown path. Known paths are '/freebusy/', "
"'/calendar/' and '/addressbook/'.");
errorMessage( error );
}
@@ -123,16 +123,16 @@ void OpenGroupware::get( const KURL &url )
void OpenGroupware::getFreeBusy( const KURL &url )
{
- QString file = url.filename();
+ TQString file = url.filename();
if ( file.right( 4 ) != ".ifb" ) {
- QString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
+ TQString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
errorMessage( error );
} else {
- QString email = file.left( file.length() - 4 );
+ TQString email = file.left( file.length() - 4 );
debugMessage( "Email: " + email );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " );
debugMessage( "User: " + user );
@@ -146,8 +146,8 @@ void OpenGroupware::getFreeBusy( const KURL &url )
// FIXME get from server
// FIXME: Read range from configuration or URL parameters.
- QDate start = QDate::currentDate().addDays( -3 );
- QDate end = QDate::currentDate().addDays( 60 );
+ TQDate start = TQDate::currentDate().addDays( -3 );
+ TQDate end = TQDate::currentDate().addDays( 60 );
fb->setDtStart( start );
fb->setDtEnd( end );
@@ -157,15 +157,15 @@ void OpenGroupware::getFreeBusy( const KURL &url )
}
#if 0
- QDateTime s = QDateTime( QDate( 2004, 9, 27 ), QTime( 10, 0 ) );
- QDateTime e = QDateTime( QDate( 2004, 9, 27 ), QTime( 11, 0 ) );
+ TQDateTime s = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 10, 0 ) );
+ TQDateTime e = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 11, 0 ) );
fb->addPeriod( s, e );
#endif
KCal::ICalFormat format;
- QString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
+ TQString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
data( ical.utf8() );
@@ -178,10 +178,10 @@ void OpenGroupware::getCalendar( const KURL &_url )
{
KURL url( _url ); // we'll be changing it
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
- QDomDocument props = WebdavHandler::createAllPropsRequest();
+ TQDomDocument props = WebdavHandler::createAllPropsRequest();
debugMessage( "URL: " );
debugMessage( "User: " + user );
@@ -194,8 +194,8 @@ void OpenGroupware::getCalendar( const KURL &_url )
// FIXME do progress handling
mListEventsJob = KIO::davPropFind( url, props, "0", false );
- connect( mListEventsJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotGetCalendarListingResult( KIO::Job * ) ) );
+ connect( mListEventsJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotGetCalendarListingResult( KIO::Job * ) ) );
}
void OpenGroupware::getAddressbook( const KURL &url )
@@ -203,12 +203,12 @@ void OpenGroupware::getAddressbook( const KURL &url )
}
-void OpenGroupware::errorMessage( const QString &msg )
+void OpenGroupware::errorMessage( const TQString &msg )
{
error( KIO::ERR_SLAVE_DEFINED, msg );
}
-void OpenGroupware::debugMessage( const QString &msg )
+void OpenGroupware::debugMessage( const TQString &msg )
{
#if 0
data( ( msg + "\n" ).utf8() );
@@ -228,13 +228,13 @@ void OpenGroupware::slotGetCalendarListingResult( KIO::Job *job )
} else {
kdDebug() << "ResourceSlox::slotResult() success" << endl;
- QDomDocument doc = mListEventsJob->response();
+ TQDomDocument doc = mListEventsJob->response();
}
KCal::ICalFormat format;
KCal::CalendarLocal calendar;
- QString ical = format.toString( &calendar );
+ TQString ical = format.toString( &calendar );
data( ical.utf8() );
diff --git a/kioslaves/opengroupware/opengroupware.h b/kioslaves/opengroupware/opengroupware.h
index 04eadf45..1a7b143e 100644
--- a/kioslaves/opengroupware/opengroupware.h
+++ b/kioslaves/opengroupware/opengroupware.h
@@ -22,7 +22,7 @@
#include <kio/slavebase.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO {
class Job;
@@ -30,18 +30,18 @@ namespace KIO {
}
-class OpenGroupware : public QObject, public KIO::SlaveBase
+class OpenGroupware : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- OpenGroupware( const QCString &protocol, const QCString &pool,
- const QCString &app );
+ OpenGroupware( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app );
void get( const KURL &url );
protected:
- void debugMessage( const QString & );
- void errorMessage( const QString & );
+ void debugMessage( const TQString & );
+ void errorMessage( const TQString & );
void getFreeBusy( const KURL &url );
void getCalendar( const KURL &url );
diff --git a/kioslaves/opengroupware/webdavhandler.cpp b/kioslaves/opengroupware/webdavhandler.cpp
index 68330200..1177624c 100644
--- a/kioslaves/opengroupware/webdavhandler.cpp
+++ b/kioslaves/opengroupware/webdavhandler.cpp
@@ -29,7 +29,7 @@
#include <kdebug.h>
#include <kconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
WebdavHandler::WebdavHandler()
@@ -37,41 +37,41 @@ WebdavHandler::WebdavHandler()
}
-QDomElement WebdavHandler::addElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElement( tag );
+ TQDomElement el = doc.createElement( tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addDavElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addDavElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElementNS( "DAV", tag );
+ TQDomElement el = doc.createElementNS( "DAV", tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addSloxElement( QDomDocument &doc, QDomNode &node,
- const QString &tag,
- const QString &text )
+TQDomElement WebdavHandler::addSloxElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag,
+ const TQString &text )
{
- QDomElement el = doc.createElementNS( "SLOX", tag );
+ TQDomElement el = doc.createElementNS( "SLOX", tag );
if ( !text.isEmpty() ) {
- QDomText textnode = doc.createTextNode( text );
+ TQDomText textnode = doc.createTextNode( text );
el.appendChild( textnode );
}
node.appendChild( el );
return el;
}
-QDomDocument WebdavHandler::createAllPropsRequest()
+TQDomDocument WebdavHandler::createAllPropsRequest()
{
- QDomDocument doc;
+ TQDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addDavElement( doc, prop, "getcontentlength");
WebdavHandler::addDavElement( doc, prop, "getlastmodified" );
WebdavHandler::addDavElement( doc, prop, "displayname" );
diff --git a/kioslaves/opengroupware/webdavhandler.h b/kioslaves/opengroupware/webdavhandler.h
index 3c132081..367ff3aa 100644
--- a/kioslaves/opengroupware/webdavhandler.h
+++ b/kioslaves/opengroupware/webdavhandler.h
@@ -20,10 +20,10 @@
#ifndef WEBDAVHANDLER_H
#define WEBDAVHANDLER_H
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
class WebdavHandler
{
@@ -31,14 +31,14 @@ class WebdavHandler
WebdavHandler();
- static QDomElement addElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addDavElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addSloxElement( QDomDocument &, QDomNode &,
- const QString &tag,
- const QString &text = QString::null );
- static QDomDocument createAllPropsRequest();
+ static TQDomElement addElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addDavElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addSloxElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag,
+ const TQString &text = TQString::null );
+ static TQDomDocument createAllPropsRequest();
};
#endif
diff --git a/kioslaves/sieve/sieve.cpp b/kioslaves/sieve/sieve.cpp
index 012d77d1..9f3b547a 100644
--- a/kioslaves/sieve/sieve.cpp
+++ b/kioslaves/sieve/sieve.cpp
@@ -40,8 +40,8 @@ extern "C" {
#include <kmdcodec.h>
#include <kglobal.h>
-#include <qcstring.h>
-#include <qregexp.h>
+#include <tqcstring.h>
+#include <tqregexp.h>
#include <cstdlib>
using std::exit;
@@ -123,25 +123,25 @@ const uint kio_sieveResponse::getQuantity() const
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getAction() const
+const TQCString& kio_sieveResponse::getAction() const
{
return key;
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getKey() const
+const TQCString& kio_sieveResponse::getKey() const
{
return key;
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getVal() const
+const TQCString& kio_sieveResponse::getVal() const
{
return val;
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getExtra() const
+const TQCString& kio_sieveResponse::getExtra() const
{
return extra;
}
@@ -154,27 +154,27 @@ void kio_sieveResponse::setQuantity(const uint& newQty)
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setAction(const QCString& newAction)
+void kio_sieveResponse::setAction(const TQCString& newAction)
{
rType = ACTION;
key = newAction.copy();
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setKey(const QCString& newKey)
+void kio_sieveResponse::setKey(const TQCString& newKey)
{
rType = KEY_VAL_PAIR;
key = newKey.copy();
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setVal(const QCString& newVal)
+void kio_sieveResponse::setVal(const TQCString& newVal)
{
val = newVal.copy();
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setExtra(const QCString& newExtra)
+void kio_sieveResponse::setExtra(const TQCString& newExtra)
{
extra = newExtra.copy();
}
@@ -183,12 +183,12 @@ void kio_sieveResponse::setExtra(const QCString& newExtra)
void kio_sieveResponse::clear()
{
rType = NONE;
- extra = key = val = QCString("");
+ extra = key = val = TQCString("");
quantity = 0;
}
/* ---------------------------------------------------------------------------------- */
-kio_sieveProtocol::kio_sieveProtocol(const QCString &pool_socket, const QCString &app_socket)
+kio_sieveProtocol::kio_sieveProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: TCPSlaveBase( SIEVE_DEFAULT_PORT, "sieve", pool_socket, app_socket, false)
, m_connMode(NORMAL)
, m_supportsTLS(false)
@@ -204,7 +204,7 @@ kio_sieveProtocol::~kio_sieveProtocol()
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveProtocol::setHost (const QString &host, int port, const QString &user, const QString &pass)
+void kio_sieveProtocol::setHost (const TQString &host, int port, const TQString &user, const TQString &pass)
{
if ( isConnectionValid() &&
( m_sServer != host ||
@@ -258,13 +258,13 @@ bool kio_sieveProtocol::parseCapabilities(bool requestCapabilities/* = false*/)
} else if (r.getKey() == "SASL") {
// Save list of available SASL methods
- m_sasl_caps = QStringList::split(' ', r.getVal());
+ m_sasl_caps = TQStringList::split(' ', r.getVal());
ksDebug() << "Server SASL authentication methods: " << m_sasl_caps.join(", ") << endl;
setMetaData("saslMethods", r.getVal());
} else if (r.getKey() == "SIEVE") {
// Save script capabilities; report back as meta data:
- ksDebug() << "Server script capabilities: " << QStringList::split(' ', r.getVal()).join(", ") << endl;
+ ksDebug() << "Server script capabilities: " << TQStringList::split(' ', r.getVal()).join(", ") << endl;
setMetaData("sieveExtensions", r.getVal());
} else if (r.getKey() == "STARTTLS") {
@@ -293,15 +293,15 @@ bool kio_sieveProtocol::parseCapabilities(bool requestCapabilities/* = false*/)
*/
void kio_sieveProtocol::changeCheck( const KURL &url )
{
- QString auth;
+ TQString auth;
if (!metaData("sasl").isEmpty())
auth = metaData("sasl").upper();
else {
- QString query = url.query();
+ TQString query = url.query();
if ( query.startsWith("?") ) query.remove( 0, 1 );
- QStringList q = QStringList::split( ",", query );
- QStringList::iterator it;
+ TQStringList q = TQStringList::split( ",", query );
+ TQStringList::iterator it;
for ( it = q.begin(); it != q.end(); ++it ) {
if ( ( (*it).section('=',0,0) ).lower() == "x-mech" ) {
@@ -415,10 +415,10 @@ void kio_sieveProtocol::disconnect(bool forcibly)
}*/
/* ---------------------------------------------------------------------------------- */
-void kio_sieveProtocol::special(const QByteArray &data)
+void kio_sieveProtocol::special(const TQByteArray &data)
{
int tmp;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
KURL url;
stream >> tmp;
@@ -452,7 +452,7 @@ bool kio_sieveProtocol::activate(const KURL& url)
infoMessage(i18n("Activating script..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_DOES_NOT_EXIST, url.prettyURL());
@@ -489,7 +489,7 @@ bool kio_sieveProtocol::deactivate()
}
}
-static void append_lf2crlf( QByteArray & out, const QByteArray & in ) {
+static void append_lf2crlf( TQByteArray & out, const TQByteArray & in ) {
if ( in.isEmpty() )
return;
const unsigned int oldOutSize = out.size();
@@ -514,17 +514,17 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
infoMessage(i18n("Sending data..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_MALFORMED_URL, url.prettyURL());
return;
}
- QByteArray data;
+ TQByteArray data;
for (;;) {
dataReq();
- QByteArray buffer;
+ TQByteArray buffer;
const int newSize = readData(buffer);
append_lf2crlf( data, buffer );
if ( newSize < 0 ) {
@@ -552,7 +552,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
#ifndef HAVE_BROKEN_TIMSIEVED
// first, check quota (it's a SHOULD in draft std)
if (!sendData("HAVESPACE \"" + filename.utf8() + "\" "
- + QCString().setNum( bufLen )))
+ + TQCString().setNum( bufLen )))
return;
if (!operationSuccessful()) {
@@ -562,7 +562,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
#endif
if (!sendData("PUTSCRIPT \"" + filename.utf8() + "\" {"
- + QCString().setNum( bufLen ) + "+}"))
+ + TQCString().setNum( bufLen ) + "+}"))
return;
// atEnd() lies so the code below doesn't work.
@@ -612,7 +612,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
* error is reported. */
if (r.getAction().length() > 3) {
// make a copy of the extra info
- QCString extra = r.getAction().right(r.getAction().length() - 3);
+ TQCString extra = r.getAction().right(r.getAction().length() - 3);
// send the extra message off for re-processing
receiveData(false, &extra);
@@ -621,7 +621,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
// length of the error message
uint len = r.getQuantity();
- QCString errmsg(len + 1);
+ TQCString errmsg(len + 1);
read(errmsg.data(), len);
@@ -655,10 +655,10 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
finished();
}
-static void inplace_crlf2lf( QByteArray & in ) {
+static void inplace_crlf2lf( TQByteArray & in ) {
if ( in.isEmpty() )
return;
- QByteArray & out = in; // inplace
+ TQByteArray & out = in; // inplace
const char * s = in.begin();
const char * const end = in.end();
char * d = out.begin();
@@ -680,14 +680,14 @@ void kio_sieveProtocol::get(const KURL& url)
infoMessage(i18n("Retrieving data..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_MALFORMED_URL, url.prettyURL());
return;
}
- //SlaveBase::mimetype( QString("text/plain") ); // "application/sieve");
+ //SlaveBase::mimetype( TQString("text/plain") ); // "application/sieve");
if (!sendData("GETSCRIPT \"" + filename.utf8() + "\""))
return;
@@ -709,7 +709,7 @@ void kio_sieveProtocol::get(const KURL& url)
// ...read data...
// Only read as much as we need, otherwise we slurp in the OK that
// operationSuccessful() is expecting below.
- QByteArray dat( kMin( total_len - recv_len, ssize_t(64 * 1024 )) );
+ TQByteArray dat( kMin( total_len - recv_len, ssize_t(64 * 1024 )) );
ssize_t this_recv_len = read( dat.data(), dat.size() );
if ( this_recv_len < 1 && !isConnectionValid() ) {
@@ -728,7 +728,7 @@ void kio_sieveProtocol::get(const KURL& url)
} while ( recv_len < total_len );
infoMessage(i18n("Finishing up...") );
- data(QByteArray());
+ data(TQByteArray());
if (operationSuccessful())
ksDebug() << "Script retrieval complete." << endl;
@@ -757,7 +757,7 @@ void kio_sieveProtocol::del(const KURL &url, bool isfile)
infoMessage(i18n("Deleting file..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_MALFORMED_URL, url.prettyURL());
@@ -808,7 +808,7 @@ void kio_sieveProtocol::stat(const KURL& url)
UDSEntry entry;
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
UDSAtom atom;
@@ -837,12 +837,12 @@ void kio_sieveProtocol::stat(const KURL& url)
break;
} else
- if (filename == QString::fromUtf8(r.getKey())) {
+ if (filename == TQString::fromUtf8(r.getKey())) {
entry.clear();
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
- atom.m_str = QString::fromUtf8(r.getKey());
+ atom.m_str = TQString::fromUtf8(r.getKey());
entry.append(atom);
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -894,7 +894,7 @@ void kio_sieveProtocol::listDir(const KURL& url)
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
- atom.m_str = QString::fromUtf8(r.getKey());
+ atom.m_str = TQString::fromUtf8(r.getKey());
entry.append(atom);
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -973,7 +973,7 @@ bool kio_sieveProtocol::saslInteract( void *in, AuthInfo &ai )
}
#define SASLERROR error(ERR_COULD_NOT_AUTHENTICATE, i18n("An error occurred during authentication: %1").arg( \
- QString::fromUtf8( sasl_errdetail( conn ) )));
+ TQString::fromUtf8( sasl_errdetail( conn ) )));
bool kio_sieveProtocol::authenticate()
{
@@ -983,7 +983,7 @@ bool kio_sieveProtocol::authenticate()
const char *out = NULL;
uint outlen;
const char *mechusing = NULL;
- QByteArray challenge, tmp;
+ TQByteArray challenge, tmp;
/* Retrieve authentication details from user.
* Note: should this require realm as well as user & pass details
@@ -1010,7 +1010,7 @@ bool kio_sieveProtocol::authenticate()
return false;
}
- QStringList strList;
+ TQStringList strList;
// strList.append("NTLM");
if ( !m_sAuth.isEmpty() )
@@ -1038,20 +1038,20 @@ bool kio_sieveProtocol::authenticate()
ksDebug() << "Preferred authentication method is " << mechusing << "." << endl;
- QString firstCommand = "AUTHENTICATE \"" + QString::fromLatin1( mechusing ) + "\"";
+ TQString firstCommand = "AUTHENTICATE \"" + TQString::fromLatin1( mechusing ) + "\"";
tmp.setRawData( out, outlen );
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
if ( !challenge.isEmpty() ) {
firstCommand += " \"";
- firstCommand += QString::fromLatin1( challenge.data(), challenge.size() );
+ firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() );
firstCommand += "\"";
}
if (!sendData( firstCommand.latin1() ))
return false;
- QCString command;
+ TQCString command;
do {
receiveData();
@@ -1085,7 +1085,7 @@ bool kio_sieveProtocol::authenticate()
KCodecs::base64Decode( tmp, challenge );
tmp.resetRawData( r.getAction().data(), qty );
// ksDebug() << "S: [" << r.getAction() << "]." << endl;
-// ksDebug() << "S-1: [" << QCString(challenge.data(), challenge.size()+1) << "]." << endl;
+// ksDebug() << "S-1: [" << TQCString(challenge.data(), challenge.size()+1) << "]." << endl;
do {
result = sasl_client_step(conn, challenge.isEmpty() ? 0 : challenge.data(),
@@ -1111,8 +1111,8 @@ bool kio_sieveProtocol::authenticate()
tmp.setRawData( out, outlen );
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
- sendData("\"" + QCString( challenge.data(), challenge.size()+1 ) + "\"");
-// ksDebug() << "C: [" << QCString(challenge.data(), challenge.size()+1) << "]." << endl;
+ sendData("\"" + TQCString( challenge.data(), challenge.size()+1 ) + "\"");
+// ksDebug() << "C: [" << TQCString(challenge.data(), challenge.size()+1) << "]." << endl;
// ksDebug() << "C-1: [" << out << "]." << endl;
} while ( true );
@@ -1144,9 +1144,9 @@ void kio_sieveProtocol::mimetype(const KURL & url)
/* --------------------------------------------------------------------------- */
-bool kio_sieveProtocol::sendData(const QCString &data)
+bool kio_sieveProtocol::sendData(const TQCString &data)
{
- QCString write_buf = data + "\r\n";
+ TQCString write_buf = data + "\r\n";
//ksDebug() << "C: " << data << endl;
@@ -1162,9 +1162,9 @@ bool kio_sieveProtocol::sendData(const QCString &data)
}
/* --------------------------------------------------------------------------- */
-bool kio_sieveProtocol::receiveData(bool waitForData, QCString *reparse)
+bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse)
{
- QCString interpret;
+ TQCString interpret;
int start, end;
if (!reparse) {
@@ -1178,7 +1178,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, QCString *reparse)
buffer[SIEVE_DEFAULT_RECIEVE_BUFFER-1] = '\0';
// strip LF/CR
- interpret = QCString(buffer).left(qstrlen(buffer) - 2);
+ interpret = TQCString(buffer).left(qstrlen(buffer) - 2);
} else {
interpret = reparse->copy();
@@ -1252,7 +1252,7 @@ bool kio_sieveProtocol::operationSuccessful()
{
while (receiveData(false)) {
if (r.getType() == kio_sieveResponse::ACTION) {
- QCString response = r.getAction().left(2);
+ TQCString response = r.getAction().left(2);
if (response == "OK") {
return true;
} else if (response == "NO") {
@@ -1266,7 +1266,7 @@ bool kio_sieveProtocol::operationSuccessful()
int kio_sieveProtocol::operationResult()
{
if (r.getType() == kio_sieveResponse::ACTION) {
- QCString response = r.getAction().left(2);
+ TQCString response = r.getAction().left(2);
if (response == "OK") {
return OK;
} else if (response == "NO") {
@@ -1284,12 +1284,12 @@ bool kio_sieveProtocol::requestCapabilitiesAfterStartTLS() const
// Cyrus didn't send CAPABILITIES after STARTTLS until 2.3.11, which is
// not standard conform, but we need to support that anyway.
// m_implementation looks like this 'Cyrus timsieved v2.2.12' for Cyrus btw.
- QRegExp regExp( "Cyrus\\stimsieved\\sv(\\d+)\\.(\\d+)\\.(\\d+)([-\\w]*)", false );
+ TQRegExp regExp( "Cyrus\\stimsieved\\sv(\\d+)\\.(\\d+)\\.(\\d+)([-\\w]*)", false );
if ( regExp.search( m_implementation ) >= 0 ) {
const int major = regExp.cap( 1 ).toInt();
const int minor = regExp.cap( 2 ).toInt();
const int patch = regExp.cap( 3 ).toInt();
- const QString vendor = regExp.cap( 4 );
+ const TQString vendor = regExp.cap( 4 );
if ( major < 2 || (major == 2 && (minor < 3 || (minor == 3 && patch < 11))) || (vendor == "-kolab-nocaps") ) {
ksDebug() << k_funcinfo << "Enabling compat mode for Cyrus < 2.3.11 or Cyrus marked as \"kolab-nocaps\"" << endl;
return true;
diff --git a/kioslaves/sieve/sieve.h b/kioslaves/sieve/sieve.h
index 1e064bbf..f8749f01 100644
--- a/kioslaves/sieve/sieve.h
+++ b/kioslaves/sieve/sieve.h
@@ -19,9 +19,9 @@
#include <kio/tcpslavebase.h>
#include <kio/authinfo.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
class KDESasl;
class KURL;
@@ -36,17 +36,17 @@ public:
const uint& getType() const;
- const QCString& getAction() const;
+ const TQCString& getAction() const;
const uint getQuantity() const;
- const QCString& getKey() const;
- const QCString& getVal() const;
- const QCString& getExtra() const;
+ const TQCString& getKey() const;
+ const TQCString& getVal() const;
+ const TQCString& getExtra() const;
void setQuantity(const uint& quantity);
- void setAction(const QCString& newAction);
- void setKey(const QCString& newKey);
- void setVal(const QCString& newVal);
- void setExtra(const QCString& newExtra);
+ void setAction(const TQCString& newAction);
+ void setKey(const TQCString& newKey);
+ void setVal(const TQCString& newVal);
+ void setExtra(const TQCString& newExtra);
void clear();
@@ -65,7 +65,7 @@ public:
enum connectionModes { NORMAL, CONNECTION_ORIENTED };
enum Results { OK, NO, BYE, OTHER };
- kio_sieveProtocol(const QCString &pool_socket, const QCString &app_socket);
+ kio_sieveProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~kio_sieveProtocol();
virtual void mimetype(const KURL& url);
@@ -77,7 +77,7 @@ public:
virtual void chmod(const KURL& url, int permissions);
virtual void stat(const KURL& url);
- virtual void setHost(const QString &host, int port, const QString &user, const QString &pass);
+ virtual void setHost(const TQString &host, int port, const TQString &user, const TQString &pass);
virtual void openConnection();
virtual void closeConnection();
//virtual void slave_status();
@@ -88,7 +88,7 @@ public:
* 2 - deactivate (all - only one active at any one time) scripts
* 3 - request capabilities, returned as metadata
*/
- virtual void special(const QByteArray &data);
+ virtual void special(const TQByteArray &data);
bool activate(const KURL& url);
bool deactivate();
@@ -98,8 +98,8 @@ protected:
void disconnect(bool forcibly = false);
void changeCheck( const KURL &url );
- bool sendData(const QCString &data);
- bool receiveData(bool waitForData = true, QCString *reparse = 0);
+ bool sendData(const TQCString &data);
+ bool receiveData(bool waitForData = true, TQCString *reparse = 0);
bool operationSuccessful();
int operationResult();
@@ -126,7 +126,7 @@ protected:
private:
bool requestCapabilitiesAfterStartTLS() const;
- QString m_implementation;
+ TQString m_implementation;
};
#endif