summaryrefslogtreecommitdiffstats
path: root/knode/kngroup.cpp
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 /knode/kngroup.cpp
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 'knode/kngroup.cpp')
-rw-r--r--knode/kngroup.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/knode/kngroup.cpp b/knode/kngroup.cpp
index 1c8bdfbf1..e55bee10e 100644
--- a/knode/kngroup.cpp
+++ b/knode/kngroup.cpp
@@ -51,15 +51,15 @@ KNGroup::~KNGroup()
}
-QString KNGroup::path()
+TQString KNGroup::path()
{
return p_arent->path();
}
-const QString& KNGroup::name()
+const TQString& KNGroup::name()
{
- static QString ret;
+ static TQString ret;
if(n_ame.isEmpty()) ret=g_roupname;
else ret=n_ame;
return ret;
@@ -75,7 +75,7 @@ void KNGroup::updateListItem()
}
-bool KNGroup::readInfo(const QString &confPath)
+bool KNGroup::readInfo(const TQString &confPath)
{
KSimpleConfig info(confPath);
@@ -90,7 +90,7 @@ bool KNGroup::readInfo(const QString &confPath)
d_ynDataFormat = info.readNumEntry("dynDataFormat",0);
u_seCharset = info.readBoolEntry("useCharset", false);
d_efaultChSet = info.readEntry("defaultChSet").latin1();
- QString s = info.readEntry("status","unknown");
+ TQString s = info.readEntry("status","unknown");
if (s=="readOnly")
s_tatus = readOnly;
else if (s=="postingAllowed")
@@ -104,7 +104,7 @@ bool KNGroup::readInfo(const QString &confPath)
i_dentity=new KNConfig::Identity(false);
i_dentity->loadConfig(&info);
if(!i_dentity->isEmpty()) {
- kdDebug(5003) << "KNGroup::readInfo(const QString &confPath) : using alternative user for " << g_roupname << endl;
+ kdDebug(5003) << "KNGroup::readInfo(const TQString &confPath) : using alternative user for " << g_roupname << endl;
}
else {
delete i_dentity;
@@ -119,7 +119,7 @@ bool KNGroup::readInfo(const QString &confPath)
void KNGroup::saveInfo()
{
- QString dir(path());
+ TQString dir(path());
if (!dir.isNull()) {
KSimpleConfig info(dir+g_roupname+".grpinfo");
@@ -133,7 +133,7 @@ void KNGroup::saveInfo()
info.writeEntry("dynDataFormat", d_ynDataFormat);
info.writeEntry("name", n_ame);
info.writeEntry("useCharset", u_seCharset);
- info.writeEntry("defaultChSet", QString::fromLatin1(d_efaultChSet));
+ info.writeEntry("defaultChSet", TQString::fromLatin1(d_efaultChSet));
switch (s_tatus) {
case unknown: info.writeEntry("status","unknown");
break;
@@ -182,14 +182,14 @@ bool KNGroup::loadHdrs()
}
kdDebug(5003) << "KNGroup::loadHdrs() : loading headers" << endl;
- QCString buff, hdrValue;
+ TQCString buff, hdrValue;
KNFile f;
KQCStringSplitter split;
int cnt=0, id, lines, fileFormatVersion, artNumber;
unsigned int timeT;
KNRemoteArticle *art;
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return false;
@@ -255,7 +255,7 @@ bool KNGroup::loadHdrs()
for (uint i = buff.toUInt(); i > 0; --i) {
buff = f.readLine();
int pos = buff.find(':');
- QCString hdrName = buff.left( pos );
+ TQCString hdrName = buff.left( pos );
// skip headers we already set above and which we actually never should
// find here, but however it still happens... (eg. #101355)
if ( hdrName == "Subject" || hdrName == "From" || hdrName == "Date"
@@ -384,14 +384,14 @@ bool KNGroup::unloadHdrs(bool force)
// Attention: this method is called from the network thread!
-void KNGroup::insortNewHeaders(QStrList *hdrs, QStrList *hdrfmt, KNProtocolClient *client)
+void KNGroup::insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolClient *client)
{
KNRemoteArticle *art=0, *art2=0;
- QCString data, hdr, hdrName;
+ TQCString data, hdr, hdrName;
KQCStringSplitter split;
split.setIncludeSep(false);
int new_cnt=0, added_cnt=0, todo=hdrs->count();
- QTime timer;
+ TQTime timer;
l_astFetchCount=0;
@@ -442,7 +442,7 @@ void KNGroup::insortNewHeaders(QStrList *hdrs, QStrList *hdrfmt, KNProtocolClien
//References
split.next();
if(!split.string().isEmpty())
- art->references()->from7BitString(split.string()); //use QCString::copy() ?
+ art->references()->from7BitString(split.string()); //use TQCString::copy() ?
// Bytes
split.next();
@@ -514,19 +514,19 @@ int KNGroup::saveStaticData(int cnt,bool ovr)
int idx, savedCnt=0, mode;
KNRemoteArticle *art;
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return 0;
- QFile f(dir+g_roupname+".static");
+ TQFile f(dir+g_roupname+".static");
if(ovr) mode=IO_WriteOnly;
else mode=IO_WriteOnly | IO_Append;
if(f.open(mode)) {
- QTextStream ts(&f);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&f);
+ ts.setEncoding(TQTextStream::Latin1);
for(idx=length()-cnt; idx<length(); idx++) {
@@ -557,7 +557,7 @@ int KNGroup::saveStaticData(int cnt,bool ovr)
// optional headers
ts << mOptionalHeaders.count() << '\n';
- for (QCString hdrName = mOptionalHeaders.first(); hdrName; hdrName = mOptionalHeaders.next()) {
+ for (TQCString hdrName = mOptionalHeaders.first(); hdrName; hdrName = mOptionalHeaders.next()) {
hdrName = hdrName.left( hdrName.find(':') );
KMime::Headers::Base *hdr = art->getHeaderByType( hdrName );
if ( hdr )
@@ -583,11 +583,11 @@ void KNGroup::saveDynamicData(int cnt,bool ovr)
KNRemoteArticle *art;
if(length()>0) {
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return;
- QFile f(dir+g_roupname+".dynamic");
+ TQFile f(dir+g_roupname+".dynamic");
if(ovr) mode=IO_WriteOnly;
else mode=IO_WriteOnly | IO_Append;
@@ -616,11 +616,11 @@ void KNGroup::syncDynamicData()
if(length()>0) {
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return;
- QFile f(dir+g_roupname+".dynamic");
+ TQFile f(dir+g_roupname+".dynamic");
if(f.open(IO_ReadWrite)) {
@@ -652,7 +652,7 @@ void KNGroup::syncDynamicData()
}
-void KNGroup::appendXPostID(const QString &id)
+void KNGroup::appendXPostID(const TQString &id)
{
c_rosspostIDBuffer.append(id);
}
@@ -660,11 +660,11 @@ void KNGroup::appendXPostID(const QString &id)
void KNGroup::processXPostBuffer(bool deleteAfterwards)
{
- QStringList remainder;
+ TQStringList remainder;
KNRemoteArticle *xp;
KNRemoteArticle::List al;
- for (QStringList::Iterator it = c_rosspostIDBuffer.begin(); it != c_rosspostIDBuffer.end(); ++it) {
+ for (TQStringList::Iterator it = c_rosspostIDBuffer.begin(); it != c_rosspostIDBuffer.end(); ++it) {
if ((xp=byMessageId((*it).local8Bit())))
al.append(xp);
else
@@ -686,7 +686,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client)
foundCnt=0, bySubCnt=0, refCnt=0,
resortCnt=0, idx, oldRef; // idRef;
KNRemoteArticle *art, *ref;
- QTime timer;
+ TQTime timer;
timer.start();
@@ -869,7 +869,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client)
KNRemoteArticle* KNGroup::findReference(KNRemoteArticle *a)
{
int found=false;
- QCString ref_mid;
+ TQCString ref_mid;
int ref_nr=0;
KNRemoteArticle *ref_art=0;
@@ -936,7 +936,7 @@ void KNGroup::scoreArticles(bool onlynew)
incReadCount();
}
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
//kdDebug(5003) << KNScorableArticle::notifyC->collection() << endl;
@@ -965,7 +965,7 @@ void KNGroup::reorganize()
saveStaticData(length(), true);
saveDynamicData(length(), true);
knGlobals.top->headerView()->repaint();
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
}
@@ -1047,10 +1047,10 @@ int KNGroup::statThrWithUnread()
return cnt;
}
-QString KNGroup::prepareForExecution()
+TQString KNGroup::prepareForExecution()
{
if (knGlobals.groupManager()->loadHeaders(this))
- return QString::null;
+ return TQString::null;
else
return i18n("Cannot load saved headers: %1").arg(groupname());
}