From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/accountcombobox.cpp | 30 +- kmail/accountcombobox.h | 6 +- kmail/accountdialog.cpp | 784 ++++++------- kmail/accountdialog.h | 254 ++--- kmail/accountmanager.cpp | 60 +- kmail/accountmanager.h | 16 +- kmail/accountwizard.cpp | 188 +-- kmail/accountwizard.h | 60 +- kmail/acljobs.cpp | 64 +- kmail/acljobs.h | 34 +- kmail/actionscheduler.cpp | 166 +-- kmail/actionscheduler.h | 38 +- kmail/annotationjobs.cpp | 64 +- kmail/annotationjobs.h | 54 +- kmail/antispamconfig.cpp | 20 +- kmail/antispamconfig.h | 28 +- kmail/antispamwizard.cpp | 294 ++--- kmail/antispamwizard.h | 136 +-- kmail/attachmentlistview.cpp | 30 +- kmail/attachmentlistview.h | 10 +- kmail/attachmentstrategy.cpp | 6 +- kmail/attachmentstrategy.h | 2 +- kmail/bodypartformatterfactory.cpp | 14 +- kmail/bodypartformatterfactory.h | 4 +- kmail/bodypartformatterfactory_p.h | 2 +- kmail/bodyvisitor.cpp | 10 +- kmail/bodyvisitor.h | 12 +- kmail/cachedimapjob.cpp | 150 +-- kmail/cachedimapjob.h | 36 +- kmail/callback.cpp | 38 +- kmail/callback.h | 12 +- kmail/chiasmuskeyselector.cpp | 26 +- kmail/chiasmuskeyselector.h | 12 +- kmail/colorlistbox.cpp | 42 +- kmail/colorlistbox.h | 28 +- kmail/compactionjob.cpp | 38 +- kmail/compactionjob.h | 12 +- kmail/composer.h | 30 +- kmail/configuredialog.cpp | 2020 ++++++++++++++++----------------- kmail/configuredialog.h | 10 +- kmail/configuredialog_p.cpp | 164 +-- kmail/configuredialog_p.h | 454 ++++---- kmail/copyfolderjob.cpp | 26 +- kmail/copyfolderjob.h | 10 +- kmail/csshelper.cpp | 12 +- kmail/csshelper.h | 2 +- kmail/customtemplates.cpp | 106 +- kmail/customtemplates.h | 22 +- kmail/dcoptest.cpp | 2 +- kmail/dictionarycombobox.cpp | 26 +- kmail/dictionarycombobox.h | 18 +- kmail/distributionlistdialog.cpp | 48 +- kmail/distributionlistdialog.h | 4 +- kmail/editorwatcher.cpp | 18 +- kmail/editorwatcher.h | 14 +- kmail/encodingdetector.cpp | 78 +- kmail/encodingdetector.h | 26 +- kmail/encodingdetector_ja.cpp | 2 +- kmail/encodingdetector_ja_p.h | 2 +- kmail/expirejob.cpp | 14 +- kmail/expirejob.h | 4 +- kmail/expirypropertiesdialog.cpp | 84 +- kmail/expirypropertiesdialog.h | 36 +- kmail/favoritefolderview.cpp | 160 +-- kmail/favoritefolderview.h | 24 +- kmail/filehtmlwriter.cpp | 14 +- kmail/filehtmlwriter.h | 18 +- kmail/filterimporterexporter.cpp | 60 +- kmail/filterimporterexporter.h | 14 +- kmail/filterlog.cpp | 28 +- kmail/filterlog.h | 18 +- kmail/filterlogdlg.cpp | 114 +- kmail/filterlogdlg.h | 20 +- kmail/folderIface.cpp | 6 +- kmail/folderIface.h | 20 +- kmail/folderdiaacltab.cpp | 186 +-- kmail/folderdiaacltab.h | 34 +- kmail/folderdiaquotatab.cpp | 40 +- kmail/folderdiaquotatab.h | 10 +- kmail/folderdiaquotatab_p.cpp | 34 +- kmail/folderdiaquotatab_p.h | 18 +- kmail/folderjob.cpp | 6 +- kmail/folderjob.h | 24 +- kmail/folderpropertiesdialog.ui.h | 2 +- kmail/folderrequester.cpp | 24 +- kmail/folderrequester.h | 14 +- kmail/foldershortcutdialog.cpp | 28 +- kmail/foldershortcutdialog.h | 2 +- kmail/folderstorage.cpp | 120 +- kmail/folderstorage.h | 52 +- kmail/foldertreebase.cpp | 34 +- kmail/foldertreebase.h | 14 +- kmail/folderviewtooltip.h | 22 +- kmail/globalsettings.cpp | 6 +- kmail/globalsettings.h | 4 +- kmail/headeritem.cpp | 128 +-- kmail/headeritem.h | 52 +- kmail/headerlistquicksearch.cpp | 46 +- kmail/headerlistquicksearch.h | 20 +- kmail/headerstrategy.cpp | 44 +- kmail/headerstrategy.h | 8 +- kmail/headerstyle.cpp | 252 ++-- kmail/headerstyle.h | 6 +- kmail/htmlstatusbar.cpp | 18 +- kmail/htmlstatusbar.h | 12 +- kmail/identitydialog.cpp | 192 ++-- kmail/identitydialog.h | 30 +- kmail/identitydrag.cpp | 16 +- kmail/identitydrag.h | 14 +- kmail/identitylistview.cpp | 10 +- kmail/identitylistview.h | 12 +- kmail/imapaccountbase.cpp | 304 ++--- kmail/imapaccountbase.h | 122 +- kmail/imapjob.cpp | 106 +- kmail/imapjob.h | 18 +- kmail/index.cpp | 88 +- kmail/index.h | 28 +- kmail/interfaces/bodypart.h | 22 +- kmail/interfaces/bodyparturlhandler.h | 10 +- kmail/interfaces/htmlwriter.h | 8 +- kmail/interfaces/rulewidgethandler.h | 44 +- kmail/interfaces/urlhandler.h | 4 +- kmail/isubject.cpp | 6 +- kmail/isubject.h | 4 +- kmail/jobscheduler.cpp | 10 +- kmail/jobscheduler.h | 18 +- kmail/kcm_kmail.cpp | 12 +- kmail/kcursorsaver.h | 16 +- kmail/keyresolver.cpp | 112 +- kmail/keyresolver.h | 42 +- kmail/khtmlparthtmlwriter.cpp | 20 +- kmail/khtmlparthtmlwriter.h | 24 +- kmail/klistboxdialog.cpp | 36 +- kmail/klistboxdialog.h | 22 +- kmail/klistviewindexedsearchline.cpp | 6 +- kmail/klistviewindexedsearchline.h | 8 +- kmail/kmaccount.cpp | 60 +- kmail/kmaccount.h | 64 +- kmail/kmacctcachedimap.cpp | 108 +- kmail/kmacctcachedimap.h | 42 +- kmail/kmacctfolder.h | 2 +- kmail/kmacctimap.cpp | 126 +- kmail/kmacctimap.h | 18 +- kmail/kmacctlocal.cpp | 34 +- kmail/kmacctlocal.h | 18 +- kmail/kmacctmaildir.cpp | 22 +- kmail/kmacctmaildir.h | 10 +- kmail/kmacctseldlg.cpp | 28 +- kmail/kmacctseldlg.h | 2 +- kmail/kmaddrbook.cpp | 36 +- kmail/kmaddrbook.h | 10 +- kmail/kmailIface.h | 128 +-- kmail/kmail_part.cpp | 40 +- kmail/kmail_part.h | 14 +- kmail/kmailicalIface.h | 92 +- kmail/kmailicalifaceimpl.cpp | 438 +++---- kmail/kmailicalifaceimpl.h | 140 +-- kmail/kmatmlistview.cpp | 40 +- kmail/kmatmlistview.h | 30 +- kmail/kmcommands.cpp | 596 +++++----- kmail/kmcommands.h | 246 ++-- kmail/kmcomposewin.cpp | 1226 ++++++++++---------- kmail/kmcomposewin.h | 200 ++-- kmail/kmdebug.h | 8 +- kmail/kmdict.cpp | 2 +- kmail/kmedit.cpp | 162 +-- kmail/kmedit.h | 42 +- kmail/kmfawidgets.cpp | 58 +- kmail/kmfawidgets.h | 22 +- kmail/kmfilter.cpp | 42 +- kmail/kmfilter.h | 20 +- kmail/kmfilteraction.cpp | 448 ++++---- kmail/kmfilteraction.h | 194 ++-- kmail/kmfilterdlg.cpp | 420 +++---- kmail/kmfilterdlg.h | 84 +- kmail/kmfiltermgr.cpp | 58 +- kmail/kmfiltermgr.h | 22 +- kmail/kmfolder.cpp | 168 +-- kmail/kmfolder.h | 82 +- kmail/kmfoldercachedimap.cpp | 500 ++++---- kmail/kmfoldercachedimap.h | 120 +- kmail/kmfoldercombobox.cpp | 62 +- kmail/kmfoldercombobox.h | 18 +- kmail/kmfolderdia.cpp | 204 ++-- kmail/kmfolderdia.h | 52 +- kmail/kmfolderdir.cpp | 56 +- kmail/kmfolderdir.h | 28 +- kmail/kmfolderimap.cpp | 468 ++++---- kmail/kmfolderimap.h | 106 +- kmail/kmfolderindex.cpp | 38 +- kmail/kmfolderindex.h | 2 +- kmail/kmfoldermaildir.cpp | 212 ++-- kmail/kmfoldermaildir.h | 32 +- kmail/kmfoldermbox.cpp | 132 +-- kmail/kmfoldermbox.h | 10 +- kmail/kmfoldermgr.cpp | 86 +- kmail/kmfoldermgr.h | 52 +- kmail/kmfoldernode.cpp | 8 +- kmail/kmfoldernode.h | 22 +- kmail/kmfoldersearch.cpp | 238 ++-- kmail/kmfoldersearch.h | 50 +- kmail/kmfolderseldlg.cpp | 118 +- kmail/kmfolderseldlg.h | 22 +- kmail/kmfoldertree.cpp | 412 +++---- kmail/kmfoldertree.h | 88 +- kmail/kmgroupware.cpp | 4 +- kmail/kmgroupware.h | 4 +- kmail/kmheaders.cpp | 720 ++++++------ kmail/kmheaders.h | 104 +- kmail/kmkernel.cpp | 400 +++---- kmail/kmkernel.h | 172 +-- kmail/kmlineeditspell.cpp | 60 +- kmail/kmlineeditspell.h | 18 +- kmail/kmmainwidget.cpp | 820 ++++++------- kmail/kmmainwidget.h | 80 +- kmail/kmmainwin.cpp | 34 +- kmail/kmmainwin.h | 6 +- kmail/kmmessage.cpp | 710 ++++++------ kmail/kmmessage.h | 276 ++--- kmail/kmmimeparttree.cpp | 106 +- kmail/kmmimeparttree.h | 26 +- kmail/kmmsgbase.cpp | 198 ++-- kmail/kmmsgbase.h | 98 +- kmail/kmmsgdict.cpp | 32 +- kmail/kmmsgdict.h | 8 +- kmail/kmmsginfo.cpp | 70 +- kmail/kmmsginfo.h | 62 +- kmail/kmmsglist.cpp | 6 +- kmail/kmmsglist.h | 4 +- kmail/kmmsgpart.cpp | 132 +-- kmail/kmmsgpart.h | 130 +-- kmail/kmmsgpartdlg.cpp | 148 +-- kmail/kmmsgpartdlg.h | 42 +- kmail/kmpopfiltercnfrmdlg.cpp | 82 +- kmail/kmpopfiltercnfrmdlg.h | 26 +- kmail/kmpopheaders.cpp | 6 +- kmail/kmpopheaders.h | 12 +- kmail/kmreadermainwin.cpp | 100 +- kmail/kmreadermainwin.h | 14 +- kmail/kmreaderwin.cpp | 472 ++++---- kmail/kmreaderwin.h | 102 +- kmail/kmsearchpattern.cpp | 142 +-- kmail/kmsearchpattern.h | 70 +- kmail/kmsearchpatternedit.cpp | 112 +- kmail/kmsearchpatternedit.h | 52 +- kmail/kmsender.cpp | 126 +- kmail/kmsender.h | 28 +- kmail/kmsender_p.h | 30 +- kmail/kmservertest.cpp | 30 +- kmail/kmservertest.h | 38 +- kmail/kmstartup.cpp | 36 +- kmail/kmsystemtray.cpp | 104 +- kmail/kmsystemtray.h | 30 +- kmail/kmtransport.cpp | 256 ++--- kmail/kmtransport.h | 94 +- kmail/korghelper.cpp | 12 +- kmail/kwindowpositioner.cpp | 18 +- kmail/kwindowpositioner.h | 10 +- kmail/listjob.cpp | 36 +- kmail/listjob.h | 18 +- kmail/localsubscriptiondialog.cpp | 18 +- kmail/localsubscriptiondialog.h | 4 +- kmail/mailcomposerIface.h | 20 +- kmail/maildirjob.cpp | 8 +- kmail/maildirjob.h | 2 +- kmail/mailinglist-magic.cpp | 128 +-- kmail/mailinglist-magic.h | 12 +- kmail/mailinglistpropertiesdialog.cpp | 88 +- kmail/mailinglistpropertiesdialog.h | 12 +- kmail/mailserviceimpl.cpp | 42 +- kmail/mailserviceimpl.h | 30 +- kmail/mailsourceviewer.cpp | 20 +- kmail/mailsourceviewer.h | 12 +- kmail/managesievescriptsdialog.cpp | 134 +-- kmail/managesievescriptsdialog.h | 28 +- kmail/managesievescriptsdialog_p.h | 12 +- kmail/mboxjob.cpp | 8 +- kmail/mboxjob.h | 2 +- kmail/messageactions.cpp | 40 +- kmail/messageactions.h | 18 +- kmail/messagecomposer.cpp | 250 ++-- kmail/messagecomposer.h | 76 +- kmail/messagecopyhelper.cpp | 26 +- kmail/messagecopyhelper.h | 18 +- kmail/messageproperty.cpp | 14 +- kmail/messageproperty.h | 14 +- kmail/messagesender.h | 6 +- kmail/networkaccount.cpp | 36 +- kmail/networkaccount.h | 28 +- kmail/newfolderdialog.cpp | 80 +- kmail/newfolderdialog.h | 34 +- kmail/objecttreeparser.cpp | 374 +++--- kmail/objecttreeparser.h | 64 +- kmail/partNode.cpp | 36 +- kmail/partNode.h | 22 +- kmail/partmetadata.h | 24 +- kmail/partnodebodypart.cpp | 24 +- kmail/partnodebodypart.h | 16 +- kmail/popaccount.cpp | 146 +-- kmail/popaccount.h | 68 +- kmail/quotajobs.cpp | 42 +- kmail/quotajobs.h | 46 +- kmail/recipientseditor.cpp | 258 ++--- kmail/recipientseditor.h | 88 +- kmail/recipientseditortest.cpp | 34 +- kmail/recipientseditortest.h | 4 +- kmail/recipientspicker.cpp | 208 ++-- kmail/recipientspicker.h | 86 +- kmail/redirectdialog.cpp | 34 +- kmail/redirectdialog.h | 10 +- kmail/regexplineedit.cpp | 42 +- kmail/regexplineedit.h | 20 +- kmail/renamejob.cpp | 22 +- kmail/renamejob.h | 14 +- kmail/rulewidgethandlermanager.cpp | 680 +++++------ kmail/rulewidgethandlermanager.h | 50 +- kmail/scalix.cpp | 20 +- kmail/scalix.h | 18 +- kmail/searchjob.cpp | 104 +- kmail/searchjob.h | 14 +- kmail/searchwindow.cpp | 236 ++-- kmail/searchwindow.h | 54 +- kmail/secondarywindow.cpp | 2 +- kmail/secondarywindow.h | 2 +- kmail/sieveconfig.cpp | 32 +- kmail/sieveconfig.h | 24 +- kmail/sievedebugdialog.cpp | 54 +- kmail/sievedebugdialog.h | 14 +- kmail/sievejob.cpp | 74 +- kmail/sievejob.h | 52 +- kmail/signatureconfigurator.cpp | 134 +-- kmail/signatureconfigurator.h | 28 +- kmail/simplestringlisteditor.cpp | 100 +- kmail/simplestringlisteditor.h | 44 +- kmail/snippetconfig.h | 26 +- kmail/snippetdlg.cpp | 14 +- kmail/snippetdlg.h | 6 +- kmail/snippetitem.cpp | 28 +- kmail/snippetitem.h | 32 +- kmail/snippetsettings.cpp | 10 +- kmail/snippetsettings.h | 4 +- kmail/snippetwidget.cpp | 298 ++--- kmail/snippetwidget.h | 40 +- kmail/spamheaderanalyzer.cpp | 10 +- kmail/spamheaderanalyzer.h | 16 +- kmail/subscriptiondialog.cpp | 70 +- kmail/subscriptiondialog.h | 34 +- kmail/teehtmlwriter.cpp | 26 +- kmail/teehtmlwriter.h | 12 +- kmail/templateparser.cpp | 306 ++--- kmail/templateparser.h | 30 +- kmail/templatesconfiguration.cpp | 104 +- kmail/templatesconfiguration.h | 22 +- kmail/templatesinsertcommand.cpp | 146 +-- kmail/templatesinsertcommand.h | 6 +- kmail/tests/messagedicttests.cpp | 2 +- kmail/tests/mimelibtests.cpp | 18 +- kmail/tests/mimelibtests.h | 6 +- kmail/tests/utiltests.cpp | 82 +- kmail/tests/utiltests.h | 2 +- kmail/textsource.cpp | 4 +- kmail/textsource.h | 2 +- kmail/transportmanager.cpp | 6 +- kmail/transportmanager.h | 2 +- kmail/undostack.cpp | 6 +- kmail/undostack.h | 10 +- kmail/urlhandlermanager.cpp | 124 +- kmail/urlhandlermanager.h | 8 +- kmail/util.cpp | 50 +- kmail/util.h | 66 +- kmail/vacation.cpp | 142 +-- kmail/vacation.h | 26 +- kmail/vacationdialog.cpp | 60 +- kmail/vacationdialog.h | 26 +- kmail/vcardviewer.cpp | 6 +- kmail/vcardviewer.h | 6 +- kmail/xfaceconfigurator.cpp | 144 +-- kmail/xfaceconfigurator.h | 20 +- 378 files changed, 15546 insertions(+), 15546 deletions(-) (limited to 'kmail') diff --git a/kmail/accountcombobox.cpp b/kmail/accountcombobox.cpp index afa8398e..c89ed360 100644 --- a/kmail/accountcombobox.cpp +++ b/kmail/accountcombobox.cpp @@ -34,13 +34,13 @@ using namespace KMail; -AccountComboBox::AccountComboBox( QWidget* parent, const char* name ) - : QComboBox( parent, name ) +AccountComboBox::AccountComboBox( TQWidget* parent, const char* name ) + : TQComboBox( parent, name ) { - connect( kmkernel->acctMgr(), SIGNAL( accountAdded( KMAccount* ) ), - this, SLOT( slotRefreshAccounts() ) ); - connect( kmkernel->acctMgr(), SIGNAL( accountRemoved( KMAccount* ) ), - this, SLOT( slotRefreshAccounts() ) ); + connect( kmkernel->acctMgr(), TQT_SIGNAL( accountAdded( KMAccount* ) ), + this, TQT_SLOT( slotRefreshAccounts() ) ); + connect( kmkernel->acctMgr(), TQT_SIGNAL( accountRemoved( KMAccount* ) ), + this, TQT_SLOT( slotRefreshAccounts() ) ); slotRefreshAccounts(); } @@ -52,9 +52,9 @@ void AccountComboBox::slotRefreshAccounts() // until clicking OK or Apply. This would make this class much more complex // (this would have to be different depending on whether this combo is in the // configuration dialog or not...) - QStringList accountNames; - QValueList lst = applicableAccounts(); - QValueList::ConstIterator it = lst.begin(); + TQStringList accountNames; + TQValueList lst = applicableAccounts(); + TQValueList::ConstIterator it = lst.begin(); for ( ; it != lst.end() ; ++it ) accountNames.append( (*it)->name() ); kdDebug() << k_funcinfo << accountNames << endl; @@ -67,8 +67,8 @@ void AccountComboBox::slotRefreshAccounts() void AccountComboBox::setCurrentAccount( KMAccount* account ) { int i = 0; - QValueList lst = applicableAccounts(); - QValueList::ConstIterator it = lst.begin(); + TQValueList lst = applicableAccounts(); + TQValueList::ConstIterator it = lst.begin(); for ( ; it != lst.end() ; ++it, ++i ) { if ( (*it) == account ) { setCurrentItem( i ); @@ -80,8 +80,8 @@ void AccountComboBox::setCurrentAccount( KMAccount* account ) KMAccount* AccountComboBox::currentAccount() const { int i = 0; - QValueList lst = applicableAccounts(); - QValueList::ConstIterator it = lst.begin(); + TQValueList lst = applicableAccounts(); + TQValueList::ConstIterator it = lst.begin(); while ( it != lst.end() && i < currentItem() ) { ++it; ++i; @@ -91,9 +91,9 @@ KMAccount* AccountComboBox::currentAccount() const return 0; } -QValueList KMail::AccountComboBox::applicableAccounts() const +TQValueList KMail::AccountComboBox::applicableAccounts() const { - QValueList lst; + TQValueList lst; for( KMAccount *a = kmkernel->acctMgr()->first(); a; a = kmkernel->acctMgr()->next() ) { if ( a && a->type() == "cachedimap" ) { //// ## proko2 hack. Need a list of allowed account types as ctor param diff --git a/kmail/accountcombobox.h b/kmail/accountcombobox.h index 5c8d1bbd..9229cb33 100644 --- a/kmail/accountcombobox.h +++ b/kmail/accountcombobox.h @@ -28,7 +28,7 @@ #ifndef KMAIL_ACCOUNTCOMBOBOX_H #define KMAIL_ACCOUNTCOMBOBOX_H -#include +#include class KMAccount; @@ -44,7 +44,7 @@ class AccountComboBox : public QComboBox Q_OBJECT public: - AccountComboBox( QWidget* parent, const char* name = 0 ); + AccountComboBox( TQWidget* parent, const char* name = 0 ); void setCurrentAccount( KMAccount* account ); KMAccount* currentAccount() const; @@ -52,7 +52,7 @@ public: private slots: void slotRefreshAccounts(); private: - QValueList applicableAccounts() const; + TQValueList applicableAccounts() const; }; diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp index b517925a..6203d3e8 100644 --- a/kmail/accountdialog.cpp +++ b/kmail/accountdialog.cpp @@ -21,20 +21,20 @@ #include "accountdialog.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -85,45 +85,45 @@ namespace KMail { class ProcmailRCParser { public: - ProcmailRCParser(QString fileName = QString::null); + ProcmailRCParser(TQString fileName = TQString::null); ~ProcmailRCParser(); - QStringList getLockFilesList() const { return mLockFiles; } - QStringList getSpoolFilesList() const { return mSpoolFiles; } + TQStringList getLockFilesList() const { return mLockFiles; } + TQStringList getSpoolFilesList() const { return mSpoolFiles; } protected: - void processGlobalLock(const QString&); - void processLocalLock(const QString&); - void processVariableSetting(const QString&, int); - QString expandVars(const QString&); - - QFile mProcmailrc; - QTextStream *mStream; - QStringList mLockFiles; - QStringList mSpoolFiles; - QAsciiDict mVars; + void processGlobalLock(const TQString&); + void processLocalLock(const TQString&); + void processVariableSetting(const TQString&, int); + TQString expandVars(const TQString&); + + TQFile mProcmailrc; + TQTextStream *mStream; + TQStringList mLockFiles; + TQStringList mSpoolFiles; + TQAsciiDict mVars; }; -ProcmailRCParser::ProcmailRCParser(QString fname) +ProcmailRCParser::ProcmailRCParser(TQString fname) : mProcmailrc(fname), - mStream(new QTextStream(&mProcmailrc)) + mStream(new TQTextStream(&mProcmailrc)) { mVars.setAutoDelete(true); // predefined - mVars.insert( "HOME", new QString( QDir::homeDirPath() ) ); + mVars.insert( "HOME", new TQString( TQDir::homeDirPath() ) ); if( !fname || fname.isEmpty() ) { - fname = QDir::homeDirPath() + "/.procmailrc"; + fname = TQDir::homeDirPath() + "/.procmailrc"; mProcmailrc.setName(fname); } - QRegExp lockFileGlobal("^LOCKFILE=", true); - QRegExp lockFileLocal("^:0", true); + TQRegExp lockFileGlobal("^LOCKFILE=", true); + TQRegExp lockFileLocal("^:0", true); if( mProcmailrc.open(IO_ReadOnly) ) { - QString s; + TQString s; while( !mStream->eof() ) { @@ -149,7 +149,7 @@ ProcmailRCParser::ProcmailRCParser(QString fname) } } - QString default_Location = getenv("MAIL"); + TQString default_Location = getenv("MAIL"); if (default_Location.isNull()) { default_Location = _PATH_MAILDIR; @@ -170,17 +170,17 @@ ProcmailRCParser::~ProcmailRCParser() } void -ProcmailRCParser::processGlobalLock(const QString &s) +ProcmailRCParser::processGlobalLock(const TQString &s) { - QString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace()); + TQString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace()); if ( !mLockFiles.contains(val) ) mLockFiles << val; } void -ProcmailRCParser::processLocalLock(const QString &s) +ProcmailRCParser::processLocalLock(const TQString &s) { - QString val; + TQString val; int colonPos = s.findRev(':'); if (colonPos > 0) { // we don't care about the leading one @@ -197,7 +197,7 @@ ProcmailRCParser::processLocalLock(const QString &s) } // parse until we find the spoolfile - QString line, prevLine; + TQString line, prevLine; do { prevLine = line; line = mStream->readLine().stripWhiteSpace(); @@ -238,27 +238,27 @@ ProcmailRCParser::processLocalLock(const QString &s) } void -ProcmailRCParser::processVariableSetting(const QString &s, int eqPos) +ProcmailRCParser::processVariableSetting(const TQString &s, int eqPos) { if( eqPos == -1) return; - QString varName = s.left(eqPos), + TQString varName = s.left(eqPos), varValue = expandVars(s.mid(eqPos + 1).stripWhiteSpace()); - mVars.insert(varName.latin1(), new QString(varValue)); + mVars.insert(varName.latin1(), new TQString(varValue)); } QString -ProcmailRCParser::expandVars(const QString &s) +ProcmailRCParser::expandVars(const TQString &s) { if( s.isEmpty()) return s; - QString expS = s; + TQString expS = s; - QAsciiDictIterator it( mVars ); // iterator for dict + TQAsciiDictIterator it( mVars ); // iterator for dict while ( it.current() ) { - expS.replace(QString::fromLatin1("$") + it.currentKey(), *it.current()); + expS.replace(TQString::fromLatin1("$") + it.currentKey(), *it.current()); ++it; } @@ -267,8 +267,8 @@ ProcmailRCParser::expandVars(const QString &s) -AccountDialog::AccountDialog( const QString & caption, KMAccount *account, - QWidget *parent, const char *name, bool modal ) +AccountDialog::AccountDialog( const TQString & caption, KMAccount *account, + TQWidget *parent, const char *name, bool modal ) : KDialogBase( parent, name, modal, caption, Ok|Cancel|Help, Ok, true ), mAccount( account ), mServerTest( 0 ), @@ -278,10 +278,10 @@ AccountDialog::AccountDialog( const QString & caption, KMAccount *account, mCapaTLS( AllCapa ), mSieveConfigEditor( 0 ) { - mValidator = new QRegExpValidator( QRegExp( "[A-Za-z0-9-_:.]*" ), 0 ); + mValidator = new TQRegExpValidator( TQRegExp( "[A-Za-z0-9-_:.]*" ), 0 ); setHelp("receiving-mail"); - QString accountType = mAccount->type(); + TQString accountType = mAccount->type(); if( accountType == "local" ) { @@ -305,7 +305,7 @@ AccountDialog::AccountDialog( const QString & caption, KMAccount *account, } else { - QString msg = i18n( "Account type is not supported." ); + TQString msg = i18n( "Account type is not supported." ); KMessageBox::information( topLevelWidget(),msg,i18n("Configure Account") ); return; } @@ -324,113 +324,113 @@ AccountDialog::~AccountDialog() void AccountDialog::makeLocalAccountPage() { ProcmailRCParser procmailrcParser; - QFrame *page = makeMainWidget(); - QGridLayout *topLayout = new QGridLayout( page, 12, 3, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQGridLayout *topLayout = new TQGridLayout( page, 12, 3, 0, spacingHint() ); topLayout->addColSpacing( 1, fontMetrics().maxWidth()*15 ); topLayout->setRowStretch( 11, 10 ); topLayout->setColStretch( 1, 10 ); - mLocal.titleLabel = new QLabel( i18n("Account Type: Local Account"), page ); + mLocal.titleLabel = new TQLabel( i18n("Account Type: Local Account"), page ); topLayout->addMultiCellWidget( mLocal.titleLabel, 0, 0, 0, 2 ); - QFont titleFont( mLocal.titleLabel->font() ); + TQFont titleFont( mLocal.titleLabel->font() ); titleFont.setBold( true ); mLocal.titleLabel->setFont( titleFont ); KSeparator *hline = new KSeparator( KSeparator::HLine, page); topLayout->addMultiCellWidget( hline, 1, 1, 0, 2 ); - QLabel *label = new QLabel( i18n("Account &name:"), page ); + TQLabel *label = new TQLabel( i18n("Account &name:"), page ); topLayout->addWidget( label, 2, 0 ); mLocal.nameEdit = new KLineEdit( page ); label->setBuddy( mLocal.nameEdit ); topLayout->addWidget( mLocal.nameEdit, 2, 1 ); - label = new QLabel( i18n("File &location:"), page ); + label = new TQLabel( i18n("File &location:"), page ); topLayout->addWidget( label, 3, 0 ); - mLocal.locationEdit = new QComboBox( true, page ); + mLocal.locationEdit = new TQComboBox( true, page ); label->setBuddy( mLocal.locationEdit ); topLayout->addWidget( mLocal.locationEdit, 3, 1 ); mLocal.locationEdit->insertStringList(procmailrcParser.getSpoolFilesList()); - QPushButton *choose = new QPushButton( i18n("Choo&se..."), page ); + TQPushButton *choose = new TQPushButton( i18n("Choo&se..."), page ); choose->setAutoDefault( false ); - connect( choose, SIGNAL(clicked()), this, SLOT(slotLocationChooser()) ); + connect( choose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLocationChooser()) ); topLayout->addWidget( choose, 3, 2 ); - QButtonGroup *group = new QButtonGroup(i18n("Locking Method"), page ); + TQButtonGroup *group = new TQButtonGroup(i18n("Locking Method"), page ); group->setColumnLayout(0, Qt::Horizontal); group->layout()->setSpacing( 0 ); group->layout()->setMargin( 0 ); - QGridLayout *groupLayout = new QGridLayout( group->layout() ); + TQGridLayout *groupLayout = new TQGridLayout( group->layout() ); groupLayout->setAlignment( Qt::AlignTop ); groupLayout->setSpacing( 6 ); groupLayout->setMargin( 11 ); - mLocal.lockProcmail = new QRadioButton( i18n("Procmail loc&kfile:"), group); + mLocal.lockProcmail = new TQRadioButton( i18n("Procmail loc&kfile:"), group); groupLayout->addWidget(mLocal.lockProcmail, 0, 0); - mLocal.procmailLockFileName = new QComboBox( true, group ); + mLocal.procmailLockFileName = new TQComboBox( true, group ); groupLayout->addWidget(mLocal.procmailLockFileName, 0, 1); mLocal.procmailLockFileName->insertStringList(procmailrcParser.getLockFilesList()); mLocal.procmailLockFileName->setEnabled(false); - QObject::connect(mLocal.lockProcmail, SIGNAL(toggled(bool)), - mLocal.procmailLockFileName, SLOT(setEnabled(bool))); + TQObject::connect(mLocal.lockProcmail, TQT_SIGNAL(toggled(bool)), + mLocal.procmailLockFileName, TQT_SLOT(setEnabled(bool))); - mLocal.lockMutt = new QRadioButton( + mLocal.lockMutt = new TQRadioButton( i18n("&Mutt dotlock"), group); groupLayout->addWidget(mLocal.lockMutt, 1, 0); - mLocal.lockMuttPriv = new QRadioButton( + mLocal.lockMuttPriv = new TQRadioButton( i18n("M&utt dotlock privileged"), group); groupLayout->addWidget(mLocal.lockMuttPriv, 2, 0); - mLocal.lockFcntl = new QRadioButton( + mLocal.lockFcntl = new TQRadioButton( i18n("&FCNTL"), group); groupLayout->addWidget(mLocal.lockFcntl, 3, 0); - mLocal.lockNone = new QRadioButton( + mLocal.lockNone = new TQRadioButton( i18n("Non&e (use with care)"), group); groupLayout->addWidget(mLocal.lockNone, 4, 0); topLayout->addMultiCellWidget( group, 4, 4, 0, 2 ); #if 0 - QHBox* resourceHB = new QHBox( page ); + TQHBox* resourceHB = new TQHBox( page ); resourceHB->setSpacing( 11 ); mLocal.resourceCheck = - new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); + new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); mLocal.resourceClearButton = - new QPushButton( i18n( "Clear" ), resourceHB ); - QWhatsThis::add( mLocal.resourceClearButton, + new TQPushButton( i18n( "Clear" ), resourceHB ); + TQWhatsThis::add( mLocal.resourceClearButton, i18n( "Delete all allocations for the resource represented by this account." ) ); mLocal.resourceClearButton->setEnabled( false ); - connect( mLocal.resourceCheck, SIGNAL( toggled(bool) ), - mLocal.resourceClearButton, SLOT( setEnabled(bool) ) ); - connect( mLocal.resourceClearButton, SIGNAL( clicked() ), - this, SLOT( slotClearResourceAllocations() ) ); + connect( mLocal.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mLocal.resourceClearButton, TQT_SLOT( setEnabled(bool) ) ); + connect( mLocal.resourceClearButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearResourceAllocations() ) ); mLocal.resourceClearPastButton = - new QPushButton( i18n( "Clear Past" ), resourceHB ); + new TQPushButton( i18n( "Clear Past" ), resourceHB ); mLocal.resourceClearPastButton->setEnabled( false ); - connect( mLocal.resourceCheck, SIGNAL( toggled(bool) ), - mLocal.resourceClearPastButton, SLOT( setEnabled(bool) ) ); - QWhatsThis::add( mLocal.resourceClearPastButton, + connect( mLocal.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mLocal.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) ); + TQWhatsThis::add( mLocal.resourceClearPastButton, i18n( "Delete all outdated allocations for the resource represented by this account." ) ); - connect( mLocal.resourceClearPastButton, SIGNAL( clicked() ), - this, SLOT( slotClearPastResourceAllocations() ) ); + connect( mLocal.resourceClearPastButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearPastResourceAllocations() ) ); topLayout->addMultiCellWidget( resourceHB, 5, 5, 0, 2 ); #endif mLocal.includeInCheck = - new QCheckBox( i18n("Include in m&anual mail check"), + new TQCheckBox( i18n("Include in m&anual mail check"), page ); topLayout->addMultiCellWidget( mLocal.includeInCheck, 5, 5, 0, 2 ); mLocal.intervalCheck = - new QCheckBox( i18n("Enable &interval mail checking"), page ); + new TQCheckBox( i18n("Enable &interval mail checking"), page ); topLayout->addMultiCellWidget( mLocal.intervalCheck, 6, 6, 0, 2 ); - connect( mLocal.intervalCheck, SIGNAL(toggled(bool)), - this, SLOT(slotEnableLocalInterval(bool)) ); - mLocal.intervalLabel = new QLabel( i18n("Check inter&val:"), page ); + connect( mLocal.intervalCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotEnableLocalInterval(bool)) ); + mLocal.intervalLabel = new TQLabel( i18n("Check inter&val:"), page ); topLayout->addWidget( mLocal.intervalLabel, 7, 0 ); mLocal.intervalSpin = new KIntNumInput( page ); mLocal.intervalLabel->setBuddy( mLocal.intervalSpin ); @@ -439,98 +439,98 @@ void AccountDialog::makeLocalAccountPage() mLocal.intervalSpin->setValue( defaultmailcheckintervalmin ); topLayout->addWidget( mLocal.intervalSpin, 7, 1 ); - label = new QLabel( i18n("&Destination folder:"), page ); + label = new TQLabel( i18n("&Destination folder:"), page ); topLayout->addWidget( label, 8, 0 ); - mLocal.folderCombo = new QComboBox( false, page ); + mLocal.folderCombo = new TQComboBox( false, page ); label->setBuddy( mLocal.folderCombo ); topLayout->addWidget( mLocal.folderCombo, 8, 1 ); - label = new QLabel( i18n("&Pre-command:"), page ); + label = new TQLabel( i18n("&Pre-command:"), page ); topLayout->addWidget( label, 9, 0 ); mLocal.precommand = new KLineEdit( page ); label->setBuddy( mLocal.precommand ); topLayout->addWidget( mLocal.precommand, 9, 1 ); - mLocal.identityLabel = new QLabel( i18n("Identity:"), page ); + mLocal.identityLabel = new TQLabel( i18n("Identity:"), page ); topLayout->addWidget( mLocal.identityLabel, 10, 0 ); mLocal.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page ); mLocal.identityLabel->setBuddy( mLocal.identityCombo ); topLayout->addWidget( mLocal.identityCombo, 10, 1 ); - connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged())); + connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged())); } void AccountDialog::makeMaildirAccountPage() { ProcmailRCParser procmailrcParser; - QFrame *page = makeMainWidget(); - QGridLayout *topLayout = new QGridLayout( page, 11, 3, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQGridLayout *topLayout = new TQGridLayout( page, 11, 3, 0, spacingHint() ); topLayout->addColSpacing( 1, fontMetrics().maxWidth()*15 ); topLayout->setRowStretch( 11, 10 ); topLayout->setColStretch( 1, 10 ); - mMaildir.titleLabel = new QLabel( i18n("Account Type: Maildir Account"), page ); + mMaildir.titleLabel = new TQLabel( i18n("Account Type: Maildir Account"), page ); topLayout->addMultiCellWidget( mMaildir.titleLabel, 0, 0, 0, 2 ); - QFont titleFont( mMaildir.titleLabel->font() ); + TQFont titleFont( mMaildir.titleLabel->font() ); titleFont.setBold( true ); mMaildir.titleLabel->setFont( titleFont ); - QFrame *hline = new QFrame( page ); - hline->setFrameStyle( QFrame::Sunken | QFrame::HLine ); + TQFrame *hline = new TQFrame( page ); + hline->setFrameStyle( TQFrame::Sunken | TQFrame::HLine ); topLayout->addMultiCellWidget( hline, 1, 1, 0, 2 ); mMaildir.nameEdit = new KLineEdit( page ); topLayout->addWidget( mMaildir.nameEdit, 2, 1 ); - QLabel *label = new QLabel( mMaildir.nameEdit, i18n("Account &name:"), page ); + TQLabel *label = new TQLabel( mMaildir.nameEdit, i18n("Account &name:"), page ); topLayout->addWidget( label, 2, 0 ); - mMaildir.locationEdit = new QComboBox( true, page ); + mMaildir.locationEdit = new TQComboBox( true, page ); topLayout->addWidget( mMaildir.locationEdit, 3, 1 ); mMaildir.locationEdit->insertStringList(procmailrcParser.getSpoolFilesList()); - label = new QLabel( mMaildir.locationEdit, i18n("Folder &location:"), page ); + label = new TQLabel( mMaildir.locationEdit, i18n("Folder &location:"), page ); topLayout->addWidget( label, 3, 0 ); - QPushButton *choose = new QPushButton( i18n("Choo&se..."), page ); + TQPushButton *choose = new TQPushButton( i18n("Choo&se..."), page ); choose->setAutoDefault( false ); - connect( choose, SIGNAL(clicked()), this, SLOT(slotMaildirChooser()) ); + connect( choose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMaildirChooser()) ); topLayout->addWidget( choose, 3, 2 ); #if 0 - QHBox* resourceHB = new QHBox( page ); + TQHBox* resourceHB = new TQHBox( page ); resourceHB->setSpacing( 11 ); mMaildir.resourceCheck = - new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); + new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); mMaildir.resourceClearButton = - new QPushButton( i18n( "Clear" ), resourceHB ); + new TQPushButton( i18n( "Clear" ), resourceHB ); mMaildir.resourceClearButton->setEnabled( false ); - connect( mMaildir.resourceCheck, SIGNAL( toggled(bool) ), - mMaildir.resourceClearButton, SLOT( setEnabled(bool) ) ); - QWhatsThis::add( mMaildir.resourceClearButton, + connect( mMaildir.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mMaildir.resourceClearButton, TQT_SLOT( setEnabled(bool) ) ); + TQWhatsThis::add( mMaildir.resourceClearButton, i18n( "Delete all allocations for the resource represented by this account." ) ); - connect( mMaildir.resourceClearButton, SIGNAL( clicked() ), - this, SLOT( slotClearResourceAllocations() ) ); + connect( mMaildir.resourceClearButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearResourceAllocations() ) ); mMaildir.resourceClearPastButton = - new QPushButton( i18n( "Clear Past" ), resourceHB ); + new TQPushButton( i18n( "Clear Past" ), resourceHB ); mMaildir.resourceClearPastButton->setEnabled( false ); - connect( mMaildir.resourceCheck, SIGNAL( toggled(bool) ), - mMaildir.resourceClearPastButton, SLOT( setEnabled(bool) ) ); - QWhatsThis::add( mMaildir.resourceClearPastButton, + connect( mMaildir.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mMaildir.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) ); + TQWhatsThis::add( mMaildir.resourceClearPastButton, i18n( "Delete all outdated allocations for the resource represented by this account." ) ); - connect( mMaildir.resourceClearPastButton, SIGNAL( clicked() ), - this, SLOT( slotClearPastResourceAllocations() ) ); + connect( mMaildir.resourceClearPastButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearPastResourceAllocations() ) ); topLayout->addMultiCellWidget( resourceHB, 4, 4, 0, 2 ); #endif mMaildir.includeInCheck = - new QCheckBox( i18n("Include in &manual mail check"), page ); + new TQCheckBox( i18n("Include in &manual mail check"), page ); topLayout->addMultiCellWidget( mMaildir.includeInCheck, 4, 4, 0, 2 ); mMaildir.intervalCheck = - new QCheckBox( i18n("Enable &interval mail checking"), page ); + new TQCheckBox( i18n("Enable &interval mail checking"), page ); topLayout->addMultiCellWidget( mMaildir.intervalCheck, 5, 5, 0, 2 ); - connect( mMaildir.intervalCheck, SIGNAL(toggled(bool)), - this, SLOT(slotEnableMaildirInterval(bool)) ); - mMaildir.intervalLabel = new QLabel( i18n("Check inter&val:"), page ); + connect( mMaildir.intervalCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotEnableMaildirInterval(bool)) ); + mMaildir.intervalLabel = new TQLabel( i18n("Check inter&val:"), page ); topLayout->addWidget( mMaildir.intervalLabel, 6, 0 ); mMaildir.intervalSpin = new KIntNumInput( page ); mMaildir.intervalSpin->setRange( GlobalSettings::self()->minimumCheckInterval(), 10000, 1, false ); @@ -539,74 +539,74 @@ void AccountDialog::makeMaildirAccountPage() mMaildir.intervalLabel->setBuddy( mMaildir.intervalSpin ); topLayout->addWidget( mMaildir.intervalSpin, 6, 1 ); - mMaildir.folderCombo = new QComboBox( false, page ); + mMaildir.folderCombo = new TQComboBox( false, page ); topLayout->addWidget( mMaildir.folderCombo, 7, 1 ); - label = new QLabel( mMaildir.folderCombo, + label = new TQLabel( mMaildir.folderCombo, i18n("&Destination folder:"), page ); topLayout->addWidget( label, 7, 0 ); mMaildir.precommand = new KLineEdit( page ); topLayout->addWidget( mMaildir.precommand, 8, 1 ); - label = new QLabel( mMaildir.precommand, i18n("&Pre-command:"), page ); + label = new TQLabel( mMaildir.precommand, i18n("&Pre-command:"), page ); topLayout->addWidget( label, 8, 0 ); - mMaildir.identityLabel = new QLabel( i18n("Identity:"), page ); + mMaildir.identityLabel = new TQLabel( i18n("Identity:"), page ); topLayout->addWidget( mMaildir.identityLabel, 9, 0 ); mMaildir.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page ); mMaildir.identityLabel->setBuddy( mMaildir.identityCombo ); topLayout->addWidget( mMaildir.identityCombo, 9, 1 ); - connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged())); + connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged())); } void AccountDialog::makePopAccountPage() { - QFrame *page = makeMainWidget(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); - mPop.titleLabel = new QLabel( page ); + mPop.titleLabel = new TQLabel( page ); mPop.titleLabel->setText( i18n("Account Type: POP Account") ); - QFont titleFont( mPop.titleLabel->font() ); + TQFont titleFont( mPop.titleLabel->font() ); titleFont.setBold( true ); mPop.titleLabel->setFont( titleFont ); topLayout->addWidget( mPop.titleLabel ); KSeparator *hline = new KSeparator( KSeparator::HLine, page); topLayout->addWidget( hline ); - QTabWidget *tabWidget = new QTabWidget(page); + TQTabWidget *tabWidget = new TQTabWidget(page); topLayout->addWidget( tabWidget ); - QWidget *page1 = new QWidget( tabWidget ); + TQWidget *page1 = new TQWidget( tabWidget ); tabWidget->addTab( page1, i18n("&General") ); - QGridLayout *grid = new QGridLayout( page1, 16, 2, marginHint(), spacingHint() ); + TQGridLayout *grid = new TQGridLayout( page1, 16, 2, marginHint(), spacingHint() ); grid->addColSpacing( 1, fontMetrics().maxWidth()*15 ); grid->setRowStretch( 15, 10 ); grid->setColStretch( 1, 10 ); - QLabel *label = new QLabel( i18n("Account &name:"), page1 ); + TQLabel *label = new TQLabel( i18n("Account &name:"), page1 ); grid->addWidget( label, 0, 0 ); mPop.nameEdit = new KLineEdit( page1 ); label->setBuddy( mPop.nameEdit ); grid->addWidget( mPop.nameEdit, 0, 1 ); - label = new QLabel( i18n("&Login:"), page1 ); - QWhatsThis::add( label, i18n("Your Internet Service Provider gave you a user name which is used to authenticate you with their servers. It usually is the first part of your email address (the part before @).") ); + label = new TQLabel( i18n("&Login:"), page1 ); + TQWhatsThis::add( label, i18n("Your Internet Service Provider gave you a user name which is used to authenticate you with their servers. It usually is the first part of your email address (the part before @).") ); grid->addWidget( label, 1, 0 ); mPop.loginEdit = new KLineEdit( page1 ); label->setBuddy( mPop.loginEdit ); grid->addWidget( mPop.loginEdit, 1, 1 ); - label = new QLabel( i18n("P&assword:"), page1 ); + label = new TQLabel( i18n("P&assword:"), page1 ); grid->addWidget( label, 2, 0 ); mPop.passwordEdit = new KLineEdit( page1 ); - mPop.passwordEdit->setEchoMode( QLineEdit::Password ); + mPop.passwordEdit->setEchoMode( TQLineEdit::Password ); label->setBuddy( mPop.passwordEdit ); grid->addWidget( mPop.passwordEdit, 2, 1 ); - label = new QLabel( i18n("Ho&st:"), page1 ); + label = new TQLabel( i18n("Ho&st:"), page1 ); grid->addWidget( label, 3, 0 ); mPop.hostEdit = new KLineEdit( page1 ); // only letters, digits, '-', '.', ':' (IPv6) and '_' (for Windows @@ -615,16 +615,16 @@ void AccountDialog::makePopAccountPage() label->setBuddy( mPop.hostEdit ); grid->addWidget( mPop.hostEdit, 3, 1 ); - label = new QLabel( i18n("&Port:"), page1 ); + label = new TQLabel( i18n("&Port:"), page1 ); grid->addWidget( label, 4, 0 ); mPop.portEdit = new KLineEdit( page1 ); - mPop.portEdit->setValidator( new QIntValidator(this) ); + mPop.portEdit->setValidator( new TQIntValidator(this) ); label->setBuddy( mPop.portEdit ); grid->addWidget( mPop.portEdit, 4, 1 ); mPop.storePasswordCheck = - new QCheckBox( i18n("Sto&re POP password"), page1 ); - QWhatsThis::add( mPop.storePasswordCheck, + new TQCheckBox( i18n("Sto&re POP password"), page1 ); + TQWhatsThis::add( mPop.storePasswordCheck, i18n("Check this option to have KMail store " "the password.\nIf KWallet is available " "the password will be stored there which is considered " @@ -637,104 +637,104 @@ void AccountDialog::makePopAccountPage() grid->addMultiCellWidget( mPop.storePasswordCheck, 5, 5, 0, 1 ); mPop.leaveOnServerCheck = - new QCheckBox( i18n("Lea&ve fetched messages on the server"), page1 ); - connect( mPop.leaveOnServerCheck, SIGNAL( clicked() ), - this, SLOT( slotLeaveOnServerClicked() ) ); + new TQCheckBox( i18n("Lea&ve fetched messages on the server"), page1 ); + connect( mPop.leaveOnServerCheck, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotLeaveOnServerClicked() ) ); grid->addMultiCellWidget( mPop.leaveOnServerCheck, 6, 6, 0, 1 ); - QHBox *afterDaysBox = new QHBox( page1 ); + TQHBox *afterDaysBox = new TQHBox( page1 ); afterDaysBox->setSpacing( KDialog::spacingHint() ); mPop.leaveOnServerDaysCheck = - new QCheckBox( i18n("Leave messages on the server for"), afterDaysBox ); - connect( mPop.leaveOnServerDaysCheck, SIGNAL( toggled(bool) ), - this, SLOT( slotEnableLeaveOnServerDays(bool)) ); + new TQCheckBox( i18n("Leave messages on the server for"), afterDaysBox ); + connect( mPop.leaveOnServerDaysCheck, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( slotEnableLeaveOnServerDays(bool)) ); mPop.leaveOnServerDaysSpin = new KIntNumInput( afterDaysBox ); mPop.leaveOnServerDaysSpin->setRange( 1, 365, 1, false ); - connect( mPop.leaveOnServerDaysSpin, SIGNAL(valueChanged(int)), - SLOT(slotLeaveOnServerDaysChanged(int))); + connect( mPop.leaveOnServerDaysSpin, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotLeaveOnServerDaysChanged(int))); mPop.leaveOnServerDaysSpin->setValue( 1 ); afterDaysBox->setStretchFactor( mPop.leaveOnServerDaysSpin, 1 ); grid->addMultiCellWidget( afterDaysBox, 7, 7, 0, 1 ); - QHBox *leaveOnServerCountBox = new QHBox( page1 ); + TQHBox *leaveOnServerCountBox = new TQHBox( page1 ); leaveOnServerCountBox->setSpacing( KDialog::spacingHint() ); mPop.leaveOnServerCountCheck = - new QCheckBox( i18n("Keep only the last"), leaveOnServerCountBox ); - connect( mPop.leaveOnServerCountCheck, SIGNAL( toggled(bool) ), - this, SLOT( slotEnableLeaveOnServerCount(bool)) ); + new TQCheckBox( i18n("Keep only the last"), leaveOnServerCountBox ); + connect( mPop.leaveOnServerCountCheck, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( slotEnableLeaveOnServerCount(bool)) ); mPop.leaveOnServerCountSpin = new KIntNumInput( leaveOnServerCountBox ); mPop.leaveOnServerCountSpin->setRange( 1, 999999, 1, false ); - connect( mPop.leaveOnServerCountSpin, SIGNAL(valueChanged(int)), - SLOT(slotLeaveOnServerCountChanged(int))); + connect( mPop.leaveOnServerCountSpin, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotLeaveOnServerCountChanged(int))); mPop.leaveOnServerCountSpin->setValue( 100 ); grid->addMultiCellWidget( leaveOnServerCountBox, 8, 8, 0, 1 ); - QHBox *leaveOnServerSizeBox = new QHBox( page1 ); + TQHBox *leaveOnServerSizeBox = new TQHBox( page1 ); leaveOnServerSizeBox->setSpacing( KDialog::spacingHint() ); mPop.leaveOnServerSizeCheck = - new QCheckBox( i18n("Keep only the last"), leaveOnServerSizeBox ); - connect( mPop.leaveOnServerSizeCheck, SIGNAL( toggled(bool) ), - this, SLOT( slotEnableLeaveOnServerSize(bool)) ); + new TQCheckBox( i18n("Keep only the last"), leaveOnServerSizeBox ); + connect( mPop.leaveOnServerSizeCheck, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( slotEnableLeaveOnServerSize(bool)) ); mPop.leaveOnServerSizeSpin = new KIntNumInput( leaveOnServerSizeBox ); mPop.leaveOnServerSizeSpin->setRange( 1, 999999, 1, false ); mPop.leaveOnServerSizeSpin->setSuffix( i18n(" MB") ); mPop.leaveOnServerSizeSpin->setValue( 10 ); grid->addMultiCellWidget( leaveOnServerSizeBox, 9, 9, 0, 1 ); #if 0 - QHBox *resourceHB = new QHBox( page1 ); + TQHBox *resourceHB = new TQHBox( page1 ); resourceHB->setSpacing( 11 ); mPop.resourceCheck = - new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); + new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); mPop.resourceClearButton = - new QPushButton( i18n( "Clear" ), resourceHB ); + new TQPushButton( i18n( "Clear" ), resourceHB ); mPop.resourceClearButton->setEnabled( false ); - connect( mPop.resourceCheck, SIGNAL( toggled(bool) ), - mPop.resourceClearButton, SLOT( setEnabled(bool) ) ); - QWhatsThis::add( mPop.resourceClearButton, + connect( mPop.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mPop.resourceClearButton, TQT_SLOT( setEnabled(bool) ) ); + TQWhatsThis::add( mPop.resourceClearButton, i18n( "Delete all allocations for the resource represented by this account." ) ); - connect( mPop.resourceClearButton, SIGNAL( clicked() ), - this, SLOT( slotClearResourceAllocations() ) ); + connect( mPop.resourceClearButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearResourceAllocations() ) ); mPop.resourceClearPastButton = - new QPushButton( i18n( "Clear Past" ), resourceHB ); + new TQPushButton( i18n( "Clear Past" ), resourceHB ); mPop.resourceClearPastButton->setEnabled( false ); - connect( mPop.resourceCheck, SIGNAL( toggled(bool) ), - mPop.resourceClearPastButton, SLOT( setEnabled(bool) ) ); - QWhatsThis::add( mPop.resourceClearPastButton, + connect( mPop.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mPop.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) ); + TQWhatsThis::add( mPop.resourceClearPastButton, i18n( "Delete all outdated allocations for the resource represented by this account." ) ); - connect( mPop.resourceClearPastButton, SIGNAL( clicked() ), - this, SLOT( slotClearPastResourceAllocations() ) ); + connect( mPop.resourceClearPastButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearPastResourceAllocations() ) ); grid->addMultiCellWidget( resourceHB, 10, 10, 0, 2 ); #endif mPop.includeInCheck = - new QCheckBox( i18n("Include in man&ual mail check"), page1 ); + new TQCheckBox( i18n("Include in man&ual mail check"), page1 ); grid->addMultiCellWidget( mPop.includeInCheck, 10, 10, 0, 1 ); - QHBox * hbox = new QHBox( page1 ); + TQHBox * hbox = new TQHBox( page1 ); hbox->setSpacing( KDialog::spacingHint() ); mPop.filterOnServerCheck = - new QCheckBox( i18n("&Filter messages if they are greater than"), hbox ); + new TQCheckBox( i18n("&Filter messages if they are greater than"), hbox ); mPop.filterOnServerSizeSpin = new KIntNumInput ( hbox ); mPop.filterOnServerSizeSpin->setEnabled( false ); hbox->setStretchFactor( mPop.filterOnServerSizeSpin, 1 ); mPop.filterOnServerSizeSpin->setRange( 1, 10000000, 100, false ); - connect(mPop.filterOnServerSizeSpin, SIGNAL(valueChanged(int)), - SLOT(slotFilterOnServerSizeChanged(int))); + connect(mPop.filterOnServerSizeSpin, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotFilterOnServerSizeChanged(int))); mPop.filterOnServerSizeSpin->setValue( 50000 ); grid->addMultiCellWidget( hbox, 11, 11, 0, 1 ); - connect( mPop.filterOnServerCheck, SIGNAL(toggled(bool)), - mPop.filterOnServerSizeSpin, SLOT(setEnabled(bool)) ); - connect( mPop.filterOnServerCheck, SIGNAL( clicked() ), - this, SLOT( slotFilterOnServerClicked() ) ); - QString msg = i18n("If you select this option, POP Filters will be used to " + connect( mPop.filterOnServerCheck, TQT_SIGNAL(toggled(bool)), + mPop.filterOnServerSizeSpin, TQT_SLOT(setEnabled(bool)) ); + connect( mPop.filterOnServerCheck, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotFilterOnServerClicked() ) ); + TQString msg = i18n("If you select this option, POP Filters will be used to " "decide what to do with messages. You can then select " "to download, delete or keep them on the server." ); - QWhatsThis::add( mPop.filterOnServerCheck, msg ); - QWhatsThis::add( mPop.filterOnServerSizeSpin, msg ); + TQWhatsThis::add( mPop.filterOnServerCheck, msg ); + TQWhatsThis::add( mPop.filterOnServerSizeSpin, msg ); mPop.intervalCheck = - new QCheckBox( i18n("Enable &interval mail checking"), page1 ); + new TQCheckBox( i18n("Enable &interval mail checking"), page1 ); grid->addMultiCellWidget( mPop.intervalCheck, 12, 12, 0, 1 ); - connect( mPop.intervalCheck, SIGNAL(toggled(bool)), - this, SLOT(slotEnablePopInterval(bool)) ); - mPop.intervalLabel = new QLabel( i18n("Chec&k interval:"), page1 ); + connect( mPop.intervalCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotEnablePopInterval(bool)) ); + mPop.intervalLabel = new TQLabel( i18n("Chec&k interval:"), page1 ); grid->addWidget( mPop.intervalLabel, 13, 0 ); mPop.intervalSpin = new KIntNumInput( page1 ); mPop.intervalSpin->setRange( GlobalSettings::self()->minimumCheckInterval(), 10000, 1, false ); @@ -743,142 +743,142 @@ void AccountDialog::makePopAccountPage() mPop.intervalLabel->setBuddy( mPop.intervalSpin ); grid->addWidget( mPop.intervalSpin, 13, 1 ); - label = new QLabel( i18n("Des&tination folder:"), page1 ); + label = new TQLabel( i18n("Des&tination folder:"), page1 ); grid->addWidget( label, 14, 0 ); - mPop.folderCombo = new QComboBox( false, page1 ); + mPop.folderCombo = new TQComboBox( false, page1 ); label->setBuddy( mPop.folderCombo ); grid->addWidget( mPop.folderCombo, 14, 1 ); - label = new QLabel( i18n("Pre-com&mand:"), page1 ); + label = new TQLabel( i18n("Pre-com&mand:"), page1 ); grid->addWidget( label, 15, 0 ); mPop.precommand = new KLineEdit( page1 ); label->setBuddy(mPop.precommand); grid->addWidget( mPop.precommand, 15, 1 ); - mPop.identityLabel = new QLabel( i18n("Identity:"), page1 ); + mPop.identityLabel = new TQLabel( i18n("Identity:"), page1 ); grid->addWidget( mPop.identityLabel, 16, 0 ); mPop.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page1 ); mPop.identityLabel->setBuddy( mPop.identityCombo ); grid->addWidget( mPop.identityCombo, 16, 1 ); - QWidget *page2 = new QWidget( tabWidget ); + TQWidget *page2 = new TQWidget( tabWidget ); tabWidget->addTab( page2, i18n("&Extras") ); - QVBoxLayout *vlay = new QVBoxLayout( page2, marginHint(), spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page2, marginHint(), spacingHint() ); vlay->addSpacing( KDialog::spacingHint() ); - QHBoxLayout *buttonLay = new QHBoxLayout( vlay ); + TQHBoxLayout *buttonLay = new TQHBoxLayout( vlay ); mPop.checkCapabilities = - new QPushButton( i18n("Check &What the Server Supports"), page2 ); - connect(mPop.checkCapabilities, SIGNAL(clicked()), - SLOT(slotCheckPopCapabilities())); + new TQPushButton( i18n("Check &What the Server Supports"), page2 ); + connect(mPop.checkCapabilities, TQT_SIGNAL(clicked()), + TQT_SLOT(slotCheckPopCapabilities())); buttonLay->addStretch(); buttonLay->addWidget( mPop.checkCapabilities ); buttonLay->addStretch(); vlay->addSpacing( KDialog::spacingHint() ); - mPop.encryptionGroup = new QButtonGroup( 1, Qt::Horizontal, + mPop.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Encryption"), page2 ); mPop.encryptionNone = - new QRadioButton( i18n("&None"), mPop.encryptionGroup ); + new TQRadioButton( i18n("&None"), mPop.encryptionGroup ); mPop.encryptionSSL = - new QRadioButton( i18n("Use &SSL for secure mail download"), + new TQRadioButton( i18n("Use &SSL for secure mail download"), mPop.encryptionGroup ); mPop.encryptionTLS = - new QRadioButton( i18n("Use &TLS for secure mail download"), + new TQRadioButton( i18n("Use &TLS for secure mail download"), mPop.encryptionGroup ); - connect(mPop.encryptionGroup, SIGNAL(clicked(int)), - SLOT(slotPopEncryptionChanged(int))); + connect(mPop.encryptionGroup, TQT_SIGNAL(clicked(int)), + TQT_SLOT(slotPopEncryptionChanged(int))); vlay->addWidget( mPop.encryptionGroup ); - mPop.authGroup = new QButtonGroup( 1, Qt::Horizontal, + mPop.authGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Authentication Method"), page2 ); - mPop.authUser = new QRadioButton( i18n("Clear te&xt") , mPop.authGroup, + mPop.authUser = new TQRadioButton( i18n("Clear te&xt") , mPop.authGroup, "auth clear text" ); - mPop.authLogin = new QRadioButton( i18n("Please translate this " + mPop.authLogin = new TQRadioButton( i18n("Please translate this " "authentication method only if you have a good reason", "&LOGIN"), mPop.authGroup, "auth login" ); - mPop.authPlain = new QRadioButton( i18n("Please translate this " + mPop.authPlain = new TQRadioButton( i18n("Please translate this " "authentication method only if you have a good reason", "&PLAIN"), mPop.authGroup, "auth plain" ); - mPop.authCRAM_MD5 = new QRadioButton( i18n("CRAM-MD&5"), mPop.authGroup, "auth cram-md5" ); - mPop.authDigestMd5 = new QRadioButton( i18n("&DIGEST-MD5"), mPop.authGroup, "auth digest-md5" ); - mPop.authNTLM = new QRadioButton( i18n("&NTLM"), mPop.authGroup, "auth ntlm" ); - mPop.authGSSAPI = new QRadioButton( i18n("&GSSAPI"), mPop.authGroup, "auth gssapi" ); + mPop.authCRAM_MD5 = new TQRadioButton( i18n("CRAM-MD&5"), mPop.authGroup, "auth cram-md5" ); + mPop.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mPop.authGroup, "auth digest-md5" ); + mPop.authNTLM = new TQRadioButton( i18n("&NTLM"), mPop.authGroup, "auth ntlm" ); + mPop.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mPop.authGroup, "auth gssapi" ); if ( KProtocolInfo::capabilities("pop3").contains("SASL") == 0 ) { mPop.authNTLM->hide(); mPop.authGSSAPI->hide(); } - mPop.authAPOP = new QRadioButton( i18n("&APOP"), mPop.authGroup, "auth apop" ); + mPop.authAPOP = new TQRadioButton( i18n("&APOP"), mPop.authGroup, "auth apop" ); vlay->addWidget( mPop.authGroup ); mPop.usePipeliningCheck = - new QCheckBox( i18n("&Use pipelining for faster mail download"), page2 ); - connect(mPop.usePipeliningCheck, SIGNAL(clicked()), - SLOT(slotPipeliningClicked())); + new TQCheckBox( i18n("&Use pipelining for faster mail download"), page2 ); + connect(mPop.usePipeliningCheck, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPipeliningClicked())); vlay->addWidget( mPop.usePipeliningCheck ); vlay->addStretch(); - connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged())); + connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged())); } void AccountDialog::makeImapAccountPage( bool connected ) { - QFrame *page = makeMainWidget(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); - mImap.titleLabel = new QLabel( page ); + mImap.titleLabel = new TQLabel( page ); if( connected ) mImap.titleLabel->setText( i18n("Account Type: Disconnected IMAP Account") ); else mImap.titleLabel->setText( i18n("Account Type: IMAP Account") ); - QFont titleFont( mImap.titleLabel->font() ); + TQFont titleFont( mImap.titleLabel->font() ); titleFont.setBold( true ); mImap.titleLabel->setFont( titleFont ); topLayout->addWidget( mImap.titleLabel ); KSeparator *hline = new KSeparator( KSeparator::HLine, page); topLayout->addWidget( hline ); - QTabWidget *tabWidget = new QTabWidget(page); + TQTabWidget *tabWidget = new TQTabWidget(page); topLayout->addWidget( tabWidget ); - QWidget *page1 = new QWidget( tabWidget ); + TQWidget *page1 = new TQWidget( tabWidget ); tabWidget->addTab( page1, i18n("&General") ); int row = -1; - QGridLayout *grid = new QGridLayout( page1, 16, 2, marginHint(), spacingHint() ); + TQGridLayout *grid = new TQGridLayout( page1, 16, 2, marginHint(), spacingHint() ); grid->addColSpacing( 1, fontMetrics().maxWidth()*16 ); ++row; - QLabel *label = new QLabel( i18n("Account &name:"), page1 ); + TQLabel *label = new TQLabel( i18n("Account &name:"), page1 ); grid->addWidget( label, row, 0 ); mImap.nameEdit = new KLineEdit( page1 ); label->setBuddy( mImap.nameEdit ); grid->addWidget( mImap.nameEdit, row, 1 ); ++row; - label = new QLabel( i18n("&Login:"), page1 ); - QWhatsThis::add( label, i18n("Your Internet Service Provider gave you a user name which is used to authenticate you with their servers. It usually is the first part of your email address (the part before @).") ); + label = new TQLabel( i18n("&Login:"), page1 ); + TQWhatsThis::add( label, i18n("Your Internet Service Provider gave you a user name which is used to authenticate you with their servers. It usually is the first part of your email address (the part before @).") ); grid->addWidget( label, row, 0 ); mImap.loginEdit = new KLineEdit( page1 ); label->setBuddy( mImap.loginEdit ); grid->addWidget( mImap.loginEdit, row, 1 ); ++row; - label = new QLabel( i18n("P&assword:"), page1 ); + label = new TQLabel( i18n("P&assword:"), page1 ); grid->addWidget( label, row, 0 ); mImap.passwordEdit = new KLineEdit( page1 ); - mImap.passwordEdit->setEchoMode( QLineEdit::Password ); + mImap.passwordEdit->setEchoMode( TQLineEdit::Password ); label->setBuddy( mImap.passwordEdit ); grid->addWidget( mImap.passwordEdit, row, 1 ); ++row; - label = new QLabel( i18n("Ho&st:"), page1 ); + label = new TQLabel( i18n("Ho&st:"), page1 ); grid->addWidget( label, row, 0 ); mImap.hostEdit = new KLineEdit( page1 ); // only letters, digits, '-', '.', ':' (IPv6) and '_' (for Windows @@ -888,77 +888,77 @@ void AccountDialog::makeImapAccountPage( bool connected ) grid->addWidget( mImap.hostEdit, row, 1 ); ++row; - label = new QLabel( i18n("&Port:"), page1 ); + label = new TQLabel( i18n("&Port:"), page1 ); grid->addWidget( label, row, 0 ); mImap.portEdit = new KLineEdit( page1 ); - mImap.portEdit->setValidator( new QIntValidator(this) ); + mImap.portEdit->setValidator( new TQIntValidator(this) ); label->setBuddy( mImap.portEdit ); grid->addWidget( mImap.portEdit, row, 1 ); // namespace list ++row; - QHBox* box = new QHBox( page1 ); - label = new QLabel( i18n("Namespaces:"), box ); - QWhatsThis::add( label, i18n( "Here you see the different namespaces that your IMAP server supports." + TQHBox* box = new TQHBox( page1 ); + label = new TQLabel( i18n("Namespaces:"), box ); + TQWhatsThis::add( label, i18n( "Here you see the different namespaces that your IMAP server supports." "Each namespace represents a prefix that separates groups of folders." "Namespaces allow KMail for example to display your personal folders and shared folders in one account." ) ); // button to reload - QToolButton* button = new QToolButton( box ); + TQToolButton* button = new TQToolButton( box ); button->setAutoRaise(true); - button->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + button->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); button->setFixedSize( 22, 22 ); button->setIconSet( KGlobal::iconLoader()->loadIconSet( "reload", KIcon::Small, 0 ) ); - connect( button, SIGNAL(clicked()), this, SLOT(slotReloadNamespaces()) ); - QWhatsThis::add( button, + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReloadNamespaces()) ); + TQWhatsThis::add( button, i18n("Reload the namespaces from the server. This overwrites any changes.") ); grid->addWidget( box, row, 0 ); // grid with label, namespace list and edit button - QGrid* listbox = new QGrid( 3, page1 ); - label = new QLabel( i18n("Personal"), listbox ); - QWhatsThis::add( label, i18n( "Personal namespaces include your personal folders." ) ); + TQGrid* listbox = new TQGrid( 3, page1 ); + label = new TQLabel( i18n("Personal"), listbox ); + TQWhatsThis::add( label, i18n( "Personal namespaces include your personal folders." ) ); mImap.personalNS = new KLineEdit( listbox ); mImap.personalNS->setReadOnly( true ); - mImap.editPNS = new QToolButton( listbox ); + mImap.editPNS = new TQToolButton( listbox ); mImap.editPNS->setIconSet( KGlobal::iconLoader()->loadIconSet( "edit", KIcon::Small, 0 ) ); mImap.editPNS->setAutoRaise( true ); - mImap.editPNS->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + mImap.editPNS->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); mImap.editPNS->setFixedSize( 22, 22 ); - connect( mImap.editPNS, SIGNAL(clicked()), this, SLOT(slotEditPersonalNamespace()) ); + connect( mImap.editPNS, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditPersonalNamespace()) ); - label = new QLabel( i18n("Other Users"), listbox ); - QWhatsThis::add( label, i18n( "These namespaces include the folders of other users." ) ); + label = new TQLabel( i18n("Other Users"), listbox ); + TQWhatsThis::add( label, i18n( "These namespaces include the folders of other users." ) ); mImap.otherUsersNS = new KLineEdit( listbox ); mImap.otherUsersNS->setReadOnly( true ); - mImap.editONS = new QToolButton( listbox ); + mImap.editONS = new TQToolButton( listbox ); mImap.editONS->setIconSet( KGlobal::iconLoader()->loadIconSet( "edit", KIcon::Small, 0 ) ); mImap.editONS->setAutoRaise( true ); - mImap.editONS->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + mImap.editONS->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); mImap.editONS->setFixedSize( 22, 22 ); - connect( mImap.editONS, SIGNAL(clicked()), this, SLOT(slotEditOtherUsersNamespace()) ); + connect( mImap.editONS, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditOtherUsersNamespace()) ); - label = new QLabel( i18n("Shared"), listbox ); - QWhatsThis::add( label, i18n( "These namespaces include the shared folders." ) ); + label = new TQLabel( i18n("Shared"), listbox ); + TQWhatsThis::add( label, i18n( "These namespaces include the shared folders." ) ); mImap.sharedNS = new KLineEdit( listbox ); mImap.sharedNS->setReadOnly( true ); - mImap.editSNS = new QToolButton( listbox ); + mImap.editSNS = new TQToolButton( listbox ); mImap.editSNS->setIconSet( KGlobal::iconLoader()->loadIconSet( "edit", KIcon::Small, 0 ) ); mImap.editSNS->setAutoRaise( true ); - mImap.editSNS->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + mImap.editSNS->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); mImap.editSNS->setFixedSize( 22, 22 ); - connect( mImap.editSNS, SIGNAL(clicked()), this, SLOT(slotEditSharedNamespace()) ); + connect( mImap.editSNS, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditSharedNamespace()) ); label->setBuddy( listbox ); grid->addWidget( listbox, row, 1 ); ++row; mImap.storePasswordCheck = - new QCheckBox( i18n("Sto&re IMAP password"), page1 ); - QWhatsThis::add( mImap.storePasswordCheck, + new TQCheckBox( i18n("Sto&re IMAP password"), page1 ); + TQWhatsThis::add( mImap.storePasswordCheck, i18n("Check this option to have KMail store " "the password.\nIf KWallet is available " "the password will be stored there which is considered " @@ -973,31 +973,31 @@ void AccountDialog::makeImapAccountPage( bool connected ) if( !connected ) { ++row; mImap.autoExpungeCheck = - new QCheckBox( i18n("Automaticall&y compact folders (expunges deleted messages)"), page1); + new TQCheckBox( i18n("Automaticall&y compact folders (expunges deleted messages)"), page1); grid->addMultiCellWidget( mImap.autoExpungeCheck, row, row, 0, 1 ); } ++row; - mImap.hiddenFoldersCheck = new QCheckBox( i18n("Sho&w hidden folders"), page1); + mImap.hiddenFoldersCheck = new TQCheckBox( i18n("Sho&w hidden folders"), page1); grid->addMultiCellWidget( mImap.hiddenFoldersCheck, row, row, 0, 1 ); ++row; - mImap.subscribedFoldersCheck = new QCheckBox( + mImap.subscribedFoldersCheck = new TQCheckBox( i18n("Show only s&ubscribed folders"), page1); grid->addMultiCellWidget( mImap.subscribedFoldersCheck, row, row, 0, 1 ); ++row; - mImap.locallySubscribedFoldersCheck = new QCheckBox( + mImap.locallySubscribedFoldersCheck = new TQCheckBox( i18n("Show only &locally subscribed folders"), page1); grid->addMultiCellWidget( mImap.locallySubscribedFoldersCheck, row, row, 0, 1 ); if ( !connected ) { // not implemented for disconnected yet ++row; - mImap.loadOnDemandCheck = new QCheckBox( + mImap.loadOnDemandCheck = new TQCheckBox( i18n("Load attach&ments on demand"), page1); - QWhatsThis::add( mImap.loadOnDemandCheck, + TQWhatsThis::add( mImap.loadOnDemandCheck, i18n("Activate this to load attachments not automatically when you select the email but only when you click on the attachment. This way also big emails are shown instantly.") ); grid->addMultiCellWidget( mImap.loadOnDemandCheck, row, row, 0, 1 ); } @@ -1005,53 +1005,53 @@ void AccountDialog::makeImapAccountPage( bool connected ) if ( !connected ) { // not implemented for disconnected yet ++row; - mImap.listOnlyOpenCheck = new QCheckBox( + mImap.listOnlyOpenCheck = new TQCheckBox( i18n("List only open folders"), page1); - QWhatsThis::add( mImap.listOnlyOpenCheck, + TQWhatsThis::add( mImap.listOnlyOpenCheck, i18n("Only folders that are open (expanded) in the folder tree are checked for subfolders. Use this if there are many folders on the server.") ); grid->addMultiCellWidget( mImap.listOnlyOpenCheck, row, row, 0, 1 ); } #if 0 ++row; - QHBox* resourceHB = new QHBox( page1 ); + TQHBox* resourceHB = new TQHBox( page1 ); resourceHB->setSpacing( 11 ); mImap.resourceCheck = - new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); + new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB ); mImap.resourceClearButton = - new QPushButton( i18n( "Clear" ), resourceHB ); + new TQPushButton( i18n( "Clear" ), resourceHB ); mImap.resourceClearButton->setEnabled( false ); - connect( mImap.resourceCheck, SIGNAL( toggled(bool) ), - mImap.resourceClearButton, SLOT( setEnabled(bool) ) ); - QWhatsThis::add( mImap.resourceClearButton, + connect( mImap.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mImap.resourceClearButton, TQT_SLOT( setEnabled(bool) ) ); + TQWhatsThis::add( mImap.resourceClearButton, i18n( "Delete all allocations for the resource represented by this account." ) ); - connect( mImap.resourceClearButton, SIGNAL( clicked() ), - this, SLOT( slotClearResourceAllocations() ) ); + connect( mImap.resourceClearButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearResourceAllocations() ) ); mImap.resourceClearPastButton = - new QPushButton( i18n( "Clear Past" ), resourceHB ); + new TQPushButton( i18n( "Clear Past" ), resourceHB ); mImap.resourceClearPastButton->setEnabled( false ); - connect( mImap.resourceCheck, SIGNAL( toggled(bool) ), - mImap.resourceClearPastButton, SLOT( setEnabled(bool) ) ); - QWhatsThis::add( mImap.resourceClearPastButton, + connect( mImap.resourceCheck, TQT_SIGNAL( toggled(bool) ), + mImap.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) ); + TQWhatsThis::add( mImap.resourceClearPastButton, i18n( "Delete all outdated allocations for the resource represented by this account." ) ); - connect( mImap.resourceClearPastButton, SIGNAL( clicked() ), - this, SLOT( slotClearPastResourceAllocations() ) ); + connect( mImap.resourceClearPastButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClearPastResourceAllocations() ) ); grid->addMultiCellWidget( resourceHB, row, row, 0, 2 ); #endif ++row; mImap.includeInCheck = - new QCheckBox( i18n("Include in manual mail chec&k"), page1 ); + new TQCheckBox( i18n("Include in manual mail chec&k"), page1 ); grid->addMultiCellWidget( mImap.includeInCheck, row, row, 0, 1 ); ++row; mImap.intervalCheck = - new QCheckBox( i18n("Enable &interval mail checking"), page1 ); + new TQCheckBox( i18n("Enable &interval mail checking"), page1 ); grid->addMultiCellWidget( mImap.intervalCheck, row, row, 0, 2 ); - connect( mImap.intervalCheck, SIGNAL(toggled(bool)), - this, SLOT(slotEnableImapInterval(bool)) ); + connect( mImap.intervalCheck, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotEnableImapInterval(bool)) ); ++row; - mImap.intervalLabel = new QLabel( i18n("Check inter&val:"), page1 ); + mImap.intervalLabel = new TQLabel( i18n("Check inter&val:"), page1 ); grid->addWidget( mImap.intervalLabel, row, 0 ); mImap.intervalSpin = new KIntNumInput( page1 ); mImap.intervalSpin->setRange( GlobalSettings::minimumCheckInterval(), 60, 1, false ); @@ -1061,7 +1061,7 @@ void AccountDialog::makeImapAccountPage( bool connected ) grid->addWidget( mImap.intervalSpin, row, 1 ); ++row; - label = new QLabel( i18n("&Trash folder:"), page1 ); + label = new TQLabel( i18n("&Trash folder:"), page1 ); grid->addWidget( label, row, 0 ); mImap.trashCombo = new FolderRequester( page1, kmkernel->getKMMainWidget()->folderTree() ); @@ -1070,57 +1070,57 @@ void AccountDialog::makeImapAccountPage( bool connected ) grid->addWidget( mImap.trashCombo, row, 1 ); ++row; - mImap.identityLabel = new QLabel( i18n("Identity:"), page1 ); + mImap.identityLabel = new TQLabel( i18n("Identity:"), page1 ); grid->addWidget( mImap.identityLabel, row, 0 ); mImap.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page1 ); mImap.identityLabel->setBuddy( mImap.identityCombo ); grid->addWidget( mImap.identityCombo, row, 1 ); - QWidget *page2 = new QWidget( tabWidget ); + TQWidget *page2 = new TQWidget( tabWidget ); tabWidget->addTab( page2, i18n("S&ecurity") ); - QVBoxLayout *vlay = new QVBoxLayout( page2, marginHint(), spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page2, marginHint(), spacingHint() ); vlay->addSpacing( KDialog::spacingHint() ); - QHBoxLayout *buttonLay = new QHBoxLayout( vlay ); + TQHBoxLayout *buttonLay = new TQHBoxLayout( vlay ); mImap.checkCapabilities = - new QPushButton( i18n("Check &What the Server Supports"), page2 ); - connect(mImap.checkCapabilities, SIGNAL(clicked()), - SLOT(slotCheckImapCapabilities())); + new TQPushButton( i18n("Check &What the Server Supports"), page2 ); + connect(mImap.checkCapabilities, TQT_SIGNAL(clicked()), + TQT_SLOT(slotCheckImapCapabilities())); buttonLay->addStretch(); buttonLay->addWidget( mImap.checkCapabilities ); buttonLay->addStretch(); vlay->addSpacing( KDialog::spacingHint() ); - mImap.encryptionGroup = new QButtonGroup( 1, Qt::Horizontal, + mImap.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Encryption"), page2 ); mImap.encryptionNone = - new QRadioButton( i18n("&None"), mImap.encryptionGroup ); + new TQRadioButton( i18n("&None"), mImap.encryptionGroup ); mImap.encryptionSSL = - new QRadioButton( i18n("Use &SSL for secure mail download"), + new TQRadioButton( i18n("Use &SSL for secure mail download"), mImap.encryptionGroup ); mImap.encryptionTLS = - new QRadioButton( i18n("Use &TLS for secure mail download"), + new TQRadioButton( i18n("Use &TLS for secure mail download"), mImap.encryptionGroup ); - connect(mImap.encryptionGroup, SIGNAL(clicked(int)), - SLOT(slotImapEncryptionChanged(int))); + connect(mImap.encryptionGroup, TQT_SIGNAL(clicked(int)), + TQT_SLOT(slotImapEncryptionChanged(int))); vlay->addWidget( mImap.encryptionGroup ); - mImap.authGroup = new QButtonGroup( 1, Qt::Horizontal, + mImap.authGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Authentication Method"), page2 ); - mImap.authUser = new QRadioButton( i18n("Clear te&xt"), mImap.authGroup ); - mImap.authLogin = new QRadioButton( i18n("Please translate this " + mImap.authUser = new TQRadioButton( i18n("Clear te&xt"), mImap.authGroup ); + mImap.authLogin = new TQRadioButton( i18n("Please translate this " "authentication method only if you have a good reason", "&LOGIN"), mImap.authGroup ); - mImap.authPlain = new QRadioButton( i18n("Please translate this " + mImap.authPlain = new TQRadioButton( i18n("Please translate this " "authentication method only if you have a good reason", "&PLAIN"), mImap.authGroup ); - mImap.authCramMd5 = new QRadioButton( i18n("CRAM-MD&5"), mImap.authGroup ); - mImap.authDigestMd5 = new QRadioButton( i18n("&DIGEST-MD5"), mImap.authGroup ); - mImap.authNTLM = new QRadioButton( i18n("&NTLM"), mImap.authGroup ); - mImap.authGSSAPI = new QRadioButton( i18n("&GSSAPI"), mImap.authGroup ); - mImap.authAnonymous = new QRadioButton( i18n("&Anonymous"), mImap.authGroup ); + mImap.authCramMd5 = new TQRadioButton( i18n("CRAM-MD&5"), mImap.authGroup ); + mImap.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mImap.authGroup ); + mImap.authNTLM = new TQRadioButton( i18n("&NTLM"), mImap.authGroup ); + mImap.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mImap.authGroup ); + mImap.authAnonymous = new TQRadioButton( i18n("&Anonymous"), mImap.authGroup ); vlay->addWidget( mImap.authGroup ); vlay->addStretch(); @@ -1130,16 +1130,16 @@ void AccountDialog::makeImapAccountPage( bool connected ) mSieveConfigEditor->layout()->setMargin( KDialog::marginHint() ); tabWidget->addTab( mSieveConfigEditor, i18n("&Filtering") ); - connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged())); + connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged())); } void AccountDialog::setupSettings() { - QComboBox *folderCombo = 0; + TQComboBox *folderCombo = 0; int interval = mAccount->checkInterval(); - QString accountType = mAccount->type(); + TQString accountType = mAccount->type(); if( accountType == "local" ) { ProcmailRCParser procmailrcParser; @@ -1191,7 +1191,7 @@ void AccountDialog::setupSettings() mPop.loginEdit->setText( ap.login() ); mPop.passwordEdit->setText( ap.passwd()); mPop.hostEdit->setText( ap.host() ); - mPop.portEdit->setText( QString("%1").arg( ap.port() ) ); + mPop.portEdit->setText( TQString("%1").arg( ap.port() ) ); mPop.usePipeliningCheck->setChecked( ap.usePipelining() ); mPop.storePasswordCheck->setChecked( ap.storePasswd() ); mPop.leaveOnServerCheck->setChecked( ap.leaveOnServer() ); @@ -1256,7 +1256,7 @@ void AccountDialog::setupSettings() mImap.loginEdit->setText( ai.login() ); mImap.passwordEdit->setText( ai.passwd()); mImap.hostEdit->setText( ai.host() ); - mImap.portEdit->setText( QString("%1").arg( ai.port() ) ); + mImap.portEdit->setText( TQString("%1").arg( ai.port() ) ); mImap.autoExpungeCheck->setChecked( ai.autoExpunge() ); mImap.hiddenFoldersCheck->setChecked( ai.hiddenFolders() ); mImap.subscribedFoldersCheck->setChecked( ai.onlySubscribedFolders() ); @@ -1271,7 +1271,7 @@ void AccountDialog::setupSettings() mImap.intervalCheck->setChecked( interval >= 1 ); if ( interval <= 0 ) mImap.intervalSpin->setValue( defaultmailcheckintervalmin ); else mImap.intervalSpin->setValue( interval ); - QString trashfolder = ai.trash(); + TQString trashfolder = ai.trash(); if (trashfolder.isEmpty()) trashfolder = kmkernel->trashFolder()->idString(); mImap.trashCombo->setFolder( trashfolder ); @@ -1309,7 +1309,7 @@ void AccountDialog::setupSettings() mImap.loginEdit->setText( ai.login() ); mImap.passwordEdit->setText( ai.passwd()); mImap.hostEdit->setText( ai.host() ); - mImap.portEdit->setText( QString("%1").arg( ai.port() ) ); + mImap.portEdit->setText( TQString("%1").arg( ai.port() ) ); #if 0 mImap.resourceCheck->setChecked( ai.resource() ); #endif @@ -1321,7 +1321,7 @@ void AccountDialog::setupSettings() if ( interval <= 0 ) mImap.intervalSpin->setValue( defaultmailcheckintervalmin ); else mImap.intervalSpin->setValue( interval ); mImap.includeInCheck->setChecked( !ai.checkExclude() ); - QString trashfolder = ai.trash(); + TQString trashfolder = ai.trash(); if (trashfolder.isEmpty()) trashfolder = kmkernel->trashFolder()->idString(); mImap.trashCombo->setFolder( trashfolder ); @@ -1407,7 +1407,7 @@ void AccountDialog::setupSettings() kmkernel->folderMgr()->createI18nFolderList(&mFolderNames, &mFolderList); while (i < mFolderNames.count()) { - QValueList >::Iterator it = mFolderList.at(i); + TQValueList >::Iterator it = mFolderList.at(i); KMFolder *folder = *it; if (folder->isSystemFolder()) { @@ -1490,7 +1490,7 @@ void AccountDialog::slotPipeliningClicked() "Supports\" button at the bottom of the dialog;\n" "if your server does not announce it, but you want more speed, then " "you should do some testing first by sending yourself a batch " - "of mail and downloading it."), QString::null, + "of mail and downloading it."), TQString::null, "pipelining"); } @@ -1507,7 +1507,7 @@ void AccountDialog::slotPopEncryptionChanged(int id) : ( id == SSL ) ? mCapaSSL : mCapaNormal; enablePopFeatures( mCurCapa ); - const QButton *old = mPop.authGroup->selected(); + const TQButton *old = mPop.authGroup->selected(); if ( !old->isEnabled() ) checkHighest( mPop.authGroup ); } @@ -1525,7 +1525,7 @@ void AccountDialog::slotImapEncryptionChanged(int id) : ( id == SSL ) ? mCapaSSL : mCapaNormal; enableImapAuthMethods( authMethods ); - QButton *old = mImap.authGroup->selected(); + TQButton *old = mImap.authGroup->selected(); if ( !old->isEnabled() ) checkHighest( mImap.authGroup ); } @@ -1542,10 +1542,10 @@ void AccountDialog::slotCheckPopCapabilities() delete mServerTest; mServerTest = new KMServerTest(POP_PROTOCOL, mPop.hostEdit->text(), mPop.portEdit->text().toInt()); - connect( mServerTest, SIGNAL( capabilities( const QStringList &, - const QStringList & ) ), - this, SLOT( slotPopCapabilities( const QStringList &, - const QStringList & ) ) ); + connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList &, + const TQStringList & ) ), + this, TQT_SLOT( slotPopCapabilities( const TQStringList &, + const TQStringList & ) ) ); mPop.checkCapabilities->setEnabled(false); } @@ -1561,20 +1561,20 @@ void AccountDialog::slotCheckImapCapabilities() delete mServerTest; mServerTest = new KMServerTest(IMAP_PROTOCOL, mImap.hostEdit->text(), mImap.portEdit->text().toInt()); - connect( mServerTest, SIGNAL( capabilities( const QStringList &, - const QStringList & ) ), - this, SLOT( slotImapCapabilities( const QStringList &, - const QStringList & ) ) ); + connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList &, + const TQStringList & ) ), + this, TQT_SLOT( slotImapCapabilities( const TQStringList &, + const TQStringList & ) ) ); mImap.checkCapabilities->setEnabled(false); } -unsigned int AccountDialog::popCapabilitiesFromStringList( const QStringList & l ) +unsigned int AccountDialog::popCapabilitiesFromStringList( const TQStringList & l ) { unsigned int capa = 0; kdDebug( 5006 ) << k_funcinfo << l << endl; - for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { - QString cur = (*it).upper(); + for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { + TQString cur = (*it).upper(); if ( cur == "PLAIN" ) capa |= Plain; else if ( cur == "LOGIN" ) @@ -1602,8 +1602,8 @@ unsigned int AccountDialog::popCapabilitiesFromStringList( const QStringList & l } -void AccountDialog::slotPopCapabilities( const QStringList & capaNormal, - const QStringList & capaSSL ) +void AccountDialog::slotPopCapabilities( const TQStringList & capaNormal, + const TQStringList & capaSSL ) { mPop.checkCapabilities->setEnabled( true ); mCapaNormal = popCapabilitiesFromStringList( capaNormal ); @@ -1682,11 +1682,11 @@ void AccountDialog::enablePopFeatures( unsigned int capa ) } -unsigned int AccountDialog::imapCapabilitiesFromStringList( const QStringList & l ) +unsigned int AccountDialog::imapCapabilitiesFromStringList( const TQStringList & l ) { unsigned int capa = 0; - for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { - QString cur = (*it).upper(); + for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { + TQString cur = (*it).upper(); if ( cur == "AUTH=PLAIN" ) capa |= Plain; else if ( cur == "AUTH=LOGIN" ) @@ -1708,8 +1708,8 @@ unsigned int AccountDialog::imapCapabilitiesFromStringList( const QStringList & } -void AccountDialog::slotImapCapabilities( const QStringList & capaNormal, - const QStringList & capaSSL ) +void AccountDialog::slotImapCapabilities( const TQStringList & capaNormal, + const TQStringList & capaSSL ) { mImap.checkCapabilities->setEnabled( true ); mCapaNormal = imapCapabilitiesFromStringList( capaNormal ); @@ -1760,11 +1760,11 @@ void AccountDialog::enableImapAuthMethods( unsigned int capa ) } -void AccountDialog::checkHighest( QButtonGroup *btnGroup ) +void AccountDialog::checkHighest( TQButtonGroup *btnGroup ) { kdDebug(5006) << "checkHighest( " << btnGroup << " )" << endl; for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) { - QButton * btn = btnGroup->find( i ); + TQButton * btn = btnGroup->find( i ); if ( btn && btn->isEnabled() ) { btn->animateClick(); return; @@ -1782,7 +1782,7 @@ void AccountDialog::slotOk() void AccountDialog::saveSettings() { - QString accountType = mAccount->type(); + TQString accountType = mAccount->type(); if( accountType == "local" ) { KMAcctLocal *acctLocal = dynamic_cast(mAccount); @@ -1957,7 +1957,7 @@ void AccountDialog::saveSettings() ImapAccountBase::nsDelimMap::Iterator it; ImapAccountBase::namespaceDelim::Iterator it2; for ( it = mImap.nsMap.begin(); it != mImap.nsMap.end(); ++it ) { - QStringList list; + TQStringList list; for ( it2 = it.data().begin(); it2 != it.data().end(); ++it2 ) { list << it2.key(); delimMap[it2.key()] = it2.data(); @@ -1992,9 +1992,9 @@ void AccountDialog::saveSettings() void AccountDialog::slotLocationChooser() { - static QString directory( "/" ); + static TQString directory( "/" ); - KFileDialog dialog( directory, QString::null, this, 0, true ); + KFileDialog dialog( directory, TQString::null, this, 0, true ); dialog.setCaption( i18n("Choose Location") ); bool result = dialog.exec(); @@ -2020,9 +2020,9 @@ void AccountDialog::slotLocationChooser() void AccountDialog::slotMaildirChooser() { - static QString directory( "/" ); + static TQString directory( "/" ); - QString dir = KFileDialog::getExistingDirectory(directory, this, i18n("Choose Location")); + TQString dir = KFileDialog::getExistingDirectory(directory, this, i18n("Choose Location")); if( dir.isEmpty() ) return; @@ -2077,22 +2077,22 @@ void AccountDialog::slotEnableMaildirInterval( bool state ) void AccountDialog::slotFontChanged( void ) { - QString accountType = mAccount->type(); + TQString accountType = mAccount->type(); if( accountType == "local" ) { - QFont titleFont( mLocal.titleLabel->font() ); + TQFont titleFont( mLocal.titleLabel->font() ); titleFont.setBold( true ); mLocal.titleLabel->setFont(titleFont); } else if( accountType == "pop" ) { - QFont titleFont( mPop.titleLabel->font() ); + TQFont titleFont( mPop.titleLabel->font() ); titleFont.setBold( true ); mPop.titleLabel->setFont(titleFont); } else if( accountType == "imap" ) { - QFont titleFont( mImap.titleLabel->font() ); + TQFont titleFont( mImap.titleLabel->font() ); titleFont.setBold( true ); mImap.titleLabel->setFont(titleFont); } @@ -2117,35 +2117,35 @@ void AccountDialog::slotReloadNamespaces() { initAccountForConnect(); mImap.personalNS->setText( i18n("Fetching Namespaces...") ); - mImap.otherUsersNS->setText( QString::null ); - mImap.sharedNS->setText( QString::null ); + mImap.otherUsersNS->setText( TQString::null ); + mImap.sharedNS->setText( TQString::null ); ImapAccountBase* ai = static_cast( mAccount ); - connect( ai, SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ), - this, SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); - connect( ai, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + connect( ai, TQT_SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ), + this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); + connect( ai, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); ai->getNamespaces(); } } -void AccountDialog::slotConnectionResult( int errorCode, const QString& ) +void AccountDialog::slotConnectionResult( int errorCode, const TQString& ) { if ( errorCode > 0 ) { ImapAccountBase* ai = static_cast( mAccount ); - disconnect( ai, SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ), - this, SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); - disconnect( ai, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); - mImap.personalNS->setText( QString::null ); + disconnect( ai, TQT_SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ), + this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); + disconnect( ai, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); + mImap.personalNS->setText( TQString::null ); } } void AccountDialog::slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map ) { - disconnect( this, SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); - mImap.personalNS->setText( QString::null ); - mImap.otherUsersNS->setText( QString::null ); - mImap.sharedNS->setText( QString::null ); + disconnect( this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); + mImap.personalNS->setText( TQString::null ); + mImap.otherUsersNS->setText( TQString::null ); + mImap.sharedNS->setText( TQString::null ); mImap.nsMap = map; ImapAccountBase::namespaceDelim ns = map[ImapAccountBase::PersonalNS]; @@ -2172,10 +2172,10 @@ void AccountDialog::slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map } } -const QString AccountDialog::namespaceListToString( const QStringList& list ) +const TQString AccountDialog::namespaceListToString( const TQStringList& list ) { - QStringList myList = list; - for ( QStringList::Iterator it = myList.begin(); it != myList.end(); ++it ) { + TQStringList myList = list; + for ( TQStringList::Iterator it = myList.begin(); it != myList.end(); ++it ) { if ( (*it).isEmpty() ) { (*it) = "<" + i18n("Empty") + ">"; } @@ -2185,7 +2185,7 @@ const QString AccountDialog::namespaceListToString( const QStringList& list ) void AccountDialog::initAccountForConnect() { - QString type = mAccount->type(); + TQString type = mAccount->type(); if ( type == "local" ) return; @@ -2246,7 +2246,7 @@ void AccountDialog::initAccountForConnect() void AccountDialog::slotEditPersonalNamespace() { NamespaceEditDialog dialog( this, ImapAccountBase::PersonalNS, &mImap.nsMap ); - if ( dialog.exec() == QDialog::Accepted ) { + if ( dialog.exec() == TQDialog::Accepted ) { slotSetupNamespaces( mImap.nsMap ); } } @@ -2254,7 +2254,7 @@ void AccountDialog::slotEditPersonalNamespace() void AccountDialog::slotEditOtherUsersNamespace() { NamespaceEditDialog dialog( this, ImapAccountBase::OtherUsersNS, &mImap.nsMap ); - if ( dialog.exec() == QDialog::Accepted ) { + if ( dialog.exec() == TQDialog::Accepted ) { slotSetupNamespaces( mImap.nsMap ); } } @@ -2262,30 +2262,30 @@ void AccountDialog::slotEditOtherUsersNamespace() void AccountDialog::slotEditSharedNamespace() { NamespaceEditDialog dialog( this, ImapAccountBase::SharedNS, &mImap.nsMap ); - if ( dialog.exec() == QDialog::Accepted ) { + if ( dialog.exec() == TQDialog::Accepted ) { slotSetupNamespaces( mImap.nsMap ); } } -NamespaceLineEdit::NamespaceLineEdit( QWidget* parent ) +NamespaceLineEdit::NamespaceLineEdit( TQWidget* parent ) : KLineEdit( parent ) { } -void NamespaceLineEdit::setText( const QString& text ) +void NamespaceLineEdit::setText( const TQString& text ) { mLastText = text; KLineEdit::setText( text ); } -NamespaceEditDialog::NamespaceEditDialog( QWidget *parent, +NamespaceEditDialog::NamespaceEditDialog( TQWidget *parent, ImapAccountBase::imapNamespace type, ImapAccountBase::nsDelimMap* map ) - : KDialogBase( parent, "edit_namespace", false, QString::null, + : KDialogBase( parent, "edit_namespace", false, TQString::null, Ok|Cancel, Ok, true ), mType( type ), mNamespaceMap( map ) { - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); - QString ns; + TQString ns; if ( mType == ImapAccountBase::PersonalNS ) { ns = i18n("Personal"); } else if ( mType == ImapAccountBase::OtherUsersNS ) { @@ -2294,20 +2294,20 @@ NamespaceEditDialog::NamespaceEditDialog( QWidget *parent, ns = i18n("Shared"); } setCaption( i18n("Edit Namespace '%1'").arg(ns) ); - QGrid* grid = new QGrid( 2, page ); + TQGrid* grid = new TQGrid( 2, page ); - mBg = new QButtonGroup( 0 ); - connect( mBg, SIGNAL( clicked(int) ), this, SLOT( slotRemoveEntry(int) ) ); + mBg = new TQButtonGroup( 0 ); + connect( mBg, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slotRemoveEntry(int) ) ); mDelimMap = mNamespaceMap->find( mType ).data(); ImapAccountBase::namespaceDelim::Iterator it; for ( it = mDelimMap.begin(); it != mDelimMap.end(); ++it ) { NamespaceLineEdit* edit = new NamespaceLineEdit( grid ); edit->setText( it.key() ); - QToolButton* button = new QToolButton( grid ); + TQToolButton* button = new TQToolButton( grid ); button->setIconSet( KGlobal::iconLoader()->loadIconSet( "editdelete", KIcon::Small, 0 ) ); button->setAutoRaise( true ); - button->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + button->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); button->setFixedSize( 22, 22 ); mLineEditMap[ mBg->insert( button ) ] = edit; } @@ -2334,7 +2334,7 @@ void NamespaceEditDialog::slotRemoveEntry( int id ) void NamespaceEditDialog::slotOk() { - QMap::Iterator it; + TQMap::Iterator it; for ( it = mLineEditMap.begin(); it != mLineEditMap.end(); ++it ) { NamespaceLineEdit* edit = it.data(); if ( edit->isModified() ) { diff --git a/kmail/accountdialog.h b/kmail/accountdialog.h index 784cee00..837e23cf 100644 --- a/kmail/accountdialog.h +++ b/kmail/accountdialog.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "imapaccountbase.h" class QRegExpValidator; @@ -57,157 +57,157 @@ class AccountDialog : public KDialogBase Q_OBJECT public: - AccountDialog( const QString & caption, KMAccount *account, - QWidget *parent=0, const char *name=0, bool modal=true ); + AccountDialog( const TQString & caption, KMAccount *account, + TQWidget *parent=0, const char *name=0, bool modal=true ); virtual ~AccountDialog(); private: struct LocalWidgets { - QLabel *titleLabel; - QLineEdit *nameEdit; - QComboBox *locationEdit; - QRadioButton *lockMutt; - QRadioButton *lockMuttPriv; - QRadioButton *lockProcmail; - QComboBox *procmailLockFileName; - QRadioButton *lockFcntl; - QRadioButton *lockNone; - QLineEdit *precommand; + TQLabel *titleLabel; + TQLineEdit *nameEdit; + TQComboBox *locationEdit; + TQRadioButton *lockMutt; + TQRadioButton *lockMuttPriv; + TQRadioButton *lockProcmail; + TQComboBox *procmailLockFileName; + TQRadioButton *lockFcntl; + TQRadioButton *lockNone; + TQLineEdit *precommand; #if 0 - QCheckBox *resourceCheck; - QPushButton *resourceClearButton; - QPushButton *resourceClearPastButton; + TQCheckBox *resourceCheck; + TQPushButton *resourceClearButton; + TQPushButton *resourceClearPastButton; #endif - QCheckBox *includeInCheck; - QCheckBox *intervalCheck; - QLabel *intervalLabel; + TQCheckBox *includeInCheck; + TQCheckBox *intervalCheck; + TQLabel *intervalLabel; KIntNumInput *intervalSpin; - QComboBox *folderCombo; - //QComboBox *identityCombo; + TQComboBox *folderCombo; + //TQComboBox *identityCombo; KPIM::IdentityCombo *identityCombo; - QLabel *identityLabel; + TQLabel *identityLabel; }; struct MaildirWidgets { - QLabel *titleLabel; - QLineEdit *nameEdit; - QComboBox *locationEdit; - QLineEdit *precommand; + TQLabel *titleLabel; + TQLineEdit *nameEdit; + TQComboBox *locationEdit; + TQLineEdit *precommand; #if 0 - QCheckBox *resourceCheck; - QPushButton *resourceClearButton; - QPushButton *resourceClearPastButton; + TQCheckBox *resourceCheck; + TQPushButton *resourceClearButton; + TQPushButton *resourceClearPastButton; #endif - QCheckBox *includeInCheck; - QCheckBox *intervalCheck; - QLabel *intervalLabel; + TQCheckBox *includeInCheck; + TQCheckBox *intervalCheck; + TQLabel *intervalLabel; KIntNumInput *intervalSpin; - QComboBox *folderCombo; - //QComboBox *identityCombo; + TQComboBox *folderCombo; + //TQComboBox *identityCombo; KPIM::IdentityCombo *identityCombo; - QLabel *identityLabel; + TQLabel *identityLabel; }; struct PopWidgets { - QLabel *titleLabel; - QLineEdit *nameEdit; - QLineEdit *loginEdit; - QLineEdit *passwordEdit; - QLineEdit *hostEdit; - QLineEdit *portEdit; - QLineEdit *precommand; - QButtonGroup *encryptionGroup; - QRadioButton *encryptionNone; - QRadioButton *encryptionSSL; - QRadioButton *encryptionTLS; - QButtonGroup *authGroup; - QRadioButton *authUser; - QRadioButton *authPlain; - QRadioButton *authLogin; - QRadioButton *authCRAM_MD5; - QRadioButton *authDigestMd5; - QRadioButton *authNTLM; - QRadioButton *authGSSAPI; - QRadioButton *authAPOP; + TQLabel *titleLabel; + TQLineEdit *nameEdit; + TQLineEdit *loginEdit; + TQLineEdit *passwordEdit; + TQLineEdit *hostEdit; + TQLineEdit *portEdit; + TQLineEdit *precommand; + TQButtonGroup *encryptionGroup; + TQRadioButton *encryptionNone; + TQRadioButton *encryptionSSL; + TQRadioButton *encryptionTLS; + TQButtonGroup *authGroup; + TQRadioButton *authUser; + TQRadioButton *authPlain; + TQRadioButton *authLogin; + TQRadioButton *authCRAM_MD5; + TQRadioButton *authDigestMd5; + TQRadioButton *authNTLM; + TQRadioButton *authGSSAPI; + TQRadioButton *authAPOP; - QPushButton *checkCapabilities; - QCheckBox *usePipeliningCheck; - QCheckBox *storePasswordCheck; - QCheckBox *leaveOnServerCheck; - QCheckBox *leaveOnServerDaysCheck; + TQPushButton *checkCapabilities; + TQCheckBox *usePipeliningCheck; + TQCheckBox *storePasswordCheck; + TQCheckBox *leaveOnServerCheck; + TQCheckBox *leaveOnServerDaysCheck; KIntNumInput *leaveOnServerDaysSpin; - QCheckBox *leaveOnServerCountCheck; + TQCheckBox *leaveOnServerCountCheck; KIntNumInput *leaveOnServerCountSpin; - QCheckBox *leaveOnServerSizeCheck; + TQCheckBox *leaveOnServerSizeCheck; KIntNumInput *leaveOnServerSizeSpin; #if 0 - QCheckBox *resourceCheck; - QPushButton *resourceClearButton; - QPushButton *resourceClearPastButton; + TQCheckBox *resourceCheck; + TQPushButton *resourceClearButton; + TQPushButton *resourceClearPastButton; #endif - QCheckBox *includeInCheck; - QCheckBox *intervalCheck; - QCheckBox *filterOnServerCheck; - QLabel *intervalLabel; + TQCheckBox *includeInCheck; + TQCheckBox *intervalCheck; + TQCheckBox *filterOnServerCheck; + TQLabel *intervalLabel; KIntNumInput *intervalSpin; KIntNumInput *filterOnServerSizeSpin; - QComboBox *folderCombo; - //QComboBox *identityCombo; + TQComboBox *folderCombo; + //TQComboBox *identityCombo; KPIM::IdentityCombo *identityCombo; - QLabel *identityLabel; + TQLabel *identityLabel; }; struct ImapWidgets { - QLabel *titleLabel; - QLineEdit *nameEdit; - QLineEdit *loginEdit; - QLineEdit *passwordEdit; - QLineEdit *hostEdit; - QLineEdit *portEdit; + TQLabel *titleLabel; + TQLineEdit *nameEdit; + TQLineEdit *loginEdit; + TQLineEdit *passwordEdit; + TQLineEdit *hostEdit; + TQLineEdit *portEdit; #if 0 - QCheckBox *resourceCheck; - QPushButton *resourceClearButton; - QPushButton *resourceClearPastButton; + TQCheckBox *resourceCheck; + TQPushButton *resourceClearButton; + TQPushButton *resourceClearPastButton; #endif - QCheckBox *autoExpungeCheck; // only used by normal (online) IMAP - QCheckBox *hiddenFoldersCheck; - QCheckBox *subscribedFoldersCheck; - QCheckBox *locallySubscribedFoldersCheck; - QCheckBox *loadOnDemandCheck; - QCheckBox *storePasswordCheck; - QCheckBox *progressDialogCheck; // only used by Disconnected IMAP - QCheckBox *includeInCheck; - QCheckBox *intervalCheck; - QCheckBox *listOnlyOpenCheck; - QLabel *intervalLabel; + TQCheckBox *autoExpungeCheck; // only used by normal (online) IMAP + TQCheckBox *hiddenFoldersCheck; + TQCheckBox *subscribedFoldersCheck; + TQCheckBox *locallySubscribedFoldersCheck; + TQCheckBox *loadOnDemandCheck; + TQCheckBox *storePasswordCheck; + TQCheckBox *progressDialogCheck; // only used by Disconnected IMAP + TQCheckBox *includeInCheck; + TQCheckBox *intervalCheck; + TQCheckBox *listOnlyOpenCheck; + TQLabel *intervalLabel; KIntNumInput *intervalSpin; - QButtonGroup *encryptionGroup; - QRadioButton *encryptionNone; - QRadioButton *encryptionSSL; - QRadioButton *encryptionTLS; - QButtonGroup *authGroup; - QRadioButton *authUser; - QRadioButton *authPlain; - QRadioButton *authLogin; - QRadioButton *authCramMd5; - QRadioButton *authDigestMd5; - QRadioButton *authGSSAPI; - QRadioButton *authNTLM; - QRadioButton *authAnonymous; - QPushButton *checkCapabilities; + TQButtonGroup *encryptionGroup; + TQRadioButton *encryptionNone; + TQRadioButton *encryptionSSL; + TQRadioButton *encryptionTLS; + TQButtonGroup *authGroup; + TQRadioButton *authUser; + TQRadioButton *authPlain; + TQRadioButton *authLogin; + TQRadioButton *authCramMd5; + TQRadioButton *authDigestMd5; + TQRadioButton *authGSSAPI; + TQRadioButton *authNTLM; + TQRadioButton *authAnonymous; + TQPushButton *checkCapabilities; FolderRequester *trashCombo; KLineEdit *personalNS; KLineEdit *otherUsersNS; KLineEdit *sharedNS; - QToolButton *editPNS; - QToolButton *editONS; - QToolButton *editSNS; + TQToolButton *editPNS; + TQToolButton *editONS; + TQToolButton *editSNS; ImapAccountBase::nsDelimMap nsMap; KPIM::IdentityCombo *identityCombo; - QLabel *identityLabel; + TQLabel *identityLabel; }; private slots: @@ -229,14 +229,14 @@ class AccountDialog : public KDialogBase void slotImapEncryptionChanged(int); void slotCheckPopCapabilities(); void slotCheckImapCapabilities(); - void slotPopCapabilities( const QStringList &, const QStringList & ); - void slotImapCapabilities( const QStringList &, const QStringList & ); + void slotPopCapabilities( const TQStringList &, const TQStringList & ); + void slotImapCapabilities( const TQStringList &, const TQStringList & ); void slotReloadNamespaces(); void slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map ); void slotEditPersonalNamespace(); void slotEditOtherUsersNamespace(); void slotEditSharedNamespace(); - void slotConnectionResult( int errorCode, const QString& ); + void slotConnectionResult( int errorCode, const TQString& ); void slotLeaveOnServerDaysChanged( int value ); void slotLeaveOnServerCountChanged( int value ); void slotFilterOnServerSizeChanged( int value ); @@ -253,13 +253,13 @@ class AccountDialog : public KDialogBase void makeImapAccountPage( bool disconnected = false ); void setupSettings(); void saveSettings(); - void checkHighest( QButtonGroup * ); - static unsigned int popCapabilitiesFromStringList( const QStringList & ); - static unsigned int imapCapabilitiesFromStringList( const QStringList & ); + void checkHighest( TQButtonGroup * ); + static unsigned int popCapabilitiesFromStringList( const TQStringList & ); + static unsigned int imapCapabilitiesFromStringList( const TQStringList & ); void enablePopFeatures( unsigned int ); void enableImapAuthMethods( unsigned int ); void initAccountForConnect(); - const QString namespaceListToString( const QStringList& list ); + const TQString namespaceListToString( const TQStringList& list ); private: LocalWidgets mLocal; @@ -267,8 +267,8 @@ class AccountDialog : public KDialogBase PopWidgets mPop; ImapWidgets mImap; KMAccount *mAccount; - QValueList > mFolderList; - QStringList mFolderNames; + TQValueList > mFolderList; + TQStringList mFolderNames; KMServerTest *mServerTest; enum EncryptionMethods { NoEncryption = 0, @@ -296,7 +296,7 @@ class AccountDialog : public KDialogBase unsigned int mCapaSSL; unsigned int mCapaTLS; KMail::SieveConfigEditor *mSieveConfigEditor; - QRegExpValidator *mValidator; + TQRegExpValidator *mValidator; }; class NamespaceLineEdit: public KLineEdit @@ -304,15 +304,15 @@ class NamespaceLineEdit: public KLineEdit Q_OBJECT public: - NamespaceLineEdit( QWidget* parent ); + NamespaceLineEdit( TQWidget* parent ); - const QString& lastText() { return mLastText; } + const TQString& lastText() { return mLastText; } public slots: - virtual void setText ( const QString & ); + virtual void setText ( const TQString & ); private: - QString mLastText; + TQString mLastText; }; class NamespaceEditDialog: public KDialogBase @@ -320,7 +320,7 @@ class NamespaceEditDialog: public KDialogBase Q_OBJECT public: - NamespaceEditDialog( QWidget* parent, ImapAccountBase::imapNamespace type, + NamespaceEditDialog( TQWidget* parent, ImapAccountBase::imapNamespace type, ImapAccountBase::nsDelimMap* map ); protected slots: @@ -331,8 +331,8 @@ class NamespaceEditDialog: public KDialogBase ImapAccountBase::imapNamespace mType; ImapAccountBase::nsDelimMap* mNamespaceMap; ImapAccountBase::namespaceDelim mDelimMap; - QMap mLineEditMap; - QButtonGroup* mBg; + TQMap mLineEditMap; + TQButtonGroup* mBg; }; } // namespace KMail diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp index 54a1b416..0610622f 100644 --- a/kmail/accountmanager.cpp +++ b/kmail/accountmanager.cpp @@ -25,14 +25,14 @@ #include #include -#include -#include +#include +#include using namespace KMail; //----------------------------------------------------------------------------- AccountManager::AccountManager() - :QObject(), mNewMailArrived( false ), mInteractive( false ), + :TQObject(), mNewMailArrived( false ), mInteractive( false ), mTotalNewMailsArrived( 0 ), mDisplaySummary( false ) { mAcctChecking.clear(); @@ -50,15 +50,15 @@ AccountManager::~AccountManager() void AccountManager::writeConfig( bool withSync ) { KConfig* config = KMKernel::config(); - QString groupName; + TQString groupName; KConfigGroupSaver saver(config, "General"); config->writeEntry("accounts", mAcctList.count()); // first delete all account groups in the config file: - QStringList accountGroups = - config->groupList().grep( QRegExp( "Account \\d+" ) ); - for ( QStringList::Iterator it = accountGroups.begin() ; + TQStringList accountGroups = + config->groupList().grep( TQRegExp( "Account \\d+" ) ); + for ( TQStringList::Iterator it = accountGroups.begin() ; it != accountGroups.end() ; ++it ) config->deleteGroup( *it ); @@ -78,8 +78,8 @@ void AccountManager::readConfig(void) { KConfig* config = KMKernel::config(); KMAccount* acct; - QString acctType, acctName; - QCString groupName; + TQString acctType, acctName; + TQCString groupName; int i, num; uint id; @@ -149,8 +149,8 @@ void AccountManager::processNextCheck( bool _newMail ) kdDebug(5006) << "account " << acct->name() << " finished check" << endl; mAcctChecking.remove( acct ); kmkernel->filterMgr()->deref(); - disconnect( acct, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( processNextCheck( bool ) ) ); + disconnect( acct, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( processNextCheck( bool ) ) ); } if ( mAcctChecking.isEmpty() ) { // all checks finished, display summary @@ -164,7 +164,7 @@ void AccountManager::processNextCheck( bool _newMail ) } if ( mAcctTodo.isEmpty() ) return; - QString accountHostName; + TQString accountHostName; KMAccount *curAccount = 0; for ( AccountList::Iterator it ( mAcctTodo.begin() ), last ( mAcctTodo.end() ); it != last; ) { @@ -180,7 +180,7 @@ void AccountManager::processNextCheck( bool _newMail ) if ( curAccount->type() != "imap" && curAccount->type() != "cachedimap" && curAccount->folder() == 0 ) { - QString tmp = i18n("Account %1 has no mailbox defined:\n" + TQString tmp = i18n("Account %1 has no mailbox defined:\n" "mail checking aborted;\n" "check your account settings.") .arg(curAccount->name()); @@ -196,18 +196,18 @@ void AccountManager::processNextCheck( bool _newMail ) // Check with the network status daemon whether the network is available const int NetWorkStatusUnknown = 1; const int NetWorkStatusOnline = 8; - QCString replyType; - QByteArray params; - QByteArray reply; + TQCString replyType; + TQByteArray params; + TQByteArray reply; - QDataStream stream( params, IO_WriteOnly ); + TQDataStream stream( params, IO_WriteOnly ); stream << static_cast( curAccount )->host(); - if ( kapp->dcopClient()->call( "kded", "networkstatus", "status(QString)", + if ( kapp->dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && ( replyType == "int" ) ) { int result; - QDataStream stream2( reply, IO_ReadOnly ); + TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; kdDebug() << k_funcinfo << "networkstatus status = " << result << endl; // if it's not unknown (no networks announced by network control apps), and not offline, give up now @@ -219,8 +219,8 @@ void AccountManager::processNextCheck( bool _newMail ) } } - connect( curAccount, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( processNextCheck( bool ) ) ); + connect( curAccount, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( processNextCheck( bool ) ) ); KPIM::BroadcastStatus::instance()->setStatusMsg( i18n("Checking account %1 for new mail").arg(curAccount->name())); @@ -234,7 +234,7 @@ void AccountManager::processNextCheck( bool _newMail ) } //----------------------------------------------------------------------------- -KMAccount* AccountManager::create( const QString &aType, const QString &aName, uint id ) +KMAccount* AccountManager::create( const TQString &aType, const TQString &aName, uint id ) { KMAccount* act = 0; if ( id == 0 ) @@ -258,8 +258,8 @@ KMAccount* AccountManager::create( const QString &aType, const QString &aName, u kdWarning(5006) << "Attempt to instantiate a non-existing account type!" << endl; return 0; } - connect( act, SIGNAL( newMailsProcessed( const QMap & ) ), - this, SLOT( addToTotalNewMailCount( const QMap & ) ) ); + connect( act, TQT_SIGNAL( newMailsProcessed( const TQMap & ) ), + this, TQT_SLOT( addToTotalNewMailCount( const TQMap & ) ) ); return act; } @@ -281,7 +281,7 @@ void AccountManager::add( KMAccount *account ) //----------------------------------------------------------------------------- -KMAccount* AccountManager::findByName(const QString &aName) const +KMAccount* AccountManager::findByName(const TQString &aName) const { if ( aName.isEmpty() ) return 0; @@ -370,9 +370,9 @@ void AccountManager::invalidateIMAPFolders() //----------------------------------------------------------------------------- -QStringList AccountManager::getAccounts() const +TQStringList AccountManager::getAccounts() const { - QStringList strList; + TQStringList strList; for ( AccountList::ConstIterator it( mAcctList.begin() ), end( mAcctList.end() ); it != end; ++it ) { strList.append( (*it)->name() ); } @@ -392,9 +392,9 @@ void AccountManager::intCheckMail(int item, bool _interactive) //----------------------------------------------------------------------------- -void AccountManager::addToTotalNewMailCount( const QMap & newInFolder ) +void AccountManager::addToTotalNewMailCount( const TQMap & newInFolder ) { - for ( QMap::const_iterator it = newInFolder.begin(); + for ( TQMap::const_iterator it = newInFolder.begin(); it != newInFolder.end(); ++it ) { mTotalNewMailsArrived += it.data(); if ( mTotalNewInFolder.find( it.key() ) == mTotalNewInFolder.end() ) @@ -407,7 +407,7 @@ void AccountManager::addToTotalNewMailCount( const QMap & newInFol //----------------------------------------------------------------------------- uint AccountManager::createId() { - QValueList usedIds; + TQValueList usedIds; for ( AccountList::ConstIterator it( mAcctList.begin() ), end( mAcctList.end() ); it != end; ++it ) { usedIds << (*it)->id(); } diff --git a/kmail/accountmanager.h b/kmail/accountmanager.h index fda0591f..95b7b49e 100644 --- a/kmail/accountmanager.h +++ b/kmail/accountmanager.h @@ -20,7 +20,7 @@ #ifndef accountmanager_h #define accountmanager_h -#include +#include #include "kmaccount.h" #include @@ -51,8 +51,8 @@ public: /** Create a new account of given type with given name. Currently the types "local" for local mail folders and "pop" are supported. */ - KMAccount* create( const QString& type, - const QString& name = QString::null, + KMAccount* create( const TQString& type, + const TQString& name = TQString::null, uint id = 0); /** Adds an account to the list of accounts */ @@ -60,7 +60,7 @@ public: /** Find account by name. Returns 0 if account does not exist. Search is done case sensitive. */ - KMAccount* findByName( const QString& name ) const; + KMAccount* findByName( const TQString& name ) const; /** Find account by id. Returns 0 if account does not exist. */ @@ -84,7 +84,7 @@ public: /** Delete all IMAP folders and resync them */ void invalidateIMAPFolders(); - QStringList getAccounts() const; + TQStringList getAccounts() const; /// Called on exit (KMMainWin::queryExit) void cancelMailCheck(); @@ -101,7 +101,7 @@ public slots: /** this slot increases the count of new mails to show a total number after checking in multiple accounts. */ - void addToTotalNewMailCount( const QMap & newInFolder ); + void addToTotalNewMailCount( const TQMap & newInFolder ); signals: @@ -112,7 +112,7 @@ signals: * @param newInFolder number of new messages for each folder **/ void checkedMail( bool newMail, bool interactive, - const QMap & newInFolder ); + const TQMap & newInFolder ); /** emitted when an account is removed */ void accountRemoved( KMAccount* account ); /** emitted when an account is added */ @@ -131,7 +131,7 @@ private: int mTotalNewMailsArrived; // for detailed (per folder) new mail notification - QMap mTotalNewInFolder; + TQMap mTotalNewInFolder; // if a summary should be displayed bool mDisplaySummary; diff --git a/kmail/accountwizard.cpp b/kmail/accountwizard.cpp index cc831790..de6c4317 100644 --- a/kmail/accountwizard.cpp +++ b/kmail/accountwizard.cpp @@ -32,13 +32,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kmacctlocal.h" #include "kmkernel.h" @@ -81,7 +81,7 @@ class AccountTypeBox : public KListBox public: enum Type { Local, POP3, IMAP, dIMAP, Maildir }; - AccountTypeBox( QWidget *parent ) + AccountTypeBox( TQWidget *parent ) : KListBox( parent, "AccountTypeBox" ) { mTypeList << i18n( "Local mailbox" ); @@ -104,10 +104,10 @@ class AccountTypeBox : public KListBox } private: - QStringList mTypeList; + TQStringList mTypeList; }; -AccountWizard::AccountWizard( KMKernel *kernel, QWidget *parent ) +AccountWizard::AccountWizard( KMKernel *kernel, TQWidget *parent ) : KWizard( parent, "KWizard" ), mKernel( kernel ), mAccount( 0 ), mTransportInfo( 0 ), mServerTest( 0 ) { @@ -118,21 +118,21 @@ AccountWizard::AccountWizard( KMKernel *kernel, QWidget *parent ) setupServerInformationPage(); } -void AccountWizard::start( KMKernel *kernel, QWidget *parent ) +void AccountWizard::start( KMKernel *kernel, TQWidget *parent ) { KConfigGroup wizardConfig( KMKernel::config(), "AccountWizard" ); if ( wizardConfig.readBoolEntry( "ShowOnStartup", true ) ) { AccountWizard wizard( kernel, parent ); int result = wizard.exec(); - if ( result == QDialog::Accepted ) { + if ( result == TQDialog::Accepted ) { wizardConfig.writeEntry( "ShowOnStartup", false ); kernel->slotConfigChanged(); } } } -void AccountWizard::showPage( QWidget *page ) +void AccountWizard::showPage( TQWidget *page ) { if ( page == mWelcomePage ) { // do nothing @@ -152,7 +152,7 @@ void AccountWizard::showPage( QWidget *page ) } else if ( page == mLoginInformationPage ) { if ( mLoginName->text().isEmpty() ) { // try to extract login from email address - QString email = mEMailAddress->text(); + TQString email = mEMailAddress->text(); int pos = email.find( '@' ); if ( pos != -1 ) mLoginName->setText( email.left( pos ) ); @@ -167,9 +167,9 @@ void AccountWizard::showPage( QWidget *page ) mIncomingLabel->setText( i18n( "Location:" ) ); if ( mTypeBox->type() == AccountTypeBox::Local ) - mIncomingLocation->setText( QDir::homeDirPath() + "/inbox" ); + mIncomingLocation->setText( TQDir::homeDirPath() + "/inbox" ); else - mIncomingLocation->setText( QDir::homeDirPath() + "/Mail/" ); + mIncomingLocation->setText( TQDir::homeDirPath() + "/Mail/" ); } else { mIncomingLocationWdg->hide(); mIncomingServerWdg->show(); @@ -179,20 +179,20 @@ void AccountWizard::showPage( QWidget *page ) setFinishEnabled( mServerInformationPage, true ); } - QWizard::showPage( page ); + TQWizard::showPage( page ); } void AccountWizard::setupWelcomePage() { - mWelcomePage = new QVBox( this ); - ((QVBox*)mWelcomePage)->setSpacing( KDialog::spacingHint() ); + mWelcomePage = new TQVBox( this ); + ((TQVBox*)mWelcomePage)->setSpacing( KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Welcome to KMail" ), mWelcomePage ); - QFont font = label->font(); + TQLabel *label = new TQLabel( i18n( "Welcome to KMail" ), mWelcomePage ); + TQFont font = label->font(); font.setBold( true ); label->setFont( font ); - new QLabel( i18n( "It seems you have started KMail for the first time. " + new TQLabel( i18n( "It seems you have started KMail for the first time. " "You can use this wizard to setup your mail accounts. Just " "enter the connection data that you received from your email provider " "into the following pages." ), mWelcomePage ); @@ -202,10 +202,10 @@ void AccountWizard::setupWelcomePage() void AccountWizard::setupAccountTypePage() { - mAccountTypePage = new QVBox( this ); - ((QVBox*)mAccountTypePage)->setSpacing( KDialog::spacingHint() ); + mAccountTypePage = new TQVBox( this ); + ((TQVBox*)mAccountTypePage)->setSpacing( KDialog::spacingHint() ); - new QLabel( i18n( "Select what kind of account you would like to create" ), mAccountTypePage ); + new TQLabel( i18n( "Select what kind of account you would like to create" ), mAccountTypePage ); mTypeBox = new AccountTypeBox( mAccountTypePage ); @@ -214,25 +214,25 @@ void AccountWizard::setupAccountTypePage() void AccountWizard::setupAccountInformationPage() { - mAccountInformationPage = new QWidget( this ); - QGridLayout *layout = new QGridLayout( mAccountInformationPage, 3, 2, + mAccountInformationPage = new TQWidget( this ); + TQGridLayout *layout = new TQGridLayout( mAccountInformationPage, 3, 2, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Real name:" ), mAccountInformationPage ); + TQLabel *label = new TQLabel( i18n( "Real name:" ), mAccountInformationPage ); mRealName = new KLineEdit( mAccountInformationPage ); label->setBuddy( mRealName ); layout->addWidget( label, 0, 0 ); layout->addWidget( mRealName, 0, 1 ); - label = new QLabel( i18n( "E-mail address:" ), mAccountInformationPage ); + label = new TQLabel( i18n( "E-mail address:" ), mAccountInformationPage ); mEMailAddress = new KLineEdit( mAccountInformationPage ); label->setBuddy( mEMailAddress ); layout->addWidget( label, 1, 0 ); layout->addWidget( mEMailAddress, 1, 1 ); - label = new QLabel( i18n( "Organization:" ), mAccountInformationPage ); + label = new TQLabel( i18n( "Organization:" ), mAccountInformationPage ); mOrganization = new KLineEdit( mAccountInformationPage ); label->setBuddy( mOrganization ); @@ -244,20 +244,20 @@ void AccountWizard::setupAccountInformationPage() void AccountWizard::setupLoginInformationPage() { - mLoginInformationPage = new QWidget( this ); - QGridLayout *layout = new QGridLayout( mLoginInformationPage, 2, 2, + mLoginInformationPage = new TQWidget( this ); + TQGridLayout *layout = new TQGridLayout( mLoginInformationPage, 2, 2, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Login name:" ), mLoginInformationPage ); + TQLabel *label = new TQLabel( i18n( "Login name:" ), mLoginInformationPage ); mLoginName = new KLineEdit( mLoginInformationPage ); label->setBuddy( mLoginName ); layout->addWidget( label, 0, 0 ); layout->addWidget( mLoginName, 0, 1 ); - label = new QLabel( i18n( "Password:" ), mLoginInformationPage ); + label = new TQLabel( i18n( "Password:" ), mLoginInformationPage ); mPassword = new KLineEdit( mLoginInformationPage ); - mPassword->setEchoMode( QLineEdit::Password ); + mPassword->setEchoMode( TQLineEdit::Password ); label->setBuddy( mPassword ); layout->addWidget( label, 1, 0 ); @@ -268,67 +268,67 @@ void AccountWizard::setupLoginInformationPage() void AccountWizard::setupServerInformationPage() { - mServerInformationPage = new QWidget( this ); - QGridLayout *layout = new QGridLayout( mServerInformationPage, 3, 2, + mServerInformationPage = new TQWidget( this ); + TQGridLayout *layout = new TQGridLayout( mServerInformationPage, 3, 2, KDialog::marginHint(), KDialog::spacingHint() ); - mIncomingLabel = new QLabel( mServerInformationPage ); + mIncomingLabel = new TQLabel( mServerInformationPage ); - mIncomingServerWdg = new QVBox( mServerInformationPage ); + mIncomingServerWdg = new TQVBox( mServerInformationPage ); mIncomingServer = new KLineEdit( mIncomingServerWdg ); - mIncomingUseSSL = new QCheckBox( i18n( "Use secure connection (SSL)" ), mIncomingServerWdg ); + mIncomingUseSSL = new TQCheckBox( i18n( "Use secure connection (SSL)" ), mIncomingServerWdg ); - mIncomingLocationWdg = new QHBox( mServerInformationPage ); + mIncomingLocationWdg = new TQHBox( mServerInformationPage ); mIncomingLocation = new KLineEdit( mIncomingLocationWdg ); - mChooseLocation = new QPushButton( i18n( "Choose..." ), mIncomingLocationWdg ); + mChooseLocation = new TQPushButton( i18n( "Choose..." ), mIncomingLocationWdg ); - connect( mChooseLocation, SIGNAL( clicked() ), - this, SLOT( chooseLocation() ) ); + connect( mChooseLocation, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( chooseLocation() ) ); layout->addWidget( mIncomingLabel, 0, 0, AlignTop ); layout->addWidget( mIncomingLocationWdg, 0, 1 ); layout->addWidget( mIncomingServerWdg, 0, 1 ); - QLabel *label = new QLabel( i18n( "Outgoing server:" ), mServerInformationPage ); + TQLabel *label = new TQLabel( i18n( "Outgoing server:" ), mServerInformationPage ); mOutgoingServer = new KLineEdit( mServerInformationPage ); label->setBuddy( mOutgoingServer ); layout->addWidget( label, 1, 0 ); layout->addWidget( mOutgoingServer, 1, 1 ); - mOutgoingUseSSL = new QCheckBox( i18n( "Use secure connection (SSL)" ), mServerInformationPage ); + mOutgoingUseSSL = new TQCheckBox( i18n( "Use secure connection (SSL)" ), mServerInformationPage ); layout->addWidget( mOutgoingUseSSL, 2, 1 ); - mLocalDelivery = new QCheckBox( i18n( "Use local delivery" ), + mLocalDelivery = new TQCheckBox( i18n( "Use local delivery" ), mServerInformationPage ); layout->addWidget( mLocalDelivery, 3, 0 ); - connect( mLocalDelivery, SIGNAL( toggled( bool ) ), - mOutgoingServer, SLOT( setDisabled( bool ) ) ); + connect( mLocalDelivery, TQT_SIGNAL( toggled( bool ) ), + mOutgoingServer, TQT_SLOT( setDisabled( bool ) ) ); addPage( mServerInformationPage, i18n( "Server Information" ) ); } void AccountWizard::chooseLocation() { - QString location; + TQString location; if ( mTypeBox->type() == AccountTypeBox::Local ) { - location = KFileDialog::getSaveFileName( QString(), QString(), this ); + location = KFileDialog::getSaveFileName( TQString(), TQString(), this ); } else if ( mTypeBox->type() == AccountTypeBox::Maildir ) { - location = KFileDialog::getExistingDirectory( QString(), this ); + location = KFileDialog::getExistingDirectory( TQString(), this ); } if ( !location.isEmpty() ) mIncomingLocation->setText( location ); } -QString AccountWizard::accountName() const +TQString AccountWizard::accountName() const { // create account name - QString name( i18n( "None" ) ); + TQString name( i18n( "None" ) ); - QString email = mEMailAddress->text(); + TQString email = mEMailAddress->text(); int pos = email.find( '@' ); if ( pos != -1 ) { name = email.mid( pos + 1 ); @@ -338,10 +338,10 @@ QString AccountWizard::accountName() const return name; } -QLabel *AccountWizard::createInfoLabel( const QString &msg ) +TQLabel *AccountWizard::createInfoLabel( const TQString &msg ) { - QLabel *label = new QLabel( msg, this ); - label->setFrameStyle( QFrame::Panel | QFrame::Raised ); + TQLabel *label = new TQLabel( msg, this ); + label->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); label->resize( fontMetrics().width( msg ) + 20, label->height() * 2 ); label->move( width() / 2 - label->width() / 2, height() / 2 - label->height() / 2 ); label->show(); @@ -361,7 +361,7 @@ void AccountWizard::accept() manager->commit(); - QTimer::singleShot( 0, this, SLOT( createTransport() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( createTransport() ) ); } void AccountWizard::createTransport() @@ -386,7 +386,7 @@ void AccountWizard::createTransport() mTransportInfo->auth = false; mTransportInfo->setStorePasswd( false ); - QTimer::singleShot( 0, this, SLOT( transportCreated() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( transportCreated() ) ); } else { // delivery via SMTP mTransportInfo->type = "smtp"; mTransportInfo->name = accountName(); @@ -425,7 +425,7 @@ void AccountWizard::transportCreated() mTransportInfoList.setAutoDelete( true ); mTransportInfoList.clear(); - QTimer::singleShot( 0, this, SLOT( createAccount() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( createAccount() ) ); } void AccountWizard::createAccount() @@ -485,7 +485,7 @@ void AccountWizard::createAccount() else if ( mTypeBox->type() == AccountTypeBox::IMAP || mTypeBox->type() == AccountTypeBox::dIMAP ) checkImapCapabilities( mIncomingServer->text(), port ); else - QTimer::singleShot( 0, this, SLOT( accountCreated() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( accountCreated() ) ); } void AccountWizard::accountCreated() @@ -503,48 +503,48 @@ void AccountWizard::finished() { GlobalSettings::self()->writeConfig(); - QWizard::accept(); + TQWizard::accept(); } // ----- Security Checks -------------- -void AccountWizard::checkPopCapabilities( const QString &server, int port ) +void AccountWizard::checkPopCapabilities( const TQString &server, int port ) { delete mServerTest; mServerTest = new KMServerTest( POP_PROTOCOL, server, port ); - connect( mServerTest, SIGNAL( capabilities( const QStringList&, const QStringList& ) ), - this, SLOT( popCapabilities( const QStringList&, const QStringList& ) ) ); + connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList&, const TQStringList& ) ), + this, TQT_SLOT( popCapabilities( const TQStringList&, const TQStringList& ) ) ); mAuthInfoLabel = createInfoLabel( i18n( "Check for supported security capabilities of %1..." ).arg( server ) ); } -void AccountWizard::checkImapCapabilities( const QString &server, int port ) +void AccountWizard::checkImapCapabilities( const TQString &server, int port ) { delete mServerTest; mServerTest = new KMServerTest( IMAP_PROTOCOL, server, port ); - connect( mServerTest, SIGNAL( capabilities( const QStringList&, const QStringList& ) ), - this, SLOT( imapCapabilities( const QStringList&, const QStringList& ) ) ); + connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList&, const TQStringList& ) ), + this, TQT_SLOT( imapCapabilities( const TQStringList&, const TQStringList& ) ) ); mAuthInfoLabel = createInfoLabel( i18n( "Check for supported security capabilities of %1..." ).arg( server ) ); } -void AccountWizard::checkSmtpCapabilities( const QString &server, int port ) +void AccountWizard::checkSmtpCapabilities( const TQString &server, int port ) { delete mServerTest; mServerTest = new KMServerTest( SMTP_PROTOCOL, server, port ); - connect( mServerTest, SIGNAL( capabilities( const QStringList&, const QStringList&, - const QString&, const QString&, const QString& ) ), - this, SLOT( smtpCapabilities( const QStringList&, const QStringList&, - const QString&, const QString&, const QString& ) ) ); + connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList&, const TQStringList&, + const TQString&, const TQString&, const TQString& ) ), + this, TQT_SLOT( smtpCapabilities( const TQStringList&, const TQStringList&, + const TQString&, const TQString&, const TQString& ) ) ); mAuthInfoLabel = createInfoLabel( i18n( "Check for supported security capabilities of %1..." ).arg( server ) ); } -void AccountWizard::popCapabilities( const QStringList &capaNormalList, - const QStringList &capaSSLList ) +void AccountWizard::popCapabilities( const TQStringList &capaNormalList, + const TQStringList &capaSSLList ) { uint capaNormal = popCapabilitiesFromStringList( capaNormalList ); uint capaTLS = 0; @@ -593,8 +593,8 @@ void AccountWizard::popCapabilities( const QStringList &capaNormalList, } -void AccountWizard::imapCapabilities( const QStringList &capaNormalList, - const QStringList &capaSSLList ) +void AccountWizard::imapCapabilities( const TQStringList &capaNormalList, + const TQStringList &capaSSLList ) { uint capaNormal = imapCapabilitiesFromStringList( capaNormalList ); uint capaTLS = 0; @@ -641,11 +641,11 @@ void AccountWizard::imapCapabilities( const QStringList &capaNormalList, accountCreated(); } -void AccountWizard::smtpCapabilities( const QStringList &capaNormal, - const QStringList &capaSSL, - const QString &authNone, - const QString &authSSL, - const QString &authTLS ) +void AccountWizard::smtpCapabilities( const TQStringList &capaNormal, + const TQStringList &capaSSL, + const TQString &authNone, + const TQString &authSSL, + const TQString &authTLS ) { uint authBitsNone, authBitsSSL, authBitsTLS; @@ -699,12 +699,12 @@ void AccountWizard::smtpCapabilities( const QStringList &capaNormal, transportCreated(); } -uint AccountWizard::popCapabilitiesFromStringList( const QStringList & l ) +uint AccountWizard::popCapabilitiesFromStringList( const TQStringList & l ) { unsigned int capa = 0; - for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { - QString cur = (*it).upper(); + for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { + TQString cur = (*it).upper(); if ( cur == "PLAIN" ) capa |= Plain; else if ( cur == "LOGIN" ) @@ -726,12 +726,12 @@ uint AccountWizard::popCapabilitiesFromStringList( const QStringList & l ) return capa; } -uint AccountWizard::imapCapabilitiesFromStringList( const QStringList & l ) +uint AccountWizard::imapCapabilitiesFromStringList( const TQStringList & l ) { unsigned int capa = 0; - for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { - QString cur = (*it).upper(); + for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) { + TQString cur = (*it).upper(); if ( cur == "AUTH=PLAIN" ) capa |= Plain; else if ( cur == "AUTH=LOGIN" ) @@ -753,12 +753,12 @@ uint AccountWizard::imapCapabilitiesFromStringList( const QStringList & l ) return capa; } -uint AccountWizard::authMethodsFromString( const QString & s ) +uint AccountWizard::authMethodsFromString( const TQString & s ) { unsigned int result = 0; - QStringList sl = QStringList::split( '\n', s.upper() ); - for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) + TQStringList sl = TQStringList::split( '\n', s.upper() ); + for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) if ( *it == "SASL/LOGIN" ) result |= Login; else if ( *it == "SASL/PLAIN" ) @@ -775,11 +775,11 @@ uint AccountWizard::authMethodsFromString( const QString & s ) return result; } -uint AccountWizard::authMethodsFromStringList( const QStringList & sl ) +uint AccountWizard::authMethodsFromStringList( const TQStringList & sl ) { unsigned int result = 0; - for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) + for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) if ( *it == "LOGIN" ) result |= Login; else if ( *it == "PLAIN" ) diff --git a/kmail/accountwizard.h b/kmail/accountwizard.h index 0dea0e44..56cba599 100644 --- a/kmail/accountwizard.h +++ b/kmail/accountwizard.h @@ -54,15 +54,15 @@ class AccountWizard : public KWizard @param kernel The mail kernel the wizard should work on. @param parent The parent widget of the dialog. */ - static void start( KMKernel *kernel, QWidget *parent = 0 ); + static void start( KMKernel *kernel, TQWidget *parent = 0 ); /** Reimplemented */ - void showPage( QWidget *page ); + void showPage( TQWidget *page ); protected: - AccountWizard( KMKernel *kernel, QWidget *parent ); + AccountWizard( KMKernel *kernel, TQWidget *parent ); ~AccountWizard() {}; void setupWelcomePage(); @@ -81,57 +81,57 @@ class AccountWizard : public KWizard void finished(); private slots: - void popCapabilities( const QStringList&, const QStringList& ); - void imapCapabilities( const QStringList&, const QStringList& ); - void smtpCapabilities( const QStringList&, const QStringList&, - const QString&, const QString&, const QString& ); + void popCapabilities( const TQStringList&, const TQStringList& ); + void imapCapabilities( const TQStringList&, const TQStringList& ); + void smtpCapabilities( const TQStringList&, const TQStringList&, + const TQString&, const TQString&, const TQString& ); private: - QString accountName() const; - QLabel *createInfoLabel( const QString &msg ); + TQString accountName() const; + TQLabel *createInfoLabel( const TQString &msg ); - void checkPopCapabilities( const QString&, int ); - void checkImapCapabilities( const QString&, int ); - void checkSmtpCapabilities( const QString&, int ); - uint popCapabilitiesFromStringList( const QStringList& ); - uint imapCapabilitiesFromStringList( const QStringList& ); - uint authMethodsFromString( const QString& ); - uint authMethodsFromStringList( const QStringList& ); + void checkPopCapabilities( const TQString&, int ); + void checkImapCapabilities( const TQString&, int ); + void checkSmtpCapabilities( const TQString&, int ); + uint popCapabilitiesFromStringList( const TQStringList& ); + uint imapCapabilitiesFromStringList( const TQStringList& ); + uint authMethodsFromString( const TQString& ); + uint authMethodsFromStringList( const TQStringList& ); - QWidget *mWelcomePage; + TQWidget *mWelcomePage; - QWidget *mAccountTypePage; + TQWidget *mAccountTypePage; AccountTypeBox *mTypeBox; - QWidget *mAccountInformationPage; + TQWidget *mAccountInformationPage; KLineEdit *mRealName; KLineEdit *mEMailAddress; KLineEdit *mOrganization; - QWidget *mLoginInformationPage; + TQWidget *mLoginInformationPage; KLineEdit *mLoginName; KLineEdit *mPassword; - QWidget *mServerInformationPage; - QLabel *mIncomingLabel; + TQWidget *mServerInformationPage; + TQLabel *mIncomingLabel; KLineEdit *mIncomingServer; - QCheckBox *mIncomingUseSSL; + TQCheckBox *mIncomingUseSSL; KLineEdit *mIncomingLocation; - QPushButton *mChooseLocation; + TQPushButton *mChooseLocation; KLineEdit *mOutgoingServer; - QCheckBox *mOutgoingUseSSL; - QCheckBox *mLocalDelivery; + TQCheckBox *mOutgoingUseSSL; + TQCheckBox *mLocalDelivery; - QWidget *mIncomingServerWdg; - QWidget *mIncomingLocationWdg; + TQWidget *mIncomingServerWdg; + TQWidget *mIncomingLocationWdg; - QLabel *mAuthInfoLabel; + TQLabel *mAuthInfoLabel; KMKernel *mKernel; KMAccount *mAccount; KMTransportInfo *mTransportInfo; - QPtrList mTransportInfoList; + TQPtrList mTransportInfoList; KMServerTest *mServerTest; }; diff --git a/kmail/acljobs.cpp b/kmail/acljobs.cpp index 568a6f4b..41931829 100644 --- a/kmail/acljobs.cpp +++ b/kmail/acljobs.cpp @@ -36,11 +36,11 @@ using namespace KMail; // Convert str to an ACLPermissions value. // url and user are there only for the error message -static unsigned int IMAPRightsToPermission( const QString& str, const KURL& url, const QString& user ) { +static unsigned int IMAPRightsToPermission( const TQString& str, const KURL& url, const TQString& user ) { unsigned int perm = 0; uint len = str.length(); for (uint i = 0; i < len; ++i) { - QChar ch = str[i]; + TQChar ch = str[i]; switch ( ch.latin1() ) { case 'l': perm |= ACLJobs::List; break; case 'r': perm |= ACLJobs::Read; break; @@ -69,8 +69,8 @@ static unsigned int IMAPRightsToPermission( const QString& str, const KURL& url, return perm; } -static QCString permissionsToIMAPRights( unsigned int permissions ) { - QCString str = ""; +static TQCString permissionsToIMAPRights( unsigned int permissions ) { + TQCString str = ""; if ( permissions & ACLJobs::List ) str += 'l'; if ( permissions & ACLJobs::Read ) @@ -93,9 +93,9 @@ static QCString permissionsToIMAPRights( unsigned int permissions ) { } #ifndef NDEBUG -QString ACLJobs::permissionsToString( unsigned int permissions ) +TQString ACLJobs::permissionsToString( unsigned int permissions ) { - QString str; + TQString str; if ( permissions & ACLJobs::List ) str += "List "; if ( permissions & ACLJobs::Read ) @@ -118,12 +118,12 @@ QString ACLJobs::permissionsToString( unsigned int permissions ) } #endif -KIO::SimpleJob* ACLJobs::setACL( KIO::Slave* slave, const KURL& url, const QString& user, unsigned int permissions ) +KIO::SimpleJob* ACLJobs::setACL( KIO::Slave* slave, const KURL& url, const TQString& user, unsigned int permissions ) { - QString perm = QString::fromLatin1( permissionsToIMAPRights( permissions ) ); + TQString perm = TQString::fromLatin1( permissionsToIMAPRights( permissions ) ); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'A' << (int)'S' << url << user << perm; KIO::SimpleJob* job = KIO::special( url, packedArgs, false ); @@ -131,10 +131,10 @@ KIO::SimpleJob* ACLJobs::setACL( KIO::Slave* slave, const KURL& url, const QStri return job; } -ACLJobs::DeleteACLJob* ACLJobs::deleteACL( KIO::Slave* slave, const KURL& url, const QString& user ) +ACLJobs::DeleteACLJob* ACLJobs::deleteACL( KIO::Slave* slave, const KURL& url, const TQString& user ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'A' << (int)'D' << url << user; ACLJobs::DeleteACLJob* job = new ACLJobs::DeleteACLJob( url, user, packedArgs, false ); @@ -144,8 +144,8 @@ ACLJobs::DeleteACLJob* ACLJobs::deleteACL( KIO::Slave* slave, const KURL& url, c ACLJobs::GetACLJob* ACLJobs::getACL( KIO::Slave* slave, const KURL& url ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'A' << (int)'G' << url; ACLJobs::GetACLJob* job = new ACLJobs::GetACLJob( url, packedArgs, false ); @@ -155,8 +155,8 @@ ACLJobs::GetACLJob* ACLJobs::getACL( KIO::Slave* slave, const KURL& url ) ACLJobs::GetUserRightsJob* ACLJobs::getUserRights( KIO::Slave* slave, const KURL& url ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'A' << (int)'M' << url; ACLJobs::GetUserRightsJob* job = new ACLJobs::GetUserRightsJob( url, packedArgs, false ); @@ -164,43 +164,43 @@ ACLJobs::GetUserRightsJob* ACLJobs::getUserRights( KIO::Slave* slave, const KURL return job; } -ACLJobs::GetACLJob::GetACLJob( const KURL& url, const QByteArray &packedArgs, +ACLJobs::GetACLJob::GetACLJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo ) : KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo ) { - connect( this, SIGNAL(infoMessage(KIO::Job*,const QString&)), - SLOT(slotInfoMessage(KIO::Job*,const QString&)) ); + connect( this, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)), + TQT_SLOT(slotInfoMessage(KIO::Job*,const TQString&)) ); } -void ACLJobs::GetACLJob::slotInfoMessage( KIO::Job*, const QString& str ) +void ACLJobs::GetACLJob::slotInfoMessage( KIO::Job*, const TQString& str ) { // Parse the result - QStringList lst = QStringList::split( "\"", str, true ); + TQStringList lst = TQStringList::split( "\"", str, true ); while ( lst.count() >= 2 ) // we take items 2 by 2 { - QString user = lst.front(); lst.pop_front(); - QString imapRights = lst.front(); lst.pop_front(); + TQString user = lst.front(); lst.pop_front(); + TQString imapRights = lst.front(); lst.pop_front(); unsigned int perm = IMAPRightsToPermission( imapRights, url(), user ); m_entries.append( ACLListEntry( user, imapRights, perm ) ); } } -ACLJobs::GetUserRightsJob::GetUserRightsJob( const KURL& url, const QByteArray &packedArgs, +ACLJobs::GetUserRightsJob::GetUserRightsJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo ) : KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo ) { - connect( this, SIGNAL(infoMessage(KIO::Job*,const QString&)), - SLOT(slotInfoMessage(KIO::Job*,const QString&)) ); + connect( this, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)), + TQT_SLOT(slotInfoMessage(KIO::Job*,const TQString&)) ); } -void ACLJobs::GetUserRightsJob::slotInfoMessage( KIO::Job*, const QString& str ) +void ACLJobs::GetUserRightsJob::slotInfoMessage( KIO::Job*, const TQString& str ) { // Parse the result - m_permissions = IMAPRightsToPermission( str, url(), QString::null ); + m_permissions = IMAPRightsToPermission( str, url(), TQString::null ); } -ACLJobs::DeleteACLJob::DeleteACLJob( const KURL& url, const QString& userId, - const QByteArray &packedArgs, +ACLJobs::DeleteACLJob::DeleteACLJob( const KURL& url, const TQString& userId, + const TQByteArray &packedArgs, bool showProgressInfo ) : KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo ), mUserId( userId ) @@ -214,7 +214,7 @@ ACLJobs::MultiSetACLJob::MultiSetACLJob( KIO::Slave* slave, const KURL& url, con mSlave( slave ), mUrl( url ), mACLList( acl ), mACLListIterator( mACLList.begin() ) { - QTimer::singleShot(0, this, SLOT(slotStart())); + TQTimer::singleShot(0, this, TQT_SLOT(slotStart())); } void ACLJobs::MultiSetACLJob::slotStart() diff --git a/kmail/acljobs.h b/kmail/acljobs.h index 0d4a731d..7abc8065 100644 --- a/kmail/acljobs.h +++ b/kmail/acljobs.h @@ -33,22 +33,22 @@ #define KMACLJOBS_H #include -#include +#include namespace KMail { /// One entry in the ACL list: user and permissions struct ACLListEntry { ACLListEntry() {} // for QValueVector - ACLListEntry( const QString& u, const QString& irl, int p ) + ACLListEntry( const TQString& u, const TQString& irl, int p ) : userId( u ), internalRightsList( irl ), permissions( p ), changed( false ) {} - QString userId; - QString internalRightsList; ///< protocol-dependent string (e.g. IMAP rights list) + TQString userId; + TQString internalRightsList; ///< protocol-dependent string (e.g. IMAP rights list) int permissions; ///< based on the ACLPermissions enum bool changed; ///< special flag for KMFolderCachedImap }; - typedef QValueVector ACLList; + typedef TQValueVector ACLList; /** * This namespace contains functions that return jobs for ACL operations. @@ -78,11 +78,11 @@ namespace ACLJobs { All = List | Read | WriteFlags | Insert | Post | Create | Delete | Administer | WriteSeenFlag }; /// Set the permissions for a given user on a given url - KIO::SimpleJob* setACL( KIO::Slave* slave, const KURL& url, const QString& user, unsigned int permissions ); + KIO::SimpleJob* setACL( KIO::Slave* slave, const KURL& url, const TQString& user, unsigned int permissions ); class DeleteACLJob; /// Delete the permissions for a given user on a given url - DeleteACLJob* deleteACL( KIO::Slave* slave, const KURL& url, const QString& user ); + DeleteACLJob* deleteACL( KIO::Slave* slave, const KURL& url, const TQString& user ); class GetACLJob; /// List all ACLs for a given url @@ -101,13 +101,13 @@ namespace ACLJobs { { Q_OBJECT public: - GetACLJob( const KURL& url, const QByteArray &packedArgs, + GetACLJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo ); const ACLList& entries() const { return m_entries; } protected slots: - void slotInfoMessage( KIO::Job*, const QString& ); + void slotInfoMessage( KIO::Job*, const TQString& ); private: ACLList m_entries; }; @@ -117,12 +117,12 @@ namespace ACLJobs { { Q_OBJECT public: - GetUserRightsJob( const KURL& url, const QByteArray &packedArgs, + GetUserRightsJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo ); unsigned int permissions() const { return m_permissions; } protected slots: - void slotInfoMessage( KIO::Job*, const QString& ); + void slotInfoMessage( KIO::Job*, const TQString& ); private: unsigned int m_permissions; }; @@ -133,14 +133,14 @@ namespace ACLJobs { { Q_OBJECT public: - DeleteACLJob( const KURL& url, const QString& userId, - const QByteArray &packedArgs, + DeleteACLJob( const KURL& url, const TQString& userId, + const TQByteArray &packedArgs, bool showProgressInfo ); - QString userId() const { return mUserId; } + TQString userId() const { return mUserId; } private: - QString mUserId; + TQString mUserId; }; /// Set and delete a list of permissions for different users on a given url @@ -153,7 +153,7 @@ namespace ACLJobs { signals: // Emitted when a given user's permissions were successfully changed. // This allows the caller to keep track of what exactly was done (and handle errors better) - void aclChanged( const QString& userId, int permissions ); + void aclChanged( const TQString& userId, int permissions ); protected slots: virtual void slotStart(); @@ -168,7 +168,7 @@ namespace ACLJobs { #ifndef NDEBUG - QString permissionsToString( unsigned int permissions ); + TQString permissionsToString( unsigned int permissions ); #endif } diff --git a/kmail/actionscheduler.cpp b/kmail/actionscheduler.cpp index 3d92cd7a..0af6cdd4 100644 --- a/kmail/actionscheduler.cpp +++ b/kmail/actionscheduler.cpp @@ -46,23 +46,23 @@ #include "accountmanager.h" using KMail::AccountManager; -#include +#include #include #include using namespace KMail; -typedef QPtrList KMMessageList; +typedef TQPtrList KMMessageList; KMFolderMgr* ActionScheduler::tempFolderMgr = 0; int ActionScheduler::refCount = 0; int ActionScheduler::count = 0; -QValueList *ActionScheduler::schedulerList = 0; +TQValueList *ActionScheduler::schedulerList = 0; bool ActionScheduler::sEnabled = false; bool ActionScheduler::sEnabledChecked = false; ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set, - QValueList filters, + TQValueList filters, KMHeaders *headers, KMFolder *srcFolder) :mSet( set ), mHeaders( headers ) @@ -81,22 +81,22 @@ ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set, mAccount = false; lastCommand = 0; lastJob = 0; - finishTimer = new QTimer( this, "finishTimer" ); - connect( finishTimer, SIGNAL(timeout()), this, SLOT(finish())); - fetchMessageTimer = new QTimer( this, "fetchMessageTimer" ); - connect( fetchMessageTimer, SIGNAL(timeout()), this, SLOT(fetchMessage())); - tempCloseFoldersTimer = new QTimer( this, "tempCloseFoldersTimer" ); - connect( tempCloseFoldersTimer, SIGNAL(timeout()), this, SLOT(tempCloseFolders())); - processMessageTimer = new QTimer( this, "processMessageTimer" ); - connect( processMessageTimer, SIGNAL(timeout()), this, SLOT(processMessage())); - filterMessageTimer = new QTimer( this, "filterMessageTimer" ); - connect( filterMessageTimer, SIGNAL(timeout()), this, SLOT(filterMessage())); - timeOutTimer = new QTimer( this, "timeOutTimer" ); - connect( timeOutTimer, SIGNAL(timeout()), this, SLOT(timeOut())); - fetchTimeOutTimer = new QTimer( this, "fetchTimeOutTimer" ); - connect( fetchTimeOutTimer, SIGNAL(timeout()), this, SLOT(fetchTimeOut())); - - QValueList::Iterator it = filters.begin(); + finishTimer = new TQTimer( this, "finishTimer" ); + connect( finishTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(finish())); + fetchMessageTimer = new TQTimer( this, "fetchMessageTimer" ); + connect( fetchMessageTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fetchMessage())); + tempCloseFoldersTimer = new TQTimer( this, "tempCloseFoldersTimer" ); + connect( tempCloseFoldersTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(tempCloseFolders())); + processMessageTimer = new TQTimer( this, "processMessageTimer" ); + connect( processMessageTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processMessage())); + filterMessageTimer = new TQTimer( this, "filterMessageTimer" ); + connect( filterMessageTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(filterMessage())); + timeOutTimer = new TQTimer( this, "timeOutTimer" ); + connect( timeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeOut())); + fetchTimeOutTimer = new TQTimer( this, "fetchTimeOutTimer" ); + connect( fetchTimeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fetchTimeOut())); + + TQValueList::Iterator it = filters.begin(); for (; it != filters.end(); ++it) mFilters.append( **it ); mDestFolder = 0; @@ -104,7 +104,7 @@ ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set, mDeleteSrcFolder = false; setSourceFolder( srcFolder ); } else { - QString tmpName; + TQString tmpName; tmpName.setNum( count ); if (!tempFolderMgr) tempFolderMgr = new KMFolderMgr(locateLocal("data","kmail/filter")); @@ -114,7 +114,7 @@ ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set, setSourceFolder( tempFolder ); } if (!schedulerList) - schedulerList = new QValueList; + schedulerList = new TQValueList; schedulerList->append( this ); } @@ -122,10 +122,10 @@ ActionScheduler::~ActionScheduler() { schedulerList->remove( this ); tempCloseFolders(); - disconnect( mSrcFolder, SIGNAL(closed()), - this, SLOT(folderClosedOrExpunged()) ); - disconnect( mSrcFolder, SIGNAL(expunged(KMFolder*)), - this, SLOT(folderClosedOrExpunged()) ); + disconnect( mSrcFolder, TQT_SIGNAL(closed()), + this, TQT_SLOT(folderClosedOrExpunged()) ); + disconnect( mSrcFolder, TQT_SIGNAL(expunged(KMFolder*)), + this, TQT_SLOT(folderClosedOrExpunged()) ); mSrcFolder->close("actionschedsrc"); if (mDeleteSrcFolder) @@ -157,12 +157,12 @@ void ActionScheduler::setSourceFolder( KMFolder *srcFolder ) { srcFolder->open("actionschedsrc"); if (mSrcFolder) { - disconnect( mSrcFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(msgAdded(KMFolder*, Q_UINT32)) ); - disconnect( mSrcFolder, SIGNAL(closed()), - this, SLOT(folderClosedOrExpunged()) ); - disconnect( mSrcFolder, SIGNAL(expunged(KMFolder*)), - this, SLOT(folderClosedOrExpunged()) ); + disconnect( mSrcFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(msgAdded(KMFolder*, Q_UINT32)) ); + disconnect( mSrcFolder, TQT_SIGNAL(closed()), + this, TQT_SLOT(folderClosedOrExpunged()) ); + disconnect( mSrcFolder, TQT_SIGNAL(expunged(KMFolder*)), + this, TQT_SLOT(folderClosedOrExpunged()) ); mSrcFolder->close("actionschedsrc"); } mSrcFolder = srcFolder; @@ -170,21 +170,21 @@ void ActionScheduler::setSourceFolder( KMFolder *srcFolder ) for (i = 0; i < mSrcFolder->count(); ++i) enqueue( mSrcFolder->getMsgBase( i )->getMsgSerNum() ); if (mSrcFolder) { - connect( mSrcFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(msgAdded(KMFolder*, Q_UINT32)) ); - connect( mSrcFolder, SIGNAL(closed()), - this, SLOT(folderClosedOrExpunged()) ); - connect( mSrcFolder, SIGNAL(expunged(KMFolder*)), - this, SLOT(folderClosedOrExpunged()) ); + connect( mSrcFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(msgAdded(KMFolder*, Q_UINT32)) ); + connect( mSrcFolder, TQT_SIGNAL(closed()), + this, TQT_SLOT(folderClosedOrExpunged()) ); + connect( mSrcFolder, TQT_SIGNAL(expunged(KMFolder*)), + this, TQT_SLOT(folderClosedOrExpunged()) ); } } -void ActionScheduler::setFilterList( QValueList filters ) +void ActionScheduler::setFilterList( TQValueList filters ) { mFiltersAreQueued = true; mQueuedFilters.clear(); - QValueList::Iterator it = filters.begin(); + TQValueList::Iterator it = filters.begin(); for (; it != filters.end(); ++it) mQueuedFilters.append( **it ); if (!mExecuting) { @@ -221,7 +221,7 @@ int ActionScheduler::tempOpenFolder( KMFolder* aFolder ) void ActionScheduler::tempCloseFolders() { // close temp opened folders - QValueListConstIterator > it; + TQValueListConstIterator > it; for (it = mOpenFolders.begin(); it != mOpenFolders.end(); ++it) { KMFolder *folder = *it; if (folder) @@ -230,17 +230,17 @@ void ActionScheduler::tempCloseFolders() mOpenFolders.clear(); } -void ActionScheduler::execFilters(const QValueList serNums) +void ActionScheduler::execFilters(const TQValueList serNums) { - QValueListConstIterator it; + TQValueListConstIterator it; for (it = serNums.begin(); it != serNums.end(); ++it) execFilters( *it ); } -void ActionScheduler::execFilters(const QPtrList msgList) +void ActionScheduler::execFilters(const TQPtrList msgList) { KMMsgBase *msgBase; - QPtrList list = msgList; + TQPtrList list = msgList; for (msgBase = list.first(); msgBase; msgBase = list.next()) execFilters( msgBase->getMsgSerNum() ); } @@ -380,7 +380,7 @@ void ActionScheduler::finish() void ActionScheduler::fetchMessage() { - QValueListIterator mFetchMessageIt = mFetchSerNums.begin(); + TQValueListIterator mFetchMessageIt = mFetchSerNums.begin(); while (mFetchMessageIt != mFetchSerNums.end()) { if (!MessageProperty::transferInProgress(*mFetchMessageIt)) break; @@ -419,11 +419,11 @@ void ActionScheduler::fetchMessage() if (msg && msg->isComplete()) { messageFetched( msg ); } else if (msg) { - fetchTimeOutTime = QTime::currentTime(); + fetchTimeOutTime = TQTime::currentTime(); fetchTimeOutTimer->start( 60 * 1000, true ); FolderJob *job = msg->parent()->createJob( msg ); - connect( job, SIGNAL(messageRetrieved( KMMessage* )), - SLOT(messageFetched( KMMessage* )) ); + connect( job, TQT_SIGNAL(messageRetrieved( KMMessage* )), + TQT_SLOT(messageFetched( KMMessage* )) ); lastJob = job; job->start(); } else { @@ -450,7 +450,7 @@ void ActionScheduler::messageFetched( KMMessage *msg ) // Is the new serial number being set correctly then? if ((mSet & KMFilterMgr::Explicit) || (msg->headerField( "X-KMail-Filtered" ).isEmpty())) { - QString serNumS; + TQString serNumS; serNumS.setNum( msg->getMsgSerNum() ); KMMessage *newMsg = new KMMessage; newMsg->fromString(msg->asString()); @@ -563,8 +563,8 @@ void ActionScheduler::processMessage() } if (msg) { FolderJob *job = msg->parent()->createJob( msg ); - connect( job, SIGNAL(messageRetrieved( KMMessage* )), - SLOT(messageRetrieved( KMMessage* )) ); + connect( job, TQT_SIGNAL(messageRetrieved( KMMessage* )), + TQT_SLOT(messageRetrieved( KMMessage* )) ); job->start(); } else { mExecuting = false; @@ -595,7 +595,7 @@ void ActionScheduler::filterMessage() // filter is applicable if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "Evaluating filter rules: " ) ); + TQString logText( i18n( "Evaluating filter rules: " ) ); logText.append( (*mFilterIt).pattern()->asString() ); FilterLog::instance()->add( logText, FilterLog::patternDesc ); } @@ -624,7 +624,7 @@ void ActionScheduler::actionMessage(KMFilterAction::ReturnCode res) KMMessage *msg = message( *mMessageIt ); if (msg) { if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "Applying filter action: %1" ) + TQString logText( i18n( "Applying filter action: %1" ) .arg( mFilterAction->displayString() ) ); FilterLog::instance()->add( logText, FilterLog::appliedAction ); } @@ -651,7 +651,7 @@ void ActionScheduler::moveMessage() MessageProperty::setTransferInProgress( *mMessageIt, false, true ); KMMessage *msg = message( *mMessageIt ); KMFolder *folder = MessageProperty::filterFolder( *mMessageIt ); - QString serNumS = msg->headerField( "X-KMail-Filtered" ); + TQString serNumS = msg->headerField( "X-KMail-Filtered" ); if (!serNumS.isEmpty()) mOriginalSerNum = serNumS.toUInt(); else @@ -687,10 +687,10 @@ void ActionScheduler::moveMessage() if (msg && folder && kmkernel->folderIsTrash( folder )) KMFilterAction::sendMDN( msg, KMime::MDN::Deleted ); - timeOutTime = QTime::currentTime(); + timeOutTime = TQTime::currentTime(); KMCommand *cmd = new KMMoveCommand( folder, msg ); - connect( cmd, SIGNAL( completed( KMCommand * ) ), - this, SLOT( moveMessageFinished( KMCommand * ) ) ); + connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( moveMessageFinished( KMCommand * ) ) ); cmd->start(); // sometimes the move command doesn't complete so time out after a minute // and move onto the next message @@ -727,16 +727,16 @@ void ActionScheduler::moveMessageFinished( KMCommand *command ) if (mResult == ResultOk) { mExecutingLock = false; if (cmd) - connect( cmd, SIGNAL( completed( KMCommand * ) ), - this, SLOT( processMessage() ) ); + connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( processMessage() ) ); else processMessageTimer->start( 0, true ); } else { // Note: An alternative to consider is just calling // finishTimer->start and returning if (cmd) - connect( cmd, SIGNAL( completed( KMCommand * ) ), - this, SLOT( finish() ) ); + connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( finish() ) ); else finishTimer->start( 0, true ); } @@ -758,8 +758,8 @@ void ActionScheduler::timeOut() // Note: This is a good place for a debug statement assert( lastCommand ); // sometimes imap jobs seem to just stall so give up and move on - disconnect( lastCommand, SIGNAL( completed( KMCommand * ) ), - this, SLOT( moveMessageFinished( KMCommand * ) ) ); + disconnect( lastCommand, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( moveMessageFinished( KMCommand * ) ) ); lastCommand = 0; mExecutingLock = false; mExecuting = false; @@ -773,41 +773,41 @@ void ActionScheduler::fetchTimeOut() // Note: This is a good place for a debug statement assert( lastJob ); // sometimes imap jobs seem to just stall so give up and move on - disconnect( lastJob, SIGNAL(messageRetrieved( KMMessage* )), - this, SLOT(messageFetched( KMMessage* )) ); + disconnect( lastJob, TQT_SIGNAL(messageRetrieved( KMMessage* )), + this, TQT_SLOT(messageFetched( KMMessage* )) ); lastJob->kill(); lastJob = 0; fetchMessageTimer->start( 0, true ); } -QString ActionScheduler::debug() +TQString ActionScheduler::debug() { - QString res; - QValueList::iterator it; + TQString res; + TQValueList::iterator it; int i = 1; for ( it = schedulerList->begin(); it != schedulerList->end(); ++it ) { - res.append( QString( "ActionScheduler #%1.\n" ).arg( i ) ); + res.append( TQString( "ActionScheduler #%1.\n" ).arg( i ) ); if ((*it)->mAccount && kmkernel->find( (*it)->mAccountId )) { - res.append( QString( "Account %1, Name %2.\n" ) + res.append( TQString( "Account %1, Name %2.\n" ) .arg( (*it)->mAccountId ) .arg( kmkernel->acctMgr()->find( (*it)->mAccountId )->name() ) ); } - res.append( QString( "mExecuting %1, " ).arg( (*it)->mExecuting ? "true" : "false" ) ); - res.append( QString( "mExecutingLock %1, " ).arg( (*it)->mExecutingLock ? "true" : "false" ) ); - res.append( QString( "mFetchExecuting %1.\n" ).arg( (*it)->mFetchExecuting ? "true" : "false" ) ); - res.append( QString( "mOriginalSerNum %1.\n" ).arg( (*it)->mOriginalSerNum ) ); - res.append( QString( "mMessageIt %1.\n" ).arg( ((*it)->mMessageIt != 0) ? *(*it)->mMessageIt : 0 ) ); - res.append( QString( "mSerNums count %1, " ).arg( (*it)->mSerNums.count() ) ); - res.append( QString( "mFetchSerNums count %1.\n" ).arg( (*it)->mFetchSerNums.count() ) ); - res.append( QString( "mResult " ) ); + res.append( TQString( "mExecuting %1, " ).arg( (*it)->mExecuting ? "true" : "false" ) ); + res.append( TQString( "mExecutingLock %1, " ).arg( (*it)->mExecutingLock ? "true" : "false" ) ); + res.append( TQString( "mFetchExecuting %1.\n" ).arg( (*it)->mFetchExecuting ? "true" : "false" ) ); + res.append( TQString( "mOriginalSerNum %1.\n" ).arg( (*it)->mOriginalSerNum ) ); + res.append( TQString( "mMessageIt %1.\n" ).arg( ((*it)->mMessageIt != 0) ? *(*it)->mMessageIt : 0 ) ); + res.append( TQString( "mSerNums count %1, " ).arg( (*it)->mSerNums.count() ) ); + res.append( TQString( "mFetchSerNums count %1.\n" ).arg( (*it)->mFetchSerNums.count() ) ); + res.append( TQString( "mResult " ) ); if ((*it)->mResult == ResultOk) - res.append( QString( "ResultOk.\n" ) ); + res.append( TQString( "ResultOk.\n" ) ); else if ((*it)->mResult == ResultError) - res.append( QString( "ResultError.\n" ) ); + res.append( TQString( "ResultError.\n" ) ); else if ((*it)->mResult == ResultCriticalError) - res.append( QString( "ResultCriticalError.\n" ) ); + res.append( TQString( "ResultCriticalError.\n" ) ); else - res.append( QString( "Unknown.\n" ) ); + res.append( TQString( "Unknown.\n" ) ); ++i; } diff --git a/kmail/actionscheduler.h b/kmail/actionscheduler.h index 027bce21..e785210b 100644 --- a/kmail/actionscheduler.h +++ b/kmail/actionscheduler.h @@ -37,9 +37,9 @@ #include "kmfiltermgr.h" // KMFilterMgr::FilterSet #include "kmcommands.h" -#include -#include -#include +#include +#include +#include class KMHeaders; @@ -54,7 +54,7 @@ public: enum ReturnCode { ResultOk, ResultError, ResultCriticalError }; ActionScheduler(KMFilterMgr::FilterSet set, - QValueList filters, + TQValueList filters, KMHeaders *headers = 0, KMFolder *srcFolder = 0); ~ActionScheduler(); @@ -75,7 +75,7 @@ public: /** Set a list of filters to work with The current list will not be updated until the queue of messages left to process is empty */ - void setFilterList( QValueList filters ); + void setFilterList( TQValueList filters ); /** Set the id of the account associated with this scheduler */ void setAccountId( uint id ) { mAccountId = id; mAccount = true; } @@ -84,12 +84,12 @@ public: void clearAccountId() { mAccountId = 0; mAccount = false; } /** Queue a message for filtering */ - void execFilters(const QValueList serNums); - void execFilters(const QPtrList msgList); + void execFilters(const TQValueList serNums); + void execFilters(const TQPtrList msgList); void execFilters(KMMsgBase* msgBase); void execFilters(Q_UINT32 serNum); - static QString debug(); + static TQString debug(); static bool isEnabled(); /** Allow or deny manipulations on the message to be filtered. @@ -136,19 +136,19 @@ private slots: void fetchTimeOut(); private: - static QValueList *schedulerList; // for debugging + static TQValueList *schedulerList; // for debugging static KMFolderMgr *tempFolderMgr; static int refCount, count; static bool sEnabled, sEnabledChecked; - QValueListIterator mMessageIt; - QValueListIterator mFilterIt; - QValueList mSerNums, mFetchSerNums; - QValueList > mOpenFolders; - QValueList mFilters, mQueuedFilters; + TQValueListIterator mMessageIt; + TQValueListIterator mFilterIt; + TQValueList mSerNums, mFetchSerNums; + TQValueList > mOpenFolders; + TQValueList mFilters, mQueuedFilters; KMFilterAction* mFilterAction; KMFilterMgr::FilterSet mSet; KMHeaders *mHeaders; - QGuardedPtr mSrcFolder, mDestFolder; + TQGuardedPtr mSrcFolder, mDestFolder; bool mExecuting, mExecutingLock, mFetchExecuting; bool mUnget, mFetchUnget; bool mIgnore; @@ -160,10 +160,10 @@ private: Q_UINT32 mOriginalSerNum; bool mDeleteSrcFolder; ReturnCode mResult; - QTimer *finishTimer, *fetchMessageTimer, *tempCloseFoldersTimer; - QTimer *processMessageTimer, *filterMessageTimer; - QTimer *timeOutTimer, *fetchTimeOutTimer; - QTime timeOutTime, fetchTimeOutTime; + TQTimer *finishTimer, *fetchMessageTimer, *tempCloseFoldersTimer; + TQTimer *processMessageTimer, *filterMessageTimer; + TQTimer *timeOutTimer, *fetchTimeOutTimer; + TQTime timeOutTime, fetchTimeOutTime; KMCommand *lastCommand; FolderJob *lastJob; }; diff --git a/kmail/annotationjobs.cpp b/kmail/annotationjobs.cpp index 314f01fa..6b9cd8e8 100644 --- a/kmail/annotationjobs.cpp +++ b/kmail/annotationjobs.cpp @@ -35,11 +35,11 @@ using namespace KMail; KIO::SimpleJob* AnnotationJobs::setAnnotation( - KIO::Slave* slave, const KURL& url, const QString& entry, - const QMap& attributes ) + KIO::Slave* slave, const KURL& url, const TQString& entry, + const TQMap& attributes ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'M' << (int)'S' << url << entry << attributes; KIO::SimpleJob* job = KIO::special( url, packedArgs, false ); @@ -48,11 +48,11 @@ KIO::SimpleJob* AnnotationJobs::setAnnotation( } AnnotationJobs::GetAnnotationJob* AnnotationJobs::getAnnotation( - KIO::Slave* slave, const KURL& url, const QString& entry, - const QStringList& attributes ) + KIO::Slave* slave, const KURL& url, const TQString& entry, + const TQStringList& attributes ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'M' << (int)'G' << url << entry << attributes; GetAnnotationJob* job = new GetAnnotationJob( url, entry, packedArgs, false ); @@ -60,42 +60,42 @@ AnnotationJobs::GetAnnotationJob* AnnotationJobs::getAnnotation( return job; } -AnnotationJobs::GetAnnotationJob::GetAnnotationJob( const KURL& url, const QString& entry, - const QByteArray &packedArgs, +AnnotationJobs::GetAnnotationJob::GetAnnotationJob( const KURL& url, const TQString& entry, + const TQByteArray &packedArgs, bool showProgressInfo ) : KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo ), mEntry( entry ) { - connect( this, SIGNAL(infoMessage(KIO::Job*,const QString&)), - SLOT(slotInfoMessage(KIO::Job*,const QString&)) ); + connect( this, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)), + TQT_SLOT(slotInfoMessage(KIO::Job*,const TQString&)) ); } -void AnnotationJobs::GetAnnotationJob::slotInfoMessage( KIO::Job*, const QString& str ) +void AnnotationJobs::GetAnnotationJob::slotInfoMessage( KIO::Job*, const TQString& str ) { // Parse the result - QStringList lst = QStringList::split( "\r", str ); + TQStringList lst = TQStringList::split( "\r", str ); while ( lst.count() >= 2 ) // we take items 2 by 2 { - QString name = lst.front(); lst.pop_front(); - QString value = lst.front(); lst.pop_front(); + TQString name = lst.front(); lst.pop_front(); + TQString value = lst.front(); lst.pop_front(); mAnnotations.append( AnnotationAttribute( mEntry, name, value ) ); } } AnnotationJobs::MultiGetAnnotationJob::MultiGetAnnotationJob( - KIO::Slave* slave, const KURL& url, const QStringList& entries, bool showProgressInfo ) + KIO::Slave* slave, const KURL& url, const TQStringList& entries, bool showProgressInfo ) : KIO::Job( showProgressInfo ), mSlave( slave ), mUrl( url ), mEntryList( entries ), mEntryListIterator( mEntryList.begin() ) { - QTimer::singleShot(0, this, SLOT(slotStart())); + TQTimer::singleShot(0, this, TQT_SLOT(slotStart())); } void AnnotationJobs::MultiGetAnnotationJob::slotStart() { if ( mEntryListIterator != mEntryList.end() ) { - QStringList attributes; + TQStringList attributes; attributes << "value"; KIO::Job* job = getAnnotation( mSlave, mUrl, *mEntryListIterator, attributes ); addSubjob( job ); @@ -111,8 +111,8 @@ void AnnotationJobs::MultiGetAnnotationJob::slotResult( KIO::Job *job ) return; } subjobs.remove( job ); - const QString& entry = *mEntryListIterator; - QString value; + const TQString& entry = *mEntryListIterator; + TQString value; bool found = false; GetAnnotationJob* getJob = static_cast( job ); const AnnotationList& lst = getJob->annotations(); @@ -130,7 +130,7 @@ void AnnotationJobs::MultiGetAnnotationJob::slotResult( KIO::Job *job ) slotStart(); } -AnnotationJobs::MultiGetAnnotationJob* AnnotationJobs::multiGetAnnotation( KIO::Slave* slave, const KURL& url, const QStringList& entries ) +AnnotationJobs::MultiGetAnnotationJob* AnnotationJobs::multiGetAnnotation( KIO::Slave* slave, const KURL& url, const TQStringList& entries ) { return new MultiGetAnnotationJob( slave, url, entries, false /*showProgressInfo*/ ); } @@ -143,7 +143,7 @@ AnnotationJobs::MultiSetAnnotationJob::MultiSetAnnotationJob( mSlave( slave ), mUrl( url ), mAnnotationList( annotations ), mAnnotationListIterator( mAnnotationList.begin() ) { - QTimer::singleShot(0, this, SLOT(slotStart())); + TQTimer::singleShot(0, this, TQT_SLOT(slotStart())); } @@ -153,7 +153,7 @@ void AnnotationJobs::MultiSetAnnotationJob::slotStart() const AnnotationAttribute& attr = *mAnnotationListIterator; // setAnnotation can set multiple attributes for a given entry. // So in theory we could group entries coming from our list. Bah. - QMap attributes; + TQMap attributes; attributes.insert( attr.name, attr.value ); kdDebug() << k_funcinfo << " setting annotation " << attr.entry << " " << attr.name << " " << attr.value << endl; KIO::Job* job = setAnnotation( mSlave, mUrl, attr.entry, attributes ); @@ -187,8 +187,8 @@ AnnotationJobs::MultiSetAnnotationJob* AnnotationJobs::multiSetAnnotation( AnnotationJobs::MultiUrlGetAnnotationJob::MultiUrlGetAnnotationJob( KIO::Slave* slave, const KURL& baseUrl, - const QStringList& paths, - const QString& annotation ) + const TQStringList& paths, + const TQString& annotation ) : KIO::Job( false ), mSlave( slave ), mUrl( baseUrl ), @@ -196,14 +196,14 @@ AnnotationJobs::MultiUrlGetAnnotationJob::MultiUrlGetAnnotationJob( KIO::Slave* mPathListIterator( mPathList.begin() ), mAnnotation( annotation ) { - QTimer::singleShot(0, this, SLOT(slotStart())); + TQTimer::singleShot(0, this, TQT_SLOT(slotStart())); } void AnnotationJobs::MultiUrlGetAnnotationJob::slotStart() { if ( mPathListIterator != mPathList.end() ) { - QStringList attributes; + TQStringList attributes; attributes << "value"; KURL url(mUrl); url.setPath( *mPathListIterator ); @@ -221,7 +221,7 @@ void AnnotationJobs::MultiUrlGetAnnotationJob::slotResult( KIO::Job *job ) return; } subjobs.remove( job ); - const QString& path = *mPathListIterator; + const TQString& path = *mPathListIterator; GetAnnotationJob* getJob = static_cast( job ); const AnnotationList& lst = getJob->annotations(); for ( unsigned int i = 0 ; i < lst.size() ; ++ i ) { @@ -236,15 +236,15 @@ void AnnotationJobs::MultiUrlGetAnnotationJob::slotResult( KIO::Job *job ) slotStart(); } -QMap AnnotationJobs::MultiUrlGetAnnotationJob::annotations() const +TQMap AnnotationJobs::MultiUrlGetAnnotationJob::annotations() const { return mAnnotations; } AnnotationJobs::MultiUrlGetAnnotationJob* AnnotationJobs::multiUrlGetAnnotation( KIO::Slave* slave, const KURL& baseUrl, - const QStringList& paths, - const QString& annotation ) + const TQStringList& paths, + const TQString& annotation ) { return new MultiUrlGetAnnotationJob( slave, baseUrl, paths, annotation ); } diff --git a/kmail/annotationjobs.h b/kmail/annotationjobs.h index 5375eeed..2c6ca984 100644 --- a/kmail/annotationjobs.h +++ b/kmail/annotationjobs.h @@ -33,21 +33,21 @@ #define ANNOTATIONJOBS_H #include -#include +#include namespace KMail { /// One entry in the annotation list: attribute name and attribute value struct AnnotationAttribute { AnnotationAttribute() {} // for QValueVector - AnnotationAttribute( const QString& e, const QString& n, const QString& v ) + AnnotationAttribute( const TQString& e, const TQString& n, const TQString& v ) : entry( e ), name( n ), value( v ) {} - QString entry; // e.g. /comment - QString name; // e.g. value.shared - QString value; + TQString entry; // e.g. /comment + TQString name; // e.g. value.shared + TQString value; }; -typedef QValueVector AnnotationList; +typedef TQValueVector AnnotationList; /** * This namespace contains functions that return jobs for annotation operations. @@ -65,8 +65,8 @@ namespace AnnotationJobs { * @param entry the name of the annotation entry * @param attributes attribute name+value pairs */ -KIO::SimpleJob* setAnnotation( KIO::Slave* slave, const KURL& url, const QString& entry, - const QMap& attributes ); +KIO::SimpleJob* setAnnotation( KIO::Slave* slave, const KURL& url, const TQString& entry, + const TQMap& attributes ); class MultiSetAnnotationJob; /** @@ -82,15 +82,15 @@ class GetAnnotationJob; * @param entry the name of the annotation entry * @param attributes attribute names */ -GetAnnotationJob* getAnnotation( KIO::Slave* slave, const KURL& url, const QString& entry, - const QStringList& attributes ); +GetAnnotationJob* getAnnotation( KIO::Slave* slave, const KURL& url, const TQString& entry, + const TQStringList& attributes ); class MultiGetAnnotationJob; /** * Get multiple annotation entries * Currently we assume we want to get the "value" for each, to simplify the data structure. */ -MultiGetAnnotationJob* multiGetAnnotation( KIO::Slave* slave, const KURL& url, const QStringList& entries ); +MultiGetAnnotationJob* multiGetAnnotation( KIO::Slave* slave, const KURL& url, const TQStringList& entries ); class MultiUrlGetAnnotationJob; /** @@ -100,8 +100,8 @@ class MultiUrlGetAnnotationJob; */ MultiUrlGetAnnotationJob* multiUrlGetAnnotation( KIO::Slave* slave, const KURL& baseUrl, - const QStringList& paths, - const QString& annotation ); + const TQStringList& paths, + const TQString& annotation ); /// for getAnnotation() @@ -109,16 +109,16 @@ class GetAnnotationJob : public KIO::SimpleJob { Q_OBJECT public: - GetAnnotationJob( const KURL& url, const QString& entry, const QByteArray &packedArgs, + GetAnnotationJob( const KURL& url, const TQString& entry, const TQByteArray &packedArgs, bool showProgressInfo ); const AnnotationList& annotations() const { return mAnnotations; } protected slots: - void slotInfoMessage( KIO::Job*, const QString& ); + void slotInfoMessage( KIO::Job*, const TQString& ); private: AnnotationList mAnnotations; - QString mEntry; + TQString mEntry; }; /// for multiGetAnnotation @@ -127,11 +127,11 @@ class MultiGetAnnotationJob : public KIO::Job Q_OBJECT public: - MultiGetAnnotationJob( KIO::Slave* slave, const KURL& url, const QStringList& entries, bool showProgressInfo ); + MultiGetAnnotationJob( KIO::Slave* slave, const KURL& url, const TQStringList& entries, bool showProgressInfo ); signals: // Emitted when a given annotation was found - or not found - void annotationResult( const QString& entry, const QString& value, bool found ); + void annotationResult( const TQString& entry, const TQString& value, bool found ); protected slots: virtual void slotStart(); @@ -140,8 +140,8 @@ protected slots: private: KIO::Slave* mSlave; const KURL mUrl; - const QStringList mEntryList; - QStringList::const_iterator mEntryListIterator; + const TQStringList mEntryList; + TQStringList::const_iterator mEntryListIterator; }; /// for multiUrlGetAnnotation @@ -151,9 +151,9 @@ class MultiUrlGetAnnotationJob : public KIO::Job public: MultiUrlGetAnnotationJob( KIO::Slave* slave, const KURL& baseUrl, - const QStringList& paths, const QString& annotation ); + const TQStringList& paths, const TQString& annotation ); - QMap annotations() const; + TQMap annotations() const; protected slots: virtual void slotStart(); @@ -162,10 +162,10 @@ protected slots: private: KIO::Slave* mSlave; const KURL mUrl; - const QStringList mPathList; - QStringList::const_iterator mPathListIterator; - QString mAnnotation; - QMap mAnnotations; + const TQStringList mPathList; + TQStringList::const_iterator mPathListIterator; + TQString mAnnotation; + TQMap mAnnotations; }; /// for multiSetAnnotation @@ -178,7 +178,7 @@ public: signals: // Emitted when a given annotation was successfully changed - void annotationChanged( const QString& entry, const QString& attribute, const QString& value ); + void annotationChanged( const TQString& entry, const TQString& attribute, const TQString& value ); protected slots: virtual void slotStart(); diff --git a/kmail/antispamconfig.cpp b/kmail/antispamconfig.cpp index 448bd9ac..9a5b4a23 100644 --- a/kmail/antispamconfig.cpp +++ b/kmail/antispamconfig.cpp @@ -59,13 +59,13 @@ void AntiSpamConfig::readConfig() KConfigGroup general( &config, "General" ); unsigned int totalTools = general.readUnsignedNumEntry( "tools", 0 ); for ( unsigned int i = 1; i <= totalTools; ++i ) { - KConfigGroup tool( &config, QString("Spamtool #%1").arg( i ) ); + KConfigGroup tool( &config, TQString("Spamtool #%1").arg( i ) ); if ( tool.hasKey( "ScoreHeader" ) ) { - QString name = tool.readEntry( "ScoreName" ); - QCString header = tool.readEntry( "ScoreHeader" ).latin1(); - QCString type = tool.readEntry( "ScoreType" ).latin1(); - QString score = tool.readEntryUntranslated( "ScoreValueRegexp" ); - QString threshold = tool.readEntryUntranslated( "ScoreThresholdRegexp" ); + TQString name = tool.readEntry( "ScoreName" ); + TQCString header = tool.readEntry( "ScoreHeader" ).latin1(); + TQCString type = tool.readEntry( "ScoreType" ).latin1(); + TQString score = tool.readEntryUntranslated( "ScoreValueRegexp" ); + TQString threshold = tool.readEntryUntranslated( "ScoreThresholdRegexp" ); SpamAgentTypes typeE = SpamAgentNone; if ( kasciistricmp( type.data(), "bool" ) == 0 ) typeE = SpamAgentBool; @@ -75,20 +75,20 @@ void AntiSpamConfig::readConfig() typeE = SpamAgentFloatLarge; else if ( kasciistricmp( type.data(), "adjusted" ) == 0 ) typeE = SpamAgentAdjustedFloat; - mAgents.append( SpamAgent( name, typeE, header, QRegExp( score ), - QRegExp( threshold ) ) ); + mAgents.append( SpamAgent( name, typeE, header, TQRegExp( score ), + TQRegExp( threshold ) ) ); } } } const SpamAgents AntiSpamConfig::uniqueAgents() const { - QStringList seenAgents; + TQStringList seenAgents; SpamAgents agents; SpamAgents::ConstIterator it( mAgents.begin() ); SpamAgents::ConstIterator end( mAgents.end() ); for ( ; it != end ; ++it ) { - const QString agent( ( *it ).name() ); + const TQString agent( ( *it ).name() ); if ( seenAgents.find( agent ) == seenAgents.end() ) { agents.append( *it ); seenAgents.append( agent ); diff --git a/kmail/antispamconfig.h b/kmail/antispamconfig.h index 64394fe9..b4e73041 100644 --- a/kmail/antispamconfig.h +++ b/kmail/antispamconfig.h @@ -34,8 +34,8 @@ #ifndef __KMAIL_ANTISPAMCONFIG_H__ #define __KMAIL_ANTISPAMCONFIG_H__ -#include -#include +#include +#include class QString; class QCString; @@ -54,26 +54,26 @@ namespace KMail { class SpamAgent { public: SpamAgent() : mType( SpamAgentNone ) {} - SpamAgent( const QString & name, SpamAgentTypes type, const QCString & field, - const QRegExp & score, const QRegExp & threshold ) + SpamAgent( const TQString & name, SpamAgentTypes type, const TQCString & field, + const TQRegExp & score, const TQRegExp & threshold ) : mName( name ), mType( type ), mField( field ), mScore( score ), mThreshold( threshold ) {} - QString name() const { return mName; } + TQString name() const { return mName; } SpamAgentTypes scoreType() const { return mType; } - QCString header() const { return mField; } - QRegExp scorePattern() const { return mScore; } - QRegExp thresholdPattern() const { return mThreshold; } + TQCString header() const { return mField; } + TQRegExp scorePattern() const { return mScore; } + TQRegExp thresholdPattern() const { return mThreshold; } private: - QString mName; + TQString mName; SpamAgentTypes mType; - QCString mField; - QRegExp mScore; - QRegExp mThreshold; + TQCString mField; + TQRegExp mScore; + TQRegExp mThreshold; }; - typedef QValueList SpamAgents; - typedef QValueListIterator SpamAgentsIterator; + typedef TQValueList SpamAgents; + typedef TQValueListIterator SpamAgentsIterator; /** @short Singleton to manage loading the kmail.antispamrc file. diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp index bb8d74bb..e01093fd 100644 --- a/kmail/antispamwizard.cpp +++ b/kmail/antispamwizard.cpp @@ -49,16 +49,16 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include using namespace KMail; AntiSpamWizard::AntiSpamWizard( WizardMode mode, - QWidget* parent, KMFolderTree * mainFolderTree ) + TQWidget* parent, KMFolderTree * mainFolderTree ) : KWizard( parent ), mInfoPage( 0 ), mSpamRulesPage( 0 ), @@ -77,7 +77,7 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode, else kdDebug(5006) << endl << "Considered anti-virus tools: " << endl; #endif - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { #ifndef NDEBUG kdDebug(5006) << "Predefined tool: " << (*it).getId() << endl; @@ -105,24 +105,24 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode, ( mMode == AntiSpam ) ? i18n( "Welcome to the KMail Anti-Spam Wizard" ) : i18n( "Welcome to the KMail Anti-Virus Wizard" ) ); - connect( mInfoPage, SIGNAL( selectionChanged( void ) ), - this, SLOT( checkProgramsSelections( void ) ) ); + connect( mInfoPage, TQT_SIGNAL( selectionChanged( void ) ), + this, TQT_SLOT( checkProgramsSelections( void ) ) ); if ( mMode == AntiSpam ) { mSpamRulesPage = new ASWizSpamRulesPage( 0, "", mainFolderTree ); addPage( mSpamRulesPage, i18n( "Options to fine-tune the handling of spam messages" )); - connect( mSpamRulesPage, SIGNAL( selectionChanged( void ) ), - this, SLOT( slotBuildSummary( void ) ) ); + connect( mSpamRulesPage, TQT_SIGNAL( selectionChanged( void ) ), + this, TQT_SLOT( slotBuildSummary( void ) ) ); } else { mVirusRulesPage = new ASWizVirusRulesPage( 0, "", mainFolderTree ); addPage( mVirusRulesPage, i18n( "Options to fine-tune the handling of virus messages" )); - connect( mVirusRulesPage, SIGNAL( selectionChanged( void ) ), - this, SLOT( checkVirusRulesSelections( void ) ) ); + connect( mVirusRulesPage, TQT_SIGNAL( selectionChanged( void ) ), + this, TQT_SLOT( checkVirusRulesSelections( void ) ) ); } - connect( this, SIGNAL( helpClicked( void) ), - this, SLOT( slotHelpClicked( void ) ) ); + connect( this, TQT_SIGNAL( helpClicked( void) ), + this, TQT_SLOT( slotHelpClicked( void ) ) ); setNextEnabled( mInfoPage, false ); @@ -133,7 +133,7 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode, setFinishEnabled( mSummaryPage, true ); } - QTimer::singleShot( 0, this, SLOT( checkToolAvailability( void ) ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( checkToolAvailability( void ) ) ); } @@ -150,13 +150,13 @@ void AntiSpamWizard::accept() << mVirusRulesPage->selectedFolderName() << endl; KMFilterActionDict dict; - QValueList filterList; + TQValueList filterList; bool replaceExistingFilters = false; // Let's start with virus detection and handling, // so we can avoid spam checks for viral messages if ( mMode == AntiVirus ) { - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && ( mVirusRulesPage->pipeRulesSelected() && (*it).isVirusTool() ) ) @@ -165,7 +165,7 @@ void AntiSpamWizard::accept() // one single filter for each tool // (could get combined but so it's easier to understand for the user) KMFilter* pipeFilter = new KMFilter(); - QPtrList* pipeFilterActions = pipeFilter->actions(); + TQPtrList* pipeFilterActions = pipeFilter->actions(); KMFilterAction* pipeFilterAction = dict["filter app"]->create(); pipeFilterAction->argsFromString( (*it).getDetectCmd() ); pipeFilterActions->append( pipeFilterAction ); @@ -187,7 +187,7 @@ void AntiSpamWizard::accept() { // Sort out viruses depending on header fields set by the tools KMFilter* virusFilter = new KMFilter(); - QPtrList* virusFilterActions = virusFilter->actions(); + TQPtrList* virusFilterActions = virusFilter->actions(); KMFilterAction* virusFilterAction1 = dict["transfer"]->create(); virusFilterAction1->argsFromString( mVirusRulesPage->selectedFolderName() ); virusFilterActions->append( virusFilterAction1 ); @@ -199,14 +199,14 @@ void AntiSpamWizard::accept() KMSearchPattern* virusFilterPattern = virusFilter->pattern(); virusFilterPattern->setName( uniqueNameFor( i18n( "Virus handling" ) ) ); virusFilterPattern->setOp( KMSearchPattern::OpOr ); - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() )) { if ( (*it).isVirusTool() ) { - const QCString header = (*it).getDetectionHeader().ascii(); - const QString & pattern = (*it).getDetectionPattern(); + const TQCString header = (*it).getDetectionHeader().ascii(); + const TQString & pattern = (*it).getDetectionPattern(); if ( (*it).isUseRegExp() ) virusFilterPattern->append( KMSearchRule::createInstance( header, @@ -232,7 +232,7 @@ void AntiSpamWizard::accept() // ATM and needs to be replaced with a value from a (still missing) // checkbox in the GUI. At least, the replacement is announced in the GUI. replaceExistingFilters = true; - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).isSpamTool() && !(*it).isDetectionOnly() ) @@ -241,7 +241,7 @@ void AntiSpamWizard::accept() // one single filter for each tool // (could get combined but so it's easier to understand for the user) KMFilter* pipeFilter = new KMFilter(); - QPtrList* pipeFilterActions = pipeFilter->actions(); + TQPtrList* pipeFilterActions = pipeFilter->actions(); KMFilterAction* pipeFilterAction = dict["filter app"]->create(); pipeFilterAction->argsFromString( (*it).getDetectCmd() ); pipeFilterActions->append( pipeFilterAction ); @@ -264,7 +264,7 @@ void AntiSpamWizard::accept() // Sort out spam depending on header fields set by the tools KMFilter* spamFilter = new KMFilter(); - QPtrList* spamFilterActions = spamFilter->actions(); + TQPtrList* spamFilterActions = spamFilter->actions(); if ( mSpamRulesPage->moveSpamSelected() ) { KMFilterAction* spamFilterAction1 = dict["transfer"]->create(); @@ -285,14 +285,14 @@ void AntiSpamWizard::accept() else spamFilterPattern->setName( uniqueNameFor( i18n( "Spam handling" ) ) ); spamFilterPattern->setOp( KMSearchPattern::OpOr ); - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { if ( (*it).isSpamTool() ) { - const QCString header = (*it).getDetectionHeader().ascii(); - const QString & pattern = (*it).getDetectionPattern(); + const TQCString header = (*it).getDetectionHeader().ascii(); + const TQString & pattern = (*it).getDetectionPattern(); if ( (*it).isUseRegExp() ) spamFilterPattern->append( KMSearchRule::createInstance( header, @@ -316,7 +316,7 @@ void AntiSpamWizard::accept() // Sort out messages classified as unsure bool atLeastOneUnsurePattern = false; KMFilter* unsureFilter = new KMFilter(); - QPtrList* unsureFilterActions = unsureFilter->actions(); + TQPtrList* unsureFilterActions = unsureFilter->actions(); KMFilterAction* unsureFilterAction1 = dict["transfer"]->create(); unsureFilterAction1->argsFromString( mSpamRulesPage->selectedUnsureFolderName() ); unsureFilterActions->append( unsureFilterAction1 ); @@ -326,15 +326,15 @@ void AntiSpamWizard::accept() else unsureFilterPattern->setName( uniqueNameFor( i18n( "Semi spam (unsure) handling" ) ) ); unsureFilterPattern->setOp( KMSearchPattern::OpOr ); - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { if ( (*it).isSpamTool() && (*it).hasTristateDetection()) { atLeastOneUnsurePattern = true; - const QCString header = (*it).getDetectionHeader().ascii(); - const QString & pattern = (*it).getDetectionPattern2(); + const TQCString header = (*it).getDetectionHeader().ascii(); + const TQString & pattern = (*it).getDetectionPattern2(); if ( (*it).isUseRegExp() ) unsureFilterPattern->append( KMSearchRule::createInstance( header, @@ -361,11 +361,11 @@ void AntiSpamWizard::accept() // Classify messages manually as Spam KMFilter* classSpamFilter = new KMFilter(); classSpamFilter->setIcon( "mail_spam" ); - QPtrList* classSpamFilterActions = classSpamFilter->actions(); + TQPtrList* classSpamFilterActions = classSpamFilter->actions(); KMFilterAction* classSpamFilterActionFirst = dict["set status"]->create(); classSpamFilterActionFirst->argsFromString( "P" ); classSpamFilterActions->append( classSpamFilterActionFirst ); - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).useBayesFilter() && !(*it).isDetectionOnly() ) @@ -400,11 +400,11 @@ void AntiSpamWizard::accept() // Classify messages manually as not Spam / as Ham KMFilter* classHamFilter = new KMFilter(); classHamFilter->setIcon( "mail_ham" ); - QPtrList* classHamFilterActions = classHamFilter->actions(); + TQPtrList* classHamFilterActions = classHamFilter->actions(); KMFilterAction* classHamFilterActionFirst = dict["set status"]->create(); classHamFilterActionFirst->argsFromString( "H" ); classHamFilterActions->append( classHamFilterActionFirst ); - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).useBayesFilter() && !(*it).isDetectionOnly() ) @@ -438,7 +438,7 @@ void AntiSpamWizard::accept() KMKernel::self()->filterMgr()->appendFilters( filterList, replaceExistingFilters ); - QDialog::accept(); + TQDialog::accept(); } @@ -449,7 +449,7 @@ void AntiSpamWizard::checkProgramsSelections() mSpamToolsUsed = false; mVirusToolsUsed = false; - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { @@ -488,13 +488,13 @@ void AntiSpamWizard::checkToolAvailability() KCursorSaver busy( KBusyPtr::busy() ); bool found = false; - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { - QString text( i18n("Scanning for %1...").arg( (*it).getId() ) ); + TQString text( i18n("Scanning for %1...").arg( (*it).getId() ) ); mInfoPage->setScanProgressText( text ); if ( (*it).isSpamTool() && (*it).isServerBased() ) { // check the configured account for pattern in - QString pattern = (*it).getServerPattern(); + TQString pattern = (*it).getServerPattern(); kdDebug(5006) << "Testing for server pattern:" << pattern << endl; AccountManager* mgr = kmkernel->acctMgr(); @@ -543,9 +543,9 @@ void AntiSpamWizard::slotHelpClicked() void AntiSpamWizard::slotBuildSummary() { - QString text; - QString newFilters; - QString replaceFilters; + TQString text; + TQString newFilters; + TQString replaceFilters; if ( mMode == AntiVirus ) { text = ""; // TODO add summary for the virus part @@ -562,7 +562,7 @@ void AntiSpamWizard::slotBuildSummary() else text += i18n( "
Spam messages are not moved into a certain folder.

" ); - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).isSpamTool() && !(*it).isDetectionOnly() ) { @@ -574,7 +574,7 @@ void AntiSpamWizard::slotBuildSummary() // The need for a andling of status "probably spam" depends on the tools chosen if ( mSpamRulesPage->moveUnsureSelected() ) { bool atLeastOneUnsurePattern = false; - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { if ( (*it).isSpamTool() && (*it).hasTristateDetection()) @@ -608,7 +608,7 @@ void AntiSpamWizard::slotBuildSummary() } -int AntiSpamWizard::checkForProgram( const QString &executable ) +int AntiSpamWizard::checkForProgram( const TQString &executable ) { kdDebug(5006) << "Testing for executable:" << executable << endl; KProcess process; @@ -626,15 +626,15 @@ bool AntiSpamWizard::anyVirusOptionChecked() } -const QString AntiSpamWizard::uniqueNameFor( const QString & name ) +const TQString AntiSpamWizard::uniqueNameFor( const TQString & name ) { return KMKernel::self()->filterMgr()->createUniqueName( name ); } void AntiSpamWizard::sortFilterOnExistance( - const QString & intendedFilterName, - QString & newFilters, QString & replaceFilters ) + const TQString & intendedFilterName, + TQString & newFilters, TQString & replaceFilters ) { if ( uniqueNameFor( intendedFilterName ) == intendedFilterName ) newFilters += "
  • " + intendedFilterName + "
  • "; @@ -644,10 +644,10 @@ void AntiSpamWizard::sortFilterOnExistance( //--------------------------------------------------------------------------- -AntiSpamWizard::SpamToolConfig::SpamToolConfig( QString toolId, - int configVersion, int prio, QString name, QString exec, - QString url, QString filter, QString detection, QString spam, QString ham, - QString header, QString pattern, QString pattern2, QString serverPattern, +AntiSpamWizard::SpamToolConfig::SpamToolConfig( TQString toolId, + int configVersion, int prio, TQString name, TQString exec, + TQString url, TQString filter, TQString detection, TQString spam, TQString ham, + TQString header, TQString pattern, TQString pattern2, TQString serverPattern, bool detectionOnly, bool regExp, bool bayesFilter, bool tristateDetection, WizardMode type ) : mId( toolId ), mVersion( configVersion ), mPrio( prio ), @@ -670,7 +670,7 @@ bool AntiSpamWizard::SpamToolConfig::isServerBased() const //--------------------------------------------------------------------------- AntiSpamWizard::ConfigReader::ConfigReader( WizardMode mode, - QValueList & configList ) + TQValueList & configList ) : mToolList( configList ), mMode( mode ) { @@ -688,9 +688,9 @@ AntiSpamWizard::ConfigReader::~ConfigReader( ) void AntiSpamWizard::ConfigReader::readAndMergeConfig() { - QString groupName = ( mMode == AntiSpam ) - ? QString("Spamtool #%1") - : QString("Virustool #%1"); + TQString groupName = ( mMode == AntiSpam ) + ? TQString("Spamtool #%1") + : TQString("Virustool #%1"); // read the configuration from the global config file mConfig->setReadDefaults( true ); KConfigGroup general( mConfig, "General" ); @@ -727,24 +727,24 @@ void AntiSpamWizard::ConfigReader::readAndMergeConfig() AntiSpamWizard::SpamToolConfig AntiSpamWizard::ConfigReader::readToolConfig( KConfigGroup & configGroup ) { - QString id = configGroup.readEntry( "Ident" ); + TQString id = configGroup.readEntry( "Ident" ); int version = configGroup.readNumEntry( "Version" ); #ifndef NDEBUG kdDebug(5006) << "Found predefined tool: " << id << endl; kdDebug(5006) << "With config version : " << version << endl; #endif int prio = configGroup.readNumEntry( "Priority", 1 ); - QString name = configGroup.readEntry( "VisibleName" ); - QString executable = configGroup.readEntry( "Executable" ); - QString url = configGroup.readEntry( "URL" ); - QString filterName = configGroup.readEntry( "PipeFilterName" ); - QString detectCmd = configGroup.readEntry( "PipeCmdDetect" ); - QString spamCmd = configGroup.readEntry( "ExecCmdSpam" ); - QString hamCmd = configGroup.readEntry( "ExecCmdHam" ); - QString header = configGroup.readEntry( "DetectionHeader" ); - QString pattern = configGroup.readEntry( "DetectionPattern" ); - QString pattern2 = configGroup.readEntry( "DetectionPattern2" ); - QString serverPattern = configGroup.readEntry( "ServerPattern" ); + TQString name = configGroup.readEntry( "VisibleName" ); + TQString executable = configGroup.readEntry( "Executable" ); + TQString url = configGroup.readEntry( "URL" ); + TQString filterName = configGroup.readEntry( "PipeFilterName" ); + TQString detectCmd = configGroup.readEntry( "PipeCmdDetect" ); + TQString spamCmd = configGroup.readEntry( "ExecCmdSpam" ); + TQString hamCmd = configGroup.readEntry( "ExecCmdHam" ); + TQString header = configGroup.readEntry( "DetectionHeader" ); + TQString pattern = configGroup.readEntry( "DetectionPattern" ); + TQString pattern2 = configGroup.readEntry( "DetectionPattern2" ); + TQString serverPattern = configGroup.readEntry( "ServerPattern" ); bool detectionOnly = configGroup.readBoolEntry( "DetectionOnly", false ); bool useRegExp = configGroup.readBoolEntry( "UseRegExp" ); bool supportsBayes = configGroup.readBoolEntry( "SupportsBayes", false ); @@ -773,7 +773,7 @@ AntiSpamWizard::SpamToolConfig AntiSpamWizard::ConfigReader::createDummyConfig() void AntiSpamWizard::ConfigReader::mergeToolConfig( AntiSpamWizard::SpamToolConfig config ) { bool found = false; - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { #ifndef NDEBUG kdDebug(5006) << "Check against tool: " << (*it).getId() << endl; @@ -800,13 +800,13 @@ void AntiSpamWizard::ConfigReader::mergeToolConfig( AntiSpamWizard::SpamToolConf void AntiSpamWizard::ConfigReader::sortToolList() { - QValueList tmpList; + TQValueList tmpList; SpamToolConfig config; while ( !mToolList.isEmpty() ) { - QValueListIterator highest; + TQValueListIterator highest; int priority = 0; // ascending - for ( QValueListIterator it = mToolList.begin(); + for ( TQValueListIterator it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( (*it).getPrio() > priority ) { priority = (*it).getPrio(); @@ -817,7 +817,7 @@ void AntiSpamWizard::ConfigReader::sortToolList() tmpList.append( config ); mToolList.remove( highest ); } - for ( QValueListIterator it = tmpList.begin(); + for ( TQValueListIterator it = tmpList.begin(); it != tmpList.end(); ++it ) { mToolList.append( (*it) ); } @@ -825,35 +825,35 @@ void AntiSpamWizard::ConfigReader::sortToolList() //--------------------------------------------------------------------------- -ASWizPage::ASWizPage( QWidget * parent, const char * name, - const QString *bannerName ) - : QWidget( parent, name ) +ASWizPage::ASWizPage( TQWidget * parent, const char * name, + const TQString *bannerName ) + : TQWidget( parent, name ) { - QString banner = "kmwizard.png"; + TQString banner = "kmwizard.png"; if ( bannerName && !bannerName->isEmpty() ) banner = *bannerName; - mLayout = new QHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - mPixmap = new QPixmap( UserIcon(banner) ); - mBannerLabel = new QLabel( this ); + mLayout = new TQHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + mPixmap = new TQPixmap( UserIcon(banner) ); + mBannerLabel = new TQLabel( this ); mBannerLabel->setPixmap( *mPixmap ); mBannerLabel->setScaledContents( false ); - mBannerLabel->setFrameShape( QFrame::StyledPanel ); - mBannerLabel->setFrameShadow( QFrame::Sunken ); + mBannerLabel->setFrameShape( TQFrame::StyledPanel ); + mBannerLabel->setFrameShadow( TQFrame::Sunken ); mLayout->addWidget( mBannerLabel ); - mLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); + mLayout->addItem( new TQSpacerItem( 5, 5, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); } //--------------------------------------------------------------------------- ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, - QWidget * parent, const char * name ) + TQWidget * parent, const char * name ) : ASWizPage( parent, name ) { - QBoxLayout * layout = new QVBoxLayout( mLayout ); + TQBoxLayout * layout = new TQVBoxLayout( mLayout ); - mIntroText = new QLabel( this ); + mIntroText = new TQLabel( this ); mIntroText->setText( ( mode == AntiSpamWizard::AntiSpam ) ? i18n( @@ -877,20 +877,20 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, ) ); layout->addWidget( mIntroText ); - mScanProgressText = new QLabel( this ); + mScanProgressText = new TQLabel( this ); mScanProgressText->setText( "" ) ; layout->addWidget( mScanProgressText ); mToolsList = new KListBox( this ); mToolsList->hide(); - mToolsList->setSelectionMode( QListBox::Multi ); - mToolsList->setRowMode( QListBox::FixedNumber ); + mToolsList->setSelectionMode( TQListBox::Multi ); + mToolsList->setRowMode( TQListBox::FixedNumber ); mToolsList->setRowMode( 10 ); layout->addWidget( mToolsList ); - connect( mToolsList, SIGNAL(selectionChanged()), - this, SLOT(processSelectionChange(void)) ); + connect( mToolsList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(processSelectionChange(void)) ); - mSelectionHint = new QLabel( this ); + mSelectionHint = new TQLabel( this ); mSelectionHint->setText( "" ); layout->addWidget( mSelectionHint ); @@ -898,15 +898,15 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, } -void ASWizInfoPage::setScanProgressText( const QString &toolName ) +void ASWizInfoPage::setScanProgressText( const TQString &toolName ) { mScanProgressText->setText( toolName ); } -void ASWizInfoPage::addAvailableTool( const QString &visibleName ) +void ASWizInfoPage::addAvailableTool( const TQString &visibleName ) { - QString listName = visibleName; + TQString listName = visibleName; mToolsList->insertItem( listName ); if ( !mToolsList->isVisible() ) { @@ -918,9 +918,9 @@ void ASWizInfoPage::addAvailableTool( const QString &visibleName ) } } -bool ASWizInfoPage::isProgramSelected( const QString &visibleName ) +bool ASWizInfoPage::isProgramSelected( const TQString &visibleName ) { - QString listName = visibleName; + TQString listName = visibleName; return mToolsList->isSelected( mToolsList->findItem( listName ) ); } @@ -932,19 +932,19 @@ void ASWizInfoPage::processSelectionChange() //--------------------------------------------------------------------------- -ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name, +ASWizSpamRulesPage::ASWizSpamRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree ) : ASWizPage( parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( mLayout ); + TQVBoxLayout *layout = new TQVBoxLayout( mLayout ); - mMarkRules = new QCheckBox( i18n("&Mark detected spam messages as read"), this ); - QWhatsThis::add( mMarkRules, + mMarkRules = new TQCheckBox( i18n("&Mark detected spam messages as read"), this ); + TQWhatsThis::add( mMarkRules, i18n( "Mark messages which have been classified as spam as read.") ); layout->addWidget( mMarkRules); - mMoveSpamRules = new QCheckBox( i18n("Move &known spam to:"), this ); - QWhatsThis::add( mMoveSpamRules, + mMoveSpamRules = new TQCheckBox( i18n("Move &known spam to:"), this ); + TQWhatsThis::add( mMoveSpamRules, i18n( "The default folder for spam messages is the trash folder, " "but you may change that in the folder view below.") ); layout->addWidget( mMoveSpamRules ); @@ -955,12 +955,12 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name, mFolderReqForSpamFolder->setShowOutbox( false ); mFolderReqForSpamFolder->setShowImapFolders( false ); - QHBoxLayout *hLayout1 = new QHBoxLayout( layout ); + TQHBoxLayout *hLayout1 = new TQHBoxLayout( layout ); hLayout1->addSpacing( KDialog::spacingHint() * 3 ); hLayout1->addWidget( mFolderReqForSpamFolder ); - mMoveUnsureRules = new QCheckBox( i18n("Move &probable spam to:"), this ); - QWhatsThis::add( mMoveUnsureRules, + mMoveUnsureRules = new TQCheckBox( i18n("Move &probable spam to:"), this ); + TQWhatsThis::add( mMoveUnsureRules, i18n( "The default folder is the inbox folder, but you may change that " "in the folder view below.

    " "Not all tools support a classification as unsure. If you haven't " @@ -973,22 +973,22 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name, mFolderReqForUnsureFolder->setShowOutbox( false ); mFolderReqForUnsureFolder->setShowImapFolders( false ); - QHBoxLayout *hLayout2 = new QHBoxLayout( layout ); + TQHBoxLayout *hLayout2 = new TQHBoxLayout( layout ); hLayout2->addSpacing( KDialog::spacingHint() * 3 ); hLayout2->addWidget( mFolderReqForUnsureFolder ); layout->addStretch(); - connect( mMarkRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveSpamRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveUnsureRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mFolderReqForSpamFolder, SIGNAL(folderChanged(KMFolder*)), - this, SLOT(processSelectionChange(KMFolder*)) ); - connect( mFolderReqForUnsureFolder, SIGNAL(folderChanged(KMFolder*)), - this, SLOT(processSelectionChange(KMFolder*)) ); + connect( mMarkRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveSpamRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveUnsureRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mFolderReqForSpamFolder, TQT_SIGNAL(folderChanged(KMFolder*)), + this, TQT_SLOT(processSelectionChange(KMFolder*)) ); + connect( mFolderReqForUnsureFolder, TQT_SIGNAL(folderChanged(KMFolder*)), + this, TQT_SLOT(processSelectionChange(KMFolder*)) ); mMarkRules->setChecked( true ); mMoveSpamRules->setChecked( true ); @@ -1013,18 +1013,18 @@ bool ASWizSpamRulesPage::moveUnsureSelected() const } -QString ASWizSpamRulesPage::selectedSpamFolderName() const +TQString ASWizSpamRulesPage::selectedSpamFolderName() const { - QString name = "trash"; + TQString name = "trash"; if ( mFolderReqForSpamFolder->folder() ) name = mFolderReqForSpamFolder->folder()->idString(); return name; } -QString ASWizSpamRulesPage::selectedUnsureFolderName() const +TQString ASWizSpamRulesPage::selectedUnsureFolderName() const { - QString name = "inbox"; + TQString name = "inbox"; if ( mFolderReqForUnsureFolder->folder() ) name = mFolderReqForUnsureFolder->folder()->idString(); return name; @@ -1055,48 +1055,48 @@ void ASWizSpamRulesPage::allowUnsureFolderSelection( bool enabled ) //--------------------------------------------------------------------------- -ASWizVirusRulesPage::ASWizVirusRulesPage( QWidget * parent, const char * name, +ASWizVirusRulesPage::ASWizVirusRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree ) : ASWizPage( parent, name ) { - QGridLayout *grid = new QGridLayout( mLayout, 5, 1, KDialog::spacingHint() ); + TQGridLayout *grid = new TQGridLayout( mLayout, 5, 1, KDialog::spacingHint() ); - mPipeRules = new QCheckBox( i18n("Check messages using the anti-virus tools"), this ); - QWhatsThis::add( mPipeRules, + mPipeRules = new TQCheckBox( i18n("Check messages using the anti-virus tools"), this ); + TQWhatsThis::add( mPipeRules, i18n( "Let the anti-virus tools check your messages. The wizard " "will create appropriate filters. The messages are usually " "marked by the tools so that following filters can react " "on this and, for example, move virus messages to a special folder.") ); grid->addWidget( mPipeRules, 0, 0 ); - mMoveRules = new QCheckBox( i18n("Move detected viral messages to the selected folder"), this ); - QWhatsThis::add( mMoveRules, + mMoveRules = new TQCheckBox( i18n("Move detected viral messages to the selected folder"), this ); + TQWhatsThis::add( mMoveRules, i18n( "A filter to detect messages classified as virus-infected and to move " "those messages into a predefined folder is created. The " "default folder is the trash folder, but you may change that " "in the folder view.") ); grid->addWidget( mMoveRules, 1, 0 ); - mMarkRules = new QCheckBox( i18n("Additionally, mark detected viral messages as read"), this ); + mMarkRules = new TQCheckBox( i18n("Additionally, mark detected viral messages as read"), this ); mMarkRules->setEnabled( false ); - QWhatsThis::add( mMarkRules, + TQWhatsThis::add( mMarkRules, i18n( "Mark messages which have been classified as " "virus-infected as read, as well as moving them " "to the selected folder.") ); grid->addWidget( mMarkRules, 2, 0 ); - QString s = "trash"; + TQString s = "trash"; mFolderTree = new SimpleFolderTree( this, mainFolderTree, s, true ); grid->addWidget( mFolderTree, 3, 0 ); - connect( mPipeRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMarkRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveRules, SIGNAL( toggled( bool ) ), - mMarkRules, SLOT( setEnabled( bool ) ) ); + connect( mPipeRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMarkRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveRules, TQT_SIGNAL( toggled( bool ) ), + mMarkRules, TQT_SLOT( setEnabled( bool ) ) ); } bool ASWizVirusRulesPage::pipeRulesSelected() const @@ -1116,9 +1116,9 @@ bool ASWizVirusRulesPage::markReadRulesSelected() const } -QString ASWizVirusRulesPage::selectedFolderName() const +TQString ASWizVirusRulesPage::selectedFolderName() const { - QString name = "trash"; + TQString name = "trash"; if ( mFolderTree->folder() ) name = mFolderTree->folder()->idString(); return name; @@ -1131,18 +1131,18 @@ void ASWizVirusRulesPage::processSelectionChange() //--------------------------------------------------------------------------- -ASWizSummaryPage::ASWizSummaryPage( QWidget * parent, const char * name ) +ASWizSummaryPage::ASWizSummaryPage( TQWidget * parent, const char * name ) : ASWizPage( parent, name ) { - QBoxLayout * layout = new QVBoxLayout( mLayout ); + TQBoxLayout * layout = new TQVBoxLayout( mLayout ); - mSummaryText = new QLabel( this ); + mSummaryText = new TQLabel( this ); layout->addWidget( mSummaryText ); layout->addStretch(); } -void ASWizSummaryPage::setSummaryText( const QString & text ) +void ASWizSummaryPage::setSummaryText( const TQString & text ) { mSummaryText->setText( text ); } diff --git a/kmail/antispamwizard.h b/kmail/antispamwizard.h index 745edae6..be2e67e8 100644 --- a/kmail/antispamwizard.h +++ b/kmail/antispamwizard.h @@ -33,9 +33,9 @@ #include #include -#include -#include -#include +#include +#include +#include class KActionCollection; class KMFolder; @@ -119,7 +119,7 @@ namespace KMail { within one of the wizard pages. */ AntiSpamWizard( WizardMode mode, - QWidget * parent, KMFolderTree * mainFolderTree ); + TQWidget * parent, KMFolderTree * mainFolderTree ); protected: /** @@ -131,28 +131,28 @@ namespace KMail { { public: SpamToolConfig() {} - SpamToolConfig( QString toolId, int configVersion, int prio, - QString name, QString exec, QString url, QString filter, - QString detection, QString spam, QString ham, - QString header, QString pattern, QString pattern2, - QString serverPattern, + SpamToolConfig( TQString toolId, int configVersion, int prio, + TQString name, TQString exec, TQString url, TQString filter, + TQString detection, TQString spam, TQString ham, + TQString header, TQString pattern, TQString pattern2, + TQString serverPattern, bool detectionOnly, bool regExp, bool bayesFilter, bool tristateDetection, WizardMode type ); int getVersion() const { return mVersion; } int getPrio() const { return mPrio; } - QString getId() const { return mId; } - QString getVisibleName() const { return mVisibleName; } - QString getExecutable() const { return mExecutable; } - QString getWhatsThisText() const { return mWhatsThisText; } - QString getFilterName() const { return mFilterName; } - QString getDetectCmd() const { return mDetectCmd; } - QString getSpamCmd() const { return mSpamCmd; } - QString getHamCmd() const { return mHamCmd; } - QString getDetectionHeader() const { return mDetectionHeader; } - QString getDetectionPattern() const { return mDetectionPattern; } - QString getDetectionPattern2() const { return mDetectionPattern2; } - QString getServerPattern() const { return mServerPattern; } + TQString getId() const { return mId; } + TQString getVisibleName() const { return mVisibleName; } + TQString getExecutable() const { return mExecutable; } + TQString getWhatsThisText() const { return mWhatsThisText; } + TQString getFilterName() const { return mFilterName; } + TQString getDetectCmd() const { return mDetectCmd; } + TQString getSpamCmd() const { return mSpamCmd; } + TQString getHamCmd() const { return mHamCmd; } + TQString getDetectionHeader() const { return mDetectionHeader; } + TQString getDetectionPattern() const { return mDetectionPattern; } + TQString getDetectionPattern2() const { return mDetectionPattern2; } + TQString getServerPattern() const { return mServerPattern; } bool isServerBased() const; bool isDetectionOnly() const { return mDetectionOnly; } bool isUseRegExp() const { return mUseRegExp; } @@ -165,34 +165,34 @@ namespace KMail { private: // used to identifiy configs for the same tool - QString mId; + TQString mId; // The version of the config data, used for merging and // detecting newer configs int mVersion; // the priority of the tool in the list presented to the user int mPrio; // the name as shown by the checkbox in the dialog page - QString mVisibleName; + TQString mVisibleName; // the command to check the existance of the tool - QString mExecutable; + TQString mExecutable; // the What's This help text (e.g. url for the tool) - QString mWhatsThisText; + TQString mWhatsThisText; // name for the created filter in the filter list - QString mFilterName; + TQString mFilterName; // pipe through cmd used to detect spam messages - QString mDetectCmd; + TQString mDetectCmd; // pipe through cmd to let the tool learn a spam message - QString mSpamCmd; + TQString mSpamCmd; // pipe through cmd to let the tool learn a ham message - QString mHamCmd; + TQString mHamCmd; // by which header are messages marked as spam - QString mDetectionHeader; + TQString mDetectionHeader; // what header pattern is used to mark spam messages - QString mDetectionPattern; + TQString mDetectionPattern; // what header pattern is used to mark unsure messages - QString mDetectionPattern2; + TQString mDetectionPattern2; // what header pattern is used in the account to check for a certain server - QString mServerPattern; + TQString mServerPattern; // filter cannot search actively but relies on pattern by regExp or contain rule bool mDetectionOnly; // filter searches for the pattern by regExp or contain rule @@ -214,15 +214,15 @@ namespace KMail { { public: ConfigReader( WizardMode mode, - QValueList & configList ); + TQValueList & configList ); ~ConfigReader( ); - QValueList & getToolList() { return mToolList; } + TQValueList & getToolList() { return mToolList; } void readAndMergeConfig(); private: - QValueList & mToolList; + TQValueList & mToolList; KConfig *mConfig; WizardMode mMode; @@ -250,15 +250,15 @@ namespace KMail { private: /* Check for the availability of an executible along the PATH */ - int checkForProgram( const QString &executable ); + int checkForProgram( const TQString &executable ); /* generic checks if any option in a page is checked */ bool anyVirusOptionChecked(); /* convenience method calling the appropriate filter manager method */ - const QString uniqueNameFor( const QString & name ); + const TQString uniqueNameFor( const TQString & name ); /* convenience method to sort out new and existing filters */ - void sortFilterOnExistance( const QString & intendedFilterName, - QString & newFilters, - QString & replaceFilters ); + void sortFilterOnExistance( const TQString & intendedFilterName, + TQString & newFilters, + TQString & replaceFilters ); /* The pages in the wizard */ ASWizInfoPage * mInfoPage; @@ -267,7 +267,7 @@ namespace KMail { ASWizSummaryPage * mSummaryPage; /* The configured tools and it's settings to be used in the wizard. */ - QValueList mToolList; + TQValueList mToolList; /* Are any spam tools selected? */ bool mSpamToolsUsed; @@ -282,15 +282,15 @@ namespace KMail { class ASWizPage : public QWidget { public: - ASWizPage( QWidget *parent, const char *name, - const QString *bannerName = 0); + ASWizPage( TQWidget *parent, const char *name, + const TQString *bannerName = 0); protected: - QBoxLayout *mLayout; + TQBoxLayout *mLayout; private: - QPixmap *mPixmap; - QLabel *mBannerLabel; + TQPixmap *mPixmap; + TQLabel *mBannerLabel; }; @@ -301,11 +301,11 @@ namespace KMail { public: ASWizInfoPage( AntiSpamWizard::WizardMode mode, - QWidget *parent, const char *name ); + TQWidget *parent, const char *name ); - void setScanProgressText( const QString &toolName ); - void addAvailableTool( const QString &visibleName ); - bool isProgramSelected( const QString &visibleName ); + void setScanProgressText( const TQString &toolName ); + void addAvailableTool( const TQString &visibleName ); + bool isProgramSelected( const TQString &visibleName ); private slots: void processSelectionChange(); @@ -314,9 +314,9 @@ namespace KMail { void selectionChanged(); private: - QLabel *mIntroText; - QLabel *mScanProgressText; - QLabel *mSelectionHint; + TQLabel *mIntroText; + TQLabel *mScanProgressText; + TQLabel *mSelectionHint; KListBox *mToolsList; }; @@ -326,14 +326,14 @@ namespace KMail { Q_OBJECT public: - ASWizSpamRulesPage( QWidget * parent, const char * name, KMFolderTree * mainFolderTree ); + ASWizSpamRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree ); bool markAsReadSelected() const; bool moveSpamSelected() const; bool moveUnsureSelected() const; - QString selectedSpamFolderName() const; - QString selectedUnsureFolderName() const; + TQString selectedSpamFolderName() const; + TQString selectedUnsureFolderName() const; void allowUnsureFolderSelection( bool enabled ); @@ -345,9 +345,9 @@ namespace KMail { void selectionChanged(); private: - QCheckBox * mMarkRules; - QCheckBox * mMoveSpamRules; - QCheckBox * mMoveUnsureRules; + TQCheckBox * mMarkRules; + TQCheckBox * mMoveSpamRules; + TQCheckBox * mMoveUnsureRules; FolderRequester *mFolderReqForSpamFolder; FolderRequester *mFolderReqForUnsureFolder; }; @@ -358,13 +358,13 @@ namespace KMail { Q_OBJECT public: - ASWizVirusRulesPage( QWidget * parent, const char * name, KMFolderTree * mainFolderTree ); + ASWizVirusRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree ); bool pipeRulesSelected() const; bool moveRulesSelected() const; bool markReadRulesSelected() const; - QString selectedFolderName() const; + TQString selectedFolderName() const; private slots: void processSelectionChange(); @@ -372,10 +372,10 @@ namespace KMail { void selectionChanged(); private: - QCheckBox * mPipeRules; - QCheckBox * mMoveRules; + TQCheckBox * mPipeRules; + TQCheckBox * mMoveRules; SimpleFolderTree *mFolderTree; - QCheckBox * mMarkRules; + TQCheckBox * mMarkRules; }; //--------------------------------------------------------------------------- @@ -384,12 +384,12 @@ namespace KMail { Q_OBJECT public: - ASWizSummaryPage( QWidget * parent, const char * name ); + ASWizSummaryPage( TQWidget * parent, const char * name ); - void setSummaryText( const QString & text ); + void setSummaryText( const TQString & text ); private: - QLabel * mSummaryText; + TQLabel * mSummaryText; }; diff --git a/kmail/attachmentlistview.cpp b/kmail/attachmentlistview.cpp index b7c8bdd2..11c53f12 100644 --- a/kmail/attachmentlistview.cpp +++ b/kmail/attachmentlistview.cpp @@ -34,12 +34,12 @@ using KPIM::MailListDrag; #include // other Qt headers -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // other headers (none) @@ -47,7 +47,7 @@ using KPIM::MailListDrag; namespace KMail { AttachmentListView::AttachmentListView( KMail::Composer * composer, - QWidget* parent, + TQWidget* parent, const char* name ) : KListView( parent, name ), mComposer( composer ) @@ -64,7 +64,7 @@ AttachmentListView::~AttachmentListView() //----------------------------------------------------------------------------- -void AttachmentListView::contentsDragEnterEvent( QDragEnterEvent* e ) +void AttachmentListView::contentsDragEnterEvent( TQDragEnterEvent* e ) { if( e->provides( MailListDrag::format() ) || KURLDrag::canDecode( e ) ) e->accept( true ); @@ -74,7 +74,7 @@ void AttachmentListView::contentsDragEnterEvent( QDragEnterEvent* e ) //----------------------------------------------------------------------------- -void AttachmentListView::contentsDragMoveEvent( QDragMoveEvent* e ) +void AttachmentListView::contentsDragMoveEvent( TQDragMoveEvent* e ) { if( e->provides( MailListDrag::format() ) || KURLDrag::canDecode( e ) ) e->accept( true ); @@ -84,19 +84,19 @@ void AttachmentListView::contentsDragMoveEvent( QDragMoveEvent* e ) //----------------------------------------------------------------------------- -void AttachmentListView::contentsDropEvent( QDropEvent* e ) +void AttachmentListView::contentsDropEvent( TQDropEvent* e ) { if( e->provides( MailListDrag::format() ) ) { // Decode the list of serial numbers stored as the drag data - QByteArray serNums; + TQByteArray serNums; MailListDrag::decode( e, serNums ); - QBuffer serNumBuffer( serNums ); + TQBuffer serNumBuffer( serNums ); serNumBuffer.open( IO_ReadOnly ); - QDataStream serNumStream( &serNumBuffer ); + TQDataStream serNumStream( &serNumBuffer ); Q_UINT32 serNum; KMFolder *folder = 0; int idx; - QPtrList messageList; + TQPtrList messageList; while( !serNumStream.atEnd() ) { KMMsgBase *msgBase = 0; serNumStream >> serNum; @@ -128,7 +128,7 @@ void AttachmentListView::contentsDropEvent( QDropEvent* e ) //----------------------------------------------------------------------------- -void AttachmentListView::keyPressEvent( QKeyEvent * e ) +void AttachmentListView::keyPressEvent( TQKeyEvent * e ) { if ( e->key() == Key_Delete ) { emit attachmentDeleted(); diff --git a/kmail/attachmentlistview.h b/kmail/attachmentlistview.h index 23ee6713..cd9a6e56 100644 --- a/kmail/attachmentlistview.h +++ b/kmail/attachmentlistview.h @@ -31,17 +31,17 @@ class AttachmentListView : public KListView { Q_OBJECT public: - AttachmentListView( KMail::Composer * composer = 0, QWidget* parent = 0, + AttachmentListView( KMail::Composer * composer = 0, TQWidget* parent = 0, const char* name = 0 ); virtual ~AttachmentListView(); /** Drag and drop methods */ - void contentsDragEnterEvent( QDragEnterEvent* ); - void contentsDragMoveEvent( QDragMoveEvent* ); - void contentsDropEvent( QDropEvent* ); + void contentsDragEnterEvent( TQDragEnterEvent* ); + void contentsDragMoveEvent( TQDragMoveEvent* ); + void contentsDropEvent( TQDropEvent* ); protected: - virtual void keyPressEvent( QKeyEvent * e ); + virtual void keyPressEvent( TQKeyEvent * e ); virtual void startDrag(); private: diff --git a/kmail/attachmentstrategy.cpp b/kmail/attachmentstrategy.cpp index 37584d84..8d1e59a9 100644 --- a/kmail/attachmentstrategy.cpp +++ b/kmail/attachmentstrategy.cpp @@ -38,7 +38,7 @@ #include "partNode.h" #include "kmmsgpart.h" -#include +#include #include @@ -166,8 +166,8 @@ namespace KMail { return 0; // make compiler happy } - const AttachmentStrategy * AttachmentStrategy::create( const QString & type ) { - QString lowerType = type.lower(); + const AttachmentStrategy * AttachmentStrategy::create( const TQString & type ) { + TQString lowerType = type.lower(); if ( lowerType == "iconic" ) return iconic(); //if ( lowerType == "smart" ) return smart(); // not needed, see below if ( lowerType == "inlined" ) return inlined(); diff --git a/kmail/attachmentstrategy.h b/kmail/attachmentstrategy.h index bcd29cfd..7d052b69 100644 --- a/kmail/attachmentstrategy.h +++ b/kmail/attachmentstrategy.h @@ -49,7 +49,7 @@ namespace KMail { enum Type { Iconic, Smart, Inlined, Hidden }; static const AttachmentStrategy * create( Type type ); - static const AttachmentStrategy * create( const QString & type ); + static const AttachmentStrategy * create( const TQString & type ); static const AttachmentStrategy * iconic(); static const AttachmentStrategy * smart(); diff --git a/kmail/bodypartformatterfactory.cpp b/kmail/bodypartformatterfactory.cpp index 24ee2fba..680d0c48 100644 --- a/kmail/bodypartformatterfactory.cpp +++ b/kmail/bodypartformatterfactory.cpp @@ -45,9 +45,9 @@ using namespace KMail::BodyPartFormatterFactoryPrivate; #include // Qt -#include -#include -#include +#include +#include +#include #include @@ -108,9 +108,9 @@ static void loadPlugins() { kdWarning( 5006 ) << "BodyPartFormatterFactory: cannot instantiate plugin loader!" << endl; return; } - const QStringList types = pl->types(); + const TQStringList types = pl->types(); kdDebug( 5006 ) << "BodyPartFormatterFactory: found " << types.size() << " plugins." << endl; - for ( QStringList::const_iterator it = types.begin() ; it != types.end() ; ++it ) { + for ( TQStringList::const_iterator it = types.begin() ; it != types.end() ; ++it ) { const KMail::Interface::BodyPartFormatterPlugin * plugin = pl->createForName( *it ); if ( !plugin ) { kdWarning( 5006 ) << "BodyPartFormatterFactory: plugin \"" << *it << "\" is not valid!" << endl; @@ -182,10 +182,10 @@ const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::cre return (*subtype_it).second; } -const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const QString & type, const QString & subtype ) const { +const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const TQString & type, const TQString & subtype ) const { return createFor( type.latin1(), subtype.latin1() ); } -const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const QCString & type, const QCString & subtype ) const { +const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const TQCString & type, const TQCString & subtype ) const { return createFor( type.data(), subtype.data() ); } diff --git a/kmail/bodypartformatterfactory.h b/kmail/bodypartformatterfactory.h index 63f43bd7..4763a7d8 100644 --- a/kmail/bodypartformatterfactory.h +++ b/kmail/bodypartformatterfactory.h @@ -52,8 +52,8 @@ namespace KMail { static const BodyPartFormatterFactory * instance(); const Interface::BodyPartFormatter * createFor( const char * type, const char * subtype ) const; - const Interface::BodyPartFormatter * createFor( const QString & type, const QString & subtype ) const; - const Interface::BodyPartFormatter * createFor( const QCString & type, const QCString & subtype ) const; + const Interface::BodyPartFormatter * createFor( const TQString & type, const TQString & subtype ) const; + const Interface::BodyPartFormatter * createFor( const TQCString & type, const TQCString & subtype ) const; // // Only boring stuff below: diff --git a/kmail/bodypartformatterfactory_p.h b/kmail/bodypartformatterfactory_p.h index 7171ba29..7ca101ab 100644 --- a/kmail/bodypartformatterfactory_p.h +++ b/kmail/bodypartformatterfactory_p.h @@ -34,7 +34,7 @@ #ifndef __KMAIL_BODYPARTFORMATTERFACTORY_P_H__ #define __KMAIL_BODYPARTFORMATTERFACTORY_P_H__ -#include +#include #include diff --git a/kmail/bodyvisitor.cpp b/kmail/bodyvisitor.cpp index 99af6619..04b7a98b 100644 --- a/kmail/bodyvisitor.cpp +++ b/kmail/bodyvisitor.cpp @@ -61,16 +61,16 @@ namespace KMail { } //----------------------------------------------------------------------------- - void BodyVisitor::visit( QPtrList & list ) + void BodyVisitor::visit( TQPtrList & list ) { mParts = list; } //----------------------------------------------------------------------------- - QPtrList BodyVisitor::partsToLoad() + TQPtrList BodyVisitor::partsToLoad() { - QPtrListIterator it( mParts ); - QPtrList selected; + TQPtrListIterator it( mParts ); + TQPtrList selected; KMMessagePart *part = 0; bool headerCheck = false; while ( (part = it.current()) != 0 ) @@ -100,7 +100,7 @@ namespace KMail { // from imap. As we probably need to load the header (e.g. in smart or inline mode) // we add a fake part that is not included in the message itself KMMessagePart *fake = new KMMessagePart(); - QString partId = part->partSpecifier().section( '.', 0, -2 )+".HEADER"; + TQString partId = part->partSpecifier().section( '.', 0, -2 )+".HEADER"; fake->setPartSpecifier( partId ); fake->setOriginalContentTypeStr(""); fake->setLoadPart( true ); diff --git a/kmail/bodyvisitor.h b/kmail/bodyvisitor.h index fa5d2fb5..519dd86c 100644 --- a/kmail/bodyvisitor.h +++ b/kmail/bodyvisitor.h @@ -31,8 +31,8 @@ #ifndef bodyiterator_h #define bodyiterator_h -#include -#include +#include +#include class KMMessagePart; @@ -49,10 +49,10 @@ namespace KMail { /** Register the parts that should be visited */ void visit( KMMessagePart * part ); - void visit( QPtrList & list ); + void visit( TQPtrList & list ); /** Returns a list of parts that should be loaded */ - QPtrList partsToLoad(); + TQPtrList partsToLoad(); /** Decides whether a part should be loaded. This needs to be implemented by a subclass */ @@ -66,8 +66,8 @@ namespace KMail { static bool parentNeedsLoading( KMMessagePart * part ); protected: - QPtrList mParts; - QStringList mBasicList; + TQPtrList mParts; + TQStringList mBasicList; }; // Factory to create a visitor according to the Attachment Strategy diff --git a/kmail/cachedimapjob.cpp b/kmail/cachedimapjob.cpp index 8c633961..3b8ff411 100644 --- a/kmail/cachedimapjob.cpp +++ b/kmail/cachedimapjob.cpp @@ -57,35 +57,35 @@ namespace KMail { // Get messages -CachedImapJob::CachedImapJob( const QValueList& msgs, +CachedImapJob::CachedImapJob( const TQValueList& msgs, JobType type, KMFolderCachedImap* folder ) : FolderJob( type ), mFolder( folder ), mMsgsForDownload( msgs ), mTotalBytes(0), mMsg(0), mParentFolder( 0 ) { - QValueList::ConstIterator it = msgs.begin(); + TQValueList::ConstIterator it = msgs.begin(); for ( ; it != msgs.end() ; ++it ) mTotalBytes += (*it).size; } // Put messages -CachedImapJob::CachedImapJob( const QPtrList& msgs, JobType type, +CachedImapJob::CachedImapJob( const TQPtrList& msgs, JobType type, KMFolderCachedImap* folder ) - : FolderJob( msgs, QString::null, type, folder?folder->folder():0 ), mFolder( folder ), + : FolderJob( msgs, TQString::null, type, folder?folder->folder():0 ), mFolder( folder ), mTotalBytes( msgs.count() ), // we abuse it as "total number of messages" mMsg( 0 ), mParentFolder( 0 ) { } -CachedImapJob::CachedImapJob( const QValueList& msgs, +CachedImapJob::CachedImapJob( const TQValueList& msgs, JobType type, KMFolderCachedImap* folder ) - : FolderJob( QPtrList(), QString::null, type, folder?folder->folder():0 ), + : FolderJob( TQPtrList(), TQString::null, type, folder?folder->folder():0 ), mFolder( folder ), mSerNumMsgList( msgs ), mTotalBytes( msgs.count() ), mMsg( 0 ), mParentFolder ( 0 ) { } // Add sub folders -CachedImapJob::CachedImapJob( const QValueList& fList, +CachedImapJob::CachedImapJob( const TQValueList& fList, JobType type, KMFolderCachedImap* folder ) : FolderJob( type ), mFolder( folder ), mFolderList( fList ), mMsg( 0 ), mParentFolder ( 0 ) @@ -93,7 +93,7 @@ CachedImapJob::CachedImapJob( const QValueList& fList, } // Rename folder -CachedImapJob::CachedImapJob( const QString& string1, JobType type, +CachedImapJob::CachedImapJob( const TQString& string1, JobType type, KMFolderCachedImap* folder ) : FolderJob( type ), mFolder(folder), mMsg( 0 ), mString( string1 ), mParentFolder ( 0 ) @@ -103,7 +103,7 @@ CachedImapJob::CachedImapJob( const QString& string1, JobType type, } // Delete folders or messages -CachedImapJob::CachedImapJob( const QStringList& foldersOrMsgs, JobType type, +CachedImapJob::CachedImapJob( const TQStringList& foldersOrMsgs, JobType type, KMFolderCachedImap* folder ) : FolderJob( type ), mFolder( folder ), mFoldersOrMessages( foldersOrMsgs ), mMsg( 0 ), mParentFolder( 0 ) @@ -155,11 +155,11 @@ void CachedImapJob::execute() */ if ( mAccount->groupwareType() == KMAcctCachedImap::GroupwareScalix ) { if ( !mAccount->sentCustomLoginCommand() ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); - const QString command = QString( "X-SCALIX-ID " ); - const QString argument = QString( "(\"name\" \"Evolution\" \"version\" \"2.10.0\")" ); + const TQString command = TQString( "X-SCALIX-ID " ); + const TQString argument = TQString( "(\"name\" \"Evolution\" \"version\" \"2.10.0\")" ); stream << (int) 'X' << 'N' << command << argument; @@ -200,11 +200,11 @@ void CachedImapJob::listMessages() ImapAccountBase::jobData jd( url.url(), mFolder->folder() ); jd.cancellable = true; mAccount->insertJob( job, jd ); - connect( job, SIGNAL( result(KIO::Job *) ), - this, SLOT( slotListMessagesResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result(KIO::Job *) ), + this, TQT_SLOT( slotListMessagesResult( KIO::Job* ) ) ); // send the data directly for KMFolderCachedImap - connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), - mFolder, SLOT( slotGetMessagesData( KIO::Job* , const QByteArray& ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), + mFolder, TQT_SLOT( slotGetMessagesData( KIO::Job* , const TQByteArray& ) ) ); } void CachedImapJob::slotDeleteNextMessages( KIO::Job* job ) @@ -230,32 +230,32 @@ void CachedImapJob::slotDeleteNextMessages( KIO::Job* job ) return; } - QString uids = mFoldersOrMessages.front(); mFoldersOrMessages.pop_front(); + TQString uids = mFoldersOrMessages.front(); mFoldersOrMessages.pop_front(); KURL url = mAccount->getUrl(); url.setPath( mFolder->imapPath() + - QString::fromLatin1(";UID=%1").arg(uids) ); + TQString::fromLatin1(";UID=%1").arg(uids) ); KIO::SimpleJob *simpleJob = KIO::file_delete( url, false ); KIO::Scheduler::assignJobToSlave( mAccount->slave(), simpleJob ); ImapAccountBase::jobData jd( url.url(), mFolder->folder() ); mAccount->insertJob( simpleJob, jd ); - connect( simpleJob, SIGNAL( result(KIO::Job *) ), - this, SLOT( slotDeleteNextMessages(KIO::Job *) ) ); + connect( simpleJob, TQT_SIGNAL( result(KIO::Job *) ), + this, TQT_SLOT( slotDeleteNextMessages(KIO::Job *) ) ); } void CachedImapJob::expungeFolder() { KURL url = mAccount->getUrl(); // Special URL that means EXPUNGE - url.setPath( mFolder->imapPath() + QString::fromLatin1(";UID=*") ); + url.setPath( mFolder->imapPath() + TQString::fromLatin1(";UID=*") ); KIO::SimpleJob *job = KIO::file_delete( url, false ); KIO::Scheduler::assignJobToSlave( mAccount->slave(), job ); ImapAccountBase::jobData jd( url.url(), mFolder->folder() ); mAccount->insertJob( job, jd ); - connect( job, SIGNAL( result(KIO::Job *) ), - this, SLOT( slotExpungeResult(KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result(KIO::Job *) ), + this, TQT_SLOT( slotExpungeResult(KIO::Job *) ) ); } void CachedImapJob::slotExpungeResult( KIO::Job * job ) @@ -341,7 +341,7 @@ void CachedImapJob::slotGetNextMessage(KIO::Job * job) if( mfd.flags > 0 ) KMFolderImap::flagsToStatus(mMsg, mfd.flags, true, GlobalSettings::allowLocalFlags() ? mFolder->permanentFlags() : INT_MAX); KURL url = mAccount->getUrl(); - url.setPath(mFolder->imapPath() + QString(";UID=%1;SECTION=BODY.PEEK[]").arg(mfd.uid)); + url.setPath(mFolder->imapPath() + TQString(";UID=%1;SECTION=BODY.PEEK[]").arg(mfd.uid)); ImapAccountBase::jobData jd( url.url(), mFolder->folder() ); jd.cancellable = true; @@ -349,12 +349,12 @@ void CachedImapJob::slotGetNextMessage(KIO::Job * job) KIO::SimpleJob *simpleJob = KIO::get(url, false, false); KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob); mAccount->insertJob(simpleJob, jd); - connect(simpleJob, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), - this, SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); - connect(simpleJob, SIGNAL(result(KIO::Job *)), - this, SLOT(slotGetNextMessage(KIO::Job *))); - connect(simpleJob, SIGNAL(data(KIO::Job *, const QByteArray &)), - mFolder, SLOT(slotSimpleData(KIO::Job *, const QByteArray &))); + connect(simpleJob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), + this, TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); + connect(simpleJob, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotGetNextMessage(KIO::Job *))); + connect(simpleJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + mFolder, TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &))); } void CachedImapJob::slotProcessedSize(KIO::Job *, KIO::filesize_t processed) @@ -394,17 +394,17 @@ void CachedImapJob::slotPutNextMessage() } KURL url = mAccount->getUrl(); - QString flags = KMFolderImap::statusToFlags( mMsg->status(), mFolder->permanentFlags() ); + TQString flags = KMFolderImap::statusToFlags( mMsg->status(), mFolder->permanentFlags() ); url.setPath( mFolder->imapPath() + ";SECTION=" + flags ); ImapAccountBase::jobData jd( url.url(), mFolder->folder() ); mMsg->setUID( 0 ); // for the index - QCString cstr(mMsg->asString()); + TQCString cstr(mMsg->asString()); int a = cstr.find("\nX-UID: "); int b = cstr.find('\n', a); if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); - QCString mData(cstr.length() + cstr.contains('\n')); + TQCString mData(cstr.length() + cstr.contains('\n')); unsigned int i = 0; for( char *ch = cstr.data(); *ch; ch++ ) { if ( *ch == '\n' ) { @@ -420,20 +420,20 @@ void CachedImapJob::slotPutNextMessage() KIO::SimpleJob *simpleJob = KIO::put(url, 0, false, false, false); KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob); mAccount->insertJob(simpleJob, jd); - connect( simpleJob, SIGNAL( result(KIO::Job *) ), - SLOT( slotPutMessageResult(KIO::Job *) ) ); - connect( simpleJob, SIGNAL( dataReq(KIO::Job *, QByteArray &) ), - SLOT( slotPutMessageDataReq(KIO::Job *, QByteArray &) ) ); - connect( simpleJob, SIGNAL( data(KIO::Job *, const QByteArray &) ), - mFolder, SLOT( slotSimpleData(KIO::Job *, const QByteArray &) ) ); - connect( simpleJob, SIGNAL(infoMessage(KIO::Job *, const QString &)), - SLOT(slotPutMessageInfoData(KIO::Job *, const QString &)) ); + connect( simpleJob, TQT_SIGNAL( result(KIO::Job *) ), + TQT_SLOT( slotPutMessageResult(KIO::Job *) ) ); + connect( simpleJob, TQT_SIGNAL( dataReq(KIO::Job *, TQByteArray &) ), + TQT_SLOT( slotPutMessageDataReq(KIO::Job *, TQByteArray &) ) ); + connect( simpleJob, TQT_SIGNAL( data(KIO::Job *, const TQByteArray &) ), + mFolder, TQT_SLOT( slotSimpleData(KIO::Job *, const TQByteArray &) ) ); + connect( simpleJob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), + TQT_SLOT(slotPutMessageInfoData(KIO::Job *, const TQString &)) ); } //----------------------------------------------------------------------------- // TODO: port to KIO::StoredTransferJob once it's ok to require kdelibs-3.3 -void CachedImapJob::slotPutMessageDataReq(KIO::Job *job, QByteArray &data) +void CachedImapJob::slotPutMessageDataReq(KIO::Job *job, TQByteArray &data) { KMAcctCachedImap::JobIterator it = mAccount->findJob(job); if ( it == mAccount->jobsEnd() ) { // Shouldn't happen @@ -452,7 +452,7 @@ void CachedImapJob::slotPutMessageDataReq(KIO::Job *job, QByteArray &data) } //---------------------------------------------------------------------------- -void CachedImapJob::slotPutMessageInfoData(KIO::Job *job, const QString &data) +void CachedImapJob::slotPutMessageInfoData(KIO::Job *job, const TQString &data) { KMFolderCachedImap * imapFolder = static_cast(mDestFolder->storage()); KMAcctCachedImap *account = imapFolder->account(); @@ -535,7 +535,7 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job ) static_cast((*it).parent->storage())->setSilentUpload( false ); if ( job->error() && !silentUpload ) { - QString myError = "

    " + i18n("Error while uploading folder") + TQString myError = "

    " + i18n("Error while uploading folder") + "

    " + i18n("Could not make the folder %1 on the server.").arg((*it).items[0]) + "

    " + i18n("This could be because you do not have permission to do this, or because the folder is already present on the server; the error message from the server communication is here:") + "

    "; mAccount->handleJobError( job, myError ); @@ -550,7 +550,7 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job ) Q_ASSERT( storage ); Q_ASSERT( parentStorage ); if ( storage->imapPath().isEmpty() ) { - QString path = mAccount->createImapPath( parentStorage->imapPath(), storage->folder()->name() ); + TQString path = mAccount->createImapPath( parentStorage->imapPath(), storage->folder()->name() ); if ( !storage->imapPathForCreation().isEmpty() ) path = storage->imapPathForCreation(); storage->setImapPath( path ); @@ -569,7 +569,7 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job ) KMFolderCachedImap *folder = mFolderList.front(); mFolderList.pop_front(); KURL url = mAccount->getUrl(); - QString path = mAccount->createImapPath( mFolder->imapPath(), + TQString path = mAccount->createImapPath( mFolder->imapPath(), folder->folder()->name() ); if ( !folder->imapPathForCreation().isEmpty() ) { // the folder knows it's namespace @@ -587,14 +587,14 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job ) KIO::SimpleJob *simpleJob = KIO::mkdir(url); KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob); mAccount->insertJob(simpleJob, jd); - connect( simpleJob, SIGNAL(result(KIO::Job *)), - this, SLOT(slotAddNextSubfolder(KIO::Job *)) ); + connect( simpleJob, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotAddNextSubfolder(KIO::Job *)) ); } else { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); - const QString command = QString( "X-CREATE-SPECIAL" ); - const QString argument = QString( "%1 %2" ).arg( Scalix::Utils::contentsTypeToScalixId( folder->contentsType() ) ) + const TQString command = TQString( "X-CREATE-SPECIAL" ); + const TQString argument = TQString( "%1 %2" ).arg( Scalix::Utils::contentsTypeToScalixId( folder->contentsType() ) ) .arg( path ); stream << (int) 'X' << 'N' << command << argument; @@ -605,8 +605,8 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job ) KIO::SimpleJob *simpleJob = KIO::special( url.url(), packedArgs, false ); KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob); mAccount->insertJob(simpleJob, jd); - connect( simpleJob, SIGNAL(result(KIO::Job *)), - this, SLOT(slotAddNextSubfolder(KIO::Job *)) ); + connect( simpleJob, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotAddNextSubfolder(KIO::Job *)) ); } } @@ -636,7 +636,7 @@ void CachedImapJob::slotDeleteNextFolder( KIO::Job *job ) return; } - QString folderPath = mFoldersOrMessages.front(); + TQString folderPath = mFoldersOrMessages.front(); mFoldersOrMessages.pop_front(); KURL url = mAccount->getUrl(); url.setPath(folderPath); @@ -645,8 +645,8 @@ void CachedImapJob::slotDeleteNextFolder( KIO::Job *job ) KIO::SimpleJob *simpleJob = KIO::file_delete(url, false); KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob); mAccount->insertJob(simpleJob, jd); - connect( simpleJob, SIGNAL( result(KIO::Job *) ), - SLOT( slotDeleteNextFolder(KIO::Job *) ) ); + connect( simpleJob, TQT_SIGNAL( result(KIO::Job *) ), + TQT_SLOT( slotDeleteNextFolder(KIO::Job *) ) ); } void CachedImapJob::checkUidValidity() @@ -660,10 +660,10 @@ void CachedImapJob::checkUidValidity() KIO::SimpleJob *job = KIO::get( url, false, false ); KIO::Scheduler::assignJobToSlave( mAccount->slave(), job ); mAccount->insertJob( job, jd ); - connect( job, SIGNAL(result(KIO::Job *)), - SLOT(slotCheckUidValidityResult(KIO::Job *)) ); - connect( job, SIGNAL(data(KIO::Job *, const QByteArray &)), - mFolder, SLOT(slotSimpleData(KIO::Job *, const QByteArray &))); + connect( job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotCheckUidValidityResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + mFolder, TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &))); } void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) @@ -682,7 +682,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) } // Check the uidValidity - QCString cstr((*it).data.data(), (*it).data.size() + 1); + TQCString cstr((*it).data.data(), (*it).data.size() + 1); int a = cstr.find("X-uidValidity: "); if (a < 0) { // Something is seriously rotten here! @@ -693,7 +693,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) else { int b = cstr.find("\r\n", a); if ( (b - a - 15) >= 0 ) { - QString uidv = cstr.mid(a + 15, b - a - 15); + TQString uidv = cstr.mid(a + 15, b - a - 15); // kdDebug(5006) << "New uidv = " << uidv << ", old uidv = " // << mFolder->uidValidity() << endl; if( !mFolder->uidValidity().isEmpty() && mFolder->uidValidity() != uidv ) { @@ -726,7 +726,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) } -void CachedImapJob::renameFolder( const QString &newName ) +void CachedImapJob::renameFolder( const TQString &newName ) { // Set the source URL KURL urlSrc = mAccount->getUrl(); @@ -734,7 +734,7 @@ void CachedImapJob::renameFolder( const QString &newName ) // Set the destination URL - this is a bit trickier KURL urlDst = mAccount->getUrl(); - QString imapPath( mFolder->imapPath() ); + TQString imapPath( mFolder->imapPath() ); // Destination url = old imappath - oldname + new name imapPath.truncate( imapPath.length() - mFolder->folder()->name().length() - 1); imapPath += newName + '/'; @@ -746,12 +746,12 @@ void CachedImapJob::renameFolder( const QString &newName ) KIO::SimpleJob *simpleJob = KIO::rename( urlSrc, urlDst, false ); KIO::Scheduler::assignJobToSlave( mAccount->slave(), simpleJob ); mAccount->insertJob( simpleJob, jd ); - connect( simpleJob, SIGNAL(result(KIO::Job *)), - SLOT(slotRenameFolderResult(KIO::Job *)) ); + connect( simpleJob, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotRenameFolderResult(KIO::Job *)) ); } -static void renameChildFolders( KMFolderDir* dir, const QString& oldPath, - const QString& newPath ) +static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath, + const TQString& newPath ) { if( dir ) { KMFolderNode *node = dir->first(); @@ -762,7 +762,7 @@ static void renameChildFolders( KMFolderDir* dir, const QString& oldPath, if ( !imapFolder->imapPath().isEmpty() ) // Only rename folders that have been accepted by the server if( imapFolder->imapPath().find( oldPath ) == 0 ) { - QString p = imapFolder->imapPath(); + TQString p = imapFolder->imapPath(); p = p.mid( oldPath.length() ); p.prepend( newPath ); imapFolder->setImapPath( p ); @@ -785,7 +785,7 @@ void CachedImapJob::slotRenameFolderResult( KIO::Job *job ) if( job->error() ) { // Error, revert label change - QMap::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() ); + TQMap::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() ); Q_ASSERT( renit != mAccount->renamedFolders().end() ); if ( renit != mAccount->renamedFolders().end() ) { mFolder->folder()->setLabel( (*renit).mOldLabel ); @@ -795,14 +795,14 @@ void CachedImapJob::slotRenameFolderResult( KIO::Job *job ) } else { // Okay, the folder seems to be renamed on the server, // now rename it on disk - QString oldName = mFolder->name(); - QString oldPath = mFolder->imapPath(); + TQString oldName = mFolder->name(); + TQString oldPath = mFolder->imapPath(); mAccount->removeRenamedFolder( oldPath ); mFolder->setImapPath( (*it).path ); mFolder->FolderStorage::rename( (*it).url ); if( oldPath.endsWith( "/" ) ) oldPath.truncate( oldPath.length() -1 ); - QString newPath = mFolder->imapPath(); + TQString newPath = mFolder->imapPath(); if( newPath.endsWith( "/" ) ) newPath.truncate( newPath.length() -1 ); renameChildFolders( mFolder->folder()->child(), oldPath, newPath ); kmkernel->dimapFolderMgr()->contentsChanged(); diff --git a/kmail/cachedimapjob.h b/kmail/cachedimapjob.h index ad5579a0..6581ec74 100644 --- a/kmail/cachedimapjob.h +++ b/kmail/cachedimapjob.h @@ -48,9 +48,9 @@ #include #include -#include -#include -#include +#include +#include +#include class KMFolderCachedImap; class KMAcctCachedImap; @@ -63,7 +63,7 @@ class CachedImapJob : public FolderJob { public: /** Information about a message to be downloaded (from the 'IMAP envelope') */ struct MsgForDownload { - MsgForDownload() : uid(0),flags(0),size(0) {} // for QValueList only + MsgForDownload() : uid(0),flags(0),size(0) {} // for TQValueList only MsgForDownload( ulong _uid, int _flags, ulong _size ) : uid(_uid), flags(_flags), size(_size) {} ulong uid; @@ -72,22 +72,22 @@ public: }; // Get messages - CachedImapJob( const QValueList& msgs, + CachedImapJob( const TQValueList& msgs, JobType type = tGetMessage, KMFolderCachedImap* folder = 0 ); // Put messages - CachedImapJob( const QPtrList& msgs, + CachedImapJob( const TQPtrList& msgs, JobType type, KMFolderCachedImap* folder=0 ); - CachedImapJob( const QValueList& msgs, + CachedImapJob( const TQValueList& msgs, JobType type, KMFolderCachedImap* folder=0 ); // Add sub folders - CachedImapJob( const QValueList& folders, + CachedImapJob( const TQValueList& folders, JobType type = tAddSubfolders, KMFolderCachedImap* folder = 0 ); // Rename folder - CachedImapJob( const QString& string1, JobType type, + CachedImapJob( const TQString& string1, JobType type, KMFolderCachedImap* folder ); // Delete folders or messages - CachedImapJob( const QStringList& foldersOrMsgs, JobType type, + CachedImapJob( const TQStringList& foldersOrMsgs, JobType type, KMFolderCachedImap* folder ); // Other jobs (list messages,expunge folder, check uid validity) CachedImapJob( JobType type, KMFolderCachedImap* folder ); @@ -104,16 +104,16 @@ protected: virtual void execute(); void expungeFolder(); void checkUidValidity(); - void renameFolder( const QString &newName ); + void renameFolder( const TQString &newName ); void listMessages(); protected slots: virtual void slotGetNextMessage( KIO::Job *job = 0 ); virtual void slotAddNextSubfolder( KIO::Job *job = 0 ); virtual void slotPutNextMessage(); - virtual void slotPutMessageDataReq( KIO::Job *job, QByteArray &data ); + virtual void slotPutMessageDataReq( KIO::Job *job, TQByteArray &data ); virtual void slotPutMessageResult( KIO::Job *job ); - virtual void slotPutMessageInfoData(KIO::Job *, const QString &data); + virtual void slotPutMessageInfoData(KIO::Job *, const TQString &data); virtual void slotExpungeResult( KIO::Job *job ); virtual void slotDeleteNextFolder( KIO::Job *job = 0 ); virtual void slotCheckUidValidityResult( KIO::Job *job ); @@ -125,14 +125,14 @@ protected slots: private: KMFolderCachedImap *mFolder; KMAcctCachedImap *mAccount; - QValueList mFolderList; - QValueList mMsgsForDownload; - QValueList mSerNumMsgList; + TQValueList mFolderList; + TQValueList mMsgsForDownload; + TQValueList mSerNumMsgList; ulong mSentBytes; // previous messages ulong mTotalBytes; - QStringList mFoldersOrMessages; // Folder deletion: path list. Message deletion: sets of uids + TQStringList mFoldersOrMessages; // Folder deletion: path list. Message deletion: sets of uids KMMessage* mMsg; - QString mString; // Used as uids and as rename target + TQString mString; // Used as uids and as rename target KMFolderCachedImap *mParentFolder; }; diff --git a/kmail/callback.cpp b/kmail/callback.cpp index e124e0cc..0e25758c 100644 --- a/kmail/callback.cpp +++ b/kmail/callback.cpp @@ -56,8 +56,8 @@ Callback::Callback( KMMessage* msg, KMReaderWin* readerWin ) { } -bool Callback::mailICal( const QString& to, const QString &iCal, - const QString& subject, const QString &status, +bool Callback::mailICal( const TQString& to, const TQString &iCal, + const TQString& subject, const TQString &status, bool delMessage ) const { kdDebug(5006) << "Mailing message:\n" << iCal << endl; @@ -66,14 +66,14 @@ bool Callback::mailICal( const QString& to, const QString &iCal, msg->initHeader(); msg->setSubject( subject ); if ( GlobalSettings::self()->exchangeCompatibleInvitations() ) { - if ( status == QString("cancel") ) - msg->setSubject( QString("Declined: %1").arg(subject).replace("Answer: ","") ); - else if ( status == QString("tentative") ) - msg->setSubject(QString("Tentative: %1").arg(subject).replace("Answer: ","") ); - else if ( status == QString("accepted") ) - msg->setSubject( QString("Accepted: %1").arg(subject).replace("Answer: ","") ); - else if ( status == QString("delegated") ) - msg->setSubject( QString("Delegated: %1").arg(subject).replace("Answer: ","") ); + if ( status == TQString("cancel") ) + msg->setSubject( TQString("Declined: %1").arg(subject).replace("Answer: ","") ); + else if ( status == TQString("tentative") ) + msg->setSubject(TQString("Tentative: %1").arg(subject).replace("Answer: ","") ); + else if ( status == TQString("accepted") ) + msg->setSubject( TQString("Accepted: %1").arg(subject).replace("Answer: ","") ); + else if ( status == TQString("delegated") ) + msg->setSubject( TQString("Delegated: %1").arg(subject).replace("Answer: ","") ); } msg->setTo( to ); msg->setFrom( receiver() ); @@ -99,7 +99,7 @@ bool Callback::mailICal( const QString& to, const QString &iCal, if( identity != KPIM::Identity::null() ) { // Identity found. Use this msg->setFrom( identity.fullEmailAddr() ); - msg->setHeaderField("X-KMail-Identity", QString::number( identity.uoid() )); + msg->setHeaderField("X-KMail-Identity", TQString::number( identity.uoid() )); } // Remove BCC from identity on ical invitations (https://intevation.de/roundup/kolab/issue474) msg->setBcc( "" ); @@ -136,7 +136,7 @@ bool Callback::mailICal( const QString& to, const QString &iCal, return true; } -QString Callback::receiver() const +TQString Callback::receiver() const { if ( mReceiverSet ) // Already figured this out @@ -144,9 +144,9 @@ QString Callback::receiver() const mReceiverSet = true; - QStringList addrs = KPIM::splitEmailAddrList( mMsg->to() ); + TQStringList addrs = KPIM::splitEmailAddrList( mMsg->to() ); int found = 0; - for( QStringList::Iterator it = addrs.begin(); it != addrs.end(); ++it ) { + for( TQStringList::Iterator it = addrs.begin(); it != addrs.end(); ++it ) { if( kmkernel->identityManager()->identityForAddress( *it ) != KPIM::Identity::null() ) { // Ok, this could be us @@ -154,8 +154,8 @@ QString Callback::receiver() const mReceiver = *it; } } - QStringList ccaddrs = KPIM::splitEmailAddrList( mMsg->cc() ); - for( QStringList::Iterator it = ccaddrs.begin(); it != ccaddrs.end(); ++it ) { + TQStringList ccaddrs = KPIM::splitEmailAddrList( mMsg->cc() ); + for( TQStringList::Iterator it = ccaddrs.begin(); it != ccaddrs.end(); ++it ) { if( kmkernel->identityManager()->identityForAddress( *it ) != KPIM::Identity::null() ) { // Ok, this could be us @@ -165,7 +165,7 @@ QString Callback::receiver() const } if( found != 1 ) { bool ok; - QString selectMessage; + TQString selectMessage; if (found == 0) { selectMessage = i18n("None of your identities match the " "receiver of this message,
    please " @@ -184,7 +184,7 @@ QString Callback::receiver() const selectMessage, addrs+ccaddrs, 0, FALSE, &ok, kmkernel->mainWin() ); if( !ok ) - mReceiver = QString::null; + mReceiver = TQString::null; } return mReceiver; @@ -213,7 +213,7 @@ bool Callback::deleteInvitationAfterReply() const return GlobalSettings::self()->deleteInvitationEmailsAfterSendingReply(); } -QString Callback::sender() const +TQString Callback::sender() const { return mMsg->from(); } diff --git a/kmail/callback.h b/kmail/callback.h index b66903bf..9bd18889 100644 --- a/kmail/callback.h +++ b/kmail/callback.h @@ -33,7 +33,7 @@ #ifndef CALLBACK_H #define CALLBACK_H -#include +#include class KMMessage; class KMReaderWin; @@ -62,15 +62,15 @@ public: /** Mail a message * @ param status can be accepted/cancel/tentative/delegated */ - bool mailICal( const QString &to, const QString &iCal, - const QString &subject, const QString &status, + bool mailICal( const TQString &to, const TQString &iCal, + const TQString &subject, const TQString &status, bool delMessage = true ) const; /** Get the receiver of the mail */ - QString receiver() const; + TQString receiver() const; /** Returns the sender of the mail. */ - QString sender() const; + TQString sender() const; /** Close the main window showing this message, if it's a secondary window. */ void closeIfSecondaryWindow() const; @@ -81,7 +81,7 @@ public: private: KMMessage* mMsg; KMReaderWin* mReaderWin; - mutable QString mReceiver; + mutable TQString mReceiver; mutable bool mReceiverSet; }; diff --git a/kmail/chiasmuskeyselector.cpp b/kmail/chiasmuskeyselector.cpp index aac44362..6c82c379 100644 --- a/kmail/chiasmuskeyselector.cpp +++ b/kmail/chiasmuskeyselector.cpp @@ -4,19 +4,19 @@ #include #include -#include -#include +#include +#include -ChiasmusKeySelector::ChiasmusKeySelector( QWidget* parent, const QString& caption, - const QStringList& keys, const QString& currentKey, - const QString& lastOptions ) +ChiasmusKeySelector::ChiasmusKeySelector( TQWidget* parent, const TQString& caption, + const TQStringList& keys, const TQString& currentKey, + const TQString& lastOptions ) : KDialogBase( parent, "chiasmusKeySelector", true, caption, Ok|Cancel, Ok, true ) { - QWidget *page = makeMainWidget(); + TQWidget *page = makeMainWidget(); - QVBoxLayout *layout = new QVBoxLayout(page, KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(page, KDialog::spacingHint()); - mLabel = new QLabel( i18n( "Please select the Chiasmus key file to use:" ), page ); + mLabel = new TQLabel( i18n( "Please select the Chiasmus key file to use:" ), page ); layout->addWidget( mLabel ); mListBox = new KListBox( page ); @@ -26,7 +26,7 @@ ChiasmusKeySelector::ChiasmusKeySelector( QWidget* parent, const QString& captio mListBox->ensureCurrentVisible(); layout->addWidget( mListBox, 1 ); - QLabel* optionLabel = new QLabel( i18n( "Additional arguments for chiasmus:" ), page ); + TQLabel* optionLabel = new TQLabel( i18n( "Additional arguments for chiasmus:" ), page ); layout->addWidget( optionLabel ); mOptions = new KLineEdit( lastOptions, page ); @@ -35,18 +35,18 @@ ChiasmusKeySelector::ChiasmusKeySelector( QWidget* parent, const QString& captio layout->addStretch(); - connect( mListBox, SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( slotOk() ) ); - connect( mListBox, SIGNAL( returnPressed( QListBoxItem * ) ), this, SLOT( slotOk() ) ); + connect( mListBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), this, TQT_SLOT( slotOk() ) ); + connect( mListBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ), this, TQT_SLOT( slotOk() ) ); mListBox->setFocus(); } -QString ChiasmusKeySelector::key() const +TQString ChiasmusKeySelector::key() const { return mListBox->currentText(); } -QString ChiasmusKeySelector::options() const +TQString ChiasmusKeySelector::options() const { return mOptions->text(); } diff --git a/kmail/chiasmuskeyselector.h b/kmail/chiasmuskeyselector.h index 3af0ec45..0272016a 100644 --- a/kmail/chiasmuskeyselector.h +++ b/kmail/chiasmuskeyselector.h @@ -11,15 +11,15 @@ class ChiasmusKeySelector : public KDialogBase Q_OBJECT public: - ChiasmusKeySelector( QWidget* parent, const QString& caption, - const QStringList& keys, const QString& currentKey, - const QString& lastOptions ); + ChiasmusKeySelector( TQWidget* parent, const TQString& caption, + const TQStringList& keys, const TQString& currentKey, + const TQString& lastOptions ); - QString key() const; - QString options() const; + TQString key() const; + TQString options() const; private: - QLabel* mLabel; + TQLabel* mLabel; KListBox* mListBox; KLineEdit* mOptions; }; diff --git a/kmail/colorlistbox.cpp b/kmail/colorlistbox.cpp index 2c6887b3..0e6b3a40 100644 --- a/kmail/colorlistbox.cpp +++ b/kmail/colorlistbox.cpp @@ -22,17 +22,17 @@ #include #endif -#include +#include #include #include #include "colorlistbox.h" -ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) +ColorListBox::ColorListBox( TQWidget *parent, const char *name, WFlags f ) :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) { - connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); + connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(newColor(int)) ); setAcceptDrops( true); } @@ -44,7 +44,7 @@ void ColorListBox::setEnabled( bool state ) return; } - QListBox::setEnabled( state ); + TQListBox::setEnabled( state ); for( uint i=0; ifontMetrics(); + TQFontMetrics fm = p->fontMetrics(); int h = fm.height(); p->drawText( mBoxWidth+3*2, fm.ascent() + fm.leading()/2, text() ); @@ -184,13 +184,13 @@ void ColorListItem::paint( QPainter *p ) } -int ColorListItem::height(const QListBox *lb ) const +int ColorListItem::height(const TQListBox *lb ) const { return( lb->fontMetrics().lineSpacing()+1 ); } -int ColorListItem::width(const QListBox *lb ) const +int ColorListItem::width(const TQListBox *lb ) const { return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 ); } diff --git a/kmail/colorlistbox.h b/kmail/colorlistbox.h index 1759bc83..13db01af 100644 --- a/kmail/colorlistbox.h +++ b/kmail/colorlistbox.h @@ -28,9 +28,9 @@ class ColorListBox : public KListBox Q_OBJECT public: - ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); - void setColor( uint index, const QColor &color ); - QColor color( uint index ) const; + ColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 ); + void setColor( uint index, const TQColor &color ); + TQColor color( uint index ) const; signals: void changed(); @@ -38,10 +38,10 @@ signals: virtual void setEnabled( bool state ); protected: - void dragEnterEvent( QDragEnterEvent *e ); - void dragLeaveEvent( QDragLeaveEvent *e ); - void dragMoveEvent( QDragMoveEvent *e ); - void dropEvent( QDropEvent *e ); + void dragEnterEvent( TQDragEnterEvent *e ); + void dragLeaveEvent( TQDragLeaveEvent *e ); + void dragMoveEvent( TQDragMoveEvent *e ); + void dropEvent( TQDropEvent *e ); private slots: void newColor( int index ); @@ -55,17 +55,17 @@ signals: class ColorListItem : public QListBoxItem { public: - ColorListItem( const QString &text, const QColor &color=Qt::black ); - const QColor &color( void ); - void setColor( const QColor &color ); + ColorListItem( const TQString &text, const TQColor &color=Qt::black ); + const TQColor &color( void ); + void setColor( const TQColor &color ); protected: - virtual void paint( QPainter * ); - virtual int height( const QListBox * ) const; - virtual int width( const QListBox * ) const; + virtual void paint( TQPainter * ); + virtual int height( const TQListBox * ) const; + virtual int width( const TQListBox * ) const; private: - QColor mColor; + TQColor mColor; int mBoxWidth; }; diff --git a/kmail/compactionjob.cpp b/kmail/compactionjob.cpp index 1b9c143b..243a1753 100644 --- a/kmail/compactionjob.cpp +++ b/kmail/compactionjob.cpp @@ -35,9 +35,9 @@ using KPIM::BroadcastStatus; #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -71,14 +71,14 @@ void MboxCompactionJob::kill() fclose( mTmpFile ); mTmpFile = 0; if ( !mTempName.isEmpty() ) - QFile::remove( mTempName ); + TQFile::remove( mTempName ); FolderJob::kill(); } -QString MboxCompactionJob::realLocation() const +TQString MboxCompactionJob::realLocation() const { - QString location = mSrcFolder->location(); - QFileInfo inf( location ); + TQString location = mSrcFolder->location(); + TQFileInfo inf( location ); if (inf.isSymLink()) { KURL u; u.setPath( location ); // follow (and resolve) symlinks so that the final ::rename() always works @@ -96,7 +96,7 @@ int MboxCompactionJob::executeNow( bool silent ) if (!storage->compactable()) { kdDebug(5006) << storage->location() << " compaction skipped." << endl; if ( !mSilent ) { - QString str = i18n( "For safety reasons, compaction has been disabled for %1" ).arg( mbox->label() ); + TQString str = i18n( "For safety reasons, compaction has been disabled for %1" ).arg( mbox->label() ); BroadcastStatus::instance()->setStatusMsg( str ); } return 0; @@ -109,13 +109,13 @@ int MboxCompactionJob::executeNow( bool silent ) // exit(1); backed out due to broken nfs } - const QFileInfo pathInfo( realLocation() ); + const TQFileInfo pathInfo( realLocation() ); // Use /dir/.mailboxname.compacted so that it's hidden, and doesn't show up after restarting kmail // (e.g. due to an unfortunate crash while compaction is happening) mTempName = pathInfo.dirPath() + "/." + pathInfo.fileName() + ".compacted"; mode_t old_umask = umask(077); - mTmpFile = fopen(QFile::encodeName(mTempName), "w"); + mTmpFile = fopen(TQFile::encodeName(mTempName), "w"); umask(old_umask); if (!mTmpFile) { kdWarning(5006) << "Couldn't start compacting " << mSrcFolder->label() @@ -131,7 +131,7 @@ int MboxCompactionJob::executeNow( bool silent ) mCurrentIndex = 0; kdDebug(5006) << "MboxCompactionJob: starting to compact folder " << mSrcFolder->location() << " into " << mTempName << endl; - connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) ); + connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) ); if ( !mImmediate ) mTimer.start( COMPACTIONJOB_TIMERINTERVAL ); slotDoWork(); @@ -162,11 +162,11 @@ void MboxCompactionJob::done( int rc ) if (!rc) rc = fsync(fileno(mTmpFile)); rc |= fclose(mTmpFile); - QString str; + TQString str; if (!rc) { bool autoCreate = mbox->autoCreateIndex(); - QString box( realLocation() ); - ::rename(QFile::encodeName(mTempName), QFile::encodeName(box)); + TQString box( realLocation() ); + ::rename(TQFile::encodeName(mTempName), TQFile::encodeName(box)); mbox->writeIndex(); mbox->writeConfig(); mbox->setAutoCreateIndex( false ); @@ -180,7 +180,7 @@ void MboxCompactionJob::done( int rc ) str = i18n( "Error occurred while compacting \"%1\". Compaction aborted." ).arg( mSrcFolder->label() ); kdDebug(5006) << "Error occurred while compacting " << mbox->location() << endl; kdDebug(5006) << "Compaction aborted." << endl; - QFile::remove( mTempName ); + TQFile::remove( mTempName ); } mErrorCode = rc; @@ -223,13 +223,13 @@ int MaildirCompactionJob::executeNow( bool silent ) storage->open("maildircompact"); mOpeningFolder = false; mFolderOpen = true; - QString subdirNew(storage->location() + "/new/"); - QDir d(subdirNew); + TQString subdirNew(storage->location() + "/new/"); + TQDir d(subdirNew); mEntryList = d.entryList(); mCurrentIndex = 0; kdDebug(5006) << "MaildirCompactionJob: starting to compact in folder " << mSrcFolder->location() << endl; - connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) ); + connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) ); if ( !mImmediate ) mTimer.start( COMPACTIONJOB_TIMERINTERVAL ); slotDoWork(); @@ -254,7 +254,7 @@ void MaildirCompactionJob::done( int rc ) KMFolderMaildir* storage = static_cast( mSrcFolder->storage() ); mTimer.stop(); mCancellable = false; - QString str; + TQString str; if ( !rc ) { str = i18n( "Folder \"%1\" successfully compacted" ).arg( mSrcFolder->label() ); } else { diff --git a/kmail/compactionjob.h b/kmail/compactionjob.h index 055713f6..bb234a04 100644 --- a/kmail/compactionjob.h +++ b/kmail/compactionjob.h @@ -29,7 +29,7 @@ #define COMPACTIONJOB_H #include "jobscheduler.h" -#include +#include namespace KMail { @@ -53,12 +53,12 @@ private slots: private: // Real folder location, != location in case of symlinks - QString realLocation() const; + TQString realLocation() const; void done( int rc ); private: - QTimer mTimer; - QString mTempName; + TQTimer mTimer; + TQString mTempName; FILE *mTmpFile; off_t mOffset; int mCurrentIndex; @@ -88,8 +88,8 @@ private: void done( int rc ); private: - QTimer mTimer; - QStringList mEntryList; + TQTimer mTimer; + TQStringList mEntryList; int mCurrentIndex; bool mFolderOpen; bool mSilent; diff --git a/kmail/composer.h b/kmail/composer.h index 58d0860d..a4eb179d 100644 --- a/kmail/composer.h +++ b/kmail/composer.h @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include class KMMessage; class KMFolder; @@ -42,18 +42,18 @@ namespace KMail { * From MailComposerIface */ virtual void send( int how ) = 0; - virtual void addAttachmentsAndSend(const KURL::List &urls, const QString &comment, int how) = 0; - virtual void addAttachment( KURL url, QString comment ) = 0; - virtual void addAttachment( const QString & name, - const QCString & cte, - const QByteArray & data, - const QCString & type, - const QCString & subType, - const QCString & paramAttr, - const QString & paramValue, - const QCString & contDisp) = 0; + virtual void addAttachmentsAndSend(const KURL::List &urls, const TQString &comment, int how) = 0; + virtual void addAttachment( KURL url, TQString comment ) = 0; + virtual void addAttachment( const TQString & name, + const TQCString & cte, + const TQByteArray & data, + const TQCString & type, + const TQCString & subType, + const TQCString & paramAttr, + const TQString & paramValue, + const TQCString & contDisp) = 0; public: // kmcommand - virtual void setBody( QString body ) = 0; + virtual void setBody( TQString body ) = 0; virtual const MailComposerIface * asMailComposerIFace() const = 0; virtual MailComposerIface * asMailComposerIFace() = 0; @@ -70,7 +70,7 @@ namespace KMail { /** * Set the filename which is used for autosaving. */ - virtual void setAutoSaveFilename( const QString & filename ) = 0; + virtual void setAutoSaveFilename( const TQString & filename ) = 0; public: // kmkernel, callback /** @@ -96,7 +96,7 @@ namespace KMail { /** * Recode to the specified charset */ - virtual void setCharset( const QCString & aCharset, bool forceDefault=false ) = 0; + virtual void setCharset( const TQCString & aCharset, bool forceDefault=false ) = 0; public: // kmcommand /** diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp index 321a374c..ea0536a9 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -101,21 +101,21 @@ using KMime::DateFormatter; #include // Qt headers: -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // other headers: #include @@ -155,37 +155,37 @@ namespace { I18N_NOOP("

    This setting has been fixed by your administrator.

    " "

    If you think this is an error, please contact him.

    "); - void checkLockDown( QWidget * w, const KConfigBase & c, const char * key ) { + void checkLockDown( TQWidget * w, const KConfigBase & c, const char * key ) { if ( c.entryIsImmutable( key ) ) { w->setEnabled( false ); - QToolTip::add( w, i18n( lockedDownWarning ) ); + TQToolTip::add( w, i18n( lockedDownWarning ) ); } else { - QToolTip::remove( w ); + TQToolTip::remove( w ); } } - void populateButtonGroup( QButtonGroup * g, const EnumConfigEntry & e ) { + void populateButtonGroup( TQButtonGroup * g, const EnumConfigEntry & e ) { g->setTitle( i18n( e.desc ) ); g->layout()->setSpacing( KDialog::spacingHint() ); for ( int i = 0 ; i < e.numItems ; ++i ) - g->insert( new QRadioButton( i18n( e.items[i].desc ), g ), i ); + g->insert( new TQRadioButton( i18n( e.items[i].desc ), g ), i ); } - void populateCheckBox( QCheckBox * b, const BoolConfigEntry & e ) { + void populateCheckBox( TQCheckBox * b, const BoolConfigEntry & e ) { b->setText( i18n( e.desc ) ); } - void loadWidget( QCheckBox * b, const KConfigBase & c, const BoolConfigEntry & e ) { + void loadWidget( TQCheckBox * b, const KConfigBase & c, const BoolConfigEntry & e ) { Q_ASSERT( c.group() == e.group ); checkLockDown( b, c, e.key ); b->setChecked( c.readBoolEntry( e.key, e.defaultValue ) ); } - void loadWidget( QButtonGroup * g, const KConfigBase & c, const EnumConfigEntry & e ) { + void loadWidget( TQButtonGroup * g, const KConfigBase & c, const EnumConfigEntry & e ) { Q_ASSERT( c.group() == e.group ); Q_ASSERT( g->count() == e.numItems ); checkLockDown( g, c, e.key ); - const QString s = c.readEntry( e.key, e.items[e.defaultItem].key ); + const TQString s = c.readEntry( e.key, e.items[e.defaultItem].key ); for ( int i = 0 ; i < e.numItems ; ++i ) if ( s == e.items[i].key ) { g->setButton( i ); @@ -194,12 +194,12 @@ namespace { g->setButton( e.defaultItem ); } - void saveCheckBox( QCheckBox * b, KConfigBase & c, const BoolConfigEntry & e ) { + void saveCheckBox( TQCheckBox * b, KConfigBase & c, const BoolConfigEntry & e ) { Q_ASSERT( c.group() == e.group ); c.writeEntry( e.key, b->isChecked() ); } - void saveButtonGroup( QButtonGroup * g, KConfigBase & c, const EnumConfigEntry & e ) { + void saveButtonGroup( TQButtonGroup * g, KConfigBase & c, const EnumConfigEntry & e ) { Q_ASSERT( c.group() == e.group ); Q_ASSERT( g->count() == e.numItems ); c.writeEntry( e.key, e.items[ g->id( g->selected() ) ].key ); @@ -213,7 +213,7 @@ namespace { } -ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal ) +ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal ) : KCMultiDialog( KDialogBase::IconList, KGuiItem( i18n( "&Load Profile..." ) ), KGuiItem(), User2, i18n( "Configure" ), parent, name, modal ) , mProfileDialog( 0 ) @@ -241,7 +241,7 @@ ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal } -void ConfigureDialog::hideEvent( QHideEvent *ev ) { +void ConfigureDialog::hideEvent( TQHideEvent *ev ) { KConfigGroup geometry( KMKernel::config(), "Geometry" ); geometry.writeEntry( "ConfigureDialogWidth", width() ); geometry.writeEntry( "ConfigureDialogHeight",height() ); @@ -267,8 +267,8 @@ void ConfigureDialog::slotUser2() { return; } mProfileDialog = new ProfileDialog( this, "mProfileDialog" ); - connect( mProfileDialog, SIGNAL(profileSelected(KConfig*)), - this, SIGNAL(installProfile(KConfig*)) ); + connect( mProfileDialog, TQT_SIGNAL(profileSelected(KConfig*)), + this, TQT_SIGNAL(installProfile(KConfig*)) ); mProfileDialog->show(); } @@ -277,36 +277,36 @@ void ConfigureDialog::slotUser2() { // * IdentityPage * // * * // ************************************************************* -QString IdentityPage::helpAnchor() const { - return QString::fromLatin1("configure-identity"); +TQString IdentityPage::helpAnchor() const { + return TQString::fromLatin1("configure-identity"); } -IdentityPage::IdentityPage( QWidget * parent, const char * name ) +IdentityPage::IdentityPage( TQWidget * parent, const char * name ) : ConfigModule( parent, name ), mIdentityDialog( 0 ) { - QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() ); + TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() ); mIdentityList = new IdentityListView( this ); - connect( mIdentityList, SIGNAL(selectionChanged()), - SLOT(slotIdentitySelectionChanged()) ); - connect( mIdentityList, SIGNAL(itemRenamed(QListViewItem*,const QString&,int)), - SLOT(slotRenameIdentity(QListViewItem*,const QString&,int)) ); - connect( mIdentityList, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)), - SLOT(slotModifyIdentity()) ); - connect( mIdentityList, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)), - SLOT(slotContextMenu(KListView*,QListViewItem*,const QPoint&)) ); + connect( mIdentityList, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotIdentitySelectionChanged()) ); + connect( mIdentityList, TQT_SIGNAL(itemRenamed(TQListViewItem*,const TQString&,int)), + TQT_SLOT(slotRenameIdentity(TQListViewItem*,const TQString&,int)) ); + connect( mIdentityList, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), + TQT_SLOT(slotModifyIdentity()) ); + connect( mIdentityList, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint&)), + TQT_SLOT(slotContextMenu(KListView*,TQListViewItem*,const TQPoint&)) ); // ### connect dragged(...), ... hlay->addWidget( mIdentityList, 1 ); - QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing + TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing - QPushButton * button = new QPushButton( i18n("&Add..."), this ); - mModifyButton = new QPushButton( i18n("&Modify..."), this ); - mRenameButton = new QPushButton( i18n("&Rename"), this ); - mRemoveButton = new QPushButton( i18n("Remo&ve"), this ); - mSetAsDefaultButton = new QPushButton( i18n("Set as &Default"), this ); + TQPushButton * button = new TQPushButton( i18n("&Add..."), this ); + mModifyButton = new TQPushButton( i18n("&Modify..."), this ); + mRenameButton = new TQPushButton( i18n("&Rename"), this ); + mRemoveButton = new TQPushButton( i18n("Remo&ve"), this ); + mSetAsDefaultButton = new TQPushButton( i18n("Set as &Default"), this ); button->setAutoDefault( false ); mModifyButton->setAutoDefault( false ); mModifyButton->setEnabled( false ); @@ -316,16 +316,16 @@ IdentityPage::IdentityPage( QWidget * parent, const char * name ) mRemoveButton->setEnabled( false ); mSetAsDefaultButton->setAutoDefault( false ); mSetAsDefaultButton->setEnabled( false ); - connect( button, SIGNAL(clicked()), - this, SLOT(slotNewIdentity()) ); - connect( mModifyButton, SIGNAL(clicked()), - this, SLOT(slotModifyIdentity()) ); - connect( mRenameButton, SIGNAL(clicked()), - this, SLOT(slotRenameIdentity()) ); - connect( mRemoveButton, SIGNAL(clicked()), - this, SLOT(slotRemoveIdentity()) ); - connect( mSetAsDefaultButton, SIGNAL(clicked()), - this, SLOT(slotSetAsDefault()) ); + connect( button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNewIdentity()) ); + connect( mModifyButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotModifyIdentity()) ); + connect( mRenameButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRenameIdentity()) ); + connect( mRemoveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveIdentity()) ); + connect( mSetAsDefaultButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSetAsDefault()) ); vlay->addWidget( button ); vlay->addWidget( mModifyButton ); vlay->addWidget( mRenameButton ); @@ -341,7 +341,7 @@ void IdentityPage::load() mOldNumberOfIdentities = im->shadowIdentities().count(); // Fill the list: mIdentityList->clear(); - QListViewItem * item = 0; + TQListViewItem * item = 0; for ( KPIM::IdentityManager::Iterator it = im->modifyBegin() ; it != im->modifyEnd() ; ++it ) item = new IdentityListViewItem( mIdentityList, item, *it ); mIdentityList->setSelected( mIdentityList->currentItem(), true ); @@ -378,8 +378,8 @@ void IdentityPage::slotNewIdentity() KPIM::IdentityManager * im = kmkernel->identityManager(); NewIdentityDialog dialog( im->shadowIdentities(), this, "new", true ); - if( dialog.exec() == QDialog::Accepted ) { - QString identityName = dialog.identityName().stripWhiteSpace(); + if( dialog.exec() == TQDialog::Accepted ) { + TQString identityName = dialog.identityName().stripWhiteSpace(); assert( !identityName.isEmpty() ); // @@ -404,7 +404,7 @@ void IdentityPage::slotNewIdentity() // Insert into listview: // KPIM::Identity & newIdent = im->modifyIdentityForName( identityName ); - QListViewItem * item = mIdentityList->selectedItem(); + TQListViewItem * item = mIdentityList->selectedItem(); if ( item ) item = item->itemAbove(); mIdentityList->setSelected( new IdentityListViewItem( mIdentityList, @@ -425,7 +425,7 @@ void IdentityPage::slotModifyIdentity() { mIdentityDialog->setIdentity( item->identity() ); // Hmm, an unmodal dialog would be nicer, but a modal one is easier ;-) - if ( mIdentityDialog->exec() == QDialog::Accepted ) { + if ( mIdentityDialog->exec() == TQDialog::Accepted ) { mIdentityDialog->updateIdentity( item->identity() ); item->redisplay(); emit changed(true); @@ -447,7 +447,7 @@ void IdentityPage::slotRemoveIdentity() dynamic_cast( mIdentityList->selectedItem() ); if ( !item ) return; - QString msg = i18n("Do you really want to remove the identity named " + TQString msg = i18n("Do you really want to remove the identity named " "%1?").arg( item->identity().identityName() ); if( KMessageBox::warningContinueCancel( this, msg, i18n("Remove Identity"), KGuiItem(i18n("&Remove"),"editdelete") ) == KMessageBox::Continue ) @@ -461,21 +461,21 @@ void IdentityPage::slotRemoveIdentity() void IdentityPage::slotRenameIdentity() { assert( !mIdentityDialog ); - QListViewItem * item = mIdentityList->selectedItem(); + TQListViewItem * item = mIdentityList->selectedItem(); if ( !item ) return; mIdentityList->rename( item, 0 ); } -void IdentityPage::slotRenameIdentity( QListViewItem * i, - const QString & s, int col ) { +void IdentityPage::slotRenameIdentity( TQListViewItem * i, + const TQString & s, int col ) { assert( col == 0 ); Q_UNUSED( col ); IdentityListViewItem * item = dynamic_cast( i ); if ( !item ) return; - QString newName = s.stripWhiteSpace(); + TQString newName = s.stripWhiteSpace(); if ( !newName.isEmpty() && !kmkernel->identityManager()->shadowIdentities().contains( newName ) ) { KPIM::Identity & ident = item->identity(); @@ -485,18 +485,18 @@ void IdentityPage::slotRenameIdentity( QListViewItem * i, item->redisplay(); } -void IdentityPage::slotContextMenu( KListView *, QListViewItem * i, - const QPoint & pos ) { +void IdentityPage::slotContextMenu( KListView *, TQListViewItem * i, + const TQPoint & pos ) { IdentityListViewItem * item = dynamic_cast( i ); - QPopupMenu * menu = new QPopupMenu( this ); - menu->insertItem( i18n("Add..."), this, SLOT(slotNewIdentity()) ); + TQPopupMenu * menu = new TQPopupMenu( this ); + menu->insertItem( i18n("Add..."), this, TQT_SLOT(slotNewIdentity()) ); if ( item ) { - menu->insertItem( i18n("Modify..."), this, SLOT(slotModifyIdentity()) ); + menu->insertItem( i18n("Modify..."), this, TQT_SLOT(slotModifyIdentity()) ); if ( mIdentityList->childCount() > 1 ) - menu->insertItem( i18n("Remove"), this, SLOT(slotRemoveIdentity()) ); + menu->insertItem( i18n("Remove"), this, TQT_SLOT(slotRemoveIdentity()) ); if ( !item->identity().isDefault() ) - menu->insertItem( i18n("Set as Default"), this, SLOT(slotSetAsDefault()) ); + menu->insertItem( i18n("Set as Default"), this, TQT_SLOT(slotSetAsDefault()) ); } menu->exec( pos ); delete menu; @@ -516,7 +516,7 @@ void IdentityPage::slotSetAsDefault() { } void IdentityPage::refreshList() { - for ( QListViewItemIterator it( mIdentityList ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( mIdentityList ) ; it.current() ; ++it ) { IdentityListViewItem * item = dynamic_cast(it.current()); if ( item ) @@ -536,7 +536,7 @@ void IdentityPage::slotIdentitySelectionChanged() mSetAsDefaultButton->setEnabled( item && !item->identity().isDefault() ); } -void IdentityPage::slotUpdateTransportCombo( const QStringList & sl ) +void IdentityPage::slotUpdateTransportCombo( const TQStringList & sl ) { if ( mIdentityDialog ) mIdentityDialog->slotUpdateTransportCombo( sl ); } @@ -548,11 +548,11 @@ void IdentityPage::slotUpdateTransportCombo( const QStringList & sl ) // * AccountsPage * // * * // ************************************************************* -QString AccountsPage::helpAnchor() const { - return QString::fromLatin1("configure-accounts"); +TQString AccountsPage::helpAnchor() const { + return TQString::fromLatin1("configure-accounts"); } -AccountsPage::AccountsPage( QWidget * parent, const char * name ) +AccountsPage::AccountsPage( TQWidget * parent, const char * name ) : ConfigModuleWithTabs( parent, name ) { // @@ -560,42 +560,42 @@ AccountsPage::AccountsPage( QWidget * parent, const char * name ) // mReceivingTab = new ReceivingTab(); addTab( mReceivingTab, i18n( "&Receiving" ) ); - connect( mReceivingTab, SIGNAL(accountListChanged(const QStringList &)), - this, SIGNAL(accountListChanged(const QStringList &)) ); + connect( mReceivingTab, TQT_SIGNAL(accountListChanged(const TQStringList &)), + this, TQT_SIGNAL(accountListChanged(const TQStringList &)) ); // // "Sending" tab: // mSendingTab = new SendingTab(); addTab( mSendingTab, i18n( "&Sending" ) ); - connect( mSendingTab, SIGNAL(transportListChanged(const QStringList&)), - this, SIGNAL(transportListChanged(const QStringList&)) ); + connect( mSendingTab, TQT_SIGNAL(transportListChanged(const TQStringList&)), + this, TQT_SIGNAL(transportListChanged(const TQStringList&)) ); load(); } -QString AccountsPage::SendingTab::helpAnchor() const { - return QString::fromLatin1("configure-accounts-sending"); +TQString AccountsPage::SendingTab::helpAnchor() const { + return TQString::fromLatin1("configure-accounts-sending"); } -AccountsPageSendingTab::AccountsPageSendingTab( QWidget * parent, const char * name ) +AccountsPageSendingTab::AccountsPageSendingTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { mTransportInfoList.setAutoDelete( true ); // temp. vars: - QVBoxLayout *vlay; - QVBoxLayout *btn_vlay; - QHBoxLayout *hlay; - QGridLayout *glay; - QPushButton *button; - QGroupBox *group; - - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQVBoxLayout *vlay; + TQVBoxLayout *btn_vlay; + TQHBoxLayout *hlay; + TQGridLayout *glay; + TQPushButton *button; + TQGroupBox *group; + + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // label: zero stretch ### FIXME more - vlay->addWidget( new QLabel( i18n("Outgoing accounts (add at least one):"), this ) ); + vlay->addWidget( new TQLabel( i18n("Outgoing accounts (add at least one):"), this ) ); // hbox layout: stretch 10, spacing inherited from vlay - hlay = new QHBoxLayout(); + hlay = new TQHBoxLayout(); vlay->addLayout( hlay, 10 ); // high stretch b/c of the groupbox's sizeHint // transport list: left widget in hlay; stretch 1 @@ -605,137 +605,137 @@ AccountsPageSendingTab::AccountsPageSendingTab( QWidget * parent, const char * n mTransportList->addColumn( i18n("Type") ); mTransportList->setAllColumnsShowFocus( true ); mTransportList->setSorting( -1 ); - connect( mTransportList, SIGNAL(selectionChanged()), - this, SLOT(slotTransportSelected()) ); - connect( mTransportList, SIGNAL(doubleClicked( QListViewItem *)), - this, SLOT(slotModifySelectedTransport()) ); + connect( mTransportList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotTransportSelected()) ); + connect( mTransportList, TQT_SIGNAL(doubleClicked( TQListViewItem *)), + this, TQT_SLOT(slotModifySelectedTransport()) ); hlay->addWidget( mTransportList, 1 ); // a vbox layout for the buttons: zero stretch, spacing inherited from hlay - btn_vlay = new QVBoxLayout( hlay ); + btn_vlay = new TQVBoxLayout( hlay ); // "add..." button: stretch 0 - button = new QPushButton( i18n("A&dd..."), this ); + button = new TQPushButton( i18n("A&dd..."), this ); button->setAutoDefault( false ); - connect( button, SIGNAL(clicked()), - this, SLOT(slotAddTransport()) ); + connect( button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddTransport()) ); btn_vlay->addWidget( button ); // "modify..." button: stretch 0 - mModifyTransportButton = new QPushButton( i18n("&Modify..."), this ); + mModifyTransportButton = new TQPushButton( i18n("&Modify..."), this ); mModifyTransportButton->setAutoDefault( false ); mModifyTransportButton->setEnabled( false ); // b/c no item is selected yet - connect( mModifyTransportButton, SIGNAL(clicked()), - this, SLOT(slotModifySelectedTransport()) ); + connect( mModifyTransportButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotModifySelectedTransport()) ); btn_vlay->addWidget( mModifyTransportButton ); // "remove" button: stretch 0 - mRemoveTransportButton = new QPushButton( i18n("R&emove"), this ); + mRemoveTransportButton = new TQPushButton( i18n("R&emove"), this ); mRemoveTransportButton->setAutoDefault( false ); mRemoveTransportButton->setEnabled( false ); // b/c no item is selected yet - connect( mRemoveTransportButton, SIGNAL(clicked()), - this, SLOT(slotRemoveSelectedTransport()) ); + connect( mRemoveTransportButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveSelectedTransport()) ); btn_vlay->addWidget( mRemoveTransportButton ); - mSetDefaultTransportButton = new QPushButton( i18n("Set Default"), this ); + mSetDefaultTransportButton = new TQPushButton( i18n("Set Default"), this ); mSetDefaultTransportButton->setAutoDefault( false ); mSetDefaultTransportButton->setEnabled( false ); - connect ( mSetDefaultTransportButton, SIGNAL(clicked()), - this, SLOT(slotSetDefaultTransport()) ); + connect ( mSetDefaultTransportButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSetDefaultTransport()) ); btn_vlay->addWidget( mSetDefaultTransportButton ); btn_vlay->addStretch( 1 ); // spacer // "Common options" groupbox: - group = new QGroupBox( 0, Qt::Vertical, + group = new TQGroupBox( 0, Qt::Vertical, i18n("Common Options"), this ); vlay->addWidget(group); // a grid layout for the contents of the "common options" group box - glay = new QGridLayout( group->layout(), 5, 3, KDialog::spacingHint() ); + glay = new TQGridLayout( group->layout(), 5, 3, KDialog::spacingHint() ); glay->setColStretch( 2, 10 ); // "confirm before send" check box: - mConfirmSendCheck = new QCheckBox( i18n("Confirm &before send"), group ); + mConfirmSendCheck = new TQCheckBox( i18n("Confirm &before send"), group ); glay->addMultiCellWidget( mConfirmSendCheck, 0, 0, 0, 1 ); - connect( mConfirmSendCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mConfirmSendCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "send on check" combo: - mSendOnCheckCombo = new QComboBox( false, group ); - mSendOnCheckCombo->insertStringList( QStringList() + mSendOnCheckCombo = new TQComboBox( false, group ); + mSendOnCheckCombo->insertStringList( TQStringList() << i18n("Never Automatically") << i18n("On Manual Mail Checks") << i18n("On All Mail Checks") ); glay->addWidget( mSendOnCheckCombo, 1, 1 ); - connect( mSendOnCheckCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mSendOnCheckCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "default send method" combo: - mSendMethodCombo = new QComboBox( false, group ); - mSendMethodCombo->insertStringList( QStringList() + mSendMethodCombo = new TQComboBox( false, group ); + mSendMethodCombo->insertStringList( TQStringList() << i18n("Send Now") << i18n("Send Later") ); glay->addWidget( mSendMethodCombo, 2, 1 ); - connect( mSendMethodCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mSendMethodCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "message property" combo: // ### FIXME: remove completely? - mMessagePropertyCombo = new QComboBox( false, group ); - mMessagePropertyCombo->insertStringList( QStringList() + mMessagePropertyCombo = new TQComboBox( false, group ); + mMessagePropertyCombo->insertStringList( TQStringList() << i18n("Allow 8-bit") << i18n("MIME Compliant (Quoted Printable)") ); glay->addWidget( mMessagePropertyCombo, 3, 1 ); - connect( mMessagePropertyCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mMessagePropertyCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "default domain" input field: mDefaultDomainEdit = new KLineEdit( group ); glay->addMultiCellWidget( mDefaultDomainEdit, 4, 4, 1, 2 ); - connect( mDefaultDomainEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mDefaultDomainEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // labels: - QLabel *l = new QLabel( mSendOnCheckCombo, /*buddy*/ + TQLabel *l = new TQLabel( mSendOnCheckCombo, /*buddy*/ i18n("Send &messages in outbox folder:"), group ); glay->addWidget( l, 1, 0 ); - QString msg = i18n( GlobalSettings::self()->sendOnCheckItem()->whatsThis().utf8() ); - QWhatsThis::add( l, msg ); - QWhatsThis::add( mSendOnCheckCombo, msg ); + TQString msg = i18n( GlobalSettings::self()->sendOnCheckItem()->whatsThis().utf8() ); + TQWhatsThis::add( l, msg ); + TQWhatsThis::add( mSendOnCheckCombo, msg ); - glay->addWidget( new QLabel( mSendMethodCombo, /*buddy*/ + glay->addWidget( new TQLabel( mSendMethodCombo, /*buddy*/ i18n("Defa&ult send method:"), group ), 2, 0 ); - glay->addWidget( new QLabel( mMessagePropertyCombo, /*buddy*/ + glay->addWidget( new TQLabel( mMessagePropertyCombo, /*buddy*/ i18n("Message &property:"), group ), 3, 0 ); - l = new QLabel( mDefaultDomainEdit, /*buddy*/ + l = new TQLabel( mDefaultDomainEdit, /*buddy*/ i18n("Defaul&t domain:"), group ); glay->addWidget( l, 4, 0 ); - // and now: add QWhatsThis: + // and now: add TQWhatsThis: msg = i18n( "

    The default domain is used to complete email " "addresses that only consist of the user's name." "

    " ); - QWhatsThis::add( l, msg ); - QWhatsThis::add( mDefaultDomainEdit, msg ); + TQWhatsThis::add( l, msg ); + TQWhatsThis::add( mDefaultDomainEdit, msg ); } void AccountsPage::SendingTab::slotTransportSelected() { - QListViewItem *cur = mTransportList->selectedItem(); + TQListViewItem *cur = mTransportList->selectedItem(); mModifyTransportButton->setEnabled( cur ); mRemoveTransportButton->setEnabled( cur ); mSetDefaultTransportButton->setEnabled( cur ); } // adds a number to @p name to make the name unique -static inline QString uniqueName( const QStringList & list, - const QString & name ) +static inline TQString uniqueName( const TQStringList & list, + const TQString & name ) { int suffix = 1; - QString result = name; + TQString result = name; while ( list.find( result ) != list.end() ) { result = i18n("%1: name; %2: number appended to it to make it unique " "among a list of names", "%1 %2") @@ -747,12 +747,12 @@ static inline QString uniqueName( const QStringList & list, void AccountsPage::SendingTab::slotSetDefaultTransport() { - QListViewItem *item = mTransportList->selectedItem(); + TQListViewItem *item = mTransportList->selectedItem(); if ( !item ) return; KMTransportInfo ti; - QListViewItemIterator it( mTransportList ); + TQListViewItemIterator it( mTransportList ); for ( ; it.current(); ++it ) { ti.readConfig( KMTransportInfo::findTransport( it.current()->text(0) )); if ( ti.type != "sendmail" ) { @@ -778,17 +778,17 @@ void AccountsPage::SendingTab::slotAddTransport() { // limit scope of selDialog KMTransportSelDlg selDialog( this ); - if ( selDialog.exec() != QDialog::Accepted ) return; + if ( selDialog.exec() != TQDialog::Accepted ) return; transportType = selDialog.selected(); } KMTransportInfo *transportInfo = new KMTransportInfo(); switch ( transportType ) { case 0: // smtp - transportInfo->type = QString::fromLatin1("smtp"); + transportInfo->type = TQString::fromLatin1("smtp"); break; case 1: // sendmail - transportInfo->type = QString::fromLatin1("sendmail"); + transportInfo->type = TQString::fromLatin1("sendmail"); transportInfo->name = i18n("Sendmail"); transportInfo->host = _PATH_SENDMAIL; // ### FIXME: use const, not #define break; @@ -800,12 +800,12 @@ void AccountsPage::SendingTab::slotAddTransport() // create list of names: // ### move behind dialog.exec()? - QStringList transportNames; - QPtrListIterator it( mTransportInfoList ); + TQStringList transportNames; + TQPtrListIterator it( mTransportInfoList ); for ( it.toFirst() ; it.current() ; ++it ) transportNames << (*it)->name; - if( dialog.exec() != QDialog::Accepted ) { + if( dialog.exec() != TQDialog::Accepted ) { delete transportInfo; return; } @@ -819,8 +819,8 @@ void AccountsPage::SendingTab::slotAddTransport() // append to listview: // ### FIXME: insert before the selected item, append on empty selection - QListViewItem *lastItem = mTransportList->firstChild(); - QString typeDisplayName; + TQListViewItem *lastItem = mTransportList->firstChild(); + TQString typeDisplayName; if ( lastItem ) { typeDisplayName = transportInfo->type; } else { @@ -831,7 +831,7 @@ void AccountsPage::SendingTab::slotAddTransport() .arg( transportInfo->type ); GlobalSettings::self()->setDefaultTransport( transportInfo->name ); } - (void) new QListViewItem( mTransportList, lastItem, transportInfo->name, + (void) new TQListViewItem( mTransportList, lastItem, transportInfo->name, typeDisplayName ); // notify anyone who cares: @@ -841,24 +841,24 @@ void AccountsPage::SendingTab::slotAddTransport() void AccountsPage::SendingTab::slotModifySelectedTransport() { - QListViewItem *item = mTransportList->selectedItem(); + TQListViewItem *item = mTransportList->selectedItem(); if ( !item ) return; - const QString& originalTransport = item->text(0); + const TQString& originalTransport = item->text(0); - QPtrListIterator it( mTransportInfoList ); + TQPtrListIterator it( mTransportInfoList ); for ( it.toFirst() ; it.current() ; ++it ) if ( (*it)->name == item->text(0) ) break; if ( !it.current() ) return; KMTransportDialog dialog( i18n("Modify Transport"), (*it), this ); - if ( dialog.exec() != QDialog::Accepted ) return; + if ( dialog.exec() != TQDialog::Accepted ) return; // create the list of names of transports, but leave out the current // item: - QStringList transportNames; - QPtrListIterator jt( mTransportInfoList ); + TQStringList transportNames; + TQPtrListIterator jt( mTransportInfoList ); int entryLocation = -1; for ( jt.toFirst() ; jt.current() ; ++jt ) if ( jt != it ) @@ -874,9 +874,9 @@ void AccountsPage::SendingTab::slotModifySelectedTransport() // and insert the new name at the position of the old in the list of // strings; then broadcast the new list: transportNames.insert( transportNames.at( entryLocation ), (*it)->name ); - const QString& newTransportName = (*it)->name; + const TQString& newTransportName = (*it)->name; - QStringList changedIdents; + TQStringList changedIdents; KPIM::IdentityManager * im = kmkernel->identityManager(); for ( KPIM::IdentityManager::Iterator it = im->modifyBegin(); it != im->modifyEnd(); ++it ) { if ( originalTransport == (*it).transport() ) { @@ -886,7 +886,7 @@ void AccountsPage::SendingTab::slotModifySelectedTransport() } if ( !changedIdents.isEmpty() ) { - QString information = i18n( "This identity has been changed to use the modified transport:", + TQString information = i18n( "This identity has been changed to use the modified transport:", "These %n identities have been changed to use the modified transport:", changedIdents.count() ); KMessageBox::informationList( this, information, changedIdents ); @@ -898,39 +898,39 @@ void AccountsPage::SendingTab::slotModifySelectedTransport() void AccountsPage::SendingTab::slotRemoveSelectedTransport() { - QListViewItem *item = mTransportList->selectedItem(); + TQListViewItem *item = mTransportList->selectedItem(); if ( !item ) return; - QStringList changedIdents; + TQStringList changedIdents; KPIM::IdentityManager * im = kmkernel->identityManager(); for ( KPIM::IdentityManager::Iterator it = im->modifyBegin(); it != im->modifyEnd(); ++it ) { if ( item->text( 0 ) == (*it).transport() ) { - (*it).setTransport( QString::null ); + (*it).setTransport( TQString::null ); changedIdents += (*it).identityName(); } } // if the deleted transport is the currently used transport reset it to default - const QString& currentTransport = GlobalSettings::self()->currentTransport(); + const TQString& currentTransport = GlobalSettings::self()->currentTransport(); if ( item->text( 0 ) == currentTransport ) { - GlobalSettings::self()->setCurrentTransport( QString::null ); + GlobalSettings::self()->setCurrentTransport( TQString::null ); } if ( !changedIdents.isEmpty() ) { - QString information = i18n( "This identity has been changed to use the default transport:", + TQString information = i18n( "This identity has been changed to use the default transport:", "These %n identities have been changed to use the default transport:", changedIdents.count() ); KMessageBox::informationList( this, information, changedIdents ); } - QPtrListIterator it( mTransportInfoList ); + TQPtrListIterator it( mTransportInfoList ); for ( it.toFirst() ; it.current() ; ++it ) if ( (*it)->name == item->text(0) ) break; if ( !it.current() ) return; KMTransportInfo ti; - QListViewItem *newCurrent = item->itemBelow(); + TQListViewItem *newCurrent = item->itemBelow(); if ( !newCurrent ) newCurrent = item->itemAbove(); //mTransportList->removeItem( item ); if ( newCurrent ) { @@ -946,13 +946,13 @@ void AccountsPage::SendingTab::slotRemoveSelectedTransport() } } } else { - GlobalSettings::self()->setDefaultTransport( QString::null ); + GlobalSettings::self()->setDefaultTransport( TQString::null ); } delete item; mTransportInfoList.remove( it ); - QStringList transportNames; + TQStringList transportNames; for ( it.toFirst() ; it.current() ; ++it ) transportNames << (*it)->name; emit transportListChanged( transportNames ); @@ -969,22 +969,22 @@ void AccountsPage::SendingTab::doLoadOther() { int numTransports = general.readNumEntry("transports", 0); - QListViewItem *top = 0; + TQListViewItem *top = 0; mTransportInfoList.clear(); mTransportList->clear(); - QStringList transportNames; + TQStringList transportNames; for ( int i = 1 ; i <= numTransports ; i++ ) { KMTransportInfo *ti = new KMTransportInfo(); ti->readConfig(i); mTransportInfoList.append( ti ); transportNames << ti->name; - top = new QListViewItem( mTransportList, top, ti->name, ti->type ); + top = new TQListViewItem( mTransportList, top, ti->name, ti->type ); } emit transportListChanged( transportNames ); - const QString &defaultTransport = GlobalSettings::self()->defaultTransport(); + const TQString &defaultTransport = GlobalSettings::self()->defaultTransport(); - QListViewItemIterator it( mTransportList ); + TQListViewItemIterator it( mTransportList ); for ( ; it.current(); ++it ) { if ( it.current()->text(0) == defaultTransport ) { if ( it.current()->text(1) != "sendmail" ) { @@ -1008,7 +1008,7 @@ void AccountsPage::SendingTab::doLoadOther() { mConfirmSendCheck->setChecked( composer.readBoolEntry( "confirm-before-send", false ) ); - QString str = general.readEntry( "Default domain" ); + TQString str = general.readEntry( "Default domain" ); if( str.isEmpty() ) { //### FIXME: Use the global convenience function instead of the homebrewed @@ -1020,7 +1020,7 @@ void AccountsPage::SendingTab::doLoadOther() { buffer[255] = 0; else buffer[0] = 0; - str = QString::fromLatin1( *buffer ? buffer : "localhost" ); + str = TQString::fromLatin1( *buffer ? buffer : "localhost" ); } mDefaultDomainEdit->setText( str ); } @@ -1031,7 +1031,7 @@ void AccountsPage::SendingTab::save() { // Save transports: general.writeEntry( "transports", mTransportInfoList.count() ); - QPtrListIterator it( mTransportInfoList ); + TQPtrListIterator it( mTransportInfoList ); for ( int i = 1 ; it.current() ; ++it, ++i ) (*it)->writeConfig(i); @@ -1046,27 +1046,27 @@ void AccountsPage::SendingTab::save() { general.writeEntry( "Default domain", mDefaultDomainEdit->text() ); } -QString AccountsPage::ReceivingTab::helpAnchor() const { - return QString::fromLatin1("configure-accounts-receiving"); +TQString AccountsPage::ReceivingTab::helpAnchor() const { + return TQString::fromLatin1("configure-accounts-receiving"); } -AccountsPageReceivingTab::AccountsPageReceivingTab( QWidget * parent, const char * name ) +AccountsPageReceivingTab::AccountsPageReceivingTab( TQWidget * parent, const char * name ) : ConfigModuleTab ( parent, name ) { // temp. vars: - QVBoxLayout *vlay; - QVBoxLayout *btn_vlay; - QHBoxLayout *hlay; - QPushButton *button; - QGroupBox *group; + TQVBoxLayout *vlay; + TQVBoxLayout *btn_vlay; + TQHBoxLayout *hlay; + TQPushButton *button; + TQGroupBox *group; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // label: zero stretch - vlay->addWidget( new QLabel( i18n("Incoming accounts (add at least one):"), this ) ); + vlay->addWidget( new TQLabel( i18n("Incoming accounts (add at least one):"), this ) ); // hbox layout: stretch 10, spacing inherited from vlay - hlay = new QHBoxLayout(); + hlay = new TQHBoxLayout(); vlay->addLayout( hlay, 10 ); // high stretch to suppress groupbox's growing // account list: left widget in hlay; stretch 1 @@ -1076,75 +1076,75 @@ AccountsPageReceivingTab::AccountsPageReceivingTab( QWidget * parent, const char mAccountList->addColumn( i18n("Folder") ); mAccountList->setAllColumnsShowFocus( true ); mAccountList->setSorting( -1 ); - connect( mAccountList, SIGNAL(selectionChanged()), - this, SLOT(slotAccountSelected()) ); - connect( mAccountList, SIGNAL(doubleClicked( QListViewItem *)), - this, SLOT(slotModifySelectedAccount()) ); + connect( mAccountList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotAccountSelected()) ); + connect( mAccountList, TQT_SIGNAL(doubleClicked( TQListViewItem *)), + this, TQT_SLOT(slotModifySelectedAccount()) ); hlay->addWidget( mAccountList, 1 ); // a vbox layout for the buttons: zero stretch, spacing inherited from hlay - btn_vlay = new QVBoxLayout( hlay ); + btn_vlay = new TQVBoxLayout( hlay ); // "add..." button: stretch 0 - button = new QPushButton( i18n("A&dd..."), this ); + button = new TQPushButton( i18n("A&dd..."), this ); button->setAutoDefault( false ); - connect( button, SIGNAL(clicked()), - this, SLOT(slotAddAccount()) ); + connect( button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddAccount()) ); btn_vlay->addWidget( button ); // "modify..." button: stretch 0 - mModifyAccountButton = new QPushButton( i18n("&Modify..."), this ); + mModifyAccountButton = new TQPushButton( i18n("&Modify..."), this ); mModifyAccountButton->setAutoDefault( false ); mModifyAccountButton->setEnabled( false ); // b/c no item is selected yet - connect( mModifyAccountButton, SIGNAL(clicked()), - this, SLOT(slotModifySelectedAccount()) ); + connect( mModifyAccountButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotModifySelectedAccount()) ); btn_vlay->addWidget( mModifyAccountButton ); // "remove..." button: stretch 0 - mRemoveAccountButton = new QPushButton( i18n("R&emove"), this ); + mRemoveAccountButton = new TQPushButton( i18n("R&emove"), this ); mRemoveAccountButton->setAutoDefault( false ); mRemoveAccountButton->setEnabled( false ); // b/c no item is selected yet - connect( mRemoveAccountButton, SIGNAL(clicked()), - this, SLOT(slotRemoveSelectedAccount()) ); + connect( mRemoveAccountButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveSelectedAccount()) ); btn_vlay->addWidget( mRemoveAccountButton ); btn_vlay->addStretch( 1 ); // spacer - mCheckmailStartupCheck = new QCheckBox( i18n("Chec&k mail on startup"), this ); + mCheckmailStartupCheck = new TQCheckBox( i18n("Chec&k mail on startup"), this ); vlay->addWidget( mCheckmailStartupCheck ); - connect( mCheckmailStartupCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mCheckmailStartupCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "New Mail Notification" group box: stretch 0 - group = new QVGroupBox( i18n("New Mail Notification"), this ); + group = new TQVGroupBox( i18n("New Mail Notification"), this ); vlay->addWidget( group ); group->layout()->setSpacing( KDialog::spacingHint() ); // "beep on new mail" check box: - mBeepNewMailCheck = new QCheckBox(i18n("&Beep"), group ); - mBeepNewMailCheck->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, - QSizePolicy::Fixed ) ); - connect( mBeepNewMailCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + mBeepNewMailCheck = new TQCheckBox(i18n("&Beep"), group ); + mBeepNewMailCheck->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, + TQSizePolicy::Fixed ) ); + connect( mBeepNewMailCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "Detailed new mail notification" check box mVerboseNotificationCheck = - new QCheckBox( i18n( "Deta&iled new mail notification" ), group ); - mVerboseNotificationCheck->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, - QSizePolicy::Fixed ) ); - QToolTip::add( mVerboseNotificationCheck, + new TQCheckBox( i18n( "Deta&iled new mail notification" ), group ); + mVerboseNotificationCheck->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, + TQSizePolicy::Fixed ) ); + TQToolTip::add( mVerboseNotificationCheck, i18n( "Show for each folder the number of newly arrived " "messages" ) ); - QWhatsThis::add( mVerboseNotificationCheck, + TQWhatsThis::add( mVerboseNotificationCheck, GlobalSettings::self()->verboseNewMailNotificationItem()->whatsThis() ); - connect( mVerboseNotificationCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mVerboseNotificationCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // "Other Actions" button: - mOtherNewMailActionsButton = new QPushButton( i18n("Other Actio&ns"), group ); - mOtherNewMailActionsButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, - QSizePolicy::Fixed ) ); - connect( mOtherNewMailActionsButton, SIGNAL(clicked()), - this, SLOT(slotEditNotifications()) ); + mOtherNewMailActionsButton = new TQPushButton( i18n("Other Actio&ns"), group ); + mOtherNewMailActionsButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, + TQSizePolicy::Fixed ) ); + connect( mOtherNewMailActionsButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditNotifications()) ); } AccountsPageReceivingTab::~AccountsPageReceivingTab() @@ -1153,14 +1153,14 @@ AccountsPageReceivingTab::~AccountsPageReceivingTab() // we have a number of things to clean up: // The newly created accounts - QValueList< QGuardedPtr >::Iterator it; + TQValueList< TQGuardedPtr >::Iterator it; for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) { delete (*it); } mNewAccounts.clear(); // The modified accounts - QValueList::Iterator j; + TQValueList::Iterator j; for ( j = mModifiedAccounts.begin() ; j != mModifiedAccounts.end() ; ++j ) { delete (*j)->newAccount; delete (*j); @@ -1172,31 +1172,31 @@ AccountsPageReceivingTab::~AccountsPageReceivingTab() void AccountsPage::ReceivingTab::slotAccountSelected() { - QListViewItem * item = mAccountList->selectedItem(); + TQListViewItem * item = mAccountList->selectedItem(); mModifyAccountButton->setEnabled( item ); mRemoveAccountButton->setEnabled( item ); } -QStringList AccountsPage::ReceivingTab::occupiedNames() +TQStringList AccountsPage::ReceivingTab::occupiedNames() { - QStringList accountNames = kmkernel->acctMgr()->getAccounts(); + TQStringList accountNames = kmkernel->acctMgr()->getAccounts(); - QValueList::Iterator k; + TQValueList::Iterator k; for (k = mModifiedAccounts.begin(); k != mModifiedAccounts.end(); ++k ) if ((*k)->oldAccount) accountNames.remove( (*k)->oldAccount->name() ); - QValueList< QGuardedPtr >::Iterator l; + TQValueList< TQGuardedPtr >::Iterator l; for (l = mAccountsToDelete.begin(); l != mAccountsToDelete.end(); ++l ) if (*l) accountNames.remove( (*l)->name() ); - QValueList< QGuardedPtr >::Iterator it; + TQValueList< TQGuardedPtr >::Iterator it; for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) if (*it) accountNames += (*it)->name(); - QValueList::Iterator j; + TQValueList::Iterator j; for (j = mModifiedAccounts.begin(); j != mModifiedAccounts.end(); ++j ) accountNames += (*j)->newAccount->name(); @@ -1205,7 +1205,7 @@ QStringList AccountsPage::ReceivingTab::occupiedNames() void AccountsPage::ReceivingTab::slotAddAccount() { KMAcctSelDlg accountSelectorDialog( this ); - if( accountSelectorDialog.exec() != QDialog::Accepted ) return; + if( accountSelectorDialog.exec() != TQDialog::Accepted ) return; const char *accountType = 0; switch ( accountSelectorDialog.selected() ) { @@ -1223,7 +1223,7 @@ void AccountsPage::ReceivingTab::slotAddAccount() { } KMAccount *account - = kmkernel->acctMgr()->create( QString::fromLatin1( accountType ) ); + = kmkernel->acctMgr()->create( TQString::fromLatin1( accountType ) ); if ( !account ) { // ### FIXME: Give the user more information. Is this error // recoverable? @@ -1235,9 +1235,9 @@ void AccountsPage::ReceivingTab::slotAddAccount() { AccountDialog dialog( i18n("Add Account"), account, this ); - QStringList accountNames = occupiedNames(); + TQStringList accountNames = occupiedNames(); - if( dialog.exec() != QDialog::Accepted ) { + if( dialog.exec() != TQDialog::Accepted ) { delete account; return; } @@ -1245,12 +1245,12 @@ void AccountsPage::ReceivingTab::slotAddAccount() { account->deinstallTimer(); account->setName( uniqueName( accountNames, account->name() ) ); - QListViewItem *after = mAccountList->firstChild(); + TQListViewItem *after = mAccountList->firstChild(); while ( after && after->nextSibling() ) after = after->nextSibling(); - QListViewItem *listItem = - new QListViewItem( mAccountList, after, account->name(), account->type() ); + TQListViewItem *listItem = + new TQListViewItem( mAccountList, after, account->name(), account->type() ); if( account->folder() ) listItem->setText( 2, account->folder()->label() ); @@ -1262,11 +1262,11 @@ void AccountsPage::ReceivingTab::slotAddAccount() { void AccountsPage::ReceivingTab::slotModifySelectedAccount() { - QListViewItem *listItem = mAccountList->selectedItem(); + TQListViewItem *listItem = mAccountList->selectedItem(); if( !listItem ) return; KMAccount *account = 0; - QValueList::Iterator j; + TQValueList::Iterator j; for (j = mModifiedAccounts.begin(); j != mModifiedAccounts.end(); ++j ) if ( (*j)->newAccount->name() == listItem->text(0) ) { account = (*j)->newAccount; @@ -1274,7 +1274,7 @@ void AccountsPage::ReceivingTab::slotModifySelectedAccount() } if ( !account ) { - QValueList< QGuardedPtr >::Iterator it; + TQValueList< TQGuardedPtr >::Iterator it; for ( it = mNewAccounts.begin() ; it != mNewAccounts.end() ; ++it ) if ( (*it)->name() == listItem->text(0) ) { account = *it; @@ -1309,12 +1309,12 @@ void AccountsPage::ReceivingTab::slotModifySelectedAccount() } } - QStringList accountNames = occupiedNames(); + TQStringList accountNames = occupiedNames(); accountNames.remove( account->name() ); AccountDialog dialog( i18n("Modify Account"), account, this ); - if( dialog.exec() != QDialog::Accepted ) return; + if( dialog.exec() != TQDialog::Accepted ) return; account->setName( uniqueName( accountNames, account->name() ) ); @@ -1329,11 +1329,11 @@ void AccountsPage::ReceivingTab::slotModifySelectedAccount() void AccountsPage::ReceivingTab::slotRemoveSelectedAccount() { - QListViewItem *listItem = mAccountList->selectedItem(); + TQListViewItem *listItem = mAccountList->selectedItem(); if( !listItem ) return; KMAccount *acct = 0; - QValueList::Iterator j; + TQValueList::Iterator j; for ( j = mModifiedAccounts.begin() ; j != mModifiedAccounts.end() ; ++j ) if ( (*j)->newAccount->name() == listItem->text(0) ) { acct = (*j)->oldAccount; @@ -1342,7 +1342,7 @@ void AccountsPage::ReceivingTab::slotRemoveSelectedAccount() { break; } if ( !acct ) { - QValueList< QGuardedPtr >::Iterator it; + TQValueList< TQGuardedPtr >::Iterator it; for ( it = mNewAccounts.begin() ; it != mNewAccounts.end() ; ++it ) if ( (*it)->name() == listItem->text(0) ) { acct = *it; @@ -1362,7 +1362,7 @@ void AccountsPage::ReceivingTab::slotRemoveSelectedAccount() { return; } - QListViewItem * item = listItem->itemBelow(); + TQListViewItem * item = listItem->itemBelow(); if ( !item ) item = listItem->itemAbove(); delete listItem; @@ -1388,17 +1388,17 @@ void AccountsPage::ReceivingTab::doLoadOther() { KConfigGroup general( KMKernel::config(), "General" ); mAccountList->clear(); - QListViewItem *top = 0; + TQListViewItem *top = 0; for( KMAccount *a = kmkernel->acctMgr()->first(); a!=0; a = kmkernel->acctMgr()->next() ) { - QListViewItem *listItem = - new QListViewItem( mAccountList, top, a->name(), a->type() ); + TQListViewItem *listItem = + new TQListViewItem( mAccountList, top, a->name(), a->type() ); if( a->folder() ) listItem->setText( 2, a->folder()->label() ); top = listItem; } - QListViewItem *listItem = mAccountList->firstChild(); + TQListViewItem *listItem = mAccountList->firstChild(); if ( listItem ) { mAccountList->setCurrentItem( listItem ); mAccountList->setSelected( listItem, true ); @@ -1406,7 +1406,7 @@ void AccountsPage::ReceivingTab::doLoadOther() { mBeepNewMailCheck->setChecked( general.readBoolEntry("beep-on-mail", false ) ); mCheckmailStartupCheck->setChecked( general.readBoolEntry("checkmail-startup", false) ); - QTimer::singleShot( 0, this, SLOT( slotTweakAccountList() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotTweakAccountList() ) ); } void AccountsPage::ReceivingTab::slotTweakAccountList() @@ -1418,13 +1418,13 @@ void AccountsPage::ReceivingTab::slotTweakAccountList() void AccountsPage::ReceivingTab::save() { // Add accounts marked as new - QValueList< QGuardedPtr >::Iterator it; + TQValueList< TQGuardedPtr >::Iterator it; for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) { kmkernel->acctMgr()->add( *it ); // calls installTimer too } // Update accounts that have been modified - QValueList::Iterator j; + TQValueList::Iterator j; for ( j = mModifiedAccounts.begin() ; j != mModifiedAccounts.end() ; ++j ) { (*j)->oldAccount->pseudoAssign( (*j)->newAccount ); delete (*j)->newAccount; @@ -1471,11 +1471,11 @@ void AccountsPage::ReceivingTab::save() { // * AppearancePage * // * * // ************************************************************* -QString AppearancePage::helpAnchor() const { - return QString::fromLatin1("configure-appearance"); +TQString AppearancePage::helpAnchor() const { + return TQString::fromLatin1("configure-appearance"); } -AppearancePage::AppearancePage( QWidget * parent, const char * name ) +AppearancePage::AppearancePage( TQWidget * parent, const char * name ) : ConfigModuleWithTabs( parent, name ) { // @@ -1518,8 +1518,8 @@ AppearancePage::AppearancePage( QWidget * parent, const char * name ) } -QString AppearancePage::FontsTab::helpAnchor() const { - return QString::fromLatin1("configure-appearance-fonts"); +TQString AppearancePage::FontsTab::helpAnchor() const { + return TQString::fromLatin1("configure-appearance-fonts"); } static const struct { @@ -1545,58 +1545,58 @@ static const struct { }; static const int numFontNames = sizeof fontNames / sizeof *fontNames; -AppearancePageFontsTab::AppearancePageFontsTab( QWidget * parent, const char * name ) +AppearancePageFontsTab::AppearancePageFontsTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ), mActiveFontIndex( -1 ) { assert( numFontNames == sizeof mFont / sizeof *mFont ); // tmp. vars: - QVBoxLayout *vlay; - QHBoxLayout *hlay; - QLabel *label; + TQVBoxLayout *vlay; + TQHBoxLayout *hlay; + TQLabel *label; // "Use custom fonts" checkbox, followed by
    - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - mCustomFontCheck = new QCheckBox( i18n("&Use custom fonts"), this ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + mCustomFontCheck = new TQCheckBox( i18n("&Use custom fonts"), this ); vlay->addWidget( mCustomFontCheck ); vlay->addWidget( new KSeparator( KSeparator::HLine, this ) ); - connect ( mCustomFontCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect ( mCustomFontCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "font location" combo box and label: - hlay = new QHBoxLayout( vlay ); // inherites spacing - mFontLocationCombo = new QComboBox( false, this ); + hlay = new TQHBoxLayout( vlay ); // inherites spacing + mFontLocationCombo = new TQComboBox( false, this ); mFontLocationCombo->setEnabled( false ); // !mCustomFontCheck->isChecked() - QStringList fontDescriptions; + TQStringList fontDescriptions; for ( int i = 0 ; i < numFontNames ; i++ ) fontDescriptions << i18n( fontNames[i].displayName ); mFontLocationCombo->insertStringList( fontDescriptions ); - label = new QLabel( mFontLocationCombo, i18n("Apply &to:"), this ); + label = new TQLabel( mFontLocationCombo, i18n("Apply &to:"), this ); label->setEnabled( false ); // since !mCustomFontCheck->isChecked() hlay->addWidget( label ); hlay->addWidget( mFontLocationCombo ); hlay->addStretch( 10 ); vlay->addSpacing( KDialog::spacingHint() ); - mFontChooser = new KFontChooser( this, "font", false, QStringList(), + mFontChooser = new KFontChooser( this, "font", false, TQStringList(), false, 4 ); mFontChooser->setEnabled( false ); // since !mCustomFontCheck->isChecked() vlay->addWidget( mFontChooser ); - connect ( mFontChooser, SIGNAL( fontSelected( const QFont& ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect ( mFontChooser, TQT_SIGNAL( fontSelected( const TQFont& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // {en,dis}able widgets depending on the state of mCustomFontCheck: - connect( mCustomFontCheck, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); - connect( mCustomFontCheck, SIGNAL(toggled(bool)), - mFontLocationCombo, SLOT(setEnabled(bool)) ); - connect( mCustomFontCheck, SIGNAL(toggled(bool)), - mFontChooser, SLOT(setEnabled(bool)) ); + connect( mCustomFontCheck, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); + connect( mCustomFontCheck, TQT_SIGNAL(toggled(bool)), + mFontLocationCombo, TQT_SLOT(setEnabled(bool)) ); + connect( mCustomFontCheck, TQT_SIGNAL(toggled(bool)), + mFontChooser, TQT_SLOT(setEnabled(bool)) ); // load the right font settings into mFontChooser: - connect( mFontLocationCombo, SIGNAL(activated(int) ), - this, SLOT(slotFontSelectorChanged(int)) ); + connect( mFontLocationCombo, TQT_SIGNAL(activated(int) ), + this, TQT_SLOT(slotFontSelectorChanged(int)) ); } @@ -1623,14 +1623,14 @@ void AppearancePage::FontsTab::slotFontSelectorChanged( int index ) mActiveFontIndex = index; // Disonnect so the "Apply" button is not activated by the change - disconnect ( mFontChooser, SIGNAL( fontSelected( const QFont& ) ), - this, SLOT( slotEmitChanged( void ) ) ); + disconnect ( mFontChooser, TQT_SIGNAL( fontSelected( const TQFont& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // Display the new setting: mFontChooser->setFont( mFont[index], fontNames[index].onlyFixed ); - connect ( mFontChooser, SIGNAL( fontSelected( const QFont& ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect ( mFontChooser, TQT_SIGNAL( fontSelected( const TQFont& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // Disable Family and Size list if we have selected a quote font: mFontChooser->enableColumn( KFontChooser::FamilyList|KFontChooser::SizeList, @@ -1641,7 +1641,7 @@ void AppearancePage::FontsTab::doLoadOther() { KConfigGroup fonts( KMKernel::config(), "Fonts" ); mFont[0] = KGlobalSettings::generalFont(); - QFont fixedFont = KGlobalSettings::fixedFont(); + TQFont fixedFont = KGlobalSettings::fixedFont(); for ( int i = 0 ; i < numFontNames ; i++ ) mFont[i] = fonts.readFontEntry( fontNames[i].configName, (fontNames[i].onlyFixed) ? &fixedFont : &mFont[0] ); @@ -1687,8 +1687,8 @@ void AppearancePage::FontsTab::save() { fonts.writeEntry( fontNames[i].configName, mFont[i] ); } -QString AppearancePage::ColorsTab::helpAnchor() const { - return QString::fromLatin1("configure-appearance-colors"); +TQString AppearancePage::ColorsTab::helpAnchor() const { + return TQString::fromLatin1("configure-appearance-colors"); } @@ -1723,57 +1723,57 @@ static const struct { }; static const int numColorNames = sizeof colorNames / sizeof *colorNames; -AppearancePageColorsTab::AppearancePageColorsTab( QWidget * parent, const char * name ) +AppearancePageColorsTab::AppearancePageColorsTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QVBoxLayout *vlay; + TQVBoxLayout *vlay; // "use custom colors" check box - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - mCustomColorCheck = new QCheckBox( i18n("&Use custom colors"), this ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + mCustomColorCheck = new TQCheckBox( i18n("&Use custom colors"), this ); vlay->addWidget( mCustomColorCheck ); - connect( mCustomColorCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mCustomColorCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // color list box: mColorList = new ColorListBox( this ); mColorList->setEnabled( false ); // since !mCustomColorCheck->isChecked() - QStringList modeList; + TQStringList modeList; for ( int i = 0 ; i < numColorNames ; i++ ) mColorList->insertItem( new ColorListItem( i18n( colorNames[i].displayName ) ) ); vlay->addWidget( mColorList, 1 ); // "recycle colors" check box: mRecycleColorCheck = - new QCheckBox( i18n("Recycle colors on deep "ing"), this ); + new TQCheckBox( i18n("Recycle colors on deep "ing"), this ); mRecycleColorCheck->setEnabled( false ); vlay->addWidget( mRecycleColorCheck ); - connect( mRecycleColorCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mRecycleColorCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // close to quota threshold - QHBoxLayout *hbox = new QHBoxLayout(vlay); - QLabel *l = new QLabel( i18n("Close to quota threshold"), this ); + TQHBoxLayout *hbox = new TQHBoxLayout(vlay); + TQLabel *l = new TQLabel( i18n("Close to quota threshold"), this ); hbox->addWidget( l ); l->setEnabled( false ); - mCloseToQuotaThreshold = new QSpinBox( 0, 100, 1, this ); - connect( mCloseToQuotaThreshold, SIGNAL( valueChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + mCloseToQuotaThreshold = new TQSpinBox( 0, 100, 1, this ); + connect( mCloseToQuotaThreshold, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); mCloseToQuotaThreshold->setSuffix( i18n("%")); hbox->addWidget( mCloseToQuotaThreshold ); - hbox->addWidget( new QWidget(this), 2 ); + hbox->addWidget( new TQWidget(this), 2 ); // {en,dir}able widgets depending on the state of mCustomColorCheck: - connect( mCustomColorCheck, SIGNAL(toggled(bool)), - mColorList, SLOT(setEnabled(bool)) ); - connect( mCustomColorCheck, SIGNAL(toggled(bool)), - mRecycleColorCheck, SLOT(setEnabled(bool)) ); - connect( mCustomColorCheck, SIGNAL(toggled(bool)), - l, SLOT(setEnabled(bool)) ); + connect( mCustomColorCheck, TQT_SIGNAL(toggled(bool)), + mColorList, TQT_SLOT(setEnabled(bool)) ); + connect( mCustomColorCheck, TQT_SIGNAL(toggled(bool)), + mRecycleColorCheck, TQT_SLOT(setEnabled(bool)) ); + connect( mCustomColorCheck, TQT_SIGNAL(toggled(bool)), + l, TQT_SLOT(setEnabled(bool)) ); - connect( mCustomColorCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mCustomColorCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); } void AppearancePage::ColorsTab::doLoadOther() { @@ -1783,26 +1783,26 @@ void AppearancePage::ColorsTab::doLoadOther() { mRecycleColorCheck->setChecked( reader.readBoolEntry( "RecycleQuoteColors", false ) ); mCloseToQuotaThreshold->setValue( GlobalSettings::closeToQuotaThreshold() ); - static const QColor defaultColor[ numColorNames ] = { + static const TQColor defaultColor[ numColorNames ] = { kapp->palette().active().base(), // bg KGlobalSettings::alternateBackgroundColor(), // alt bg kapp->palette().active().text(), // fg - QColor( 0x00, 0x80, 0x00 ), // quoted l1 - QColor( 0x00, 0x70, 0x00 ), // quoted l2 - QColor( 0x00, 0x60, 0x00 ), // quoted l3 + TQColor( 0x00, 0x80, 0x00 ), // quoted l1 + TQColor( 0x00, 0x70, 0x00 ), // quoted l2 + TQColor( 0x00, 0x60, 0x00 ), // quoted l3 KGlobalSettings::linkColor(), // link KGlobalSettings::visitedLinkColor(), // visited link Qt::red, // misspelled words Qt::red, // new msg Qt::blue, // unread mgs - QColor( 0x00, 0x7F, 0x00 ), // important msg + TQColor( 0x00, 0x7F, 0x00 ), // important msg Qt::blue, // todo mgs - QColor( 0x00, 0x80, 0xFF ), // light blue // pgp encrypted - QColor( 0x40, 0xFF, 0x40 ), // light green // pgp ok, trusted key - QColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp ok, untrusted key - QColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp unchk + TQColor( 0x00, 0x80, 0xFF ), // light blue // pgp encrypted + TQColor( 0x40, 0xFF, 0x40 ), // light green // pgp ok, trusted key + TQColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp ok, untrusted key + TQColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp unchk Qt::red, // pgp bad - QColor( 0xFF, 0x40, 0x40 ), // warning text color: light red + TQColor( 0xFF, 0x40, 0x40 ), // warning text color: light red Qt::red, // close to quota Qt::lightGray, // colorbar plain bg Qt::black, // colorbar plain fg @@ -1814,8 +1814,8 @@ void AppearancePage::ColorsTab::doLoadOther() { mColorList->setColor( i, reader.readColorEntry( colorNames[i].configName, &defaultColor[i] ) ); } - connect( mColorList, SIGNAL( changed( ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mColorList, TQT_SIGNAL( changed( ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); } void AppearancePage::ColorsTab::installProfile( KConfig * profile ) { @@ -1847,8 +1847,8 @@ void AppearancePage::ColorsTab::save() { GlobalSettings::setCloseToQuotaThreshold( mCloseToQuotaThreshold->value() ); } -QString AppearancePage::LayoutTab::helpAnchor() const { - return QString::fromLatin1("configure-appearance-layout"); +TQString AppearancePage::LayoutTab::helpAnchor() const { + return TQString::fromLatin1("configure-appearance-layout"); } static const EnumConfigEntryItem folderListModes[] = { @@ -1891,45 +1891,45 @@ static const EnumConfigEntry readerWindowMode = { readerWindowModes, DIM(readerWindowModes), 1 }; -AppearancePageLayoutTab::AppearancePageLayoutTab( QWidget * parent, const char * name ) +AppearancePageLayoutTab::AppearancePageLayoutTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QVBoxLayout * vlay; + TQVBoxLayout * vlay; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // "folder list" radio buttons: - populateButtonGroup( mFolderListGroup = new QHButtonGroup( this ), folderListMode ); + populateButtonGroup( mFolderListGroup = new TQHButtonGroup( this ), folderListMode ); vlay->addWidget( mFolderListGroup ); - connect( mFolderListGroup, SIGNAL ( clicked( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mFolderListGroup, TQT_SIGNAL ( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); - mFavoriteFolderViewCB = new QCheckBox( i18n("Show favorite folder view"), this ); - connect( mFavoriteFolderViewCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); + mFavoriteFolderViewCB = new TQCheckBox( i18n("Show favorite folder view"), this ); + connect( mFavoriteFolderViewCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); vlay->addWidget( mFavoriteFolderViewCB ); - mFolderQuickSearchCB = new QCheckBox( i18n("Show folder quick search field"), this ); - connect( mFolderQuickSearchCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); + mFolderQuickSearchCB = new TQCheckBox( i18n("Show folder quick search field"), this ); + connect( mFolderQuickSearchCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); vlay->addWidget( mFolderQuickSearchCB ); // "show reader window" radio buttons: - populateButtonGroup( mReaderWindowModeGroup = new QVButtonGroup( this ), readerWindowMode ); + populateButtonGroup( mReaderWindowModeGroup = new TQVButtonGroup( this ), readerWindowMode ); vlay->addWidget( mReaderWindowModeGroup ); - connect( mReaderWindowModeGroup, SIGNAL ( clicked( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mReaderWindowModeGroup, TQT_SIGNAL ( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // "Show MIME Tree" radio buttons: - populateButtonGroup( mMIMETreeModeGroup = new QVButtonGroup( this ), mimeTreeMode ); + populateButtonGroup( mMIMETreeModeGroup = new TQVButtonGroup( this ), mimeTreeMode ); vlay->addWidget( mMIMETreeModeGroup ); - connect( mMIMETreeModeGroup, SIGNAL ( clicked( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mMIMETreeModeGroup, TQT_SIGNAL ( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // "MIME Tree Location" radio buttons: - populateButtonGroup( mMIMETreeLocationGroup = new QHButtonGroup( this ), mimeTreeLocation ); + populateButtonGroup( mMIMETreeLocationGroup = new TQHButtonGroup( this ), mimeTreeLocation ); vlay->addWidget( mMIMETreeLocationGroup ); - connect( mMIMETreeLocationGroup, SIGNAL ( clicked( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mMIMETreeLocationGroup, TQT_SIGNAL ( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); vlay->addStretch( 10 ); // spacer } @@ -1972,8 +1972,8 @@ void AppearancePage::LayoutTab::save() { // Appearance Message List // -QString AppearancePage::HeadersTab::helpAnchor() const { - return QString::fromLatin1("configure-appearance-headers"); +TQString AppearancePage::HeadersTab::helpAnchor() const { + return TQString::fromLatin1("configure-appearance-headers"); } static const struct { @@ -1989,87 +1989,87 @@ static const struct { static const int numDateDisplayConfig = sizeof dateDisplayConfig / sizeof *dateDisplayConfig; -AppearancePageHeadersTab::AppearancePageHeadersTab( QWidget * parent, const char * name ) +AppearancePageHeadersTab::AppearancePageHeadersTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ), mCustomDateFormatEdit( 0 ) { // tmp. vars: - QButtonGroup * group; - QRadioButton * radio; + TQButtonGroup * group; + TQRadioButton * radio; - QVBoxLayout * vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQVBoxLayout * vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // "General Options" group: - group = new QVButtonGroup( i18n( "General Options" ), this ); + group = new TQVButtonGroup( i18n( "General Options" ), this ); group->layout()->setSpacing( KDialog::spacingHint() ); - mShowQuickSearch = new QCheckBox( i18n("Show Quick Search"), group ); + mShowQuickSearch = new TQCheckBox( i18n("Show Quick Search"), group ); - mMessageSizeCheck = new QCheckBox( i18n("Display messa&ge sizes"), group ); + mMessageSizeCheck = new TQCheckBox( i18n("Display messa&ge sizes"), group ); - mCryptoIconsCheck = new QCheckBox( i18n( "Show crypto &icons" ), group ); + mCryptoIconsCheck = new TQCheckBox( i18n( "Show crypto &icons" ), group ); - mAttachmentCheck = new QCheckBox( i18n("Show attachment icon"), group ); + mAttachmentCheck = new TQCheckBox( i18n("Show attachment icon"), group ); mNestedMessagesCheck = - new QCheckBox( i18n("&Threaded message list"), group ); + new TQCheckBox( i18n("&Threaded message list"), group ); - connect( mShowQuickSearch, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mMessageSizeCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mAttachmentCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mCryptoIconsCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mNestedMessagesCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mShowQuickSearch, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mMessageSizeCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mAttachmentCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mCryptoIconsCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mNestedMessagesCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( group ); // "Message Header Threading Options" group: mNestingPolicy = - new QVButtonGroup( i18n("Threaded Message List Options"), this ); + new TQVButtonGroup( i18n("Threaded Message List Options"), this ); mNestingPolicy->layout()->setSpacing( KDialog::spacingHint() ); mNestingPolicy->insert( - new QRadioButton( i18n("Always &keep threads open"), + new TQRadioButton( i18n("Always &keep threads open"), mNestingPolicy ), 0 ); mNestingPolicy->insert( - new QRadioButton( i18n("Threads default to o&pen"), + new TQRadioButton( i18n("Threads default to o&pen"), mNestingPolicy ), 1 ); mNestingPolicy->insert( - new QRadioButton( i18n("Threads default to closed"), + new TQRadioButton( i18n("Threads default to closed"), mNestingPolicy ), 2 ); mNestingPolicy->insert( - new QRadioButton( i18n("Open threads that contain ne&w, unread " + new TQRadioButton( i18n("Open threads that contain ne&w, unread " "or important messages and open watched threads."), mNestingPolicy ), 3 ); vlay->addWidget( mNestingPolicy ); - connect( mNestingPolicy, SIGNAL( clicked( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mNestingPolicy, TQT_SIGNAL( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "Date Display" group: - mDateDisplay = new QVButtonGroup( i18n("Date Display"), this ); + mDateDisplay = new TQVButtonGroup( i18n("Date Display"), this ); mDateDisplay->layout()->setSpacing( KDialog::spacingHint() ); for ( int i = 0 ; i < numDateDisplayConfig ; i++ ) { - QString buttonLabel = i18n(dateDisplayConfig[i].displayName); + TQString buttonLabel = i18n(dateDisplayConfig[i].displayName); if ( buttonLabel.contains("%1") ) buttonLabel = buttonLabel.arg( DateFormatter::formatCurrentDate( dateDisplayConfig[i].dateDisplay ) ); - radio = new QRadioButton( buttonLabel, mDateDisplay ); + radio = new TQRadioButton( buttonLabel, mDateDisplay ); mDateDisplay->insert( radio, i ); if ( dateDisplayConfig[i].dateDisplay == DateFormatter::Custom ) { mCustomDateFormatEdit = new KLineEdit( mDateDisplay ); mCustomDateFormatEdit->setEnabled( false ); - connect( radio, SIGNAL(toggled(bool)), - mCustomDateFormatEdit, SLOT(setEnabled(bool)) ); - connect( mCustomDateFormatEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotEmitChanged(void)) ); - QString customDateWhatsThis = + connect( radio, TQT_SIGNAL(toggled(bool)), + mCustomDateFormatEdit, TQT_SLOT(setEnabled(bool)) ); + connect( mCustomDateFormatEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotEmitChanged(void)) ); + TQString customDateWhatsThis = i18n("

    These expressions may be used for the date:" "

    " "
      " @@ -2101,14 +2101,14 @@ AppearancePageHeadersTab::AppearancePageHeadersTab( QWidget * parent, const char "
    " "

    All other input characters will be ignored." "

    "); - QWhatsThis::add( mCustomDateFormatEdit, customDateWhatsThis ); - QWhatsThis::add( radio, customDateWhatsThis ); + TQWhatsThis::add( mCustomDateFormatEdit, customDateWhatsThis ); + TQWhatsThis::add( radio, customDateWhatsThis ); } } // end for loop populating mDateDisplay vlay->addWidget( mDateDisplay ); - connect( mDateDisplay, SIGNAL( clicked( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mDateDisplay, TQT_SIGNAL( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addStretch( 10 ); // spacer @@ -2135,7 +2135,7 @@ void AppearancePage::HeadersTab::doLoadOther() { general.readEntry( "customDateFormat" ) ); } -void AppearancePage::HeadersTab::setDateDisplay( int num, const QString & format ) { +void AppearancePage::HeadersTab::setDateDisplay( int num, const TQString & format ) { DateFormatter::FormatType dateDisplay = static_cast( num ); @@ -2186,13 +2186,13 @@ void AppearancePage::HeadersTab::save() { int result = KMessageBox::warningContinueCancel( this, i18n("Changing the global threading setting will override " "all folder specific values."), - QString::null, KStdGuiItem::cont(), "threadOverride" ); + TQString::null, KStdGuiItem::cont(), "threadOverride" ); if ( result == KMessageBox::Continue ) { geometry.writeEntry( "nestedMessages", mNestedMessagesCheck->isChecked() ); // remove all threadMessagesOverride keys from all [Folder-*] groups: - QStringList groups = KMKernel::config()->groupList().grep( QRegExp("^Folder-") ); + TQStringList groups = KMKernel::config()->groupList().grep( TQRegExp("^Folder-") ); kdDebug(5006) << "groups.count() == " << groups.count() << endl; - for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) { + for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) { KConfigGroup group( KMKernel::config(), *it ); group.deleteEntry( "threadMessagesOverride" ); } @@ -2241,99 +2241,99 @@ static const BoolConfigEntry showExpandQuotesMark= { }; -QString AppearancePage::ReaderTab::helpAnchor() const { - return QString::fromLatin1("configure-appearance-reader"); +TQString AppearancePage::ReaderTab::helpAnchor() const { + return TQString::fromLatin1("configure-appearance-reader"); } -AppearancePageReaderTab::AppearancePageReaderTab( QWidget * parent, +AppearancePageReaderTab::AppearancePageReaderTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { - QVBoxLayout *vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // "show colorbar" check box: - populateCheckBox( mShowColorbarCheck = new QCheckBox( this ), showColorbarMode ); + populateCheckBox( mShowColorbarCheck = new TQCheckBox( this ), showColorbarMode ); vlay->addWidget( mShowColorbarCheck ); - connect( mShowColorbarCheck, SIGNAL ( stateChanged( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mShowColorbarCheck, TQT_SIGNAL ( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // "show spam status" check box; - populateCheckBox( mShowSpamStatusCheck = new QCheckBox( this ), showSpamStatusMode ); + populateCheckBox( mShowSpamStatusCheck = new TQCheckBox( this ), showSpamStatusMode ); vlay->addWidget( mShowSpamStatusCheck ); - connect( mShowSpamStatusCheck, SIGNAL ( stateChanged( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mShowSpamStatusCheck, TQT_SIGNAL ( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // "replace smileys by emoticons" check box; - populateCheckBox( mShowEmoticonsCheck = new QCheckBox( this ), showEmoticons ); + populateCheckBox( mShowEmoticonsCheck = new TQCheckBox( this ), showEmoticons ); vlay->addWidget( mShowEmoticonsCheck ); - connect( mShowEmoticonsCheck, SIGNAL ( stateChanged( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mShowEmoticonsCheck, TQT_SIGNAL ( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // "Use smaller font for quoted text" check box - mShrinkQuotesCheck = new QCheckBox( i18n( shrinkQuotes.desc ), this, + mShrinkQuotesCheck = new TQCheckBox( i18n( shrinkQuotes.desc ), this, "kcfg_ShrinkQuotes" ); vlay->addWidget( mShrinkQuotesCheck ); - connect( mShrinkQuotesCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mShrinkQuotesCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // "Show expand/collaps quote marks" check box; - QHBoxLayout *hlay= new QHBoxLayout( vlay ); // inherits spacing - populateCheckBox( mShowExpandQuotesMark= new QCheckBox( this ), showExpandQuotesMark); + TQHBoxLayout *hlay= new TQHBoxLayout( vlay ); // inherits spacing + populateCheckBox( mShowExpandQuotesMark= new TQCheckBox( this ), showExpandQuotesMark); hlay->addWidget( mShowExpandQuotesMark); - connect( mShowExpandQuotesMark, SIGNAL ( stateChanged( int ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mShowExpandQuotesMark, TQT_SIGNAL ( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); hlay->addStretch( 1 ); mCollapseQuoteLevelSpin = new KIntSpinBox( 0/*min*/,10/*max*/,1/*step*/, 3/*init*/,10/*base*/,this ); - QLabel *label = new QLabel( mCollapseQuoteLevelSpin, + TQLabel *label = new TQLabel( mCollapseQuoteLevelSpin, GlobalSettings::self()->collapseQuoteLevelSpinItem()->label(), this ); hlay->addWidget( label ); mCollapseQuoteLevelSpin->setEnabled( false ); //since !mShowExpandQuotesMark->isCheckec() - connect( mCollapseQuoteLevelSpin, SIGNAL( valueChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mCollapseQuoteLevelSpin, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); hlay->addWidget( mCollapseQuoteLevelSpin); - connect( mShowExpandQuotesMark, SIGNAL( toggled( bool ) ), - mCollapseQuoteLevelSpin, SLOT( setEnabled( bool ) ) ); + connect( mShowExpandQuotesMark, TQT_SIGNAL( toggled( bool ) ), + mCollapseQuoteLevelSpin, TQT_SLOT( setEnabled( bool ) ) ); // Fallback Character Encoding - hlay = new QHBoxLayout( vlay ); // inherits spacing - mCharsetCombo = new QComboBox( this ); + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mCharsetCombo = new TQComboBox( this ); mCharsetCombo->insertStringList( KMMsgBase::supportedEncodings( false ) ); - connect( mCharsetCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mCharsetCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - QString fallbackCharsetWhatsThis = + TQString fallbackCharsetWhatsThis = i18n( GlobalSettings::self()->fallbackCharacterEncodingItem()->whatsThis().utf8() ); - QWhatsThis::add( mCharsetCombo, fallbackCharsetWhatsThis ); + TQWhatsThis::add( mCharsetCombo, fallbackCharsetWhatsThis ); - label = new QLabel( i18n("Fallback ch&aracter encoding:"), this ); + label = new TQLabel( i18n("Fallback ch&aracter encoding:"), this ); label->setBuddy( mCharsetCombo ); hlay->addWidget( label ); hlay->addWidget( mCharsetCombo ); // Override Character Encoding - QHBoxLayout *hlay2 = new QHBoxLayout( vlay ); // inherits spacing - mOverrideCharsetCombo = new QComboBox( this ); - QStringList encodings = KMMsgBase::supportedEncodings( false ); + TQHBoxLayout *hlay2 = new TQHBoxLayout( vlay ); // inherits spacing + mOverrideCharsetCombo = new TQComboBox( this ); + TQStringList encodings = KMMsgBase::supportedEncodings( false ); encodings.prepend( i18n( "Auto" ) ); mOverrideCharsetCombo->insertStringList( encodings ); mOverrideCharsetCombo->setCurrentItem(0); - connect( mOverrideCharsetCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mOverrideCharsetCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - QString overrideCharsetWhatsThis = + TQString overrideCharsetWhatsThis = i18n( GlobalSettings::self()->overrideCharacterEncodingItem()->whatsThis().utf8() ); - QWhatsThis::add( mOverrideCharsetCombo, overrideCharsetWhatsThis ); + TQWhatsThis::add( mOverrideCharsetCombo, overrideCharsetWhatsThis ); - label = new QLabel( i18n("&Override character encoding:"), this ); + label = new TQLabel( i18n("&Override character encoding:"), this ); label->setBuddy( mOverrideCharsetCombo ); hlay2->addWidget( label ); @@ -2345,10 +2345,10 @@ AppearancePageReaderTab::AppearancePageReaderTab( QWidget * parent, void AppearancePage::ReaderTab::readCurrentFallbackCodec() { - QStringList encodings = KMMsgBase::supportedEncodings( false ); - QStringList::ConstIterator it( encodings.begin() ); - QStringList::ConstIterator end( encodings.end() ); - QString currentEncoding = GlobalSettings::self()->fallbackCharacterEncoding(); + TQStringList encodings = KMMsgBase::supportedEncodings( false ); + TQStringList::ConstIterator it( encodings.begin() ); + TQStringList::ConstIterator end( encodings.end() ); + TQString currentEncoding = GlobalSettings::self()->fallbackCharacterEncoding(); currentEncoding = currentEncoding.replace( "iso ", "iso-", false ); ///kdDebug(5006) << "Looking for encoding: " << currentEncoding << endl; int i = 0; @@ -2356,7 +2356,7 @@ void AppearancePage::ReaderTab::readCurrentFallbackCodec() bool found = false; for( ; it != end; ++it) { - const QString encoding = KGlobal::charsets()->encodingForName(*it); + const TQString encoding = KGlobal::charsets()->encodingForName(*it); if ( encoding == "iso-8859-15" ) indexOfLatin9 = i; if( encoding == currentEncoding ) @@ -2373,15 +2373,15 @@ void AppearancePage::ReaderTab::readCurrentFallbackCodec() void AppearancePage::ReaderTab::readCurrentOverrideCodec() { - const QString ¤tOverrideEncoding = GlobalSettings::self()->overrideCharacterEncoding(); + const TQString ¤tOverrideEncoding = GlobalSettings::self()->overrideCharacterEncoding(); if ( currentOverrideEncoding.isEmpty() ) { mOverrideCharsetCombo->setCurrentItem( 0 ); return; } - QStringList encodings = KMMsgBase::supportedEncodings( false ); + TQStringList encodings = KMMsgBase::supportedEncodings( false ); encodings.prepend( i18n( "Auto" ) ); - QStringList::Iterator it( encodings.begin() ); - QStringList::Iterator end( encodings.end() ); + TQStringList::Iterator it( encodings.begin() ); + TQStringList::Iterator end( encodings.end() ); uint i = 0; for( ; it != end; ++it) { @@ -2397,7 +2397,7 @@ void AppearancePage::ReaderTab::readCurrentOverrideCodec() kdWarning(5006) << "Unknown override character encoding \"" << currentOverrideEncoding << "\". Resetting to Auto." << endl; mOverrideCharsetCombo->setCurrentItem( 0 ); - GlobalSettings::self()->setOverrideCharacterEncoding( QString::null ); + GlobalSettings::self()->setOverrideCharacterEncoding( TQString::null ); } } @@ -2432,7 +2432,7 @@ void AppearancePage::ReaderTab::save() { KGlobal::charsets()->encodingForName( mCharsetCombo->currentText() ) ); GlobalSettings::self()->setOverrideCharacterEncoding( mOverrideCharsetCombo->currentItem() == 0 ? - QString() : + TQString() : KGlobal::charsets()->encodingForName( mOverrideCharsetCombo->currentText() ) ); } @@ -2447,36 +2447,36 @@ void AppearancePage::ReaderTab::installProfile( KConfig * /* profile */ ) { } -QString AppearancePage::SystemTrayTab::helpAnchor() const { - return QString::fromLatin1("configure-appearance-systemtray"); +TQString AppearancePage::SystemTrayTab::helpAnchor() const { + return TQString::fromLatin1("configure-appearance-systemtray"); } -AppearancePageSystemTrayTab::AppearancePageSystemTrayTab( QWidget * parent, +AppearancePageSystemTrayTab::AppearancePageSystemTrayTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { - QVBoxLayout * vlay = new QVBoxLayout( this, KDialog::marginHint(), + TQVBoxLayout * vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // "Enable system tray applet" check box - mSystemTrayCheck = new QCheckBox( i18n("Enable system tray icon"), this ); + mSystemTrayCheck = new TQCheckBox( i18n("Enable system tray icon"), this ); vlay->addWidget( mSystemTrayCheck ); - connect( mSystemTrayCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mSystemTrayCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // System tray modes - mSystemTrayGroup = new QVButtonGroup( i18n("System Tray Mode"), this ); + mSystemTrayGroup = new TQVButtonGroup( i18n("System Tray Mode"), this ); mSystemTrayGroup->layout()->setSpacing( KDialog::spacingHint() ); vlay->addWidget( mSystemTrayGroup ); - connect( mSystemTrayGroup, SIGNAL( clicked( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mSystemTrayCheck, SIGNAL( toggled( bool ) ), - mSystemTrayGroup, SLOT( setEnabled( bool ) ) ); + connect( mSystemTrayGroup, TQT_SIGNAL( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mSystemTrayCheck, TQT_SIGNAL( toggled( bool ) ), + mSystemTrayGroup, TQT_SLOT( setEnabled( bool ) ) ); - mSystemTrayGroup->insert( new QRadioButton( i18n("Always show KMail in system tray"), mSystemTrayGroup ), + mSystemTrayGroup->insert( new TQRadioButton( i18n("Always show KMail in system tray"), mSystemTrayGroup ), GlobalSettings::EnumSystemTrayPolicy::ShowAlways ); - mSystemTrayGroup->insert( new QRadioButton( i18n("Only show KMail in system tray if there are unread messages"), mSystemTrayGroup ), + mSystemTrayGroup->insert( new TQRadioButton( i18n("Only show KMail in system tray if there are unread messages"), mSystemTrayGroup ), GlobalSettings::EnumSystemTrayPolicy::ShowOnUnread ); vlay->addStretch( 10 ); // spacer @@ -2512,11 +2512,11 @@ void AppearancePage::SystemTrayTab::save() { // * * // ************************************************************* -QString ComposerPage::helpAnchor() const { - return QString::fromLatin1("configure-composer"); +TQString ComposerPage::helpAnchor() const { + return TQString::fromLatin1("configure-composer"); } -ComposerPage::ComposerPage( QWidget * parent, const char * name ) +ComposerPage::ComposerPage( TQWidget * parent, const char * name ) : ConfigModuleWithTabs( parent, name ) { // @@ -2571,125 +2571,125 @@ ComposerPage::ComposerPage( QWidget * parent, const char * name ) load(); } -QString ComposerPage::GeneralTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-general"); +TQString ComposerPage::GeneralTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-general"); } -ComposerPageGeneralTab::ComposerPageGeneralTab( QWidget * parent, const char * name ) +ComposerPageGeneralTab::ComposerPageGeneralTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QVBoxLayout *vlay; - QHBoxLayout *hlay; - QGroupBox *group; - QLabel *label; - QHBox *hbox; - QString msg; + TQVBoxLayout *vlay; + TQHBoxLayout *hlay; + TQGroupBox *group; + TQLabel *label; + TQHBox *hbox; + TQString msg; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // some check buttons... - mAutoAppSignFileCheck = new QCheckBox( + mAutoAppSignFileCheck = new TQCheckBox( GlobalSettings::self()->autoTextSignatureItem()->label(), this ); vlay->addWidget( mAutoAppSignFileCheck ); - connect( mAutoAppSignFileCheck, SIGNAL( stateChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mAutoAppSignFileCheck, TQT_SIGNAL( stateChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); mTopQuoteCheck = - new QCheckBox( GlobalSettings::self()->prependSignatureItem()->label(), this ); + new TQCheckBox( GlobalSettings::self()->prependSignatureItem()->label(), this ); vlay->addWidget( mTopQuoteCheck); - connect( mTopQuoteCheck, SIGNAL( stateChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mTopQuoteCheck, TQT_SIGNAL( stateChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - mSmartQuoteCheck = new QCheckBox( + mSmartQuoteCheck = new TQCheckBox( GlobalSettings::self()->smartQuoteItem()->label(), this, "kcfg_SmartQuote" ); vlay->addWidget( mSmartQuoteCheck ); - connect( mSmartQuoteCheck, SIGNAL( stateChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mSmartQuoteCheck, TQT_SIGNAL( stateChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - mAutoRequestMDNCheck = new QCheckBox( + mAutoRequestMDNCheck = new TQCheckBox( GlobalSettings::self()->requestMDNItem()->label(), this, "kcfg_RequestMDN" ); vlay->addWidget( mAutoRequestMDNCheck ); - connect( mAutoRequestMDNCheck, SIGNAL( stateChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mAutoRequestMDNCheck, TQT_SIGNAL( stateChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - mShowRecentAddressesInComposer = new QCheckBox( + mShowRecentAddressesInComposer = new TQCheckBox( GlobalSettings::self()->showRecentAddressesInComposerItem()->label(), this, "kcfg_ShowRecentAddressesInComposer" ); vlay->addWidget( mShowRecentAddressesInComposer ); - connect( mShowRecentAddressesInComposer, SIGNAL( stateChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mShowRecentAddressesInComposer, TQT_SIGNAL( stateChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // a checkbox for "word wrap" and a spinbox for the column in // which to wrap: - hlay = new QHBoxLayout( vlay ); // inherits spacing - mWordWrapCheck = new QCheckBox( + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mWordWrapCheck = new TQCheckBox( GlobalSettings::self()->wordWrapItem()->label(), this, "kcfg_WordWrap" ); hlay->addWidget( mWordWrapCheck ); - connect( mWordWrapCheck, SIGNAL( stateChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mWordWrapCheck, TQT_SIGNAL( stateChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); mWrapColumnSpin = new KIntSpinBox( 30/*min*/, 78/*max*/, 1/*step*/, 78/*init*/, 10 /*base*/, this, "kcfg_LineWrapWidth" ); mWrapColumnSpin->setEnabled( false ); // since !mWordWrapCheck->isChecked() - connect( mWrapColumnSpin, SIGNAL( valueChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mWrapColumnSpin, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); hlay->addWidget( mWrapColumnSpin ); hlay->addStretch( 1 ); // only enable the spinbox if the checkbox is checked: - connect( mWordWrapCheck, SIGNAL(toggled(bool)), - mWrapColumnSpin, SLOT(setEnabled(bool)) ); + connect( mWordWrapCheck, TQT_SIGNAL(toggled(bool)), + mWrapColumnSpin, TQT_SLOT(setEnabled(bool)) ); - hlay = new QHBoxLayout( vlay ); // inherits spacing + hlay = new TQHBoxLayout( vlay ); // inherits spacing mAutoSave = new KIntSpinBox( 0, 60, 1, 1, 10, this, "kcfg_AutosaveInterval" ); - label = new QLabel( mAutoSave, + label = new TQLabel( mAutoSave, GlobalSettings::self()->autosaveIntervalItem()->label(), this ); hlay->addWidget( label ); hlay->addWidget( mAutoSave ); mAutoSave->setSpecialValueText( i18n("No autosave") ); mAutoSave->setSuffix( i18n(" min") ); hlay->addStretch( 1 ); - connect( mAutoSave, SIGNAL( valueChanged(int) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mAutoSave, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - hlay = new QHBoxLayout( vlay ); // inherits spacing - QPushButton *completionOrderBtn = new QPushButton( i18n( "Configure Completion Order" ), this ); - connect( completionOrderBtn, SIGNAL( clicked() ), - this, SLOT( slotConfigureCompletionOrder() ) ); + hlay = new TQHBoxLayout( vlay ); // inherits spacing + TQPushButton *completionOrderBtn = new TQPushButton( i18n( "Configure Completion Order" ), this ); + connect( completionOrderBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotConfigureCompletionOrder() ) ); hlay->addWidget( completionOrderBtn ); - hlay->addItem( new QSpacerItem(0, 0) ); + hlay->addItem( new TQSpacerItem(0, 0) ); // recent addresses - hlay = new QHBoxLayout( vlay ); // inherits spacing - QPushButton *recentAddressesBtn = new QPushButton( i18n( "Edit Recent Addresses..." ), this ); - connect( recentAddressesBtn, SIGNAL( clicked() ), - this, SLOT( slotConfigureRecentAddresses() ) ); + hlay = new TQHBoxLayout( vlay ); // inherits spacing + TQPushButton *recentAddressesBtn = new TQPushButton( i18n( "Edit Recent Addresses..." ), this ); + connect( recentAddressesBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotConfigureRecentAddresses() ) ); hlay->addWidget( recentAddressesBtn ); - hlay->addItem( new QSpacerItem(0, 0) ); + hlay->addItem( new TQSpacerItem(0, 0) ); // The "external editor" group: - group = new QVGroupBox( i18n("External Editor"), this ); + group = new TQVGroupBox( i18n("External Editor"), this ); group->layout()->setSpacing( KDialog::spacingHint() ); - mExternalEditorCheck = new QCheckBox( + mExternalEditorCheck = new TQCheckBox( GlobalSettings::self()->useExternalEditorItem()->label(), group, "kcfg_UseExternalEditor" ); - connect( mExternalEditorCheck, SIGNAL( toggled( bool ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mExternalEditorCheck, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - hbox = new QHBox( group ); - label = new QLabel( GlobalSettings::self()->externalEditorItem()->label(), + hbox = new TQHBox( group ); + label = new TQLabel( GlobalSettings::self()->externalEditorItem()->label(), hbox ); mEditorRequester = new KURLRequester( hbox, "kcfg_ExternalEditor" ); - connect( mEditorRequester, SIGNAL( urlSelected(const QString&) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mEditorRequester, SIGNAL( textChanged(const QString&) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mEditorRequester, TQT_SIGNAL( urlSelected(const TQString&) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mEditorRequester, TQT_SIGNAL( textChanged(const TQString&) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); hbox->setStretchFactor( mEditorRequester, 1 ); label->setBuddy( mEditorRequester ); @@ -2699,16 +2699,16 @@ ComposerPageGeneralTab::ComposerPageGeneralTab( QWidget * parent, const char * n "application/x-shellscript " "application/x-desktop" ); mEditorRequester->setEnabled( false ); // !mExternalEditorCheck->isChecked() - connect( mExternalEditorCheck, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); - connect( mExternalEditorCheck, SIGNAL(toggled(bool)), - mEditorRequester, SLOT(setEnabled(bool)) ); + connect( mExternalEditorCheck, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); + connect( mExternalEditorCheck, TQT_SIGNAL(toggled(bool)), + mEditorRequester, TQT_SLOT(setEnabled(bool)) ); - label = new QLabel( i18n("%f will be replaced with the " + label = new TQLabel( i18n("%f will be replaced with the " "filename to edit."), group ); label->setEnabled( false ); // see above - connect( mExternalEditorCheck, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); + connect( mExternalEditorCheck, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); vlay->addWidget( group ); vlay->addStretch( 100 ); @@ -2782,8 +2782,8 @@ void ComposerPage::GeneralTab::slotConfigureRecentAddresses( ) dlg.setAddresses( RecentAddresses::self( KMKernel::config() )->addresses() ); if ( dlg.exec() ) { RecentAddresses::self( KMKernel::config() )->clear(); - const QStringList &addrList = dlg.addresses(); - QStringList::ConstIterator it; + const TQStringList &addrList = dlg.addresses(); + TQStringList::ConstIterator it; for ( it = addrList.constBegin(); it != addrList.constEnd(); ++it ) RecentAddresses::self( KMKernel::config() )->add( *it ); } @@ -2796,25 +2796,25 @@ void ComposerPage::GeneralTab::slotConfigureCompletionOrder( ) editor.exec(); } -QString ComposerPage::PhrasesTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-phrases"); +TQString ComposerPage::PhrasesTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-phrases"); } -ComposerPagePhrasesTab::ComposerPagePhrasesTab( QWidget * parent, const char * name ) +ComposerPagePhrasesTab::ComposerPagePhrasesTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QGridLayout *glay; - QPushButton *button; + TQGridLayout *glay; + TQPushButton *button; - glay = new QGridLayout( this, 7, 3, KDialog::spacingHint() ); + glay = new TQGridLayout( this, 7, 3, KDialog::spacingHint() ); glay->setMargin( KDialog::marginHint() ); glay->setColStretch( 1, 1 ); glay->setColStretch( 2, 1 ); glay->setRowStretch( 7, 1 ); // row 0: help text - glay->addMultiCellWidget( new QLabel( i18n("The following placeholders are " + glay->addMultiCellWidget( new TQLabel( i18n("The following placeholders are " "supported in the reply phrases:
    " "%D: date, %S: subject,
    " "%e: sender's address, %F: sender's name, %f: sender's initials,
    " @@ -2826,54 +2826,54 @@ ComposerPagePhrasesTab::ComposerPagePhrasesTab( QWidget * parent, const char * n // row 1: label and language combo box: mPhraseLanguageCombo = new LanguageComboBox( false, this ); - glay->addWidget( new QLabel( mPhraseLanguageCombo, + glay->addWidget( new TQLabel( mPhraseLanguageCombo, i18n("Lang&uage:"), this ), 1, 0 ); glay->addMultiCellWidget( mPhraseLanguageCombo, 1, 1, 1, 2 ); - connect( mPhraseLanguageCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotLanguageChanged(const QString&)) ); + connect( mPhraseLanguageCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotLanguageChanged(const TQString&)) ); // row 2: "add..." and "remove" push buttons: - button = new QPushButton( i18n("A&dd..."), this ); + button = new TQPushButton( i18n("A&dd..."), this ); button->setAutoDefault( false ); glay->addWidget( button, 2, 1 ); - mRemoveButton = new QPushButton( i18n("Re&move"), this ); + mRemoveButton = new TQPushButton( i18n("Re&move"), this ); mRemoveButton->setAutoDefault( false ); mRemoveButton->setEnabled( false ); // combo doesn't contain anything... glay->addWidget( mRemoveButton, 2, 2 ); - connect( button, SIGNAL(clicked()), - this, SLOT(slotNewLanguage()) ); - connect( mRemoveButton, SIGNAL(clicked()), - this, SLOT(slotRemoveLanguage()) ); + connect( button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNewLanguage()) ); + connect( mRemoveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveLanguage()) ); // row 3: "reply to sender" line edit and label: mPhraseReplyEdit = new KLineEdit( this ); - connect( mPhraseReplyEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( slotEmitChanged( void ) ) ); - glay->addWidget( new QLabel( mPhraseReplyEdit, + connect( mPhraseReplyEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + glay->addWidget( new TQLabel( mPhraseReplyEdit, i18n("Reply to se&nder:"), this ), 3, 0 ); glay->addMultiCellWidget( mPhraseReplyEdit, 3, 3, 1, 2 ); // cols 1..2 // row 4: "reply to all" line edit and label: mPhraseReplyAllEdit = new KLineEdit( this ); - connect( mPhraseReplyAllEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( slotEmitChanged( void ) ) ); - glay->addWidget( new QLabel( mPhraseReplyAllEdit, + connect( mPhraseReplyAllEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + glay->addWidget( new TQLabel( mPhraseReplyAllEdit, i18n("Repl&y to all:"), this ), 4, 0 ); glay->addMultiCellWidget( mPhraseReplyAllEdit, 4, 4, 1, 2 ); // cols 1..2 // row 5: "forward" line edit and label: mPhraseForwardEdit = new KLineEdit( this ); - connect( mPhraseForwardEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( slotEmitChanged( void ) ) ); - glay->addWidget( new QLabel( mPhraseForwardEdit, + connect( mPhraseForwardEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + glay->addWidget( new TQLabel( mPhraseForwardEdit, i18n("&Forward:"), this ), 5, 0 ); glay->addMultiCellWidget( mPhraseForwardEdit, 5, 5, 1, 2 ); // cols 1..2 // row 6: "quote indicator" line edit and label: mPhraseIndentPrefixEdit = new KLineEdit( this ); - connect( mPhraseIndentPrefixEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( slotEmitChanged( void ) ) ); - glay->addWidget( new QLabel( mPhraseIndentPrefixEdit, + connect( mPhraseIndentPrefixEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + glay->addWidget( new TQLabel( mPhraseIndentPrefixEdit, i18n("&Quote indicator:"), this ), 6, 0 ); glay->addMultiCellWidget( mPhraseIndentPrefixEdit, 6, 6, 1, 2 ); @@ -2908,10 +2908,10 @@ void ComposerPage::PhrasesTab::saveActiveLanguageItem() { void ComposerPage::PhrasesTab::slotNewLanguage() { NewLanguageDialog dialog( mLanguageList, parentWidget(), "New", true ); - if ( dialog.exec() == QDialog::Accepted ) slotAddNewLanguage( dialog.language() ); + if ( dialog.exec() == TQDialog::Accepted ) slotAddNewLanguage( dialog.language() ); } -void ComposerPage::PhrasesTab::slotAddNewLanguage( const QString& lang ) +void ComposerPage::PhrasesTab::slotAddNewLanguage( const TQString& lang ) { mPhraseLanguageCombo->setCurrentItem( mPhraseLanguageCombo->insertLanguage( lang ) ); @@ -2924,7 +2924,7 @@ void ComposerPage::PhrasesTab::slotAddNewLanguage( const QString& lang ) locale.translate("Forwarded Message"), locale.translate(">%_") ) ); mRemoveButton->setEnabled( true ); - slotLanguageChanged( QString::null ); + slotLanguageChanged( TQString::null ); } void ComposerPage::PhrasesTab::slotRemoveLanguage() @@ -2945,7 +2945,7 @@ void ComposerPage::PhrasesTab::slotRemoveLanguage() emit changed( true ); } -void ComposerPage::PhrasesTab::slotLanguageChanged( const QString& ) +void ComposerPage::PhrasesTab::slotLanguageChanged( const TQString& ) { int index = mPhraseLanguageCombo->currentItem(); assert( index < (int)mLanguageList.count() ); @@ -2966,9 +2966,9 @@ void ComposerPage::PhrasesTab::doLoadFromGlobalSettings() { // build mLanguageList and mPhraseLanguageCombo: for ( int i = 0 ; i < numLang ; i++ ) { - ReplyPhrases replyPhrases( QString::number(i) ); + ReplyPhrases replyPhrases( TQString::number(i) ); replyPhrases.readConfig(); - QString lang = replyPhrases.language(); + TQString lang = replyPhrases.language(); mLanguageList.append( LanguageItem( lang, replyPhrases.phraseReplySender(), @@ -2998,7 +2998,7 @@ void ComposerPage::PhrasesTab::save() { saveActiveLanguageItem(); LanguageItemList::Iterator it = mLanguageList.begin(); for ( int i = 0 ; it != mLanguageList.end() ; ++it, ++i ) { - ReplyPhrases replyPhrases( QString::number(i) ); + ReplyPhrases replyPhrases( TQString::number(i) ); replyPhrases.setLanguage( (*it).mLanguage ); replyPhrases.setPhraseReplySender( (*it).mReply ); replyPhrases.setPhraseReplyAll( (*it).mReplyAll ); @@ -3008,20 +3008,20 @@ void ComposerPage::PhrasesTab::save() { } } -QString ComposerPage::TemplatesTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-templates"); +TQString ComposerPage::TemplatesTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-templates"); } -ComposerPageTemplatesTab::ComposerPageTemplatesTab( QWidget * parent, const char * name ) +ComposerPageTemplatesTab::ComposerPageTemplatesTab( TQWidget * parent, const char * name ) : ConfigModuleTab ( parent, name ) { - QVBoxLayout* vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); mWidget = new TemplatesConfiguration( this ); vlay->addWidget( mWidget ); - connect( mWidget, SIGNAL( changed() ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mWidget, TQT_SIGNAL( changed() ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); } void ComposerPage::TemplatesTab::doLoadFromGlobalSettings() { @@ -3032,20 +3032,20 @@ void ComposerPage::TemplatesTab::save() { mWidget->saveToGlobal(); } -QString ComposerPage::CustomTemplatesTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-custom-templates"); +TQString ComposerPage::CustomTemplatesTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-custom-templates"); } -ComposerPageCustomTemplatesTab::ComposerPageCustomTemplatesTab( QWidget * parent, const char * name ) +ComposerPageCustomTemplatesTab::ComposerPageCustomTemplatesTab( TQWidget * parent, const char * name ) : ConfigModuleTab ( parent, name ) { - QVBoxLayout* vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); mWidget = new CustomTemplates( this ); vlay->addWidget( mWidget ); - connect( mWidget, SIGNAL( changed() ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mWidget, TQT_SIGNAL( changed() ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); } void ComposerPage::CustomTemplatesTab::doLoadFromGlobalSettings() { @@ -3056,26 +3056,26 @@ void ComposerPage::CustomTemplatesTab::save() { mWidget->save(); } -QString ComposerPage::SubjectTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-subject"); +TQString ComposerPage::SubjectTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-subject"); } -ComposerPageSubjectTab::ComposerPageSubjectTab( QWidget * parent, const char * name ) +ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QVBoxLayout *vlay; - QGroupBox *group; - QLabel *label; + TQVBoxLayout *vlay; + TQGroupBox *group; + TQLabel *label; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - group = new QVGroupBox( i18n("Repl&y Subject Prefixes"), this ); + group = new TQVGroupBox( i18n("Repl&y Subject Prefixes"), this ); group->layout()->setSpacing( KDialog::spacingHint() ); // row 0: help text: - label = new QLabel( i18n("Recognize any sequence of the following prefixes\n" + label = new TQLabel( i18n("Recognize any sequence of the following prefixes\n" "(entries are case-insensitive regular expressions):"), group ); label->setAlignment( AlignLeft|WordBreak ); @@ -3087,24 +3087,24 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( QWidget * parent, const char * n i18n("A&dd..."), i18n("Re&move"), i18n("Mod&ify..."), i18n("Enter new reply prefix:") ); - connect( mReplyListEditor, SIGNAL( changed( void ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mReplyListEditor, TQT_SIGNAL( changed( void ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // row 2: "replace [...]" check box: - mReplaceReplyPrefixCheck = new QCheckBox( + mReplaceReplyPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceReplyPrefixItem()->label(), group, "kcfg_ReplaceReplyPrefix" ); - connect( mReplaceReplyPrefixCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mReplaceReplyPrefixCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( group ); - group = new QVGroupBox( i18n("For&ward Subject Prefixes"), this ); + group = new TQVGroupBox( i18n("For&ward Subject Prefixes"), this ); group->layout()->setSpacing( KDialog::marginHint() ); // row 0: help text: - label= new QLabel( i18n("Recognize any sequence of the following prefixes\n" + label= new TQLabel( i18n("Recognize any sequence of the following prefixes\n" "(entries are case-insensitive regular expressions):"), group ); label->setAlignment( AlignLeft|WordBreak ); @@ -3115,15 +3115,15 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( QWidget * parent, const char * n i18n("Remo&ve"), i18n("Modify..."), i18n("Enter new forward prefix:") ); - connect( mForwardListEditor, SIGNAL( changed( void ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mForwardListEditor, TQT_SIGNAL( changed( void ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // row 3: "replace [...]" check box: - mReplaceForwardPrefixCheck = new QCheckBox( + mReplaceForwardPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceForwardPrefixItem()->label(), group, "kcfg_ReplaceForwardPrefix" ); - connect( mReplaceForwardPrefixCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mReplaceForwardPrefixCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( group ); } @@ -3140,20 +3140,20 @@ void ComposerPage::SubjectTab::save() { GlobalSettings::self()->setForwardPrefixes( mForwardListEditor->stringList() ); } -QString ComposerPage::CharsetTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-charset"); +TQString ComposerPage::CharsetTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-charset"); } -ComposerPageCharsetTab::ComposerPageCharsetTab( QWidget * parent, const char * name ) +ComposerPageCharsetTab::ComposerPageCharsetTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QVBoxLayout *vlay; - QLabel *label; + TQVBoxLayout *vlay; + TQLabel *label; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - label = new QLabel( i18n("This list is checked for every outgoing message " + label = new TQLabel( i18n("This list is checked for every outgoing message " "from the top to the bottom for a charset that " "contains all required characters."), this ); label->setAlignment( WordBreak); @@ -3163,59 +3163,59 @@ ComposerPageCharsetTab::ComposerPageCharsetTab( QWidget * parent, const char * n new SimpleStringListEditor( this, 0, SimpleStringListEditor::All, i18n("A&dd..."), i18n("Remo&ve"), i18n("&Modify..."), i18n("Enter charset:") ); - connect( mCharsetListEditor, SIGNAL( changed( void ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mCharsetListEditor, TQT_SIGNAL( changed( void ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( mCharsetListEditor, 1 ); - mKeepReplyCharsetCheck = new QCheckBox( i18n("&Keep original charset when " + mKeepReplyCharsetCheck = new TQCheckBox( i18n("&Keep original charset when " "replying or forwarding (if " "possible)"), this ); - connect( mKeepReplyCharsetCheck, SIGNAL ( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mKeepReplyCharsetCheck, TQT_SIGNAL ( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( mKeepReplyCharsetCheck ); - connect( mCharsetListEditor, SIGNAL(aboutToAdd(QString&)), - this, SLOT(slotVerifyCharset(QString&)) ); + connect( mCharsetListEditor, TQT_SIGNAL(aboutToAdd(TQString&)), + this, TQT_SLOT(slotVerifyCharset(TQString&)) ); } -void ComposerPage::CharsetTab::slotVerifyCharset( QString & charset ) { +void ComposerPage::CharsetTab::slotVerifyCharset( TQString & charset ) { if ( charset.isEmpty() ) return; // KCharsets::codecForName("us-ascii") returns "iso-8859-1" (cf. Bug #49812) // therefore we have to treat this case specially - if ( charset.lower() == QString::fromLatin1("us-ascii") ) { - charset = QString::fromLatin1("us-ascii"); + if ( charset.lower() == TQString::fromLatin1("us-ascii") ) { + charset = TQString::fromLatin1("us-ascii"); return; } - if ( charset.lower() == QString::fromLatin1("locale") ) { - charset = QString::fromLatin1("%1 (locale)") - .arg( QCString( kmkernel->networkCodec()->mimeName() ).lower() ); + if ( charset.lower() == TQString::fromLatin1("locale") ) { + charset = TQString::fromLatin1("%1 (locale)") + .arg( TQCString( kmkernel->networkCodec()->mimeName() ).lower() ); return; } bool ok = false; - QTextCodec *codec = KGlobal::charsets()->codecForName( charset, ok ); + TQTextCodec *codec = KGlobal::charsets()->codecForName( charset, ok ); if ( ok && codec ) { - charset = QString::fromLatin1( codec->mimeName() ).lower(); + charset = TQString::fromLatin1( codec->mimeName() ).lower(); return; } KMessageBox::sorry( this, i18n("This charset is not supported.") ); - charset = QString::null; + charset = TQString::null; } void ComposerPage::CharsetTab::doLoadOther() { KConfigGroup composer( KMKernel::config(), "Composer" ); - QStringList charsets = composer.readListEntry( "pref-charsets" ); - for ( QStringList::Iterator it = charsets.begin() ; + TQStringList charsets = composer.readListEntry( "pref-charsets" ); + for ( TQStringList::Iterator it = charsets.begin() ; it != charsets.end() ; ++it ) - if ( (*it) == QString::fromLatin1("locale") ) { - QCString cset = kmkernel->networkCodec()->mimeName(); + if ( (*it) == TQString::fromLatin1("locale") ) { + TQCString cset = kmkernel->networkCodec()->mimeName(); KPIM::kAsciiToLower( cset.data() ); - (*it) = QString("%1 (locale)").arg( cset ); + (*it) = TQString("%1 (locale)").arg( cset ); } mCharsetListEditor->setStringList( charsets ); @@ -3225,8 +3225,8 @@ void ComposerPage::CharsetTab::doLoadOther() { void ComposerPage::CharsetTab::save() { KConfigGroup composer( KMKernel::config(), "Composer" ); - QStringList charsetList = mCharsetListEditor->stringList(); - QStringList::Iterator it = charsetList.begin(); + TQStringList charsetList = mCharsetListEditor->stringList(); + TQStringList::Iterator it = charsetList.begin(); for ( ; it != charsetList.end() ; ++it ) if ( (*it).endsWith("(locale)") ) (*it) = "locale"; @@ -3235,55 +3235,55 @@ void ComposerPage::CharsetTab::save() { !mKeepReplyCharsetCheck->isChecked() ); } -QString ComposerPage::HeadersTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-headers"); +TQString ComposerPage::HeadersTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-headers"); } -ComposerPageHeadersTab::ComposerPageHeadersTab( QWidget * parent, const char * name ) +ComposerPageHeadersTab::ComposerPageHeadersTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QVBoxLayout *vlay; - QHBoxLayout *hlay; - QGridLayout *glay; - QLabel *label; - QPushButton *button; + TQVBoxLayout *vlay; + TQHBoxLayout *hlay; + TQGridLayout *glay; + TQLabel *label; + TQPushButton *button; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // "Use custom Message-Id suffix" checkbox: mCreateOwnMessageIdCheck = - new QCheckBox( i18n("&Use custom message-id suffix"), this ); - connect( mCreateOwnMessageIdCheck, SIGNAL ( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + new TQCheckBox( i18n("&Use custom message-id suffix"), this ); + connect( mCreateOwnMessageIdCheck, TQT_SIGNAL ( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( mCreateOwnMessageIdCheck ); // "Message-Id suffix" line edit and label: - hlay = new QHBoxLayout( vlay ); // inherits spacing + hlay = new TQHBoxLayout( vlay ); // inherits spacing mMessageIdSuffixEdit = new KLineEdit( this ); // only ASCII letters, digits, plus, minus and dots are allowed mMessageIdSuffixValidator = - new QRegExpValidator( QRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), this ); + new TQRegExpValidator( TQRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), this ); mMessageIdSuffixEdit->setValidator( mMessageIdSuffixValidator ); - label = new QLabel( mMessageIdSuffixEdit, + label = new TQLabel( mMessageIdSuffixEdit, i18n("Custom message-&id suffix:"), this ); label->setEnabled( false ); // since !mCreateOwnMessageIdCheck->isChecked() mMessageIdSuffixEdit->setEnabled( false ); hlay->addWidget( label ); hlay->addWidget( mMessageIdSuffixEdit, 1 ); - connect( mCreateOwnMessageIdCheck, SIGNAL(toggled(bool) ), - label, SLOT(setEnabled(bool)) ); - connect( mCreateOwnMessageIdCheck, SIGNAL(toggled(bool) ), - mMessageIdSuffixEdit, SLOT(setEnabled(bool)) ); - connect( mMessageIdSuffixEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mCreateOwnMessageIdCheck, TQT_SIGNAL(toggled(bool) ), + label, TQT_SLOT(setEnabled(bool)) ); + connect( mCreateOwnMessageIdCheck, TQT_SIGNAL(toggled(bool) ), + mMessageIdSuffixEdit, TQT_SLOT(setEnabled(bool)) ); + connect( mMessageIdSuffixEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // horizontal rule and "custom header fields" label: vlay->addWidget( new KSeparator( KSeparator::HLine, this ) ); - vlay->addWidget( new QLabel( i18n("Define custom mime header fields:"), this) ); + vlay->addWidget( new TQLabel( i18n("Define custom mime header fields:"), this) ); // "custom header fields" listbox: - glay = new QGridLayout( vlay, 5, 3 ); // inherits spacing + glay = new TQGridLayout( vlay, 5, 3 ); // inherits spacing glay->setRowStretch( 2, 1 ); glay->setColStretch( 1, 1 ); mTagList = new ListView( this, "tagList" ); @@ -3291,44 +3291,44 @@ ComposerPageHeadersTab::ComposerPageHeadersTab( QWidget * parent, const char * n mTagList->addColumn( i18n("Value") ); mTagList->setAllColumnsShowFocus( true ); mTagList->setSorting( -1 ); - connect( mTagList, SIGNAL(selectionChanged()), - this, SLOT(slotMimeHeaderSelectionChanged()) ); + connect( mTagList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotMimeHeaderSelectionChanged()) ); glay->addMultiCellWidget( mTagList, 0, 2, 0, 1 ); // "new" and "remove" buttons: - button = new QPushButton( i18n("Ne&w"), this ); - connect( button, SIGNAL(clicked()), this, SLOT(slotNewMimeHeader()) ); + button = new TQPushButton( i18n("Ne&w"), this ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewMimeHeader()) ); button->setAutoDefault( false ); glay->addWidget( button, 0, 2 ); - mRemoveHeaderButton = new QPushButton( i18n("Re&move"), this ); - connect( mRemoveHeaderButton, SIGNAL(clicked()), - this, SLOT(slotRemoveMimeHeader()) ); + mRemoveHeaderButton = new TQPushButton( i18n("Re&move"), this ); + connect( mRemoveHeaderButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveMimeHeader()) ); button->setAutoDefault( false ); glay->addWidget( mRemoveHeaderButton, 1, 2 ); // "name" and "value" line edits and labels: mTagNameEdit = new KLineEdit( this ); mTagNameEdit->setEnabled( false ); - mTagNameLabel = new QLabel( mTagNameEdit, i18n("&Name:"), this ); + mTagNameLabel = new TQLabel( mTagNameEdit, i18n("&Name:"), this ); mTagNameLabel->setEnabled( false ); glay->addWidget( mTagNameLabel, 3, 0 ); glay->addWidget( mTagNameEdit, 3, 1 ); - connect( mTagNameEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotMimeHeaderNameChanged(const QString&)) ); + connect( mTagNameEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotMimeHeaderNameChanged(const TQString&)) ); mTagValueEdit = new KLineEdit( this ); mTagValueEdit->setEnabled( false ); - mTagValueLabel = new QLabel( mTagValueEdit, i18n("&Value:"), this ); + mTagValueLabel = new TQLabel( mTagValueEdit, i18n("&Value:"), this ); mTagValueLabel->setEnabled( false ); glay->addWidget( mTagValueLabel, 4, 0 ); glay->addWidget( mTagValueEdit, 4, 1 ); - connect( mTagValueEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotMimeHeaderValueChanged(const QString&)) ); + connect( mTagValueEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotMimeHeaderValueChanged(const TQString&)) ); } void ComposerPage::HeadersTab::slotMimeHeaderSelectionChanged() { - QListViewItem * item = mTagList->selectedItem(); + TQListViewItem * item = mTagList->selectedItem(); if ( item ) { mTagNameEdit->setText( item->text( 0 ) ); @@ -3345,20 +3345,20 @@ void ComposerPage::HeadersTab::slotMimeHeaderSelectionChanged() } -void ComposerPage::HeadersTab::slotMimeHeaderNameChanged( const QString & text ) { +void ComposerPage::HeadersTab::slotMimeHeaderNameChanged( const TQString & text ) { // is called on ::setup(), when clearing the line edits. So be // prepared to not find a selection: - QListViewItem * item = mTagList->selectedItem(); + TQListViewItem * item = mTagList->selectedItem(); if ( item ) item->setText( 0, text ); emit changed( true ); } -void ComposerPage::HeadersTab::slotMimeHeaderValueChanged( const QString & text ) { +void ComposerPage::HeadersTab::slotMimeHeaderValueChanged( const TQString & text ) { // is called on ::setup(), when clearing the line edits. So be // prepared to not find a selection: - QListViewItem * item = mTagList->selectedItem(); + TQListViewItem * item = mTagList->selectedItem(); if ( item ) item->setText( 1, text ); emit changed( true ); @@ -3367,7 +3367,7 @@ void ComposerPage::HeadersTab::slotMimeHeaderValueChanged( const QString & text void ComposerPage::HeadersTab::slotNewMimeHeader() { - QListViewItem *listItem = new QListViewItem( mTagList ); + TQListViewItem *listItem = new TQListViewItem( mTagList ); mTagList->setCurrentItem( listItem ); mTagList->setSelected( listItem, true ); emit changed( true ); @@ -3377,7 +3377,7 @@ void ComposerPage::HeadersTab::slotNewMimeHeader() void ComposerPage::HeadersTab::slotRemoveMimeHeader() { // calling this w/o selection is a programming error: - QListViewItem * item = mTagList->selectedItem(); + TQListViewItem * item = mTagList->selectedItem(); if ( !item ) { kdDebug(5006) << "==================================================\n" << "Error: Remove button was pressed although no custom header was selected\n" @@ -3385,7 +3385,7 @@ void ComposerPage::HeadersTab::slotRemoveMimeHeader() return; } - QListViewItem * below = item->nextSibling(); + TQListViewItem * below = item->nextSibling(); delete item; if ( below ) @@ -3398,7 +3398,7 @@ void ComposerPage::HeadersTab::slotRemoveMimeHeader() void ComposerPage::HeadersTab::doLoadOther() { KConfigGroup general( KMKernel::config(), "General" ); - QString suffix = general.readEntry( "myMessageIdSuffix" ); + TQString suffix = general.readEntry( "myMessageIdSuffix" ); mMessageIdSuffixEdit->setText( suffix ); bool state = ( !suffix.isEmpty() && general.readBoolEntry( "useCustomMessageIdSuffix", false ) ); @@ -3408,16 +3408,16 @@ void ComposerPage::HeadersTab::doLoadOther() { mTagNameEdit->clear(); mTagValueEdit->clear(); - QListViewItem * item = 0; + TQListViewItem * item = 0; int count = general.readNumEntry( "mime-header-count", 0 ); for( int i = 0 ; i < count ; i++ ) { KConfigGroup config( KMKernel::config(), - QCString("Mime #") + QCString().setNum(i) ); - QString name = config.readEntry( "name" ); - QString value = config.readEntry( "value" ); + TQCString("Mime #") + TQCString().setNum(i) ); + TQString name = config.readEntry( "name" ); + TQString value = config.readEntry( "value" ); if( !name.isEmpty() ) - item = new QListViewItem( mTagList, item, name, value ); + item = new TQListViewItem( mTagList, item, name, value ); } if ( mTagList->childCount() ) { mTagList->setCurrentItem( mTagList->firstChild() ); @@ -3438,11 +3438,11 @@ void ComposerPage::HeadersTab::save() { mMessageIdSuffixEdit->text() ); int numValidEntries = 0; - QListViewItem * item = mTagList->firstChild(); + TQListViewItem * item = mTagList->firstChild(); for ( ; item ; item = item->itemBelow() ) if( !item->text(0).isEmpty() ) { - KConfigGroup config( KMKernel::config(), QCString("Mime #") - + QCString().setNum( numValidEntries ) ); + KConfigGroup config( KMKernel::config(), TQCString("Mime #") + + TQCString().setNum( numValidEntries ) ); config.writeEntry( "name", item->text( 0 ) ); config.writeEntry( "value", item->text( 1 ) ); numValidEntries++; @@ -3450,43 +3450,43 @@ void ComposerPage::HeadersTab::save() { general.writeEntry( "mime-header-count", numValidEntries ); } -QString ComposerPage::AttachmentsTab::helpAnchor() const { - return QString::fromLatin1("configure-composer-attachments"); +TQString ComposerPage::AttachmentsTab::helpAnchor() const { + return TQString::fromLatin1("configure-composer-attachments"); } -ComposerPageAttachmentsTab::ComposerPageAttachmentsTab( QWidget * parent, +ComposerPageAttachmentsTab::ComposerPageAttachmentsTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // tmp. vars: - QVBoxLayout *vlay; - QLabel *label; + TQVBoxLayout *vlay; + TQLabel *label; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // "Outlook compatible attachment naming" check box mOutlookCompatibleCheck = - new QCheckBox( i18n( "Outlook-compatible attachment naming" ), this ); + new TQCheckBox( i18n( "Outlook-compatible attachment naming" ), this ); mOutlookCompatibleCheck->setChecked( false ); - QToolTip::add( mOutlookCompatibleCheck, i18n( + TQToolTip::add( mOutlookCompatibleCheck, i18n( "Turn this option on to make Outlook(tm) understand attachment names " "containing non-English characters" ) ); - connect( mOutlookCompatibleCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mOutlookCompatibleCheck, SIGNAL( clicked() ), - this, SLOT( slotOutlookCompatibleClicked() ) ); + connect( mOutlookCompatibleCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mOutlookCompatibleCheck, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotOutlookCompatibleClicked() ) ); vlay->addWidget( mOutlookCompatibleCheck ); vlay->addSpacing( 5 ); // "Enable detection of missing attachments" check box mMissingAttachmentDetectionCheck = - new QCheckBox( i18n("E&nable detection of missing attachments"), this ); + new TQCheckBox( i18n("E&nable detection of missing attachments"), this ); mMissingAttachmentDetectionCheck->setChecked( true ); - connect( mMissingAttachmentDetectionCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mMissingAttachmentDetectionCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( mMissingAttachmentDetectionCheck ); // "Attachment key words" label and string list editor - label = new QLabel( i18n("Recognize any of the following key words as " + label = new TQLabel( i18n("Recognize any of the following key words as " "intention to attach a file:"), this ); label->setAlignment( AlignLeft|WordBreak ); vlay->addWidget( label ); @@ -3498,14 +3498,14 @@ ComposerPageAttachmentsTab::ComposerPageAttachmentsTab( QWidget * parent, i18n("A&dd..."), i18n("Re&move"), i18n("Mod&ify..."), i18n("Enter new key word:") ); - connect( mAttachWordsListEditor, SIGNAL( changed( void ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mAttachWordsListEditor, TQT_SIGNAL( changed( void ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addWidget( mAttachWordsListEditor ); - connect( mMissingAttachmentDetectionCheck, SIGNAL(toggled(bool) ), - label, SLOT(setEnabled(bool)) ); - connect( mMissingAttachmentDetectionCheck, SIGNAL(toggled(bool) ), - mAttachWordsListEditor, SLOT(setEnabled(bool)) ); + connect( mMissingAttachmentDetectionCheck, TQT_SIGNAL(toggled(bool) ), + label, TQT_SLOT(setEnabled(bool)) ); + connect( mMissingAttachmentDetectionCheck, TQT_SIGNAL(toggled(bool) ), + mAttachWordsListEditor, TQT_SLOT(setEnabled(bool)) ); } void ComposerPage::AttachmentsTab::doLoadFromGlobalSettings() { @@ -3513,14 +3513,14 @@ void ComposerPage::AttachmentsTab::doLoadFromGlobalSettings() { GlobalSettings::self()->outlookCompatibleAttachments() ); mMissingAttachmentDetectionCheck->setChecked( GlobalSettings::self()->showForgottenAttachmentWarning() ); - QStringList attachWordsList = GlobalSettings::self()->attachmentKeywords(); + TQStringList attachWordsList = GlobalSettings::self()->attachmentKeywords(); if ( attachWordsList.isEmpty() ) { // default value - attachWordsList << QString::fromLatin1("attachment") - << QString::fromLatin1("attached"); - if ( QString::fromLatin1("attachment") != i18n("attachment") ) + attachWordsList << TQString::fromLatin1("attachment") + << TQString::fromLatin1("attached"); + if ( TQString::fromLatin1("attachment") != i18n("attachment") ) attachWordsList << i18n("attachment"); - if ( QString::fromLatin1("attached") != i18n("attached") ) + if ( TQString::fromLatin1("attached") != i18n("attached") ) attachWordsList << i18n("attached"); } @@ -3555,11 +3555,11 @@ void ComposerPageAttachmentsTab::slotOutlookCompatibleClicked() // * SecurityPage * // * * // ************************************************************* -QString SecurityPage::helpAnchor() const { - return QString::fromLatin1("configure-security"); +TQString SecurityPage::helpAnchor() const { + return TQString::fromLatin1("configure-security"); } -SecurityPage::SecurityPage( QWidget * parent, const char * name ) +SecurityPage::SecurityPage( TQWidget * parent, const char * name ) : ConfigModuleWithTabs( parent, name ) { // @@ -3602,26 +3602,26 @@ void SecurityPage::installProfile( KConfig * profile ) { mSMimeTab->installProfile( profile ); } -QString SecurityPage::GeneralTab::helpAnchor() const { - return QString::fromLatin1("configure-security-reading"); +TQString SecurityPage::GeneralTab::helpAnchor() const { + return TQString::fromLatin1("configure-security-reading"); } -SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * name ) +SecurityPageGeneralTab::SecurityPageGeneralTab( TQWidget * parent, const char * name ) : ConfigModuleTab ( parent, name ) { // tmp. vars: - QVBoxLayout *vlay; - QHBox *hbox; - QGroupBox *group; - QRadioButton *radio; + TQVBoxLayout *vlay; + TQHBox *hbox; + TQGroupBox *group; + TQRadioButton *radio; KActiveLabel *label; - QWidget *w; - QString msg; + TQWidget *w; + TQString msg; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // QWhat'sThis texts - QString htmlWhatsThis = i18n( "

    Messages sometimes come in both formats. " + TQString htmlWhatsThis = i18n( "

    Messages sometimes come in both formats. " "This option controls whether you want the HTML part or the plain " "text part to be displayed.

    " "

    Displaying the HTML part makes the message look better, " @@ -3638,7 +3638,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n "

    Note: You can set this option on a per-folder basis " "from the Folder menu of KMail's main window.

    " ); - QString externalWhatsThis = i18n( "

    Some mail advertisements are in HTML " + TQString externalWhatsThis = i18n( "

    Some mail advertisements are in HTML " "and contain references to, for example, images that the advertisers" " employ to find out that you have read their message " "("web bugs").

    " @@ -3651,7 +3651,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n "messages that were not attached to it, you can enable this " "option, but you should be aware of the possible problem.

    " ); - QString receiptWhatsThis = i18n( "

    Message Disposition " + TQString receiptWhatsThis = i18n( "

    Message Disposition " "Notification Policy

    " "

    MDNs are a generalization of what is commonly called read " "receipt. The message author requests a disposition " @@ -3684,18 +3684,18 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n // "HTML Messages" group box: - group = new QVGroupBox( i18n( "HTML Messages" ), this ); + group = new TQVGroupBox( i18n( "HTML Messages" ), this ); group->layout()->setSpacing( KDialog::spacingHint() ); - mHtmlMailCheck = new QCheckBox( i18n("Prefer H&TML to plain text"), group ); - QWhatsThis::add( mHtmlMailCheck, htmlWhatsThis ); - connect( mHtmlMailCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - mExternalReferences = new QCheckBox( i18n("Allow messages to load e&xternal " + mHtmlMailCheck = new TQCheckBox( i18n("Prefer H&TML to plain text"), group ); + TQWhatsThis::add( mHtmlMailCheck, htmlWhatsThis ); + connect( mHtmlMailCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + mExternalReferences = new TQCheckBox( i18n("Allow messages to load e&xternal " "references from the Internet" ), group ); - QWhatsThis::add( mExternalReferences, externalWhatsThis ); - connect( mExternalReferences, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + TQWhatsThis::add( mExternalReferences, externalWhatsThis ); + connect( mExternalReferences, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); label = new KActiveLabel( i18n("WARNING: Allowing HTML in email may " "increase the risk that your system will be " "compromised by present and anticipated security " @@ -3708,70 +3708,70 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n vlay->addWidget( group ); // encrypted messages group - group = new QVGroupBox( i18n("Encrypted Messages"), this ); + group = new TQVGroupBox( i18n("Encrypted Messages"), this ); group->layout()->setSpacing( KDialog::spacingHint() ); - mAlwaysDecrypt = new QCheckBox( i18n( "Attempt decryption of encrypted messages when viewing" ), group ); - connect( mAlwaysDecrypt, SIGNAL(stateChanged(int)), this, SLOT(slotEmitChanged()) ); + mAlwaysDecrypt = new TQCheckBox( i18n( "Attempt decryption of encrypted messages when viewing" ), group ); + connect( mAlwaysDecrypt, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotEmitChanged()) ); vlay->addWidget( group ); // "Message Disposition Notification" groupbox: - group = new QVGroupBox( i18n("Message Disposition Notifications"), this ); + group = new TQVGroupBox( i18n("Message Disposition Notifications"), this ); group->layout()->setSpacing( KDialog::spacingHint() ); // "ignore", "ask", "deny", "always send" radiobutton line: - mMDNGroup = new QButtonGroup( group ); + mMDNGroup = new TQButtonGroup( group ); mMDNGroup->hide(); - connect( mMDNGroup, SIGNAL( clicked( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - hbox = new QHBox( group ); + connect( mMDNGroup, TQT_SIGNAL( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + hbox = new TQHBox( group ); hbox->setSpacing( KDialog::spacingHint() ); - (void)new QLabel( i18n("Send policy:"), hbox ); + (void)new TQLabel( i18n("Send policy:"), hbox ); - radio = new QRadioButton( i18n("&Ignore"), hbox ); + radio = new TQRadioButton( i18n("&Ignore"), hbox ); mMDNGroup->insert( radio ); - radio = new QRadioButton( i18n("As&k"), hbox ); + radio = new TQRadioButton( i18n("As&k"), hbox ); mMDNGroup->insert( radio ); - radio = new QRadioButton( i18n("&Deny"), hbox ); + radio = new TQRadioButton( i18n("&Deny"), hbox ); mMDNGroup->insert( radio ); - radio = new QRadioButton( i18n("Al&ways send"), hbox ); + radio = new TQRadioButton( i18n("Al&ways send"), hbox ); mMDNGroup->insert( radio ); for ( int i = 0 ; i < mMDNGroup->count() ; ++i ) - QWhatsThis::add( mMDNGroup->find( i ), receiptWhatsThis ); + TQWhatsThis::add( mMDNGroup->find( i ), receiptWhatsThis ); - w = new QWidget( hbox ); // spacer + w = new TQWidget( hbox ); // spacer hbox->setStretchFactor( w, 1 ); // "Original Message quote" radiobutton line: - mOrigQuoteGroup = new QButtonGroup( group ); + mOrigQuoteGroup = new TQButtonGroup( group ); mOrigQuoteGroup->hide(); - connect( mOrigQuoteGroup, SIGNAL( clicked( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mOrigQuoteGroup, TQT_SIGNAL( clicked( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - hbox = new QHBox( group ); + hbox = new TQHBox( group ); hbox->setSpacing( KDialog::spacingHint() ); - (void)new QLabel( i18n("Quote original message:"), hbox ); + (void)new TQLabel( i18n("Quote original message:"), hbox ); - radio = new QRadioButton( i18n("Nothin&g"), hbox ); + radio = new TQRadioButton( i18n("Nothin&g"), hbox ); mOrigQuoteGroup->insert( radio ); - radio = new QRadioButton( i18n("&Full message"), hbox ); + radio = new TQRadioButton( i18n("&Full message"), hbox ); mOrigQuoteGroup->insert( radio ); - radio = new QRadioButton( i18n("Onl&y headers"), hbox ); + radio = new TQRadioButton( i18n("Onl&y headers"), hbox ); mOrigQuoteGroup->insert( radio ); - w = new QWidget( hbox ); + w = new TQWidget( hbox ); hbox->setStretchFactor( w, 1 ); - mNoMDNsWhenEncryptedCheck = new QCheckBox( i18n("Do not send MDNs in response to encrypted messages"), group ); - connect( mNoMDNsWhenEncryptedCheck, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); + mNoMDNsWhenEncryptedCheck = new TQCheckBox( i18n("Do not send MDNs in response to encrypted messages"), group ); + connect( mNoMDNsWhenEncryptedCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); // Warning label: label = new KActiveLabel( i18n("WARNING: Unconditionally returning " @@ -3783,11 +3783,11 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n vlay->addWidget( group ); // "Attached keys" group box: - group = new QVGroupBox( i18n( "Certificate && Key Bundle Attachments" ), this ); + group = new TQVGroupBox( i18n( "Certificate && Key Bundle Attachments" ), this ); group->layout()->setSpacing( KDialog::spacingHint() ); - mAutomaticallyImportAttachedKeysCheck = new QCheckBox( i18n("Automatically import keys and certificates"), group ); - connect( mAutomaticallyImportAttachedKeysCheck, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); + mAutomaticallyImportAttachedKeysCheck = new TQCheckBox( i18n("Automatically import keys and certificates"), group ); + connect( mAutomaticallyImportAttachedKeysCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); vlay->addWidget( group ); @@ -3848,17 +3848,17 @@ void SecurityPage::GeneralTab::save() { if (reader.readBoolEntry( "htmlMail", false ) != mHtmlMailCheck->isChecked()) { if (KMessageBox::warningContinueCancel(this, i18n("Changing the global " - "HTML setting will override all folder specific values."), QString::null, + "HTML setting will override all folder specific values."), TQString::null, KStdGuiItem::cont(), "htmlMailOverride") == KMessageBox::Continue) { reader.writeEntry( "htmlMail", mHtmlMailCheck->isChecked() ); - QStringList names; - QValueList > folders; + TQStringList names; + TQValueList > folders; kmkernel->folderMgr()->createFolderList(&names, &folders); kmkernel->imapFolderMgr()->createFolderList(&names, &folders); kmkernel->dimapFolderMgr()->createFolderList(&names, &folders); kmkernel->searchFolderMgr()->createFolderList(&names, &folders); - for (QValueList >::iterator it = folders.begin(); + for (TQValueList >::iterator it = folders.begin(); it != folders.end(); ++it) { if (*it) @@ -3879,24 +3879,24 @@ void SecurityPage::GeneralTab::save() { } -QString SecurityPage::ComposerCryptoTab::helpAnchor() const { - return QString::fromLatin1("configure-security-composing"); +TQString SecurityPage::ComposerCryptoTab::helpAnchor() const { + return TQString::fromLatin1("configure-security-composing"); } -SecurityPageComposerCryptoTab::SecurityPageComposerCryptoTab( QWidget * parent, const char * name ) +SecurityPageComposerCryptoTab::SecurityPageComposerCryptoTab( TQWidget * parent, const char * name ) : ConfigModuleTab ( parent, name ) { // the margins are inside mWidget itself - QVBoxLayout* vlay = new QVBoxLayout( this, 0, 0 ); + TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, 0 ); mWidget = new ComposerCryptoConfiguration( this ); - connect( mWidget->mAutoSignature, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->mEncToSelf, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->mShowEncryptionResult, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->mShowKeyApprovalDlg, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->mAutoEncrypt, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->mNeverEncryptWhenSavingInDrafts, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->mStoreEncrypted, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) ); + connect( mWidget->mAutoSignature, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mEncToSelf, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mShowEncryptionResult, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mShowKeyApprovalDlg, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mAutoEncrypt, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mNeverEncryptWhenSavingInDrafts, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mStoreEncrypted, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) ); vlay->addWidget( mWidget ); } @@ -3954,33 +3954,33 @@ void SecurityPage::ComposerCryptoTab::save() { composer.writeEntry( "crypto-store-encrypted", mWidget->mStoreEncrypted->isChecked() ); } -QString SecurityPage::WarningTab::helpAnchor() const { - return QString::fromLatin1("configure-security-warnings"); +TQString SecurityPage::WarningTab::helpAnchor() const { + return TQString::fromLatin1("configure-security-warnings"); } -SecurityPageWarningTab::SecurityPageWarningTab( QWidget * parent, const char * name ) +SecurityPageWarningTab::SecurityPageWarningTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // the margins are inside mWidget itself - QVBoxLayout* vlay = new QVBoxLayout( this, 0, 0 ); + TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, 0 ); mWidget = new WarningConfiguration( this ); vlay->addWidget( mWidget ); - connect( mWidget->warnGroupBox, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); - connect( mWidget->mWarnUnsigned, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); - connect( mWidget->warnUnencryptedCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); - connect( mWidget->warnReceiverNotInCertificateCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); - connect( mWidget->mWarnSignKeyExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) ); - connect( mWidget->mWarnSignChainCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) ); - connect( mWidget->mWarnSignRootCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) ); + connect( mWidget->warnGroupBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); + connect( mWidget->mWarnUnsigned, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); + connect( mWidget->warnUnencryptedCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); + connect( mWidget->warnReceiverNotInCertificateCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); + connect( mWidget->mWarnSignKeyExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mWarnSignChainCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mWarnSignRootCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) ); - connect( mWidget->mWarnEncrKeyExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) ); - connect( mWidget->mWarnEncrChainCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) ); - connect( mWidget->mWarnEncrRootCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) ); + connect( mWidget->mWarnEncrKeyExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mWarnEncrChainCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->mWarnEncrRootCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) ); - connect( mWidget->enableAllWarningsPB, SIGNAL(clicked()), - SLOT(slotReenableAllWarningsClicked()) ); + connect( mWidget->enableAllWarningsPB, TQT_SIGNAL(clicked()), + TQT_SLOT(slotReenableAllWarningsClicked()) ); } void SecurityPage::WarningTab::doLoadOther() { @@ -4063,21 +4063,21 @@ void SecurityPage::WarningTab::slotReenableAllWarningsClicked() { //// -QString SecurityPage::SMimeTab::helpAnchor() const { - return QString::fromLatin1("configure-security-smime-validation"); +TQString SecurityPage::SMimeTab::helpAnchor() const { + return TQString::fromLatin1("configure-security-smime-validation"); } -SecurityPageSMimeTab::SecurityPageSMimeTab( QWidget * parent, const char * name ) +SecurityPageSMimeTab::SecurityPageSMimeTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // the margins are inside mWidget itself - QVBoxLayout* vlay = new QVBoxLayout( this, 0, 0 ); + TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, 0 ); mWidget = new SMimeConfiguration( this ); vlay->addWidget( mWidget ); // Button-group for exclusive radiobuttons - QButtonGroup* bg = new QButtonGroup( mWidget ); + TQButtonGroup* bg = new TQButtonGroup( mWidget ); bg->hide(); bg->insert( mWidget->CRLRB ); bg->insert( mWidget->OCSPRB ); @@ -4093,31 +4093,31 @@ SecurityPageSMimeTab::SecurityPageSMimeTab( QWidget * parent, const char * name mConfig = Kleo::CryptoBackendFactory::instance()->config(); - connect( mWidget->CRLRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->OCSPRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->OCSPResponderURL, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->OCSPResponderSignature, SIGNAL( changed() ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->doNotCheckCertPolicyCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->neverConsultCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->fetchMissingCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - - connect( mWidget->ignoreServiceURLCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->ignoreHTTPDPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->disableHTTPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->honorHTTPProxyRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->useCustomHTTPProxyRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->customHTTPProxy, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->ignoreLDAPDPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->disableLDAPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) ); - connect( mWidget->customLDAPProxy, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotEmitChanged() ) ); - - connect( mWidget->disableHTTPCB, SIGNAL( toggled( bool ) ), - this, SLOT( slotUpdateHTTPActions() ) ); - connect( mWidget->ignoreHTTPDPCB, SIGNAL( toggled( bool ) ), - this, SLOT( slotUpdateHTTPActions() ) ); + connect( mWidget->CRLRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->OCSPRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->OCSPResponderURL, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->OCSPResponderSignature, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->doNotCheckCertPolicyCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->neverConsultCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->fetchMissingCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + + connect( mWidget->ignoreServiceURLCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->ignoreHTTPDPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->disableHTTPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->honorHTTPProxyRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->useCustomHTTPProxyRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->customHTTPProxy, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->ignoreLDAPDPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->disableLDAPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) ); + connect( mWidget->customLDAPProxy, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotEmitChanged() ) ); + + connect( mWidget->disableHTTPCB, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotUpdateHTTPActions() ) ); + connect( mWidget->ignoreHTTPDPCB, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotUpdateHTTPActions() ) ); // Button-group for exclusive radiobuttons - QButtonGroup* bgHTTPProxy = new QButtonGroup( mWidget ); + TQButtonGroup* bgHTTPProxy = new TQButtonGroup( mWidget ); bgHTTPProxy->hide(); bgHTTPProxy->insert( mWidget->honorHTTPProxyRB ); bgHTTPProxy->insert( mWidget->useCustomHTTPProxyRB ); @@ -4132,13 +4132,13 @@ SecurityPageSMimeTab::~SecurityPageSMimeTab() { } -static void disableDirmngrWidget( QWidget* w ) { +static void disableDirmngrWidget( TQWidget* w ) { w->setEnabled( false ); - QWhatsThis::remove( w ); - QWhatsThis::add( w, i18n( "This option requires dirmngr >= 0.9.0" ) ); + TQWhatsThis::remove( w ); + TQWhatsThis::add( w, i18n( "This option requires dirmngr >= 0.9.0" ) ); } -static void initializeDirmngrCheckbox( QCheckBox* cb, Kleo::CryptoConfigEntry* entry ) { +static void initializeDirmngrCheckbox( TQCheckBox* cb, Kleo::CryptoConfigEntry* entry ) { if ( entry ) cb->setChecked( entry->boolValue() ); else @@ -4242,7 +4242,7 @@ void SecurityPage::SMimeTab::doLoadOther() { initializeDirmngrCheckbox( mWidget->ignoreLDAPDPCB, e.mIgnoreLDAPDPEntry ); initializeDirmngrCheckbox( mWidget->disableLDAPCB, e.mDisableLDAPEntry ); if ( e.mCustomHTTPProxy ) { - QString systemProxy = QString::fromLocal8Bit( getenv( "http_proxy" ) ); + TQString systemProxy = TQString::fromLocal8Bit( getenv( "http_proxy" ) ); if ( systemProxy.isEmpty() ) systemProxy = i18n( "no proxy" ); mWidget->systemHTTPProxy->setText( i18n( "(Current system setting: %1)" ).arg( systemProxy ) ); @@ -4280,7 +4280,7 @@ void SecurityPage::SMimeTab::slotUpdateHTTPActions() { void SecurityPage::SMimeTab::installProfile( KConfig * ) { } -static void saveCheckBoxToKleoEntry( QCheckBox* cb, Kleo::CryptoConfigEntry* entry ) { +static void saveCheckBoxToKleoEntry( TQCheckBox* cb, Kleo::CryptoConfigEntry* entry ) { const bool b = cb->isChecked(); if ( entry && entry->boolValue() != b ) entry->setBoolValue( b ); @@ -4306,7 +4306,7 @@ void SecurityPage::SMimeTab::save() { saveCheckBoxToKleoEntry( mWidget->neverConsultCB, e.mNeverConsultConfigEntry ); saveCheckBoxToKleoEntry( mWidget->fetchMissingCB, e.mFetchMissingConfigEntry ); - QString txt = mWidget->OCSPResponderURL->text(); + TQString txt = mWidget->OCSPResponderURL->text(); if ( e.mOCSPResponderURLConfigEntry && e.mOCSPResponderURLConfigEntry->stringValue() != txt ) e.mOCSPResponderURLConfigEntry->setStringValue( txt ); @@ -4326,7 +4326,7 @@ void SecurityPage::SMimeTab::save() { if ( e.mHonorHTTPProxy && e.mHonorHTTPProxy->boolValue() != honor ) e.mHonorHTTPProxy->setBoolValue( honor ); - QString chosenProxy = mWidget->customHTTPProxy->text(); + TQString chosenProxy = mWidget->customHTTPProxy->text(); if ( chosenProxy != e.mCustomHTTPProxy->stringValue() ) e.mCustomHTTPProxy->setStringValue( chosenProxy ); } @@ -4337,7 +4337,7 @@ void SecurityPage::SMimeTab::save() { mConfig->sync( true ); } -bool SecurityPageSMimeTab::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData) +bool SecurityPageSMimeTab::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) { if ( fun == "load()" ) { replyType = "void"; @@ -4369,11 +4369,11 @@ Kleo::CryptoConfigEntry* SMIMECryptoConfigEntries::configEntry( const char* comp { Kleo::CryptoConfigEntry* entry = mConfig->entry( componentName, groupName, entryName ); if ( !entry ) { - kdWarning(5006) << QString( "Backend error: gpgconf doesn't seem to know the entry for %1/%2/%3" ).arg( componentName, groupName, entryName ) << endl; + kdWarning(5006) << TQString( "Backend error: gpgconf doesn't seem to know the entry for %1/%2/%3" ).arg( componentName, groupName, entryName ) << endl; return 0; } if( entry->argType() != argType || entry->isList() != isList ) { - kdWarning(5006) << QString( "Backend error: gpgconf has wrong type for %1/%2/%3: %4 %5" ).arg( componentName, groupName, entryName ).arg( entry->argType() ).arg( entry->isList() ) << endl; + kdWarning(5006) << TQString( "Backend error: gpgconf has wrong type for %1/%2/%3: %4 %5" ).arg( componentName, groupName, entryName ).arg( entry->argType() ).arg( entry->isList() ) << endl; return 0; } return entry; @@ -4381,17 +4381,17 @@ Kleo::CryptoConfigEntry* SMIMECryptoConfigEntries::configEntry( const char* comp //// -QString SecurityPage::CryptPlugTab::helpAnchor() const { - return QString::fromLatin1("configure-security-crypto-backends"); +TQString SecurityPage::CryptPlugTab::helpAnchor() const { + return TQString::fromLatin1("configure-security-crypto-backends"); } -SecurityPageCryptPlugTab::SecurityPageCryptPlugTab( QWidget * parent, const char * name ) +SecurityPageCryptPlugTab::SecurityPageCryptPlugTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { - QVBoxLayout * vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQVBoxLayout * vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); mBackendConfig = Kleo::CryptoBackendFactory::instance()->configWidget( this, "mBackendConfig" ); - connect( mBackendConfig, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) ); + connect( mBackendConfig, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) ); vlay->addWidget( mBackendConfig ); } @@ -4414,11 +4414,11 @@ void SecurityPage::CryptPlugTab::save() { // * MiscPage * // * * // ************************************************************* -QString MiscPage::helpAnchor() const { - return QString::fromLatin1("configure-misc"); +TQString MiscPage::helpAnchor() const { + return TQString::fromLatin1("configure-misc"); } -MiscPage::MiscPage( QWidget * parent, const char * name ) +MiscPage::MiscPage( TQWidget * parent, const char * name ) : ConfigModuleWithTabs( parent, name ) { mFolderTab = new FolderTab(); @@ -4429,43 +4429,43 @@ MiscPage::MiscPage( QWidget * parent, const char * name ) load(); } -QString MiscPage::FolderTab::helpAnchor() const { - return QString::fromLatin1("configure-misc-folders"); +TQString MiscPage::FolderTab::helpAnchor() const { + return TQString::fromLatin1("configure-misc-folders"); } -MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name ) +MiscPageFolderTab::MiscPageFolderTab( TQWidget * parent, const char * name ) : ConfigModuleTab( parent, name ) { // temp. vars: - QVBoxLayout *vlay; - QHBoxLayout *hlay; - QLabel *label; + TQVBoxLayout *vlay; + TQHBoxLayout *hlay; + TQLabel *label; - vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); // "confirm before emptying folder" check box: stretch 0 mEmptyFolderConfirmCheck = - new QCheckBox( i18n("Corresponds to Folder->Move All Messages to Trash", + new TQCheckBox( i18n("Corresponds to Folder->Move All Messages to Trash", "Ask for co&nfirmation before moving all messages to " "trash"), this ); vlay->addWidget( mEmptyFolderConfirmCheck ); - connect( mEmptyFolderConfirmCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mEmptyFolderConfirmCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); mExcludeImportantFromExpiry = - new QCheckBox( i18n("E&xclude important messages from expiry"), this ); + new TQCheckBox( i18n("E&xclude important messages from expiry"), this ); vlay->addWidget( mExcludeImportantFromExpiry ); - connect( mExcludeImportantFromExpiry, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mExcludeImportantFromExpiry, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "when trying to find unread messages" combo + label: stretch 0 - hlay = new QHBoxLayout( vlay ); // inherits spacing - mLoopOnGotoUnread = new QComboBox( false, this ); - label = new QLabel( mLoopOnGotoUnread, + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mLoopOnGotoUnread = new TQComboBox( false, this ); + label = new TQLabel( mLoopOnGotoUnread, i18n("to be continued with \"do not loop\", \"loop in current folder\", " "and \"loop in all folders\".", "When trying to find unread messages:"), this ); - mLoopOnGotoUnread->insertStringList( QStringList() + mLoopOnGotoUnread->insertStringList( TQStringList() << i18n("continuation of \"When trying to find unread messages:\"", "Do not Loop") << i18n("continuation of \"When trying to find unread messages:\"", @@ -4474,18 +4474,18 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name ) "Loop in All Folders")); hlay->addWidget( label ); hlay->addWidget( mLoopOnGotoUnread, 1 ); - connect( mLoopOnGotoUnread, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mLoopOnGotoUnread, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // when entering a folder - hlay = new QHBoxLayout( vlay ); // inherits spacing - mActionEnterFolder = new QComboBox( false, this ); - label = new QLabel( mActionEnterFolder, + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mActionEnterFolder = new TQComboBox( false, this ); + label = new TQLabel( mActionEnterFolder, i18n("to be continued with \"jump to first new message\", " "\"jump to first unread or new message\"," "and \"jump to last selected message\".", "When entering a folder:"), this ); - mActionEnterFolder->insertStringList( QStringList() + mActionEnterFolder->insertStringList( TQStringList() << i18n("continuation of \"When entering a folder:\"", "Jump to First New Message") << i18n("continuation of \"When entering a folder:\"", @@ -4494,11 +4494,11 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name ) "Jump to Last Selected Message")); hlay->addWidget( label ); hlay->addWidget( mActionEnterFolder, 1 ); - connect( mActionEnterFolder, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mActionEnterFolder, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - hlay = new QHBoxLayout( vlay ); // inherits spacing - mDelayedMarkAsRead = new QCheckBox( i18n("Mar&k selected message as read after"), this ); + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mDelayedMarkAsRead = new TQCheckBox( i18n("Mar&k selected message as read after"), this ); hlay->addWidget( mDelayedMarkAsRead ); mDelayedMarkTime = new KIntSpinBox( 0 /*min*/, 60 /*max*/, 1/*step*/, 0 /*init*/, 10 /*base*/, this); @@ -4506,34 +4506,34 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name ) mDelayedMarkTime->setEnabled( false ); // since mDelayedMarkAsREad is off hlay->addWidget( mDelayedMarkTime ); hlay->addStretch( 1 ); - connect( mDelayedMarkTime, SIGNAL( valueChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - connect( mDelayedMarkAsRead, SIGNAL(toggled(bool)), - mDelayedMarkTime, SLOT(setEnabled(bool))); - connect( mDelayedMarkAsRead, SIGNAL(toggled(bool)), - this , SLOT(slotEmitChanged( void ))); + connect( mDelayedMarkTime, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + connect( mDelayedMarkAsRead, TQT_SIGNAL(toggled(bool)), + mDelayedMarkTime, TQT_SLOT(setEnabled(bool))); + connect( mDelayedMarkAsRead, TQT_SIGNAL(toggled(bool)), + this , TQT_SLOT(slotEmitChanged( void ))); // "show popup after Drag'n'Drop" checkbox: stretch 0 mShowPopupAfterDnD = - new QCheckBox( i18n("Ask for action after &dragging messages to another folder"), this ); + new TQCheckBox( i18n("Ask for action after &dragging messages to another folder"), this ); vlay->addWidget( mShowPopupAfterDnD ); - connect( mShowPopupAfterDnD, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mShowPopupAfterDnD, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "default mailbox format" combo + label: stretch 0 - hlay = new QHBoxLayout( vlay ); // inherits spacing - mMailboxPrefCombo = new QComboBox( false, this ); - label = new QLabel( mMailboxPrefCombo, + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mMailboxPrefCombo = new TQComboBox( false, this ); + label = new TQLabel( mMailboxPrefCombo, i18n("to be continued with \"flat files\" and " "\"directories\", resp.", "By default, &message folders on disk are:"), this ); - mMailboxPrefCombo->insertStringList( QStringList() + mMailboxPrefCombo->insertStringList( TQStringList() << i18n("continuation of \"By default, &message folders on disk are\"", "Flat Files (\"mbox\" format)") << i18n("continuation of \"By default, &message folders on disk are\"", "Directories (\"maildir\" format)") ); - // and now: add QWhatsThis: - QString msg = i18n( "what's this help", + // and now: add TQWhatsThis: + TQString msg = i18n( "what's this help", "

    This selects which mailbox format will be " "the default for local folders:

    " "

    mbox: KMail's mail " @@ -4547,52 +4547,52 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name ) "are separate files. This may waste a bit of space on " "disk, but should be more robust, e.g. when moving " "messages between folders.

    "); - QWhatsThis::add( mMailboxPrefCombo, msg ); - QWhatsThis::add( label, msg ); + TQWhatsThis::add( mMailboxPrefCombo, msg ); + TQWhatsThis::add( label, msg ); hlay->addWidget( label ); hlay->addWidget( mMailboxPrefCombo, 1 ); - connect( mMailboxPrefCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mMailboxPrefCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "On startup..." option: - hlay = new QHBoxLayout( vlay ); // inherits spacing + hlay = new TQHBoxLayout( vlay ); // inherits spacing mOnStartupOpenFolder = new FolderRequester( this, kmkernel->getKMMainWidget()->folderTree() ); - label = new QLabel( mOnStartupOpenFolder, + label = new TQLabel( mOnStartupOpenFolder, i18n("Open this folder on startup:"), this ); hlay->addWidget( label ); hlay->addWidget( mOnStartupOpenFolder, 1 ); - connect( mOnStartupOpenFolder, SIGNAL( folderChanged( KMFolder* ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mOnStartupOpenFolder, TQT_SIGNAL( folderChanged( KMFolder* ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // "Empty &trash on program exit" option: - hlay = new QHBoxLayout( vlay ); // inherits spacing - mEmptyTrashCheck = new QCheckBox( i18n("Empty local &trash folder on program exit"), + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mEmptyTrashCheck = new TQCheckBox( i18n("Empty local &trash folder on program exit"), this ); hlay->addWidget( mEmptyTrashCheck ); - connect( mEmptyTrashCheck, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mEmptyTrashCheck, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); #ifdef HAVE_INDEXLIB // indexing enabled option: - mIndexingEnabled = new QCheckBox( i18n("Enable full text &indexing"), this ); + mIndexingEnabled = new TQCheckBox( i18n("Enable full text &indexing"), this ); vlay->addWidget( mIndexingEnabled ); - connect( mIndexingEnabled, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mIndexingEnabled, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); #endif // "Quota Units" - hlay = new QHBoxLayout( vlay ); // inherits spacing - mQuotaCmbBox = new QComboBox( false, this ); - label = new QLabel( mQuotaCmbBox, + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mQuotaCmbBox = new TQComboBox( false, this ); + label = new TQLabel( mQuotaCmbBox, i18n("Quota units: "), this ); - mQuotaCmbBox->insertStringList( QStringList() + mQuotaCmbBox->insertStringList( TQStringList() << i18n("KB") << i18n("MB") << i18n("GB") ); hlay->addWidget( label ); hlay->addWidget( mQuotaCmbBox, 1 ); - connect( mQuotaCmbBox, SIGNAL( activated( int ) ), this, SLOT( slotEmitChanged( void ) ) ); + connect( mQuotaCmbBox, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotEmitChanged( void ) ) ); vlay->addStretch( 1 ); @@ -4610,7 +4610,7 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name ) "

    Similarly, when searching for the previous unread message, " "the search will start from the bottom of the message list and continue to " "the previous folder depending on which option is selected.

    " ); - QWhatsThis::add( mLoopOnGotoUnread, msg ); + TQWhatsThis::add( mLoopOnGotoUnread, msg ); #ifdef HAVE_INDEXLIB // this is probably overly pessimistic @@ -4625,7 +4625,7 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name ) "" ); - QWhatsThis::add( mIndexingEnabled, msg ); + TQWhatsThis::add( mIndexingEnabled, msg ); #endif } @@ -4664,7 +4664,7 @@ void MiscPage::FolderTab::save() { general.writeEntry( "confirm-before-empty", mEmptyFolderConfirmCheck->isChecked() ); general.writeEntry( "default-mailbox-format", mMailboxPrefCombo->currentItem() ); general.writeEntry( "startupFolder", mOnStartupOpenFolder->folder() ? - mOnStartupOpenFolder->folder()->idString() : QString::null ); + mOnStartupOpenFolder->folder()->idString() : TQString::null ); GlobalSettings::self()->setDelayedMarkAsRead( mDelayedMarkAsRead->isChecked() ); GlobalSettings::self()->setDelayedMarkTime( mDelayedMarkTime->value() ); @@ -4679,83 +4679,83 @@ void MiscPage::FolderTab::save() { #endif } -QString MiscPage::GroupwareTab::helpAnchor() const { - return QString::fromLatin1("configure-misc-groupware"); +TQString MiscPage::GroupwareTab::helpAnchor() const { + return TQString::fromLatin1("configure-misc-groupware"); } -MiscPageGroupwareTab::MiscPageGroupwareTab( QWidget* parent, const char* name ) +MiscPageGroupwareTab::MiscPageGroupwareTab( TQWidget* parent, const char* name ) : ConfigModuleTab( parent, name ) { - QBoxLayout* vlay = new QVBoxLayout( this, KDialog::marginHint(), + TQBoxLayout* vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); vlay->setAutoAdd( true ); // IMAP resource setup - QVGroupBox* b1 = new QVGroupBox( i18n("&IMAP Resource Folder Options"), + TQVGroupBox* b1 = new TQVGroupBox( i18n("&IMAP Resource Folder Options"), this ); mEnableImapResCB = - new QCheckBox( i18n("&Enable IMAP resource functionality"), b1 ); - QToolTip::add( mEnableImapResCB, i18n( "This enables the IMAP storage for " + new TQCheckBox( i18n("&Enable IMAP resource functionality"), b1 ); + TQToolTip::add( mEnableImapResCB, i18n( "This enables the IMAP storage for " "the Kontact applications" ) ); - QWhatsThis::add( mEnableImapResCB, + TQWhatsThis::add( mEnableImapResCB, i18n( GlobalSettings::self()->theIMAPResourceEnabledItem()->whatsThis().utf8() ) ); - connect( mEnableImapResCB, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mEnableImapResCB, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - mBox = new QWidget( b1 ); - QGridLayout* grid = new QGridLayout( mBox, 5, 2, 0, KDialog::spacingHint() ); + mBox = new TQWidget( b1 ); + TQGridLayout* grid = new TQGridLayout( mBox, 5, 2, 0, KDialog::spacingHint() ); grid->setColStretch( 1, 1 ); - connect( mEnableImapResCB, SIGNAL( toggled(bool) ), - mBox, SLOT( setEnabled(bool) ) ); + connect( mEnableImapResCB, TQT_SIGNAL( toggled(bool) ), + mBox, TQT_SLOT( setEnabled(bool) ) ); - QLabel* storageFormatLA = new QLabel( i18n("&Format used for the groupware folders:"), + TQLabel* storageFormatLA = new TQLabel( i18n("&Format used for the groupware folders:"), mBox ); - QString toolTip = i18n( "Choose the format to use to store the contents of the groupware folders." ); - QString whatsThis = i18n( GlobalSettings::self() + TQString toolTip = i18n( "Choose the format to use to store the contents of the groupware folders." ); + TQString whatsThis = i18n( GlobalSettings::self() ->theIMAPResourceStorageFormatItem()->whatsThis().utf8() ); grid->addWidget( storageFormatLA, 0, 0 ); - QToolTip::add( storageFormatLA, toolTip ); - QWhatsThis::add( storageFormatLA, whatsThis ); - mStorageFormatCombo = new QComboBox( false, mBox ); + TQToolTip::add( storageFormatLA, toolTip ); + TQWhatsThis::add( storageFormatLA, whatsThis ); + mStorageFormatCombo = new TQComboBox( false, mBox ); storageFormatLA->setBuddy( mStorageFormatCombo ); - QStringList formatLst; + TQStringList formatLst; formatLst << i18n("Standard (Ical / Vcard)") << i18n("Kolab (XML)"); mStorageFormatCombo->insertStringList( formatLst ); grid->addWidget( mStorageFormatCombo, 0, 1 ); - QToolTip::add( mStorageFormatCombo, toolTip ); - QWhatsThis::add( mStorageFormatCombo, whatsThis ); - connect( mStorageFormatCombo, SIGNAL( activated( int ) ), - this, SLOT( slotStorageFormatChanged( int ) ) ); + TQToolTip::add( mStorageFormatCombo, toolTip ); + TQWhatsThis::add( mStorageFormatCombo, whatsThis ); + connect( mStorageFormatCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotStorageFormatChanged( int ) ) ); - QLabel* languageLA = new QLabel( i18n("&Language of the groupware folders:"), + TQLabel* languageLA = new TQLabel( i18n("&Language of the groupware folders:"), mBox ); toolTip = i18n( "Set the language of the folder names" ); whatsThis = i18n( GlobalSettings::self() ->theIMAPResourceFolderLanguageItem()->whatsThis().utf8() ); grid->addWidget( languageLA, 1, 0 ); - QToolTip::add( languageLA, toolTip ); - QWhatsThis::add( languageLA, whatsThis ); - mLanguageCombo = new QComboBox( false, mBox ); + TQToolTip::add( languageLA, toolTip ); + TQWhatsThis::add( languageLA, whatsThis ); + mLanguageCombo = new TQComboBox( false, mBox ); languageLA->setBuddy( mLanguageCombo ); - QStringList lst; + TQStringList lst; lst << i18n("English") << i18n("German") << i18n("French") << i18n("Dutch"); mLanguageCombo->insertStringList( lst ); grid->addWidget( mLanguageCombo, 1, 1 ); - QToolTip::add( mLanguageCombo, toolTip ); - QWhatsThis::add( mLanguageCombo, whatsThis ); - connect( mLanguageCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + TQToolTip::add( mLanguageCombo, toolTip ); + TQWhatsThis::add( mLanguageCombo, whatsThis ); + connect( mLanguageCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - mFolderComboLabel = new QLabel( mBox ); // text depends on storage format + mFolderComboLabel = new TQLabel( mBox ); // text depends on storage format toolTip = i18n( "Set the parent of the resource folders" ); whatsThis = i18n( GlobalSettings::self()->theIMAPResourceFolderParentItem()->whatsThis().utf8() ); - QToolTip::add( mFolderComboLabel, toolTip ); - QWhatsThis::add( mFolderComboLabel, whatsThis ); + TQToolTip::add( mFolderComboLabel, toolTip ); + TQWhatsThis::add( mFolderComboLabel, whatsThis ); grid->addWidget( mFolderComboLabel, 2, 0 ); - mFolderComboStack = new QWidgetStack( mBox ); + mFolderComboStack = new TQWidgetStack( mBox ); grid->addWidget( mFolderComboStack, 2, 1 ); // First possibility in the widgetstack: a combo showing the list of all folders @@ -4763,108 +4763,108 @@ MiscPageGroupwareTab::MiscPageGroupwareTab( QWidget* parent, const char* name ) mFolderCombo = new FolderRequester( mBox, kmkernel->getKMMainWidget()->folderTree() ); mFolderComboStack->addWidget( mFolderCombo, 0 ); - QToolTip::add( mFolderCombo, toolTip ); - QWhatsThis::add( mFolderCombo, whatsThis ); - connect( mFolderCombo, SIGNAL( folderChanged( KMFolder* ) ), - this, SLOT( slotEmitChanged() ) ); + TQToolTip::add( mFolderCombo, toolTip ); + TQWhatsThis::add( mFolderCombo, whatsThis ); + connect( mFolderCombo, TQT_SIGNAL( folderChanged( KMFolder* ) ), + this, TQT_SLOT( slotEmitChanged() ) ); // Second possibility in the widgetstack: a combo showing the list of accounts // This is used with the kolab xml storage since the groupware folders // are always under the inbox. mAccountCombo = new KMail::AccountComboBox( mBox ); mFolderComboStack->addWidget( mAccountCombo, 1 ); - QToolTip::add( mAccountCombo, toolTip ); - QWhatsThis::add( mAccountCombo, whatsThis ); - connect( mAccountCombo, SIGNAL( activated( int ) ), - this, SLOT( slotEmitChanged() ) ); + TQToolTip::add( mAccountCombo, toolTip ); + TQWhatsThis::add( mAccountCombo, whatsThis ); + connect( mAccountCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotEmitChanged() ) ); - mHideGroupwareFolders = new QCheckBox( i18n( "&Hide groupware folders" ), + mHideGroupwareFolders = new TQCheckBox( i18n( "&Hide groupware folders" ), mBox, "HideGroupwareFoldersBox" ); grid->addMultiCellWidget( mHideGroupwareFolders, 3, 3, 0, 0 ); - QToolTip::add( mHideGroupwareFolders, + TQToolTip::add( mHideGroupwareFolders, i18n( "When this is checked, you will not see the IMAP " "resource folders in the folder tree." ) ); - QWhatsThis::add( mHideGroupwareFolders, i18n( GlobalSettings::self() + TQWhatsThis::add( mHideGroupwareFolders, i18n( GlobalSettings::self() ->hideGroupwareFoldersItem()->whatsThis().utf8() ) ); - connect( mHideGroupwareFolders, SIGNAL( toggled( bool ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mHideGroupwareFolders, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotEmitChanged() ) ); - mOnlyShowGroupwareFolders = new QCheckBox( i18n( "&Only show groupware folders for this account" ), + mOnlyShowGroupwareFolders = new TQCheckBox( i18n( "&Only show groupware folders for this account" ), mBox, "OnlyGroupwareFoldersBox" ); grid->addMultiCellWidget( mOnlyShowGroupwareFolders, 3, 3, 1, 1 ); - QToolTip::add( mOnlyShowGroupwareFolders, + TQToolTip::add( mOnlyShowGroupwareFolders, i18n( "When this is checked, you will not see normal " "mail folders in the folder tree for the account " "configured for groupware." ) ); - QWhatsThis::add( mOnlyShowGroupwareFolders, i18n( GlobalSettings::self() + TQWhatsThis::add( mOnlyShowGroupwareFolders, i18n( GlobalSettings::self() ->showOnlyGroupwareFoldersForGroupwareAccountItem()->whatsThis().utf8() ) ); - connect( mOnlyShowGroupwareFolders, SIGNAL( toggled( bool ) ), - this, SLOT( slotEmitChanged() ) ); + connect( mOnlyShowGroupwareFolders, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotEmitChanged() ) ); - mSyncImmediately = new QCheckBox( i18n( "Synchronize groupware changes immediately" ), mBox ); - QToolTip::add( mSyncImmediately, + mSyncImmediately = new TQCheckBox( i18n( "Synchronize groupware changes immediately" ), mBox ); + TQToolTip::add( mSyncImmediately, i18n( "Synchronize groupware changes in disconnected IMAP folders immediately when being online." ) ); - connect( mSyncImmediately, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); + connect( mSyncImmediately, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); grid->addMultiCellWidget( mSyncImmediately, 4, 4, 0, 1 ); - mDeleteInvitations = new QCheckBox( + mDeleteInvitations = new TQCheckBox( i18n( GlobalSettings::self()->deleteInvitationEmailsAfterSendingReplyItem()->label().utf8() ), mBox ); - QWhatsThis::add( mDeleteInvitations, i18n( GlobalSettings::self() + TQWhatsThis::add( mDeleteInvitations, i18n( GlobalSettings::self() ->deleteInvitationEmailsAfterSendingReplyItem()->whatsThis().utf8() ) ); - connect( mDeleteInvitations, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) ); + connect( mDeleteInvitations, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) ); grid->addMultiCellWidget( mDeleteInvitations, 5, 5, 0, 1 ); // Groupware functionality compatibility setup - b1 = new QVGroupBox( i18n("Groupware Compatibility && Legacy Options"), this ); + b1 = new TQVGroupBox( i18n("Groupware Compatibility && Legacy Options"), this ); - gBox = new QVBox( b1 ); + gBox = new TQVBox( b1 ); #if 0 // Currently believed to be disused. - mEnableGwCB = new QCheckBox( i18n("&Enable groupware functionality"), b1 ); + mEnableGwCB = new TQCheckBox( i18n("&Enable groupware functionality"), b1 ); gBox->setSpacing( KDialog::spacingHint() ); - connect( mEnableGwCB, SIGNAL( toggled(bool) ), - gBox, SLOT( setEnabled(bool) ) ); - connect( mEnableGwCB, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mEnableGwCB, TQT_SIGNAL( toggled(bool) ), + gBox, TQT_SLOT( setEnabled(bool) ) ); + connect( mEnableGwCB, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); #endif mEnableGwCB = 0; - mLegacyMangleFromTo = new QCheckBox( i18n( "Mangle From:/To: headers in replies to invitations" ), gBox ); - QToolTip::add( mLegacyMangleFromTo, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitation replies" ) ); - QWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()-> + mLegacyMangleFromTo = new TQCheckBox( i18n( "Mangle From:/To: headers in replies to invitations" ), gBox ); + TQToolTip::add( mLegacyMangleFromTo, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitation replies" ) ); + TQWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()-> legacyMangleFromToHeadersItem()->whatsThis().utf8() ) ); - connect( mLegacyMangleFromTo, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - mLegacyBodyInvites = new QCheckBox( i18n( "Send invitations in the mail body" ), gBox ); - QToolTip::add( mLegacyBodyInvites, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitations" ) ); - QWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()-> + connect( mLegacyMangleFromTo, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + mLegacyBodyInvites = new TQCheckBox( i18n( "Send invitations in the mail body" ), gBox ); + TQToolTip::add( mLegacyBodyInvites, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitations" ) ); + TQWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()-> legacyBodyInvitesItem()->whatsThis().utf8() ) ); - connect( mLegacyBodyInvites, SIGNAL( toggled( bool ) ), - this, SLOT( slotLegacyBodyInvitesToggled( bool ) ) ); - connect( mLegacyBodyInvites, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); - - mExchangeCompatibleInvitations = new QCheckBox( i18n( "Exchange compatible invitation naming" ), gBox ); - QToolTip::add( mExchangeCompatibleInvitations, i18n( "Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding standards-compliant groupware e-mail. Turn this option on to send groupware invitations in a way that Microsoft Exchange understands." ) ); - QWhatsThis::add( mExchangeCompatibleInvitations, i18n( GlobalSettings::self()-> + connect( mLegacyBodyInvites, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotLegacyBodyInvitesToggled( bool ) ) ); + connect( mLegacyBodyInvites, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); + + mExchangeCompatibleInvitations = new TQCheckBox( i18n( "Exchange compatible invitation naming" ), gBox ); + TQToolTip::add( mExchangeCompatibleInvitations, i18n( "Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding standards-compliant groupware e-mail. Turn this option on to send groupware invitations in a way that Microsoft Exchange understands." ) ); + TQWhatsThis::add( mExchangeCompatibleInvitations, i18n( GlobalSettings::self()-> exchangeCompatibleInvitationsItem()->whatsThis().utf8() ) ); - connect( mExchangeCompatibleInvitations, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mExchangeCompatibleInvitations, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); - mAutomaticSending = new QCheckBox( i18n( "Automatic invitation sending" ), gBox ); - QToolTip::add( mAutomaticSending, i18n( "When this is on, the user will not see the mail composer window. Invitation mails are sent automatically" ) ); - QWhatsThis::add( mAutomaticSending, i18n( GlobalSettings::self()-> + mAutomaticSending = new TQCheckBox( i18n( "Automatic invitation sending" ), gBox ); + TQToolTip::add( mAutomaticSending, i18n( "When this is on, the user will not see the mail composer window. Invitation mails are sent automatically" ) ); + TQWhatsThis::add( mAutomaticSending, i18n( GlobalSettings::self()-> automaticSendingItem()->whatsThis().utf8() ) ); - connect( mAutomaticSending, SIGNAL( stateChanged( int ) ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mAutomaticSending, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); // Open space padding at the end - new QLabel( this ); + new TQLabel( this ); } void MiscPageGroupwareTab::slotLegacyBodyInvitesToggled( bool on ) { if ( on ) { - QString txt = i18n( "Invitations are normally sent as attachments to " + TQString txt = i18n( "Invitations are normally sent as attachments to " "a mail. This switch changes the invitation mails to " "be sent in the text of the mail instead; this is " "necessary to send invitations and replies to " @@ -4875,7 +4875,7 @@ void MiscPageGroupwareTab::slotLegacyBodyInvitesToggled( bool on ) "resulting messages look very odd.
    People that have email " "programs that do understand invitations will still " "be able to work with this.
    " ); - KMessageBox::information( this, txt, QString::null, + KMessageBox::information( this, txt, TQString::null, "LegacyBodyInvitesWarning" ); } // Invitations in the body are autosent in any case (no point in editing raw ICAL) @@ -4914,7 +4914,7 @@ void MiscPage::GroupwareTab::doLoadFromGlobalSettings() { mSyncImmediately->setChecked( GlobalSettings::self()->immediatlySyncDIMAPOnGroupwareChanges() ); mDeleteInvitations->setChecked( GlobalSettings::self()->deleteInvitationEmailsAfterSendingReply() ); - QString folderId( GlobalSettings::self()->theIMAPResourceFolderParent() ); + TQString folderId( GlobalSettings::self()->theIMAPResourceFolderParent() ); if( !folderId.isNull() && kmkernel->findFolderById( folderId ) ) { mFolderCombo->setFolder( folderId ); } else { @@ -4980,7 +4980,7 @@ void MiscPage::GroupwareTab::save() { // If there is a leftover folder in the foldercombo, getFolder can // return 0. In that case we really don't have it enabled - QString folderId; + TQString folderId; if ( format == 0 ) { KMFolder* folder = mFolderCombo->folder(); if ( folder ) @@ -5007,7 +5007,7 @@ void MiscPage::GroupwareTab::save() { // Inbox folder of the selected account KMAccount* acct = mAccountCombo->currentAccount(); if ( acct ) { - folderId = QString( ".%1.directory/INBOX" ).arg( acct->id() ); + folderId = TQString( ".%1.directory/INBOX" ).arg( acct->id() ); GlobalSettings::self()->setTheIMAPResourceAccount( acct->id() ); } } @@ -5039,15 +5039,15 @@ void MiscPage::GroupwareTab::slotStorageFormatChanged( int format ) // * * // ************************************************************* AccountUpdater::AccountUpdater(ImapAccountBase *account) - : QObject() + : TQObject() { mAccount = account; } void AccountUpdater::update() { - connect( mAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( namespacesFetched() ) ); + connect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( namespacesFetched() ) ); mAccount->makeConnection(); } diff --git a/kmail/configuredialog.h b/kmail/configuredialog.h index 408a9d3f..f9c32731 100644 --- a/kmail/configuredialog.h +++ b/kmail/configuredialog.h @@ -22,7 +22,7 @@ #ifndef _CONFIGURE_DIALOG_H_ #define _CONFIGURE_DIALOG_H_ -#include +#include #include class KConfig; @@ -36,7 +36,7 @@ class ConfigureDialog : public KCMultiDialog Q_OBJECT public: - ConfigureDialog( QWidget *parent=0, const char *name=0, bool modal=true ); + ConfigureDialog( TQWidget *parent=0, const char *name=0, bool modal=true ); ~ConfigureDialog(); signals: @@ -49,7 +49,7 @@ signals: */ void installProfile( KConfig *profile ); protected: - void hideEvent( QHideEvent *i ); + void hideEvent( TQHideEvent *i ); protected slots: /** @reimplemented * Saves the GlobalSettings stuff before passing on to KCMultiDialog. @@ -67,7 +67,7 @@ protected slots: void slotUser2(); private: - QGuardedPtr mProfileDialog; + TQGuardedPtr mProfileDialog; }; /** @@ -75,7 +75,7 @@ private: * This has to be done a-synchronically due to the nature of the account, so this object * takes care of that. */ -class AccountUpdater : public QObject { +class AccountUpdater : public TQObject { Q_OBJECT public: AccountUpdater(KMail::ImapAccountBase *account); diff --git a/kmail/configuredialog_p.cpp b/kmail/configuredialog_p.cpp index 2b716b2d..5cc86ccc 100644 --- a/kmail/configuredialog_p.cpp +++ b/kmail/configuredialog_p.cpp @@ -26,61 +26,61 @@ #include // Qt headers: -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // Other headers: #include -NewIdentityDialog::NewIdentityDialog( const QStringList & identities, - QWidget *parent, const char *name, +NewIdentityDialog::NewIdentityDialog( const TQStringList & identities, + TQWidget *parent, const char *name, bool modal ) : KDialogBase( parent, name, modal, i18n("New Identity"), Ok|Cancel|Help, Ok, true ) { - setHelp( QString::fromLatin1("configure-identity-newidentitydialog") ); - QWidget * page = makeMainWidget(); - QVBoxLayout * vlay = new QVBoxLayout( page, 0, spacingHint() ); + setHelp( TQString::fromLatin1("configure-identity-newidentitydialog") ); + TQWidget * page = makeMainWidget(); + TQVBoxLayout * vlay = new TQVBoxLayout( page, 0, spacingHint() ); // row 0: line edit with label - QHBoxLayout * hlay = new QHBoxLayout( vlay ); // inherits spacing + TQHBoxLayout * hlay = new TQHBoxLayout( vlay ); // inherits spacing mLineEdit = new KLineEdit( page ); mLineEdit->setFocus(); - hlay->addWidget( new QLabel( mLineEdit, i18n("&New identity:"), page ) ); + hlay->addWidget( new TQLabel( mLineEdit, i18n("&New identity:"), page ) ); hlay->addWidget( mLineEdit, 1 ); - connect( mLineEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotEnableOK(const QString&)) ); + connect( mLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotEnableOK(const TQString&)) ); - mButtonGroup = new QButtonGroup( page ); + mButtonGroup = new TQButtonGroup( page ); mButtonGroup->hide(); // row 1: radio button - QRadioButton *radio = new QRadioButton( i18n("&With empty fields"), page ); + TQRadioButton *radio = new TQRadioButton( i18n("&With empty fields"), page ); radio->setChecked( true ); mButtonGroup->insert( radio, Empty ); vlay->addWidget( radio ); // row 2: radio button - radio = new QRadioButton( i18n("&Use Control Center settings"), page ); + radio = new TQRadioButton( i18n("&Use Control Center settings"), page ); mButtonGroup->insert( radio, ControlCenter ); vlay->addWidget( radio ); // row 3: radio button - radio = new QRadioButton( i18n("&Duplicate existing identity"), page ); + radio = new TQRadioButton( i18n("&Duplicate existing identity"), page ); mButtonGroup->insert( radio, ExistingEntry ); vlay->addWidget( radio ); // row 4: combobox with existing identities and label - hlay = new QHBoxLayout( vlay ); // inherits spacing - mComboBox = new QComboBox( false, page ); + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mComboBox = new TQComboBox( false, page ); mComboBox->insertStringList( identities ); mComboBox->setEnabled( false ); - QLabel *label = new QLabel( mComboBox, i18n("&Existing identities:"), page ); + TQLabel *label = new TQLabel( mComboBox, i18n("&Existing identities:"), page ); label->setEnabled( false ); hlay->addWidget( label ); hlay->addWidget( mComboBox, 1 ); @@ -89,10 +89,10 @@ NewIdentityDialog::NewIdentityDialog( const QStringList & identities, // enable/disable combobox and label depending on the third radio // button's state: - connect( radio, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); - connect( radio, SIGNAL(toggled(bool)), - mComboBox, SLOT(setEnabled(bool)) ); + connect( radio, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); + connect( radio, TQT_SIGNAL(toggled(bool)), + mComboBox, TQT_SLOT(setEnabled(bool)) ); enableButtonOK( false ); // since line edit is empty } @@ -105,9 +105,9 @@ NewIdentityDialog::DuplicateMode NewIdentityDialog::duplicateMode() const { return static_cast( id ); } -void NewIdentityDialog::slotEnableOK( const QString & proposedIdentityName ) { +void NewIdentityDialog::slotEnableOK( const TQString & proposedIdentityName ) { // OK button is disabled if - QString name = proposedIdentityName.stripWhiteSpace(); + TQString name = proposedIdentityName.stripWhiteSpace(); // name isn't empty if ( name.isEmpty() ) { enableButtonOK( false ); @@ -122,7 +122,7 @@ void NewIdentityDialog::slotEnableOK( const QString & proposedIdentityName ) { enableButtonOK( true ); } -ListView::ListView( QWidget *parent, const char *name, +ListView::ListView( TQWidget *parent, const char *name, int visibleItem ) : KListView( parent, name ) { @@ -130,14 +130,14 @@ ListView::ListView( QWidget *parent, const char *name, } -void ListView::resizeEvent( QResizeEvent *e ) +void ListView::resizeEvent( TQResizeEvent *e ) { KListView::resizeEvent(e); resizeColums(); } -void ListView::showEvent( QShowEvent *e ) +void ListView::showEvent( TQShowEvent *e ) { KListView::showEvent(e); resizeColums(); @@ -169,16 +169,16 @@ void ListView::setVisibleItem( int visibleItem, bool updateSize ) mVisibleItem = QMAX( 1, visibleItem ); if( updateSize == true ) { - QSize s = sizeHint(); + TQSize s = sizeHint(); setMinimumSize( s.width() + verticalScrollBar()->sizeHint().width() + lineWidth() * 2, s.height() ); } } -QSize ListView::sizeHint() const +TQSize ListView::sizeHint() const { - QSize s = QListView::sizeHint(); + TQSize s = TQListView::sizeHint(); int h = fontMetrics().height() + 2*itemMargin(); if( h % 2 > 0 ) { h++; } @@ -188,45 +188,45 @@ QSize ListView::sizeHint() const } -static QString flagPng = QString::fromLatin1("/flag.png"); +static TQString flagPng = TQString::fromLatin1("/flag.png"); NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, - QWidget *parent, const char *name, + TQWidget *parent, const char *name, bool modal ) : KDialogBase( parent, name, modal, i18n("New Language"), Ok|Cancel, Ok, true ) { // layout the page (a combobox with label): - QWidget *page = makeMainWidget(); - QHBoxLayout *hlay = new QHBoxLayout( page, 0, spacingHint() ); - mComboBox = new QComboBox( false, page ); - hlay->addWidget( new QLabel( mComboBox, i18n("Choose &language:"), page ) ); + TQWidget *page = makeMainWidget(); + TQHBoxLayout *hlay = new TQHBoxLayout( page, 0, spacingHint() ); + mComboBox = new TQComboBox( false, page ); + hlay->addWidget( new TQLabel( mComboBox, i18n("Choose &language:"), page ) ); hlay->addWidget( mComboBox, 1 ); - QStringList pathList = KGlobal::dirs()->findAllResources( "locale", - QString::fromLatin1("*/entry.desktop") ); + TQStringList pathList = KGlobal::dirs()->findAllResources( "locale", + TQString::fromLatin1("*/entry.desktop") ); // extract a list of language tags that should not be included: - QStringList suppressedAcronyms; + TQStringList suppressedAcronyms; for ( LanguageItemList::Iterator lit = suppressedLangs.begin(); lit != suppressedLangs.end(); ++lit ) suppressedAcronyms << (*lit).mLanguage; // populate the combo box: - for ( QStringList::ConstIterator it = pathList.begin(); + for ( TQStringList::ConstIterator it = pathList.begin(); it != pathList.end(); ++it ) { KSimpleConfig entry( *it ); entry.setGroup( "KCM Locale" ); // full name: - QString name = entry.readEntry( "Name" ); + TQString name = entry.readEntry( "Name" ); // {2,3}-letter abbreviation: // we extract it from the path: "/prefix/de/entry.desktop" -> "de" - QString acronym = (*it).section( '/', -2, -2 ); + TQString acronym = (*it).section( '/', -2, -2 ); if ( suppressedAcronyms.find( acronym ) == suppressedAcronyms.end() ) { // not found: - QString displayname = QString::fromLatin1("%1 (%2)") + TQString displayname = TQString::fromLatin1("%1 (%2)") .arg( name ).arg( acronym ); - QPixmap flag( locate("locale", acronym + flagPng ) ); + TQPixmap flag( locate("locale", acronym + flagPng ) ); mComboBox->insertItem( flag, displayname ); } } @@ -236,40 +236,40 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, } else mComboBox->listBox()->sort(); } -QString NewLanguageDialog::language() const +TQString NewLanguageDialog::language() const { - QString s = mComboBox->currentText(); + TQString s = mComboBox->currentText(); int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } -LanguageComboBox::LanguageComboBox( bool rw, QWidget *parent, const char *name ) - : QComboBox( rw, parent, name ) +LanguageComboBox::LanguageComboBox( bool rw, TQWidget *parent, const char *name ) + : TQComboBox( rw, parent, name ) { } -int LanguageComboBox::insertLanguage( const QString & language ) +int LanguageComboBox::insertLanguage( const TQString & language ) { - static QString entryDesktop = QString::fromLatin1("/entry.desktop"); + static TQString entryDesktop = TQString::fromLatin1("/entry.desktop"); KSimpleConfig entry( locate("locale", language + entryDesktop) ); entry.setGroup( "KCM Locale" ); - QString name = entry.readEntry( "Name" ); - QString output = QString::fromLatin1("%1 (%2)").arg( name ).arg( language ); - insertItem( QPixmap( locate("locale", language + flagPng ) ), output ); + TQString name = entry.readEntry( "Name" ); + TQString output = TQString::fromLatin1("%1 (%2)").arg( name ).arg( language ); + insertItem( TQPixmap( locate("locale", language + flagPng ) ), output ); return listBox()->index( listBox()->findItem(output) ); } -QString LanguageComboBox::language() const +TQString LanguageComboBox::language() const { - QString s = currentText(); + TQString s = currentText(); int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } -void LanguageComboBox::setLanguage( const QString & language ) +void LanguageComboBox::setLanguage( const TQString & language ) { - QString parenthizedLanguage = QString::fromLatin1("(%1)").arg( language ); + TQString parenthizedLanguage = TQString::fromLatin1("(%1)").arg( language ); for (int i = 0; i < count(); i++) // ### FIXME: use .endWith(): if ( text(i).find( parenthizedLanguage ) >= 0 ) { @@ -284,12 +284,12 @@ void LanguageComboBox::setLanguage( const QString & language ) // // -ProfileDialog::ProfileDialog( QWidget * parent, const char * name, bool modal ) +ProfileDialog::ProfileDialog( TQWidget * parent, const char * name, bool modal ) : KDialogBase( parent, name, modal, i18n("Load Profile"), Ok|Cancel, Ok, true ) { // tmp. vars: - QWidget * page = makeMainWidget(); - QVBoxLayout * vlay = new QVBoxLayout( page, 0, spacingHint() ); + TQWidget * page = makeMainWidget(); + TQVBoxLayout * vlay = new TQVBoxLayout( page, 0, spacingHint() ); mListView = new KListView( page, "mListView" ); mListView->addColumn( i18n("Available Profiles") ); @@ -298,19 +298,19 @@ ProfileDialog::ProfileDialog( QWidget * parent, const char * name, bool modal ) mListView->setAllColumnsShowFocus( true ); mListView->setSorting( -1 ); - vlay->addWidget( new QLabel( mListView, + vlay->addWidget( new TQLabel( mListView, i18n("&Select a profile and click 'OK' to " "load its settings:"), page ) ); vlay->addWidget( mListView, 1 ); setup(); - connect( mListView, SIGNAL(selectionChanged()), - SLOT(slotSelectionChanged()) ); - connect( mListView, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int ) ), - SLOT(slotOk()) ); + connect( mListView, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotSelectionChanged()) ); + connect( mListView, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), + TQT_SLOT(slotOk()) ); - connect( this, SIGNAL(finished()), SLOT(delayedDestruct()) ); + connect( this, TQT_SIGNAL(finished()), TQT_SLOT(delayedDestruct()) ); enableButtonOK( false ); } @@ -323,31 +323,31 @@ void ProfileDialog::slotSelectionChanged() void ProfileDialog::setup() { mListView->clear(); // find all profiles (config files named "profile-xyz-rc"): - const QString profileFilenameFilter = QString::fromLatin1("kmail/profile-*-rc"); + const TQString profileFilenameFilter = TQString::fromLatin1("kmail/profile-*-rc"); mProfileList = KGlobal::dirs()->findAllResources( "data", profileFilenameFilter ); kdDebug(5006) << "Profile manager: found " << mProfileList.count() << " profiles:" << endl; // build the list and populate the list view: - QListViewItem * listItem = 0; - for ( QStringList::const_iterator it = mProfileList.begin() ; + TQListViewItem * listItem = 0; + for ( TQStringList::const_iterator it = mProfileList.begin() ; it != mProfileList.end() ; ++it ) { KConfig profile( *it, true /* read-only */, false /* no KDE global */ ); profile.setGroup("KMail Profile"); - QString name = profile.readEntry( "Name" ); + TQString name = profile.readEntry( "Name" ); if ( name.isEmpty() ) { kdWarning(5006) << "File \"" << (*it) << "\" doesn't provide a profile name!" << endl; name = i18n("Missing profile name placeholder","Unnamed"); } - QString desc = profile.readEntry( "Comment" ); + TQString desc = profile.readEntry( "Comment" ); if ( desc.isEmpty() ) { kdWarning(5006) << "File \"" << (*it) << "\" doesn't provide a description!" << endl; desc = i18n("Missing profile description placeholder","Not available"); } - listItem = new QListViewItem( mListView, listItem, name, desc ); + listItem = new TQListViewItem( mListView, listItem, name, desc ); } } @@ -364,19 +364,19 @@ void ProfileDialog::slotOk() { } -ConfigModuleWithTabs::ConfigModuleWithTabs( QWidget * parent, +ConfigModuleWithTabs::ConfigModuleWithTabs( TQWidget * parent, const char * name ) : ConfigModule( parent, name ) { - QVBoxLayout *vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() ); - mTabWidget = new QTabWidget( this ); + TQVBoxLayout *vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); + mTabWidget = new TQTabWidget( this ); vlay->addWidget( mTabWidget ); } -void ConfigModuleWithTabs::addTab( ConfigModuleTab* tab, const QString & title ) { +void ConfigModuleWithTabs::addTab( ConfigModuleTab* tab, const TQString & title ) { mTabWidget->addTab( tab, title ); - connect( tab, SIGNAL(changed( bool )), - this, SIGNAL(changed( bool )) ); + connect( tab, TQT_SIGNAL(changed( bool )), + this, TQT_SIGNAL(changed( bool )) ); } void ConfigModuleWithTabs::load() { diff --git a/kmail/configuredialog_p.h b/kmail/configuredialog_p.h index 79c2a885..4a332109 100644 --- a/kmail/configuredialog_p.h +++ b/kmail/configuredialog_p.h @@ -6,12 +6,12 @@ #define _CONFIGURE_DIALOG_PRIVATE_H_ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -49,7 +49,7 @@ class TemplatesConfiguration; class CustomTemplates; class QGroupBox; class QVGroupBox; -#include +#include class QLineEdit; class KMMsgTagDesc; class KListBox; @@ -81,20 +81,20 @@ class NewIdentityDialog : public KDialogBase public: enum DuplicateMode { Empty, ControlCenter, ExistingEntry }; - NewIdentityDialog( const QStringList & identities, - QWidget *parent=0, const char *name=0, bool modal=true ); + NewIdentityDialog( const TQStringList & identities, + TQWidget *parent=0, const char *name=0, bool modal=true ); - QString identityName() const { return mLineEdit->text(); } - QString duplicateIdentity() const { return mComboBox->currentText(); } + TQString identityName() const { return mLineEdit->text(); } + TQString duplicateIdentity() const { return mComboBox->currentText(); } DuplicateMode duplicateMode() const; protected slots: - virtual void slotEnableOK( const QString & ); + virtual void slotEnableOK( const TQString & ); private: - QLineEdit *mLineEdit; - QComboBox *mComboBox; - QButtonGroup *mButtonGroup; + TQLineEdit *mLineEdit; + TQComboBox *mComboBox; + TQButtonGroup *mButtonGroup; }; @@ -107,29 +107,29 @@ private: struct LanguageItem { LanguageItem() {} - LanguageItem( const QString & language, const QString & reply=QString::null, - const QString & replyAll=QString::null, - const QString & forward=QString::null, - const QString & indentPrefix=QString::null ) : + LanguageItem( const TQString & language, const TQString & reply=TQString::null, + const TQString & replyAll=TQString::null, + const TQString & forward=TQString::null, + const TQString & indentPrefix=TQString::null ) : mLanguage( language ), mReply( reply ), mReplyAll( replyAll ), mForward( forward ), mIndentPrefix( indentPrefix ) {} - QString mLanguage, mReply, mReplyAll, mForward, mIndentPrefix; + TQString mLanguage, mReply, mReplyAll, mForward, mIndentPrefix; }; -typedef QValueList LanguageItemList; +typedef TQValueList LanguageItemList; class NewLanguageDialog : public KDialogBase { Q_OBJECT public: - NewLanguageDialog( LanguageItemList & suppressedLangs, QWidget *parent=0, + NewLanguageDialog( LanguageItemList & suppressedLangs, TQWidget *parent=0, const char *name=0, bool modal=true ); - QString language() const; + TQString language() const; private: - QComboBox *mComboBox; + TQComboBox *mComboBox; }; @@ -138,10 +138,10 @@ class LanguageComboBox : public QComboBox Q_OBJECT public: - LanguageComboBox( bool rw, QWidget *parent=0, const char *name=0 ); - int insertLanguage( const QString & language ); - QString language() const; - void setLanguage( const QString & language ); + LanguageComboBox( bool rw, TQWidget *parent=0, const char *name=0 ); + int insertLanguage( const TQString & language ); + TQString language() const; + void setLanguage( const TQString & language ); }; // @@ -153,7 +153,7 @@ class LanguageComboBox : public QComboBox class ProfileDialog : public KDialogBase { Q_OBJECT public: - ProfileDialog( QWidget * parent=0, const char * name=0, bool modal=false ); + ProfileDialog( TQWidget * parent=0, const char * name=0, bool modal=false ); signals: void profileSelected( KConfig * profile ); @@ -167,14 +167,14 @@ private: private: KListView *mListView; - QStringList mProfileList; + TQStringList mProfileList; }; #include class ConfigModule : public KCModule { Q_OBJECT public: - ConfigModule( QWidget * parent=0, const char * name=0 ) + ConfigModule( TQWidget * parent=0, const char * name=0 ) : KCModule ( parent, name ) {} ~ConfigModule() {} @@ -184,7 +184,7 @@ public: virtual void defaults() {} /** Should return the help anchor for this page or tab */ - virtual QString helpAnchor() const = 0; + virtual TQString helpAnchor() const = 0; signals: /** Emitted when the installation of a profile is @@ -198,11 +198,11 @@ signals: // Individual tab of a ConfigModuleWithTabs -class ConfigModuleTab : public QWidget { +class ConfigModuleTab : public TQWidget { Q_OBJECT public: - ConfigModuleTab( QWidget *parent=0, const char* name=0 ) - :QWidget( parent, name ) + ConfigModuleTab( TQWidget *parent=0, const char* name=0 ) + :TQWidget( parent, name ) {} ~ConfigModuleTab() {} void load(); @@ -235,7 +235,7 @@ private: class ConfigModuleWithTabs : public ConfigModule { Q_OBJECT public: - ConfigModuleWithTabs( QWidget * parent=0, const char * name=0 ); + ConfigModuleWithTabs( TQWidget * parent=0, const char * name=0 ); ~ConfigModuleWithTabs() {} // don't reimplement any of those methods @@ -245,10 +245,10 @@ public: virtual void installProfile( KConfig * profile ); protected: - void addTab( ConfigModuleTab* tab, const QString & title ); + void addTab( ConfigModuleTab* tab, const TQString & title ); private: - QTabWidget *mTabWidget; + TQTabWidget *mTabWidget; }; @@ -262,16 +262,16 @@ private: class KDE_EXPORT IdentityPage : public ConfigModule { Q_OBJECT public: - IdentityPage( QWidget * parent=0, const char * name=0 ); + IdentityPage( TQWidget * parent=0, const char * name=0 ); ~IdentityPage() {} - QString helpAnchor() const; + TQString helpAnchor() const; void load(); void save(); public slots: - void slotUpdateTransportCombo( const QStringList & ); + void slotUpdateTransportCombo( const TQStringList & ); private slots: void slotNewIdentity(); @@ -282,8 +282,8 @@ private slots: void slotRenameIdentity(); /** connected to @p mIdentityList's renamed() signal. Validates the new name and sets it in the KPIM::IdentityManager */ - void slotRenameIdentity( QListViewItem *, const QString &, int ); - void slotContextMenu( KListView*, QListViewItem *, const QPoint & ); + void slotRenameIdentity( TQListViewItem *, const TQString &, int ); + void slotContextMenu( KListView*, TQListViewItem *, const TQPoint & ); void slotSetAsDefault(); void slotIdentitySelectionChanged(); @@ -295,10 +295,10 @@ private: // data members int mOldNumberOfIdentities; KMail::IdentityListView * mIdentityList; - QPushButton * mModifyButton; - QPushButton * mRenameButton; - QPushButton * mRemoveButton; - QPushButton * mSetAsDefaultButton; + TQPushButton * mModifyButton; + TQPushButton * mRenameButton; + TQPushButton * mRemoveButton; + TQPushButton * mSetAsDefaultButton; }; @@ -312,12 +312,12 @@ private: // data members class AccountsPageSendingTab : public ConfigModuleTab { Q_OBJECT public: - AccountsPageSendingTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + AccountsPageSendingTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); signals: - void transportListChanged( const QStringList & ); + void transportListChanged( const TQStringList & ); private slots: void slotTransportSelected(); @@ -333,29 +333,29 @@ private: private: ListView *mTransportList; - QPushButton *mModifyTransportButton; - QPushButton *mRemoveTransportButton; - QPushButton *mSetDefaultTransportButton; - QCheckBox *mConfirmSendCheck; - QComboBox *mSendOnCheckCombo; - QComboBox *mSendMethodCombo; - QComboBox *mMessagePropertyCombo; - QLineEdit *mDefaultDomainEdit; - - QPtrList< KMTransportInfo > mTransportInfoList; + TQPushButton *mModifyTransportButton; + TQPushButton *mRemoveTransportButton; + TQPushButton *mSetDefaultTransportButton; + TQCheckBox *mConfirmSendCheck; + TQComboBox *mSendOnCheckCombo; + TQComboBox *mSendMethodCombo; + TQComboBox *mMessagePropertyCombo; + TQLineEdit *mDefaultDomainEdit; + + TQPtrList< KMTransportInfo > mTransportInfoList; }; class AccountsPageReceivingTab : public ConfigModuleTab { Q_OBJECT public: - AccountsPageReceivingTab( QWidget * parent=0, const char * name=0 ); + AccountsPageReceivingTab( TQWidget * parent=0, const char * name=0 ); ~AccountsPageReceivingTab(); - QString helpAnchor() const; + TQString helpAnchor() const; void save(); signals: - void accountListChanged( const QStringList & ); + void accountListChanged( const TQStringList & ); private slots: void slotAccountSelected(); @@ -369,32 +369,32 @@ private: virtual void doLoadFromGlobalSettings(); virtual void doLoadOther(); //FIXME virtual void doResetToDefaultsOther(); - QStringList occupiedNames(); + TQStringList occupiedNames(); private: ListView *mAccountList; - QPushButton *mModifyAccountButton; - QPushButton *mRemoveAccountButton; - QCheckBox *mBeepNewMailCheck; - QCheckBox *mVerboseNotificationCheck; - QCheckBox *mCheckmailStartupCheck; - QPushButton *mOtherNewMailActionsButton; - - QValueList< QGuardedPtr > mAccountsToDelete; - QValueList< QGuardedPtr > mNewAccounts; + TQPushButton *mModifyAccountButton; + TQPushButton *mRemoveAccountButton; + TQCheckBox *mBeepNewMailCheck; + TQCheckBox *mVerboseNotificationCheck; + TQCheckBox *mCheckmailStartupCheck; + TQPushButton *mOtherNewMailActionsButton; + + TQValueList< TQGuardedPtr > mAccountsToDelete; + TQValueList< TQGuardedPtr > mNewAccounts; struct ModifiedAccountsType { - QGuardedPtr< KMAccount > oldAccount; - QGuardedPtr< KMAccount > newAccount; + TQGuardedPtr< KMAccount > oldAccount; + TQGuardedPtr< KMAccount > newAccount; }; // ### make this value-based: - QValueList< ModifiedAccountsType* > mModifiedAccounts; + TQValueList< ModifiedAccountsType* > mModifiedAccounts; }; class KDE_EXPORT AccountsPage : public ConfigModuleWithTabs { Q_OBJECT public: - AccountsPage( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + AccountsPage( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; // hrmpf. moc doesn't like nested classes with slots/signals...: @@ -402,8 +402,8 @@ public: typedef AccountsPageReceivingTab ReceivingTab; signals: - void transportListChanged( const QStringList & ); - void accountListChanged( const QStringList & ); + void transportListChanged( const TQStringList & ); + void accountListChanged( const TQStringList & ); private: SendingTab *mSendingTab; @@ -420,8 +420,8 @@ private: class AppearancePageFontsTab : public ConfigModuleTab { Q_OBJECT public: - AppearancePageFontsTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + AppearancePageFontsTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -436,19 +436,19 @@ private: void updateFontSelector(); private: - QCheckBox *mCustomFontCheck; - QComboBox *mFontLocationCombo; + TQCheckBox *mCustomFontCheck; + TQComboBox *mFontLocationCombo; KFontChooser *mFontChooser; int mActiveFontIndex; - QFont mFont[14]; + TQFont mFont[14]; }; class AppearancePageColorsTab : public ConfigModuleTab { Q_OBJECT public: - AppearancePageColorsTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + AppearancePageColorsTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -459,17 +459,17 @@ private: //FIXME virtual void doResetToDefaultsOther(); private: - QCheckBox *mCustomColorCheck; + TQCheckBox *mCustomColorCheck; ColorListBox *mColorList; - QCheckBox *mRecycleColorCheck; - QSpinBox *mCloseToQuotaThreshold; + TQCheckBox *mRecycleColorCheck; + TQSpinBox *mCloseToQuotaThreshold; }; class AppearancePageLayoutTab : public ConfigModuleTab { Q_OBJECT public: - AppearancePageLayoutTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + AppearancePageLayoutTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -480,20 +480,20 @@ private: //FIXME virtual void doResetToDefaultsOther(); private: // data - QButtonGroup *mFolderListGroup; - QButtonGroup *mMIMETreeLocationGroup; - QButtonGroup *mMIMETreeModeGroup; - QButtonGroup *mReaderWindowModeGroup; - QCheckBox *mFavoriteFolderViewCB; - QCheckBox *mFolderQuickSearchCB; + TQButtonGroup *mFolderListGroup; + TQButtonGroup *mMIMETreeLocationGroup; + TQButtonGroup *mMIMETreeModeGroup; + TQButtonGroup *mReaderWindowModeGroup; + TQCheckBox *mFavoriteFolderViewCB; + TQCheckBox *mFolderQuickSearchCB; }; class AppearancePageHeadersTab : public ConfigModuleTab { Q_OBJECT public: - AppearancePageHeadersTab( QWidget * parent=0, const char * name=0 ); + AppearancePageHeadersTab( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -502,25 +502,25 @@ private: // methods //virtual void doLoadFromGlobalSettings(); virtual void doLoadOther(); //FIXME virtual void doResetToDefaultsOther(); - void setDateDisplay( int id, const QString & format ); + void setDateDisplay( int id, const TQString & format ); private: // data - QCheckBox *mShowQuickSearch; - QCheckBox *mMessageSizeCheck; - QCheckBox *mAttachmentCheck; - QCheckBox *mNestedMessagesCheck; - QCheckBox *mCryptoIconsCheck; - QButtonGroup *mNestingPolicy; - QButtonGroup *mDateDisplay; - QLineEdit *mCustomDateFormatEdit; + TQCheckBox *mShowQuickSearch; + TQCheckBox *mMessageSizeCheck; + TQCheckBox *mAttachmentCheck; + TQCheckBox *mNestedMessagesCheck; + TQCheckBox *mCryptoIconsCheck; + TQButtonGroup *mNestingPolicy; + TQButtonGroup *mDateDisplay; + TQLineEdit *mCustomDateFormatEdit; }; class AppearancePageReaderTab : public ConfigModuleTab { Q_OBJECT public: - AppearancePageReaderTab( QWidget * parent=0, const char * name=0 ); + AppearancePageReaderTab( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -533,23 +533,23 @@ private: void readCurrentOverrideCodec(); private: // data - QCheckBox *mShowColorbarCheck; - QCheckBox *mShowSpamStatusCheck; - QCheckBox *mShowEmoticonsCheck; - QCheckBox *mShowExpandQuotesMark; + TQCheckBox *mShowColorbarCheck; + TQCheckBox *mShowSpamStatusCheck; + TQCheckBox *mShowEmoticonsCheck; + TQCheckBox *mShowExpandQuotesMark; KIntSpinBox *mCollapseQuoteLevelSpin; - QCheckBox *mShrinkQuotesCheck; - QComboBox *mCharsetCombo; - QComboBox *mOverrideCharsetCombo; + TQCheckBox *mShrinkQuotesCheck; + TQComboBox *mCharsetCombo; + TQComboBox *mOverrideCharsetCombo; }; class AppearancePageSystemTrayTab : public ConfigModuleTab { Q_OBJECT public: - AppearancePageSystemTrayTab( QWidget * parent=0, const char * name=0 ); + AppearancePageSystemTrayTab( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -558,16 +558,16 @@ private: virtual void doLoadFromGlobalSettings(); private: // data - QCheckBox *mSystemTrayCheck; - QButtonGroup *mSystemTrayGroup; + TQCheckBox *mSystemTrayCheck; + TQButtonGroup *mSystemTrayGroup; }; class KDE_EXPORT AppearancePage : public ConfigModuleWithTabs { Q_OBJECT public: - AppearancePage( QWidget * parent=0, const char * name=0 ); + AppearancePage( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; // hrmpf. moc doesn't like nested classes with slots/signals...: typedef AppearancePageFontsTab FontsTab; @@ -595,8 +595,8 @@ private: class ComposerPageGeneralTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPageGeneralTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPageGeneralTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -608,31 +608,31 @@ private: virtual void doLoadFromGlobalSettings(); private: - QCheckBox *mAutoAppSignFileCheck; - QCheckBox *mTopQuoteCheck; - QCheckBox *mSmartQuoteCheck; - QCheckBox *mAutoRequestMDNCheck; + TQCheckBox *mAutoAppSignFileCheck; + TQCheckBox *mTopQuoteCheck; + TQCheckBox *mSmartQuoteCheck; + TQCheckBox *mAutoRequestMDNCheck; QCheckBox *mShowRecentAddressesInComposer; - QCheckBox *mWordWrapCheck; + TQCheckBox *mWordWrapCheck; KIntSpinBox *mWrapColumnSpin; KIntSpinBox *mAutoSave; - QCheckBox *mExternalEditorCheck; + TQCheckBox *mExternalEditorCheck; KURLRequester *mEditorRequester; }; class ComposerPagePhrasesTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPagePhrasesTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPagePhrasesTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); private slots: void slotNewLanguage(); void slotRemoveLanguage(); - void slotLanguageChanged( const QString& ); - void slotAddNewLanguage( const QString& ); + void slotLanguageChanged( const TQString& ); + void slotAddNewLanguage( const TQString& ); private: virtual void doLoadFromGlobalSettings(); @@ -641,11 +641,11 @@ private: private: LanguageComboBox *mPhraseLanguageCombo; - QPushButton *mRemoveButton; - QLineEdit *mPhraseReplyEdit; - QLineEdit *mPhraseReplyAllEdit; - QLineEdit *mPhraseForwardEdit; - QLineEdit *mPhraseIndentPrefixEdit; + TQPushButton *mRemoveButton; + TQLineEdit *mPhraseReplyEdit; + TQLineEdit *mPhraseReplyAllEdit; + TQLineEdit *mPhraseForwardEdit; + TQLineEdit *mPhraseIndentPrefixEdit; int mActiveLanguageItem; LanguageItemList mLanguageList; @@ -654,8 +654,8 @@ private: class ComposerPageTemplatesTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPageTemplatesTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPageTemplatesTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); @@ -671,8 +671,8 @@ private: class ComposerPageCustomTemplatesTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPageCustomTemplatesTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPageCustomTemplatesTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); @@ -688,8 +688,8 @@ private: class ComposerPageSubjectTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPageSubjectTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPageSubjectTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); @@ -698,21 +698,21 @@ private: private: SimpleStringListEditor *mReplyListEditor; - QCheckBox *mReplaceReplyPrefixCheck; + TQCheckBox *mReplaceReplyPrefixCheck; SimpleStringListEditor *mForwardListEditor; - QCheckBox *mReplaceForwardPrefixCheck; + TQCheckBox *mReplaceForwardPrefixCheck; }; class ComposerPageCharsetTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPageCharsetTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPageCharsetTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); private slots: - void slotVerifyCharset(QString&); + void slotVerifyCharset(TQString&); private: //virtual void doLoadFromGlobalSettings(); @@ -721,21 +721,21 @@ private: private: SimpleStringListEditor *mCharsetListEditor; - QCheckBox *mKeepReplyCharsetCheck; + TQCheckBox *mKeepReplyCharsetCheck; }; class ComposerPageHeadersTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPageHeadersTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPageHeadersTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); private slots: void slotMimeHeaderSelectionChanged(); - void slotMimeHeaderNameChanged( const QString & ); - void slotMimeHeaderValueChanged( const QString & ); + void slotMimeHeaderNameChanged( const TQString & ); + void slotMimeHeaderValueChanged( const TQString & ); void slotNewMimeHeader(); void slotRemoveMimeHeader(); @@ -745,22 +745,22 @@ private: //FIXME virtual void doResetToDefaultsOther(); private: - QCheckBox *mCreateOwnMessageIdCheck; - QLineEdit *mMessageIdSuffixEdit; - QRegExpValidator *mMessageIdSuffixValidator; - QListView *mTagList; - QPushButton *mRemoveHeaderButton; - QLineEdit *mTagNameEdit; - QLineEdit *mTagValueEdit; - QLabel *mTagNameLabel; - QLabel *mTagValueLabel; + TQCheckBox *mCreateOwnMessageIdCheck; + TQLineEdit *mMessageIdSuffixEdit; + TQRegExpValidator *mMessageIdSuffixValidator; + TQListView *mTagList; + TQPushButton *mRemoveHeaderButton; + TQLineEdit *mTagNameEdit; + TQLineEdit *mTagValueEdit; + TQLabel *mTagNameLabel; + TQLabel *mTagValueLabel; }; class ComposerPageAttachmentsTab : public ConfigModuleTab { Q_OBJECT public: - ComposerPageAttachmentsTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + ComposerPageAttachmentsTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); @@ -772,17 +772,17 @@ private: //FIXME virtual void doResetToDefaultsOther(); private: - QCheckBox *mOutlookCompatibleCheck; - QCheckBox *mMissingAttachmentDetectionCheck; + TQCheckBox *mOutlookCompatibleCheck; + TQCheckBox *mMissingAttachmentDetectionCheck; SimpleStringListEditor *mAttachWordsListEditor; }; class KDE_EXPORT ComposerPage : public ConfigModuleWithTabs { Q_OBJECT public: - ComposerPage( QWidget * parent=0, const char * name=0 ); + ComposerPage( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; // hrmpf. moc doesn't like nested classes with slots/signals...: typedef ComposerPageGeneralTab GeneralTab; @@ -814,8 +814,8 @@ private: class SecurityPageGeneralTab : public ConfigModuleTab { Q_OBJECT public: - SecurityPageGeneralTab( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + SecurityPageGeneralTab( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -826,22 +826,22 @@ private: //FIXME virtual void doResetToDefaultsOther(); private: - QCheckBox *mExternalReferences; - QCheckBox *mHtmlMailCheck; - QCheckBox *mNoMDNsWhenEncryptedCheck; - QButtonGroup *mMDNGroup; - QButtonGroup *mOrigQuoteGroup; - QCheckBox *mAutomaticallyImportAttachedKeysCheck; - QCheckBox *mAlwaysDecrypt; + TQCheckBox *mExternalReferences; + TQCheckBox *mHtmlMailCheck; + TQCheckBox *mNoMDNsWhenEncryptedCheck; + TQButtonGroup *mMDNGroup; + TQButtonGroup *mOrigQuoteGroup; + TQCheckBox *mAutomaticallyImportAttachedKeysCheck; + TQCheckBox *mAlwaysDecrypt; }; class SecurityPageComposerCryptoTab : public ConfigModuleTab { Q_OBJECT public: - SecurityPageComposerCryptoTab( QWidget * parent=0, const char * name=0 ); + SecurityPageComposerCryptoTab( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -858,9 +858,9 @@ private: class SecurityPageWarningTab : public ConfigModuleTab { Q_OBJECT public: - SecurityPageWarningTab( QWidget * parent=0, const char * name=0 ); + SecurityPageWarningTab( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; void save(); void installProfile( KConfig * profile ); @@ -881,10 +881,10 @@ class SecurityPageSMimeTab : public ConfigModuleTab, public DCOPObject { Q_OBJECT K_DCOP public: - SecurityPageSMimeTab( QWidget * parent=0, const char * name=0 ); + SecurityPageSMimeTab( TQWidget * parent=0, const char * name=0 ); ~SecurityPageSMimeTab(); - QString helpAnchor() const; + TQString helpAnchor() const; // Can't use k_dcop here. dcopidl can't parse this file, dcopidlng has a namespace bug. void save(); @@ -907,10 +907,10 @@ class SecurityPageCryptPlugTab : public ConfigModuleTab { Q_OBJECT public: - SecurityPageCryptPlugTab( QWidget * parent = 0, const char* name = 0 ); + SecurityPageCryptPlugTab( TQWidget * parent = 0, const char* name = 0 ); ~SecurityPageCryptPlugTab(); - QString helpAnchor() const; + TQString helpAnchor() const; void save(); @@ -925,9 +925,9 @@ private: class KDE_EXPORT SecurityPage : public ConfigModuleWithTabs { Q_OBJECT public: - SecurityPage( QWidget * parent=0, const char * name=0 ); + SecurityPage( TQWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + TQString helpAnchor() const; // OpenPGP tab is special: void installProfile( KConfig * profile ); @@ -956,10 +956,10 @@ private: class MiscPageFolderTab : public ConfigModuleTab { Q_OBJECT public: - MiscPageFolderTab( QWidget * parent=0, const char * name=0 ); + MiscPageFolderTab( TQWidget * parent=0, const char * name=0 ); void save(); - QString helpAnchor() const; + TQString helpAnchor() const; private: virtual void doLoadFromGlobalSettings(); @@ -967,28 +967,28 @@ private: //FIXME virtual void doResetToDefaultsOther(); private: - QCheckBox *mEmptyFolderConfirmCheck; - QCheckBox *mExcludeImportantFromExpiry; - QComboBox *mLoopOnGotoUnread; - QComboBox *mMailboxPrefCombo; - QComboBox *mActionEnterFolder; - QCheckBox *mEmptyTrashCheck; + TQCheckBox *mEmptyFolderConfirmCheck; + TQCheckBox *mExcludeImportantFromExpiry; + TQComboBox *mLoopOnGotoUnread; + TQComboBox *mMailboxPrefCombo; + TQComboBox *mActionEnterFolder; + TQCheckBox *mEmptyTrashCheck; #ifdef HAVE_INDEXLIB - QCheckBox *mIndexingEnabled; + TQCheckBox *mIndexingEnabled; #endif - QCheckBox *mDelayedMarkAsRead; + TQCheckBox *mDelayedMarkAsRead; KIntSpinBox *mDelayedMarkTime; - QCheckBox *mShowPopupAfterDnD; + TQCheckBox *mShowPopupAfterDnD; KMail::FolderRequester *mOnStartupOpenFolder; - QComboBox *mQuotaCmbBox; + TQComboBox *mQuotaCmbBox; }; class MiscPageGroupwareTab : public ConfigModuleTab { Q_OBJECT public: - MiscPageGroupwareTab( QWidget * parent=0, const char * name=0 ); + MiscPageGroupwareTab( TQWidget * parent=0, const char * name=0 ); void save(); - QString helpAnchor() const; + TQString helpAnchor() const; private slots: void slotStorageFormatChanged( int ); @@ -998,36 +998,36 @@ private: virtual void doLoadFromGlobalSettings(); private: - QCheckBox* mEnableGwCB; - QCheckBox* mEnableImapResCB; + TQCheckBox* mEnableGwCB; + TQCheckBox* mEnableImapResCB; - QWidget* mBox; - QVBox* gBox; + TQWidget* mBox; + TQVBox* gBox; - QComboBox* mStorageFormatCombo; - QComboBox* mLanguageCombo; + TQComboBox* mStorageFormatCombo; + TQComboBox* mLanguageCombo; - QLabel* mFolderComboLabel; - QWidgetStack* mFolderComboStack; + TQLabel* mFolderComboLabel; + TQWidgetStack* mFolderComboStack; KMail::FolderRequester* mFolderCombo; // in the widgetstack KMail::AccountComboBox* mAccountCombo; // in the widgetstack - QCheckBox* mHideGroupwareFolders; - QCheckBox* mOnlyShowGroupwareFolders; - QCheckBox* mSyncImmediately; - QCheckBox* mDeleteInvitations; + TQCheckBox* mHideGroupwareFolders; + TQCheckBox* mOnlyShowGroupwareFolders; + TQCheckBox* mSyncImmediately; + TQCheckBox* mDeleteInvitations; - QCheckBox* mLegacyMangleFromTo; - QCheckBox* mLegacyBodyInvites; - QCheckBox* mExchangeCompatibleInvitations; - QCheckBox* mAutomaticSending; + TQCheckBox* mLegacyMangleFromTo; + TQCheckBox* mLegacyBodyInvites; + TQCheckBox* mExchangeCompatibleInvitations; + TQCheckBox* mAutomaticSending; }; class KDE_EXPORT MiscPage : public ConfigModuleWithTabs { Q_OBJECT public: - MiscPage( QWidget * parent=0, const char * name=0 ); - QString helpAnchor() const; + MiscPage( TQWidget * parent=0, const char * name=0 ); + TQString helpAnchor() const; typedef MiscPageFolderTab FolderTab; typedef MiscPageGroupwareTab GroupwareTab; @@ -1046,15 +1046,15 @@ private: class ListView : public KListView { Q_OBJECT public: - ListView( QWidget *parent=0, const char *name=0, int visibleItem=10 ); + ListView( TQWidget *parent=0, const char *name=0, int visibleItem=10 ); void resizeColums(); void setVisibleItem( int visibleItem, bool updateSize=true ); - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; protected: - virtual void resizeEvent( QResizeEvent *e ); - virtual void showEvent( QShowEvent *e ); + virtual void resizeEvent( TQResizeEvent *e ); + virtual void showEvent( TQShowEvent *e ); private: int mVisibleItem; diff --git a/kmail/copyfolderjob.cpp b/kmail/copyfolderjob.cpp index 0328e3df..ddfa6d25 100644 --- a/kmail/copyfolderjob.cpp +++ b/kmail/copyfolderjob.cpp @@ -81,7 +81,7 @@ void CopyFolderJob::copyMessagesToTargetDir() // Hmmmm. Tasty hack. Can I have fries with that? mStorage->blockSignals( true ); // move all messages to the new folder - QPtrList msgList; + TQPtrList msgList; for ( int i = 0; i < mStorage->count(); i++ ) { const KMMsgBase* msgBase = mStorage->getMsgBase( i ); @@ -95,8 +95,8 @@ void CopyFolderJob::copyMessagesToTargetDir() slotCopyNextChild(); // no contents, check subfolders } else { KMCommand *command = new KMCopyCommand( mNewFolder, msgList ); - connect( command, SIGNAL( completed( KMCommand * ) ), - this, SLOT( slotCopyCompleted( KMCommand * ) ) ); + connect( command, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( slotCopyCompleted( KMCommand * ) ) ); command->start(); } } @@ -104,8 +104,8 @@ void CopyFolderJob::copyMessagesToTargetDir() void CopyFolderJob::slotCopyCompleted( KMCommand* command ) { kdDebug(5006) << k_funcinfo << (command?command->result():0) << endl; - disconnect( command, SIGNAL( completed( KMCommand * ) ), - this, SLOT( slotCopyCompleted( KMCommand * ) ) ); + disconnect( command, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( slotCopyCompleted( KMCommand * ) ) ); mStorage->blockSignals( false ); @@ -160,8 +160,8 @@ void CopyFolderJob::slotCopyNextChild( bool success ) // let it do its thing and report back when we are ready to do the next sibling mNextChildFolder->open( "copyfolder" ); // refcount FolderJob* job = new CopyFolderJob( mNextChildFolder->storage(), dir); - connect( job, SIGNAL( folderCopyComplete( bool ) ), - this, SLOT( slotCopyNextChild( bool ) ) ); + connect( job, TQT_SIGNAL( folderCopyComplete( bool ) ), + this, TQT_SLOT( slotCopyNextChild( bool ) ) ); job->start(); } @@ -191,13 +191,13 @@ bool CopyFolderJob::createTargetDir() if (anAccount->makeConnection() == ImapAccountBase::Connected) { mNewFolder = kmkernel->imapFolderMgr()->createFolder( mStorage->folder()->name(), false, typenew, mNewParent ); if ( mNewFolder ) { - QString imapPath; + TQString imapPath; imapPath = anAccount->createImapPath( selectedStorage->imapPath(), mStorage->folder()->name() ); KMFolderImap* newStorage = static_cast( mNewFolder->storage() ); - connect( selectedStorage, SIGNAL(folderCreationResult(const QString&, bool)), - this, SLOT(folderCreationDone(const QString&, bool)) ); - selectedStorage->createFolder(mStorage->folder()->name(), QString::null); // create it on the server - newStorage->initializeFrom( selectedStorage, imapPath, QString::null ); + connect( selectedStorage, TQT_SIGNAL(folderCreationResult(const TQString&, bool)), + this, TQT_SLOT(folderCreationDone(const TQString&, bool)) ); + selectedStorage->createFolder(mStorage->folder()->name(), TQString::null); // create it on the server + newStorage->initializeFrom( selectedStorage, imapPath, TQString::null ); static_cast(mNewParent->owner()->storage())->setAccount( selectedStorage->account() ); waitForFolderCreation = true; success = true; @@ -268,7 +268,7 @@ void CopyFolderJob::rollback() deleteLater(); } -void CopyFolderJob::folderCreationDone(const QString & name, bool success) +void CopyFolderJob::folderCreationDone(const TQString & name, bool success) { if ( mStorage->folder()->name() != name ) return; // not our business diff --git a/kmail/copyfolderjob.h b/kmail/copyfolderjob.h index b02be98a..73311a49 100644 --- a/kmail/copyfolderjob.h +++ b/kmail/copyfolderjob.h @@ -30,7 +30,7 @@ #include "folderjob.h" -#include +#include class FolderStorage; class KMFolderDir; @@ -91,17 +91,17 @@ protected slots: /** Called when the online IMAP folder creation finished. */ - void folderCreationDone( const QString &name, bool success ); + void folderCreationDone( const TQString &name, bool success ); signals: /** Emitted when the job is done, check the success bool */ void folderCopyComplete( bool success ); protected: - QGuardedPtr const mStorage; + TQGuardedPtr const mStorage; KMFolderDir* const mNewParent; - QGuardedPtr mNewFolder; - QPtrListIterator mChildFolderNodeIterator; + TQGuardedPtr mNewFolder; + TQPtrListIterator mChildFolderNodeIterator; KMFolder* mNextChildFolder; }; diff --git a/kmail/csshelper.cpp b/kmail/csshelper.cpp index 4fa2588c..fc411be7 100644 --- a/kmail/csshelper.cpp +++ b/kmail/csshelper.cpp @@ -36,12 +36,12 @@ #include -#include -#include +#include +#include namespace KMail { - CSSHelper::CSSHelper( const QPaintDeviceMetrics &pdm ) : + CSSHelper::CSSHelper( const TQPaintDeviceMetrics &pdm ) : KPIM::CSSHelper( pdm ) { KConfig * config = KMKernel::config(); @@ -64,7 +64,7 @@ namespace KMail { cPgpErrH = reader.readColorEntry( "PGPMessageErr", &cPgpErrH ); cHtmlWarning = reader.readColorEntry( "HTMLWarningColor", &cHtmlWarning ); for ( int i = 0 ; i < 3 ; ++i ) { - const QString key = "QuotedText" + QString::number( i+1 ); + const TQString key = "QuotedText" + TQString::number( i+1 ); mQuoteColor[i] = reader.readColorEntry( key, &mQuoteColor[i] ); } } @@ -74,10 +74,10 @@ namespace KMail { mPrintFont = fonts.readFontEntry( "print-font", &mPrintFont); mFixedFont = fonts.readFontEntry( "fixed-font", &mFixedFont); mFixedPrintFont = mFixedFont; // FIXME when we have a separate fixed print font - QFont defaultFont = mBodyFont; + TQFont defaultFont = mBodyFont; defaultFont.setItalic( true ); for ( int i = 0 ; i < 3 ; ++i ) { - const QString key = QString( "quote%1-font" ).arg( i+1 ); + const TQString key = TQString( "quote%1-font" ).arg( i+1 ); mQuoteFont[i] = fonts.readFontEntry( key, &defaultFont ); } } diff --git a/kmail/csshelper.h b/kmail/csshelper.h index eaa82391..7015cec5 100644 --- a/kmail/csshelper.h +++ b/kmail/csshelper.h @@ -38,7 +38,7 @@ namespace KMail { class CSSHelper : public KPIM::CSSHelper { public: - CSSHelper( const QPaintDeviceMetrics &pdm ); + CSSHelper( const TQPaintDeviceMetrics &pdm ); }; } // namespace KMail diff --git a/kmail/customtemplates.cpp b/kmail/customtemplates.cpp index 4030862c..93b24e8f 100644 --- a/kmail/customtemplates.cpp +++ b/kmail/customtemplates.cpp @@ -22,18 +22,18 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -47,10 +47,10 @@ #include "customtemplates.h" -CustomTemplates::CustomTemplates( QWidget *parent, const char *name ) +CustomTemplates::CustomTemplates( TQWidget *parent, const char *name ) :CustomTemplatesBase( parent, name ), mCurrentItem( 0 ) { - QFont f = KGlobalSettings::fixedFont(); + TQFont f = KGlobalSettings::fixedFont(); mEdit->setFont( f ); mAdd->setIconSet( BarIconSet( "add", KIcon::SizeSmall ) ); @@ -61,35 +61,35 @@ CustomTemplates::CustomTemplates( QWidget *parent, const char *name ) mEditFrame->setEnabled( false ); - connect( mEdit, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); + connect( mEdit, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); - connect( mInsertCommand, SIGNAL( insertCommand(QString, int) ), - this, SLOT( slotInsertCommand(QString, int) ) ); + connect( mInsertCommand, TQT_SIGNAL( insertCommand(TQString, int) ), + this, TQT_SLOT( slotInsertCommand(TQString, int) ) ); - connect( mAdd, SIGNAL( clicked() ), - this, SLOT( slotAddClicked() ) ); - connect( mRemove, SIGNAL( clicked() ), - this, SLOT( slotRemoveClicked() ) ); - connect( mList, SIGNAL( selectionChanged() ), - this, SLOT( slotListSelectionChanged() ) ); - connect( mType, SIGNAL( activated( int ) ), - this, SLOT( slotTypeActivated( int ) ) ); + connect( mAdd, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotAddClicked() ) ); + connect( mRemove, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotRemoveClicked() ) ); + connect( mList, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( slotListSelectionChanged() ) ); + connect( mType, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotTypeActivated( int ) ) ); - connect( mKeyButton, SIGNAL( capturedShortcut( const KShortcut& ) ), - this, SLOT( slotShortcutCaptured( const KShortcut& ) ) ); + connect( mKeyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ), + this, TQT_SLOT( slotShortcutCaptured( const KShortcut& ) ) ); mReplyPix = KIconLoader().loadIcon( "mail_reply", KIcon::Small ); mReplyAllPix = KIconLoader().loadIcon( "mail_replyall", KIcon::Small ); mForwardPix = KIconLoader().loadIcon( "mail_forward", KIcon::Small ); mType->clear(); - mType->insertItem( QPixmap(), i18n( "Message->", "Universal" ), TUniversal ); + mType->insertItem( TQPixmap(), i18n( "Message->", "Universal" ), TUniversal ); mType->insertItem( mReplyPix, i18n( "Message->", "Reply" ), TReply ); mType->insertItem( mReplyAllPix, i18n( "Message->", "Reply to All" ), TReplyAll ); mType->insertItem( mForwardPix, i18n( "Message->", "Forward" ), TForward ); - QString help = + TQString help = i18n( "" "

    Here you can add, edit, and delete custom message " "templates to use when you compose a reply or forwarding message. " @@ -109,7 +109,7 @@ CustomTemplates::CustomTemplates( QWidget *parent, const char *name ) CustomTemplates::~CustomTemplates() { - QDictIterator it(mItemList); + TQDictIterator it(mItemList); for ( ; it.current() ; ++it ) { CustomTemplateItem *vitem = mItemList.take( it.currentKey() ); if ( vitem ) { @@ -118,9 +118,9 @@ CustomTemplates::~CustomTemplates() } } -QString CustomTemplates::indexToType( int index ) +TQString CustomTemplates::indexToType( int index ) { - QString typeStr; + TQString typeStr; switch ( index ) { case TUniversal: // typeStr = i18n( "Any" ); break; @@ -146,18 +146,18 @@ void CustomTemplates::slotTextChanged() void CustomTemplates::load() { - QStringList list = GlobalSettings::self()->customTemplates(); - for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = GlobalSettings::self()->customTemplates(); + for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) { CTemplates t(*it); - // QString typeStr = indexToType( t.type() ); - QString typeStr; + // TQString typeStr = indexToType( t.type() ); + TQString typeStr; KShortcut shortcut( t.shortcut() ); CustomTemplateItem *vitem = new CustomTemplateItem( *it, t.content(), shortcut, static_cast( t.type() ) ); mItemList.insert( *it, vitem ); - QListViewItem *item = new QListViewItem( mList, typeStr, *it, t.content() ); + TQListViewItem *item = new TQListViewItem( mList, typeStr, *it, t.content() ); switch ( t.type() ) { case TReply: item->setPixmap( 0, mReplyPix ); @@ -169,7 +169,7 @@ void CustomTemplates::load() item->setPixmap( 0, mForwardPix ); break; default: - item->setPixmap( 0, QPixmap() ); + item->setPixmap( 0, TQPixmap() ); item->setText( 0, indexToType( t.type() ) ); break; }; @@ -185,17 +185,17 @@ void CustomTemplates::save() vitem->mShortcut = mKeyButton->shortcut(); } } - QStringList list; - QListViewItemIterator lit( mList ); + TQStringList list; + TQListViewItemIterator lit( mList ); while ( lit.current() ) { list.append( (*lit)->text( 1 ) ); ++lit; } - QDictIterator it( mItemList ); + TQDictIterator it( mItemList ); for ( ; it.current() ; ++it ) { // list.append( (*it)->mName ); CTemplates t( (*it)->mName ); - QString &content = (*it)->mContent; + TQString &content = (*it)->mContent; if ( content.stripWhiteSpace().isEmpty() ) { content = "%BLANK"; } @@ -212,7 +212,7 @@ void CustomTemplates::save() kmkernel->getKMMainWidget()->updateCustomTemplateMenus(); } -void CustomTemplates::slotInsertCommand( QString cmd, int adjustCursor ) +void CustomTemplates::slotInsertCommand( TQString cmd, int adjustCursor ) { int para, index; mEdit->getCursorPosition( ¶, &index ); @@ -225,14 +225,14 @@ void CustomTemplates::slotInsertCommand( QString cmd, int adjustCursor ) void CustomTemplates::slotAddClicked() { - QString str = mName->text(); + TQString str = mName->text(); if ( !str.isEmpty() ) { CustomTemplateItem *vitem = mItemList[ str ]; if ( !vitem ) { vitem = new CustomTemplateItem( str, "", KShortcut::null(), TUniversal ); mItemList.insert( str, vitem ); - QListViewItem *item = - new QListViewItem( mList, indexToType( TUniversal ), str, "" ); + TQListViewItem *item = + new TQListViewItem( mList, indexToType( TUniversal ), str, "" ); mList->setSelected( item, true ); mKeyButton->setEnabled( false ); emit changed(); @@ -262,22 +262,22 @@ void CustomTemplates::slotListSelectionChanged() vitem->mShortcut = mKeyButton->shortcut(); } } - QListViewItem *item = mList->selectedItem(); + TQListViewItem *item = mList->selectedItem(); if ( item ) { mEditFrame->setEnabled( true ); mCurrentItem = item; CustomTemplateItem *vitem = mItemList[ mCurrentItem->text( 1 ) ]; if ( vitem ) { // avoid emit changed() - disconnect( mEdit, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); + disconnect( mEdit, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); mEdit->setText( vitem->mContent ); mKeyButton->setShortcut( vitem->mShortcut, false ); mType->setCurrentItem( vitem->mType ); - connect( mEdit, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); + connect( mEdit, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); if ( vitem->mType == TUniversal ) { @@ -315,7 +315,7 @@ void CustomTemplates::slotTypeActivated( int index ) mCurrentItem->setPixmap( 0, mForwardPix ); break; default: - mCurrentItem->setPixmap( 0, QPixmap() ); + mCurrentItem->setPixmap( 0, TQPixmap() ); break; }; if ( index == TUniversal ) @@ -338,14 +338,14 @@ void CustomTemplates::slotShortcutCaptured( const KShortcut &shortcut ) bool assign = true; bool customused = false; // check if shortcut is already used for custom templates - QDictIterator it(mItemList); + TQDictIterator it(mItemList); for ( ; it.current() ; ++it ) { if ( !mCurrentItem || (*it)->mName != mCurrentItem->text( 1 ) ) { if ( (*it)->mShortcut == sc ) { - QString title( I18N_NOOP("Key Conflict") ); - QString msg( I18N_NOOP("The selected shortcut is already used " + TQString title( I18N_NOOP("Key Conflict") ); + TQString msg( I18N_NOOP("The selected shortcut is already used " "for another custom template, " "would you still like to continue with the assignment?" ) ); assign = ( KMessageBox::warningYesNo( this, msg, title ) @@ -361,8 +361,8 @@ void CustomTemplates::slotShortcutCaptured( const KShortcut &shortcut ) // check if shortcut is used somewhere else if ( !customused && !sc.isNull() && !( kmkernel->getKMMainWidget()->shortcutIsValid( sc ) ) ) { - QString title( I18N_NOOP("Key Conflict") ); - QString msg( I18N_NOOP("The selected shortcut is already used, " + TQString title( I18N_NOOP("Key Conflict") ); + TQString msg( I18N_NOOP("The selected shortcut is already used, " "would you still like to continue with the assignment?" ) ); assign = ( KMessageBox::warningYesNo( this, msg, title ) == KMessageBox::Yes ); diff --git a/kmail/customtemplates.h b/kmail/customtemplates.h index a2b27678..dc454bf6 100644 --- a/kmail/customtemplates.h +++ b/kmail/customtemplates.h @@ -27,7 +27,7 @@ #include "templatesinsertcommand.h" struct CustomTemplateItem; -typedef QDict CustomTemplateItemList; +typedef TQDict CustomTemplateItemList; class KShortcut; class CustomTemplates : public CustomTemplatesBase @@ -40,17 +40,17 @@ class CustomTemplates : public CustomTemplatesBase public: - CustomTemplates( QWidget *parent = 0, const char *name = 0 ); + CustomTemplates( TQWidget *parent = 0, const char *name = 0 ); ~CustomTemplates(); void load(); void save(); - QString indexToType( int index ); + TQString indexToType( int index ); public slots: - void slotInsertCommand( QString cmd, int adjustCursor = 0 ); + void slotInsertCommand( TQString cmd, int adjustCursor = 0 ); void slotTextChanged(); @@ -66,25 +66,25 @@ class CustomTemplates : public CustomTemplatesBase protected: - QListViewItem *mCurrentItem; + TQListViewItem *mCurrentItem; CustomTemplateItemList mItemList; - QPixmap mReplyPix; - QPixmap mReplyAllPix; - QPixmap mForwardPix; + TQPixmap mReplyPix; + TQPixmap mReplyAllPix; + TQPixmap mForwardPix; }; struct CustomTemplateItem { CustomTemplateItem() {} - CustomTemplateItem( const QString &name, - const QString &content, + CustomTemplateItem( const TQString &name, + const TQString &content, KShortcut &shortcut, CustomTemplates::Type type ) : mName( name ), mContent( content ), mShortcut(shortcut), mType( type ) {} - QString mName, mContent; + TQString mName, mContent; KShortcut mShortcut; CustomTemplates::Type mType; }; diff --git a/kmail/dcoptest.cpp b/kmail/dcoptest.cpp index ecf51207..9887dc98 100644 --- a/kmail/dcoptest.cpp +++ b/kmail/dcoptest.cpp @@ -29,7 +29,7 @@ int main(int argc,char **argv) DCOPRef ref = kmailStub.openComposer("to 2","","","Second test", "DCOP ref call",0); MailComposerIface_stub composerStub(ref.app(),ref.object()); - QCString data = "BEGIN:VCALENDAR\nEND:VCALENDAR"; + TQCString data = "BEGIN:VCALENDAR\nEND:VCALENDAR"; composerStub.addAttachment("test.ics","7bit",data,"text","calendar","method", "publish","attachement;"); composerStub.send(2); diff --git a/kmail/dictionarycombobox.cpp b/kmail/dictionarycombobox.cpp index 59e0affd..88b77623 100644 --- a/kmail/dictionarycombobox.cpp +++ b/kmail/dictionarycombobox.cpp @@ -38,20 +38,20 @@ #include #include -#include +#include namespace KMail { - DictionaryComboBox::DictionaryComboBox( QWidget * parent, const char * name ) - : QComboBox( false, parent, name ), + DictionaryComboBox::DictionaryComboBox( TQWidget * parent, const char * name ) + : TQComboBox( false, parent, name ), mSpellConfig( 0 ), mDefaultDictionary( 0 ) { reloadCombo(); - connect( this, SIGNAL( activated( int ) ), - this, SLOT( slotDictionaryChanged( int ) ) ); - connect( this, SIGNAL( dictionaryChanged( int ) ), - mSpellConfig, SLOT( sSetDictionary( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotDictionaryChanged( int ) ) ); + connect( this, TQT_SIGNAL( dictionaryChanged( int ) ), + mSpellConfig, TQT_SLOT( sSetDictionary( int ) ) ); } DictionaryComboBox::~DictionaryComboBox() @@ -60,21 +60,21 @@ namespace KMail { mSpellConfig = 0; } - QString DictionaryComboBox::currentDictionaryName() const + TQString DictionaryComboBox::currentDictionaryName() const { return currentText(); } - QString DictionaryComboBox::currentDictionary() const + TQString DictionaryComboBox::currentDictionary() const { - QString dict = mDictionaries[ currentItem() ]; + TQString dict = mDictionaries[ currentItem() ]; if ( dict.isEmpty() ) return ""; else return dict; } - void DictionaryComboBox::setCurrentByDictionaryName( const QString & name ) + void DictionaryComboBox::setCurrentByDictionaryName( const TQString & name ) { if ( name.isEmpty() ) return; @@ -90,7 +90,7 @@ namespace KMail { } } - void DictionaryComboBox::setCurrentByDictionary( const QString & dictionary ) + void DictionaryComboBox::setCurrentByDictionary( const TQString & dictionary ) { if ( !dictionary.isEmpty() ) { // first handle the special case of the default dictionary @@ -103,7 +103,7 @@ namespace KMail { } int i = 0; - for ( QStringList::ConstIterator it = mDictionaries.begin(); + for ( TQStringList::ConstIterator it = mDictionaries.begin(); it != mDictionaries.end(); ++it, ++i ) { if ( *it == dictionary ) { diff --git a/kmail/dictionarycombobox.h b/kmail/dictionarycombobox.h index 0e7a3e19..0fcbdceb 100644 --- a/kmail/dictionarycombobox.h +++ b/kmail/dictionarycombobox.h @@ -32,7 +32,7 @@ #ifndef _KMAIL_DICTIONARYCOMBOBOX_H_ #define _KMAIL_DICTIONARYCOMBOBOX_H_ -#include +#include class KSpellConfig; class QStringList; @@ -45,16 +45,16 @@ namespace KMail { * @author Ingo Kloecker **/ - class DictionaryComboBox : public QComboBox { + class DictionaryComboBox : public TQComboBox { Q_OBJECT public: - DictionaryComboBox( QWidget * parent=0, const char * name=0 ); + DictionaryComboBox( TQWidget * parent=0, const char * name=0 ); ~DictionaryComboBox(); - QString currentDictionaryName() const; - QString currentDictionary() const; - void setCurrentByDictionaryName( const QString & dictionaryName ); - void setCurrentByDictionary( const QString & dictionary ); + TQString currentDictionaryName() const; + TQString currentDictionary() const; + void setCurrentByDictionaryName( const TQString & dictionaryName ); + void setCurrentByDictionary( const TQString & dictionary ); KSpellConfig* spellConfig() const; @@ -63,7 +63,7 @@ namespace KMail { * by user intervention or on setCurrentByDictionaryName() or on * setCurrentByDictionary(). **/ - void dictionaryChanged( const QString & dictionary ); + void dictionaryChanged( const TQString & dictionary ); void dictionaryChanged( int ); protected slots: @@ -73,7 +73,7 @@ namespace KMail { void reloadCombo(); protected: - QStringList mDictionaries; + TQStringList mDictionaries; KSpellConfig* mSpellConfig; int mDefaultDictionary; }; diff --git a/kmail/distributionlistdialog.cpp b/kmail/distributionlistdialog.cpp index 9c8d6fd2..b591afd7 100644 --- a/kmail/distributionlistdialog.cpp +++ b/kmail/distributionlistdialog.cpp @@ -38,31 +38,31 @@ #include #include -#include -#include -#include +#include +#include +#include class DistributionListItem : public QCheckListItem { public: - DistributionListItem( QListView *list ) - : QCheckListItem( list, QString::null, CheckBox ) + DistributionListItem( TQListView *list ) + : TQCheckListItem( list, TQString::null, CheckBox ) { } - void setAddressee( const KABC::Addressee &a, const QString &email ) + void setAddressee( const KABC::Addressee &a, const TQString &email ) { mIsTransient = false; init( a, email ); } - void setTransientAddressee( const KABC::Addressee &a, const QString &email ) + void setTransientAddressee( const KABC::Addressee &a, const TQString &email ) { mIsTransient = true; init( a, email ); } - void init( const KABC::Addressee &a, const QString &email ) + void init( const KABC::Addressee &a, const TQString &email ) { mAddressee = a; mEmail = email; @@ -75,7 +75,7 @@ class DistributionListItem : public QCheckListItem return mAddressee; } - QString email() const + TQString email() const { return mEmail; } @@ -87,31 +87,31 @@ class DistributionListItem : public QCheckListItem private: KABC::Addressee mAddressee; - QString mEmail; + TQString mEmail; bool mIsTransient; }; -DistributionListDialog::DistributionListDialog( QWidget *parent ) +DistributionListDialog::DistributionListDialog( TQWidget *parent ) : KDialogBase( Plain, i18n("Save Distribution List"), User1 | Cancel, User1, parent, 0, false, false, i18n("Save List") ) { - QFrame *topFrame = plainPage(); + TQFrame *topFrame = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); topLayout->setSpacing( spacingHint() ); - QBoxLayout *titleLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *titleLayout = new TQHBoxLayout( topLayout ); - QLabel *label = new QLabel( i18n("Name:"), topFrame ); + TQLabel *label = new TQLabel( i18n("Name:"), topFrame ); titleLayout->addWidget( label ); - mTitleEdit = new QLineEdit( topFrame ); + mTitleEdit = new TQLineEdit( topFrame ); titleLayout->addWidget( mTitleEdit ); mTitleEdit->setFocus(); mRecipientsList = new KListView( topFrame ); - mRecipientsList->addColumn( QString::null ); + mRecipientsList->addColumn( TQString::null ); mRecipientsList->addColumn( i18n("Name") ); mRecipientsList->addColumn( i18n("Email") ); topLayout->addWidget( mRecipientsList ); @@ -121,11 +121,11 @@ void DistributionListDialog::setRecipients( const Recipient::List &recipients ) { Recipient::List::ConstIterator it; for( it = recipients.begin(); it != recipients.end(); ++it ) { - QStringList emails = KPIM::splitEmailAddrList( (*it).email() ); - QStringList::ConstIterator it2; + TQStringList emails = KPIM::splitEmailAddrList( (*it).email() ); + TQStringList::ConstIterator it2; for( it2 = emails.begin(); it2 != emails.end(); ++it2 ) { - QString name; - QString email; + TQString name; + TQString email; KABC::Addressee::parseEmailAddress( *it2, name, email ); if ( !email.isEmpty() ) { DistributionListItem *item = new DistributionListItem( mRecipientsList ); @@ -155,7 +155,7 @@ void DistributionListDialog::slotUser1() KABC::AddressBook *ab = KABC::StdAddressBook::self( true ); - QListViewItem *i = mRecipientsList->firstChild(); + TQListViewItem *i = mRecipientsList->firstChild(); while( i ) { DistributionListItem *item = static_cast( i ); if ( item->isOn() ) { @@ -178,12 +178,12 @@ void DistributionListDialog::slotUser1() manager.load(); #endif - QString name = mTitleEdit->text(); + TQString name = mTitleEdit->text(); if ( name.isEmpty() ) { bool ok = false; name = KInputDialog::getText( i18n("New Distribution List"), - i18n("Please enter name:"), QString::null, &ok, this ); + i18n("Please enter name:"), TQString::null, &ok, this ); if ( !ok || name.isEmpty() ) return; } diff --git a/kmail/distributionlistdialog.h b/kmail/distributionlistdialog.h index 092cf84c..84c96d5f 100644 --- a/kmail/distributionlistdialog.h +++ b/kmail/distributionlistdialog.h @@ -31,7 +31,7 @@ class KListView; class DistributionListDialog : public KDialogBase { public: - DistributionListDialog( QWidget *parent ); + DistributionListDialog( TQWidget *parent ); void setRecipients( const Recipient::List & ); @@ -39,7 +39,7 @@ class DistributionListDialog : public KDialogBase void slotUser1(); private: - QLineEdit *mTitleEdit; + TQLineEdit *mTitleEdit; KListView *mRecipientsList; }; diff --git a/kmail/editorwatcher.cpp b/kmail/editorwatcher.cpp index e9fec660..273c5997 100644 --- a/kmail/editorwatcher.cpp +++ b/kmail/editorwatcher.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include @@ -48,8 +48,8 @@ using namespace KMail; -EditorWatcher::EditorWatcher(const KURL & url, const QString &mimeType, bool openWith, QObject * parent) : - QObject( parent ), +EditorWatcher::EditorWatcher(const KURL & url, const TQString &mimeType, bool openWith, TQObject * parent) : + TQObject( parent ), mUrl( url ), mMimeType( mimeType ), mOpenWith( openWith ), @@ -61,7 +61,7 @@ EditorWatcher::EditorWatcher(const KURL & url, const QString &mimeType, bool ope mDone( false ) { assert( mUrl.isLocalFile() ); - connect( &mTimer, SIGNAL(timeout()), SLOT(checkEditDone()) ); + connect( &mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkEditDone()) ); } bool EditorWatcher::start() @@ -71,7 +71,7 @@ bool EditorWatcher::start() list.append( mUrl ); KService::Ptr offer = KServiceTypeProfile::preferredService( mMimeType, "Application" ); if ( mOpenWith || !offer ) { - KOpenWithDlg dlg( list, i18n("Edit with:"), QString::null, 0 ); + KOpenWithDlg dlg( list, i18n("Edit with:"), TQString::null, 0 ); if ( !dlg.exec() ) return false; offer = dlg.service(); @@ -85,8 +85,8 @@ bool EditorWatcher::start() if ( mInotifyFd > 0 ) { mInotifyWatch = inotify_add_watch( mInotifyFd, mUrl.path().latin1(), IN_CLOSE | IN_OPEN | IN_MODIFY ); if ( mInotifyWatch >= 0 ) { - QSocketNotifier *sn = new QSocketNotifier( mInotifyFd, QSocketNotifier::Read, this ); - connect( sn, SIGNAL(activated(int)), SLOT(inotifyEvent()) ); + TQSocketNotifier *sn = new TQSocketNotifier( mInotifyFd, TQSocketNotifier::Read, this ); + connect( sn, TQT_SIGNAL(activated(int)), TQT_SLOT(inotifyEvent()) ); mHaveInotify = true; mFileModified = false; } @@ -96,10 +96,10 @@ bool EditorWatcher::start() #endif // start the editor - QStringList params = KRun::processDesktopExec( *offer, list, false ); + TQStringList params = KRun::processDesktopExec( *offer, list, false ); mEditor = new KProcess( this ); *mEditor << params; - connect( mEditor, SIGNAL(processExited(KProcess*)), SLOT(editorExited()) ); + connect( mEditor, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(editorExited()) ); if ( !mEditor->start() ) return false; mEditorRunning = true; diff --git a/kmail/editorwatcher.h b/kmail/editorwatcher.h index d7fc9e3e..e0d60905 100644 --- a/kmail/editorwatcher.h +++ b/kmail/editorwatcher.h @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include class KProcess; @@ -39,7 +39,7 @@ class EditorWatcher : public QObject { Q_OBJECT public: - EditorWatcher( const KURL &url, const QString &mimeType, bool openWith, QObject *parent = 0 ); + EditorWatcher( const KURL &url, const TQString &mimeType, bool openWith, TQObject *parent = 0 ); bool start(); bool fileChanged() const { return mFileModified; } signals: @@ -52,7 +52,7 @@ class EditorWatcher : public QObject private: KURL mUrl; - QString mMimeType; + TQString mMimeType; bool mOpenWith; KProcess *mEditor; @@ -65,8 +65,8 @@ class EditorWatcher : public QObject bool mFileModified; - QTimer mTimer; - QTime mEditTime; + TQTimer mTimer; + TQTime mEditTime; bool mError; bool mDone; diff --git a/kmail/encodingdetector.cpp b/kmail/encodingdetector.cpp index e5881d6f..60913c9f 100644 --- a/kmail/encodingdetector.cpp +++ b/kmail/encodingdetector.cpp @@ -37,8 +37,8 @@ #include "encodingdetector_ja_p.h" -#include -#include +#include +#include #include #include @@ -320,7 +320,7 @@ enum MIB MibUtf16LE = 1014 }; -static bool is16Bit(QTextCodec* codec) +static bool is16Bit(TQTextCodec* codec) { switch (codec->mibEnum()) { @@ -337,10 +337,10 @@ static bool is16Bit(QTextCodec* codec) class EncodingDetectorPrivate { public: - QTextCodec *m_codec; - QTextDecoder *m_decoder; // utf16 - QTextCodec *m_defaultCodec; - QCString m_storeDecoderName; + TQTextCodec *m_codec; + TQTextDecoder *m_decoder; // utf16 + TQTextCodec *m_defaultCodec; + TQCString m_storeDecoderName; EncodingDetector::EncodingChoiceSource m_source; EncodingDetector::AutoDetectScript m_autoDetectLanguage; @@ -351,10 +351,10 @@ public: bool m_analyzeCalled : 1; //for decode() int m_multiByte; - QCString m_bufferForDefferedEncDetection; + TQCString m_bufferForDefferedEncDetection; EncodingDetectorPrivate() - : m_codec(QTextCodec::codecForMib(MibLatin1)) + : m_codec(TQTextCodec::codecForMib(MibLatin1)) , m_decoder(m_codec->makeDecoder()) , m_defaultCodec(m_codec) , m_source(EncodingDetector::DefaultEncoding) @@ -367,7 +367,7 @@ public: { } - EncodingDetectorPrivate(QTextCodec* codec,EncodingDetector::EncodingChoiceSource source, EncodingDetector::AutoDetectScript script) + EncodingDetectorPrivate(TQTextCodec* codec,EncodingDetector::EncodingChoiceSource source, EncodingDetector::AutoDetectScript script) : m_codec(codec) , m_decoder(m_codec->makeDecoder()) , m_defaultCodec(m_codec) @@ -388,7 +388,7 @@ public: }; -static QCString automaticDetectionForArabic( const unsigned char* ptr, int size ) +static TQCString automaticDetectionForArabic( const unsigned char* ptr, int size ) { for ( int i = 0; i < size; ++i ) { if ( ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F ) || ptr[ i ] == 0xA1 || ptr[ i ] == 0xA2 || ptr[ i ] == 0xA3 @@ -402,7 +402,7 @@ static QCString automaticDetectionForArabic( const unsigned char* ptr, int size return "iso-8859-6"; } -static QCString automaticDetectionForBaltic( const unsigned char* ptr, int size ) +static TQCString automaticDetectionForBaltic( const unsigned char* ptr, int size ) { for ( int i = 0; i < size; ++i ) { if ( ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9E ) ) @@ -415,9 +415,9 @@ static QCString automaticDetectionForBaltic( const unsigned char* ptr, int size return "iso-8859-13"; } -static QCString automaticDetectionForCentralEuropean(const unsigned char* ptr, int size ) +static TQCString automaticDetectionForCentralEuropean(const unsigned char* ptr, int size ) { - QCString charset; + TQCString charset; for ( int i = 0; i < size; ++i ) { if ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9F ) { if ( ptr[ i ] == 0x81 || ptr[ i ] == 0x83 || ptr[ i ] == 0x90 || ptr[ i ] == 0x98 ) @@ -447,7 +447,7 @@ static QCString automaticDetectionForCentralEuropean(const unsigned char* ptr, i return charset.data(); } -static QCString automaticDetectionForCyrillic( const unsigned char* ptr, int size) +static TQCString automaticDetectionForCyrillic( const unsigned char* ptr, int size) { #ifdef DECODE_DEBUG kWarning() << "EncodingDetector: Cyr heuristics"; @@ -565,8 +565,8 @@ static QCString automaticDetectionForCyrillic( const unsigned char* ptr, int siz if (ibm866_small_range>cp1251_small_range+koi_small_range) return "ibm866"; -// QCString koi_string = "koi8-u"; -// QCString cp1251_string = "cp1251"; +// TQCString koi_string = "koi8-u"; +// TQCString cp1251_string = "cp1251"; if (cp1251_st==0 && koi_st>1) koi_score+=10; @@ -643,7 +643,7 @@ static QCString automaticDetectionForCyrillic( const unsigned char* ptr, int siz } -static QCString automaticDetectionForGreek( const unsigned char* ptr, int size ) +static TQCString automaticDetectionForGreek( const unsigned char* ptr, int size ) { for ( int i = 0; i < size; ++i ) { if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x87 ) || ptr[ i ] == 0x89 || ptr[ i ] == 0x8B @@ -656,7 +656,7 @@ static QCString automaticDetectionForGreek( const unsigned char* ptr, int size ) return "iso-8859-7"; } -static QCString automaticDetectionForHebrew( const unsigned char* ptr, int size ) +static TQCString automaticDetectionForHebrew( const unsigned char* ptr, int size ) { for ( int i = 0; i < size; ++i ) { if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x89 ) || ptr[ i ] == 0x8B @@ -672,7 +672,7 @@ static QCString automaticDetectionForHebrew( const unsigned char* ptr, int size return "iso-8859-8-i"; } -static QCString automaticDetectionForJapanese( const unsigned char* ptr, int size ) +static TQCString automaticDetectionForJapanese( const unsigned char* ptr, int size ) { JapaneseCode kc; @@ -692,7 +692,7 @@ static QCString automaticDetectionForJapanese( const unsigned char* ptr, int siz return ""; } -static QCString automaticDetectionForTurkish( const unsigned char* ptr, int size ) +static TQCString automaticDetectionForTurkish( const unsigned char* ptr, int size ) { for ( int i = 0; i < size; ++i ) { if ( ptr[ i ] == 0x80 || ( ptr[ i ] >= 0x82 && ptr[ i ] <= 0x8C ) || ( ptr[ i ] >= 0x91 && ptr[ i ] <= 0x9C ) || ptr[ i ] == 0x9F ) { @@ -703,7 +703,7 @@ static QCString automaticDetectionForTurkish( const unsigned char* ptr, int size return "iso-8859-9"; } -static QCString automaticDetectionForWesternEuropean( const unsigned char* ptr, int size ) +static TQCString automaticDetectionForWesternEuropean( const unsigned char* ptr, int size ) { uint nonansi_count=0; for (int i=0; im_visualRTL; } -// const QTextCodec* EncodingDetector::codec() const +// const TQTextCodec* EncodingDetector::codec() const // { // return d->m_codec; // } -QTextDecoder* EncodingDetector::decoder() +TQTextDecoder* EncodingDetector::decoder() { return d->m_decoder; } bool EncodingDetector::setEncoding(const char *_encoding, EncodingChoiceSource type) { - QTextCodec *codec; - QCString enc(_encoding); + TQTextCodec *codec; + TQCString enc(_encoding); if(/*enc.isNull() || */enc.isEmpty()) { if (type==DefaultEncoding) @@ -960,8 +960,8 @@ bool EncodingDetector::setEncoding(const char *_encoding, EncodingChoiceSource t if (codec->mibEnum() == Mib8859_8) { - //We do NOT want to use Qt's QHebrewCodec, since it tries to reorder itself. - codec = QTextCodec::codecForName("iso8859-8-i"); + //We do NOT want to use Qt's TQHebrewCodec, since it tries to reorder itself. + codec = TQTextCodec::codecForName("iso8859-8-i"); // visually ordered unless one of the following if(!(enc=="iso-8859-8-i"||enc=="iso_8859-8-i"||enc=="csiso88598i"||enc=="logical")) @@ -978,7 +978,7 @@ bool EncodingDetector::setEncoding(const char *_encoding, EncodingChoiceSource t return true; } -bool EncodingDetector::analyze(const QByteArray &data) +bool EncodingDetector::analyze(const TQByteArray &data) { return analyze( data.data(), data.size() ); } @@ -1032,7 +1032,7 @@ bool EncodingDetector::analyze(const char *data, int len) if (autoDetectedEncoding != 0) { d->m_source = BOM; - d->m_codec = QTextCodec::codecForName(autoDetectedEncoding); + d->m_codec = TQTextCodec::codecForName(autoDetectedEncoding); assert(d->m_codec); //enc = d->m_codec->name(); delete d->m_decoder; @@ -1094,7 +1094,7 @@ bool EncodingDetector::analyze(const char *data, int len) end++; if (*end == '\0' || end == pEnd) break; - QCString str(ptr, end - ptr + 1); + TQCString str(ptr, end - ptr + 1); int length; int pos = findXMLEncoding(str, length); // also handles the case when specified encoding aint correct @@ -1136,7 +1136,7 @@ bool EncodingDetector::analyze(const char *data, int len) while(*end != '>' && *end != '\0' && end +#include class QTextCodec; class QTextDecoder; @@ -41,11 +41,11 @@ class EncodingDetectorPrivate; * * Typical use: * \code - * QByteArray data; + * TQByteArray data; * ... * EncodingDetector detector; * detector.setAutoDetectLanguage(EncodingDetector::Cyrillic); - * QString out=detector.decode(data); + * TQString out=detector.decode(data); * \endcode * * @@ -98,10 +98,10 @@ public: /** * Allows to set Default codec, EncodingChoiceSource, AutoDetectScript */ - EncodingDetector(QTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script=None); + EncodingDetector(TQTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script=None); ~EncodingDetector(); - //const QTextCodec* codec() const; + //const TQTextCodec* codec() const; /** * @returns true if specified encoding was recognized @@ -116,8 +116,8 @@ public: bool visuallyOrdered() const; -// void setAutoDetectLanguage( const QString& ); -// const QString& autoDetectLanguage() const; +// void setAutoDetectLanguage( const TQString& ); +// const TQString& autoDetectLanguage() const; void setAutoDetectLanguage( AutoDetectScript ); AutoDetectScript autoDetectLanguage() const; @@ -134,14 +134,14 @@ public: * Analyze text data. * @returns true if there was enough data for accurate detection */ - bool analyze( const QByteArray &data ); + bool analyze( const TQByteArray &data ); /** * Takes lang name _after_ it were i18n()'ed */ - static AutoDetectScript scriptForName(const QString& lang); - static QString nameForScript(AutoDetectScript); - static AutoDetectScript scriptForLanguageCode(const QString &lang); + static AutoDetectScript scriptForName(const TQString& lang); + static TQString nameForScript(AutoDetectScript); + static AutoDetectScript scriptForLanguageCode(const TQString &lang); static bool hasAutoDetectionForScript(AutoDetectScript); protected: @@ -155,9 +155,9 @@ protected: bool errorsIfUtf8 (const char* data, int length); /** - * @returns QTextDecoder for detected encoding + * @returns TQTextDecoder for detected encoding */ - QTextDecoder* decoder(); + TQTextDecoder* decoder(); private: EncodingDetectorPrivate* const d; diff --git a/kmail/encodingdetector_ja.cpp b/kmail/encodingdetector_ja.cpp index 0c42f7e4..d5eeb1e0 100644 --- a/kmail/encodingdetector_ja.cpp +++ b/kmail/encodingdetector_ja.cpp @@ -37,7 +37,7 @@ */ /* - * Maybe we should use QTextCodec::heuristicContentMatch() + * Maybe we should use TQTextCodec::heuristicContentMatch() * But it fails detection. It's not useful. */ #include "encodingdetector_ja_p.h" diff --git a/kmail/encodingdetector_ja_p.h b/kmail/encodingdetector_ja_p.h index c23de835..27cd067b 100644 --- a/kmail/encodingdetector_ja_p.h +++ b/kmail/encodingdetector_ja_p.h @@ -38,7 +38,7 @@ #ifndef GUESS_JA_H #define GUESS_JA_H -#include +#include #ifdef Q_WS_WIN #undef UNICODE #endif diff --git a/kmail/expirejob.cpp b/kmail/expirejob.cpp index e7e853b0..a97c0842 100644 --- a/kmail/expirejob.cpp +++ b/kmail/expirejob.cpp @@ -107,7 +107,7 @@ void ExpireJob::execute() mFolderOpen = true; mCurrentIndex = storage->count()-1; kdDebug(5006) << "ExpireJob: starting to expire in folder " << mSrcFolder->location() << endl; - connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) ); + connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) ); mTimer.start( EXPIREJOB_TIMERINTERVAL ); slotDoWork(); // do nothing here, we might be deleted! @@ -143,7 +143,7 @@ void ExpireJob::done() { mTimer.stop(); - QString str; + TQString str; bool moving = false; if ( !mRemovedMsgs.isEmpty() ) { @@ -156,8 +156,8 @@ void ExpireJob::done() << mSrcFolder->location() << " " << count << " messages to remove." << endl; KMMoveCommand* cmd = new KMMoveCommand( 0, mRemovedMsgs ); - connect( cmd, SIGNAL( completed( KMCommand * ) ), - this, SLOT( slotMessagesMoved( KMCommand * ) ) ); + connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( slotMessagesMoved( KMCommand * ) ) ); cmd->start(); moving = true; str = i18n( "Removing 1 old message from folder %1...", @@ -178,8 +178,8 @@ void ExpireJob::done() << mRemovedMsgs.count() << " messages to move to " << mMoveToFolder->label() << endl; KMMoveCommand* cmd = new KMMoveCommand( mMoveToFolder, mRemovedMsgs ); - connect( cmd, SIGNAL( completed( KMCommand * ) ), - this, SLOT( slotMessagesMoved( KMCommand * ) ) ); + connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( slotMessagesMoved( KMCommand * ) ) ); cmd->start(); moving = true; str = i18n( "Moving 1 old message from folder %1 to folder %2...", @@ -206,7 +206,7 @@ void ExpireJob::slotMessagesMoved( KMCommand *command ) { mSrcFolder->storage()->close( "expirejob" ); mFolderOpen = false; - QString msg; + TQString msg; switch ( command->result() ) { case KMCommand::OK: if ( mSrcFolder->expireAction() == KMFolder::ExpireDelete ) { diff --git a/kmail/expirejob.h b/kmail/expirejob.h index 71bfc65e..16e4c7bd 100644 --- a/kmail/expirejob.h +++ b/kmail/expirejob.h @@ -51,8 +51,8 @@ private: void done(); private: - QTimer mTimer; - QPtrList mRemovedMsgs; + TQTimer mTimer; + TQPtrList mRemovedMsgs; int mCurrentIndex; int mMaxUnreadTime; int mMaxReadTime; diff --git a/kmail/expirypropertiesdialog.cpp b/kmail/expirypropertiesdialog.cpp index 62d9047f..a313cc88 100644 --- a/kmail/expirypropertiesdialog.cpp +++ b/kmail/expirypropertiesdialog.cpp @@ -4,18 +4,18 @@ #include "kmfolder.h" #include "kmfoldertree.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,66 +34,66 @@ ExpiryPropertiesDialog::ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* fo mFolder( folder ) { setWFlags( getWFlags() | WDestructiveClose ); - QWidget* privateLayoutWidget = new QWidget( this, "globalVBox" ); + TQWidget* privateLayoutWidget = new TQWidget( this, "globalVBox" ); setMainWidget( privateLayoutWidget ); - privateLayoutWidget->setGeometry( QRect( 10, 20, 270, 138 ) ); - globalVBox = new QVBoxLayout( privateLayoutWidget, 11, 6, "globalVBox"); + privateLayoutWidget->setGeometry( TQRect( 10, 20, 270, 138 ) ); + globalVBox = new TQVBoxLayout( privateLayoutWidget, 11, 6, "globalVBox"); globalVBox->setSpacing( 20 ); - readHBox = new QHBoxLayout( 0, 0, 6, "readHBox"); + readHBox = new TQHBoxLayout( 0, 0, 6, "readHBox"); - expireReadMailCB = new QCheckBox( privateLayoutWidget, "expireReadMailCB" ); + expireReadMailCB = new TQCheckBox( privateLayoutWidget, "expireReadMailCB" ); expireReadMailCB->setText( i18n( "Expire read mails after" ) ); - connect( expireReadMailCB, SIGNAL( toggled( bool )), - this, SLOT( slotUpdateControls() ) ); + connect( expireReadMailCB, TQT_SIGNAL( toggled( bool )), + this, TQT_SLOT( slotUpdateControls() ) ); readHBox->addWidget( expireReadMailCB ); - expireReadMailSB = new QSpinBox( privateLayoutWidget, "expireReadMailSB" ); + expireReadMailSB = new TQSpinBox( privateLayoutWidget, "expireReadMailSB" ); expireReadMailSB->setMaxValue( 999999 ); expireReadMailSB->setValue( 30 ); readHBox->addWidget( expireReadMailSB ); - labelDays = new QLabel( privateLayoutWidget, "labelDays" ); + labelDays = new TQLabel( privateLayoutWidget, "labelDays" ); labelDays->setText( i18n( "days" ) ); readHBox->addWidget( labelDays ); globalVBox->addLayout( readHBox ); - unreadHBox = new QHBoxLayout( 0, 0, 6, "unreadHBox"); + unreadHBox = new TQHBoxLayout( 0, 0, 6, "unreadHBox"); - expireUnreadMailCB = new QCheckBox( privateLayoutWidget, "expireUnreadMailCB" ); + expireUnreadMailCB = new TQCheckBox( privateLayoutWidget, "expireUnreadMailCB" ); expireUnreadMailCB->setText( i18n( "Expire unread mails after" ) ); - connect( expireUnreadMailCB, SIGNAL( toggled( bool )), - this, SLOT( slotUpdateControls() ) ); + connect( expireUnreadMailCB, TQT_SIGNAL( toggled( bool )), + this, TQT_SLOT( slotUpdateControls() ) ); unreadHBox->addWidget( expireUnreadMailCB ); - expireUnreadMailSB = new QSpinBox( privateLayoutWidget, "expireUnreadMailSB" ); + expireUnreadMailSB = new TQSpinBox( privateLayoutWidget, "expireUnreadMailSB" ); expireUnreadMailSB->setMaxValue( 99999 ); expireUnreadMailSB->setValue( 30 ); unreadHBox->addWidget( expireUnreadMailSB ); - labelDays2 = new QLabel( privateLayoutWidget, "labelDays2" ); + labelDays2 = new TQLabel( privateLayoutWidget, "labelDays2" ); labelDays2->setText( i18n( "days" ) ); - labelDays2->setAlignment( int( QLabel::AlignTop ) ); + labelDays2->setAlignment( int( TQLabel::AlignTop ) ); unreadHBox->addWidget( labelDays2 ); globalVBox->addLayout( unreadHBox ); - expiryActionHBox = new QHBoxLayout( 0, 0, 6, "expiryActionHBox"); + expiryActionHBox = new TQHBoxLayout( 0, 0, 6, "expiryActionHBox"); - expiryActionLabel = new QLabel( privateLayoutWidget, "expiryActionLabel" ); + expiryActionLabel = new TQLabel( privateLayoutWidget, "expiryActionLabel" ); expiryActionLabel->setText( i18n( "Expiry action:" ) ); - expiryActionLabel->setAlignment( int( QLabel::AlignVCenter ) ); + expiryActionLabel->setAlignment( int( TQLabel::AlignVCenter ) ); expiryActionHBox->addWidget( expiryActionLabel ); - actionsHBox = new QVBoxLayout( 0, 0, 6, "actionsHBox"); - actionsGroup = new QButtonGroup( this ); + actionsHBox = new TQVBoxLayout( 0, 0, 6, "actionsHBox"); + actionsGroup = new TQButtonGroup( this ); actionsGroup->hide(); // for mutual exclusion of the radio buttons - moveToHBox = new QHBoxLayout( 0, 0, 6, "moveToHBox"); + moveToHBox = new TQHBoxLayout( 0, 0, 6, "moveToHBox"); - moveToRB = new QRadioButton( privateLayoutWidget, "moveToRB" ); + moveToRB = new TQRadioButton( privateLayoutWidget, "moveToRB" ); actionsGroup->insert( moveToRB ); - connect( moveToRB, SIGNAL( toggled( bool ) ), - this, SLOT( slotUpdateControls() ) ); + connect( moveToRB, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotUpdateControls() ) ); moveToRB->setText( i18n( "Move to:" ) ); moveToHBox->addWidget( moveToRB ); @@ -102,16 +102,16 @@ ExpiryPropertiesDialog::ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* fo moveToHBox->addWidget( folderSelector ); actionsHBox->addLayout( moveToHBox ); - deletePermanentlyRB = new QRadioButton( privateLayoutWidget, "deletePermanentlyRB" ); + deletePermanentlyRB = new TQRadioButton( privateLayoutWidget, "deletePermanentlyRB" ); actionsGroup->insert( deletePermanentlyRB ); deletePermanentlyRB->setText( i18n( "Delete permanently" ) ); actionsHBox->addWidget( deletePermanentlyRB ); expiryActionHBox->addLayout( actionsHBox ); globalVBox->addLayout( expiryActionHBox ); - note = new QLabel( privateLayoutWidget, "note" ); + note = new TQLabel( privateLayoutWidget, "note" ); note->setText( i18n( "Note: Expiry action will be applied immediately after confirming settings." ) ); - note->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + note->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); globalVBox->addWidget( note ); // Load the values from the folder @@ -137,14 +137,14 @@ ExpiryPropertiesDialog::ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* fo else moveToRB->setChecked( true ); - QString destFolderID = mFolder->expireToFolderId(); + TQString destFolderID = mFolder->expireToFolderId(); if ( !destFolderID.isEmpty() ) { KMFolder* destFolder = kmkernel->findFolderById( destFolderID ); if ( destFolder ) folderSelector->setFolder( destFolder ); } slotUpdateControls(); - resize( QSize(295, 204).expandedTo(minimumSizeHint()) ); + resize( TQSize(295, 204).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); } diff --git a/kmail/expirypropertiesdialog.h b/kmail/expirypropertiesdialog.h index 9ac32500..d23bab2a 100644 --- a/kmail/expirypropertiesdialog.h +++ b/kmail/expirypropertiesdialog.h @@ -10,7 +10,7 @@ #ifndef EXPIRYPROPERTIESDIALOG_H #define EXPIRYPROPERTIESDIALOG_H -#include +#include #include class QVBoxLayout; @@ -38,30 +38,30 @@ public: ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* folder ); ~ExpiryPropertiesDialog(); - QCheckBox* expireReadMailCB; - QSpinBox* expireReadMailSB; - QLabel* labelDays; - QCheckBox* expireUnreadMailCB; - QSpinBox* expireUnreadMailSB; - QLabel* labelDays2; - QLabel* expiryActionLabel; - QRadioButton* moveToRB; + TQCheckBox* expireReadMailCB; + TQSpinBox* expireReadMailSB; + TQLabel* labelDays; + TQCheckBox* expireUnreadMailCB; + TQSpinBox* expireUnreadMailSB; + TQLabel* labelDays2; + TQLabel* expiryActionLabel; + TQRadioButton* moveToRB; FolderRequester *folderSelector; - QRadioButton* deletePermanentlyRB; - QLabel* note; - QButtonGroup* actionsGroup; + TQRadioButton* deletePermanentlyRB; + TQLabel* note; + TQButtonGroup* actionsGroup; protected slots: void slotOk(); void slotUpdateControls(); protected: - QVBoxLayout* globalVBox; - QHBoxLayout* readHBox; - QHBoxLayout* unreadHBox; - QHBoxLayout* expiryActionHBox; - QVBoxLayout* actionsHBox; - QHBoxLayout* moveToHBox; + TQVBoxLayout* globalVBox; + TQHBoxLayout* readHBox; + TQHBoxLayout* unreadHBox; + TQHBoxLayout* expiryActionHBox; + TQVBoxLayout* actionsHBox; + TQHBoxLayout* moveToHBox; KMFolder* mFolder; }; } // namespace diff --git a/kmail/favoritefolderview.cpp b/kmail/favoritefolderview.cpp index abe223d8..35b2e3ee 100644 --- a/kmail/favoritefolderview.cpp +++ b/kmail/favoritefolderview.cpp @@ -42,28 +42,28 @@ #include #include -#include -#include +#include +#include #include using namespace KMail; -FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * parent, const QString & name, KMFolder * folder) +FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * parent, const TQString & name, KMFolder * folder) : KMFolderTreeItem( parent, name, folder ), mOldName( folder->label() ) { // same stuff as in KMFolderTreeItem again, this time even with virtual methods working init(); - connect( folder, SIGNAL(nameChanged()), SLOT(nameChanged()) ); - connect( folder, SIGNAL(iconsChanged()), SLOT(slotIconsChanged()) ); + connect( folder, TQT_SIGNAL(nameChanged()), TQT_SLOT(nameChanged()) ); + connect( folder, TQT_SIGNAL(iconsChanged()), TQT_SLOT(slotIconsChanged()) ); - connect( folder, SIGNAL(msgAdded(KMFolder*,Q_UINT32)), SLOT(updateCount()) ); - connect( folder, SIGNAL(numUnreadMsgsChanged(KMFolder*)), SLOT(updateCount()) ); - connect( folder, SIGNAL(msgRemoved(KMFolder*)), SLOT(updateCount()) ); - connect( folder, SIGNAL(folderSizeChanged( KMFolder* )), SLOT(updateCount()) ); + connect( folder, TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), TQT_SLOT(updateCount()) ); + connect( folder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), TQT_SLOT(updateCount()) ); + connect( folder, TQT_SIGNAL(msgRemoved(KMFolder*)), TQT_SLOT(updateCount()) ); + connect( folder, TQT_SIGNAL(folderSizeChanged( KMFolder* )), TQT_SLOT(updateCount()) ); - QTimer::singleShot( 0, this, SLOT(updateCount()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(updateCount()) ); if ( unreadCount() > 0 ) setPixmap( 0, unreadIcon( iconSize() ) ); @@ -73,15 +73,15 @@ FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * parent, cons void FavoriteFolderViewItem::nameChanged() { - QString txt = text( 0 ); + TQString txt = text( 0 ); txt.replace( mOldName, folder()->label() ); setText( 0, txt ); mOldName = folder()->label(); } -QValueList FavoriteFolderView::mInstances; +TQValueList FavoriteFolderView::mInstances; -FavoriteFolderView::FavoriteFolderView( KMMainWidget *mainWidget, QWidget * parent) : +FavoriteFolderView::FavoriteFolderView( KMMainWidget *mainWidget, TQWidget * parent) : FolderTreeBase( mainWidget, parent ), mContextMenuItem( 0 ), mReadingConfig( false ) @@ -97,25 +97,25 @@ FavoriteFolderView::FavoriteFolderView( KMMainWidget *mainWidget, QWidget * pare setSorting( -1 ); setShowSortIndicator( false ); - connect( this, SIGNAL(selectionChanged()), SLOT(selectionChanged()) ); - connect( this, SIGNAL(clicked(QListViewItem*)), SLOT(itemClicked(QListViewItem*)) ); - connect( this, SIGNAL(dropped(QDropEvent*,QListViewItem*)), SLOT(dropped(QDropEvent*,QListViewItem*)) ); - connect( this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)), - SLOT(contextMenu(QListViewItem*,const QPoint&)) ); - connect( this, SIGNAL(moved()), SLOT(notifyInstancesOnChange()) ); - connect( this, SIGNAL(triggerRefresh()), SLOT(refresh()) ); - - connect( kmkernel->folderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) ); - connect( kmkernel->dimapFolderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) ); - connect( kmkernel->imapFolderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) ); - connect( kmkernel->searchFolderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) ); - - connect( kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) ); - connect( kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) ); - connect( kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) ); - connect( kmkernel->searchFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) ); - - QFont f = font(); + connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(selectionChanged()) ); + connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(itemClicked(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(dropped(TQDropEvent*,TQListViewItem*)), TQT_SLOT(dropped(TQDropEvent*,TQListViewItem*)) ); + connect( this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)), + TQT_SLOT(contextMenu(TQListViewItem*,const TQPoint&)) ); + connect( this, TQT_SIGNAL(moved()), TQT_SLOT(notifyInstancesOnChange()) ); + connect( this, TQT_SIGNAL(triggerRefresh()), TQT_SLOT(refresh()) ); + + connect( kmkernel->folderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) ); + connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) ); + connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) ); + connect( kmkernel->searchFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) ); + + connect( kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) ); + connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) ); + connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) ); + connect( kmkernel->searchFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) ); + + TQFont f = font(); f.setItalic( true ); setFont( f ); @@ -133,9 +133,9 @@ void FavoriteFolderView::readConfig() { mReadingConfig = true; clear(); - QValueList folderIds = GlobalSettings::self()->favoriteFolderIds(); - QStringList folderNames = GlobalSettings::self()->favoriteFolderNames(); - QListViewItem *afterItem = 0; + TQValueList folderIds = GlobalSettings::self()->favoriteFolderIds(); + TQStringList folderNames = GlobalSettings::self()->favoriteFolderNames(); + TQListViewItem *afterItem = 0; for ( uint i = 0; i < folderIds.count(); ++i ) { KMFolder *folder = kmkernel->folderMgr()->findById( folderIds[i] ); if ( !folder ) @@ -144,7 +144,7 @@ void FavoriteFolderView::readConfig() folder = kmkernel->dimapFolderMgr()->findById( folderIds[i] ); if ( !folder ) folder = kmkernel->searchFolderMgr()->findById( folderIds[i] ); - QString name; + TQString name; if ( folderNames.count() > i ) name = folderNames[i]; afterItem = addFolder( folder, name, afterItem ); @@ -153,7 +153,7 @@ void FavoriteFolderView::readConfig() ensureItemVisible( firstChild() ); // folder tree is not yet populated at this point - QTimer::singleShot( 0, this, SLOT(initializeFavorites()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(initializeFavorites()) ); readColorConfig(); mReadingConfig = false; @@ -161,9 +161,9 @@ void FavoriteFolderView::readConfig() void FavoriteFolderView::writeConfig() { - QValueList folderIds; - QStringList folderNames; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + TQValueList folderIds; + TQStringList folderNames; + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast( it.current() ); folderIds << fti->folder()->id(); folderNames << fti->text( 0 ); @@ -172,7 +172,7 @@ void FavoriteFolderView::writeConfig() GlobalSettings::self()->setFavoriteFolderNames( folderNames ); } -bool FavoriteFolderView::acceptDrag(QDropEvent * e) const +bool FavoriteFolderView::acceptDrag(TQDropEvent * e) const { KMFolderTree *ft = mainWidget()->folderTree(); assert( ft ); @@ -182,7 +182,7 @@ bool FavoriteFolderView::acceptDrag(QDropEvent * e) const return FolderTreeBase::acceptDrag( e ); } -KMFolderTreeItem* FavoriteFolderView::addFolder(KMFolder * folder, const QString &name, QListViewItem *after) +KMFolderTreeItem* FavoriteFolderView::addFolder(KMFolder * folder, const TQString &name, TQListViewItem *after) { if ( !folder ) return 0; @@ -219,10 +219,10 @@ void FavoriteFolderView::handleGroupwareFolder( KMFolderTreeItem *fti ) break; case KMail::ContentsTypeNote: { - QByteArray arg; - QDataStream s( arg, IO_WriteOnly ); - s << QString( "kontact_knotesplugin" ); - kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(QString)", arg ); + TQByteArray arg; + TQDataStream s( arg, IO_WriteOnly ); + s << TQString( "kontact_knotesplugin" ); + kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(TQString)", arg ); break; } case KMail::ContentsTypeCalendar: @@ -230,25 +230,25 @@ void FavoriteFolderView::handleGroupwareFolder( KMFolderTreeItem *fti ) case KMail::ContentsTypeJournal: { KMail::KorgHelper::ensureRunning(); - QByteArray arg; - QDataStream s( arg, IO_WriteOnly ); + TQByteArray arg; + TQDataStream s( arg, IO_WriteOnly ); switch ( fti->folder()->storage()->contentsType() ) { case KMail::ContentsTypeCalendar: - s << QString( "kontact_korganizerplugin" ); break; + s << TQString( "kontact_korganizerplugin" ); break; case KMail::ContentsTypeTask: - s << QString( "kontact_todoplugin" ); break; + s << TQString( "kontact_todoplugin" ); break; case KMail::ContentsTypeJournal: - s << QString( "kontact_journalplugin" ); break; + s << TQString( "kontact_journalplugin" ); break; default: assert( false ); } - kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(QString)", arg ); + kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(TQString)", arg ); break; } default: break; } } -void FavoriteFolderView::itemClicked(QListViewItem * item) +void FavoriteFolderView::itemClicked(TQListViewItem * item) { if ( !item ) return; if ( !item->isSelected() ) @@ -261,7 +261,7 @@ void FavoriteFolderView::folderTreeSelectionChanged(KMFolder * folder) { blockSignals( true ); bool found = false; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast( it.current() ); if ( fti->folder() == folder && !fti->isSelected() ) { fti->setSelected( true ); @@ -284,8 +284,8 @@ void FavoriteFolderView::folderTreeSelectionChanged(KMFolder * folder) void FavoriteFolderView::folderRemoved(KMFolder * folder) { - QValueList delItems; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + TQValueList delItems; + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast( it.current() ); if ( fti->folder() == folder ) delItems << fti; @@ -297,13 +297,13 @@ void FavoriteFolderView::folderRemoved(KMFolder * folder) removeFromFolderToItemMap(folder); } -void FavoriteFolderView::dropped(QDropEvent * e, QListViewItem * after) +void FavoriteFolderView::dropped(TQDropEvent * e, TQListViewItem * after) { - QListViewItem* afterItem = after; + TQListViewItem* afterItem = after; KMFolderTree *ft = mainWidget()->folderTree(); assert( ft ); if ( e->source() == ft->viewport() && e->provides( "application/x-qlistviewitem" ) ) { - for ( QListViewItemIterator it( ft ); it.current(); ++it ) { + for ( TQListViewItemIterator it( ft ); it.current(); ++it ) { if ( !it.current()->isSelected() ) continue; KMFolderTreeItem *fti = static_cast( it.current() ); @@ -315,7 +315,7 @@ void FavoriteFolderView::dropped(QDropEvent * e, QListViewItem * after) } } -void FavoriteFolderView::contextMenu(QListViewItem * item, const QPoint & point) +void FavoriteFolderView::contextMenu(TQListViewItem * item, const TQPoint & point) { KMFolderTree *ft = mainWidget()->folderTree(); assert( ft ); @@ -324,8 +324,8 @@ void FavoriteFolderView::contextMenu(QListViewItem * item, const QPoint & point) KPopupMenu contextMenu; if ( fti && fti->folder() ) { contextMenu.insertItem( SmallIconSet("editdelete"), i18n("Remove From Favorites"), - this, SLOT(removeFolder()) ); - contextMenu.insertItem( SmallIconSet("edit"), i18n("Rename Favorite"), this, SLOT(renameFolder()) ); + this, TQT_SLOT(removeFolder()) ); + contextMenu.insertItem( SmallIconSet("edit"), i18n("Rename Favorite"), this, TQT_SLOT(renameFolder()) ); contextMenu.insertSeparator(); mainWidget()->action("mark_all_as_read")->plug( &contextMenu ); @@ -334,12 +334,12 @@ void FavoriteFolderView::contextMenu(QListViewItem * item, const QPoint & point) if ( fti->folder()->isMailingListEnabled() ) mainWidget()->action("post_message")->plug( &contextMenu ); - contextMenu.insertItem( SmallIconSet("configure_shortcuts"), i18n("&Assign Shortcut..."), fti, SLOT(assignShortcut()) ); - contextMenu.insertItem( i18n("Expire..."), fti, SLOT(slotShowExpiryProperties()) ); + contextMenu.insertItem( SmallIconSet("configure_shortcuts"), i18n("&Assign Shortcut..."), fti, TQT_SLOT(assignShortcut()) ); + contextMenu.insertItem( i18n("Expire..."), fti, TQT_SLOT(slotShowExpiryProperties()) ); mainWidget()->action("modify")->plug( &contextMenu ); } else { contextMenu.insertItem( SmallIconSet("bookmark_add"), i18n("Add Favorite Folder..."), - this, SLOT(addFolder()) ); + this, TQT_SLOT(addFolder()) ); } contextMenu.exec( point, 0 ); } @@ -353,10 +353,10 @@ void FavoriteFolderView::removeFolder() void FavoriteFolderView::initializeFavorites() { - QValueList seenInboxes = GlobalSettings::self()->favoriteFolderViewSeenInboxes(); + TQValueList seenInboxes = GlobalSettings::self()->favoriteFolderViewSeenInboxes(); KMFolderTree *ft = mainWidget()->folderTree(); assert( ft ); - for ( QListViewItemIterator it( ft ); it.current(); ++it ) { + for ( TQListViewItemIterator it( ft ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast( it.current() ); if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.contains( fti->folder()->id() ) ) { seenInboxes.append( fti->folder()->id() ); @@ -375,19 +375,19 @@ void FavoriteFolderView::renameFolder() if ( !mContextMenuItem ) return; bool ok; - QString name = KInputDialog::getText( i18n("Rename Favorite"), i18n("Name"), mContextMenuItem->text( 0 ), &ok, this ); + TQString name = KInputDialog::getText( i18n("Rename Favorite"), i18n("Name"), mContextMenuItem->text( 0 ), &ok, this ); if ( !ok ) return; mContextMenuItem->setText( 0, name ); notifyInstancesOnChange(); } -QString FavoriteFolderView::prettyName(KMFolderTreeItem * fti) +TQString FavoriteFolderView::prettyName(KMFolderTreeItem * fti) { assert( fti ); assert( fti->folder() ); - QString name = fti->folder()->label(); - QListViewItem *accountFti = fti; + TQString name = fti->folder()->label(); + TQListViewItem *accountFti = fti; while ( accountFti->parent() ) accountFti = accountFti->parent(); if ( fti->type() == KFolderTreeItem::Inbox ) { @@ -406,7 +406,7 @@ QString FavoriteFolderView::prettyName(KMFolderTreeItem * fti) return name; } -void FavoriteFolderView::contentsDragEnterEvent(QDragEnterEvent * e) +void FavoriteFolderView::contentsDragEnterEvent(TQDragEnterEvent * e) { if ( e->provides( "application/x-qlistviewitem" ) ) { setDropVisualizer( true ); @@ -427,21 +427,21 @@ void FavoriteFolderView::readColorConfig() KConfig* conf = KMKernel::config(); // Custom/System color support KConfigGroupSaver saver(conf, "Reader"); - QColor c = KGlobalSettings::alternateBackgroundColor(); + TQColor c = KGlobalSettings::alternateBackgroundColor(); if ( !conf->readBoolEntry("defaultColors", true) ) mPaintInfo.colBack = conf->readColorEntry( "AltBackgroundColor",&c ); else mPaintInfo.colBack = c; - QPalette newPal = palette(); - newPal.setColor( QColorGroup::Base, mPaintInfo.colBack ); + TQPalette newPal = palette(); + newPal.setColor( TQColorGroup::Base, mPaintInfo.colBack ); setPalette( newPal ); } void FavoriteFolderView::addFolder() { KMFolderSelDlg dlg( mainWidget(), i18n("Add Favorite Folder"), false ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; KMFolder *folder = dlg.folder(); if ( !folder ) @@ -462,7 +462,7 @@ KMFolderTreeItem * FavoriteFolderView::findFolderTreeItem(KMFolder * folder) con assert( folder ); KMFolderTree *ft = mainWidget()->folderTree(); assert( ft ); - for ( QListViewItemIterator it( ft ); it.current(); ++it ) { + for ( TQListViewItemIterator it( ft ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast( it.current() ); if ( fti->folder() == folder ) return fti; @@ -473,7 +473,7 @@ KMFolderTreeItem * FavoriteFolderView::findFolderTreeItem(KMFolder * folder) con void FavoriteFolderView::checkMail() { bool found = false; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast( it.current() ); if ( fti->folder()->folderType() == KMFolderTypeImap || fti->folder()->folderType() == KMFolderTypeCachedImap ) { if ( !found ) @@ -496,7 +496,7 @@ void FavoriteFolderView::notifyInstancesOnChange() if ( mReadingConfig ) return; writeConfig(); - for ( QValueList::ConstIterator it = mInstances.begin(); it != mInstances.end(); ++it ) { + for ( TQValueList::ConstIterator it = mInstances.begin(); it != mInstances.end(); ++it ) { if ( (*it) == this || (*it)->mReadingConfig ) continue; (*it)->readConfig(); @@ -505,7 +505,7 @@ void FavoriteFolderView::notifyInstancesOnChange() void FavoriteFolderView::refresh() { - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem* fti = static_cast(it.current()); if (!fti || !fti->folder()) continue; diff --git a/kmail/favoritefolderview.h b/kmail/favoritefolderview.h index 6958a732..f19dd5d7 100644 --- a/kmail/favoritefolderview.h +++ b/kmail/favoritefolderview.h @@ -29,7 +29,7 @@ class FavoriteFolderViewItem : public KMFolderTreeItem { Q_OBJECT public: - FavoriteFolderViewItem( FavoriteFolderView *parent, const QString & name, KMFolder* folder ); + FavoriteFolderViewItem( FavoriteFolderView *parent, const TQString & name, KMFolder* folder ); protected: bool useTopLevelIcon() const { return false; } @@ -39,7 +39,7 @@ class FavoriteFolderViewItem : public KMFolderTreeItem void nameChanged(); private: - QString mOldName; + TQString mOldName; }; class FavoriteFolderView : public FolderTreeBase @@ -47,14 +47,14 @@ class FavoriteFolderView : public FolderTreeBase Q_OBJECT public: - FavoriteFolderView( KMMainWidget *mainWidget, QWidget *parent = 0 ); + FavoriteFolderView( KMMainWidget *mainWidget, TQWidget *parent = 0 ); ~FavoriteFolderView(); void readConfig(); void writeConfig(); - KMFolderTreeItem* addFolder( KMFolder *folder, const QString &name = QString::null, - QListViewItem *after = 0 ); + KMFolderTreeItem* addFolder( KMFolder *folder, const TQString &name = TQString::null, + TQListViewItem *after = 0 ); void addFolder( KMFolderTreeItem *fti ); public slots: @@ -62,21 +62,21 @@ class FavoriteFolderView : public FolderTreeBase void checkMail(); protected: - bool acceptDrag(QDropEvent* e) const; - void contentsDragEnterEvent( QDragEnterEvent *e ); + bool acceptDrag(TQDropEvent* e) const; + void contentsDragEnterEvent( TQDragEnterEvent *e ); void readColorConfig(); private: - static QString prettyName( KMFolderTreeItem* fti ); + static TQString prettyName( KMFolderTreeItem* fti ); KMFolderTreeItem* findFolderTreeItem( KMFolder* folder ) const; void handleGroupwareFolder( KMFolderTreeItem *fti ); private slots: void selectionChanged(); - void itemClicked( QListViewItem *item ); + void itemClicked( TQListViewItem *item ); void folderRemoved( KMFolder *folder ); - void dropped( QDropEvent *e, QListViewItem *after ); - void contextMenu( QListViewItem *item, const QPoint &point ); + void dropped( TQDropEvent *e, TQListViewItem *after ); + void contextMenu( TQListViewItem *item, const TQPoint &point ); void removeFolder(); void initializeFavorites(); void renameFolder(); @@ -86,7 +86,7 @@ class FavoriteFolderView : public FolderTreeBase private: KMFolderTreeItem* mContextMenuItem; - static QValueList mInstances; + static TQValueList mInstances; bool mReadingConfig; }; diff --git a/kmail/filehtmlwriter.cpp b/kmail/filehtmlwriter.cpp index 28e1b758..7e937c46 100644 --- a/kmail/filehtmlwriter.cpp +++ b/kmail/filehtmlwriter.cpp @@ -40,11 +40,11 @@ namespace KMail { - FileHtmlWriter::FileHtmlWriter( const QString & filename ) + FileHtmlWriter::FileHtmlWriter( const TQString & filename ) : HtmlWriter(), - mFile( filename.isEmpty() ? QString( "filehtmlwriter.out" ) : filename ) + mFile( filename.isEmpty() ? TQString( "filehtmlwriter.out" ) : filename ) { - mStream.setEncoding( QTextStream::UnicodeUTF8 ); + mStream.setEncoding( TQTextStream::UnicodeUTF8 ); } FileHtmlWriter::~FileHtmlWriter() { @@ -55,7 +55,7 @@ namespace KMail { } } - void FileHtmlWriter::begin( const QString & css ) { + void FileHtmlWriter::begin( const TQString & css ) { openOrWarn(); if ( !css.isEmpty() ) write( "\n" ); @@ -74,12 +74,12 @@ namespace KMail { } } - void FileHtmlWriter::write( const QString & str ) { + void FileHtmlWriter::write( const TQString & str ) { mStream << str; flush(); } - void FileHtmlWriter::queue( const QString & str ) { + void FileHtmlWriter::queue( const TQString & str ) { write( str ); } @@ -99,7 +99,7 @@ namespace KMail { mStream.setDevice( &mFile ); } - void FileHtmlWriter::embedPart( const QCString & contentId, const QString & url ) { + void FileHtmlWriter::embedPart( const TQCString & contentId, const TQString & url ) { mStream << "" << endl; flush(); } diff --git a/kmail/filehtmlwriter.h b/kmail/filehtmlwriter.h index f0b81e5a..9897bc5e 100644 --- a/kmail/filehtmlwriter.h +++ b/kmail/filehtmlwriter.h @@ -34,8 +34,8 @@ #include "interfaces/htmlwriter.h" -#include -#include +#include +#include class QString; @@ -43,23 +43,23 @@ namespace KMail { class FileHtmlWriter : public KMail::HtmlWriter { public: - FileHtmlWriter( const QString & filename ); + FileHtmlWriter( const TQString & filename ); virtual ~FileHtmlWriter(); - void begin( const QString & cssDefs ); + void begin( const TQString & cssDefs ); void end(); void reset(); - void write( const QString & str ); - void queue( const QString & str ); + void write( const TQString & str ); + void queue( const TQString & str ); void flush(); - void embedPart( const QCString & contentId, const QString & url ); + void embedPart( const TQCString & contentId, const TQString & url ); private: void openOrWarn(); private: - QFile mFile; - QTextStream mStream; + TQFile mFile; + TQTextStream mStream; }; } // namespace KMail diff --git a/kmail/filterimporterexporter.cpp b/kmail/filterimporterexporter.cpp index af77541d..bfe40170 100644 --- a/kmail/filterimporterexporter.cpp +++ b/kmail/filterimporterexporter.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include using namespace KMail; @@ -47,14 +47,14 @@ using namespace KMail; class FilterSelectionDialog : public KDialogBase { public: - FilterSelectionDialog( QWidget * parent = 0 ) + FilterSelectionDialog( TQWidget * parent = 0 ) :KDialogBase( parent, "filterselection", true, i18n("Select Filters"), Ok|Cancel, Ok, true ), wasCancelled( false ) { filtersListView = new KListView( this ); setMainWidget(filtersListView); filtersListView->setSorting( -1 ); - filtersListView->setSelectionMode( QListView::NoSelection ); + filtersListView->setSelectionMode( TQListView::NoSelection ); filtersListView->addColumn( i18n("Filters"), 300 ); filtersListView->setFullWidth( true ); resize( 300, 350 ); @@ -75,26 +75,26 @@ public: return wasCancelled; } - void setFilters( const QValueList& filters ) + void setFilters( const TQValueList& filters ) { originalFilters = filters; filtersListView->clear(); - QValueListConstIterator it = filters.constEnd(); + TQValueListConstIterator it = filters.constEnd(); while ( it != filters.constBegin() ) { --it; KMFilter* filter = *it; - QCheckListItem* item = new QCheckListItem( filtersListView, filter->name(), QCheckListItem::CheckBox ); + TQCheckListItem* item = new TQCheckListItem( filtersListView, filter->name(), TQCheckListItem::CheckBox ); item->setOn( true ); } } - QValueList selectedFilters() const + TQValueList selectedFilters() const { - QValueList filters; - QListViewItemIterator it( filtersListView ); + TQValueList filters; + TQListViewItemIterator it( filtersListView ); int i = 0; while( it.current() ) { - QCheckListItem* item = static_cast( it.current() ); + TQCheckListItem* item = static_cast( it.current() ); if ( item->isOn() ) filters << originalFilters[i]; ++i; ++it; @@ -103,12 +103,12 @@ public: } private: KListView *filtersListView; - QValueList originalFilters; + TQValueList originalFilters; bool wasCancelled; }; /* static */ -QValueList FilterImporterExporter::readFiltersFromConfig( KConfig* config, bool bPopFilter ) +TQValueList FilterImporterExporter::readFiltersFromConfig( KConfig* config, bool bPopFilter ) { KConfigGroupSaver saver(config, "General"); int numFilters = 0; @@ -117,9 +117,9 @@ QValueList FilterImporterExporter::readFiltersFromConfig( KConfig* co else numFilters = config->readNumEntry("filters",0); - QValueList filters; + TQValueList filters; for ( int i=0 ; i < numFilters ; ++i ) { - QString grpName; + TQString grpName; grpName.sprintf("%s #%d", (bPopFilter ? "PopFilter" : "Filter") , i); KConfigGroupSaver saver(config, grpName); KMFilter * filter = new KMFilter(config, bPopFilter); @@ -137,20 +137,20 @@ QValueList FilterImporterExporter::readFiltersFromConfig( KConfig* co } /* static */ -void FilterImporterExporter::writeFiltersToConfig( const QValueList& filters, KConfig* config, bool bPopFilter ) +void FilterImporterExporter::writeFiltersToConfig( const TQValueList& filters, KConfig* config, bool bPopFilter ) { // first, delete all groups: - QStringList filterGroups = - config->groupList().grep( QRegExp( bPopFilter ? "PopFilter #\\d+" : "Filter #\\d+" ) ); - for ( QStringList::Iterator it = filterGroups.begin() ; + TQStringList filterGroups = + config->groupList().grep( TQRegExp( bPopFilter ? "PopFilter #\\d+" : "Filter #\\d+" ) ); + for ( TQStringList::Iterator it = filterGroups.begin() ; it != filterGroups.end() ; ++it ) config->deleteGroup( *it ); int i = 0; - for ( QValueListConstIterator it = filters.constBegin() ; + for ( TQValueListConstIterator it = filters.constBegin() ; it != filters.constEnd() ; ++it ) { if ( !(*it)->isEmpty() ) { - QString grpName; + TQString grpName; if ( bPopFilter ) grpName.sprintf("PopFilter #%d", i); else @@ -168,7 +168,7 @@ void FilterImporterExporter::writeFiltersToConfig( const QValueList& } -FilterImporterExporter::FilterImporterExporter( QWidget* parent, bool popFilter ) +FilterImporterExporter::FilterImporterExporter( TQWidget* parent, bool popFilter ) :mParent( parent), mPopFilter( popFilter ) { } @@ -177,31 +177,31 @@ FilterImporterExporter::~FilterImporterExporter() { } -QValueList FilterImporterExporter::importFilters() +TQValueList FilterImporterExporter::importFilters() { - QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(), QString::null, mParent, i18n("Import Filters") ); + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(), TQString::null, mParent, i18n("Import Filters") ); if ( fileName.isEmpty() ) - return QValueList(); // cancel + return TQValueList(); // cancel { // scoping - QFile f( fileName ); + TQFile f( fileName ); if ( !f.open( IO_ReadOnly ) ) { KMessageBox::error( mParent, i18n("The selected file is not readable. Your file access permissions might be insufficient.") ); - return QValueList(); + return TQValueList(); } } KConfig config( fileName ); - QValueList imported = readFiltersFromConfig( &config, mPopFilter ); + TQValueList imported = readFiltersFromConfig( &config, mPopFilter ); FilterSelectionDialog dlg( mParent ); dlg.setFilters( imported ); dlg.exec(); - return dlg.cancelled() ? QValueList() : dlg.selectedFilters(); + return dlg.cancelled() ? TQValueList() : dlg.selectedFilters(); } -void FilterImporterExporter::exportFilters(const QValueList & filters ) +void FilterImporterExporter::exportFilters(const TQValueList & filters ) { - KURL saveUrl = KFileDialog::getSaveURL( QDir::homeDirPath(), QString::null, mParent, i18n("Export Filters") ); + KURL saveUrl = KFileDialog::getSaveURL( TQDir::homeDirPath(), TQString::null, mParent, i18n("Export Filters") ); if ( saveUrl.isEmpty() || !Util::checkOverwrite( saveUrl, mParent ) ) return; diff --git a/kmail/filterimporterexporter.h b/kmail/filterimporterexporter.h index 72d29e97..c6386b42 100644 --- a/kmail/filterimporterexporter.h +++ b/kmail/filterimporterexporter.h @@ -30,7 +30,7 @@ #ifndef __FILTERIMPORTEREXPORTER_H__ #define __FILTERIMPORTEREXPORTER_H__ -#include +#include class KMFilter; class KConfig; @@ -46,22 +46,22 @@ namespace KMail class FilterImporterExporter { public: - FilterImporterExporter( QWidget* parent, bool popFilter = false ); + FilterImporterExporter( TQWidget* parent, bool popFilter = false ); virtual ~FilterImporterExporter(); /** Export the given filter rules to a file which * is asked from the user. The list to export is also * presented for confirmation/selection. */ - void exportFilters( const QValueList & ); + void exportFilters( const TQValueList & ); /** Import filters. Ask the user where to import them from * and which filters to import. */ - QValueList importFilters(); + TQValueList importFilters(); - static void writeFiltersToConfig( const QValueList& filters, KConfig* config, bool bPopFilter ); - static QValueList readFiltersFromConfig( KConfig* config, bool bPopFilter ); + static void writeFiltersToConfig( const TQValueList& filters, KConfig* config, bool bPopFilter ); + static TQValueList readFiltersFromConfig( KConfig* config, bool bPopFilter ); private: - QWidget* mParent; + TQWidget* mParent; bool mPopFilter; }; diff --git a/kmail/filterlog.cpp b/kmail/filterlog.cpp index 23848dfb..7415c10d 100644 --- a/kmail/filterlog.cpp +++ b/kmail/filterlog.cpp @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include @@ -68,11 +68,11 @@ FilterLog * FilterLog::instance() } -void FilterLog::add( QString logEntry, ContentType contentType ) +void FilterLog::add( TQString logEntry, ContentType contentType ) { if ( isLogging() && ( mAllowedTypes & contentType ) ) { - QString timedLog = "[" + QTime::currentTime().toString() + "] "; + TQString timedLog = "[" + TQTime::currentTime().toString() + "] "; if ( contentType & ~meta ) timedLog += logEntry; else @@ -102,7 +102,7 @@ void FilterLog::dump() { #ifndef NDEBUG kdDebug(5006) << "----- starting filter log -----" << endl; - for ( QStringList::Iterator it = mLogEntries.begin(); + for ( TQStringList::Iterator it = mLogEntries.begin(); it != mLogEntries.end(); ++it ) { kdDebug(5006) << *it << endl; @@ -117,17 +117,17 @@ void FilterLog::checkLogSize() if ( mCurrentLogSize > mMaxLogSize && mMaxLogSize > -1 ) { kdDebug(5006) << "Filter log: memory limit reached, starting to discard old items, size = " - << QString::number( mCurrentLogSize ) << endl; + << TQString::number( mCurrentLogSize ) << endl; // avoid some kind of hysteresis, shrink the log to 90% of its maximum while ( mCurrentLogSize > ( mMaxLogSize * 0.9 ) ) { - QValueListIterator it = mLogEntries.begin(); + TQValueListIterator it = mLogEntries.begin(); if ( it != mLogEntries.end()) { mCurrentLogSize -= (*it).length(); mLogEntries.remove( it ); kdDebug(5006) << "Filter log: new size = " - << QString::number( mCurrentLogSize ) << endl; + << TQString::number( mCurrentLogSize ) << endl; } else { @@ -140,18 +140,18 @@ void FilterLog::checkLogSize() } -bool FilterLog::saveToFile( QString fileName ) +bool FilterLog::saveToFile( TQString fileName ) { - QFile file( fileName ); + TQFile file( fileName ); if( file.open( IO_WriteOnly ) ) { fchmod( file.handle(), S_IRUSR | S_IWUSR ); { - QDataStream ds( &file ); - for ( QStringList::Iterator it = mLogEntries.begin(); + TQDataStream ds( &file ); + for ( TQStringList::Iterator it = mLogEntries.begin(); it != mLogEntries.end(); ++it ) { - QString tmpString = *it + '\n'; - QCString cstr( tmpString.local8Bit() ); + TQString tmpString = *it + '\n'; + TQCString cstr( tmpString.local8Bit() ); ds.writeRawBytes( cstr, cstr.size() ); } } diff --git a/kmail/filterlog.h b/kmail/filterlog.h index 81455679..d49efb22 100644 --- a/kmail/filterlog.h +++ b/kmail/filterlog.h @@ -29,9 +29,9 @@ #ifndef KMAIL_FILTERLOG_H #define KMAIL_FILTERLOG_H -#include -#include -#include +#include +#include +#include namespace KMail { @@ -102,7 +102,7 @@ namespace KMail { /** add a log entry */ - void add( QString logEntry, ContentType contentType ); + void add( TQString logEntry, ContentType contentType ); /** add a separating line in the log */ void addSeparator() { add( "------------------------------", meta ); }; /** discard collected log data */ @@ -115,19 +115,19 @@ namespace KMail { /** get access to the log entries */ - const QStringList & getLogEntries() { return mLogEntries; }; + const TQStringList & getLogEntries() { return mLogEntries; }; /** dump the log - for testing purposes */ void dump(); /** save the log to a file - returns true if okay */ - bool saveToFile( QString fileName ); + bool saveToFile( TQString fileName ); /** destructor */ virtual ~FilterLog(); - static QString recode( const QString & plain ) { return QStyleSheet::escape(plain); }; + static TQString recode( const TQString & plain ) { return TQStyleSheet::escape(plain); }; signals: - void logEntryAdded( QString ); + void logEntryAdded( TQString ); void logShrinked(); void logStateChanged(); @@ -136,7 +136,7 @@ namespace KMail { FilterLog(); /** The list contains the single log pieces */ - QStringList mLogEntries; + TQStringList mLogEntries; /** the log status */ bool mLogging; diff --git a/kmail/filterlogdlg.cpp b/kmail/filterlogdlg.cpp index a10a056e..90eb5926 100644 --- a/kmail/filterlogdlg.cpp +++ b/kmail/filterlogdlg.cpp @@ -36,14 +36,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -52,56 +52,56 @@ using namespace KMail; -FilterLogDialog::FilterLogDialog( QWidget * parent ) +FilterLogDialog::FilterLogDialog( TQWidget * parent ) : KDialogBase( parent, "FilterLogDlg", false, i18n( "Filter Log Viewer" ), User1|User2|Close, Close, true, KStdGuiItem::clear(), KStdGuiItem::saveAs() ) { setWFlags( WDestructiveClose ); - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); - mTextEdit = new QTextEdit( page ); + mTextEdit = new TQTextEdit( page ); mTextEdit->setReadOnly( true ); - mTextEdit->setWordWrap( QTextEdit::NoWrap ); - mTextEdit->setTextFormat( QTextEdit::LogText ); + mTextEdit->setWordWrap( TQTextEdit::NoWrap ); + mTextEdit->setTextFormat( TQTextEdit::LogText ); - QStringList logEntries = FilterLog::instance()->getLogEntries(); - for ( QStringList::Iterator it = logEntries.begin(); + TQStringList logEntries = FilterLog::instance()->getLogEntries(); + for ( TQStringList::Iterator it = logEntries.begin(); it != logEntries.end(); ++it ) { mTextEdit->append( *it ); } - mLogActiveBox = new QCheckBox( i18n("&Log filter activities"), page ); + mLogActiveBox = new TQCheckBox( i18n("&Log filter activities"), page ); mLogActiveBox->setChecked( FilterLog::instance()->isLogging() ); - connect( mLogActiveBox, SIGNAL(clicked()), - this, SLOT(slotSwitchLogState(void)) ); - QWhatsThis::add( mLogActiveBox, + connect( mLogActiveBox, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSwitchLogState(void)) ); + TQWhatsThis::add( mLogActiveBox, i18n( "You can turn logging of filter activities on and off here. " "Of course, log data is collected and shown only when logging " "is turned on. " ) ); - mLogDetailsBox = new QVGroupBox( i18n( "Logging Details" ), page ); + mLogDetailsBox = new TQVGroupBox( i18n( "Logging Details" ), page ); mLogDetailsBox->setEnabled( mLogActiveBox->isChecked() ); - connect( mLogActiveBox, SIGNAL( toggled( bool ) ), - mLogDetailsBox, SLOT( setEnabled( bool ) ) ); + connect( mLogActiveBox, TQT_SIGNAL( toggled( bool ) ), + mLogDetailsBox, TQT_SLOT( setEnabled( bool ) ) ); - mLogPatternDescBox = new QCheckBox( i18n("Log pattern description"), + mLogPatternDescBox = new TQCheckBox( i18n("Log pattern description"), mLogDetailsBox ); mLogPatternDescBox->setChecked( FilterLog::instance()->isContentTypeEnabled( FilterLog::patternDesc ) ); - connect( mLogPatternDescBox, SIGNAL(clicked()), - this, SLOT(slotChangeLogDetail(void)) ); + connect( mLogPatternDescBox, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChangeLogDetail(void)) ); // TODO - //QWhatsThis::add( mLogPatternDescBox, + //TQWhatsThis::add( mLogPatternDescBox, // i18n( "" ) ); - mLogRuleEvaluationBox = new QCheckBox( i18n("Log filter &rule evaluation"), + mLogRuleEvaluationBox = new TQCheckBox( i18n("Log filter &rule evaluation"), mLogDetailsBox ); mLogRuleEvaluationBox->setChecked( FilterLog::instance()->isContentTypeEnabled( FilterLog::ruleResult ) ); - connect( mLogRuleEvaluationBox, SIGNAL(clicked()), - this, SLOT(slotChangeLogDetail(void)) ); - QWhatsThis::add( mLogRuleEvaluationBox, + connect( mLogRuleEvaluationBox, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChangeLogDetail(void)) ); + TQWhatsThis::add( mLogRuleEvaluationBox, i18n( "You can control the feedback in the log concerning the " "evaluation of the filter rules of applied filters: " "having this option checked will give detailed feedback " @@ -109,52 +109,52 @@ FilterLogDialog::FilterLogDialog( QWidget * parent ) "feedback about the result of the evaluation of all rules " "of a single filter will be given." ) ); - mLogPatternResultBox = new QCheckBox( i18n("Log filter pattern evaluation"), + mLogPatternResultBox = new TQCheckBox( i18n("Log filter pattern evaluation"), mLogDetailsBox ); mLogPatternResultBox->setChecked( FilterLog::instance()->isContentTypeEnabled( FilterLog::patternResult ) ); - connect( mLogPatternResultBox, SIGNAL(clicked()), - this, SLOT(slotChangeLogDetail(void)) ); + connect( mLogPatternResultBox, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChangeLogDetail(void)) ); // TODO - //QWhatsThis::add( mLogPatternResultBox, + //TQWhatsThis::add( mLogPatternResultBox, // i18n( "" ) ); - mLogFilterActionBox = new QCheckBox( i18n("Log filter actions"), + mLogFilterActionBox = new TQCheckBox( i18n("Log filter actions"), mLogDetailsBox ); mLogFilterActionBox->setChecked( FilterLog::instance()->isContentTypeEnabled( FilterLog::appliedAction ) ); - connect( mLogFilterActionBox, SIGNAL(clicked()), - this, SLOT(slotChangeLogDetail(void)) ); + connect( mLogFilterActionBox, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChangeLogDetail(void)) ); // TODO - //QWhatsThis::add( mLogFilterActionBox, + //TQWhatsThis::add( mLogFilterActionBox, // i18n( "" ) ); - QHBox * hbox = new QHBox( page ); - new QLabel( i18n("Log size limit:"), hbox ); - mLogMemLimitSpin = new QSpinBox( hbox ); + TQHBox * hbox = new TQHBox( page ); + new TQLabel( i18n("Log size limit:"), hbox ); + mLogMemLimitSpin = new TQSpinBox( hbox ); mLogMemLimitSpin->setMinValue( 1 ); mLogMemLimitSpin->setMaxValue( 1024 * 256 ); // 256 MB - // value in the QSpinBox is in KB while it's in Byte in the FilterLog + // value in the TQSpinBox is in KB while it's in Byte in the FilterLog mLogMemLimitSpin->setValue( FilterLog::instance()->getMaxLogSize() / 1024 ); mLogMemLimitSpin->setSuffix( " KB" ); mLogMemLimitSpin->setSpecialValueText( i18n("unlimited") ); - connect( mLogMemLimitSpin, SIGNAL(valueChanged(int)), - this, SLOT(slotChangeLogMemLimit(int)) ); - QWhatsThis::add( mLogMemLimitSpin, + connect( mLogMemLimitSpin, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotChangeLogMemLimit(int)) ); + TQWhatsThis::add( mLogMemLimitSpin, i18n( "Collecting log data uses memory to temporarily store the " "log data; here you can limit the maximum amount of memory " "to be used: if the size of the collected log data exceeds " "this limit then the oldest data will be discarded until " "the limit is no longer exceeded. " ) ); - connect(FilterLog::instance(), SIGNAL(logEntryAdded(QString)), - this, SLOT(slotLogEntryAdded(QString))); - connect(FilterLog::instance(), SIGNAL(logShrinked(void)), - this, SLOT(slotLogShrinked(void))); - connect(FilterLog::instance(), SIGNAL(logStateChanged(void)), - this, SLOT(slotLogStateChanged(void))); + connect(FilterLog::instance(), TQT_SIGNAL(logEntryAdded(TQString)), + this, TQT_SLOT(slotLogEntryAdded(TQString))); + connect(FilterLog::instance(), TQT_SIGNAL(logShrinked(void)), + this, TQT_SLOT(slotLogShrinked(void))); + connect(FilterLog::instance(), TQT_SIGNAL(logStateChanged(void)), + this, TQT_SLOT(slotLogStateChanged(void))); - setInitialSize( QSize( 500, 500 ) ); + setInitialSize( TQSize( 500, 500 ) ); #if !KDE_IS_VERSION( 3, 2, 91 ) // HACK - KWin keeps all dialogs on top of their mainwindows, but that's probably // wrong (#76026), and should be done only for modals. CVS HEAD should get @@ -164,7 +164,7 @@ FilterLogDialog::FilterLogDialog( QWidget * parent ) } -void FilterLogDialog::slotLogEntryAdded( QString logEntry ) +void FilterLogDialog::slotLogEntryAdded( TQString logEntry ) { mTextEdit->append( logEntry ); } @@ -191,7 +191,7 @@ void FilterLogDialog::slotLogStateChanged() mLogFilterActionBox->setChecked( FilterLog::instance()->isContentTypeEnabled( FilterLog::appliedAction ) ); - // value in the QSpinBox is in KB while it's in Byte in the FilterLog + // value in the TQSpinBox is in KB while it's in Byte in the FilterLog int newLogSize = FilterLog::instance()->getMaxLogSize() / 1024; if ( mLogMemLimitSpin->value() != newLogSize ) mLogMemLimitSpin->setValue( newLogSize ); @@ -243,8 +243,8 @@ void FilterLogDialog::slotUser1() void FilterLogDialog::slotUser2() { - QString fileName; - KFileDialog fdlg( QString::null, QString::null, this, 0, true ); + TQString fileName; + KFileDialog fdlg( TQString::null, TQString::null, this, 0, true ); fdlg.setMode( KFile::File ); fdlg.setSelection( "kmail-filter.log" ); @@ -258,7 +258,7 @@ void FilterLogDialog::slotUser2() i18n( "Could not write the file %1:\n" "\"%2\" is the detailed error description." ) .arg( fileName, - QString::fromLocal8Bit( strerror( errno ) ) ), + TQString::fromLocal8Bit( strerror( errno ) ) ), i18n( "KMail Error" ) ); } } diff --git a/kmail/filterlogdlg.h b/kmail/filterlogdlg.h index 9f05298d..5b8cd6af 100644 --- a/kmail/filterlogdlg.h +++ b/kmail/filterlogdlg.h @@ -51,10 +51,10 @@ namespace KMail { public: /** constructor */ - FilterLogDialog( QWidget * parent ); + FilterLogDialog( TQWidget * parent ); protected slots: - void slotLogEntryAdded( QString logEntry ); + void slotLogEntryAdded( TQString logEntry ); void slotLogShrinked(); void slotLogStateChanged(); void slotChangeLogDetail(); @@ -65,14 +65,14 @@ namespace KMail { virtual void slotUser1(); virtual void slotUser2(); - QTextEdit * mTextEdit; - QCheckBox * mLogActiveBox; - QGroupBox * mLogDetailsBox; - QCheckBox * mLogPatternDescBox; - QCheckBox * mLogRuleEvaluationBox; - QCheckBox * mLogPatternResultBox; - QCheckBox * mLogFilterActionBox; - QSpinBox * mLogMemLimitSpin; + TQTextEdit * mTextEdit; + TQCheckBox * mLogActiveBox; + TQGroupBox * mLogDetailsBox; + TQCheckBox * mLogPatternDescBox; + TQCheckBox * mLogRuleEvaluationBox; + TQCheckBox * mLogPatternResultBox; + TQCheckBox * mLogFilterActionBox; + TQSpinBox * mLogMemLimitSpin; }; } // namespace KMail diff --git a/kmail/folderIface.cpp b/kmail/folderIface.cpp index 3a6bc6f0..54df5167 100644 --- a/kmail/folderIface.cpp +++ b/kmail/folderIface.cpp @@ -45,7 +45,7 @@ namespace KMail { -FolderIface::FolderIface( const QString& vpath ) +FolderIface::FolderIface( const TQString& vpath ) : DCOPObject( "FolderIface" ), mPath( vpath ) { //kdDebug(5006)<<"FolderIface folder = "<< mPath < +TQValueList FolderIface::messageRefs() { - QValueList refList; + TQValueList refList; KMMsgList messageCache; KMFolderIndex *indexFolder = static_cast( mFolder); diff --git a/kmail/folderIface.h b/kmail/folderIface.h index 4c8b4136..d43adedb 100644 --- a/kmail/folderIface.h +++ b/kmail/folderIface.h @@ -31,7 +31,7 @@ #ifndef FOLDERIFACE_H #define FOLDERIFACE_H -#include +#include #include class KMFolder; @@ -39,31 +39,31 @@ class KMMainWidget; namespace KMail { - class FolderIface : public QObject, + class FolderIface : public TQObject, public DCOPObject { Q_OBJECT K_DCOP public: - FolderIface( const QString& vpath ); + FolderIface( const TQString& vpath ); k_dcop: - virtual QString path() const; - virtual QString displayName() const; - virtual QString displayPath() const; + virtual TQString path() const; + virtual TQString displayName() const; + virtual TQString displayPath() const; virtual bool usesCustomIcons() const; - virtual QString normalIconPath() const; - virtual QString unreadIconPath() const; + virtual TQString normalIconPath() const; + virtual TQString unreadIconPath() const; virtual int messages(); virtual int unreadMessages(); virtual int unreadRecursiveMessages(); //not yet - //virtual QValueList messageRefs(); + //virtual TQValueList messageRefs(); protected: KMFolder* mFolder; - QString mPath; + TQString mPath; }; } diff --git a/kmail/folderdiaacltab.cpp b/kmail/folderdiaacltab.cpp index 4b4a5b6b..d1f02a57 100644 --- a/kmail/folderdiaacltab.cpp +++ b/kmail/folderdiaacltab.cpp @@ -52,13 +52,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -83,46 +83,46 @@ static const struct { }; -KMail::ACLEntryDialog::ACLEntryDialog( IMAPUserIdFormat userIdFormat, const QString& caption, QWidget* parent, const char* name ) +KMail::ACLEntryDialog::ACLEntryDialog( IMAPUserIdFormat userIdFormat, const TQString& caption, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true /*modal*/, caption, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true /*sep*/ ) , mUserIdFormat( userIdFormat ) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QGridLayout *topLayout = new QGridLayout( page, 3 /*rows*/, 3 /*cols*/, 0, spacingHint() ); + TQGridLayout *topLayout = new TQGridLayout( page, 3 /*rows*/, 3 /*cols*/, 0, spacingHint() ); - QLabel *label = new QLabel( i18n( "&User identifier:" ), page ); + TQLabel *label = new TQLabel( i18n( "&User identifier:" ), page ); topLayout->addWidget( label, 0, 0 ); mUserIdLineEdit = new KLineEdit( page ); topLayout->addWidget( mUserIdLineEdit, 0, 1 ); label->setBuddy( mUserIdLineEdit ); - QWhatsThis::add( mUserIdLineEdit, i18n( "The User Identifier is the login of the user on the IMAP server. This can be a simple user name or the full email address of the user; the login for your own account on the server will tell you which one it is." ) ); + TQWhatsThis::add( mUserIdLineEdit, i18n( "The User Identifier is the login of the user on the IMAP server. This can be a simple user name or the full email address of the user; the login for your own account on the server will tell you which one it is." ) ); - QPushButton* kabBtn = new QPushButton( "...", page ); + TQPushButton* kabBtn = new TQPushButton( "...", page ); topLayout->addWidget( kabBtn, 0, 2 ); - mButtonGroup = new QVButtonGroup( i18n( "Permissions" ), page ); + mButtonGroup = new TQVButtonGroup( i18n( "Permissions" ), page ); topLayout->addMultiCellWidget( mButtonGroup, 1, 1, 0, 2 ); for ( unsigned int i = 0; i < sizeof( standardPermissions ) / sizeof( *standardPermissions ); ++i ) { - QRadioButton* cb = new QRadioButton( i18n( "Permissions", standardPermissions[i].userString ), mButtonGroup ); + TQRadioButton* cb = new TQRadioButton( i18n( "Permissions", standardPermissions[i].userString ), mButtonGroup ); // We store the permission value (bitfield) as the id of the radiobutton in the group mButtonGroup->insert( cb, standardPermissions[i].permissions ); } topLayout->setRowStretch(2, 10); - connect( mUserIdLineEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) ); - connect( kabBtn, SIGNAL( clicked() ), SLOT( slotSelectAddresses() ) ); - connect( mButtonGroup, SIGNAL( clicked( int ) ), SLOT( slotChanged() ) ); + connect( mUserIdLineEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) ); + connect( kabBtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddresses() ) ); + connect( mButtonGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotChanged() ) ); enableButtonOK( false ); mUserIdLineEdit->setFocus(); // Ensure the lineedit is rather wide so that email addresses can be read in it - incInitialSize( QSize( 200, 0 ) ); + incInitialSize( TQSize( 200, 0 ) ); } void KMail::ACLEntryDialog::slotChanged() @@ -130,9 +130,9 @@ void KMail::ACLEntryDialog::slotChanged() enableButtonOK( !mUserIdLineEdit->text().isEmpty() && mButtonGroup->selected() != 0 ); } -static QString addresseeToUserId( const KABC::Addressee& addr, IMAPUserIdFormat userIdFormat ) +static TQString addresseeToUserId( const KABC::Addressee& addr, IMAPUserIdFormat userIdFormat ) { - QString email = addr.preferredEmail(); + TQString email = addr.preferredEmail(); if ( userIdFormat == FullEmail ) return email; else { // mUserIdFormat == UserName @@ -148,14 +148,14 @@ void KMail::ACLEntryDialog::slotSelectAddresses() dlg.setShowBCC( false ); if ( mUserIdFormat == FullEmail ) // otherwise we have no way to go back from userid to email dlg.setSelectedTo( userIds() ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; - const QStringList distrLists = dlg.toDistributionLists(); - QString txt = distrLists.join( ", " ); + const TQStringList distrLists = dlg.toDistributionLists(); + TQString txt = distrLists.join( ", " ); const KABC::Addressee::List lst = dlg.toAddresses(); if ( !lst.isEmpty() ) { - for( QValueList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + for( TQValueList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { if ( !txt.isEmpty() ) txt += ", "; txt += addresseeToUserId( *it, mUserIdFormat ); @@ -164,22 +164,22 @@ void KMail::ACLEntryDialog::slotSelectAddresses() mUserIdLineEdit->setText( txt ); } -void KMail::ACLEntryDialog::setValues( const QString& userId, unsigned int permissions ) +void KMail::ACLEntryDialog::setValues( const TQString& userId, unsigned int permissions ) { mUserIdLineEdit->setText( userId ); mButtonGroup->setButton( permissions ); enableButtonOK( !userId.isEmpty() ); } -QString KMail::ACLEntryDialog::userId() const +TQString KMail::ACLEntryDialog::userId() const { return mUserIdLineEdit->text(); } -QStringList KMail::ACLEntryDialog::userIds() const +TQStringList KMail::ACLEntryDialog::userIds() const { - QStringList lst = QStringList::split( ",", mUserIdLineEdit->text() ); - for( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + TQStringList lst = TQStringList::split( ",", mUserIdLineEdit->text() ); + for( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { // Strip white space (in particular, due to ", ") *it = (*it).stripWhiteSpace(); } @@ -194,13 +194,13 @@ unsigned int KMail::ACLEntryDialog::permissions() const // class KMail::FolderDiaACLTab::ListView : public KListView // { // public: -// ListView( QWidget* parent, const char* name = 0 ) : KListView( parent, name ) {} +// ListView( TQWidget* parent, const char* name = 0 ) : KListView( parent, name ) {} // }; class KMail::FolderDiaACLTab::ListViewItem : public KListViewItem { public: - ListViewItem( QListView* listview ) + ListViewItem( TQListView* listview ) : KListViewItem( listview, listview->lastItem() ), mModified( false ), mNew( false ) {} @@ -213,8 +213,8 @@ public: #endif IMAPUserIdFormat userIdFormat ); - QString userId() const { return text( 0 ); } - void setUserId( const QString& userId ) { setText( 0, userId ); } + TQString userId() const { return text( 0 ); } + void setUserId( const TQString& userId ) { setText( 0, userId ); } unsigned int permissions() const { return mPermissions; } void setPermissions( unsigned int permissions ); @@ -229,13 +229,13 @@ public: private: unsigned int mPermissions; - QString mInternalRightsList; ///< protocol-dependent string (e.g. IMAP rights list) + TQString mInternalRightsList; ///< protocol-dependent string (e.g. IMAP rights list) bool mModified; bool mNew; }; // internalRightsList is only used if permissions doesn't match the standard set -static QString permissionsToUserString( unsigned int permissions, const QString& internalRightsList ) +static TQString permissionsToUserString( unsigned int permissions, const TQString& internalRightsList ) { for ( unsigned int i = 0; i < sizeof( standardPermissions ) / sizeof( *standardPermissions ); @@ -252,7 +252,7 @@ static QString permissionsToUserString( unsigned int permissions, const QString& void KMail::FolderDiaACLTab::ListViewItem::setPermissions( unsigned int permissions ) { mPermissions = permissions; - setText( 1, permissionsToUserString( permissions, QString::null ) ); + setText( 1, permissionsToUserString( permissions, TQString::null ) ); } void KMail::FolderDiaACLTab::ListViewItem::load( const ACLListEntry& entry ) @@ -296,17 +296,17 @@ void KMail::FolderDiaACLTab::ListViewItem::save( ACLList& aclList, KABC::DistributionList::Entry::List::ConstIterator it; // nice number of "::"! #endif for( it = entryList.begin(); it != entryList.end(); ++it ) { - QString email = (*it).email; + TQString email = (*it).email; if ( email.isEmpty() ) email = addresseeToUserId( (*it).addressee, userIdFormat ); - ACLListEntry entry( email, QString::null, mPermissions ); + ACLListEntry entry( email, TQString::null, mPermissions ); entry.changed = true; aclList.append( entry ); } } else { // it wasn't a distribution list ACLListEntry entry( userId(), mInternalRightsList, mPermissions ); if ( mModified ) { - entry.internalRightsList = QString::null; + entry.internalRightsList = TQString::null; entry.changed = true; } aclList.append( entry ); @@ -315,24 +315,24 @@ void KMail::FolderDiaACLTab::ListViewItem::save( ACLList& aclList, //// -KMail::FolderDiaACLTab::FolderDiaACLTab( KMFolderDialog* dlg, QWidget* parent, const char* name ) +KMail::FolderDiaACLTab::FolderDiaACLTab( KMFolderDialog* dlg, TQWidget* parent, const char* name ) : FolderDiaTab( parent, name ), mImapAccount( 0 ), mUserRights( 0 ), mDlg( dlg ), mChanged( false ), mAccepting( false ), mSaving( false ) { - QVBoxLayout* topLayout = new QVBoxLayout( this ); + TQVBoxLayout* topLayout = new TQVBoxLayout( this ); // We need a widget stack to show either a label ("no acl support", "please wait"...) // or a listview. - mStack = new QWidgetStack( this ); + mStack = new TQWidgetStack( this ); topLayout->addWidget( mStack ); - mLabel = new QLabel( mStack ); + mLabel = new TQLabel( mStack ); mLabel->setAlignment( AlignHCenter | AlignVCenter | WordBreak ); mStack->addWidget( mLabel ); - mACLWidget = new QHBox( mStack ); + mACLWidget = new TQHBox( mStack ); mACLWidget->setSpacing( KDialog::spacingHint() ); mListView = new KListView( mACLWidget ); mListView->setAllColumnsShowFocus( true ); @@ -340,28 +340,28 @@ KMail::FolderDiaACLTab::FolderDiaACLTab( KMFolderDialog* dlg, QWidget* parent, c mListView->addColumn( i18n( "User Id" ) ); mListView->addColumn( i18n( "Permissions" ) ); - connect( mListView, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)), - SLOT(slotEditACL(QListViewItem*)) ); - connect( mListView, SIGNAL(returnPressed(QListViewItem*)), - SLOT(slotEditACL(QListViewItem*)) ); - connect( mListView, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(slotSelectionChanged(QListViewItem*)) ); + connect( mListView, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), + TQT_SLOT(slotEditACL(TQListViewItem*)) ); + connect( mListView, TQT_SIGNAL(returnPressed(TQListViewItem*)), + TQT_SLOT(slotEditACL(TQListViewItem*)) ); + connect( mListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(slotSelectionChanged(TQListViewItem*)) ); - QVBox* buttonBox = new QVBox( mACLWidget ); + TQVBox* buttonBox = new TQVBox( mACLWidget ); buttonBox->setSpacing( KDialog::spacingHint() ); mAddACL = new KPushButton( i18n( "Add Entry..." ), buttonBox ); mEditACL = new KPushButton( i18n( "Modify Entry..." ), buttonBox ); mRemoveACL = new KPushButton( i18n( "Remove Entry" ), buttonBox ); - QWidget *spacer = new QWidget( buttonBox ); - spacer->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ); + TQWidget *spacer = new TQWidget( buttonBox ); + spacer->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ); - connect( mAddACL, SIGNAL( clicked() ), SLOT( slotAddACL() ) ); - connect( mEditACL, SIGNAL( clicked() ), SLOT( slotEditACL() ) ); - connect( mRemoveACL, SIGNAL( clicked() ), SLOT( slotRemoveACL() ) ); + connect( mAddACL, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddACL() ) ); + connect( mEditACL, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditACL() ) ); + connect( mRemoveACL, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveACL() ) ); mEditACL->setEnabled( false ); mRemoveACL->setEnabled( false ); - connect( this, SIGNAL( changed(bool) ), SLOT( slotChanged(bool) ) ); + connect( this, TQT_SIGNAL( changed(bool) ), TQT_SLOT( slotChanged(bool) ) ); } // Warning before save() this will return the url of the _parent_ folder, when creating a new one @@ -409,12 +409,12 @@ void KMail::FolderDiaACLTab::load() // or just the username part of it. // To know which one it is, we currently have a hidden config option, // but the default value is determined from the current user's own id. - QString defaultFormat = "fullemail"; + TQString defaultFormat = "fullemail"; // warning mImapAccount can be 0 if creating a subsubsubfolder with dimap... (bug?) if ( mImapAccount && mImapAccount->login().find('@') == -1 ) defaultFormat = "username"; // no @ found, so we assume it's just the username KConfigGroup configGroup( kmkernel->config(), "IMAP" ); - QString str = configGroup.readEntry( "UserIdFormat", defaultFormat ); + TQString str = configGroup.readEntry( "UserIdFormat", defaultFormat ); mUserIdFormat = FullEmail; if ( str == "username" ) mUserIdFormat = UserName; @@ -452,19 +452,19 @@ void KMail::FolderDiaACLTab::load() mLabel->setText( i18n( "Connecting to server %1, please wait..." ).arg( mImapAccount->host() ) ); ImapAccountBase::ConnectionState state = mImapAccount->makeConnection(); if ( state == ImapAccountBase::Error ) { // Cancelled by user, or slave can't start - slotConnectionResult( -1, QString::null ); + slotConnectionResult( -1, TQString::null ); } else if ( state == ImapAccountBase::Connecting ) { - connect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + connect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); } else { // Connected - slotConnectionResult( 0, QString::null ); + slotConnectionResult( 0, TQString::null ); } } -void KMail::FolderDiaACLTab::slotConnectionResult( int errorCode, const QString& errorMsg ) +void KMail::FolderDiaACLTab::slotConnectionResult( int errorCode, const TQString& errorMsg ) { - disconnect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + disconnect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); if ( errorCode ) { if ( errorCode == -1 ) // unspecified error mLabel->setText( i18n( "Error connecting to server %1" ).arg( mImapAccount->host() ) ); @@ -475,8 +475,8 @@ void KMail::FolderDiaACLTab::slotConnectionResult( int errorCode, const QString& } if ( mUserRights == 0 ) { - connect( mImapAccount, SIGNAL( receivedUserRights( KMFolder* ) ), - this, SLOT( slotReceivedUserRights( KMFolder* ) ) ); + connect( mImapAccount, TQT_SIGNAL( receivedUserRights( KMFolder* ) ), + this, TQT_SLOT( slotReceivedUserRights( KMFolder* ) ) ); KMFolder* folder = mDlg->folder() ? mDlg->folder() : mDlg->parentFolder(); mImapAccount->getUserRights( folder, mImapPath ); } @@ -502,15 +502,15 @@ void KMail::FolderDiaACLTab::startListing() { // List ACLs of folder - or its parent, if creating a new folder mImapAccount->getACL( mDlg->folder() ? mDlg->folder() : mDlg->parentFolder(), mImapPath ); - connect( mImapAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), - this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); + connect( mImapAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), + this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); } void KMail::FolderDiaACLTab::slotReceivedACL( KMFolder* folder, KIO::Job* job, const KMail::ACLList& aclList ) { if ( folder == ( mDlg->folder() ? mDlg->folder() : mDlg->parentFolder() ) ) { - disconnect( mImapAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), - this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); + disconnect( mImapAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), + this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); if ( job && job->error() ) { if ( job->error() == KIO::ERR_UNSUPPORTED_ACTION ) @@ -547,7 +547,7 @@ void KMail::FolderDiaACLTab::loadFinished( const ACLList& aclList ) slotSelectionChanged( mListView->selectedItem() ); } -void KMail::FolderDiaACLTab::slotEditACL(QListViewItem* item) +void KMail::FolderDiaACLTab::slotEditACL(TQListViewItem* item) { if ( !item ) return; bool canAdmin = ( mUserRights & ACLJobs::Administer ); @@ -563,8 +563,8 @@ void KMail::FolderDiaACLTab::slotEditACL(QListViewItem* item) ListViewItem* ACLitem = static_cast( mListView->currentItem() ); ACLEntryDialog dlg( mUserIdFormat, i18n( "Modify Permissions" ), this ); dlg.setValues( ACLitem->userId(), ACLitem->permissions() ); - if ( dlg.exec() == QDialog::Accepted ) { - QStringList userIds = dlg.userIds(); + if ( dlg.exec() == TQDialog::Accepted ) { + TQStringList userIds = dlg.userIds(); Q_ASSERT( !userIds.isEmpty() ); // impossible, the OK button is disabled in that case ACLitem->setUserId( dlg.userIds().front() ); ACLitem->setPermissions( dlg.permissions() ); @@ -582,9 +582,9 @@ void KMail::FolderDiaACLTab::slotEditACL() slotEditACL( mListView->currentItem() ); } -void KMail::FolderDiaACLTab::addACLs( const QStringList& userIds, unsigned int permissions ) +void KMail::FolderDiaACLTab::addACLs( const TQStringList& userIds, unsigned int permissions ) { - for( QStringList::const_iterator it = userIds.begin(); it != userIds.end(); ++it ) { + for( TQStringList::const_iterator it = userIds.begin(); it != userIds.end(); ++it ) { ListViewItem* ACLitem = new ListViewItem( mListView ); ACLitem->setUserId( *it ); ACLitem->setPermissions( permissions ); @@ -596,14 +596,14 @@ void KMail::FolderDiaACLTab::addACLs( const QStringList& userIds, unsigned int p void KMail::FolderDiaACLTab::slotAddACL() { ACLEntryDialog dlg( mUserIdFormat, i18n( "Add Permissions" ), this ); - if ( dlg.exec() == QDialog::Accepted ) { - const QStringList userIds = dlg.userIds(); + if ( dlg.exec() == TQDialog::Accepted ) { + const TQStringList userIds = dlg.userIds(); addACLs( dlg.userIds(), dlg.permissions() ); emit changed(true); } } -void KMail::FolderDiaACLTab::slotSelectionChanged(QListViewItem* item) +void KMail::FolderDiaACLTab::slotSelectionChanged(TQListViewItem* item) { bool canAdmin = ( mUserRights & ACLJobs::Administer ); bool canAdminThisItem = canAdmin; @@ -675,7 +675,7 @@ bool KMail::FolderDiaACLTab::save() manager.load(); #endif ACLList aclList; - for ( QListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) { + for ( TQListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) { ListViewItem* ACLitem = static_cast( item ); ACLitem->save( aclList, #ifdef KDEPIM_NEW_DISTRLISTS @@ -691,17 +691,17 @@ bool KMail::FolderDiaACLTab::save() // we have to add the old userid to the "to be deleted" list. for( ACLList::ConstIterator init = mInitialACLList.begin(); init != mInitialACLList.end(); ++init ) { bool isInNewList = false; - QString uid = (*init).userId; + TQString uid = (*init).userId; for( ACLList::ConstIterator it = aclList.begin(); it != aclList.end() && !isInNewList; ++it ) isInNewList = uid == (*it).userId; if ( !isInNewList && !mRemovedACLs.contains(uid) ) mRemovedACLs.append( uid ); } - for ( QStringList::ConstIterator rit = mRemovedACLs.begin(); rit != mRemovedACLs.end(); ++rit ) { + for ( TQStringList::ConstIterator rit = mRemovedACLs.begin(); rit != mRemovedACLs.end(); ++rit ) { // We use permissions == -1 to signify deleting. At least on cyrus, setacl(0) or deleteacl are the same, // but I'm not sure if that's true for all servers. - ACLListEntry entry( *rit, QString::null, -1 ); + ACLListEntry entry( *rit, TQString::null, -1 ); entry.changed = true; aclList.append( entry ); } @@ -723,8 +723,8 @@ bool KMail::FolderDiaACLTab::save() if ( mDlg->isNewFolder() ) { // The folder isn't created yet, wait for it // It's a two-step process (mkdir+listDir) so we wait for the dir listing to be complete - connect( parentImap, SIGNAL( directoryListingFinished(KMFolderImap*) ), - this, SLOT( slotDirectoryListingFinished(KMFolderImap*) ) ); + connect( parentImap, TQT_SIGNAL( directoryListingFinished(KMFolderImap*) ), + this, TQT_SLOT( slotDirectoryListingFinished(KMFolderImap*) ) ); } else { slotDirectoryListingFinished( parentImap ); } @@ -752,10 +752,10 @@ void KMail::FolderDiaACLTab::slotDirectoryListingFinished(KMFolderImap* f) jd.total = 1; jd.done = 0; jd.parent = 0; mImapAccount->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotMultiSetACLResult(KIO::Job *))); - connect(job, SIGNAL(aclChanged( const QString&, int )), - SLOT(slotACLChanged( const QString&, int )) ); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotMultiSetACLResult(KIO::Job *))); + connect(job, TQT_SIGNAL(aclChanged( const TQString&, int )), + TQT_SLOT(slotACLChanged( const TQString&, int )) ); } void KMail::FolderDiaACLTab::slotMultiSetACLResult(KIO::Job* job) @@ -776,13 +776,13 @@ void KMail::FolderDiaACLTab::slotMultiSetACLResult(KIO::Job* job) } } -void KMail::FolderDiaACLTab::slotACLChanged( const QString& userId, int permissions ) +void KMail::FolderDiaACLTab::slotACLChanged( const TQString& userId, int permissions ) { // The job indicates success in changing the permissions for this user // -> we note that it's been done. bool ok = false; if ( permissions > -1 ) { - for ( QListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) { + for ( TQListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) { ListViewItem* ACLitem = static_cast( item ); if ( ACLitem->userId() == userId ) { ACLitem->setModified( false ); diff --git a/kmail/folderdiaacltab.h b/kmail/folderdiaacltab.h index a800af9b..466ec2d6 100644 --- a/kmail/folderdiaacltab.h +++ b/kmail/folderdiaacltab.h @@ -48,7 +48,7 @@ namespace KMail { enum IMAPUserIdFormat { FullEmail, UserName }; struct ACLListEntry; -typedef QValueVector ACLList; +typedef TQValueVector ACLList; class ImapAccountBase; @@ -60,12 +60,12 @@ class ACLEntryDialog :public KDialogBase { Q_OBJECT public: - ACLEntryDialog( IMAPUserIdFormat userIdFormat, const QString& caption, QWidget* parent, const char* name = 0 ); + ACLEntryDialog( IMAPUserIdFormat userIdFormat, const TQString& caption, TQWidget* parent, const char* name = 0 ); - void setValues( const QString& userId, unsigned int permissions ); + void setValues( const TQString& userId, unsigned int permissions ); - QString userId() const; - QStringList userIds() const; + TQString userId() const; + TQStringList userIds() const; unsigned int permissions() const; private slots: @@ -73,7 +73,7 @@ private slots: void slotChanged(); private: - QVButtonGroup* mButtonGroup; + TQVButtonGroup* mButtonGroup; KLineEdit* mUserIdLineEdit; IMAPUserIdFormat mUserIdFormat; }; @@ -87,7 +87,7 @@ class FolderDiaACLTab : public FolderDiaTab Q_OBJECT public: - FolderDiaACLTab( KMFolderDialog* dlg, QWidget* parent, const char* name = 0 ); + FolderDiaACLTab( KMFolderDialog* dlg, TQWidget* parent, const char* name = 0 ); virtual void load(); virtual bool save(); @@ -97,16 +97,16 @@ public: private slots: // Network (KIO) slots - void slotConnectionResult( int, const QString& ); + void slotConnectionResult( int, const TQString& ); void slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& ); void slotMultiSetACLResult(KIO::Job *); - void slotACLChanged( const QString&, int ); + void slotACLChanged( const TQString&, int ); void slotReceivedUserRights( KMFolder* folder ); void slotDirectoryListingFinished(KMFolderImap*); // User (KListView) slots - void slotEditACL(QListViewItem*); - void slotSelectionChanged(QListViewItem*); + void slotEditACL(TQListViewItem*); + void slotSelectionChanged(TQListViewItem*); // User (pushbuttons) slots void slotAddACL(); @@ -121,11 +121,11 @@ private: void startListing(); void loadListView( const KMail::ACLList& aclList ); void loadFinished( const KMail::ACLList& aclList ); - void addACLs( const QStringList& userIds, unsigned int permissions ); + void addACLs( const TQStringList& userIds, unsigned int permissions ); private: // The widget containing the ACL widgets (listview and buttons) - QHBox* mACLWidget; + TQHBox* mACLWidget; //class ListView; class ListViewItem; KListView* mListView; @@ -133,8 +133,8 @@ private: KPushButton* mEditACL; KPushButton* mRemoveACL; - QStringList mRemovedACLs; - QString mImapPath; + TQStringList mRemovedACLs; + TQString mImapPath; ImapAccountBase* mImapAccount; int mUserRights; KMFolderType mFolderType; @@ -142,8 +142,8 @@ private: ACLList mACLList; // to be set IMAPUserIdFormat mUserIdFormat; - QLabel* mLabel; - QWidgetStack* mStack; + TQLabel* mLabel; + TQWidgetStack* mStack; KMFolderDialog* mDlg; bool mChanged; diff --git a/kmail/folderdiaquotatab.cpp b/kmail/folderdiaquotatab.cpp index 537e69b6..01cb8dbb 100644 --- a/kmail/folderdiaquotatab.cpp +++ b/kmail/folderdiaquotatab.cpp @@ -38,11 +38,11 @@ #include "kmacctcachedimap.h" #include "imapaccountbase.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "folderdiaquotatab_p.h" @@ -50,18 +50,18 @@ using namespace KMail; -KMail::FolderDiaQuotaTab::FolderDiaQuotaTab( KMFolderDialog* dlg, QWidget* parent, const char* name ) +KMail::FolderDiaQuotaTab::FolderDiaQuotaTab( KMFolderDialog* dlg, TQWidget* parent, const char* name ) : FolderDiaTab( parent, name ), mImapAccount( 0 ), mDlg( dlg ) { - QVBoxLayout* topLayout = new QVBoxLayout( this ); + TQVBoxLayout* topLayout = new TQVBoxLayout( this ); // We need a widget stack to show either a label ("no qutoa support", "please wait"...) // or quota info - mStack = new QWidgetStack( this ); + mStack = new TQWidgetStack( this ); topLayout->addWidget( mStack ); - mLabel = new QLabel( mStack ); + mLabel = new TQLabel( mStack ); mLabel->setAlignment( AlignHCenter | AlignVCenter | WordBreak ); mStack->addWidget( mLabel ); @@ -120,20 +120,20 @@ void KMail::FolderDiaQuotaTab::load() mLabel->setText( i18n( "Connecting to server %1, please wait..." ).arg( mImapAccount->host() ) ); ImapAccountBase::ConnectionState state = mImapAccount->makeConnection(); if ( state == ImapAccountBase::Error ) { // Cancelled by user, or slave can't start - slotConnectionResult( -1, QString::null ); + slotConnectionResult( -1, TQString::null ); } else if ( state == ImapAccountBase::Connecting ) { - connect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + connect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); } else { // Connected - slotConnectionResult( 0, QString::null ); + slotConnectionResult( 0, TQString::null ); } } -void KMail::FolderDiaQuotaTab::slotConnectionResult( int errorCode, const QString& errorMsg ) +void KMail::FolderDiaQuotaTab::slotConnectionResult( int errorCode, const TQString& errorMsg ) { - disconnect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + disconnect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); if ( errorCode ) { if ( errorCode == -1 ) // unspecified error mLabel->setText( i18n( "Error connecting to server %1" ).arg( mImapAccount->host() ) ); @@ -142,8 +142,8 @@ void KMail::FolderDiaQuotaTab::slotConnectionResult( int errorCode, const QStrin mLabel->setText( KIO::buildErrorString( errorCode, errorMsg ) ); return; } - connect( mImapAccount, SIGNAL( receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ), - this, SLOT( slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ) ); + connect( mImapAccount, TQT_SIGNAL( receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ), + this, TQT_SLOT( slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ) ); KMFolder* folder = mDlg->folder() ? mDlg->folder() : mDlg->parentFolder(); mImapAccount->getStorageQuotaInfo( folder, mImapPath ); } @@ -155,8 +155,8 @@ void KMail::FolderDiaQuotaTab::slotReceivedQuotaInfo( KMFolder* folder, if ( folder == mDlg->folder() ? mDlg->folder() : mDlg->parentFolder() ) { //KMFolderImap* folderImap = static_cast( folder->storage() ); - disconnect( mImapAccount, SIGNAL(receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )), - this, SLOT(slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )) ); + disconnect( mImapAccount, TQT_SIGNAL(receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )), + this, TQT_SLOT(slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )) ); if ( job && job->error() ) { if ( job->error() == KIO::ERR_UNSUPPORTED_ACTION ) diff --git a/kmail/folderdiaquotatab.h b/kmail/folderdiaquotatab.h index a8df4492..79032d52 100644 --- a/kmail/folderdiaquotatab.h +++ b/kmail/folderdiaquotatab.h @@ -55,7 +55,7 @@ class FolderDiaQuotaTab : public FolderDiaTab Q_OBJECT public: - FolderDiaQuotaTab( KMFolderDialog* dlg, QWidget* parent, const char* name = 0 ); + FolderDiaQuotaTab( KMFolderDialog* dlg, TQWidget* parent, const char* name = 0 ); virtual void load(); virtual bool save(); @@ -68,17 +68,17 @@ private: void showQuotaWidget(); private slots: // Network (KIO) slots - void slotConnectionResult( int, const QString& ); + void slotConnectionResult( int, const TQString& ); void slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ); private: - QLabel* mLabel; + TQLabel* mLabel; KMail::QuotaWidget* mQuotaWidget; - QWidgetStack* mStack; + TQWidgetStack* mStack; ImapAccountBase* mImapAccount; - QString mImapPath; + TQString mImapPath; KMFolderDialog* mDlg; QuotaInfo mQuotaInfo; diff --git a/kmail/folderdiaquotatab_p.cpp b/kmail/folderdiaquotatab_p.cpp index 35cfb02b..be623fe3 100644 --- a/kmail/folderdiaquotatab_p.cpp +++ b/kmail/folderdiaquotatab_p.cpp @@ -31,11 +31,11 @@ #include "folderdiaquotatab_p.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -51,22 +51,22 @@ using namespace KMail; struct QuotaInfo; -QuotaWidget::QuotaWidget( QWidget* parent, const char* name ) - :QWidget( parent, name ) +QuotaWidget::QuotaWidget( TQWidget* parent, const char* name ) + :TQWidget( parent, name ) { - QVBoxLayout *box = new QVBoxLayout(this); - QWidget *stuff = new QWidget( this ); - QGridLayout* layout = - new QGridLayout( stuff, 3, 3, + TQVBoxLayout *box = new TQVBoxLayout(this); + TQWidget *stuff = new TQWidget( this ); + TQGridLayout* layout = + new TQGridLayout( stuff, 3, 3, KDialog::marginHint(), KDialog::spacingHint() ); - mInfoLabel = new QLabel("", stuff ); - mRootLabel = new QLabel("", stuff ); - mProgressBar = new QProgressBar( stuff ); - layout->addWidget( new QLabel( i18n("Root:" ), stuff ), 0, 0 ); + mInfoLabel = new TQLabel("", stuff ); + mRootLabel = new TQLabel("", stuff ); + mProgressBar = new TQProgressBar( stuff ); + layout->addWidget( new TQLabel( i18n("Root:" ), stuff ), 0, 0 ); layout->addWidget( mRootLabel, 0, 1 ); - layout->addWidget( new QLabel( i18n("Usage:"), stuff ), 1, 0 ); - //layout->addWidget( new QLabel( i18n("Status:"), stuff ), 2, 0 ); + layout->addWidget( new TQLabel( i18n("Usage:"), stuff ), 1, 0 ); + //layout->addWidget( new TQLabel( i18n("Status:"), stuff ), 2, 0 ); layout->addWidget( mInfoLabel, 1, 1 ); layout->addWidget( mProgressBar, 2, 1 ); box->addWidget( stuff ); diff --git a/kmail/folderdiaquotatab_p.h b/kmail/folderdiaquotatab_p.h index 53a4948a..68b5c19f 100644 --- a/kmail/folderdiaquotatab_p.h +++ b/kmail/folderdiaquotatab_p.h @@ -34,27 +34,27 @@ #define FOLDERDIAQUOTA_P_H -#include -#include -#include +#include +#include +#include #include "quotajobs.h" namespace KMail { -class QuotaWidget : public QWidget { +class QuotaWidget : public TQWidget { Q_OBJECT public: - QuotaWidget( QWidget* parent, const char* name = 0 ); + QuotaWidget( TQWidget* parent, const char* name = 0 ); virtual ~QuotaWidget() { } void setQuotaInfo( const KMail::QuotaInfo& info ); private: - QLabel* mInfoLabel; - QLabel* mRootLabel; - QProgressBar* mProgressBar; - QString mUnits; + TQLabel* mInfoLabel; + TQLabel* mRootLabel; + TQProgressBar* mProgressBar; + TQString mUnits; int mFactor; }; diff --git a/kmail/folderjob.cpp b/kmail/folderjob.cpp index e689e36a..69a1557a 100644 --- a/kmail/folderjob.cpp +++ b/kmail/folderjob.cpp @@ -44,7 +44,7 @@ namespace KMail { //---------------------------------------------------------------------------- FolderJob::FolderJob( KMMessage *msg, JobType jt, KMFolder* folder, - QString partSpecifier ) + TQString partSpecifier ) : mType( jt ), mSrcFolder( 0 ), mDestFolder( folder ), mPartSpecifier( partSpecifier ), mErrorCode( 0 ), mPassiveDestructor( false ), mStarted( false ) @@ -57,7 +57,7 @@ FolderJob::FolderJob( KMMessage *msg, JobType jt, KMFolder* folder, } //---------------------------------------------------------------------------- -FolderJob::FolderJob( const QPtrList& msgList, const QString& sets, +FolderJob::FolderJob( const TQPtrList& msgList, const TQString& sets, JobType jt, KMFolder *folder ) : mMsgList( msgList ),mType( jt ), mSets( sets ), mSrcFolder( 0 ), mDestFolder( folder ), @@ -119,7 +119,7 @@ void FolderJob::kill() } //---------------------------------------------------------------------------- -QPtrList +TQPtrList FolderJob::msgList() const { return mMsgList; diff --git a/kmail/folderjob.h b/kmail/folderjob.h index 84e28586..b1f71251 100644 --- a/kmail/folderjob.h +++ b/kmail/folderjob.h @@ -33,9 +33,9 @@ #include "kmmessage.h" -#include -#include -#include +#include +#include +#include class KMFolder; @@ -55,14 +55,14 @@ public: * @p jt and with a parent folder @p folder. */ FolderJob( KMMessage *msg, JobType jt = tGetMessage, KMFolder *folder = 0, - QString partSpecifier = QString::null ); + TQString partSpecifier = TQString::null ); /** * Constructs a new job, operating on a message list @p msgList, * set @sets, JobType @p jt and with the parent folder @p folder. * */ - FolderJob( const QPtrList& msgList, const QString& sets, + FolderJob( const TQPtrList& msgList, const TQString& sets, JobType jt = tGetMessage, KMFolder *folder = 0 ); /** * This one should ONLY be used in derived folders, when a job @@ -72,7 +72,7 @@ public: FolderJob( JobType jt ); virtual ~FolderJob(); - QPtrList msgList() const; + TQPtrList msgList() const; /** * Start the job */ @@ -117,7 +117,7 @@ signals: /** * Emitted whenever a KMMessage was updated */ - void messageUpdated( KMMessage *, QString ); + void messageUpdated( KMMessage *, TQString ); /** * Emitted whenever a message has been stored in @@ -127,10 +127,10 @@ signals: /** * Emitted when a list of messages has been - * copied to the specified location. QPtrList contains + * copied to the specified location. TQPtrList contains * the list of the copied messages. */ - void messageCopied( QPtrList ); + void messageCopied( TQPtrList ); /** * Overloaded signal to the one above. A lot of copying @@ -169,12 +169,12 @@ protected: */ virtual void execute()=0; - QPtrList mMsgList; + TQPtrList mMsgList; JobType mType; - QString mSets; + TQString mSets; KMFolder* mSrcFolder; KMFolder* mDestFolder; - QString mPartSpecifier; + TQString mPartSpecifier; int mErrorCode; //finished() won't be emitted when this is set diff --git a/kmail/folderpropertiesdialog.ui.h b/kmail/folderpropertiesdialog.ui.h index ef1bcf95..c7251124 100644 --- a/kmail/folderpropertiesdialog.ui.h +++ b/kmail/folderpropertiesdialog.ui.h @@ -7,7 +7,7 @@ ** place of a destructor. *****************************************************************************/ -void KMFolderDialogUI::slotChangeIcon( QString /* icon */ ) +void KMFolderDialogUI::slotChangeIcon( TQString /* icon */ ) { //FIXME //if ( mFolder && !mFolder->unreadIcon() ) diff --git a/kmail/folderrequester.cpp b/kmail/folderrequester.cpp index e03ddba7..553fc5a0 100644 --- a/kmail/folderrequester.cpp +++ b/kmail/folderrequester.cpp @@ -36,28 +36,28 @@ #include #include -#include -#include +#include +#include namespace KMail { -FolderRequester::FolderRequester( QWidget *parent, KMFolderTree *tree ) - : QWidget( parent ), mFolder( 0 ), mFolderTree( tree ), +FolderRequester::FolderRequester( TQWidget *parent, KMFolderTree *tree ) + : TQWidget( parent ), mFolder( 0 ), mFolderTree( tree ), mMustBeReadWrite( true ), mShowOutbox( true ), mShowImapFolders( true ) { - QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() ); + TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() ); hlay->setAutoAdd( true ); edit = new KLineEdit( this ); edit->setReadOnly( true ); - QToolButton* button = new QToolButton( this ); + TQToolButton* button = new TQToolButton( this ); button->setIconSet( KGlobal::iconLoader()->loadIconSet( "folder", KIcon::Small, 0 ) ); - connect( button, SIGNAL(clicked()), this, SLOT(slotOpenDialog()) ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenDialog()) ); - setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, - QSizePolicy::Fixed ) ); - setFocusPolicy( QWidget::StrongFocus ); + setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, + TQSizePolicy::Fixed ) ); + setFocusPolicy( TQWidget::StrongFocus ); } //----------------------------------------------------------------------------- @@ -97,7 +97,7 @@ void FolderRequester::setFolder( KMFolder *folder ) } //----------------------------------------------------------------------------- -void FolderRequester::setFolder( const QString &idString ) +void FolderRequester::setFolder( const TQString &idString ) { KMFolder *folder = kmkernel->findFolderById( idString ); if ( folder ) { @@ -114,7 +114,7 @@ void FolderRequester::setFolder( const QString &idString ) } //----------------------------------------------------------------------------- -void FolderRequester::keyPressEvent( QKeyEvent * e ) +void FolderRequester::keyPressEvent( TQKeyEvent * e ) { if ( e->key() == Qt::Key_Space ) slotOpenDialog(); diff --git a/kmail/folderrequester.h b/kmail/folderrequester.h index e404456c..30e39c63 100644 --- a/kmail/folderrequester.h +++ b/kmail/folderrequester.h @@ -29,7 +29,7 @@ #ifndef folderrequester_h #define folderrequester_h -#include +#include #include class KMFolder; @@ -53,21 +53,21 @@ namespace KMail { * @param parent the parent widget * @param tree the KMFolderTree to get the folders */ - FolderRequester( QWidget *parent, KMFolderTree* tree ); + FolderRequester( TQWidget *parent, KMFolderTree* tree ); virtual ~FolderRequester(); /** Returns selected folder */ KMFolder* folder( void ) const; /** Returns the folder id */ - QString folderId() const { return mFolderId; } + TQString folderId() const { return mFolderId; } /** Returns current text */ - QString text() const { return edit->originalText(); } + TQString text() const { return edit->originalText(); } /** Preset the folder */ void setFolder( KMFolder* ); - void setFolder( const QString& idString ); + void setFolder( const TQString& idString ); /** * Set if readonly folders should be disabled @@ -95,13 +95,13 @@ namespace KMail { protected: /** Capture space key to open the dialog */ - virtual void keyPressEvent( QKeyEvent * e ); + virtual void keyPressEvent( TQKeyEvent * e ); protected: KLineEdit* edit; KMFolder* mFolder; KMFolderTree* mFolderTree; - QString mFolderId; + TQString mFolderId; bool mMustBeReadWrite; bool mShowOutbox; bool mShowImapFolders; diff --git a/kmail/foldershortcutdialog.cpp b/kmail/foldershortcutdialog.cpp index f6b1cf92..80e1b28f 100644 --- a/kmail/foldershortcutdialog.cpp +++ b/kmail/foldershortcutdialog.cpp @@ -36,10 +36,10 @@ ** *******************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -53,26 +53,26 @@ using namespace KMail; FolderShortcutDialog::FolderShortcutDialog( KMFolder *folder, KMMainWidget *mainwidget, - QWidget *parent, + TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Shortcut for Folder %1" ).arg( folder->label() ), KDialogBase::Ok | KDialogBase::Cancel ), mFolder( folder ), mMainWidget( mainwidget ) { - QVBox *box = makeVBoxMainWidget(); - QVGroupBox *gb = new QVGroupBox( i18n("Select Shortcut for Folder"), box ); - QWhatsThis::add( gb, i18n( "To choose a key or a combination " + TQVBox *box = makeVBoxMainWidget(); + TQVGroupBox *gb = new TQVGroupBox( i18n("Select Shortcut for Folder"), box ); + TQWhatsThis::add( gb, i18n( "To choose a key or a combination " "of keys which select the current folder, " "click the button below and then press the key(s) " "you wish to associate with this folder." ) ); - QHBox *hb = new QHBox( gb ); - new QWidget(hb); + TQHBox *hb = new TQHBox( gb ); + new TQWidget(hb); mKeyButton = new KKeyButton( hb, "FolderShortcutSelector" ); - new QWidget(hb); + new TQWidget(hb); - connect( mKeyButton, SIGNAL( capturedShortcut( const KShortcut& ) ), - this, SLOT( slotCapturedShortcut( const KShortcut& ) ) ); + connect( mKeyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ), + this, TQT_SLOT( slotCapturedShortcut( const KShortcut& ) ) ); mKeyButton->setShortcut( folder->shortcut(), false ); } @@ -88,7 +88,7 @@ void FolderShortcutDialog::slotCapturedShortcut( const KShortcut& sc ) mKeyButton->setShortcut( KShortcut::null(), false ); } else { if( !mMainWidget->shortcutIsValid( sc ) ) { - QString msg( i18n( "The selected shortcut is already used, " + TQString msg( i18n( "The selected shortcut is already used, " "please select a different one." ) ); KMessageBox::sorry( mMainWidget, msg ); } else { diff --git a/kmail/foldershortcutdialog.h b/kmail/foldershortcutdialog.h index bf959699..1934ad23 100644 --- a/kmail/foldershortcutdialog.h +++ b/kmail/foldershortcutdialog.h @@ -53,7 +53,7 @@ class FolderShortcutDialog : public KDialogBase Q_OBJECT public: FolderShortcutDialog( KMFolder *folder, KMMainWidget *mw, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); ~FolderShortcutDialog(); diff --git a/kmail/folderstorage.cpp b/kmail/folderstorage.cpp index 89fc20db..c1d447a6 100644 --- a/kmail/folderstorage.cpp +++ b/kmail/folderstorage.cpp @@ -52,8 +52,8 @@ using KMail::ListJob; #include #include -#include -#include +#include +#include #include #include @@ -61,7 +61,7 @@ using KMail::ListJob; //----------------------------------------------------------------------------- FolderStorage::FolderStorage( KMFolder* folder, const char* aName ) - : QObject( folder, aName ), mFolder( folder ), mEmitChangedTimer( 0L ) + : TQObject( folder, aName ), mFolder( folder ), mEmitChangedTimer( 0L ) { mOpenCount = 0; mQuiet = 0; @@ -79,21 +79,21 @@ FolderStorage::FolderStorage( KMFolder* folder, const char* aName ) mNoContent = false; mNoChildren = false; mRDict = 0; - mDirtyTimer = new QTimer(this, "mDirtyTimer"); - connect(mDirtyTimer, SIGNAL(timeout()), - this, SLOT(updateIndex())); + mDirtyTimer = new TQTimer(this, "mDirtyTimer"); + connect(mDirtyTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(updateIndex())); mHasChildren = HasNoChildren; mContentsType = KMail::ContentsTypeMail; - connect(this, SIGNAL(closed(KMFolder*)), mFolder, SIGNAL(closed())); + connect(this, TQT_SIGNAL(closed(KMFolder*)), mFolder, TQT_SIGNAL(closed())); } //----------------------------------------------------------------------------- FolderStorage::~FolderStorage() { mJobList.setAutoDelete( true ); - QObject::disconnect( SIGNAL(destroyed(QObject*)), this, 0 ); + TQObject::disconnect( TQT_SIGNAL(destroyed(TQObject*)), this, 0 ); mJobList.clear(); KMMsgDict::deleteRentry(mRDict); } @@ -110,29 +110,29 @@ void FolderStorage::close( const char* owner, bool aForced ) } //----------------------------------------------------------------------------- -QString FolderStorage::dotEscape(const QString& aStr) +TQString FolderStorage::dotEscape(const TQString& aStr) { if (aStr[0] != '.') return aStr; - return aStr.left(aStr.find(QRegExp("[^\\.]"))) + aStr; + return aStr.left(aStr.find(TQRegExp("[^\\.]"))) + aStr; } void FolderStorage::addJob( FolderJob* job ) const { - QObject::connect( job, SIGNAL(destroyed(QObject*)), - SLOT(removeJob(QObject*)) ); + TQObject::connect( job, TQT_SIGNAL(destroyed(TQObject*)), + TQT_SLOT(removeJob(TQObject*)) ); mJobList.append( job ); } -void FolderStorage::removeJob( QObject* job ) +void FolderStorage::removeJob( TQObject* job ) { mJobList.remove( static_cast( job ) ); } //----------------------------------------------------------------------------- -QString FolderStorage::location() const +TQString FolderStorage::location() const { - QString sLocation(const_cast(this)->folder()->path()); + TQString sLocation(const_cast(this)->folder()->path()); if (!sLocation.isEmpty()) sLocation += '/'; sLocation += dotEscape(fileName()); @@ -140,7 +140,7 @@ QString FolderStorage::location() const return sLocation; } -QString FolderStorage::fileName() const +TQString FolderStorage::fileName() const { return mFolder->name(); } @@ -211,9 +211,9 @@ void FolderStorage::quiet(bool beQuiet) * a timer is created when a folder is checked */ if ( !mEmitChangedTimer) { - mEmitChangedTimer= new QTimer( this, "mEmitChangedTimer" ); - connect( mEmitChangedTimer, SIGNAL( timeout() ), - this, SLOT( slotEmitChangedTimer() ) ); + mEmitChangedTimer= new TQTimer( this, "mEmitChangedTimer" ); + connect( mEmitChangedTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotEmitChangedTimer() ) ); } mQuiet++; } else { @@ -256,7 +256,7 @@ int FolderStorage::expungeOldMsg(int days) int i, msgnb=0; time_t msgTime, maxTime; const KMMsgBase* mb; - QValueList rmvMsgList; + TQValueList rmvMsgList; maxTime = time(0) - days * 3600 * 24; @@ -309,8 +309,8 @@ bool FolderStorage::canAddMsgNow(KMMessage* aMsg, int* aIndex_ret) if (!aMsg->isComplete() && msgParent && msgParent->folderType() == KMFolderTypeImap) { FolderJob *job = msgParent->createJob(aMsg); - connect(job, SIGNAL(messageRetrieved(KMMessage*)), - SLOT(reallyAddMsg(KMMessage*))); + connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + TQT_SLOT(reallyAddMsg(KMMessage*))); job->start(); aMsg->setTransferInProgress( true ); return false; @@ -355,9 +355,9 @@ int FolderStorage::find( const KMMessage * msg ) const { } //----------------------------------------------------------------------------- -void FolderStorage::removeMsg(const QPtrList& msgList, bool imapQuiet) +void FolderStorage::removeMsg(const TQPtrList& msgList, bool imapQuiet) { - for( QPtrListIterator it( msgList ); *it; ++it ) + for( TQPtrListIterator it( msgList ); *it; ++it ) { int idx = find(it.current()); assert( idx != -1); @@ -366,9 +366,9 @@ void FolderStorage::removeMsg(const QPtrList& msgList, bool imapQuiet } //----------------------------------------------------------------------------- -void FolderStorage::removeMsg(const QPtrList& msgList, bool imapQuiet) +void FolderStorage::removeMsg(const TQPtrList& msgList, bool imapQuiet) { - for( QPtrListIterator it( msgList ); *it; ++it ) + for( TQPtrListIterator it( msgList ); *it; ++it ) { int idx = find(it.current()); assert( idx != -1); @@ -413,7 +413,7 @@ void FolderStorage::removeMsg(int idx, bool) --mTotalMsgs; mSize = -1; - QString msgIdMD5 = mb->msgIdMD5(); + TQString msgIdMD5 = mb->msgIdMD5(); emit msgRemoved( idx, msgIdMD5 ); emit msgRemoved( folder() ); } @@ -452,14 +452,14 @@ KMMessage* FolderStorage::take(int idx) setDirty( true ); mSize = -1; needsCompact=true; // message is taken from here - needs to be compacted - QString msgIdMD5 = msg->msgIdMD5(); + TQString msgIdMD5 = msg->msgIdMD5(); emit msgRemoved( idx, msgIdMD5 ); emit msgRemoved( folder() ); return msg; } -void FolderStorage::take(QPtrList msgList) +void FolderStorage::take(TQPtrList msgList) { for ( KMMessage* msg = msgList.first(); msg; msg = msgList.next() ) { @@ -496,7 +496,7 @@ KMMessage* FolderStorage::getMsg(int idx) if (mb->isMessage()) { msg = ((KMMessage*)mb); } else { - QString mbSubject = mb->subject(); + TQString mbSubject = mb->subject(); msg = readMsg(idx); // sanity check if (mCompactable && (!msg || (msg->subject().isEmpty() != mbSubject.isEmpty()))) { @@ -585,7 +585,7 @@ bool FolderStorage::isMessage(int idx) //----------------------------------------------------------------------------- FolderJob* FolderStorage::createJob( KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString partSpecifier, + KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as ) const { FolderJob * job = doCreateJob( msg, jt, folder, partSpecifier, as ); @@ -595,7 +595,7 @@ FolderJob* FolderStorage::createJob( KMMessage *msg, FolderJob::JobType jt, } //----------------------------------------------------------------------------- -FolderJob* FolderStorage::createJob( QPtrList& msgList, const QString& sets, +FolderJob* FolderStorage::createJob( TQPtrList& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const { FolderJob * job = doCreateJob( msgList, sets, jt, folder ); @@ -624,7 +624,7 @@ int FolderStorage::moveMsg(KMMessage* aMsg, int* aIndex_ret) } //----------------------------------------------------------------------------- -int FolderStorage::moveMsg(QPtrList msglist, int* aIndex_ret) +int FolderStorage::moveMsg(TQPtrList msglist, int* aIndex_ret) { KMMessage* aMsg = msglist.first(); assert(aMsg != 0); @@ -633,11 +633,11 @@ int FolderStorage::moveMsg(QPtrList msglist, int* aIndex_ret) if (msgParent) msgParent->open("foldermovemsg"); - QValueList index; + TQValueList index; open("moveMsg"); int rc = addMsg(msglist, index); close("moveMsg"); - // FIXME: we want to have a QValueList to pass it back, so change this method + // FIXME: we want to have a TQValueList to pass it back, so change this method if ( !index.isEmpty() ) aIndex_ret = &index.first(); @@ -649,11 +649,11 @@ int FolderStorage::moveMsg(QPtrList msglist, int* aIndex_ret) //----------------------------------------------------------------------------- -int FolderStorage::rename(const QString& newName, KMFolderDir *newParent) +int FolderStorage::rename(const TQString& newName, KMFolderDir *newParent) { - QString oldLoc, oldIndexLoc, oldIdsLoc, newLoc, newIndexLoc, newIdsLoc; - QString oldSubDirLoc, newSubDirLoc; - QString oldName; + TQString oldLoc, oldIndexLoc, oldIdsLoc, newLoc, newIndexLoc, newIdsLoc; + TQString oldSubDirLoc, newSubDirLoc; + TQString oldName; int rc=0; KMFolderDir *oldParent; @@ -663,7 +663,7 @@ int FolderStorage::rename(const QString& newName, KMFolderDir *newParent) oldIndexLoc = indexLocation(); oldSubDirLoc = folder()->subdirLocation(); oldIdsLoc = KMMsgDict::instance()->getFolderIdsLocation( *this ); - QString oldConfigString = "Folder-" + folder()->idString(); + TQString oldConfigString = "Folder-" + folder()->idString(); close("rename", true); @@ -678,7 +678,7 @@ int FolderStorage::rename(const QString& newName, KMFolderDir *newParent) newSubDirLoc = folder()->subdirLocation(); newIdsLoc = KMMsgDict::instance()->getFolderIdsLocation( *this ); - if (::rename(QFile::encodeName(oldLoc), QFile::encodeName(newLoc))) { + if (::rename(TQFile::encodeName(oldLoc), TQFile::encodeName(newLoc))) { folder()->setName(oldName); folder()->setParent(oldParent); rc = errno; @@ -686,26 +686,26 @@ int FolderStorage::rename(const QString& newName, KMFolderDir *newParent) else { // rename/move index file and index.sorted file if (!oldIndexLoc.isEmpty()) { - ::rename(QFile::encodeName(oldIndexLoc), QFile::encodeName(newIndexLoc)); - ::rename(QFile::encodeName(oldIndexLoc) + ".sorted", - QFile::encodeName(newIndexLoc) + ".sorted"); + ::rename(TQFile::encodeName(oldIndexLoc), TQFile::encodeName(newIndexLoc)); + ::rename(TQFile::encodeName(oldIndexLoc) + ".sorted", + TQFile::encodeName(newIndexLoc) + ".sorted"); } // rename/move serial number file if (!oldIdsLoc.isEmpty()) - ::rename(QFile::encodeName(oldIdsLoc), QFile::encodeName(newIdsLoc)); + ::rename(TQFile::encodeName(oldIdsLoc), TQFile::encodeName(newIdsLoc)); // rename/move the subfolder directory KMFolderDir* child = 0; if( folder() ) child = folder()->child(); - if (!::rename(QFile::encodeName(oldSubDirLoc), QFile::encodeName(newSubDirLoc) )) { + if (!::rename(TQFile::encodeName(oldSubDirLoc), TQFile::encodeName(newSubDirLoc) )) { // now that the subfolder directory has been renamed and/or moved also // change the name that is stored in the corresponding KMFolderNode // (provide that the name actually changed) if( child && ( oldName != newName ) ) { - child->setName( "." + QFile::encodeName(newName) + ".directory" ); + child->setName( "." + TQFile::encodeName(newName) + ".directory" ); } } @@ -750,8 +750,8 @@ void FolderStorage::remove() KMMsgDict::mutableInstance()->removeFolderIds( *this ); mExportsSernums = false; // do not writeFolderIds after removal } - unlink(QFile::encodeName(indexLocation()) + ".sorted"); - unlink(QFile::encodeName(indexLocation())); + unlink(TQFile::encodeName(indexLocation()) + ".sorted"); + unlink(TQFile::encodeName(indexLocation())); int rc = removeContents(); @@ -778,7 +778,7 @@ int FolderStorage::expunge() KMMsgDict::mutableInstance()->removeFolderIds( *this ); if ( mAutoCreateIndex ) truncateIndex(); - else unlink(QFile::encodeName(indexLocation())); + else unlink(TQFile::encodeName(indexLocation())); int rc = expungeContents(); if (rc) return rc; @@ -799,7 +799,7 @@ int FolderStorage::expunge() } //----------------------------------------------------------------------------- -QString FolderStorage::label() const +TQString FolderStorage::label() const { return folder()->label(); } @@ -974,8 +974,8 @@ void FolderStorage::readFolderIdsFile() void FolderStorage::invalidateFolder() { if ( !mExportsSernums ) return; - unlink(QFile::encodeName( indexLocation()) + ".sorted"); - unlink(QFile::encodeName( indexLocation()) + ".ids"); + unlink(TQFile::encodeName( indexLocation()) + ".sorted"); + unlink(TQFile::encodeName( indexLocation()) + ".ids"); fillMessageDict(); KMMsgDict::mutableInstance()->writeFolderIds( *this ); emit invalidated( folder() ); @@ -1040,9 +1040,9 @@ void FolderStorage::setStatus(int idx, KMMsgStatus status, bool toggle) //----------------------------------------------------------------------------- -void FolderStorage::setStatus(QValueList& ids, KMMsgStatus status, bool toggle) +void FolderStorage::setStatus(TQValueList& ids, KMMsgStatus status, bool toggle) { - for ( QValueList::Iterator it = ids.begin(); it != ids.end(); ++it ) + for ( TQValueList::Iterator it = ids.begin(); it != ids.end(); ++it ) { FolderStorage::setStatus(*it, status, toggle); } @@ -1053,7 +1053,7 @@ void FolderStorage::ignoreJobsForMessage( KMMessage *msg ) if ( !msg || msg->transferInProgress() ) return; - QPtrListIterator it( mJobList ); + TQPtrListIterator it( mJobList ); while ( it.current() ) { //FIXME: the questions is : should we iterate through all @@ -1122,7 +1122,7 @@ void FolderStorage::slotProcessNextSearchBatch() { if ( !mSearchPattern ) return; - QValueList matchingSerNums; + TQValueList matchingSerNums; const int end = QMIN( mCurrentSearchedMsg + 15, count() ); for ( int i = mCurrentSearchedMsg; i < end; ++i ) { @@ -1134,7 +1134,7 @@ void FolderStorage::slotProcessNextSearchBatch() bool complete = ( end >= count() ); emit searchResult( folder(), matchingSerNums, mSearchPattern, complete ); if ( !complete ) - QTimer::singleShot( 0, this, SLOT(slotProcessNextSearchBatch()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotProcessNextSearchBatch()) ); } //----------------------------------------------------------------------------- @@ -1146,11 +1146,11 @@ void FolderStorage::search( const KMSearchPattern* pattern, Q_UINT32 serNum ) } //----------------------------------------------------------------------------- -int FolderStorage::addMsg( QPtrList& msgList, QValueList& index_ret ) +int FolderStorage::addMsg( TQPtrList& msgList, TQValueList& index_ret ) { int ret = 0; int index; - for ( QPtrListIterator it( msgList ); *it; ++it ) + for ( TQPtrListIterator it( msgList ); *it; ++it ) { int aret = addMsg( *it, &index ); index_ret << index; diff --git a/kmail/folderstorage.h b/kmail/folderstorage.h index 9b71f28a..8c4c648f 100644 --- a/kmail/folderstorage.h +++ b/kmail/folderstorage.h @@ -63,7 +63,7 @@ namespace KMail { } using KMail::AttachmentStrategy; -typedef QValueList SerNumList; +typedef TQValueList SerNumList; /** * @short The FolderStorage class is the bass class for the storage related @@ -95,12 +95,12 @@ public: virtual KMFolderType folderType() const { return KMFolderTypeUnknown; } /** Returns the filename of the folder (reimplemented in KMFolderImap) */ - virtual QString fileName() const; + virtual TQString fileName() const; /** Returns full path to folder file */ - QString location() const; + TQString location() const; /** Returns full path to index file */ - virtual QString indexLocation() const = 0; + virtual TQString indexLocation() const = 0; /** Returns, if the folder can't contain mails, but only subfolder */ virtual bool noContent() const { return mNoContent; } @@ -159,9 +159,9 @@ public: * for each derived KMFolder). */ virtual FolderJob* createJob( KMMessage *msg, FolderJob::JobType jt = FolderJob::tGetMessage, - KMFolder *folder = 0, QString partSpecifier = QString::null, + KMFolder *folder = 0, TQString partSpecifier = TQString::null, const AttachmentStrategy *as = 0 ) const; - virtual FolderJob* createJob( QPtrList& msgList, const QString& sets, + virtual FolderJob* createJob( TQPtrList& msgList, const TQString& sets, FolderJob::JobType jt = FolderJob::tGetMessage, KMFolder *folder = 0 ) const; @@ -181,7 +181,7 @@ public: /** Detach message from this folder. Usable to call addMsg() afterwards. Loads the message if it is not loaded up to now. */ virtual KMMessage* take(int idx); - virtual void take(QPtrList msgList); + virtual void take(TQPtrList msgList); /** Add the given message to the folder. Usually the message is added at the end of the folder. Returns zero on success and @@ -202,7 +202,7 @@ public: * Adds the given messages to the folder. Behaviour is identical * to addMsg(msg) */ - virtual int addMsg( QPtrList&, QValueList& index_return ); + virtual int addMsg( TQPtrList&, TQValueList& index_return ); /** Called by derived classes implementation of addMsg. Emits msgAdded signals */ @@ -214,8 +214,8 @@ public: /** Remove (first occurrence of) given message from the folder. */ virtual void removeMsg(int i, bool imapQuiet = false); - virtual void removeMsg(const QPtrList& msgList, bool imapQuiet = false); - virtual void removeMsg(const QPtrList& msgList, bool imapQuiet = false); + virtual void removeMsg(const TQPtrList& msgList, bool imapQuiet = false); + virtual void removeMsg(const TQPtrList& msgList, bool imapQuiet = false); /** Delete messages in the folder that are older than days. Return the * number of deleted messages. */ @@ -226,7 +226,7 @@ public: code on failure. The index of the new message is stored in index_return if given. */ virtual int moveMsg(KMMessage* msg, int* index_return = 0); - virtual int moveMsg(QPtrList, int* index_return = 0); + virtual int moveMsg(TQPtrList, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ virtual int find(const KMMsgBase* msg) const = 0; @@ -308,7 +308,7 @@ public: /** Physically rename the folder. Returns zero on success and an errno on failure. */ - virtual int rename(const QString& newName, KMFolderDir *aParent = 0); + virtual int rename(const TQString& newName, KMFolderDir *aParent = 0); /** Returns TRUE if a table of contents file is automatically created. */ bool autoCreateIndex() const { return mAutoCreateIndex; } @@ -343,7 +343,7 @@ public: virtual bool isReadOnly() const = 0; /** Returns the label of the folder for visualization. */ - QString label() const; + TQString label() const; /** A cludge to help make sure the count of unread messges is kept in sync */ virtual void correctUnreadMsgsCount(); @@ -363,13 +363,13 @@ public: /** Set the status of the message at index @p idx to @p status. */ virtual void setStatus(int idx, KMMsgStatus status, bool toggle=false); - /** Set the status of the message(s) in the QValueList @p ids to @p status. */ - virtual void setStatus(QValueList& ids, KMMsgStatus status, bool toggle=false); + /** Set the status of the message(s) in the TQValueList @p ids to @p status. */ + virtual void setStatus(TQValueList& ids, KMMsgStatus status, bool toggle=false); void removeJobs(); /** Escape a leading dot */ - static QString dotEscape(const QString&); + static TQString dotEscape(const TQString&); /** Read the config file */ virtual void readConfig(); @@ -442,7 +442,7 @@ signals: /** Emitted when the location on disk of the folder changes. This * is used by all code which uses the locatio on disk of the folder storage * ( or the cache storage ) as an identifier for the folder. */ - void locationChanged( const QString &, const QString & ); + void locationChanged( const TQString &, const TQString & ); /** Emitted when the contents type (calendar, mail, tasks, ..) of the * folderstorage changes. */ @@ -455,7 +455,7 @@ signals: void msgRemoved(KMFolder*, Q_UINT32 sernum); /** Emitted after a message is removed from the folder. */ - void msgRemoved( int idx, QString msgIdMD5 ); + void msgRemoved( int idx, TQString msgIdMD5 ); void msgRemoved( KMFolder* ); /** Emitted when a message is added from the folder. */ @@ -469,7 +469,7 @@ signals: void msgHeaderChanged(KMFolder*, int); /** Emmited to display a message somewhere in a status line. */ - void statusMsg(const QString&); + void statusMsg(const TQString&); /** Emitted when number of unread messages has changed. */ void numUnreadMsgsChanged( KMFolder* ); @@ -482,7 +482,7 @@ signals: * The matching serial numbers are included * If @p complete is true the search is done */ - void searchResult( KMFolder*, QValueList, + void searchResult( KMFolder*, TQValueList, const KMSearchPattern*, bool complete ); /** @@ -511,7 +511,7 @@ public slots: void slotEmitChangedTimer(); protected slots: - virtual void removeJob( QObject* ); + virtual void removeJob( TQObject* ); /** Process the next search batch */ void slotProcessNextSearchBatch(); @@ -524,8 +524,8 @@ protected: * @see createJob */ virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, - QString partSpecifier, const AttachmentStrategy *as ) const = 0; - virtual FolderJob* doCreateJob( QPtrList& msgList, const QString& sets, + TQString partSpecifier, const AttachmentStrategy *as ) const = 0; + virtual FolderJob* doCreateJob( TQPtrList& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const = 0; /** Tell the folder that a header field that is usually used for @@ -624,9 +624,9 @@ friend class KMMsgDict; /** Points at the reverse dictionary for this folder. */ mutable KMMsgDictREntry *mRDict; /** List of jobs created by this folder. */ - mutable QPtrList mJobList; + mutable TQPtrList mJobList; - QTimer *mDirtyTimer; + TQTimer *mDirtyTimer; enum { mDirtyTimerInterval = 600000 }; // 10 minutes ChildrenState mHasChildren; @@ -636,7 +636,7 @@ friend class KMMsgDict; KMFolder* mFolder; - QTimer * mEmitChangedTimer; + TQTimer * mEmitChangedTimer; int mCurrentSearchedMsg; const KMSearchPattern* mSearchPattern; diff --git a/kmail/foldertreebase.cpp b/kmail/foldertreebase.cpp index 8f3b8c85..3ca61845 100644 --- a/kmail/foldertreebase.cpp +++ b/kmail/foldertreebase.cpp @@ -35,20 +35,20 @@ using KPIM::MailListDrag; #include #include -#include +#include using namespace KMail; -FolderTreeBase::FolderTreeBase(KMMainWidget *mainWidget, QWidget * parent, const char * name) : +FolderTreeBase::FolderTreeBase(KMMainWidget *mainWidget, TQWidget * parent, const char * name) : KFolderTree( parent, name ), mMainWidget( mainWidget ) { addAcceptableDropMimetype(MailListDrag::format(), false); } -void FolderTreeBase::contentsDropEvent(QDropEvent * e) +void FolderTreeBase::contentsDropEvent(TQDropEvent * e) { - QListViewItem *item = itemAt( contentsToViewport(e->pos()) ); + TQListViewItem *item = itemAt( contentsToViewport(e->pos()) ); KMFolderTreeItem *fti = static_cast(item); if ( fti && fti->folder() && e->provides( MailListDrag::format() ) ) { if ( e->source() == mMainWidget->headers()->viewport() ) { @@ -86,7 +86,7 @@ int FolderTreeBase::dndMode(bool alwaysAsk) menu->insertItem( SmallIcon("editcopy"), i18n("&Copy Here"), DRAG_COPY, 1 ); menu->insertSeparator(); menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), DRAG_CANCEL, 3 ); - action = menu->exec( QCursor::pos(), 0 ); + action = menu->exec( TQCursor::pos(), 0 ); } else action = DRAG_MOVE; @@ -94,9 +94,9 @@ int FolderTreeBase::dndMode(bool alwaysAsk) return action; } -bool FolderTreeBase::event(QEvent * e) +bool FolderTreeBase::event(TQEvent * e) { - if (e->type() == QEvent::ApplicationPaletteChange) { + if (e->type() == TQEvent::ApplicationPaletteChange) { readColorConfig(); return true; } @@ -108,10 +108,10 @@ void FolderTreeBase::readColorConfig() KConfig* conf = KMKernel::config(); // Custom/System color support KConfigGroupSaver saver(conf, "Reader"); - QColor c1=QColor(kapp->palette().active().text()); - QColor c2=QColor("blue"); - QColor c4=QColor(kapp->palette().active().base()); - QColor c5=QColor("red"); + TQColor c1=TQColor(kapp->palette().active().text()); + TQColor c2=TQColor("blue"); + TQColor c4=TQColor(kapp->palette().active().base()); + TQColor c5=TQColor("red"); if (!conf->readBoolEntry("defaultColors",true)) { mPaintInfo.colFore = conf->readColorEntry("ForegroundColor",&c1); @@ -125,9 +125,9 @@ void FolderTreeBase::readColorConfig() mPaintInfo.colBack = c4; mPaintInfo.colCloseToQuota = c5; } - QPalette newPal = kapp->palette(); - newPal.setColor( QColorGroup::Base, mPaintInfo.colBack ); - newPal.setColor( QColorGroup::Text, mPaintInfo.colFore ); + TQPalette newPal = kapp->palette(); + newPal.setColor( TQColorGroup::Base, mPaintInfo.colBack ); + newPal.setColor( TQColorGroup::Text, mPaintInfo.colFore ); setPalette( newPal ); } @@ -157,7 +157,7 @@ bool FolderTreeBase::hideLocalInbox() const void FolderTreeBase::slotUpdateCounts(KMFolder * folder, bool force /* = false*/) { // kdDebug(5006) << "KMFolderTree::slotUpdateCounts()" << endl; - QListViewItem * current; + TQListViewItem * current; if (folder) current = indexOfFolder(folder); else @@ -222,13 +222,13 @@ void FolderTreeBase::slotUpdateCounts(KMFolder * folder, bool force /* = false*/ kmkernel->messageCountChanged(); } -void FolderTreeBase::handleMailListDrop(QDropEvent * event, KMFolder *destination ) +void FolderTreeBase::handleMailListDrop(TQDropEvent * event, KMFolder *destination ) { MailList list; if ( !MailListDrag::decode( event, list ) ) { kdWarning() << k_funcinfo << "Could not decode drag data!" << endl; } else { - QValueList serNums = MessageCopyHelper::serNumListFromMailList( list ); + TQValueList serNums = MessageCopyHelper::serNumListFromMailList( list ); int action; if ( MessageCopyHelper::inReadOnlyFolder( serNums ) ) action = DRAG_COPY; diff --git a/kmail/foldertreebase.h b/kmail/foldertreebase.h index 4e14a5a2..bc2ad0cc 100644 --- a/kmail/foldertreebase.h +++ b/kmail/foldertreebase.h @@ -30,13 +30,13 @@ class FolderTreeBase : public KFolderTree { Q_OBJECT public: - FolderTreeBase( KMMainWidget *mainWidget, QWidget *parent = 0, const char *name = 0 ); + FolderTreeBase( KMMainWidget *mainWidget, TQWidget *parent = 0, const char *name = 0 ); /** Returns the main widget that this widget is a child of. */ KMMainWidget* mainWidget() const { return mMainWidget; } /** Find index of given folder. Returns 0 if not found */ - virtual QListViewItem* indexOfFolder( const KMFolder* folder ) const + virtual TQListViewItem* indexOfFolder( const KMFolder* folder ) const { if ( mFolderToItem.contains( folder ) ) return mFolderToItem[ folder ]; @@ -44,7 +44,7 @@ class FolderTreeBase : public KFolderTree return 0; } - void insertIntoFolderToItemMap( const KMFolder *folder, QListViewItem* item ) + void insertIntoFolderToItemMap( const KMFolder *folder, TQListViewItem* item ) { mFolderToItem.insert( folder, item ); } @@ -74,10 +74,10 @@ class FolderTreeBase : public KFolderTree DRAG_CANCEL = 2 }; int dndMode( bool alwaysAsk = false ); - void contentsDropEvent( QDropEvent *e ); + void contentsDropEvent( TQDropEvent *e ); /** Catch palette changes */ - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); /** Read color options and set palette. */ virtual void readColorConfig(); @@ -86,11 +86,11 @@ class FolderTreeBase : public KFolderTree bool hideLocalInbox() const; /** Handle drop of a MailList object. */ - void handleMailListDrop( QDropEvent *event, KMFolder *destination ); + void handleMailListDrop( TQDropEvent *event, KMFolder *destination ); protected: KMMainWidget *mMainWidget; - QMap mFolderToItem; + TQMap mFolderToItem; }; } diff --git a/kmail/folderviewtooltip.h b/kmail/folderviewtooltip.h index 55afa1a0..24f9fbbe 100644 --- a/kmail/folderviewtooltip.h +++ b/kmail/folderviewtooltip.h @@ -3,27 +3,27 @@ #include -#include +#include namespace KMail { class FolderViewToolTip : public QToolTip { public: - FolderViewToolTip( QListView* parent ) : - QToolTip( parent->viewport() ), + FolderViewToolTip( TQListView* parent ) : + TQToolTip( parent->viewport() ), mListView( parent ) {} protected: - void maybeTip( const QPoint &point ) + void maybeTip( const TQPoint &point ) { KMFolderTreeItem *item = dynamic_cast( mListView->itemAt( point ) ); if ( !item ) return; - const QRect itemRect = mListView->itemRect( item ); + const TQRect itemRect = mListView->itemRect( item ); if ( !itemRect.isValid() ) return; - const QRect headerRect = mListView->header()->sectionRect( 0 ); + const TQRect headerRect = mListView->header()->sectionRect( 0 ); if ( !headerRect.isValid() ) return; @@ -31,10 +31,10 @@ class FolderViewToolTip : public QToolTip return; item->updateCount(); - QString tipText = i18n("%1
    Total: %2
    Unread: %3
    Size: %4" ) + TQString tipText = i18n("%1
    Total: %2
    Unread: %3
    Size: %4" ) .arg( item->folder()->prettyURL().replace( " ", " " ) ) - .arg( item->totalCount() < 0 ? "-" : QString::number( item->totalCount() ) ) - .arg( item->unreadCount() < 0 ? "-" : QString::number( item->unreadCount() ) ) + .arg( item->totalCount() < 0 ? "-" : TQString::number( item->totalCount() ) ) + .arg( item->unreadCount() < 0 ? "-" : TQString::number( item->unreadCount() ) ) .arg( KIO::convertSize( item->folderSize() ) ); if ( KMFolderCachedImap* imap = dynamic_cast( item->folder()->storage() ) ) { @@ -43,11 +43,11 @@ class FolderViewToolTip : public QToolTip tipText += i18n("
    Quota: %1").arg( info.toString() ); } - tip( QRect( headerRect.left(), itemRect.top(), headerRect.width(), itemRect.height() ), tipText ); + tip( TQRect( headerRect.left(), itemRect.top(), headerRect.width(), itemRect.height() ), tipText ); } private: - QListView *mListView; + TQListView *mListView; }; } diff --git a/kmail/globalsettings.cpp b/kmail/globalsettings.cpp index 1386338c..b7430949 100644 --- a/kmail/globalsettings.cpp +++ b/kmail/globalsettings.cpp @@ -23,7 +23,7 @@ #include "globalsettings.h" #include -#include +#include GlobalSettings *GlobalSettings::mSelf = 0; static KStaticDeleter staticGlobalSettingsDeleter; @@ -40,8 +40,8 @@ GlobalSettings *GlobalSettings::self() GlobalSettings::GlobalSettings() { - mConfigSyncTimer = new QTimer( this, "mConfigSyncTimer" ); - connect( mConfigSyncTimer, SIGNAL( timeout() ), this, SLOT( slotSyncNow() ) ); + mConfigSyncTimer = new TQTimer( this, "mConfigSyncTimer" ); + connect( mConfigSyncTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotSyncNow() ) ); } void GlobalSettings::requestSync() diff --git a/kmail/globalsettings.h b/kmail/globalsettings.h index 68789415..665d919c 100644 --- a/kmail/globalsettings.h +++ b/kmail/globalsettings.h @@ -28,7 +28,7 @@ class QTimer; -class GlobalSettings : public QObject, public GlobalSettingsBase +class GlobalSettings : public TQObject, public GlobalSettingsBase { Q_OBJECT public: @@ -50,7 +50,7 @@ private: GlobalSettings(); static GlobalSettings *mSelf; - QTimer *mConfigSyncTimer; + TQTimer *mConfigSyncTimer; }; diff --git a/kmail/headeritem.cpp b/kmail/headeritem.cpp index ab9b8329..f950d35c 100644 --- a/kmail/headeritem.cpp +++ b/kmail/headeritem.cpp @@ -27,10 +27,10 @@ ** *******************************************************************************/ #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -42,7 +42,7 @@ using namespace KMail; // Constuction a new list view item with the given colors and pixmap -HeaderItem::HeaderItem( QListView* parent, int msgId, const QString& key ) +HeaderItem::HeaderItem( TQListView* parent, int msgId, const TQString& key ) : KListViewItem( parent ), mMsgId( msgId ), mKey( key ), @@ -53,7 +53,7 @@ HeaderItem::HeaderItem( QListView* parent, int msgId, const QString& key ) } // Constuction a new list view item with the given parent, colors, & pixmap -HeaderItem::HeaderItem( QListViewItem* parent, int msgId, const QString& key ) +HeaderItem::HeaderItem( TQListViewItem* parent, int msgId, const TQString& key ) : KListViewItem( parent ), mMsgId( msgId ), mKey( key ), @@ -76,14 +76,14 @@ void HeaderItem::setMsgId( int aMsgId ) // Profiling note: About 30% of the time taken to initialize the // listview is spent in this function. About 60% is spent in operator -// new and QListViewItem::QListViewItem. +// new and TQListViewItem::TQListViewItem. void HeaderItem::irefresh() { KMHeaders *headers = static_cast(listView()); NestingPolicy threadingPolicy = headers->getNestingPolicy(); if ((threadingPolicy == AlwaysOpen) || (threadingPolicy == DefaultOpen)) { - //Avoid opening items as QListView is currently slow to do so. + //Avoid opening items as TQListView is currently slow to do so. setOpen(true); return; @@ -127,7 +127,7 @@ Q_UINT32 HeaderItem::msgSerNum() const void HeaderItem::setOpenRecursive( bool open ) { if (open){ - QListViewItem * lvchild; + TQListViewItem * lvchild; lvchild = firstChild(); while (lvchild){ ((HeaderItem*)lvchild)->setOpenRecursive( true ); @@ -139,14 +139,14 @@ void HeaderItem::setOpenRecursive( bool open ) } } -QString HeaderItem::text( int col) const +TQString HeaderItem::text( int col) const { KMHeaders *headers = static_cast(listView()); KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId ); - QString tmp; + TQString tmp; if ( !mMsgBase ) - return QString(); + return TQString(); if ( col == headers->paintInfo()->senderCol ) { if ( (headers->folder()->whoField().lower() == "to") && !headers->paintInfo()->showReceiver ) @@ -170,7 +170,7 @@ QString HeaderItem::text( int col) const if (tmp.isEmpty()) tmp = i18n("No Subject"); else - tmp.remove(QRegExp("[\r\n]")); + tmp.remove(TQRegExp("[\r\n]")); } else if(col == headers->paintInfo()->dateCol) { tmp = headers->mDate.dateString( mMsgBase->date() ); @@ -189,17 +189,17 @@ void HeaderItem::setup() { widthChanged(); const int ph = KMHeaders::pixNew->height(); - QListView *v = listView(); + TQListView *v = listView(); int h = QMAX( v->fontMetrics().height(), ph ) + 2*v->itemMargin(); - h = QMAX( h, QApplication::globalStrut().height()); + h = QMAX( h, TQApplication::globalStrut().height()); if ( h % 2 > 0 ) h++; setHeight( h ); } -typedef QValueList PixmapList; +typedef TQValueList PixmapList; -QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const +TQPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const { int width = 0; int height = 0; @@ -209,8 +209,8 @@ QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const height = QMAX( height, (*it).height() ); } - QPixmap res( width, height ); - QBitmap mask( width, height, true ); + TQPixmap res( width, height ); + TQBitmap mask( width, height, true ); int x = 0; for ( PixmapList::ConstIterator it = pixmaps.begin(); @@ -224,7 +224,7 @@ QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const return res; } -const QPixmap *HeaderItem::cryptoIcon(KMMsgBase *msgBase) const +const TQPixmap *HeaderItem::cryptoIcon(KMMsgBase *msgBase) const { switch ( msgBase->encryptionState() ) { @@ -236,7 +236,7 @@ const QPixmap *HeaderItem::cryptoIcon(KMMsgBase *msgBase) const } } -const QPixmap *HeaderItem::signatureIcon(KMMsgBase *msgBase) const +const TQPixmap *HeaderItem::signatureIcon(KMMsgBase *msgBase) const { switch ( msgBase->signatureState() ) { @@ -248,7 +248,7 @@ const QPixmap *HeaderItem::signatureIcon(KMMsgBase *msgBase) const } } -const QPixmap *HeaderItem::statusIcon(KMMsgBase *msgBase) const +const TQPixmap *HeaderItem::statusIcon(KMMsgBase *msgBase) const { // forwarded, replied have precedence over the other states if ( msgBase->isForwarded() && !msgBase->isReplied() ) return KMHeaders::pixReadFwd; @@ -267,7 +267,7 @@ const QPixmap *HeaderItem::statusIcon(KMMsgBase *msgBase) const return 0; } -const QPixmap *HeaderItem::pixmap(int col) const +const TQPixmap *HeaderItem::pixmap(int col) const { KMHeaders *headers = static_cast(listView()); KMMsgBase *msgBase = headers->folder()->getMsgBase( mMsgId ); @@ -288,7 +288,7 @@ const QPixmap *HeaderItem::pixmap(int col) const } if ( !headers->mPaintInfo.showStatus ) { - const QPixmap *pix = statusIcon(msgBase); + const TQPixmap *pix = statusIcon(msgBase); if ( pix ) pixmaps << *pix; } @@ -300,7 +300,7 @@ const QPixmap *HeaderItem::pixmap(int col) const // Only merge the crypto icons in if that is configured. if ( headers->paintInfo()->showCryptoIcons ) { - const QPixmap *pix; + const TQPixmap *pix; if ( !headers->paintInfo()->showCrypto ) if ( (pix = cryptoIcon(msgBase)) ) pixmaps << *pix; @@ -315,7 +315,7 @@ const QPixmap *HeaderItem::pixmap(int col) const if ( !headers->mPaintInfo.showTodo ) if ( msgBase->isTodo() ) pixmaps << *KMHeaders::pixTodo; - static QPixmap mergedpix; + static TQPixmap mergedpix; mergedpix = pixmapMerge( pixmaps ); return &mergedpix; } @@ -351,7 +351,7 @@ const QPixmap *HeaderItem::pixmap(int col) const return 0; } -void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg, +void HeaderItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { KMHeaders *headers = static_cast(listView()); @@ -360,32 +360,32 @@ void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg, KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId ); if (!mMsgBase) return; - QColorGroup _cg( cg ); - QColor c = _cg.text(); - QColor *color = const_cast( &headers->paintInfo()->colFore ); - QFont font = p->font(); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); + TQColor *color = const_cast( &headers->paintInfo()->colFore ); + TQFont font = p->font(); int weight = font.weight(); // for color and font family "important" overrides "new" overrides "unread" // overrides "todo" for the weight we use the maximal weight if ( mMsgBase->isTodo() ) { - color = const_cast( &headers->paintInfo()->colTodo ); + color = const_cast( &headers->paintInfo()->colTodo ); font = headers->todoFont(); weight = QMAX( weight, font.weight() ); } if ( mMsgBase->isUnread() ) { - color = const_cast( &headers->paintInfo()->colUnread ); + color = const_cast( &headers->paintInfo()->colUnread ); font = headers->unreadFont(); weight = QMAX( weight, font.weight() ); } if ( mMsgBase->isNew() ) { - color = const_cast( &headers->paintInfo()->colNew ); + color = const_cast( &headers->paintInfo()->colNew ); font = headers->newFont(); weight = QMAX( weight, font.weight() ); } if ( mMsgBase->isImportant() ) { - color = const_cast( &headers->paintInfo()->colFlag ); + color = const_cast( &headers->paintInfo()->colFlag ); font = headers->importantFont(); weight = QMAX( weight, font.weight() ); } @@ -393,14 +393,14 @@ void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg, font = headers->dateFont(); } - QColor cdisabled = KGlobalSettings::inactiveTextColor(); + TQColor cdisabled = KGlobalSettings::inactiveTextColor(); if ( headers->isMessageCut( msgSerNum() ) ) { font.setItalic( true ); color = &cdisabled; } // set color and font - _cg.setColor( QColorGroup::Text, *color ); + _cg.setColor( TQColorGroup::Text, *color ); font.setWeight( weight ); p->setFont( font ); @@ -412,44 +412,44 @@ void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg, } // reset color - _cg.setColor( QColorGroup::Text, c ); + _cg.setColor( TQColorGroup::Text, c ); } -QString HeaderItem::generate_key( KMHeaders *headers, +TQString HeaderItem::generate_key( KMHeaders *headers, KMMsgBase *msg, const KPaintInfo *paintInfo, int sortOrder ) { - // It appears, that QListView in Qt-3.0 asks for the key - // in QListView::clear(), which is called from + // It appears, that TQListView in Qt-3.0 asks for the key + // in TQListView::clear(), which is called from // readSortOrder() - if (!msg) return QString::null; + if (!msg) return TQString::null; int column = sortOrder & ((1 << 5) - 1); - QString ret = QChar( (char)sortOrder ); - QString sortArrival = QString( "%1" ).arg( msg->getMsgSerNum(), 0, 36 ); + TQString ret = TQChar( (char)sortOrder ); + TQString sortArrival = TQString( "%1" ).arg( msg->getMsgSerNum(), 0, 36 ); while (sortArrival.length() < 7) sortArrival = '0' + sortArrival; if (column == paintInfo->dateCol) { if (paintInfo->orderOfArrival) return ret + sortArrival; else { - QString d = QString::number(msg->date()); + TQString d = TQString::number(msg->date()); while (d.length() <= 10) d = '0' + d; return ret + d + sortArrival; } } else if (column == paintInfo->senderCol) { - QString tmp; + TQString tmp; if ( (headers->folder()->whoField().lower() == "to") && !headers->paintInfo()->showReceiver ) tmp = msg->toStrip(); else tmp = msg->fromStrip(); return ret + tmp.lower() + ' ' + sortArrival; } else if (column == paintInfo->receiverCol) { - QString tmp = msg->toStrip(); + TQString tmp = msg->toStrip(); return ret + tmp.lower() + ' ' + sortArrival; } else if (column == paintInfo->subCol) { - QString tmp; + TQString tmp; tmp = ret; if (paintInfo->status) { tmp += msg->statusToSortRank() + ' '; @@ -458,18 +458,18 @@ QString HeaderItem::generate_key( KMHeaders *headers, return tmp; } else if (column == paintInfo->sizeCol) { - QString len; + TQString len; if ( msg->parent()->folderType() == KMFolderTypeImap ) { - len = QString::number( msg->msgSizeServer() ); + len = TQString::number( msg->msgSizeServer() ); } else { - len = QString::number( msg->msgSize() ); + len = TQString::number( msg->msgSize() ); } while (len.length() < 9) len = '0' + len; return ret + len + sortArrival; } else if (column == paintInfo->statusCol) { - QString s; + TQString s; if ( msg->isNew() ) s = "1"; else if ( msg->isUnread() ) s = "2"; else if (!msg->isForwarded() && msg->isReplied() ) s = "3"; @@ -482,27 +482,27 @@ QString HeaderItem::generate_key( KMHeaders *headers, return ret + s + sortArrival; } else if (column == paintInfo->attachmentCol) { - QString s(msg->attachmentState() == KMMsgHasAttachment ? "1" : "0"); + TQString s(msg->attachmentState() == KMMsgHasAttachment ? "1" : "0"); return ret + s + sortArrival; } else if (column == paintInfo->importantCol) { - QString s(msg->isImportant() ? "1" : "0"); + TQString s(msg->isImportant() ? "1" : "0"); return ret + s + sortArrival; } else if ( column == paintInfo->todoCol ) { - QString s( msg->isTodo() ? "1": "0" ); + TQString s( msg->isTodo() ? "1": "0" ); return ret + s + sortArrival; } else if (column == paintInfo->spamHamCol) { - QString s((msg->isSpam() || msg->isHam()) ? "1" : "0"); + TQString s((msg->isSpam() || msg->isHam()) ? "1" : "0"); return ret + s + sortArrival; } else if (column == paintInfo->watchedIgnoredCol) { - QString s((msg->isWatched() || msg->isIgnored()) ? "1" : "0"); + TQString s((msg->isWatched() || msg->isIgnored()) ? "1" : "0"); return ret + s + sortArrival; } else if (column == paintInfo->signedCol) { - QString s; + TQString s; switch ( msg->signatureState() ) { case KMMsgFullySigned : s = "1"; break; @@ -514,7 +514,7 @@ QString HeaderItem::generate_key( KMHeaders *headers, return ret + s + sortArrival; } else if (column == paintInfo->cryptoCol) { - QString s; + TQString s; switch ( msg->encryptionState() ) { case KMMsgFullyEncrypted : s = "1"; break; @@ -528,7 +528,7 @@ QString HeaderItem::generate_key( KMHeaders *headers, return ret + "missing key"; //you forgot something!! } -QString HeaderItem::key( int column, bool /*ascending*/ ) const +TQString HeaderItem::key( int column, bool /*ascending*/ ) const { KMHeaders *headers = static_cast(listView()); int sortOrder = column; @@ -547,11 +547,11 @@ QString HeaderItem::key( int column, bool /*ascending*/ ) const return mKey; } -void HeaderItem::setTempKey( QString key ) { +void HeaderItem::setTempKey( TQString key ) { mKey = key; } -int HeaderItem::compare( QListViewItem *i, int col, bool ascending ) const +int HeaderItem::compare( TQListViewItem *i, int col, bool ascending ) const { int res = 0; KMHeaders *headers = static_cast(listView()); @@ -577,9 +577,9 @@ int HeaderItem::compare( QListViewItem *i, int col, bool ascending ) const return res; } -QListViewItem* HeaderItem::firstChildNonConst() /* Non const! */ +TQListViewItem* HeaderItem::firstChildNonConst() /* Non const! */ { - enforceSortOrder(); // Try not to rely on QListView implementation details + enforceSortOrder(); // Try not to rely on TQListView implementation details return firstChild(); } diff --git a/kmail/headeritem.h b/kmail/headeritem.h index 66b75cc2..961c99b7 100644 --- a/kmail/headeritem.h +++ b/kmail/headeritem.h @@ -57,7 +57,7 @@ public: SortCacheItem() : mItem(0), mParent(0), mId(-1), mSortOffset(-1), mUnsortedCount(0), mUnsortedSize(0), mUnsortedChildren(0), mImperfectlyThreaded (true), mSubjThreadingList(0) { } - SortCacheItem(int i, QString k, int o=-1) + SortCacheItem(int i, TQString k, int o=-1) : mItem(0), mParent(0), mId(i), mSortOffset(o), mKey(k), mUnsortedCount(0), mUnsortedSize(0), mUnsortedChildren(0), mImperfectlyThreaded (true), mSubjThreadingList(0) { } @@ -82,7 +82,7 @@ public: { return mSortedChildren.count() || mUnsortedCount; } /** The sorted children are an array of sortcache items we know are below the * current one and are already properly sorted (as read from the cache ) */ - const QPtrList *sortedChildren() const + const TQPtrList *sortedChildren() const { return &mSortedChildren; } /** The unsorted children are an array of sortcache items we know are below the * current one, but are yet to be threaded and sorted properly. */ @@ -118,9 +118,9 @@ public: void setItem(HeaderItem *i) { Q_ASSERT(!mItem); mItem = i; } /** sort key as used by the listview */ - const QString &key() const { return mKey; } + const TQString &key() const { return mKey; } /** Set the sort key used by the list view. */ - void setKey(const QString &key) { mKey = key; } + void setKey(const TQString &key) { mKey = key; } int id() const { return mId; } void setId(int id) { mId = id; } @@ -135,23 +135,23 @@ public: /** Set the list of mails with a certain subject that this item is on. * Used to remove the item from that list on deletion. */ - void setSubjectThreadingList( QPtrList *list ) { mSubjThreadingList = list; } + void setSubjectThreadingList( TQPtrList *list ) { mSubjThreadingList = list; } /** The list of mails with a certain subject that this item is on. */ - QPtrList* subjectThreadingList() const { return mSubjThreadingList; } + TQPtrList* subjectThreadingList() const { return mSubjThreadingList; } private: HeaderItem *mItem; SortCacheItem *mParent; int mId, mSortOffset; - QString mKey; + TQString mKey; - QPtrList mSortedChildren; + TQPtrList mSortedChildren; int mUnsortedCount, mUnsortedSize; SortCacheItem **mUnsortedChildren; bool mImperfectlyThreaded; // pointer to the list it might be on so it can be remove from it // when the item goes away. - QPtrList* mSubjThreadingList; + TQPtrList* mSubjThreadingList; }; @@ -163,8 +163,8 @@ private: class HeaderItem : public KListViewItem { public: - HeaderItem( QListView* parent, int msgId, const QString& key = QString::null ); - HeaderItem( QListViewItem* parent, int msgId, const QString& key = QString::null ); + HeaderItem( TQListView* parent, int msgId, const TQString& key = TQString::null ); + HeaderItem( TQListViewItem* parent, int msgId, const TQString& key = TQString::null ); ~HeaderItem (); /** Set the message id of this item, which is the offset/index in the folder @@ -173,7 +173,7 @@ public: // Profiling note: About 30% of the time taken to initialize the // listview is spent in this function. About 60% is spent in operator - // new and QListViewItem::QListViewItem. + // new and TQListViewItem::TQListViewItem. void irefresh(); /** Return the msgId of the message associated with this item. */ @@ -186,32 +186,32 @@ public: void setOpenRecursive( bool open ); /** Returns the text of the list view item. */ - QString text( int col) const; + TQString text( int col) const; void setup(); - typedef QValueList PixmapList; + typedef TQValueList PixmapList; - QPixmap pixmapMerge( PixmapList pixmaps ) const; + TQPixmap pixmapMerge( PixmapList pixmaps ) const; - const QPixmap *cryptoIcon(KMMsgBase *msgBase) const; - const QPixmap *signatureIcon(KMMsgBase *msgBase) const; - const QPixmap *statusIcon(KMMsgBase *msgBase) const; + const TQPixmap *cryptoIcon(KMMsgBase *msgBase) const; + const TQPixmap *signatureIcon(KMMsgBase *msgBase) const; + const TQPixmap *statusIcon(KMMsgBase *msgBase) const; - const QPixmap *pixmap(int col) const; + const TQPixmap *pixmap(int col) const; - void paintCell( QPainter * p, const QColorGroup & cg, + void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); - static QString generate_key( KMHeaders *headers, KMMsgBase *msg, const KPaintInfo *paintInfo, int sortOrder ); + static TQString generate_key( KMHeaders *headers, KMMsgBase *msg, const KPaintInfo *paintInfo, int sortOrder ); - virtual QString key( int column, bool /*ascending*/ ) const; + virtual TQString key( int column, bool /*ascending*/ ) const; - void setTempKey( QString key ); + void setTempKey( TQString key ); - int compare( QListViewItem *i, int col, bool ascending ) const; + int compare( TQListViewItem *i, int col, bool ascending ) const; - QListViewItem* firstChildNonConst(); /* Non const! */ + TQListViewItem* firstChildNonConst(); /* Non const! */ /** Returns whether the item is about to be removed from the list view as a * result of some user action. Such items are not selectable and painted with @@ -230,7 +230,7 @@ public: private: int mMsgId; Q_UINT32 mSerNum; - QString mKey; + TQString mKey; bool mAboutToBeDeleted; SortCacheItem *mSortCacheItem; }; // End of class HeaderItem diff --git a/kmail/headerlistquicksearch.cpp b/kmail/headerlistquicksearch.cpp index d735386d..9f20b7e8 100644 --- a/kmail/headerlistquicksearch.cpp +++ b/kmail/headerlistquicksearch.cpp @@ -29,11 +29,11 @@ */ #include "headerlistquicksearch.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -47,18 +47,18 @@ namespace KMail { -HeaderListQuickSearch::HeaderListQuickSearch( QWidget *parent, +HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent, KListView *listView, KActionCollection *actionCollection, const char *name ) : KListViewSearchLine(parent, listView, name), mStatusCombo(0), mStatus(0), statusList() { KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ), - QApplication::reverseLayout() + TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, this, - SLOT( reset() ), + TQT_SLOT( reset() ), actionCollection, "reset_quicksearch" ); resetQuickSearch->plug( parent ); @@ -66,9 +66,9 @@ HeaderListQuickSearch::HeaderListQuickSearch( QWidget *parent, "Resets the quick search so that " "all messages are shown again." ) ); - QLabel *label = new QLabel( i18n("Stat&us:"), parent, "kde toolbar widget" ); + TQLabel *label = new TQLabel( i18n("Stat&us:"), parent, "kde toolbar widget" ); - mStatusCombo = new QComboBox( parent, "quick search status combo box" ); + mStatusCombo = new TQComboBox( parent, "quick search status combo box" ); mStatusCombo->insertItem( SmallIcon( "run" ), i18n("Any Status") ); insertStatus( StatusUnread ); @@ -82,24 +82,24 @@ HeaderListQuickSearch::HeaderListQuickSearch( QWidget *parent, insertStatus( StatusIgnored ); mStatusCombo->setCurrentItem( 0 ); mStatusCombo->installEventFilter( this ); - connect( mStatusCombo, SIGNAL ( activated( int ) ), - this, SLOT( slotStatusChanged( int ) ) ); + connect( mStatusCombo, TQT_SIGNAL ( activated( int ) ), + this, TQT_SLOT( slotStatusChanged( int ) ) ); label->setBuddy( mStatusCombo ); KToolBarButton * btn = new KToolBarButton( "mail_find", 0, parent, 0, i18n( "Open Full Search" ) ); - connect( btn, SIGNAL( clicked() ), SIGNAL( requestFullSearch() ) ); + connect( btn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( requestFullSearch() ) ); /* Disable the signal connected by KListViewSearchLine since it will call * itemAdded during KMHeaders::readSortOrder() which will in turn result * in getMsgBaseForItem( item ) wanting to access items which are no longer * there. Rather rely on KMHeaders::msgAdded and its signal. */ - disconnect(listView, SIGNAL(itemAdded(QListViewItem *)), - this, SLOT(itemAdded(QListViewItem *))); + disconnect(listView, TQT_SIGNAL(itemAdded(TQListViewItem *)), + this, TQT_SLOT(itemAdded(TQListViewItem *))); KMHeaders *headers = static_cast( listView ); - connect( headers, SIGNAL( msgAddedToListView( QListViewItem* ) ), - this, SLOT( itemAdded( QListViewItem* ) ) ); + connect( headers, TQT_SIGNAL( msgAddedToListView( TQListViewItem* ) ), + this, TQT_SLOT( itemAdded( TQListViewItem* ) ) ); } @@ -108,13 +108,13 @@ HeaderListQuickSearch::~HeaderListQuickSearch() } -bool HeaderListQuickSearch::eventFilter( QObject *watched, QEvent *event ) +bool HeaderListQuickSearch::eventFilter( TQObject *watched, TQEvent *event ) { if ( watched == mStatusCombo ) { KMMainWidget *mainWidget = 0; // Travel up the parents list until we find the main widget - for ( QWidget *curWidget = parentWidget(); curWidget; curWidget = curWidget->parentWidget() ) { + for ( TQWidget *curWidget = parentWidget(); curWidget; curWidget = curWidget->parentWidget() ) { mainWidget = ::qt_cast( curWidget ); if ( mainWidget ) break; @@ -122,10 +122,10 @@ bool HeaderListQuickSearch::eventFilter( QObject *watched, QEvent *event ) if ( mainWidget ) { switch ( event->type() ) { - case QEvent::FocusIn: + case TQEvent::FocusIn: mainWidget->setAccelsEnabled( false ); break; - case QEvent::FocusOut: + case TQEvent::FocusOut: mainWidget->setAccelsEnabled( true ); break; default: @@ -140,7 +140,7 @@ bool HeaderListQuickSearch::eventFilter( QObject *watched, QEvent *event ) } -bool HeaderListQuickSearch::itemMatches(const QListViewItem *item, const QString &s) const +bool HeaderListQuickSearch::itemMatches(const TQListViewItem *item, const TQString &s) const { mCurrentSearchTerm = s; // bit of a hack, but works if ( mStatus != 0 ) { @@ -177,7 +177,7 @@ void HeaderListQuickSearch::insertStatus(KMail::StatusValueTypes which) } -QString HeaderListQuickSearch::currentSearchTerm() const +TQString HeaderListQuickSearch::currentSearchTerm() const { return mCurrentSearchTerm; } diff --git a/kmail/headerlistquicksearch.h b/kmail/headerlistquicksearch.h index cc2e728a..a0f7bb14 100644 --- a/kmail/headerlistquicksearch.h +++ b/kmail/headerlistquicksearch.h @@ -28,13 +28,13 @@ your version. */ -#ifndef KMAILHEADERLISTQUICKSEARCH_H -#define KMAILHEADERLISTQUICKSEARCH_H +#ifndef KMAILHEADERLISQUICKSEARCH_H +#define KMAILHEADERLISQUICKSEARCH_H #include "kmmsgbase.h" // for KMMsgStatus #include "kmsearchpattern.h" #include -#include +#include class QComboBox; class QLabel; class KListView; @@ -46,7 +46,7 @@ class HeaderListQuickSearch : public KListViewSearchLine { Q_OBJECT public: - HeaderListQuickSearch( QWidget *parent, + HeaderListQuickSearch( TQWidget *parent, KListView *listView, KActionCollection *actionCollection, const char *name = 0 ); @@ -56,12 +56,12 @@ public: * Used to disable the main window's accelerators when the search widget's * combo has focus */ - bool eventFilter( QObject *watched, QEvent *event ); + bool eventFilter( TQObject *watched, TQEvent *event ); /** * Returns the currently entered search text. */ - QString currentSearchTerm() const; + TQString currentSearchTerm() const; /** * Returns the currently selected status filter. @@ -79,7 +79,7 @@ protected: * checks whether @param item contains the search string and has the status * currently in mStatus */ - virtual bool itemMatches(const QListViewItem *item, const QString &s) const; + virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const; private slots: /** @@ -91,10 +91,10 @@ private slots: private: /** Helper method for the filling of the status combo. */ void insertStatus(KMail::StatusValueTypes which); - QComboBox *mStatusCombo; + TQComboBox *mStatusCombo; KMMsgStatus mStatus; - QValueVector statusList; - mutable QString mCurrentSearchTerm; + TQValueVector statusList; + mutable TQString mCurrentSearchTerm; }; } diff --git a/kmail/headerstrategy.cpp b/kmail/headerstrategy.cpp index 1c73532c..bfe9845b 100644 --- a/kmail/headerstrategy.cpp +++ b/kmail/headerstrategy.cpp @@ -69,8 +69,8 @@ namespace KMail { // Convenience function // - static QStringList stringList( const char * headers[], int numHeaders ) { - QStringList sl; + static TQStringList stringList( const char * headers[], int numHeaders ) { + TQStringList sl; for ( int i = 0 ; i < numHeaders ; ++i ) sl.push_back( headers[i] ); return sl; @@ -94,7 +94,7 @@ namespace KMail { DefaultPolicy defaultPolicy() const { return Display; } - bool showHeader( const QString & ) const { + bool showHeader( const TQString & ) const { return true; // more efficient than default impl } }; @@ -117,11 +117,11 @@ namespace KMail { const HeaderStrategy * next() const { return standard(); } const HeaderStrategy * prev() const { return all(); } - QStringList headersToDisplay() const { return mHeadersToDisplay; } + TQStringList headersToDisplay() const { return mHeadersToDisplay; } DefaultPolicy defaultPolicy() const { return Hide; } private: - const QStringList mHeadersToDisplay; + const TQStringList mHeadersToDisplay; }; // @@ -142,11 +142,11 @@ namespace KMail { const HeaderStrategy * next() const { return brief(); } const HeaderStrategy * prev() const { return rich(); } - QStringList headersToDisplay() const { return mHeadersToDisplay; } + TQStringList headersToDisplay() const { return mHeadersToDisplay; } DefaultPolicy defaultPolicy() const { return Hide; } private: - const QStringList mHeadersToDisplay; + const TQStringList mHeadersToDisplay; }; // @@ -167,11 +167,11 @@ namespace KMail { const HeaderStrategy * next() const { return custom(); } const HeaderStrategy * prev() const { return standard(); } - QStringList headersToDisplay() const { return mHeadersToDisplay; } + TQStringList headersToDisplay() const { return mHeadersToDisplay; } DefaultPolicy defaultPolicy() const { return Hide; } private: - const QStringList mHeadersToDisplay; + const TQStringList mHeadersToDisplay; }; @@ -191,13 +191,13 @@ namespace KMail { const HeaderStrategy * next() const { return all(); } const HeaderStrategy * prev() const { return brief(); } - QStringList headersToDisplay() const { return mHeadersToDisplay; } - QStringList headersToHide() const { return mHeadersToHide; } + TQStringList headersToDisplay() const { return mHeadersToDisplay; } + TQStringList headersToHide() const { return mHeadersToHide; } DefaultPolicy defaultPolicy() const { return mDefaultPolicy; } private: - QStringList mHeadersToDisplay; - QStringList mHeadersToHide; + TQStringList mHeadersToDisplay; + TQStringList mHeadersToHide; DefaultPolicy mDefaultPolicy; }; @@ -208,14 +208,14 @@ namespace KMail { KConfigGroup customHeader( KMKernel::config(), "Custom Headers" ); if ( customHeader.hasKey( "headers to display" ) ) { mHeadersToDisplay = customHeader.readListEntry( "headers to display" ); - for ( QStringList::iterator it = mHeadersToDisplay.begin() ; it != mHeadersToDisplay.end() ; ++ it ) + for ( TQStringList::iterator it = mHeadersToDisplay.begin() ; it != mHeadersToDisplay.end() ; ++ it ) *it = (*it).lower(); } else mHeadersToDisplay = stringList( standardHeaders, numStandardHeaders ); if ( customHeader.hasKey( "headers to hide" ) ) { mHeadersToHide = customHeader.readListEntry( "headers to hide" ); - for ( QStringList::iterator it = mHeadersToHide.begin() ; it != mHeadersToHide.end() ; ++ it ) + for ( TQStringList::iterator it = mHeadersToHide.begin() ; it != mHeadersToHide.end() ; ++ it ) *it = (*it).lower(); } @@ -234,15 +234,15 @@ namespace KMail { } - QStringList HeaderStrategy::headersToDisplay() const { - return QStringList(); + TQStringList HeaderStrategy::headersToDisplay() const { + return TQStringList(); } - QStringList HeaderStrategy::headersToHide() const { - return QStringList(); + TQStringList HeaderStrategy::headersToHide() const { + return TQStringList(); } - bool HeaderStrategy::showHeader( const QString & header ) const { + bool HeaderStrategy::showHeader( const TQString & header ) const { if ( headersToDisplay().contains( header.lower() ) ) return true; if ( headersToHide().contains( header.lower() ) ) return false; return defaultPolicy() == Display; @@ -261,8 +261,8 @@ namespace KMail { return 0; // make compiler happy } - const HeaderStrategy * HeaderStrategy::create( const QString & type ) { - QString lowerType = type.lower(); + const HeaderStrategy * HeaderStrategy::create( const TQString & type ) { + TQString lowerType = type.lower(); if ( lowerType == "all" ) return all(); if ( lowerType == "rich" ) return HeaderStrategy::rich(); //if ( lowerType == "standard" ) return standard(); // not needed, see below diff --git a/kmail/headerstrategy.h b/kmail/headerstrategy.h index b5bdce35..421117db 100644 --- a/kmail/headerstrategy.h +++ b/kmail/headerstrategy.h @@ -49,7 +49,7 @@ namespace KMail { enum Type { All, Rich, Standard, Brief, Custom }; static const HeaderStrategy * create( Type type ); - static const HeaderStrategy * create( const QString & type ); + static const HeaderStrategy * create( const TQString & type ); static const HeaderStrategy * all(); static const HeaderStrategy * rich(); @@ -69,10 +69,10 @@ namespace KMail { // enum DefaultPolicy { Display, Hide }; - virtual QStringList headersToDisplay() const; - virtual QStringList headersToHide() const; + virtual TQStringList headersToDisplay() const; + virtual TQStringList headersToHide() const; virtual DefaultPolicy defaultPolicy() const = 0; - virtual bool showHeader( const QString & header ) const; + virtual bool showHeader( const TQString & header ) const; }; } // namespace KMail diff --git a/kmail/headerstyle.cpp b/kmail/headerstyle.cpp index 26e615d9..9e6e6315 100644 --- a/kmail/headerstyle.cpp +++ b/kmail/headerstyle.cpp @@ -57,12 +57,12 @@ using namespace KPIM; #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -71,7 +71,7 @@ namespace KMail { // // Convenience functions: // - static inline QString directionOf( const QString & str ) { + static inline TQString directionOf( const TQString & str ) { return str.isRightToLeft() ? "rtl" : "ltr" ; } @@ -79,9 +79,9 @@ namespace KMail { // Converts to html. Changes URLs into href's, escapes HTML special // chars and inserts the result into an

    or tag with // "dir" set to "rtl" or "ltr" depending on the direction of @p str. - static QString convertToHtmlBlock( const QString & str, bool useSpan=false ) { - QString dir = directionOf( str ); - QString format = "<%1 dir=\"%3\">%4"; + static TQString convertToHtmlBlock( const TQString & str, bool useSpan=false ) { + TQString dir = directionOf( str ); + TQString format = "<%1 dir=\"%3\">%4"; return format.arg( useSpan ? "span" : "div" ) .arg( useSpan ? "span" : "div" ) .arg( dir ) @@ -90,7 +90,7 @@ namespace KMail { #endif // ### tmp wrapper to make kmreaderwin code working: - static QString strToHtml( const QString & str, + static TQString strToHtml( const TQString & str, int flags = LinkLocator::PreserveSpaces ) { return LinkLocator::convertToHtml( str, flags ); } @@ -111,21 +111,21 @@ namespace KMail { const HeaderStyle * next() const { return plain(); } const HeaderStyle * prev() const { return fancy(); } - QString format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const; + TQString format( const KMMessage * message, const HeaderStrategy * strategy, + const TQString & vCardName, bool printing, bool topLevel ) const; }; - QString BriefHeaderStyle::format( const KMMessage * message, + TQString BriefHeaderStyle::format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const { - if ( !message ) return QString::null; + const TQString & vCardName, bool printing, bool topLevel ) const { + if ( !message ) return TQString::null; if ( !strategy ) strategy = HeaderStrategy::brief(); // The direction of the header is determined according to the direction // of the application layout. - QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ; + TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ; // However, the direction of the message subject within the header is // determined according to the contents of the subject itself. Since @@ -133,16 +133,16 @@ namespace KMail { // considered left-to-right, they are ignored when determining its // direction. - QString subjectDir; + TQString subjectDir; if (!message->subject().isEmpty()) subjectDir = directionOf( message->cleanSubject() ); else subjectDir = directionOf( i18n("No Subject") ); // Prepare the date string (when printing always use the localized date) - QString dateString; + TQString dateString; if( printing ) { - QDateTime dateTime; + TQDateTime dateTime; KLocale * locale = KGlobal::locale(); dateTime.setTime_t( message->date() ); dateString = locale->formatDateTime( dateTime ); @@ -150,7 +150,7 @@ namespace KMail { dateString = message->dateStr(); } - QString headerStr = "
    \n"; + TQString headerStr = "
    \n"; if ( strategy->showHeader( "subject" ) ) headerStr += "
    \n" @@ -158,13 +158,13 @@ namespace KMail { strToHtml( message->subject() ) + "
    \n"; - QStringList headerParts; + TQStringList headerParts; if ( strategy->showHeader( "from" ) ) { - QString fromStr = message->from(); + TQString fromStr = message->from(); if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name fromStr = message->fromStrip(); // let's use that - QString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true ); + TQString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true ); if ( !vCardName.isEmpty() ) fromPart += "  " + i18n("[vCard]") + ""; headerParts << fromPart; @@ -180,7 +180,7 @@ namespace KMail { headerParts << strToHtml(message->dateShortStr()); // remove all empty (modulo whitespace) entries and joins them via ", \n" - headerStr += " (" + headerParts.grep( QRegExp( "\\S" ) ).join( ",\n" ) + ')'; + headerStr += " (" + headerParts.grep( TQRegExp( "\\S" ) ).join( ",\n" ) + ')'; headerStr += "
    \n"; @@ -206,24 +206,24 @@ namespace KMail { const HeaderStyle * next() const { return fancy(); } const HeaderStyle * prev() const { return brief(); } - QString format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const; + TQString format( const KMMessage * message, const HeaderStrategy * strategy, + const TQString & vCardName, bool printing, bool topLevel ) const; private: - QString formatAllMessageHeaders( const KMMessage * message ) const; + TQString formatAllMessageHeaders( const KMMessage * message ) const; }; - QString PlainHeaderStyle::format( const KMMessage * message, + TQString PlainHeaderStyle::format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const { - if ( !message ) return QString::null; + const TQString & vCardName, bool printing, bool topLevel ) const { + if ( !message ) return TQString::null; if ( !strategy ) strategy = HeaderStrategy::rich(); // The direction of the header is determined according to the direction // of the application layout. - QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" ); + TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); // However, the direction of the message subject within the header is // determined according to the contents of the subject itself. Since @@ -231,16 +231,16 @@ namespace KMail { // considered left-to-right, they are ignored when determining its // direction. - QString subjectDir; + TQString subjectDir; if (!message->subject().isEmpty()) subjectDir = directionOf( message->cleanSubject() ); else subjectDir = directionOf( i18n("No Subject") ); // Prepare the date string (when printing always use the localized date) - QString dateString; + TQString dateString; if( printing ) { - QDateTime dateTime; + TQDateTime dateTime; KLocale* locale = KGlobal::locale(); dateTime.setTime_t( message->date() ); dateString = locale->formatDateTime( dateTime ); @@ -249,22 +249,22 @@ namespace KMail { dateString = message->dateStr(); } - QString headerStr; + TQString headerStr; if ( strategy->headersToDisplay().isEmpty() && strategy->defaultPolicy() == HeaderStrategy::Display ) { // crude way to emulate "all" headers - Note: no strings have // i18n(), so direction should always be ltr. - headerStr= QString("
    "); + headerStr= TQString("
    "); headerStr += formatAllMessageHeaders( message ); return headerStr + "
    "; } - headerStr = QString("
    ").arg(dir); + headerStr = TQString("
    ").arg(dir); //case HdrLong: if ( strategy->showHeader( "subject" ) ) - headerStr += QString("
    " + + headerStr += TQString("
    " + strToHtml(message->subject()) + "
    \n") .arg(subjectDir); @@ -273,8 +273,8 @@ namespace KMail { #if 0 // Get Instant Messaging presence - QString presence; - QString kabcUid; + TQString presence; + TQString kabcUid; if ( strategy->showHeader( "status" ) ) { KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); @@ -286,7 +286,7 @@ namespace KMail { #endif if ( strategy->showHeader( "from" ) ) { - QString fromStr = message->from(); + TQString fromStr = message->from(); if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name fromStr = message->fromStrip(); // let's use that headerStr.append(i18n("From: ") + @@ -327,9 +327,9 @@ namespace KMail { return headerStr; } - QString PlainHeaderStyle::formatAllMessageHeaders( const KMMessage * message ) const { + TQString PlainHeaderStyle::formatAllMessageHeaders( const KMMessage * message ) const { const DwHeaders & headers = message->headers(); - QString result; + TQString result; for ( const DwField * field = headers.FirstField() ; field ; field = field->Next() ) { result += ( field->FieldNameStr() + ": " ).c_str(); @@ -356,20 +356,20 @@ namespace KMail { const HeaderStyle * next() const { return enterprise(); } const HeaderStyle * prev() const { return plain(); } - QString format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const; - static QString imgToDataUrl( const QImage & image, + TQString format( const KMMessage * message, const HeaderStrategy * strategy, + const TQString & vCardName, bool printing, bool topLevel ) const; + static TQString imgToDataUrl( const TQImage & image, const char *fmt = "PNG" ); private: - static QString drawSpamMeter( double percent, const QString & filterHeader ); + static TQString drawSpamMeter( double percent, const TQString & filterHeader ); }; - QString FancyHeaderStyle::drawSpamMeter( double percent, - const QString & filterHeader ) + TQString FancyHeaderStyle::drawSpamMeter( double percent, + const TQString & filterHeader ) { - QImage meterBar( 20, 1, 8, 24 ); + TQImage meterBar( 20, 1, 8, 24 ); const unsigned short gradient[20][3] = { { 0, 255, 0 }, { 27, 254, 0 }, @@ -405,18 +405,18 @@ namespace KMail { meterBar.setPixel( i, 0, i+1 ); } } - QString titleText = i18n("%1% probability of being spam.\n\nFull report:\n%2") - .arg( QString::number( percent ), filterHeader ); - return QString("  ") - .arg( imgToDataUrl( meterBar, "PPM" ), QString::number( 20 ), - QString::number( 5 ), titleText ); + TQString titleText = i18n("%1% probability of being spam.\n\nFull report:\n%2") + .arg( TQString::number( percent ), filterHeader ); + return TQString("  ") + .arg( imgToDataUrl( meterBar, "PPM" ), TQString::number( 20 ), + TQString::number( 5 ), titleText ); } - QString FancyHeaderStyle::format( const KMMessage * message, + TQString FancyHeaderStyle::format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const { - if ( !message ) return QString::null; + const TQString & vCardName, bool printing, bool topLevel ) const { + if ( !message ) return TQString::null; if ( !strategy ) strategy = HeaderStrategy::rich(); @@ -426,8 +426,8 @@ namespace KMail { // The direction of the header is determined according to the direction // of the application layout. - QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" ); - QString headerStr = QString("
    \n").arg(dir); + TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); + TQString headerStr = TQString("
    \n").arg(dir); // However, the direction of the message subject within the header is // determined according to the contents of the subject itself. Since @@ -435,16 +435,16 @@ namespace KMail { // considered left-to-right, they are ignored when determining its // direction. - QString subjectDir; + TQString subjectDir; if ( !message->subject().isEmpty() ) subjectDir = directionOf( message->cleanSubject() ); else subjectDir = directionOf( i18n("No Subject") ); // Prepare the date string (when printing always use the localized date) - QString dateString; + TQString dateString; if( printing ) { - QDateTime dateTime; + TQDateTime dateTime; KLocale* locale = KGlobal::locale(); dateTime.setTime_t( message->date() ); dateString = locale->formatDateTime( dateTime ); @@ -458,7 +458,7 @@ namespace KMail { // from a few spam filters and try to create visually meaningful graphics // out of the spam scores. - QString spamHTML; + TQString spamHTML; if ( configReader.readBoolEntry( "showSpamStatus", true ) ) { SpamScores scores = SpamHeaderAnalyzer::getSpamScores( message ); @@ -467,17 +467,17 @@ namespace KMail { drawSpamMeter( (*it).score(), (*it).spamHeader() ); } - QString userHTML; - QString presence; + TQString userHTML; + TQString presence; // IM presence and kabc photo ::KIMProxy *imProxy = KMKernel::self()->imProxy(); - QString kabcUid; + TQString kabcUid; KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); KABC::AddresseeList addresses = addressBook->findByEmail( KPIM::getFirstEmailAddress( message->from() ) ); - QString photoURL; + TQString photoURL; int photoWidth = 60; int photoHeight = 60; if( addresses.count() == 1 ) @@ -490,7 +490,7 @@ namespace KMail { presence = imProxy->presenceString( kabcUid ); if ( !presence.isEmpty() ) { - QString presenceIcon = QString::fromLatin1( " " ) + TQString presenceIcon = TQString::fromLatin1( " " ) .arg( imgToDataUrl( imProxy->presenceIcon( kabcUid ).convertToImage() ) ); presence += presenceIcon; } @@ -500,7 +500,7 @@ namespace KMail { { // get photo data and convert to data: url //kdDebug( 5006 ) << "INTERNAL photo found" << endl; - QImage photo = addresses[0].photo().data(); + TQImage photo = addresses[0].photo().data(); if ( !photo.isNull() ) { photoWidth = photo.width(); @@ -531,20 +531,20 @@ namespace KMail { if( photoURL.isEmpty() ) { // no photo, look for a Face header - QString faceheader = message->headerField( "Face" ); + TQString faceheader = message->headerField( "Face" ); if ( !faceheader.isEmpty() ) { - QImage faceimage; + TQImage faceimage; kdDebug( 5006 ) << "Found Face: header" << endl; - QCString facestring = faceheader.utf8(); + TQCString facestring = faceheader.utf8(); // Spec says header should be less than 998 bytes // Face: is 5 characters if ( facestring.length() < 993 ) { - QByteArray facearray; + TQByteArray facearray; KCodecs::base64Decode(facestring, facearray); - QImage faceimage; + TQImage faceimage; if ( faceimage.loadFromData( facearray, "png" ) ) { // Spec says image must be 48x48 pixels if ( (48 == faceimage.width()) && (48 == faceimage.height()) ) { @@ -566,8 +566,8 @@ namespace KMail { if( photoURL.isEmpty() ) { // no photo, look for a X-Face header - QString xfaceURL; - QString xfhead = message->headerField( "X-Face" ); + TQString xfaceURL; + TQString xfhead = message->headerField( "X-Face" ); if ( !xfhead.isEmpty() ) { KXFace xf; @@ -581,12 +581,12 @@ namespace KMail { if( !photoURL.isEmpty() ) { //kdDebug( 5006 ) << "Got a photo: " << photoURL << endl; - userHTML = QString("") + userHTML = TQString("") .arg( photoURL ).arg( photoWidth ).arg( photoHeight ); if ( presence.isEmpty() ) { - userHTML = QString("
    ") + userHTML + "
    "; + userHTML = TQString("
    ") + userHTML + "
    "; } else { - userHTML = QString( "
    " + userHTML = TQString( "
    " "%2
    " "%4
    " "
    " ).arg( kabcUid ) @@ -597,7 +597,7 @@ namespace KMail { } else { // we don't have a photo, just show presence, if we have it if ( !presence.isEmpty() ) - userHTML = QString( "
    " + userHTML = TQString( "
    " "%3
    " ) .arg( kabcUid ) .arg( kabcUid ) @@ -619,7 +619,7 @@ namespace KMail { const int flags = LinkLocator::PreserveSpaces | ( GlobalSettings::self()->showEmoticons() ? LinkLocator::ReplaceSmileys : 0 ); - headerStr += QString("
    %2
    \n") + headerStr += TQString("
    %2
    \n") .arg(subjectDir) .arg(message->subject().isEmpty()? i18n("No Subject") : @@ -629,12 +629,12 @@ namespace KMail { //headerStr += "\n"; // from line // the mailto: URLs can contain %3 etc., therefore usage of multiple - // QString::arg is not possible + // TQString::arg is not possible if ( strategy->showHeader( "from" ) ) { - QString fromStr = message->from(); + TQString fromStr = message->from(); if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name fromStr = message->fromStrip(); // let's use that - headerStr += QString("\n" + headerStr += TQString("\n" "\n" + headerStr.append(TQString("\n" "\n") .arg(i18n("To: ")) .arg(KMMessage::emailAddrAsAnchor(message->to(),false))); // cc line, if any if ( strategy->showHeader( "cc" ) && !message->cc().isEmpty()) - headerStr.append(QString("\n" + headerStr.append(TQString("\n" "\n") .arg(i18n("CC: ")) .arg(KMMessage::emailAddrAsAnchor(message->cc(),false))); // Bcc line, if any if ( strategy->showHeader( "bcc" ) && !message->bcc().isEmpty()) - headerStr.append(QString("\n" + headerStr.append(TQString("\n" "\n") .arg(i18n("BCC: ")) .arg(KMMessage::emailAddrAsAnchor(message->bcc(),false))); if ( strategy->showHeader( "date" ) ) - headerStr.append(QString("\n" + headerStr.append(TQString("\n" "\n") .arg(i18n("Date: ")) .arg( directionOf( message->dateStr() ) ) @@ -689,7 +689,7 @@ namespace KMail { if ( GlobalSettings::self()->showUserAgent() ) { if ( strategy->showHeader( "user-agent" ) ) { if ( !message->headerField("User-Agent").isEmpty() ) { - headerStr.append(QString("\n" + headerStr.append(TQString("\n" "\n") .arg(i18n("User-Agent: ")) .arg( strToHtml( message->headerField("User-Agent") ) ) ); @@ -698,7 +698,7 @@ namespace KMail { if ( strategy->showHeader( "x-mailer" ) ) { if ( !message->headerField("X-Mailer").isEmpty() ) { - headerStr.append(QString("\n" + headerStr.append(TQString("\n" "\n") .arg(i18n("X-Mailer: ")) .arg( strToHtml( message->headerField("X-Mailer") ) ) ); @@ -708,31 +708,31 @@ namespace KMail { // FIXME: Show status in synthetic header style field. Decide whether this or current in brackets style is best and remove one. /* if( strategy->showHeader( "status" ) ) - headerStr.append( QString( "\n" + headerStr.append( TQString( "\n" "\n") .arg(i18n("Sender status: ")) .arg( directionOf( onlineStatus ) ) .arg(onlineStatus)); */ - headerStr.append( QString("" ) ); + headerStr.append( TQString("" ) ); headerStr.append( - QString( "
    %1
    %1") .arg(i18n("From: ")) + KMMessage::emailAddrAsAnchor( fromStr, false ) @@ -642,17 +642,17 @@ namespace KMail { + i18n("(resent from %1)") .arg( KMMessage::emailAddrAsAnchor( message->headerField( "Resent-From" ),false) ) - : QString("") ) + : TQString("") ) + ( !vCardName.isEmpty() ? "  " + i18n("[vCard]") + "" - : QString("") ) + : TQString("") ) #if 0 + ( ( !presence.isEmpty() ) ? "  (" + presence + ")" - : QString("") ) + : TQString("") ) #endif + ( message->headerField("Organization").isEmpty() - ? QString("") + ? TQString("") : "  (" + strToHtml(message->headerField("Organization")) + ")") @@ -660,27 +660,27 @@ namespace KMail { } // to line if ( strategy->showHeader( "to" ) ) - headerStr.append(QString("
    %1
    %1%2
    %1
    %1%2
    %1
    %1%2
    %1
    %1%3
    %1
    %1%2
    %1
    %1%2
    %1
    %1%3
    %1\n" ).arg(userHTML) ); + TQString( "%1\n" ).arg(userHTML) ); if ( !spamHTML.isEmpty() ) - headerStr.append( QString( "
    %2 %3
    \n") + headerStr.append( TQString( "
    %2 %3
    \n") .arg( subjectDir, i18n("Spam Status:"), spamHTML ) ); headerStr += "
    \n\n"; return headerStr; } - QString FancyHeaderStyle::imgToDataUrl( const QImage &image, const char* fmt ) + TQString FancyHeaderStyle::imgToDataUrl( const TQImage &image, const char* fmt ) { - QByteArray ba; - QBuffer buffer( ba ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); image.save( &buffer, fmt ); - return QString::fromLatin1("data:image/%1;base64,%2") + return TQString::fromLatin1("data:image/%1;base64,%2") .arg( fmt, KCodecs::base64Encode( ba ) ); } @@ -749,21 +749,21 @@ namespace KMail { const HeaderStyle * next() const { return brief(); } const HeaderStyle * prev() const { return fancy(); } - QString format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const; + TQString format( const KMMessage * message, const HeaderStrategy * strategy, + const TQString & vCardName, bool printing, bool topLevel ) const; }; - QString EnterpriseHeaderStyle::format( const KMMessage * message, + TQString EnterpriseHeaderStyle::format( const KMMessage * message, const HeaderStrategy * strategy, - const QString & vCardName, bool printing, bool topLevel ) const { - if ( !message ) return QString::null; + const TQString & vCardName, bool printing, bool topLevel ) const { + if ( !message ) return TQString::null; if ( !strategy ) strategy = HeaderStrategy::brief(); // The direction of the header is determined according to the direction // of the application layout. - QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ; + TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ; // However, the direction of the message subject within the header is // determined according to the contents of the subject itself. Since @@ -771,17 +771,17 @@ namespace KMail { // considered left-to-right, they are ignored when determining its // direction. - QString subjectDir; + TQString subjectDir; if (!message->subject().isEmpty()) subjectDir = directionOf( message->cleanSubject() ); else subjectDir = directionOf( i18n("No Subject") ); // colors depend on if its encapsulated or not - QColor fontColor(Qt::white); - QString linkColor = "class =\"white\""; - const QColor activeColor = qApp->palette().active().highlight(); - QColor activeColorDark = activeColor.dark(130); + TQColor fontColor(Qt::white); + TQString linkColor = "class =\"white\""; + const TQColor activeColor = qApp->palette().active().highlight(); + TQColor activeColorDark = activeColor.dark(130); // reverse colors for encapsulated if( !topLevel ){ activeColorDark = activeColor.dark(50); @@ -789,7 +789,7 @@ namespace KMail { linkColor = ""; } - QStringList headerParts; + TQStringList headerParts; if( strategy->showHeader( "to" ) ) headerParts << KMMessage::emailAddrAsAnchor( message->to(), false, linkColor ); @@ -800,12 +800,12 @@ namespace KMail { headerParts << i18n("BCC: ") + KMMessage::emailAddrAsAnchor( message->bcc(), true, linkColor ); // remove all empty (modulo whitespace) entries and joins them via ", \n" - QString headerPart = " " + headerParts.grep( QRegExp( "\\S" ) ).join( ", " ); + TQString headerPart = " " + headerParts.grep( TQRegExp( "\\S" ) ).join( ", " ); // Prepare the date string (when printing always use the localized date) - QString dateString; + TQString dateString; if( printing ) { - QDateTime dateTime; + TQDateTime dateTime; KLocale * locale = KGlobal::locale(); dateTime.setTime_t( message->date() ); dateString = locale->formatDateTime( dateTime ); @@ -813,10 +813,10 @@ namespace KMail { dateString = message->dateStr(); } - QString imgpath(locate("data","kmail/pics/")); + TQString imgpath(locate("data","kmail/pics/")); imgpath.append("enterprise_"); - const QString borderSettings(" padding-top: 0px; padding-bottom: 0px; border-width: 0px "); - QString headerStr (""); + const TQString borderSettings(" padding-top: 0px; padding-bottom: 0px; border-width: 0px "); + TQString headerStr (""); // 3D borders if(topLevel) @@ -851,11 +851,11 @@ namespace KMail { // from if ( strategy->showHeader( "from" ) ){ - QString fromStr = message->from(); + TQString fromStr = message->from(); if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name fromStr = message->fromStrip(); // let's use that // TODO vcard - QString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true, linkColor ); + TQString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true, linkColor ); if ( !vCardName.isEmpty() ) fromPart += "  " + i18n("[vCard]") + ""; //TDDO strategy date @@ -940,8 +940,8 @@ namespace KMail { return 0; // make compiler happy } - const HeaderStyle * HeaderStyle::create( const QString & type ) { - QString lowerType = type.lower(); + const HeaderStyle * HeaderStyle::create( const TQString & type ) { + TQString lowerType = type.lower(); if ( lowerType == "brief" ) return brief(); if ( lowerType == "plain" ) return plain(); if ( lowerType == "enterprise" ) return enterprise(); diff --git a/kmail/headerstyle.h b/kmail/headerstyle.h index 8329f3fd..f3f89ff8 100644 --- a/kmail/headerstyle.h +++ b/kmail/headerstyle.h @@ -60,7 +60,7 @@ namespace KMail { enum Type { Brief, Plain, Fancy, Enterprise }; static const HeaderStyle * create( Type type ); - static const HeaderStyle * create( const QString & type ); + static const HeaderStyle * create( const TQString & type ); static const HeaderStyle * brief(); static const HeaderStyle * plain(); @@ -77,9 +77,9 @@ namespace KMail { // // HeaderStyle interface: // - virtual QString format( const KMMessage * message, + virtual TQString format( const KMMessage * message, const KMail::HeaderStrategy * strategy, - const QString & vCardName, + const TQString & vCardName, bool printing=false, bool topLevel = false ) const = 0; }; diff --git a/kmail/htmlstatusbar.cpp b/kmail/htmlstatusbar.cpp index 831b3665..2c6e6faf 100644 --- a/kmail/htmlstatusbar.cpp +++ b/kmail/htmlstatusbar.cpp @@ -45,16 +45,16 @@ #include #include -#include -#include +#include +#include -KMail::HtmlStatusBar::HtmlStatusBar( QWidget * parent, const char * name, WFlags f ) - : QLabel( parent, name, f ), +KMail::HtmlStatusBar::HtmlStatusBar( TQWidget * parent, const char * name, WFlags f ) + : TQLabel( parent, name, f ), mMode( Normal ) { setAlignment( AlignHCenter|AlignTop ); // Don't force a minimum height to the reader widget - setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) ); upd(); } @@ -85,7 +85,7 @@ void KMail::HtmlStatusBar::setMode( Mode m ) { upd(); } -QString KMail::HtmlStatusBar::message() const { +TQString KMail::HtmlStatusBar::message() const { switch ( mode() ) { case Html: // bold: "HTML Message" return i18n( "
    H
    T
    M
    L
    " @@ -96,7 +96,7 @@ QString KMail::HtmlStatusBar::message() const { "
    M
    e
    s
    s
    a
    g
    e
    " ); default: case Neutral: - return QString::null; + return TQString::null; } } @@ -110,7 +110,7 @@ namespace { } } -QColor KMail::HtmlStatusBar::fgColor() const { +TQColor KMail::HtmlStatusBar::fgColor() const { KConfigGroup conf( config(), "Reader" ); switch ( mode() ) { case Html: @@ -123,7 +123,7 @@ QColor KMail::HtmlStatusBar::fgColor() const { } } -QColor KMail::HtmlStatusBar::bgColor() const { +TQColor KMail::HtmlStatusBar::bgColor() const { KConfigGroup conf( config(), "Reader" ); switch ( mode() ) { diff --git a/kmail/htmlstatusbar.h b/kmail/htmlstatusbar.h index 103f053a..7c5e7655 100644 --- a/kmail/htmlstatusbar.h +++ b/kmail/htmlstatusbar.h @@ -32,7 +32,7 @@ #ifndef _KMAIL_HTMLSTATUSBAR_H_ #define _KMAIL_HTMLSTATUSBAR_H_ -#include +#include class QString; class QColor; @@ -58,10 +58,10 @@ namespace KMail { * * @author Ingo Kloecker , Marc Mutz **/ - class HtmlStatusBar : public QLabel { + class HtmlStatusBar : public TQLabel { Q_OBJECT public: - HtmlStatusBar( QWidget * parent=0, const char * name=0, WFlags f=0 ); + HtmlStatusBar( TQWidget * parent=0, const char * name=0, WFlags f=0 ); virtual ~HtmlStatusBar(); enum Mode { @@ -88,9 +88,9 @@ namespace KMail { private: void upd(); - QString message() const; - QColor bgColor() const; - QColor fgColor() const; + TQString message() const; + TQColor bgColor() const; + TQColor fgColor() const; Mode mMode; }; diff --git a/kmail/identitydialog.cpp b/kmail/identitydialog.cpp index 1283047e..c0a1952d 100644 --- a/kmail/identitydialog.cpp +++ b/kmail/identitydialog.cpp @@ -69,13 +69,13 @@ using KMail::FolderRequester; #include // Qt headers: -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // other headers: #include @@ -86,28 +86,28 @@ using namespace KPIM; namespace KMail { - IdentityDialog::IdentityDialog( QWidget * parent, const char * name ) + IdentityDialog::IdentityDialog( TQWidget * parent, const char * name ) : KDialogBase( Plain, i18n("Edit Identity"), Ok|Cancel|Help, Ok, parent, name ) { // tmp. vars: - QWidget * tab; - QLabel * label; + TQWidget * tab; + TQLabel * label; int row; - QGridLayout * glay; - QString msg; + TQGridLayout * glay; + TQString msg; // // Tab Widget: General // row = -1; - QVBoxLayout * vlay = new QVBoxLayout( plainPage(), 0, spacingHint() ); - QTabWidget *tabWidget = new QTabWidget( plainPage(), "config-identity-tab" ); + TQVBoxLayout * vlay = new TQVBoxLayout( plainPage(), 0, spacingHint() ); + TQTabWidget *tabWidget = new TQTabWidget( plainPage(), "config-identity-tab" ); vlay->addWidget( tabWidget ); - tab = new QWidget( tabWidget ); + tab = new TQWidget( tabWidget ); tabWidget->addTab( tab, i18n("&General") ); - glay = new QGridLayout( tab, 4, 2, marginHint(), spacingHint() ); + glay = new TQGridLayout( tab, 4, 2, marginHint(), spacingHint() ); glay->setRowStretch( 3, 1 ); glay->setColStretch( 1, 1 ); @@ -115,51 +115,51 @@ namespace KMail { ++row; mNameEdit = new KLineEdit( tab ); glay->addWidget( mNameEdit, row, 1 ); - label = new QLabel( mNameEdit, i18n("&Your name:"), tab ); + label = new TQLabel( mNameEdit, i18n("&Your name:"), tab ); glay->addWidget( label, row, 0 ); msg = i18n("

    Your name

    " "

    This field should contain your name as you would like " "it to appear in the email header that is sent out;

    " "

    if you leave this blank your real name will not " "appear, only the email address.

    "); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mNameEdit, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mNameEdit, msg ); // "Organization" line edit and label: ++row; mOrganizationEdit = new KLineEdit( tab ); glay->addWidget( mOrganizationEdit, row, 1 ); - label = new QLabel( mOrganizationEdit, i18n("Organi&zation:"), tab ); + label = new TQLabel( mOrganizationEdit, i18n("Organi&zation:"), tab ); glay->addWidget( label, row, 0 ); msg = i18n("

    Organization

    " "

    This field should have the name of your organization " "if you'd like it to be shown in the email header that " "is sent out.

    " "

    It is safe (and normal) to leave this blank.

    "); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mOrganizationEdit, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mOrganizationEdit, msg ); // "Email Address" line edit and label: // (row 3: spacer) ++row; mEmailEdit = new KLineEdit( tab ); glay->addWidget( mEmailEdit, row, 1 ); - label = new QLabel( mEmailEdit, i18n("&Email address:"), tab ); + label = new TQLabel( mEmailEdit, i18n("&Email address:"), tab ); glay->addWidget( label, row, 0 ); msg = i18n("

    Email address

    " "

    This field should have your full email address.

    " "

    If you leave this blank, or get it wrong, people " "will have trouble replying to you.

    "); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mEmailEdit, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mEmailEdit, msg ); // // Tab Widget: Cryptography // row = -1; - mCryptographyTab = tab = new QWidget( tabWidget ); + mCryptographyTab = tab = new TQWidget( tabWidget ); tabWidget->addTab( tab, i18n("Cryptograph&y") ); - glay = new QGridLayout( tab, 6, 2, marginHint(), spacingHint() ); + glay = new TQGridLayout( tab, 6, 2, marginHint(), spacingHint() ); glay->setColStretch( 1, 1 ); // "OpenPGP Signature Key" requester and label: @@ -178,9 +178,9 @@ namespace KMail { "normal mail functions will not be affected.

    " "

    You can find out more about keys at http://www.gnupg.org

    "); - label = new QLabel( mPGPSigningKeyRequester, i18n("OpenPGP signing key:"), tab ); - QWhatsThis::add( mPGPSigningKeyRequester, msg ); - QWhatsThis::add( label, msg ); + label = new TQLabel( mPGPSigningKeyRequester, i18n("OpenPGP signing key:"), tab ); + TQWhatsThis::add( mPGPSigningKeyRequester, msg ); + TQWhatsThis::add( label, msg ); glay->addWidget( label, row, 0 ); glay->addWidget( mPGPSigningKeyRequester, row, 1 ); @@ -203,9 +203,9 @@ namespace KMail { "to encrypt copies of outgoing messages to you using OpenPGP; " "normal mail functions will not be affected.

    " "

    You can find out more about keys at http://www.gnupg.org"); - label = new QLabel( mPGPEncryptionKeyRequester, i18n("OpenPGP encryption key:"), tab ); - QWhatsThis::add( mPGPEncryptionKeyRequester, msg ); - QWhatsThis::add( label, msg ); + label = new TQLabel( mPGPEncryptionKeyRequester, i18n("OpenPGP encryption key:"), tab ); + TQWhatsThis::add( mPGPEncryptionKeyRequester, msg ); + TQWhatsThis::add( label, msg ); glay->addWidget( label, row, 0 ); glay->addWidget( mPGPEncryptionKeyRequester, row, 1 ); @@ -225,9 +225,9 @@ namespace KMail { "

    You can leave this blank, but KMail will not be able " "to digitally sign emails using S/MIME; " "normal mail functions will not be affected.

    "); - label = new QLabel( mSMIMESigningKeyRequester, i18n("S/MIME signing certificate:"), tab ); - QWhatsThis::add( mSMIMESigningKeyRequester, msg ); - QWhatsThis::add( label, msg ); + label = new TQLabel( mSMIMESigningKeyRequester, i18n("S/MIME signing certificate:"), tab ); + TQWhatsThis::add( mSMIMESigningKeyRequester, msg ); + TQWhatsThis::add( label, msg ); glay->addWidget( label, row, 0 ); glay->addWidget( mSMIMESigningKeyRequester, row, 1 ); @@ -253,9 +253,9 @@ namespace KMail { "

    You can leave this blank, but KMail will not be able " "to encrypt copies of outgoing messages to you using S/MIME; " "normal mail functions will not be affected.

    "); - label = new QLabel( mSMIMEEncryptionKeyRequester, i18n("S/MIME encryption certificate:"), tab ); - QWhatsThis::add( mSMIMEEncryptionKeyRequester, msg ); - QWhatsThis::add( label, msg ); + label = new TQLabel( mSMIMEEncryptionKeyRequester, i18n("S/MIME encryption certificate:"), tab ); + TQWhatsThis::add( mSMIMEEncryptionKeyRequester, msg ); + TQWhatsThis::add( label, msg ); glay->addWidget( label, row, 0 ); glay->addWidget( mSMIMEEncryptionKeyRequester, row, 1 ); @@ -265,15 +265,15 @@ namespace KMail { // "Preferred Crypto Message Format" combobox and label: ++row; - mPreferredCryptoMessageFormat = new QComboBox( false, tab ); - QStringList l; + mPreferredCryptoMessageFormat = new TQComboBox( false, tab ); + TQStringList l; l << Kleo::cryptoMessageFormatToLabel( Kleo::AutoFormat ) << Kleo::cryptoMessageFormatToLabel( Kleo::InlineOpenPGPFormat ) << Kleo::cryptoMessageFormatToLabel( Kleo::OpenPGPMIMEFormat ) << Kleo::cryptoMessageFormatToLabel( Kleo::SMIMEFormat ) << Kleo::cryptoMessageFormatToLabel( Kleo::SMIMEOpaqueFormat ); mPreferredCryptoMessageFormat->insertStringList( l ); - label = new QLabel( mPreferredCryptoMessageFormat, + label = new TQLabel( mPreferredCryptoMessageFormat, i18n("Preferred crypto message format:"), tab ); glay->addWidget( label, row, 0 ); @@ -286,9 +286,9 @@ namespace KMail { // Tab Widget: Advanced // row = -1; - tab = new QWidget( tabWidget ); + tab = new TQWidget( tabWidget ); tabWidget->addTab( tab, i18n("&Advanced") ); - glay = new QGridLayout( tab, 8, 2, marginHint(), spacingHint() ); + glay = new TQGridLayout( tab, 8, 2, marginHint(), spacingHint() ); // the last (empty) row takes all the remaining space glay->setRowStretch( 8-1, 1 ); glay->setColStretch( 1, 1 ); @@ -297,7 +297,7 @@ namespace KMail { ++row; mReplyToEdit = new KPIM::AddresseeLineEdit( tab, true, "mReplyToEdit" ); glay->addWidget( mReplyToEdit, row, 1 ); - label = new QLabel ( mReplyToEdit, i18n("&Reply-To address:"), tab); + label = new TQLabel ( mReplyToEdit, i18n("&Reply-To address:"), tab); glay->addWidget( label , row, 0 ); msg = i18n("

    Reply-To addresses

    " "

    This sets the Reply-to: header to contain a " @@ -309,14 +309,14 @@ namespace KMail { "From: field, but any responses to go to " "a group address.

    " "

    If in doubt, leave this field blank.

    "); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mReplyToEdit, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mReplyToEdit, msg ); // "BCC addresses" line edit and label: ++row; mBccEdit = new KPIM::AddresseeLineEdit( tab, true, "mBccEdit" ); glay->addWidget( mBccEdit, row, 1 ); - label = new QLabel( mBccEdit, i18n("&BCC addresses:"), tab ); + label = new TQLabel( mBccEdit, i18n("&BCC addresses:"), tab ); glay->addWidget( label, row, 0 ); msg = i18n("

    BCC (Blind Carbon Copy) addresses

    " "

    The addresses that you enter here will be added to each " @@ -327,14 +327,14 @@ namespace KMail { "

    To specify more than one address, use commas to separate " "the list of BCC recipients.

    " "

    If in doubt, leave this field blank.

    "); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mBccEdit, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mBccEdit, msg ); // "Dictionary" combo box and label: ++row; mDictionaryCombo = new DictionaryComboBox( tab ); glay->addWidget( mDictionaryCombo, row, 1 ); - glay->addWidget( new QLabel( mDictionaryCombo, i18n("D&ictionary:"), tab ), + glay->addWidget( new TQLabel( mDictionaryCombo, i18n("D&ictionary:"), tab ), row, 0 ); // "Sent-mail Folder" combo box and label: @@ -343,7 +343,7 @@ namespace KMail { kmkernel->getKMMainWidget()->folderTree() ); mFccCombo->setShowOutbox( false ); glay->addWidget( mFccCombo, row, 1 ); - glay->addWidget( new QLabel( mFccCombo, i18n("Sent-mail &folder:"), tab ), + glay->addWidget( new TQLabel( mFccCombo, i18n("Sent-mail &folder:"), tab ), row, 0 ); // "Drafts Folder" combo box and label: @@ -352,7 +352,7 @@ namespace KMail { kmkernel->getKMMainWidget()->folderTree() ); mDraftsCombo->setShowOutbox( false ); glay->addWidget( mDraftsCombo, row, 1 ); - glay->addWidget( new QLabel( mDraftsCombo, i18n("&Drafts folder:"), tab ), + glay->addWidget( new TQLabel( mDraftsCombo, i18n("&Drafts folder:"), tab ), row, 0 ); // "Templates Folder" combo box and label: @@ -361,43 +361,43 @@ namespace KMail { kmkernel->getKMMainWidget()->folderTree() ); mTemplatesCombo->setShowOutbox( false ); glay->addWidget( mTemplatesCombo, row, 1 ); - glay->addWidget( new QLabel( mTemplatesCombo, i18n("&Templates folder:"), tab ), + glay->addWidget( new TQLabel( mTemplatesCombo, i18n("&Templates folder:"), tab ), row, 0 ); // "Special transport" combobox and label: ++row; - mTransportCheck = new QCheckBox( i18n("Special &transport:"), tab ); + mTransportCheck = new TQCheckBox( i18n("Special &transport:"), tab ); glay->addWidget( mTransportCheck, row, 0 ); - mTransportCombo = new QComboBox( true, tab ); + mTransportCombo = new TQComboBox( true, tab ); mTransportCombo->setEnabled( false ); // since !mTransportCheck->isChecked() mTransportCombo->insertStringList( KMail::TransportManager::transportNames() ); glay->addWidget( mTransportCombo, row, 1 ); - connect( mTransportCheck, SIGNAL(toggled(bool)), - mTransportCombo, SLOT(setEnabled(bool)) ); + connect( mTransportCheck, TQT_SIGNAL(toggled(bool)), + mTransportCombo, TQT_SLOT(setEnabled(bool)) ); // the last row is a spacer // // Tab Widget: Templates // - tab = new QWidget( tabWidget ); + tab = new TQWidget( tabWidget ); tabWidget->addTab( tab, i18n("&Templates") ); - vlay = new QVBoxLayout( tab, marginHint(), spacingHint() ); - mCustom = new QCheckBox( i18n("&Use custom message templates"), tab ); + vlay = new TQVBoxLayout( tab, marginHint(), spacingHint() ); + mCustom = new TQCheckBox( i18n("&Use custom message templates"), tab ); vlay->addWidget( mCustom ); mWidget = new TemplatesConfiguration( tab , "identity-templates" ); mWidget->setEnabled( false ); vlay->addWidget( mWidget ); - QHBoxLayout *btns = new QHBoxLayout( vlay, spacingHint() ); + TQHBoxLayout *btns = new TQHBoxLayout( vlay, spacingHint() ); mCopyGlobal = new KPushButton( i18n("&Copy global templates"), tab ); mCopyGlobal->setEnabled( false ); btns->addWidget( mCopyGlobal ); - connect( mCustom, SIGNAL( toggled( bool ) ), - mWidget, SLOT( setEnabled( bool ) ) ); - connect( mCustom, SIGNAL( toggled( bool ) ), - mCopyGlobal, SLOT( setEnabled( bool ) ) ); - connect( mCopyGlobal, SIGNAL(clicked()), - this, SLOT(slotCopyGlobal()) ); + connect( mCustom, TQT_SIGNAL( toggled( bool ) ), + mWidget, TQT_SLOT( setEnabled( bool ) ) ); + connect( mCustom, TQT_SIGNAL( toggled( bool ) ), + mCopyGlobal, TQT_SLOT( setEnabled( bool ) ) ); + connect( mCopyGlobal, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCopyGlobal()) ); // // Tab Widget: Signature @@ -415,8 +415,8 @@ namespace KMail { resize( geometry.readSizeEntry( "Identity Dialog size" ) ); mNameEdit->setFocus(); - connect( tabWidget, SIGNAL(currentChanged(QWidget*)), - SLOT(slotAboutToShow(QWidget*)) ); + connect( tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), + TQT_SLOT(slotAboutToShow(TQWidget*)) ); } IdentityDialog::~IdentityDialog() { @@ -424,11 +424,11 @@ namespace KMail { geometry.writeEntry( "Identity Dialog size", size() ); } - void IdentityDialog::slotAboutToShow( QWidget * w ) { + void IdentityDialog::slotAboutToShow( TQWidget * w ) { if ( w == mCryptographyTab ) { // set the configured email address as inital query of the key // requesters: - const QString email = mEmailEdit->text().stripWhiteSpace(); + const TQString email = mEmailEdit->text().stripWhiteSpace(); mPGPEncryptionKeyRequester->setInitialQuery( email ); mPGPSigningKeyRequester->setInitialQuery( email ); mSMIMEEncryptionKeyRequester->setInitialQuery( email ); @@ -442,13 +442,13 @@ namespace KMail { namespace { struct DoesntMatchEMailAddress { - explicit DoesntMatchEMailAddress( const QString & s ) + explicit DoesntMatchEMailAddress( const TQString & s ) : email( s.stripWhiteSpace().lower() ) {} bool operator()( const GpgME::Key & key ) const; private: bool checkForEmail( const char * email ) const; - static QString extractEmail( const char * email ); - const QString email; + static TQString extractEmail( const char * email ); + const TQString email; }; bool DoesntMatchEMailAddress::operator()( const GpgME::Key & key ) const { @@ -460,14 +460,14 @@ namespace KMail { } bool DoesntMatchEMailAddress::checkForEmail( const char * e ) const { - const QString em = extractEmail( e ); + const TQString em = extractEmail( e ); return !em.isEmpty() && email == em; } - QString DoesntMatchEMailAddress::extractEmail( const char * e ) { + TQString DoesntMatchEMailAddress::extractEmail( const char * e ) { if ( !e || !*e ) - return QString::null; - const QString em = QString::fromUtf8( e ); + return TQString::null; + const TQString em = TQString::fromUtf8( e ); if ( e[0] == '<' ) return em.mid( 1, em.length() - 2 ); else @@ -475,12 +475,12 @@ namespace KMail { } } -bool IdentityDialog::validateAddresses( const QString & addresses ) +bool IdentityDialog::validateAddresses( const TQString & addresses ) { - QString brokenAddress; + TQString brokenAddress; KPIM::EmailParseResult errorCode = KMMessage::isValidEmailAddressList( KMMessage::expandAliases( addresses ), brokenAddress ); if ( !( errorCode == KPIM::AddressOk || errorCode == KPIM::AddressEmpty ) ) { - QString errorMsg( "

    " + brokenAddress + + TQString errorMsg( "

    " + brokenAddress + "

    " + KPIM::emailParseResultToString( errorCode ) + "

    " ); KMessageBox::sorry( this, errorMsg, i18n("Invalid Email Address") ); @@ -490,11 +490,11 @@ bool IdentityDialog::validateAddresses( const QString & addresses ) } void IdentityDialog::slotOk() { - const QString email = mEmailEdit->text().stripWhiteSpace(); + const TQString email = mEmailEdit->text().stripWhiteSpace(); // Validate email addresses if ( !isValidSimpleEmailAddress( email )) { - QString errorMsg( simpleEmailAddressErrorMsg()); + TQString errorMsg( simpleEmailAddressErrorMsg()); KMessageBox::sorry( this, errorMsg, i18n("Invalid Email Address") ); return; } @@ -511,7 +511,7 @@ void IdentityDialog::slotOk() { const std::vector & pgpEncryptionKeys = mPGPEncryptionKeyRequester->keys(); const std::vector & smimeSigningKeys = mSMIMESigningKeyRequester->keys(); const std::vector & smimeEncryptionKeys = mSMIMEEncryptionKeyRequester->keys(); - QString msg; + TQString msg; bool err = false; if ( std::find_if( pgpSigningKeys.begin(), pgpSigningKeys.end(), DoesntMatchEMailAddress( email ) ) != pgpSigningKeys.end() ) { @@ -567,8 +567,8 @@ void IdentityDialog::slotOk() { return KDialogBase::slotOk(); } - bool IdentityDialog::checkFolderExists( const QString & folderID, - const QString & msg ) { + bool IdentityDialog::checkFolderExists( const TQString & folderID, + const TQString & msg ) { KMFolder * folder = kmkernel->findFolderById( folderID ); if ( !folder ) { KMessageBox::sorry( this, msg ); @@ -636,7 +636,7 @@ void IdentityDialog::slotOk() { // "Templates" tab: uint identity = ident.uoid(); - QString iid = QString("IDENTITY_%1").arg( identity ); + TQString iid = TQString("IDENTITY_%1").arg( identity ); Templates t( iid ); mCustom->setChecked(t.useCustomTemplates()); mWidget->loadFromIdentity( identity ); @@ -651,7 +651,7 @@ void IdentityDialog::slotOk() { // "General" tab: ident.setFullName( mNameEdit->text() ); ident.setOrganization( mOrganizationEdit->text() ); - QString email = mEmailEdit->text(); + TQString email = mEmailEdit->text(); ident.setEmailAddr( email ); // "Cryptography" tab: ident.setPGPSigningKey( mPGPSigningKeyRequester->fingerprint().latin1() ); @@ -663,17 +663,17 @@ void IdentityDialog::slotOk() { ident.setReplyToAddr( mReplyToEdit->text() ); ident.setBcc( mBccEdit->text() ); ident.setTransport( ( mTransportCheck->isChecked() ) ? - mTransportCombo->currentText() : QString::null ); + mTransportCombo->currentText() : TQString::null ); ident.setDictionary( mDictionaryCombo->currentDictionary() ); ident.setFcc( mFccCombo->folder() ? - mFccCombo->folder()->idString() : QString::null ); + mFccCombo->folder()->idString() : TQString::null ); ident.setDrafts( mDraftsCombo->folder() ? - mDraftsCombo->folder()->idString() : QString::null ); + mDraftsCombo->folder()->idString() : TQString::null ); ident.setTemplates( mTemplatesCombo->folder() ? - mTemplatesCombo->folder()->idString() : QString::null ); + mTemplatesCombo->folder()->idString() : TQString::null ); // "Templates" tab: uint identity = ident.uoid(); - QString iid = QString("IDENTITY_%1").arg( identity ); + TQString iid = TQString("IDENTITY_%1").arg( identity ); Templates t( iid ); kdDebug() << "use custom templates for identity " << identity << ": " << mCustom->isChecked() << endl; t.setUseCustomTemplates(mCustom->isChecked()); @@ -685,9 +685,9 @@ void IdentityDialog::slotOk() { ident.setXFaceEnabled( mXFaceConfigurator->isXFaceEnabled() ); } - void IdentityDialog::slotUpdateTransportCombo( const QStringList & sl ) { + void IdentityDialog::slotUpdateTransportCombo( const TQStringList & sl ) { // save old setting: - QString content = mTransportCombo->currentText(); + TQString content = mTransportCombo->currentText(); // update combo box: mTransportCombo->clear(); mTransportCombo->insertStringList( sl ); diff --git a/kmail/identitydialog.h b/kmail/identitydialog.h index b43f3ebe..c90747fd 100644 --- a/kmail/identitydialog.h +++ b/kmail/identitydialog.h @@ -61,7 +61,7 @@ namespace KMail { class IdentityDialog : public KDialogBase { Q_OBJECT public: - IdentityDialog( QWidget * parent=0, const char * name = 0 ); + IdentityDialog( TQWidget * parent=0, const char * name = 0 ); virtual ~IdentityDialog(); void setIdentity( /*_not_ const*/ KPIM::Identity & ident ); @@ -69,43 +69,43 @@ namespace KMail { void updateIdentity( KPIM::Identity & ident ); public slots: - void slotUpdateTransportCombo( const QStringList & sl ); + void slotUpdateTransportCombo( const TQStringList & sl ); protected slots: - void slotAboutToShow( QWidget * w ); + void slotAboutToShow( TQWidget * w ); /*! \reimp */ void slotOk(); // copy default templates to identity templates void slotCopyGlobal(); private: - bool checkFolderExists( const QString & folder, const QString & msg ); - bool validateAddresses( const QString & addresses ); + bool checkFolderExists( const TQString & folder, const TQString & msg ); + bool validateAddresses( const TQString & addresses ); protected: // "general" tab: - QLineEdit *mNameEdit; - QLineEdit *mOrganizationEdit; - QLineEdit *mEmailEdit; + TQLineEdit *mNameEdit; + TQLineEdit *mOrganizationEdit; + TQLineEdit *mEmailEdit; // "cryptography" tab: - QWidget *mCryptographyTab; + TQWidget *mCryptographyTab; Kleo::SigningKeyRequester *mPGPSigningKeyRequester; Kleo::EncryptionKeyRequester *mPGPEncryptionKeyRequester; Kleo::SigningKeyRequester *mSMIMESigningKeyRequester; Kleo::EncryptionKeyRequester *mSMIMEEncryptionKeyRequester; - QComboBox *mPreferredCryptoMessageFormat; + TQComboBox *mPreferredCryptoMessageFormat; // "advanced" tab: - QLineEdit *mReplyToEdit; - QLineEdit *mBccEdit; + TQLineEdit *mReplyToEdit; + TQLineEdit *mBccEdit; KMail::DictionaryComboBox *mDictionaryCombo; FolderRequester *mFccCombo; FolderRequester *mDraftsCombo; FolderRequester *mTemplatesCombo; - QCheckBox *mTransportCheck; - QComboBox *mTransportCombo; // should be a KMTransportCombo... + TQCheckBox *mTransportCheck; + TQComboBox *mTransportCombo; // should be a KMTransportCombo... // "templates" tab: TemplatesConfiguration *mWidget; - QCheckBox *mCustom; + TQCheckBox *mCustom; KPushButton *mCopyGlobal; // "signature" tab: KMail::SignatureConfigurator *mSignatureConfigurator; diff --git a/kmail/identitydrag.cpp b/kmail/identitydrag.cpp index 5116dd44..e8ba4a07 100644 --- a/kmail/identitydrag.cpp +++ b/kmail/identitydrag.cpp @@ -41,8 +41,8 @@ namespace KMail { static const char kmailIdentityMimeType[] = "application/x-kmail-identity-drag"; IdentityDrag::IdentityDrag( const KPIM::Identity & ident, - QWidget * dragSource, const char * name ) - : QDragObject( dragSource, name ), mIdent( ident ) + TQWidget * dragSource, const char * name ) + : TQDragObject( dragSource, name ), mIdent( ident ) { } @@ -54,26 +54,26 @@ namespace KMail { return 0; } - QByteArray IdentityDrag::encodedData( const char * mimetype ) const { - QByteArray a; + TQByteArray IdentityDrag::encodedData( const char * mimetype ) const { + TQByteArray a; if ( !qstrcmp( mimetype, kmailIdentityMimeType ) ) { - QDataStream s( a, IO_WriteOnly ); + TQDataStream s( a, IO_WriteOnly ); s << mIdent; } return a; } - bool IdentityDrag::canDecode( const QMimeSource * e ) { + bool IdentityDrag::canDecode( const TQMimeSource * e ) { // ### feel free to add vCard and other stuff here and in decode... return e->provides( kmailIdentityMimeType ); } - bool IdentityDrag::decode( const QMimeSource * e, KPIM::Identity & i ) { + bool IdentityDrag::decode( const TQMimeSource * e, KPIM::Identity & i ) { if ( e->provides( kmailIdentityMimeType ) ) { - QDataStream s( e->encodedData( kmailIdentityMimeType ), IO_ReadOnly ); + TQDataStream s( e->encodedData( kmailIdentityMimeType ), IO_ReadOnly ); s >> i; return true; } diff --git a/kmail/identitydrag.h b/kmail/identitydrag.h index b9b8b831..82d6d026 100644 --- a/kmail/identitydrag.h +++ b/kmail/identitydrag.h @@ -34,27 +34,27 @@ #include -#include // is a qobject and a qmimesource +#include // is a qobject and a qmimesource namespace KMail { - /** @short A QDragObject for KPIM::Identity + /** @short A TQDragObject for KPIM::Identity @author Marc Mutz **/ - class IdentityDrag : public QDragObject { + class IdentityDrag : public TQDragObject { Q_OBJECT public: IdentityDrag( const KPIM::Identity & ident, - QWidget * dragSource=0, const char * name=0 ); + TQWidget * dragSource=0, const char * name=0 ); public: virtual ~IdentityDrag() {} const char * format( int i ) const; // reimp. QMimeSource - QByteArray encodedData( const char * mimetype ) const; // dto. + TQByteArray encodedData( const char * mimetype ) const; // dto. - static bool canDecode( const QMimeSource * e ); - static bool decode( const QMimeSource * e, KPIM::Identity & ident ); + static bool canDecode( const TQMimeSource * e ); + static bool decode( const TQMimeSource * e, KPIM::Identity & ident ); protected: KPIM::Identity mIdent; diff --git a/kmail/identitylistview.cpp b/kmail/identitylistview.cpp index 9666a38d..d4067380 100644 --- a/kmail/identitylistview.cpp +++ b/kmail/identitylistview.cpp @@ -57,7 +57,7 @@ namespace KMail { init( ident ); } - IdentityListViewItem::IdentityListViewItem( IdentityListView * parent, QListViewItem * after, const KPIM::Identity & ident ) + IdentityListViewItem::IdentityListViewItem( IdentityListView * parent, TQListViewItem * after, const KPIM::Identity & ident ) : KListViewItem( parent, after ), mUOID( ident.uoid() ) { init( ident ); } @@ -95,7 +95,7 @@ namespace KMail { // // - IdentityListView::IdentityListView( QWidget * parent, const char * name ) + IdentityListView::IdentityListView( TQWidget * parent, const char * name ) : KListView( parent, name ) { setFullWidth( true ); @@ -114,7 +114,7 @@ namespace KMail { setSelectionModeExt( Single ); // ### Extended would be nicer... } - void IdentityListView::rename( QListViewItem * i, int col ) { + void IdentityListView::rename( TQListViewItem * i, int col ) { if ( col == 0 && isRenameable( col ) ) { IdentityListViewItem * item = dynamic_cast( i ); if ( item ) { @@ -126,12 +126,12 @@ namespace KMail { KListView::rename( i, col ); } - bool IdentityListView::acceptDrag( QDropEvent * e ) const { + bool IdentityListView::acceptDrag( TQDropEvent * e ) const { // disallow moving: return e->source() != viewport() && IdentityDrag::canDecode( e ); } - QDragObject * IdentityListView::dragObject() { + TQDragObject * IdentityListView::dragObject() { IdentityListViewItem * item = dynamic_cast( currentItem() ); if ( !item ) return 0; diff --git a/kmail/identitylistview.h b/kmail/identitylistview.h index 7269237e..6b8e36e2 100644 --- a/kmail/identitylistview.h +++ b/kmail/identitylistview.h @@ -42,14 +42,14 @@ namespace KMail { class IdentityListView; - /** @short A QListViewItem for use in IdentityListView + /** @short A TQListViewItem for use in IdentityListView @author Marc Mutz **/ class IdentityListViewItem : public KListViewItem { public: IdentityListViewItem( IdentityListView * parent, const KPIM::Identity & ident ); - IdentityListViewItem( IdentityListView * parent, QListViewItem * after, + IdentityListViewItem( IdentityListView * parent, TQListViewItem * after, const KPIM::Identity & ident ); uint uoid() const { return mUOID; } @@ -69,15 +69,15 @@ namespace KMail { class IdentityListView : public KListView { Q_OBJECT public: - IdentityListView( QWidget * parent=0, const char * name=0 ); + IdentityListView( TQWidget * parent=0, const char * name=0 ); virtual ~IdentityListView() {} public slots: - void rename( QListViewItem *, int ); + void rename( TQListViewItem *, int ); protected: - bool acceptDrag( QDropEvent * ) const; - QDragObject * dragObject(); + bool acceptDrag( TQDropEvent * ) const; + TQDragObject * dragObject(); }; diff --git a/kmail/imapaccountbase.cpp b/kmail/imapaccountbase.cpp index 9a04c3fd..77840398 100644 --- a/kmail/imapaccountbase.cpp +++ b/kmail/imapaccountbase.cpp @@ -66,8 +66,8 @@ using KIO::PasswordDialog; #include //using KIO::Scheduler; // use FQN below -#include -#include +#include +#include namespace KMail { @@ -79,7 +79,7 @@ namespace KMail { // // - ImapAccountBase::ImapAccountBase( AccountManager * parent, const QString & name, uint id ) + ImapAccountBase::ImapAccountBase( AccountManager * parent, const TQString & name, uint id ) : NetworkAccount( parent, name, id ), mIdleTimer( 0, "mIdleTimer" ), mNoopTimer( 0, "mNoopTimer" ), @@ -105,12 +105,12 @@ namespace KMail { { mPort = imapDefaultPort; mBodyPartList.setAutoDelete(true); - KIO::Scheduler::connect(SIGNAL(slaveError(KIO::Slave *, int, const QString &)), - this, SLOT(slotSchedulerSlaveError(KIO::Slave *, int, const QString &))); - KIO::Scheduler::connect(SIGNAL(slaveConnected(KIO::Slave *)), - this, SLOT(slotSchedulerSlaveConnected(KIO::Slave *))); - connect(&mNoopTimer, SIGNAL(timeout()), SLOT(slotNoopTimeout())); - connect(&mIdleTimer, SIGNAL(timeout()), SLOT(slotIdleTimeout())); + KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave *, int, const TQString &)), + this, TQT_SLOT(slotSchedulerSlaveError(KIO::Slave *, int, const TQString &))); + KIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(KIO::Slave *)), + this, TQT_SLOT(slotSchedulerSlaveConnected(KIO::Slave *))); + connect(&mNoopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNoopTimeout())); + connect(&mIdleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimeout())); } ImapAccountBase::~ImapAccountBase() { @@ -149,7 +149,7 @@ namespace KMail { return imapDefaultPort; } - QString ImapAccountBase::protocol() const { + TQString ImapAccountBase::protocol() const { return useSSL() ? IMAP_SSL_PROTOCOL : IMAP_PROTOCOL; } @@ -200,13 +200,13 @@ namespace KMail { setListOnlyOpenFolders( config.readBoolEntry( "listOnlyOpenFolders", false ) ); // read namespaces nsMap map; - QStringList list = config.readListEntry( QString::number( PersonalNS ) ); + TQStringList list = config.readListEntry( TQString::number( PersonalNS ) ); if ( !list.isEmpty() ) map[PersonalNS] = list.gres( "\"", "" ); - list = config.readListEntry( QString::number( OtherUsersNS ) ); + list = config.readListEntry( TQString::number( OtherUsersNS ) ); if ( !list.isEmpty() ) map[OtherUsersNS] = list.gres( "\"", "" ); - list = config.readListEntry( QString::number( SharedNS ) ); + list = config.readListEntry( TQString::number( SharedNS ) ); if ( !list.isEmpty() ) map[SharedNS] = list.gres( "\"", "" ); setNamespaces( map ); @@ -216,7 +216,7 @@ namespace KMail { for ( namespaceDelim::ConstIterator it = entries.begin(); it != entries.end(); ++it ) { if ( it.key().startsWith( "Namespace:" ) ) { - QString key = it.key().right( it.key().length() - 10 ); + TQString key = it.key().right( it.key().length() - 10 ); namespaceToDelimiter[key] = it.data(); } } @@ -237,14 +237,14 @@ namespace KMail { config.writeEntry( "locally-subscribed-folders", onlyLocallySubscribedFolders() ); config.writeEntry( "loadondemand", loadOnDemand() ); config.writeEntry( "listOnlyOpenFolders", listOnlyOpenFolders() ); - QString data; + TQString data; for ( nsMap::Iterator it = mNamespaces.begin(); it != mNamespaces.end(); ++it ) { if ( !it.data().isEmpty() ) { data = "\"" + it.data().join("\",\"") + "\""; - config.writeEntry( QString::number( it.key() ), data ); + config.writeEntry( TQString::number( it.key() ), data ); } } - QString key; + TQString key; for ( namespaceDelim::ConstIterator it = mNamespaceToDelimiter.begin(); it != mNamespaceToDelimiter.end(); ++it ) { key = "Namespace:" + it.key(); @@ -280,15 +280,15 @@ namespace KMail { auth() != "GSSAPI" ) ) { Q_ASSERT( !mSlave ); // disconnected on 'wrong login' error already, or first try - QString log = login(); - QString pass = passwd(); + TQString log = login(); + TQString pass = passwd(); // We init "store" to true to indicate that we want to have the // "keep password" checkbox. Then, we set [Passwords]Keep to // storePasswd(), so that the checkbox in the dialog will be // init'ed correctly: KConfigGroup passwords( KGlobal::config(), "Passwords" ); passwords.writeEntry( "Keep", storePasswd() ); - QString msg = i18n("You need to supply a username and a password to " + TQString msg = i18n("You need to supply a username and a password to " "access this mailbox."); mPasswordDialogIsActive = true; @@ -296,10 +296,10 @@ namespace KMail { dlg.setPlainCaption( i18n("Authorization Dialog") ); dlg.addCommentLine( i18n("Account:"), name() ); int ret = dlg.exec(); - if (ret != QDialog::Accepted ) { + if (ret != TQDialog::Accepted ) { mPasswordDialogIsActive = false; mAskAgain = false; - emit connectionResult( KIO::ERR_USER_CANCELED, QString::null ); + emit connectionResult( KIO::ERR_USER_CANCELED, TQString::null ); return Error; } mPasswordDialogIsActive = false; @@ -327,7 +327,7 @@ namespace KMail { return Connecting; } - bool ImapAccountBase::handleJobError( KIO::Job *job, const QString& context, bool abortSync ) + bool ImapAccountBase::handleJobError( KIO::Job *job, const TQString& context, bool abortSync ) { JobIterator it = findJob( job ); if ( it != jobsEnd() && (*it).progressItem ) @@ -357,14 +357,14 @@ namespace KMail { } //----------------------------------------------------------------------------- - void ImapAccountBase::changeSubscription( bool subscribe, const QString& imapPath ) + void ImapAccountBase::changeSubscription( bool subscribe, const TQString& imapPath ) { // change the subscription of the folder KURL url = getUrl(); url.setPath(imapPath); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly); if (subscribe) stream << (int) 'u' << url; @@ -382,8 +382,8 @@ namespace KMail { else jd.onlySubscribed = false; insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotSubscriptionResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotSubscriptionResult(KIO::Job *))); } //----------------------------------------------------------------------------- @@ -393,7 +393,7 @@ namespace KMail { JobIterator it = findJob( job ); if ( it == jobsEnd() ) return; bool onlySubscribed = (*it).onlySubscribed; - QString path = static_cast(job)->url().path(); + TQString path = static_cast(job)->url().path(); if (job->error()) { handleJobError( job, i18n( "Error while trying to subscribe to %1:" ).arg( path ) + '\n' ); @@ -408,7 +408,7 @@ namespace KMail { //----------------------------------------------------------------------------- // TODO imapPath can be removed once parent can be a KMFolderImapBase or whatever - void ImapAccountBase::getUserRights( KMFolder* parent, const QString& imapPath ) + void ImapAccountBase::getUserRights( KMFolder* parent, const TQString& imapPath ) { // There isn't much point in asking the server about a user's rights on his own inbox, // it might not be the effective permissions (at least with Cyrus, one can admin his own inbox, @@ -432,8 +432,8 @@ namespace KMail { jd.cancellable = true; insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotGetUserRightsResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotGetUserRightsResult(KIO::Job *))); } void ImapAccountBase::slotGetUserRightsResult( KIO::Job* _job ) @@ -463,7 +463,7 @@ namespace KMail { } //----------------------------------------------------------------------------- - void ImapAccountBase::getACL( KMFolder* parent, const QString& imapPath ) + void ImapAccountBase::getACL( KMFolder* parent, const TQString& imapPath ) { KURL url = getUrl(); url.setPath(imapPath); @@ -473,8 +473,8 @@ namespace KMail { jd.cancellable = true; insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotGetACLResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotGetACLResult(KIO::Job *))); } void ImapAccountBase::slotGetACLResult( KIO::Job* _job ) @@ -490,7 +490,7 @@ namespace KMail { //----------------------------------------------------------------------------- // Do not remove imapPath, FolderDiaQuotaTab needs to call this with parent==0. - void ImapAccountBase::getStorageQuotaInfo( KMFolder* parent, const QString& imapPath ) + void ImapAccountBase::getStorageQuotaInfo( KMFolder* parent, const TQString& imapPath ) { if ( !mSlave ) return; KURL url = getUrl(); @@ -501,8 +501,8 @@ namespace KMail { jd.cancellable = true; insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotGetStorageQuotaInfoResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotGetStorageQuotaInfoResult(KIO::Job *))); } void ImapAccountBase::slotGetStorageQuotaInfoResult( KIO::Job* _job ) @@ -521,15 +521,15 @@ namespace KMail { void ImapAccountBase::slotNoopTimeout() { if ( mSlave ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << ( int ) 'N'; KIO::SimpleJob *job = KIO::special( getUrl(), packedArgs, false ); KIO::Scheduler::assignJobToSlave(mSlave, job); - connect( job, SIGNAL(result( KIO::Job * ) ), - this, SLOT( slotSimpleResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL(result( KIO::Job * ) ), + this, TQT_SLOT( slotSimpleResult( KIO::Job * ) ) ); } else { /* Stop the timer, we have disconnected. We have to make sure it is started again when a new slave appears. */ @@ -559,10 +559,10 @@ namespace KMail { //----------------------------------------------------------------------------- void ImapAccountBase::slotSchedulerSlaveError(KIO::Slave *aSlave, int errorCode, - const QString &errorMsg) + const TQString &errorMsg) { if (aSlave != mSlave) return; - handleError( errorCode, errorMsg, 0, QString::null, true ); + handleError( errorCode, errorMsg, 0, TQString::null, true ); if ( mAskAgain ) if ( makeConnection() != ImapAccountBase::Error ) return; @@ -585,81 +585,81 @@ namespace KMail { if (aSlave != mSlave) return; mSlaveConnected = true; mNoopTimer.start( 60000 ); // make sure we start sending noops - emit connectionResult( 0, QString::null ); // success + emit connectionResult( 0, TQString::null ); // success if ( mNamespaces.isEmpty() || mNamespaceToDelimiter.isEmpty() ) { - connect( this, SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ), - this, SLOT( slotSaveNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); + connect( this, TQT_SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ), + this, TQT_SLOT( slotSaveNamespaces( const ImapAccountBase::nsDelimMap& ) ) ); getNamespaces(); } // get capabilities - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly); stream << (int) 'c'; KIO::SimpleJob *job = KIO::special( getUrl(), packedArgs, false ); KIO::Scheduler::assignJobToSlave( mSlave, job ); - connect( job, SIGNAL(infoMessage(KIO::Job*, const QString&)), - SLOT(slotCapabilitiesResult(KIO::Job*, const QString&)) ); + connect( job, TQT_SIGNAL(infoMessage(KIO::Job*, const TQString&)), + TQT_SLOT(slotCapabilitiesResult(KIO::Job*, const TQString&)) ); } //----------------------------------------------------------------------------- - void ImapAccountBase::slotCapabilitiesResult( KIO::Job*, const QString& result ) + void ImapAccountBase::slotCapabilitiesResult( KIO::Job*, const TQString& result ) { - mCapabilities = QStringList::split(' ', result.lower() ); + mCapabilities = TQStringList::split(' ', result.lower() ); kdDebug(5006) << "capabilities:" << mCapabilities << endl; } //----------------------------------------------------------------------------- void ImapAccountBase::getNamespaces() { - disconnect( this, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( getNamespaces() ) ); + disconnect( this, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( getNamespaces() ) ); if ( makeConnection() != Connected || !mSlave ) { kdDebug(5006) << "getNamespaces - wait for connection" << endl; if ( mNamespaces.isEmpty() || mNamespaceToDelimiter.isEmpty() ) { // when the connection is established slotSchedulerSlaveConnected notifies us } else { // getNamespaces was called by someone else - connect( this, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( getNamespaces() ) ); + connect( this, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( getNamespaces() ) ); } return; } - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly); stream << (int) 'n'; jobData jd; jd.total = 1; jd.done = 0; jd.cancellable = true; jd.progressItem = ProgressManager::createProgressItem( ProgressManager::getUniqueID(), i18n("Retrieving Namespaces"), - QString::null, true, useSSL() || useTLS() ); + TQString::null, true, useSSL() || useTLS() ); jd.progressItem->setTotalItems( 1 ); connect ( jd.progressItem, - SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), + TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), this, - SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); + TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); KIO::SimpleJob *job = KIO::special( getUrl(), packedArgs, false ); KIO::Scheduler::assignJobToSlave( mSlave, job ); insertJob( job, jd ); - connect( job, SIGNAL( infoMessage(KIO::Job*, const QString&) ), - SLOT( slotNamespaceResult(KIO::Job*, const QString&) ) ); + connect( job, TQT_SIGNAL( infoMessage(KIO::Job*, const TQString&) ), + TQT_SLOT( slotNamespaceResult(KIO::Job*, const TQString&) ) ); } //----------------------------------------------------------------------------- - void ImapAccountBase::slotNamespaceResult( KIO::Job* job, const QString& str ) + void ImapAccountBase::slotNamespaceResult( KIO::Job* job, const TQString& str ) { JobIterator it = findJob( job ); if ( it == jobsEnd() ) return; nsDelimMap map; namespaceDelim nsDelim; - QStringList ns = QStringList::split( ",", str ); - for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) { + TQStringList ns = TQStringList::split( ",", str ); + for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) { // split, allow empty parts as we can get empty namespaces - QStringList parts = QStringList::split( "=", *it, true ); + TQStringList parts = TQStringList::split( "=", *it, true ); imapNamespace section = imapNamespace( parts[0].toInt() ); if ( map.contains( section ) ) { nsDelim = map[section]; @@ -687,7 +687,7 @@ namespace KMail { imapNamespace section = imapNamespace( i ); namespaceDelim ns = map[ section ]; namespaceDelim::ConstIterator it; - QStringList list; + TQStringList list; for ( it = ns.begin(); it != ns.end(); ++it ) { list += it.key(); mNamespaceToDelimiter[ it.key() ] = it.data(); @@ -714,9 +714,9 @@ namespace KMail { if ( mOldPrefix.endsWith("/") ) { mOldPrefix = mOldPrefix.left( mOldPrefix.length()-1 ); } - QStringList list = mNamespaces[PersonalNS]; + TQStringList list = mNamespaces[PersonalNS]; bool done = false; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if ( (*it).startsWith( mOldPrefix ) ) { // should be ok done = true; @@ -725,7 +725,7 @@ namespace KMail { } } if ( !done ) { - QString msg = i18n("KMail has detected a prefix entry in the " + TQString msg = i18n("KMail has detected a prefix entry in the " "configuration of the account \"%1\" which is obsolete with the " "support of IMAP namespaces.").arg( name() ); if ( list.contains( "" ) ) { @@ -734,7 +734,7 @@ namespace KMail { list += mOldPrefix; mNamespaces[PersonalNS] = list; if ( mNamespaceToDelimiter.contains( "" ) ) { - QString delim = mNamespaceToDelimiter[""]; + TQString delim = mNamespaceToDelimiter[""]; mNamespaceToDelimiter.remove( "" ); mNamespaceToDelimiter[mOldPrefix] = delim; } @@ -743,12 +743,12 @@ namespace KMail { "your account configuration."); } else if ( list.count() == 1 ) { // only one entry in the personal namespace so replace it - QString old = list.first(); + TQString old = list.first(); list.clear(); list += mOldPrefix; mNamespaces[PersonalNS] = list; if ( mNamespaceToDelimiter.contains( old ) ) { - QString delim = mNamespaceToDelimiter[old]; + TQString delim = mNamespaceToDelimiter[old]; mNamespaceToDelimiter.remove( old ); mNamespaceToDelimiter[mOldPrefix] = delim; } @@ -770,9 +770,9 @@ namespace KMail { } //----------------------------------------------------------------------------- - QString ImapAccountBase::namespaceForFolder( FolderStorage* storage ) + TQString ImapAccountBase::namespaceForFolder( FolderStorage* storage ) { - QString path; + TQString path; if ( storage->folderType() == KMFolderTypeImap ) { path = static_cast( storage )->imapPath(); } else if ( storage->folderType() == KMFolderTypeCachedImap ) { @@ -782,10 +782,10 @@ namespace KMail { nsMap::Iterator it; for ( it = mNamespaces.begin(); it != mNamespaces.end(); ++it ) { - QStringList::Iterator strit; + TQStringList::Iterator strit; for ( strit = it.data().begin(); strit != it.data().end(); ++strit ) { - QString ns = *strit; + TQString ns = *strit; if ( ns.endsWith("/") || ns.endsWith(".") ) { // strip delimiter for the comparison ns = ns.left( ns.length()-1 ); @@ -796,11 +796,11 @@ namespace KMail { } } } - return QString::null; + return TQString::null; } //----------------------------------------------------------------------------- - QString ImapAccountBase::delimiterForNamespace( const QString& prefix ) + TQString ImapAccountBase::delimiterForNamespace( const TQString& prefix ) { kdDebug(5006) << "delimiterForNamespace " << prefix << endl; // try to match exactly @@ -814,7 +814,7 @@ namespace KMail { it != mNamespaceToDelimiter.end(); ++it ) { // the namespace definition sometimes contains the delimiter // make sure we also match this version - QString stripped = it.key().left( it.key().length() - 1 ); + TQString stripped = it.key().left( it.key().length() - 1 ); if ( !it.key().isEmpty() && ( prefix.contains( it.key() ) || prefix.contains( stripped ) ) ) { return it.data(); @@ -827,14 +827,14 @@ namespace KMail { } // well, we tried kdDebug(5006) << "delimiterForNamespace - not found" << endl; - return QString::null; + return TQString::null; } //----------------------------------------------------------------------------- - QString ImapAccountBase::delimiterForFolder( FolderStorage* storage ) + TQString ImapAccountBase::delimiterForFolder( FolderStorage* storage ) { - QString prefix = namespaceForFolder( storage ); - QString delim = delimiterForNamespace( prefix ); + TQString prefix = namespaceForFolder( storage ); + TQString delim = delimiterForNamespace( prefix ); return delim; } @@ -850,7 +850,7 @@ namespace KMail { } if (job->error()) { if (!quiet) - handleJobError(job, QString::null ); + handleJobError(job, TQString::null ); else { if ( job->error() == KIO::ERR_CONNECTION_BROKEN && slave() ) { // make sure ERR_CONNECTION_BROKEN is properly handled and the slave @@ -871,25 +871,25 @@ namespace KMail { KMMessage* msg = jd.msgList.first(); // Use double-quotes around the subject to keep the sentence readable, // but don't use double quotes around the sender since from() might return a double-quoted name already - const QString subject = msg->subject().isEmpty() ? i18n( "" ) : QString("\"%1\"").arg( msg->subject() ); - const QString from = msg->from().isEmpty() ? i18n( "" ) : msg->from(); - QString myError = "

    " + i18n("Error while uploading message") + const TQString subject = msg->subject().isEmpty() ? i18n( "" ) : TQString("\"%1\"").arg( msg->subject() ); + const TQString from = msg->from().isEmpty() ? i18n( "" ) : msg->from(); + TQString myError = "

    " + i18n("Error while uploading message") + "

    " - + i18n("Could not upload the message dated %1 from %2 with subject %3 to the server.").arg( msg->dateStr(), QStyleSheet::escape( from ), QStyleSheet::escape( subject ) ) + + i18n("Could not upload the message dated %1 from %2 with subject %3 to the server.").arg( msg->dateStr(), TQStyleSheet::escape( from ), TQStyleSheet::escape( subject ) ) + "

    " - + i18n("The destination folder was: %1.").arg( QStyleSheet::escape( folder->prettyURL() ) ) + + i18n("The destination folder was: %1.").arg( TQStyleSheet::escape( folder->prettyURL() ) ) + "

    " + i18n("The server reported:") + "

    "; return handleJobError( job, myError ); } - QString ImapAccountBase::prettifyQuotaError( const QString& _error, KIO::Job * job ) + TQString ImapAccountBase::prettifyQuotaError( const TQString& _error, KIO::Job * job ) { - QString error = _error; + TQString error = _error; if ( error.find( "quota", 0, false ) == -1 ) return error; // this is a quota error, prettify it a bit JobIterator it = findJob( job ); - QString quotaAsString( i18n("No detailed quota information available.") ); + TQString quotaAsString( i18n("No detailed quota information available.") ); bool readOnly = false; if (it != mapJobData.end()) { const KMFolder * const folder = (*it).parent; @@ -909,10 +909,10 @@ namespace KMail { } //----------------------------------------------------------------------------- - bool ImapAccountBase::handleError( int errorCode, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync ) + bool ImapAccountBase::handleError( int errorCode, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync ) { // Copy job's data before a possible killAllJobs - QStringList errors; + TQStringList errors; if ( job && job->error() != KIO::ERR_SLAVE_DEFINED /*workaround for kdelibs-3.2*/) errors = job->detailedErrorStrings(); @@ -943,8 +943,8 @@ namespace KMail { // check if we still display an error if ( !mErrorDialogIsActive && errorCode != KIO::ERR_USER_CANCELED ) { mErrorDialogIsActive = true; - QString msg = context + '\n' + prettifyQuotaError( KIO::buildErrorString( errorCode, errorMsg ), job ); - QString caption = i18n("Error"); + TQString msg = context + '\n' + prettifyQuotaError( KIO::buildErrorString( errorCode, errorMsg ), job ); + TQString caption = i18n("Error"); if ( jobsKilled || errorCode == KIO::ERR_COULD_NOT_LOGIN ) { if ( errorCode == KIO::ERR_SERVER_TIMEOUT || errorCode == KIO::ERR_CONNECTION_BROKEN ) { @@ -966,8 +966,8 @@ namespace KMail { } } else { // i.e. we have a chance to continue, ask the user about it if ( errors.count() >= 3 ) { // there is no detailedWarningContinueCancel... (#86517) - QString error = prettifyQuotaError( errors[1], job ); - msg = QString( "") + context + error + '\n' + errors[2]; + TQString error = prettifyQuotaError( errors[1], job ); + msg = TQString( "") + context + error + '\n' + errors[2]; caption = errors[0]; } int ret = KMessageBox::warningContinueCancel( kapp->activeWindow(), msg, caption ); @@ -989,12 +989,12 @@ namespace KMail { //----------------------------------------------------------------------------- void ImapAccountBase::cancelMailCheck() { - QMap::Iterator it = mapJobData.begin(); + TQMap::Iterator it = mapJobData.begin(); while ( it != mapJobData.end() ) { kdDebug(5006) << "cancelMailCheck: job is cancellable: " << (*it).cancellable << endl; if ( (*it).cancellable ) { it.key()->kill(); - QMap::Iterator rmit = it; + TQMap::Iterator rmit = it; ++it; mapJobData.remove( rmit ); // We killed a job -> this kills the slave @@ -1003,7 +1003,7 @@ namespace KMail { ++it; } - for( QPtrListIterator it( mJobList ); it.current(); ++it ) { + for( TQPtrListIterator it( mJobList ); it.current(); ++it ) { if ( it.current()->isCancellable() ) { FolderJob* job = it.current(); job->setPassiveDestructor( true ); @@ -1023,10 +1023,10 @@ namespace KMail { mCheckingSingleFolder = true; if ( checkingMail() ) { - disconnect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( slotCheckQueuedFolders() ) ); - connect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( slotCheckQueuedFolders() ) ); + disconnect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( slotCheckQueuedFolders() ) ); + connect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( slotCheckQueuedFolders() ) ); } else { slotCheckQueuedFolders(); } @@ -1035,10 +1035,10 @@ namespace KMail { //----------------------------------------------------------------------------- void ImapAccountBase::slotCheckQueuedFolders() { - disconnect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( slotCheckQueuedFolders() ) ); + disconnect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( slotCheckQueuedFolders() ) ); - QValueList > mSaveList = mMailCheckFolders; + TQValueList > mSaveList = mMailCheckFolders; mMailCheckFolders = mFoldersQueuedForChecking; if ( kmkernel->acctMgr() ) kmkernel->acctMgr()->singleCheckMail(this, true); @@ -1055,7 +1055,7 @@ namespace KMail { } //----------------------------------------------------------------------------- - void ImapAccountBase::handleBodyStructure( QDataStream & stream, KMMessage * msg, + void ImapAccountBase::handleBodyStructure( TQDataStream & stream, KMMessage * msg, const AttachmentStrategy *as ) { mBodyPartList.clear(); @@ -1076,9 +1076,9 @@ namespace KMail { // see what parts have to loaded according to attachmentstrategy BodyVisitor *visitor = BodyVisitorFactory::getVisitor( as ); visitor->visit( mBodyPartList ); - QPtrList parts = visitor->partsToLoad(); + TQPtrList parts = visitor->partsToLoad(); delete visitor; - QPtrListIterator it( parts ); + TQPtrListIterator it( parts ); KMMessagePart *part; int partsToLoad = 0; // check how many parts we have to load @@ -1130,7 +1130,7 @@ namespace KMail { } //----------------------------------------------------------------------------- - void ImapAccountBase::constructParts( QDataStream & stream, int count, KMMessagePart* parentKMPart, + void ImapAccountBase::constructParts( TQDataStream & stream, int count, KMMessagePart* parentKMPart, DwBodyPart * parent, const DwMessage * dwmsg ) { int children; @@ -1186,15 +1186,15 @@ namespace KMail { } //----------------------------------------------------------------------------- - void ImapAccountBase::setImapStatus( KMFolder* folder, const QString& path, const QCString& flags ) + void ImapAccountBase::setImapStatus( KMFolder* folder, const TQString& path, const TQCString& flags ) { // set the status on the server, the uids are integrated in the path kdDebug(5006) << "setImapStatus path=" << path << " to: " << flags << endl; KURL url = getUrl(); url.setPath(path); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly); stream << (int) 'S' << url << flags; @@ -1206,17 +1206,17 @@ namespace KMail { ImapAccountBase::jobData jd( url.url(), folder ); jd.path = path; insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotSetStatusResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotSetStatusResult(KIO::Job *))); } - void ImapAccountBase::setImapSeenStatus(KMFolder * folder, const QString & path, bool seen) + void ImapAccountBase::setImapSeenStatus(KMFolder * folder, const TQString & path, bool seen) { KURL url = getUrl(); url.setPath(path); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly); stream << (int) 's' << url << seen; @@ -1228,8 +1228,8 @@ namespace KMail { ImapAccountBase::jobData jd( url.url(), folder ); jd.path = path; insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotSetStatusResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotSetStatusResult(KIO::Job *))); } //----------------------------------------------------------------------------- @@ -1239,7 +1239,7 @@ namespace KMail { if ( it == jobsEnd() ) return; int errorCode = job->error(); KMFolder * const parent = (*it).parent; - const QString path = (*it).path; + const TQString path = (*it).path; if (errorCode && errorCode != KIO::ERR_CANNOT_OPEN_FOR_WRITING) { bool cont = handleJobError( job, i18n( "Error while uploading status of messages to server: " ) + '\n' ); @@ -1286,14 +1286,14 @@ namespace KMail { { mListDirProgressItem = ProgressManager::createProgressItem( "ListDir" + name(), - QStyleSheet::escape( name() ), + TQStyleSheet::escape( name() ), i18n("retrieving folders"), true, useSSL() || useTLS() ); connect ( mListDirProgressItem, - SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), + TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), this, - SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); + TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); // Start with a guessed value of the old folder count plus 5%. As long // as the list of folders doesn't constantly change, that should be good // enough. @@ -1312,9 +1312,9 @@ namespace KMail { } //------------------------------------------------------------------------------ - QString ImapAccountBase::addPathToNamespace( const QString& prefix ) + TQString ImapAccountBase::addPathToNamespace( const TQString& prefix ) { - QString myPrefix = prefix; + TQString myPrefix = prefix; if ( !myPrefix.startsWith( "/" ) ) { myPrefix = "/" + myPrefix; } @@ -1326,13 +1326,13 @@ namespace KMail { } //------------------------------------------------------------------------------ - bool ImapAccountBase::isNamespaceFolder( QString& name ) + bool ImapAccountBase::isNamespaceFolder( TQString& name ) { - QStringList ns = mNamespaces[OtherUsersNS]; + TQStringList ns = mNamespaces[OtherUsersNS]; ns += mNamespaces[SharedNS]; ns += mNamespaces[PersonalNS]; - QString nameWithDelimiter; - for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) + TQString nameWithDelimiter; + for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) { nameWithDelimiter = name + delimiterForNamespace( *it ); if ( *it == name || *it == nameWithDelimiter ) @@ -1349,9 +1349,9 @@ namespace KMail { for ( uint i = 0; i < 3; ++i ) { imapNamespace section = imapNamespace( i ); - QStringList namespaces = mNamespaces[section]; + TQStringList namespaces = mNamespaces[section]; namespaceDelim nsDelim; - QStringList::Iterator lit; + TQStringList::Iterator lit; for ( lit = namespaces.begin(); lit != namespaces.end(); ++lit ) { nsDelim[*lit] = delimiterForNamespace( *lit ); @@ -1362,17 +1362,17 @@ namespace KMail { } //------------------------------------------------------------------------------ - QString ImapAccountBase::createImapPath( const QString& parent, - const QString& folderName ) + TQString ImapAccountBase::createImapPath( const TQString& parent, + const TQString& folderName ) { kdDebug(5006) << "createImapPath parent="<folderType() == KMFolderTypeImap ) { path = static_cast( parent )->imapPath(); } else if ( parent->folderType() == KMFolderTypeCachedImap ) { @@ -1408,12 +1408,12 @@ namespace KMail { } - bool ImapAccountBase::locallySubscribedTo( const QString& imapPath ) + bool ImapAccountBase::locallySubscribedTo( const TQString& imapPath ) { return mLocalSubscriptionBlackList.find( imapPath ) == mLocalSubscriptionBlackList.end(); } - void ImapAccountBase::changeLocalSubscription( const QString& imapPath, bool subscribe ) + void ImapAccountBase::changeLocalSubscription( const TQString& imapPath, bool subscribe ) { if ( subscribe ) { // find in blacklist and remove from it @@ -1425,19 +1425,19 @@ namespace KMail { } - QStringList ImapAccountBase::locallyBlacklistedFolders() const + TQStringList ImapAccountBase::locallyBlacklistedFolders() const { - QStringList list; - std::set::const_iterator it = mLocalSubscriptionBlackList.begin(); - std::set::const_iterator end = mLocalSubscriptionBlackList.end(); + TQStringList list; + std::set::const_iterator it = mLocalSubscriptionBlackList.begin(); + std::set::const_iterator end = mLocalSubscriptionBlackList.end(); for ( ; it != end ; ++it ) list.append( *it ); return list; } - void ImapAccountBase::localBlacklistFromStringList( const QStringList &list ) + void ImapAccountBase::localBlacklistFromStringList( const TQStringList &list ) { - for( QStringList::ConstIterator it = list.constBegin( ); it != list.constEnd( ); ++it ) + for( TQStringList::ConstIterator it = list.constBegin( ); it != list.constEnd( ); ++it ) mLocalSubscriptionBlackList.insert( *it ); } diff --git a/kmail/imapaccountbase.h b/kmail/imapaccountbase.h index 57147330..46fd577c 100644 --- a/kmail/imapaccountbase.h +++ b/kmail/imapaccountbase.h @@ -28,8 +28,8 @@ #include "networkaccount.h" -#include -#include +#include +#include #include class AccountManager; @@ -52,14 +52,14 @@ namespace KPIM { namespace KMail { struct ACLListEntry; struct QuotaInfo; - typedef QValueVector ACLList; + typedef TQValueVector ACLList; class AttachmentStrategy; class ImapAccountBase : public KMail::NetworkAccount { Q_OBJECT protected: - ImapAccountBase( AccountManager * parent, const QString & name, uint id ); + ImapAccountBase( AccountManager * parent, const TQString & name, uint id ); public: virtual ~ImapAccountBase(); @@ -127,43 +127,43 @@ namespace KMail { enum imapNamespace { PersonalNS=0, OtherUsersNS=1, SharedNS=2 }; // map a namespace type to a list of namespaces - typedef QMap nsMap; + typedef TQMap nsMap; // map a namespace to a delimiter - typedef QMap namespaceDelim; + typedef TQMap namespaceDelim; // map a namespace type to a map with the namespace and the delimiter - typedef QMap nsDelimMap; + typedef TQMap nsDelimMap; /** * Info Data for the Job */ struct jobData { - // Needed by QMap, don't use - jobData() : url(QString::null), parent(0), current(0), total(1), done(0), offset(0), progressItem(0), + // Needed by TQMap, don't use + jobData() : url(TQString::null), parent(0), current(0), total(1), done(0), offset(0), progressItem(0), onlySubscribed(false), quiet(false), cancellable(false) {} // Real constructor - jobData( const QString& _url, KMFolder *_parent = 0, + jobData( const TQString& _url, KMFolder *_parent = 0, int _total = 1, int _done = 0, bool _quiet = false, bool _cancelable = false ) : url(_url), parent(_parent), current(0), total(_total), done(_done), offset(0), progressItem(0), quiet(_quiet), cancellable(_cancelable) {} - QString path; - QString url; - QString curNamespace; - QByteArray data; - QCString cdata; - QStringList items; + TQString path; + TQString url; + TQString curNamespace; + TQByteArray data; + TQCString cdata; + TQStringList items; KMFolder *parent, *current; - QPtrList msgList; + TQPtrList msgList; int total, done, offset; KPIM::ProgressItem *progressItem; bool onlySubscribed, quiet, cancellable; }; - typedef QMap::Iterator JobIterator; + typedef TQMap::Iterator JobIterator; /** * Call this when starting a new job */ @@ -188,19 +188,19 @@ namespace KMail { * identified by @p imapPath. * Emits subscriptionChanged signal on success. */ - void changeSubscription(bool subscribe, const QString& imapPath); + void changeSubscription(bool subscribe, const TQString& imapPath); /** * Returns whether the account is locally subscribed to the * folder @param imapPath. No relation to server side subscription above. */ - bool locallySubscribedTo( const QString& imapPath ); + bool locallySubscribedTo( const TQString& imapPath ); /** * Locally subscribe (@p subscribe = TRUE) / Unsubscribe the folder * identified by @p imapPath. */ - void changeLocalSubscription( const QString& imapPath, bool subscribe ); + void changeLocalSubscription( const TQString& imapPath, bool subscribe ); /** @@ -208,33 +208,33 @@ namespace KMail { * identified by @p folder and @p imapPath. * Emits receivedUserRights signal on success/error. */ - void getUserRights( KMFolder* folder, const QString& imapPath ); + void getUserRights( KMFolder* folder, const TQString& imapPath ); /** * Retrieve the complete list of ACLs on the folder * identified by @p imapPath. * Emits receivedACL signal on success/error. */ - void getACL( KMFolder* folder, const QString& imapPath ); + void getACL( KMFolder* folder, const TQString& imapPath ); /** * Retrieve the the quota inforamiton on the folder * identified by @p imapPath. * Emits receivedQuotaInfo signal on success/error. */ - void getStorageQuotaInfo( KMFolder* folder, const QString& imapPath ); + void getStorageQuotaInfo( KMFolder* folder, const TQString& imapPath ); /** * Set the status on the server * Emits imapStatusChanged signal on success/error. */ - void setImapStatus( KMFolder* folder, const QString& path, const QCString& flags ); + void setImapStatus( KMFolder* folder, const TQString& path, const TQCString& flags ); /** * Set seen status on the server. * Emits imapStatusChanged signal on success/error. */ - void setImapSeenStatus( KMFolder* folder, const QString& path, bool seen ); + void setImapSeenStatus( KMFolder* folder, const TQString& path, bool seen ); /** * The KIO-Slave died @@ -278,7 +278,7 @@ namespace KMail { /** * Handles the result from a BODYSTRUCTURE fetch */ - void handleBodyStructure( QDataStream & stream, KMMessage * msg, + void handleBodyStructure( TQDataStream & stream, KMMessage * msg, const AttachmentStrategy *as ); /** @@ -318,7 +318,7 @@ namespace KMail { * React to an error from the job. Uses job->error and job->errorString and calls * the protected virtual handleJobError with them. See handleError below for details. */ - bool handleJobError( KIO::Job* job, const QString& context, bool abortSync = false ); + bool handleJobError( KIO::Job* job, const TQString& context, bool abortSync = false ); /** * Returns the root folder of this account @@ -356,22 +356,22 @@ namespace KMail { /** * @return the namespace for the @p folder */ - QString namespaceForFolder( FolderStorage* ); + TQString namespaceForFolder( FolderStorage* ); /** * Adds "/" as needed to the given namespace */ - QString addPathToNamespace( const QString& ns ); + TQString addPathToNamespace( const TQString& ns ); /** * @return the delimiter for the @p namespace */ - QString delimiterForNamespace( const QString& prefix ); + TQString delimiterForNamespace( const TQString& prefix ); /** * @return the delimiter for the @p folderstorage */ - QString delimiterForFolder( FolderStorage* ); + TQString delimiterForFolder( FolderStorage* ); /** * @return the namespace - delimiter map @@ -388,12 +388,12 @@ namespace KMail { /** * Returns true if the given string is a namespace */ - bool isNamespaceFolder( QString& name ); + bool isNamespaceFolder( TQString& name ); /** * Returns true if the account has the given capability */ - bool hasCapability( const QString& capa ) { + bool hasCapability( const TQString& capa ) { return mCapabilities.contains( capa ); } /** @@ -401,12 +401,12 @@ namespace KMail { * Parent and folder are separated with the delimiter of the account * The path starts and ends with '/' */ - QString createImapPath( FolderStorage* parent, const QString& folderName ); + TQString createImapPath( FolderStorage* parent, const TQString& folderName ); /** * Create an IMAP path for a parent imapPath and a folderName */ - QString createImapPath( const QString& parent, const QString& folderName ); + TQString createImapPath( const TQString& parent, const TQString& folderName ); public slots: @@ -429,7 +429,7 @@ namespace KMail { /// Handle a message coming from the KIO scheduler saying that the slave is now connected void slotSchedulerSlaveConnected(KIO::Slave *aSlave); /// Handle an error coming from the KIO scheduler - void slotSchedulerSlaveError(KIO::Slave *aSlave, int, const QString &errorMsg); + void slotSchedulerSlaveError(KIO::Slave *aSlave, int, const TQString &errorMsg); /** * Only delete information about the job and ignore write errors @@ -465,7 +465,7 @@ namespace KMail { void slotSimpleResult(KIO::Job * job); /** Gets and parses the namespaces */ - void slotNamespaceResult( KIO::Job*, const QString& str ); + void slotNamespaceResult( KIO::Job*, const TQString& str ); /** * Saves the fetched namespaces @@ -475,7 +475,7 @@ namespace KMail { /** * Saves the capabilities list */ - void slotCapabilitiesResult( KIO::Job*, const QString& result ); + void slotCapabilitiesResult( KIO::Job*, const TQString& result ); protected: @@ -495,39 +495,39 @@ namespace KMail { * @param abortSync if true, abort sync in all cases (see above). If false, ask the user (when possible). * @return false when aborting, true when continuing */ - virtual bool handleError( int error, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync = false ); + virtual bool handleError( int error, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync = false ); /** Handle an error during KIO::put - helper method */ bool handlePutError( KIO::Job* job, jobData& jd, KMFolder* folder ); - virtual QString protocol() const; + virtual TQString protocol() const; virtual unsigned short int defaultPort() const; /** * Build KMMessageParts and DwBodyParts from the bodystructure-stream */ - void constructParts( QDataStream & stream, int count, KMMessagePart* parentKMPart, + void constructParts( TQDataStream & stream, int count, KMMessagePart* parentKMPart, DwBodyPart * parent, const DwMessage * dwmsg ); /** Migrate the prefix */ void migratePrefix(); // used for writing the blacklist out to the config file - QStringList locallyBlacklistedFolders() const; - void localBlacklistFromStringList( const QStringList & ); - QString prettifyQuotaError( const QString& _error, KIO::Job * job ); + TQStringList locallyBlacklistedFolders() const; + void localBlacklistFromStringList( const TQStringList & ); + TQString prettifyQuotaError( const TQString& _error, KIO::Job * job ); protected: - QPtrList > mOpenFolders; - QStringList mSubfolderNames, mSubfolderPaths, + TQPtrList > mOpenFolders; + TQStringList mSubfolderNames, mSubfolderPaths, mSubfolderMimeTypes, mSubfolderAttributes; - QMap mapJobData; + TQMap mapJobData; /** used to detect when the slave has not been used for a while */ - QTimer mIdleTimer; + TQTimer mIdleTimer; /** used to send a noop to the slave in regular intervals to keep it from disonnecting */ - QTimer mNoopTimer; + TQTimer mNoopTimer; int mTotal, mCountUnread, mCountLastUnread; - QMap mUnreadBeforeCheck; + TQMap mUnreadBeforeCheck; bool mAutoExpunge : 1; bool mHiddenFolders : 1; bool mOnlySubscribedFolders : 1; @@ -546,15 +546,15 @@ namespace KMail { bool mCheckingSingleFolder : 1; // folders that should be checked for new mails - QValueList > mMailCheckFolders; + TQValueList > mMailCheckFolders; // folders that should be checked after the current check is done - QValueList > mFoldersQueuedForChecking; + TQValueList > mFoldersQueuedForChecking; // holds messageparts from the bodystructure - QPtrList mBodyPartList; + TQPtrList mBodyPartList; // the current message for the bodystructure KMMessage* mCurrentMsg; - QGuardedPtr mListDirProgressItem; + TQGuardedPtr mListDirProgressItem; // our namespaces in the form section=namespaceList nsMap mNamespaces; @@ -563,12 +563,12 @@ namespace KMail { namespaceDelim mNamespaceToDelimiter; // old prefix for migration - QString mOldPrefix; + TQString mOldPrefix; // capabilities - QStringList mCapabilities; + TQStringList mCapabilities; - std::set mLocalSubscriptionBlackList; + std::set mLocalSubscriptionBlackList; signals: /** @@ -577,20 +577,20 @@ namespace KMail { * @param errorCode 0 for success, != 0 in case of error * @param errorMsg if errorCode is != 0, this goes with errorCode to call KIO::buildErrorString */ - void connectionResult( int errorCode, const QString& errorMsg ); + void connectionResult( int errorCode, const TQString& errorMsg ); /** * Emitted when the subscription has changed, * as a result of a changeSubscription call. */ - void subscriptionChanged(const QString& imapPath, bool subscribed); + void subscriptionChanged(const TQString& imapPath, bool subscribed); /** * Emitted upon completion of the job for setting the status for a group of UIDs, * as a result of a setImapStatus call. * On error, if the user chooses abort (not continue), cont is set to false. */ - void imapStatusChanged( KMFolder*, const QString& imapPath, bool cont ); + void imapStatusChanged( KMFolder*, const TQString& imapPath, bool cont ); /** * Emitted when the get-user-rights job is done, diff --git a/kmail/imapjob.cpp b/kmail/imapjob.cpp index 13d4baa8..50db423c 100644 --- a/kmail/imapjob.cpp +++ b/kmail/imapjob.cpp @@ -41,7 +41,7 @@ using KPIM::ProgressManager; #include "util.h" -#include +#include #include #include #include @@ -54,22 +54,22 @@ namespace KMail { //----------------------------------------------------------------------------- ImapJob::ImapJob( KMMessage *msg, JobType jt, KMFolderImap* folder, - QString partSpecifier, const AttachmentStrategy *as ) + TQString partSpecifier, const AttachmentStrategy *as ) : FolderJob( msg, jt, folder? folder->folder() : 0, partSpecifier ), mAttachmentStrategy( as ), mParentProgressItem(0) { } //----------------------------------------------------------------------------- -ImapJob::ImapJob( QPtrList& msgList, QString sets, JobType jt, +ImapJob::ImapJob( TQPtrList& msgList, TQString sets, JobType jt, KMFolderImap* folder ) : FolderJob( msgList, sets, jt, folder? folder->folder() : 0 ), mAttachmentStrategy ( 0 ), mParentProgressItem(0) { } -void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder, - QPtrList& msgList ) +void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, + TQPtrList& msgList ) { mJob = 0; @@ -111,7 +111,7 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder, if ( jt == tPutMessage ) { // transfers the complete message to the server - QPtrListIterator it( msgList ); + TQPtrListIterator it( msgList ); KMMessage* curMsg; while ( ( curMsg = it.current() ) != 0 ) { @@ -122,14 +122,14 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder, curMsg = mSrcFolder->getMsg( idx ); } KURL url = account->getUrl(); - QString flags = KMFolderImap::statusToFlags( curMsg->status(), folder->permanentFlags() ); + TQString flags = KMFolderImap::statusToFlags( curMsg->status(), folder->permanentFlags() ); url.setPath( folder->imapPath() + ";SECTION=" + flags ); ImapAccountBase::jobData jd; jd.parent = 0; jd.offset = 0; jd.done = 0; jd.total = ( curMsg->msgSizeServer() > 0 ) ? curMsg->msgSizeServer() : curMsg->msgSize(); jd.msgList.append( curMsg ); - QCString cstr( curMsg->asString() ); + TQCString cstr( curMsg->asString() ); int a = cstr.find("\nX-UID: "); int b = cstr.find('\n', a); if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); @@ -151,23 +151,23 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder, mParentProgressItem, "ImapJobUploading"+ProgressManager::getUniqueID(), i18n("Uploading message data"), - QStyleSheet::escape( curMsg->subject() ), + TQStyleSheet::escape( curMsg->subject() ), true, account->useSSL() || account->useTLS() ); jd.progressItem->setTotalItems( jd.total ); - connect ( jd.progressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), - account, SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); + connect ( jd.progressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), + account, TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); KIO::SimpleJob *job = KIO::put( url, 0, false, false, false ); KIO::Scheduler::assignJobToSlave( account->slave(), job ); account->insertJob( job, jd ); - connect( job, SIGNAL(result(KIO::Job *)), - SLOT(slotPutMessageResult(KIO::Job *)) ); - connect( job, SIGNAL(dataReq(KIO::Job *, QByteArray &)), - SLOT(slotPutMessageDataReq(KIO::Job *, QByteArray &)) ); - connect( job, SIGNAL(infoMessage(KIO::Job *, const QString &)), - SLOT(slotPutMessageInfoData(KIO::Job *, const QString &)) ); - connect( job, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), - SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); + connect( job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotPutMessageResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)), + TQT_SLOT(slotPutMessageDataReq(KIO::Job *, TQByteArray &)) ); + connect( job, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), + TQT_SLOT(slotPutMessageInfoData(KIO::Job *, const TQString &)) ); + connect( job, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), + TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); } } else if ( jt == tCopyMessage || jt == tMoveMessage ) @@ -182,8 +182,8 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder, jd.total = 1; jd.done = 0; jd.msgList = msgList; - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int) 'C' << url << destUrl; jd.progressItem = ProgressManager::createProgressItem( @@ -191,23 +191,23 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder, "ImapJobCopyMove"+ProgressManager::getUniqueID(), i18n("Server operation"), i18n("Source folder: %1 - Destination folder: %2") - .arg( QStyleSheet::escape( msg_parent->prettyURL() ), - QStyleSheet::escape( mDestFolder->prettyURL() ) ), + .arg( TQStyleSheet::escape( msg_parent->prettyURL() ), + TQStyleSheet::escape( mDestFolder->prettyURL() ) ), true, account->useSSL() || account->useTLS() ); jd.progressItem->setTotalItems( jd.total ); - connect ( jd.progressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), - account, SLOT( slotAbortRequested(KPIM::ProgressItem* ) ) ); + connect ( jd.progressItem, TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), + account, TQT_SLOT( slotAbortRequested(KPIM::ProgressItem* ) ) ); KIO::SimpleJob *simpleJob = KIO::special( url, packedArgs, false ); KIO::Scheduler::assignJobToSlave( account->slave(), simpleJob ); mJob = simpleJob; account->insertJob( mJob, jd ); - connect( mJob, SIGNAL(result(KIO::Job *)), - SLOT(slotCopyMessageResult(KIO::Job *)) ); + connect( mJob, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotCopyMessageResult(KIO::Job *)) ); if ( jt == tMoveMessage ) { - connect( mJob, SIGNAL(infoMessage(KIO::Job *, const QString &)), - SLOT(slotCopyMessageInfoData(KIO::Job *, const QString &)) ); + connect( mJob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), + TQT_SLOT(slotCopyMessageInfoData(KIO::Job *, const TQString &)) ); } } else { @@ -231,7 +231,7 @@ ImapJob::~ImapJob() (*it).progressItem = 0; } if ( !(*it).msgList.isEmpty() ) { - for ( QPtrListIterator mit( (*it).msgList ); mit.current(); ++mit ) + for ( TQPtrListIterator mit( (*it).msgList ); mit.current(); ++mit ) mit.current()->setTransferInProgress( false ); } } @@ -255,7 +255,7 @@ ImapJob::~ImapJob() (*it).progressItem = 0; } if ( !(*it).msgList.isEmpty() ) { - for ( QPtrListIterator mit( (*it).msgList ); mit.current(); ++mit ) + for ( TQPtrListIterator mit( (*it).msgList ); mit.current(); ++mit ) mit.current()->setTransferInProgress( false ); } } @@ -283,7 +283,7 @@ void ImapJob::slotGetNextMessage() } KMAcctImap *account = msgParent->account(); KURL url = account->getUrl(); - QString path = msgParent->imapPath() + ";UID=" + QString::number(msg->UID()); + TQString path = msgParent->imapPath() + ";UID=" + TQString::number(msg->UID()); ImapAccountBase::jobData jd; jd.parent = 0; jd.offset = 0; jd.total = 1; jd.done = 0; @@ -314,11 +314,11 @@ void ImapJob::slotGetNextMessage() "ImapJobDownloading"+ProgressManager::getUniqueID(), i18n("Downloading message data"), i18n("Message with subject: ") + - QStyleSheet::escape( msg->subject() ), + TQStyleSheet::escape( msg->subject() ), true, account->useSSL() || account->useTLS() ); - connect ( jd.progressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), - account, SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); + connect ( jd.progressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), + account, TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); jd.progressItem->setTotalItems( jd.total ); KIO::SimpleJob *simpleJob = KIO::get( url, false, false ); @@ -327,18 +327,18 @@ void ImapJob::slotGetNextMessage() account->insertJob( mJob, jd ); if ( mPartSpecifier.find( "STRUCTURE", 0, false ) != -1 ) { - connect( mJob, SIGNAL(result(KIO::Job *)), - this, SLOT(slotGetBodyStructureResult(KIO::Job *)) ); + connect( mJob, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotGetBodyStructureResult(KIO::Job *)) ); } else { - connect( mJob, SIGNAL(result(KIO::Job *)), - this, SLOT(slotGetMessageResult(KIO::Job *)) ); + connect( mJob, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotGetMessageResult(KIO::Job *)) ); } - connect( mJob, SIGNAL(data(KIO::Job *, const QByteArray &)), - msgParent, SLOT(slotSimpleData(KIO::Job *, const QByteArray &)) ); + connect( mJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + msgParent, TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &)) ); if ( jd.total > 1 ) { - connect(mJob, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), - this, SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); + connect(mJob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), + this, TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); } } @@ -367,7 +367,7 @@ void ImapJob::slotGetMessageResult( KIO::Job * job ) bool gotData = true; if (job->error()) { - QString errorStr = i18n( "Error while retrieving messages from the server." ); + TQString errorStr = i18n( "Error while retrieving messages from the server." ); if ( (*it).progressItem ) (*it).progressItem->setStatus( errorStr ); account->handleJobError( job, errorStr ); @@ -485,7 +485,7 @@ void ImapJob::slotGetBodyStructureResult( KIO::Job * job ) } else { if ((*it).data.size() > 0) { - QDataStream stream( (*it).data, IO_ReadOnly ); + TQDataStream stream( (*it).data, IO_ReadOnly ); account->handleBodyStructure(stream, msg, mAttachmentStrategy); } } @@ -497,7 +497,7 @@ void ImapJob::slotGetBodyStructureResult( KIO::Job * job ) } //----------------------------------------------------------------------------- -void ImapJob::slotPutMessageDataReq( KIO::Job *job, QByteArray &data ) +void ImapJob::slotPutMessageDataReq( KIO::Job *job, TQByteArray &data ) { KMAcctImap *account = static_cast(mDestFolder->storage())->account(); if ( !account ) @@ -568,7 +568,7 @@ void ImapJob::slotPutMessageResult( KIO::Job *job ) } //----------------------------------------------------------------------------- -void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const QString & data) +void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data) { KMFolderImap * imapFolder = static_cast(mDestFolder->storage()); KMAcctImap *account = imapFolder->account(); @@ -584,12 +584,12 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const QString & data) if (data.find("UID") != -1) { // split - QString oldUid = data.section(' ', 1, 1); - QString newUid = data.section(' ', 2, 2); + TQString oldUid = data.section(' ', 1, 1); + TQString newUid = data.section(' ', 2, 2); // get lists of uids - QValueList olduids = KMFolderImap::splitSets(oldUid); - QValueList newuids = KMFolderImap::splitSets(newUid); + TQValueList olduids = KMFolderImap::splitSets(oldUid); + TQValueList newuids = KMFolderImap::splitSets(newUid); int index = -1; KMMessage * msg; @@ -607,7 +607,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const QString & data) } //---------------------------------------------------------------------------- -void ImapJob::slotPutMessageInfoData(KIO::Job *job, const QString &data) +void ImapJob::slotPutMessageInfoData(KIO::Job *job, const TQString &data) { KMFolderImap * imapFolder = static_cast(mDestFolder->storage()); KMAcctImap *account = imapFolder->account(); @@ -647,7 +647,7 @@ void ImapJob::slotCopyMessageResult( KIO::Job *job ) if (job->error()) { mErrorCode = job->error(); - QString errStr = i18n("Error while copying messages."); + TQString errStr = i18n("Error while copying messages."); if ( (*it).progressItem ) (*it).progressItem->setStatus( errStr ); if ( account->handleJobError( job, errStr ) ) diff --git a/kmail/imapjob.h b/kmail/imapjob.h index d12ac0f7..94be48d1 100644 --- a/kmail/imapjob.h +++ b/kmail/imapjob.h @@ -37,7 +37,7 @@ #include "folderjob.h" -#include +#include class KMAcctImap; class KMMessage; @@ -58,8 +58,8 @@ class ImapJob : public FolderJob public: ImapJob( KMMessage *msg, JobType jt = tGetMessage, KMFolderImap *folder = 0, - QString partSpecifier = QString::null, const AttachmentStrategy *as = 0 ); - ImapJob( QPtrList& msgList, QString sets, + TQString partSpecifier = TQString::null, const AttachmentStrategy *as = 0 ); + ImapJob( TQPtrList& msgList, TQString sets, JobType jt = tGetMessage, KMFolderImap *folder = 0 ); virtual ~ImapJob(); @@ -72,20 +72,20 @@ private slots: void slotGetBodyStructureResult( KIO::Job * job ); void slotGetNextMessage(); /** Feeds the message in pieces to the server */ - void slotPutMessageDataReq( KIO::Job *job, QByteArray &data ); + void slotPutMessageDataReq( KIO::Job *job, TQByteArray &data ); void slotPutMessageResult( KIO::Job *job ); - void slotPutMessageInfoData(KIO::Job *, const QString &data); + void slotPutMessageInfoData(KIO::Job *, const TQString &data); /** result of a copy-operation */ void slotCopyMessageResult( KIO::Job *job ); - void slotCopyMessageInfoData( KIO::Job *, const QString &data ); + void slotCopyMessageInfoData( KIO::Job *, const TQString &data ); void slotProcessedSize( KIO::Job *, KIO::filesize_t processed ); private: void execute(); - void init( JobType jt, QString sets, KMFolderImap *folder, - QPtrList& msgList ); + void init( JobType jt, TQString sets, KMFolderImap *folder, + TQPtrList& msgList ); KIO::Job *mJob; - QByteArray mData; + TQByteArray mData; const AttachmentStrategy *mAttachmentStrategy; KMFolderImap *mParentFolder; KPIM::ProgressItem *mParentProgressItem; diff --git a/kmail/index.cpp b/kmail/index.cpp index 5b156a99..ef1ba7de 100644 --- a/kmail/index.cpp +++ b/kmail/index.cpp @@ -37,11 +37,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef HAVE_INDEXLIB #include #endif @@ -60,44 +60,44 @@ const char* const folderIndexDisabledKey = "fulltextIndexDisabled"; #ifdef HAVE_INDEXLIB static -QValueList vectorToQValueList( const std::vector& input ) { - QValueList res; +TQValueList vectorToQValueList( const std::vector& input ) { + TQValueList res; std::copy( input.begin(), input.end(), std::back_inserter( res ) ); return res; } static -std::vector QValueListToVector( const QValueList& input ) { +std::vector QValueListToVector( const TQValueList& input ) { std::vector res; // res.assign( input.begin(), input.end() ) doesn't work for some reason - for ( QValueList::const_iterator first = input.begin(), past = input.end(); first != past; ++first ) { + for ( TQValueList::const_iterator first = input.begin(), past = input.end(); first != past; ++first ) { res.push_back( *first ); } return res; } #endif -KMMsgIndex::KMMsgIndex( QObject* parent ): - QObject( parent, "index" ), +KMMsgIndex::KMMsgIndex( TQObject* parent ): + TQObject( parent, "index" ), mState( s_idle ), #ifdef HAVE_INDEXLIB - mLockFile( std::string( static_cast( QFile::encodeName( defaultPath() ) + "/lock" ) ) ), + mLockFile( std::string( static_cast( TQFile::encodeName( defaultPath() ) + "/lock" ) ) ), mIndex( 0 ), #endif - mIndexPath( QFile::encodeName( defaultPath() ) ), - mTimer( new QTimer( this, "mTimer" ) ), + mIndexPath( TQFile::encodeName( defaultPath() ) ), + mTimer( new TQTimer( this, "mTimer" ) ), //mSyncState( ss_none ), - //mSyncTimer( new QTimer( this ) ), + //mSyncTimer( new TQTimer( this ) ), mSlowDown( false ) { kdDebug( 5006 ) << "KMMsgIndex::KMMsgIndex()" << endl; - connect( kmkernel->folderMgr(), SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), SLOT( slotRemoveMessage( Q_UINT32 ) ) ); - connect( kmkernel->folderMgr(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), SLOT( slotAddMessage( Q_UINT32 ) ) ); - connect( kmkernel->dimapFolderMgr(), SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), SLOT( slotRemoveMessage( Q_UINT32 ) ) ); - connect( kmkernel->dimapFolderMgr(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), SLOT( slotAddMessage( Q_UINT32 ) ) ); + connect( kmkernel->folderMgr(), TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotRemoveMessage( Q_UINT32 ) ) ); + connect( kmkernel->folderMgr(), TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotAddMessage( Q_UINT32 ) ) ); + connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotRemoveMessage( Q_UINT32 ) ) ); + connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotAddMessage( Q_UINT32 ) ) ); - connect( mTimer, SIGNAL( timeout() ), SLOT( act() ) ); - //connect( mSyncTimer, SIGNAL( timeout() ), SLOT( syncIndex() ) ); + connect( mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( act() ) ); + //connect( mSyncTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( syncIndex() ) ); #ifdef HAVE_INDEXLIB KConfigGroup cfg( KMKernel::config(), "text-index" ); @@ -116,11 +116,11 @@ KMMsgIndex::KMMsgIndex( QObject* parent ): mIndex = indexlib::open( mIndexPath, indexlib::open_flags::fail_if_nonexistant ).release(); } if ( !mIndex ) { - QTimer::singleShot( 8000, this, SLOT( create() ) ); + TQTimer::singleShot( 8000, this, TQT_SLOT( create() ) ); mState = s_willcreate; } else { if ( cfg.readBoolEntry( "creating" ) ) { - QTimer::singleShot( 8000, this, SLOT( continueCreation() ) ); + TQTimer::singleShot( 8000, this, TQT_SLOT( continueCreation() ) ); mState = s_creating; } else { mPendingMsgs = QValueListToVector( cfg.readIntListEntry( "pending" ) ); @@ -140,7 +140,7 @@ KMMsgIndex::~KMMsgIndex() { #ifdef HAVE_INDEXLIB KConfigGroup cfg( KMKernel::config(), "text-index" ); cfg.writeEntry( "creating", mState == s_creating ); - QValueList pendingMsg; + TQValueList pendingMsg; if ( mState == s_processing ) { Q_ASSERT( mAddedMsgs.empty() ); pendingMsg = vectorToQValueList( mPendingMsgs ); @@ -182,7 +182,7 @@ void KMMsgIndex::setEnabled( bool e ) { // nothing can be done, probably return; case s_disabled: - QTimer::singleShot( 8000, this, SLOT( create() ) ); + TQTimer::singleShot( 8000, this, TQT_SLOT( create() ) ); mState = s_willcreate; } } else { @@ -265,7 +265,7 @@ void KMMsgIndex::clear() { void KMMsgIndex::maintenance() { #ifdef HAVE_INDEXLIB if ( mState != s_idle || kapp->hasPendingEvents() ) { - QTimer::singleShot( 8000, this, SLOT( maintenance() ) ); + TQTimer::singleShot( 8000, this, TQT_SLOT( maintenance() ) ); return; } mIndex->maintenance(); @@ -292,9 +292,9 @@ int KMMsgIndex::addMessage( Q_UINT32 serNum ) { * Setting to false which makes more sense. * We keep signature to get the person's name */ - QString body = msg->asPlainText( false, false ); + TQString body = msg->asPlainText( false, false ); if ( !body.isEmpty() && static_cast( body.latin1() ) ) { - mIndex->add( body.latin1(), QString::number( serNum ).latin1() ); + mIndex->add( body.latin1(), TQString::number( serNum ).latin1() ); } else { kdDebug( 5006 ) << "Funny, no body" << endl; } @@ -370,7 +370,7 @@ void KMMsgIndex::create() { kdDebug( 5006 ) << "KMMsgIndex::create()" << endl; #ifdef HAVE_INDEXLIB - if ( !QFileInfo( mIndexPath ).exists() ) { + if ( !TQFileInfo( mIndexPath ).exists() ) { ::mkdir( mIndexPath, S_IRWXU ); } mState = s_creating; @@ -380,7 +380,7 @@ void KMMsgIndex::create() { mState = s_error; return; } - QValueStack folders; + TQValueStack folders; folders.push(&(kmkernel->folderMgr()->dir())); folders.push(&(kmkernel->dimapFolderMgr()->dir())); while ( !folders.empty() ) { @@ -404,10 +404,10 @@ bool KMMsgIndex::startQuery( KMSearch* s ) { kdDebug( 5006 ) << "KMMsgIndex::startQuery( . ) starting query" << endl; Search* search = new Search( s ); - connect( search, SIGNAL( finished( bool ) ), s, SIGNAL( finished( bool ) ) ); - connect( search, SIGNAL( finished( bool ) ), s, SLOT( indexFinished() ) ); - connect( search, SIGNAL( destroyed( QObject* ) ), SLOT( removeSearch( QObject* ) ) ); - connect( search, SIGNAL( found( Q_UINT32 ) ), s, SIGNAL( found( Q_UINT32 ) ) ); + connect( search, TQT_SIGNAL( finished( bool ) ), s, TQT_SIGNAL( finished( bool ) ) ); + connect( search, TQT_SIGNAL( finished( bool ) ), s, TQT_SLOT( indexFinished() ) ); + connect( search, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( removeSearch( TQObject* ) ) ); + connect( search, TQT_SIGNAL( found( Q_UINT32 ) ), s, TQT_SIGNAL( found( Q_UINT32 ) ) ); mSearches.push_back( search ); return true; } @@ -432,7 +432,7 @@ bool KMMsgIndex::startQuery( KMSearch* s ) { // //} -void KMMsgIndex::removeSearch( QObject* destroyed ) { +void KMMsgIndex::removeSearch( TQObject* destroyed ) { mSearches.erase( std::find( mSearches.begin(), mSearches.end(), destroyed ) ); } @@ -449,7 +449,7 @@ bool KMMsgIndex::stopQuery( KMSearch* s ) { return false; } -std::vector KMMsgIndex::simpleSearch( QString s, bool* ok ) const { +std::vector KMMsgIndex::simpleSearch( TQString s, bool* ok ) const { kdDebug( 5006 ) << "KMMsgIndex::simpleSearch( -" << s.latin1() << "- )" << endl; if ( mState == s_error || mState == s_disabled ) { if ( ok ) *ok = false; @@ -471,7 +471,7 @@ std::vector KMMsgIndex::simpleSearch( QString s, bool* ok ) const { bool KMMsgIndex::canHandleQuery( const KMSearchPattern* pat ) const { kdDebug( 5006 ) << "KMMsgIndex::canHandleQuery( . )" << endl; if ( !pat ) return false; - QPtrListIterator it( *pat ); + TQPtrListIterator it( *pat ); KMSearchRule* rule; while ( (rule = it.current()) != 0 ) { ++it; @@ -514,15 +514,15 @@ void KMMsgIndex::removeMessage( Q_UINT32 serNum ) { if ( mState == s_error || mState == s_disabled ) return; #ifdef HAVE_INDEXLIB - mIndex->remove_doc( QString::number( serNum ).latin1() ); + mIndex->remove_doc( TQString::number( serNum ).latin1() ); ++mMaintenanceCount; if ( mMaintenanceCount > MaintenanceLimit && mRemovedMsgs.empty() ) { - QTimer::singleShot( 100, this, SLOT( maintenance() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( maintenance() ) ); } #endif } -QString KMMsgIndex::defaultPath() { +TQString KMMsgIndex::defaultPath() { return KMKernel::localDataPath() + "text-index"; } @@ -532,10 +532,10 @@ bool KMMsgIndex::creating() const { KMMsgIndex::Search::Search( KMSearch* s ): mSearch( s ), - mTimer( new QTimer( this, "mTimer" ) ), + mTimer( new TQTimer( this, "mTimer" ) ), mResidual( new KMSearchPattern ), mState( s_starting ) { - connect( mTimer, SIGNAL( timeout() ), SLOT( act() ) ); + connect( mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( act() ) ); mTimer->start( 0 ); } @@ -547,10 +547,10 @@ void KMMsgIndex::Search::act() { switch ( mState ) { case s_starting: { KMSearchPattern* pat = mSearch->searchPattern(); - QString terms; + TQString terms; for ( KMSearchRule* rule = pat->first(); rule; rule = pat->next() ) { Q_ASSERT( rule->function() == KMSearchRule::FuncContains ); - terms += QString::fromLatin1( " %1 " ).arg( rule->contents() ); + terms += TQString::fromLatin1( " %1 " ).arg( rule->contents() ); } mValues = kmkernel->msgIndex()->simpleSearch( terms, 0 ); diff --git a/kmail/index.h b/kmail/index.h index 731f407f..91c69f2d 100644 --- a/kmail/index.h +++ b/kmail/index.h @@ -31,10 +31,10 @@ */ -#include -#include -#include -#include +#include +#include +#include +#include #include #ifdef HAVE_INDEXLIB #include @@ -49,10 +49,10 @@ class KMSearch; class KMSearchRule; class KMSearchPattern; -class KMMsgIndex : public QObject { +class KMMsgIndex : public TQObject { Q_OBJECT public: - explicit KMMsgIndex( QObject* parent ); + explicit KMMsgIndex( TQObject* parent ); ~KMMsgIndex(); public: @@ -74,7 +74,7 @@ class KMMsgIndex : public QObject { /** * Just return all the uids where the pattern exists */ - std::vector simpleSearch( QString, bool* ) const; + std::vector simpleSearch( TQString, bool* ) const; /** * Returns whether the folder is indexable. Only local and dimap @@ -129,14 +129,14 @@ class KMMsgIndex : public QObject { void maintenance(); void act(); - void removeSearch( QObject* ); + void removeSearch( TQObject* ); void continueCreation(); void slotAddMessage( Q_UINT32 message ); void slotRemoveMessage( Q_UINT32 message ); private: - static QString defaultPath(); + static TQString defaultPath(); bool canHandleQuery( const KMSearchPattern* ) const; int addMessage( Q_UINT32 ); @@ -180,19 +180,19 @@ class KMMsgIndex : public QObject { */ indexlib::detail::lockfile mLockFile; //enum e_syncState { ss_none, ss_started, ss_synced } mSyncState; - //QTimer* mSyncTimer; + //TQTimer* mSyncTimer; indexlib::index* mIndex; #endif std::set mOpenedFolders; std::vector mSearches; - QCString mIndexPath; - QTimer* mTimer; + TQCString mIndexPath; + TQTimer* mTimer; bool mSlowDown; }; -class KMMsgIndex::Search : public QObject { +class KMMsgIndex::Search : public TQObject { Q_OBJECT public: explicit Search( KMSearch* s ); @@ -205,7 +205,7 @@ class KMMsgIndex::Search : public QObject { void act(); private: KMSearch* mSearch; - QTimer* mTimer; + TQTimer* mTimer; /** * mResidual is the part of the pattern which is not * handled by the index diff --git a/kmail/interfaces/bodypart.h b/kmail/interfaces/bodypart.h index 0a69dd0c..e38296a5 100644 --- a/kmail/interfaces/bodypart.h +++ b/kmail/interfaces/bodypart.h @@ -35,7 +35,7 @@ #define __KMAIL_INTERFACES_BODYPART_H__ template class QMemArray; -typedef QMemArray QByteArray; +typedef TQMemArray QByteArray; class QString; namespace KMail { @@ -79,24 +79,24 @@ namespace KMail { @return a string respresentation of an URL that can be used to invoke a BodyPartURLHandler for this body part. */ - virtual QString makeLink( const QString & path ) const = 0; + virtual TQString makeLink( const TQString & path ) const = 0; /** @return the decoded (CTE, canonicalisation, and charset encoding undone) text contained in the body part, or - QString::null, it the body part is not of type "text". + TQString::null, it the body part is not of type "text". */ - virtual QString asText() const = 0; + virtual TQString asText() const = 0; /** @return the decoded (CTE undone) content of the body part, or a null array if this body part instance is of type text. */ - virtual QByteArray asBinary() const = 0; + virtual TQByteArray asBinary() const = 0; /** @return the value of the content-type header field parameter - with name \a parameter, or QString::null, if that that + with name \a parameter, or TQString::null, if that that parameter is not present in the body's content-type header field. RFC 2231 encoding is removed first. @@ -110,26 +110,26 @@ namespace KMail { parameter), you need to make sure you do the casemap yourself before comparing to a reference value. */ - virtual QString contentTypeParameter( const char * parameter ) const = 0; + virtual TQString contentTypeParameter( const char * parameter ) const = 0; /** @return the content of the content-description header field, - or QString::null if that header is not present in this body + or TQString::null if that header is not present in this body part. RFC 2047 encoding is decoded first. */ - virtual QString contentDescription() const = 0; + virtual TQString contentDescription() const = 0; //virtual int contentDisposition() const = 0; /** @return the value of the content-disposition header field - parameter with name \a parameter, or QString::null if that + parameter with name \a parameter, or TQString::null if that parameter is not present in the body's content-disposition header field. RFC 2231 encoding is removed first. The notes made for contentTypeParameter() above apply here as well. */ - virtual QString contentDispositionParameter( const char * parameter ) const = 0; + virtual TQString contentDispositionParameter( const char * parameter ) const = 0; /** @return whether this part already has it's complete body diff --git a/kmail/interfaces/bodyparturlhandler.h b/kmail/interfaces/bodyparturlhandler.h index 1fd8b16d..5dff819e 100644 --- a/kmail/interfaces/bodyparturlhandler.h +++ b/kmail/interfaces/bodyparturlhandler.h @@ -57,7 +57,7 @@ namespace KMail { * URLHandler. * * You can create a link whose handling is passed to this handler - * by using BodyPart::makeLink( const QString & path ). \a path is + * by using BodyPart::makeLink( const TQString & path ). \a path is * what * is passed back to the methods of this interface. * * Note that the BodyPart interface does not provide a means of @@ -77,7 +77,7 @@ namespace KMail { @return true if the click was handled by this handler, false otherwise. */ - virtual bool handleClick( BodyPart * part, const QString & path, Callback& c ) const = 0; + virtual bool handleClick( BodyPart * part, const TQString & path, Callback& c ) const = 0; /** Called when RMB-clicking on a link in the reader. Should show a context menu at the specified point with the @@ -86,15 +86,15 @@ namespace KMail { @return true if the right-click was handled by this handler, false otherwise. */ - virtual bool handleContextMenuRequest( BodyPart * part, const QString & path, const QPoint & p ) const = 0; + virtual bool handleContextMenuRequest( BodyPart * part, const TQString & path, const TQPoint & p ) const = 0; /** Called when hovering over a link. @return a string to be shown in the status bar while - hovering over this link or QString::null if the link was not + hovering over this link or TQString::null if the link was not handled by this handler. */ - virtual QString statusBarMessage( BodyPart * part, const QString & path ) const = 0; + virtual TQString statusBarMessage( BodyPart * part, const TQString & path ) const = 0; }; } // namespace Interface diff --git a/kmail/interfaces/htmlwriter.h b/kmail/interfaces/htmlwriter.h index 3621038b..b95526b3 100644 --- a/kmail/interfaces/htmlwriter.h +++ b/kmail/interfaces/htmlwriter.h @@ -49,9 +49,9 @@ namespace KMail { virtual ~HtmlWriter() {} /** Signal the begin of stuff to write, and give the CSS definitions */ - virtual void begin( const QString & cssDefinitions ) = 0; + virtual void begin( const TQString & cssDefinitions ) = 0; /** Write out a chunk of text. No HTML escaping is performed. */ - virtual void write( const QString & html ) = 0; + virtual void write( const TQString & html ) = 0; /** Signal the end of stuff to write. */ virtual void end() = 0; }; @@ -104,14 +104,14 @@ namespace KMail { call #begin() again. */ virtual void reset() = 0; - virtual void queue( const QString & str ) = 0; + virtual void queue( const TQString & str ) = 0; /** (Start) flushing internal buffers, if any. */ virtual void flush() = 0; /** * Embed a part with Content-ID @p contentId, using url @p url. */ - virtual void embedPart( const QCString & contentId, const QString & url ) = 0; + virtual void embedPart( const TQCString & contentId, const TQString & url ) = 0; }; } // namespace KMail diff --git a/kmail/interfaces/rulewidgethandler.h b/kmail/interfaces/rulewidgethandler.h index e8fdd802..36b09110 100644 --- a/kmail/interfaces/rulewidgethandler.h +++ b/kmail/interfaces/rulewidgethandler.h @@ -49,29 +49,29 @@ namespace KMail { public: virtual ~RuleWidgetHandler() {} - virtual QWidget * createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const = 0; - virtual QWidget * createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const = 0; - virtual KMSearchRule::Function function( const QCString & field, - const QWidgetStack *functionStack ) const = 0; - virtual QString value( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const = 0; - virtual QString prettyValue( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const = 0; - virtual bool handlesField( const QCString & field ) const = 0; - virtual void reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const = 0; - virtual bool setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + virtual TQWidget * createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const = 0; + virtual TQWidget * createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const = 0; + virtual KMSearchRule::Function function( const TQCString & field, + const TQWidgetStack *functionStack ) const = 0; + virtual TQString value( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const = 0; + virtual TQString prettyValue( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const = 0; + virtual bool handlesField( const TQCString & field ) const = 0; + virtual void reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const = 0; + virtual bool setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const = 0; - virtual bool update( const QCString & field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const = 0; + virtual bool update( const TQCString & field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const = 0; }; diff --git a/kmail/interfaces/urlhandler.h b/kmail/interfaces/urlhandler.h index 808f3196..b19b7e19 100644 --- a/kmail/interfaces/urlhandler.h +++ b/kmail/interfaces/urlhandler.h @@ -64,13 +64,13 @@ namespace KMail { @return true if the right-click was handled by this URLHandler, false otherwise. */ - virtual bool handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const = 0; + virtual bool handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const = 0; /** Called when hovering over a link. @return a string to be shown in the status bar while hovering over this link. */ - virtual QString statusBarMessage( const KURL & url, KMReaderWin * w ) const = 0; + virtual TQString statusBarMessage( const KURL & url, KMReaderWin * w ) const = 0; }; } // namespace KMail diff --git a/kmail/isubject.cpp b/kmail/isubject.cpp index 13f8e890..7219dc0e 100644 --- a/kmail/isubject.cpp +++ b/kmail/isubject.cpp @@ -5,7 +5,7 @@ #include "isubject.h" #include "interfaces/observer.h" -#include +#include #include @@ -23,7 +23,7 @@ namespace KMail { } void ISubject::detach( Interface::Observer * pObserver ) { - QValueVector::iterator it = qFind( mObserverList.begin(), mObserverList.end(), pObserver ); + TQValueVector::iterator it = qFind( mObserverList.begin(), mObserverList.end(), pObserver ); if ( it != mObserverList.end() ) mObserverList.erase( it ); } @@ -31,7 +31,7 @@ namespace KMail { void ISubject::notify() { kdDebug(5006) << "ISubject::notify " << mObserverList.size() << endl; - for ( QValueVector::iterator it = mObserverList.begin() ; it != mObserverList.end() ; ++it ) + for ( TQValueVector::iterator it = mObserverList.begin() ; it != mObserverList.end() ; ++it ) (*it)->update( this ); } diff --git a/kmail/isubject.h b/kmail/isubject.h index eeb03bb4..93a84a29 100644 --- a/kmail/isubject.h +++ b/kmail/isubject.h @@ -33,7 +33,7 @@ #include "interfaces/observable.h" -#include +#include namespace KMail { @@ -55,7 +55,7 @@ namespace KMail { void notify(); private: - QValueVector mObserverList; + TQValueVector mObserverList; }; } // namespace KMail diff --git a/kmail/jobscheduler.cpp b/kmail/jobscheduler.cpp index cedb530b..89cabec9 100644 --- a/kmail/jobscheduler.cpp +++ b/kmail/jobscheduler.cpp @@ -34,19 +34,19 @@ using namespace KMail; -JobScheduler::JobScheduler( QObject* parent, const char* name ) - : QObject( parent, name ), mTimer( this, "mTimer" ), +JobScheduler::JobScheduler( TQObject* parent, const char* name ) + : TQObject( parent, name ), mTimer( this, "mTimer" ), mPendingImmediateTasks( 0 ), mCurrentTask( 0 ), mCurrentJob( 0 ) { - connect( &mTimer, SIGNAL( timeout() ), SLOT( slotRunNextJob() ) ); + connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotRunNextJob() ) ); // No need to start the internal timer yet, we wait for a task to be scheduled } JobScheduler::~JobScheduler() { - // delete tasks in tasklist (no autodelete for QValueList) + // delete tasks in tasklist (no autodelete for TQValueList) for( TaskList::Iterator it = mTaskList.begin(); it != mTaskList.end(); ++it ) { delete (*it); } @@ -212,7 +212,7 @@ void JobScheduler::runTaskNow( ScheduledTask* task ) } // Register the job in the folder. This makes it autodeleted if the folder is deleted. mCurrentTask->folder()->storage()->addJob( mCurrentJob ); - connect( mCurrentJob, SIGNAL( finished() ), this, SLOT( slotJobFinished() ) ); + connect( mCurrentJob, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotJobFinished() ) ); mCurrentJob->start(); } diff --git a/kmail/jobscheduler.h b/kmail/jobscheduler.h index 531e51a5..2dd04d4a 100644 --- a/kmail/jobscheduler.h +++ b/kmail/jobscheduler.h @@ -29,10 +29,10 @@ #ifndef KMAIL_JOBSCHEDULER_H #define KMAIL_JOBSCHEDULER_H -#include -#include -#include -#include +#include +#include +#include +#include #include "folderjob.h" @@ -69,7 +69,7 @@ public: /// If for some reason (e.g. folder deleted) nothing should be done, return 0. virtual ScheduledJob* run() = 0; - /// An identifier for the type of task (a bit like QListViewItem::rtti) + /// An identifier for the type of task (a bit like TQListViewItem::rtti) /// This allows to automatically prevent two identical tasks from being scheduled /// for the same folder. To circumvent this feature and make every task /// unique, return 0 here. @@ -81,7 +81,7 @@ public: bool isImmediate() const { return mImmediate; } private: - QGuardedPtr mCurrentFolder; + TQGuardedPtr mCurrentFolder; bool mImmediate; }; @@ -97,7 +97,7 @@ class JobScheduler : public QObject { Q_OBJECT public: - JobScheduler( QObject* parent, const char* name = 0 ); + JobScheduler( TQObject* parent, const char* name = 0 ); ~JobScheduler(); /// Register a task to be done for a given folder @@ -123,12 +123,12 @@ private: void restartTimer(); void interruptCurrentTask(); void runTaskNow( ScheduledTask* task ); - typedef QValueList TaskList; + typedef TQValueList TaskList; void removeTask( TaskList::Iterator& it ); private: TaskList mTaskList; // FIFO of tasks to be run - QTimer mTimer; + TQTimer mTimer; int mPendingImmediateTasks; /// Information about the currently running job, if any diff --git a/kmail/kcm_kmail.cpp b/kmail/kcm_kmail.cpp index 985acf6d..3ba43637 100644 --- a/kmail/kcm_kmail.cpp +++ b/kmail/kcm_kmail.cpp @@ -31,7 +31,7 @@ //---------------------------- extern "C" { - KDE_EXPORT KCModule *create_kmail_config_misc( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kmail_config_misc( TQWidget *parent, const char * ) { MiscPage *page = new MiscPage( parent, "kcmkmail_config_misc" ); return page; @@ -40,7 +40,7 @@ extern "C" extern "C" { - KDE_EXPORT KCModule *create_kmail_config_appearance( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kmail_config_appearance( TQWidget *parent, const char * ) { AppearancePage *page = new AppearancePage( parent, "kcmkmail_config_appearance" ); @@ -50,7 +50,7 @@ extern "C" extern "C" { - KDE_EXPORT KCModule *create_kmail_config_composer( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kmail_config_composer( TQWidget *parent, const char * ) { ComposerPage *page = new ComposerPage( parent, "kcmkmail_config_composer" ); return page; @@ -59,7 +59,7 @@ extern "C" extern "C" { - KDE_EXPORT KCModule *create_kmail_config_identity( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kmail_config_identity( TQWidget *parent, const char * ) { IdentityPage *page = new IdentityPage( parent, "kcmkmail_config_identity" ); return page; @@ -68,7 +68,7 @@ extern "C" extern "C" { - KDE_EXPORT KCModule *create_kmail_config_accounts( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kmail_config_accounts( TQWidget *parent, const char * ) { AccountsPage *page = new AccountsPage( parent, "kcmkmail_config_accounts" ); return page; @@ -77,7 +77,7 @@ extern "C" extern "C" { - KDE_EXPORT KCModule *create_kmail_config_security( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kmail_config_security( TQWidget *parent, const char * ) { SecurityPage *page = new SecurityPage( parent, "kcmkmail_config_security" ); return page; diff --git a/kmail/kcursorsaver.h b/kmail/kcursorsaver.h index 930cab6f..c18b4297 100644 --- a/kmail/kcursorsaver.h +++ b/kmail/kcursorsaver.h @@ -1,8 +1,8 @@ #ifndef kcursorsaver_h #define kcursorsaver_h -#include -#include +#include +#include /** * @short sets a cursor and makes sure it's restored on destruction @@ -13,9 +13,9 @@ class KCursorSaver : public Qt { public: - /// constructor taking QCursor shapes + /// constructor taking TQCursor shapes KCursorSaver(Qt::CursorShape shape) { - QApplication::setOverrideCursor( QCursor(shape) ); + TQApplication::setOverrideCursor( TQCursor(shape) ); inited = true; } @@ -27,12 +27,12 @@ public: /// restore the cursor ~KCursorSaver() { if (inited) - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } /// call this to explitly restore the cursor inline void restoreCursor(void) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); inited = false; } @@ -51,10 +51,10 @@ private: */ namespace KBusyPtr { inline KCursorSaver idle() { - return KCursorSaver(QCursor::ArrowCursor); + return KCursorSaver(TQCursor::ArrowCursor); } inline KCursorSaver busy() { - return KCursorSaver(QCursor::WaitCursor); + return KCursorSaver(TQCursor::WaitCursor); } } diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp index 2161031f..e35a7f5f 100644 --- a/kmail/keyresolver.cpp +++ b/kmail/keyresolver.cpp @@ -58,8 +58,8 @@ #include #include -#include -#include +#include +#include #include @@ -81,7 +81,7 @@ static inline bool EmptyKeyList( const Kleo::KeyApprovalDialog::Item & item ) { return item.keys.empty(); } -static inline QString ItemDotAddress( const Kleo::KeyResolver::Item & item ) { +static inline TQString ItemDotAddress( const Kleo::KeyResolver::Item & item ) { return item.address; } @@ -191,15 +191,15 @@ static inline bool NotValidSMIMESigningKey( const GpgME::Key & key ) { return !ValidSMIMESigningKey( key ); } -static QStringList keysAsStrings( const std::vector& keys ) { - QStringList strings; +static TQStringList keysAsStrings( const std::vector& keys ) { + TQStringList strings; for ( std::vector::const_iterator it = keys.begin() ; it != keys.end() ; ++it ) { assert( !(*it).userID(0).isNull() ); - QString keyLabel = QString::fromUtf8( (*it).userID(0).email() ); + TQString keyLabel = TQString::fromUtf8( (*it).userID(0).email() ); if ( keyLabel.isEmpty() ) - keyLabel = QString::fromUtf8( (*it).userID(0).name() ); + keyLabel = TQString::fromUtf8( (*it).userID(0).name() ); if ( keyLabel.isEmpty() ) - keyLabel = QString::fromUtf8( (*it).userID(0).id() ); + keyLabel = TQString::fromUtf8( (*it).userID(0).id() ); strings.append( keyLabel ); } return strings; @@ -231,7 +231,7 @@ static inline std::vector TrustedOrConfirmed( const std::vector alreadyWarnedFingerprints; + std::set alreadyWarnedFingerprints; std::vector mOpenPGPSigningKeys; // signing std::vector mSMIMESigningKeys; // signing @@ -485,7 +485,7 @@ struct Kleo::KeyResolver::Private { std::map mFormatInfoMap; // key=email address, value=crypto preferences for this contact (from kabc) - typedef std::map ContactPreferencesMap; + typedef std::map ContactPreferencesMap; ContactPreferencesMap mContactPreferencesMap; }; @@ -545,7 +545,7 @@ Kpgp::Result Kleo::KeyResolver::checkKeyNearExpiry( const GpgME::Key & key, cons ? signingKeyNearExpiryWarningThresholdInDays() : encryptKeyNearExpiryWarningThresholdInDays() ); if ( threshold > -1 && daysTillExpiry <= threshold ) { - const QString msg = + const TQString msg = key.protocol() == GpgME::Context::OpenPGP ? ( mine ? sign ? i18n("

    Your OpenPGP signing key

    %1 (KeyID 0x%2)

    " @@ -562,7 +562,7 @@ Kpgp::Result Kleo::KeyResolver::checkKeyNearExpiry( const GpgME::Key & key, cons "

    expires in less than a day.

    ", "

    The OpenPGP key for

    %1 (KeyID 0x%2)

    " "

    expires in less than %n days.

    ", - daysTillExpiry ) ).arg( QString::fromUtf8( key.userID(0).id() ), + daysTillExpiry ) ).arg( TQString::fromUtf8( key.userID(0).id() ), key.shortKeyID() ) : ( ca ? ( key.isRoot() @@ -650,7 +650,7 @@ Kpgp::Result Kleo::KeyResolver::checkKeyNearExpiry( const GpgME::Key & key, cons return Kpgp::Ok; } -Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const QStringList & fingerprints ) { +Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const TQStringList & fingerprints ) { if ( !encryptToSelf() ) return Kpgp::Ok; @@ -665,7 +665,7 @@ Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const QStringList & finger if ( d->mOpenPGPEncryptToSelfKeys.size() + d->mSMIMEEncryptToSelfKeys.size() < keys.size() ) { // too few keys remain... - const QString msg = i18n("One or more of your configured OpenPGP encryption " + const TQString msg = i18n("One or more of your configured OpenPGP encryption " "keys or S/MIME certificates is not usable for " "encryption. Please reconfigure your encryption keys " "and certificates for this identity in the identity " @@ -698,7 +698,7 @@ Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const QStringList & finger return Kpgp::Ok; } -Kpgp::Result Kleo::KeyResolver::setSigningKeys( const QStringList & fingerprints ) { +Kpgp::Result Kleo::KeyResolver::setSigningKeys( const TQStringList & fingerprints ) { std::vector keys = lookup( fingerprints, true ); // secret keys std::remove_copy_if( keys.begin(), keys.end(), std::back_inserter( d->mOpenPGPSigningKeys ), @@ -709,7 +709,7 @@ Kpgp::Result Kleo::KeyResolver::setSigningKeys( const QStringList & fingerprints if ( d->mOpenPGPSigningKeys.size() + d->mSMIMESigningKeys.size() < keys.size() ) { // too few keys remain... - const QString msg = i18n("One or more of your configured OpenPGP signing keys " + const TQString msg = i18n("One or more of your configured OpenPGP signing keys " "or S/MIME signing certificates is not usable for " "signing. Please reconfigure your signing keys " "and certificates for this identity in the identity " @@ -742,19 +742,19 @@ Kpgp::Result Kleo::KeyResolver::setSigningKeys( const QStringList & fingerprints return Kpgp::Ok; } -void Kleo::KeyResolver::setPrimaryRecipients( const QStringList & addresses ) { +void Kleo::KeyResolver::setPrimaryRecipients( const TQStringList & addresses ) { d->mPrimaryEncryptionKeys = getEncryptionItems( addresses ); } -void Kleo::KeyResolver::setSecondaryRecipients( const QStringList & addresses ) { +void Kleo::KeyResolver::setSecondaryRecipients( const TQStringList & addresses ) { d->mSecondaryEncryptionKeys = getEncryptionItems( addresses ); } -std::vector Kleo::KeyResolver::getEncryptionItems( const QStringList & addresses ) { +std::vector Kleo::KeyResolver::getEncryptionItems( const TQStringList & addresses ) { std::vector items; items.reserve( addresses.size() ); - for ( QStringList::const_iterator it = addresses.begin() ; it != addresses.end() ; ++it ) { - QString addr = canonicalAddress( *it ).lower(); + for ( TQStringList::const_iterator it = addresses.begin() ; it != addresses.end() ; ++it ) { + TQString addr = canonicalAddress( *it ).lower(); const ContactPreferences pref = lookupContactPreferences( addr ); items.push_back( Item( *it, /*getEncryptionKeys( *it, true ),*/ @@ -883,7 +883,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) { it->keys = getEncryptionKeys( it->address, false ); if ( it->keys.empty() ) return Kpgp::Canceled; - QString addr = canonicalAddress( it->address ).lower(); + TQString addr = canonicalAddress( it->address ).lower(); const ContactPreferences pref = lookupContactPreferences( addr ); it->pref = pref.encryptionPreference; it->signPref = pref.signingPreference; @@ -896,7 +896,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) { it->keys = getEncryptionKeys( it->address, false ); if ( it->keys.empty() ) return Kpgp::Canceled; - QString addr = canonicalAddress( it->address ).lower(); + TQString addr = canonicalAddress( it->address ).lower(); const ContactPreferences pref = lookupContactPreferences( addr ); it->pref = pref.encryptionPreference; it->signPref = pref.signingPreference; @@ -977,7 +977,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) { !encryptionItems( OpenPGPMIMEFormat ).empty() ) { // need them if ( d->mOpenPGPEncryptToSelfKeys.empty() ) { - const QString msg = i18n("Examination of recipient's encryption preferences " + const TQString msg = i18n("Examination of recipient's encryption preferences " "yielded that the message should be encrypted using " "OpenPGP, at least for some recipients;\n" "however, you have not configured valid trusted " @@ -1004,7 +1004,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) { // need them if ( d->mSMIMEEncryptToSelfKeys.empty() ) { // don't have one - const QString msg = i18n("Examination of recipient's encryption preferences " + const TQString msg = i18n("Examination of recipient's encryption preferences " "yielded that the message should be encrypted using " "S/MIME, at least for some recipients;\n" "however, you have not configured valid " @@ -1034,7 +1034,7 @@ Kpgp::Result Kleo::KeyResolver::resolveSigningKeysForEncryption() { if ( ( !encryptionItems( InlineOpenPGPFormat ).empty() || !encryptionItems( OpenPGPMIMEFormat ).empty() ) && d->mOpenPGPSigningKeys.empty() ) { - const QString msg = i18n("Examination of recipient's signing preferences " + const TQString msg = i18n("Examination of recipient's signing preferences " "yielded that the message should be signed using " "OpenPGP, at least for some recipients;\n" "however, you have not configured valid " @@ -1050,7 +1050,7 @@ Kpgp::Result Kleo::KeyResolver::resolveSigningKeysForEncryption() { if ( ( !encryptionItems( SMIMEFormat ).empty() || !encryptionItems( SMIMEOpaqueFormat ).empty() ) && d->mSMIMESigningKeys.empty() ) { - const QString msg = i18n("Examination of recipient's signing preferences " + const TQString msg = i18n("Examination of recipient's signing preferences " "yielded that the message should be signed using " "S/MIME, at least for some recipients;\n" "however, you have not configured valid " @@ -1113,7 +1113,7 @@ Kpgp::Result Kleo::KeyResolver::resolveSigningKeysForSigningOnly() { return Kpgp::Ok; } - const QString msg = i18n("Examination of recipient's signing preferences " + const TQString msg = i18n("Examination of recipient's signing preferences " "showed no common type of signature matching your " "available signing keys.\n" "Send message without signing?" ); @@ -1142,8 +1142,8 @@ std::vector Kleo::KeyResolver::encryptToSelfKeysFor( CryptoMessageFo return std::vector(); } -QStringList Kleo::KeyResolver::allRecipients() const { - QStringList result; +TQStringList Kleo::KeyResolver::allRecipients() const { + TQStringList result; std::transform( d->mPrimaryEncryptionKeys.begin(), d->mPrimaryEncryptionKeys.end(), std::back_inserter( result ), ItemDotAddress ); std::transform( d->mSecondaryEncryptionKeys.begin(), d->mSecondaryEncryptionKeys.end(), @@ -1243,7 +1243,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() { Kleo::KeyApprovalDialog dlg( items, senderKeys ); - if ( dlg.exec() == QDialog::Rejected ) + if ( dlg.exec() == TQDialog::Rejected ) return Kpgp::Canceled; items = dlg.items(); @@ -1272,7 +1272,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() { // show a warning if the user didn't select an encryption key for // herself: if ( encryptToSelf() && senderKeys.empty() ) { - const QString msg = i18n("You did not select an encryption key for yourself " + const TQString msg = i18n("You did not select an encryption key for yourself " "(encrypt to self). You will not be able to decrypt " "your own message if you encrypt it."); if ( KMessageBox::warningContinueCancel( 0, msg, @@ -1291,7 +1291,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() { // show a warning if the user didn't select an encryption key for // some of the recipients if ( items.size() == emptyListCount ) { - const QString msg = ( d->mPrimaryEncryptionKeys.size() + + const TQString msg = ( d->mPrimaryEncryptionKeys.size() + d->mSecondaryEncryptionKeys.size() == 1 ) ? i18n("You did not select an encryption key for the " "recipient of this message; therefore, the message " @@ -1305,7 +1305,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() { == KMessageBox::Cancel ) return Kpgp::Canceled; } else if ( emptyListCount > 0 ) { - const QString msg = ( emptyListCount == 1 ) + const TQString msg = ( emptyListCount == 1 ) ? i18n("You did not select an encryption key for one of " "the recipients: this person will not be able to " "decrypt the message if you encrypt it.") @@ -1363,13 +1363,13 @@ std::vector Kleo::KeyResolver::signingKeys( CryptoMessageFormat f ) // -std::vector Kleo::KeyResolver::selectKeys( const QString & person, const QString & msg, const std::vector & selectedKeys ) const { +std::vector Kleo::KeyResolver::selectKeys( const TQString & person, const TQString & msg, const std::vector & selectedKeys ) const { Kleo::KeySelectionDialog dlg( i18n("Encryption Key Selection"), msg, selectedKeys, Kleo::KeySelectionDialog::ValidEncryptionKeys, true, true ); // multi-selection and "remember choice" box - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return std::vector(); std::vector keys = dlg.selectedKeys(); keys.erase( std::remove_if( keys.begin(), keys.end(), @@ -1381,12 +1381,12 @@ std::vector Kleo::KeyResolver::selectKeys( const QString & person, c } -std::vector Kleo::KeyResolver::getEncryptionKeys( const QString & person, bool quiet ) const { +std::vector Kleo::KeyResolver::getEncryptionKeys( const TQString & person, bool quiet ) const { - const QString address = canonicalAddress( person ).lower(); + const TQString address = canonicalAddress( person ).lower(); // First look for this person's address in the address->key dictionary - const QStringList fingerprints = keysForAddress( address ); + const TQStringList fingerprints = keysForAddress( address ); if ( !fingerprints.empty() ) { kdDebug() << "Using encryption keys 0x" @@ -1463,7 +1463,7 @@ std::vector Kleo::KeyResolver::getEncryptionKeys( const QString & pe } -std::vector Kleo::KeyResolver::lookup( const QStringList & patterns, bool secret ) const { +std::vector Kleo::KeyResolver::lookup( const TQStringList & patterns, bool secret ) const { if ( patterns.empty() ) return std::vector(); kdDebug() << "Kleo::KeyResolver::lookup( \"" << patterns.join( "\", \"" ) @@ -1529,7 +1529,7 @@ void Kleo::KeyResolver::addKeys( const std::vector & items ) { dump(); } -Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreferences( const QString& address ) const +Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreferences( const TQString& address ) const { const Private::ContactPreferencesMap::iterator it = d->mContactPreferencesMap.find( address ); @@ -1541,21 +1541,21 @@ Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreference ContactPreferences pref; if ( !res.isEmpty() ) { KABC::Addressee addr = res.first(); - QString encryptPref = addr.custom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" ); + TQString encryptPref = addr.custom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" ); pref.encryptionPreference = Kleo::stringToEncryptionPreference( encryptPref ); - QString signPref = addr.custom( "KADDRESSBOOK", "CRYPTOSIGNPREF" ); + TQString signPref = addr.custom( "KADDRESSBOOK", "CRYPTOSIGNPREF" ); pref.signingPreference = Kleo::stringToSigningPreference( signPref ); - QString cryptoFormats = addr.custom( "KADDRESSBOOK", "CRYPTOPROTOPREF" ); + TQString cryptoFormats = addr.custom( "KADDRESSBOOK", "CRYPTOPROTOPREF" ); pref.cryptoMessageFormat = Kleo::stringToCryptoMessageFormat( cryptoFormats ); - pref.pgpKeyFingerprints = QStringList::split( ',', addr.custom( "KADDRESSBOOK", "OPENPGPFP" ) ); - pref.smimeCertFingerprints = QStringList::split( ',', addr.custom( "KADDRESSBOOK", "SMIMEFP" ) ); + pref.pgpKeyFingerprints = TQStringList::split( ',', addr.custom( "KADDRESSBOOK", "OPENPGPFP" ) ); + pref.smimeCertFingerprints = TQStringList::split( ',', addr.custom( "KADDRESSBOOK", "SMIMEFP" ) ); } // insert into map and grab resulting iterator d->mContactPreferencesMap.insert( std::make_pair( address, pref ) ); return pref; } -void Kleo::KeyResolver::saveContactPreference( const QString& email, const ContactPreferences& pref ) const +void Kleo::KeyResolver::saveContactPreference( const TQString& email, const ContactPreferences& pref ) const { d->mContactPreferencesMap.insert( std::make_pair( email, pref ) ); KABC::AddressBook *ab = KABC::StdAddressBook::self( true ); @@ -1564,7 +1564,7 @@ void Kleo::KeyResolver::saveContactPreference( const QString& email, const Conta KABC::Addressee addr; if ( res.isEmpty() ) { bool ok = true; - QString fullName = KInputDialog::getText( i18n( "Name Selection" ), i18n( "Which name shall the contact '%1' have in your addressbook?" ).arg( email ), QString::null, &ok ); + TQString fullName = KInputDialog::getText( i18n( "Name Selection" ), i18n( "Which name shall the contact '%1' have in your addressbook?" ).arg( email ), TQString::null, &ok ); if ( ok ) { addr.setNameFromString( fullName ); addr.insertEmail( email, true ); @@ -1594,20 +1594,20 @@ Kleo::KeyResolver::ContactPreferences::ContactPreferences() { } -QStringList Kleo::KeyResolver::keysForAddress( const QString & address ) const { +TQStringList Kleo::KeyResolver::keysForAddress( const TQString & address ) const { if( address.isEmpty() ) { - return QStringList(); + return TQStringList(); } - QString addr = canonicalAddress( address ).lower(); + TQString addr = canonicalAddress( address ).lower(); const ContactPreferences pref = lookupContactPreferences( addr ); return pref.pgpKeyFingerprints + pref.smimeCertFingerprints; } -void Kleo::KeyResolver::setKeysForAddress( const QString& address, const QStringList& pgpKeyFingerprints, const QStringList& smimeCertFingerprints ) const { +void Kleo::KeyResolver::setKeysForAddress( const TQString& address, const TQStringList& pgpKeyFingerprints, const TQStringList& smimeCertFingerprints ) const { if( address.isEmpty() ) { return; } - QString addr = canonicalAddress( address ).lower(); + TQString addr = canonicalAddress( address ).lower(); ContactPreferences pref = lookupContactPreferences( addr ); pref.pgpKeyFingerprints = pgpKeyFingerprints; pref.smimeCertFingerprints = smimeCertFingerprints; diff --git a/kmail/keyresolver.h b/kmail/keyresolver.h index 8cb7ebbb..1232d560 100644 --- a/kmail/keyresolver.h +++ b/kmail/keyresolver.h @@ -143,12 +143,12 @@ namespace Kleo { signPref( UnknownSigningPreference ), format( AutoFormat ), needKeys( true ) {} - Item( const QString & a, + Item( const TQString & a, EncryptionPreference e, SigningPreference s, CryptoMessageFormat f ) : KeyApprovalDialog::Item( a, std::vector(), e ), signPref( s ), format( f ), needKeys( true ) {} - Item( const QString & a, const std::vector & k, + Item( const TQString & a, const std::vector & k, EncryptionPreference e, SigningPreference s, CryptoMessageFormat f ) : KeyApprovalDialog::Item( a, k, e ), @@ -165,22 +165,22 @@ namespace Kleo { self. Also looks them up and complains if they're not usable or found. */ - Kpgp::Result setEncryptToSelfKeys( const QStringList & fingerprints ); + Kpgp::Result setEncryptToSelfKeys( const TQStringList & fingerprints ); /** Set the fingerprints of keys to be used for signing. Also looks them up and complains if they're not usable or found. */ - Kpgp::Result setSigningKeys( const QStringList & fingerprints ); + Kpgp::Result setSigningKeys( const TQStringList & fingerprints ); /** Set the list of primary (To/CC) recipient addresses. Also looks up possible keys, but doesn't interact with the user. */ - void setPrimaryRecipients( const QStringList & addresses ); + void setPrimaryRecipients( const TQStringList & addresses ); /** Set the list of secondary (BCC) recipient addresses. Also looks up possible keys, but doesn't interact with the user. */ - void setSecondaryRecipients( const QStringList & addresses ); + void setSecondaryRecipients( const TQStringList & addresses ); /** @@ -210,10 +210,10 @@ namespace Kleo { struct SplitInfo { SplitInfo() {} - SplitInfo( const QStringList & r ) : recipients( r ) {} - SplitInfo( const QStringList & r, const std::vector & k ) + SplitInfo( const TQStringList & r ) : recipients( r ) {} + SplitInfo( const TQStringList & r, const std::vector & k ) : recipients( r ), keys( k ) {} - QStringList recipients; + TQStringList recipients; std::vector keys; }; /** @return the found distinct sets of items for format \a f. The @@ -224,8 +224,8 @@ namespace Kleo { private: void dump() const; - std::vector getEncryptionItems( const QStringList & recipients ); - std::vector getEncryptionKeys( const QString & recipient, bool quiet ) const; + std::vector getEncryptionItems( const TQStringList & recipients ); + std::vector getEncryptionKeys( const TQString & recipient, bool quiet ) const; Kpgp::Result showKeyApprovalDialog(); @@ -242,19 +242,19 @@ namespace Kleo { void addToAllSplitInfos( const std::vector & keys, unsigned int formats ); void addKeys( const std::vector & items, CryptoMessageFormat f ); void addKeys( const std::vector & items ); - QStringList allRecipients() const; + TQStringList allRecipients() const; std::vector signingKeysFor( CryptoMessageFormat f ) const; std::vector encryptToSelfKeysFor( CryptoMessageFormat f ) const; - std::vector lookup( const QStringList & patterns, bool secret=false ) const; + std::vector lookup( const TQStringList & patterns, bool secret=false ) const; - bool haveTrustedEncryptionKey( const QString & person ) const; + bool haveTrustedEncryptionKey( const TQString & person ) const; - std::vector selectKeys( const QString & person, const QString & msg, + std::vector selectKeys( const TQString & person, const TQString & msg, const std::vector & selectedKeys=std::vector() ) const; - QStringList keysForAddress( const QString & address ) const; - void setKeysForAddress( const QString & address, const QStringList& pgpKeyFingerprints, const QStringList& smimeCertFingerprints ) const; + TQStringList keysForAddress( const TQString & address ) const; + void setKeysForAddress( const TQString & address, const TQStringList& pgpKeyFingerprints, const TQStringList& smimeCertFingerprints ) const; bool encryptToSelf() const { return mEncryptToSelf; } bool showApprovalDialog() const { return mShowApprovalDialog; } @@ -285,12 +285,12 @@ namespace Kleo { Kleo::EncryptionPreference encryptionPreference; Kleo::SigningPreference signingPreference; Kleo::CryptoMessageFormat cryptoMessageFormat; - QStringList pgpKeyFingerprints; - QStringList smimeCertFingerprints; + TQStringList pgpKeyFingerprints; + TQStringList smimeCertFingerprints; }; - ContactPreferences lookupContactPreferences( const QString& address ) const; - void saveContactPreference( const QString& email, const ContactPreferences& pref ) const; + ContactPreferences lookupContactPreferences( const TQString& address ) const; + void saveContactPreference( const TQString& email, const ContactPreferences& pref ) const; private: class EncryptionPreferenceCounter; diff --git a/kmail/khtmlparthtmlwriter.cpp b/kmail/khtmlparthtmlwriter.cpp index 643d743c..dfc9fd35 100644 --- a/kmail/khtmlparthtmlwriter.cpp +++ b/kmail/khtmlparthtmlwriter.cpp @@ -47,19 +47,19 @@ namespace KMail { KHtmlPartHtmlWriter::KHtmlPartHtmlWriter( KHTMLPart * part, - QObject * parent, const char * name ) - : QObject( parent, name ), HtmlWriter(), + TQObject * parent, const char * name ) + : TQObject( parent, name ), HtmlWriter(), mHtmlPart( part ), mState( Ended ), mHtmlTimer( 0, "mHtmlTimer" ) { assert( part ); - connect( &mHtmlTimer, SIGNAL(timeout()), SLOT(slotWriteNextHtmlChunk()) ); + connect( &mHtmlTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWriteNextHtmlChunk()) ); } KHtmlPartHtmlWriter::~KHtmlPartHtmlWriter() { } - void KHtmlPartHtmlWriter::begin( const QString & css ) { + void KHtmlPartHtmlWriter::begin( const TQString & css ) { if ( mState != Ended ) { kdWarning( 5006 ) << "KHtmlPartHtmlWriter: begin() called on non-ended session!" << endl; reset(); @@ -70,7 +70,7 @@ namespace KMail { // clear the widget: mHtmlPart->view()->setUpdatesEnabled( false ); mHtmlPart->view()->viewport()->setUpdatesEnabled( false ); - static_cast(mHtmlPart->widget())->ensureVisible( 0, 0 ); + static_cast(mHtmlPart->widget())->ensureVisible( 0, 0 ); mHtmlPart->begin( KURL( "file:/" ) ); if ( !css.isEmpty() ) @@ -100,12 +100,12 @@ namespace KMail { mState = Ended; } - void KHtmlPartHtmlWriter::write( const QString & str ) { + void KHtmlPartHtmlWriter::write( const TQString & str ) { kdWarning( mState != Begun, 5006 ) << "KHtmlPartHtmlWriter: write() called in Ended or Queued state!" << endl; mHtmlPart->write( str ); } - void KHtmlPartHtmlWriter::queue( const QString & str ) { + void KHtmlPartHtmlWriter::queue( const TQString & str ) { static const uint chunksize = 16384; for ( uint pos = 0 ; pos < str.length() ; pos += chunksize ) mHtmlQueue.push_back( str.mid( pos, chunksize ) ); @@ -127,9 +127,9 @@ namespace KMail { } } - void KHtmlPartHtmlWriter::embedPart( const QCString & contentId, - const QString & contentURL ) { - mEmbeddedPartMap[QString(contentId)] = contentURL; + void KHtmlPartHtmlWriter::embedPart( const TQCString & contentId, + const TQString & contentURL ) { + mEmbeddedPartMap[TQString(contentId)] = contentURL; } void KHtmlPartHtmlWriter::resolveCidUrls() diff --git a/kmail/khtmlparthtmlwriter.h b/kmail/khtmlparthtmlwriter.h index 92eb15a9..82679d1e 100644 --- a/kmail/khtmlparthtmlwriter.h +++ b/kmail/khtmlparthtmlwriter.h @@ -33,32 +33,32 @@ #define __KMAIL_KHTMLPARTHTMLWRITER_H__ #include "interfaces/htmlwriter.h" -#include +#include -#include -#include +#include +#include class QString; class KHTMLPart; namespace KMail { - class KHtmlPartHtmlWriter : public QObject, public HtmlWriter { + class KHtmlPartHtmlWriter : public TQObject, public HtmlWriter { Q_OBJECT public: // Key is Content-Id, value is URL - typedef QMap EmbeddedPartMap; + typedef TQMap EmbeddedPartMap; KHtmlPartHtmlWriter( KHTMLPart * part, - QObject * parent=0, const char * name = 0 ); + TQObject * parent=0, const char * name = 0 ); virtual ~KHtmlPartHtmlWriter(); - void begin( const QString & cssDefs ); + void begin( const TQString & cssDefs ); void end(); void reset(); - void write( const QString & str ); - void queue( const QString & str ); + void write( const TQString & str ); + void queue( const TQString & str ); void flush(); - void embedPart( const QCString & contentId, const QString & url ); + void embedPart( const TQCString & contentId, const TQString & url ); private slots: void slotWriteNextHtmlChunk(); @@ -68,8 +68,8 @@ namespace KMail { private: KHTMLPart * mHtmlPart; - QStringList mHtmlQueue; - QTimer mHtmlTimer; + TQStringList mHtmlQueue; + TQTimer mHtmlTimer; enum State { Begun, Queued, diff --git a/kmail/klistboxdialog.cpp b/kmail/klistboxdialog.cpp index 030ca3b0..4249d3bf 100644 --- a/kmail/klistboxdialog.cpp +++ b/kmail/klistboxdialog.cpp @@ -5,13 +5,13 @@ #include "klistboxdialog.h" -#include -#include +#include +#include -KListBoxDialog::KListBoxDialog( QString& _selectedString, - const QString& caption, - const QString& labelText, - QWidget* parent, +KListBoxDialog::KListBoxDialog( TQString& _selectedString, + const TQString& caption, + const TQString& labelText, + TQWidget* parent, const char* name, bool modal ) : KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok, true ), @@ -22,27 +22,27 @@ KListBoxDialog::KListBoxDialog( QString& _selectedString, setName( "KListBoxDialog" ); resize( 400, 180 ); - QFrame *page = makeMainWidget(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); - labelAboveLA = new QLabel( page, "labelAboveLA" ); + TQFrame *page = makeMainWidget(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); + labelAboveLA = new TQLabel( page, "labelAboveLA" ); labelAboveLA->setText( labelText ); topLayout->addWidget( labelAboveLA ); - entriesLB = new QListBox( page, "entriesLB" ); + entriesLB = new TQListBox( page, "entriesLB" ); topLayout->addWidget( entriesLB ); - commentBelowLA = new QLabel( page, "commentBelowLA" ); + commentBelowLA = new TQLabel( page, "commentBelowLA" ); commentBelowLA->setText( "" ); topLayout->addWidget( commentBelowLA ); commentBelowLA->hide(); // signals and slots connections - connect( entriesLB, SIGNAL( highlighted( const QString& ) ), - this, SLOT( highlighted( const QString& ) ) ); - connect( entriesLB, SIGNAL( selected(int) ), - SLOT( slotOk() ) ); + connect( entriesLB, TQT_SIGNAL( highlighted( const TQString& ) ), + this, TQT_SLOT( highlighted( const TQString& ) ) ); + connect( entriesLB, TQT_SIGNAL( selected(int) ), + TQT_SLOT( slotOk() ) ); // buddies labelAboveLA->setBuddy( entriesLB ); } @@ -55,7 +55,7 @@ KListBoxDialog::~KListBoxDialog() // no need to delete child widgets, Qt does it all for us } -void KListBoxDialog::setLabelAbove(const QString& label) +void KListBoxDialog::setLabelAbove(const TQString& label) { labelAboveLA->setText( label ); if( label.isEmpty() ) @@ -64,7 +64,7 @@ void KListBoxDialog::setLabelAbove(const QString& label) labelAboveLA->show(); } -void KListBoxDialog::setCommentBelow(const QString& comment) +void KListBoxDialog::setCommentBelow(const TQString& comment) { commentBelowLA->setText( comment ); if( comment.isEmpty() ) @@ -75,7 +75,7 @@ void KListBoxDialog::setCommentBelow(const QString& comment) -void KListBoxDialog::highlighted( const QString& txt ) +void KListBoxDialog::highlighted( const TQString& txt ) { selectedString = txt; } diff --git a/kmail/klistboxdialog.h b/kmail/klistboxdialog.h index 10656233..d0f98ebb 100644 --- a/kmail/klistboxdialog.h +++ b/kmail/klistboxdialog.h @@ -11,26 +11,26 @@ class KListBoxDialog : public KDialogBase Q_OBJECT public: - KListBoxDialog( QString& _selectedString, - const QString& caption, - const QString& labelText, - QWidget* parent = 0, + KListBoxDialog( TQString& _selectedString, + const TQString& caption, + const TQString& labelText, + TQWidget* parent = 0, const char* name = 0, bool modal = true ); ~KListBoxDialog(); - void setLabelAbove( const QString& label ); - void setCommentBelow(const QString& comment); + void setLabelAbove( const TQString& label ); + void setCommentBelow(const TQString& comment); - QListBox* entriesLB; + TQListBox* entriesLB; private slots: - void highlighted( const QString& ); + void highlighted( const TQString& ); protected: - QString& selectedString; - QLabel* labelAboveLA; - QLabel* commentBelowLA; + TQString& selectedString; + TQLabel* labelAboveLA; + TQLabel* commentBelowLA; }; #endif diff --git a/kmail/klistviewindexedsearchline.cpp b/kmail/klistviewindexedsearchline.cpp index 781d2332..78a20dc5 100644 --- a/kmail/klistviewindexedsearchline.cpp +++ b/kmail/klistviewindexedsearchline.cpp @@ -38,7 +38,7 @@ using KMail::HeaderListQuickSearch; -KListViewIndexedSearchLine::KListViewIndexedSearchLine( QWidget* parent, KListView* listView, KActionCollection* actionCollection, const char* name ): +KListViewIndexedSearchLine::KListViewIndexedSearchLine( TQWidget* parent, KListView* listView, KActionCollection* actionCollection, const char* name ): HeaderListQuickSearch( parent, listView, actionCollection, name ), mFiltering( false ) { @@ -48,7 +48,7 @@ KListViewIndexedSearchLine::~KListViewIndexedSearchLine() { } -void KListViewIndexedSearchLine::updateSearch( const QString& s ) { +void KListViewIndexedSearchLine::updateSearch( const TQString& s ) { kdDebug( 5006 ) << "updateSearch( -" << s << "- )" << endl; mFiltering = false; if ( !s.isNull() && !s.isEmpty() ) { @@ -63,7 +63,7 @@ void KListViewIndexedSearchLine::updateSearch( const QString& s ) { KListViewSearchLine::updateSearch( s ); } -bool KListViewIndexedSearchLine::itemMatches( const QListViewItem* item, const QString& s ) const { +bool KListViewIndexedSearchLine::itemMatches( const TQListViewItem* item, const TQString& s ) const { if ( mFiltering && std::binary_search( mResults.begin(), mResults.end(), static_cast( item )->msgSerNum() ) ) return true; diff --git a/kmail/klistviewindexedsearchline.h b/kmail/klistviewindexedsearchline.h index f067c1ca..17b991d4 100644 --- a/kmail/klistviewindexedsearchline.h +++ b/kmail/klistviewindexedsearchline.h @@ -33,7 +33,7 @@ #include #include #include "headerlistquicksearch.h" -#include +#include #include @@ -52,7 +52,7 @@ class KDEUI_EXPORT KListViewIndexedSearchLine: public KMail::HeaderListQuickSear public: - explicit KListViewIndexedSearchLine(QWidget *parent, KListView *listView, KActionCollection* action, const char *name = 0); + explicit KListViewIndexedSearchLine(TQWidget *parent, KListView *listView, KActionCollection* action, const char *name = 0); ~KListViewIndexedSearchLine(); public slots: @@ -60,10 +60,10 @@ public slots: * Updates search to only make visible the items that match \a s. If * \a s is null then the line edit's text will be used. */ - virtual void updateSearch(const QString &s = QString::null); + virtual void updateSearch(const TQString &s = TQString::null); protected: - virtual bool itemMatches(const QListViewItem *item, const QString &s) const; + virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const; private: std::vector mResults; diff --git a/kmail/kmaccount.cpp b/kmail/kmaccount.cpp index 65222dd4..ad0f55b3 100644 --- a/kmail/kmaccount.cpp +++ b/kmail/kmaccount.cpp @@ -30,7 +30,7 @@ using KMail::FolderJob; #include #include -#include +#include #include #include @@ -42,8 +42,8 @@ using KMail::FolderJob; #include "kmaccount.moc" //----------------------------------------------------------------------------- -KMPrecommand::KMPrecommand(const QString &precommand, QObject *parent) - : QObject(parent), mPrecommand(precommand) +KMPrecommand::KMPrecommand(const TQString &precommand, TQObject *parent) + : TQObject(parent), mPrecommand(precommand) { BroadcastStatus::instance()->setStatusMsg( i18n("Executing precommand %1").arg(precommand )); @@ -51,8 +51,8 @@ KMPrecommand::KMPrecommand(const QString &precommand, QObject *parent) mPrecommandProcess.setUseShell(true); mPrecommandProcess << precommand; - connect(&mPrecommandProcess, SIGNAL(processExited(KProcess *)), - SLOT(precommandExited(KProcess *))); + connect(&mPrecommandProcess, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(precommandExited(KProcess *))); } //----------------------------------------------------------------------------- @@ -83,7 +83,7 @@ void KMPrecommand::precommandExited(KProcess *p) //----------------------------------------------------------------------------- -KMAccount::KMAccount(AccountManager* aOwner, const QString& aName, uint id) +KMAccount::KMAccount(AccountManager* aOwner, const TQString& aName, uint id) : KAccount( id, aName ), mTrash(KMKernel::self()->trashFolder()->idString()), mOwner(aOwner), @@ -116,7 +116,7 @@ KMAccount::~KMAccount() //----------------------------------------------------------------------------- -void KMAccount::setName(const QString& aName) +void KMAccount::setName(const TQString& aName) { mName = aName; } @@ -144,7 +144,7 @@ void KMAccount::setFolder(KMFolder* aFolder, bool addAccount) //----------------------------------------------------------------------------- void KMAccount::readConfig(KConfig& config) { - QString folderName; + TQString folderName; mFolder = 0; folderName = config.readEntry("Folder"); setCheckInterval(config.readNumEntry("check-interval", 0)); @@ -181,7 +181,7 @@ void KMAccount::writeConfig(KConfig& config) KAccount::writeConfig(config); config.writeEntry("Type", type()); - config.writeEntry("Folder", mFolder ? mFolder->idString() : QString::null); + config.writeEntry("Folder", mFolder ? mFolder->idString() : TQString::null); config.writeEntry("check-interval", mInterval); config.writeEntry("check-exclude", mExclude); config.writePathEntry("precommand", mPrecommand); @@ -207,7 +207,7 @@ void KMAccount::sendReceipt(KMMessage* aMsg) KMMessage *newMsg = aMsg->createDeliveryReceipt(); if (newMsg) { mReceipts.append(newMsg); - QTimer::singleShot( 0, this, SLOT( sendReceipts() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( sendReceipts() ) ); } } @@ -239,9 +239,9 @@ bool KMAccount::processNewMsg(KMMessage* aMsg) aMsg->setStatus(KMMsgStatusNew); } /* -QFile fileD0( "testdat_xx-kmaccount-0" ); +TQFile fileD0( "testdat_xx-kmaccount-0" ); if( fileD0.open( IO_WriteOnly ) ) { - QDataStream ds( &fileD0 ); + TQDataStream ds( &fileD0 ); ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() ); fileD0.close(); // If data is 0 we just create a zero length file. } @@ -252,7 +252,7 @@ if( fileD0.open( IO_WriteOnly ) ) { if (processResult == 2) { perror("Critical error: Unable to collect mail (out of space?)"); KMessageBox::information(0,(i18n("Critical error: " - "Unable to collect mail: ")) + QString::fromLocal8Bit(strerror(errno))); + "Unable to collect mail: ")) + TQString::fromLocal8Bit(strerror(errno))); return false; } else if (processResult == 1) @@ -265,9 +265,9 @@ if( fileD0.open( IO_WriteOnly ) ) { kmkernel->filterMgr()->tempOpenFolder(mFolder); rc = mFolder->addMsg(aMsg); /* -QFile fileD0( "testdat_xx-kmaccount-1" ); +TQFile fileD0( "testdat_xx-kmaccount-1" ); if( fileD0.open( IO_WriteOnly ) ) { - QDataStream ds( &fileD0 ); + TQDataStream ds( &fileD0 ); ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() ); fileD0.close(); // If data is 0 we just create a zero length file. } @@ -275,7 +275,7 @@ if( fileD0.open( IO_WriteOnly ) ) { if (rc) { perror("failed to add message"); KMessageBox::information(0, i18n("Failed to add message:\n") + - QString(strerror(rc))); + TQString(strerror(rc))); return false; } int count = mFolder->count(); @@ -285,7 +285,7 @@ if( fileD0.open( IO_WriteOnly ) ) { } // Count number of new messages for each folder - QString folderId; + TQString folderId; if ( processResult == 1 ) { folderId = ( type() == "cachedimap" ) ? parent->folder()->idString() : mFolder->idString(); @@ -327,7 +327,7 @@ void KMAccount::deleteFolderJobs() void KMAccount::ignoreJobsForMessage( KMMessage* msg ) { //FIXME: remove, make folders handle those - for( QPtrListIterator it(mJobList); it.current(); ++it ) { + for( TQPtrListIterator it(mJobList); it.current(); ++it ) { if ( it.current()->msgList().first() == msg) { FolderJob *job = it.current(); mJobList.remove( job ); @@ -350,8 +350,8 @@ void KMAccount::installTimer() if (mInterval <= 0) return; if(!mTimer) { - mTimer = new QTimer(0, "mTimer"); - connect(mTimer,SIGNAL(timeout()),SLOT(mailCheck())); + mTimer = new TQTimer(0, "mTimer"); + connect(mTimer,TQT_SIGNAL(timeout()),TQT_SLOT(mailCheck())); } else { @@ -369,7 +369,7 @@ void KMAccount::deinstallTimer() } //----------------------------------------------------------------------------- -bool KMAccount::runPrecommand(const QString &precommand) +bool KMAccount::runPrecommand(const TQString &precommand) { // Run the pre command if there is one if ( precommand.isEmpty() ) @@ -380,8 +380,8 @@ bool KMAccount::runPrecommand(const QString &precommand) BroadcastStatus::instance()->setStatusMsg( i18n("Executing precommand %1").arg(precommand )); - connect(&precommandProcess, SIGNAL(finished(bool)), - SLOT(precommandExited(bool))); + connect(&precommandProcess, TQT_SIGNAL(finished(bool)), + TQT_SLOT(precommandExited(bool))); kdDebug(5006) << "Running precommand " << precommand << endl; if (!precommandProcess.start()) return false; @@ -414,30 +414,30 @@ void KMAccount::mailCheck() //----------------------------------------------------------------------------- void KMAccount::sendReceipts() { - QValueList::Iterator it; + TQValueList::Iterator it; for(it = mReceipts.begin(); it != mReceipts.end(); ++it) kmkernel->msgSender()->send(*it); //might process events mReceipts.clear(); } //----------------------------------------------------------------------------- -QString KMAccount::encryptStr(const QString &aStr) +TQString KMAccount::encryptStr(const TQString &aStr) { - QString result; + TQString result; for (uint i = 0; i < aStr.length(); i++) /* yes, no typo. can't encode ' ' or '!' because they're the unicode BOM. stupid scrambling. stupid. */ result += (aStr[i].unicode() <= 0x21 ) ? aStr[i] : - QChar(0x1001F - aStr[i].unicode()); + TQChar(0x1001F - aStr[i].unicode()); return result; } //----------------------------------------------------------------------------- -QString KMAccount::importPassword(const QString &aStr) +TQString KMAccount::importPassword(const TQString &aStr) { unsigned int i, val; unsigned int len = aStr.length(); - QCString result; + TQCString result; result.resize(len+1); for (i=0; i #include -#include -#include -#include -#include +#include +#include +#include +#include #include "kmmessage.h" class QTimer; @@ -47,14 +47,14 @@ using KMail::FolderJob; using KPIM::ProgressItem; class KMAccount; -typedef QValueList< ::KMAccount* > AccountList; +typedef TQValueList< ::KMAccount* > AccountList; class KMPrecommand : public QObject { Q_OBJECT public: - KMPrecommand(const QString &precommand, QObject *parent = 0); + KMPrecommand(const TQString &precommand, TQObject *parent = 0); virtual ~KMPrecommand(); bool start(); @@ -66,11 +66,11 @@ signals: protected: KProcess mPrecommandProcess; - QString mPrecommand; + TQString mPrecommand; }; -class KMAccount: public QObject, public KAccount +class KMAccount: public TQObject, public KAccount { Q_OBJECT friend class KMail::AccountManager; @@ -90,17 +90,17 @@ public: /** * Returns type of the account */ - virtual QString type() const { return QString::null; } + virtual TQString type() const { return TQString::null; } /** * Reimplemented, set account name */ - virtual void setName(const QString&); + virtual void setName(const TQString&); /** - * Account name (reimpl because of ambiguous QObject::name()) + * Account name (reimpl because of ambiguous TQObject::name()) */ - virtual QString name() const { return KAccount::name(); } + virtual TQString name() const { return KAccount::name(); } /** * Set password to "" (empty string) @@ -126,8 +126,8 @@ public: /** * the id of the trash folder (if any) for this account */ - QString trash() const { return mTrash; } - virtual void setTrash(const QString& aTrash) { mTrash = aTrash; } + TQString trash() const { return mTrash; } + virtual void setTrash(const TQString& aTrash) { mTrash = aTrash; } /** * Process new mail for this account if one arrived. Returns TRUE if new @@ -181,8 +181,8 @@ public: /** * Pre command */ - const QString& precommand(void) const { return mPrecommand; } - virtual void setPrecommand(const QString &cmd) { mPrecommand = cmd; } + const TQString& precommand(void) const { return mPrecommand; } + virtual void setPrecommand(const TQString &cmd) { mPrecommand = cmd; } /** * Runs the precommand. If the precommand is empty, the method @@ -190,16 +190,16 @@ public: * * @return True if successful, false otherwise */ - bool runPrecommand(const QString &precommand); + bool runPrecommand(const TQString &precommand); /** * Very primitive en/de-cryption so that the password is not * readable in the config file. But still very easy breakable. */ - static QString encryptStr(const QString& inStr); - static QString decryptStr(const QString& inStr) { return encryptStr(inStr); } + static TQString encryptStr(const TQString& inStr); + static TQString decryptStr(const TQString& inStr) { return encryptStr(inStr); } - static QString importPassword(const QString &); + static TQString importPassword(const TQString &); /** @return whether this account has an inbox */ bool hasInbox() const { return mHasInbox; } @@ -264,7 +264,7 @@ signals: * Emitted after the mail check is finished. * @param newInFolder number of new messages for each folder **/ - virtual void newMailsProcessed( const QMap & newInFolder ); + virtual void newMailsProcessed( const TQMap & newInFolder ); protected slots: virtual void mailCheck(); @@ -272,7 +272,7 @@ protected slots: virtual void precommandExited(bool); protected: - KMAccount( AccountManager* owner, const QString& accountName, uint id); + KMAccount( AccountManager* owner, const TQString& accountName, uint id); /** * Does filtering and storing in a folder for the given message. @@ -301,14 +301,14 @@ protected: * @param folderId the id of the folder * @param num the number of new message in this folder */ - void addToNewInFolder( QString folderId, int num ); + void addToNewInFolder( TQString folderId, int num ); protected: - QString mPrecommand; - QString mTrash; + TQString mPrecommand; + TQString mTrash; AccountManager* mOwner; - QGuardedPtr mFolder; - QTimer *mTimer; + TQGuardedPtr mFolder; + TQTimer *mTimer; int mInterval; // this is a switch and a scalar at the same time. If it is 0, // interval mail checking is turned off and the interval spinbox proposes a // default value. If it is non-null, it is the count of minutes between two @@ -317,20 +317,20 @@ protected: bool mExclude; bool mCheckingMail : 1; bool mPrecommandSuccess; - QValueList mReceipts; - QPtrList mJobList; + TQValueList mReceipts; + TQPtrList mJobList; bool mHasInbox : 1; - QGuardedPtr mMailCheckProgressItem; + TQGuardedPtr mMailCheckProgressItem; uint mIdentityId; private: /** * avoid compiler warning about hidden virtual */ - virtual void setName( const char *name ) { QObject::setName( name ); } + virtual void setName( const char *name ) { TQObject::setName( name ); } private: // for detailed (per folder) new mail notification - QMap mNewInFolder; + TQMap mNewInFolder; }; #endif /*kmaccount_h*/ diff --git a/kmail/kmacctcachedimap.cpp b/kmail/kmacctcachedimap.cpp index fbdc7925..2305b080 100644 --- a/kmail/kmacctcachedimap.cpp +++ b/kmail/kmacctcachedimap.cpp @@ -53,10 +53,10 @@ using KMail::AccountManager; #include #include -#include +#include KMAcctCachedImap::KMAcctCachedImap( AccountManager* aOwner, - const QString& aAccountName, uint id ) + const TQString& aAccountName, uint id ) : KMail::ImapAccountBase( aOwner, aAccountName, id ), mFolder( 0 ), mAnnotationCheckPassed(false), mGroupwareType( GroupwareKolab ), @@ -75,7 +75,7 @@ KMAcctCachedImap::~KMAcctCachedImap() //----------------------------------------------------------------------------- -QString KMAcctCachedImap::type() const +TQString KMAcctCachedImap::type() const { return "cachedimap"; } @@ -115,8 +115,8 @@ void KMAcctCachedImap::setAutoExpunge( bool /*aAutoExpunge*/ ) void KMAcctCachedImap::killAllJobs( bool disconnectSlave ) { //kdDebug(5006) << "killAllJobs: disconnectSlave=" << disconnectSlave << " " << mapJobData.count() << " jobs in map." << endl; - QValueList folderList = killAllJobsInternal( disconnectSlave ); - for( QValueList::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { + TQValueList folderList = killAllJobsInternal( disconnectSlave ); + for( TQValueList::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { KMFolderCachedImap *fld = *it; fld->resetSyncState(); fld->setContentState(KMFolderCachedImap::imapNoInformation); @@ -127,12 +127,12 @@ void KMAcctCachedImap::killAllJobs( bool disconnectSlave ) //----------------------------------------------------------------------------- // Common between killAllJobs and the destructor - which shouldn't call sendFolderComplete -QValueList KMAcctCachedImap::killAllJobsInternal( bool disconnectSlave ) +TQValueList KMAcctCachedImap::killAllJobsInternal( bool disconnectSlave ) { // Make list of folders to reset. This must be done last, since folderComplete // can trigger the next queued mail check already. - QValueList folderList; - QMap::Iterator it = mapJobData.begin(); + TQValueList folderList; + TQMap::Iterator it = mapJobData.begin(); for (; it != mapJobData.end(); ++it) { if ((*it).parent) folderList << static_cast((*it).parent->storage()); @@ -145,7 +145,7 @@ QValueList KMAcctCachedImap::killAllJobsInternal( bool disc mapJobData.clear(); // Clear the joblist. Make SURE to stop the job emitting "finished" - for( QPtrListIterator it( mJobList ); it.current(); ++it ) + for( TQPtrListIterator it( mJobList ); it.current(); ++it ) it.current()->setPassiveDestructor( true ); KMAccount::deleteFolderJobs(); @@ -160,8 +160,8 @@ QValueList KMAcctCachedImap::killAllJobsInternal( bool disc void KMAcctCachedImap::cancelMailCheck() { // Make list of folders to reset, like in killAllJobs - QValueList folderList; - QMap::Iterator it = mapJobData.begin(); + TQValueList folderList; + TQMap::Iterator it = mapJobData.begin(); for (; it != mapJobData.end(); ++it) { if ( (*it).cancellable && (*it).parent ) folderList << static_cast((*it).parent->storage()); @@ -170,7 +170,7 @@ void KMAcctCachedImap::cancelMailCheck() ImapAccountBase::cancelMailCheck(); // Reset sync states and emit folderComplete, this is important for // KMAccount::checkingMail() to be reset, in case we restart checking mail later. - for( QValueList::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { + for( TQValueList::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { KMFolderCachedImap *fld = *it; fld->resetSyncState(); fld->setContentState(KMFolderCachedImap::imapNoInformation); @@ -182,7 +182,7 @@ void KMAcctCachedImap::cancelMailCheck() //----------------------------------------------------------------------------- void KMAcctCachedImap::killJobsForItem(KMFolderTreeItem * fti) { - QMap::Iterator it = mapJobData.begin(); + TQMap::Iterator it = mapJobData.begin(); while (it != mapJobData.end()) { if (it.data().parent == fti->folder()) @@ -201,8 +201,8 @@ void KMAcctCachedImap::slotCheckQueuedFolders() mMailCheckFolders.append( mFoldersQueuedForChecking.front() ); mFoldersQueuedForChecking.pop_front(); if ( mFoldersQueuedForChecking.isEmpty() ) - disconnect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( slotCheckQueuedFolders() ) ); + disconnect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( slotCheckQueuedFolders() ) ); kmkernel->acctMgr()->singleCheckMail(this, true); mMailCheckFolders.clear(); @@ -235,10 +235,10 @@ void KMAcctCachedImap::processNewMail( KMFolderCachedImap* folder, // reset namespace todo if ( folder == mFolder ) { - QStringList nsToList = namespaces()[PersonalNS]; - QStringList otherNSToCheck = namespaces()[OtherUsersNS]; + TQStringList nsToList = namespaces()[PersonalNS]; + TQStringList otherNSToCheck = namespaces()[OtherUsersNS]; otherNSToCheck += namespaces()[SharedNS]; - for ( QStringList::Iterator it = otherNSToCheck.begin(); + for ( TQStringList::Iterator it = otherNSToCheck.begin(); it != otherNSToCheck.end(); ++it ) { if ( (*it).isEmpty() ) { // empty namespaces are included in the "normal" listing @@ -251,25 +251,25 @@ void KMAcctCachedImap::processNewMail( KMFolderCachedImap* folder, Q_ASSERT( !mMailCheckProgressItem ); mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem( - "MailCheck" + QString::number( id() ), - QStyleSheet::escape( folder->label() ), // will be changed immediately in serverSync anyway - QString::null, + "MailCheck" + TQString::number( id() ), + TQStyleSheet::escape( folder->label() ), // will be changed immediately in serverSync anyway + TQString::null, true, // can be cancelled useSSL() || useTLS() ); - connect( mMailCheckProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), - this, SLOT( slotProgressItemCanceled( KPIM::ProgressItem* ) ) ); + connect( mMailCheckProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), + this, TQT_SLOT( slotProgressItemCanceled( KPIM::ProgressItem* ) ) ); folder->setAccount(this); - connect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)), - this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool))); + connect(folder, TQT_SIGNAL(folderComplete(KMFolderCachedImap*, bool)), + this, TQT_SLOT(postProcessNewMail(KMFolderCachedImap*, bool))); folder->serverSync( recurse ); } void KMAcctCachedImap::postProcessNewMail( KMFolderCachedImap* folder, bool ) { mNoopTimer.start( 60000 ); // send a noop every minute to avoid "connection broken" errors - disconnect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)), - this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool))); + disconnect(folder, TQT_SIGNAL(folderComplete(KMFolderCachedImap*, bool)), + this, TQT_SLOT(postProcessNewMail(KMFolderCachedImap*, bool))); mMailCheckProgressItem->setComplete(); mMailCheckProgressItem = 0; @@ -295,7 +295,7 @@ void KMAcctCachedImap::addUnreadMsgCount( const KMFolderCachedImap *folder, if ( folder->imapPath() != "/INBOX/" ) { // new mail in INBOX is processed with KMAccount::processNewMsg() and // therefore doesn't need to be counted here - const QString folderId = folder->folder()->idString(); + const TQString folderId = folder->folder()->idString(); int newInFolder = countUnread; if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; @@ -323,12 +323,12 @@ void KMAcctCachedImap::readConfig( /*const*/ KConfig/*Base*/ & config ) { // Apparently this method is only ever called once (from KMKernel::init) so this is ok mPreviouslyDeletedFolders = config.readListEntry( "deleted-folders" ); mDeletedFolders.clear(); // but just in case... - const QStringList oldPaths = config.readListEntry( "renamed-folders-paths" ); - const QStringList newNames = config.readListEntry( "renamed-folders-names" ); - QStringList::const_iterator it = oldPaths.begin(); - QStringList::const_iterator nameit = newNames.begin(); + const TQStringList oldPaths = config.readListEntry( "renamed-folders-paths" ); + const TQStringList newNames = config.readListEntry( "renamed-folders-names" ); + TQStringList::const_iterator it = oldPaths.begin(); + TQStringList::const_iterator nameit = newNames.begin(); for( ; it != oldPaths.end() && nameit != newNames.end(); ++it, ++nameit ) { - addRenamedFolder( *it, QString::null, *nameit ); + addRenamedFolder( *it, TQString::null, *nameit ); } mGroupwareType = (GroupwareType)config.readNumEntry( "groupwareType", GroupwareKolab ); } @@ -337,9 +337,9 @@ void KMAcctCachedImap::writeConfig( KConfig/*Base*/ & config ) /*const*/ { ImapAccountBase::writeConfig( config ); config.writeEntry( "deleted-folders", mDeletedFolders + mPreviouslyDeletedFolders ); config.writeEntry( "renamed-folders-paths", mRenamedFolders.keys() ); - const QValueList values = mRenamedFolders.values(); - QStringList lstNames; - QValueList::const_iterator it = values.begin(); + const TQValueList values = mRenamedFolders.values(); + TQStringList lstNames; + TQValueList::const_iterator it = values.begin(); for ( ; it != values.end() ; ++it ) lstNames.append( (*it).mNewName ); config.writeEntry( "renamed-folders-names", lstNames ); @@ -358,12 +358,12 @@ void KMAcctCachedImap::invalidateIMAPFolders( KMFolderCachedImap* folder ) folder->setAccount(this); - QStringList strList; - QValueList > folderList; + TQStringList strList; + TQValueList > folderList; kmkernel->dimapFolderMgr()->createFolderList( &strList, &folderList, - folder->folder()->child(), QString::null, + folder->folder()->child(), TQString::null, false ); - QValueList >::Iterator it; + TQValueList >::Iterator it; mCountLastUnread = 0; mUnreadBeforeCheck.clear(); @@ -404,20 +404,20 @@ void KMAcctCachedImap::addDeletedFolder( KMFolder* folder ) } } -void KMAcctCachedImap::addDeletedFolder( const QString& imapPath ) +void KMAcctCachedImap::addDeletedFolder( const TQString& imapPath ) { mDeletedFolders << imapPath; } -QStringList KMAcctCachedImap::deletedFolderPaths( const QString& subFolderPath ) const +TQStringList KMAcctCachedImap::deletedFolderPaths( const TQString& subFolderPath ) const { - QStringList lst; - for ( QStringList::const_iterator it = mDeletedFolders.begin(); it != mDeletedFolders.end(); ++it ) { + TQStringList lst; + for ( TQStringList::const_iterator it = mDeletedFolders.begin(); it != mDeletedFolders.end(); ++it ) { if ( (*it).startsWith( subFolderPath ) ) // We must reverse the order, so that sub sub sub folders are deleted first lst.prepend( *it ); } - for ( QStringList::const_iterator it = mPreviouslyDeletedFolders.begin(); it != mPreviouslyDeletedFolders.end(); ++it ) { + for ( TQStringList::const_iterator it = mPreviouslyDeletedFolders.begin(); it != mPreviouslyDeletedFolders.end(); ++it ) { if ( (*it).startsWith( subFolderPath ) ) lst.prepend( *it ); } @@ -426,28 +426,28 @@ QStringList KMAcctCachedImap::deletedFolderPaths( const QString& subFolderPath ) return lst; } -bool KMAcctCachedImap::isDeletedFolder( const QString& subFolderPath ) const +bool KMAcctCachedImap::isDeletedFolder( const TQString& subFolderPath ) const { return mDeletedFolders.find( subFolderPath ) != mDeletedFolders.end(); } -bool KMAcctCachedImap::isPreviouslyDeletedFolder( const QString& subFolderPath ) const +bool KMAcctCachedImap::isPreviouslyDeletedFolder( const TQString& subFolderPath ) const { return mPreviouslyDeletedFolders.find( subFolderPath ) != mPreviouslyDeletedFolders.end(); } -void KMAcctCachedImap::removeDeletedFolder( const QString& subFolderPath ) +void KMAcctCachedImap::removeDeletedFolder( const TQString& subFolderPath ) { mDeletedFolders.remove( subFolderPath ); mPreviouslyDeletedFolders.remove( subFolderPath ); } -void KMAcctCachedImap::addRenamedFolder( const QString& subFolderPath, const QString& oldLabel, const QString& newName ) +void KMAcctCachedImap::addRenamedFolder( const TQString& subFolderPath, const TQString& oldLabel, const TQString& newName ) { mRenamedFolders.insert( subFolderPath, RenamedFolder( oldLabel, newName ) ); } -void KMAcctCachedImap::removeRenamedFolder( const QString& subFolderPath ) +void KMAcctCachedImap::removeRenamedFolder( const TQString& subFolderPath ) { mRenamedFolders.remove( subFolderPath ); } @@ -458,7 +458,7 @@ void KMAcctCachedImap::slotProgressItemCanceled( ProgressItem* ) killAllJobs( abortConnection ); if ( abortConnection ) { // If we were trying to connect, tell kmfoldercachedimap so that it moves on - emit connectionResult( KIO::ERR_USER_CANCELED, QString::null ); + emit connectionResult( KIO::ERR_USER_CANCELED, TQString::null ); } } @@ -468,12 +468,12 @@ FolderStorage* const KMAcctCachedImap::rootFolder() const } -QString KMAcctCachedImap::renamedFolder( const QString& imapPath ) const +TQString KMAcctCachedImap::renamedFolder( const TQString& imapPath ) const { - QMap::ConstIterator renit = mRenamedFolders.find( imapPath ); + TQMap::ConstIterator renit = mRenamedFolders.find( imapPath ); if ( renit != mRenamedFolders.end() ) return (*renit).mNewName; - return QString::null; + return TQString::null; } #include "kmacctcachedimap.moc" diff --git a/kmail/kmacctcachedimap.h b/kmail/kmacctcachedimap.h index 6f10bfe5..e8e42820 100644 --- a/kmail/kmacctcachedimap.h +++ b/kmail/kmacctcachedimap.h @@ -34,7 +34,7 @@ #include "imapaccountbase.h" -#include +#include class KMFolderCachedImap; class KMFolderTreeItem; @@ -72,7 +72,7 @@ public: /** * Inherited methods. */ - virtual QString type() const; + virtual TQString type() const; virtual void processNewMail( bool interactive ); /** @@ -114,56 +114,56 @@ public: * Remember that a folder got explicitely deleted - NOT including all child folders * This is used when renaming a folder. */ - void addDeletedFolder( const QString& imapPath ); + void addDeletedFolder( const TQString& imapPath ); /** * Ask if a folder was explicitely deleted in this session */ - bool isDeletedFolder( const QString& subFolderPath ) const; + bool isDeletedFolder( const TQString& subFolderPath ) const; /** * Ask if a folder was explicitely deleted in a previous session */ - bool isPreviouslyDeletedFolder( const QString& subFolderPath ) const; + bool isPreviouslyDeletedFolder( const TQString& subFolderPath ) const; /** * return the imap path to the deleted folder, as well as the paths for any child folders */ - QStringList deletedFolderPaths( const QString& subFolderPath ) const; + TQStringList deletedFolderPaths( const TQString& subFolderPath ) const; /** * Remove folder from the "deleted folders" list */ - void removeDeletedFolder( const QString& subFolderPath ); + void removeDeletedFolder( const TQString& subFolderPath ); /** * Remember that a folder was renamed */ - void addRenamedFolder( const QString& subFolderPath, - const QString& oldLabel, const QString& newName ); + void addRenamedFolder( const TQString& subFolderPath, + const TQString& oldLabel, const TQString& newName ); /** * Remove folder from "renamed folders" list * Warning: @p subFolderPath is the OLD path */ - void removeRenamedFolder( const QString& subFolderPath ); + void removeRenamedFolder( const TQString& subFolderPath ); struct RenamedFolder { RenamedFolder() {} // for QMap - RenamedFolder( const QString& oldLabel, const QString& newName ) + RenamedFolder( const TQString& oldLabel, const TQString& newName ) : mOldLabel( oldLabel ), mNewName( newName ) {} - QString mOldLabel; - QString mNewName; + TQString mOldLabel; + TQString mNewName; }; /** * Returns new name for folder if it was renamed */ - QString renamedFolder( const QString& imapPath ) const; + TQString renamedFolder( const TQString& imapPath ) const; /** * Returns the list of folders that were renamed */ - const QMap& renamedFolders() const { return mRenamedFolders; } + const TQMap& renamedFolders() const { return mRenamedFolders; } /** * Add a folder's unread count to the new "unread messages count", done during a sync after getting new mail @@ -201,7 +201,7 @@ public: protected: friend class ::AccountManager; - KMAcctCachedImap(AccountManager* owner, const QString& accountName, uint id); + KMAcctCachedImap(AccountManager* owner, const TQString& accountName, uint id); protected slots: /** new-mail-notification for the current folder (is called via folderComplete) */ @@ -212,15 +212,15 @@ protected slots: virtual void slotCheckQueuedFolders(); private: - QValueList killAllJobsInternal( bool disconnectSlave ); + TQValueList killAllJobsInternal( bool disconnectSlave ); void processNewMail( KMFolderCachedImap* folder, bool recurse ); private: - QPtrList mJobList; + TQPtrList mJobList; KMFolderCachedImap *mFolder; - QStringList mDeletedFolders; // folders deleted in this session - QStringList mPreviouslyDeletedFolders; // folders deleted in a previous session - QMap mRenamedFolders; + TQStringList mDeletedFolders; // folders deleted in this session + TQStringList mPreviouslyDeletedFolders; // folders deleted in a previous session + TQMap mRenamedFolders; bool mAnnotationCheckPassed; GroupwareType mGroupwareType; diff --git a/kmail/kmacctfolder.h b/kmail/kmacctfolder.h index e622ebd3..97dca0d7 100644 --- a/kmail/kmacctfolder.h +++ b/kmail/kmacctfolder.h @@ -48,7 +48,7 @@ public: void clearAccountList(); private: - KMAcctFolder( KMFolderDir* parent, const QString& name, + KMAcctFolder( KMFolderDir* parent, const TQString& name, KMFolderType aFolderType ); }; diff --git a/kmail/kmacctimap.cpp b/kmail/kmacctimap.cpp index 9e83d243..bf96c79a 100644 --- a/kmail/kmacctimap.cpp +++ b/kmail/kmacctimap.cpp @@ -50,12 +50,12 @@ using KPIM::ProgressManager; #include #include -#include +#include #include //----------------------------------------------------------------------------- -KMAcctImap::KMAcctImap(AccountManager* aOwner, const QString& aAccountName, uint id): +KMAcctImap::KMAcctImap(AccountManager* aOwner, const TQString& aAccountName, uint id): KMail::ImapAccountBase(aOwner, aAccountName, id), mCountRemainChecks( 0 ), mErrorTimer( 0, "mErrorTimer" ) @@ -64,17 +64,17 @@ KMAcctImap::KMAcctImap(AccountManager* aOwner, const QString& aAccountName, uint mScheduler = 0; mNoopTimer.start( 60000 ); // // send a noop every minute mOpenFolders.setAutoDelete(true); - connect(kmkernel->imapFolderMgr(), SIGNAL(changed()), - this, SLOT(slotUpdateFolderList())); - connect(&mErrorTimer, SIGNAL(timeout()), SLOT(slotResetConnectionError())); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(slotUpdateFolderList())); + connect(&mErrorTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotResetConnectionError())); - QString serNumUri = locateLocal( "data", "kmail/unfiltered." + - QString("%1").arg(KAccount::id()) ); + TQString serNumUri = locateLocal( "data", "kmail/unfiltered." + + TQString("%1").arg(KAccount::id()) ); KConfig config( serNumUri ); - QStringList serNums = config.readListEntry( "unfiltered" ); + TQStringList serNums = config.readListEntry( "unfiltered" ); mFilterSerNumsToSave.setAutoDelete( false ); - for ( QStringList::ConstIterator it = serNums.begin(); + for ( TQStringList::ConstIterator it = serNums.begin(); it != serNums.end(); ++it ) { mFilterSerNums.append( (*it).toUInt() ); mFilterSerNumsToSave.insert( *it, (const int *)1 ); @@ -87,11 +87,11 @@ KMAcctImap::~KMAcctImap() { killAllJobs( true ); - QString serNumUri = locateLocal( "data", "kmail/unfiltered." + - QString("%1").arg(KAccount::id()) ); + TQString serNumUri = locateLocal( "data", "kmail/unfiltered." + + TQString("%1").arg(KAccount::id()) ); KConfig config( serNumUri ); - QStringList serNums; - QDictIterator it( mFilterSerNumsToSave ); + TQStringList serNums; + TQDictIterator it( mFilterSerNumsToSave ); for( ; it.current(); ++it ) serNums.append( it.currentKey() ); config.writeEntry( "unfiltered", serNums ); @@ -99,7 +99,7 @@ KMAcctImap::~KMAcctImap() //----------------------------------------------------------------------------- -QString KMAcctImap::type() const +TQString KMAcctImap::type() const { return "imap"; } @@ -125,7 +125,7 @@ void KMAcctImap::setImapFolder(KMFolderImap *aFolder) //----------------------------------------------------------------------------- -bool KMAcctImap::handleError( int errorCode, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync ) +bool KMAcctImap::handleError( int errorCode, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync ) { /* TODO check where to handle this one better. */ if ( errorCode == KIO::ERR_DOES_NOT_EXIST ) { @@ -141,11 +141,11 @@ bool KMAcctImap::handleError( int errorCode, const QString &errorMsg, KIO::Job* //----------------------------------------------------------------------------- void KMAcctImap::killAllJobs( bool disconnectSlave ) { - QMap::Iterator it = mapJobData.begin(); + TQMap::Iterator it = mapJobData.begin(); for ( ; it != mapJobData.end(); ++it) { - QPtrList msgList = (*it).msgList; - QPtrList::Iterator it2 = msgList.begin(); + TQPtrList msgList = (*it).msgList; + TQPtrList::Iterator it2 = msgList.begin(); for ( ; it2 != msgList.end(); ++it2 ) { KMMessage *msg = *it2; if ( msg->transferInProgress() ) { @@ -179,7 +179,7 @@ void KMAcctImap::killAllJobs( bool disconnectSlave ) // KMAccount::deleteFolderJobs(); doesn't work here always, it deletes jobs from // its own mJobList instead of our mJobList... KMAccount::deleteFolderJobs(); - QPtrListIterator it2( mJobList ); + TQPtrListIterator it2( mJobList ); while ( it2.current() ) { ImapJob *job = it2.current(); ++it2; @@ -202,7 +202,7 @@ void KMAcctImap::killAllJobs( bool disconnectSlave ) void KMAcctImap::ignoreJobsForMessage( KMMessage* msg ) { if (!msg) return; - QPtrListIterator it( mJobList ); + TQPtrListIterator it( mJobList ); while ( it.current() ) { ImapJob *job = it.current(); @@ -217,7 +217,7 @@ void KMAcctImap::ignoreJobsForMessage( KMMessage* msg ) //----------------------------------------------------------------------------- void KMAcctImap::ignoreJobsForFolder( KMFolder* folder ) { - QPtrListIterator it( mJobList ); + TQPtrListIterator it( mJobList ); while ( it.current() ) { ImapJob *job = it.current(); @@ -233,9 +233,9 @@ void KMAcctImap::ignoreJobsForFolder( KMFolder* folder ) void KMAcctImap::removeSlaveJobsForFolder( KMFolder* folder ) { // Make sure the folder is not referenced in any kio slave jobs - QMap::Iterator it = mapJobData.begin(); + TQMap::Iterator it = mapJobData.begin(); while ( it != mapJobData.end() ) { - QMap::Iterator i = it; + TQMap::Iterator i = it; it++; if ( (*i).parent ) { if ( (*i).parent == folder ) { @@ -249,8 +249,8 @@ void KMAcctImap::removeSlaveJobsForFolder( KMFolder* folder ) void KMAcctImap::cancelMailCheck() { // Make list of folders to reset, like in killAllJobs - QValueList folderList; - QMap::Iterator it = mapJobData.begin(); + TQValueList folderList; + TQMap::Iterator it = mapJobData.begin(); for (; it != mapJobData.end(); ++it) { if ( (*it).cancellable && (*it).parent ) { folderList << static_cast((*it).parent->storage()); @@ -262,7 +262,7 @@ void KMAcctImap::cancelMailCheck() killAllJobs( true ); // emit folderComplete, this is important for // KMAccount::checkingMail() to be reset, in case we restart checking mail later. - for( QValueList::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { + for( TQValueList::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { KMFolderImap *fld = *it; fld->sendFolderComplete(FALSE); } @@ -297,18 +297,18 @@ void KMAcctImap::processNewMail(bool interactive) mMailCheckProgressItem = ProgressManager::createProgressItem( "MailCheckAccount" + name(), - i18n("Checking account: %1" ).arg( QStyleSheet::escape( name() ) ), - QString::null, // status + i18n("Checking account: %1" ).arg( TQStyleSheet::escape( name() ) ), + TQString::null, // status true, // can be canceled useSSL() || useTLS() ); mMailCheckProgressItem->setTotalItems( mMailCheckFolders.count() ); connect ( mMailCheckProgressItem, - SIGNAL( progressItemCanceled( KPIM::ProgressItem*) ), + TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*) ), this, - SLOT( slotMailCheckCanceled() ) ); + TQT_SLOT( slotMailCheckCanceled() ) ); - QValueList >::Iterator it; + TQValueList >::Iterator it; // first get the current count of unread-messages mCountRemainChecks = 0; mCountUnread = 0; @@ -336,8 +336,8 @@ void KMAcctImap::processNewMail(bool interactive) mCountRemainChecks++; if (imapFolder->isSelected()) { - connect(imapFolder, SIGNAL(folderComplete(KMFolderImap*, bool)), - this, SLOT(postProcessNewMail(KMFolderImap*, bool))); + connect(imapFolder, TQT_SIGNAL(folderComplete(KMFolderImap*, bool)), + this, TQT_SLOT(postProcessNewMail(KMFolderImap*, bool))); imapFolder->getFolder(); } else if ( kmkernel->filterMgr()->atLeastOneIncomingFilterAppliesTo( id() ) && imapFolder->folder()->isSystemFolder() && @@ -345,13 +345,13 @@ void KMAcctImap::processNewMail(bool interactive) imapFolder->open("acctimap"); // will be closed in the folderSelected slot // first get new headers before we select the folder imapFolder->setSelected( true ); - connect( imapFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotFolderSelected( KMFolderImap*, bool) ) ); + connect( imapFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotFolderSelected( KMFolderImap*, bool) ) ); imapFolder->getFolder(); } else { - connect(imapFolder, SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this, SLOT(postProcessNewMail(KMFolder*))); + connect(imapFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this, TQT_SLOT(postProcessNewMail(KMFolder*))); bool ok = imapFolder->processNewMail(interactive); if (!ok) { @@ -382,15 +382,15 @@ void KMAcctImap::processNewMail(bool interactive) //----------------------------------------------------------------------------- void KMAcctImap::postProcessNewMail(KMFolderImap* folder, bool) { - disconnect(folder, SIGNAL(folderComplete(KMFolderImap*, bool)), - this, SLOT(postProcessNewMail(KMFolderImap*, bool))); + disconnect(folder, TQT_SIGNAL(folderComplete(KMFolderImap*, bool)), + this, TQT_SLOT(postProcessNewMail(KMFolderImap*, bool))); postProcessNewMail(static_cast(folder->folder())); } void KMAcctImap::postProcessNewMail( KMFolder * folder ) { - disconnect( folder->storage(), SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this, SLOT(postProcessNewMail(KMFolder*)) ); + disconnect( folder->storage(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this, TQT_SLOT(postProcessNewMail(KMFolder*)) ); if ( mMailCheckProgressItem ) { mMailCheckProgressItem->incCompletedItems(); @@ -400,7 +400,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) mCountRemainChecks--; // count the unread messages - const QString folderId = folder->idString(); + const TQString folderId = folder->idString(); int newInFolder = folder->countUnread(); if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; @@ -410,17 +410,17 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) } // Filter messages - QValueListIterator filterIt = mFilterSerNums.begin(); - QValueList inTransit; + TQValueListIterator filterIt = mFilterSerNums.begin(); + TQValueList inTransit; if (ActionScheduler::isEnabled() || kmkernel->filterMgr()->atLeastOneOnlineImapFolderTarget()) { KMFilterMgr::FilterSet set = KMFilterMgr::Inbound; - QValueList filters = kmkernel->filterMgr()->filters(); + TQValueList filters = kmkernel->filterMgr()->filters(); if (!mScheduler) { mScheduler = new KMail::ActionScheduler( set, filters ); mScheduler->setAccountId( id() ); - connect( mScheduler, SIGNAL(filtered(Q_UINT32)), this, SLOT(slotFiltered(Q_UINT32)) ); + connect( mScheduler, TQT_SIGNAL(filtered(Q_UINT32)), this, TQT_SLOT(slotFiltered(Q_UINT32)) ); } else { mScheduler->setFilterList( filters ); } @@ -434,7 +434,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) // It's possible that the message has been deleted or moved into a // different folder, or that the serNum is stale if ( !folder ) { - mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) ); + mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) ); ++filterIt; continue; } @@ -443,7 +443,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) if (!imapFolder || !imapFolder->folder()->isSystemFolder() || !(imapFolder->imapPath() == "/INBOX/") ) { // sanity checking - mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) ); + mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) ); ++filterIt; continue; } @@ -452,7 +452,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) msg = folder->getMsg( idx ); if (!msg) { // sanity checking - mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) ); + mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) ); ++filterIt; continue; } @@ -469,11 +469,11 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) msg->setTransferInProgress(true); if ( !msg->isComplete() ) { FolderJob *job = folder->createJob(msg); - connect(job, SIGNAL(messageRetrieved(KMMessage*)), - SLOT(slotFilterMsg(KMMessage*))); + connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + TQT_SLOT(slotFilterMsg(KMMessage*))); job->start(); } else { - mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) ); + mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) ); if (slotFilterMsg(msg) == 2) break; } } @@ -498,7 +498,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) //----------------------------------------------------------------------------- void KMAcctImap::slotFiltered(Q_UINT32 serNum) { - mFilterSerNumsToSave.remove( QString( "%1" ).arg( serNum ) ); + mFilterSerNumsToSave.remove( TQString( "%1" ).arg( serNum ) ); } //----------------------------------------------------------------------------- @@ -509,14 +509,14 @@ void KMAcctImap::slotUpdateFolderList() kdWarning(5006) << "KMAcctImap::slotUpdateFolderList return" << endl; return; } - QStringList strList; + TQStringList strList; mMailCheckFolders.clear(); kmkernel->imapFolderMgr()->createFolderList(&strList, &mMailCheckFolders, - mFolder->folder()->child(), QString::null, false); + mFolder->folder()->child(), TQString::null, false); // the new list - QValueList > includedFolders; + TQValueList > includedFolders; // check for excluded folders - QValueList >::Iterator it; + TQValueList >::Iterator it; for (it = mMailCheckFolders.begin(); it != mMailCheckFolders.end(); ++it) { KMFolderImap* folder = static_cast(((KMFolder*)(*it))->storage()); @@ -571,8 +571,8 @@ void KMAcctImap::slotResetConnectionError() void KMAcctImap::slotFolderSelected( KMFolderImap* folder, bool ) { folder->setSelected( false ); - disconnect( folder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotFolderSelected( KMFolderImap*, bool) ) ); + disconnect( folder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotFolderSelected( KMFolderImap*, bool) ) ); postProcessNewMail( static_cast(folder->folder()) ); folder->close( "acctimap" ); } @@ -580,11 +580,11 @@ void KMAcctImap::slotFolderSelected( KMFolderImap* folder, bool ) void KMAcctImap::execFilters(Q_UINT32 serNum) { if ( !kmkernel->filterMgr()->atLeastOneFilterAppliesTo( id() ) ) return; - QValueListIterator findIt = mFilterSerNums.find( serNum ); + TQValueListIterator findIt = mFilterSerNums.find( serNum ); if ( findIt != mFilterSerNums.end() ) return; mFilterSerNums.append( serNum ); - mFilterSerNumsToSave.insert( QString( "%1" ).arg( serNum ), (const int *)1 ); + mFilterSerNumsToSave.insert( TQString( "%1" ).arg( serNum ), (const int *)1 ); } int KMAcctImap::slotFilterMsg( KMMessage *msg ) @@ -596,7 +596,7 @@ int KMAcctImap::slotFilterMsg( KMMessage *msg ) msg->setTransferInProgress(false); Q_UINT32 serNum = msg->getMsgSerNum(); if ( serNum ) - mFilterSerNumsToSave.remove( QString( "%1" ).arg( serNum ) ); + mFilterSerNumsToSave.remove( TQString( "%1" ).arg( serNum ) ); int filterResult = kmkernel->filterMgr()->process(msg, KMFilterMgr::Inbound, @@ -604,7 +604,7 @@ int KMAcctImap::slotFilterMsg( KMMessage *msg ) id() ); if (filterResult == 2) { // something went horribly wrong (out of space?) - kmkernel->emergencyExit( i18n("Unable to process messages: " ) + QString::fromLocal8Bit(strerror(errno))); + kmkernel->emergencyExit( i18n("Unable to process messages: " ) + TQString::fromLocal8Bit(strerror(errno))); return 2; } if (msg->parent()) { // unGet this msg diff --git a/kmail/kmacctimap.h b/kmail/kmacctimap.h index 03aa0aa9..c69bca89 100644 --- a/kmail/kmacctimap.h +++ b/kmail/kmacctimap.h @@ -23,7 +23,7 @@ #define KMAcctImap_h #include "imapaccountbase.h" -#include +#include class KMFolderImap; class KMFolderTreeItem; @@ -51,7 +51,7 @@ public: /** * Inherited methods. */ - virtual QString type(void) const; + virtual TQString type(void) const; virtual void processNewMail(bool); ConnectionState makeConnection(); @@ -103,16 +103,16 @@ public slots: protected: friend class ::AccountManager; - KMAcctImap(AccountManager* owner, const QString& accountName, uint id); + KMAcctImap(AccountManager* owner, const TQString& accountName, uint id); /** * Handle an error coming from a KIO job * See ImapAccountBase::handleJobError for details. */ - virtual bool handleError( int error, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync = false ); + virtual bool handleError( int error, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync = false ); virtual void cancelMailCheck(); - QPtrList mJobList; - QGuardedPtr mFolder; + TQPtrList mJobList; + TQGuardedPtr mFolder; protected slots: /** new-mail-notification for the current folder (is called via folderComplete) */ @@ -143,9 +143,9 @@ protected slots: private: int mCountRemainChecks; /** used to reset connection errors */ - QTimer mErrorTimer; - QValueList mFilterSerNums; - QDict mFilterSerNumsToSave; + TQTimer mErrorTimer; + TQValueList mFilterSerNums; + TQDict mFilterSerNumsToSave; KMail::ActionScheduler *mScheduler; }; diff --git a/kmail/kmacctlocal.cpp b/kmail/kmacctlocal.cpp index dfc8a187..b486b537 100644 --- a/kmail/kmacctlocal.cpp +++ b/kmail/kmacctlocal.cpp @@ -20,8 +20,8 @@ using KPIM::ProgressManager; #include #include -#include -#include +#include +#include #include #include @@ -29,7 +29,7 @@ using KPIM::ProgressManager; #include //----------------------------------------------------------------------------- -KMAcctLocal::KMAcctLocal(AccountManager* aOwner, const QString& aAccountName, uint id): +KMAcctLocal::KMAcctLocal(AccountManager* aOwner, const TQString& aAccountName, uint id): KMAccount(aOwner, aAccountName, id), mHasNewMail( false ), mAddedOk( true ), mNumMsgs( 0 ), mMsgsFetched( 0 ), mMailFolder( 0 ) @@ -45,7 +45,7 @@ KMAcctLocal::~KMAcctLocal() //----------------------------------------------------------------------------- -QString KMAcctLocal::type(void) const +TQString KMAcctLocal::type(void) const { return "local"; } @@ -79,7 +79,7 @@ void KMAcctLocal::processNewMail(bool) return; } - QTime t; + TQTime t; t.start(); for ( mMsgsFetched = 0; mMsgsFetched < mNumMsgs; ++mMsgsFetched ) @@ -101,7 +101,7 @@ void KMAcctLocal::processNewMail(bool) bool KMAcctLocal::preProcess() { if ( precommand().isEmpty() ) { - QFileInfo fi( location() ); + TQFileInfo fi( location() ); if ( fi.size() == 0 ) { BroadcastStatus::instance()->setStatusMsgTransmissionCompleted( mName, 0 ); checkDone( mHasNewMail, CheckOK ); @@ -129,7 +129,7 @@ bool KMAcctLocal::preProcess() Q_ASSERT( !mMailCheckProgressItem ); - QString escapedName = QStyleSheet::escape( mName ); + TQString escapedName = TQStyleSheet::escape( mName ); mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem( "MailCheck" + mName, escapedName, @@ -148,7 +148,7 @@ bool KMAcctLocal::preProcess() const int rc = mMailFolder->open("acctlocalMail"); if ( rc != 0 ) { - QString aStr; + TQString aStr; aStr = i18n("Cannot open file:"); aStr += mMailFolder->path()+"/"+mMailFolder->name(); KMessageBox::sorry(0, aStr); @@ -163,7 +163,7 @@ bool KMAcctLocal::preProcess() kdDebug(5006) << "mailFolder could not be locked" << endl; mMailFolder->close("acctlocalMail"); checkDone( mHasNewMail, CheckError ); - QString errMsg = i18n( "Transmission failed: Could not lock %1." ) + TQString errMsg = i18n( "Transmission failed: Could not lock %1." ) .arg( mMailFolder->location() ); BroadcastStatus::instance()->setStatusMsg( errMsg ); return false; @@ -192,7 +192,7 @@ bool KMAcctLocal::fetchMsg() /* This causes mail eating if (kmkernel->mailCheckAborted()) break; */ - const QString statusMsg = mStatusMsgStub.arg( mMsgsFetched ); + const TQString statusMsg = mStatusMsgStub.arg( mMsgsFetched ); //BroadcastStatus::instance()->setStatusMsg( statusMsg ); mMailCheckProgressItem->incCompletedItems(); mMailCheckProgressItem->updateProgress(); @@ -203,12 +203,12 @@ bool KMAcctLocal::fetchMsg() { #if 0 // debug code, don't remove - QFile fileD0( "testdat_xx-0-0" ); + TQFile fileD0( "testdat_xx-0-0" ); if( fileD0.open( IO_WriteOnly ) ) { - QCString s = msg->asString(); + TQCString s = msg->asString(); uint l = s.length(); if ( l > 0 ) { - QDataStream ds( &fileD0 ); + TQDataStream ds( &fileD0 ); ds.writeRawBytes( s.data(), l ); } fileD0.close(); // If data is 0 we just create a zero length file. @@ -273,7 +273,7 @@ void KMAcctLocal::readConfig(KConfig& config) { KMAccount::readConfig(config); mLocation = config.readPathEntry("Location", mLocation); - QString locktype = config.readEntry("LockType", "procmail_lockfile" ); + TQString locktype = config.readEntry("LockType", "procmail_lockfile" ); if( locktype == "procmail_lockfile" ) { mLock = procmail_lockfile; @@ -296,7 +296,7 @@ void KMAcctLocal::writeConfig(KConfig& config) config.writePathEntry("Location", mLocation); - QString st = "fcntl"; + TQString st = "fcntl"; if (mLock == procmail_lockfile) st = "procmail_lockfile"; else if (mLock == mutt_dotlock) st = "mutt_dotlock"; else if (mLock == mutt_dotlock_privileged) st = "mutt_dotlock_privileged"; @@ -311,12 +311,12 @@ void KMAcctLocal::writeConfig(KConfig& config) //----------------------------------------------------------------------------- -void KMAcctLocal::setLocation(const QString& aLocation) +void KMAcctLocal::setLocation(const TQString& aLocation) { mLocation = aLocation; } -void KMAcctLocal::setProcmailLockFileName(const QString& s) +void KMAcctLocal::setProcmailLockFileName(const TQString& s) { mProcmailLockFileName = s; } diff --git a/kmail/kmacctlocal.h b/kmail/kmacctlocal.h index 12c14c10..2abe34f5 100644 --- a/kmail/kmacctlocal.h +++ b/kmail/kmacctlocal.h @@ -12,7 +12,7 @@ class KMAcctLocal: public KMAccount protected: friend class ::AccountManager; - KMAcctLocal(AccountManager* owner, const QString& accountName, uint id); + KMAcctLocal(AccountManager* owner, const TQString& accountName, uint id); public: virtual ~KMAcctLocal(); @@ -22,17 +22,17 @@ public: /** Access to location of local mail file (usually something like "/var/spool/mail/joe"). */ - QString location(void) const { return mLocation; } - virtual void setLocation(const QString&); + TQString location(void) const { return mLocation; } + virtual void setLocation(const TQString&); /** Acceso to Locking method */ LockType lockType(void) const { return mLock; } void setLockType(LockType lt) { mLock = lt; } - QString procmailLockFileName(void) const { return mProcmailLockFileName; } - void setProcmailLockFileName(const QString& s); + TQString procmailLockFileName(void) const { return mProcmailLockFileName; } + void setProcmailLockFileName(const TQString& s); - virtual QString type(void) const; + virtual TQString type(void) const; virtual void processNewMail(bool); virtual void readConfig(KConfig&); virtual void writeConfig(KConfig&); @@ -43,15 +43,15 @@ private: void postProcess(); private: - QString mLocation; - QString mProcmailLockFileName; + TQString mLocation; + TQString mProcmailLockFileName; bool mHasNewMail; bool mAddedOk; LockType mLock; int mNumMsgs; int mMsgsFetched; KMFolder *mMailFolder; - QString mStatusMsgStub; + TQString mStatusMsgStub; }; #endif /*kmacctlocal_h*/ diff --git a/kmail/kmacctmaildir.cpp b/kmail/kmacctmaildir.cpp index 0b62c6cb..b3c5d31c 100644 --- a/kmail/kmacctmaildir.cpp +++ b/kmail/kmacctmaildir.cpp @@ -4,7 +4,7 @@ #include #endif -#include +#include #include "kmacctmaildir.h" #include "kmfoldermaildir.h" #include "kmacctfolder.h" @@ -19,7 +19,7 @@ using KPIM::ProgressManager; #include #include -#include +#include #include #include @@ -33,7 +33,7 @@ using KPIM::ProgressManager; #undef None //----------------------------------------------------------------------------- -KMAcctMaildir::KMAcctMaildir(AccountManager* aOwner, const QString& aAccountName, uint id): +KMAcctMaildir::KMAcctMaildir(AccountManager* aOwner, const TQString& aAccountName, uint id): KMAccount(aOwner, aAccountName, id) { } @@ -47,7 +47,7 @@ KMAcctMaildir::~KMAcctMaildir() //----------------------------------------------------------------------------- -QString KMAcctMaildir::type(void) const +TQString KMAcctMaildir::type(void) const { return "maildir"; } @@ -79,11 +79,11 @@ void KMAcctMaildir::pseudoAssign( const KMAccount * a ) //----------------------------------------------------------------------------- void KMAcctMaildir::processNewMail(bool) { - QTime t; + TQTime t; hasNewMail = false; if ( precommand().isEmpty() ) { - QFileInfo fi( location() ); + TQFileInfo fi( location() ); if ( !fi.exists() ) { checkDone( hasNewMail, CheckOK ); BroadcastStatus::instance()->setStatusMsgTransmissionCompleted( mName, 0 ); @@ -110,7 +110,7 @@ void KMAcctMaildir::processNewMail(bool) i18n("Preparing transmission from \"%1\"...").arg(mName)); Q_ASSERT( !mMailCheckProgressItem ); - QString escapedName = QStyleSheet::escape( mName ); + TQString escapedName = TQStyleSheet::escape( mName ); mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem( "MailCheck" + mName, escapedName, @@ -130,7 +130,7 @@ void KMAcctMaildir::processNewMail(bool) rc = mailFolder.open("acctmaildirMail"); if (rc) { - QString aStr = i18n("Cannot open folder %1.").arg( mailFolder.location() ); + TQString aStr = i18n("Cannot open folder %1.").arg( mailFolder.location() ); KMessageBox::sorry(0, aStr); kdDebug(5006) << "cannot open folder " << mailFolder.location() << endl; checkDone( hasNewMail, CheckError ); @@ -147,7 +147,7 @@ void KMAcctMaildir::processNewMail(bool) t.start(); // prepare the static parts of the status message: - QString statusMsgStub = i18n("Moving message %3 of %2 from %1.") + TQString statusMsgStub = i18n("Moving message %3 of %2 from %1.") .arg(mailFolder.location()).arg(num); mMailCheckProgressItem->setTotalItems( num ); @@ -162,7 +162,7 @@ void KMAcctMaildir::processNewMail(bool) } if (!addedOk) break; - QString statusMsg = statusMsgStub.arg(i); + TQString statusMsg = statusMsgStub.arg(i); mMailCheckProgressItem->incCompletedItems(); mMailCheckProgressItem->updateProgress(); mMailCheckProgressItem->setStatus( statusMsg ); @@ -228,7 +228,7 @@ void KMAcctMaildir::writeConfig(KConfig& config) } //----------------------------------------------------------------------------- -void KMAcctMaildir::setLocation(const QString& aLocation) +void KMAcctMaildir::setLocation(const TQString& aLocation) { mLocation = aLocation; } diff --git a/kmail/kmacctmaildir.h b/kmail/kmacctmaildir.h index 05b90833..1c655861 100644 --- a/kmail/kmacctmaildir.h +++ b/kmail/kmacctmaildir.h @@ -12,7 +12,7 @@ class KMAcctMaildir: public KMAccount protected: friend class ::AccountManager; - KMAcctMaildir(AccountManager* owner, const QString& accountName, uint id); + KMAcctMaildir(AccountManager* owner, const TQString& accountName, uint id); public: virtual ~KMAcctMaildir(); @@ -21,16 +21,16 @@ public: /** Access to location of maildir mail file (usually something like "/home/joe/Maildir"). */ - const QString& location(void) const { return mLocation; } - virtual void setLocation(const QString&); + const TQString& location(void) const { return mLocation; } + virtual void setLocation(const TQString&); - virtual QString type(void) const; + virtual TQString type(void) const; virtual void processNewMail(bool); virtual void readConfig(KConfig&); virtual void writeConfig(KConfig&); protected: - QString mLocation; + TQString mLocation; bool hasNewMail; }; diff --git a/kmail/kmacctseldlg.cpp b/kmail/kmacctseldlg.cpp index e381b630..44df37c6 100644 --- a/kmail/kmacctseldlg.cpp +++ b/kmail/kmacctseldlg.cpp @@ -24,36 +24,36 @@ #include #endif -#include -#include -#include +#include +#include +#include #include #include "kmacctseldlg.moc" -KMAcctSelDlg::KMAcctSelDlg( QWidget *parent, const char *name, bool modal ) +KMAcctSelDlg::KMAcctSelDlg( TQWidget *parent, const char *name, bool modal ) : KDialogBase( parent, name, modal, i18n("Add Account"), Ok|Cancel, Ok ) { - QFrame *page = makeMainWidget(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); - QButtonGroup *group = new QButtonGroup( i18n("Account Type"), page ); - connect(group, SIGNAL(clicked(int)), SLOT(buttonClicked(int)) ); + TQButtonGroup *group = new TQButtonGroup( i18n("Account Type"), page ); + connect(group, TQT_SIGNAL(clicked(int)), TQT_SLOT(buttonClicked(int)) ); topLayout->addWidget( group, 10 ); - QVBoxLayout *vlay = new QVBoxLayout( group, spacingHint()*2, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( group, spacingHint()*2, spacingHint() ); vlay->addSpacing( fontMetrics().lineSpacing() ); - QRadioButton *radioButton1 = new QRadioButton( i18n("&Local mailbox"), group ); + TQRadioButton *radioButton1 = new TQRadioButton( i18n("&Local mailbox"), group ); vlay->addWidget( radioButton1 ); - QRadioButton *radioButton2 = new QRadioButton( i18n("&POP3"), group ); + TQRadioButton *radioButton2 = new TQRadioButton( i18n("&POP3"), group ); vlay->addWidget( radioButton2 ); - QRadioButton *radioButton3 = new QRadioButton( i18n("&IMAP"), group ); + TQRadioButton *radioButton3 = new TQRadioButton( i18n("&IMAP"), group ); vlay->addWidget( radioButton3 ); - QRadioButton *radioButton4 = new QRadioButton( i18n("&Disconnected IMAP"), group ); + TQRadioButton *radioButton4 = new TQRadioButton( i18n("&Disconnected IMAP"), group ); vlay->addWidget( radioButton4 ); - QRadioButton *radioButton5 = new QRadioButton( i18n("&Maildir mailbox"), group ); + TQRadioButton *radioButton5 = new TQRadioButton( i18n("&Maildir mailbox"), group ); vlay->addWidget( radioButton5 ); vlay->addStretch( 10 ); diff --git a/kmail/kmacctseldlg.h b/kmail/kmacctseldlg.h index 00f1fec9..3aad59b1 100644 --- a/kmail/kmacctseldlg.h +++ b/kmail/kmacctseldlg.h @@ -32,7 +32,7 @@ class KMAcctSelDlg: public KDialogBase Q_OBJECT public: - KMAcctSelDlg( QWidget *parent=0, const char *name=0, bool modal=true ); + KMAcctSelDlg( TQWidget *parent=0, const char *name=0, bool modal=true ); /** * Returns selected button from the account selection group: diff --git a/kmail/kmaddrbook.cpp b/kmail/kmaddrbook.cpp index 288784db..b115f54e 100644 --- a/kmail/kmaddrbook.cpp +++ b/kmail/kmaddrbook.cpp @@ -32,33 +32,33 @@ #include #include -#include +#include -void KabcBridge::addresses(QStringList& result) // includes lists +void KabcBridge::addresses(TQStringList& result) // includes lists { KCursorSaver busy(KBusyPtr::busy()); // loading might take a while KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); KABC::AddressBook::ConstIterator it; for( it = addressBook->begin(); it != addressBook->end(); ++it ) { - const QStringList emails = (*it).emails(); - QString n = (*it).prefix() + " " + + const TQStringList emails = (*it).emails(); + TQString n = (*it).prefix() + " " + (*it).givenName() + " " + (*it).additionalName() + " " + (*it).familyName() + " " + (*it).suffix(); n = n.simplifyWhiteSpace(); - QRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]"); - QString endQuote = "\" "; - QStringList::ConstIterator mit; - QString addr, email; + TQRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]"); + TQString endQuote = "\" "; + TQStringList::ConstIterator mit; + TQString addr, email; for ( mit = emails.begin(); mit != emails.end(); ++mit ) { email = *mit; if (!email.isEmpty()) { if (n.isEmpty() || (email.find( '<' ) != -1)) - addr = QString::null; + addr = TQString::null; else { // do we really need quotes around this name ? if (n.find(needQuotes) != -1) addr = '"' + n + endQuote; @@ -84,9 +84,9 @@ void KabcBridge::addresses(QStringList& result) // includes lists result.sort(); } -QStringList KabcBridge::addresses() +TQStringList KabcBridge::addresses() { - QStringList entries; + TQStringList entries; KABC::AddressBook::ConstIterator it; const KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); @@ -97,34 +97,34 @@ QStringList KabcBridge::addresses() } //----------------------------------------------------------------------------- -QString KabcBridge::expandNickName( const QString& nickName ) +TQString KabcBridge::expandNickName( const TQString& nickName ) { if ( nickName.isEmpty() ) - return QString::null; + return TQString::null; - const QString lowerNickName = nickName.lower(); + const TQString lowerNickName = nickName.lower(); const KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); for( KABC::AddressBook::ConstIterator it = addressBook->begin(); it != addressBook->end(); ++it ) { if ( (*it).nickName().lower() == lowerNickName ) return (*it).fullEmail(); } - return QString::null; + return TQString::null; } //----------------------------------------------------------------------------- -QStringList KabcBridge::categories() +TQStringList KabcBridge::categories() { KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); KABC::Addressee::List addresses = addressBook->allAddressees(); - QStringList allcategories, aux; + TQStringList allcategories, aux; for ( KABC::Addressee::List::Iterator it = addresses.begin(); it != addresses.end(); ++it ) { aux = ( *it ).categories(); - for ( QStringList::ConstIterator itAux = aux.begin(); + for ( TQStringList::ConstIterator itAux = aux.begin(); itAux != aux.end(); ++itAux ) { // don't have duplicates in allcategories if ( allcategories.find( *itAux ) == allcategories.end() ) diff --git a/kmail/kmaddrbook.h b/kmail/kmaddrbook.h index bc4205a2..119943f0 100644 --- a/kmail/kmaddrbook.h +++ b/kmail/kmaddrbook.h @@ -20,7 +20,7 @@ #ifndef KMAddrBook_h #define KMAddrBook_h -#include +#include #include #include @@ -29,14 +29,14 @@ class QWidget; class KabcBridge { public: - static QStringList addresses(); - static void addresses(QStringList& result); - static QString expandNickName( const QString& nickName ); + static TQStringList addresses(); + static void addresses(TQStringList& result); + static TQString expandNickName( const TQString& nickName ); /** Returns all categories found in the addressbook. @return A list of the categories */ - static QStringList categories(); + static TQStringList categories(); }; diff --git a/kmail/kmailIface.h b/kmail/kmailIface.h index 1a4a04f2..fd47f048 100644 --- a/kmail/kmailIface.h +++ b/kmail/kmailIface.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include /** checkMail wont show reader but will check mail. use openReader to show if you give a filename to openReader it will show mbox or @@ -20,53 +20,53 @@ class KMailIface : virtual public DCOPObject k_dcop: virtual void checkMail() = 0; - virtual QStringList accounts() = 0; - virtual void checkAccount(const QString &account) = 0; + virtual TQStringList accounts() = 0; + virtual void checkAccount(const TQString &account) = 0; virtual void openReader() = 0; - virtual int openComposer(const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body, int hidden, + virtual int openComposer(const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body, int hidden, const KURL &messageFile) = 0; - virtual int openComposer(const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body, int hidden, + virtual int openComposer(const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body, int hidden, const KURL &messageFile, const KURL &attachURL) = 0; - virtual int openComposer(const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body, int hidden, + virtual int openComposer(const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body, int hidden, const KURL &messageFile, const KURL::List &attachURLs) = 0; - virtual int openComposer (const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body, int hidden, - const QString &attachName, - const QCString &attachCte, - const QCString &attachData, - const QCString &attachType, - const QCString &attachSubType, - const QCString &attachParamAttr, - const QString &attachParamValue, - const QCString &attachContDisp) = 0; - virtual int openComposer (const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body, int hidden, - const QString &attachName, - const QCString &attachCte, - const QCString &attachData, - const QCString &attachType, - const QCString &attachSubType, - const QCString &attachParamAttr, - const QString &attachParamValue, - const QCString &attachContDisp, - const QCString &attachCharset) = 0; + virtual int openComposer (const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body, int hidden, + const TQString &attachName, + const TQCString &attachCte, + const TQCString &attachData, + const TQCString &attachType, + const TQCString &attachSubType, + const TQCString &attachParamAttr, + const TQString &attachParamValue, + const TQCString &attachContDisp) = 0; + virtual int openComposer (const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body, int hidden, + const TQString &attachName, + const TQCString &attachCte, + const TQCString &attachData, + const TQCString &attachType, + const TQCString &attachSubType, + const TQCString &attachParamAttr, + const TQString &attachParamValue, + const TQCString &attachContDisp, + const TQCString &attachCharset) = 0; /** Open composer and return reference to DCOP interface of composer window. If hidden is true, the window will not be shown. If you use that option, it's your responsibility to call the send() function of the composer in order to actually send the mail. */ - virtual DCOPRef openComposer(const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body, bool hidden) = 0; + virtual DCOPRef openComposer(const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body, bool hidden) = 0; /** Send a certificate request to the CA specified in \a to. The @@ -75,8 +75,8 @@ k_dcop: This method will set content type encoding, mime types, etc. as per the MailTT specification. */ - virtual int sendCertificate( const QString& to, - const QByteArray& certData ) = 0; + virtual int sendCertificate( const TQString& to, + const TQByteArray& certData ) = 0; virtual void compactAllFolders() = 0; @@ -96,16 +96,16 @@ k_dcop: =-3, Can't allocate memory. =-4, Message already exists in folder. */ - virtual int dcopAddMessage(const QString & foldername, - const QString & messagefile, - const QString & MsgStatusFlags = QString()) = 0; - virtual int dcopAddMessage(const QString & foldername, + virtual int dcopAddMessage(const TQString & foldername, + const TQString & messagefile, + const TQString & MsgStatusFlags = TQString()) = 0; + virtual int dcopAddMessage(const TQString & foldername, const KURL & messagefile, - const QString & MsgStatusFlags = QString()) = 0; + const TQString & MsgStatusFlags = TQString()) = 0; - virtual QStringList folderList() const =0; - virtual DCOPRef getFolder( const QString& vpath ) =0; - virtual void selectFolder( QString folder ) =0; + virtual TQStringList folderList() const =0; + virtual DCOPRef getFolder( const TQString& vpath ) =0; + virtual void selectFolder( TQString folder ) =0; virtual bool canQueryClose() =0; /** @@ -113,7 +113,7 @@ k_dcop: * @param transport the name of the transport as defined in the sending accounts configuration. */ - virtual void setDefaultTransport( const QString & transport ) =0; + virtual void setDefaultTransport( const TQString & transport ) =0; virtual int timeOfLastMessageCountChange() const =0; @@ -141,7 +141,7 @@ k_dcop: k_dcop_signals: void unreadCountChanged(); - void unreadCountChanged( const QString& folderURL, int numUnread ); + void unreadCountChanged( const TQString& folderURL, int numUnread ); k_dcop_hidden: /** DCOP call which is used by the Kontact plugin to create a new message. @@ -149,9 +149,9 @@ k_dcop_hidden: * @TODO Rename to newMessageInternal() * @TODO Merge this and the various openComposer methods for better code reuse */ - virtual DCOPRef newMessage(const QString &to, - const QString &cc, - const QString& bcc, + virtual DCOPRef newMessage(const TQString &to, + const TQString &cc, + const TQString& bcc, bool hidden, bool useFolderId, const KURL &messageFile, @@ -162,7 +162,7 @@ k_dcop_hidden: @param messageId this parameter is ignored. */ /* @TODO Get rid of the messageId parameter. */ - virtual bool showMail( Q_UINT32 serialNumber, QString messageId ) = 0; + virtual bool showMail( Q_UINT32 serialNumber, TQString messageId ) = 0; /** * DCOP-enabled for KMailUniqueAppHandler in the kontact plugin @@ -179,9 +179,9 @@ k_dcop_hidden: * * DCOP-enabled for use in kaddressbook drop */ - virtual QString getFrom( Q_UINT32 serialNumber ) = 0; - virtual QString debugScheduler() = 0; - virtual QString debugSernum( Q_UINT32 serialNumber ) = 0; + virtual TQString getFrom( Q_UINT32 serialNumber ) = 0; + virtual TQString debugScheduler() = 0; + virtual TQString debugSernum( Q_UINT32 serialNumber ) = 0; /** Does essentially the same as dcopAddMessage except that it doesn't reject duplicate messages. @@ -201,19 +201,19 @@ k_dcop_hidden: =-3, Can't allocate memory. =-4, Message already exists in folder. */ - virtual int dcopAddMessage_fastImport(const QString & foldername, - const QString & messagefile, - const QString & MsgStatusFlags = QString()) = 0; - virtual int dcopAddMessage_fastImport(const QString & foldername, + virtual int dcopAddMessage_fastImport(const TQString & foldername, + const TQString & messagefile, + const TQString & MsgStatusFlags = TQString()) = 0; + virtual int dcopAddMessage_fastImport(const TQString & foldername, const KURL & messagefile, - const QString & MsgStatusFlags = QString()) = 0; + const TQString & MsgStatusFlags = TQString()) = 0; /** Clears the list of added message ids which is used to filter out duplicates. */ virtual void dcopResetAddMessage() = 0; - virtual void loadProfile( const QString& path ) = 0; - virtual void saveToProfile( const QString& path ) const = 0; + virtual void loadProfile( const TQString& path ) = 0; + virtual void saveToProfile( const TQString& path ) const = 0; }; #endif diff --git a/kmail/kmail_part.cpp b/kmail/kmail_part.cpp index e9722c25..22d48f1e 100644 --- a/kmail/kmail_part.cpp +++ b/kmail/kmail_part.cpp @@ -54,14 +54,14 @@ using KRecentAddress::RecentAddresses; #include -#include +#include typedef KParts::GenericFactory< KMailPart > KMailFactory; K_EXPORT_COMPONENT_FACTORY( libkmailpart, KMailFactory ) -KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList &) : +KMailPart::KMailPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &) : DCOPObject("KMailIface"), KParts::ReadOnlyPart(parent, name), mParentWidget( parentWidget ) { @@ -99,22 +99,22 @@ KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName, kapp->dcopClient()->resume(); // Ok. We are ready for DCOP requests. // create a canvas to insert our widget - QWidget *canvas = new QWidget(parentWidget, widgetName); - canvas->setFocusPolicy(QWidget::ClickFocus); + TQWidget *canvas = new TQWidget(parentWidget, widgetName); + canvas->setFocusPolicy(TQWidget::ClickFocus); setWidget(canvas); KGlobal::iconLoader()->addAppDir("kmail"); #if 0 //It's also possible to make a part out of a readerWin KMReaderWin *mReaderWin = new KMReaderWin( canvas, canvas, actionCollection() ); - connect(mReaderWin, SIGNAL(urlClicked(const KURL&,int)), - mReaderWin, SLOT(slotUrlClicked())); - QVBoxLayout *topLayout = new QVBoxLayout(canvas); + connect(mReaderWin, TQT_SIGNAL(urlClicked(const KURL&,int)), + mReaderWin, TQT_SLOT(slotUrlClicked())); + TQVBoxLayout *topLayout = new TQVBoxLayout(canvas); topLayout->addWidget(mReaderWin); mReaderWin->setAutoDelete( true ); kmkernel->inboxFolder()->open(); KMMessage *msg = kmkernel->inboxFolder()->getMsg(0); mReaderWin->setMsg( msg, true ); - mReaderWin->setFocusPolicy(QWidget::ClickFocus); + mReaderWin->setFocusPolicy(TQWidget::ClickFocus); mStatusBar = new KMailStatusBarExtension(this); //new KParts::SideBarExtension( kmkernel->mainWin()-mainKMWidget()->leftFrame(), this ); KGlobal::iconLoader()->addAppDir("kmail"); @@ -123,9 +123,9 @@ KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName, #else mainWidget = new KMMainWidget( canvas, "mainWidget", this, actionCollection(), kapp->config()); - QVBoxLayout *topLayout = new QVBoxLayout(canvas); + TQVBoxLayout *topLayout = new TQVBoxLayout(canvas); topLayout->addWidget(mainWidget); - mainWidget->setFocusPolicy(QWidget::ClickFocus); + mainWidget->setFocusPolicy(TQWidget::ClickFocus); mStatusBar = new KMailStatusBarExtension(this); mStatusBar->addStatusBarItem( mainWidget->vacationScriptIndicator(), 2, false ); @@ -135,20 +135,20 @@ KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName, // Get to know when the user clicked on a folder in the KMail part and update the headerWidget of Kontact KParts::InfoExtension *ie = new KParts::InfoExtension( this, "KMailInfo" ); - connect( mainWidget->folderTree(), SIGNAL(folderSelected(KMFolder*)), this, SLOT(exportFolder(KMFolder*)) ); - connect( mainWidget->folderTree(), SIGNAL(iconChanged(KMFolderTreeItem*)), - this, SLOT(slotIconChanged(KMFolderTreeItem*)) ); - connect( mainWidget->folderTree(), SIGNAL(nameChanged(KMFolderTreeItem*)), - this, SLOT(slotNameChanged(KMFolderTreeItem*)) ); - connect( this, SIGNAL(textChanged(const QString&)), ie, SIGNAL(textChanged(const QString&)) ); - connect( this, SIGNAL(iconChanged(const QPixmap&)), ie, SIGNAL(iconChanged(const QPixmap&)) ); + connect( mainWidget->folderTree(), TQT_SIGNAL(folderSelected(KMFolder*)), this, TQT_SLOT(exportFolder(KMFolder*)) ); + connect( mainWidget->folderTree(), TQT_SIGNAL(iconChanged(KMFolderTreeItem*)), + this, TQT_SLOT(slotIconChanged(KMFolderTreeItem*)) ); + connect( mainWidget->folderTree(), TQT_SIGNAL(nameChanged(KMFolderTreeItem*)), + this, TQT_SLOT(slotNameChanged(KMFolderTreeItem*)) ); + connect( this, TQT_SIGNAL(textChanged(const TQString&)), ie, TQT_SIGNAL(textChanged(const TQString&)) ); + connect( this, TQT_SIGNAL(iconChanged(const TQPixmap&)), ie, TQT_SIGNAL(iconChanged(const TQPixmap&)) ); KGlobal::iconLoader()->addAppDir( "kmail" ); setXMLFile( "kmail_part.rc" ); #endif KSettings::Dispatcher::self()->registerInstance( KMailFactory::instance(), mKMailKernel, - SLOT( slotConfigChanged() ) ); + TQT_SLOT( slotConfigChanged() ) ); } KMailPart::~KMailPart() @@ -231,7 +231,7 @@ void KMailPart::exit() delete this; } -QWidget* KMailPart::parentWidget() const +TQWidget* KMailPart::parentWidget() const { return mParentWidget; } diff --git a/kmail/kmail_part.h b/kmail/kmail_part.h index 7a4ed9b7..97a66751 100644 --- a/kmail/kmail_part.h +++ b/kmail/kmail_part.h @@ -34,7 +34,7 @@ #include #include -#include +#include #include class KInstance; @@ -53,11 +53,11 @@ class KDE_EXPORT KMailPart: public KParts::ReadOnlyPart, virtual public KMailPar { Q_OBJECT public: - KMailPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList &); + KMailPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &); virtual ~KMailPart(); - QWidget* parentWidget() const; + TQWidget* parentWidget() const; static KAboutData *createAboutData(); @@ -70,8 +70,8 @@ class KDE_EXPORT KMailPart: public KParts::ReadOnlyPart, virtual public KMailPar void slotNameChanged( KMFolderTreeItem *fti ); signals: - void textChanged( const QString& ); - void iconChanged( const QPixmap& ); + void textChanged( const TQString& ); + void iconChanged( const TQPixmap& ); protected: virtual bool openFile(); @@ -82,7 +82,7 @@ class KDE_EXPORT KMailPart: public KParts::ReadOnlyPart, virtual public KMailPar KMMainWidget *mainWidget; ActionManager *mActionManager; KMailStatusBarExtension *mStatusBar; - QWidget *mParentWidget; + TQWidget *mParentWidget; }; class KMailStatusBarExtension : public KParts::StatusBarExtension diff --git a/kmail/kmailicalIface.h b/kmail/kmailicalIface.h index 81948fdf..d5761103 100644 --- a/kmail/kmailicalIface.h +++ b/kmail/kmailicalIface.h @@ -33,7 +33,7 @@ #define KMAILICALIFACE_H #include -#include +#include #include // yes, this is this very header - but it tells dcopidl to include it @@ -51,10 +51,10 @@ k_dcop: struct SubResource { //dcopidl barfs on those constructors, but dcopidlng works SubResource() {} // for QValueList - SubResource( const QString& loc, const QString& lab, bool rw, bool ar ) + SubResource( const TQString& loc, const TQString& lab, bool rw, bool ar ) : location( loc ), label( lab ), writable( rw ), alarmRelevant( ar ) {} - QString location; // unique - QString label; // shown to the user + TQString location; // unique + TQString label; // shown to the user bool writable; bool alarmRelevant; }; @@ -69,101 +69,101 @@ k_dcop: /// This bitfield indicates which changes have been made in a folder, at syncing time. enum FolderChanges { NoChange = 0, Contents = 1, ACL = 2 }; - virtual bool isWritableFolder( const QString& type, - const QString& resource ) = 0; + virtual bool isWritableFolder( const TQString& type, + const TQString& resource ) = 0; - virtual KMailICalIface::StorageFormat storageFormat( const QString& resource ) = 0; + virtual KMailICalIface::StorageFormat storageFormat( const TQString& resource ) = 0; - virtual KURL getAttachment( const QString& resource, + virtual KURL getAttachment( const TQString& resource, Q_UINT32 sernum, - const QString& filename ) = 0; - virtual QString attachmentMimetype( const QString &resource, + const TQString& filename ) = 0; + virtual TQString attachmentMimetype( const TQString &resource, Q_UINT32 sernum, - const QString &filename ) = 0; + const TQString &filename ) = 0; - virtual QStringList listAttachments( const QString &resource, Q_UINT32 sernum ) = 0; + virtual TQStringList listAttachments( const TQString &resource, Q_UINT32 sernum ) = 0; /// Update a kolab storage entry. Returns the new mail serial number, /// or 0 if something went wrong. Can be used for adding as well. - virtual Q_UINT32 update( const QString& resource, + virtual Q_UINT32 update( const TQString& resource, Q_UINT32 sernum, - const QString& subject, - const QString& plainTextBody, - const QMap& customHeaders, - const QStringList& attachmentURLs, - const QStringList& attachmentMimetypes, - const QStringList& attachmentNames, - const QStringList& deletedAttachments ) = 0; - - virtual bool deleteIncidenceKolab( const QString& resource, + const TQString& subject, + const TQString& plainTextBody, + const TQMap& customHeaders, + const TQStringList& attachmentURLs, + const TQStringList& attachmentMimetypes, + const TQStringList& attachmentNames, + const TQStringList& deletedAttachments ) = 0; + + virtual bool deleteIncidenceKolab( const TQString& resource, Q_UINT32 sernum ) = 0; /// Return the number of mails that need to be looked at by incidencesKolab. /// This allows to call incidencesKolab in chunks. - virtual int incidencesKolabCount( const QString& mimetype /*ignored*/, - const QString& resource ) = 0; + virtual int incidencesKolabCount( const TQString& mimetype /*ignored*/, + const TQString& resource ) = 0; - virtual QMap incidencesKolab( const QString& mimetype, - const QString& resource, + virtual TQMap incidencesKolab( const TQString& mimetype, + const TQString& resource, int startIndex, int nbMessages ) = 0; /** * Return list of subresources. @p contentsType is * Mail, Calendar, Contact, Note, Task or Journal */ - virtual QValueList subresourcesKolab( const QString& contentsType ) = 0; + virtual TQValueList subresourcesKolab( const TQString& contentsType ) = 0; /** * Trigger the creation of a new resource folder with name @param resource * under parent @param. * @return success or failure */ - virtual bool addSubresource( const QString& resource, - const QString& parent, - const QString& contentsType ) = 0; + virtual bool addSubresource( const TQString& resource, + const TQString& parent, + const TQString& contentsType ) = 0; /** * Trigger the deletion of a new resource folder with id @param resource. * @return success or failure */ - virtual bool removeSubresource( const QString& resource ) = 0; + virtual bool removeSubresource( const TQString& resource ) = 0; /** * Causes all resource folders of the given type to be synced with the server. */ - virtual bool triggerSync( const QString & ) = 0; + virtual bool triggerSync( const TQString & ) = 0; k_dcop_signals: - void incidenceAdded( const QString& type, const QString& folder, - Q_UINT32 sernum, int format, const QString& entry ); - void asyncLoadResult( const QMap, const QString& type, - const QString& folder ); - void incidenceDeleted( const QString& type, const QString& folder, - const QString& uid ); - void signalRefresh( const QString& type, const QString& folder ); - void subresourceAdded( const QString& type, const QString& resource, - const QString& label, bool writable, bool alarmRelevant ); - void subresourceDeleted( const QString& type, const QString& resource ); + void incidenceAdded( const TQString& type, const TQString& folder, + Q_UINT32 sernum, int format, const TQString& entry ); + void asyncLoadResult( const TQMap, const TQString& type, + const TQString& folder ); + void incidenceDeleted( const TQString& type, const TQString& folder, + const TQString& uid ); + void signalRefresh( const TQString& type, const TQString& folder ); + void subresourceAdded( const TQString& type, const TQString& resource, + const TQString& label, bool writable, bool alarmRelevant ); + void subresourceDeleted( const TQString& type, const TQString& resource ); }; -inline QDataStream& operator<<( QDataStream& str, const KMailICalIface::SubResource& subResource ) +inline TQDataStream& operator<<( TQDataStream& str, const KMailICalIface::SubResource& subResource ) { str << subResource.location << subResource.label << subResource.writable << subResource.alarmRelevant; return str; } -inline QDataStream& operator>>( QDataStream& str, KMailICalIface::SubResource& subResource ) +inline TQDataStream& operator>>( TQDataStream& str, KMailICalIface::SubResource& subResource ) { str >> subResource.location >> subResource.label >> subResource.writable >> subResource.alarmRelevant; return str; } -inline QDataStream& operator<<( QDataStream& str, const KMailICalIface::StorageFormat& format ) +inline TQDataStream& operator<<( TQDataStream& str, const KMailICalIface::StorageFormat& format ) { Q_UINT32 foo = format; str << foo; return str; } -inline QDataStream& operator>>( QDataStream& str, KMailICalIface::StorageFormat& format ) +inline TQDataStream& operator>>( TQDataStream& str, KMailICalIface::StorageFormat& format ) { Q_UINT32 foo; str >> foo; diff --git a/kmail/kmailicalifaceimpl.cpp b/kmail/kmailicalifaceimpl.cpp index 38eb426f..c1f626f8 100644 --- a/kmail/kmailicalifaceimpl.cpp +++ b/kmail/kmailicalifaceimpl.cpp @@ -61,9 +61,9 @@ using KMail::AccountManager; #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -76,7 +76,7 @@ using KMail::AccountManager; using namespace KMail; // Local helper methods -static void vPartMicroParser( const QString& str, QString& s ); +static void vPartMicroParser( const TQString& str, TQString& s ); static void reloadFolderTree(); // The index in this array is the KMail::FolderContentsType enum @@ -95,12 +95,12 @@ static const struct { { "Journal", "application/x-vnd.kolab.journal", KFolderTreeItem::Journals, "journal", I18N_NOOP( "Journal" ) } }; -static QString folderContentsType( KMail::FolderContentsType type ) +static TQString folderContentsType( KMail::FolderContentsType type ) { return s_folderContentsType[type].contentsTypeStr; } -static QString folderKolabMimeType( KMail::FolderContentsType type ) +static TQString folderKolabMimeType( KMail::FolderContentsType type ) { return s_folderContentsType[type].mimetype; } @@ -110,7 +110,7 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::globalStorageFormat() cons == GlobalSettings::EnumTheIMAPResourceStorageFormat::XML ? StorageXML : StorageIcalVcard; } -static KMail::FolderContentsType folderContentsType( const QString& type ) +static KMail::FolderContentsType folderContentsType( const TQString& type ) { for ( uint i = 0 ; i < sizeof s_folderContentsType / sizeof *s_folderContentsType; ++i ) if ( type == s_folderContentsType[i].contentsTypeStr ) @@ -118,7 +118,7 @@ static KMail::FolderContentsType folderContentsType( const QString& type ) return KMail::ContentsTypeMail; } -static QString localizedDefaultFolderName( KMail::FolderContentsType type ) +static TQString localizedDefaultFolderName( KMail::FolderContentsType type ) { return i18n( s_folderContentsType[type].translatedName ); } @@ -152,15 +152,15 @@ ExtraFolder::~ExtraFolder() */ KMailICalIfaceImpl::KMailICalIfaceImpl() - : DCOPObject( "KMailICalIface" ), QObject( 0, "KMailICalIfaceImpl" ), + : DCOPObject( "KMailICalIface" ), TQObject( 0, "KMailICalIfaceImpl" ), mContacts( 0 ), mCalendar( 0 ), mNotes( 0 ), mTasks( 0 ), mJournals( 0 ), mFolderLanguage( 0 ), mFolderParentDir( 0 ), mFolderType( KMFolderTypeUnknown ), mUseResourceIMAP( false ), mResourceQuiet( false ), mHideFolders( true ) { // Listen to config changes - connect( kmkernel, SIGNAL( configChanged() ), this, SLOT( readConfig() ) ); - connect( kmkernel, SIGNAL( folderRemoved( KMFolder* ) ), - this, SLOT( slotFolderRemoved( KMFolder* ) ) ); + connect( kmkernel, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( readConfig() ) ); + connect( kmkernel, TQT_SIGNAL( folderRemoved( KMFolder* ) ), + this, TQT_SLOT( slotFolderRemoved( KMFolder* ) ) ); mExtraFolders.setAutoDelete( true ); mAccumulators.setAutoDelete( true ); @@ -184,7 +184,7 @@ static DwBodyPart* findBodyPartByMimeType( const KMMessage& msg, const char* sTy DwMediaType& contentType = part->Headers().ContentType(); if ( startsWith ) { if ( contentType.TypeStr() == sType - && QString( contentType.SubtypeStr().c_str() ).startsWith( sSubtype ) ) + && TQString( contentType.SubtypeStr().c_str() ).startsWith( sSubtype ) ) return part; } else @@ -198,7 +198,7 @@ static DwBodyPart* findBodyPartByMimeType( const KMMessage& msg, const char* sTy } // Helper function to find an attachment with a given filename -static DwBodyPart* findBodyPart( const KMMessage& msg, const QString& attachmentName ) +static DwBodyPart* findBodyPart( const KMMessage& msg, const TQString& attachmentName ) { // quickly searching for our message part: since Kolab parts are // top-level parts we do *not* have to travel into embedded multiparts @@ -236,9 +236,9 @@ inline static void debugBodyParts( const char*, const KMMessage& ) {} // If lookupByName if false the attachment to replace is looked up by mimetype. // return value: wrong if attachment could not be added/updated bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, - const QString& attachmentURL, - const QString& attachmentName, - const QString& attachmentMimetype, + const TQString& attachmentURL, + const TQString& attachmentName, + const TQString& attachmentMimetype, bool lookupByName ) { kdDebug(5006) << "KMailICalIfaceImpl::updateAttachment( " << attachmentURL << " )" << endl; @@ -247,10 +247,10 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, KURL url( attachmentURL ); if ( url.isValid() && url.isLocalFile() ) { - const QString fileName( url.path() ); - QFile file( fileName ); + const TQString fileName( url.path() ); + TQFile file( fileName ); if( file.open( IO_ReadOnly ) ) { - QByteArray rawData = file.readAll(); + TQByteArray rawData = file.readAll(); file.close(); // create the new message part with data read from temp file @@ -258,15 +258,15 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, msgPart.setName( attachmentName ); const int iSlash = attachmentMimetype.find('/'); - const QCString sType = attachmentMimetype.left( iSlash ).latin1(); - const QCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1(); + const TQCString sType = attachmentMimetype.left( iSlash ).latin1(); + const TQCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1(); msgPart.setTypeStr( sType ); msgPart.setSubtypeStr( sSubtype ); - QCString ctd("attachment;\n filename=\""); + TQCString ctd("attachment;\n filename=\""); ctd.append( attachmentName.latin1() ); ctd.append("\""); msgPart.setContentDisposition( ctd ); - QValueList dummy; + TQValueList dummy; msgPart.setBodyAndGuessCte( rawData, dummy ); msgPart.setPartSpecifier( fileName ); @@ -304,16 +304,16 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, } // Look for the attachment with the right mimetype -bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const QString& mimetype, QString& s ) +bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s ) { const int iSlash = mimetype.find('/'); - const QCString sType = mimetype.left( iSlash ).latin1(); - const QCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); + const TQCString sType = mimetype.left( iSlash ).latin1(); + const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); DwBodyPart* part = findBodyPartByMimeType( msg, sType, sSubtype, true /* starts with sSubtype, to accept application/x-vnd.kolab.contact.distlist */ ); if ( part ) { KMMessagePart msgPart; KMMessage::bodyPart(part, &msgPart); - s = msgPart.bodyToUnicode( QTextCodec::codecForName( "utf8" ) ); + s = msgPart.bodyToUnicode( TQTextCodec::codecForName( "utf8" ) ); return true; } return false; @@ -326,7 +326,7 @@ bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const QS // the attachment by an empty dummy attachment since Mimelib // does not provide an option for deleting attachments yet. bool KMailICalIfaceImpl::deleteAttachment( KMMessage& msg, - const QString& attachmentName ) + const TQString& attachmentName ) { kdDebug(5006) << "KMailICalIfaceImpl::deleteAttachment( " << attachmentName << " )" << endl; @@ -381,7 +381,7 @@ static void setIcalVcardContentTypeHeader( KMMessage *msg, KMail::FolderContents } } -static void setXMLContentTypeHeader( KMMessage *msg, const QString plainTextBody ) +static void setXMLContentTypeHeader( KMMessage *msg, const TQString plainTextBody ) { // add a first body part to be displayed by all mailer // than can NOT display Kolab data: no matter if these @@ -400,12 +400,12 @@ static void setXMLContentTypeHeader( KMMessage *msg, const QString plainTextBody // Store a new entry that was received from the resource Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder, - const QString& subject, - const QString& plainTextBody, - const QMap& customHeaders, - const QStringList& attachmentURLs, - const QStringList& attachmentNames, - const QStringList& attachmentMimetypes ) + const TQString& subject, + const TQString& plainTextBody, + const TQMap& customHeaders, + const TQStringList& attachmentURLs, + const TQStringList& attachmentNames, + const TQStringList& attachmentMimetypes ) { kdDebug(5006) << "KMailICalIfaceImpl::addIncidenceKolab( " << attachmentNames << " )" << endl; @@ -418,8 +418,8 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder, msg->setSubject( subject ); msg->setAutomaticFields( true ); - QMap::ConstIterator ith = customHeaders.begin(); - const QMap::ConstIterator ithEnd = customHeaders.end(); + TQMap::ConstIterator ith = customHeaders.begin(); + const TQMap::ConstIterator ithEnd = customHeaders.end(); for ( ; ith != ithEnd ; ++ith ) { msg->setHeaderField( ith.key(), ith.data() ); } @@ -438,9 +438,9 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder, Q_ASSERT( attachmentMimetypes.count() == attachmentURLs.count() ); Q_ASSERT( attachmentNames.count() == attachmentURLs.count() ); // Add all attachments by reading them from their temp. files - QStringList::ConstIterator itmime = attachmentMimetypes.begin(); - QStringList::ConstIterator iturl = attachmentURLs.begin(); - for( QStringList::ConstIterator itname = attachmentNames.begin(); + TQStringList::ConstIterator itmime = attachmentMimetypes.begin(); + TQStringList::ConstIterator iturl = attachmentURLs.begin(); + for( TQStringList::ConstIterator itname = attachmentNames.begin(); itname != attachmentNames.end() && itmime != attachmentMimetypes.end() && iturl != attachmentURLs.end(); @@ -473,7 +473,7 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder, return sernum; } -bool KMailICalIfaceImpl::deleteIncidenceKolab( const QString& resource, +bool KMailICalIfaceImpl::deleteIncidenceKolab( const TQString& resource, Q_UINT32 sernum ) { // Find the message from the serial number and delete it. @@ -505,8 +505,8 @@ bool KMailICalIfaceImpl::deleteIncidenceKolab( const QString& resource, } -int KMailICalIfaceImpl::incidencesKolabCount( const QString& mimetype, - const QString& resource ) +int KMailICalIfaceImpl::incidencesKolabCount( const TQString& mimetype, + const TQString& resource ) { Q_UNUSED( mimetype ); // honouring that would be too slow... @@ -527,16 +527,16 @@ int KMailICalIfaceImpl::incidencesKolabCount( const QString& mimetype, return n; } -QMap KMailICalIfaceImpl::incidencesKolab( const QString& mimetype, - const QString& resource, +TQMap KMailICalIfaceImpl::incidencesKolab( const TQString& mimetype, + const TQString& resource, int startIndex, int nbMessages ) { /// Get the mimetype attachments from this folder. Returns a - /// QMap with serialNumber/attachment pairs. + /// TQMap with serialNumber/attachment pairs. /// (serial numbers of the mail are provided for easier later update) - QMap aMap; + TQMap aMap; if( !mUseResourceIMAP ) return aMap; @@ -562,8 +562,8 @@ QMap KMailICalIfaceImpl::incidencesKolab( const QString& mime #endif if ( msg ) { const int iSlash = mimetype.find('/'); - const QCString sType = mimetype.left( iSlash ).latin1(); - const QCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); + const TQCString sType = mimetype.left( iSlash ).latin1(); + const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); if ( sType.isEmpty() || sSubtype.isEmpty() ) { kdError(5006) << mimetype << " not an type/subtype combination" << endl; } else { @@ -571,13 +571,13 @@ QMap KMailICalIfaceImpl::incidencesKolab( const QString& mime if ( dwPart ) { KMMessagePart msgPart; KMMessage::bodyPart(dwPart, &msgPart); - aMap.insert(msg->getMsgSerNum(), msgPart.bodyToUnicode( QTextCodec::codecForName( "utf8" ) )); + aMap.insert(msg->getMsgSerNum(), msgPart.bodyToUnicode( TQTextCodec::codecForName( "utf8" ) )); } else { // Check if the whole message has the right types. This is what // happens in the case of ical storage, where the whole mail is // the data - const QCString type( msg->typeStr() ); - const QCString subtype( msg->subtypeStr() ); + const TQCString type( msg->typeStr() ); + const TQCString subtype( msg->subtypeStr() ); if (type.lower() == sType && subtype.lower() == sSubtype ) { aMap.insert( msg->getMsgSerNum(), msg->bodyToUnicode() ); } @@ -611,9 +611,9 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg ) // do we have an accumulator for this folder? Accumulator *ac = mAccumulators.find( parent->location() ); if( ac ) { - QString s; + TQString s; if ( !vPartFoundAndDecoded( msg, s ) ) return; - QString uid( "UID" ); + TQString uid( "UID" ); vPartMicroParser( s, uid ); const Q_UINT32 sernum = msg->getMsgSerNum(); mUIDToSerNum.insert( uid, sernum ); @@ -652,21 +652,21 @@ static int dimapAccountCount() return count; } -static QString subresourceLabelForPresentation( const KMFolder * folder ) +static TQString subresourceLabelForPresentation( const KMFolder * folder ) { - QString label = folder->prettyURL(); - QStringList parts = QStringList::split( QString::fromLatin1("/"), label ); + TQString label = folder->prettyURL(); + TQStringList parts = TQStringList::split( TQString::fromLatin1("/"), label ); // In the common special case of some other user's folder shared with us // the url looks like "Server Name/user/$USERNAME/Folder/Name". Make // those a bit nicer. - if ( parts[1] == QString::fromLatin1("user") ) { - QStringList remainder(parts); + if ( parts[1] == TQString::fromLatin1("user") ) { + TQStringList remainder(parts); remainder.pop_front(); remainder.pop_front(); remainder.pop_front(); label = i18n("%1's %2") .arg( parts[2] ) - .arg( remainder.join( QString::fromLatin1("/") ) ); + .arg( remainder.join( TQString::fromLatin1("/") ) ); } // Another special case is our own folders, under the imap INBOX, make // those prettier too @@ -674,16 +674,16 @@ static QString subresourceLabelForPresentation( const KMFolder * folder ) while ( parent->parent() && parent->parent()->owner() ) { parent = parent->parent()->owner(); if ( parent->isSystemFolder() ) { - QStringList remainder(parts); + TQStringList remainder(parts); remainder.pop_front(); remainder.pop_front(); if ( dimapAccountCount() > 1 ) { label = i18n( "My %1 (%2)") - .arg( remainder.join( QString::fromLatin1("/") ), + .arg( remainder.join( TQString::fromLatin1("/") ), static_cast( folder->storage() )->account()->name() ); } else { label = i18n("My %1") - .arg( remainder.join( QString::fromLatin1("/") ) ); + .arg( remainder.join( TQString::fromLatin1("/") ) ); } break; } @@ -692,12 +692,12 @@ static QString subresourceLabelForPresentation( const KMFolder * folder ) } /* list all available subresources */ -QValueList KMailICalIfaceImpl::subresourcesKolab( const QString& contentsType ) +TQValueList KMailICalIfaceImpl::subresourcesKolab( const TQString& contentsType ) { - QValueList subResources; + TQValueList subResources; // Add the default one - KMFolder* f = folderFromType( contentsType, QString::null ); + KMFolder* f = folderFromType( contentsType, TQString::null ); if ( f ) { subResources.append( SubResource( f->location(), subresourceLabelForPresentation( f ), !f->isReadOnly(), folderIsAlarmRelevant( f ) ) ); @@ -707,7 +707,7 @@ QValueList KMailICalIfaceImpl::subresourcesKola // get the extra ones const KMail::FolderContentsType t = folderContentsType( contentsType ); - QDictIterator it( mExtraFolders ); + TQDictIterator it( mExtraFolders ); for ( ; it.current(); ++it ){ f = it.current()->folder; if ( f && f->storage()->contentsType() == t ) { @@ -723,11 +723,11 @@ QValueList KMailICalIfaceImpl::subresourcesKola return subResources; } -bool KMailICalIfaceImpl::triggerSync( const QString& contentsType ) +bool KMailICalIfaceImpl::triggerSync( const TQString& contentsType ) { kdDebug(5006) << k_funcinfo << endl; - QValueList folderList = subresourcesKolab( contentsType ); - for ( QValueList::const_iterator it( folderList.begin() ), + TQValueList folderList = subresourcesKolab( contentsType ); + for ( TQValueList::const_iterator it( folderList.begin() ), end( folderList.end() ); it != end ; ++it ) { KMFolder * const f = findResourceFolder( (*it).location ); @@ -750,8 +750,8 @@ bool KMailICalIfaceImpl::triggerSync( const QString& contentsType ) } /* Used by the resource to query whether folders are writable. */ -bool KMailICalIfaceImpl::isWritableFolder( const QString& type, - const QString& resource ) +bool KMailICalIfaceImpl::isWritableFolder( const TQString& type, + const TQString& resource ) { KMFolder* f = folderFromType( type, resource ); if ( !f ) @@ -762,7 +762,7 @@ bool KMailICalIfaceImpl::isWritableFolder( const QString& type, } /* Used by the resource to query the storage format of the folder. */ -KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const QString& resource ) +KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const TQString& resource ) { StorageFormat format; KMFolder* f = findResourceFolder( resource ); @@ -787,15 +787,15 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const QStri // number, and the mail is just added instead. In this case // the deletedAttachments can be forgotten. */ -Q_UINT32 KMailICalIfaceImpl::update( const QString& resource, +Q_UINT32 KMailICalIfaceImpl::update( const TQString& resource, Q_UINT32 sernum, - const QString& subject, - const QString& plainTextBody, - const QMap& customHeaders, - const QStringList& attachmentURLs, - const QStringList& attachmentMimetypes, - const QStringList& attachmentNames, - const QStringList& deletedAttachments ) + const TQString& subject, + const TQString& plainTextBody, + const TQMap& customHeaders, + const TQStringList& attachmentURLs, + const TQStringList& attachmentMimetypes, + const TQStringList& attachmentNames, + const TQStringList& deletedAttachments ) { Q_UINT32 rc = 0; @@ -826,15 +826,15 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource, // Message found - make a copy and update it: KMMessage* newMsg = new KMMessage( *msg ); newMsg->setSubject( subject ); - QMap::ConstIterator ith = customHeaders.begin(); - const QMap::ConstIterator ithEnd = customHeaders.begin(); + TQMap::ConstIterator ith = customHeaders.begin(); + const TQMap::ConstIterator ithEnd = customHeaders.begin(); for ( ; ith != ithEnd ; ++ith ) newMsg->setHeaderField( ith.key(), ith.data() ); newMsg->setParent( 0 ); // workaround strange line in KMMsgBase::assign. newMsg is not in any folder yet. // Note that plainTextBody isn't used in this branch. We assume it's still valid from when the mail was created. // Delete some attachments according to list - for( QStringList::ConstIterator it = deletedAttachments.begin(); + for( TQStringList::ConstIterator it = deletedAttachments.begin(); it != deletedAttachments.end(); ++it ){ if( !deleteAttachment( *newMsg, *it ) ){ @@ -843,8 +843,8 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource, } const KMail::FolderContentsType t = f->storage()->contentsType(); - const QCString type = msg->typeStr(); - const QCString subtype = msg->subtypeStr(); + const TQCString type = msg->typeStr(); + const TQCString subtype = msg->subtypeStr(); const bool messageWasIcalVcardFormat = ( type.lower() == "text" && ( subtype.lower() == "calendar" || subtype.lower() == "x-vcard" ) ); @@ -862,9 +862,9 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource, } //kdDebug(5006) << k_funcinfo << " StorageFormatXML " << endl; // Add all attachments by reading them from their temp. files - QStringList::ConstIterator iturl = attachmentURLs.begin(); - QStringList::ConstIterator itmime = attachmentMimetypes.begin(); - QStringList::ConstIterator itname = attachmentNames.begin(); + TQStringList::ConstIterator iturl = attachmentURLs.begin(); + TQStringList::ConstIterator itmime = attachmentMimetypes.begin(); + TQStringList::ConstIterator itname = attachmentNames.begin(); for( ; iturl != attachmentURLs.end() && itmime != attachmentMimetypes.end() @@ -905,9 +905,9 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource, return rc; } -KURL KMailICalIfaceImpl::getAttachment( const QString& resource, +KURL KMailICalIfaceImpl::getAttachment( const TQString& resource, Q_UINT32 sernum, - const QString& filename ) + const TQString& filename ) { // This finds the attachment with the filename, saves it to a // temp file and returns a URL to it. It's up to the resource @@ -944,7 +944,7 @@ KURL KMailICalIfaceImpl::getAttachment( const QString& resource, // Save the contents of the attachment. KMMessagePart aPart; msg->bodyPart( part, &aPart ); - QByteArray rawData( aPart.bodyDecodedBinary() ); + TQByteArray rawData( aPart.bodyDecodedBinary() ); KTempFile file; file.file()->writeBlock( rawData.data(), rawData.size() ); @@ -965,16 +965,16 @@ KURL KMailICalIfaceImpl::getAttachment( const QString& resource, return url; } -QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource, +TQString KMailICalIfaceImpl::attachmentMimetype( const TQString & resource, Q_UINT32 sernum, - const QString & filename ) + const TQString & filename ) { if( !mUseResourceIMAP ) - return QString(); + return TQString(); KMFolder* f = findResourceFolder( resource ); if( !f || storageFormat( f ) != StorageXML ) { kdError(5006) << "attachmentMimetype(" << resource << ") : Wrong folder" << endl; - return QString(); + return TQString(); } KMMessage* msg = findMessageBySerNum( sernum, f ); @@ -984,7 +984,7 @@ QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource, if ( part ) { KMMessagePart kmPart; msg->bodyPart( part, &kmPart ); - return QString( kmPart.typeStr() ) + "/" + QString( kmPart.subtypeStr() ); + return TQString( kmPart.typeStr() ) + "/" + TQString( kmPart.subtypeStr() ); } else { kdDebug(5006) << "Attachment " << filename << " not found." << endl; } @@ -992,12 +992,12 @@ QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource, kdDebug(5006) << "Message not found." << endl; } - return QString(); + return TQString(); } -QStringList KMailICalIfaceImpl::listAttachments(const QString & resource, Q_UINT32 sernum) +TQStringList KMailICalIfaceImpl::listAttachments(const TQString & resource, Q_UINT32 sernum) { - QStringList rv; + TQStringList rv; if( !mUseResourceIMAP ) return rv; @@ -1016,10 +1016,10 @@ QStringList KMailICalIfaceImpl::listAttachments(const QString & resource, Q_UINT if( msg ) { for ( DwBodyPart* part = msg->getFirstDwBodyPart(); part; part = part->Next() ) { if ( part->hasHeaders() ) { - QString name; + TQString name; DwMediaType& contentType = part->Headers().ContentType(); - if ( QString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." ) - || QString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) ) + if ( TQString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." ) + || TQString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) ) continue; if ( !part->Headers().ContentDisposition().Filename().empty() ) name = part->Headers().ContentDisposition().Filename().c_str(); @@ -1061,7 +1061,7 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder, return; // kdDebug(5006) << "KMailICalIfaceImpl::slotIncidenceAdded" << endl; - QString type = folderContentsType( folder->storage()->contentsType() ); + TQString type = folderContentsType( folder->storage()->contentsType() ); if( type.isEmpty() ) { kdError(5006) << "Not an IMAP resource folder" << endl; return; @@ -1073,8 +1073,8 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder, assert( folder == aFolder ); bool unget = !folder->isMessage( i ); - QString s; - QString uid( "UID" ); + TQString s; + TQString uid( "UID" ); KMMessage *msg = folder->getMsg( i ); if( !msg ) return; if( msg->isComplete() ) { @@ -1115,8 +1115,8 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder, // TODO: Till, port me if ( unget ) mTheUnGetMes.insert( msg->getMsgSerNum(), true ); FolderJob *job = msg->parent()->createJob( msg ); - connect( job, SIGNAL( messageRetrieved( KMMessage* ) ), - this, SLOT( slotMessageRetrieved( KMMessage* ) ) ); + connect( job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ), + this, TQT_SLOT( slotMessageRetrieved( KMMessage* ) ) ); job->start(); return; } @@ -1130,7 +1130,7 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder, if( mResourceQuiet || !mUseResourceIMAP ) return; - QString type = folderContentsType( folder->storage()->contentsType() ); + TQString type = folderContentsType( folder->storage()->contentsType() ); //kdDebug(5006) << folder << " " << type << " " << sernum << endl; if( !type.isEmpty() ) { // Get the index of the mail @@ -1141,10 +1141,10 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder, // Read the iCal or vCard bool unget = !folder->isMessage( i ); - QString s; + TQString s; bool ok = false; KMMessage* msg = folder->getMsg( i ); - QString uid( "UID" ); + TQString uid( "UID" ); switch( storageFormat( folder ) ) { case StorageIcalVcard: if( vPartFoundAndDecoded( msg, s ) ) { @@ -1171,10 +1171,10 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder, } // KMail orders a refresh -void KMailICalIfaceImpl::slotRefresh( const QString& type ) +void KMailICalIfaceImpl::slotRefresh( const TQString& type ) { if( mUseResourceIMAP ) { - signalRefresh( type, QString::null /* PENDING(bo) folder->location() */ ); + signalRefresh( type, TQString::null /* PENDING(bo) folder->location() */ ); kdDebug(5006) << "Emitting DCOP signal signalRefresh( " << type << " )" << endl; } } @@ -1200,8 +1200,8 @@ void KMailICalIfaceImpl::slotRefreshFolder( KMFolder* folder) * The folder and message stuff code */ -KMFolder* KMailICalIfaceImpl::folderFromType( const QString& type, - const QString& folder ) +KMFolder* KMailICalIfaceImpl::folderFromType( const TQString& type, + const TQString& folder ) { if( mUseResourceIMAP ) { KMFolder* f = 0; @@ -1272,8 +1272,8 @@ KFolderTreeItem::Type KMailICalIfaceImpl::folderType( KMFolder* folder ) const // Global tables of foldernames is different languages // For now: 0->English, 1->German, 2->French, 3->Dutch -static QMap folderNames[4]; -QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const +static TQMap folderNames[4]; +TQString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const { // With the XML storage, folders are always (internally) named in English if ( GlobalSettings::self()->theIMAPResourceStorageFormat() == GlobalSettings::EnumTheIMAPResourceStorageFormat::XML ) @@ -1286,33 +1286,33 @@ QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language GroupwarePage in configuredialog.cpp */ // English - folderNames[0][KFolderTreeItem::Calendar] = QString::fromLatin1("Calendar"); - folderNames[0][KFolderTreeItem::Tasks] = QString::fromLatin1("Tasks"); - folderNames[0][KFolderTreeItem::Journals] = QString::fromLatin1("Journal"); - folderNames[0][KFolderTreeItem::Contacts] = QString::fromLatin1("Contacts"); - folderNames[0][KFolderTreeItem::Notes] = QString::fromLatin1("Notes"); + folderNames[0][KFolderTreeItem::Calendar] = TQString::fromLatin1("Calendar"); + folderNames[0][KFolderTreeItem::Tasks] = TQString::fromLatin1("Tasks"); + folderNames[0][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal"); + folderNames[0][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contacts"); + folderNames[0][KFolderTreeItem::Notes] = TQString::fromLatin1("Notes"); // German - folderNames[1][KFolderTreeItem::Calendar] = QString::fromLatin1("Kalender"); - folderNames[1][KFolderTreeItem::Tasks] = QString::fromLatin1("Aufgaben"); - folderNames[1][KFolderTreeItem::Journals] = QString::fromLatin1("Journal"); - folderNames[1][KFolderTreeItem::Contacts] = QString::fromLatin1("Kontakte"); - folderNames[1][KFolderTreeItem::Notes] = QString::fromLatin1("Notizen"); + folderNames[1][KFolderTreeItem::Calendar] = TQString::fromLatin1("Kalender"); + folderNames[1][KFolderTreeItem::Tasks] = TQString::fromLatin1("Aufgaben"); + folderNames[1][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal"); + folderNames[1][KFolderTreeItem::Contacts] = TQString::fromLatin1("Kontakte"); + folderNames[1][KFolderTreeItem::Notes] = TQString::fromLatin1("Notizen"); // French - folderNames[2][KFolderTreeItem::Calendar] = QString::fromLatin1("Calendrier"); + folderNames[2][KFolderTreeItem::Calendar] = TQString::fromLatin1("Calendrier"); // Tasks = Tâches (â == 0xE2 in latin1) - folderNames[2][KFolderTreeItem::Tasks] = QString::fromLatin1("T\342ches"); - folderNames[2][KFolderTreeItem::Journals] = QString::fromLatin1("Journal"); - folderNames[2][KFolderTreeItem::Contacts] = QString::fromLatin1("Contacts"); - folderNames[2][KFolderTreeItem::Notes] = QString::fromLatin1("Notes"); + folderNames[2][KFolderTreeItem::Tasks] = TQString::fromLatin1("T\342ches"); + folderNames[2][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal"); + folderNames[2][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contacts"); + folderNames[2][KFolderTreeItem::Notes] = TQString::fromLatin1("Notes"); // Dutch - folderNames[3][KFolderTreeItem::Calendar] = QString::fromLatin1("Agenda"); - folderNames[3][KFolderTreeItem::Tasks] = QString::fromLatin1("Taken"); - folderNames[3][KFolderTreeItem::Journals] = QString::fromLatin1("Logboek"); - folderNames[3][KFolderTreeItem::Contacts] = QString::fromLatin1("Contactpersonen"); - folderNames[3][KFolderTreeItem::Notes] = QString::fromLatin1("Notities"); + folderNames[3][KFolderTreeItem::Calendar] = TQString::fromLatin1("Agenda"); + folderNames[3][KFolderTreeItem::Tasks] = TQString::fromLatin1("Taken"); + folderNames[3][KFolderTreeItem::Journals] = TQString::fromLatin1("Logboek"); + folderNames[3][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contactpersonen"); + folderNames[3][KFolderTreeItem::Notes] = TQString::fromLatin1("Notities"); } if( language < 0 || language > 3 ) { @@ -1325,7 +1325,7 @@ QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language // Find message matching a given UID -KMMessage *KMailICalIfaceImpl::findMessageByUID( const QString& uid, KMFolder* folder ) +KMMessage *KMailICalIfaceImpl::findMessageByUID( const TQString& uid, KMFolder* folder ) { if( !folder || !mUIDToSerNum.contains( uid ) ) return 0; int i; @@ -1389,7 +1389,7 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder, return; // Check if already know that 'extra folder' - const QString location = folder->location(); + const TQString location = folder->location(); ExtraFolder* ef = mExtraFolders.find( location ); if ( ef && ef->folder ) { // Notify that the old folder resource is no longer available @@ -1422,9 +1422,9 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder, // coworker appears as /user/hirohito/Kalender, although Hirohito sees his folder // in Japanese. On the server the folders are always in English. if ( folder->folderType() == KMFolderTypeCachedImap ) { - QString annotation = static_cast( folder->storage() )->annotationFolderType(); + TQString annotation = static_cast( folder->storage() )->annotationFolderType(); kdDebug(5006) << "folderContentsTypeChanged: " << folder->name() << " has annotation " << annotation << endl; - if ( annotation == QString( s_folderContentsType[contentsType].annotation ) + ".default" ) + if ( annotation == TQString( s_folderContentsType[contentsType].annotation ) + ".default" ) folder->setLabel( localizedDefaultFolderName( contentsType ) ); } @@ -1435,8 +1435,8 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder, !folder->isReadOnly(), folderIsAlarmRelevant( folder ) ); } -KMFolder* KMailICalIfaceImpl::extraFolder( const QString& type, - const QString& folder ) +KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type, + const TQString& folder ) { // If an extra folder exists that matches the type and folder location, // use that @@ -1488,7 +1488,7 @@ void KMailICalIfaceImpl::addFolderChange( KMFolder* folder, FolderChanges change KMailICalIfaceImpl::FolderInfo KMailICalIfaceImpl::readFolderInfo( const KMFolder * const folder ) const { KConfigGroup configGroup( kmkernel->config(), "GroupwareFolderInfo" ); - QString str = configGroup.readEntry( folder->idString() + "-storageFormat", "unset" ); + TQString str = configGroup.readEntry( folder->idString() + "-storageFormat", "unset" ); FolderInfo info; if ( str == "unset" ) { info.mStorageFormat = globalStorageFormat(); @@ -1542,7 +1542,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) httpURL.setPort( 0 ); // remove imap port // IMAP path is either /INBOX/ or /user/someone/ - QString path = folderURL.path( -1 ); + TQString path = folderURL.path( -1 ); Q_ASSERT( path.startsWith( "/" ) ); int secondSlash = path.find( '/', 1 ); if ( secondSlash == -1 ) { @@ -1560,7 +1560,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) } httpURL.setPath( "/freebusy/trigger/" + path + ".pfb" ); - httpURL.setQuery( QString::null ); + httpURL.setQuery( TQString::null ); // Ensure that we encode everything with UTF8 httpURL = KURL( httpURL.url(0,106), 106 ); kdDebug() << "Triggering PFB update for " << folderURL << " : getting " << httpURL << endl; @@ -1572,8 +1572,8 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) void KMailICalIfaceImpl::slotFolderPropertiesChanged( KMFolder* folder ) { if ( isResourceFolder( folder ) ) { - const QString location = folder->location(); - const QString contentsTypeStr = folderContentsType( folder->storage()->contentsType() ); + const TQString location = folder->location(); + const TQString contentsTypeStr = folderContentsType( folder->storage()->contentsType() ); subresourceDeleted( contentsTypeStr, location ); subresourceAdded( contentsTypeStr, location, subresourceLabelForPresentation( folder ), @@ -1589,8 +1589,8 @@ void KMailICalIfaceImpl::slotFolderRenamed() slotFolderPropertiesChanged( const_cast( folder ) ); } -void KMailICalIfaceImpl::slotFolderLocationChanged( const QString &oldLocation, - const QString &newLocation ) +void KMailICalIfaceImpl::slotFolderLocationChanged( const TQString &oldLocation, + const TQString &newLocation ) { KMFolder *folder = findResourceFolder( oldLocation ); ExtraFolder* ef = mExtraFolders.find( oldLocation ); @@ -1606,7 +1606,7 @@ void KMailICalIfaceImpl::slotFolderLocationChanged( const QString &oldLocation, } -KMFolder* KMailICalIfaceImpl::findResourceFolder( const QString& resource ) +KMFolder* KMailICalIfaceImpl::findResourceFolder( const TQString& resource ) { // Try the standard folders if( mCalendar && mCalendar->location() == resource ) @@ -1651,7 +1651,7 @@ void KMailICalIfaceImpl::readConfig() // Read remaining options const bool hideFolders = GlobalSettings::self()->hideGroupwareFolders(); - QString parentName = GlobalSettings::self()->theIMAPResourceFolderParent(); + TQString parentName = GlobalSettings::self()->theIMAPResourceFolderParent(); // Find the folder parent KMFolderDir* folderParentDir; @@ -1666,10 +1666,10 @@ void KMailICalIfaceImpl::readConfig() Q_ASSERT( account ); if ( account ) { // just in case we were connected already - disconnect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( slotCheckDone() ) ); - connect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( slotCheckDone() ) ); + disconnect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( slotCheckDone() ) ); + connect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( slotCheckDone() ) ); } mUseResourceIMAP = false; // We can't really call cleanup(), if those folders were completely deleted. @@ -1691,7 +1691,7 @@ void KMailICalIfaceImpl::readConfig() // Globally there are 3 cases: nothing found, some stuff found by type/name heuristics, or everything found OK bool noneFound = true; bool mustFix = false; // true when at least one was found by heuristics - QValueVector results( KMail::ContentsTypeLast + 1 ); + TQValueVector results( KMail::ContentsTypeLast + 1 ); for ( int i = 0; i < KMail::ContentsTypeLast+1; ++i ) { if ( i != KMail::ContentsTypeMail ) { results[i] = findStandardResourceFolder( folderParentDir, static_cast(i) ); @@ -1719,8 +1719,8 @@ void KMailICalIfaceImpl::readConfig() } if( noneFound || mustFix ) { - QString msg; - QString parentFolderName = folderParent != 0 ? folderParent->name() : folderParentDir->name(); + TQString msg; + TQString parentFolderName = folderParent != 0 ? folderParent->name() : folderParentDir->name(); if ( noneFound ) { // No subfolder was found, so ask if we can make them msg = i18n("KMail will now create the required groupware folders" @@ -1728,10 +1728,10 @@ void KMailICalIfaceImpl::readConfig() " and the IMAP resource will be disabled").arg(parentFolderName); } else { // Some subfolders were found, be more precise - QString operations = "