summaryrefslogtreecommitdiffstats
path: root/knode/knaccountmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knode/knaccountmanager.cpp')
-rw-r--r--knode/knaccountmanager.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/knode/knaccountmanager.cpp b/knode/knaccountmanager.cpp
index be43e56b0..167a49c65 100644
--- a/knode/knaccountmanager.cpp
+++ b/knode/knaccountmanager.cpp
@@ -14,7 +14,7 @@
#include <stdlib.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
@@ -34,8 +34,8 @@
KWallet::Wallet* KNAccountManager::mWallet = 0;
bool KNAccountManager::mWalletOpenFailed = false;
-KNAccountManager::KNAccountManager(KNGroupManager *gm, QObject * parent, const char * name)
- : QObject(parent, name), gManager(gm), c_urrentAccount(0),
+KNAccountManager::KNAccountManager(KNGroupManager *gm, TQObject * parent, const char * name)
+ : TQObject(parent, name), gManager(gm), c_urrentAccount(0),
mAsyncOpening( false )
{
s_mtp = new KNServerInfo();
@@ -51,7 +51,7 @@ KNAccountManager::KNAccountManager(KNGroupManager *gm, QObject * parent, const c
KNAccountManager::~KNAccountManager()
{
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
delete (*it);
mAccounts.clear();
@@ -63,7 +63,7 @@ KNAccountManager::~KNAccountManager()
void KNAccountManager::prepareShutdown()
{
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
(*it)->saveInfo();
}
@@ -71,16 +71,16 @@ void KNAccountManager::prepareShutdown()
void KNAccountManager::loadAccounts()
{
- QString dir(locateLocal("data","knode/"));
+ TQString dir(locateLocal("data","knode/"));
if (dir.isNull()) {
KNHelper::displayInternalFileError();
return;
}
- QDir d(dir);
+ TQDir d(dir);
KNNntpAccount *a;
- QStringList entries(d.entryList("nntp.*", QDir::Dirs));
+ TQStringList entries(d.entryList("nntp.*", TQDir::Dirs));
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = entries.begin(); it != entries.end(); ++it) {
a = new KNNntpAccount();
if (a->readInfo(dir+(*it) + "/info")) {
@@ -99,7 +99,7 @@ KNNntpAccount* KNAccountManager::account( int id )
{
if ( id <= 0 )
return 0;
- QValueList<KNNntpAccount*>::ConstIterator it;
+ TQValueList<KNNntpAccount*>::ConstIterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
if ( (*it)->id() == id )
return *it;
@@ -117,22 +117,22 @@ void KNAccountManager::setCurrentAccount(KNNntpAccount *a)
bool KNAccountManager::newAccount(KNNntpAccount *a)
{
// find a unused id for the new account...
- QString dir(locateLocal("data","knode/"));
+ TQString dir(locateLocal("data","knode/"));
if (dir.isNull()) {
delete a;
KNHelper::displayInternalFileError();
return false;
}
- QDir d(dir);
- QStringList entries(d.entryList("nntp.*", QDir::Dirs));
+ TQDir d(dir);
+ TQStringList entries(d.entryList("nntp.*", TQDir::Dirs));
int id = 1;
- while (entries.findIndex(QString("nntp.%1").arg(id))!=-1)
+ while (entries.findIndex(TQString("nntp.%1").arg(id))!=-1)
++id;
a->setId(id);
- dir = locateLocal("data",QString("knode/nntp.%1/").arg(a->id()));
+ dir = locateLocal("data",TQString("knode/nntp.%1/").arg(a->id()));
if (!dir.isNull()) {
mAccounts.append(a);
emit(accountAdded(a));
@@ -151,22 +151,22 @@ bool KNAccountManager::removeAccount(KNNntpAccount *a)
if(!a) a=c_urrentAccount;
if(!a) return false;
- QValueList<KNGroup*> lst;
+ TQValueList<KNGroup*> lst;
if(knGlobals.folderManager()->unsentForAccount(a->id()) > 0) {
KMessageBox::sorry(knGlobals.topWidget, i18n("This account cannot be deleted since there are some unsent messages for it."));
}
else if(KMessageBox::warningContinueCancel(knGlobals.topWidget, i18n("Do you really want to delete this account?"),"",KGuiItem(i18n("&Delete"),"editdelete"))==KMessageBox::Continue) {
lst = gManager->groupsOfAccount( a );
- for ( QValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it)->isLocked() ) {
KMessageBox::sorry(knGlobals.topWidget, i18n("At least one group of this account is currently in use.\nThe account cannot be deleted at the moment."));
return false;
}
}
- for ( QValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for ( TQValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it )
gManager->unsubscribeGroup( (*it) );
- QDir dir(a->path());
+ TQDir dir(a->path());
if (dir.exists()) {
const QFileInfoList *list = dir.entryInfoList(); // get list of matching files and delete all
if (list) {
@@ -177,7 +177,7 @@ bool KNAccountManager::removeAccount(KNNntpAccount *a)
}
}
dir.cdUp(); // directory should now be empty, deleting it
- dir.rmdir(QString("nntp.%1/").arg(a->id()));
+ dir.rmdir(TQString("nntp.%1/").arg(a->id()));
}
if(c_urrentAccount==a) setCurrentAccount(0);
@@ -228,7 +228,7 @@ void KNAccountManager::loadPasswordsAsync()
else
mWallet = Wallet::openWallet( Wallet::NetworkWallet(), 0, Wallet::Asynchronous );
if ( mWallet ) {
- connect( mWallet, SIGNAL(walletOpened(bool)), SLOT(slotWalletOpened(bool)) );
+ connect( mWallet, TQT_SIGNAL(walletOpened(bool)), TQT_SLOT(slotWalletOpened(bool)) );
mAsyncOpening = true;
}
else {
@@ -245,7 +245,7 @@ void KNAccountManager::loadPasswordsAsync()
void KNAccountManager::loadPasswords()
{
s_mtp->readPassword();
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
(*it)->readPassword();
emit passwordsChanged();