From 86d8364ac704bdc8ad2dfcf52307d9626cfac567 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 25 Jan 2013 00:37:21 -0600 Subject: Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4 --- kmail/popaccount.cpp | 72 ++++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'kmail/popaccount.cpp') diff --git a/kmail/popaccount.cpp b/kmail/popaccount.cpp index 8caba1e44..0d6c6e757 100644 --- a/kmail/popaccount.cpp +++ b/kmail/popaccount.cpp @@ -45,7 +45,7 @@ using KPIM::BroadcastStatus; #include #include #include -using KIO::MetaData; +using TDEIO::MetaData; #include @@ -73,9 +73,9 @@ PopAccount::PopAccount(AccountManager* aOwner, const TQString& aAccountName, uin headersOnServer.setAutoDelete(true); connect(&processMsgsTimer,TQT_SIGNAL(timeout()),TQT_SLOT(slotProcessPendingMsgs())); - KIO::Scheduler::connect( - TQT_SIGNAL(slaveError(KIO::Slave *, int, const TQString &)), - this, TQT_SLOT(slotSlaveError(KIO::Slave *, int, const TQString &))); + TDEIO::Scheduler::connect( + TQT_SIGNAL(slaveError(TDEIO::Slave *, int, const TQString &)), + this, TQT_SLOT(slotSlaveError(TDEIO::Slave *, int, const TQString &))); mHeaderDeleteUids.clear(); mHeaderDownUids.clear(); @@ -150,7 +150,7 @@ void PopAccount::processNewMail(bool _interactive) mAuth != "GSSAPI" ) { TQString passwd = NetworkAccount::passwd(); bool b = storePasswd(); - if (KIO::PasswordDialog::getNameAndPassword(mLogin, passwd, &b, + if (TDEIO::PasswordDialog::getNameAndPassword(mLogin, passwd, &b, i18n("You need to supply a username and a password to access this " "mailbox."), false, TQString(), mName, i18n("Account:")) != TQDialog::Accepted) @@ -168,7 +168,7 @@ void PopAccount::processNewMail(bool _interactive) TQString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" + mHost + ":" + TQString("%1").arg(mPort) ); - KConfig config( seenUidList ); + TDEConfig config( seenUidList ); TQStringList uidsOfSeenMsgs = config.readListEntry( "seenUidList" ); TQValueList timeOfSeenMsgs = config.readIntListEntry( "seenUidTimeList" ); mUidsOfSeenMsgsDict.clear(); @@ -212,7 +212,7 @@ void PopAccount::processNewMail(bool _interactive) //----------------------------------------------------------------------------- -void PopAccount::readConfig(KConfig& config) +void PopAccount::readConfig(TDEConfig& config) { NetworkAccount::readConfig(config); @@ -227,7 +227,7 @@ void PopAccount::readConfig(KConfig& config) //----------------------------------------------------------------------------- -void PopAccount::writeConfig(KConfig& config) +void PopAccount::writeConfig(TDEConfig& config) { NetworkAccount::writeConfig(config); @@ -285,13 +285,13 @@ void PopAccount::setFilterOnServerCheckSize(unsigned int aSize) //----------------------------------------------------------------------------- void PopAccount::connectJob() { - KIO::Scheduler::assignJobToSlave(mSlave, job); - connect(job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)), - TQT_SLOT( slotData( KIO::Job*, const TQByteArray &))); - connect(job, TQT_SIGNAL( result( KIO::Job * ) ), - TQT_SLOT( slotResult( KIO::Job * ) ) ); - connect(job, TQT_SIGNAL(infoMessage( KIO::Job*, const TQString & )), - TQT_SLOT( slotMsgRetrieved(KIO::Job*, const TQString &))); + TDEIO::Scheduler::assignJobToSlave(mSlave, job); + connect(job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray &)), + TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray &))); + connect(job, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotResult( TDEIO::Job * ) ) ); + connect(job, TQT_SIGNAL(infoMessage( TDEIO::Job*, const TQString & )), + TQT_SLOT( slotMsgRetrieved(TDEIO::Job*, const TQString &))); } @@ -410,14 +410,14 @@ void PopAccount::startJob() numBytes = 0; numBytesRead = 0; stage = List; - mSlave = KIO::Scheduler::getConnectedSlave( url, slaveConfig() ); + mSlave = TDEIO::Scheduler::getConnectedSlave( url, slaveConfig() ); if (!mSlave) { - slotSlaveError(0, KIO::ERR_CANNOT_LAUNCH_PROCESS, url.protocol()); + slotSlaveError(0, TDEIO::ERR_CANNOT_LAUNCH_PROCESS, url.protocol()); return; } url.setPath(TQString("/index")); - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); connectJob(); } @@ -441,7 +441,7 @@ MetaData PopAccount::slaveConfig() const { //----------------------------------------------------------------------------- // one message is finished // add data to a KMMessage -void PopAccount::slotMsgRetrieved(KIO::Job*, const TQString & infoMsg) +void PopAccount::slotMsgRetrieved(TDEIO::Job*, const TQString & infoMsg) { if (infoMsg != "message complete") return; KMMessage *msg = new KMMessage; @@ -482,7 +482,7 @@ void PopAccount::slotJobFinished() { mUidsOfNextSeenMsgsDict.resize( KMail::nextPrime( ( idsOfMsgs.count() * 11 ) / 10 ) ); KURL url = getUrl(); url.setPath(TQString("/uidl")); - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); connectJob(); stage = Uidl; } @@ -544,7 +544,7 @@ void PopAccount::slotJobFinished() { } headerIt.toFirst(); url.setPath(TQString("/headers/") + headerIds); - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); connectJob(); slotGetNextHdr(); stage = Head; @@ -560,7 +560,7 @@ void PopAccount::slotJobFinished() { idsOfMsgs = TQStringList( mMsgsPendingDownload.keys() ); KURL url = getUrl(); url.setPath( "/download/" + idsOfMsgs.join(",") ); - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); connectJob(); slotGetNextMsg(); processMsgsTimer.start(processingDelay); @@ -656,7 +656,7 @@ void PopAccount::slotJobFinished() { idsOfMsgs = TQStringList( mMsgsPendingDownload.keys() ); KURL url = getUrl(); url.setPath( "/download/" + idsOfMsgs.join(",") ); - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); connectJob(); slotGetNextMsg(); processMsgsTimer.start(processingDelay); @@ -765,7 +765,7 @@ void PopAccount::slotJobFinished() { url.setPath(TQString("/commit")); kdDebug(5006) << "url: " << url.prettyURL() << endl; } - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); connectJob(); } else if (stage == Dele) { @@ -784,7 +784,7 @@ void PopAccount::slotJobFinished() { .arg( mHost ) ); KURL url = getUrl(); url.setPath(TQString("/commit")); - job = KIO::get( url, false, false ); + job = TDEIO::get( url, false, false ); stage = Quit; connectJob(); } @@ -792,7 +792,7 @@ void PopAccount::slotJobFinished() { kdDebug(5006) << k_funcinfo << "stage == Quit" << endl; saveUidList(); job = 0; - if (mSlave) KIO::Scheduler::disconnectSlave(mSlave); + if (mSlave) TDEIO::Scheduler::disconnectSlave(mSlave); mSlave = 0; stage = Idle; if( mMailCheckProgressItem ) { // do this only once... @@ -842,7 +842,7 @@ void PopAccount::saveUidList() } TQString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" + mHost + ":" + TQString("%1").arg(mPort) ); - KConfig config( seenUidList ); + TDEConfig config( seenUidList ); config.writeEntry( "seenUidList", uidsOfNextSeenMsgs ); config.writeEntry( "seenUidTimeList", seenUidTimeList ); config.writeEntry( "downloadLater", TQStringList( mHeaderLaterUids.keys() ) ); @@ -874,7 +874,7 @@ void PopAccount::slotGetNextMsg() //----------------------------------------------------------------------------- -void PopAccount::slotData( KIO::Job* job, const TQByteArray &data) +void PopAccount::slotData( TDEIO::Job* job, const TQByteArray &data) { if (data.size() == 0) { kdDebug(5006) << "Data: " << endl; @@ -1012,7 +1012,7 @@ void PopAccount::slotData( KIO::Job* job, const TQByteArray &data) } //----------------------------------------------------------------------------- -void PopAccount::slotResult( KIO::Job* ) +void PopAccount::slotResult( TDEIO::Job* ) { if (!job) return; if ( job->error() ) @@ -1021,7 +1021,7 @@ void PopAccount::slotResult( KIO::Job* ) if (headers) { // nothing to be done for headers idsOfMsgs.clear(); } - if (stage == Head && job->error() == KIO::ERR_COULD_NOT_READ) + if (stage == Head && job->error() == TDEIO::ERR_COULD_NOT_READ) { KMessageBox::error(0, i18n("Your server does not support the " "TOP command. Therefore it is not possible to fetch the headers " @@ -1041,25 +1041,25 @@ void PopAccount::slotResult( KIO::Job* ) //----------------------------------------------------------------------------- -void PopAccount::slotSlaveError(KIO::Slave *aSlave, int error, +void PopAccount::slotSlaveError(TDEIO::Slave *aSlave, int error, const TQString &errorMsg) { if (aSlave != mSlave) return; - if (error == KIO::ERR_SLAVE_DIED) mSlave = 0; + if (error == TDEIO::ERR_SLAVE_DIED) mSlave = 0; // explicitely disconnect the slave if the connection went down - if ( error == KIO::ERR_CONNECTION_BROKEN && mSlave ) { - KIO::Scheduler::disconnectSlave( mSlave ); + if ( error == TDEIO::ERR_CONNECTION_BROKEN && mSlave ) { + TDEIO::Scheduler::disconnectSlave( mSlave ); mSlave = 0; } if (interactive && kmkernel) { - KMessageBox::error(kmkernel->mainWin(), KIO::buildErrorString(error, errorMsg)); + KMessageBox::error(kmkernel->mainWin(), TDEIO::buildErrorString(error, errorMsg)); } stage = Quit; - if (error == KIO::ERR_COULD_NOT_LOGIN && !mStorePasswd) + if (error == TDEIO::ERR_COULD_NOT_LOGIN && !mStorePasswd) mAskAgain = true; /* We need a timer, otherwise slotSlaveError of the next account is also executed, if it reuses the slave, because the slave member variable -- cgit v1.2.1