diff options
Diffstat (limited to 'kmail')
378 files changed, 15546 insertions, 15546 deletions
diff --git a/kmail/accountcombobox.cpp b/kmail/accountcombobox.cpp index afa8398eb..c89ed360a 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<KMAccount *> lst = applicableAccounts(); - QValueList<KMAccount *>::ConstIterator it = lst.begin(); + TQStringList accountNames; + TQValueList<KMAccount *> lst = applicableAccounts(); + TQValueList<KMAccount *>::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<KMAccount *> lst = applicableAccounts(); - QValueList<KMAccount *>::ConstIterator it = lst.begin(); + TQValueList<KMAccount *> lst = applicableAccounts(); + TQValueList<KMAccount *>::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<KMAccount *> lst = applicableAccounts(); - QValueList<KMAccount *>::ConstIterator it = lst.begin(); + TQValueList<KMAccount *> lst = applicableAccounts(); + TQValueList<KMAccount *>::ConstIterator it = lst.begin(); while ( it != lst.end() && i < currentItem() ) { ++it; ++i; @@ -91,9 +91,9 @@ KMAccount* AccountComboBox::currentAccount() const return 0; } -QValueList<KMAccount *> KMail::AccountComboBox::applicableAccounts() const +TQValueList<KMAccount *> KMail::AccountComboBox::applicableAccounts() const { - QValueList<KMAccount *> lst; + TQValueList<KMAccount *> 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 5c8d1bbd8..9229cb330 100644 --- a/kmail/accountcombobox.h +++ b/kmail/accountcombobox.h @@ -28,7 +28,7 @@ #ifndef KMAIL_ACCOUNTCOMBOBOX_H #define KMAIL_ACCOUNTCOMBOBOX_H -#include <qcombobox.h> +#include <tqcombobox.h> 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<KMAccount *> applicableAccounts() const; + TQValueList<KMAccount *> applicableAccounts() const; }; diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp index b517925a2..6203d3e87 100644 --- a/kmail/accountdialog.cpp +++ b/kmail/accountdialog.cpp @@ -21,20 +21,20 @@ #include "accountdialog.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qradiobutton.h> -#include <qvalidator.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qhbox.h> -#include <qcombobox.h> -#include <qheader.h> -#include <qtoolbutton.h> -#include <qgrid.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqradiobutton.h> +#include <tqvalidator.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqhbox.h> +#include <tqcombobox.h> +#include <tqheader.h> +#include <tqtoolbutton.h> +#include <tqgrid.h> #include <kfiledialog.h> #include <klocale.h> @@ -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<QString> 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<TQString> 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<QString> it( mVars ); // iterator for dict + TQAsciiDictIterator<TQString> 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 <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") ); + label = new TQLabel( i18n("&Login:"), page1 ); + TQWhatsThis::add( label, i18n("Your Internet Service Provider gave you a <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") ); 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 <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") ); + label = new TQLabel( i18n("&Login:"), page1 ); + TQWhatsThis::add( label, i18n("Your Internet Service Provider gave you a <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") ); 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<QGuardedPtr<KMFolder> >::Iterator it = mFolderList.at(i); + TQValueList<TQGuardedPtr<KMFolder> >::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<KMAcctLocal*>(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<ImapAccountBase*>( 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<ImapAccountBase*>( 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<int, NamespaceLineEdit*>::Iterator it; + TQMap<int, NamespaceLineEdit*>::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 784cee00b..837e23cf7 100644 --- a/kmail/accountdialog.h +++ b/kmail/accountdialog.h @@ -26,7 +26,7 @@ #include <kdialogbase.h> #include <klistview.h> #include <klineedit.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> #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<QGuardedPtr<KMFolder> > mFolderList; - QStringList mFolderNames; + TQValueList<TQGuardedPtr<KMFolder> > 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<int, NamespaceLineEdit*> mLineEditMap; - QButtonGroup* mBg; + TQMap<int, NamespaceLineEdit*> mLineEditMap; + TQButtonGroup* mBg; }; } // namespace KMail diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp index 54a1b4166..0610622f7 100644 --- a/kmail/accountmanager.cpp +++ b/kmail/accountmanager.cpp @@ -25,14 +25,14 @@ #include <kconfig.h> #include <kapplication.h> -#include <qregexp.h> -#include <qvaluelist.h> +#include <tqregexp.h> +#include <tqvaluelist.h> 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<NetworkAccount*>( 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<QString, int> & ) ), - this, SLOT( addToTotalNewMailCount( const QMap<QString, int> & ) ) ); + connect( act, TQT_SIGNAL( newMailsProcessed( const TQMap<TQString, int> & ) ), + this, TQT_SLOT( addToTotalNewMailCount( const TQMap<TQString, int> & ) ) ); 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<QString, int> & newInFolder ) +void AccountManager::addToTotalNewMailCount( const TQMap<TQString, int> & newInFolder ) { - for ( QMap<QString, int>::const_iterator it = newInFolder.begin(); + for ( TQMap<TQString, int>::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<QString, int> & newInFol //----------------------------------------------------------------------------- uint AccountManager::createId() { - QValueList<uint> usedIds; + TQValueList<uint> 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 fda0591f7..95b7b49e9 100644 --- a/kmail/accountmanager.h +++ b/kmail/accountmanager.h @@ -20,7 +20,7 @@ #ifndef accountmanager_h #define accountmanager_h -#include <qobject.h> +#include <tqobject.h> #include "kmaccount.h" #include <kdepimmacros.h> @@ -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<QString, int> & newInFolder ); + void addToTotalNewMailCount( const TQMap<TQString, int> & newInFolder ); signals: @@ -112,7 +112,7 @@ signals: * @param newInFolder number of new messages for each folder **/ void checkedMail( bool newMail, bool interactive, - const QMap<QString, int> & newInFolder ); + const TQMap<TQString, int> & 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<QString, int> mTotalNewInFolder; + TQMap<TQString, int> mTotalNewInFolder; // if a summary should be displayed bool mDisplaySummary; diff --git a/kmail/accountwizard.cpp b/kmail/accountwizard.cpp index cc831790d..de6c43178 100644 --- a/kmail/accountwizard.cpp +++ b/kmail/accountwizard.cpp @@ -32,13 +32,13 @@ #include <klistbox.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qdir.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qvbox.h> +#include <tqcheckbox.h> +#include <tqdir.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqvbox.h> #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( "<qt>It seems you have started KMail for the first time. " + new TQLabel( i18n( "<qt>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.</qt>" ), 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 0dea0e442..56cba599c 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<KMTransportInfo> mTransportInfoList; + TQPtrList<KMTransportInfo> mTransportInfoList; KMServerTest *mServerTest; }; diff --git a/kmail/acljobs.cpp b/kmail/acljobs.cpp index 568a6f4bb..41931829e 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 0d4a731dc..7abc8065b 100644 --- a/kmail/acljobs.h +++ b/kmail/acljobs.h @@ -33,22 +33,22 @@ #define KMACLJOBS_H #include <kio/job.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> 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<ACLListEntry> ACLList; + typedef TQValueVector<ACLListEntry> 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 3d92cd7a1..0af6cdd4f 100644 --- a/kmail/actionscheduler.cpp +++ b/kmail/actionscheduler.cpp @@ -46,23 +46,23 @@ #include "accountmanager.h" using KMail::AccountManager; -#include <qtimer.h> +#include <tqtimer.h> #include <kconfig.h> #include <kstandarddirs.h> using namespace KMail; -typedef QPtrList<KMMsgBase> KMMessageList; +typedef TQPtrList<KMMsgBase> KMMessageList; KMFolderMgr* ActionScheduler::tempFolderMgr = 0; int ActionScheduler::refCount = 0; int ActionScheduler::count = 0; -QValueList<ActionScheduler*> *ActionScheduler::schedulerList = 0; +TQValueList<ActionScheduler*> *ActionScheduler::schedulerList = 0; bool ActionScheduler::sEnabled = false; bool ActionScheduler::sEnabledChecked = false; ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set, - QValueList<KMFilter*> filters, + TQValueList<KMFilter*> 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<KMFilter*>::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<KMFilter*>::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<ActionScheduler*>; + schedulerList = new TQValueList<ActionScheduler*>; 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<KMFilter*> filters ) +void ActionScheduler::setFilterList( TQValueList<KMFilter*> filters ) { mFiltersAreQueued = true; mQueuedFilters.clear(); - QValueList<KMFilter*>::Iterator it = filters.begin(); + TQValueList<KMFilter*>::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<QGuardedPtr<KMFolder> > it; + TQValueListConstIterator<TQGuardedPtr<KMFolder> > 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<Q_UINT32> serNums) +void ActionScheduler::execFilters(const TQValueList<Q_UINT32> serNums) { - QValueListConstIterator<Q_UINT32> it; + TQValueListConstIterator<Q_UINT32> it; for (it = serNums.begin(); it != serNums.end(); ++it) execFilters( *it ); } -void ActionScheduler::execFilters(const QPtrList<KMMsgBase> msgList) +void ActionScheduler::execFilters(const TQPtrList<KMMsgBase> msgList) { KMMsgBase *msgBase; - QPtrList<KMMsgBase> list = msgList; + TQPtrList<KMMsgBase> list = msgList; for (msgBase = list.first(); msgBase; msgBase = list.next()) execFilters( msgBase->getMsgSerNum() ); } @@ -380,7 +380,7 @@ void ActionScheduler::finish() void ActionScheduler::fetchMessage() { - QValueListIterator<Q_UINT32> mFetchMessageIt = mFetchSerNums.begin(); + TQValueListIterator<Q_UINT32> 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( "<b>Evaluating filter rules:</b> " ) ); + TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); 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( "<b>Applying filter action:</b> %1" ) + TQString logText( i18n( "<b>Applying filter action:</b> %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<ActionScheduler*>::iterator it; + TQString res; + TQValueList<ActionScheduler*>::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 027bce21c..e785210b6 100644 --- a/kmail/actionscheduler.h +++ b/kmail/actionscheduler.h @@ -37,9 +37,9 @@ #include "kmfiltermgr.h" // KMFilterMgr::FilterSet #include "kmcommands.h" -#include <qobject.h> -#include <qguardedptr.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqguardedptr.h> +#include <tqtimer.h> class KMHeaders; @@ -54,7 +54,7 @@ public: enum ReturnCode { ResultOk, ResultError, ResultCriticalError }; ActionScheduler(KMFilterMgr::FilterSet set, - QValueList<KMFilter*> filters, + TQValueList<KMFilter*> 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<KMFilter*> filters ); + void setFilterList( TQValueList<KMFilter*> 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<Q_UINT32> serNums); - void execFilters(const QPtrList<KMMsgBase> msgList); + void execFilters(const TQValueList<Q_UINT32> serNums); + void execFilters(const TQPtrList<KMMsgBase> 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<ActionScheduler*> *schedulerList; // for debugging + static TQValueList<ActionScheduler*> *schedulerList; // for debugging static KMFolderMgr *tempFolderMgr; static int refCount, count; static bool sEnabled, sEnabledChecked; - QValueListIterator<Q_UINT32> mMessageIt; - QValueListIterator<KMFilter> mFilterIt; - QValueList<Q_UINT32> mSerNums, mFetchSerNums; - QValueList<QGuardedPtr<KMFolder> > mOpenFolders; - QValueList<KMFilter> mFilters, mQueuedFilters; + TQValueListIterator<Q_UINT32> mMessageIt; + TQValueListIterator<KMFilter> mFilterIt; + TQValueList<Q_UINT32> mSerNums, mFetchSerNums; + TQValueList<TQGuardedPtr<KMFolder> > mOpenFolders; + TQValueList<KMFilter> mFilters, mQueuedFilters; KMFilterAction* mFilterAction; KMFilterMgr::FilterSet mSet; KMHeaders *mHeaders; - QGuardedPtr<KMFolder> mSrcFolder, mDestFolder; + TQGuardedPtr<KMFolder> 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 314f01fa4..6b9cd8e86 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<QString,QString>& attributes ) + KIO::Slave* slave, const KURL& url, const TQString& entry, + const TQMap<TQString,TQString>& 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<GetAnnotationJob *>( 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<QString, QString> attributes; + TQMap<TQString, TQString> 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<GetAnnotationJob *>( 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<QString, QString> AnnotationJobs::MultiUrlGetAnnotationJob::annotations() const +TQMap<TQString, TQString> 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 5375eeeda..2c6ca984d 100644 --- a/kmail/annotationjobs.h +++ b/kmail/annotationjobs.h @@ -33,21 +33,21 @@ #define ANNOTATIONJOBS_H #include <kio/job.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> 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<AnnotationAttribute> AnnotationList; +typedef TQValueVector<AnnotationAttribute> 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<QString,QString>& attributes ); +KIO::SimpleJob* setAnnotation( KIO::Slave* slave, const KURL& url, const TQString& entry, + const TQMap<TQString,TQString>& 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<QString, QString> annotations() const; + TQMap<TQString, TQString> 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<QString, QString> mAnnotations; + const TQStringList mPathList; + TQStringList::const_iterator mPathListIterator; + TQString mAnnotation; + TQMap<TQString, TQString> 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 448bd9ac1..9a5b4a23e 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 64394fe97..b4e73041e 100644 --- a/kmail/antispamconfig.h +++ b/kmail/antispamconfig.h @@ -34,8 +34,8 @@ #ifndef __KMAIL_ANTISPAMCONFIG_H__ #define __KMAIL_ANTISPAMCONFIG_H__ -#include <qvaluelist.h> -#include <qregexp.h> +#include <tqvaluelist.h> +#include <tqregexp.h> 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<SpamAgent> SpamAgents; - typedef QValueListIterator<SpamAgent> SpamAgentsIterator; + typedef TQValueList<SpamAgent> SpamAgents; + typedef TQValueListIterator<SpamAgent> SpamAgentsIterator; /** @short Singleton to manage loading the kmail.antispamrc file. diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp index bb8d74bbb..e01093fd3 100644 --- a/kmail/antispamwizard.cpp +++ b/kmail/antispamwizard.cpp @@ -49,16 +49,16 @@ #include <kmessagebox.h> #include <kprocess.h> -#include <qdom.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqdom.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<KMFilter*> filterList; + TQValueList<KMFilter*> 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<KMFilterAction>* pipeFilterActions = pipeFilter->actions(); + TQPtrList<KMFilterAction>* 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<KMFilterAction>* virusFilterActions = virusFilter->actions(); + TQPtrList<KMFilterAction>* 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<KMFilterAction>* pipeFilterActions = pipeFilter->actions(); + TQPtrList<KMFilterAction>* 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<KMFilterAction>* spamFilterActions = spamFilter->actions(); + TQPtrList<KMFilterAction>* 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<KMFilterAction>* unsureFilterActions = unsureFilter->actions(); + TQPtrList<KMFilterAction>* 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<KMFilterAction>* classSpamFilterActions = classSpamFilter->actions(); + TQPtrList<KMFilterAction>* classSpamFilterActions = classSpamFilter->actions(); KMFilterAction* classSpamFilterActionFirst = dict["set status"]->create(); classSpamFilterActionFirst->argsFromString( "P" ); classSpamFilterActions->append( classSpamFilterActionFirst ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<KMFilterAction>* classHamFilterActions = classHamFilter->actions(); + TQPtrList<KMFilterAction>* classHamFilterActions = classHamFilter->actions(); KMFilterAction* classHamFilterActionFirst = dict["set status"]->create(); classHamFilterActionFirst->argsFromString( "H" ); classHamFilterActions->append( classHamFilterActionFirst ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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 <server> - 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( "<br>Spam messages are not moved into a certain folder.</p>" ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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 += "<li>" + intendedFilterName + "</li>"; @@ -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<SpamToolConfig> & configList ) + TQValueList<SpamToolConfig> & 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<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<SpamToolConfig> tmpList; + TQValueList<SpamToolConfig> tmpList; SpamToolConfig config; while ( !mToolList.isEmpty() ) { - QValueListIterator<SpamToolConfig> highest; + TQValueListIterator<SpamToolConfig> highest; int priority = 0; // ascending - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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<SpamToolConfig> it = tmpList.begin(); + for ( TQValueListIterator<SpamToolConfig> 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.<p>" "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 745edae60..be2e67e87 100644 --- a/kmail/antispamwizard.h +++ b/kmail/antispamwizard.h @@ -33,9 +33,9 @@ #include <klistbox.h> #include <kwizard.h> -#include <qcheckbox.h> -#include <qdict.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqdict.h> +#include <tqlayout.h> 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<SpamToolConfig> & configList ); + TQValueList<SpamToolConfig> & configList ); ~ConfigReader( ); - QValueList<SpamToolConfig> & getToolList() { return mToolList; } + TQValueList<SpamToolConfig> & getToolList() { return mToolList; } void readAndMergeConfig(); private: - QValueList<SpamToolConfig> & mToolList; + TQValueList<SpamToolConfig> & 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<SpamToolConfig> mToolList; + TQValueList<SpamToolConfig> 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 b7c8bdd21..11c53f123 100644 --- a/kmail/attachmentlistview.cpp +++ b/kmail/attachmentlistview.cpp @@ -34,12 +34,12 @@ using KPIM::MailListDrag; #include <kurldrag.h> // other Qt headers -#include <qevent.h> -#include <qcstring.h> -#include <qbuffer.h> -#include <qptrlist.h> -#include <qdatastream.h> -#include <qstring.h> +#include <tqevent.h> +#include <tqcstring.h> +#include <tqbuffer.h> +#include <tqptrlist.h> +#include <tqdatastream.h> +#include <tqstring.h> // 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<KMMsgBase> messageList; + TQPtrList<KMMsgBase> 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 23ee67135..cd9a6e560 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 37584d847..8d1e59a90 100644 --- a/kmail/attachmentstrategy.cpp +++ b/kmail/attachmentstrategy.cpp @@ -38,7 +38,7 @@ #include "partNode.h" #include "kmmsgpart.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> @@ -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 bcd29cfda..7d052b695 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 24ee2fba3..680d0c483 100644 --- a/kmail/bodypartformatterfactory.cpp +++ b/kmail/bodypartformatterfactory.cpp @@ -45,9 +45,9 @@ using namespace KMail::BodyPartFormatterFactoryPrivate; #include <kdebug.h> // Qt -#include <qstring.h> -#include <qcstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqstringlist.h> #include <assert.h> @@ -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 63f43bd7d..4763a7d8a 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 7171ba29f..7ca101aba 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 <qcstring.h> +#include <tqcstring.h> #include <map> diff --git a/kmail/bodyvisitor.cpp b/kmail/bodyvisitor.cpp index 99af66196..04b7a98b8 100644 --- a/kmail/bodyvisitor.cpp +++ b/kmail/bodyvisitor.cpp @@ -61,16 +61,16 @@ namespace KMail { } //----------------------------------------------------------------------------- - void BodyVisitor::visit( QPtrList<KMMessagePart> & list ) + void BodyVisitor::visit( TQPtrList<KMMessagePart> & list ) { mParts = list; } //----------------------------------------------------------------------------- - QPtrList<KMMessagePart> BodyVisitor::partsToLoad() + TQPtrList<KMMessagePart> BodyVisitor::partsToLoad() { - QPtrListIterator<KMMessagePart> it( mParts ); - QPtrList<KMMessagePart> selected; + TQPtrListIterator<KMMessagePart> it( mParts ); + TQPtrList<KMMessagePart> 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 fa5d2fb5f..519dd86c9 100644 --- a/kmail/bodyvisitor.h +++ b/kmail/bodyvisitor.h @@ -31,8 +31,8 @@ #ifndef bodyiterator_h #define bodyiterator_h -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqptrlist.h> +#include <tqstringlist.h> class KMMessagePart; @@ -49,10 +49,10 @@ namespace KMail { /** Register the parts that should be visited */ void visit( KMMessagePart * part ); - void visit( QPtrList<KMMessagePart> & list ); + void visit( TQPtrList<KMMessagePart> & list ); /** Returns a list of parts that should be loaded */ - QPtrList<KMMessagePart> partsToLoad(); + TQPtrList<KMMessagePart> 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<KMMessagePart> mParts; - QStringList mBasicList; + TQPtrList<KMMessagePart> mParts; + TQStringList mBasicList; }; // Factory to create a visitor according to the Attachment Strategy diff --git a/kmail/cachedimapjob.cpp b/kmail/cachedimapjob.cpp index 8c6339612..3b8ff4115 100644 --- a/kmail/cachedimapjob.cpp +++ b/kmail/cachedimapjob.cpp @@ -57,35 +57,35 @@ namespace KMail { // Get messages -CachedImapJob::CachedImapJob( const QValueList<MsgForDownload>& msgs, +CachedImapJob::CachedImapJob( const TQValueList<MsgForDownload>& msgs, JobType type, KMFolderCachedImap* folder ) : FolderJob( type ), mFolder( folder ), mMsgsForDownload( msgs ), mTotalBytes(0), mMsg(0), mParentFolder( 0 ) { - QValueList<MsgForDownload>::ConstIterator it = msgs.begin(); + TQValueList<MsgForDownload>::ConstIterator it = msgs.begin(); for ( ; it != msgs.end() ; ++it ) mTotalBytes += (*it).size; } // Put messages -CachedImapJob::CachedImapJob( const QPtrList<KMMessage>& msgs, JobType type, +CachedImapJob::CachedImapJob( const TQPtrList<KMMessage>& 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<unsigned long>& msgs, +CachedImapJob::CachedImapJob( const TQValueList<unsigned long>& msgs, JobType type, KMFolderCachedImap* folder ) - : FolderJob( QPtrList<KMMessage>(), QString::null, type, folder?folder->folder():0 ), + : FolderJob( TQPtrList<KMMessage>(), 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<KMFolderCachedImap*>& fList, +CachedImapJob::CachedImapJob( const TQValueList<KMFolderCachedImap*>& fList, JobType type, KMFolderCachedImap* folder ) : FolderJob( type ), mFolder( folder ), mFolderList( fList ), mMsg( 0 ), mParentFolder ( 0 ) @@ -93,7 +93,7 @@ CachedImapJob::CachedImapJob( const QValueList<KMFolderCachedImap*>& 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<KMFolderCachedImap*>(mDestFolder->storage()); KMAcctCachedImap *account = imapFolder->account(); @@ -535,7 +535,7 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job ) static_cast<KMFolderCachedImap*>((*it).parent->storage())->setSilentUpload( false ); if ( job->error() && !silentUpload ) { - QString myError = "<p><b>" + i18n("Error while uploading folder") + TQString myError = "<p><b>" + i18n("Error while uploading folder") + "</b></p><p>" + i18n("Could not make the folder <b>%1</b> on the server.").arg((*it).items[0]) + "</p><p>" + 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:") + "</p>"; 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<QString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() ); + TQMap<TQString, KMAcctCachedImap::RenamedFolder>::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 ad5579a02..6581ec742 100644 --- a/kmail/cachedimapjob.h +++ b/kmail/cachedimapjob.h @@ -48,9 +48,9 @@ #include <kio/job.h> #include <kio/global.h> -#include <qptrlist.h> -#include <qvaluelist.h> -#include <qcstring.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> +#include <tqcstring.h> 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<MsgForDownload>& msgs, + CachedImapJob( const TQValueList<MsgForDownload>& msgs, JobType type = tGetMessage, KMFolderCachedImap* folder = 0 ); // Put messages - CachedImapJob( const QPtrList<KMMessage>& msgs, + CachedImapJob( const TQPtrList<KMMessage>& msgs, JobType type, KMFolderCachedImap* folder=0 ); - CachedImapJob( const QValueList<unsigned long>& msgs, + CachedImapJob( const TQValueList<unsigned long>& msgs, JobType type, KMFolderCachedImap* folder=0 ); // Add sub folders - CachedImapJob( const QValueList<KMFolderCachedImap*>& folders, + CachedImapJob( const TQValueList<KMFolderCachedImap*>& 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<KMFolderCachedImap*> mFolderList; - QValueList<MsgForDownload> mMsgsForDownload; - QValueList<unsigned long> mSerNumMsgList; + TQValueList<KMFolderCachedImap*> mFolderList; + TQValueList<MsgForDownload> mMsgsForDownload; + TQValueList<unsigned long> 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 e124e0cc0..0e25758c1 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("<qt>None of your identities match the " "receiver of this message,<br>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 b66903bfc..9bd188899 100644 --- a/kmail/callback.h +++ b/kmail/callback.h @@ -33,7 +33,7 @@ #ifndef CALLBACK_H #define CALLBACK_H -#include <qstring.h> +#include <tqstring.h> 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 aac44362f..6c82c379a 100644 --- a/kmail/chiasmuskeyselector.cpp +++ b/kmail/chiasmuskeyselector.cpp @@ -4,19 +4,19 @@ #include <klistbox.h> #include <klocale.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> -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 3af0ec455..0272016a9 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 2c6887b3b..0e6b3a400 100644 --- a/kmail/colorlistbox.cpp +++ b/kmail/colorlistbox.cpp @@ -22,17 +22,17 @@ #include <config.h> #endif -#include <qpainter.h> +#include <tqpainter.h> #include <kcolordialog.h> #include <kcolordrag.h> #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; i<count(); i++ ) { updateItem( i ); @@ -52,7 +52,7 @@ void ColorListBox::setEnabled( bool state ) } -void ColorListBox::setColor( uint index, const QColor &color ) +void ColorListBox::setColor( uint index, const TQColor &color ) { if( index < count() ) { @@ -64,7 +64,7 @@ void ColorListBox::setColor( uint index, const QColor &color ) } -QColor ColorListBox::color( uint index ) const +TQColor ColorListBox::color( uint index ) const { if( index < count() ) { @@ -87,8 +87,8 @@ void ColorListBox::newColor( int index ) if( (uint)index < count() ) { - QColor c = color( index ); - if( KColorDialog::getColor( c, this ) != QDialog::Rejected ) + TQColor c = color( index ); + if( KColorDialog::getColor( c, this ) != TQDialog::Rejected ) { setColor( index, c ); } @@ -96,7 +96,7 @@ void ColorListBox::newColor( int index ) } -void ColorListBox::dragEnterEvent( QDragEnterEvent *e ) +void ColorListBox::dragEnterEvent( TQDragEnterEvent *e ) { if( KColorDrag::canDecode(e) && isEnabled() ) { @@ -111,7 +111,7 @@ void ColorListBox::dragEnterEvent( QDragEnterEvent *e ) } -void ColorListBox::dragLeaveEvent( QDragLeaveEvent * ) +void ColorListBox::dragLeaveEvent( TQDragLeaveEvent * ) { if( mCurrentOnDragEnter != -1 ) { @@ -121,7 +121,7 @@ void ColorListBox::dragLeaveEvent( QDragLeaveEvent * ) } -void ColorListBox::dragMoveEvent( QDragMoveEvent *e ) +void ColorListBox::dragMoveEvent( TQDragMoveEvent *e ) { if( KColorDrag::canDecode(e) && isEnabled() ) { @@ -134,9 +134,9 @@ void ColorListBox::dragMoveEvent( QDragMoveEvent *e ) } -void ColorListBox::dropEvent( QDropEvent *e ) +void ColorListBox::dropEvent( TQDropEvent *e ) { - QColor color; + TQColor color; if( KColorDrag::decode( e, color ) ) { int index = currentItem(); @@ -152,28 +152,28 @@ void ColorListBox::dropEvent( QDropEvent *e ) -ColorListItem::ColorListItem( const QString &text, const QColor &color ) - : QListBoxItem(), mColor( color ), mBoxWidth( 30 ) +ColorListItem::ColorListItem( const TQString &text, const TQColor &color ) + : TQListBoxItem(), mColor( color ), mBoxWidth( 30 ) { setText( text ); } -const QColor &ColorListItem::color( void ) +const TQColor &ColorListItem::color( void ) { return( mColor ); } -void ColorListItem::setColor( const QColor &color ) +void ColorListItem::setColor( const TQColor &color ) { mColor = color; } -void ColorListItem::paint( QPainter *p ) +void ColorListItem::paint( TQPainter *p ) { - QFontMetrics fm = p->fontMetrics(); + 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 1759bc831..13db01afb 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 1b9c143b4..243a17537 100644 --- a/kmail/compactionjob.cpp +++ b/kmail/compactionjob.cpp @@ -35,9 +35,9 @@ using KPIM::BroadcastStatus; #include <kdebug.h> #include <klocale.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <sys/types.h> #include <sys/stat.h> @@ -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<KMFolderMaildir *>( 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 055713f6d..bb234a049 100644 --- a/kmail/compactionjob.h +++ b/kmail/compactionjob.h @@ -29,7 +29,7 @@ #define COMPACTIONJOB_H #include "jobscheduler.h" -#include <qstringlist.h> +#include <tqstringlist.h> 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 58d0860d7..a4eb179d1 100644 --- a/kmail/composer.h +++ b/kmail/composer.h @@ -10,8 +10,8 @@ #include <kurl.h> #include <kglobalsettings.h> -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> 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 321a374c5..ea0536a9f 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -101,21 +101,21 @@ using KMime::DateFormatter; #include <kcmultidialog.h> // Qt headers: -#include <qvalidator.h> -#include <qwhatsthis.h> -#include <qvgroupbox.h> -#include <qvbox.h> -#include <qvbuttongroup.h> -#include <qhbuttongroup.h> -#include <qtooltip.h> -#include <qlabel.h> -#include <qtextcodec.h> -#include <qheader.h> -#include <qpopupmenu.h> -#include <qradiobutton.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qwidgetstack.h> +#include <tqvalidator.h> +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> +#include <tqvbox.h> +#include <tqvbuttongroup.h> +#include <tqhbuttongroup.h> +#include <tqtooltip.h> +#include <tqlabel.h> +#include <tqtextcodec.h> +#include <tqheader.h> +#include <tqpopupmenu.h> +#include <tqradiobutton.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqwidgetstack.h> // other headers: #include <assert.h> @@ -155,37 +155,37 @@ namespace { I18N_NOOP("<qt><p>This setting has been fixed by your administrator.</p>" "<p>If you think this is an error, please contact him.</p></qt>"); - 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<IdentityListViewItem*>( mIdentityList->selectedItem() ); if ( !item ) return; - QString msg = i18n("<qt>Do you really want to remove the identity named " + TQString msg = i18n("<qt>Do you really want to remove the identity named " "<b>%1</b>?</qt>").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<IdentityListViewItem*>( 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<IdentityListViewItem*>( 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<IdentityListViewItem*>(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( "<qt><p>The default domain is used to complete email " "addresses that only consist of the user's name." "</p></qt>" ); - 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<KMTransportInfo> it( mTransportInfoList ); + TQStringList transportNames; + TQPtrListIterator<KMTransportInfo> 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<KMTransportInfo> it( mTransportInfoList ); + TQPtrListIterator<KMTransportInfo> 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<KMTransportInfo> jt( mTransportInfoList ); + TQStringList transportNames; + TQPtrListIterator<KMTransportInfo> 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<KMTransportInfo> it( mTransportInfoList ); + TQPtrListIterator<KMTransportInfo> 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<KMTransportInfo> it( mTransportInfoList ); + TQPtrListIterator<KMTransportInfo> 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<KMAccount> >::Iterator it; + TQValueList< TQGuardedPtr<KMAccount> >::Iterator it; for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) { delete (*it); } mNewAccounts.clear(); // The modified accounts - QValueList<ModifiedAccountsType*>::Iterator j; + TQValueList<ModifiedAccountsType*>::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<ModifiedAccountsType*>::Iterator k; + TQValueList<ModifiedAccountsType*>::Iterator k; for (k = mModifiedAccounts.begin(); k != mModifiedAccounts.end(); ++k ) if ((*k)->oldAccount) accountNames.remove( (*k)->oldAccount->name() ); - QValueList< QGuardedPtr<KMAccount> >::Iterator l; + TQValueList< TQGuardedPtr<KMAccount> >::Iterator l; for (l = mAccountsToDelete.begin(); l != mAccountsToDelete.end(); ++l ) if (*l) accountNames.remove( (*l)->name() ); - QValueList< QGuardedPtr<KMAccount> >::Iterator it; + TQValueList< TQGuardedPtr<KMAccount> >::Iterator it; for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) if (*it) accountNames += (*it)->name(); - QValueList<ModifiedAccountsType*>::Iterator j; + TQValueList<ModifiedAccountsType*>::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<ModifiedAccountsType*>::Iterator j; + TQValueList<ModifiedAccountsType*>::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<KMAccount> >::Iterator it; + TQValueList< TQGuardedPtr<KMAccount> >::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<ModifiedAccountsType*>::Iterator j; + TQValueList<ModifiedAccountsType*>::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<KMAccount> >::Iterator it; + TQValueList< TQGuardedPtr<KMAccount> >::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<KMAccount> >::Iterator it; + TQValueList< TQGuardedPtr<KMAccount> >::Iterator it; for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) { kmkernel->acctMgr()->add( *it ); // calls installTimer too } // Update accounts that have been modified - QValueList<ModifiedAccountsType*>::Iterator j; + TQValueList<ModifiedAccountsType*>::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 <hr> - 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("<qt><p><strong>These expressions may be used for the date:" "</strong></p>" "<ul>" @@ -2101,14 +2101,14 @@ AppearancePageHeadersTab::AppearancePageHeadersTab( QWidget * parent, const char "</ul>" "<p><strong>All other input characters will be ignored." "</strong></p></qt>"); - 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<DateFormatter::FormatType>( 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("<b>%f</b> will be replaced with the " + label = new TQLabel( i18n("<b>%f</b> 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("<qt>The following placeholders are " + glay->addMultiCellWidget( new TQLabel( i18n("<qt>The following placeholders are " "supported in the reply phrases:<br>" "<b>%D</b>: date, <b>%S</b>: subject,<br>" "<b>%e</b>: sender's address, <b>%F</b>: sender's name, <b>%f</b>: sender's initials,<br>" @@ -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( "<qt><p>Messages sometimes come in both formats. " + TQString htmlWhatsThis = i18n( "<qt><p>Messages sometimes come in both formats. " "This option controls whether you want the HTML part or the plain " "text part to be displayed.</p>" "<p>Displaying the HTML part makes the message look better, " @@ -3638,7 +3638,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n "<p><b>Note:</b> You can set this option on a per-folder basis " "from the <i>Folder</i> menu of KMail's main window.</p></qt>" ); - QString externalWhatsThis = i18n( "<qt><p>Some mail advertisements are in HTML " + TQString externalWhatsThis = i18n( "<qt><p>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").</p>" @@ -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.</p></qt>" ); - QString receiptWhatsThis = i18n( "<qt><h3>Message Disposition " + TQString receiptWhatsThis = i18n( "<qt><h3>Message Disposition " "Notification Policy</h3>" "<p>MDNs are a generalization of what is commonly called <b>read " "receipt</b>. 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("<b>WARNING:</b> 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("<b>WARNING:</b> 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<QGuardedPtr<KMFolder> > folders; + TQStringList names; + TQValueList<TQGuardedPtr<KMFolder> > folders; kmkernel->folderMgr()->createFolderList(&names, &folders); kmkernel->imapFolderMgr()->createFolderList(&names, &folders); kmkernel->dimapFolderMgr()->createFolderList(&names, &folders); kmkernel->searchFolderMgr()->createFolderList(&names, &folders); - for (QValueList<QGuardedPtr<KMFolder> >::iterator it = folders.begin(); + for (TQValueList<TQGuardedPtr<KMFolder> >::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", "<qt><p>This selects which mailbox format will be " "the default for local folders:</p>" "<p><b>mbox:</b> 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.</p></qt>"); - 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 ) "<p>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.</p></qt>" ); - 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 ) "</qt>" ); - 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( "<qt>Invitations are normally sent as attachments to " + TQString txt = i18n( "<qt>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.<br>People that have email " "programs that do understand invitations will still " "be able to work with this.</qt>" ); - 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 408a9d3f0..f9c32731c 100644 --- a/kmail/configuredialog.h +++ b/kmail/configuredialog.h @@ -22,7 +22,7 @@ #ifndef _CONFIGURE_DIALOG_H_ #define _CONFIGURE_DIALOG_H_ -#include <qguardedptr.h> +#include <tqguardedptr.h> #include <kcmultidialog.h> 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<ProfileDialog> mProfileDialog; + TQGuardedPtr<ProfileDialog> 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 2b716b2d8..5cc86ccc2 100644 --- a/kmail/configuredialog_p.cpp +++ b/kmail/configuredialog_p.cpp @@ -26,61 +26,61 @@ #include <kdebug.h> // Qt headers: -#include <qheader.h> -#include <qtabwidget.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqheader.h> +#include <tqtabwidget.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> // Other headers: #include <assert.h> -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<DuplicateMode>( 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 79c2a885b..4a3321094 100644 --- a/kmail/configuredialog_p.h +++ b/kmail/configuredialog_p.h @@ -6,12 +6,12 @@ #define _CONFIGURE_DIALOG_PRIVATE_H_ #include <klineedit.h> -#include <qcombobox.h> -#include <qguardedptr.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qstringlist.h> +#include <tqcombobox.h> +#include <tqguardedptr.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> #include <dcopobject.h> #include <kdialogbase.h> @@ -49,7 +49,7 @@ class TemplatesConfiguration; class CustomTemplates; class QGroupBox; class QVGroupBox; -#include <qdict.h> +#include <tqdict.h> 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<LanguageItem> LanguageItemList; +typedef TQValueList<LanguageItem> 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 <kdialog.h> 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<KMAccount> > mAccountsToDelete; - QValueList< QGuardedPtr<KMAccount> > mNewAccounts; + TQPushButton *mModifyAccountButton; + TQPushButton *mRemoveAccountButton; + TQCheckBox *mBeepNewMailCheck; + TQCheckBox *mVerboseNotificationCheck; + TQCheckBox *mCheckmailStartupCheck; + TQPushButton *mOtherNewMailActionsButton; + + TQValueList< TQGuardedPtr<KMAccount> > mAccountsToDelete; + TQValueList< TQGuardedPtr<KMAccount> > 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 0328e3df5..ddfa6d251 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<KMMsgBase> msgList; + TQPtrList<KMMsgBase> 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<KMFolderImap*>( 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<KMFolderImap*>(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 b02be98a5..73311a49b 100644 --- a/kmail/copyfolderjob.h +++ b/kmail/copyfolderjob.h @@ -30,7 +30,7 @@ #include "folderjob.h" -#include <qguardedptr.h> +#include <tqguardedptr.h> 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<FolderStorage> const mStorage; + TQGuardedPtr<FolderStorage> const mStorage; KMFolderDir* const mNewParent; - QGuardedPtr<KMFolder> mNewFolder; - QPtrListIterator<KMFolderNode> mChildFolderNodeIterator; + TQGuardedPtr<KMFolder> mNewFolder; + TQPtrListIterator<KMFolderNode> mChildFolderNodeIterator; KMFolder* mNextChildFolder; }; diff --git a/kmail/csshelper.cpp b/kmail/csshelper.cpp index 4fa2588cc..fc411be7b 100644 --- a/kmail/csshelper.cpp +++ b/kmail/csshelper.cpp @@ -36,12 +36,12 @@ #include <kconfig.h> -#include <qcolor.h> -#include <qfont.h> +#include <tqcolor.h> +#include <tqfont.h> 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 eaa823918..7015cec5e 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 4030862c8..93b24e8f7 100644 --- a/kmail/customtemplates.cpp +++ b/kmail/customtemplates.cpp @@ -22,18 +22,18 @@ #include <klocale.h> #include <kglobal.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qtextedit.h> -#include <qlineedit.h> -#include <qtoolbox.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> +#include <tqlineedit.h> +#include <tqtoolbox.h> #include <kdebug.h> -#include <qfont.h> +#include <tqfont.h> #include <kiconloader.h> #include <kpushbutton.h> #include <klistview.h> #include <klineedit.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include <kshortcut.h> #include <kmessagebox.h> #include <kkeybutton.h> @@ -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( "<qt>" "<p>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<CustomTemplateItem> it(mItemList); + TQDictIterator<CustomTemplateItem> 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<Type>( 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<CustomTemplateItem> it( mItemList ); + TQDictIterator<CustomTemplateItem> 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<CustomTemplateItem> it(mItemList); + TQDictIterator<CustomTemplateItem> 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 a2b276780..dc454bf6c 100644 --- a/kmail/customtemplates.h +++ b/kmail/customtemplates.h @@ -27,7 +27,7 @@ #include "templatesinsertcommand.h" struct CustomTemplateItem; -typedef QDict<CustomTemplateItem> CustomTemplateItemList; +typedef TQDict<CustomTemplateItem> 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 ecf512075..9887dc985 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 59e0affd5..88b776231 100644 --- a/kmail/dictionarycombobox.cpp +++ b/kmail/dictionarycombobox.cpp @@ -38,20 +38,20 @@ #include <ksconfig.h> #include <kdebug.h> -#include <qstringlist.h> +#include <tqstringlist.h> 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 "<default>"; 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 0e7a3e193..0fcbdceb2 100644 --- a/kmail/dictionarycombobox.h +++ b/kmail/dictionarycombobox.h @@ -32,7 +32,7 @@ #ifndef _KMAIL_DICTIONARYCOMBOBOX_H_ #define _KMAIL_DICTIONARYCOMBOBOX_H_ -#include <qcombobox.h> +#include <tqcombobox.h> class KSpellConfig; class QStringList; @@ -45,16 +45,16 @@ namespace KMail { * @author Ingo Kloecker <kloecker@kde.org> **/ - 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 9c8d6fd2b..b591afd71 100644 --- a/kmail/distributionlistdialog.cpp +++ b/kmail/distributionlistdialog.cpp @@ -38,31 +38,31 @@ #include <kmessagebox.h> #include <kinputdialog.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> 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<DistributionListItem *>( 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 092cf84c3..84c96d5f2 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 e9fec6608..273c5997f 100644 --- a/kmail/editorwatcher.cpp +++ b/kmail/editorwatcher.cpp @@ -27,7 +27,7 @@ #include <kprocess.h> #include <kuserprofile.h> -#include <qsocketnotifier.h> +#include <tqsocketnotifier.h> #include <cassert> @@ -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 d7fc9e3e3..e0d609051 100644 --- a/kmail/editorwatcher.h +++ b/kmail/editorwatcher.h @@ -21,9 +21,9 @@ #include <kurl.h> -#include <qdatetime.h> -#include <qobject.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqobject.h> +#include <tqtimer.h> 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 e5881d6f7..60913c9fc 100644 --- a/kmail/encodingdetector.cpp +++ b/kmail/encodingdetector.cpp @@ -37,8 +37,8 @@ #include "encodingdetector_ja_p.h" -#include <qregexp.h> -#include <qtextcodec.h> +#include <tqregexp.h> +#include <tqtextcodec.h> #include <kglobal.h> #include <kcharsets.h> @@ -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; i<size; ++i) @@ -765,7 +765,7 @@ static void skipComment(const char *&ptr, const char *pEnd) } // Returns the position of the encoding string. -static int findXMLEncoding(const QCString &str, int &encodingLength) +static int findXMLEncoding(const TQCString &str, int &encodingLength) { int len = str.length(); int pos = str.find("encoding"); @@ -878,7 +878,7 @@ EncodingDetector::EncodingDetector() : d(new EncodingDetectorPrivate) { } -EncodingDetector::EncodingDetector(QTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script) : +EncodingDetector::EncodingDetector(TQTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script) : d(new EncodingDetectorPrivate(codec,source,script)) { } @@ -913,20 +913,20 @@ bool EncodingDetector::visuallyOrdered() const return d->m_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<pEnd) end++; //if ( *end == '\0' ) break; - QCString str( ptr, (end-ptr)+1); + TQCString str( ptr, (end-ptr)+1); str = str.lower(); int pos=0; //if( (pos = str.find("http-equiv", pos)) == -1) break; @@ -1243,7 +1243,7 @@ bool EncodingDetector::analyze(const char *data, int len) } -EncodingDetector::AutoDetectScript EncodingDetector::scriptForName(const QString& lang) +EncodingDetector::AutoDetectScript EncodingDetector::scriptForName(const TQString& lang) { if (lang.isEmpty()) return EncodingDetector::None; @@ -1305,7 +1305,7 @@ bool EncodingDetector::hasAutoDetectionForScript(EncodingDetector::AutoDetectScr } } -QString EncodingDetector::nameForScript(EncodingDetector::AutoDetectScript script) +TQString EncodingDetector::nameForScript(EncodingDetector::AutoDetectScript script) { switch (script) { @@ -1353,12 +1353,12 @@ QString EncodingDetector::nameForScript(EncodingDetector::AutoDetectScript scrip break; //case EncodingDetector::SemiautomaticDetection: default: - return QString(); + return TQString(); } } -EncodingDetector::AutoDetectScript EncodingDetector::scriptForLanguageCode(const QString &lc) +EncodingDetector::AutoDetectScript EncodingDetector::scriptForLanguageCode(const TQString &lc) { // It might make sense to do something special if the locale ends with // ".UTF-8" or "@utf8" @@ -1367,7 +1367,7 @@ EncodingDetector::AutoDetectScript EncodingDetector::scriptForLanguageCode(const for ( int i = 0; langStr; i++ ) { langStr = pango_script_for_lang[i].lang; // startsWith() works for empty strings: every string "starts with" an empty string. - if ( lc.startsWith( QString::fromAscii( langStr ) ) ) + if ( lc.startsWith( TQString::fromAscii( langStr ) ) ) return pango_script_for_lang[i].scripts[0]; } return None; diff --git a/kmail/encodingdetector.h b/kmail/encodingdetector.h index 51ccb4695..0d1c000ab 100644 --- a/kmail/encodingdetector.h +++ b/kmail/encodingdetector.h @@ -23,7 +23,7 @@ #ifndef ENCODINGDETECTOR_H #define ENCODINGDETECTOR_H -#include <qstring.h> +#include <tqstring.h> 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 0c42f7e47..d5eeb1e0e 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 c23de8354..27cd067be 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 <qglobal.h> +#include <tqglobal.h> #ifdef Q_WS_WIN #undef UNICODE #endif diff --git a/kmail/expirejob.cpp b/kmail/expirejob.cpp index e7e853b0a..a97c08429 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 71bfc65ea..16e4c7bd8 100644 --- a/kmail/expirejob.h +++ b/kmail/expirejob.h @@ -51,8 +51,8 @@ private: void done(); private: - QTimer mTimer; - QPtrList<KMMsgBase> mRemovedMsgs; + TQTimer mTimer; + TQPtrList<KMMsgBase> mRemovedMsgs; int mCurrentIndex; int mMaxUnreadTime; int mMaxReadTime; diff --git a/kmail/expirypropertiesdialog.cpp b/kmail/expirypropertiesdialog.cpp index 62d9047fa..a313cc88d 100644 --- a/kmail/expirypropertiesdialog.cpp +++ b/kmail/expirypropertiesdialog.cpp @@ -4,18 +4,18 @@ #include "kmfolder.h" #include "kmfoldertree.h" -#include <qvariant.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqvariant.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <klocale.h> #include <kmessagebox.h> @@ -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 9ac32500e..d23bab2a0 100644 --- a/kmail/expirypropertiesdialog.h +++ b/kmail/expirypropertiesdialog.h @@ -10,7 +10,7 @@ #ifndef EXPIRYPROPERTIESDIALOG_H #define EXPIRYPROPERTIESDIALOG_H -#include <qvariant.h> +#include <tqvariant.h> #include <kdialogbase.h> 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 abe223d8d..35b2e3ee4 100644 --- a/kmail/favoritefolderview.cpp +++ b/kmail/favoritefolderview.cpp @@ -42,28 +42,28 @@ #include <kpopupmenu.h> #include <kio/global.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqheader.h> +#include <tqtimer.h> #include <cassert> 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*> FavoriteFolderView::mInstances; +TQValueList<FavoriteFolderView*> 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<int> folderIds = GlobalSettings::self()->favoriteFolderIds(); - QStringList folderNames = GlobalSettings::self()->favoriteFolderNames(); - QListViewItem *afterItem = 0; + TQValueList<int> 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<int> folderIds; - QStringList folderNames; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + TQValueList<int> folderIds; + TQStringList folderNames; + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( 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<KMFolderTreeItem*>( 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<KMFolderTreeItem*> delItems; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + TQValueList<KMFolderTreeItem*> delItems; + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( 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<KMFolderTreeItem*>( 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<int> seenInboxes = GlobalSettings::self()->favoriteFolderViewSeenInboxes(); + TQValueList<int> 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<KMFolderTreeItem*>( 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<KMFolderTreeItem*>( 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<KMFolderTreeItem*>( 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<FavoriteFolderView*>::ConstIterator it = mInstances.begin(); it != mInstances.end(); ++it ) { + for ( TQValueList<FavoriteFolderView*>::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<KMFolderTreeItem*>(it.current()); if (!fti || !fti->folder()) continue; diff --git a/kmail/favoritefolderview.h b/kmail/favoritefolderview.h index 6958a732a..f19dd5d79 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<FavoriteFolderView*> mInstances; + static TQValueList<FavoriteFolderView*> mInstances; bool mReadingConfig; }; diff --git a/kmail/filehtmlwriter.cpp b/kmail/filehtmlwriter.cpp index 28e1b758a..7e937c462 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( "<!-- CSS Definitions \n" + css + "-->\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 << "<!-- embedPart(contentID=" << contentId << ", url=" << url << ") -->" << endl; flush(); } diff --git a/kmail/filehtmlwriter.h b/kmail/filehtmlwriter.h index f0b81e5a4..9897bc5e4 100644 --- a/kmail/filehtmlwriter.h +++ b/kmail/filehtmlwriter.h @@ -34,8 +34,8 @@ #include "interfaces/htmlwriter.h" -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> 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 af77541d1..bfe40170c 100644 --- a/kmail/filterimporterexporter.cpp +++ b/kmail/filterimporterexporter.cpp @@ -39,7 +39,7 @@ #include <kdialogbase.h> #include <klistview.h> -#include <qregexp.h> +#include <tqregexp.h> 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<KMFilter*>& filters ) + void setFilters( const TQValueList<KMFilter*>& filters ) { originalFilters = filters; filtersListView->clear(); - QValueListConstIterator<KMFilter*> it = filters.constEnd(); + TQValueListConstIterator<KMFilter*> 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<KMFilter*> selectedFilters() const + TQValueList<KMFilter*> selectedFilters() const { - QValueList<KMFilter*> filters; - QListViewItemIterator it( filtersListView ); + TQValueList<KMFilter*> filters; + TQListViewItemIterator it( filtersListView ); int i = 0; while( it.current() ) { - QCheckListItem* item = static_cast<QCheckListItem*>( it.current() ); + TQCheckListItem* item = static_cast<TQCheckListItem*>( it.current() ); if ( item->isOn() ) filters << originalFilters[i]; ++i; ++it; @@ -103,12 +103,12 @@ public: } private: KListView *filtersListView; - QValueList<KMFilter*> originalFilters; + TQValueList<KMFilter*> originalFilters; bool wasCancelled; }; /* static */ -QValueList<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* config, bool bPopFilter ) +TQValueList<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* config, bool bPopFilter ) { KConfigGroupSaver saver(config, "General"); int numFilters = 0; @@ -117,9 +117,9 @@ QValueList<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* co else numFilters = config->readNumEntry("filters",0); - QValueList<KMFilter*> filters; + TQValueList<KMFilter*> 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<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* co } /* static */ -void FilterImporterExporter::writeFiltersToConfig( const QValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter ) +void FilterImporterExporter::writeFiltersToConfig( const TQValueList<KMFilter*>& 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<KMFilter*> it = filters.constBegin() ; + for ( TQValueListConstIterator<KMFilter*> 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<KMFilter*>& } -FilterImporterExporter::FilterImporterExporter( QWidget* parent, bool popFilter ) +FilterImporterExporter::FilterImporterExporter( TQWidget* parent, bool popFilter ) :mParent( parent), mPopFilter( popFilter ) { } @@ -177,31 +177,31 @@ FilterImporterExporter::~FilterImporterExporter() { } -QValueList<KMFilter*> FilterImporterExporter::importFilters() +TQValueList<KMFilter*> 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<KMFilter*>(); // cancel + return TQValueList<KMFilter*>(); // 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<KMFilter*>(); + return TQValueList<KMFilter*>(); } } KConfig config( fileName ); - QValueList<KMFilter*> imported = readFiltersFromConfig( &config, mPopFilter ); + TQValueList<KMFilter*> imported = readFiltersFromConfig( &config, mPopFilter ); FilterSelectionDialog dlg( mParent ); dlg.setFilters( imported ); dlg.exec(); - return dlg.cancelled() ? QValueList<KMFilter*>() : dlg.selectedFilters(); + return dlg.cancelled() ? TQValueList<KMFilter*>() : dlg.selectedFilters(); } -void FilterImporterExporter::exportFilters(const QValueList<KMFilter*> & filters ) +void FilterImporterExporter::exportFilters(const TQValueList<KMFilter*> & 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 72d29e978..c6386b42f 100644 --- a/kmail/filterimporterexporter.h +++ b/kmail/filterimporterexporter.h @@ -30,7 +30,7 @@ #ifndef __FILTERIMPORTEREXPORTER_H__ #define __FILTERIMPORTEREXPORTER_H__ -#include <qvaluelist.h> +#include <tqvaluelist.h> 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<KMFilter*> & ); + void exportFilters( const TQValueList<KMFilter*> & ); /** Import filters. Ask the user where to import them from * and which filters to import. */ - QValueList<KMFilter*> importFilters(); + TQValueList<KMFilter*> importFilters(); - static void writeFiltersToConfig( const QValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter ); - static QValueList<KMFilter*> readFiltersFromConfig( KConfig* config, bool bPopFilter ); + static void writeFiltersToConfig( const TQValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter ); + static TQValueList<KMFilter*> readFiltersFromConfig( KConfig* config, bool bPopFilter ); private: - QWidget* mParent; + TQWidget* mParent; bool mPopFilter; }; diff --git a/kmail/filterlog.cpp b/kmail/filterlog.cpp index 23848dfb1..7415c10d0 100644 --- a/kmail/filterlog.cpp +++ b/kmail/filterlog.cpp @@ -31,8 +31,8 @@ #include <kdebug.h> -#include <qdatetime.h> -#include <qfile.h> +#include <tqdatetime.h> +#include <tqfile.h> #include <sys/stat.h> @@ -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<QString> it = mLogEntries.begin(); + TQValueListIterator<TQString> 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 814556790..d49efb22c 100644 --- a/kmail/filterlog.h +++ b/kmail/filterlog.h @@ -29,9 +29,9 @@ #ifndef KMAIL_FILTERLOG_H #define KMAIL_FILTERLOG_H -#include <qobject.h> -#include <qstringlist.h> -#include <qstylesheet.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqstylesheet.h> 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 a10a056ec..90eb59263 100644 --- a/kmail/filterlogdlg.cpp +++ b/kmail/filterlogdlg.cpp @@ -36,14 +36,14 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qstringlist.h> -#include <qtextedit.h> -#include <qvbox.h> -#include <qwhatsthis.h> -#include <qvgroupbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqstringlist.h> +#include <tqtextedit.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> #include <errno.h> #include <X11/Xlib.h> @@ -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 9f05298d8..5b8cd6af6 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 3a6bc6f06..54df51677 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 <<endl; @@ -116,10 +116,10 @@ FolderIface::unreadRecursiveMessages() //the message as soon as we get it (after we switch folders, //it's being unget. We need a reference count on message to make it work /* -QValueList<DCOPRef> +TQValueList<DCOPRef> FolderIface::messageRefs() { - QValueList<DCOPRef> refList; + TQValueList<DCOPRef> refList; KMMsgList messageCache; KMFolderIndex *indexFolder = static_cast<KMFolderIndex*>( mFolder); diff --git a/kmail/folderIface.h b/kmail/folderIface.h index 4c8b41362..d43adedbe 100644 --- a/kmail/folderIface.h +++ b/kmail/folderIface.h @@ -31,7 +31,7 @@ #ifndef FOLDERIFACE_H #define FOLDERIFACE_H -#include <qobject.h> +#include <tqobject.h> #include <dcopobject.h> 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<DCOPRef> messageRefs(); + //virtual TQValueList<DCOPRef> messageRefs(); protected: KMFolder* mFolder; - QString mPath; + TQString mPath; }; } diff --git a/kmail/folderdiaacltab.cpp b/kmail/folderdiaacltab.cpp index 4b4a5b6b7..d1f02a57c 100644 --- a/kmail/folderdiaacltab.cpp +++ b/kmail/folderdiaacltab.cpp @@ -52,13 +52,13 @@ #include <kdebug.h> #include <klocale.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qvbuttongroup.h> -#include <qwidgetstack.h> -#include <qradiobutton.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqvbuttongroup.h> +#include <tqwidgetstack.h> +#include <tqradiobutton.h> +#include <tqwhatsthis.h> #include <assert.h> #include <kmessagebox.h> @@ -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<KABC::Addressee>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + for( TQValueList<KABC::Addressee>::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<ListViewItem *>( 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<ListViewItem *>( 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<ListViewItem *>( item ); if ( ACLitem->userId() == userId ) { ACLitem->setModified( false ); diff --git a/kmail/folderdiaacltab.h b/kmail/folderdiaacltab.h index a800af9b7..466ec2d62 100644 --- a/kmail/folderdiaacltab.h +++ b/kmail/folderdiaacltab.h @@ -48,7 +48,7 @@ namespace KMail { enum IMAPUserIdFormat { FullEmail, UserName }; struct ACLListEntry; -typedef QValueVector<KMail::ACLListEntry> ACLList; +typedef TQValueVector<KMail::ACLListEntry> 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 537e69b6f..01cb8dbb5 100644 --- a/kmail/folderdiaquotatab.cpp +++ b/kmail/folderdiaquotatab.cpp @@ -38,11 +38,11 @@ #include "kmacctcachedimap.h" #include "imapaccountbase.h" -#include <qwidgetstack.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qprogressbar.h> -#include <qwhatsthis.h> +#include <tqwidgetstack.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqprogressbar.h> +#include <tqwhatsthis.h> #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<KMFolderImap*>( 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 a8df44927..79032d524 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 35cfb02b1..be623fe30 100644 --- a/kmail/folderdiaquotatab_p.cpp +++ b/kmail/folderdiaquotatab_p.cpp @@ -31,11 +31,11 @@ #include "folderdiaquotatab_p.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qprogressbar.h> -#include <qwhatsthis.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqprogressbar.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> #include <math.h> @@ -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 53a4948a4..68b5c19fe 100644 --- a/kmail/folderdiaquotatab_p.h +++ b/kmail/folderdiaquotatab_p.h @@ -34,27 +34,27 @@ #define FOLDERDIAQUOTA_P_H -#include <qlabel.h> -#include <qprogressbar.h> -#include <qwhatsthis.h> +#include <tqlabel.h> +#include <tqprogressbar.h> +#include <tqwhatsthis.h> #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 e689e36ac..69a1557a5 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<KMMessage>& msgList, const QString& sets, +FolderJob::FolderJob( const TQPtrList<KMMessage>& 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<KMMessage> +TQPtrList<KMMessage> FolderJob::msgList() const { return mMsgList; diff --git a/kmail/folderjob.h b/kmail/folderjob.h index 84e285864..b1f712512 100644 --- a/kmail/folderjob.h +++ b/kmail/folderjob.h @@ -33,9 +33,9 @@ #include "kmmessage.h" -#include <qobject.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqstring.h> 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<KMMessage>& msgList, const QString& sets, + FolderJob( const TQPtrList<KMMessage>& 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<KMMessage> msgList() const; + TQPtrList<KMMessage> 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<KMMessage> ); + void messageCopied( TQPtrList<KMMessage> ); /** * Overloaded signal to the one above. A lot of copying @@ -169,12 +169,12 @@ protected: */ virtual void execute()=0; - QPtrList<KMMessage> mMsgList; + TQPtrList<KMMessage> 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 ef1bcf953..c72511246 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 e03ddba74..553fc5a02 100644 --- a/kmail/folderrequester.cpp +++ b/kmail/folderrequester.cpp @@ -36,28 +36,28 @@ #include <kiconloader.h> #include <kdialog.h> -#include <qlayout.h> -#include <qtoolbutton.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> 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 e404456c7..30e39c637 100644 --- a/kmail/folderrequester.h +++ b/kmail/folderrequester.h @@ -29,7 +29,7 @@ #ifndef folderrequester_h #define folderrequester_h -#include <qwidget.h> +#include <tqwidget.h> #include <klineedit.h> 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 f6b1cf923..80e1b28f3 100644 --- a/kmail/foldershortcutdialog.cpp +++ b/kmail/foldershortcutdialog.cpp @@ -36,10 +36,10 @@ ** *******************************************************************************/ -#include <qlabel.h> -#include <qvbox.h> -#include <qvgroupbox.h> -#include <qwhatsthis.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqvgroupbox.h> +#include <tqwhatsthis.h> #include <kkeybutton.h> #include <klocale.h> @@ -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( "<qt>To choose a key or a combination " + TQVBox *box = makeVBoxMainWidget(); + TQVGroupBox *gb = new TQVGroupBox( i18n("Select Shortcut for Folder"), box ); + TQWhatsThis::add( gb, i18n( "<qt>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.</qt>" ) ); - 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 bf9596990..1934ad23c 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 89fc20db9..c1d447a67 100644 --- a/kmail/folderstorage.cpp +++ b/kmail/folderstorage.cpp @@ -52,8 +52,8 @@ using KMail::ListJob; #include <kconfig.h> #include <kdebug.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> #include <mimelib/mimepp.h> #include <errno.h> @@ -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<FolderJob*>( job ) ); } //----------------------------------------------------------------------------- -QString FolderStorage::location() const +TQString FolderStorage::location() const { - QString sLocation(const_cast<FolderStorage*>(this)->folder()->path()); + TQString sLocation(const_cast<FolderStorage*>(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<int> rmvMsgList; + TQValueList<int> 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<KMMsgBase>& msgList, bool imapQuiet) +void FolderStorage::removeMsg(const TQPtrList<KMMsgBase>& msgList, bool imapQuiet) { - for( QPtrListIterator<KMMsgBase> it( msgList ); *it; ++it ) + for( TQPtrListIterator<KMMsgBase> it( msgList ); *it; ++it ) { int idx = find(it.current()); assert( idx != -1); @@ -366,9 +366,9 @@ void FolderStorage::removeMsg(const QPtrList<KMMsgBase>& msgList, bool imapQuiet } //----------------------------------------------------------------------------- -void FolderStorage::removeMsg(const QPtrList<KMMessage>& msgList, bool imapQuiet) +void FolderStorage::removeMsg(const TQPtrList<KMMessage>& msgList, bool imapQuiet) { - for( QPtrListIterator<KMMessage> it( msgList ); *it; ++it ) + for( TQPtrListIterator<KMMessage> 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<KMMessage> msgList) +void FolderStorage::take(TQPtrList<KMMessage> 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<KMMessage>& msgList, const QString& sets, +FolderJob* FolderStorage::createJob( TQPtrList<KMMessage>& 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<KMMessage> msglist, int* aIndex_ret) +int FolderStorage::moveMsg(TQPtrList<KMMessage> msglist, int* aIndex_ret) { KMMessage* aMsg = msglist.first(); assert(aMsg != 0); @@ -633,11 +633,11 @@ int FolderStorage::moveMsg(QPtrList<KMMessage> msglist, int* aIndex_ret) if (msgParent) msgParent->open("foldermovemsg"); - QValueList<int> index; + TQValueList<int> 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<KMMessage> 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<int>& ids, KMMsgStatus status, bool toggle) +void FolderStorage::setStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle) { - for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) + for ( TQValueList<int>::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<FolderJob> it( mJobList ); + TQPtrListIterator<FolderJob> 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<Q_UINT32> matchingSerNums; + TQValueList<Q_UINT32> 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<KMMessage>& msgList, QValueList<int>& index_ret ) +int FolderStorage::addMsg( TQPtrList<KMMessage>& msgList, TQValueList<int>& index_ret ) { int ret = 0; int index; - for ( QPtrListIterator<KMMessage> it( msgList ); *it; ++it ) + for ( TQPtrListIterator<KMMessage> it( msgList ); *it; ++it ) { int aret = addMsg( *it, &index ); index_ret << index; diff --git a/kmail/folderstorage.h b/kmail/folderstorage.h index 9b71f28af..8c4c648f1 100644 --- a/kmail/folderstorage.h +++ b/kmail/folderstorage.h @@ -63,7 +63,7 @@ namespace KMail { } using KMail::AttachmentStrategy; -typedef QValueList<Q_UINT32> SerNumList; +typedef TQValueList<Q_UINT32> 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<KMMessage>& msgList, const QString& sets, + virtual FolderJob* createJob( TQPtrList<KMMessage>& 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<KMMessage> msgList); + virtual void take(TQPtrList<KMMessage> 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<KMMessage>&, QValueList<int>& index_return ); + virtual int addMsg( TQPtrList<KMMessage>&, TQValueList<int>& 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<KMMsgBase>& msgList, bool imapQuiet = false); - virtual void removeMsg(const QPtrList<KMMessage>& msgList, bool imapQuiet = false); + virtual void removeMsg(const TQPtrList<KMMsgBase>& msgList, bool imapQuiet = false); + virtual void removeMsg(const TQPtrList<KMMessage>& 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<KMMessage>, int* index_return = 0); + virtual int moveMsg(TQPtrList<KMMessage>, 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<int>& 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<int>& 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<Q_UINT32>, + void searchResult( KMFolder*, TQValueList<Q_UINT32>, 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<KMMessage>& msgList, const QString& sets, + TQString partSpecifier, const AttachmentStrategy *as ) const = 0; + virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& 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<FolderJob> mJobList; + mutable TQPtrList<FolderJob> 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 8f3b8c85a..3ca61845e 100644 --- a/kmail/foldertreebase.cpp +++ b/kmail/foldertreebase.cpp @@ -35,20 +35,20 @@ using KPIM::MailListDrag; #include <kiconloader.h> #include <kpopupmenu.h> -#include <qcursor.h> +#include <tqcursor.h> 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<KMFolderTreeItem*>(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<Q_UINT32> serNums = MessageCopyHelper::serNumListFromMailList( list ); + TQValueList<Q_UINT32> serNums = MessageCopyHelper::serNumListFromMailList( list ); int action; if ( MessageCopyHelper::inReadOnlyFolder( serNums ) ) action = DRAG_COPY; diff --git a/kmail/foldertreebase.h b/kmail/foldertreebase.h index 4e14a5a22..bc2ad0ccc 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<const KMFolder*, QListViewItem*> mFolderToItem; + TQMap<const KMFolder*, TQListViewItem*> mFolderToItem; }; } diff --git a/kmail/folderviewtooltip.h b/kmail/folderviewtooltip.h index 55afa1a0e..24f9fbbec 100644 --- a/kmail/folderviewtooltip.h +++ b/kmail/folderviewtooltip.h @@ -3,27 +3,27 @@ #include <kmfoldercachedimap.h> -#include <qtooltip.h> +#include <tqtooltip.h> 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<KMFolderTreeItem*>( 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("<qt><b>%1</b><br>Total: %2<br>Unread: %3<br>Size: %4" ) + TQString tipText = i18n("<qt><b>%1</b><br>Total: %2<br>Unread: %3<br>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<KMFolderCachedImap*>( item->folder()->storage() ) ) { @@ -43,11 +43,11 @@ class FolderViewToolTip : public QToolTip tipText += i18n("<br>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 1386338c4..b74309491 100644 --- a/kmail/globalsettings.cpp +++ b/kmail/globalsettings.cpp @@ -23,7 +23,7 @@ #include "globalsettings.h" #include <kstaticdeleter.h> -#include <qtimer.h> +#include <tqtimer.h> GlobalSettings *GlobalSettings::mSelf = 0; static KStaticDeleter<GlobalSettings> 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 68789415a..665d919cc 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 ab9b8329f..f950d35c7 100644 --- a/kmail/headeritem.cpp +++ b/kmail/headeritem.cpp @@ -27,10 +27,10 @@ ** *******************************************************************************/ #include <klocale.h> -#include <qapplication.h> -#include <qregexp.h> -#include <qbitmap.h> -#include <qpainter.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqbitmap.h> +#include <tqpainter.h> #include <kio/netaccess.h> @@ -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<KMHeaders*>(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<KMHeaders*>(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<QPixmap> PixmapList; +typedef TQValueList<TQPixmap> 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<KMHeaders*>(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<KMHeaders*>(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<QColor *>( &headers->paintInfo()->colFore ); - QFont font = p->font(); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); + TQColor *color = const_cast<TQColor *>( &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<QColor*>( &headers->paintInfo()->colTodo ); + color = const_cast<TQColor*>( &headers->paintInfo()->colTodo ); font = headers->todoFont(); weight = QMAX( weight, font.weight() ); } if ( mMsgBase->isUnread() ) { - color = const_cast<QColor*>( &headers->paintInfo()->colUnread ); + color = const_cast<TQColor*>( &headers->paintInfo()->colUnread ); font = headers->unreadFont(); weight = QMAX( weight, font.weight() ); } if ( mMsgBase->isNew() ) { - color = const_cast<QColor*>( &headers->paintInfo()->colNew ); + color = const_cast<TQColor*>( &headers->paintInfo()->colNew ); font = headers->newFont(); weight = QMAX( weight, font.weight() ); } if ( mMsgBase->isImportant() ) { - color = const_cast<QColor*>( &headers->paintInfo()->colFlag ); + color = const_cast<TQColor*>( &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<KMHeaders*>(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<KMHeaders*>(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 66b75cc23..961c99b70 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<SortCacheItem> *sortedChildren() const + const TQPtrList<SortCacheItem> *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<SortCacheItem> *list ) { mSubjThreadingList = list; } + void setSubjectThreadingList( TQPtrList<SortCacheItem> *list ) { mSubjThreadingList = list; } /** The list of mails with a certain subject that this item is on. */ - QPtrList<SortCacheItem>* subjectThreadingList() const { return mSubjThreadingList; } + TQPtrList<SortCacheItem>* subjectThreadingList() const { return mSubjThreadingList; } private: HeaderItem *mItem; SortCacheItem *mParent; int mId, mSortOffset; - QString mKey; + TQString mKey; - QPtrList<SortCacheItem> mSortedChildren; + TQPtrList<SortCacheItem> 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<SortCacheItem>* mSubjThreadingList; + TQPtrList<SortCacheItem>* 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<QPixmap> PixmapList; + typedef TQValueList<TQPixmap> 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 d735386d1..9f20b7e80 100644 --- a/kmail/headerlistquicksearch.cpp +++ b/kmail/headerlistquicksearch.cpp @@ -29,11 +29,11 @@ */ #include "headerlistquicksearch.h" -#include <qapplication.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qvaluevector.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqvaluevector.h> +#include <tqtimer.h> #include <kaction.h> #include <kiconloader.h> @@ -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<KMHeaders*>( 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<KMMainWidget *>( 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 cc2e728a8..a0f7bb14b 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 <klistviewsearchline.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> 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<QString> statusList; - mutable QString mCurrentSearchTerm; + TQValueVector<TQString> statusList; + mutable TQString mCurrentSearchTerm; }; } diff --git a/kmail/headerstrategy.cpp b/kmail/headerstrategy.cpp index 1c73532c7..bfe9845be 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 b5bdce35e..421117db6 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 26e615d90..9e6e63156 100644 --- a/kmail/headerstyle.cpp +++ b/kmail/headerstyle.cpp @@ -57,12 +57,12 @@ using namespace KPIM; #include <kabc/stdaddressbook.h> #include <kabc/addresseelist.h> #include <kmdcodec.h> -#include <qdatetime.h> -#include <qbuffer.h> -#include <qbitmap.h> -#include <qimage.h> -#include <qapplication.h> -#include <qregexp.h> +#include <tqdatetime.h> +#include <tqbuffer.h> +#include <tqbitmap.h> +#include <tqimage.h> +#include <tqapplication.h> +#include <tqregexp.h> #include <kstandarddirs.h> @@ -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 <div> or <span> 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</%2>"; + static TQString convertToHtmlBlock( const TQString & str, bool useSpan=false ) { + TQString dir = directionOf( str ); + TQString format = "<%1 dir=\"%3\">%4</%2>"; 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 = "<div class=\"header\" dir=\"" + dir + "\">\n"; + TQString headerStr = "<div class=\"header\" dir=\"" + dir + "\">\n"; if ( strategy->showHeader( "subject" ) ) headerStr += "<div dir=\"" + subjectDir + "\">\n" @@ -158,13 +158,13 @@ namespace KMail { strToHtml( message->subject() ) + "</b></div>\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 += " <a href=\"" + vCardName + "\">" + i18n("[vCard]") + "</a>"; 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 += "</div>\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("<div class=\"header\" dir=\"ltr\">"); + headerStr= TQString("<div class=\"header\" dir=\"ltr\">"); headerStr += formatAllMessageHeaders( message ); return headerStr + "</div>"; } - headerStr = QString("<div class=\"header\" dir=\"%1\">").arg(dir); + headerStr = TQString("<div class=\"header\" dir=\"%1\">").arg(dir); //case HdrLong: if ( strategy->showHeader( "subject" ) ) - headerStr += QString("<div dir=\"%1\"><b style=\"font-size:130%\">" + + headerStr += TQString("<div dir=\"%1\"><b style=\"font-size:130%\">" + strToHtml(message->subject()) + "</b></div>\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("<img src=\"%1\" width=\"%2\" height=\"%3\" style=\"border: 1px solid black;\" title=\"%4\"> ") - .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("<img src=\"%1\" width=\"%2\" height=\"%3\" style=\"border: 1px solid black;\" title=\"%4\"> ") + .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("<div class=\"fancy header\" dir=\"%1\">\n").arg(dir); + TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); + TQString headerStr = TQString("<div class=\"fancy header\" dir=\"%1\">\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( " <img src=\"%1\"/>" ) + TQString presenceIcon = TQString::fromLatin1( " <img src=\"%1\"/>" ) .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("<img src=\"%1\" width=\"%2\" height=\"%3\">") + userHTML = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\">") .arg( photoURL ).arg( photoWidth ).arg( photoHeight ); if ( presence.isEmpty() ) { - userHTML = QString("<div class=\"senderpic\">") + userHTML + "</div>"; + userHTML = TQString("<div class=\"senderpic\">") + userHTML + "</div>"; } else { - userHTML = QString( "<div class=\"senderpic\">" + userHTML = TQString( "<div class=\"senderpic\">" "<a href=\"im:%1\">%2<div class=\"senderstatus\">" "<span name=\"presence-%3\">%4</span></div></a>" "</div>" ).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( "<a href=\"im:%1\"><div class=\"senderstatus\">" + userHTML = TQString( "<a href=\"im:%1\"><div class=\"senderstatus\">" "<span name=\"presence-%2\">%3</span></div></a>" ) .arg( kabcUid ) .arg( kabcUid ) @@ -619,7 +619,7 @@ namespace KMail { const int flags = LinkLocator::PreserveSpaces | ( GlobalSettings::self()->showEmoticons() ? LinkLocator::ReplaceSmileys : 0 ); - headerStr += QString("<div dir=\"%1\">%2</div>\n") + headerStr += TQString("<div dir=\"%1\">%2</div>\n") .arg(subjectDir) .arg(message->subject().isEmpty()? i18n("No Subject") : @@ -629,12 +629,12 @@ namespace KMail { //headerStr += "<table>\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("<tr><th>%1</th>\n" + headerStr += TQString("<tr><th>%1</th>\n" "<td>") .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() ? " <a href=\"" + vCardName + "\">" + i18n("[vCard]") + "</a>" - : QString("") ) + : TQString("") ) #if 0 + ( ( !presence.isEmpty() ) ? " (<span name=\"presence-" + kabcUid + "\">" + presence + "</span>)" - : 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("<tr><th>%1</th>\n" + headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") .arg(i18n("To: ")) .arg(KMMessage::emailAddrAsAnchor(message->to(),false))); // cc line, if any if ( strategy->showHeader( "cc" ) && !message->cc().isEmpty()) - headerStr.append(QString("<tr><th>%1</th>\n" + headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") .arg(i18n("CC: ")) .arg(KMMessage::emailAddrAsAnchor(message->cc(),false))); // Bcc line, if any if ( strategy->showHeader( "bcc" ) && !message->bcc().isEmpty()) - headerStr.append(QString("<tr><th>%1</th>\n" + headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\n") .arg(i18n("BCC: ")) .arg(KMMessage::emailAddrAsAnchor(message->bcc(),false))); if ( strategy->showHeader( "date" ) ) - headerStr.append(QString("<tr><th>%1</th>\n" + headerStr.append(TQString("<tr><th>%1</th>\n" "<td dir=\"%2\">%3</td></tr>\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("<tr><th>%1</th>\n" + headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\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("<tr><th>%1</th>\n" + headerStr.append(TQString("<tr><th>%1</th>\n" "<td>%2</td></tr>\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( "<tr><th>%1</th>\n" + headerStr.append( TQString( "<tr><th>%1</th>\n" "<td dir=\"%2\">%3</td></tr>\n") .arg(i18n("Sender status: ")) .arg( directionOf( onlineStatus ) ) .arg(onlineStatus)); */ - headerStr.append( QString("<tr><td colspan=\"2\"><div id=\"attachmentInjectionPoint\"></div></td></tr>" ) ); + headerStr.append( TQString("<tr><td colspan=\"2\"><div id=\"attachmentInjectionPoint\"></div></td></tr>" ) ); headerStr.append( - QString( "</table></td><td align=\"center\">%1</td></tr></table>\n" ).arg(userHTML) ); + TQString( "</table></td><td align=\"center\">%1</td></tr></table>\n" ).arg(userHTML) ); if ( !spamHTML.isEmpty() ) - headerStr.append( QString( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b> <span style=\"padding-left: 20px;\">%3</span></div>\n") + headerStr.append( TQString( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b> <span style=\"padding-left: 20px;\">%3</span></div>\n") .arg( subjectDir, i18n("Spam Status:"), spamHTML ) ); headerStr += "</div>\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 += " <a href=\"" + vCardName + "\" "+linkColor+">" + i18n("[vCard]") + "</a>"; //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 8329f3fd3..f3f89ff8b 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 831b36651..2c6e6faff 100644 --- a/kmail/htmlstatusbar.cpp +++ b/kmail/htmlstatusbar.cpp @@ -45,16 +45,16 @@ #include <klocale.h> #include <kconfig.h> -#include <qcolor.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqstring.h> -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( "<qt><b><br>H<br>T<br>M<br>L<br> " @@ -96,7 +96,7 @@ QString KMail::HtmlStatusBar::message() const { "<br>M<br>e<br>s<br>s<br>a<br>g<br>e</qt>" ); 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 103f053a1..7c5e7655a 100644 --- a/kmail/htmlstatusbar.h +++ b/kmail/htmlstatusbar.h @@ -32,7 +32,7 @@ #ifndef _KMAIL_HTMLSTATUSBAR_H_ #define _KMAIL_HTMLSTATUSBAR_H_ -#include <qlabel.h> +#include <tqlabel.h> class QString; class QColor; @@ -58,10 +58,10 @@ namespace KMail { * * @author Ingo Kloecker <kloecker@kde.org>, Marc Mutz <mutz@kde.org> **/ - 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 1283047e2..c0a1952d7 100644 --- a/kmail/identitydialog.cpp +++ b/kmail/identitydialog.cpp @@ -69,13 +69,13 @@ using KMail::FolderRequester; #include <kpushbutton.h> // Qt headers: -#include <qtabwidget.h> -#include <qlabel.h> -#include <qwhatsthis.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qcombobox.h> +#include <tqtabwidget.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> // other headers: #include <gpgmepp/key.h> @@ -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("<qt><h3>Your name</h3>" "<p>This field should contain your name as you would like " "it to appear in the email header that is sent out;</p>" "<p>if you leave this blank your real name will not " "appear, only the email address.</p></qt>"); - 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("<qt><h3>Organization</h3>" "<p>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.</p>" "<p>It is safe (and normal) to leave this blank.</p></qt>"); - 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("<qt><h3>Email address</h3>" "<p>This field should have your full email address.</p>" "<p>If you leave this blank, or get it wrong, people " "will have trouble replying to you.</p></qt>"); - 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.</p>" "<p>You can find out more about keys at <a>http://www.gnupg.org</a></p></qt>"); - 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.</p>" "<p>You can find out more about keys at <a>http://www.gnupg.org</a></qt>"); - 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 { "<p>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.</p></qt>"); - 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 { "<p>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.</p></qt>"); - 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("<qt><h3>Reply-To addresses</h3>" "<p>This sets the <tt>Reply-to:</tt> header to contain a " @@ -309,14 +309,14 @@ namespace KMail { "<tt>From:</tt> field, but any responses to go to " "a group address.</p>" "<p>If in doubt, leave this field blank.</p></qt>"); - 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("<qt><h3>BCC (Blind Carbon Copy) addresses</h3>" "<p>The addresses that you enter here will be added to each " @@ -327,14 +327,14 @@ namespace KMail { "<p>To specify more than one address, use commas to separate " "the list of BCC recipients.</p>" "<p>If in doubt, leave this field blank.</p></qt>"); - 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( "<qt><p><b>" + brokenAddress + + TQString errorMsg( "<qt><p><b>" + brokenAddress + "</b></p><p>" + KPIM::emailParseResultToString( errorCode ) + "</p></qt>" ); 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<GpgME::Key> & pgpEncryptionKeys = mPGPEncryptionKeyRequester->keys(); const std::vector<GpgME::Key> & smimeSigningKeys = mSMIMESigningKeyRequester->keys(); const std::vector<GpgME::Key> & 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 b43f3ebe0..c90747fd7 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 5116dd445..e8ba4a07e 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 b9b8b8314..82d6d0262 100644 --- a/kmail/identitydrag.h +++ b/kmail/identitydrag.h @@ -34,27 +34,27 @@ #include <libkpimidentities/identity.h> -#include <qdragobject.h> // is a qobject and a qmimesource +#include <tqdragobject.h> // is a qobject and a qmimesource namespace KMail { - /** @short A QDragObject for KPIM::Identity + /** @short A TQDragObject for KPIM::Identity @author Marc Mutz <mutz@kde.org> **/ - 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 9666a38d8..d40673800 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<IdentityListViewItem*>( 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<IdentityListViewItem*>( currentItem() ); if ( !item ) return 0; diff --git a/kmail/identitylistview.h b/kmail/identitylistview.h index 7269237ec..6b8e36e24 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 <mutz@kde.org> **/ 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 9a04c3fd6..778403988 100644 --- a/kmail/imapaccountbase.cpp +++ b/kmail/imapaccountbase.cpp @@ -66,8 +66,8 @@ using KIO::PasswordDialog; #include <mimelib/message.h> //using KIO::Scheduler; // use FQN below -#include <qregexp.h> -#include <qstylesheet.h> +#include <tqregexp.h> +#include <tqstylesheet.h> 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<KIO::SimpleJob*>(job)->url().path(); + TQString path = static_cast<KIO::SimpleJob*>(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<KMFolderImap*>( 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( "<unknown>" ) : QString("\"%1\"").arg( msg->subject() ); - const QString from = msg->from().isEmpty() ? i18n( "<unknown>" ) : msg->from(); - QString myError = "<p><b>" + i18n("Error while uploading message") + const TQString subject = msg->subject().isEmpty() ? i18n( "<unknown>" ) : TQString("\"%1\"").arg( msg->subject() ); + const TQString from = msg->from().isEmpty() ? i18n( "<unknown>" ) : msg->from(); + TQString myError = "<p><b>" + i18n("Error while uploading message") + "</b></p><p>" - + i18n("Could not upload the message dated %1 from <i>%2</i> with subject <i>%3</i> to the server.").arg( msg->dateStr(), QStyleSheet::escape( from ), QStyleSheet::escape( subject ) ) + + i18n("Could not upload the message dated %1 from <i>%2</i> with subject <i>%3</i> to the server.").arg( msg->dateStr(), TQStyleSheet::escape( from ), TQStyleSheet::escape( subject ) ) + "</p><p>" - + i18n("The destination folder was: <b>%1</b>.").arg( QStyleSheet::escape( folder->prettyURL() ) ) + + i18n("The destination folder was: <b>%1</b>.").arg( TQStyleSheet::escape( folder->prettyURL() ) ) + "</p><p>" + i18n("The server reported:") + "</p>"; 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( "<qt>") + context + error + '\n' + errors[2]; + TQString error = prettifyQuotaError( errors[1], job ); + msg = TQString( "<qt>") + 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<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); + TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); while ( it != mapJobData.end() ) { kdDebug(5006) << "cancelMailCheck: job is cancellable: " << (*it).cancellable << endl; if ( (*it).cancellable ) { it.key()->kill(); - QMap<KIO::Job*, jobData>::Iterator rmit = it; + TQMap<KIO::Job*, jobData>::Iterator rmit = it; ++it; mapJobData.remove( rmit ); // We killed a job -> this kills the slave @@ -1003,7 +1003,7 @@ namespace KMail { ++it; } - for( QPtrListIterator<FolderJob> it( mJobList ); it.current(); ++it ) { + for( TQPtrListIterator<FolderJob> 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<QGuardedPtr<KMFolder> > mSaveList = mMailCheckFolders; + TQValueList<TQGuardedPtr<KMFolder> > 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<KMMessagePart> parts = visitor->partsToLoad(); + TQPtrList<KMMessagePart> parts = visitor->partsToLoad(); delete visitor; - QPtrListIterator<KMMessagePart> it( parts ); + TQPtrListIterator<KMMessagePart> 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="<<parent<<", folderName="<<folderName<<endl; - QString newName = parent; + TQString newName = parent; // strip / at the end if ( newName.endsWith("/") ) { newName = newName.left( newName.length() - 1 ); } // add correct delimiter - QString delim = delimiterForNamespace( newName ); + TQString delim = delimiterForNamespace( newName ); // should not happen... if ( delim.isEmpty() ) { delim = "/"; @@ -1391,10 +1391,10 @@ namespace KMail { } //------------------------------------------------------------------------------ - QString ImapAccountBase::createImapPath( FolderStorage* parent, - const QString& folderName ) + TQString ImapAccountBase::createImapPath( FolderStorage* parent, + const TQString& folderName ) { - QString path; + TQString path; if ( parent->folderType() == KMFolderTypeImap ) { path = static_cast<KMFolderImap*>( 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<QString>::const_iterator it = mLocalSubscriptionBlackList.begin(); - std::set<QString>::const_iterator end = mLocalSubscriptionBlackList.end(); + TQStringList list; + std::set<TQString>::const_iterator it = mLocalSubscriptionBlackList.begin(); + std::set<TQString>::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 57147330f..46fd577c5 100644 --- a/kmail/imapaccountbase.h +++ b/kmail/imapaccountbase.h @@ -28,8 +28,8 @@ #include "networkaccount.h" -#include <qtimer.h> -#include <qguardedptr.h> +#include <tqtimer.h> +#include <tqguardedptr.h> #include <kio/global.h> class AccountManager; @@ -52,14 +52,14 @@ namespace KPIM { namespace KMail { struct ACLListEntry; struct QuotaInfo; - typedef QValueVector<KMail::ACLListEntry> ACLList; + typedef TQValueVector<KMail::ACLListEntry> 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<imapNamespace, QStringList> nsMap; + typedef TQMap<imapNamespace, TQStringList> nsMap; // map a namespace to a delimiter - typedef QMap<QString, QString> namespaceDelim; + typedef TQMap<TQString, TQString> namespaceDelim; // map a namespace type to a map with the namespace and the delimiter - typedef QMap<imapNamespace, namespaceDelim> nsDelimMap; + typedef TQMap<imapNamespace, namespaceDelim> 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<KMMessage> msgList; + TQPtrList<KMMessage> msgList; int total, done, offset; KPIM::ProgressItem *progressItem; bool onlySubscribed, quiet, cancellable; }; - typedef QMap<KIO::Job *, jobData>::Iterator JobIterator; + typedef TQMap<KIO::Job *, jobData>::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<QGuardedPtr<KMFolder> > mOpenFolders; - QStringList mSubfolderNames, mSubfolderPaths, + TQPtrList<TQGuardedPtr<KMFolder> > mOpenFolders; + TQStringList mSubfolderNames, mSubfolderPaths, mSubfolderMimeTypes, mSubfolderAttributes; - QMap<KIO::Job *, jobData> mapJobData; + TQMap<KIO::Job *, jobData> 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<QString, int> mUnreadBeforeCheck; + TQMap<TQString, int> 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<QGuardedPtr<KMFolder> > mMailCheckFolders; + TQValueList<TQGuardedPtr<KMFolder> > mMailCheckFolders; // folders that should be checked after the current check is done - QValueList<QGuardedPtr<KMFolder> > mFoldersQueuedForChecking; + TQValueList<TQGuardedPtr<KMFolder> > mFoldersQueuedForChecking; // holds messageparts from the bodystructure - QPtrList<KMMessagePart> mBodyPartList; + TQPtrList<KMMessagePart> mBodyPartList; // the current message for the bodystructure KMMessage* mCurrentMsg; - QGuardedPtr<KPIM::ProgressItem> mListDirProgressItem; + TQGuardedPtr<KPIM::ProgressItem> 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<QString> mLocalSubscriptionBlackList; + std::set<TQString> 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 13d4baa84..50db423cb 100644 --- a/kmail/imapjob.cpp +++ b/kmail/imapjob.cpp @@ -41,7 +41,7 @@ using KPIM::ProgressManager; #include "util.h" -#include <qstylesheet.h> +#include <tqstylesheet.h> #include <kio/scheduler.h> #include <kdebug.h> #include <klocale.h> @@ -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<KMMessage>& msgList, QString sets, JobType jt, +ImapJob::ImapJob( TQPtrList<KMMessage>& 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<KMMessage>& msgList ) +void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, + TQPtrList<KMMessage>& 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<KMMessage> it( msgList ); + TQPtrListIterator<KMMessage> 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<KMMessage> mit( (*it).msgList ); mit.current(); ++mit ) + for ( TQPtrListIterator<KMMessage> 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<KMMessage> mit( (*it).msgList ); mit.current(); ++mit ) + for ( TQPtrListIterator<KMMessage> 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<KMFolderImap*>(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<KMFolderImap*>(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<ulong> olduids = KMFolderImap::splitSets(oldUid); - QValueList<ulong> newuids = KMFolderImap::splitSets(newUid); + TQValueList<ulong> olduids = KMFolderImap::splitSets(oldUid); + TQValueList<ulong> 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<KMFolderImap*>(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 d12ac0f7f..94be48d14 100644 --- a/kmail/imapjob.h +++ b/kmail/imapjob.h @@ -37,7 +37,7 @@ #include "folderjob.h" -#include <qcstring.h> +#include <tqcstring.h> 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<KMMessage>& msgList, QString sets, + TQString partSpecifier = TQString::null, const AttachmentStrategy *as = 0 ); + ImapJob( TQPtrList<KMMessage>& 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<KMMessage>& msgList ); + void init( JobType jt, TQString sets, KMFolderImap *folder, + TQPtrList<KMMessage>& 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 5b156a999..ef1ba7de3 100644 --- a/kmail/index.cpp +++ b/kmail/index.cpp @@ -37,11 +37,11 @@ #include <kdebug.h> #include <kapplication.h> -#include <qfile.h> -#include <qtimer.h> -#include <qvaluestack.h> -#include <qptrlist.h> -#include <qfileinfo.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqvaluestack.h> +#include <tqptrlist.h> +#include <tqfileinfo.h> #ifdef HAVE_INDEXLIB #include <indexlib/create.h> #endif @@ -60,44 +60,44 @@ const char* const folderIndexDisabledKey = "fulltextIndexDisabled"; #ifdef HAVE_INDEXLIB static -QValueList<int> vectorToQValueList( const std::vector<Q_UINT32>& input ) { - QValueList<int> res; +TQValueList<int> vectorToQValueList( const std::vector<Q_UINT32>& input ) { + TQValueList<int> res; std::copy( input.begin(), input.end(), std::back_inserter( res ) ); return res; } static -std::vector<Q_UINT32> QValueListToVector( const QValueList<int>& input ) { +std::vector<Q_UINT32> QValueListToVector( const TQValueList<int>& input ) { std::vector<Q_UINT32> res; // res.assign( input.begin(), input.end() ) doesn't work for some reason - for ( QValueList<int>::const_iterator first = input.begin(), past = input.end(); first != past; ++first ) { + for ( TQValueList<int>::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<const char*>( QFile::encodeName( defaultPath() ) + "/lock" ) ) ), + mLockFile( std::string( static_cast<const char*>( 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<int> pendingMsg; + TQValueList<int> 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<const char*>( 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<KMFolderDir*> folders; + TQValueStack<KMFolderDir*> 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<Q_UINT32> KMMsgIndex::simpleSearch( QString s, bool* ok ) const { +std::vector<Q_UINT32> 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<Q_UINT32> KMMsgIndex::simpleSearch( QString s, bool* ok ) const { bool KMMsgIndex::canHandleQuery( const KMSearchPattern* pat ) const { kdDebug( 5006 ) << "KMMsgIndex::canHandleQuery( . )" << endl; if ( !pat ) return false; - QPtrListIterator<KMSearchRule> it( *pat ); + TQPtrListIterator<KMSearchRule> 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 731f407f6..91c69f2d7 100644 --- a/kmail/index.h +++ b/kmail/index.h @@ -31,10 +31,10 @@ */ -#include <qobject.h> -#include <qcstring.h> -#include <qvaluelist.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqcstring.h> +#include <tqvaluelist.h> +#include <tqtimer.h> #include <config.h> #ifdef HAVE_INDEXLIB #include <indexlib/index.h> @@ -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<Q_UINT32> simpleSearch( QString, bool* ) const; + std::vector<Q_UINT32> 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<KMFolder*> mOpenedFolders; std::vector<Search*> 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 0a69dd0c5..e38296a56 100644 --- a/kmail/interfaces/bodypart.h +++ b/kmail/interfaces/bodypart.h @@ -35,7 +35,7 @@ #define __KMAIL_INTERFACES_BODYPART_H__ template <typename T> class QMemArray; -typedef QMemArray<char> QByteArray; +typedef TQMemArray<char> 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 1fd8b16d9..5dff819e8 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 3621038b0..b95526b3c 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 e8fdd802d..36b09110b 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 808f3196f..b19b7e199 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 13f8e8903..7219dc0e9 100644 --- a/kmail/isubject.cpp +++ b/kmail/isubject.cpp @@ -5,7 +5,7 @@ #include "isubject.h" #include "interfaces/observer.h" -#include <qtl.h> +#include <tqtl.h> #include <kdebug.h> @@ -23,7 +23,7 @@ namespace KMail { } void ISubject::detach( Interface::Observer * pObserver ) { - QValueVector<Interface::Observer*>::iterator it = qFind( mObserverList.begin(), mObserverList.end(), pObserver ); + TQValueVector<Interface::Observer*>::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<Interface::Observer*>::iterator it = mObserverList.begin() ; it != mObserverList.end() ; ++it ) + for ( TQValueVector<Interface::Observer*>::iterator it = mObserverList.begin() ; it != mObserverList.end() ; ++it ) (*it)->update( this ); } diff --git a/kmail/isubject.h b/kmail/isubject.h index eeb03bb41..93a84a29b 100644 --- a/kmail/isubject.h +++ b/kmail/isubject.h @@ -33,7 +33,7 @@ #include "interfaces/observable.h" -#include <qvaluevector.h> +#include <tqvaluevector.h> namespace KMail { @@ -55,7 +55,7 @@ namespace KMail { void notify(); private: - QValueVector<Interface::Observer*> mObserverList; + TQValueVector<Interface::Observer*> mObserverList; }; } // namespace KMail diff --git a/kmail/jobscheduler.cpp b/kmail/jobscheduler.cpp index cedb530be..89cabec9e 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 531e51a52..2dd04d4ac 100644 --- a/kmail/jobscheduler.h +++ b/kmail/jobscheduler.h @@ -29,10 +29,10 @@ #ifndef KMAIL_JOBSCHEDULER_H #define KMAIL_JOBSCHEDULER_H -#include <qobject.h> -#include <qvaluelist.h> -#include <qguardedptr.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqguardedptr.h> +#include <tqtimer.h> #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<KMFolder> mCurrentFolder; + TQGuardedPtr<KMFolder> 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<ScheduledTask *> TaskList; + typedef TQValueList<ScheduledTask *> 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 985acf6d6..3ba43637d 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 930cab6f0..c18b42971 100644 --- a/kmail/kcursorsaver.h +++ b/kmail/kcursorsaver.h @@ -1,8 +1,8 @@ #ifndef kcursorsaver_h #define kcursorsaver_h -#include <qcursor.h> -#include <qapplication.h> +#include <tqcursor.h> +#include <tqapplication.h> /** * @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 2161031fb..e35a7f5f9 100644 --- a/kmail/keyresolver.cpp +++ b/kmail/keyresolver.cpp @@ -58,8 +58,8 @@ #include <kinputdialog.h> #include <kmessagebox.h> -#include <qstringlist.h> -#include <qtl.h> +#include <tqstringlist.h> +#include <tqtl.h> #include <time.h> @@ -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<GpgME::Key>& keys ) { - QStringList strings; +static TQStringList keysAsStrings( const std::vector<GpgME::Key>& keys ) { + TQStringList strings; for ( std::vector<GpgME::Key>::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<GpgME::Key> TrustedOrConfirmed( const std::vector<GpgM return keys; // if some keys are not fully trusted, let the user confirm their use - QString msg = i18n("One or more of your configured OpenPGP encryption " + TQString msg = i18n("One or more of your configured OpenPGP encryption " "keys or S/MIME certificates is not fully trusted " "for encryption."); @@ -451,8 +451,8 @@ namespace { } // anon namespace -static QString canonicalAddress( const QString & _address ) { - const QString address = KPIM::getEmailAddress( _address ); +static TQString canonicalAddress( const TQString & _address ) { + const TQString address = KPIM::getEmailAddress( _address ); if ( address.find('@') == -1 ) { // local address //char hostname[1024]; @@ -471,7 +471,7 @@ struct FormatInfo { }; struct Kleo::KeyResolver::Private { - std::set<QCString> alreadyWarnedFingerprints; + std::set<TQCString> alreadyWarnedFingerprints; std::vector<GpgME::Key> mOpenPGPSigningKeys; // signing std::vector<GpgME::Key> mSMIMESigningKeys; // signing @@ -485,7 +485,7 @@ struct Kleo::KeyResolver::Private { std::map<CryptoMessageFormat,FormatInfo> mFormatInfoMap; // key=email address, value=crypto preferences for this contact (from kabc) - typedef std::map<QString, ContactPreferences> ContactPreferencesMap; + typedef std::map<TQString, ContactPreferences> 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("<p>Your OpenPGP signing key</p><p align=center><b>%1</b> (KeyID 0x%2)</p>" @@ -562,7 +562,7 @@ Kpgp::Result Kleo::KeyResolver::checkKeyNearExpiry( const GpgME::Key & key, cons "<p>expires in less than a day.</p>", "<p>The OpenPGP key for</p><p align=center><b>%1</b> (KeyID 0x%2)</p>" "<p>expires in less than %n days.</p>", - 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<GpgME::Key> 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::Item> Kleo::KeyResolver::getEncryptionItems( const QStringList & addresses ) { +std::vector<Kleo::KeyResolver::Item> Kleo::KeyResolver::getEncryptionItems( const TQStringList & addresses ) { std::vector<Item> 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<GpgME::Key> Kleo::KeyResolver::encryptToSelfKeysFor( CryptoMessageFo return std::vector<GpgME::Key>(); } -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<GpgME::Key> Kleo::KeyResolver::signingKeys( CryptoMessageFormat f ) // -std::vector<GpgME::Key> Kleo::KeyResolver::selectKeys( const QString & person, const QString & msg, const std::vector<GpgME::Key> & selectedKeys ) const { +std::vector<GpgME::Key> Kleo::KeyResolver::selectKeys( const TQString & person, const TQString & msg, const std::vector<GpgME::Key> & 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<GpgME::Key>(); std::vector<GpgME::Key> keys = dlg.selectedKeys(); keys.erase( std::remove_if( keys.begin(), keys.end(), @@ -1381,12 +1381,12 @@ std::vector<GpgME::Key> Kleo::KeyResolver::selectKeys( const QString & person, c } -std::vector<GpgME::Key> Kleo::KeyResolver::getEncryptionKeys( const QString & person, bool quiet ) const { +std::vector<GpgME::Key> 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<GpgME::Key> Kleo::KeyResolver::getEncryptionKeys( const QString & pe } -std::vector<GpgME::Key> Kleo::KeyResolver::lookup( const QStringList & patterns, bool secret ) const { +std::vector<GpgME::Key> Kleo::KeyResolver::lookup( const TQStringList & patterns, bool secret ) const { if ( patterns.empty() ) return std::vector<GpgME::Key>(); kdDebug() << "Kleo::KeyResolver::lookup( \"" << patterns.join( "\", \"" ) @@ -1529,7 +1529,7 @@ void Kleo::KeyResolver::addKeys( const std::vector<Item> & 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 8cb7ebbb1..1232d560c 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<GpgME::Key>(), e ), signPref( s ), format( f ), needKeys( true ) {} - Item( const QString & a, const std::vector<GpgME::Key> & k, + Item( const TQString & a, const std::vector<GpgME::Key> & 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<GpgME::Key> & k ) + SplitInfo( const TQStringList & r ) : recipients( r ) {} + SplitInfo( const TQStringList & r, const std::vector<GpgME::Key> & k ) : recipients( r ), keys( k ) {} - QStringList recipients; + TQStringList recipients; std::vector<GpgME::Key> 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<Item> getEncryptionItems( const QStringList & recipients ); - std::vector<GpgME::Key> getEncryptionKeys( const QString & recipient, bool quiet ) const; + std::vector<Item> getEncryptionItems( const TQStringList & recipients ); + std::vector<GpgME::Key> getEncryptionKeys( const TQString & recipient, bool quiet ) const; Kpgp::Result showKeyApprovalDialog(); @@ -242,19 +242,19 @@ namespace Kleo { void addToAllSplitInfos( const std::vector<GpgME::Key> & keys, unsigned int formats ); void addKeys( const std::vector<Item> & items, CryptoMessageFormat f ); void addKeys( const std::vector<Item> & items ); - QStringList allRecipients() const; + TQStringList allRecipients() const; std::vector<GpgME::Key> signingKeysFor( CryptoMessageFormat f ) const; std::vector<GpgME::Key> encryptToSelfKeysFor( CryptoMessageFormat f ) const; - std::vector<GpgME::Key> lookup( const QStringList & patterns, bool secret=false ) const; + std::vector<GpgME::Key> lookup( const TQStringList & patterns, bool secret=false ) const; - bool haveTrustedEncryptionKey( const QString & person ) const; + bool haveTrustedEncryptionKey( const TQString & person ) const; - std::vector<GpgME::Key> selectKeys( const QString & person, const QString & msg, + std::vector<GpgME::Key> selectKeys( const TQString & person, const TQString & msg, const std::vector<GpgME::Key> & selectedKeys=std::vector<GpgME::Key>() ) 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 643d743c2..dfc9fd358 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<QScrollView *>(mHtmlPart->widget())->ensureVisible( 0, 0 ); + static_cast<TQScrollView *>(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 92eb15a91..82679d1e6 100644 --- a/kmail/khtmlparthtmlwriter.h +++ b/kmail/khtmlparthtmlwriter.h @@ -33,32 +33,32 @@ #define __KMAIL_KHTMLPARTHTMLWRITER_H__ #include "interfaces/htmlwriter.h" -#include <qobject.h> +#include <tqobject.h> -#include <qstringlist.h> -#include <qtimer.h> +#include <tqstringlist.h> +#include <tqtimer.h> 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<QString, QString> EmbeddedPartMap; + typedef TQMap<TQString, TQString> 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 030ca3b0a..4249d3bf1 100644 --- a/kmail/klistboxdialog.cpp +++ b/kmail/klistboxdialog.cpp @@ -5,13 +5,13 @@ #include "klistboxdialog.h" -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> -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 106562332..d0f98ebb6 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 781d23329..78a20dc5b 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<const KMail::HeaderItem*>( item )->msgSerNum() ) ) return true; diff --git a/kmail/klistviewindexedsearchline.h b/kmail/klistviewindexedsearchline.h index f067c1cac..17b991d43 100644 --- a/kmail/klistviewindexedsearchline.h +++ b/kmail/klistviewindexedsearchline.h @@ -33,7 +33,7 @@ #include <klineedit.h> #include <klistviewsearchline.h> #include "headerlistquicksearch.h" -#include <qhbox.h> +#include <tqhbox.h> #include <vector> @@ -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<unsigned> mResults; diff --git a/kmail/kmaccount.cpp b/kmail/kmaccount.cpp index 65222dd4b..ad0f55b30 100644 --- a/kmail/kmaccount.cpp +++ b/kmail/kmaccount.cpp @@ -30,7 +30,7 @@ using KMail::FolderJob; #include <kdebug.h> #include <kconfig.h> -#include <qeventloop.h> +#include <tqeventloop.h> #include <stdlib.h> #include <unistd.h> @@ -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<FolderJob> it(mJobList); it.current(); ++it ) { + for( TQPtrListIterator<FolderJob> 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<KMMessage*>::Iterator it; + TQValueList<KMMessage*>::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<len; i++) @@ -491,7 +491,7 @@ void KMAccount::checkDone( bool newmail, CheckStatus status ) } //----------------------------------------------------------------------------- -void KMAccount::addToNewInFolder( QString folderId, int num ) +void KMAccount::addToNewInFolder( TQString folderId, int num ) { if ( mNewInFolder.find( folderId ) == mNewInFolder.end() ) mNewInFolder[folderId] = num; diff --git a/kmail/kmaccount.h b/kmail/kmaccount.h index 9a896e198..c54611cbd 100644 --- a/kmail/kmaccount.h +++ b/kmail/kmaccount.h @@ -23,10 +23,10 @@ #include <kprocess.h> #include <kaccount.h> -#include <qstring.h> -#include <qguardedptr.h> -#include <qvaluelist.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqguardedptr.h> +#include <tqvaluelist.h> +#include <tqmap.h> #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<QString, int> & newInFolder ); + virtual void newMailsProcessed( const TQMap<TQString, int> & 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<KMAcctFolder> mFolder; - QTimer *mTimer; + TQGuardedPtr<KMAcctFolder> 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<KMMessage*> mReceipts; - QPtrList<FolderJob> mJobList; + TQValueList<KMMessage*> mReceipts; + TQPtrList<FolderJob> mJobList; bool mHasInbox : 1; - QGuardedPtr<ProgressItem> mMailCheckProgressItem; + TQGuardedPtr<ProgressItem> 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<QString, int> mNewInFolder; + TQMap<TQString, int> mNewInFolder; }; #endif /*kmaccount_h*/ diff --git a/kmail/kmacctcachedimap.cpp b/kmail/kmacctcachedimap.cpp index fbdc79252..2305b0809 100644 --- a/kmail/kmacctcachedimap.cpp +++ b/kmail/kmacctcachedimap.cpp @@ -53,10 +53,10 @@ using KMail::AccountManager; #include <kapplication.h> #include <kconfig.h> -#include <qstylesheet.h> +#include <tqstylesheet.h> 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<KMFolderCachedImap*> folderList = killAllJobsInternal( disconnectSlave ); - for( QValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { + TQValueList<KMFolderCachedImap*> folderList = killAllJobsInternal( disconnectSlave ); + for( TQValueList<KMFolderCachedImap*>::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<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disconnectSlave ) +TQValueList<KMFolderCachedImap*> 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<KMFolderCachedImap*> folderList; - QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); + TQValueList<KMFolderCachedImap*> folderList; + TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); for (; it != mapJobData.end(); ++it) { if ((*it).parent) folderList << static_cast<KMFolderCachedImap*>((*it).parent->storage()); @@ -145,7 +145,7 @@ QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disc mapJobData.clear(); // Clear the joblist. Make SURE to stop the job emitting "finished" - for( QPtrListIterator<CachedImapJob> it( mJobList ); it.current(); ++it ) + for( TQPtrListIterator<CachedImapJob> it( mJobList ); it.current(); ++it ) it.current()->setPassiveDestructor( true ); KMAccount::deleteFolderJobs(); @@ -160,8 +160,8 @@ QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disc void KMAcctCachedImap::cancelMailCheck() { // Make list of folders to reset, like in killAllJobs - QValueList<KMFolderCachedImap*> folderList; - QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); + TQValueList<KMFolderCachedImap*> folderList; + TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); for (; it != mapJobData.end(); ++it) { if ( (*it).cancellable && (*it).parent ) folderList << static_cast<KMFolderCachedImap*>((*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<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { + for( TQValueList<KMFolderCachedImap*>::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<KIO::Job *, jobData>::Iterator it = mapJobData.begin(); + TQMap<KIO::Job *, jobData>::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<RenamedFolder> values = mRenamedFolders.values(); - QStringList lstNames; - QValueList<RenamedFolder>::const_iterator it = values.begin(); + const TQValueList<RenamedFolder> values = mRenamedFolders.values(); + TQStringList lstNames; + TQValueList<RenamedFolder>::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<QGuardedPtr<KMFolder> > folderList; + TQStringList strList; + TQValueList<TQGuardedPtr<KMFolder> > folderList; kmkernel->dimapFolderMgr()->createFolderList( &strList, &folderList, - folder->folder()->child(), QString::null, + folder->folder()->child(), TQString::null, false ); - QValueList<QGuardedPtr<KMFolder> >::Iterator it; + TQValueList<TQGuardedPtr<KMFolder> >::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<QString, RenamedFolder>::ConstIterator renit = mRenamedFolders.find( imapPath ); + TQMap<TQString, RenamedFolder>::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 6f10bfe56..e8e428204 100644 --- a/kmail/kmacctcachedimap.h +++ b/kmail/kmacctcachedimap.h @@ -34,7 +34,7 @@ #include "imapaccountbase.h" -#include <qguardedptr.h> +#include <tqguardedptr.h> 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<QString, RenamedFolder>& renamedFolders() const { return mRenamedFolders; } + const TQMap<TQString, RenamedFolder>& 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<KMFolderCachedImap*> killAllJobsInternal( bool disconnectSlave ); + TQValueList<KMFolderCachedImap*> killAllJobsInternal( bool disconnectSlave ); void processNewMail( KMFolderCachedImap* folder, bool recurse ); private: - QPtrList<CachedImapJob> mJobList; + TQPtrList<CachedImapJob> mJobList; KMFolderCachedImap *mFolder; - QStringList mDeletedFolders; // folders deleted in this session - QStringList mPreviouslyDeletedFolders; // folders deleted in a previous session - QMap<QString, RenamedFolder> mRenamedFolders; + TQStringList mDeletedFolders; // folders deleted in this session + TQStringList mPreviouslyDeletedFolders; // folders deleted in a previous session + TQMap<TQString, RenamedFolder> mRenamedFolders; bool mAnnotationCheckPassed; GroupwareType mGroupwareType; diff --git a/kmail/kmacctfolder.h b/kmail/kmacctfolder.h index e622ebd36..97dca0d75 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 9e83d243d..bf96c79a1 100644 --- a/kmail/kmacctimap.cpp +++ b/kmail/kmacctimap.cpp @@ -50,12 +50,12 @@ using KPIM::ProgressManager; #include <kmessagebox.h> #include <kdebug.h> -#include <qstylesheet.h> +#include <tqstylesheet.h> #include <errno.h> //----------------------------------------------------------------------------- -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<int> it( mFilterSerNumsToSave ); + TQStringList serNums; + TQDictIterator<int> 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<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); + TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); for ( ; it != mapJobData.end(); ++it) { - QPtrList<KMMessage> msgList = (*it).msgList; - QPtrList<KMMessage>::Iterator it2 = msgList.begin(); + TQPtrList<KMMessage> msgList = (*it).msgList; + TQPtrList<KMMessage>::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<ImapJob> it2( mJobList ); + TQPtrListIterator<ImapJob> 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<ImapJob> it( mJobList ); + TQPtrListIterator<ImapJob> it( mJobList ); while ( it.current() ) { ImapJob *job = it.current(); @@ -217,7 +217,7 @@ void KMAcctImap::ignoreJobsForMessage( KMMessage* msg ) //----------------------------------------------------------------------------- void KMAcctImap::ignoreJobsForFolder( KMFolder* folder ) { - QPtrListIterator<ImapJob> it( mJobList ); + TQPtrListIterator<ImapJob> 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<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); + TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); while ( it != mapJobData.end() ) { - QMap<KIO::Job*, jobData>::Iterator i = it; + TQMap<KIO::Job*, jobData>::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<KMFolderImap*> folderList; - QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); + TQValueList<KMFolderImap*> folderList; + TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin(); for (; it != mapJobData.end(); ++it) { if ( (*it).cancellable && (*it).parent ) { folderList << static_cast<KMFolderImap*>((*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<KMFolderImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) { + for( TQValueList<KMFolderImap*>::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<QGuardedPtr<KMFolder> >::Iterator it; + TQValueList<TQGuardedPtr<KMFolder> >::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<KMFolder*>(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<Q_UINT32> filterIt = mFilterSerNums.begin(); - QValueList<Q_UINT32> inTransit; + TQValueListIterator<Q_UINT32> filterIt = mFilterSerNums.begin(); + TQValueList<Q_UINT32> inTransit; if (ActionScheduler::isEnabled() || kmkernel->filterMgr()->atLeastOneOnlineImapFolderTarget()) { KMFilterMgr::FilterSet set = KMFilterMgr::Inbound; - QValueList<KMFilter*> filters = kmkernel->filterMgr()->filters(); + TQValueList<KMFilter*> 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<QGuardedPtr<KMFolder> > includedFolders; + TQValueList<TQGuardedPtr<KMFolder> > includedFolders; // check for excluded folders - QValueList<QGuardedPtr<KMFolder> >::Iterator it; + TQValueList<TQGuardedPtr<KMFolder> >::Iterator it; for (it = mMailCheckFolders.begin(); it != mMailCheckFolders.end(); ++it) { KMFolderImap* folder = static_cast<KMFolderImap*>(((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<KMFolder*>(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<Q_UINT32> findIt = mFilterSerNums.find( serNum ); + TQValueListIterator<Q_UINT32> 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 03aa0aa92..c69bca899 100644 --- a/kmail/kmacctimap.h +++ b/kmail/kmacctimap.h @@ -23,7 +23,7 @@ #define KMAcctImap_h #include "imapaccountbase.h" -#include <qdict.h> +#include <tqdict.h> 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<KMail::ImapJob> mJobList; - QGuardedPtr<KMFolderImap> mFolder; + TQPtrList<KMail::ImapJob> mJobList; + TQGuardedPtr<KMFolderImap> 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<Q_UINT32> mFilterSerNums; - QDict<int> mFilterSerNumsToSave; + TQTimer mErrorTimer; + TQValueList<Q_UINT32> mFilterSerNums; + TQDict<int> mFilterSerNumsToSave; KMail::ActionScheduler *mScheduler; }; diff --git a/kmail/kmacctlocal.cpp b/kmail/kmacctlocal.cpp index dfc8a1877..b486b5378 100644 --- a/kmail/kmacctlocal.cpp +++ b/kmail/kmacctlocal.cpp @@ -20,8 +20,8 @@ using KPIM::ProgressManager; #include <kdebug.h> #include <kconfig.h> -#include <qfileinfo.h> -#include <qstylesheet.h> +#include <tqfileinfo.h> +#include <tqstylesheet.h> #include <stdlib.h> #include <stdio.h> @@ -29,7 +29,7 @@ using KPIM::ProgressManager; #include <assert.h> //----------------------------------------------------------------------------- -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 12c14c107..2abe34f5b 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 0b62c6cb3..b3c5d31c7 100644 --- a/kmail/kmacctmaildir.cpp +++ b/kmail/kmacctmaildir.cpp @@ -4,7 +4,7 @@ #include <config.h> #endif -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "kmacctmaildir.h" #include "kmfoldermaildir.h" #include "kmacctfolder.h" @@ -19,7 +19,7 @@ using KPIM::ProgressManager; #include <kdebug.h> #include <kconfig.h> -#include <qstylesheet.h> +#include <tqstylesheet.h> #include <stdlib.h> #include <stdio.h> @@ -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("<qt>Cannot open folder <b>%1</b>.</qt>").arg( mailFolder.location() ); + TQString aStr = i18n("<qt>Cannot open folder <b>%1</b>.</qt>").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 05b90833c..1c655861a 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 e381b6300..44df37c61 100644 --- a/kmail/kmacctseldlg.cpp +++ b/kmail/kmacctseldlg.cpp @@ -24,36 +24,36 @@ #include <config.h> #endif -#include <qbuttongroup.h> -#include <qlayout.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlayout.h> +#include <tqradiobutton.h> #include <klocale.h> #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 00f1fec90..3aad59b15 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 288784db4..b115f54e2 100644 --- a/kmail/kmaddrbook.cpp +++ b/kmail/kmaddrbook.cpp @@ -32,33 +32,33 @@ #include <kabc/vcardconverter.h> #include <dcopref.h> -#include <qregexp.h> +#include <tqregexp.h> -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 bc4205a20..119943f0f 100644 --- a/kmail/kmaddrbook.h +++ b/kmail/kmaddrbook.h @@ -20,7 +20,7 @@ #ifndef KMAddrBook_h #define KMAddrBook_h -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdeversion.h> #include <kabc/addressee.h> @@ -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 1a4a04f23..fd47f0485 100644 --- a/kmail/kmailIface.h +++ b/kmail/kmailIface.h @@ -5,7 +5,7 @@ #include <dcopobject.h> #include <dcopref.h> #include <kurl.h> -#include <qstringlist.h> +#include <tqstringlist.h> /** 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 e9722c253..22d48f1ee 100644 --- a/kmail/kmail_part.cpp +++ b/kmail/kmail_part.cpp @@ -54,14 +54,14 @@ using KRecentAddress::RecentAddresses; #include <ksettings/dispatcher.h> -#include <qlayout.h> +#include <tqlayout.h> 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 7a4ed9b78..97a667518 100644 --- a/kmail/kmail_part.h +++ b/kmail/kmail_part.h @@ -34,7 +34,7 @@ #include <kparts/event.h> #include <kparts/part.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kdepimmacros.h> 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 81948fdfa..d57611035 100644 --- a/kmail/kmailicalIface.h +++ b/kmail/kmailicalIface.h @@ -33,7 +33,7 @@ #define KMAILICALIFACE_H #include <dcopobject.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kurl.h> // 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<QCString, QString>& 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<TQCString, TQString>& 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<Q_UINT32, QString> incidencesKolab( const QString& mimetype, - const QString& resource, + virtual TQMap<Q_UINT32, TQString> 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<KMailICalIface::SubResource> subresourcesKolab( const QString& contentsType ) = 0; + virtual TQValueList<KMailICalIface::SubResource> 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<Q_UINT32, QString>, 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<Q_UINT32, TQString>, 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 38eb426f4..c1f626f85 100644 --- a/kmail/kmailicalifaceimpl.cpp +++ b/kmail/kmailicalifaceimpl.cpp @@ -61,9 +61,9 @@ using KMail::AccountManager; #include <mimelib/body.h> #include <mimelib/mimepp.h> -#include <qfile.h> -#include <qmap.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqmap.h> +#include <tqtextcodec.h> #include <kdebug.h> #include <kiconloader.h> @@ -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<int> dummy; + TQValueList<int> 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<QCString, QString>& customHeaders, - const QStringList& attachmentURLs, - const QStringList& attachmentNames, - const QStringList& attachmentMimetypes ) + const TQString& subject, + const TQString& plainTextBody, + const TQMap<TQCString, TQString>& 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<QCString, QString>::ConstIterator ith = customHeaders.begin(); - const QMap<QCString, QString>::ConstIterator ithEnd = customHeaders.end(); + TQMap<TQCString, TQString>::ConstIterator ith = customHeaders.begin(); + const TQMap<TQCString, TQString>::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<Q_UINT32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mimetype, - const QString& resource, +TQMap<Q_UINT32, TQString> 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<Q_UINT32, QString> aMap; + TQMap<Q_UINT32, TQString> aMap; if( !mUseResourceIMAP ) return aMap; @@ -562,8 +562,8 @@ QMap<Q_UINT32, QString> 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<Q_UINT32, QString> 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<const KMFolderCachedImap*>( 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::SubResource> KMailICalIfaceImpl::subresourcesKolab( const QString& contentsType ) +TQValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKolab( const TQString& contentsType ) { - QValueList<SubResource> subResources; + TQValueList<SubResource> 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::SubResource> KMailICalIfaceImpl::subresourcesKola // get the extra ones const KMail::FolderContentsType t = folderContentsType( contentsType ); - QDictIterator<ExtraFolder> it( mExtraFolders ); + TQDictIterator<ExtraFolder> it( mExtraFolders ); for ( ; it.current(); ++it ){ f = it.current()->folder; if ( f && f->storage()->contentsType() == t ) { @@ -723,11 +723,11 @@ QValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKola return subResources; } -bool KMailICalIfaceImpl::triggerSync( const QString& contentsType ) +bool KMailICalIfaceImpl::triggerSync( const TQString& contentsType ) { kdDebug(5006) << k_funcinfo << endl; - QValueList<KMailICalIfaceImpl::SubResource> folderList = subresourcesKolab( contentsType ); - for ( QValueList<KMailICalIfaceImpl::SubResource>::const_iterator it( folderList.begin() ), + TQValueList<KMailICalIfaceImpl::SubResource> folderList = subresourcesKolab( contentsType ); + for ( TQValueList<KMailICalIfaceImpl::SubResource>::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<QCString, QString>& customHeaders, - const QStringList& attachmentURLs, - const QStringList& attachmentMimetypes, - const QStringList& attachmentNames, - const QStringList& deletedAttachments ) + const TQString& subject, + const TQString& plainTextBody, + const TQMap<TQCString, TQString>& 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<QCString, QString>::ConstIterator ith = customHeaders.begin(); - const QMap<QCString, QString>::ConstIterator ithEnd = customHeaders.begin(); + TQMap<TQCString, TQString>::ConstIterator ith = customHeaders.begin(); + const TQMap<TQCString, TQString>::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<KFolderTreeItem::Type,QString> folderNames[4]; -QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const +static TQMap<KFolderTreeItem::Type,TQString> 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<KMFolderCachedImap*>( folder->storage() )->annotationFolderType(); + TQString annotation = static_cast<KMFolderCachedImap*>( 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/<path> or /user/someone/<path> - 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<KMFolder*>( 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<StandardFolderSearchResult> results( KMail::ContentsTypeLast + 1 ); + TQValueVector<StandardFolderSearchResult> results( KMail::ContentsTypeLast + 1 ); for ( int i = 0; i < KMail::ContentsTypeLast+1; ++i ) { if ( i != KMail::ContentsTypeMail ) { results[i] = findStandardResourceFolder( folderParentDir, static_cast<KMail::FolderContentsType>(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 = "<ul>"; + TQString operations = "<ul>"; for ( int i = 0; i < KMail::ContentsTypeLast+1; ++i ) { if ( i != KMail::ContentsTypeMail ) { - QString typeName = localizedDefaultFolderName( static_cast<KMail::FolderContentsType>( i ) ); + TQString typeName = localizedDefaultFolderName( static_cast<KMail::FolderContentsType>( i ) ); if ( results[i].found == StandardFolderSearchResult::NotFound ) operations += "<li>" + i18n( "%1: no folder found. It will be created." ).arg( typeName ) + "</li>"; else if ( results[i].found == StandardFolderSearchResult::FoundByType || results[i].found == StandardFolderSearchResult::FoundByName ) @@ -1798,10 +1798,10 @@ void KMailICalIfaceImpl::readConfig() kdDebug(5006) << k_funcinfo << "mNotes=" << mNotes << " " << mNotes->location() << endl; // Find all extra folders - QStringList folderNames; - QValueList<QGuardedPtr<KMFolder> > folderList; + TQStringList folderNames; + TQValueList<TQGuardedPtr<KMFolder> > folderList; kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList); - for(QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin(); + for(TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin(); it != folderList.end(); ++it) { FolderStorage* storage = (*it)->storage(); @@ -1861,10 +1861,10 @@ void KMailICalIfaceImpl::readConfig() kdDebug(5006) << k_funcinfo << "mNotes=" << mNotes << " " << mNotes->location() << endl; // Find all extra folders - QStringList folderNames; - QValueList<QGuardedPtr<KMFolder> > folderList; + TQStringList folderNames; + TQValueList<TQGuardedPtr<KMFolder> > folderList; kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList); - QValueList<QGuardedPtr<KMFolder> >::iterator it; + TQValueList<TQGuardedPtr<KMFolder> >::iterator it; for(it = folderList.begin(); it != folderList.end(); ++it) { FolderStorage *storage = (*it)->storage(); @@ -1872,7 +1872,7 @@ void KMailICalIfaceImpl::readConfig() if ( (*it)->folderType() == KMFolderTypeCachedImap ) { KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage ); - const QString attributes = imapFolder->folderAttributes(); + const TQString attributes = imapFolder->folderAttributes(); if ( attributes.contains( "X-FolderClass" ) ) { if ( !attributes.contains( "X-SpecialFolder" ) || (*it)->location().contains( "@" ) ) { const Scalix::FolderAttributeParser parser( attributes ); @@ -1906,15 +1906,15 @@ void KMailICalIfaceImpl::readConfig() void KMailICalIfaceImpl::slotCheckDone() { - QString parentName = GlobalSettings::self()->theIMAPResourceFolderParent(); + TQString parentName = GlobalSettings::self()->theIMAPResourceFolderParent(); KMFolder* folderParent = kmkernel->findFolderById( parentName ); //kdDebug(5006) << k_funcinfo << " folderParent=" << folderParent << endl; if ( folderParent ) // cool it exists now { KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() ); if ( account ) - disconnect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ), - this, SLOT( slotCheckDone() ) ); + disconnect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ), + this, TQT_SLOT( slotCheckDone() ) ); readConfig(); } } @@ -1971,12 +1971,12 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten KMFolder* folder = 0; // Find all extra folders - QStringList folderNames; - QValueList<QGuardedPtr<KMFolder> > folderList; + TQStringList folderNames; + TQValueList<TQGuardedPtr<KMFolder> > folderList; Q_ASSERT( kmkernel ); Q_ASSERT( kmkernel->dimapFolderMgr() ); kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList); - QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin(); + TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin(); for(; it != folderList.end(); ++it) { FolderStorage *storage = (*it)->storage(); @@ -1984,7 +1984,7 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten if ( (*it)->folderType() == KMFolderTypeCachedImap ) { KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage ); - const QString attributes = imapFolder->folderAttributes(); + const TQString attributes = imapFolder->folderAttributes(); if ( attributes.contains( "X-SpecialFolder" ) ) { const Scalix::FolderAttributeParser parser( attributes ); if ( contentsType == Scalix::Utils::scalixIdToContentsType( parser.folderClass() ) ) { @@ -2018,32 +2018,32 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten void KMailICalIfaceImpl::connectFolder( KMFolder* folder ) { // avoid multiple connections - disconnect( folder, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), - this, SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) ); - disconnect( folder, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), - this, SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) ); - disconnect( folder, SIGNAL( expunged( KMFolder* ) ), - this, SLOT( slotRefreshFolder( KMFolder* ) ) ); - disconnect( folder->storage(), SIGNAL( readOnlyChanged( KMFolder* ) ), - this, SLOT( slotFolderPropertiesChanged( KMFolder* ) ) ); - disconnect( folder, SIGNAL( nameChanged() ), - this, SLOT( slotFolderRenamed() ) ); - disconnect( folder->storage(), SIGNAL( locationChanged( const QString&, const QString&) ), - this, SLOT( slotFolderLocationChanged( const QString&, const QString&) ) ); + disconnect( folder, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), + this, TQT_SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) ); + disconnect( folder, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), + this, TQT_SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) ); + disconnect( folder, TQT_SIGNAL( expunged( KMFolder* ) ), + this, TQT_SLOT( slotRefreshFolder( KMFolder* ) ) ); + disconnect( folder->storage(), TQT_SIGNAL( readOnlyChanged( KMFolder* ) ), + this, TQT_SLOT( slotFolderPropertiesChanged( KMFolder* ) ) ); + disconnect( folder, TQT_SIGNAL( nameChanged() ), + this, TQT_SLOT( slotFolderRenamed() ) ); + disconnect( folder->storage(), TQT_SIGNAL( locationChanged( const TQString&, const TQString&) ), + this, TQT_SLOT( slotFolderLocationChanged( const TQString&, const TQString&) ) ); // Setup the signals to listen for changes - connect( folder, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), - this, SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) ); - connect( folder, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), - this, SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) ); - connect( folder, SIGNAL( expunged( KMFolder* ) ), - this, SLOT( slotRefreshFolder( KMFolder* ) ) ); - connect( folder->storage(), SIGNAL( readOnlyChanged( KMFolder* ) ), - this, SLOT( slotFolderPropertiesChanged( KMFolder* ) ) ); - connect( folder, SIGNAL( nameChanged() ), - this, SLOT( slotFolderRenamed() ) ); - connect( folder->storage(), SIGNAL( locationChanged( const QString&, const QString&) ), - this, SLOT( slotFolderLocationChanged( const QString&, const QString&) ) ); + connect( folder, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), + this, TQT_SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) ); + connect( folder, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), + this, TQT_SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) ); + connect( folder, TQT_SIGNAL( expunged( KMFolder* ) ), + this, TQT_SLOT( slotRefreshFolder( KMFolder* ) ) ); + connect( folder->storage(), TQT_SIGNAL( readOnlyChanged( KMFolder* ) ), + this, TQT_SLOT( slotFolderPropertiesChanged( KMFolder* ) ) ); + connect( folder, TQT_SIGNAL( nameChanged() ), + this, TQT_SLOT( slotFolderRenamed() ) ); + connect( folder->storage(), TQT_SIGNAL( locationChanged( const TQString&, const TQString&) ), + this, TQT_SLOT( slotFolderLocationChanged( const TQString&, const TQString&) ) ); } @@ -2067,23 +2067,23 @@ void KMailICalIfaceImpl::cleanup() mContacts = mCalendar = mNotes = mTasks = mJournals = 0; } -QString KMailICalIfaceImpl::folderPixmap( KFolderTreeItem::Type type ) const +TQString KMailICalIfaceImpl::folderPixmap( KFolderTreeItem::Type type ) const { if( !mUseResourceIMAP ) - return QString::null; + return TQString::null; if( type == KFolderTreeItem::Contacts ) - return QString::fromLatin1( "kmgroupware_folder_contacts" ); + return TQString::fromLatin1( "kmgroupware_folder_contacts" ); else if( type == KFolderTreeItem::Calendar ) - return QString::fromLatin1( "kmgroupware_folder_calendar" ); + return TQString::fromLatin1( "kmgroupware_folder_calendar" ); else if( type == KFolderTreeItem::Notes ) - return QString::fromLatin1( "kmgroupware_folder_notes" ); + return TQString::fromLatin1( "kmgroupware_folder_notes" ); else if( type == KFolderTreeItem::Tasks ) - return QString::fromLatin1( "kmgroupware_folder_tasks" ); + return TQString::fromLatin1( "kmgroupware_folder_tasks" ); else if( type == KFolderTreeItem::Journals ) - return QString::fromLatin1( "kmgroupware_folder_journals" ); + return TQString::fromLatin1( "kmgroupware_folder_journals" ); - return QString::null; + return TQString::null; } static void reloadFolderTree() @@ -2095,9 +2095,9 @@ static void reloadFolderTree() // This is a very light-weight and fast 'parser' to retrieve // a data entry from a vCal taking continuation lines // into account -static void vPartMicroParser( const QString& str, QString& s ) +static void vPartMicroParser( const TQString& str, TQString& s ) { - QString line; + TQString line; uint len = str.length(); for( uint i=0; i<len; ++i){ @@ -2125,14 +2125,14 @@ static void vPartMicroParser( const QString& str, QString& s ) } // Returns the first child folder having the given annotation -static KMFolder* findFolderByAnnotation( KMFolderDir* folderParentDir, const QString& annotation ) +static KMFolder* findFolderByAnnotation( KMFolderDir* folderParentDir, const TQString& annotation ) { - QPtrListIterator<KMFolderNode> it( *folderParentDir ); + TQPtrListIterator<KMFolderNode> it( *folderParentDir ); for ( ; it.current(); ++it ) { if ( !it.current()->isDir() ) { KMFolder* folder = static_cast<KMFolder *>( it.current() ); if ( folder->folderType() == KMFolderTypeCachedImap ) { - QString folderAnnotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType(); + TQString folderAnnotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType(); //kdDebug(5006) << "findStandardResourceFolder: " << folder->name() << " has annotation " << folderAnnotation << endl; if ( folderAnnotation == annotation ) return folder; @@ -2147,12 +2147,12 @@ KMailICalIfaceImpl::StandardFolderSearchResult KMailICalIfaceImpl::findStandardR if ( GlobalSettings::self()->theIMAPResourceStorageFormat() == GlobalSettings::EnumTheIMAPResourceStorageFormat::XML ) { // Look for a folder with an annotation like "event.default" - KMFolder* folder = findFolderByAnnotation( folderParentDir, QString( s_folderContentsType[contentsType].annotation ) + ".default" ); + KMFolder* folder = findFolderByAnnotation( folderParentDir, TQString( s_folderContentsType[contentsType].annotation ) + ".default" ); if ( folder ) return StandardFolderSearchResult( folder, StandardFolderSearchResult::FoundAndStandard ); // Fallback: look for a folder with an annotation like "event" - folder = findFolderByAnnotation( folderParentDir, QString( s_folderContentsType[contentsType].annotation ) ); + folder = findFolderByAnnotation( folderParentDir, TQString( s_folderContentsType[contentsType].annotation ) ); if ( folder ) return StandardFolderSearchResult( folder, StandardFolderSearchResult::FoundByType ); @@ -2217,9 +2217,9 @@ bool KMailICalIfaceImpl::isResourceQuiet() const } -bool KMailICalIfaceImpl::addSubresource( const QString& resource, - const QString& parent, - const QString& contentsType ) +bool KMailICalIfaceImpl::addSubresource( const TQString& resource, + const TQString& parent, + const TQString& contentsType ) { kdDebug(5006) << "Adding subresource to parent: " << parent << " with name: " << resource << endl; kdDebug(5006) << "contents type: " << contentsType << endl; @@ -2246,7 +2246,7 @@ bool KMailICalIfaceImpl::addSubresource( const QString& resource, return true; } -bool KMailICalIfaceImpl::removeSubresource( const QString& location ) +bool KMailICalIfaceImpl::removeSubresource( const TQString& location ) { kdDebug(5006) << k_funcinfo << endl; diff --git a/kmail/kmailicalifaceimpl.h b/kmail/kmailicalifaceimpl.h index 261774860..5a92ffe92 100644 --- a/kmail/kmailicalifaceimpl.h +++ b/kmail/kmailicalifaceimpl.h @@ -42,9 +42,9 @@ #include "kmfoldertype.h" #include <kfoldertree.h> -#include <qdict.h> -#include <qguardedptr.h> -#include <qmap.h> +#include <tqdict.h> +#include <tqguardedptr.h> +#include <tqmap.h> class KMFolder; class KMMessage; @@ -58,84 +58,84 @@ class ExtraFolder { public: ExtraFolder( KMFolder* f ); ~ExtraFolder(); - QGuardedPtr<KMFolder> folder; + TQGuardedPtr<KMFolder> folder; }; class Accumulator { public: - Accumulator( const QString& t, const QString& f, int c ) + Accumulator( const TQString& t, const TQString& f, int c ) :type( t ), folder( f ), count( c ) {} - void add( const QString& incidence ) { + void add( const TQString& incidence ) { incidences << incidence; count--; } bool isFull() { return count == 0; } - const QString type; - const QString folder; - QStringList incidences; + const TQString type; + const TQString folder; + TQStringList incidences; int count; }; } /** The implementation of the interface. */ -class KMailICalIfaceImpl : public QObject, virtual public KMailICalIface { +class KMailICalIfaceImpl : public TQObject, virtual public KMailICalIface { Q_OBJECT public: KMailICalIfaceImpl(); - bool isWritableFolder( const QString& type, const QString& resource ); + bool isWritableFolder( const TQString& type, const TQString& resource ); - StorageFormat storageFormat( const QString &resource ); + StorageFormat storageFormat( const TQString &resource ); /// Update a kolab storage entry. /// If message is not there, it is added and /// given the subject as Subject: header. /// Returns the new mail serial number, /// or 0 if something went wrong, - Q_UINT32 update( const QString& resource, + Q_UINT32 update( const TQString& resource, Q_UINT32 sernum, - const QString& subject, - const QString& plainTextBody, - const QMap<QCString, QString>& customHeaders, - const QStringList& attachmentURLs, - const QStringList& attachmentMimetypes, - const QStringList& attachmentNames, - const QStringList& deletedAttachments ); - - bool deleteIncidenceKolab( const QString& resource, + const TQString& subject, + const TQString& plainTextBody, + const TQMap<TQCString, TQString>& customHeaders, + const TQStringList& attachmentURLs, + const TQStringList& attachmentMimetypes, + const TQStringList& attachmentNames, + const TQStringList& deletedAttachments ); + + bool deleteIncidenceKolab( const TQString& resource, Q_UINT32 sernum ); - int incidencesKolabCount( const QString& mimetype, - const QString& resource ); - QMap<Q_UINT32, QString> incidencesKolab( const QString& mimetype, - const QString& resource, + int incidencesKolabCount( const TQString& mimetype, + const TQString& resource ); + TQMap<Q_UINT32, TQString> incidencesKolab( const TQString& mimetype, + const TQString& resource, int startIndex, int nbMessages ); - QValueList<SubResource> subresourcesKolab( const QString& contentsType ); + TQValueList<SubResource> subresourcesKolab( const TQString& contentsType ); - bool triggerSync( const QString& contentsType ); + bool triggerSync( const TQString& contentsType ); // "Get" an attachment. This actually saves the attachment in a file // and returns a URL to it - KURL getAttachment( const QString& resource, + KURL getAttachment( const TQString& resource, Q_UINT32 sernum, - const QString& filename ); + const TQString& filename ); - QString attachmentMimetype( const QString &resource, + TQString attachmentMimetype( const TQString &resource, Q_UINT32 sernum, - const QString &filename ); + const TQString &filename ); - QStringList listAttachments( const QString &resource, Q_UINT32 sernum ); + TQStringList listAttachments( const TQString &resource, Q_UINT32 sernum ); - bool removeSubresource( const QString& ); + bool removeSubresource( const TQString& ); - bool addSubresource( const QString& resource, - const QString& parent, - const QString& contentsType ); + bool addSubresource( const TQString& resource, + const TQString& parent, + const TQString& contentsType ); // tell KOrganizer about messages to be deleted void msgRemoved( KMFolder*, KMMessage* ); @@ -177,22 +177,22 @@ public: /** * Returns the name of the standard icon for a folder of given type or - * QString::null if the type is no groupware type. + * TQString::null if the type is no groupware type. */ - QString folderPixmap( KFolderTreeItem::Type type ) const; + TQString folderPixmap( KFolderTreeItem::Type type ) const; /** Returns the localized name of a folder of given type. */ - QString folderName( KFolderTreeItem::Type type, int language = -1 ) const; + TQString folderName( KFolderTreeItem::Type type, int language = -1 ) const; /** Get the folder that holds *type* entries */ - KMFolder* folderFromType( const QString& type, const QString& folder ); + KMFolder* folderFromType( const TQString& type, const TQString& folder ); /** Return the ical type of a folder */ - QString icalFolderType( KMFolder* folder ) const; + TQString icalFolderType( KMFolder* folder ) const; /** Find message matching a given UID. */ - KMMessage* findMessageByUID( const QString& uid, KMFolder* folder ); + KMMessage* findMessageByUID( const TQString& uid, KMFolder* folder ); /** Find message matching a given serial number. */ static KMMessage* findMessageBySerNum( Q_UINT32 serNum, KMFolder* folder ); @@ -230,7 +230,7 @@ public slots: void slotIncidenceAdded( KMFolder* folder, Q_UINT32 sernum ); void slotIncidenceDeleted( KMFolder* folder, Q_UINT32 sernum ); - void slotRefresh( const QString& type); + void slotRefresh( const TQString& type); // Called when a folder is made readonly or readwrite, or renamed, // or any other similar change that affects the resources @@ -239,7 +239,7 @@ public slots: private slots: void slotRefreshFolder( KMFolder* ); void slotCheckDone(); - void slotFolderLocationChanged( const QString&, const QString& ); + void slotFolderLocationChanged( const TQString&, const TQString& ); void slotFolderRenamed(); void slotMessageRetrieved( KMMessage* ); @@ -250,7 +250,7 @@ private: void connectFolder( KMFolder* folder ); - KMFolder* extraFolder( const QString& type, const QString& folder ); + KMFolder* extraFolder( const TQString& type, const TQString& folder ); void syncFolder( KMFolder* folder ) const; @@ -264,24 +264,24 @@ private: }; StandardFolderSearchResult findStandardResourceFolder( KMFolderDir* folderParentDir, KMail::FolderContentsType contentsType ); - KMFolder* findResourceFolder( const QString& resource ); + KMFolder* findResourceFolder( const TQString& resource ); bool updateAttachment( KMMessage& msg, - const QString& attachmentURL, - const QString& attachmentName, - const QString& attachmentMimetype, + const TQString& attachmentURL, + const TQString& attachmentName, + const TQString& attachmentMimetype, bool lookupByName ); bool deleteAttachment( KMMessage& msg, - const QString& attachmentURL ); + const TQString& attachmentURL ); Q_UINT32 addIncidenceKolab( KMFolder& folder, - const QString& subject, - const QString& plainTextBody, - const QMap<QCString, QString>& customHeaders, - const QStringList& attachmentURLs, - const QStringList& attachmentNames, - const QStringList& attachmentMimetypes ); - static bool kolabXMLFoundAndDecoded( const KMMessage& msg, const QString& mimetype, QString& s ); + const TQString& subject, + const TQString& plainTextBody, + const TQMap<TQCString, TQString>& customHeaders, + const TQStringList& attachmentURLs, + const TQStringList& attachmentNames, + const TQStringList& attachmentMimetypes ); + static bool kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s ); void handleFolderSynced( KMFolder* folder, const KURL& folderURL, @@ -293,17 +293,17 @@ private: static bool folderIsAlarmRelevant( const KMFolder * ); private: - QGuardedPtr<KMFolder> mContacts; - QGuardedPtr<KMFolder> mCalendar; - QGuardedPtr<KMFolder> mNotes; - QGuardedPtr<KMFolder> mTasks; - QGuardedPtr<KMFolder> mJournals; + TQGuardedPtr<KMFolder> mContacts; + TQGuardedPtr<KMFolder> mCalendar; + TQGuardedPtr<KMFolder> mNotes; + TQGuardedPtr<KMFolder> mTasks; + TQGuardedPtr<KMFolder> mJournals; // The extra IMAP resource folders // Key: folder location. Data: folder. - QDict<KMail::ExtraFolder> mExtraFolders; + TQDict<KMail::ExtraFolder> mExtraFolders; // used for collecting incidences during async loading - QDict<KMail::Accumulator> mAccumulators; + TQDict<KMail::Accumulator> mAccumulators; // More info for each folder we care about (mContacts etc. as well as the extra folders) // The reason for storing it here is that it can be shared between // kmfoldercachedimap and kmfolderimap, and that it's groupware data anyway. @@ -315,7 +315,7 @@ private: FolderChanges mChanges; }; // The storage format used for each folder that we care about - typedef QMap<KMFolder*, FolderInfo> FolderInfoMap; + typedef TQMap<KMFolder*, FolderInfo> FolderInfoMap; // helper for reading the FolderInfo from the config file FolderInfo readFolderInfo( const KMFolder * const folder ) const; @@ -337,10 +337,10 @@ private: * Since these are transient attributes of only a small but changing number * of incidences they are not encapsulated in a struct or somesuch. */ - QMap<QString, Q_UINT32> mUIDToSerNum; - QMap<Q_UINT32, bool> mTheUnGetMes; - QMap<QString, QString> mPendingUpdates; - QMap<QString, bool> mInTransit; + TQMap<TQString, Q_UINT32> mUIDToSerNum; + TQMap<Q_UINT32, bool> mTheUnGetMes; + TQMap<TQString, TQString> mPendingUpdates; + TQMap<TQString, bool> mInTransit; }; diff --git a/kmail/kmatmlistview.cpp b/kmail/kmatmlistview.cpp index aca518e65..a30fe30c8 100644 --- a/kmail/kmatmlistview.cpp +++ b/kmail/kmatmlistview.cpp @@ -6,25 +6,25 @@ #include <config.h> #include "kmatmlistview.h" -#include <qcheckbox.h> -#include <qheader.h> +#include <tqcheckbox.h> +#include <tqheader.h> -KMAtmListViewItem::KMAtmListViewItem( QListView *parent ) - : QObject(), - QListViewItem( parent ) +KMAtmListViewItem::KMAtmListViewItem( TQListView *parent ) + : TQObject(), + TQListViewItem( parent ) { - mCBCompress = new QCheckBox( listView()->viewport() ); - mCBEncrypt = new QCheckBox( listView()->viewport() ); - mCBSign = new QCheckBox( listView()->viewport() ); + mCBCompress = new TQCheckBox( listView()->viewport() ); + mCBEncrypt = new TQCheckBox( listView()->viewport() ); + mCBSign = new TQCheckBox( listView()->viewport() ); mCBCompress->setShown( true ); updateAllCheckBoxes(); - connect( mCBCompress, SIGNAL( clicked() ), this, SLOT( slotCompress() ) ); - connect( listView()->header(), SIGNAL( sizeChange(int, int, int) ), - SLOT( slotHeaderChange( int, int, int ) ) ); - connect( listView()->header(), SIGNAL( indexChange(int, int, int) ), - SLOT( slotHeaderChange( int, int, int ) ) ); - connect( listView()->header(), SIGNAL( clicked( int ) ), SLOT( slotHeaderClick( int ) ) ); + connect( mCBCompress, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCompress() ) ); + connect( listView()->header(), TQT_SIGNAL( sizeChange(int, int, int) ), + TQT_SLOT( slotHeaderChange( int, int, int ) ) ); + connect( listView()->header(), TQT_SIGNAL( indexChange(int, int, int) ), + TQT_SLOT( slotHeaderChange( int, int, int ) ) ); + connect( listView()->header(), TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotHeaderClick( int ) ) ); } KMAtmListViewItem::~KMAtmListViewItem() @@ -37,7 +37,7 @@ KMAtmListViewItem::~KMAtmListViewItem() mCBCompress = 0; } -void KMAtmListViewItem::updateCheckBox( int headerSection, QCheckBox *cb ) +void KMAtmListViewItem::updateCheckBox( int headerSection, TQCheckBox *cb ) { //Calculate some values to determine the x-position where the checkbox //will be drawn @@ -50,7 +50,7 @@ void KMAtmListViewItem::updateCheckBox( int headerSection, QCheckBox *cb ) listView()->moveChild( cb, sectionPos + sectionOffset, itemPos() + 1 ); //Set the correct background color - QColor bg; + TQColor bg; if ( isSelected() ) { bg = listView()->colorGroup().highlight(); } else { @@ -77,7 +77,7 @@ void KMAtmListViewItem::updateAllCheckBoxes() // the cause of bug 113458. Therefore, both the signals connected in the // constructor and this function are necessary to keep the checkboxes' // positions in sync, and hopefully is enough. -void KMAtmListViewItem::paintCell ( QPainter * p, const QColorGroup &cg, +void KMAtmListViewItem::paintCell ( TQPainter * p, const TQColorGroup &cg, int column, int width, int align ) { switch ( column ) { @@ -86,13 +86,13 @@ void KMAtmListViewItem::paintCell ( QPainter * p, const QColorGroup &cg, case 6: updateCheckBox( 6, mCBSign ); break; } - QListViewItem::paintCell( p, cg, column, width, align ); + TQListViewItem::paintCell( p, cg, column, width, align ); } -int KMAtmListViewItem::compare( QListViewItem *i, int col, bool ascending ) const +int KMAtmListViewItem::compare( TQListViewItem *i, int col, bool ascending ) const { if ( col != 1 ) { - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); } return mAttachmentSize - diff --git a/kmail/kmatmlistview.h b/kmail/kmatmlistview.h index f50d4e398..e42f2628e 100644 --- a/kmail/kmatmlistview.h +++ b/kmail/kmatmlistview.h @@ -5,38 +5,38 @@ #ifndef __KMAIL_KMATMLISTVIEW_H__ #define __KMAIL_KMATMLISTVIEW_H__ -#include <qlistview.h> -#include <qcstring.h> +#include <tqlistview.h> +#include <tqcstring.h> class KMComposeWin; class MessageComposer; class QCheckBox; -class KMAtmListViewItem : public QObject, public QListViewItem +class KMAtmListViewItem : public TQObject, public QListViewItem { Q_OBJECT public: - KMAtmListViewItem( QListView *parent ); + KMAtmListViewItem( TQListView *parent ); virtual ~KMAtmListViewItem(); //A custom compare function is needed because the size column is //human-readable and therefore doesn't sort correctly. - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; - virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ); + virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); - void setUncompressedMimeType( const QCString & type, const QCString & subtype ) { + void setUncompressedMimeType( const TQCString & type, const TQCString & subtype ) { mType = type; mSubtype = subtype; } void setAttachmentSize( int numBytes ) { mAttachmentSize = numBytes; } - void uncompressedMimeType( QCString & type, QCString & subtype ) const { + void uncompressedMimeType( TQCString & type, TQCString & subtype ) const { type = mType; subtype = mSubtype; } - void setUncompressedCodec( const QCString &codec ) { mCodec = codec; } - QCString uncompressedCodec() const { return mCodec; } + void setUncompressedCodec( const TQCString &codec ) { mCodec = codec; } + TQCString uncompressedCodec() const { return mCodec; } void enableCryptoCBs( bool on ); void setEncrypt( bool on ); @@ -57,14 +57,14 @@ private slots: protected: - void updateCheckBox( int headerSection, QCheckBox *cb ); + void updateCheckBox( int headerSection, TQCheckBox *cb ); void updateAllCheckBoxes(); private: - QCheckBox *mCBEncrypt; - QCheckBox *mCBSign; - QCheckBox *mCBCompress; - QCString mType, mSubtype, mCodec; + TQCheckBox *mCBEncrypt; + TQCheckBox *mCBSign; + TQCheckBox *mCBCompress; + TQCString mType, mSubtype, mCodec; int mAttachmentSize; }; diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index 3119bb4ba..e0b911df7 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -54,9 +54,9 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qtextcodec.h> -#include <qpopupmenu.h> -#include <qeventloop.h> +#include <tqtextcodec.h> +#include <tqpopupmenu.h> +#include <tqeventloop.h> #include <libemailfunctions/email.h> #include <kdcopservicestarter.h> @@ -132,7 +132,7 @@ using namespace KMime; #include <kleo/cryptobackend.h> #include <kleo/cryptobackendfactory.h> -#include <qclipboard.h> +#include <tqclipboard.h> #include <memory> @@ -155,26 +155,26 @@ private: }; -KMCommand::KMCommand( QWidget *parent ) +KMCommand::KMCommand( TQWidget *parent ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ) { } -KMCommand::KMCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList ) +KMCommand::KMCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ), mMsgList( msgList ) { } -KMCommand::KMCommand( QWidget *parent, KMMsgBase *msgBase ) +KMCommand::KMCommand( TQWidget *parent, KMMsgBase *msgBase ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ) { mMsgList.append( msgBase ); } -KMCommand::KMCommand( QWidget *parent, KMMessage *msg ) +KMCommand::KMCommand( TQWidget *parent, KMMessage *msg ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ) { @@ -184,7 +184,7 @@ KMCommand::KMCommand( QWidget *parent, KMMessage *msg ) KMCommand::~KMCommand() { - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) { if (!(*fit)) continue; @@ -201,11 +201,11 @@ KMCommand::Result KMCommand::result() void KMCommand::start() { - QTimer::singleShot( 0, this, SLOT( slotStart() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) ); } -const QPtrList<KMMessage> KMCommand::retrievedMsgs() const +const TQPtrList<KMMessage> KMCommand::retrievedMsgs() const { return mRetrievedMsgs; } @@ -215,7 +215,7 @@ KMMessage *KMCommand::retrievedMessage() const return mRetrievedMsgs.getFirst(); } -QWidget *KMCommand::parentWidget() const +TQWidget *KMCommand::parentWidget() const { return mParent; } @@ -224,8 +224,8 @@ int KMCommand::mCountJobs = 0; void KMCommand::slotStart() { - connect( this, SIGNAL( messagesTransfered( KMCommand::Result ) ), - this, SLOT( slotPostTransfer( KMCommand::Result ) ) ); + connect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ), + this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) ); kmkernel->filterMgr()->ref(); if (mMsgList.find(0) != -1) { @@ -257,12 +257,12 @@ void KMCommand::slotStart() void KMCommand::slotPostTransfer( KMCommand::Result result ) { - disconnect( this, SIGNAL( messagesTransfered( KMCommand::Result ) ), - this, SLOT( slotPostTransfer( KMCommand::Result ) ) ); + disconnect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ), + this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) ); if ( result == OK ) result = execute(); mResult = result; - QPtrListIterator<KMMessage> it( mRetrievedMsgs ); + TQPtrListIterator<KMMessage> it( mRetrievedMsgs ); KMMessage* msg; while ( (msg = it.current()) != 0 ) { @@ -335,13 +335,13 @@ void KMCommand::transferSelectedMsgs() job->setCancellable( false ); totalSize += thisMsg->msgSizeServer(); // emitted when the message was transferred successfully - connect(job, SIGNAL(messageRetrieved(KMMessage*)), - this, SLOT(slotMsgTransfered(KMMessage*))); + connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + this, TQT_SLOT(slotMsgTransfered(KMMessage*))); // emitted when the job is destroyed - connect(job, SIGNAL(finished()), - this, SLOT(slotJobFinished())); - connect(job, SIGNAL(progress(unsigned long, unsigned long)), - this, SLOT(slotProgress(unsigned long, unsigned long))); + connect(job, TQT_SIGNAL(finished()), + this, TQT_SLOT(slotJobFinished())); + connect(job, TQT_SIGNAL(progress(unsigned long, unsigned long)), + this, TQT_SLOT(slotProgress(unsigned long, unsigned long))); // msg musn't be deleted thisMsg->setTransferInProgress(true); job->start(); @@ -359,8 +359,8 @@ void KMCommand::transferSelectedMsgs() } else { // wait for the transfer and tell the progressBar the necessary steps if ( mProgressDialog ) { - connect(mProgressDialog, SIGNAL(cancelClicked()), - this, SLOT(slotTransferCancelled())); + connect(mProgressDialog, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotTransferCancelled())); mProgressDialog->progressBar()->setTotalSteps(totalSize); } } @@ -414,7 +414,7 @@ void KMCommand::slotJobFinished() void KMCommand::slotTransferCancelled() { // kill the pending jobs - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) { if (!(*fit)) continue; @@ -428,7 +428,7 @@ void KMCommand::slotTransferCancelled() KMCommand::mCountJobs = 0; mCountMsgs = 0; // unget the transfered messages - QPtrListIterator<KMMessage> it( mRetrievedMsgs ); + TQPtrListIterator<KMMessage> it( mRetrievedMsgs ); KMMessage* msg; while ( (msg = it.current()) != 0 ) { @@ -477,8 +477,8 @@ KMCommand::Result KMMailtoComposeCommand::execute() } -KMMailtoReplyCommand::KMMailtoReplyCommand( QWidget *parent, - const KURL &url, KMMessage *msg, const QString &selection ) +KMMailtoReplyCommand::KMMailtoReplyCommand( TQWidget *parent, + const KURL &url, KMMessage *msg, const TQString &selection ) :KMCommand( parent, msg ), mUrl( url ), mSelection( selection ) { } @@ -502,7 +502,7 @@ KMCommand::Result KMMailtoReplyCommand::execute() } -KMMailtoForwardCommand::KMMailtoForwardCommand( QWidget *parent, +KMMailtoForwardCommand::KMMailtoForwardCommand( TQWidget *parent, const KURL &url, KMMessage *msg ) :KMCommand( parent, msg ), mUrl( url ) { @@ -526,14 +526,14 @@ KMCommand::Result KMMailtoForwardCommand::execute() } -KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, QWidget *parent ) +KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } KMCommand::Result KMAddBookmarksCommand::execute() { - QString filename = locateLocal( "data", QString::fromLatin1("konqueror/bookmarks.xml") ); + TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") ); KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename, false ); KBookmarkGroup group = bookManager->root(); @@ -546,7 +546,7 @@ KMCommand::Result KMAddBookmarksCommand::execute() } KMMailtoAddAddrBookCommand::KMMailtoAddAddrBookCommand( const KURL &url, - QWidget *parent ) + TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } @@ -561,7 +561,7 @@ KMCommand::Result KMMailtoAddAddrBookCommand::execute() KMMailtoOpenAddrBookCommand::KMMailtoOpenAddrBookCommand( const KURL &url, - QWidget *parent ) + TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } @@ -582,11 +582,11 @@ KMUrlCopyCommand::KMUrlCopyCommand( const KURL &url, KMMainWidget *mainWidget ) KMCommand::Result KMUrlCopyCommand::execute() { - QClipboard* clip = QApplication::clipboard(); + QClipboard* clip = TQApplication::clipboard(); if (mUrl.protocol() == "mailto") { // put the url into the mouse selection and the clipboard - QString address = KMMessage::decodeMailtoUrl( mUrl.path() ); + TQString address = KMMessage::decodeMailtoUrl( mUrl.path() ); clip->setSelectionMode( true ); clip->setText( address ); clip->setSelectionMode( false ); @@ -619,7 +619,7 @@ KMCommand::Result KMUrlOpenCommand::execute() } -KMUrlSaveCommand::KMUrlSaveCommand( const KURL &url, QWidget *parent ) +KMUrlSaveCommand::KMUrlSaveCommand( const KURL &url, TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } @@ -628,7 +628,7 @@ KMCommand::Result KMUrlSaveCommand::execute() { if ( mUrl.isEmpty() ) return OK; - KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), QString::null, + KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), TQString::null, parentWidget() ); if ( saveUrl.isEmpty() ) return Canceled; @@ -641,7 +641,7 @@ KMCommand::Result KMUrlSaveCommand::execute() return Canceled; } KIO::Job *job = KIO::file_copy(mUrl, saveUrl, -1, true); - connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotUrlSaveResult(KIO::Job*))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotUrlSaveResult(KIO::Job*))); setEmitsCompletedItself( true ); return OK; } @@ -660,7 +660,7 @@ void KMUrlSaveCommand::slotUrlSaveResult( KIO::Job *job ) } -KMEditMsgCommand::KMEditMsgCommand( QWidget *parent, KMMessage *msg ) +KMEditMsgCommand::KMEditMsgCommand( TQWidget *parent, KMMessage *msg ) :KMCommand( parent, msg ) { } @@ -689,7 +689,7 @@ KMCommand::Result KMEditMsgCommand::execute() return OK; } -KMUseTemplateCommand::KMUseTemplateCommand( QWidget *parent, KMMessage *msg ) +KMUseTemplateCommand::KMUseTemplateCommand( TQWidget *parent, KMMessage *msg ) :KMCommand( parent, msg ) { } @@ -717,7 +717,7 @@ KMCommand::Result KMUseTemplateCommand::execute() return OK; } -KMShowMsgSrcCommand::KMShowMsgSrcCommand( QWidget *parent, +KMShowMsgSrcCommand::KMShowMsgSrcCommand( TQWidget *parent, KMMessage *msg, bool fixedFont ) :KMCommand( parent, msg ), mFixedFont( fixedFont ) { @@ -733,7 +733,7 @@ KMCommand::Result KMShowMsgSrcCommand::execute() } if ( msg->isComplete() && !mMsgWasComplete ) msg->notify(); // notify observers as msg was transfered - QString str = msg->codec()->toUnicode( msg->asString() ); + TQString str = msg->codec()->toUnicode( msg->asString() ); MailSourceViewer *viewer = new MailSourceViewer(); // deletes itself upon close viewer->setCaption( i18n("Message as Plain Text") ); @@ -741,29 +741,29 @@ KMCommand::Result KMShowMsgSrcCommand::execute() if( mFixedFont ) viewer->setFont(KGlobalSettings::fixedFont()); - // Well, there is no widget to be seen here, so we have to use QCursor::pos() + // Well, there is no widget to be seen here, so we have to use TQCursor::pos() // Update: (GS) I'm not going to make this code behave according to Xinerama // configuration because this is quite the hack. - if (QApplication::desktop()->isVirtualDesktop()) { - int scnum = QApplication::desktop()->screenNumber(QCursor::pos()); - viewer->resize(QApplication::desktop()->screenGeometry(scnum).width()/2, - 2*QApplication::desktop()->screenGeometry(scnum).height()/3); + if (TQApplication::desktop()->isVirtualDesktop()) { + int scnum = TQApplication::desktop()->screenNumber(TQCursor::pos()); + viewer->resize(TQApplication::desktop()->screenGeometry(scnum).width()/2, + 2*TQApplication::desktop()->screenGeometry(scnum).height()/3); } else { - viewer->resize(QApplication::desktop()->geometry().width()/2, - 2*QApplication::desktop()->geometry().height()/3); + viewer->resize(TQApplication::desktop()->geometry().width()/2, + 2*TQApplication::desktop()->geometry().height()/3); } viewer->show(); return OK; } -static KURL subjectToUrl( const QString & subject ) { +static KURL subjectToUrl( const TQString & subject ) { return KFileDialog::getSaveURL( subject.stripWhiteSpace() - .replace( QDir::separator(), '_' ), + .replace( TQDir::separator(), '_' ), "*.mbox" ); } -KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, KMMessage * msg ) +KMSaveMsgCommand::KMSaveMsgCommand( TQWidget *parent, KMMessage * msg ) : KMCommand( parent ), mMsgListIndex( 0 ), mStandAloneMessage( 0 ), @@ -787,8 +787,8 @@ KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, KMMessage * msg ) mUrl = subjectToUrl( msg->cleanSubject() ); } -KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList ) +KMSaveMsgCommand::KMSaveMsgCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList ) : KMCommand( parent ), mMsgListIndex( 0 ), mStandAloneMessage( 0 ), @@ -803,7 +803,7 @@ KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, // We operate on serNums and not the KMMsgBase pointers, as those can // change, or become invalid when changing the current message, switching // folders, etc. - QPtrListIterator<KMMsgBase> it(msgList); + TQPtrListIterator<KMMsgBase> it(msgList); while ( it.current() ) { mMsgList.append( (*it)->getMsgSerNum() ); mTotalSize += (*it)->msgSize(); @@ -826,10 +826,10 @@ KMCommand::Result KMSaveMsgCommand::execute() mJob->slotTotalSize( mTotalSize ); mJob->setAsyncDataEnabled( true ); mJob->setReportDataSent( true ); - connect(mJob, SIGNAL(dataReq(KIO::Job*, QByteArray &)), - SLOT(slotSaveDataReq())); - connect(mJob, SIGNAL(result(KIO::Job*)), - SLOT(slotSaveResult(KIO::Job*))); + connect(mJob, TQT_SIGNAL(dataReq(KIO::Job*, TQByteArray &)), + TQT_SLOT(slotSaveDataReq())); + connect(mJob, TQT_SIGNAL(result(KIO::Job*)), + TQT_SLOT(slotSaveResult(KIO::Job*))); setEmitsCompletedItself( true ); return OK; } @@ -842,7 +842,7 @@ void KMSaveMsgCommand::slotSaveDataReq() if ( remainingBytes > MAX_CHUNK_SIZE ) remainingBytes = MAX_CHUNK_SIZE; - QByteArray data; + TQByteArray data; data.duplicate( mData.data() + mOffset, remainingBytes ); mJob->sendAsyncData( data ); mOffset += remainingBytes; @@ -861,7 +861,7 @@ void KMSaveMsgCommand::slotSaveDataReq() if ( msg ) { if ( msg->transferInProgress() ) { - QByteArray data = QByteArray(); + TQByteArray data = TQByteArray(); mJob->sendAsyncData( data ); } msg->setTransferInProgress( true ); @@ -872,8 +872,8 @@ void KMSaveMsgCommand::slotSaveDataReq() if ( msg->parent() && !msg->isComplete() ) { FolderJob *job = msg->parent()->createJob( msg ); job->setCancellable( false ); - connect(job, SIGNAL( messageRetrieved( KMMessage* ) ), - this, SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) ); + connect(job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ), + this, TQT_SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) ); job->start(); } } @@ -889,7 +889,7 @@ void KMSaveMsgCommand::slotSaveDataReq() mStandAloneMessage = 0; } else { // No more messages. Tell the putjob we are done. - QByteArray data = QByteArray(); + TQByteArray data = TQByteArray(); mJob->sendAsyncData( data ); } } @@ -904,7 +904,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg) msg->setTransferInProgress(false); mOffset = 0; - QByteArray data; + TQByteArray data; int size; // Unless it is great than 64 k send the whole message. kio buffers for us. if( mData.size() > (unsigned int) MAX_CHUNK_SIZE ) @@ -944,10 +944,10 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job) mJob->slotTotalSize( mTotalSize ); mJob->setAsyncDataEnabled( true ); mJob->setReportDataSent( true ); - connect(mJob, SIGNAL(dataReq(KIO::Job*, QByteArray &)), - SLOT(slotSaveDataReq())); - connect(mJob, SIGNAL(result(KIO::Job*)), - SLOT(slotSaveResult(KIO::Job*))); + connect(mJob, TQT_SIGNAL(dataReq(KIO::Job*, TQByteArray &)), + TQT_SLOT(slotSaveDataReq())); + connect(mJob, TQT_SIGNAL(result(KIO::Job*)), + TQT_SLOT(slotSaveResult(KIO::Job*))); } } else @@ -966,8 +966,8 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job) //----------------------------------------------------------------------------- -KMOpenMsgCommand::KMOpenMsgCommand( QWidget *parent, const KURL & url, - const QString & encoding ) +KMOpenMsgCommand::KMOpenMsgCommand( TQWidget *parent, const KURL & url, + const TQString & encoding ) : KMCommand( parent ), mUrl( url ), mEncoding( encoding ) @@ -987,15 +987,15 @@ KMCommand::Result KMOpenMsgCommand::execute() } mJob = KIO::get( mUrl, false, false ); mJob->setReportDataSent( true ); - connect( mJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - this, SLOT( slotDataArrived( KIO::Job*, const QByteArray & ) ) ); - connect( mJob, SIGNAL( result( KIO::Job * ) ), - SLOT( slotResult( KIO::Job * ) ) ); + connect( mJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT( slotDataArrived( KIO::Job*, const TQByteArray & ) ) ); + connect( mJob, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotResult( KIO::Job * ) ) ); setEmitsCompletedItself( true ); return OK; } -void KMOpenMsgCommand::slotDataArrived( KIO::Job *, const QByteArray & data ) +void KMOpenMsgCommand::slotDataArrived( KIO::Job *, const TQByteArray & data ) { if ( data.isEmpty() ) return; @@ -1075,8 +1075,8 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) //TODO: ReplyTo, NoQuoteReplyTo, ReplyList, ReplyToAll, ReplyAuthor // are all similar and should be factored -KMReplyToCommand::KMReplyToCommand( QWidget *parent, KMMessage *msg, - const QString &selection ) +KMReplyToCommand::KMReplyToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection ) : KMCommand( parent, msg ), mSelection( selection ) { } @@ -1098,7 +1098,7 @@ KMCommand::Result KMReplyToCommand::execute() } -KMNoQuoteReplyToCommand::KMNoQuoteReplyToCommand( QWidget *parent, +KMNoQuoteReplyToCommand::KMNoQuoteReplyToCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ) { @@ -1121,8 +1121,8 @@ KMCommand::Result KMNoQuoteReplyToCommand::execute() } -KMReplyListCommand::KMReplyListCommand( QWidget *parent, - KMMessage *msg, const QString &selection ) +KMReplyListCommand::KMReplyListCommand( TQWidget *parent, + KMMessage *msg, const TQString &selection ) : KMCommand( parent, msg ), mSelection( selection ) { } @@ -1144,8 +1144,8 @@ KMCommand::Result KMReplyListCommand::execute() } -KMReplyToAllCommand::KMReplyToAllCommand( QWidget *parent, - KMMessage *msg, const QString &selection ) +KMReplyToAllCommand::KMReplyToAllCommand( TQWidget *parent, + KMMessage *msg, const TQString &selection ) :KMCommand( parent, msg ), mSelection( selection ) { } @@ -1167,8 +1167,8 @@ KMCommand::Result KMReplyToAllCommand::execute() } -KMReplyAuthorCommand::KMReplyAuthorCommand( QWidget *parent, KMMessage *msg, - const QString &selection ) +KMReplyAuthorCommand::KMReplyAuthorCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection ) : KMCommand( parent, msg ), mSelection( selection ) { } @@ -1190,14 +1190,14 @@ KMCommand::Result KMReplyAuthorCommand::execute() } -KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity ) +KMForwardInlineCommand::KMForwardInlineCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity ) : KMCommand( parent, msgList ), mIdentity( identity ) { } -KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent, +KMForwardInlineCommand::KMForwardInlineCommand( TQWidget *parent, KMMessage *msg, uint identity ) : KMCommand( parent, msg ), mIdentity( identity ) @@ -1206,12 +1206,12 @@ KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent, KMCommand::Result KMForwardInlineCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); if (msgList.count() >= 2) { // Multiple forward uint id = 0; - QPtrList<KMMessage> linklist; + TQPtrList<KMMessage> linklist; for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) { // set the identity if (id == 0) @@ -1264,23 +1264,23 @@ KMCommand::Result KMForwardInlineCommand::execute() } -KMForwardAttachedCommand::KMForwardAttachedCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) +KMForwardAttachedCommand::KMForwardAttachedCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) : KMCommand( parent, msgList ), mIdentity( identity ), - mWin( QGuardedPtr<KMail::Composer>( win )) + mWin( TQGuardedPtr<KMail::Composer>( win )) { } -KMForwardAttachedCommand::KMForwardAttachedCommand( QWidget *parent, +KMForwardAttachedCommand::KMForwardAttachedCommand( TQWidget *parent, KMMessage * msg, uint identity, KMail::Composer *win ) : KMCommand( parent, msg ), mIdentity( identity ), - mWin( QGuardedPtr< KMail::Composer >( win )) + mWin( TQGuardedPtr< KMail::Composer >( win )) { } KMCommand::Result KMForwardAttachedCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); KMMessage *fwdMsg = new KMMessage; if (msgList.count() >= 2) { @@ -1327,23 +1327,23 @@ KMCommand::Result KMForwardAttachedCommand::execute() } -KMForwardDigestCommand::KMForwardDigestCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) +KMForwardDigestCommand::KMForwardDigestCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) : KMCommand( parent, msgList ), mIdentity( identity ), - mWin( QGuardedPtr<KMail::Composer>( win )) + mWin( TQGuardedPtr<KMail::Composer>( win )) { } -KMForwardDigestCommand::KMForwardDigestCommand( QWidget *parent, +KMForwardDigestCommand::KMForwardDigestCommand( TQWidget *parent, KMMessage * msg, uint identity, KMail::Composer *win ) : KMCommand( parent, msg ), mIdentity( identity ), - mWin( QGuardedPtr< KMail::Composer >( win )) + mWin( TQGuardedPtr< KMail::Composer >( win )) { } KMCommand::Result KMForwardDigestCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); if ( msgList.count() < 2 ) return Undefined; // must have more than 1 for a digest @@ -1351,7 +1351,7 @@ KMCommand::Result KMForwardDigestCommand::execute() uint id = 0; KMMessage *fwdMsg = new KMMessage; KMMessagePart *msgPart = new KMMessagePart; - QString msgPartText; + TQString msgPartText; int msgCnt = 0; // incase there are some we can't forward for some reason // dummy header initialization; initialization with the correct identity @@ -1359,7 +1359,7 @@ KMCommand::Result KMForwardDigestCommand::execute() fwdMsg->initHeader( id ); fwdMsg->setAutomaticFields( true ); fwdMsg->mMsg->Headers().ContentType().CreateBoundary( 1 ); - QCString boundary( fwdMsg->mMsg->Headers().ContentType().Boundary().c_str() ); + TQCString boundary( fwdMsg->mMsg->Headers().ContentType().Boundary().c_str() ); msgPartText = i18n("\nThis is a MIME digest forward. The content of the" " message is contained in the attachment(s).\n\n\n"); // iterate through all the messages to be forwarded @@ -1369,14 +1369,14 @@ KMCommand::Result KMForwardDigestCommand::execute() id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt(); // set the part header msgPartText += "--"; - msgPartText += QString::fromLatin1( boundary ); + msgPartText += TQString::fromLatin1( boundary ); msgPartText += "\nContent-Type: MESSAGE/RFC822"; - msgPartText += QString( "; CHARSET=%1" ).arg( msg->charset() ); + msgPartText += TQString( "; CHARSET=%1" ).arg( msg->charset() ); msgPartText += '\n'; DwHeaders dwh; dwh.MessageId().CreateDefault(); - msgPartText += QString( "Content-ID: %1\n" ).arg( dwh.MessageId().AsString().c_str() ); - msgPartText += QString( "Content-Description: %1" ).arg( msg->subject() ); + msgPartText += TQString( "Content-ID: %1\n" ).arg( dwh.MessageId().AsString().c_str() ); + msgPartText += TQString( "Content-Description: %1" ).arg( msg->subject() ); if ( !msg->subject().contains( "(fwd)" ) ) msgPartText += " (fwd)"; msgPartText += "\n\n"; @@ -1396,17 +1396,17 @@ KMCommand::Result KMForwardDigestCommand::execute() id = mIdentity; // use folder identity if no message had an id set fwdMsg->initHeader( id ); msgPartText += "--"; - msgPartText += QString::fromLatin1( boundary ); + msgPartText += TQString::fromLatin1( boundary ); msgPartText += "--\n"; - QCString tmp; + TQCString tmp; msgPart->setTypeStr( "MULTIPART" ); tmp.sprintf( "Digest; boundary=\"%s\"", boundary.data() ); msgPart->setSubtypeStr( tmp ); msgPart->setName( "unnamed" ); msgPart->setCte( DwMime::kCte7bit ); // does it have to be 7bit? - msgPart->setContentDescription( QString( "Digest of %1 messages." ).arg( msgCnt ) ); + msgPart->setContentDescription( TQString( "Digest of %1 messages." ).arg( msgCnt ) ); // THIS HAS TO BE AFTER setCte()!!!! - msgPart->setBodyEncoded( QCString( msgPartText.ascii() ) ); + msgPart->setBodyEncoded( TQCString( msgPartText.ascii() ) ); KCursorSaver busy( KBusyPtr::busy() ); KMail::Composer * win = KMail::makeComposer( fwdMsg, id ); win->addAttach( msgPart ); @@ -1414,7 +1414,7 @@ KMCommand::Result KMForwardDigestCommand::execute() return OK; } -KMRedirectCommand::KMRedirectCommand( QWidget *parent, +KMRedirectCommand::KMRedirectCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ) { @@ -1428,7 +1428,7 @@ KMCommand::Result KMRedirectCommand::execute() RedirectDialog dlg( parentWidget(), "redirect", true, kmkernel->msgSender()->sendImmediate() ); - if (dlg.exec()==QDialog::Rejected) return Failed; + if (dlg.exec()==TQDialog::Rejected) return Failed; KMMessage *newMsg = msg->createRedirect( dlg.to() ); KMFilterAction::sendMDN( msg, KMime::MDN::Dispatched ); @@ -1444,9 +1444,9 @@ KMCommand::Result KMRedirectCommand::execute() } -KMCustomReplyToCommand::KMCustomReplyToCommand( QWidget *parent, KMMessage *msg, - const QString &selection, - const QString &tmpl ) +KMCustomReplyToCommand::KMCustomReplyToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection, + const TQString &tmpl ) : KMCommand( parent, msg ), mSelection( selection ), mTemplate( tmpl ) { } @@ -1469,9 +1469,9 @@ KMCommand::Result KMCustomReplyToCommand::execute() } -KMCustomReplyAllToCommand::KMCustomReplyAllToCommand( QWidget *parent, KMMessage *msg, - const QString &selection, - const QString &tmpl ) +KMCustomReplyAllToCommand::KMCustomReplyAllToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection, + const TQString &tmpl ) : KMCommand( parent, msg ), mSelection( selection ), mTemplate( tmpl ) { } @@ -1494,15 +1494,15 @@ KMCommand::Result KMCustomReplyAllToCommand::execute() } -KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity, const QString &tmpl ) +KMCustomForwardCommand::KMCustomForwardCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity, const TQString &tmpl ) : KMCommand( parent, msgList ), mIdentity( identity ), mTemplate( tmpl ) { } -KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent, - KMMessage *msg, uint identity, const QString &tmpl ) +KMCustomForwardCommand::KMCustomForwardCommand( TQWidget *parent, + KMMessage *msg, uint identity, const TQString &tmpl ) : KMCommand( parent, msg ), mIdentity( identity ), mTemplate( tmpl ) { @@ -1510,12 +1510,12 @@ KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent, KMCommand::Result KMCustomForwardCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); if (msgList.count() >= 2) { // Multiple forward uint id = 0; - QPtrList<KMMessage> linklist; + TQPtrList<KMMessage> linklist; for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) { // set the identity if (id == 0) @@ -1567,9 +1567,9 @@ KMCommand::Result KMCustomForwardCommand::execute() } -KMPrintCommand::KMPrintCommand( QWidget *parent, +KMPrintCommand::KMPrintCommand( TQWidget *parent, KMMessage *msg, bool htmlOverride, bool htmlLoadExtOverride, - bool useFixedFont, const QString & encoding ) + bool useFixedFont, const TQString & encoding ) : KMCommand( parent, msg ), mHtmlOverride( htmlOverride ), mHtmlLoadExtOverride( htmlLoadExtOverride ), mUseFixedFont( useFixedFont ), mEncoding( encoding ) @@ -1578,7 +1578,7 @@ KMPrintCommand::KMPrintCommand( QWidget *parent, } -void KMPrintCommand::setOverrideFont( const QFont& font ) +void KMPrintCommand::setOverrideFont( const TQFont& font ) { mOverrideFont = font; } @@ -1602,14 +1602,14 @@ KMCommand::Result KMPrintCommand::execute() KMSetStatusCommand::KMSetStatusCommand( KMMsgStatus status, - const QValueList<Q_UINT32> &serNums, bool toggle ) + const TQValueList<Q_UINT32> &serNums, bool toggle ) : mStatus( status ), mSerNums( serNums ), mToggle( toggle ) { } KMCommand::Result KMSetStatusCommand::execute() { - QValueListIterator<Q_UINT32> it; + TQValueListIterator<Q_UINT32> it; int idx = -1; KMFolder *folder = 0; bool parentStatus = false; @@ -1627,7 +1627,7 @@ KMCommand::Result KMSetStatusCommand::execute() parentStatus = false; } } - QMap< KMFolder*, QValueList<int> > folderMap; + TQMap< KMFolder*, TQValueList<int> > folderMap; for ( it = mSerNums.begin(); it != mSerNums.end(); ++it ) { KMMsgDict::instance()->getLocation( *it, &folder, &idx ); if (folder) { @@ -1649,19 +1649,19 @@ KMCommand::Result KMSetStatusCommand::execute() folderMap[folder].append(idx); } } - QMapIterator< KMFolder*, QValueList<int> > it2 = folderMap.begin(); + TQMapIterator< KMFolder*, TQValueList<int> > it2 = folderMap.begin(); while ( it2 != folderMap.end() ) { KMFolder *f = it2.key(); f->setStatus( (*it2), mStatus, mToggle ); ++it2; } - //kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", QByteArray() ); + //kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() ); return OK; } -KMFilterCommand::KMFilterCommand( const QCString &field, const QString &value ) +KMFilterCommand::KMFilterCommand( const TQCString &field, const TQString &value ) : mField( field ), mValue( value ) { } @@ -1674,12 +1674,12 @@ KMCommand::Result KMFilterCommand::execute() } -KMFilterActionCommand::KMFilterActionCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, +KMFilterActionCommand::KMFilterActionCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, KMFilter *filter ) : KMCommand( parent, msgList ), mFilter( filter ) { - QPtrListIterator<KMMsgBase> it(msgList); + TQPtrListIterator<KMMsgBase> it(msgList); while ( it.current() ) { serNumList.append( (*it)->getMsgSerNum() ); ++it; @@ -1696,16 +1696,16 @@ KMCommand::Result KMFilterActionCommand::execute() ProgressManager::createProgressItem ( "filter"+ProgressManager::getUniqueID(), i18n( "Filtering messages" ) ); progressItem->setTotalItems( msgCountToFilter ); - QValueList<Q_UINT32>::const_iterator it; + TQValueList<Q_UINT32>::const_iterator it; for ( it = serNumList.begin(); it != serNumList.end(); it++ ) { Q_UINT32 serNum = *it; int diff = msgCountToFilter - ++msgCount; if ( diff < 10 || !( msgCount % 20 ) || msgCount <= 10 ) { progressItem->updateProgress(); - QString statusMsg = i18n("Filtering message %1 of %2"); + TQString statusMsg = i18n("Filtering message %1 of %2"); statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter ); KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg ); - KApplication::kApplication()->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 50 ); + KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 ); } int filterResult = kmkernel->filterMgr()->process( serNum, mFilter ); @@ -1726,7 +1726,7 @@ KMCommand::Result KMFilterActionCommand::execute() KMMetaFilterActionCommand::KMMetaFilterActionCommand( KMFilter *filter, KMHeaders *headers, KMMainWidget *main ) - : QObject( main ), + : TQObject( main ), mFilter( filter ), mHeaders( headers ), mMainWidget( main ) { } @@ -1736,7 +1736,7 @@ void KMMetaFilterActionCommand::start() if (ActionScheduler::isEnabled() ) { // use action scheduler KMFilterMgr::FilterSet set = KMFilterMgr::All; - QValueList<KMFilter*> filters; + TQValueList<KMFilter*> filters; filters.append( mFilter ); ActionScheduler *scheduler = new ActionScheduler( set, filters, mHeaders ); scheduler->setAlwaysMatch( true ); @@ -1744,7 +1744,7 @@ void KMMetaFilterActionCommand::start() int contentX, contentY; HeaderItem *nextItem = mHeaders->prepareMove( &contentX, &contentY ); - QPtrList<KMMsgBase> msgList = *mHeaders->selectedMsgs(true); + TQPtrList<KMMsgBase> msgList = *mHeaders->selectedMsgs(true); mHeaders->finalizeMove( nextItem, contentX, contentY ); for (KMMsgBase *msg = msgList.first(); msg; msg = msgList.next()) @@ -1783,7 +1783,7 @@ void FolderShortcutCommand::setAction( KAction* action ) mAction = action; } -KMMailingListFilterCommand::KMMailingListFilterCommand( QWidget *parent, +KMMailingListFilterCommand::KMMailingListFilterCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ) { @@ -1791,8 +1791,8 @@ KMMailingListFilterCommand::KMMailingListFilterCommand( QWidget *parent, KMCommand::Result KMMailingListFilterCommand::execute() { - QCString name; - QString value; + TQCString name; + TQString value; KMMessage *msg = retrievedMessage(); if (!msg) return Failed; @@ -1807,11 +1807,11 @@ KMCommand::Result KMMailingListFilterCommand::execute() void KMMenuCommand::folderToPopupMenu(bool move, - QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu ) + TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu ) { while ( menu->count() ) { - QPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if (popup) delete popup; else @@ -1825,7 +1825,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, receiver, aMenuToFolder, menu ); } else { // operate on top-level items - QPopupMenu* subMenu = new QPopupMenu(menu); + TQPopupMenu* subMenu = new TQPopupMenu(menu); makeFolderMenu( &kmkernel->folderMgr()->dir(), move, receiver, aMenuToFolder, subMenu ); menu->insertItem( i18n( "Local Folders" ), subMenu ); @@ -1833,7 +1833,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, for (KMFolderNode *node = fdir->first(); node; node = fdir->next()) { if (node->isDir()) continue; - subMenu = new QPopupMenu(menu); + subMenu = new TQPopupMenu(menu); makeFolderMenu( node, move, receiver, aMenuToFolder, subMenu ); menu->insertItem( node->label(), subMenu ); } @@ -1841,7 +1841,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, for (KMFolderNode *node = fdir->first(); node; node = fdir->next()) { if (node->isDir()) continue; - subMenu = new QPopupMenu(menu); + subMenu = new TQPopupMenu(menu); makeFolderMenu( node, move, receiver, aMenuToFolder, subMenu ); menu->insertItem( node->label(), subMenu ); } @@ -1849,20 +1849,20 @@ void KMMenuCommand::folderToPopupMenu(bool move, } void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, - QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu ) + TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu ) { // connect the signals if (move) { - disconnect(menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int))); - connect(menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int))); + disconnect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int))); + connect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int))); } else { - disconnect(menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int))); - connect(menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int))); + disconnect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int))); + connect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int))); } KMFolder *folder = 0; @@ -1893,11 +1893,11 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, if (it->isDir()) continue; KMFolder *child = static_cast<KMFolder*>(it); - QString label = child->label(); + TQString label = child->label(); label.replace("&","&&"); if (child->child() && child->child()->first()) { // descend - QPopupMenu *subMenu = new QPopupMenu(menu, "subMenu"); + TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu"); makeFolderMenu( child, move, receiver, aMenuToFolder, subMenu ); menu->insertItem( label, subMenu ); @@ -1913,7 +1913,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, KMCopyCommand::KMCopyCommand( KMFolder* destFolder, - const QPtrList<KMMsgBase> &msgList ) + const TQPtrList<KMMsgBase> &msgList ) :mDestFolder( destFolder ), mMsgList( msgList ) { setDeletesItself( true ); @@ -1932,8 +1932,8 @@ KMCommand::Result KMCopyCommand::execute() KMMessage *msg, *newMsg; int idx = -1; bool isMessage; - QPtrList<KMMessage> list; - QPtrList<KMMessage> localList; + TQPtrList<KMMessage> list; + TQPtrList<KMMessage> localList; if (mDestFolder && mDestFolder->open("kmcommand") != 0) { @@ -1986,10 +1986,10 @@ KMCommand::Result KMCopyCommand::execute() FolderJob *job = srcFolder->createJob(newMsg); job->setCancellable( false ); mPendingJobs << job; - connect(job, SIGNAL(messageRetrieved(KMMessage*)), - mDestFolder, SLOT(reallyAddCopyOfMsg(KMMessage*))); - connect( job, SIGNAL(result(KMail::FolderJob*)), - this, SLOT(slotJobFinished(KMail::FolderJob*)) ); + connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + mDestFolder, TQT_SLOT(reallyAddCopyOfMsg(KMMessage*))); + connect( job, TQT_SIGNAL(result(KMail::FolderJob*)), + this, TQT_SLOT(slotJobFinished(KMail::FolderJob*)) ); job->start(); } else { // local => others @@ -2008,17 +2008,17 @@ KMCommand::Result KMCopyCommand::execute() bool deleteNow = false; if (!localList.isEmpty()) { - QValueList<int> index; + TQValueList<int> index; mDestFolder->addMsg( localList, index ); - for ( QValueListIterator<int> it = index.begin(); it != index.end(); ++it ) { + for ( TQValueListIterator<int> it = index.begin(); it != index.end(); ++it ) { mDestFolder->unGetMsg( *it ); } if ( mDestFolder->folderType() == KMFolderTypeImap ) { if ( mPendingJobs.isEmpty() ) { // wait for the end of the copy before closing the folder KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage()); - connect( imapDestFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); + connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); } } else { deleteNow = list.isEmpty() && mPendingJobs.isEmpty(); // we're done if there are no other mails we need to fetch @@ -2031,8 +2031,8 @@ KMCommand::Result KMCopyCommand::execute() { // copy the message(s); note: the list is empty afterwards! KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage()); - connect( imapDestFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); + connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); imapDestFolder->copyMsg(list); imapDestFolder->getFolder(); } @@ -2056,9 +2056,9 @@ void KMCopyCommand::slotJobFinished(KMail::FolderJob * job) if ( job->error() ) { kdDebug(5006) << k_funcinfo << "folder job failed: " << job->error() << endl; // kill all pending jobs - for ( QValueList<KMail::FolderJob*>::Iterator it = mPendingJobs.begin(); it != mPendingJobs.end(); ++it ) { - disconnect( (*it), SIGNAL(result(KMail::FolderJob*)), - this, SLOT(slotJobFinished(KMail::FolderJob*)) ); + for ( TQValueList<KMail::FolderJob*>::Iterator it = mPendingJobs.begin(); it != mPendingJobs.end(); ++it ) { + disconnect( (*it), TQT_SIGNAL(result(KMail::FolderJob*)), + this, TQT_SLOT(slotJobFinished(KMail::FolderJob*)) ); (*it)->kill(); } mPendingJobs.clear(); @@ -2085,10 +2085,10 @@ void KMCopyCommand::slotFolderComplete( KMFolderImap*, bool success ) KMMoveCommand::KMMoveCommand( KMFolder* destFolder, - const QPtrList<KMMsgBase> &msgList) + const TQPtrList<KMMsgBase> &msgList) : mDestFolder( destFolder ), mProgressItem( 0 ) { - QPtrList<KMMsgBase> tmp = msgList; + TQPtrList<KMMsgBase> tmp = msgList; for ( KMMsgBase *msgBase = tmp.first(); msgBase; msgBase = tmp.next() ) mSerNumList.append( msgBase->getMsgSerNum() ); } @@ -2116,7 +2116,7 @@ KMCommand::Result KMMoveCommand::execute() { setEmitsCompletedItself( true ); setDeletesItself( true ); - typedef QMap< KMFolder*, QPtrList<KMMessage>* > FolderToMessageListMap; + typedef TQMap< KMFolder*, TQPtrList<KMMessage>* > FolderToMessageListMap; FolderToMessageListMap folderDeleteList; if (mDestFolder && mDestFolder->open("kmcommand") != 0) { @@ -2131,24 +2131,24 @@ KMCommand::Result KMMoveCommand::execute() ProgressManager::createProgressItem ( "move"+ProgressManager::getUniqueID(), mDestFolder ? i18n( "Moving messages" ) : i18n( "Deleting messages" ) ); - connect( mProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), - this, SLOT( slotMoveCanceled() ) ); + connect( mProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), + this, TQT_SLOT( slotMoveCanceled() ) ); KMMessage *msg; int rc = 0; int index; - QPtrList<KMMessage> list; + TQPtrList<KMMessage> list; int undoId = -1; mCompleteWithAddedMsg = false; if (mDestFolder) { - connect (mDestFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); + connect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); mLostBoys = mSerNumList; } mProgressItem->setTotalItems( mSerNumList.count() ); - for ( QValueList<Q_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) { + for ( TQValueList<Q_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) { KMFolder *srcFolder; int idx = -1; KMMsgDict::instance()->getLocation( *it, &srcFolder, &idx ); @@ -2178,11 +2178,11 @@ KMCommand::Result KMMoveCommand::execute() * signal so we notice when all the mails should have showed up in it * but haven't for some reason. */ KMFolderImap *imapFolder = static_cast<KMFolderImap*> ( mDestFolder->storage() ); - disconnect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )), - this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); + disconnect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )), + this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); - connect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )), - this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); + connect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )), + this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); list.append(msg); } else { // We are moving to a local folder. @@ -2212,7 +2212,7 @@ KMCommand::Result KMMoveCommand::execute() // we are really, really deleting, not just moving to trash if (srcFolder->folderType() == KMFolderTypeImap) { if (!folderDeleteList[srcFolder]) - folderDeleteList[srcFolder] = new QPtrList<KMMessage>; + folderDeleteList[srcFolder] = new TQPtrList<KMMessage>; folderDeleteList[srcFolder]->append( msg ); } else { srcFolder->removeMsg(idx); @@ -2240,8 +2240,8 @@ KMCommand::Result KMMoveCommand::execute() void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool success) { - disconnect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )), - this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); + disconnect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )), + this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); if ( success ) { // the folder was checked successfully but we were still called, so check // if we are still waiting for messages to show up. If so, uidValidity @@ -2270,8 +2270,8 @@ void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, Q_UINT32 serNum) mLostBoys.remove(serNum); if ( mLostBoys.isEmpty() ) { // we are done. All messages transferred to the host succesfully - disconnect (mDestFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); + disconnect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); if (mDestFolder && mDestFolder->folderType() != KMFolderTypeImap) { mDestFolder->sync(); } @@ -2311,7 +2311,7 @@ void KMMoveCommand::slotMoveCanceled() // srcFolder doesn't make much sense for searchFolders KMDeleteMsgCommand::KMDeleteMsgCommand( KMFolder* srcFolder, - const QPtrList<KMMsgBase> &msgList ) + const TQPtrList<KMMsgBase> &msgList ) :KMMoveCommand( findTrashFolder( srcFolder ), msgList) { srcFolder->open("kmcommand"); @@ -2368,9 +2368,9 @@ KMCommand::Result KMUrlClickedCommand::execute() msg->initHeader(mIdentity); msg->setCharset("utf-8"); msg->setTo( KMMessage::decodeMailtoUrl( mUrl.path() ) ); - QString query=mUrl.query(); + TQString query=mUrl.query(); while (!query.isEmpty()) { - QString queryPart; + TQString queryPart; int secondQuery = query.find('?',1); if (secondQuery != -1) queryPart = query.left(secondQuery); @@ -2411,7 +2411,7 @@ KMCommand::Result KMUrlClickedCommand::execute() mime->name() == "application/x-shellscript" ) { if (KMessageBox::warningYesNo( 0, i18n( "<qt>Do you really want to execute <b>%1</b>?</qt>" ) - .arg( mUrl.prettyURL() ), QString::null, i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes) + .arg( mUrl.prettyURL() ), TQString::null, i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes) return Canceled; } KRun * runner = new KRun( mUrl ); @@ -2423,21 +2423,21 @@ KMCommand::Result KMUrlClickedCommand::execute() return OK; } -KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, KMMessage *msg ) +KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ), mImplicitAttachments( true ), mEncoded( false ) { } -KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, const QPtrList<KMMsgBase>& msgs ) +KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, const TQPtrList<KMMsgBase>& msgs ) : KMCommand( parent, msgs ), mImplicitAttachments( true ), mEncoded( false ) { } -KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, QPtrList<partNode>& attachments, +KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, TQPtrList<partNode>& attachments, KMMessage *msg, bool encoded ) : KMCommand( parent ), mImplicitAttachments( false ), mEncoded( encoded ) { - for ( QPtrListIterator<partNode> it( attachments ); it.current(); ++it ) { + for ( TQPtrListIterator<partNode> it( attachments ); it.current(); ++it ) { mAttachmentMap.insert( it.current(), msg ); } } @@ -2446,9 +2446,9 @@ KMCommand::Result KMSaveAttachmentsCommand::execute() { setEmitsCompletedItself( true ); if ( mImplicitAttachments ) { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); KMMessage *msg; - for ( QPtrListIterator<KMMessage> itr( msgList ); + for ( TQPtrListIterator<KMMessage> itr( msgList ); ( msg = itr.current() ); ++itr ) { partNode *rootNode = partNode::fromMessage( msg ); @@ -2464,8 +2464,8 @@ KMCommand::Result KMSaveAttachmentsCommand::execute() setDeletesItself( true ); // load all parts KMLoadPartsCommand *command = new KMLoadPartsCommand( mAttachmentMap ); - connect( command, SIGNAL( partsRetrieved() ), - this, SLOT( slotSaveAll() ) ); + connect( command, TQT_SIGNAL( partsRetrieved() ), + this, TQT_SLOT( slotSaveAll() ) ); command->start(); return OK; @@ -2504,7 +2504,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() KURL url, dirUrl; if ( mAttachmentMap.count() > 1 ) { // get the dir - dirUrl = KDirSelectDialog::selectDirectory( QString::null, false, + dirUrl = KDirSelectDialog::selectDirectory( TQString::null, false, parentWidget(), i18n("Save Attachments To") ); if ( !dirUrl.isValid() ) { @@ -2521,14 +2521,14 @@ void KMSaveAttachmentsCommand::slotSaveAll() // only one item, get the desired filename partNode *node = mAttachmentMap.begin().key(); // replace all ':' with '_' because ':' isn't allowed on FAT volumes - QString s = + TQString s = node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = i18n("filename for an unnamed attachment", "attachment.1"); - url = KFileDialog::getSaveURL( s, QString::null, parentWidget(), - QString::null ); + url = KFileDialog::getSaveURL( s, TQString::null, parentWidget(), + TQString::null ); if ( url.isEmpty() ) { setResult( Canceled ); emit completed( this ); @@ -2537,7 +2537,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() } } - QMap< QString, int > renameNumbering; + TQMap< TQString, int > renameNumbering; Result globalResult = OK; int unnamedAtmCount = 0; @@ -2547,7 +2547,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() KURL curUrl; if ( !dirUrl.isEmpty() ) { curUrl = dirUrl; - QString s = + TQString s = it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' ); @@ -2566,14 +2566,14 @@ void KMSaveAttachmentsCommand::slotSaveAll() // Rename the file if we have already saved one with the same name: // try appending a number before extension (e.g. "pic.jpg" => "pic_2.jpg") - QString origFile = curUrl.fileName(); - QString file = origFile; + TQString origFile = curUrl.fileName(); + TQString file = origFile; while ( renameNumbering.contains(file) ) { file = origFile; int num = renameNumbering[file] + 1; int dotIdx = file.findRev('.'); - file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), QString("_") + QString::number(num) ); + file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), TQString("_") + TQString::number(num) ); } curUrl.setFileName(file); @@ -2632,7 +2632,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, KMessageBox::Yes ) bSaveWithSig = false; - QByteArray data; + TQByteArray data; if ( mEncoded ) { // This does not decode the Message Content-Transfer-Encoding @@ -2643,7 +2643,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, { if( bSaveEncrypted || !bEncryptedParts) { partNode *dataNode = node; - QCString rawReplyString; + TQCString rawReplyString; bool gotRawReplyString = false; if( !bSaveWithSig ) { if( DwMime::kTypeMultipart == node->type() && @@ -2677,7 +2677,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, gotRawReplyString = true; } } - QByteArray cstr = gotRawReplyString + TQByteArray cstr = gotRawReplyString ? rawReplyString : dataNode->msgPart().bodyDecodedBinary(); data = cstr; @@ -2689,8 +2689,8 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, data.resize( size ); } } - QDataStream ds; - QFile file; + TQDataStream ds; + TQFile file; KTempFile tf; tf.setAutoDelete( true ); if ( url.isLocalFile() ) @@ -2703,7 +2703,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, i18n( "%2 is detailed error description", "Could not write the file %1:\n%2" ) .arg( file.name() ) - .arg( QString::fromLocal8Bit( strerror( errno ) ) ), + .arg( TQString::fromLocal8Bit( strerror( errno ) ) ), i18n( "KMail Error" ) ); return Failed; } @@ -2736,10 +2736,10 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, return OK; } -KMLoadPartsCommand::KMLoadPartsCommand( QPtrList<partNode>& parts, KMMessage *msg ) +KMLoadPartsCommand::KMLoadPartsCommand( TQPtrList<partNode>& parts, KMMessage *msg ) : mNeedsRetrieval( 0 ) { - for ( QPtrListIterator<partNode> it( parts ); it.current(); ++it ) { + for ( TQPtrListIterator<partNode> it( parts ); it.current(); ++it ) { mPartMap.insert( it.current(), msg ); } } @@ -2770,8 +2770,8 @@ void KMLoadPartsCommand::slotStart() curFolder->createJob( it.data(), FolderJob::tGetMessage, 0, it.key()->msgPart().partSpecifier() ); job->setCancellable( false ); - connect( job, SIGNAL(messageUpdated(KMMessage*, QString)), - this, SLOT(slotPartRetrieved(KMMessage*, QString)) ); + connect( job, TQT_SIGNAL(messageUpdated(KMMessage*, TQString)), + this, TQT_SLOT(slotPartRetrieved(KMMessage*, TQString)) ); job->start(); } else kdWarning(5006) << "KMLoadPartsCommand - msg has no parent" << endl; @@ -2782,7 +2782,7 @@ void KMLoadPartsCommand::slotStart() } void KMLoadPartsCommand::slotPartRetrieved( KMMessage *msg, - QString partSpecifier ) + TQString partSpecifier ) { DwBodyPart *part = msg->findDwBodyPart( msg->getFirstDwBodyPart(), partSpecifier ); @@ -2810,7 +2810,7 @@ KMCommand::Result KMLoadPartsCommand::execute() return OK; } -KMResendMessageCommand::KMResendMessageCommand( QWidget *parent, +KMResendMessageCommand::KMResendMessageCommand( TQWidget *parent, KMMessage *msg ) :KMCommand( parent, msg ) { @@ -2824,7 +2824,7 @@ KMCommand::Result KMResendMessageCommand::execute() } KMMessage *newMsg = new KMMessage(*msg); - QStringList whiteList; + TQStringList whiteList; whiteList << "To" << "Cc" << "Bcc" << "Subject"; newMsg->sanitizeHeaders( whiteList ); @@ -2832,7 +2832,7 @@ KMCommand::Result KMResendMessageCommand::execute() newMsg->setParent( 0 ); // make sure we have an identity set, default, if necessary - newMsg->setHeaderField("X-KMail-Identity", QString::number( newMsg->identityUoid() )); + newMsg->setHeaderField("X-KMail-Identity", TQString::number( newMsg->identityUoid() )); newMsg->applyIdentity( newMsg->identityUoid() ); KMail::Composer * win = KMail::makeComposer(); @@ -2842,7 +2842,7 @@ KMCommand::Result KMResendMessageCommand::execute() return OK; } -KMMailingListCommand::KMMailingListCommand( QWidget *parent, KMFolder *folder ) +KMMailingListCommand::KMMailingListCommand( TQWidget *parent, KMFolder *folder ) : KMCommand( parent ), mFolder( folder ) { } @@ -2850,7 +2850,7 @@ KMMailingListCommand::KMMailingListCommand( QWidget *parent, KMFolder *folder ) KMCommand::Result KMMailingListCommand::execute() { KURL::List lst = urls(); - QString handler = ( mFolder->mailingList().handler() == MailingList::KMail ) + TQString handler = ( mFolder->mailingList().handler() == MailingList::KMail ) ? "mailto" : "https"; KMCommand *command = 0; @@ -2864,8 +2864,8 @@ KMCommand::Result KMMailingListCommand::execute() new KMUrlClickedCommand( lst.first(), mFolder->identity(), 0, false ); } if ( command ) { - connect( command, SIGNAL( completed( KMCommand * ) ), - this, SLOT( commandCompleted( KMCommand * ) ) ); + connect( command, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( commandCompleted( KMCommand * ) ) ); setDeletesItself( true ); setEmitsCompletedItself( true ); command->start(); @@ -2881,7 +2881,7 @@ void KMMailingListCommand::commandCompleted( KMCommand *command ) deleteLater(); } -KMMailingListPostCommand::KMMailingListPostCommand( QWidget *parent, KMFolder *folder ) +KMMailingListPostCommand::KMMailingListPostCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2890,7 +2890,7 @@ KURL::List KMMailingListPostCommand::urls() const return mFolder->mailingList().postURLS(); } -KMMailingListSubscribeCommand::KMMailingListSubscribeCommand( QWidget *parent, KMFolder *folder ) +KMMailingListSubscribeCommand::KMMailingListSubscribeCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2899,7 +2899,7 @@ KURL::List KMMailingListSubscribeCommand::urls() const return mFolder->mailingList().subscribeURLS(); } -KMMailingListUnsubscribeCommand::KMMailingListUnsubscribeCommand( QWidget *parent, KMFolder *folder ) +KMMailingListUnsubscribeCommand::KMMailingListUnsubscribeCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2908,7 +2908,7 @@ KURL::List KMMailingListUnsubscribeCommand::urls() const return mFolder->mailingList().unsubscribeURLS(); } -KMMailingListArchivesCommand::KMMailingListArchivesCommand( QWidget *parent, KMFolder *folder ) +KMMailingListArchivesCommand::KMMailingListArchivesCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2917,7 +2917,7 @@ KURL::List KMMailingListArchivesCommand::urls() const return mFolder->mailingList().archiveURLS(); } -KMMailingListHelpCommand::KMMailingListHelpCommand( QWidget *parent, KMFolder *folder ) +KMMailingListHelpCommand::KMMailingListHelpCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2934,7 +2934,7 @@ KMIMChatCommand::KMIMChatCommand( const KURL &url, KMMessage *msg ) KMCommand::Result KMIMChatCommand::execute() { kdDebug( 5006 ) << k_funcinfo << " URL is: " << mUrl << endl; - QString addr = KMMessage::decodeMailtoUrl( mUrl.path() ); + TQString addr = KMMessage::decodeMailtoUrl( mUrl.path() ); // find UID for mail address KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); KABC::AddresseeList addressees = addressBook->findByEmail( KPIM::getEmailAddress( addr ) ) ; @@ -2948,20 +2948,20 @@ KMCommand::Result KMIMChatCommand::execute() { kdDebug( 5006 ) << "Didn't find exactly one addressee, couldn't tell who to chat to for that email address. Count = " << addressees.count() << endl; - QString apology; + TQString apology; if ( addressees.isEmpty() ) apology = i18n( "There is no Address Book entry for this email address. Add them to the Address Book and then add instant messaging addresses using your preferred messaging client." ); else { apology = i18n( "More than one Address Book entry uses this email address:\n %1\n it is not possible to determine who to chat with." ); - QStringList nameList; + TQStringList nameList; KABC::AddresseeList::const_iterator it = addressees.begin(); KABC::AddresseeList::const_iterator end = addressees.end(); for ( ; it != end; ++it ) { nameList.append( (*it).realName() ); } - QString names = nameList.join( QString::fromLatin1( ",\n" ) ); + TQString names = nameList.join( TQString::fromLatin1( ",\n" ) ); apology = apology.arg( names ); } @@ -2971,8 +2971,8 @@ KMCommand::Result KMIMChatCommand::execute() } KMHandleAttachmentCommand::KMHandleAttachmentCommand( partNode* node, - KMMessage* msg, int atmId, const QString& atmName, - AttachmentAction action, KService::Ptr offer, QWidget* parent ) + KMMessage* msg, int atmId, const TQString& atmName, + AttachmentAction action, KService::Ptr offer, TQWidget* parent ) : KMCommand( parent ), mNode( node ), mMsg( msg ), mAtmId( atmId ), mAtmName( atmName ), mAction( action ), mOffer( offer ), mJob( 0 ) { @@ -2985,8 +2985,8 @@ void KMHandleAttachmentCommand::slotStart() // load the part kdDebug(5006) << "load part" << endl; KMLoadPartsCommand *command = new KMLoadPartsCommand( mNode, mMsg ); - connect( command, SIGNAL( partsRetrieved() ), - this, SLOT( slotPartComplete() ) ); + connect( command, TQT_SIGNAL( partsRetrieved() ), + this, TQT_SLOT( slotPartComplete() ) ); command->start(); } else { @@ -3032,15 +3032,15 @@ KMCommand::Result KMHandleAttachmentCommand::execute() return OK; } -QString KMHandleAttachmentCommand::createAtmFileLink() const +TQString KMHandleAttachmentCommand::createAtmFileLink() const { - QFileInfo atmFileInfo( mAtmName ); + TQFileInfo atmFileInfo( mAtmName ); if ( atmFileInfo.size() == 0 ) { kdDebug(5006) << k_funcinfo << "rewriting attachment" << endl; // there is something wrong so write the file again - QByteArray data = mNode->msgPart().bodyDecodedBinary(); + TQByteArray data = mNode->msgPart().bodyDecodedBinary(); size_t size = data.size(); if ( mNode->msgPart().type() == DwMime::kTypeText && size) { // convert CRLF to LF before writing text attachments to disk @@ -3053,19 +3053,19 @@ QString KMHandleAttachmentCommand::createAtmFileLink() const "]."+ atmFileInfo.extension() ); linkFile->setAutoDelete(true); - QString linkName = linkFile->name(); + TQString linkName = linkFile->name(); delete linkFile; - if ( ::link(QFile::encodeName( mAtmName ), QFile::encodeName( linkName )) == 0 ) { + if ( ::link(TQFile::encodeName( mAtmName ), TQFile::encodeName( linkName )) == 0 ) { return linkName; // success } - return QString::null; + return TQString::null; } KService::Ptr KMHandleAttachmentCommand::getServiceOffer() { KMMessagePart& msgPart = mNode->msgPart(); - const QString contentTypeStr = + const TQString contentTypeStr = ( msgPart.typeStr() + '/' + msgPart.subtypeStr() ).lower(); if ( contentTypeStr == "text/x-vcard" ) { @@ -3101,7 +3101,7 @@ void KMHandleAttachmentCommand::atmOpen() KURL::List lst; KURL url; bool autoDelete = true; - QString fname = createAtmFileLink(); + TQString fname = createAtmFileLink(); if ( fname.isNull() ) { autoDelete = false; @@ -3111,7 +3111,7 @@ void KMHandleAttachmentCommand::atmOpen() url.setPath( fname ); lst.append( url ); if ( (KRun::run( *mOffer, lst, autoDelete ) <= 0) && autoDelete ) { - QFile::remove(url.path()); + TQFile::remove(url.path()); } } @@ -3120,7 +3120,7 @@ void KMHandleAttachmentCommand::atmOpenWith() KURL::List lst; KURL url; bool autoDelete = true; - QString fname = createAtmFileLink(); + TQString fname = createAtmFileLink(); if ( fname.isNull() ) { autoDelete = false; @@ -3130,7 +3130,7 @@ void KMHandleAttachmentCommand::atmOpenWith() url.setPath( fname ); lst.append( url ); if ( (! KRun::displayOpenWithDialog(lst, autoDelete)) && autoDelete ) { - QFile::remove( url.path() ); + TQFile::remove( url.path() ); } } @@ -3142,7 +3142,7 @@ void KMHandleAttachmentCommand::atmView() void KMHandleAttachmentCommand::atmSave() { - QPtrList<partNode> parts; + TQPtrList<partNode> parts; parts.append( mNode ); // save, do not leave encoded KMSaveAttachmentsCommand *command = @@ -3175,9 +3175,9 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() if ( !chiasmus ) return; - const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) ); + const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) ); if ( !listjob.get() ) { - const QString msg = i18n( "Chiasmus backend does not offer the " + const TQString msg = i18n( "Chiasmus backend does not offer the " "\"x-obtain-keys\" function. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; @@ -3188,18 +3188,18 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() return; } - const QVariant result = listjob->property( "result" ); - if ( result.type() != QVariant::StringList ) { - const QString msg = i18n( "Unexpected return value from Chiasmus backend: " + const TQVariant result = listjob->property( "result" ); + if ( result.type() != TQVariant::StringList ) { + const TQString msg = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-obtain-keys\" function did not return a " "string list. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; } - const QStringList keys = result.toStringList(); + const TQStringList keys = result.toStringList(); if ( keys.empty() ) { - const QString msg = i18n( "No keys have been found. Please check that a " + const TQString msg = i18n( "No keys have been found. Please check that a " "valid key path has been set in the Chiasmus " "configuration." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); @@ -3209,27 +3209,27 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() ChiasmusKeySelector selectorDlg( parentWidget(), i18n( "Chiasmus Decryption Key Selection" ), keys, GlobalSettings::chiasmusDecryptionKey(), GlobalSettings::chiasmusDecryptionOptions() ); - if ( selectorDlg.exec() != QDialog::Accepted ) + if ( selectorDlg.exec() != TQDialog::Accepted ) return; GlobalSettings::setChiasmusDecryptionOptions( selectorDlg.options() ); GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() ); assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() ); - Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", QMap<QString,QVariant>() ); + Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() ); if ( !job ) { - const QString msg = i18n( "Chiasmus backend does not offer the " + const TQString msg = i18n( "Chiasmus backend does not offer the " "\"x-decrypt\" function. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; } - const QByteArray input = node->msgPart().bodyDecodedBinary(); + const TQByteArray input = node->msgPart().bodyDecodedBinary(); if ( !job->setProperty( "key", GlobalSettings::chiasmusDecryptionKey() ) || !job->setProperty( "options", GlobalSettings::chiasmusDecryptionOptions() ) || !job->setProperty( "input", input ) ) { - const QString msg = i18n( "The \"x-decrypt\" function does not accept " + const TQString msg = i18n( "The \"x-decrypt\" function does not accept " "the expected parameters. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; @@ -3242,15 +3242,15 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() } mJob = job; - connect( job, SIGNAL(result(const GpgME::Error&,const QVariant&)), - this, SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const QVariant&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQVariant&)), + this, TQT_SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const TQVariant&)) ); } -static const QString chomp( const QString & base, const QString & suffix, bool cs ) { +static const TQString chomp( const TQString & base, const TQString & suffix, bool cs ) { return base.endsWith( suffix, cs ) ? base.left( base.length() - suffix.length() ) : base ; } -void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const QVariant & result ) +void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const TQVariant & result ) { LaterDeleterWithCommandCompletion d( this ); if ( !mJob ) @@ -3267,15 +3267,15 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E return; } - if ( result.type() != QVariant::ByteArray ) { - const QString msg = i18n( "Unexpected return value from Chiasmus backend: " + if ( result.type() != TQVariant::ByteArray ) { + const TQString msg = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-decrypt\" function did not return a " "byte array. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; } - const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), QString::null, parentWidget() ); + const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), TQString::null, parentWidget() ); if ( url.isEmpty() ) return; @@ -3286,8 +3286,8 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E d.setDisabled( true ); // we got this far, don't delete yet KIO::Job * uploadJob = KIO::storedPut( result.toByteArray(), url, -1, overwrite, false /*resume*/ ); uploadJob->setWindow( parentWidget() ); - connect( uploadJob, SIGNAL(result(KIO::Job*)), - this, SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) ); + connect( uploadJob, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) ); } void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusUploadResult( KIO::Job * job ) @@ -3299,7 +3299,7 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusUploadResult( KIO::Job } -AttachmentModifyCommand::AttachmentModifyCommand(partNode * node, KMMessage * msg, QWidget * parent) : +AttachmentModifyCommand::AttachmentModifyCommand(partNode * node, KMMessage * msg, TQWidget * parent) : KMCommand( parent, msg ), mPartIndex( node->nodeId() ), mSernum( 0 ) @@ -3341,8 +3341,8 @@ void AttachmentModifyCommand::storeChangedMessage(KMMessage * msg) int res = mFolder->addMsg( msg ) != 0; if ( mFolder->folderType() == KMFolderTypeImap ) { KMFolderImap *f = static_cast<KMFolderImap*>( mFolder->storage() ); - connect( f, SIGNAL(folderComplete(KMFolderImap*,bool)), - SLOT(messageStoreResult(KMFolderImap*,bool)) ); + connect( f, TQT_SIGNAL(folderComplete(KMFolderImap*,bool)), + TQT_SLOT(messageStoreResult(KMFolderImap*,bool)) ); } else { messageStoreResult( 0, res == 0 ); } @@ -3353,7 +3353,7 @@ void AttachmentModifyCommand::messageStoreResult(KMFolderImap* folder, bool succ Q_UNUSED( folder ); if ( success ) { KMCommand *delCmd = new KMDeleteMsgCommand( mSernum ); - connect( delCmd, SIGNAL(completed(KMCommand*)), SLOT(messageDeleteResult(KMCommand*)) ); + connect( delCmd, TQT_SIGNAL(completed(KMCommand*)), TQT_SLOT(messageDeleteResult(KMCommand*)) ); delCmd->start(); return; } @@ -3393,7 +3393,7 @@ DwBodyPart * AttachmentModifyCommand::findPartInternal(DwEntity * root, int inde } -KMDeleteAttachmentCommand::KMDeleteAttachmentCommand(partNode * node, KMMessage * msg, QWidget * parent) : +KMDeleteAttachmentCommand::KMDeleteAttachmentCommand(partNode * node, KMMessage * msg, TQWidget * parent) : AttachmentModifyCommand( node, msg, parent ) { kdDebug(5006) << k_funcinfo << endl; @@ -3423,12 +3423,12 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify() // add dummy part to show that a attachment has been deleted KMMessagePart dummyPart; dummyPart.duplicate( part ); - QString comment = i18n("This attachment has been deleted."); + TQString comment = i18n("This attachment has been deleted."); if ( !part.fileName().isEmpty() ) comment = i18n( "The attachment '%1' has been deleted." ).arg( part.fileName() ); dummyPart.setContentDescription( comment ); - dummyPart.setBodyEncodedBinary( QByteArray() ); - QCString cd = dummyPart.contentDisposition(); + dummyPart.setBodyEncodedBinary( TQByteArray() ); + TQCString cd = dummyPart.contentDisposition(); if ( cd.find( "inline", 0, false ) == 0 ) { cd.replace( 0, 10, "attachment" ); dummyPart.setContentDisposition( cd ); @@ -3448,7 +3448,7 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify() } -KMEditAttachmentCommand::KMEditAttachmentCommand(partNode * node, KMMessage * msg, QWidget * parent) : +KMEditAttachmentCommand::KMEditAttachmentCommand(partNode * node, KMMessage * msg, TQWidget * parent) : AttachmentModifyCommand( node, msg, parent ) { kdDebug(5006) << k_funcinfo << endl; @@ -3477,7 +3477,7 @@ KMCommand::Result KMEditAttachmentCommand::doAttachmentModify() mTempFile.file()->flush(); KMail::EditorWatcher *watcher = new KMail::EditorWatcher( KURL(mTempFile.file()->name()), part.typeStr() + "/" + part.subtypeStr(), false, this ); - connect( watcher, SIGNAL(editDone(KMail::EditorWatcher*)), SLOT(editDone(KMail::EditorWatcher*)) ); + connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(editDone(KMail::EditorWatcher*)) ); if ( !watcher->start() ) return Failed; setEmitsCompletedItself( true ); @@ -3497,7 +3497,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher) } mTempFile.file()->reset(); - QByteArray data = mTempFile.file()->readAll(); + TQByteArray data = mTempFile.file()->readAll(); // build the new message KMMessage *msg = retrievedMessage(); @@ -3525,7 +3525,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher) } -CreateTodoCommand::CreateTodoCommand(QWidget * parent, KMMessage * msg) +CreateTodoCommand::CreateTodoCommand(TQWidget * parent, KMMessage * msg) : KMCommand( parent, msg ) { } @@ -3539,18 +3539,18 @@ KMCommand::Result CreateTodoCommand::execute() KMail::KorgHelper::ensureRunning(); - QString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() ) + TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() ) .arg( msg->to() ).arg( msg->subject() ); KTempFile tf; tf.setAutoDelete( true ); - QString uri = "kmail:" + QString::number( msg->getMsgSerNum() ) + "/" + msg->msgId(); + TQString uri = "kmail:" + TQString::number( msg->getMsgSerNum() ) + "/" + msg->msgId(); tf.file()->writeBlock( msg->asDwString().c_str(), msg->asDwString().length() ); tf.close(); KCalendarIface_stub *iface = new KCalendarIface_stub( kapp->dcopClient(), "korganizer", "CalendarIface" ); iface->openTodoEditor( i18n("Mail: %1").arg( msg->subject() ), txt, - uri, tf.name(), QStringList(), "message/rfc822" ); + uri, tf.name(), TQStringList(), "message/rfc822" ); delete iface; return OK; diff --git a/kmail/kmcommands.h b/kmail/kmcommands.h index 02a48c4a0..d9c0e8392 100644 --- a/kmail/kmcommands.h +++ b/kmail/kmcommands.h @@ -3,13 +3,13 @@ #ifndef KMCommands_h #define KMCommands_h -#include <qdatetime.h> -#include <qguardedptr.h> -#include <qptrlist.h> -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qtimer.h> -#include <qfont.h> +#include <tqdatetime.h> +#include <tqguardedptr.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqtimer.h> +#include <tqfont.h> #include <kio/job.h> #include "kmmsgbase.h" // for KMMsgStatus #include <mimelib/string.h> @@ -43,8 +43,8 @@ namespace KMail { namespace GpgME { class Error; } namespace Kleo { class SpecialJob; } -typedef QMap<int,KMFolder*> KMMenuToFolder; -typedef QMap<partNode*, KMMessage*> PartNodeMessageMap; +typedef TQMap<int,KMFolder*> KMMenuToFolder; +typedef TQMap<partNode*, KMMessage*> PartNodeMessageMap; class KDE_EXPORT KMCommand : public QObject { @@ -55,13 +55,13 @@ public: enum Result { Undefined, OK, Canceled, Failed }; // Trival constructor, don't retrieve any messages - KMCommand( QWidget *parent = 0 ); + KMCommand( TQWidget *parent = 0 ); // Retrieve all messages in msgList when start is called. - KMCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList ); + KMCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList ); // Retrieve the single message msgBase when start is called. - KMCommand( QWidget *parent, KMMsgBase *msgBase ); + KMCommand( TQWidget *parent, KMMsgBase *msgBase ); // Retrieve the single message msgBase when start is called. - KMCommand( QWidget *parent, KMMessage *message ); + KMCommand( TQWidget *parent, KMMessage *message ); virtual ~KMCommand(); /** These folders will be closed by the dtor, handy, if you need to keep @@ -90,11 +90,11 @@ signals: protected: // Returns list of messages retrieved - const QPtrList<KMMessage> retrievedMsgs() const; + const TQPtrList<KMMessage> retrievedMsgs() const; // Returns the single message retrieved KMMessage *retrievedMessage() const; // Returns the parent widget - QWidget *parentWidget() const; + TQWidget *parentWidget() const; bool deletesItself() { return mDeletesItself; } /** Specify whether the subclass takes care of the deletion of the object. @@ -151,10 +151,10 @@ private: bool mDeletesItself : 1; bool mEmitsCompletedItself : 1; - QWidget *mParent; - QPtrList<KMMessage> mRetrievedMsgs; - QPtrList<KMMsgBase> mMsgList; - QValueList<QGuardedPtr<KMFolder> > mFolders; + TQWidget *mParent; + TQPtrList<KMMessage> mRetrievedMsgs; + TQPtrList<KMMsgBase> mMsgList; + TQValueList<TQGuardedPtr<KMFolder> > mFolders; }; class KDE_EXPORT KMMailtoComposeCommand : public KMCommand @@ -176,14 +176,14 @@ class KDE_EXPORT KMMailtoReplyCommand : public KMCommand Q_OBJECT public: - KMMailtoReplyCommand( QWidget *parent, const KURL &url, - KMMessage *msg, const QString &selection ); + KMMailtoReplyCommand( TQWidget *parent, const KURL &url, + KMMessage *msg, const TQString &selection ); private: virtual Result execute(); KURL mUrl; - QString mSelection; + TQString mSelection; }; class KDE_EXPORT KMMailtoForwardCommand : public KMCommand @@ -191,7 +191,7 @@ class KDE_EXPORT KMMailtoForwardCommand : public KMCommand Q_OBJECT public: - KMMailtoForwardCommand( QWidget *parent, const KURL &url, + KMMailtoForwardCommand( TQWidget *parent, const KURL &url, KMMessage *msg ); private: @@ -205,7 +205,7 @@ class KDE_EXPORT KMMailtoAddAddrBookCommand : public KMCommand Q_OBJECT public: - KMMailtoAddAddrBookCommand( const KURL &url, QWidget *parent ); + KMMailtoAddAddrBookCommand( const KURL &url, TQWidget *parent ); private: virtual Result execute(); @@ -218,7 +218,7 @@ class KDE_EXPORT KMAddBookmarksCommand : public KMCommand Q_OBJECT public: - KMAddBookmarksCommand( const KURL &url, QWidget *parent ); + KMAddBookmarksCommand( const KURL &url, TQWidget *parent ); private: virtual Result execute(); @@ -232,7 +232,7 @@ class KDE_EXPORT KMMailtoOpenAddrBookCommand : public KMCommand Q_OBJECT public: - KMMailtoOpenAddrBookCommand( const KURL &url, QWidget *parent ); + KMMailtoOpenAddrBookCommand( const KURL &url, TQWidget *parent ); private: virtual Result execute(); @@ -273,7 +273,7 @@ class KDE_EXPORT KMUrlSaveCommand : public KMCommand Q_OBJECT public: - KMUrlSaveCommand( const KURL &url, QWidget *parent ); + KMUrlSaveCommand( const KURL &url, TQWidget *parent ); private slots: void slotUrlSaveResult( KIO::Job *job ); @@ -289,7 +289,7 @@ class KDE_EXPORT KMEditMsgCommand : public KMCommand Q_OBJECT public: - KMEditMsgCommand( QWidget *parent, KMMessage *msg ); + KMEditMsgCommand( TQWidget *parent, KMMessage *msg ); private: virtual Result execute(); @@ -300,7 +300,7 @@ class KDE_EXPORT KMUseTemplateCommand : public KMCommand Q_OBJECT public: - KMUseTemplateCommand( QWidget *parent, KMMessage *msg ); + KMUseTemplateCommand( TQWidget *parent, KMMessage *msg ); private: virtual Result execute(); @@ -311,7 +311,7 @@ class KDE_EXPORT KMShowMsgSrcCommand : public KMCommand Q_OBJECT public: - KMShowMsgSrcCommand( QWidget *parent, KMMessage *msg, + KMShowMsgSrcCommand( TQWidget *parent, KMMessage *msg, bool fixedFont ); virtual Result execute(); @@ -325,8 +325,8 @@ class KDE_EXPORT KMSaveMsgCommand : public KMCommand Q_OBJECT public: - KMSaveMsgCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList ); - KMSaveMsgCommand( QWidget *parent, KMMessage * msg ); + KMSaveMsgCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList ); + KMSaveMsgCommand( TQWidget *parent, KMMessage * msg ); KURL url(); private: @@ -341,10 +341,10 @@ private slots: private: static const int MAX_CHUNK_SIZE = 64*1024; KURL mUrl; - QValueList<unsigned long> mMsgList; + TQValueList<unsigned long> mMsgList; unsigned int mMsgListIndex; KMMessage *mStandAloneMessage; - QByteArray mData; + TQByteArray mData; int mOffset; size_t mTotalSize; KIO::TransferJob *mJob; @@ -355,14 +355,14 @@ class KDE_EXPORT KMOpenMsgCommand : public KMCommand Q_OBJECT public: - KMOpenMsgCommand( QWidget *parent, const KURL & url = KURL(), - const QString & encoding = QString() ); + KMOpenMsgCommand( TQWidget *parent, const KURL & url = KURL(), + const TQString & encoding = TQString() ); private: virtual Result execute(); private slots: - void slotDataArrived( KIO::Job *job, const QByteArray & data ); + void slotDataArrived( KIO::Job *job, const TQByteArray & data ); void slotResult( KIO::Job *job ); private: @@ -370,7 +370,7 @@ private: KURL mUrl; DwString mMsgString; KIO::TransferJob *mJob; - const QString mEncoding; + const TQString mEncoding; }; class KDE_EXPORT KMSaveAttachmentsCommand : public KMCommand @@ -381,12 +381,12 @@ public: @param parent The parent widget of the command used for message boxes. @param msg The message of which the attachments should be saved. */ - KMSaveAttachmentsCommand( QWidget *parent, KMMessage *msg ); + KMSaveAttachmentsCommand( TQWidget *parent, KMMessage *msg ); /** Use this to save all attachments of the given messages. @param parent The parent widget of the command used for message boxes. @param msgs The messages of which the attachments should be saved. */ - KMSaveAttachmentsCommand( QWidget *parent, const QPtrList<KMMsgBase>& msgs ); + KMSaveAttachmentsCommand( TQWidget *parent, const TQPtrList<KMMsgBase>& msgs ); /** Use this to save the specified attachments of the given message. @param parent The parent widget of the command used for message boxes. @@ -395,7 +395,7 @@ public: @param encoded True if the transport encoding should not be removed when the attachment is saved. */ - KMSaveAttachmentsCommand( QWidget *parent, QPtrList<partNode> &attachments, + KMSaveAttachmentsCommand( TQWidget *parent, TQPtrList<partNode> &attachments, KMMessage *msg, bool encoded = false ); private slots: @@ -416,14 +416,14 @@ class KDE_EXPORT KMReplyToCommand : public KMCommand Q_OBJECT public: - KMReplyToCommand( QWidget *parent, KMMessage *msg, - const QString &selection = QString::null ); + KMReplyToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection = TQString::null ); private: virtual Result execute(); private: - QString mSelection; + TQString mSelection; }; class KDE_EXPORT KMNoQuoteReplyToCommand : public KMCommand @@ -431,7 +431,7 @@ class KDE_EXPORT KMNoQuoteReplyToCommand : public KMCommand Q_OBJECT public: - KMNoQuoteReplyToCommand( QWidget *parent, KMMessage *msg ); + KMNoQuoteReplyToCommand( TQWidget *parent, KMMessage *msg ); private: virtual Result execute(); @@ -442,14 +442,14 @@ class KMReplyListCommand : public KMCommand Q_OBJECT public: - KMReplyListCommand( QWidget *parent, KMMessage *msg, - const QString &selection = QString::null ); + KMReplyListCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection = TQString::null ); private: virtual Result execute(); private: - QString mSelection; + TQString mSelection; }; class KDE_EXPORT KMReplyToAllCommand : public KMCommand @@ -457,14 +457,14 @@ class KDE_EXPORT KMReplyToAllCommand : public KMCommand Q_OBJECT public: - KMReplyToAllCommand( QWidget *parent, KMMessage *msg, - const QString &selection = QString::null ); + KMReplyToAllCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection = TQString::null ); private: virtual Result execute(); private: - QString mSelection; + TQString mSelection; }; class KDE_EXPORT KMReplyAuthorCommand : public KMCommand @@ -472,14 +472,14 @@ class KDE_EXPORT KMReplyAuthorCommand : public KMCommand Q_OBJECT public: - KMReplyAuthorCommand( QWidget *parent, KMMessage *msg, - const QString &selection = QString::null ); + KMReplyAuthorCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection = TQString::null ); private: virtual Result execute(); private: - QString mSelection; + TQString mSelection; }; class KDE_EXPORT KMForwardInlineCommand : public KMCommand @@ -487,9 +487,9 @@ class KDE_EXPORT KMForwardInlineCommand : public KMCommand Q_OBJECT public: - KMForwardInlineCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList, + KMForwardInlineCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList, uint identity = 0 ); - KMForwardInlineCommand( QWidget *parent, KMMessage * msg, + KMForwardInlineCommand( TQWidget *parent, KMMessage * msg, uint identity = 0 ); private: @@ -504,16 +504,16 @@ class KDE_EXPORT KMForwardAttachedCommand : public KMCommand Q_OBJECT public: - KMForwardAttachedCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList, + KMForwardAttachedCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList, uint identity = 0, KMail::Composer *win = 0 ); - KMForwardAttachedCommand( QWidget *parent, KMMessage * msg, + KMForwardAttachedCommand( TQWidget *parent, KMMessage * msg, uint identity = 0, KMail::Composer *win = 0 ); private: virtual Result execute(); uint mIdentity; - QGuardedPtr<KMail::Composer> mWin; + TQGuardedPtr<KMail::Composer> mWin; }; class KDE_EXPORT KMForwardDigestCommand : public KMCommand @@ -521,16 +521,16 @@ class KDE_EXPORT KMForwardDigestCommand : public KMCommand Q_OBJECT public: - KMForwardDigestCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList, + KMForwardDigestCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList, uint identity = 0, KMail::Composer *win = 0 ); - KMForwardDigestCommand( QWidget *parent, KMMessage * msg, + KMForwardDigestCommand( TQWidget *parent, KMMessage * msg, uint identity = 0, KMail::Composer *win = 0 ); private: virtual Result execute(); uint mIdentity; - QGuardedPtr<KMail::Composer> mWin; + TQGuardedPtr<KMail::Composer> mWin; }; class KDE_EXPORT KMRedirectCommand : public KMCommand @@ -538,7 +538,7 @@ class KDE_EXPORT KMRedirectCommand : public KMCommand Q_OBJECT public: - KMRedirectCommand( QWidget *parent, KMMessage *msg ); + KMRedirectCommand( TQWidget *parent, KMMessage *msg ); private: virtual Result execute(); @@ -549,16 +549,16 @@ class KDE_EXPORT KMCustomReplyToCommand : public KMCommand Q_OBJECT public: - KMCustomReplyToCommand( QWidget *parent, KMMessage *msg, - const QString &selection, - const QString &tmpl ); + KMCustomReplyToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection, + const TQString &tmpl ); private: virtual Result execute(); private: - QString mSelection; - QString mTemplate; + TQString mSelection; + TQString mTemplate; }; class KDE_EXPORT KMCustomReplyAllToCommand : public KMCommand @@ -566,16 +566,16 @@ class KDE_EXPORT KMCustomReplyAllToCommand : public KMCommand Q_OBJECT public: - KMCustomReplyAllToCommand( QWidget *parent, KMMessage *msg, - const QString &selection, - const QString &tmpl ); + KMCustomReplyAllToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection, + const TQString &tmpl ); private: virtual Result execute(); private: - QString mSelection; - QString mTemplate; + TQString mSelection; + TQString mTemplate; }; class KDE_EXPORT KMCustomForwardCommand : public KMCommand @@ -583,16 +583,16 @@ class KDE_EXPORT KMCustomForwardCommand : public KMCommand Q_OBJECT public: - KMCustomForwardCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList, - uint identity, const QString &tmpl ); - KMCustomForwardCommand( QWidget *parent, KMMessage * msg, - uint identity, const QString &tmpl ); + KMCustomForwardCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList, + uint identity, const TQString &tmpl ); + KMCustomForwardCommand( TQWidget *parent, KMMessage * msg, + uint identity, const TQString &tmpl ); private: virtual Result execute(); uint mIdentity; - QString mTemplate; + TQString mTemplate; }; class KDE_EXPORT KMPrintCommand : public KMCommand @@ -600,13 +600,13 @@ class KDE_EXPORT KMPrintCommand : public KMCommand Q_OBJECT public: - KMPrintCommand( QWidget *parent, KMMessage *msg, + KMPrintCommand( TQWidget *parent, KMMessage *msg, bool htmlOverride=false, bool htmlLoadExtOverride=false, bool useFixedFont = false, - const QString & encoding = QString() ); + const TQString & encoding = TQString() ); - void setOverrideFont( const QFont& ); + void setOverrideFont( const TQFont& ); private: virtual Result execute(); @@ -614,8 +614,8 @@ private: bool mHtmlOverride; bool mHtmlLoadExtOverride; bool mUseFixedFont; - QFont mOverrideFont; - QString mEncoding; + TQFont mOverrideFont; + TQString mEncoding; }; class KDE_EXPORT KMSetStatusCommand : public KMCommand @@ -624,15 +624,15 @@ class KDE_EXPORT KMSetStatusCommand : public KMCommand public: // Serial numbers - KMSetStatusCommand( KMMsgStatus status, const QValueList<Q_UINT32> &, + KMSetStatusCommand( KMMsgStatus status, const TQValueList<Q_UINT32> &, bool toggle=false ); private: virtual Result execute(); KMMsgStatus mStatus; - QValueList<Q_UINT32> mSerNums; - QValueList<int> mIds; + TQValueList<Q_UINT32> mSerNums; + TQValueList<int> mIds; bool mToggle; }; @@ -641,13 +641,13 @@ class KDE_EXPORT KMFilterCommand : public KMCommand Q_OBJECT public: - KMFilterCommand( const QCString &field, const QString &value ); + KMFilterCommand( const TQCString &field, const TQString &value ); private: virtual Result execute(); - QCString mField; - QString mValue; + TQCString mField; + TQString mValue; }; @@ -656,13 +656,13 @@ class KDE_EXPORT KMFilterActionCommand : public KMCommand Q_OBJECT public: - KMFilterActionCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, + KMFilterActionCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, KMFilter *filter ); private: virtual Result execute(); - QValueList<Q_UINT32> serNumList; + TQValueList<Q_UINT32> serNumList; KMFilter *mFilter; }; @@ -711,7 +711,7 @@ class KDE_EXPORT KMMailingListFilterCommand : public KMCommand Q_OBJECT public: - KMMailingListFilterCommand( QWidget *parent, KMMessage *msg ); + KMMailingListFilterCommand( TQWidget *parent, KMMessage *msg ); private: virtual Result execute(); @@ -730,11 +730,11 @@ class KDE_EXPORT KMMenuCommand : public KMCommand Q_OBJECT public: - static void folderToPopupMenu(bool move, QObject *receiver, - KMMenuToFolder *aMenuToFolder, QPopupMenu *menu ); + static void folderToPopupMenu(bool move, TQObject *receiver, + KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu ); static void makeFolderMenu(KMFolderNode* item, bool move, - QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu ); + TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu ); }; class KDE_EXPORT KMCopyCommand : public KMMenuCommand @@ -743,7 +743,7 @@ class KDE_EXPORT KMCopyCommand : public KMMenuCommand public: KMCopyCommand( KMFolder* destFolder, - const QPtrList<KMMsgBase> &msgList ); + const TQPtrList<KMMsgBase> &msgList ); KMCopyCommand( KMFolder* destFolder, KMMessage *msg ); protected slots: @@ -755,8 +755,8 @@ private: virtual Result execute(); KMFolder *mDestFolder; - QPtrList<KMMsgBase> mMsgList; - QValueList<KMail::FolderJob*> mPendingJobs; + TQPtrList<KMMsgBase> mMsgList; + TQValueList<KMail::FolderJob*> mPendingJobs; }; namespace KPIM { @@ -767,7 +767,7 @@ class KDE_EXPORT KMMoveCommand : public KMMenuCommand Q_OBJECT public: - KMMoveCommand( KMFolder* destFolder, const QPtrList<KMMsgBase> &msgList ); + KMMoveCommand( KMFolder* destFolder, const TQPtrList<KMMsgBase> &msgList ); KMMoveCommand( KMFolder* destFolder, KMMessage * msg ); KMMoveCommand( KMFolder* destFolder, KMMsgBase * msgBase ); KMFolder* destFolder() const { return mDestFolder; } @@ -782,17 +782,17 @@ protected: KMMoveCommand( Q_UINT32 sernum ); void setDestFolder( KMFolder* folder ) { mDestFolder = folder; } void addMsg( KMMsgBase *msg ) { mSerNumList.append( msg->getMsgSerNum() ); } - QValueVector<KMFolder*> mOpenedFolders; + TQValueVector<KMFolder*> mOpenedFolders; private: virtual Result execute(); void completeMove( Result result ); KMFolder *mDestFolder; - QValueList<Q_UINT32> mSerNumList; + TQValueList<Q_UINT32> mSerNumList; // List of serial numbers that have to be transferred to a host. // Ticked off as they come in via msgAdded signals. - QValueList<Q_UINT32> mLostBoys; + TQValueList<Q_UINT32> mLostBoys; KPIM::ProgressItem *mProgressItem; bool mCompleteWithAddedMsg; }; @@ -802,7 +802,7 @@ class KDE_EXPORT KMDeleteMsgCommand : public KMMoveCommand Q_OBJECT public: - KMDeleteMsgCommand( KMFolder* srcFolder, const QPtrList<KMMsgBase> &msgList ); + KMDeleteMsgCommand( KMFolder* srcFolder, const TQPtrList<KMMsgBase> &msgList ); KMDeleteMsgCommand( KMFolder* srcFolder, KMMessage * msg ); KMDeleteMsgCommand( Q_UINT32 sernum ); @@ -834,12 +834,12 @@ class KDE_EXPORT KMLoadPartsCommand : public KMCommand Q_OBJECT public: - KMLoadPartsCommand( QPtrList<partNode>& parts, KMMessage* msg ); + KMLoadPartsCommand( TQPtrList<partNode>& parts, KMMessage* msg ); KMLoadPartsCommand( partNode* node, KMMessage* msg ); KMLoadPartsCommand( PartNodeMessageMap& partMap ); public slots: - void slotPartRetrieved( KMMessage* msg, QString partSpecifier ); + void slotPartRetrieved( KMMessage* msg, TQString partSpecifier ); signals: void partsRetrieved(); @@ -859,7 +859,7 @@ class KDE_EXPORT KMResendMessageCommand : public KMCommand Q_OBJECT public: - KMResendMessageCommand( QWidget *parent, KMMessage *msg=0 ); + KMResendMessageCommand( TQWidget *parent, KMMessage *msg=0 ); private: virtual Result execute(); @@ -869,7 +869,7 @@ class KDE_EXPORT KMMailingListCommand : public KMCommand { Q_OBJECT public: - KMMailingListCommand( QWidget *parent, KMFolder *folder ); + KMMailingListCommand( TQWidget *parent, KMFolder *folder ); private: virtual Result execute(); private slots: @@ -884,7 +884,7 @@ class KDE_EXPORT KMMailingListPostCommand : public KMMailingListCommand { Q_OBJECT public: - KMMailingListPostCommand( QWidget *parent, KMFolder *folder ); + KMMailingListPostCommand( TQWidget *parent, KMFolder *folder ); protected: virtual KURL::List urls() const; }; @@ -893,7 +893,7 @@ class KDE_EXPORT KMMailingListSubscribeCommand : public KMMailingListCommand { Q_OBJECT public: - KMMailingListSubscribeCommand( QWidget *parent, KMFolder *folder ); + KMMailingListSubscribeCommand( TQWidget *parent, KMFolder *folder ); protected: virtual KURL::List urls() const; }; @@ -902,7 +902,7 @@ class KDE_EXPORT KMMailingListUnsubscribeCommand : public KMMailingListCommand { Q_OBJECT public: - KMMailingListUnsubscribeCommand( QWidget *parent, KMFolder *folder ); + KMMailingListUnsubscribeCommand( TQWidget *parent, KMFolder *folder ); protected: virtual KURL::List urls() const; }; @@ -911,7 +911,7 @@ class KDE_EXPORT KMMailingListArchivesCommand : public KMMailingListCommand { Q_OBJECT public: - KMMailingListArchivesCommand( QWidget *parent, KMFolder *folder ); + KMMailingListArchivesCommand( TQWidget *parent, KMFolder *folder ); protected: virtual KURL::List urls() const; }; @@ -920,7 +920,7 @@ class KDE_EXPORT KMMailingListHelpCommand : public KMMailingListCommand { Q_OBJECT public: - KMMailingListHelpCommand( QWidget *parent, KMFolder *folder ); + KMMailingListHelpCommand( TQWidget *parent, KMFolder *folder ); protected: virtual KURL::List urls() const; }; @@ -970,16 +970,16 @@ public: * @param offer specify a KService that should handle the "open" action, 0 otherwise */ KMHandleAttachmentCommand( partNode* node, KMMessage* msg, int atmId, - const QString& atmName, AttachmentAction action, KService::Ptr offer, QWidget* parent ); + const TQString& atmName, AttachmentAction action, KService::Ptr offer, TQWidget* parent ); signals: - void showAttachment( int id, const QString& name ); + void showAttachment( int id, const TQString& name ); private: virtual Result execute(); - QString createAtmFileLink() const; + TQString createAtmFileLink() const; /** Get a KService if it was not specified */ KService::Ptr getServiceOffer(); @@ -1015,14 +1015,14 @@ private slots: */ void slotPartComplete(); - void slotAtmDecryptWithChiasmusResult( const GpgME::Error &, const QVariant & ); + void slotAtmDecryptWithChiasmusResult( const GpgME::Error &, const TQVariant & ); void slotAtmDecryptWithChiasmusUploadResult( KIO::Job * ); private: partNode* mNode; KMMessage* mMsg; int mAtmId; - QString mAtmName; + TQString mAtmName; AttachmentAction mAction; KService::Ptr mOffer; Kleo::SpecialJob *mJob; @@ -1035,7 +1035,7 @@ class KDE_EXPORT AttachmentModifyCommand : public KMCommand { Q_OBJECT public: - AttachmentModifyCommand( partNode *node, KMMessage *msg, QWidget *parent ); + AttachmentModifyCommand( partNode *node, KMMessage *msg, TQWidget *parent ); ~AttachmentModifyCommand(); protected: @@ -1056,14 +1056,14 @@ class KDE_EXPORT AttachmentModifyCommand : public KMCommand void messageDeleteResult( KMCommand *cmd ); private: - QGuardedPtr<KMFolder> mFolder; + TQGuardedPtr<KMFolder> mFolder; }; class KDE_EXPORT KMDeleteAttachmentCommand : public AttachmentModifyCommand { Q_OBJECT public: - KMDeleteAttachmentCommand( partNode *node, KMMessage *msg, QWidget *parent ); + KMDeleteAttachmentCommand( partNode *node, KMMessage *msg, TQWidget *parent ); ~KMDeleteAttachmentCommand(); protected: @@ -1075,7 +1075,7 @@ class KDE_EXPORT KMEditAttachmentCommand : public AttachmentModifyCommand { Q_OBJECT public: - KMEditAttachmentCommand( partNode *node, KMMessage *msg, QWidget *parent ); + KMEditAttachmentCommand( partNode *node, KMMessage *msg, TQWidget *parent ); ~KMEditAttachmentCommand(); protected: @@ -1092,7 +1092,7 @@ class KDE_EXPORT CreateTodoCommand : public KMCommand { Q_OBJECT public: - CreateTodoCommand( QWidget *parent, KMMessage *msg ); + CreateTodoCommand( TQWidget *parent, KMMessage *msg ); private: Result execute(); diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp index ba5587dcd..592248a0a 100644 --- a/kmail/kmcomposewin.cpp +++ b/kmail/kmcomposewin.cpp @@ -119,14 +119,14 @@ using KRecentAddress::RecentAddresses; #include <kzip.h> #include <ksavefile.h> -#include <qtabdialog.h> -#include <qregexp.h> -#include <qbuffer.h> -#include <qtooltip.h> -#include <qtextcodec.h> -#include <qheader.h> -#include <qwhatsthis.h> -#include <qfontdatabase.h> +#include <tqtabdialog.h> +#include <tqregexp.h> +#include <tqbuffer.h> +#include <tqtooltip.h> +#include <tqtextcodec.h> +#include <tqheader.h> +#include <tqwhatsthis.h> +#include <tqfontdatabase.h> #include <mimelib/mimepp.h> @@ -191,28 +191,28 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) mSubjectTextWasSpellChecked = false; if (kmkernel->xmlGuiInstance()) setInstance( kmkernel->xmlGuiInstance() ); - mMainWidget = new QWidget(this); + mMainWidget = new TQWidget(this); // splitter between the headers area and the actual editor - mHeadersToEditorSplitter = new QSplitter( Qt::Vertical, mMainWidget, "mHeadersToEditorSplitter" ); + mHeadersToEditorSplitter = new TQSplitter( Qt::Vertical, mMainWidget, "mHeadersToEditorSplitter" ); mHeadersToEditorSplitter->setChildrenCollapsible( false ); - mHeadersArea = new QWidget( mHeadersToEditorSplitter ); - mHeadersArea->setSizePolicy( mHeadersToEditorSplitter->sizePolicy().horData(), QSizePolicy::Maximum ); - QVBoxLayout *v = new QVBoxLayout( mMainWidget ); + mHeadersArea = new TQWidget( mHeadersToEditorSplitter ); + mHeadersArea->setSizePolicy( mHeadersToEditorSplitter->sizePolicy().horData(), TQSizePolicy::Maximum ); + TQVBoxLayout *v = new TQVBoxLayout( mMainWidget ); v->addWidget( mHeadersToEditorSplitter ); mIdentity = new KPIM::IdentityCombo(kmkernel->identityManager(), mHeadersArea); mDictionaryCombo = new DictionaryComboBox( mHeadersArea ); mFcc = new KMFolderComboBox(mHeadersArea); mFcc->showOutboxFolder( false ); - mTransport = new QComboBox(true, mHeadersArea); + mTransport = new TQComboBox(true, mHeadersArea); mEdtFrom = new KMLineEdit(false,mHeadersArea, "fromLine"); mEdtReplyTo = new KMLineEdit(true,mHeadersArea, "replyToLine"); - mLblReplyTo = new QLabel(mHeadersArea); - mBtnReplyTo = new QPushButton("...",mHeadersArea); - mBtnReplyTo->setFocusPolicy(QWidget::NoFocus); - connect(mBtnReplyTo,SIGNAL(clicked()),SLOT(slotAddrBookReplyTo())); - connect(mEdtReplyTo,SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); + mLblReplyTo = new TQLabel(mHeadersArea); + mBtnReplyTo = new TQPushButton("...",mHeadersArea); + mBtnReplyTo->setFocusPolicy(TQWidget::NoFocus); + connect(mBtnReplyTo,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookReplyTo())); + connect(mEdtReplyTo,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); if ( mClassicalRecipients ) { mRecipientsEditor = 0; @@ -221,37 +221,37 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) mEdtCc = new KMLineEdit(true,mHeadersArea, "ccLine"); mEdtBcc = new KMLineEdit(true,mHeadersArea, "bccLine"); - mLblTo = new QLabel(mHeadersArea); - mLblCc = new QLabel(mHeadersArea); - mLblBcc = new QLabel(mHeadersArea); - - mBtnTo = new QPushButton("...",mHeadersArea); - mBtnCc = new QPushButton("...",mHeadersArea); - mBtnBcc = new QPushButton("...",mHeadersArea); - //mBtnFrom = new QPushButton("...",mHeadersArea); - - QString tip = i18n("Select email address(es)"); - QToolTip::add( mBtnTo, tip ); - QToolTip::add( mBtnCc, tip ); - QToolTip::add( mBtnBcc, tip ); - QToolTip::add( mBtnReplyTo, tip ); - - mBtnTo->setFocusPolicy(QWidget::NoFocus); - mBtnCc->setFocusPolicy(QWidget::NoFocus); - mBtnBcc->setFocusPolicy(QWidget::NoFocus); - //mBtnFrom->setFocusPolicy(QWidget::NoFocus); - - connect(mBtnTo,SIGNAL(clicked()),SLOT(slotAddrBookTo())); - connect(mBtnCc,SIGNAL(clicked()),SLOT(slotAddrBookTo())); - connect(mBtnBcc,SIGNAL(clicked()),SLOT(slotAddrBookTo())); - //connect(mBtnFrom,SIGNAL(clicked()),SLOT(slotAddrBookFrom())); - - connect(mEdtTo,SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); - connect(mEdtCc,SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); - connect(mEdtBcc,SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); + mLblTo = new TQLabel(mHeadersArea); + mLblCc = new TQLabel(mHeadersArea); + mLblBcc = new TQLabel(mHeadersArea); + + mBtnTo = new TQPushButton("...",mHeadersArea); + mBtnCc = new TQPushButton("...",mHeadersArea); + mBtnBcc = new TQPushButton("...",mHeadersArea); + //mBtnFrom = new TQPushButton("...",mHeadersArea); + + TQString tip = i18n("Select email address(es)"); + TQToolTip::add( mBtnTo, tip ); + TQToolTip::add( mBtnCc, tip ); + TQToolTip::add( mBtnBcc, tip ); + TQToolTip::add( mBtnReplyTo, tip ); + + mBtnTo->setFocusPolicy(TQWidget::NoFocus); + mBtnCc->setFocusPolicy(TQWidget::NoFocus); + mBtnBcc->setFocusPolicy(TQWidget::NoFocus); + //mBtnFrom->setFocusPolicy(TQWidget::NoFocus); + + connect(mBtnTo,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo())); + connect(mBtnCc,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo())); + connect(mBtnBcc,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo())); + //connect(mBtnFrom,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookFrom())); + + connect(mEdtTo,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); + connect(mEdtCc,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); + connect(mEdtBcc,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); mEdtTo->setFocus(); } else { @@ -270,23 +270,23 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) mRecipientsEditor = new RecipientsEditor( mHeadersArea ); connect( mRecipientsEditor, - SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ), - SLOT( slotCompletionModeChanged( KGlobalSettings::Completion ) ) ); - connect( mRecipientsEditor, SIGNAL(sizeHintChanged()), SLOT(recipientEditorSizeHintChanged()) ); + TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ), + TQT_SLOT( slotCompletionModeChanged( KGlobalSettings::Completion ) ) ); + connect( mRecipientsEditor, TQT_SIGNAL(sizeHintChanged()), TQT_SLOT(recipientEditorSizeHintChanged()) ); mRecipientsEditor->setFocus(); } mEdtSubject = new KMLineEditSpell(false,mHeadersArea, "subjectLine"); - mLblIdentity = new QLabel(mHeadersArea); - mDictionaryLabel = new QLabel( mHeadersArea ); - mLblFcc = new QLabel(mHeadersArea); - mLblTransport = new QLabel(mHeadersArea); - mLblFrom = new QLabel(mHeadersArea); - mLblSubject = new QLabel(mHeadersArea); - QString sticky = i18n("Sticky"); - mBtnIdentity = new QCheckBox(sticky,mHeadersArea); - mBtnFcc = new QCheckBox(sticky,mHeadersArea); - mBtnTransport = new QCheckBox(sticky,mHeadersArea); + mLblIdentity = new TQLabel(mHeadersArea); + mDictionaryLabel = new TQLabel( mHeadersArea ); + mLblFcc = new TQLabel(mHeadersArea); + mLblTransport = new TQLabel(mHeadersArea); + mLblFrom = new TQLabel(mHeadersArea); + mLblSubject = new TQLabel(mHeadersArea); + TQString sticky = i18n("Sticky"); + mBtnIdentity = new TQCheckBox(sticky,mHeadersArea); + mBtnFcc = new TQCheckBox(sticky,mHeadersArea); + mBtnTransport = new TQCheckBox(sticky,mHeadersArea); //setWFlags( WType_TopLevel | WStyle_Dialog ); mHtmlMarkup = GlobalSettings::self()->useHtmlMarkup(); @@ -303,31 +303,31 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) mFixedFontAction = 0; mTempDir = 0; // the attachment view is separated from the editor by a splitter - mSplitter = new QSplitter( Qt::Vertical, mHeadersToEditorSplitter, "mSplitter" ); + mSplitter = new TQSplitter( Qt::Vertical, mHeadersToEditorSplitter, "mSplitter" ); mSplitter->setChildrenCollapsible( false ); - mSnippetSplitter = new QSplitter( Qt::Horizontal, mSplitter, "mSnippetSplitter"); + mSnippetSplitter = new TQSplitter( Qt::Horizontal, mSplitter, "mSnippetSplitter"); mSnippetSplitter->setChildrenCollapsible( false ); - QWidget *editorAndCryptoStateIndicators = new QWidget( mSnippetSplitter ); - QVBoxLayout *vbox = new QVBoxLayout( editorAndCryptoStateIndicators ); - QHBoxLayout *hbox = new QHBoxLayout( vbox ); + TQWidget *editorAndCryptoStateIndicators = new TQWidget( mSnippetSplitter ); + TQVBoxLayout *vbox = new TQVBoxLayout( editorAndCryptoStateIndicators ); + TQHBoxLayout *hbox = new TQHBoxLayout( vbox ); { - mSignatureStateIndicator = new QLabel( editorAndCryptoStateIndicators ); + mSignatureStateIndicator = new TQLabel( editorAndCryptoStateIndicators ); mSignatureStateIndicator->setAlignment( Qt::AlignHCenter ); hbox->addWidget( mSignatureStateIndicator ); KConfigGroup reader( KMKernel::config(), "Reader" ); - QPalette p( mSignatureStateIndicator->palette() ); + TQPalette p( mSignatureStateIndicator->palette() ); - QColor defaultSignedColor( 0x40, 0xFF, 0x40 ); // light green // pgp ok, trusted key - QColor defaultEncryptedColor( 0x00, 0x80, 0xFF ); // light blue // pgp encrypted - p.setColor( QColorGroup::Background, reader.readColorEntry( "PGPMessageOkKeyOk", &defaultSignedColor ) ); + TQColor defaultSignedColor( 0x40, 0xFF, 0x40 ); // light green // pgp ok, trusted key + TQColor defaultEncryptedColor( 0x00, 0x80, 0xFF ); // light blue // pgp encrypted + p.setColor( TQColorGroup::Background, reader.readColorEntry( "PGPMessageOkKeyOk", &defaultSignedColor ) ); mSignatureStateIndicator->setPalette( p ); - mEncryptionStateIndicator = new QLabel( editorAndCryptoStateIndicators ); + mEncryptionStateIndicator = new TQLabel( editorAndCryptoStateIndicators ); mEncryptionStateIndicator->setAlignment( Qt::AlignHCenter ); hbox->addWidget( mEncryptionStateIndicator ); - p.setColor( QColorGroup::Background, reader.readColorEntry( "PGPMessageEncr" , &defaultEncryptedColor ) ); + p.setColor( TQColorGroup::Background, reader.readColorEntry( "PGPMessageEncr" , &defaultEncryptedColor ) ); mEncryptionStateIndicator->setPalette( p ); } @@ -344,11 +344,11 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) mEditor->setTextFormat(Qt::PlainText); mEditor->setAcceptDrops( true ); - QWhatsThis::add( mBtnIdentity, + TQWhatsThis::add( mBtnIdentity, GlobalSettings::self()->stickyIdentityItem()->whatsThis() ); - QWhatsThis::add( mBtnFcc, + TQWhatsThis::add( mBtnFcc, GlobalSettings::self()->stickyFccItem()->whatsThis() ); - QWhatsThis::add( mBtnTransport, + TQWhatsThis::add( mBtnTransport, GlobalSettings::self()->stickyTransportItem()->whatsThis() ); mSpellCheckInProgress=false; @@ -356,13 +356,13 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) setCaption( i18n("Composer") ); setMinimumSize(200,200); - mBtnIdentity->setFocusPolicy(QWidget::NoFocus); - mBtnFcc->setFocusPolicy(QWidget::NoFocus); - mBtnTransport->setFocusPolicy(QWidget::NoFocus); + mBtnIdentity->setFocusPolicy(TQWidget::NoFocus); + mBtnFcc->setFocusPolicy(TQWidget::NoFocus); + mBtnTransport->setFocusPolicy(TQWidget::NoFocus); mAtmListView = new AttachmentListView( this, mSplitter, "attachment list view" ); - mAtmListView->setSelectionMode( QListView::Extended ); + mAtmListView->setSelectionMode( TQListView::Extended ); mAtmListView->addColumn( i18n("Name"), 200 ); mAtmListView->addColumn( i18n("Size"), 80 ); mAtmListView->addColumn( i18n("Encoding"), 120 ); @@ -383,20 +383,20 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) mAtmListView->setAllColumnsShowFocus( true ); connect( mAtmListView, - SIGNAL( doubleClicked( QListViewItem* ) ), - SLOT( slotAttachEdit() ) ); + TQT_SIGNAL( doubleClicked( TQListViewItem* ) ), + TQT_SLOT( slotAttachEdit() ) ); connect( mAtmListView, - SIGNAL( rightButtonPressed( QListViewItem*, const QPoint&, int ) ), - SLOT( slotAttachPopupMenu( QListViewItem*, const QPoint&, int ) ) ); + TQT_SIGNAL( rightButtonPressed( TQListViewItem*, const TQPoint&, int ) ), + TQT_SLOT( slotAttachPopupMenu( TQListViewItem*, const TQPoint&, int ) ) ); connect( mAtmListView, - SIGNAL( selectionChanged() ), - SLOT( slotUpdateAttachActions() ) ); + TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotUpdateAttachActions() ) ); connect( mAtmListView, - SIGNAL( attachmentDeleted() ), - SLOT( slotAttachRemove() ) ); + TQT_SIGNAL( attachmentDeleted() ), + TQT_SLOT( slotAttachRemove() ) ); connect( mAtmListView, - SIGNAL( dragStarted() ), - SLOT( slotAttachmentDragStarted() ) ); + TQT_SIGNAL( dragStarted() ), + TQT_SLOT( slotAttachmentDragStarted() ) ); mAttachMenu = 0; readConfig(); @@ -407,32 +407,32 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id ) applyMainWindowSettings(KMKernel::config(), "Composer"); - connect( mEdtSubject, SIGNAL( subjectTextSpellChecked() ), - SLOT( slotSubjectTextSpellChecked() ) ); - connect(mEdtSubject,SIGNAL(textChanged(const QString&)), - SLOT(slotUpdWinTitle(const QString&))); - connect(mIdentity,SIGNAL(identityChanged(uint)), - SLOT(slotIdentityChanged(uint))); - connect( kmkernel->identityManager(), SIGNAL(changed(uint)), - SLOT(slotIdentityChanged(uint))); - - connect(mEdtFrom,SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); - connect(kmkernel->folderMgr(),SIGNAL(folderRemoved(KMFolder*)), - SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->imapFolderMgr(),SIGNAL(folderRemoved(KMFolder*)), - SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->dimapFolderMgr(),SIGNAL(folderRemoved(KMFolder*)), - SLOT(slotFolderRemoved(KMFolder*))); - connect( kmkernel, SIGNAL( configChanged() ), - this, SLOT( slotConfigChanged() ) ); - - connect (mEditor, SIGNAL (spellcheck_done(int)), - this, SLOT (slotSpellcheckDone (int))); - connect (mEditor, SIGNAL( attachPNGImageData(const QByteArray &) ), - this, SLOT ( slotAttachPNGImageData(const QByteArray &) ) ); - connect (mEditor, SIGNAL( focusChanged(bool) ), - this, SLOT (editorFocusChanged(bool)) ); + connect( mEdtSubject, TQT_SIGNAL( subjectTextSpellChecked() ), + TQT_SLOT( slotSubjectTextSpellChecked() ) ); + connect(mEdtSubject,TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotUpdWinTitle(const TQString&))); + connect(mIdentity,TQT_SIGNAL(identityChanged(uint)), + TQT_SLOT(slotIdentityChanged(uint))); + connect( kmkernel->identityManager(), TQT_SIGNAL(changed(uint)), + TQT_SLOT(slotIdentityChanged(uint))); + + connect(mEdtFrom,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion))); + connect(kmkernel->folderMgr(),TQT_SIGNAL(folderRemoved(KMFolder*)), + TQT_SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->imapFolderMgr(),TQT_SIGNAL(folderRemoved(KMFolder*)), + TQT_SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->dimapFolderMgr(),TQT_SIGNAL(folderRemoved(KMFolder*)), + TQT_SLOT(slotFolderRemoved(KMFolder*))); + connect( kmkernel, TQT_SIGNAL( configChanged() ), + this, TQT_SLOT( slotConfigChanged() ) ); + + connect (mEditor, TQT_SIGNAL (spellcheck_done(int)), + this, TQT_SLOT (slotSpellcheckDone (int))); + connect (mEditor, TQT_SIGNAL( attachPNGImageData(const TQByteArray &) ), + this, TQT_SLOT ( slotAttachPNGImageData(const TQByteArray &) ) ); + connect (mEditor, TQT_SIGNAL( focusChanged(bool) ), + this, TQT_SLOT (editorFocusChanged(bool)) ); mMainWidget->resize(480,510); setCentralWidget(mMainWidget); @@ -474,7 +474,7 @@ KMComposeWin::~KMComposeWin() delete mMsg; mMsg = 0; } - QMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.begin(); + TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.begin(); while ( it != mMapAtmLoadData.end() ) { KIO::Job *job = it.key(); @@ -514,7 +514,7 @@ void KMComposeWin::send(int how) } //----------------------------------------------------------------------------- -void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const QString &/*comment*/, int how) +void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const TQString &/*comment*/, int how) { if (urls.isEmpty()) { @@ -523,7 +523,7 @@ void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const QString & } mAttachFilesSend = how; mAttachFilesPending = urls; - connect(this, SIGNAL(attachmentAdded(const KURL&, bool)), SLOT(slotAttachedFile(const KURL&))); + connect(this, TQT_SIGNAL(attachmentAdded(const KURL&, bool)), TQT_SLOT(slotAttachedFile(const KURL&))); for( KURL::List::ConstIterator itr = urls.begin(); itr != urls.end(); ++itr ) { if (!addAttach( *itr )) mAttachFilesPending.remove(mAttachFilesPending.find(*itr)); // only remove one copy of the url @@ -549,20 +549,20 @@ void KMComposeWin::slotAttachedFile(const KURL &url) } //----------------------------------------------------------------------------- -void KMComposeWin::addAttachment(KURL url,QString /*comment*/) +void KMComposeWin::addAttachment(KURL url,TQString /*comment*/) { addAttach(url); } //----------------------------------------------------------------------------- -void KMComposeWin::addAttachment(const QString &name, - const QCString &/*cte*/, - const QByteArray &data, - const QCString &type, - const QCString &subType, - const QCString ¶mAttr, - const QString ¶mValue, - const QCString &contDisp) +void KMComposeWin::addAttachment(const TQString &name, + const TQCString &/*cte*/, + const TQByteArray &data, + const TQCString &type, + const TQCString &subType, + const TQCString ¶mAttr, + const TQString ¶mValue, + const TQCString &contDisp) { if (!data.isEmpty()) { KMMessagePart *msgPart = new KMMessagePart; @@ -570,7 +570,7 @@ void KMComposeWin::addAttachment(const QString &name, if( type == "message" && subType == "rfc822" ) { msgPart->setMessageBody( data ); } else { - QValueList<int> dummy; + TQValueList<int> dummy; msgPart->setBodyAndGuessCte(data, dummy, kmkernel->msgSender()->sendQuotedPrintable()); } @@ -583,29 +583,29 @@ void KMComposeWin::addAttachment(const QString &name, } //----------------------------------------------------------------------------- -void KMComposeWin::slotAttachPNGImageData(const QByteArray &image) +void KMComposeWin::slotAttachPNGImageData(const TQByteArray &image) { bool ok; - QString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), QString::null, &ok, this ); + TQString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), TQString::null, &ok, this ); if ( !ok ) return; if ( !attName.lower().endsWith(".png") ) attName += ".png"; - addAttachment( attName, "base64", image, "image", "png", QCString(), QString(), QCString() ); + addAttachment( attName, "base64", image, "image", "png", TQCString(), TQString(), TQCString() ); } //----------------------------------------------------------------------------- -void KMComposeWin::setBody(QString body) +void KMComposeWin::setBody(TQString body) { mEditor->setText(body); } //----------------------------------------------------------------------------- -bool KMComposeWin::event(QEvent *e) +bool KMComposeWin::event(TQEvent *e) { - if (e->type() == QEvent::ApplicationPaletteChange) + if (e->type() == TQEvent::ApplicationPaletteChange) { readColorConfig(); } @@ -617,8 +617,8 @@ bool KMComposeWin::event(QEvent *e) void KMComposeWin::readColorConfig(void) { if ( GlobalSettings::self()->useDefaultColors() ) { - mForeColor = QColor(kapp->palette().active().text()); - mBackColor = QColor(kapp->palette().active().base()); + mForeColor = TQColor(kapp->palette().active().text()); + mBackColor = TQColor(kapp->palette().active().base()); } else { mForeColor = GlobalSettings::self()->foregroundColor(); mBackColor = GlobalSettings::self()->backgroundColor(); @@ -626,9 +626,9 @@ void KMComposeWin::readColorConfig(void) // Color setup mPalette = kapp->palette(); - QColorGroup cgrp = mPalette.active(); - cgrp.setColor( QColorGroup::Base, mBackColor); - cgrp.setColor( QColorGroup::Text, mForeColor); + TQColorGroup cgrp = mPalette.active(); + cgrp.setColor( TQColorGroup::Base, mBackColor); + cgrp.setColor( TQColorGroup::Text, mForeColor); mPalette.setDisabled(cgrp); mPalette.setActive(cgrp); mPalette.setInactive(cgrp); @@ -657,8 +657,8 @@ void KMComposeWin::readConfig( bool reload /* = false */ ) } mBtnFcc->setChecked( GlobalSettings::self()->stickyFcc() ); mBtnTransport->setChecked( GlobalSettings::self()->stickyTransport() ); - QStringList transportHistory = GlobalSettings::self()->transportHistory(); - QString currentTransport = GlobalSettings::self()->currentTransport(); + TQStringList transportHistory = GlobalSettings::self()->transportHistory(); + TQString currentTransport = GlobalSettings::self()->currentTransport(); mEdtFrom->setCompletionMode( (KGlobalSettings::Completion)GlobalSettings::self()->completionMode() ); mEdtReplyTo->setCompletionMode( (KGlobalSettings::Completion)GlobalSettings::self()->completionMode() ); @@ -691,7 +691,7 @@ void KMComposeWin::readConfig( bool reload /* = false */ ) mEdtSubject->setFont(mBodyFont); if ( !reload ) { - QSize siz = GlobalSettings::self()->composerSize(); + TQSize siz = GlobalSettings::self()->composerSize(); if (siz.width() < 200) siz.setWidth(200); if (siz.height() < 200) siz.setHeight(200); resize(siz); @@ -699,7 +699,7 @@ void KMComposeWin::readConfig( bool reload /* = false */ ) if ( !GlobalSettings::self()->snippetSplitterPosition().isEmpty() ) { mSnippetSplitter->setSizes( GlobalSettings::self()->snippetSplitterPosition() ); } else { - QValueList<int> defaults; + TQValueList<int> defaults; defaults << (int)(width() * 0.8) << (int)(width() * 0.2); mSnippetSplitter->setSizes( defaults ); } @@ -723,7 +723,7 @@ void KMComposeWin::readConfig( bool reload /* = false */ ) setTransport( currentTransport ); } - QString fccName = ""; + TQString fccName = ""; if ( mBtnFcc->isChecked() ) { fccName = GlobalSettings::self()->previousFcc(); } else if ( !ident.fcc().isEmpty() ) { @@ -745,7 +745,7 @@ void KMComposeWin::writeConfig(void) GlobalSettings::self()->setPreviousFcc( mFcc->getFolder()->idString() ); GlobalSettings::self()->setAutoSpellChecking( mAutoSpellCheckingAction->isChecked() ); - QStringList transportHistory = GlobalSettings::self()->transportHistory(); + TQStringList transportHistory = GlobalSettings::self()->transportHistory(); transportHistory.remove(mTransport->currentText()); if (KMTransportInfo::availableTransports().findIndex(mTransport ->currentText()) == -1) { @@ -776,8 +776,8 @@ void KMComposeWin::autoSaveMessage() if ( mAutoSaveTimer ) mAutoSaveTimer->stop(); - connect( this, SIGNAL( applyChangesDone( bool ) ), - this, SLOT( slotContinueAutoSave() ) ); + connect( this, TQT_SIGNAL( applyChangesDone( bool ) ), + this, TQT_SLOT( slotContinueAutoSave() ) ); // This method is called when KMail crashed, so don't try signing/encryption // and don't disable controls because it is also called from a timer and // then the disabling is distracting. @@ -788,8 +788,8 @@ void KMComposeWin::autoSaveMessage() void KMComposeWin::slotContinueAutoSave() { - disconnect( this, SIGNAL( applyChangesDone( bool ) ), - this, SLOT( slotContinueAutoSave() ) ); + disconnect( this, TQT_SIGNAL( applyChangesDone( bool ) ), + this, TQT_SLOT( slotContinueAutoSave() ) ); // Ok, it's done now - continue dead letter saving if ( mComposedMessages.isEmpty() ) { @@ -802,7 +802,7 @@ void KMComposeWin::slotContinueAutoSave() kdDebug(5006) << k_funcinfo << "opening autoSaveFile " << mAutoSaveFilename << endl; - const QString filename = + const TQString filename = KMKernel::localDataPath() + "autosave/cur/" + mAutoSaveFilename; KSaveFile autoSaveFile( filename, 0600 ); int status = autoSaveFile.status(); @@ -904,7 +904,7 @@ int KMComposeWin::calcColumnWidth(int which, long allShowing, int width) if ( (allShowing & which) == 0 ) return width; - QLabel *w; + TQLabel *w; if ( which == HDR_IDENTITY ) w = mLblIdentity; else if ( which == HDR_DICTIONARY ) @@ -946,7 +946,7 @@ void KMComposeWin::rethinkFields(bool fromSlot) delete mGrid; - mGrid = new QGridLayout( mHeadersArea, numRows, 3, KDialogBase::marginHint()/2, KDialogBase::spacingHint()); + mGrid = new TQGridLayout( mHeadersArea, numRows, 3, KDialogBase::marginHint()/2, KDialogBase::spacingHint()); mGrid->setColStretch(0, 1); mGrid->setColStretch(1, 100); mGrid->setColStretch(2, 1); @@ -986,7 +986,7 @@ void KMComposeWin::rethinkFields(bool fromSlot) rethinkHeaderLine(showHeaders,HDR_FROM, row, i18n("sender address field", "&From:"), mLblFrom, mEdtFrom /*, mBtnFrom */ ); - QWidget *prevFocus = mEdtFrom; + TQWidget *prevFocus = mEdtFrom; if (!fromSlot) mReplyToAction->setChecked(abs(mShowHeaders)&HDR_REPLY_TO); rethinkHeaderLine(showHeaders,HDR_REPLY_TO,row,i18n("&Reply to:"), @@ -1037,22 +1037,22 @@ void KMComposeWin::rethinkFields(bool fromSlot) ++row; if ( showHeaders & HDR_REPLY_TO ) { - connect( mEdtReplyTo, SIGNAL( focusDown() ), mRecipientsEditor, - SLOT( setFocusTop() ) ); + connect( mEdtReplyTo, TQT_SIGNAL( focusDown() ), mRecipientsEditor, + TQT_SLOT( setFocusTop() ) ); } else { - connect( mEdtFrom, SIGNAL( focusDown() ), mRecipientsEditor, - SLOT( setFocusTop() ) ); + connect( mEdtFrom, TQT_SIGNAL( focusDown() ), mRecipientsEditor, + TQT_SLOT( setFocusTop() ) ); } if ( showHeaders & HDR_REPLY_TO ) { - connect( mRecipientsEditor, SIGNAL( focusUp() ), mEdtReplyTo, SLOT( setFocus() ) ); + connect( mRecipientsEditor, TQT_SIGNAL( focusUp() ), mEdtReplyTo, TQT_SLOT( setFocus() ) ); } else { - connect( mRecipientsEditor, SIGNAL( focusUp() ), mEdtFrom, SLOT( setFocus() ) ); + connect( mRecipientsEditor, TQT_SIGNAL( focusUp() ), mEdtFrom, TQT_SLOT( setFocus() ) ); } - connect( mRecipientsEditor, SIGNAL( focusDown() ), mEdtSubject, - SLOT( setFocus() ) ); - connect( mEdtSubject, SIGNAL( focusUp() ), mRecipientsEditor, - SLOT( setFocusBottom() ) ); + connect( mRecipientsEditor, TQT_SIGNAL( focusDown() ), mEdtSubject, + TQT_SLOT( setFocus() ) ); + connect( mEdtSubject, TQT_SIGNAL( focusUp() ), mRecipientsEditor, + TQT_SLOT( setFocusBottom() ) ); prevFocus = mRecipientsEditor; } @@ -1090,27 +1090,27 @@ void KMComposeWin::rethinkFields(bool fromSlot) mRecipientsEditor->setFirstColumnWidth( mLabelWidth ); } -QWidget *KMComposeWin::connectFocusMoving( QWidget *prev, QWidget *next ) +TQWidget *KMComposeWin::connectFocusMoving( TQWidget *prev, TQWidget *next ) { - connect( prev, SIGNAL( focusDown() ), next, SLOT( setFocus() ) ); - connect( next, SIGNAL( focusUp() ), prev, SLOT( setFocus() ) ); + connect( prev, TQT_SIGNAL( focusDown() ), next, TQT_SLOT( setFocus() ) ); + connect( next, TQT_SIGNAL( focusUp() ), prev, TQT_SLOT( setFocus() ) ); return next; } //----------------------------------------------------------------------------- void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow, - const QString &aLabelStr, QLabel* aLbl, - QLineEdit* aEdt, QPushButton* aBtn, - const QString &toolTip, const QString &whatsThis ) + const TQString &aLabelStr, TQLabel* aLbl, + TQLineEdit* aEdt, TQPushButton* aBtn, + const TQString &toolTip, const TQString &whatsThis ) { if (aValue & aMask) { aLbl->setText(aLabelStr); if ( !toolTip.isEmpty() ) - QToolTip::add( aLbl, toolTip ); + TQToolTip::add( aLbl, toolTip ); if ( !whatsThis.isEmpty() ) - QWhatsThis::add( aLbl, whatsThis ); + TQWhatsThis::add( aLbl, whatsThis ); aLbl->setFixedWidth( mLabelWidth ); aLbl->setBuddy(aEdt); mGrid->addWidget(aLbl, aRow, 0); @@ -1137,8 +1137,8 @@ void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow, //----------------------------------------------------------------------------- void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow, - const QString &aLabelStr, QLabel* aLbl, - QComboBox* aCbx, QCheckBox* aChk) + const TQString &aLabelStr, TQLabel* aLbl, + TQComboBox* aCbx, TQCheckBox* aChk) { if (aValue & aMask) { @@ -1172,12 +1172,12 @@ void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow, //----------------------------------------------------------------------------- void KMComposeWin::getTransportMenu() { - QStringList availTransports; + TQStringList availTransports; mActNowMenu->clear(); mActLaterMenu->clear(); availTransports = KMail::TransportManager::transportNames(); - QStringList::Iterator it; + TQStringList::Iterator it; int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) { @@ -1196,14 +1196,14 @@ void KMComposeWin::setupActions(void) { //default = send now, alternative = queue ( void ) new KAction( i18n("&Send Mail"), "mail_send", CTRL+Key_Return, - this, SLOT(slotSendNow()), actionCollection(),"send_default"); + this, TQT_SLOT(slotSendNow()), actionCollection(),"send_default"); // FIXME: change to mail_send_via icon when this exits. actActionNowMenu = new KActionMenu (i18n("&Send Mail Via"), "mail_send", actionCollection(), "send_default_via" ); (void) new KAction (i18n("Send &Later"), "queue", 0, this, - SLOT(slotSendLater()), actionCollection(),"send_alternative"); + TQT_SLOT(slotSendLater()), actionCollection(),"send_alternative"); actActionLaterMenu = new KActionMenu (i18n("Send &Later Via"), "queue", actionCollection(), "send_alternative_via" ); @@ -1213,12 +1213,12 @@ void KMComposeWin::setupActions(void) //default = queue, alternative = send now (void) new KAction (i18n("Send &Later"), "queue", CTRL+Key_Return, - this, SLOT(slotSendLater()), actionCollection(),"send_default"); + this, TQT_SLOT(slotSendLater()), actionCollection(),"send_default"); actActionLaterMenu = new KActionMenu (i18n("Send &Later Via"), "queue", actionCollection(), "send_default_via" ); ( void ) new KAction( i18n("&Send Mail"), "mail_send", 0, - this, SLOT(slotSendNow()), actionCollection(),"send_alternative"); + this, TQT_SLOT(slotSendNow()), actionCollection(),"send_alternative"); // FIXME: change to mail_send_via icon when this exits. actActionNowMenu = new KActionMenu (i18n("&Send Mail Via"), "mail_send", @@ -1230,98 +1230,98 @@ void KMComposeWin::setupActions(void) actActionNowMenu->setDelayed(true); actActionLaterMenu->setDelayed(true); - connect( actActionNowMenu, SIGNAL( activated() ), this, - SLOT( slotSendNow() ) ); - connect( actActionLaterMenu, SIGNAL( activated() ), this, - SLOT( slotSendLater() ) ); + connect( actActionNowMenu, TQT_SIGNAL( activated() ), this, + TQT_SLOT( slotSendNow() ) ); + connect( actActionLaterMenu, TQT_SIGNAL( activated() ), this, + TQT_SLOT( slotSendLater() ) ); mActNowMenu = actActionNowMenu->popupMenu(); mActLaterMenu = actActionLaterMenu->popupMenu(); - connect( mActNowMenu, SIGNAL( activated( int ) ), this, - SLOT( slotSendNowVia( int ) ) ); - connect( mActNowMenu, SIGNAL( aboutToShow() ), this, - SLOT( getTransportMenu() ) ); + connect( mActNowMenu, TQT_SIGNAL( activated( int ) ), this, + TQT_SLOT( slotSendNowVia( int ) ) ); + connect( mActNowMenu, TQT_SIGNAL( aboutToShow() ), this, + TQT_SLOT( getTransportMenu() ) ); - connect( mActLaterMenu, SIGNAL( activated( int ) ), this, - SLOT( slotSendLaterVia( int ) ) ); - connect( mActLaterMenu, SIGNAL( aboutToShow() ), this, - SLOT( getTransportMenu() ) ); + connect( mActLaterMenu, TQT_SIGNAL( activated( int ) ), this, + TQT_SLOT( slotSendLaterVia( int ) ) ); + connect( mActLaterMenu, TQT_SIGNAL( aboutToShow() ), this, + TQT_SLOT( getTransportMenu() ) ); (void) new KAction (i18n("Save as &Draft"), "filesave", 0, - this, SLOT(slotSaveDraft()), + this, TQT_SLOT(slotSaveDraft()), actionCollection(), "save_in_drafts"); (void) new KAction (i18n("Save as &Template"), "filesave", 0, - this, SLOT(slotSaveTemplate()), + this, TQT_SLOT(slotSaveTemplate()), actionCollection(), "save_in_templates"); (void) new KAction (i18n("&Insert File..."), "fileopen", 0, - this, SLOT(slotInsertFile()), + this, TQT_SLOT(slotInsertFile()), actionCollection(), "insert_file"); mRecentAction = new KRecentFilesAction (i18n("&Insert File Recent"), "fileopen", 0, - this, SLOT(slotInsertRecentFile(const KURL&)), + this, TQT_SLOT(slotInsertRecentFile(const KURL&)), actionCollection(), "insert_file_recent"); mRecentAction->loadEntries( KMKernel::config() ); (void) new KAction (i18n("&Address Book"), "contents",0, - this, SLOT(slotAddrBook()), + this, TQT_SLOT(slotAddrBook()), actionCollection(), "addressbook"); (void) new KAction (i18n("&New Composer"), "mail_new", KStdAccel::shortcut(KStdAccel::New), - this, SLOT(slotNewComposer()), + this, TQT_SLOT(slotNewComposer()), actionCollection(), "new_composer"); (void) new KAction (i18n("New Main &Window"), "window_new", 0, - this, SLOT(slotNewMailReader()), + this, TQT_SLOT(slotNewMailReader()), actionCollection(), "open_mailreader"); if ( !mClassicalRecipients ) { new KAction( i18n("Select &Recipients..."), CTRL + Key_L, mRecipientsEditor, - SLOT( selectRecipients() ), actionCollection(), "select_recipients" ); + TQT_SLOT( selectRecipients() ), actionCollection(), "select_recipients" ); new KAction( i18n("Save &Distribution List..."), 0, mRecipientsEditor, - SLOT( saveDistributionList() ), actionCollection(), + TQT_SLOT( saveDistributionList() ), actionCollection(), "save_distribution_list" ); } - //KStdAction::save(this, SLOT(), actionCollection(), "save_message"); - KStdAction::print (this, SLOT(slotPrint()), actionCollection()); - KStdAction::close (this, SLOT(slotClose()), actionCollection()); + //KStdAction::save(this, TQT_SLOT(), actionCollection(), "save_message"); + KStdAction::print (this, TQT_SLOT(slotPrint()), actionCollection()); + KStdAction::close (this, TQT_SLOT(slotClose()), actionCollection()); - KStdAction::undo (this, SLOT(slotUndo()), actionCollection()); - KStdAction::redo (this, SLOT(slotRedo()), actionCollection()); - KStdAction::cut (this, SLOT(slotCut()), actionCollection()); - KStdAction::copy (this, SLOT(slotCopy()), actionCollection()); - KStdAction::pasteText (this, SLOT(slotPasteClipboard()), actionCollection()); - KStdAction::selectAll (this, SLOT(slotMarkAll()), actionCollection()); + KStdAction::undo (this, TQT_SLOT(slotUndo()), actionCollection()); + KStdAction::redo (this, TQT_SLOT(slotRedo()), actionCollection()); + KStdAction::cut (this, TQT_SLOT(slotCut()), actionCollection()); + KStdAction::copy (this, TQT_SLOT(slotCopy()), actionCollection()); + KStdAction::pasteText (this, TQT_SLOT(slotPasteClipboard()), actionCollection()); + KStdAction::selectAll (this, TQT_SLOT(slotMarkAll()), actionCollection()); - KStdAction::find (this, SLOT(slotFind()), actionCollection()); - KStdAction::findNext(this, SLOT(slotSearchAgain()), actionCollection()); + KStdAction::find (this, TQT_SLOT(slotFind()), actionCollection()); + KStdAction::findNext(this, TQT_SLOT(slotSearchAgain()), actionCollection()); - KStdAction::replace (this, SLOT(slotReplace()), actionCollection()); - KStdAction::spelling (this, SLOT(slotSpellcheck()), actionCollection(), "spellcheck"); + KStdAction::replace (this, TQT_SLOT(slotReplace()), actionCollection()); + KStdAction::spelling (this, TQT_SLOT(slotSpellcheck()), actionCollection(), "spellcheck"); - mPasteQuotation = new KAction (i18n("Pa&ste as Quotation"),0,this,SLOT( slotPasteClipboardAsQuotation()), + mPasteQuotation = new KAction (i18n("Pa&ste as Quotation"),0,this,TQT_SLOT( slotPasteClipboardAsQuotation()), actionCollection(), "paste_quoted"); - (void) new KAction (i18n("Paste as Attac&hment"),0,this,SLOT( slotPasteClipboardAsAttachment()), + (void) new KAction (i18n("Paste as Attac&hment"),0,this,TQT_SLOT( slotPasteClipboardAsAttachment()), actionCollection(), "paste_att"); mAddQuoteChars = new KAction(i18n("Add &Quote Characters"), 0, this, - SLOT(slotAddQuotes()), actionCollection(), "tools_quote"); + TQT_SLOT(slotAddQuotes()), actionCollection(), "tools_quote"); mRemQuoteChars = new KAction(i18n("Re&move Quote Characters"), 0, this, - SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote"); + TQT_SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote"); - (void) new KAction (i18n("Cl&ean Spaces"), 0, this, SLOT(slotCleanSpace()), + (void) new KAction (i18n("Cl&ean Spaces"), 0, this, TQT_SLOT(slotCleanSpace()), actionCollection(), "clean_spaces"); mFixedFontAction = new KToggleAction( i18n("Use Fi&xed Font"), 0, this, - SLOT(slotUpdateFont()), actionCollection(), "toggle_fixedfont" ); + TQT_SLOT(slotUpdateFont()), actionCollection(), "toggle_fixedfont" ); mFixedFontAction->setChecked( GlobalSettings::self()->useFixedFont() ); //these are checkable!!! @@ -1334,16 +1334,16 @@ void KMComposeWin::setupActions(void) mRequestMDNAction->setChecked(GlobalSettings::self()->requestMDN()); //----- Message-Encoding Submenu mEncodingAction = new KSelectAction( i18n( "Se&t Encoding" ), "charset", - 0, this, SLOT(slotSetCharset() ), + 0, this, TQT_SLOT(slotSetCharset() ), actionCollection(), "charsets" ); mWordWrapAction = new KToggleAction (i18n("&Wordwrap"), 0, actionCollection(), "wordwrap"); mWordWrapAction->setChecked(GlobalSettings::self()->wordWrap()); - connect(mWordWrapAction, SIGNAL(toggled(bool)), SLOT(slotWordWrapToggled(bool))); + connect(mWordWrapAction, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotWordWrapToggled(bool))); mSnippetAction = new KToggleAction ( i18n("&Snippets"), 0, actionCollection(), "snippets"); - connect(mSnippetAction, SIGNAL(toggled(bool)), mSnippetWidget, SLOT(setShown(bool)) ); + connect(mSnippetAction, TQT_SIGNAL(toggled(bool)), mSnippetWidget, TQT_SLOT(setShown(bool)) ); mSnippetAction->setChecked( GlobalSettings::self()->showSnippetManager() ); mAutoSpellCheckingAction = @@ -1353,93 +1353,93 @@ void KMComposeWin::setupActions(void) mAutoSpellCheckingAction->setEnabled( !GlobalSettings::self()->useExternalEditor() ); mAutoSpellCheckingAction->setChecked( !GlobalSettings::self()->useExternalEditor() && spellChecking ); slotAutoSpellCheckingToggled( !GlobalSettings::self()->useExternalEditor() && spellChecking ); - connect( mAutoSpellCheckingAction, SIGNAL( toggled( bool ) ), - this, SLOT( slotAutoSpellCheckingToggled( bool ) ) ); + connect( mAutoSpellCheckingAction, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotAutoSpellCheckingToggled( bool ) ) ); - QStringList encodings = KMMsgBase::supportedEncodings(true); + TQStringList encodings = KMMsgBase::supportedEncodings(true); encodings.prepend( i18n("Auto-Detect")); mEncodingAction->setItems( encodings ); mEncodingAction->setCurrentItem( -1 ); //these are checkable!!! markupAction = new KToggleAction (i18n("Formatting (HTML)"), 0, this, - SLOT(slotToggleMarkup()), + TQT_SLOT(slotToggleMarkup()), actionCollection(), "html"); mAllFieldsAction = new KToggleAction (i18n("&All Fields"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_all_fields"); mIdentityAction = new KToggleAction (i18n("&Identity"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_identity"); mDictionaryAction = new KToggleAction (i18n("&Dictionary"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_dictionary"); mFccAction = new KToggleAction (i18n("&Sent-Mail Folder"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_fcc"); mTransportAction = new KToggleAction (i18n("&Mail Transport"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_transport"); mFromAction = new KToggleAction (i18n("&From"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_from"); mReplyToAction = new KToggleAction (i18n("&Reply To"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_reply_to"); if ( mClassicalRecipients ) { mToAction = new KToggleAction (i18n("&To"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_to"); mCcAction = new KToggleAction (i18n("&CC"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_cc"); mBccAction = new KToggleAction (i18n("&BCC"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_bcc"); } mSubjectAction = new KToggleAction (i18n("S&ubject"), 0, this, - SLOT(slotView()), + TQT_SLOT(slotView()), actionCollection(), "show_subject"); //end of checkable mAppendSignatureAction = new KAction (i18n("Append S&ignature"), 0, this, - SLOT(slotAppendSignature()), + TQT_SLOT(slotAppendSignature()), actionCollection(), "append_signature"); mPrependSignatureAction = new KAction (i18n("Prepend S&ignature"), 0, this, - SLOT(slotPrependSignature()), + TQT_SLOT(slotPrependSignature()), actionCollection(), "prepend_signature"); mInsertSignatureAction = new KAction (i18n("Insert Signature At C&ursor Position"), "edit", 0, this, - SLOT(slotInsertSignatureAtCursor()), + TQT_SLOT(slotInsertSignatureAtCursor()), actionCollection(), "insert_signature_at_cursor_position"); mAttachPK = new KAction (i18n("Attach &Public Key..."), 0, this, - SLOT(slotInsertPublicKey()), + TQT_SLOT(slotInsertPublicKey()), actionCollection(), "attach_public_key"); mAttachMPK = new KAction (i18n("Attach &My Public Key"), 0, this, - SLOT(slotInsertMyPublicKey()), + TQT_SLOT(slotInsertMyPublicKey()), actionCollection(), "attach_my_public_key"); (void) new KAction (i18n("&Attach File..."), "attach", - 0, this, SLOT(slotAttachFile()), + 0, this, TQT_SLOT(slotAttachFile()), actionCollection(), "attach"); mAttachRemoveAction = new KAction (i18n("&Remove Attachment"), 0, this, - SLOT(slotAttachRemove()), + TQT_SLOT(slotAttachRemove()), actionCollection(), "remove"); mAttachSaveAction = new KAction (i18n("&Save Attachment As..."), "filesave",0, - this, SLOT(slotAttachSave()), + this, TQT_SLOT(slotAttachSave()), actionCollection(), "attach_save"); mAttachPropertiesAction = new KAction (i18n("Attachment Pr&operties"), 0, this, - SLOT(slotAttachProperties()), + TQT_SLOT(slotAttachProperties()), actionCollection(), "attach_properties"); setStandardToolBarMenuEnabled(true); - KStdAction::keyBindings(this, SLOT(slotEditKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection()); - KStdAction::preferences(kmkernel, SLOT(slotShowConfigurationDialog()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(slotEditKeys()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()), actionCollection()); + KStdAction::preferences(kmkernel, TQT_SLOT(slotShowConfigurationDialog()), actionCollection()); - (void) new KAction (i18n("&Spellchecker..."), 0, this, SLOT(slotSpellcheckConfig()), + (void) new KAction (i18n("&Spellchecker..."), 0, this, TQT_SLOT(slotSpellcheckConfig()), actionCollection(), "setup_spellchecker"); if ( Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ) ) { @@ -1448,8 +1448,8 @@ void KMComposeWin::setupActions(void) "encrypt_message_chiasmus" ); a->setCheckedState( KGuiItem( i18n( "Encrypt Message with Chiasmus..." ), "chiencrypted" ) ); mEncryptChiasmusAction = a; - connect( mEncryptChiasmusAction, SIGNAL(toggled(bool)), - this, SLOT(slotEncryptChiasmusToggled(bool)) ); + connect( mEncryptChiasmusAction, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotEncryptChiasmusToggled(bool)) ); } else { mEncryptChiasmusAction = 0; } @@ -1495,23 +1495,23 @@ void KMComposeWin::setupActions(void) setSigning( ( canOpenPGPSign || canSMIMESign ) && GlobalSettings::self()->pgpAutoSign() ); } - connect(mEncryptAction, SIGNAL(toggled(bool)), - SLOT(slotEncryptToggled( bool ))); - connect(mSignAction, SIGNAL(toggled(bool)), - SLOT(slotSignToggled( bool ))); + connect(mEncryptAction, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotEncryptToggled( bool ))); + connect(mSignAction, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotSignToggled( bool ))); - QStringList l; + TQStringList l; for ( int i = 0 ; i < numCryptoMessageFormats ; ++i ) l.push_back( Kleo::cryptoMessageFormatToLabel( cryptoMessageFormats[i] ) ); mCryptoModuleAction = new KSelectAction( i18n( "&Cryptographic Message Format" ), 0, - this, SLOT(slotSelectCryptoModule()), + this, TQT_SLOT(slotSelectCryptoModule()), actionCollection(), "options_select_crypto" ); mCryptoModuleAction->setItems( l ); mCryptoModuleAction->setCurrentItem( format2cb( ident.preferredCryptoMessageFormat() ) ); slotSelectCryptoModule( true /* initialize */ ); - QStringList styleItems; + TQStringList styleItems; styleItems << i18n( "Standard" ); styleItems << i18n( "Bulleted List (Disc)" ); styleItems << i18n( "Bulleted List (Circle)" ); @@ -1523,48 +1523,48 @@ void KMComposeWin::setupActions(void) listAction = new KSelectAction( i18n( "Select Style" ), 0, actionCollection(), "text_list" ); listAction->setItems( styleItems ); - connect( listAction, SIGNAL( activated( const QString& ) ), - SLOT( slotListAction( const QString& ) ) ); + connect( listAction, TQT_SIGNAL( activated( const TQString& ) ), + TQT_SLOT( slotListAction( const TQString& ) ) ); fontAction = new KFontAction( "Select Font", 0, actionCollection(), "text_font" ); - connect( fontAction, SIGNAL( activated( const QString& ) ), - SLOT( slotFontAction( const QString& ) ) ); + connect( fontAction, TQT_SIGNAL( activated( const TQString& ) ), + TQT_SLOT( slotFontAction( const TQString& ) ) ); fontSizeAction = new KFontSizeAction( "Select Size", 0, actionCollection(), "text_size" ); - connect( fontSizeAction, SIGNAL( fontSizeChanged( int ) ), - SLOT( slotSizeAction( int ) ) ); + connect( fontSizeAction, TQT_SIGNAL( fontSizeChanged( int ) ), + TQT_SLOT( slotSizeAction( int ) ) ); alignLeftAction = new KToggleAction (i18n("Align Left"), "text_left", 0, - this, SLOT(slotAlignLeft()), actionCollection(), + this, TQT_SLOT(slotAlignLeft()), actionCollection(), "align_left"); alignLeftAction->setChecked( true ); alignRightAction = new KToggleAction (i18n("Align Right"), "text_right", 0, - this, SLOT(slotAlignRight()), actionCollection(), + this, TQT_SLOT(slotAlignRight()), actionCollection(), "align_right"); alignCenterAction = new KToggleAction (i18n("Align Center"), "text_center", 0, - this, SLOT(slotAlignCenter()), actionCollection(), + this, TQT_SLOT(slotAlignCenter()), actionCollection(), "align_center"); textBoldAction = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B, - this, SLOT(slotTextBold()), + this, TQT_SLOT(slotTextBold()), actionCollection(), "text_bold"); textItalicAction = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I, - this, SLOT(slotTextItalic()), + this, TQT_SLOT(slotTextItalic()), actionCollection(), "text_italic"); textUnderAction = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U, - this, SLOT(slotTextUnder()), + this, TQT_SLOT(slotTextUnder()), actionCollection(), "text_under"); actionFormatReset = new KAction( i18n( "Reset Font Settings" ), "eraser", 0, - this, SLOT( slotFormatReset() ), + this, TQT_SLOT( slotFormatReset() ), actionCollection(), "format_reset"); actionFormatColor = new KAction( i18n( "Text Color..." ), "colorize", 0, - this, SLOT( slotTextColor() ), + this, TQT_SLOT( slotTextColor() ), actionCollection(), "format_color"); // editorFocusChanged(false); createGUI("kmcomposerui.rc"); - connect( toolBar("htmlToolBar"), SIGNAL( visibilityChanged(bool) ), - this, SLOT( htmlToolBarVisibilityChanged(bool) ) ); + connect( toolBar("htmlToolBar"), TQT_SIGNAL( visibilityChanged(bool) ), + this, TQT_SLOT( htmlToolBarVisibilityChanged(bool) ) ); // In Kontact, this entry would read "Configure Kontact", but bring // up KMail's config dialog. That's sensible, though, so fix the label. @@ -1589,7 +1589,7 @@ void KMComposeWin::setupStatusBar(void) void KMComposeWin::updateCursorPosition() { int col,line; - QString temp; + TQString temp; line = mEditor->currentLine(); col = mEditor->currentColumn(); temp = i18n(" Line: %1 ").arg(line+1); @@ -1602,11 +1602,11 @@ void KMComposeWin::updateCursorPosition() //----------------------------------------------------------------------------- void KMComposeWin::setupEditor(void) { - //QPopupMenu* menu; + //TQPopupMenu* menu; mEditor->setModified(false); - QFontMetrics fm(mBodyFont); - mEditor->setTabStopWidth(fm.width(QChar(' ')) * 8); - //mEditor->setFocusPolicy(QWidget::ClickFocus); + TQFontMetrics fm(mBodyFont); + mEditor->setTabStopWidth(fm.width(TQChar(' ')) * 8); + //mEditor->setFocusPolicy(TQWidget::ClickFocus); slotWordWrapToggled( GlobalSettings::self()->wordWrap() ); @@ -1615,110 +1615,110 @@ void KMComposeWin::setupEditor(void) /* installRBPopup() is broken in kdelibs, we should wait for the new klibtextedit (dnaber, 2002-01-01) - menu = new QPopupMenu(this); + menu = new TQPopupMenu(this); //#ifdef BROKEN menu->insertItem(i18n("Undo"),mEditor, - SLOT(undo()), KStdAccel::shortcut(KStdAccel::Undo)); + TQT_SLOT(undo()), KStdAccel::shortcut(KStdAccel::Undo)); menu->insertItem(i18n("Redo"),mEditor, - SLOT(redo()), KStdAccel::shortcut(KStdAccel::Redo)); + TQT_SLOT(redo()), KStdAccel::shortcut(KStdAccel::Redo)); menu->insertSeparator(); //#endif //BROKEN - menu->insertItem(i18n("Cut"), this, SLOT(slotCut())); - menu->insertItem(i18n("Copy"), this, SLOT(slotCopy())); - menu->insertItem(i18n("Paste"), this, SLOT(slotPasteClipboard())); - menu->insertItem(i18n("Mark All"),this, SLOT(slotMarkAll())); + menu->insertItem(i18n("Cut"), this, TQT_SLOT(slotCut())); + menu->insertItem(i18n("Copy"), this, TQT_SLOT(slotCopy())); + menu->insertItem(i18n("Paste"), this, TQT_SLOT(slotPasteClipboard())); + menu->insertItem(i18n("Mark All"),this, TQT_SLOT(slotMarkAll())); menu->insertSeparator(); - menu->insertItem(i18n("Find..."), this, SLOT(slotFind())); - menu->insertItem(i18n("Replace..."), this, SLOT(slotReplace())); + menu->insertItem(i18n("Find..."), this, TQT_SLOT(slotFind())); + menu->insertItem(i18n("Replace..."), this, TQT_SLOT(slotReplace())); menu->insertSeparator(); - menu->insertItem(i18n("Fixed Font Widths"), this, SLOT(slotUpdateFont())); + menu->insertItem(i18n("Fixed Font Widths"), this, TQT_SLOT(slotUpdateFont())); mEditor->installRBPopup(menu); */ updateCursorPosition(); - connect(mEditor,SIGNAL(CursorPositionChanged()),SLOT(updateCursorPosition())); - connect( mEditor, SIGNAL( currentFontChanged( const QFont & ) ), - this, SLOT( fontChanged( const QFont & ) ) ); - connect( mEditor, SIGNAL( currentAlignmentChanged( int ) ), - this, SLOT( alignmentChanged( int ) ) ); + connect(mEditor,TQT_SIGNAL(CursorPositionChanged()),TQT_SLOT(updateCursorPosition())); + connect( mEditor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ), + this, TQT_SLOT( fontChanged( const TQFont & ) ) ); + connect( mEditor, TQT_SIGNAL( currentAlignmentChanged( int ) ), + this, TQT_SLOT( alignmentChanged( int ) ) ); } //----------------------------------------------------------------------------- -static QString cleanedUpHeaderString( const QString & s ) +static TQString cleanedUpHeaderString( const TQString & s ) { // remove invalid characters from the header strings - QString res( s ); + TQString res( s ); res.replace( '\r', "" ); res.replace( '\n', " " ); return res.stripWhiteSpace(); } //----------------------------------------------------------------------------- -QString KMComposeWin::subject() const +TQString KMComposeWin::subject() const { return cleanedUpHeaderString( mEdtSubject->text() ); } //----------------------------------------------------------------------------- -QString KMComposeWin::to() const +TQString KMComposeWin::to() const { if ( mEdtTo ) { return cleanedUpHeaderString( mEdtTo->text() ); } else if ( mRecipientsEditor ) { return mRecipientsEditor->recipientString( Recipient::To ); } else { - return QString::null; + return TQString::null; } } //----------------------------------------------------------------------------- -QString KMComposeWin::cc() const +TQString KMComposeWin::cc() const { if ( mEdtCc && !mEdtCc->isHidden() ) { return cleanedUpHeaderString( mEdtCc->text() ); } else if ( mRecipientsEditor ) { return mRecipientsEditor->recipientString( Recipient::Cc ); } else { - return QString::null; + return TQString::null; } } //----------------------------------------------------------------------------- -QString KMComposeWin::bcc() const +TQString KMComposeWin::bcc() const { if ( mEdtBcc && !mEdtBcc->isHidden() ) { return cleanedUpHeaderString( mEdtBcc->text() ); } else if ( mRecipientsEditor ) { return mRecipientsEditor->recipientString( Recipient::Bcc ); } else { - return QString::null; + return TQString::null; } } //----------------------------------------------------------------------------- -QString KMComposeWin::from() const +TQString KMComposeWin::from() const { return cleanedUpHeaderString( mEdtFrom->text() ); } //----------------------------------------------------------------------------- -QString KMComposeWin::replyTo() const +TQString KMComposeWin::replyTo() const { if ( mEdtReplyTo ) { return cleanedUpHeaderString( mEdtReplyTo->text() ); } else { - return QString::null; + return TQString::null; } } //----------------------------------------------------------------------------- -void KMComposeWin::verifyWordWrapLengthIsAdequate(const QString &body) +void KMComposeWin::verifyWordWrapLengthIsAdequate(const TQString &body) { int maxLineLength = 0; int curPos; int oldPos = 0; - if (mEditor->QTextEdit::wordWrap() == QTextEdit::FixedColumnWidth) { + if (mEditor->TQTextEdit::wordWrap() == TQTextEdit::FixedColumnWidth) { for (curPos = 0; curPos < (int)body.length(); ++curPos) if (body[curPos] == '\n') { if ((curPos - oldPos) > maxLineLength) @@ -1733,10 +1733,10 @@ void KMComposeWin::verifyWordWrapLengthIsAdequate(const QString &body) } //----------------------------------------------------------------------------- -void KMComposeWin::decryptOrStripOffCleartextSignature( QCString& body ) +void KMComposeWin::decryptOrStripOffCleartextSignature( TQCString& body ) { - QPtrList<Kpgp::Block> pgpBlocks; - QStrList nonPgpBlocks; + TQPtrList<Kpgp::Block> pgpBlocks; + TQStrList nonPgpBlocks; if( Kpgp::Module::prepareMessageForDecryption( body, pgpBlocks, nonPgpBlocks ) ) { @@ -1764,7 +1764,7 @@ void KMComposeWin::decryptOrStripOffCleartextSignature( QCString& body ) } //----------------------------------------------------------------------------- -void KMComposeWin::setTransport( const QString & transport ) +void KMComposeWin::setTransport( const TQString & transport ) { kdDebug(5006) << "KMComposeWin::setTransport( \"" << transport << "\" )" << endl; // Don't change the transport combobox if transport is empty @@ -1829,15 +1829,15 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, // don't overwrite the header values with identity specific values // unless the identity is sticky if ( !stickyIdentity ) { - disconnect(mIdentity,SIGNAL(identityChanged(uint)), - this, SLOT(slotIdentityChanged(uint))); + disconnect(mIdentity,TQT_SIGNAL(identityChanged(uint)), + this, TQT_SLOT(slotIdentityChanged(uint))); } // load the mId into the gui, sticky or not, without emitting mIdentity->setCurrentIdentity( mId ); const uint idToApply = mId; if ( !stickyIdentity ) { - connect(mIdentity,SIGNAL(identityChanged(uint)), - this, SLOT(slotIdentityChanged(uint))); + connect(mIdentity,TQT_SIGNAL(identityChanged(uint)), + this, TQT_SLOT(slotIdentityChanged(uint))); } else { // load the message's state into the mId, without applying it to the gui // that's so we can detect that the id changed (because a sticky was set) @@ -1856,7 +1856,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, // check for the presence of a DNT header, indicating that MDN's were // requested - QString mdnAddr = newMsg->headerField("Disposition-Notification-To"); + TQString mdnAddr = newMsg->headerField("Disposition-Notification-To"); mRequestMDNAction->setChecked( ( !mdnAddr.isEmpty() && im->thatIsMe( mdnAddr ) ) || GlobalSettings::self()->requestMDN() ); @@ -1868,7 +1868,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, mMsg->removeHeaderField("X-Face"); else { - QString xface = ident.xface(); + TQString xface = ident.xface(); if (!xface.isEmpty()) { int numNL = ( xface.length() - 1 ) / 70; @@ -1932,7 +1932,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, mAttachMPK->setEnabled( Kleo::CryptoBackendFactory::instance()->openpgp() && !ident.pgpEncryptionKey().isEmpty() ); - QString transport = newMsg->headerField("X-KMail-Transport"); + TQString transport = newMsg->headerField("X-KMail-Transport"); if (!mBtnTransport->isChecked() && !transport.isEmpty()) setTransport( transport ); @@ -1972,14 +1972,14 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, // get cte decoded body part mCharset = n->msgPart().charset(); - QCString bodyDecoded = n->msgPart().bodyDecoded(); + TQCString bodyDecoded = n->msgPart().bodyDecoded(); // respect html part charset - const QTextCodec *codec = KMMsgBase::codecForName( mCharset ); + const TQTextCodec *codec = KMMsgBase::codecForName( mCharset ); if ( codec ) { mEditor->setText( codec->toUnicode( bodyDecoded ) ); } else { - mEditor->setText( QString::fromLocal8Bit( bodyDecoded ) ); + mEditor->setText( TQString::fromLocal8Bit( bodyDecoded ) ); } } @@ -1995,16 +1995,16 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, if ( mCharset.isEmpty() || mCharset == "default" ) mCharset = mDefCharset; - QCString bodyDecoded = mMsg->bodyDecoded(); + TQCString bodyDecoded = mMsg->bodyDecoded(); if( allowDecryption ) decryptOrStripOffCleartextSignature( bodyDecoded ); - const QTextCodec *codec = KMMsgBase::codecForName(mCharset); + const TQTextCodec *codec = KMMsgBase::codecForName(mCharset); if (codec) { mEditor->setText(codec->toUnicode(bodyDecoded)); } else - mEditor->setText(QString::fromLocal8Bit(bodyDecoded)); + mEditor->setText(TQString::fromLocal8Bit(bodyDecoded)); } #ifdef BROKEN_FOR_OPAQUE_SIGNED_OR_ENCRYPTED_MAILS const int num = mMsg->numBodyParts(); @@ -2048,7 +2048,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, if ( mCharset.isEmpty() || mCharset == "default" ) mCharset = mDefCharset; - QCString bodyDecoded = bodyPart.bodyDecoded(); + TQCString bodyDecoded = bodyPart.bodyDecoded(); if( allowDecryption ) decryptOrStripOffCleartextSignature( bodyDecoded ); @@ -2059,18 +2059,18 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, // out. Ingo, 2002-04-21 //verifyWordWrapLengthIsAdequate(bodyDecoded); - const QTextCodec *codec = KMMsgBase::codecForName(mCharset); + const TQTextCodec *codec = KMMsgBase::codecForName(mCharset); if (codec) mEditor->setText(codec->toUnicode(bodyDecoded)); else - mEditor->setText(QString::fromLocal8Bit(bodyDecoded)); + mEditor->setText(TQString::fromLocal8Bit(bodyDecoded)); //mEditor->insertLine("\n", -1); <-- why ? } else mEditor->setText(""); for( int i = firstAttachment; i < num; ++i ) { KMMessagePart *msgPart = new KMMessagePart; mMsg->bodyPart(i, msgPart); - QCString mimeType = msgPart->typeStr().lower() + '/' + TQCString mimeType = msgPart->typeStr().lower() + '/' + msgPart->subtypeStr().lower(); // don't add the detached signature as attachment when editting a // PGP/MIME signed message @@ -2083,16 +2083,16 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, if ( mCharset.isEmpty() || mCharset == "default" ) mCharset = mDefCharset; - QCString bodyDecoded = mMsg->bodyDecoded(); + TQCString bodyDecoded = mMsg->bodyDecoded(); if( allowDecryption ) decryptOrStripOffCleartextSignature( bodyDecoded ); - const QTextCodec *codec = KMMsgBase::codecForName(mCharset); + const TQTextCodec *codec = KMMsgBase::codecForName(mCharset); if (codec) { mEditor->setText(codec->toUnicode(bodyDecoded)); } else - mEditor->setText(QString::fromLocal8Bit(bodyDecoded)); + mEditor->setText(TQString::fromLocal8Bit(bodyDecoded)); } setCharset(mCharset); @@ -2105,11 +2105,11 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, // Not user friendy if this modal fileseletor opens before the // composer. // - //QTimer::singleShot( 200, this, SLOT(slotAppendSignature()) ); + //TQTimer::singleShot( 200, this, TQT_SLOT(slotAppendSignature()) ); if ( GlobalSettings::self()->prependSignature() ) { - QTimer::singleShot( 0, this, SLOT(slotPrependSignature()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotPrependSignature()) ); } else { - QTimer::singleShot( 0, this, SLOT(slotAppendSignature()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotAppendSignature()) ); } } @@ -2126,7 +2126,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign, //----------------------------------------------------------------------------- -void KMComposeWin::setFcc( const QString &idString ) +void KMComposeWin::setFcc( const TQString &idString ) { // check if the sent-mail folder still exists if ( ! idString.isEmpty() && kmkernel->findFolderById( idString ) ) { @@ -2179,15 +2179,15 @@ bool KMComposeWin::queryClose () return false; if ( kmkernel->shuttingDown() || kapp->sessionSaving() ) return true; - if ( mComposer && mComposer->isPerformingSignOperation() ) // since the non-gpg-agent gpg plugin gets a passphrase using QDialog::exec() + if ( mComposer && mComposer->isPerformingSignOperation() ) // since the non-gpg-agent gpg plugin gets a passphrase using TQDialog::exec() return false; // the user can try to close the window, which destroys mComposer mid-call. if ( isModified() ) { bool istemplate = ( mFolder!=0 && mFolder->isTemplates() ); - const QString savebut = ( istemplate ? + const TQString savebut = ( istemplate ? i18n("Re&save as Template") : i18n("&Save as Draft") ); - const QString savetext = ( istemplate ? + const TQString savetext = ( istemplate ? i18n("Resave this message in the Templates folder. " "It can then be used at a later time.") : i18n("Save this message in the Drafts folder. " @@ -2196,7 +2196,7 @@ bool KMComposeWin::queryClose () const int rc = KMessageBox::warningYesNoCancel( this, i18n("Do you want to save the message for later or discard it?"), i18n("Close Composer"), - KGuiItem(savebut, "filesave", QString::null, savetext), + KGuiItem(savebut, "filesave", TQString::null, savetext), KStdGuiItem::discard() ); if ( rc == KMessageBox::Cancel ) return false; @@ -2223,37 +2223,37 @@ bool KMComposeWin::userForgotAttachment() return false; - QStringList attachWordsList = GlobalSettings::self()->attachmentKeywords(); + TQStringList attachWordsList = GlobalSettings::self()->attachmentKeywords(); if ( attachWordsList.isEmpty() ) { // default value (FIXME: this is duplicated in configuredialog.cpp) - 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"); } - QRegExp rx ( QString::fromLatin1("\\b") + + TQRegExp rx ( TQString::fromLatin1("\\b") + attachWordsList.join("\\b|\\b") + - QString::fromLatin1("\\b") ); + TQString::fromLatin1("\\b") ); rx.setCaseSensitive( false ); bool gotMatch = false; // check whether the subject contains one of the attachment key words // unless the message is a reply or a forwarded message - QString subj = subject(); + TQString subj = subject(); gotMatch = ( KMMessage::stripOffPrefixes( subj ) == subj ) && ( rx.search( subj ) >= 0 ); if ( !gotMatch ) { // check whether the non-quoted text contains one of the attachment key // words - QRegExp quotationRx ("^([ \\t]*([|>:}#]|[A-Za-z]+>))+"); + TQRegExp quotationRx ("^([ \\t]*([|>:}#]|[A-Za-z]+>))+"); for ( int i = 0; i < mEditor->numLines(); ++i ) { - QString line = mEditor->textLine( i ); + TQString line = mEditor->textLine( i ); gotMatch = ( quotationRx.search( line ) < 0 ) && ( rx.search( line ) >= 0 ); if ( gotMatch ) @@ -2294,8 +2294,8 @@ void KMComposeWin::applyChanges( bool dontSignNorEncrypt, bool dontDisable ) // Make new job and execute it mComposer = new MessageComposer( this ); - connect( mComposer, SIGNAL( done( bool ) ), - this, SLOT( slotComposerDone( bool ) ) ); + connect( mComposer, TQT_SIGNAL( done( bool ) ), + this, TQT_SLOT( slotComposerDone( bool ) ) ); // TODO: Add a cancel button for the following operations? // Disable any input to the window, so that we have a snapshot of the @@ -2355,7 +2355,7 @@ bool KMComposeWin::addAttach(const KURL aUrl) const int maxAttachmentSize = GlobalSettings::maximumAttachmentSize(); const uint maximumAttachmentSizeInByte = maxAttachmentSize*1024*1024; - if ( aUrl.isLocalFile() && QFileInfo( aUrl.pathOrURL() ).size() > maximumAttachmentSizeInByte ) { + if ( aUrl.isLocalFile() && TQFileInfo( aUrl.pathOrURL() ).size() > maximumAttachmentSizeInByte ) { KMessageBox::sorry( this, i18n( "<qt><p>Your administrator has disallowed attaching files bigger than %1 MB.</p>" ).arg( maxAttachmentSize ) ); return false; } @@ -2364,17 +2364,17 @@ bool KMComposeWin::addAttach(const KURL aUrl) KIO::Scheduler::scheduleJob( job ); atmLoadData ld; ld.url = aUrl; - ld.data = QByteArray(); + ld.data = TQByteArray(); ld.insert = false; if( !aUrl.fileEncoding().isEmpty() ) ld.encoding = aUrl.fileEncoding().latin1(); mMapAtmLoadData.insert(job, ld); mAttachJobs[job] = aUrl; - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotAttachFileResult(KIO::Job *))); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotAttachFileData(KIO::Job *, const QByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotAttachFileResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotAttachFileData(KIO::Job *, const TQByteArray &))); return true; } @@ -2403,10 +2403,10 @@ void KMComposeWin::addAttach(const KMMessagePart* msgPart) mTempDir = 0; } - connect( lvi, SIGNAL( compress( int ) ), - this, SLOT( compressAttach( int ) ) ); - connect( lvi, SIGNAL( uncompress( int ) ), - this, SLOT( uncompressAttach( int ) ) ); + connect( lvi, TQT_SIGNAL( compress( int ) ), + this, TQT_SLOT( compressAttach( int ) ) ); + connect( lvi, TQT_SIGNAL( uncompress( int ) ), + this, TQT_SLOT( uncompressAttach( int ) ) ); slotUpdateAttachActions(); } @@ -2416,7 +2416,7 @@ void KMComposeWin::addAttach(const KMMessagePart* msgPart) void KMComposeWin::slotUpdateAttachActions() { int selectedCount = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it ) { if ( (*it)->isSelected() ) { ++selectedCount; } @@ -2430,9 +2430,9 @@ void KMComposeWin::slotUpdateAttachActions() //----------------------------------------------------------------------------- -QString KMComposeWin::prettyMimeType( const QString& type ) +TQString KMComposeWin::prettyMimeType( const TQString& type ) { - QString t = type.lower(); + TQString t = type.lower(); KServiceType::Ptr st = KServiceType::serviceType( t ); return st ? st->comment() : t; } @@ -2464,7 +2464,7 @@ void KMComposeWin::msgPartToItem(const KMMessagePart* msgPart, //----------------------------------------------------------------------------- -void KMComposeWin::removeAttach(const QString &aUrl) +void KMComposeWin::removeAttach(const TQString &aUrl) { int idx; KMMessagePart* msgPart; @@ -2530,8 +2530,8 @@ void KMComposeWin::addrBookSelInto() void KMComposeWin::addrBookSelIntoOld() { AddressesDialog dlg( this ); - QString txt; - QStringList lst; + TQString txt; + TQStringList lst; txt = to(); if ( !txt.isEmpty() ) { @@ -2553,7 +2553,7 @@ void KMComposeWin::addrBookSelIntoOld() dlg.setRecentAddresses( RecentAddresses::self( KMKernel::config() )->kabcAddresses() ); - if (dlg.exec()==QDialog::Rejected) return; + if (dlg.exec()==TQDialog::Rejected) return; mEdtTo->setText( dlg.to().join(", ") ); mEdtTo->setEdited( true ); @@ -2577,8 +2577,8 @@ void KMComposeWin::addrBookSelIntoNew() AddresseeSelectorDialog dlg( &selection ); - QString txt; - QStringList lst; + TQString txt; + TQStringList lst; txt = to(); if ( !txt.isEmpty() ) { @@ -2598,9 +2598,9 @@ void KMComposeWin::addrBookSelIntoNew() selection.setSelectedBCC( lst ); } - if (dlg.exec()==QDialog::Rejected) return; + if (dlg.exec()==TQDialog::Rejected) return; - QStringList list = selection.to() + selection.toDistributionLists(); + TQStringList list = selection.to() + selection.toDistributionLists(); mEdtTo->setText( list.join(", ") ); mEdtTo->setEdited( true ); @@ -2621,7 +2621,7 @@ void KMComposeWin::addrBookSelIntoNew() //----------------------------------------------------------------------------- -void KMComposeWin::setCharset(const QCString& aCharset, bool forceDefault) +void KMComposeWin::setCharset(const TQCString& aCharset, bool forceDefault) { if ((forceDefault && GlobalSettings::self()->forceReplyCharset()) || aCharset.isEmpty()) mCharset = mDefCharset; @@ -2637,10 +2637,10 @@ void KMComposeWin::setCharset(const QCString& aCharset, bool forceDefault) return; } - QStringList encodings = mEncodingAction->items(); + TQStringList encodings = mEncodingAction->items(); int i = 0; bool charsetFound = false; - for ( QStringList::Iterator it = encodings.begin(); it != encodings.end(); + for ( TQStringList::Iterator it = encodings.begin(); it != encodings.end(); ++it, i++ ) { if (i > 0 && ((mCharset == "us-ascii" && i == 1) || @@ -2692,7 +2692,7 @@ void KMComposeWin::slotAttachFile() // We will not care about any permissions, existence or whatsoever in // this function. - KFileDialog fdlg(QString::null, QString::null, this, 0, true); + KFileDialog fdlg(TQString::null, TQString::null, this, 0, true); fdlg.setOperationMode( KFileDialog::Other ); fdlg.setCaption(i18n("Attach File")); fdlg.okButton()->setGuiItem(KGuiItem(i18n("&Attach"),"fileopen")); @@ -2706,11 +2706,11 @@ void KMComposeWin::slotAttachFile() //----------------------------------------------------------------------------- -void KMComposeWin::slotAttachFileData(KIO::Job *job, const QByteArray &data) +void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data) { - QMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); + TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); - QBuffer buff((*it).data); + TQBuffer buff((*it).data); buff.open(IO_WriteOnly | IO_Append); buff.writeBlock(data.data(), data.size()); buff.close(); @@ -2720,10 +2720,10 @@ void KMComposeWin::slotAttachFileData(KIO::Job *job, const QByteArray &data) //----------------------------------------------------------------------------- void KMComposeWin::slotAttachFileResult(KIO::Job *job) { - QMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); + TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); KURL attachURL; - QMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.find(job); + TQMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.find(job); bool attachURLfound = (jit != mAttachJobs.end()); if (attachURLfound) { @@ -2742,18 +2742,18 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) { (*it).data.resize((*it).data.size() + 1); (*it).data[(*it).data.size() - 1] = '\0'; - if ( const QTextCodec * codec = KGlobal::charsets()->codecForName((*it).encoding) ) + if ( const TQTextCodec * codec = KGlobal::charsets()->codecForName((*it).encoding) ) mEditor->insert( codec->toUnicode( (*it).data ) ); else - mEditor->insert( QString::fromLocal8Bit( (*it).data ) ); + mEditor->insert( TQString::fromLocal8Bit( (*it).data ) ); mMapAtmLoadData.remove(it); if (attachURLfound) emit attachmentAdded(attachURL, true); return; } - QCString partCharset; + TQCString partCharset; if ( !( *it ).url.fileEncoding().isEmpty() ) { - partCharset = QCString( ( *it ).url.fileEncoding().latin1() ); + partCharset = TQCString( ( *it ).url.fileEncoding().latin1() ); } else { EncodingDetector ed; KLocale *loc = KGlobal::locale(); @@ -2767,9 +2767,9 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) KMMessagePart* msgPart; KCursorSaver busy(KBusyPtr::busy()); - QString name( (*it).url.fileName() ); + TQString name( (*it).url.fileName() ); // ask the job for the mime type of the file - QString mimeType = static_cast<KIO::MimetypeJob*>(job)->mimetype(); + TQString mimeType = static_cast<KIO::MimetypeJob*>(job)->mimetype(); if ( name.isEmpty() ) { // URL ends with '/' (e.g. http://www.kde.org/) @@ -2778,8 +2778,8 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) name = "index.html"; else { // try to determine a reasonable extension - QStringList patterns( KMimeType::mimeType( mimeType )->patterns() ); - QString ext; + TQStringList patterns( KMimeType::mimeType( mimeType )->patterns() ); + TQString ext; if( !patterns.isEmpty() ) { ext = patterns[0]; int i = ext.findRev( '.' ); @@ -2788,30 +2788,30 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) else if( i > 0 ) ext = ext.mid( i ); } - name = QString("unknown") += ext; + name = TQString("unknown") += ext; } } name.truncate( 256 ); // is this needed? - QCString encoding = KMMsgBase::autoDetectCharset(partCharset, + TQCString encoding = KMMsgBase::autoDetectCharset(partCharset, KMMessage::preferredCharsets(), name); if ( encoding.isEmpty() ) encoding = "utf-8"; - QCString encName; + TQCString encName; if ( GlobalSettings::self()->outlookCompatibleAttachments() ) encName = KMMsgBase::encodeRFC2047String( name, encoding ); else encName = KMMsgBase::encodeRFC2231String( name, encoding ); bool RFC2231encoded = false; if ( !GlobalSettings::self()->outlookCompatibleAttachments() ) - RFC2231encoded = name != QString( encName ); + RFC2231encoded = name != TQString( encName ); // create message part msgPart = new KMMessagePart; msgPart->setName(name); - QValueList<int> allowedCTEs; + TQValueList<int> allowedCTEs; if ( mimeType == "message/rfc822" ) { msgPart->setMessageBody( (*it).data ); allowedCTEs << DwMime::kCte7bit; @@ -2826,7 +2826,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) slash = mimeType.length(); msgPart->setTypeStr( mimeType.left( slash ).latin1() ); msgPart->setSubtypeStr( mimeType.mid( slash + 1 ).latin1() ); - msgPart->setContentDisposition(QCString("attachment;\n\tfilename") + msgPart->setContentDisposition(TQCString("attachment;\n\tfilename") + ( RFC2231encoded ? "*=" + encName : "=\"" + encName + '"' ) ); mMapAtmLoadData.remove(it); @@ -2836,10 +2836,10 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) // show message part dialog, if not configured away (default): KConfigGroup composer(KMKernel::config(), "Composer"); if ( GlobalSettings::self()->showMessagePartDialogOnAttach() ) { - const KCursorSaver saver( QCursor::ArrowCursor ); + const KCursorSaver saver( TQCursor::ArrowCursor ); KMMsgPartDialogCompat dlg(mMainWidget); int encodings = 0; - for ( QValueListConstIterator<int> it = allowedCTEs.begin() ; + for ( TQValueListConstIterator<int> it = allowedCTEs.begin() ; it != allowedCTEs.end() ; ++it ) switch ( *it ) { case DwMime::kCteBase64: encodings |= KMMsgPartDialog::Base64; break; @@ -2859,7 +2859,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) } } mAtmModified = true; - if (msgPart->typeStr().lower() != "text") msgPart->setCharset(QCString()); + if (msgPart->typeStr().lower() != "text") msgPart->setCharset(TQCString()); // add the new attachment to the list addAttach(msgPart); @@ -2872,7 +2872,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) //----------------------------------------------------------------------------- void KMComposeWin::slotInsertFile() { - KFileDialog fdlg(QString::null, QString::null, this, 0, true); + KFileDialog fdlg(TQString::null, TQString::null, this, 0, true); fdlg.setOperationMode( KFileDialog::Opening ); fdlg.okButton()->setText(i18n("&Insert")); fdlg.setCaption(i18n("Insert File")); @@ -2882,7 +2882,7 @@ void KMComposeWin::slotInsertFile() for (int i = 0; i < combo->count(); i++) if (KGlobal::charsets()->codecForName(KGlobal::charsets()-> encodingForName(combo->text(i))) - == QTextCodec::codecForLocale()) combo->setCurrentItem(i); + == TQTextCodec::codecForLocale()) combo->setCurrentItem(i); if (!fdlg.exec()) return; KURL u = fdlg.selectedURL(); @@ -2891,9 +2891,9 @@ void KMComposeWin::slotInsertFile() { KConfig *config = KMKernel::config(); KConfigGroupSaver saver( config, "Composer" ); - QString encoding = KGlobal::charsets()->encodingForName(combo->currentText()).latin1(); - QStringList urls = config->readListEntry( "recent-urls" ); - QStringList encodings = config->readListEntry( "recent-encodings" ); + TQString encoding = KGlobal::charsets()->encodingForName(combo->currentText()).latin1(); + TQStringList urls = config->readListEntry( "recent-urls" ); + TQStringList encodings = config->readListEntry( "recent-encodings" ); // Prevent config file from growing without bound // Would be nicer to get this constant from KRecentFilesAction uint mMaxRecentFiles = 30; @@ -2924,25 +2924,25 @@ void KMComposeWin::slotInsertRecentFile(const KURL& u) KIO::Job *job = KIO::get(u); atmLoadData ld; ld.url = u; - ld.data = QByteArray(); + ld.data = TQByteArray(); ld.insert = true; // Get the encoding previously used when inserting this file { KConfig *config = KMKernel::config(); KConfigGroupSaver saver( config, "Composer" ); - QStringList urls = config->readListEntry( "recent-urls" ); - QStringList encodings = config->readListEntry( "recent-encodings" ); + TQStringList urls = config->readListEntry( "recent-urls" ); + TQStringList encodings = config->readListEntry( "recent-encodings" ); int index = urls.findIndex( u.prettyURL() ); if (index != -1) { - QString encoding = encodings[ index ]; + TQString encoding = encodings[ index ]; ld.encoding = encoding.latin1(); } } mMapAtmLoadData.insert(job, ld); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotAttachFileResult(KIO::Job *))); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotAttachFileData(KIO::Job *, const QByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotAttachFileResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotAttachFileData(KIO::Job *, const TQByteArray &))); } @@ -3043,12 +3043,12 @@ void KMComposeWin::slotSelectCryptoModule( bool init ) } } -static void showExportError( QWidget * w, const GpgME::Error & err ) { +static void showExportError( TQWidget * w, const GpgME::Error & err ) { assert( err ); - const QString msg = i18n("<qt><p>An error occurred while trying to export " + const TQString msg = i18n("<qt><p>An error occurred while trying to export " "the key from the backend:</p>" "<p><b>%1</b></p></qt>") - .arg( QString::fromLocal8Bit( err.asString() ) ); + .arg( TQString::fromLocal8Bit( err.asString() ) ); KMessageBox::error( w, msg, i18n("Key Export Failed") ); } @@ -3069,8 +3069,8 @@ void KMComposeWin::startPublicKeyExport() { Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->openpgp()->publicKeyExportJob( true ); assert( job ); - connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)), - this, SLOT(slotPublicKeyExportResult(const GpgME::Error&,const QByteArray&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)), + this, TQT_SLOT(slotPublicKeyExportResult(const GpgME::Error&,const TQByteArray&)) ); const GpgME::Error err = job->start( mFingerprint ); if ( err ) @@ -3079,7 +3079,7 @@ void KMComposeWin::startPublicKeyExport() { (void)new Kleo::ProgressDialog( job, i18n("Exporting key..."), this ); } -void KMComposeWin::slotPublicKeyExportResult( const GpgME::Error & err, const QByteArray & keydata ) { +void KMComposeWin::slotPublicKeyExportResult( const GpgME::Error & err, const TQByteArray & keydata ) { if ( err ) { showExportError( this, err ); return; @@ -3090,9 +3090,9 @@ void KMComposeWin::slotPublicKeyExportResult( const GpgME::Error & err, const QB msgPart->setName( i18n("OpenPGP key 0x%1").arg( mFingerprint ) ); msgPart->setTypeStr("application"); msgPart->setSubtypeStr("pgp-keys"); - QValueList<int> dummy; + TQValueList<int> dummy; msgPart->setBodyAndGuessCte(keydata, dummy, false); - msgPart->setContentDisposition( "attachment;\n\tfilename=0x" + QCString( mFingerprint.latin1() ) + ".asc" ); + msgPart->setContentDisposition( "attachment;\n\tfilename=0x" + TQCString( mFingerprint.latin1() ) + ".asc" ); // add the new attachment to the list addAttach(msgPart); @@ -3110,7 +3110,7 @@ void KMComposeWin::slotInsertPublicKey() false /* no multi selection */, false /* no remember choice box */, this, "attach public key selection dialog" ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; mFingerprint = dlg.fingerprint(); @@ -3119,32 +3119,32 @@ void KMComposeWin::slotInsertPublicKey() //----------------------------------------------------------------------------- -void KMComposeWin::slotAttachPopupMenu(QListViewItem *, const QPoint &, int) +void KMComposeWin::slotAttachPopupMenu(TQListViewItem *, const TQPoint &, int) { if (!mAttachMenu) { - mAttachMenu = new QPopupMenu(this); + mAttachMenu = new TQPopupMenu(this); mOpenId = mAttachMenu->insertItem(i18n("to open", "Open"), this, - SLOT(slotAttachOpen())); + TQT_SLOT(slotAttachOpen())); mOpenWithId = mAttachMenu->insertItem(i18n("Open With..."), this, - SLOT(slotAttachOpenWith())); + TQT_SLOT(slotAttachOpenWith())); mViewId = mAttachMenu->insertItem(i18n("to view", "View"), this, - SLOT(slotAttachView())); - mEditId = mAttachMenu->insertItem( i18n("Edit"), this, SLOT(slotAttachEdit()) ); + TQT_SLOT(slotAttachView())); + mEditId = mAttachMenu->insertItem( i18n("Edit"), this, TQT_SLOT(slotAttachEdit()) ); mEditWithId = mAttachMenu->insertItem( i18n("Edit With..."), this, - SLOT(slotAttachEditWith()) ); - mRemoveId = mAttachMenu->insertItem(i18n("Remove"), this, SLOT(slotAttachRemove())); + TQT_SLOT(slotAttachEditWith()) ); + mRemoveId = mAttachMenu->insertItem(i18n("Remove"), this, TQT_SLOT(slotAttachRemove())); mSaveAsId = mAttachMenu->insertItem( SmallIconSet("filesaveas"), i18n("Save As..."), this, - SLOT( slotAttachSave() ) ); + TQT_SLOT( slotAttachSave() ) ); mPropertiesId = mAttachMenu->insertItem( i18n("Properties"), this, - SLOT( slotAttachProperties() ) ); + TQT_SLOT( slotAttachProperties() ) ); mAttachMenu->insertSeparator(); - mAttachMenu->insertItem(i18n("Add Attachment..."), this, SLOT(slotAttachFile())); + mAttachMenu->insertItem(i18n("Add Attachment..."), this, TQT_SLOT(slotAttachFile())); } int selectedCount = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it ) { if ( (*it)->isSelected() ) { ++selectedCount; } @@ -3159,14 +3159,14 @@ void KMComposeWin::slotAttachPopupMenu(QListViewItem *, const QPoint &, int) mAttachMenu->setItemEnabled( mSaveAsId, selectedCount == 1 ); mAttachMenu->setItemEnabled( mPropertiesId, selectedCount == 1 ); - mAttachMenu->popup(QCursor::pos()); + mAttachMenu->popup(TQCursor::pos()); } //----------------------------------------------------------------------------- int KMComposeWin::currentAttachmentNum() { int i = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) if ( *it == mAtmListView->currentItem() ) return i; return -1; @@ -3206,7 +3206,7 @@ void KMComposeWin::slotAttachProperties() } } } - if (msgPart->typeStr().lower() != "text") msgPart->setCharset(QCString()); + if (msgPart->typeStr().lower() != "text") msgPart->setCharset(TQCString()); } //----------------------------------------------------------------------------- @@ -3224,10 +3224,10 @@ void KMComposeWin::compressAttach( int idx ) KMMessagePart* msgPart; msgPart = mAtmList.at( i ); - QByteArray array; - QBuffer dev( array ); + TQByteArray array; + TQBuffer dev( array ); KZip zip( &dev ); - QByteArray decoded = msgPart->bodyDecodedBinary(); + TQByteArray decoded = msgPart->bodyDecodedBinary(); if ( ! zip.open( IO_WriteOnly ) ) { KMessageBox::sorry(0, i18n("KMail could not compress the file.") ); static_cast<KMAtmListViewItem*>( mAtmItemList.at( i ) )->setCompress( false ); @@ -3244,7 +3244,7 @@ void KMComposeWin::compressAttach( int idx ) zip.close(); if ( array.size() >= decoded.size() ) { if ( KMessageBox::questionYesNo( this, i18n("The compressed file is larger " - "than the original. Do you want to keep the original one?" ), QString::null, i18n("Keep"), i18n("Compress") ) + "than the original. Do you want to keep the original one?" ), TQString::null, i18n("Keep"), i18n("Compress") ) == KMessageBox::Yes ) { static_cast<KMAtmListViewItem*>( mAtmItemList.at( i ) )->setCompress( false ); return; @@ -3255,24 +3255,24 @@ void KMComposeWin::compressAttach( int idx ) msgPart->setCteStr( "base64" ); msgPart->setBodyEncodedBinary( array ); - QString name = msgPart->name() + ".zip"; + TQString name = msgPart->name() + ".zip"; msgPart->setName( name ); - QCString cDisp = "attachment;"; - QCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(), + TQCString cDisp = "attachment;"; + TQCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(), KMMessage::preferredCharsets(), name ); kdDebug(5006) << "encoding: " << encoding << endl; if ( encoding.isEmpty() ) encoding = "utf-8"; kdDebug(5006) << "encoding after: " << encoding << endl; - QCString encName; + TQCString encName; if ( GlobalSettings::self()->outlookCompatibleAttachments() ) encName = KMMsgBase::encodeRFC2047String( name, encoding ); else encName = KMMsgBase::encodeRFC2231String( name, encoding ); cDisp += "\n\tfilename"; - if ( name != QString( encName ) ) + if ( name != TQString( encName ) ) cDisp += "*=" + encName; else cDisp += "=\"" + encName + '"'; @@ -3304,9 +3304,9 @@ void KMComposeWin::uncompressAttach( int idx ) KMMessagePart* msgPart; msgPart = mAtmList.at( i ); - QBuffer dev( msgPart->bodyDecodedBinary() ); + TQBuffer dev( msgPart->bodyDecodedBinary() ); KZip zip( &dev ); - QByteArray decoded; + TQByteArray decoded; decoded = msgPart->bodyDecodedBinary(); if ( ! zip.open( IO_ReadOnly ) ) { @@ -3328,30 +3328,30 @@ void KMComposeWin::uncompressAttach( int idx ) static_cast<KMAtmListViewItem*>( mAtmItemList.at(i) )->uncompressedCodec() ); msgPart->setBodyEncodedBinary( entry->data() ); - QString name = entry->name(); + TQString name = entry->name(); msgPart->setName( name ); zip.close(); - QCString cDisp = "attachment;"; - QCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(), + TQCString cDisp = "attachment;"; + TQCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(), KMMessage::preferredCharsets(), name ); if ( encoding.isEmpty() ) encoding = "utf-8"; - QCString encName; + TQCString encName; if ( GlobalSettings::self()->outlookCompatibleAttachments() ) encName = KMMsgBase::encodeRFC2047String( name, encoding ); else encName = KMMsgBase::encodeRFC2231String( name, encoding ); cDisp += "\n\tfilename"; - if ( name != QString( encName ) ) + if ( name != TQString( encName ) ) cDisp += "*=" + encName; else cDisp += "=\"" + encName + '"'; msgPart->setContentDisposition( cDisp ); - QCString type, subtype; + TQCString type, subtype; static_cast<KMAtmListViewItem*>( mAtmItemList.at( i ) )->uncompressedMimeType( type, subtype ); @@ -3367,7 +3367,7 @@ void KMComposeWin::uncompressAttach( int idx ) void KMComposeWin::slotAttachView() { int i = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) { if ( (*it)->isSelected() ) { viewAttach( i ); } @@ -3377,7 +3377,7 @@ void KMComposeWin::slotAttachView() void KMComposeWin::slotAttachOpen() { int i = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) { if ( (*it)->isSelected() ) { openAttach( i, false ); } @@ -3388,7 +3388,7 @@ void KMComposeWin::slotAttachOpen() void KMComposeWin::slotAttachOpenWith() { int i = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) { if ( (*it)->isSelected() ) { openAttach( i, true ); } @@ -3398,7 +3398,7 @@ void KMComposeWin::slotAttachOpenWith() void KMComposeWin::slotAttachEdit() { int i = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) { if ( (*it)->isSelected() ) { editAttach( i, false ); } @@ -3408,7 +3408,7 @@ void KMComposeWin::slotAttachEdit() void KMComposeWin::slotAttachEditWith() { int i = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) { if ( (*it)->isSelected() ) { editAttach( i, true ); } @@ -3425,7 +3425,7 @@ bool KMComposeWin::inlineSigningEncryptionSelected() { //----------------------------------------------------------------------------- void KMComposeWin::viewAttach( int index ) { - QString pname; + TQString pname; KMMessagePart* msgPart; msgPart = mAtmList.at(index); pname = msgPart->name().stripWhiteSpace(); @@ -3446,7 +3446,7 @@ void KMComposeWin::viewAttach( int index ) void KMComposeWin::openAttach( int index, bool with ) { KMMessagePart* msgPart = mAtmList.at(index); - const QString contentTypeStr = + const TQString contentTypeStr = ( msgPart->typeStr() + '/' + msgPart->subtypeStr() ).lower(); KMimeType::Ptr mimetype; @@ -3462,8 +3462,8 @@ void KMComposeWin::openAttach( int index, bool with ) KPIM::kByteArrayToFile( msgPart->bodyDecodedBinary(), atmTempFile->name(), false, false, false ); - if ( ::chmod( QFile::encodeName( atmTempFile->name() ), S_IRUSR ) != 0) { - QFile::remove(url.path()); + if ( ::chmod( TQFile::encodeName( atmTempFile->name() ), S_IRUSR ) != 0) { + TQFile::remove(url.path()); return; } @@ -3472,12 +3472,12 @@ void KMComposeWin::openAttach( int index, bool with ) if ( with || !offer || mimetype->name() == "application/octet-stream" ) { if ( ( !KRun::displayOpenWithDialog( url, autoDelete ) ) && autoDelete ) { - QFile::remove(url.path()); + TQFile::remove(url.path()); } } else { if ( ( !KRun::run( *offer, url, autoDelete ) ) && autoDelete ) { - QFile::remove( url.path() ); + TQFile::remove( url.path() ); } } } @@ -3485,7 +3485,7 @@ void KMComposeWin::openAttach( int index, bool with ) void KMComposeWin::editAttach(int index, bool openWith) { KMMessagePart* msgPart = mAtmList.at(index); - const QString contentTypeStr = + const TQString contentTypeStr = ( msgPart->typeStr() + '/' + msgPart->subtypeStr() ).lower(); KTempFile* atmTempFile = new KTempFile(); @@ -3496,7 +3496,7 @@ void KMComposeWin::editAttach(int index, bool openWith) KMail::EditorWatcher *watcher = new KMail::EditorWatcher( KURL( atmTempFile->name() ), contentTypeStr, openWith, this ); - connect( watcher, SIGNAL(editDone(KMail::EditorWatcher*)), SLOT(slotEditDone(KMail::EditorWatcher*)) ); + connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(slotEditDone(KMail::EditorWatcher*)) ); if ( watcher->start() ) { mEditorMap.insert( watcher, msgPart ); mEditorTempFiles.insert( watcher, atmTempFile ); @@ -3507,7 +3507,7 @@ void KMComposeWin::editAttach(int index, bool openWith) void KMComposeWin::slotAttachSave() { KMMessagePart* msgPart; - QString fileName, pname; + TQString fileName, pname; int idx = currentAttachmentNum(); if (idx < 0) return; @@ -3516,7 +3516,7 @@ void KMComposeWin::slotAttachSave() pname = msgPart->name(); if (pname.isEmpty()) pname="unnamed"; - KURL url = KFileDialog::getSaveURL(QString::null, QString::null, 0, i18n("Save Attachment As")); + KURL url = KFileDialog::getSaveURL(TQString::null, TQString::null, 0, i18n("Save Attachment As")); if( url.isEmpty() ) return; @@ -3530,7 +3530,7 @@ void KMComposeWin::slotAttachRemove() { bool attachmentRemoved = false; int i = 0; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ) { + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ) { if ( (*it)->isSelected() ) { removeAttach( i ); attachmentRemoved = true; @@ -3574,15 +3574,15 @@ void KMComposeWin::slotUpdateFont() mEditor->setFont( mFixedFontAction->isChecked() ? mFixedFont : mBodyFont ); } -QString KMComposeWin::quotePrefixName() const +TQString KMComposeWin::quotePrefixName() const { if ( !msg() ) - return QString::null; + return TQString::null; int languageNr = GlobalSettings::self()->replyCurrentLanguage(); - ReplyPhrases replyPhrases( QString::number(languageNr) ); + ReplyPhrases replyPhrases( TQString::number(languageNr) ); replyPhrases.readConfig(); - QString quotePrefix = msg()->formatString( + TQString quotePrefix = msg()->formatString( replyPhrases.indentPrefix() ); quotePrefix = msg()->formatString(quotePrefix); @@ -3593,7 +3593,7 @@ void KMComposeWin::slotPasteClipboardAsQuotation() { if( mEditor->hasFocus() && msg() ) { - QString s = QApplication::clipboard()->text(); + TQString s = TQApplication::clipboard()->text(); if (!s.isEmpty()) mEditor->insert(addQuotesToText(s)); } @@ -3601,25 +3601,25 @@ void KMComposeWin::slotPasteClipboardAsQuotation() void KMComposeWin::slotPasteClipboardAsAttachment() { - KURL url( QApplication::clipboard()->text( QClipboard::Clipboard ) ); + KURL url( TQApplication::clipboard()->text( QClipboard::Clipboard ) ); if ( url.isValid() ) { - addAttach(QApplication::clipboard()->text( QClipboard::Clipboard ) ); + addAttach(TQApplication::clipboard()->text( QClipboard::Clipboard ) ); return; } - QMimeSource *mimeSource = QApplication::clipboard()->data(); - if ( QImageDrag::canDecode(mimeSource) ) { + TQMimeSource *mimeSource = TQApplication::clipboard()->data(); + if ( TQImageDrag::canDecode(mimeSource) ) { slotAttachPNGImageData(mimeSource->encodedData("image/png")); } else { bool ok; - QString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), QString::null, &ok, this ); + TQString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), TQString::null, &ok, this ); if ( !ok ) return; KMMessagePart *msgPart = new KMMessagePart; msgPart->setName(attName); - QValueList<int> dummy; - msgPart->setBodyAndGuessCte(QCString(QApplication::clipboard()->text().latin1()), dummy, + TQValueList<int> dummy; + msgPart->setBodyAndGuessCte(TQCString(TQApplication::clipboard()->text().latin1()), dummy, kmkernel->msgSender()->sendQuotedPrintable()); addAttach(msgPart); } @@ -3634,13 +3634,13 @@ void KMComposeWin::slotAddQuotes() // else add quotes only on the lines that are marked. if ( mEditor->hasMarkedText() ) { - QString s = mEditor->markedText(); + TQString s = mEditor->markedText(); if(!s.isEmpty()) mEditor->insert(addQuotesToText(s)); } else { int l = mEditor->currentLine(); int c = mEditor->currentColumn(); - QString s = mEditor->textLine(l); + TQString s = mEditor->textLine(l); s.prepend(quotePrefixName()); mEditor->insertLine(s,l); mEditor->removeLine(l+1); @@ -3649,23 +3649,23 @@ void KMComposeWin::slotAddQuotes() } } -QString KMComposeWin::addQuotesToText(const QString &inputText) +TQString KMComposeWin::addQuotesToText(const TQString &inputText) { - QString answer = QString( inputText ); - QString indentStr = quotePrefixName(); + TQString answer = TQString( inputText ); + TQString indentStr = quotePrefixName(); answer.replace( '\n', '\n' + indentStr); answer.prepend( indentStr ); answer += '\n'; return KMMessage::smartQuote( answer, GlobalSettings::self()->lineWrapWidth() ); } -QString KMComposeWin::removeQuotesFromText(const QString &inputText) +TQString KMComposeWin::removeQuotesFromText(const TQString &inputText) { - QString s = inputText; + TQString s = inputText; // remove first leading quote - QString quotePrefix = '^' + quotePrefixName(); - QRegExp rx(quotePrefix); + TQString quotePrefix = '^' + quotePrefixName(); + TQRegExp rx(quotePrefix); s.remove(rx); // now remove all remaining leading quotes @@ -3685,12 +3685,12 @@ void KMComposeWin::slotRemoveQuotes() // else remove quotes only on the lines that are marked. if ( mEditor->hasMarkedText() ) { - QString s = mEditor->markedText(); + TQString s = mEditor->markedText(); mEditor->insert(removeQuotesFromText(s)); } else { int l = mEditor->currentLine(); int c = mEditor->currentColumn(); - QString s = mEditor->textLine(l); + TQString s = mEditor->textLine(l); mEditor->insertLine(removeQuotesFromText(s),l); mEditor->removeLine(l+1); mEditor->setCursorPosition(l,c-2); @@ -3701,50 +3701,50 @@ void KMComposeWin::slotRemoveQuotes() //----------------------------------------------------------------------------- void KMComposeWin::slotUndo() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if ( ::qt_cast<KEdit*>(fw) ) - static_cast<QTextEdit*>(fw)->undo(); - else if (::qt_cast<QLineEdit*>(fw)) - static_cast<QLineEdit*>(fw)->undo(); + static_cast<TQTextEdit*>(fw)->undo(); + else if (::qt_cast<TQLineEdit*>(fw)) + static_cast<TQLineEdit*>(fw)->undo(); } void KMComposeWin::slotRedo() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if (::qt_cast<KEdit*>(fw)) static_cast<KEdit*>(fw)->redo(); - else if (::qt_cast<QLineEdit*>(fw)) - static_cast<QLineEdit*>(fw)->redo(); + else if (::qt_cast<TQLineEdit*>(fw)) + static_cast<TQLineEdit*>(fw)->redo(); } //----------------------------------------------------------------------------- void KMComposeWin::slotCut() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; if (::qt_cast<KEdit*>(fw)) static_cast<KEdit*>(fw)->cut(); - else if (::qt_cast<QLineEdit*>(fw)) - static_cast<QLineEdit*>(fw)->cut(); + else if (::qt_cast<TQLineEdit*>(fw)) + static_cast<TQLineEdit*>(fw)->cut(); } //----------------------------------------------------------------------------- void KMComposeWin::slotCopy() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; #ifdef KeyPress #undef KeyPress #endif - QKeyEvent k(QEvent::KeyPress, Key_C, 0, ControlButton); + TQKeyEvent k(TQEvent::KeyPress, Key_C, 0, ControlButton); kapp->notify(fw, &k); } @@ -3757,20 +3757,20 @@ void KMComposeWin::slotPasteClipboard() void KMComposeWin::paste( QClipboard::Mode mode ) { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; - QMimeSource *mimeSource = QApplication::clipboard()->data( mode ); + TQMimeSource *mimeSource = TQApplication::clipboard()->data( mode ); if ( mimeSource->provides("image/png") ) { slotAttachPNGImageData(mimeSource->encodedData("image/png")); } else if ( KURLDrag::canDecode( mimeSource ) ) { KURL::List urlList; if( KURLDrag::decode( mimeSource, urlList ) ) { - const QString asText = i18n("Add as Text"); - const QString asAttachment = i18n("Add as Attachment"); - const QString text = i18n("Please select whether you want to insert the content as text into the editor, " + const TQString asText = i18n("Add as Text"); + const TQString asAttachment = i18n("Add as Attachment"); + const TQString text = i18n("Please select whether you want to insert the content as text into the editor, " "or append the referenced file as an attachment."); - const QString caption = i18n("Paste as text or attachment?"); + const TQString caption = i18n("Paste as text or attachment?"); int id = KMessageBox::questionYesNoCancel( this, text, caption, KGuiItem( asText ), KGuiItem( asAttachment) ); @@ -3789,9 +3789,9 @@ void KMComposeWin::paste( QClipboard::Mode mode ) break; } } - } else if ( QTextDrag::canDecode( mimeSource ) ) { - QString s; - if ( QTextDrag::decode( mimeSource, s ) ) + } else if ( TQTextDrag::canDecode( mimeSource ) ) { + TQString s; + if ( TQTextDrag::decode( mimeSource, s ) ) mEditor->insert( s ); } } @@ -3800,11 +3800,11 @@ void KMComposeWin::paste( QClipboard::Mode mode ) //----------------------------------------------------------------------------- void KMComposeWin::slotMarkAll() { - QWidget* fw = focusWidget(); + TQWidget* fw = focusWidget(); if (!fw) return; - if (::qt_cast<QLineEdit*>(fw)) - static_cast<QLineEdit*>(fw)->selectAll(); + if (::qt_cast<TQLineEdit*>(fw)) + static_cast<TQLineEdit*>(fw)->selectAll(); else if (::qt_cast<KEdit*>(fw)) static_cast<KEdit*>(fw)->selectAll(); } @@ -3839,14 +3839,14 @@ void KMComposeWin::slotNewMailReader() //----------------------------------------------------------------------------- -void KMComposeWin::slotUpdWinTitle(const QString& text) +void KMComposeWin::slotUpdWinTitle(const TQString& text) { - QString s( text ); + TQString s( text ); // Remove characters that show badly in most window decorations: // newlines tend to become boxes. if (text.isEmpty()) setCaption("("+i18n("unnamed")+")"); - else setCaption( s.replace( QChar('\n'), ' ' ) ); + else setCaption( s.replace( TQChar('\n'), ' ' ) ); } @@ -3951,19 +3951,19 @@ void KMComposeWin::slotWordWrapToggled(bool on) { if (on) { - mEditor->setWordWrap( QTextEdit::FixedColumnWidth ); + mEditor->setWordWrap( TQTextEdit::FixedColumnWidth ); mEditor->setWrapColumnOrWidth( GlobalSettings::self()->lineWrapWidth() ); } else { - mEditor->setWordWrap( QTextEdit::WidgetWidth ); + mEditor->setWordWrap( TQTextEdit::WidgetWidth ); } } void KMComposeWin::disableWordWrap() { - mEditor->setWordWrap( QTextEdit::NoWrap ); + mEditor->setWordWrap( TQTextEdit::NoWrap ); } @@ -3971,15 +3971,15 @@ void KMComposeWin::disableWordWrap() void KMComposeWin::slotPrint() { mMessageWasModified = isModified(); - connect( this, SIGNAL( applyChangesDone( bool ) ), - this, SLOT( slotContinuePrint( bool ) ) ); + connect( this, TQT_SIGNAL( applyChangesDone( bool ) ), + this, TQT_SLOT( slotContinuePrint( bool ) ) ); applyChanges( true ); } void KMComposeWin::slotContinuePrint( bool rc ) { - disconnect( this, SIGNAL( applyChangesDone( bool ) ), - this, SLOT( slotContinuePrint( bool ) ) ); + disconnect( this, TQT_SIGNAL( applyChangesDone( bool ) ), + this, TQT_SLOT( slotContinuePrint( bool ) ) ); if( rc ) { if ( mComposedMessages.isEmpty() ) { @@ -3993,12 +3993,12 @@ void KMComposeWin::slotContinuePrint( bool rc ) } //---------------------------------------------------------------------------- -bool KMComposeWin::validateAddresses( QWidget * parent, const QString & addresses ) +bool KMComposeWin::validateAddresses( TQWidget * parent, 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( "<qt><p><b>" + brokenAddress + + TQString errorMsg( "<qt><p><b>" + brokenAddress + "</b></p><p>" + KPIM::emailParseResultToString( errorCode ) + "</p></qt>" ); KMessageBox::sorry( parent, errorMsg, i18n("Invalid Email Address") ); @@ -4100,7 +4100,7 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method, // rectify the problem by editing their outgoing preferences and // resending. // Hence this following conditional - QString hf = mMsg->headerField("X-KMail-Transport"); + TQString hf = mMsg->headerField("X-KMail-Transport"); if ((mTransport->currentText() != mTransport->text(0)) || (!hf.isEmpty() && (hf != mTransport->text(0)))) mMsg->setHeaderField("X-KMail-Transport", mTransport->currentText()); @@ -4109,19 +4109,19 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method, const bool neverEncrypt = ( mDisableBreaking && GlobalSettings::self()->neverEncryptDrafts() ) || mSigningAndEncryptionExplicitlyDisabled; - connect( this, SIGNAL( applyChangesDone( bool ) ), - SLOT( slotContinueDoSend( bool ) ) ); + connect( this, TQT_SIGNAL( applyChangesDone( bool ) ), + TQT_SLOT( slotContinueDoSend( bool ) ) ); if ( mEditor->textFormat() == Qt::RichText ) mMsg->setHeaderField( "X-KMail-Markup", "true" ); else mMsg->removeHeaderField( "X-KMail-Markup" ); if ( mEditor->textFormat() == Qt::RichText && inlineSigningEncryptionSelected() ) { - QString keepBtnText = mEncryptAction->isChecked() ? + TQString keepBtnText = mEncryptAction->isChecked() ? mSignAction->isChecked() ? i18n( "&Keep markup, do not sign/encrypt" ) : i18n( "&Keep markup, do not encrypt" ) : i18n( "&Keep markup, do not sign" ); - QString yesBtnText = mEncryptAction->isChecked() ? + TQString yesBtnText = mEncryptAction->isChecked() ? mSignAction->isChecked() ? i18n("Sign/Encrypt (delete markup)") : i18n( "Encrypt (delete markup)" ) : i18n( "Sign (delete markup)" ); @@ -4147,7 +4147,7 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method, // signing and encryption state, so let's add a header instead mMsg->setHeaderField( "X-KMail-SignatureActionEnabled", mSignAction->isChecked()? "true":"false" ); mMsg->setHeaderField( "X-KMail-EncryptActionEnabled", mEncryptAction->isChecked()? "true":"false" ); - mMsg->setHeaderField( "X-KMail-CryptoMessageFormat", QString::number( cryptoMessageFormat() ) ); + mMsg->setHeaderField( "X-KMail-CryptoMessageFormat", TQString::number( cryptoMessageFormat() ) ); } else { mMsg->removeHeaderField( "X-KMail-SignatureActionEnabled" ); mMsg->removeHeaderField( "X-KMail-EncryptActionEnabled" ); @@ -4160,7 +4160,7 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method, applyChanges( neverEncrypt ); } -bool KMComposeWin::saveDraftOrTemplate( const QString &folderName, +bool KMComposeWin::saveDraftOrTemplate( const TQString &folderName, KMMessage *msg ) { KMFolder *theFolder = 0, *imapTheFolder = 0; @@ -4222,15 +4222,15 @@ void KMComposeWin::slotContinueDoSend( bool sentOk ) { kdDebug(5006) << "KMComposeWin::slotContinueDoSend( " << sentOk << " )" << endl; - disconnect( this, SIGNAL( applyChangesDone( bool ) ), - this, SLOT( slotContinueDoSend( bool ) ) ); + disconnect( this, TQT_SIGNAL( applyChangesDone( bool ) ), + this, TQT_SLOT( slotContinueDoSend( bool ) ) ); if ( !sentOk ) { mDisableBreaking = false; return; } - for ( QValueVector<KMMessage*>::iterator it = mComposedMessages.begin() ; it != mComposedMessages.end() ; ++it ) { + for ( TQValueVector<KMMessage*>::iterator it = mComposedMessages.begin() ; it != mComposedMessages.end() ; ++it ) { // remove fields that contain no data (e.g. an empty Cc: or Bcc:) (*it)->cleanupHeader(); @@ -4247,7 +4247,7 @@ void KMComposeWin::slotContinueDoSend( bool sentOk ) (*it)->setCc( KMMessage::expandAliases( cc() )); if( !mComposer->originalBCC().isEmpty() ) (*it)->setBcc( KMMessage::expandAliases( mComposer->originalBCC() )); - QString recips = (*it)->headerField( "X-KMail-Recipients" ); + TQString recips = (*it)->headerField( "X-KMail-Recipients" ); if( !recips.isEmpty() ) { (*it)->setHeaderField( "X-KMail-Recipients", KMMessage::expandAliases( recips ), KMMessage::Address ); } @@ -4300,8 +4300,8 @@ void KMComposeWin::slotSaveTemplate() { //---------------------------------------------------------------------------- void KMComposeWin::slotSendNowVia( int item ) { - QStringList availTransports= KMail::TransportManager::transportNames(); - QString customTransport = availTransports[ item ]; + TQStringList availTransports= KMail::TransportManager::transportNames(); + TQString customTransport = availTransports[ item ]; mTransport->setCurrentText( customTransport ); slotSendNow(); @@ -4310,8 +4310,8 @@ void KMComposeWin::slotSendNowVia( int item ) //---------------------------------------------------------------------------- void KMComposeWin::slotSendLaterVia( int item ) { - QStringList availTransports= KMail::TransportManager::transportNames(); - QString customTransport = availTransports[ item ]; + TQStringList availTransports= KMail::TransportManager::transportNames(); + TQString customTransport = availTransports[ item ]; mTransport->setCurrentText( customTransport ); slotSendLater(); @@ -4415,7 +4415,7 @@ void KMComposeWin::slotCleanSpace() // Yes, extra space in a quote string is squeezed. // Signatures are respected (i.e. not cleaned). - QString s; + TQString s; if ( mEditor->hasMarkedText() ) { s = mEditor->markedText(); if( s.isEmpty() ) @@ -4425,7 +4425,7 @@ void KMComposeWin::slotCleanSpace() } // Remove the signature for now. - QString sig; + TQString sig; bool restore = false; const KPIM::Identity & ident = kmkernel->identityManager()->identityForUoid( mId ); @@ -4440,16 +4440,16 @@ void KMComposeWin::slotCleanSpace() } // Squeeze tabs and spaces - QRegExp squeeze( "[\t ]+" ); - s.replace( squeeze, QChar( ' ' ) ); + TQRegExp squeeze( "[\t ]+" ); + s.replace( squeeze, TQChar( ' ' ) ); // Remove trailing whitespace - QRegExp trailing( "\\s+$" ); - s.replace( trailing, QChar( '\n' ) ); + TQRegExp trailing( "\\s+$" ); + s.replace( trailing, TQChar( '\n' ) ); // Single space lines - QRegExp singleSpace( "[\n]{2,}" ); - s.replace( singleSpace, QChar( '\n' ) ); + TQRegExp singleSpace( "[\n]{2,}" ); + s.replace( singleSpace, TQChar( '\n' ) ); // Restore the signature if ( restore ) @@ -4497,7 +4497,7 @@ void KMComposeWin::toggleMarkup(bool markup) // save the buttonstates because setColor calls fontChanged bool _bold = textBoldAction->isChecked(); bool _italic = textItalicAction->isChecked(); - mEditor->setColor(QColor(0,0,0)); + mEditor->setColor(TQColor(0,0,0)); textBoldAction->setChecked(_bold); textItalicAction->setChecked(_italic); mEditor->setSelection ( paraFrom, indexFrom, paraTo, indexTo); @@ -4517,7 +4517,7 @@ void KMComposeWin::toggleMarkup(bool markup) if ( mUseHTMLEditor ) { // it was turned on mUseHTMLEditor = false; mEditor->setTextFormat(Qt::PlainText); - QString text = mEditor->text(); + TQString text = mEditor->text(); mEditor->setText(text); // otherwise the text still looks formatted mEditor->setModified(true); slotAutoSpellCheckingToggled(true); @@ -4546,7 +4546,7 @@ void KMComposeWin::slotAutoSpellCheckingToggled( bool on ) mAutoSpellCheckingAction->setChecked(false); // set it to false again } - QString temp; + TQString temp; if ( on ) temp = i18n( "Spellcheck: on" ); else @@ -4560,8 +4560,8 @@ void KMComposeWin::slotSpellcheck() mSubjectTextWasSpellChecked = false; mSpellCheckInProgress=true; /* - connect (mEditor, SIGNAL (spellcheck_progress (unsigned)), - this, SLOT (spell_progress (unsigned))); + connect (mEditor, TQT_SIGNAL (spellcheck_progress (unsigned)), + this, TQT_SLOT (spell_progress (unsigned))); */ mEditor->spellcheck(); @@ -4573,7 +4573,7 @@ void KMComposeWin::slotUpdateSignatureActions() //edit menu accordingly. const KPIM::Identity & ident = kmkernel->identityManager()->identityForUoidOrDefault( mIdentity->currentIdentity() ); - QString sig = ident.signatureText(); + TQString sig = ident.signatureText(); if ( sig.isEmpty() ) { mAppendSignatureAction->setEnabled( false ); @@ -4616,7 +4616,7 @@ void KMComposeWin::slotSpellcheckDone(int result) statusBar()->changeItem(i18n(" Spell check complete."),0); break; } - QTimer::singleShot( 2000, this, SLOT(slotSpellcheckDoneClearStatus()) ); + TQTimer::singleShot( 2000, this, TQT_SLOT(slotSpellcheckDoneClearStatus()) ); } void KMComposeWin::slotSpellcheckDoneClearStatus() @@ -4665,7 +4665,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) // of the identity, we assume that since the user typed it // they want to keep it if ( mEdtBcc->text() != ident.bcc() && !mEdtBcc->text().isEmpty() ) { - QString temp_string( mEdtBcc->text() + QString::fromLatin1(",") + ident.bcc() ); + TQString temp_string( mEdtBcc->text() + TQString::fromLatin1(",") + ident.bcc() ); mEdtBcc->setText( temp_string ); } else { // if the user typed the same address as the preset BCC @@ -4679,7 +4679,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) // allowing the user to keep all addresses if( mEdtBcc && mEdtBcc->edited() && !ident.bcc().isEmpty() ) { if( !mEdtBcc->text().isEmpty() ) { - QString temp_string ( mEdtBcc->text() + QString::fromLatin1(",") + ident.bcc() ); + TQString temp_string ( mEdtBcc->text() + TQString::fromLatin1(",") + ident.bcc() ); mEdtBcc->setText( temp_string ); } else { mEdtBcc->setText( ident.bcc() ); @@ -4705,7 +4705,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) mMsg->removeHeaderField("X-Face"); else { - QString xface = ident.xface(); + TQString xface = ident.xface(); if (!xface.isEmpty()) { int numNL = ( xface.length() - 1 ) / 70; @@ -4716,7 +4716,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) } if ( !mBtnTransport->isChecked() ) { - QString transp = ident.transport(); + TQString transp = ident.transport(); if ( transp.isEmpty() ) { mMsg->removeHeaderField("X-KMail-Transport"); @@ -4733,7 +4733,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) setFcc( ident.fcc() ); } - QString edtText = mEditor->text(); + TQString edtText = mEditor->text(); if ( mOldSigText.isEmpty() ) { const KPIM::Identity &id = @@ -4801,7 +4801,7 @@ void KMComposeWin::slotSpellcheckConfig() KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, this, 0, true, true ); KWin kwin; - QTabDialog qtd (this, "tabdialog", true); + TQTabDialog qtd (this, "tabdialog", true); KSpellConfig mKSpellConfig (&qtd); mKSpellConfig.layout()->setMargin( KDialog::marginHint() ); @@ -4817,7 +4817,7 @@ void KMComposeWin::slotSpellcheckConfig() } //----------------------------------------------------------------------------- -void KMComposeWin::slotStatusMessage(const QString &message) +void KMComposeWin::slotStatusMessage(const TQString &message) { statusBar()->changeItem( message, 0 ); } @@ -4827,8 +4827,8 @@ void KMComposeWin::slotEditToolbars() saveMainWindowSettings(KMKernel::config(), "Composer"); KEditToolbar dlg(guiFactory(), this); - connect( &dlg, SIGNAL(newToolbarConfig()), - SLOT(slotUpdateToolbars()) ); + connect( &dlg, TQT_SIGNAL(newToolbarConfig()), + TQT_SLOT(slotUpdateToolbars()) ); dlg.exec(); } @@ -4887,15 +4887,15 @@ void KMComposeWin::updateAutoSave() } else { if ( !mAutoSaveTimer ) { - mAutoSaveTimer = new QTimer( this, "mAutoSaveTimer" ); - connect( mAutoSaveTimer, SIGNAL( timeout() ), - this, SLOT( autoSaveMessage() ) ); + mAutoSaveTimer = new TQTimer( this, "mAutoSaveTimer" ); + connect( mAutoSaveTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( autoSaveMessage() ) ); } mAutoSaveTimer->start( autoSaveInterval() ); } } -void KMComposeWin::setAutoSaveFilename( const QString & filename ) +void KMComposeWin::setAutoSaveFilename( const TQString & filename ) { if ( !mAutoSaveFilename.isEmpty() ) KMFolderMaildir::removeFile( KMKernel::localDataPath() + "autosave", @@ -4911,7 +4911,7 @@ void KMComposeWin::cleanupAutoSave() << mAutoSaveFilename << endl; KMFolderMaildir::removeFile( KMKernel::localDataPath() + "autosave", mAutoSaveFilename ); - mAutoSaveFilename = QString(); + mAutoSaveFilename = TQString(); } } @@ -4966,30 +4966,30 @@ void KMComposeWin::slotSetAlwaysSend( bool bAlways ) mAlwaysSend = bAlways; } -void KMComposeWin::slotListAction( const QString& style ) +void KMComposeWin::slotListAction( const TQString& style ) { toggleMarkup(true); if ( style == i18n( "Standard" ) ) - mEditor->setParagType( QStyleSheetItem::DisplayBlock, QStyleSheetItem::ListDisc ); + mEditor->setParagType( TQStyleSheetItem::DisplayBlock, TQStyleSheetItem::ListDisc ); else if ( style == i18n( "Bulleted List (Disc)" ) ) - mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListDisc ); + mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListDisc ); else if ( style == i18n( "Bulleted List (Circle)" ) ) - mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListCircle ); + mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListCircle ); else if ( style == i18n( "Bulleted List (Square)" ) ) - mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListSquare ); + mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListSquare ); else if ( style == i18n( "Ordered List (Decimal)" )) - mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListDecimal ); + mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListDecimal ); else if ( style == i18n( "Ordered List (Alpha lower)" ) ) - mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListLowerAlpha ); + mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListLowerAlpha ); else if ( style == i18n( "Ordered List (Alpha upper)" ) ) - mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListUpperAlpha ); + mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListUpperAlpha ); mEditor->viewport()->setFocus(); } -void KMComposeWin::slotFontAction( const QString& font) +void KMComposeWin::slotFontAction( const TQString& font) { toggleMarkup(true); - mEditor->QTextEdit::setFamily( font ); + mEditor->TQTextEdit::setFamily( font ); mEditor->viewport()->setFocus(); } @@ -5003,37 +5003,37 @@ void KMComposeWin::slotSizeAction( int size ) void KMComposeWin::slotAlignLeft() { toggleMarkup(true); - mEditor->QTextEdit::setAlignment( AlignLeft ); + mEditor->TQTextEdit::setAlignment( AlignLeft ); } void KMComposeWin::slotAlignCenter() { toggleMarkup(true); - mEditor->QTextEdit::setAlignment( AlignHCenter ); + mEditor->TQTextEdit::setAlignment( AlignHCenter ); } void KMComposeWin::slotAlignRight() { toggleMarkup(true); - mEditor->QTextEdit::setAlignment( AlignRight ); + mEditor->TQTextEdit::setAlignment( AlignRight ); } void KMComposeWin::slotTextBold() { toggleMarkup(true); - mEditor->QTextEdit::setBold( textBoldAction->isChecked() ); + mEditor->TQTextEdit::setBold( textBoldAction->isChecked() ); } void KMComposeWin::slotTextItalic() { toggleMarkup(true); - mEditor->QTextEdit::setItalic( textItalicAction->isChecked() ); + mEditor->TQTextEdit::setItalic( textItalicAction->isChecked() ); } void KMComposeWin::slotTextUnder() { toggleMarkup(true); - mEditor->QTextEdit::setUnderline( textUnderAction->isChecked() ); + mEditor->TQTextEdit::setUnderline( textUnderAction->isChecked() ); } void KMComposeWin::slotFormatReset() @@ -5043,7 +5043,7 @@ void KMComposeWin::slotFormatReset() } void KMComposeWin::slotTextColor() { - QColor color = mEditor->color(); + TQColor color = mEditor->color(); if ( KColorDialog::getColor( color, this ) ) { toggleMarkup(true); @@ -5051,12 +5051,12 @@ void KMComposeWin::slotTextColor() } } -void KMComposeWin::fontChanged( const QFont &f ) +void KMComposeWin::fontChanged( const TQFont &f ) { - QFont fontTemp = f; + TQFont fontTemp = f; fontTemp.setBold( true ); fontTemp.setItalic( true ); - QFontInfo fontInfo( fontTemp ); + TQFontInfo fontInfo( fontTemp ); if ( fontInfo.bold() ) { textBoldAction->setChecked( f.bold() ); @@ -5113,7 +5113,7 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) { Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ); if ( !chiasmus ) { - const QString msg = Kleo::CryptoBackendFactory::instance()->knowsAboutProtocol( "Chiasmus" ) + const TQString msg = Kleo::CryptoBackendFactory::instance()->knowsAboutProtocol( "Chiasmus" ) ? i18n( "Please configure a Crypto Backend to use for " "Chiasmus encryption first.\n" "You can do this in the Crypto Backends tab of " @@ -5125,9 +5125,9 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) { return; } - STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) ); + STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) ); if ( !job.get() ) { - const QString msg = i18n( "Chiasmus backend does not offer the " + const TQString msg = i18n( "Chiasmus backend does not offer the " "\"x-obtain-keys\" function. Please report this bug." ); KMessageBox::error( this, msg, i18n( "Chiasmus Backend Error" ) ); return; @@ -5138,18 +5138,18 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) { return; } - const QVariant result = job->property( "result" ); - if ( result.type() != QVariant::StringList ) { - const QString msg = i18n( "Unexpected return value from Chiasmus backend: " + const TQVariant result = job->property( "result" ); + if ( result.type() != TQVariant::StringList ) { + const TQString msg = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-obtain-keys\" function did not return a " "string list. Please report this bug." ); KMessageBox::error( this, msg, i18n( "Chiasmus Backend Error" ) ); return; } - const QStringList keys = result.toStringList(); + const TQStringList keys = result.toStringList(); if ( keys.empty() ) { - const QString msg = i18n( "No keys have been found. Please check that a " + const TQString msg = i18n( "No keys have been found. Please check that a " "valid key path has been set in the Chiasmus " "configuration." ); KMessageBox::information( this, msg, i18n( "No Chiasmus Keys Found" ) ); @@ -5159,7 +5159,7 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) { ChiasmusKeySelector selectorDlg( this, i18n( "Chiasmus Encryption Key Selection" ), keys, GlobalSettings::chiasmusKey(), GlobalSettings::chiasmusOptions() ); - if ( selectorDlg.exec() != QDialog::Accepted ) + if ( selectorDlg.exec() != TQDialog::Accepted ) return; GlobalSettings::setChiasmusOptions( selectorDlg.options() ); @@ -5180,7 +5180,7 @@ void KMComposeWin::slotEditDone(KMail::EditorWatcher * watcher) return; tf->file()->reset(); - QByteArray data = tf->file()->readAll(); + TQByteArray data = tf->file()->readAll(); part->setBodyEncodedBinary( data ); } @@ -5200,14 +5200,14 @@ void KMComposeWin::slotAttachmentDragStarted() { kdDebug(5006) << k_funcinfo << endl; int idx = 0; - QStringList filenames; - for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++idx ) { + TQStringList filenames; + for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++idx ) { if ( (*it)->isSelected() ) { KMMessagePart* msgPart = mAtmList.at(idx); KTempDir * tempDir = new KTempDir(); // will be deleted on composer close tempDir->setAutoDelete( true ); mTempDirs.insert( tempDir ); - const QString fileName = tempDir->name() + "/" + msgPart->name(); + const TQString fileName = tempDir->name() + "/" + msgPart->name(); KPIM::kByteArrayToFile(msgPart->bodyDecodedBinary(), fileName, false, false, false); @@ -5218,14 +5218,14 @@ void KMComposeWin::slotAttachmentDragStarted() } if ( filenames.isEmpty() ) return; - QUriDrag *drag = new QUriDrag( mAtmListView ); + TQUriDrag *drag = new TQUriDrag( mAtmListView ); drag->setFileNames( filenames ); drag->dragCopy(); } void KMComposeWin::recipientEditorSizeHintChanged() { - QTimer::singleShot( 1, this, SLOT(setMaximumHeaderSize()) ); + TQTimer::singleShot( 1, this, TQT_SLOT(setMaximumHeaderSize()) ); } void KMComposeWin::setMaximumHeaderSize() diff --git a/kmail/kmcomposewin.h b/kmail/kmcomposewin.h index 873d4fccc..ba4c94f3b 100644 --- a/kmail/kmcomposewin.h +++ b/kmail/kmcomposewin.h @@ -16,17 +16,17 @@ #include <set> -#include <qlabel.h> -#include <qlistview.h> - -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qclipboard.h> -#include <qpalette.h> -#include <qfont.h> -#include <qptrlist.h> -#include <qvaluevector.h> -#include <qsplitter.h> +#include <tqlabel.h> +#include <tqlistview.h> + +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqclipboard.h> +#include <tqpalette.h> +#include <tqfont.h> +#include <tqptrlist.h> +#include <tqvaluevector.h> +#include <tqsplitter.h> #include <kio/job.h> #include <kglobalsettings.h> @@ -116,24 +116,24 @@ public: // mailserviceimpl * From MailComposerIface */ void send(int how); - void addAttachmentsAndSend(const KURL::List &urls, const QString &comment, int how); - void addAttachment(KURL url,QString comment); - void addAttachment(const QString &name, - const QCString &cte, - const QByteArray &data, - const QCString &type, - const QCString &subType, - const QCString ¶mAttr, - const QString ¶mValue, - const QCString &contDisp); + void addAttachmentsAndSend(const KURL::List &urls, const TQString &comment, int how); + void addAttachment(KURL url,TQString comment); + void addAttachment(const TQString &name, + const TQCString &cte, + const TQByteArray &data, + const TQCString &type, + const TQCString &subType, + const TQCString ¶mAttr, + const TQString ¶mValue, + const TQCString &contDisp); public: // kmcommand - void setBody (QString body); + void setBody (TQString body); private: /** * To catch palette changes */ - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); /** * update colors @@ -149,7 +149,7 @@ private: * If necessary increases the word wrap of the editor so that it will * not wrap the body string */ - void verifyWordWrapLengthIsAdequate(const QString&); + void verifyWordWrapLengthIsAdequate(const TQString&); public: // kmkernel, kmcommands, callback /** @@ -172,7 +172,7 @@ public: // kmkernel /** * Set the filename which is used for autosaving. */ - void setAutoSaveFilename( const QString & filename ); + void setAutoSaveFilename( const TQString & filename ); private: /** @@ -208,7 +208,7 @@ public: // kmkernel, kmcommand, mailserviceimpl /** * Recode to the specified charset */ - void setCharset(const QCString& aCharset, bool forceDefault = FALSE); + void setCharset(const TQCString& aCharset, bool forceDefault = FALSE); public: // kmcommand /** @@ -235,8 +235,8 @@ private: * If found, returns its localized description, otherwise the @p type * in lowercase. */ - static QString prettyMimeType( const QString& type ); - QString quotePrefixName() const; + static TQString prettyMimeType( const TQString& type ); + TQString quotePrefixName() const; private: // kmedit: KMLineEditSpell *sujectLineWidget() const { return mEdtSubject;} @@ -294,7 +294,7 @@ private slots: void slotPasteClipboardAsAttachment(); void slotAddQuotes(); void slotRemoveQuotes(); - void slotAttachPNGImageData(const QByteArray &image); + void slotAttachPNGImageData(const TQByteArray &image); void slotMarkAll(); @@ -342,7 +342,7 @@ private slots: /** * XML-GUI stuff */ - void slotStatusMessage(const QString &message); + void slotStatusMessage(const TQString &message); void slotEditToolbars(); void slotUpdateToolbars(); void slotEditKeys(); @@ -353,7 +353,7 @@ private slots: /** * Change window title to given string. */ - void slotUpdWinTitle(const QString& ); + void slotUpdWinTitle(const TQString& ); /** * Switch the icon to lock or unlock respectivly. @@ -406,7 +406,7 @@ private slots: /** * Open a popup-menu in the attachments-listbox. */ - void slotAttachPopupMenu(QListViewItem *, const QPoint &, int); + void slotAttachPopupMenu(TQListViewItem *, const TQPoint &, int); /** * Returns the number of the current attachment in the listbox, @@ -461,11 +461,11 @@ private slots: /** * KIO slots for attachment insertion */ - void slotAttachFileData(KIO::Job *, const QByteArray &); + void slotAttachFileData(KIO::Job *, const TQByteArray &); void slotAttachFileResult(KIO::Job *); - void slotListAction(const QString &); - void slotFontAction(const QString &); + void slotListAction(const TQString &); + void slotFontAction(const TQString &); void slotSizeAction(int); void slotAlignLeft(); void slotAlignCenter(); @@ -475,7 +475,7 @@ private slots: void slotTextUnder(); void slotFormatReset(); void slotTextColor(); - void fontChanged( const QFont & ); + void fontChanged( const TQFont & ); void alignmentChanged( int ); public: // kmkernel, attachmentlistview @@ -517,21 +517,21 @@ private: /** Connect signals for moving focus by arrow keys. Returns next edit. */ - QWidget *connectFocusMoving( QWidget *prev, QWidget *next ); + TQWidget *connectFocusMoving( TQWidget *prev, TQWidget *next ); /** * Show or hide header lines */ void rethinkHeaderLine( int aValue, int aMask, int& aRow, - const QString &aLabelStr, QLabel* aLbl, - QLineEdit* aEdt, QPushButton* aBtn = 0, - const QString &toolTip = QString::null, - const QString &whatsThis = QString::null ); + const TQString &aLabelStr, TQLabel* aLbl, + TQLineEdit* aEdt, TQPushButton* aBtn = 0, + const TQString &toolTip = TQString::null, + const TQString &whatsThis = TQString::null ); void rethinkHeaderLine( int value, int mask, int& row, - const QString& labelStr, QLabel* lbl, - QComboBox* cbx, QCheckBox *chk ); + const TQString& labelStr, TQLabel* lbl, + TQComboBox* cbx, TQCheckBox *chk ); /** * Initialization methods @@ -544,19 +544,19 @@ private: /** * Header fields. */ - QString subject() const; - QString to() const; - QString cc() const; - QString bcc() const; - QString from() const; - QString replyTo() const; + TQString subject() const; + TQString to() const; + TQString cc() const; + TQString bcc() const; + TQString from() const; + TQString replyTo() const; /** * Use the given folder as sent-mail folder if the given folder exists. * Else show an error message and use the default sent-mail folder as * sent-mail folder. */ - void setFcc( const QString &idString ); + void setFcc( const TQString &idString ); /** * Ask for confirmation if the message was changed before close. @@ -585,11 +585,11 @@ private: /** * Remove an attachment from the list. */ - void removeAttach(const QString &url); + void removeAttach(const TQString &url); void removeAttach(int idx); /** - * Updates an item in the QListView to represnet a given message part + * Updates an item in the TQListView to represnet a given message part */ void msgPartToItem(const KMMessagePart* msgPart, KMAtmListViewItem *lvi, bool loadDefaults = true ); @@ -641,12 +641,12 @@ private: * This function is for example used to restore the unencrypted/unsigned * message text for editting. */ - static void decryptOrStripOffCleartextSignature( QCString& ); + static void decryptOrStripOffCleartextSignature( TQCString& ); /** * Save the message into the Drafts or Templates folder. */ - bool saveDraftOrTemplate( const QString &folderName, KMMessage *msg ); + bool saveDraftOrTemplate( const TQString &folderName, KMMessage *msg ); /** * Send the message. Returns true if the message was sent successfully. @@ -656,7 +656,7 @@ private: KMComposeWin::SaveIn saveIn = KMComposeWin::None ); /** - * Returns the autosave interval in milliseconds (as needed for QTimer). + * Returns the autosave interval in milliseconds (as needed for TQTimer). */ int autoSaveInterval() const; @@ -681,7 +681,7 @@ private: * @return true if all addresses are valid. * @return false if one or several addresses are invalid. */ - static bool validateAddresses( QWidget * parent, const QString & addresses ); + static bool validateAddresses( TQWidget * parent, const TQString & addresses ); /** * Sets the transport combobox to @p transport. If @p transport is empty @@ -689,7 +689,7 @@ private: * nor a custom transport then the combobox is set to the default transport. * @param transport the transport the combobox should be set to */ - void setTransport( const QString & transport ); + void setTransport( const TQString & transport ); /** * Helper to insert the signature of the current identy at the @@ -707,26 +707,26 @@ private slots: void setMaximumHeaderSize(); private: - QWidget *mMainWidget; - QComboBox *mTransport; + TQWidget *mMainWidget; + TQComboBox *mTransport; KMail::DictionaryComboBox *mDictionaryCombo; KPIM::IdentityCombo *mIdentity; KMFolderComboBox *mFcc; KMLineEdit *mEdtFrom, *mEdtReplyTo, *mEdtTo, *mEdtCc, *mEdtBcc; KMLineEditSpell *mEdtSubject; - QLabel *mLblIdentity, *mLblTransport, *mLblFcc; - QLabel *mLblFrom, *mLblReplyTo, *mLblTo, *mLblCc, *mLblBcc, *mLblSubject; - QLabel *mDictionaryLabel; - QCheckBox *mBtnIdentity, *mBtnTransport, *mBtnFcc; - QPushButton *mBtnTo, *mBtnCc, *mBtnBcc, /* *mBtnFrom, */ *mBtnReplyTo; + TQLabel *mLblIdentity, *mLblTransport, *mLblFcc; + TQLabel *mLblFrom, *mLblReplyTo, *mLblTo, *mLblCc, *mLblBcc, *mLblSubject; + TQLabel *mDictionaryLabel; + TQCheckBox *mBtnIdentity, *mBtnTransport, *mBtnFcc; + TQPushButton *mBtnTo, *mBtnCc, *mBtnBcc, /* *mBtnFrom, */ *mBtnReplyTo; bool mSpellCheckInProgress; bool mDone; bool mAtmModified; KMEdit* mEditor; - QGridLayout* mGrid; + TQGridLayout* mGrid; KMMessage *mMsg; - QValueVector<KMMessage*> mComposedMessages; + TQValueVector<KMMessage*> mComposedMessages; KMail::AttachmentListView* mAtmListView; int mAtmColEncrypt; int mAtmColSign; @@ -734,9 +734,9 @@ private: int mAtmEncryptColWidth; int mAtmSignColWidth; int mAtmCompressColWidth; - QPtrList<QListViewItem> mAtmItemList; - QPtrList<KMMessagePart> mAtmList; - QPopupMenu *mAttachMenu; + TQPtrList<TQListViewItem> mAtmItemList; + TQPtrList<KMMessagePart> mAtmList; + TQPopupMenu *mAttachMenu; int mOpenId, mOpenWithId, mViewId, mRemoveId, mSaveAsId, mPropertiesId, mEditId, mEditWithId; bool mAutoDeleteMsg; bool mSigningAndEncryptionExplicitlyDisabled; @@ -749,11 +749,11 @@ private: int mNumHeaders; bool mUseHTMLEditor; bool mHtmlMarkup; - QFont mBodyFont, mFixedFont; - QPtrList<KTempFile> mAtmTempList; - QPalette mPalette; + TQFont mBodyFont, mFixedFont; + TQPtrList<KTempFile> mAtmTempList; + TQPalette mPalette; uint mId; - QString mOldSigText; + TQString mOldSigText; KAction *mAttachPK, *mAttachMPK, *mAttachRemoveAction, *mAttachSaveAction, *mAttachPropertiesAction, @@ -782,16 +782,16 @@ private: KSelectAction *mEncodingAction; KSelectAction *mCryptoModuleAction; - QCString mCharset; - QCString mDefCharset; - QStringList mCharsets; + TQCString mCharset; + TQCString mDefCharset; + TQStringList mCharsets; bool mAutoCharset; bool mAlwaysSend; - QStringList mFolderNames; - QValueList<QGuardedPtr<KMFolder> > mFolderList; - QMap<KIO::Job*, KURL> mAttachJobs; + TQStringList mFolderNames; + TQValueList<TQGuardedPtr<KMFolder> > mFolderList; + TQMap<KIO::Job*, KURL> mAttachJobs; KURL::List mAttachFilesPending; int mAttachFilesSend; @@ -804,8 +804,8 @@ private: bool mSubjectTextWasSpellChecked; - QString addQuotesToText( const QString &inputText ); - QString removeQuotesFromText( const QString &inputText ); + TQString addQuotesToText( const TQString &inputText ); + TQString removeQuotesFromText( const TQString &inputText ); // helper method for rethinkFields int calcColumnWidth(int which, long allShowing, int width); @@ -825,7 +825,7 @@ private slots: * Helper method (you could call is a bottom-half :) for * startPublicKeyExport() */ - void slotPublicKeyExportResult( const GpgME::Error & err, const QByteArray & keydata ); + void slotPublicKeyExportResult( const GpgME::Error & err, const TQByteArray & keydata ); /** * toggle automatic spellchecking @@ -842,20 +842,20 @@ private slots: */ void slotUpdateSignatureAndEncrypionStateIndicators(); private: - QColor mForeColor,mBackColor; - QFont mSaveFont; - QSplitter *mHeadersToEditorSplitter; - QWidget* mHeadersArea; - QSplitter *mSplitter; - QSplitter *mSnippetSplitter; + TQColor mForeColor,mBackColor; + TQFont mSaveFont; + TQSplitter *mHeadersToEditorSplitter; + TQWidget* mHeadersArea; + TQSplitter *mSplitter; + TQSplitter *mSnippetSplitter; struct atmLoadData { KURL url; - QByteArray data; + TQByteArray data; bool insert; - QCString encoding; + TQCString encoding; }; - QMap<KIO::Job *, atmLoadData> mMapAtmLoadData; + TQMap<KIO::Job *, atmLoadData> mMapAtmLoadData; // These are for passing on methods over the applyChanges calls KMail::MessageSender::SendMethod mSendMethod; @@ -872,7 +872,7 @@ private: bool mMessageWasModified; // Temp var for slotInsert(My)PublicKey(): - QString mFingerprint; + TQString mFingerprint; // Temp ptr for saving image from clipboard KTempDir *mTempDir; @@ -882,18 +882,18 @@ private: RecipientsEditor *mRecipientsEditor; int mLabelWidth; - QTimer *mAutoSaveTimer; - QString mAutoSaveFilename; + TQTimer *mAutoSaveTimer; + TQString mAutoSaveFilename; int mLastAutoSaveErrno; // holds the errno of the last try to autosave - QPopupMenu *mActNowMenu; - QPopupMenu *mActLaterMenu; + TQPopupMenu *mActNowMenu; + TQPopupMenu *mActLaterMenu; - QMap<KMail::EditorWatcher*, KMMessagePart*> mEditorMap; - QMap<KMail::EditorWatcher*, KTempFile*> mEditorTempFiles; + TQMap<KMail::EditorWatcher*, KMMessagePart*> mEditorMap; + TQMap<KMail::EditorWatcher*, KTempFile*> mEditorTempFiles; - QLabel *mSignatureStateIndicator; - QLabel *mEncryptionStateIndicator; + TQLabel *mSignatureStateIndicator; + TQLabel *mEncryptionStateIndicator; SnippetWidget *mSnippetWidget; std::set<KTempDir*> mTempDirs; diff --git a/kmail/kmdebug.h b/kmail/kmdebug.h index e36621cff..46262aeb4 100644 --- a/kmail/kmdebug.h +++ b/kmail/kmdebug.h @@ -32,10 +32,10 @@ static inline kdbgstream kmFatal( bool cond ) { return kdFatal( cond, kmail_debu // timing utilities #if !defined( NDEBUG ) && defined( DEBUG_TIMING ) -#include <qdatetime.h> -#define CREATE_TIMER(x) int x=0, x ## _tmp=0; QTime x ## _tmp2 -#define START_TIMER(x) x ## _tmp2 = QTime::currentTime() -#define GRAB_TIMER(x) x ## _tmp2.msecsTo(QTime::currentTime()) +#include <tqdatetime.h> +#define CREATE_TIMER(x) int x=0, x ## _tmp=0; TQTime x ## _tmp2 +#define START_TIMER(x) x ## _tmp2 = TQTime::currentTime() +#define GRAB_TIMER(x) x ## _tmp2.msecsTo(TQTime::currentTime()) #define END_TIMER(x) x += GRAB_TIMER(x); x ## _tmp++ #define SHOW_TIMER(x) kdDebug(5006) << #x " == " << x << "(" << x ## _tmp << ")\n" #else diff --git a/kmail/kmdict.cpp b/kmail/kmdict.cpp index 3386f16ad..0ad9367be 100644 --- a/kmail/kmdict.cpp +++ b/kmail/kmdict.cpp @@ -1,4 +1,4 @@ -/* simple hash table for kmail. inspired by QDict */ +/* simple hash table for kmail. inspired by TQDict */ /* Author: Ronen Tzur <rtzur@shani.net> */ #ifdef HAVE_CONFIG_H diff --git a/kmail/kmedit.cpp b/kmail/kmedit.cpp index b20570f47..bb1bb88f6 100644 --- a/kmail/kmedit.cpp +++ b/kmail/kmedit.cpp @@ -43,9 +43,9 @@ using KPIM::MailListDrag; #include <spellingfilter.h> #include <ksyntaxhighlighter.h> -#include <qregexp.h> -#include <qbuffer.h> -#include <qevent.h> +#include <tqregexp.h> +#include <tqbuffer.h> +#include <tqevent.h> #include <sys/stat.h> #include <sys/types.h> @@ -56,7 +56,7 @@ using KPIM::MailListDrag; #include <assert.h> -void KMEdit::contentsDragEnterEvent(QDragEnterEvent *e) +void KMEdit::contentsDragEnterEvent(TQDragEnterEvent *e) { if (e->provides(MailListDrag::format())) e->accept(true); @@ -66,7 +66,7 @@ void KMEdit::contentsDragEnterEvent(QDragEnterEvent *e) return KEdit::contentsDragEnterEvent(e); } -void KMEdit::contentsDragMoveEvent(QDragMoveEvent *e) +void KMEdit::contentsDragMoveEvent(TQDragMoveEvent *e) { if (e->provides(MailListDrag::format())) e->accept(); @@ -76,12 +76,12 @@ void KMEdit::contentsDragMoveEvent(QDragMoveEvent *e) return KEdit::contentsDragMoveEvent(e); } -void KMEdit::keyPressEvent( QKeyEvent* e ) +void KMEdit::keyPressEvent( TQKeyEvent* e ) { if( e->key() == Key_Return ) { int line, col; getCursorPosition( &line, &col ); - QString lineText = text( line ); + TQString lineText = text( line ); // returns line with additional trailing space (bug in Qt?), cut it off lineText.truncate( lineText.length() - 1 ); // special treatment of quoted lines only if the cursor is neither at @@ -114,7 +114,7 @@ void KMEdit::keyPressEvent( QKeyEvent* e ) // The cursor position might have changed unpredictably if there was selected // text which got replaced by a new line, so we query it again: getCursorPosition( &line, &col ); - QString newLine = text( line ); + TQString newLine = text( line ); // remove leading white space from the new line and instead // add the quote indicators of the previous line unsigned int leadingWhiteSpaceCount = 0; @@ -139,19 +139,19 @@ void KMEdit::keyPressEvent( QKeyEvent* e ) KEdit::keyPressEvent( e ); } -void KMEdit::contentsDropEvent(QDropEvent *e) +void KMEdit::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<KMMsgBase> messageList; + TQPtrList<KMMsgBase> messageList; while (!serNumStream.atEnd()) { KMMsgBase *msgBase = 0; serNumStream >> serNum; @@ -193,9 +193,9 @@ void KMEdit::contentsDropEvent(QDropEvent *e) break; } } - else if ( QTextDrag::canDecode( e ) ) { - QString s; - if ( QTextDrag::decode( e, s ) ) + else if ( TQTextDrag::canDecode( e ) ) { + TQString s; + if ( TQTextDrag::decode( e, s ) ) insert( s ); } else @@ -209,7 +209,7 @@ void KMEdit::contentsDropEvent(QDropEvent *e) } } -KMEdit::KMEdit(QWidget *parent, KMComposeWin* composer, +KMEdit::KMEdit(TQWidget *parent, KMComposeWin* composer, KSpellConfig* autoSpellConfig, const char *name) : KEdit( parent, name ), @@ -236,22 +236,22 @@ void KMEdit::initializeAutoSpellChecking() { if ( mSpellChecker ) return; // already initialized - QColor defaultColor1( 0x00, 0x80, 0x00 ); // defaults from kmreaderwin.cpp - QColor defaultColor2( 0x00, 0x70, 0x00 ); - QColor defaultColor3( 0x00, 0x60, 0x00 ); - QColor defaultForeground( kapp->palette().active().text() ); + TQColor defaultColor1( 0x00, 0x80, 0x00 ); // defaults from kmreaderwin.cpp + TQColor defaultColor2( 0x00, 0x70, 0x00 ); + TQColor defaultColor3( 0x00, 0x60, 0x00 ); + TQColor defaultForeground( kapp->palette().active().text() ); - QColor c = Qt::red; + TQColor c = Qt::red; KConfigGroup readerConfig( KMKernel::config(), "Reader" ); - QColor col1; + TQColor col1; if ( !readerConfig.readBoolEntry( "defaultColors", true ) ) col1 = readerConfig.readColorEntry( "ForegroundColor", &defaultForeground ); else col1 = defaultForeground; - QColor col2 = readerConfig.readColorEntry( "QuotedText3", &defaultColor3 ); - QColor col3 = readerConfig.readColorEntry( "QuotedText2", &defaultColor2 ); - QColor col4 = readerConfig.readColorEntry( "QuotedText1", &defaultColor1 ); - QColor misspelled = readerConfig.readColorEntry( "MisspelledColor", &c ); + TQColor col2 = readerConfig.readColorEntry( "QuotedText3", &defaultColor3 ); + TQColor col3 = readerConfig.readColorEntry( "QuotedText2", &defaultColor2 ); + TQColor col4 = readerConfig.readColorEntry( "QuotedText1", &defaultColor1 ); + TQColor misspelled = readerConfig.readColorEntry( "MisspelledColor", &c ); mSpellChecker = new KDictSpellingHighlighter( this, /*active*/ true, /*autoEnabled*/ false, /*spellColor*/ misspelled, @@ -259,17 +259,17 @@ void KMEdit::initializeAutoSpellChecking() col1, col2, col3, col4, mSpellConfig ); - connect( mSpellChecker, SIGNAL(newSuggestions(const QString&, const QStringList&, unsigned int)), - this, SLOT(addSuggestion(const QString&, const QStringList&, unsigned int)) ); + connect( mSpellChecker, TQT_SIGNAL(newSuggestions(const TQString&, const TQStringList&, unsigned int)), + this, TQT_SLOT(addSuggestion(const TQString&, const TQStringList&, unsigned int)) ); } -QPopupMenu *KMEdit::createPopupMenu( const QPoint& pos ) +TQPopupMenu *KMEdit::createPopupMenu( const TQPoint& pos ) { enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll }; - QPopupMenu *menu = KEdit::createPopupMenu( pos ); - if ( !QApplication::clipboard()->image().isNull() ) { + TQPopupMenu *menu = KEdit::createPopupMenu( pos ); + if ( !TQApplication::clipboard()->image().isNull() ) { int id = menu->idAt(0); menu->setItemEnabled( id - IdPaste, true); } @@ -283,7 +283,7 @@ void KMEdit::deleteAutoSpellChecking() mSpellChecker =0; } -void KMEdit::addSuggestion(const QString& text, const QStringList& lst, unsigned int ) +void KMEdit::addSuggestion(const TQString& text, const TQStringList& lst, unsigned int ) { mReplacements[text] = lst; } @@ -308,9 +308,9 @@ KMEdit::~KMEdit() -QString KMEdit::brokenText() +TQString KMEdit::brokenText() { - QString temp, line; + TQString temp, line; int num_lines = numLines(); for (int i = 0; i < num_lines; ++i) @@ -344,14 +344,14 @@ unsigned int KMEdit::lineBreakColumn() const } -bool KMEdit::eventFilter(QObject*o, QEvent* e) +bool KMEdit::eventFilter(TQObject*o, TQEvent* e) { if (o == this) KCursor::autoHideEventFilter(o, e); - if (e->type() == QEvent::KeyPress) + if (e->type() == TQEvent::KeyPress) { - QKeyEvent *k = (QKeyEvent*)e; + TQKeyEvent *k = (TQKeyEvent*)e; if (mUseExtEditor) { if (k->key() == Key_Up) @@ -365,7 +365,7 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e) (k->key() == Key_Meta) || (k->key() == Key_Alt) ) return true; if (mExtEditorTempFile) return true; - QString sysLine = mExtEditor; + TQString sysLine = mExtEditor; mExtEditorTempFile = new KTempFile(); mExtEditorTempFile->setAutoDelete(true); @@ -383,8 +383,8 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e) *mExtEditorProcess << sysLine.left(sysLine.find(" ")).local8Bit(); sysLine.remove(0, sysLine.find(" ") + 1); } - connect(mExtEditorProcess, SIGNAL(processExited(KProcess*)), - SLOT(slotExternalEditorDone(KProcess*))); + connect(mExtEditorProcess, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotExternalEditorDone(KProcess*))); if (!mExtEditorProcess->start()) { KMessageBox::error( topLevelWidget(), @@ -392,8 +392,8 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e) killExternalEditor(); } else { mExtEditorTempFileWatcher = new KDirWatch( this, "mExtEditorTempFileWatcher" ); - connect( mExtEditorTempFileWatcher, SIGNAL(dirty(const QString&)), - SLOT(slotExternalEditorTempFileChanged(const QString&)) ); + connect( mExtEditorTempFileWatcher, TQT_SIGNAL(dirty(const TQString&)), + TQT_SLOT(slotExternalEditorTempFileChanged(const TQString&)) ); mExtEditorTempFileWatcher->addFile( mExtEditorTempFile->name() ); } return true; @@ -417,24 +417,24 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e) } } - } else if ( e->type() == QEvent::ContextMenu ) { - QContextMenuEvent *event = (QContextMenuEvent*) e; + } else if ( e->type() == TQEvent::ContextMenu ) { + TQContextMenuEvent *event = (TQContextMenuEvent*) e; int para = 1, charPos, firstSpace, lastSpace; //Get the character at the position of the click charPos = charAt( viewportToContents(event->pos()), ¶ ); - QString paraText = text( para ); + TQString paraText = text( para ); if( !paraText.at(charPos).isSpace() ) { //Get word right clicked on - const QRegExp wordBoundary( "[\\s\\W]" ); + const TQRegExp wordBoundary( "[\\s\\W]" ); firstSpace = paraText.findRev( wordBoundary, charPos ) + 1; lastSpace = paraText.find( wordBoundary, charPos ); if( lastSpace == -1 ) lastSpace = paraText.length(); - QString word = paraText.mid( firstSpace, lastSpace - firstSpace ); + TQString word = paraText.mid( firstSpace, lastSpace - firstSpace ); //Continue if this word was misspelled if( !word.isEmpty() && mReplacements.contains( word ) ) { @@ -442,18 +442,18 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e) p.insertTitle( i18n("Suggestions") ); //Add the suggestions to the popup menu - QStringList reps = mReplacements[word]; + TQStringList reps = mReplacements[word]; if( reps.count() > 0 ) { int listPos = 0; - for ( QStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) { + for ( TQStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) { p.insertItem( *it, listPos ); listPos++; } } else { - p.insertItem( QString::fromLatin1("No Suggestions"), -2 ); + p.insertItem( TQString::fromLatin1("No Suggestions"), -2 ); } //Execute the popup inline @@ -476,9 +476,9 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e) return true; } } - } else if ( e->type() == QEvent::FocusIn || e->type() == QEvent::FocusOut ) { - QFocusEvent *fe = static_cast<QFocusEvent*>(e); - if(! (fe->reason() == QFocusEvent::ActiveWindow || fe->reason() == QFocusEvent::Popup) ) + } else if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) { + TQFocusEvent *fe = static_cast<TQFocusEvent*>(e); + if(! (fe->reason() == TQFocusEvent::ActiveWindow || fe->reason() == TQFocusEvent::Popup) ) emit focusChanged( fe->gotFocus() ); } @@ -503,7 +503,7 @@ int KMEdit::autoSpellChecking( bool on ) } -void KMEdit::slotExternalEditorTempFileChanged( const QString & fileName ) { +void KMEdit::slotExternalEditorTempFileChanged( const TQString & fileName ) { if ( !mExtEditorTempFile ) return; if ( fileName != mExtEditorTempFile->name() ) @@ -512,7 +512,7 @@ void KMEdit::slotExternalEditorTempFileChanged( const QString & fileName ) { setAutoUpdate(false); clear(); - insertLine(QString::fromLocal8Bit(KPIM::kFileToString( fileName, true, false )), -1); + insertLine(TQString::fromLocal8Bit(KPIM::kFileToString( fileName, true, false )), -1); setAutoUpdate(true); repaint(); } @@ -559,25 +559,25 @@ void KMEdit::spellcheck() // if (textFormat() == Qt::RichText ) { // kdDebug(5006) << "KMEdit::spellcheck, spellchecking for RichText" << endl; // mKSpell = new KSpell(this, i18n("Spellcheck - KMail"), this, -// SLOT(slotSpellcheck2(KSpell*)),0,true,false,KSpell::HTML); +// TQT_SLOT(slotSpellcheck2(KSpell*)),0,true,false,KSpell::HTML); // } // else { mKSpell = new KSpell(this, i18n("Spellcheck - KMail"), this, - SLOT(slotSpellcheck2(KSpell*))); + TQT_SLOT(slotSpellcheck2(KSpell*))); // } - QStringList l = KSpellingHighlighter::personalWords(); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) { + TQStringList l = KSpellingHighlighter::personalWords(); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { mKSpell->addPersonal( *it ); } - connect (mKSpell, SIGNAL( death()), - this, SLOT (slotSpellDone())); - connect (mKSpell, SIGNAL (misspelling (const QString &, const QStringList &, unsigned int)), - this, SLOT (slotMisspelling (const QString &, const QStringList &, unsigned int))); - connect (mKSpell, SIGNAL (corrected (const QString &, const QString &, unsigned int)), - this, SLOT (slotCorrected (const QString &, const QString &, unsigned int))); - connect (mKSpell, SIGNAL (done(const QString &)), - this, SLOT (slotSpellResult (const QString&))); + connect (mKSpell, TQT_SIGNAL( death()), + this, TQT_SLOT (slotSpellDone())); + connect (mKSpell, TQT_SIGNAL (misspelling (const TQString &, const TQStringList &, unsigned int)), + this, TQT_SLOT (slotMisspelling (const TQString &, const TQStringList &, unsigned int))); + connect (mKSpell, TQT_SIGNAL (corrected (const TQString &, const TQString &, unsigned int)), + this, TQT_SLOT (slotCorrected (const TQString &, const TQString &, unsigned int))); + connect (mKSpell, TQT_SIGNAL (done(const TQString &)), + this, TQT_SLOT (slotSpellResult (const TQString&))); } void KMEdit::cut() @@ -606,12 +606,12 @@ void KMEdit::paste() mComposer->paste( mPasteMode ); } -// KMEdit indirectly inherits from QTextEdit, which has virtual paste() method, +// KMEdit indirectly inherits from TQTextEdit, which has virtual paste() method, // but it controls whether it pastes clipboard or selection by an internal // flag that is not accessible in any way, so paste() being virtual is actually // useless, because reimplementations can't known where to paste from anyway. // Roll our own internal flag. -void KMEdit::contentsMouseReleaseEvent( QMouseEvent * e ) +void KMEdit::contentsMouseReleaseEvent( TQMouseEvent * e ) { if( e->button() != Qt::MidButton ) return KEdit::contentsMouseReleaseEvent( e ); @@ -620,26 +620,26 @@ void KMEdit::contentsMouseReleaseEvent( QMouseEvent * e ) mPasteMode = QClipboard::Clipboard; } -void KMEdit::slotMisspelling(const QString &text, const QStringList &lst, unsigned int pos) +void KMEdit::slotMisspelling(const TQString &text, const TQStringList &lst, unsigned int pos) { - kdDebug(5006)<<"void KMEdit::slotMisspelling(const QString &text, const QStringList &lst, unsigned int pos) : "<<text <<endl; + kdDebug(5006)<<"void KMEdit::slotMisspelling(const TQString &text, const TQStringList &lst, unsigned int pos) : "<<text <<endl; if( mSpellLineEdit ) mComposer->sujectLineWidget()->spellCheckerMisspelling( text, lst, pos); else misspelling(text, lst, pos); } -void KMEdit::slotCorrected (const QString &oldWord, const QString &newWord, unsigned int pos) +void KMEdit::slotCorrected (const TQString &oldWord, const TQString &newWord, unsigned int pos) { - kdDebug(5006)<<"slotCorrected (const QString &oldWord, const QString &newWord, unsigned int pos) : "<<oldWord<<endl; + kdDebug(5006)<<"slotCorrected (const TQString &oldWord, const TQString &newWord, unsigned int pos) : "<<oldWord<<endl; if( mSpellLineEdit ) mComposer->sujectLineWidget()->spellCheckerCorrected( oldWord, newWord, pos); else { unsigned int l = 0; unsigned int cnt = 0; bool _bold,_underline,_italic; - QColor _color; - QFont _font; + TQColor _color; + TQFont _font; posToRowCol (pos, l, cnt); setCursorPosition(l, cnt+1); // the new word will get the same markup now as the first character of the word _bold = bold(); @@ -664,11 +664,11 @@ void KMEdit::slotSpellcheck2(KSpell*) { spellcheck_start(); - QString quotePrefix; + TQString quotePrefix; if(mComposer && mComposer->msg()) { int languageNr = GlobalSettings::self()->replyCurrentLanguage(); - ReplyPhrases replyPhrases( QString::number(languageNr) ); + ReplyPhrases replyPhrases( TQString::number(languageNr) ); replyPhrases.readConfig(); quotePrefix = mComposer->msg()->formatString( @@ -676,7 +676,7 @@ void KMEdit::slotSpellcheck2(KSpell*) } kdDebug(5006) << "spelling: new SpellingFilter with prefix=\"" << quotePrefix << "\"" << endl; - QTextEdit plaintext; + TQTextEdit plaintext; plaintext.setText(text()); plaintext.setTextFormat(Qt::PlainText); mSpellingFilter = new SpellingFilter(plaintext.text(), quotePrefix, SpellingFilter::FilterUrls, @@ -688,7 +688,7 @@ void KMEdit::slotSpellcheck2(KSpell*) mKSpell->check( mComposer->sujectLineWidget()->text()); } -void KMEdit::slotSpellResult(const QString &s) +void KMEdit::slotSpellResult(const TQString &s) { if( !mSpellLineEdit) spellcheck_stop(); @@ -700,7 +700,7 @@ void KMEdit::slotSpellResult(const QString &s) { //stop spell check mSpellLineEdit = false; - QString tmpText( s ); + TQString tmpText( s ); tmpText = tmpText.remove('\n'); if( tmpText != mComposer->sujectLineWidget()->text() ) diff --git a/kmail/kmedit.h b/kmail/kmedit.h index 384b36f3d..a44642baa 100644 --- a/kmail/kmedit.h +++ b/kmail/kmedit.h @@ -7,9 +7,9 @@ #include <kdeversion.h> #include <keditcl.h> -#include <qmap.h> -#include <qstringlist.h> -#include <qclipboard.h> +#include <tqmap.h> +#include <tqstringlist.h> +#include <tqclipboard.h> class KMComposeWin; class KSpellConfig; @@ -25,7 +25,7 @@ class QPopupMenu; class KMEdit : public KEdit { Q_OBJECT public: - KMEdit(QWidget *parent=0,KMComposeWin* composer=0, + KMEdit(TQWidget *parent=0,KMComposeWin* composer=0, KSpellConfig* spellConfig = 0, const char *name=0); ~KMEdit(); @@ -38,7 +38,7 @@ public: /** * Text with lines breaks inserted after every row */ - QString brokenText(); + TQString brokenText(); /** * Toggle automatic spellchecking @@ -49,7 +49,7 @@ public: * For the external editor */ void setUseExternalEditor( bool use ) { mUseExtEditor = use; } - void setExternalEditorPath( const QString & path ) { mExtEditor = path; } + void setExternalEditorPath( const TQString & path ) { mExtEditor = path; } /** * Check that the external editor has finished and output a warning @@ -59,13 +59,13 @@ public: */ bool checkExternalEditorFinished(); - QPopupMenu* createPopupMenu(const QPoint&); + TQPopupMenu* createPopupMenu(const TQPoint&); void setSpellCheckingActive(bool spellCheckingActive); /** Drag and drop methods */ - void contentsDragEnterEvent(QDragEnterEvent *e); - void contentsDragMoveEvent(QDragMoveEvent *e); - void contentsDropEvent(QDropEvent *e); + void contentsDragEnterEvent(TQDragEnterEvent *e); + void contentsDragMoveEvent(TQDragMoveEvent *e); + void contentsDropEvent(TQDropEvent *e); void deleteAutoSpellChecking(); @@ -76,7 +76,7 @@ public: signals: void spellcheck_done(int result); - void attachPNGImageData(const QByteArray &image); + void attachPNGImageData(const TQByteArray &image); void pasteImage(); void focusUp(); void focusChanged( bool ); @@ -84,12 +84,12 @@ signals: public slots: void initializeAutoSpellChecking(); void slotSpellcheck2(KSpell*); - void slotSpellResult(const QString&); + void slotSpellResult(const TQString&); void slotSpellDone(); void slotExternalEditorDone(KProcess*); - void slotMisspelling(const QString &, const QStringList &, unsigned int); - void slotCorrected (const QString &, const QString &, unsigned int); - void addSuggestion(const QString& text, const QStringList& lst, unsigned int ); + void slotMisspelling(const TQString &, const TQStringList &, unsigned int); + void slotCorrected (const TQString &, const TQString &, unsigned int); + void addSuggestion(const TQString& text, const TQStringList& lst, unsigned int ); void cut(); void clear(); void del(); @@ -98,13 +98,13 @@ protected: /** * Event filter that does Tab-key handling. */ - bool eventFilter(QObject*, QEvent*); - void keyPressEvent( QKeyEvent* ); + bool eventFilter(TQObject*, TQEvent*); + void keyPressEvent( TQKeyEvent* ); - void contentsMouseReleaseEvent( QMouseEvent * e ); + void contentsMouseReleaseEvent( TQMouseEvent * e ); private slots: - void slotExternalEditorTempFileChanged( const QString & fileName ); + void slotExternalEditorTempFileChanged( const TQString & fileName ); private: void killExternalEditor(); @@ -114,13 +114,13 @@ private: KSpell *mKSpell; KSpellConfig *mSpellConfig; - QMap<QString,QStringList> mReplacements; + TQMap<TQString,TQStringList> mReplacements; SpellingFilter* mSpellingFilter; KTempFile *mExtEditorTempFile; KDirWatch *mExtEditorTempFileWatcher; KProcess *mExtEditorProcess; bool mUseExtEditor; - QString mExtEditor; + TQString mExtEditor; bool mWasModifiedBeforeSpellCheck; KDictSpellingHighlighter *mSpellChecker; bool mSpellLineEdit; diff --git a/kmail/kmfawidgets.cpp b/kmail/kmfawidgets.cpp index 558fbe0db..f5426f255 100644 --- a/kmail/kmfawidgets.cpp +++ b/kmail/kmfawidgets.cpp @@ -16,7 +16,7 @@ #include <kfiledialog.h> #include <kstandarddirs.h> -#include <qlayout.h> +#include <tqlayout.h> //============================================================================= // @@ -24,20 +24,20 @@ // //============================================================================= -KMFilterActionWithAddressWidget::KMFilterActionWithAddressWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +KMFilterActionWithAddressWidget::KMFilterActionWithAddressWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { - QHBoxLayout *hbl = new QHBoxLayout(this); + TQHBoxLayout *hbl = new TQHBoxLayout(this); hbl->setSpacing(4); mLineEdit = new KLineEdit(this); hbl->addWidget( mLineEdit, 1 /*stretch*/ ); - mBtn = new QPushButton( QString::null ,this ); + mBtn = new TQPushButton( TQString::null ,this ); mBtn->setPixmap( BarIcon( "contents", KIcon::SizeSmall ) ); mBtn->setFixedHeight( mLineEdit->sizeHint().height() ); hbl->addWidget( mBtn ); - connect( mBtn, SIGNAL(clicked()), - this, SLOT(slotAddrBook()) ); + connect( mBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddrBook()) ); } void KMFilterActionWithAddressWidget::slotAddrBook() @@ -47,12 +47,12 @@ void KMFilterActionWithAddressWidget::slotAddrBook() if ( lst.empty() ) return; - QStringList addrList; + TQStringList addrList; for( KABC::Addressee::List::const_iterator it = lst.begin(); it != lst.end(); ++it ) addrList << (*it).fullEmail(); - QString txt = mLineEdit->text().stripWhiteSpace(); + TQString txt = mLineEdit->text().stripWhiteSpace(); if ( !txt.isEmpty() ) { if ( !txt.endsWith( "," ) ) @@ -64,20 +64,20 @@ void KMFilterActionWithAddressWidget::slotAddrBook() mLineEdit->setText( txt + addrList.join(",") ); } -KMSoundTestWidget::KMSoundTestWidget(QWidget *parent, const char *name) - : QWidget( parent, name) +KMSoundTestWidget::KMSoundTestWidget(TQWidget *parent, const char *name) + : TQWidget( parent, name) { - QHBoxLayout *lay1 = new QHBoxLayout( this ); - m_playButton = new QPushButton( this, "m_playButton" ); + TQHBoxLayout *lay1 = new TQHBoxLayout( this ); + m_playButton = new TQPushButton( this, "m_playButton" ); m_playButton->setPixmap( SmallIcon( "1rightarrow" ) ); - connect( m_playButton, SIGNAL( clicked() ), SLOT( playSound() )); + connect( m_playButton, TQT_SIGNAL( clicked() ), TQT_SLOT( playSound() )); lay1->addWidget( m_playButton ); m_urlRequester = new KURLRequester( this ); lay1->addWidget( m_urlRequester ); - connect( m_urlRequester, SIGNAL( openFileDialog( KURLRequester * )), - SLOT( openSoundDialog( KURLRequester * ))); - connect( m_urlRequester->lineEdit(), SIGNAL( textChanged ( const QString & )), SLOT( slotUrlChanged(const QString & ))); + connect( m_urlRequester, TQT_SIGNAL( openFileDialog( KURLRequester * )), + TQT_SLOT( openSoundDialog( KURLRequester * ))); + connect( m_urlRequester->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & )), TQT_SLOT( slotUrlChanged(const TQString & ))); slotUrlChanged(m_urlRequester->lineEdit()->text() ); } @@ -85,7 +85,7 @@ KMSoundTestWidget::~KMSoundTestWidget() { } -void KMSoundTestWidget::slotUrlChanged(const QString &_text ) +void KMSoundTestWidget::slotUrlChanged(const TQString &_text ) { m_playButton->setEnabled( !_text.isEmpty()); } @@ -100,18 +100,18 @@ void KMSoundTestWidget::openSoundDialog( KURLRequester * ) KFileDialog *fileDialog = m_urlRequester->fileDialog(); fileDialog->setCaption( i18n("Select Sound File") ); - QStringList filters; + TQStringList filters; filters << "audio/x-wav" << "audio/x-mp3" << "application/x-ogg" << "audio/x-adpcm"; fileDialog->setMimeFilter( filters ); - QStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" ); + TQStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" ); if ( !soundDirs.isEmpty() ) { KURL soundURL; - QDir dir; - dir.setFilter( QDir::Files | QDir::Readable ); - QStringList::ConstIterator it = soundDirs.begin(); + TQDir dir; + dir.setFilter( TQDir::Files | TQDir::Readable ); + TQStringList::ConstIterator it = soundDirs.begin(); while ( it != soundDirs.end() ) { dir = *it; if ( dir.isReadable() && dir.count() > 2 ) { @@ -127,23 +127,23 @@ void KMSoundTestWidget::openSoundDialog( KURLRequester * ) void KMSoundTestWidget::playSound() { - QString parameter= m_urlRequester->lineEdit()->text(); + TQString parameter= m_urlRequester->lineEdit()->text(); if ( parameter.isEmpty() ) return ; - QString play = parameter; - QString file = QString::fromLatin1("file:"); + TQString play = parameter; + TQString file = TQString::fromLatin1("file:"); if (parameter.startsWith(file)) play = parameter.mid(file.length()); - KAudioPlayer::play(QFile::encodeName(play)); + KAudioPlayer::play(TQFile::encodeName(play)); } -QString KMSoundTestWidget::url() const +TQString KMSoundTestWidget::url() const { return m_urlRequester->lineEdit()->text(); } -void KMSoundTestWidget::setUrl(const QString & url) +void KMSoundTestWidget::setUrl(const TQString & url) { m_urlRequester->lineEdit()->setText(url); } diff --git a/kmail/kmfawidgets.h b/kmail/kmfawidgets.h index 9b2a05b97..05b763df2 100644 --- a/kmail/kmfawidgets.h +++ b/kmail/kmfawidgets.h @@ -6,7 +6,7 @@ #define _kmfawidgets_h_ #include <klineedit.h> -#include <qstring.h> +#include <tqstring.h> /** The param widget for KMFilterActionWithAddress.. @author Marc Mutz <mutz@kde.org> @@ -19,39 +19,39 @@ class KMFilterActionWithAddressWidget : public QWidget { Q_OBJECT public: - KMFilterActionWithAddressWidget( QWidget* parent=0, const char* name=0 ); + KMFilterActionWithAddressWidget( TQWidget* parent=0, const char* name=0 ); void clear() { mLineEdit->clear(); } - QString text() const { return mLineEdit->text(); } - void setText( const QString & aString ) { mLineEdit->setText( aString ); } + TQString text() const { return mLineEdit->text(); } + void setText( const TQString & aString ) { mLineEdit->setText( aString ); } protected slots: void slotAddrBook(); private: - QPushButton* mBtn; - QLineEdit* mLineEdit; + TQPushButton* mBtn; + TQLineEdit* mLineEdit; }; class KMSoundTestWidget : public QWidget { Q_OBJECT public: - KMSoundTestWidget( QWidget * parent, const char * name=0 ); + KMSoundTestWidget( TQWidget * parent, const char * name=0 ); ~KMSoundTestWidget(); - QString url() const; - void setUrl( const QString & url ); + TQString url() const; + void setUrl( const TQString & url ); void clear(); signals: void testPressed(); protected slots: void playSound(); void openSoundDialog( KURLRequester * ); - void slotUrlChanged( const QString & ); + void slotUrlChanged( const TQString & ); private: KURLRequester *m_urlRequester; - QPushButton *m_playButton; + TQPushButton *m_playButton; }; #endif /*_kmfawidget_h_*/ diff --git a/kmail/kmfilter.cpp b/kmail/kmfilter.cpp index d44562345..28a64633d 100644 --- a/kmail/kmfilter.cpp +++ b/kmail/kmfilter.cpp @@ -84,7 +84,7 @@ KMFilter::KMFilter( const KMFilter & aFilter ) mIcon = aFilter.icon(); mShortcut = aFilter.shortcut(); - QPtrListIterator<KMFilterAction> it( aFilter.mActions ); + TQPtrListIterator<KMFilterAction> it( aFilter.mActions ); for ( it.toFirst() ; it.current() ; ++it ) { KMFilterActionDesc *desc = (*kmkernel->filterActionDict())[ (*it)->name() ]; if ( desc ) { @@ -97,7 +97,7 @@ KMFilter::KMFilter( const KMFilter & aFilter ) } mAccounts.clear(); - QValueListConstIterator<int> it2; + TQValueListConstIterator<int> it2; for ( it2 = aFilter.mAccounts.begin() ; it2 != aFilter.mAccounts.end() ; ++it2 ) mAccounts.append( *it2 ); } @@ -108,11 +108,11 @@ KMFilter::ReturnCode KMFilter::execActions( KMMessage* msg, bool& stopIt ) const { ReturnCode status = NoResult; - QPtrListIterator<KMFilterAction> it( mActions ); + TQPtrListIterator<KMFilterAction> it( mActions ); for ( it.toFirst() ; it.current() ; ++it ) { if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "<b>Applying filter action:</b> %1" ) + TQString logText( i18n( "<b>Applying filter action:</b> %1" ) .arg( (*it)->displayString() ) ); FilterLog::instance()->add( logText, FilterLog::appliedAction ); } @@ -122,7 +122,7 @@ KMFilter::ReturnCode KMFilter::execActions( KMMessage* msg, bool& stopIt ) const switch ( result ) { case KMFilterAction::CriticalError: if ( FilterLog::instance()->isLogging() ) { - QString logText = QString( "<font color=#FF0000>%1</font>" ) + TQString logText = TQString( "<font color=#FF0000>%1</font>" ) .arg( i18n( "A critical error occurred. Processing stops here." ) ); FilterLog::instance()->add( logText, FilterLog::appliedAction ); } @@ -130,7 +130,7 @@ KMFilter::ReturnCode KMFilter::execActions( KMMessage* msg, bool& stopIt ) const return CriticalError; case KMFilterAction::ErrorButGoOn: if ( FilterLog::instance()->isLogging() ) { - QString logText = QString( "<font color=#FF0000>%1</font>" ) + TQString logText = TQString( "<font color=#FF0000>%1</font>" ) .arg( i18n( "A problem was found while applying this action." ) ); FilterLog::instance()->add( logText, FilterLog::appliedAction ); } @@ -151,7 +151,7 @@ bool KMFilter::requiresBody( KMMsgBase* msg ) { if (pattern() && pattern()->requiresBody()) return true; // no pattern means always matches? - QPtrListIterator<KMFilterAction> it( *actions() ); + TQPtrListIterator<KMFilterAction> it( *actions() ); for ( it.toFirst() ; it.current() ; ++it ) if ((*it)->requiresBody( msg )) return true; @@ -176,7 +176,7 @@ bool KMFilter::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder ) { bool rem = false; - QPtrListIterator<KMFilterAction> it( mActions ); + TQPtrListIterator<KMFilterAction> it( mActions ); for ( it.toFirst() ; it.current() ; ++it ) if ( (*it)->folderRemoved( aFolder, aNewFolder ) ) rem = true; @@ -218,7 +218,7 @@ void KMFilter::readConfig(KConfig* config) if (bPopFilter) { // get the action description... - QString action = config->readEntry( "action" ); + TQString action = config->readEntry( "action" ); if ( action == "down" ) mAction = Down; else if ( action == "later" ) @@ -229,7 +229,7 @@ void KMFilter::readConfig(KConfig* config) mAction = NoAction; } else { - QStringList sets = config->readListEntry("apply-on"); + TQStringList sets = config->readListEntry("apply-on"); if ( sets.isEmpty() && !config->hasKey("apply-on") ) { bApplyOnOutbound = false; bApplyOnInbound = true; @@ -244,7 +244,7 @@ void KMFilter::readConfig(KConfig* config) bStopProcessingHere = config->readBoolEntry("StopProcessingHere", true); bConfigureShortcut = config->readBoolEntry("ConfigureShortcut", false); - QString shortcut( config->readEntry( "Shortcut" ) ); + TQString shortcut( config->readEntry( "Shortcut" ) ); if ( !shortcut.isEmpty() ) { KShortcut sc( shortcut ); setShortcut( sc ); @@ -255,7 +255,7 @@ void KMFilter::readConfig(KConfig* config) bAutoNaming = config->readBoolEntry("AutomaticName", false); int i, numActions; - QString actName, argsName; + TQString actName, argsName; mActions.clear(); @@ -314,7 +314,7 @@ void KMFilter::writeConfig(KConfig* config) const config->writeEntry( "action", "" ); } } else { - QStringList sets; + TQStringList sets; if ( bApplyOnInbound ) sets.append( "check-mail" ); if ( bApplyOnOutbound ) @@ -332,10 +332,10 @@ void KMFilter::writeConfig(KConfig* config) const config->writeEntry( "AutomaticName", bAutoNaming ); config->writeEntry( "Applicability", mApplicability ); - QString key; + TQString key; int i; - QPtrListIterator<KMFilterAction> it( mActions ); + TQPtrListIterator<KMFilterAction> it( mActions ); for ( i=0, it.toFirst() ; it.current() ; ++it, ++i ) { config->writeEntry( key.sprintf("action-name-%d", i), (*it)->name() ); @@ -352,7 +352,7 @@ void KMFilter::purify() mPattern.purify(); if (!bPopFilter) { - QPtrListIterator<KMFilterAction> it( mActions ); + TQPtrListIterator<KMFilterAction> it( mActions ); it.toLast(); while ( it.current() ) if ( (*it)->isEmpty() ) @@ -361,7 +361,7 @@ void KMFilter::purify() --it; // Remove invalid accounts from mAccounts - just to be tidy - QValueListIterator<int> it2 = mAccounts.begin(); + TQValueListIterator<int> it2 = mAccounts.begin(); while ( it2 != mAccounts.end() ) { if ( !kmkernel->acctMgr()->find( *it2 ) ) it2 = mAccounts.remove( it2 ); @@ -380,9 +380,9 @@ bool KMFilter::isEmpty() const } #ifndef NDEBUG -const QString KMFilter::asString() const +const TQString KMFilter::asString() const { - QString result; + TQString result; result += mPattern.asString(); @@ -392,7 +392,7 @@ const QString KMFilter::asString() const result += "\n"; } else { - QPtrListIterator<KMFilterAction> it( mActions ); + TQPtrListIterator<KMFilterAction> it( mActions ); for ( it.toFirst() ; it.current() ; ++it ) { result += " action: "; result += (*it)->label(); @@ -413,7 +413,7 @@ const QString KMFilter::asString() const } else if ( bApplyOnInbound && mApplicability == ButImap ) { result += "This filter applies to all but online IMAP accounts.\n"; } else if ( bApplyOnInbound ) { - QValueListConstIterator<int> it2; + TQValueListConstIterator<int> it2; result += "This filter applies to the following accounts:"; if ( mAccounts.isEmpty() ) result += " None"; diff --git a/kmail/kmfilter.h b/kmail/kmfilter.h index 767343ecd..87820777d 100644 --- a/kmail/kmfilter.h +++ b/kmail/kmfilter.h @@ -25,7 +25,7 @@ #include <kshortcut.h> -#include <qptrlist.h> +#include <tqptrlist.h> class QString; class KConfig; @@ -76,7 +76,7 @@ public: ~KMFilter() {} /** Equivalent to @pattern()->name(). @return name of the filter */ - QString name() const { + TQString name() const { return mPattern.name(); } @@ -124,10 +124,10 @@ public: /** Provides a reference to the internal action list. If your used the @p setAction() and @p action() functions before, please convert to using myFilter->actions()->at() and friends now. */ - QPtrList<KMFilterAction>* actions() { return &mActions; } + TQPtrList<KMFilterAction>* actions() { return &mActions; } /** Provides a reference to the internal action list. Const version. */ - const QPtrList<KMFilterAction>* actions() const { return &mActions; } + const TQPtrList<KMFilterAction>* actions() const { return &mActions; } /** Provides a reference to the internal pattern. If you used the @p matches() function before, please convert to using @@ -251,12 +251,12 @@ public: or toolbar. Default is the gear icon. @see setConfigureShortcut setConfigureToolbar */ - void setIcon( QString icon ) { mIcon = icon; } + void setIcon( TQString icon ) { mIcon = icon; } /** @return The name of the icon to be used. @see setIcon */ - QString icon() const { return mIcon; } + TQString icon() const { return mIcon; } /** * Called from the filter manager when a folder is moved. @@ -271,7 +271,7 @@ public: debugging but not much else. Don't use, as it may well go away in the future... */ #ifndef NDEBUG - const QString asString() const; + const TQString asString() const; #endif /** No descriptions */ @@ -293,10 +293,10 @@ public: private: KMSearchPattern mPattern; - QPtrList<KMFilterAction> mActions; - QValueList<int> mAccounts; + TQPtrList<KMFilterAction> mActions; + TQValueList<int> mAccounts; KMPopFilterAction mAction; - QString mIcon; + TQString mIcon; KShortcut mShortcut; bool bPopFilter : 1; bool bApplyOnInbound : 1; diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp index ea77e14b4..9fce0565b 100644 --- a/kmail/kmfilteraction.cpp +++ b/kmail/kmfilteraction.cpp @@ -42,12 +42,12 @@ using KMail::RegExpLineEdit; #include <kaudioplayer.h> #include <kurlrequester.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtextcodec.h> -#include <qtimer.h> -#include <qobject.h> -#include <qstylesheet.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtextcodec.h> +#include <tqtimer.h> +#include <tqobject.h> +#include <tqstylesheet.h> #include <assert.h> @@ -57,7 +57,7 @@ using KMail::RegExpLineEdit; // //============================================================================= -KMFilterAction::KMFilterAction( const char* aName, const QString aLabel ) +KMFilterAction::KMFilterAction( const char* aName, const TQString aLabel ) { mName = aName; mLabel = aLabel; @@ -85,20 +85,20 @@ KMFilterAction* KMFilterAction::newAction() return 0; } -QWidget* KMFilterAction::createParamWidget(QWidget* parent) const +TQWidget* KMFilterAction::createParamWidget(TQWidget* parent) const { - return new QWidget(parent); + return new TQWidget(parent); } -void KMFilterAction::applyParamWidgetValue(QWidget*) +void KMFilterAction::applyParamWidgetValue(TQWidget*) { } -void KMFilterAction::setParamWidgetValue( QWidget * ) const +void KMFilterAction::setParamWidgetValue( TQWidget * ) const { } -void KMFilterAction::clearParamWidget( QWidget * ) const +void KMFilterAction::clearParamWidget( TQWidget * ) const { } @@ -113,15 +113,15 @@ int KMFilterAction::tempOpenFolder(KMFolder* aFolder) } void KMFilterAction::sendMDN( KMMessage * msg, KMime::MDN::DispositionType d, - const QValueList<KMime::MDN::DispositionModifier> & m ) { + const TQValueList<KMime::MDN::DispositionModifier> & m ) { if ( !msg ) return; /* createMDN requires Return-Path and Disposition-Notification-To * if it is not set in the message we assume that the notification should go to the * sender */ - const QString returnPath = msg->headerField( "Return-Path" ); - const QString dispNoteTo = msg->headerField( "Disposition-Notification-To" ); + const TQString returnPath = msg->headerField( "Return-Path" ); + const TQString dispNoteTo = msg->headerField( "Disposition-Notification-To" ); if ( returnPath.isEmpty() ) msg->setHeaderField( "Return-Path", msg->from() ); if ( dispNoteTo.isEmpty() ) @@ -147,12 +147,12 @@ void KMFilterAction::sendMDN( KMMessage * msg, KMime::MDN::DispositionType d, // //============================================================================= -KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const QString aLabel ) +KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const TQString aLabel ) : KMFilterAction( aName, aLabel ) { } -const QString KMFilterActionWithNone::displayString() const +const TQString KMFilterActionWithNone::displayString() const { return label(); } @@ -164,26 +164,26 @@ const QString KMFilterActionWithNone::displayString() const // //============================================================================= -KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const QString aLabel ) +KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const TQString aLabel ) : KMFilterAction( aName, aLabel ), mParameter( 0 ) { } -void KMFilterActionWithUOID::argsFromString( const QString argsStr ) +void KMFilterActionWithUOID::argsFromString( const TQString argsStr ) { mParameter = argsStr.stripWhiteSpace().toUInt(); } -const QString KMFilterActionWithUOID::argsAsString() const +const TQString KMFilterActionWithUOID::argsAsString() const { - return QString::number( mParameter ); + return TQString::number( mParameter ); } -const QString KMFilterActionWithUOID::displayString() const +const TQString KMFilterActionWithUOID::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -193,48 +193,48 @@ const QString KMFilterActionWithUOID::displayString() const // //============================================================================= -KMFilterActionWithString::KMFilterActionWithString( const char* aName, const QString aLabel ) +KMFilterActionWithString::KMFilterActionWithString( const char* aName, const TQString aLabel ) : KMFilterAction( aName, aLabel ) { } -QWidget* KMFilterActionWithString::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionWithString::createParamWidget( TQWidget* parent ) const { - QLineEdit *le = new KLineEdit(parent); + TQLineEdit *le = new KLineEdit(parent); le->setText( mParameter ); return le; } -void KMFilterActionWithString::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionWithString::applyParamWidgetValue( TQWidget* paramWidget ) { - mParameter = ((QLineEdit*)paramWidget)->text(); + mParameter = ((TQLineEdit*)paramWidget)->text(); } -void KMFilterActionWithString::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionWithString::setParamWidgetValue( TQWidget* paramWidget ) const { - ((QLineEdit*)paramWidget)->setText( mParameter ); + ((TQLineEdit*)paramWidget)->setText( mParameter ); } -void KMFilterActionWithString::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionWithString::clearParamWidget( TQWidget* paramWidget ) const { - ((QLineEdit*)paramWidget)->clear(); + ((TQLineEdit*)paramWidget)->clear(); } -void KMFilterActionWithString::argsFromString( const QString argsStr ) +void KMFilterActionWithString::argsFromString( const TQString argsStr ) { mParameter = argsStr; } -const QString KMFilterActionWithString::argsAsString() const +const TQString KMFilterActionWithString::argsAsString() const { return mParameter; } -const QString KMFilterActionWithString::displayString() const +const TQString KMFilterActionWithString::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } //============================================================================= @@ -243,36 +243,36 @@ const QString KMFilterActionWithString::displayString() const // //============================================================================= -KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const QString aLabel ) +KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const TQString aLabel ) : KMFilterActionWithString( aName, aLabel ) { } -QWidget* KMFilterActionWithStringList::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionWithStringList::createParamWidget( TQWidget* parent ) const { - QComboBox *cb = new QComboBox( false, parent ); + TQComboBox *cb = new TQComboBox( false, parent ); cb->insertStringList( mParameterList ); setParamWidgetValue( cb ); return cb; } -void KMFilterActionWithStringList::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionWithStringList::applyParamWidgetValue( TQWidget* paramWidget ) { - mParameter = ((QComboBox*)paramWidget)->currentText(); + mParameter = ((TQComboBox*)paramWidget)->currentText(); } -void KMFilterActionWithStringList::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionWithStringList::setParamWidgetValue( TQWidget* paramWidget ) const { int idx = mParameterList.findIndex( mParameter ); - ((QComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 ); + ((TQComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 ); } -void KMFilterActionWithStringList::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionWithStringList::clearParamWidget( TQWidget* paramWidget ) const { - ((QComboBox*)paramWidget)->setCurrentItem(0); + ((TQComboBox*)paramWidget)->setCurrentItem(0); } -void KMFilterActionWithStringList::argsFromString( const QString argsStr ) +void KMFilterActionWithStringList::argsFromString( const TQString argsStr ) { int idx = mParameterList.findIndex( argsStr ); if ( idx < 0 ) { @@ -289,13 +289,13 @@ void KMFilterActionWithStringList::argsFromString( const QString argsStr ) // //============================================================================= -KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const QString aLabel ) +KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const TQString aLabel ) : KMFilterAction( aName, aLabel ) { mFolder = 0; } -QWidget* KMFilterActionWithFolder::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionWithFolder::createParamWidget( TQWidget* parent ) const { FolderRequester *req = new FolderRequester( parent, kmkernel->getKMMainWidget()->folderTree() ); @@ -303,13 +303,13 @@ QWidget* KMFilterActionWithFolder::createParamWidget( QWidget* parent ) const return req; } -void KMFilterActionWithFolder::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionWithFolder::applyParamWidgetValue( TQWidget* paramWidget ) { mFolder = ((FolderRequester *)paramWidget)->folder(); mFolderName = ((FolderRequester *)paramWidget)->folderId(); } -void KMFilterActionWithFolder::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionWithFolder::setParamWidgetValue( TQWidget* paramWidget ) const { if ( mFolder ) ((FolderRequester *)paramWidget)->setFolder( mFolder ); @@ -317,12 +317,12 @@ void KMFilterActionWithFolder::setParamWidgetValue( QWidget* paramWidget ) const ((FolderRequester *)paramWidget)->setFolder( mFolderName ); } -void KMFilterActionWithFolder::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionWithFolder::clearParamWidget( TQWidget* paramWidget ) const { ((FolderRequester *)paramWidget)->setFolder( kmkernel->draftsFolder() ); } -void KMFilterActionWithFolder::argsFromString( const QString argsStr ) +void KMFilterActionWithFolder::argsFromString( const TQString argsStr ) { mFolder = kmkernel->folderMgr()->findIdString( argsStr ); if (!mFolder) @@ -335,9 +335,9 @@ void KMFilterActionWithFolder::argsFromString( const QString argsStr ) mFolderName = argsStr; } -const QString KMFilterActionWithFolder::argsAsString() const +const TQString KMFilterActionWithFolder::argsAsString() const { - QString result; + TQString result; if ( mFolder ) result = mFolder->idString(); else @@ -345,14 +345,14 @@ const QString KMFilterActionWithFolder::argsAsString() const return result; } -const QString KMFilterActionWithFolder::displayString() const +const TQString KMFilterActionWithFolder::displayString() const { - QString result; + TQString result; if ( mFolder ) result = mFolder->prettyURL(); else result = mFolderName; - return label() + " \"" + QStyleSheet::escape( result ) + "\""; + return label() + " \"" + TQStyleSheet::escape( result ) + "\""; } bool KMFilterActionWithFolder::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder ) @@ -372,29 +372,29 @@ bool KMFilterActionWithFolder::folderRemoved( KMFolder* aFolder, KMFolder* aNewF // //============================================================================= -KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const QString aLabel ) +KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const TQString aLabel ) : KMFilterActionWithString( aName, aLabel ) { } -QWidget* KMFilterActionWithAddress::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionWithAddress::createParamWidget( TQWidget* parent ) const { KMFilterActionWithAddressWidget *w = new KMFilterActionWithAddressWidget(parent); w->setText( mParameter ); return w; } -void KMFilterActionWithAddress::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionWithAddress::applyParamWidgetValue( TQWidget* paramWidget ) { mParameter = ((KMFilterActionWithAddressWidget*)paramWidget)->text(); } -void KMFilterActionWithAddress::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionWithAddress::setParamWidgetValue( TQWidget* paramWidget ) const { ((KMFilterActionWithAddressWidget*)paramWidget)->setText( mParameter ); } -void KMFilterActionWithAddress::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionWithAddress::clearParamWidget( TQWidget* paramWidget ) const { ((KMFilterActionWithAddressWidget*)paramWidget)->clear(); } @@ -405,36 +405,36 @@ void KMFilterActionWithAddress::clearParamWidget( QWidget* paramWidget ) const // //============================================================================= -KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const QString aLabel ) +KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const TQString aLabel ) : KMFilterActionWithUrl( aName, aLabel ) { } -QWidget* KMFilterActionWithCommand::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionWithCommand::createParamWidget( TQWidget* parent ) const { return KMFilterActionWithUrl::createParamWidget( parent ); } -void KMFilterActionWithCommand::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionWithCommand::applyParamWidgetValue( TQWidget* paramWidget ) { KMFilterActionWithUrl::applyParamWidgetValue( paramWidget ); } -void KMFilterActionWithCommand::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionWithCommand::setParamWidgetValue( TQWidget* paramWidget ) const { KMFilterActionWithUrl::setParamWidgetValue( paramWidget ); } -void KMFilterActionWithCommand::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionWithCommand::clearParamWidget( TQWidget* paramWidget ) const { KMFilterActionWithUrl::clearParamWidget( paramWidget ); } -QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg, QPtrList<KTempFile> & aTempFileList ) const +TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg, TQPtrList<KTempFile> & aTempFileList ) const { - QString result = mParameter; - QValueList<int> argList; - QRegExp r( "%[0-9-]+" ); + TQString result = mParameter; + TQValueList<int> argList; + TQRegExp r( "%[0-9-]+" ); // search for '%n' int start = -1; @@ -450,10 +450,10 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg // sort the list of n's qHeapSort( argList ); - // and use QString::arg to substitute filenames for the %n's. + // and use TQString::arg to substitute filenames for the %n's. int lastSeen = -2; - QString tempFileName; - for ( QValueList<int>::Iterator it = argList.begin() ; it != argList.end() ; ++it ) { + TQString tempFileName; + for ( TQValueList<int>::Iterator it = argList.begin() ; it != argList.end() ; ++it ) { // setup temp files with check for duplicate %n's if ( (*it) != lastSeen ) { KTempFile *tf = new KTempFile(); @@ -461,7 +461,7 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg tf->close(); delete tf; kdDebug(5006) << "KMFilterActionWithCommand: Could not create temp file!" << endl; - return QString::null; + return TQString::null; } tf->setAutoDelete(true); aTempFileList.append( tf ); @@ -480,7 +480,7 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg } tf->close(); } - // QString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 ) + // TQString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 ) // returns "0 and 1 and %1", so we must call .arg as // many times as there are %n's, regardless of their multiplicity. if ((*it) == -1) result.replace( "%-1", tempFileName ); @@ -489,10 +489,10 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg // And finally, replace the %{foo} with the content of the foo // header field: - QRegExp header_rx( "%\\{([a-z0-9-]+)\\}", false ); + TQRegExp header_rx( "%\\{([a-z0-9-]+)\\}", false ); int idx = 0; while ( ( idx = header_rx.search( result, idx ) ) != -1 ) { - QString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) ); + TQString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) ); result.replace( idx, header_rx.matchedLength(), replacement ); idx += replacement.length(); } @@ -508,16 +508,16 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage* if ( mParameter.isEmpty() ) return ErrorButGoOn; - // KProcess doesn't support a QProcess::launch() equivalent, so + // KProcess doesn't support a TQProcess::launch() equivalent, so // we must use a temp file :-( KTempFile * inFile = new KTempFile; inFile->setAutoDelete(true); - QPtrList<KTempFile> atmList; + TQPtrList<KTempFile> atmList; atmList.setAutoDelete(true); atmList.append( inFile ); - QString commandLine = substituteCommandLineArgsFor( aMsg , atmList ); + TQString commandLine = substituteCommandLineArgsFor( aMsg , atmList ); if ( commandLine.isEmpty() ) return ErrorButGoOn; @@ -531,7 +531,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage* commandLine = "(" + commandLine + ") <" + inFile->name(); // write message to file - QString tempFileName = inFile->name(); + TQString tempFileName = inFile->name(); KPIM::kCStringToFile( aMsg->asString(), tempFileName, //### false, false, false ); inFile->close(); @@ -552,7 +552,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage* if ( withOutput ) { // read altered message: - QByteArray msgText = shProc.collectedStdout(); + TQByteArray msgText = shProc.collectedStdout(); if ( !msgText.isEmpty() ) { /* If the pipe through alters the message, it could very well @@ -560,7 +560,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage* unfortunate, as we need to removed the original from the folder using that, and look it up in the message. When the (new) message is uploaded, the header is stripped anyhow. */ - QString uid = aMsg->headerField("X-UID"); + TQString uid = aMsg->headerField("X-UID"); aMsg->fromByteArray( msgText ); aMsg->setHeaderField("X-UID",uid); } @@ -686,10 +686,10 @@ public: virtual ReturnCode process(KMMessage* msg) const; static KMFilterAction* newAction(); - QWidget * createParamWidget( QWidget * parent ) const; - void applyParamWidgetValue( QWidget * parent ); - void setParamWidgetValue( QWidget * parent ) const; - void clearParamWidget( QWidget * param ) const; + TQWidget * createParamWidget( TQWidget * parent ) const; + void applyParamWidgetValue( TQWidget * parent ); + void setParamWidgetValue( TQWidget * parent ) const; + void clearParamWidget( TQWidget * param ) const; }; KMFilterAction* KMFilterActionIdentity::newAction() @@ -705,25 +705,25 @@ KMFilterActionIdentity::KMFilterActionIdentity() KMFilterAction::ReturnCode KMFilterActionIdentity::process(KMMessage* msg) const { - msg->setHeaderField( "X-KMail-Identity", QString::number( mParameter ) ); + msg->setHeaderField( "X-KMail-Identity", TQString::number( mParameter ) ); return GoOn; } -QWidget * KMFilterActionIdentity::createParamWidget( QWidget * parent ) const +TQWidget * KMFilterActionIdentity::createParamWidget( TQWidget * parent ) const { KPIM::IdentityCombo * ic = new KPIM::IdentityCombo( kmkernel->identityManager(), parent ); ic->setCurrentIdentity( mParameter ); return ic; } -void KMFilterActionIdentity::applyParamWidgetValue( QWidget * paramWidget ) +void KMFilterActionIdentity::applyParamWidgetValue( TQWidget * paramWidget ) { KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget ); assert( ic ); mParameter = ic->currentIdentity(); } -void KMFilterActionIdentity::clearParamWidget( QWidget * paramWidget ) const +void KMFilterActionIdentity::clearParamWidget( TQWidget * paramWidget ) const { KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget ); assert( ic ); @@ -731,7 +731,7 @@ void KMFilterActionIdentity::clearParamWidget( QWidget * paramWidget ) const //ic->setCurrentIdentity( kmkernel->identityManager()->defaultIdentity() ); } -void KMFilterActionIdentity::setParamWidgetValue( QWidget * paramWidget ) const +void KMFilterActionIdentity::setParamWidgetValue( TQWidget * paramWidget ) const { KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget ); assert( ic ); @@ -753,9 +753,9 @@ public: virtual bool isEmpty() const { return false; } - virtual void argsFromString( const QString argsStr ); - virtual const QString argsAsString() const; - virtual const QString displayString() const; + virtual void argsFromString( const TQString argsStr ); + virtual const TQString argsAsString() const; + virtual const TQString displayString() const; }; @@ -816,7 +816,7 @@ bool KMFilterActionSetStatus::requiresBody(KMMsgBase*) const return false; } -void KMFilterActionSetStatus::argsFromString( const QString argsStr ) +void KMFilterActionSetStatus::argsFromString( const TQString argsStr ) { if ( argsStr.length() == 1 ) { for ( int i = 0 ; i < StatiCount ; i++ ) @@ -828,20 +828,20 @@ void KMFilterActionSetStatus::argsFromString( const QString argsStr ) mParameter = *mParameterList.at(0); } -const QString KMFilterActionSetStatus::argsAsString() const +const TQString KMFilterActionSetStatus::argsAsString() const { int idx = mParameterList.findIndex( mParameter ); - if ( idx < 1 ) return QString::null; + if ( idx < 1 ) return TQString::null; KMMsgStatus status = stati[idx-1]; return KMMsgBase::statusToStr(status); } -const QString KMFilterActionSetStatus::displayString() const +const TQString KMFilterActionSetStatus::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } //============================================================================= @@ -859,9 +859,9 @@ public: virtual bool isEmpty() const { return false; } - virtual void argsFromString( const QString argsStr ); - virtual const QString argsAsString() const; - virtual const QString displayString() const; + virtual void argsFromString( const TQString argsStr ); + virtual const TQString argsAsString() const; + virtual const TQString displayString() const; }; @@ -908,7 +908,7 @@ KMFilterAction::ReturnCode KMFilterActionFakeDisposition::process(KMMessage* msg return GoOn; } -void KMFilterActionFakeDisposition::argsFromString( const QString argsStr ) +void KMFilterActionFakeDisposition::argsFromString( const TQString argsStr ) { if ( argsStr.length() == 1 ) { if ( argsStr[0] == 'I' ) { // ignore @@ -924,19 +924,19 @@ void KMFilterActionFakeDisposition::argsFromString( const QString argsStr ) mParameter = *mParameterList.at(0); } -const QString KMFilterActionFakeDisposition::argsAsString() const +const TQString KMFilterActionFakeDisposition::argsAsString() const { int idx = mParameterList.findIndex( mParameter ); - if ( idx < 1 ) return QString::null; + if ( idx < 1 ) return TQString::null; - return QString( QChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) ); + return TQString( TQChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) ); } -const QString KMFilterActionFakeDisposition::displayString() const +const TQString KMFilterActionFakeDisposition::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } //============================================================================= @@ -948,8 +948,8 @@ class KMFilterActionRemoveHeader: public KMFilterActionWithStringList public: KMFilterActionRemoveHeader(); virtual ReturnCode process(KMMessage* msg) const; - virtual QWidget* createParamWidget( QWidget* parent ) const; - virtual void setParamWidgetValue( QWidget* paramWidget ) const; + virtual TQWidget* createParamWidget( TQWidget* parent ) const; + virtual void setParamWidgetValue( TQWidget* paramWidget ) const; static KMFilterAction* newAction(); }; @@ -971,10 +971,10 @@ KMFilterActionRemoveHeader::KMFilterActionRemoveHeader() mParameter = *mParameterList.at(0); } -QWidget* KMFilterActionRemoveHeader::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionRemoveHeader::createParamWidget( TQWidget* parent ) const { - QComboBox *cb = new QComboBox( true/*editable*/, parent ); - cb->setInsertionPolicy( QComboBox::AtBottom ); + TQComboBox *cb = new TQComboBox( true/*editable*/, parent ); + cb->setInsertionPolicy( TQComboBox::AtBottom ); setParamWidgetValue( cb ); return cb; } @@ -988,9 +988,9 @@ KMFilterAction::ReturnCode KMFilterActionRemoveHeader::process(KMMessage* msg) c return GoOn; } -void KMFilterActionRemoveHeader::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionRemoveHeader::setParamWidgetValue( TQWidget* paramWidget ) const { - QComboBox * cb = dynamic_cast<QComboBox*>(paramWidget); + TQComboBox * cb = dynamic_cast<TQComboBox*>(paramWidget); Q_ASSERT( cb ); int idx = mParameterList.findIndex( mParameter ); @@ -1014,22 +1014,22 @@ class KMFilterActionAddHeader: public KMFilterActionWithStringList public: KMFilterActionAddHeader(); virtual ReturnCode process(KMMessage* msg) const; - virtual QWidget* createParamWidget( QWidget* parent ) const; - virtual void setParamWidgetValue( QWidget* paramWidget ) const; - virtual void applyParamWidgetValue( QWidget* paramWidget ); - virtual void clearParamWidget( QWidget* paramWidget ) const; + virtual TQWidget* createParamWidget( TQWidget* parent ) const; + virtual void setParamWidgetValue( TQWidget* paramWidget ) const; + virtual void applyParamWidgetValue( TQWidget* paramWidget ); + virtual void clearParamWidget( TQWidget* paramWidget ) const; - virtual const QString argsAsString() const; - virtual void argsFromString( const QString argsStr ); + virtual const TQString argsAsString() const; + virtual void argsFromString( const TQString argsStr ); - virtual const QString displayString() const; + virtual const TQString displayString() const; static KMFilterAction* newAction() { return (new KMFilterActionAddHeader); } private: - QString mValue; + TQString mValue; }; KMFilterActionAddHeader::KMFilterActionAddHeader() @@ -1052,27 +1052,27 @@ KMFilterAction::ReturnCode KMFilterActionAddHeader::process(KMMessage* msg) cons return GoOn; } -QWidget* KMFilterActionAddHeader::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* parent ) const { - QWidget *w = new QWidget( parent ); - QHBoxLayout *hbl = new QHBoxLayout( w ); + TQWidget *w = new TQWidget( parent ); + TQHBoxLayout *hbl = new TQHBoxLayout( w ); hbl->setSpacing( 4 ); - QComboBox *cb = new QComboBox( true, w, "combo" ); - cb->setInsertionPolicy( QComboBox::AtBottom ); + TQComboBox *cb = new TQComboBox( true, w, "combo" ); + cb->setInsertionPolicy( TQComboBox::AtBottom ); hbl->addWidget( cb, 0 /* stretch */ ); - QLabel *l = new QLabel( i18n("With value:"), w ); + TQLabel *l = new TQLabel( i18n("With value:"), w ); l->setFixedWidth( l->sizeHint().width() ); hbl->addWidget( l, 0 ); - QLineEdit *le = new KLineEdit( w, "ledit" ); + TQLineEdit *le = new KLineEdit( w, "ledit" ); hbl->addWidget( le, 1 ); setParamWidgetValue( w ); return w; } -void KMFilterActionAddHeader::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionAddHeader::setParamWidgetValue( TQWidget* paramWidget ) const { int idx = mParameterList.findIndex( mParameter ); - QComboBox *cb = (QComboBox*)paramWidget->child("combo"); + TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->clear(); cb->insertStringList( mParameterList ); @@ -1082,52 +1082,52 @@ void KMFilterActionAddHeader::setParamWidgetValue( QWidget* paramWidget ) const } else { cb->setCurrentItem( idx ); } - QLineEdit *le = (QLineEdit*)paramWidget->child("ledit"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit"); Q_ASSERT( le ); le->setText( mValue ); } -void KMFilterActionAddHeader::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionAddHeader::applyParamWidgetValue( TQWidget* paramWidget ) { - QComboBox *cb = (QComboBox*)paramWidget->child("combo"); + TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); mParameter = cb->currentText(); - QLineEdit *le = (QLineEdit*)paramWidget->child("ledit"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit"); Q_ASSERT( le ); mValue = le->text(); } -void KMFilterActionAddHeader::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionAddHeader::clearParamWidget( TQWidget* paramWidget ) const { - QComboBox *cb = (QComboBox*)paramWidget->child("combo"); + TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->setCurrentItem(0); - QLineEdit *le = (QLineEdit*)paramWidget->child("ledit"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit"); Q_ASSERT( le ); le->clear(); } -const QString KMFilterActionAddHeader::argsAsString() const +const TQString KMFilterActionAddHeader::argsAsString() const { - QString result = mParameter; + TQString result = mParameter; result += '\t'; result += mValue; return result; } -const QString KMFilterActionAddHeader::displayString() const +const TQString KMFilterActionAddHeader::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } -void KMFilterActionAddHeader::argsFromString( const QString argsStr ) +void KMFilterActionAddHeader::argsFromString( const TQString argsStr ) { - QStringList l = QStringList::split( '\t', argsStr, true /*allow empty entries*/ ); - QString s; + TQStringList l = TQStringList::split( '\t', argsStr, true /*allow empty entries*/ ); + TQString s; if ( l.count() < 2 ) { s = l[0]; mValue = ""; @@ -1154,15 +1154,15 @@ class KMFilterActionRewriteHeader: public KMFilterActionWithStringList public: KMFilterActionRewriteHeader(); virtual ReturnCode process(KMMessage* msg) const; - virtual QWidget* createParamWidget( QWidget* parent ) const; - virtual void setParamWidgetValue( QWidget* paramWidget ) const; - virtual void applyParamWidgetValue( QWidget* paramWidget ); - virtual void clearParamWidget( QWidget* paramWidget ) const; + virtual TQWidget* createParamWidget( TQWidget* parent ) const; + virtual void setParamWidgetValue( TQWidget* paramWidget ) const; + virtual void applyParamWidgetValue( TQWidget* paramWidget ); + virtual void clearParamWidget( TQWidget* paramWidget ) const; - virtual const QString argsAsString() const; - virtual void argsFromString( const QString argsStr ); + virtual const TQString argsAsString() const; + virtual void argsFromString( const TQString argsStr ); - virtual const QString displayString() const; + virtual const TQString displayString() const; static KMFilterAction* newAction() { @@ -1170,7 +1170,7 @@ public: } private: KRegExp3 mRegExp; - QString mReplacementString; + TQString mReplacementString; }; KMFilterActionRewriteHeader::KMFilterActionRewriteHeader() @@ -1193,45 +1193,45 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg) KRegExp3 rx = mRegExp; // KRegExp3::replace is not const. - QString newValue = rx.replace( msg->headerField( mParameter.latin1() ), + TQString newValue = rx.replace( msg->headerField( mParameter.latin1() ), mReplacementString ); msg->setHeaderField( mParameter.latin1(), newValue ); return GoOn; } -QWidget* KMFilterActionRewriteHeader::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* parent ) const { - QWidget *w = new QWidget( parent ); - QHBoxLayout *hbl = new QHBoxLayout( w ); + TQWidget *w = new TQWidget( parent ); + TQHBoxLayout *hbl = new TQHBoxLayout( w ); hbl->setSpacing( 4 ); - QComboBox *cb = new QComboBox( true, w, "combo" ); - cb->setInsertionPolicy( QComboBox::AtBottom ); + TQComboBox *cb = new TQComboBox( true, w, "combo" ); + cb->setInsertionPolicy( TQComboBox::AtBottom ); hbl->addWidget( cb, 0 /* stretch */ ); - QLabel *l = new QLabel( i18n("Replace:"), w ); + TQLabel *l = new TQLabel( i18n("Replace:"), w ); l->setFixedWidth( l->sizeHint().width() ); hbl->addWidget( l, 0 ); RegExpLineEdit *rele = new RegExpLineEdit( w, "search" ); hbl->addWidget( rele, 1 ); - l = new QLabel( i18n("With:"), w ); + l = new TQLabel( i18n("With:"), w ); l->setFixedWidth( l->sizeHint().width() ); hbl->addWidget( l, 0 ); - QLineEdit *le = new KLineEdit( w, "replace" ); + TQLineEdit *le = new KLineEdit( w, "replace" ); hbl->addWidget( le, 1 ); setParamWidgetValue( w ); return w; } -void KMFilterActionRewriteHeader::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) const { int idx = mParameterList.findIndex( mParameter ); - QComboBox *cb = (QComboBox*)paramWidget->child("combo"); + TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->clear(); @@ -1247,14 +1247,14 @@ void KMFilterActionRewriteHeader::setParamWidgetValue( QWidget* paramWidget ) co Q_ASSERT( rele ); rele->setText( mRegExp.pattern() ); - QLineEdit *le = (QLineEdit*)paramWidget->child("replace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->setText( mReplacementString ); } -void KMFilterActionRewriteHeader::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionRewriteHeader::applyParamWidgetValue( TQWidget* paramWidget ) { - QComboBox *cb = (QComboBox*)paramWidget->child("combo"); + TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); mParameter = cb->currentText(); @@ -1262,14 +1262,14 @@ void KMFilterActionRewriteHeader::applyParamWidgetValue( QWidget* paramWidget ) Q_ASSERT( rele ); mRegExp.setPattern( rele->text() ); - QLineEdit *le = (QLineEdit*)paramWidget->child("replace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); mReplacementString = le->text(); } -void KMFilterActionRewriteHeader::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionRewriteHeader::clearParamWidget( TQWidget* paramWidget ) const { - QComboBox *cb = (QComboBox*)paramWidget->child("combo"); + TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->setCurrentItem(0); @@ -1277,14 +1277,14 @@ void KMFilterActionRewriteHeader::clearParamWidget( QWidget* paramWidget ) const Q_ASSERT( rele ); rele->clear(); - QLineEdit *le = (QLineEdit*)paramWidget->child("replace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->clear(); } -const QString KMFilterActionRewriteHeader::argsAsString() const +const TQString KMFilterActionRewriteHeader::argsAsString() const { - QString result = mParameter; + TQString result = mParameter; result += '\t'; result += mRegExp.pattern(); result += '\t'; @@ -1293,17 +1293,17 @@ const QString KMFilterActionRewriteHeader::argsAsString() const return result; } -const QString KMFilterActionRewriteHeader::displayString() const +const TQString KMFilterActionRewriteHeader::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } -void KMFilterActionRewriteHeader::argsFromString( const QString argsStr ) +void KMFilterActionRewriteHeader::argsFromString( const TQString argsStr ) { - QStringList l = QStringList::split( '\t', argsStr, true /*allow empty entries*/ ); - QString s; + TQStringList l = TQStringList::split( '\t', argsStr, true /*allow empty entries*/ ); + TQString s; s = l[0]; mRegExp.setPattern( l[1] ); @@ -1420,8 +1420,8 @@ void KMFilterActionCopy::processAsync(KMMessage* msg) const ActionScheduler *handler = MessageProperty::filterHandler( msg ); KMCommand *cmd = new KMCopyCommand( mFolder, msg ); - QObject::connect( cmd, SIGNAL( completed( KMCommand * ) ), - handler, SLOT( copyMessageFinished( KMCommand * ) ) ); + TQObject::connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ), + handler, TQT_SLOT( copyMessageFinished( KMCommand * ) ) ); cmd->start(); } @@ -1473,7 +1473,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const msg->initFromMessage( aMsg ); - // QString st = QString::fromUtf8( aMsg->createForwardBody() ); + // TQString st = TQString::fromUtf8( aMsg->createForwardBody() ); TemplateParser parser( msg, TemplateParser::Forward, aMsg->body(), false, false, false, false); @@ -1485,7 +1485,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const msg->body() ); if( encoding.isEmpty() ) encoding = "utf-8"; - QCString str = KMMsgBase::codecForName( encoding )->fromUnicode( msg->body() ); + TQCString str = KMMsgBase::codecForName( encoding )->fromUnicode( msg->body() ); msg->setCharset( encoding ); msg->setTo( mParameter ); @@ -1498,7 +1498,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const msg->setAutomaticFields( true ); msg->setHeaderField( "Content-Type", "text/plain" ); // msg->setCteStr( isQP ? "quoted-printable": "8bit" ); - QValueList<int> dummy; + TQValueList<int> dummy; msg->setBodyAndGuessCte(str, dummy, !isQP); msg->setCharset( encoding ); if( isQP ) @@ -1518,7 +1518,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const bodyPart.setTypeStr( "text" ); bodyPart.setSubtypeStr( "plain" ); // bodyPart.setCteStr( isQP ? "quoted-printable": "8bit" ); - QValueList<int> dummy; + TQValueList<int> dummy; bodyPart.setBodyAndGuessCte(str, dummy, !isQP); bodyPart.setCharset( encoding ); bodyPart.setBodyEncoded( str ); @@ -1621,7 +1621,7 @@ KMFilterAction::ReturnCode KMFilterActionExec::process(KMMessage *aMsg) const class PipeJob : public KPIM::ThreadWeaver::Job { public: - PipeJob(QObject* parent = 0 , const char* name = 0, KMMessage* aMsg = 0, QString cmd = 0, QString tempFileName = 0 ) + PipeJob(TQObject* parent = 0 , const char* name = 0, KMMessage* aMsg = 0, TQString cmd = 0, TQString tempFileName = 0 ) : Job (parent, name), mTempFileName(tempFileName), mCmd(cmd), @@ -1641,12 +1641,12 @@ class PipeJob : public KPIM::ThreadWeaver::Job { KPIM::ThreadWeaver::debug (1, "PipeJob::run: doing it .\n"); FILE *p; - QByteArray ba; + TQByteArray ba; // backup the serial number in case the header gets lost - QString origSerNum = mMsg->headerField( "X-KMail-Filtered" ); + TQString origSerNum = mMsg->headerField( "X-KMail-Filtered" ); - p = popen(QFile::encodeName(mCmd), "r"); + p = popen(TQFile::encodeName(mCmd), "r"); int len =100; char buffer[100]; // append data to ba: @@ -1658,7 +1658,7 @@ class PipeJob : public KPIM::ThreadWeaver::Job } pclose(p); if ( !ba.isEmpty() ) { - KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", QString(ba).latin1() ); + KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", TQString(ba).latin1() ); KMFolder *filterFolder = mMsg->parent(); ActionScheduler *handler = MessageProperty::filterHandler( mMsg->getMsgSerNum() ); @@ -1677,10 +1677,10 @@ class PipeJob : public KPIM::ThreadWeaver::Job KPIM::ThreadWeaver::debug (1, "PipeJob::run: done.\n" ); // unlink the tempFile - QFile::remove(mTempFileName); + TQFile::remove(mTempFileName); } - QString mTempFileName; - QString mCmd; + TQString mTempFileName; + TQString mCmd; KMMessage *mMsg; }; @@ -1714,11 +1714,11 @@ void KMFilterActionExtFilter::processAsync(KMMessage* aMsg) const KTempFile * inFile = new KTempFile; inFile->setAutoDelete(false); - QPtrList<KTempFile> atmList; + TQPtrList<KTempFile> atmList; atmList.setAutoDelete(true); atmList.append( inFile ); - QString commandLine = substituteCommandLineArgsFor( aMsg , atmList ); + TQString commandLine = substituteCommandLineArgsFor( aMsg , atmList ); if ( commandLine.isEmpty() ) handler->actionMessage( ErrorButGoOn ); @@ -1732,13 +1732,13 @@ void KMFilterActionExtFilter::processAsync(KMMessage* aMsg) const commandLine = "(" + commandLine + ") <" + inFile->name(); // write message to file - QString tempFileName = inFile->name(); + TQString tempFileName = inFile->name(); KPIM::kCStringToFile( aMsg->asString(), tempFileName, //### false, false, false ); inFile->close(); PipeJob *job = new PipeJob(0, 0, aMsg, commandLine, tempFileName); - QObject::connect ( job, SIGNAL( done() ), handler, SLOT( actionMessage() ) ); + TQObject::connect ( job, TQT_SIGNAL( done() ), handler, TQT_SLOT( actionMessage() ) ); kmkernel->weaver()->enqueue(job); } @@ -1755,7 +1755,7 @@ public: static KMFilterAction* newAction(void); }; -KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const QString aLabel ) +KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const TQString aLabel ) : KMFilterAction( aName, aLabel ) { } @@ -1764,7 +1764,7 @@ KMFilterActionWithTest::~KMFilterActionWithTest() { } -QWidget* KMFilterActionWithTest::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionWithTest::createParamWidget( TQWidget* parent ) const { KMSoundTestWidget *le = new KMSoundTestWidget(parent); le->setUrl( mParameter ); @@ -1772,36 +1772,36 @@ QWidget* KMFilterActionWithTest::createParamWidget( QWidget* parent ) const } -void KMFilterActionWithTest::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionWithTest::applyParamWidgetValue( TQWidget* paramWidget ) { mParameter = ((KMSoundTestWidget*)paramWidget)->url(); } -void KMFilterActionWithTest::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionWithTest::setParamWidgetValue( TQWidget* paramWidget ) const { ((KMSoundTestWidget*)paramWidget)->setUrl( mParameter ); } -void KMFilterActionWithTest::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionWithTest::clearParamWidget( TQWidget* paramWidget ) const { ((KMSoundTestWidget*)paramWidget)->clear(); } -void KMFilterActionWithTest::argsFromString( const QString argsStr ) +void KMFilterActionWithTest::argsFromString( const TQString argsStr ) { mParameter = argsStr; } -const QString KMFilterActionWithTest::argsAsString() const +const TQString KMFilterActionWithTest::argsAsString() const { return mParameter; } -const QString KMFilterActionWithTest::displayString() const +const TQString KMFilterActionWithTest::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1819,11 +1819,11 @@ KMFilterAction::ReturnCode KMFilterActionExecSound::process(KMMessage*) const { if ( mParameter.isEmpty() ) return ErrorButGoOn; - QString play = mParameter; - QString file = QString::fromLatin1("file:"); + TQString play = mParameter; + TQString file = TQString::fromLatin1("file:"); if (mParameter.startsWith(file)) play = mParameter.mid(file.length()); - KAudioPlayer::play(QFile::encodeName(play)); + KAudioPlayer::play(TQFile::encodeName(play)); return GoOn; } @@ -1832,7 +1832,7 @@ bool KMFilterActionExecSound::requiresBody(KMMsgBase*) const return false; } -KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const QString aLabel ) +KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const TQString aLabel ) : KMFilterAction( aName, aLabel ) { } @@ -1841,7 +1841,7 @@ KMFilterActionWithUrl::~KMFilterActionWithUrl() { } -QWidget* KMFilterActionWithUrl::createParamWidget( QWidget* parent ) const +TQWidget* KMFilterActionWithUrl::createParamWidget( TQWidget* parent ) const { KURLRequester *le = new KURLRequester(parent); le->setURL( mParameter ); @@ -1849,36 +1849,36 @@ QWidget* KMFilterActionWithUrl::createParamWidget( QWidget* parent ) const } -void KMFilterActionWithUrl::applyParamWidgetValue( QWidget* paramWidget ) +void KMFilterActionWithUrl::applyParamWidgetValue( TQWidget* paramWidget ) { mParameter = ((KURLRequester*)paramWidget)->url(); } -void KMFilterActionWithUrl::setParamWidgetValue( QWidget* paramWidget ) const +void KMFilterActionWithUrl::setParamWidgetValue( TQWidget* paramWidget ) const { ((KURLRequester*)paramWidget)->setURL( mParameter ); } -void KMFilterActionWithUrl::clearParamWidget( QWidget* paramWidget ) const +void KMFilterActionWithUrl::clearParamWidget( TQWidget* paramWidget ) const { ((KURLRequester*)paramWidget)->clear(); } -void KMFilterActionWithUrl::argsFromString( const QString argsStr ) +void KMFilterActionWithUrl::argsFromString( const TQString argsStr ) { mParameter = argsStr; } -const QString KMFilterActionWithUrl::argsAsString() const +const TQString KMFilterActionWithUrl::argsAsString() const { return mParameter; } -const QString KMFilterActionWithUrl::displayString() const +const TQString KMFilterActionWithUrl::displayString() const { // FIXME after string freeze: // return i18n("").arg( ); - return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\""; + return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\""; } @@ -1907,10 +1907,10 @@ void KMFilterActionDict::init(void) insert( KMFilterActionExecSound::newAction ); // Register custom filter actions below this line. } -// The int in the QDict constructor (41) must be a prime +// The int in the TQDict constructor (41) must be a prime // and should be greater than the double number of KMFilterAction types KMFilterActionDict::KMFilterActionDict() - : QDict<KMFilterActionDesc>(41) + : TQDict<KMFilterActionDesc>(41) { mList.setAutoDelete(true); init(); @@ -1923,8 +1923,8 @@ void KMFilterActionDict::insert( KMFilterActionNewFunc aNewFunc ) desc->name = action->name(); desc->label = action->label(); desc->create = aNewFunc; - QDict<KMFilterActionDesc>::insert( desc->name, desc ); - QDict<KMFilterActionDesc>::insert( desc->label, desc ); + TQDict<KMFilterActionDesc>::insert( desc->name, desc ); + TQDict<KMFilterActionDesc>::insert( desc->label, desc ); mList.append( desc ); delete action; } diff --git a/kmail/kmfilteraction.h b/kmail/kmfilteraction.h index abd42719e..c47a4a6d5 100644 --- a/kmail/kmfilteraction.h +++ b/kmail/kmfilteraction.h @@ -22,13 +22,13 @@ #include <kmime_mdn.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qdict.h> -#include <qptrlist.h> -#include <qvaluelist.h> -#include <qguardedptr.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdict.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> +#include <tqguardedptr.h> +#include <tqwidget.h> class KMMsgBase; class KMMessage; @@ -74,16 +74,16 @@ public: CriticalError = 0x8 }; /** Initialize filter action with (english) name @p aName and (internationalized) label @p aLabel. */ - KMFilterAction(const char* aName, const QString aLabel); + KMFilterAction(const char* aName, const TQString aLabel); virtual ~KMFilterAction(); /** Returns nationalized label, ie. the one which is presented in the filter dialog. */ - const QString label() const { return mLabel; } + const TQString label() const { return mLabel; } /** Returns english name, ie. the one under which it is known in the config. */ - const QString name() const { return mName; } + const TQString name() const { return mName; } /** Execute action on given message. Returns @p CriticalError if a critical error has occurred (eg. disk full), @p ErrorButGoOn if @@ -111,30 +111,30 @@ public: /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; /** Read extra arguments from given string. */ - virtual void argsFromString(const QString argsStr) = 0; + virtual void argsFromString(const TQString argsStr) = 0; /** Return extra arguments as string. Must not contain newlines. */ - virtual const QString argsAsString() const = 0; + virtual const TQString argsAsString() const = 0; /** Returns a translated string describing this filter for visualization purposes, e.g. in the filter log. */ - virtual const QString displayString() const = 0; + virtual const TQString displayString() const = 0; /** Called from the filter when a folder is removed. Tests if the folder @p aFolder is used and changes to @p aNewFolder in this @@ -150,12 +150,12 @@ public: /** Automates the sending of MDNs from filter actions. */ static void sendMDN( KMMessage * msg, KMime::MDN::DispositionType d, - const QValueList<KMime::MDN::DispositionModifier> & m - =QValueList<KMime::MDN::DispositionModifier>() ); + const TQValueList<KMime::MDN::DispositionModifier> & m + =TQValueList<KMime::MDN::DispositionModifier>() ); private: - QString mName; - QString mLabel; + TQString mName; + TQString mLabel; }; //========================================================= @@ -166,7 +166,7 @@ private: /** Abstract base class for KMail's filter actions that need no - parameter, e.g. "Confirm Delivery". Creates an (empty) QWidget as + parameter, e.g. "Confirm Delivery". Creates an (empty) TQWidget as parameter widget. A subclass of this must provide at least implementations for the following methods: @@ -183,19 +183,19 @@ class KMFilterActionWithNone : public KMFilterAction public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithNone(const char* aName, const QString aLabel); + KMFilterActionWithNone(const char* aName, const TQString aLabel); /** Read extra arguments from given string. This type of filter action has no parameters, so this is a no-op. */ - virtual void argsFromString(const QString) {}; + virtual void argsFromString(const TQString) {}; /** Return extra arguments as string. Must not contain newlines. We - return QString::null, because we have no parameter. */ - virtual const QString argsAsString() const { return QString::null; } + return TQString::null, because we have no parameter. */ + virtual const TQString argsAsString() const { return TQString::null; } /** Returns a translated string describing this filter for visualization purposes, e.g. in the filter log. */ - virtual const QString displayString() const; + virtual const TQString displayString() const; }; @@ -208,7 +208,7 @@ public: /** Abstract base class for KMail's filter actions that need a free-form parameter, e.g. 'set transport' or 'set reply to'. Can - create a QLineEdit as parameter widget. A subclass of this + create a TQLineEdit as parameter widget. A subclass of this must provide at least implementations for the following methods: @li virtual KMFilterAction::ReturnCodes KMFilterAction::process @@ -224,7 +224,7 @@ class KMFilterActionWithString : public KMFilterAction public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithString(const char* aName, const QString aLabel); + KMFilterActionWithString(const char* aName, const TQString aLabel); /** Determines whether this action is valid. But this is just a quick test. Eg., actions that have a mail address as parameter @@ -234,33 +234,33 @@ public: /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; /** Read extra arguments from given string. */ - virtual void argsFromString(const QString argsStr); + virtual void argsFromString(const TQString argsStr); /** Return extra arguments as string. Must not contain newlines. */ - virtual const QString argsAsString() const; + virtual const TQString argsAsString() const; /** Returns a translated string describing this filter for visualization purposes, e.g. in the filter log. */ - virtual const QString displayString() const; + virtual const TQString displayString() const; protected: - QString mParameter; + TQString mParameter; }; //========================================================= @@ -288,7 +288,7 @@ class KMFilterActionWithUOID : public KMFilterAction public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithUOID(const char* aName, const QString aLabel); + KMFilterActionWithUOID(const char* aName, const TQString aLabel); /** Determines whether this action is valid. But this is just a quick test. Eg., actions that have a mail address as parameter @@ -297,14 +297,14 @@ public: virtual bool isEmpty() const { return mParameter == 0; } /** Read extra arguments from given string. */ - virtual void argsFromString(const QString argsStr); + virtual void argsFromString(const TQString argsStr); /** Return extra arguments as string. Must not contain newlines. */ - virtual const QString argsAsString() const; + virtual const TQString argsAsString() const; /** Returns a translated string describing this filter for visualization purposes, e.g. in the filter log. */ - virtual const QString displayString() const; + virtual const TQString displayString() const; protected: uint mParameter; @@ -319,7 +319,7 @@ protected: /** Abstract base class for KMail's filter actions that need a parameter which can be chosen from a fixed set, e.g. 'set - identity'. Can create a QComboBox as parameter widget. A + identity'. Can create a TQComboBox as parameter widget. A subclass of this must provide at least implementations for the following methods: @@ -327,7 +327,7 @@ protected: @li static KMFilterAction::newAction Additionally, it's constructor should populate the - QStringList @p mParameterList with the valid parameter + TQStringList @p mParameterList with the valid parameter strings. The combobox will then contain be populated automatically with those strings. The default string will be the first one. @@ -341,30 +341,30 @@ class KMFilterActionWithStringList : public KMFilterActionWithString public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithStringList(const char* aName, const QString aLabel); + KMFilterActionWithStringList(const char* aName, const TQString aLabel); /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; /** Read extra arguments from given string. */ - virtual void argsFromString(const QString argsStr); + virtual void argsFromString(const TQString argsStr); protected: - QStringList mParameterList; + TQStringList mParameterList; }; @@ -377,7 +377,7 @@ protected: /** Abstract base class for KMail's filter actions that need a mail folder as parameter, e.g. 'move into folder'. Can - create a QComboBox as parameter widget. A subclass of this + create a TQComboBox as parameter widget. A subclass of this must provide at least implementations for the following methods: @li virtual KMFilterAction::ReturnCodes KMFilterAction::process @@ -394,7 +394,7 @@ class KMFilterActionWithFolder : public KMFilterAction public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithFolder(const char* aName, const QString aLabel); + KMFilterActionWithFolder(const char* aName, const TQString aLabel); /** Determines whether this action is valid. But this is just a quick test. Eg., actions that have a mail address as parameter @@ -404,30 +404,30 @@ public: /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; /** Read extra arguments from given string. */ - virtual void argsFromString(const QString argsStr); + virtual void argsFromString(const TQString argsStr); /** Return extra arguments as string. Must not contain newlines. */ - virtual const QString argsAsString() const; + virtual const TQString argsAsString() const; /** Returns a translated string describing this filter for visualization purposes, e.g. in the filter log. */ - virtual const QString displayString() const; + virtual const TQString displayString() const; /** Called from the filter when a folder is removed. Tests if the folder @p aFolder is used and changes to @p aNewFolder in this @@ -435,8 +435,8 @@ public: virtual bool folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder); protected: - QGuardedPtr<KMFolder> mFolder; - QString mFolderName; + TQGuardedPtr<KMFolder> mFolder; + TQString mFolderName; }; //========================================================= @@ -448,7 +448,7 @@ protected: /** Abstract base class for KMail's filter actions that need a mail address as parameter, e.g. 'forward to'. Can create a - QComboBox (capable of completion from the address book) as + TQComboBox (capable of completion from the address book) as parameter widget. A subclass of this must provide at least implementations for the following methods: @@ -465,24 +465,24 @@ class KMFilterActionWithAddress : public KMFilterActionWithString public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithAddress(const char* aName, const QString aLabel); + KMFilterActionWithAddress(const char* aName, const TQString aLabel); /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; }; //========================================================= @@ -516,7 +516,7 @@ class KMFilterActionWithUrl : public KMFilterAction public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithUrl(const char* aName, const QString aLabel); + KMFilterActionWithUrl(const char* aName, const TQString aLabel); ~KMFilterActionWithUrl(); /** Determines whether this action is valid. But this is just a quick test. Eg., actions that have a mail address as parameter @@ -526,33 +526,33 @@ public: /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; /** Read extra arguments from given string. */ - virtual void argsFromString(const QString argsStr); + virtual void argsFromString(const TQString argsStr); /** Return extra arguments as string. Must not contain newlines. */ - virtual const QString argsAsString() const; + virtual const TQString argsAsString() const; /** Returns a translated string describing this filter for visualization purposes, e.g. in the filter log. */ - virtual const QString displayString() const; + virtual const TQString displayString() const; protected: - QString mParameter; + TQString mParameter; }; @@ -561,31 +561,31 @@ class KMFilterActionWithCommand : public KMFilterActionWithUrl public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithCommand(const char* aName, const QString aLabel); + KMFilterActionWithCommand(const char* aName, const TQString aLabel); /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; /** Substitutes various placeholders for data from the message resp. for filenames containing that data. Currently, only %n is supported, where n in an integer >= 0. %n gets substituted for the name of a tempfile holding the n'th message part, with n=0 meaning the body of the message. */ - virtual QString substituteCommandLineArgsFor( KMMessage *aMsg, QPtrList<KTempFile> & aTempFileList ) const; + virtual TQString substituteCommandLineArgsFor( KMMessage *aMsg, TQPtrList<KTempFile> & aTempFileList ) const; virtual ReturnCode genericProcess( KMMessage * aMsg, bool filtering ) const; }; @@ -597,7 +597,7 @@ class KMFilterActionWithTest : public KMFilterAction public: /** Initialize filter action with (english) name @p aName. This is the name under which this action is known in the config file. */ - KMFilterActionWithTest(const char* aName, const QString aLabel); + KMFilterActionWithTest(const char* aName, const TQString aLabel); ~KMFilterActionWithTest(); /** Determines whether this action is valid. But this is just a quick test. Eg., actions that have a mail address as parameter @@ -607,33 +607,33 @@ public: /** Creates a widget for setting the filter action parameter. Also sets the value of the widget. */ - virtual QWidget* createParamWidget(QWidget* parent) const; + virtual TQWidget* createParamWidget(TQWidget* parent) const; /** The filter action shall set it's parameter from the widget's contents. It is allowed that the value is read by the action before this function is called. */ - virtual void applyParamWidgetValue(QWidget* paramWidget); + virtual void applyParamWidgetValue(TQWidget* paramWidget); /** The filter action shall set it's widget's contents from it's parameter. */ - virtual void setParamWidgetValue(QWidget* paramWidget) const; + virtual void setParamWidgetValue(TQWidget* paramWidget) const; /** The filter action shall clear it's parameter widget's contents. */ - virtual void clearParamWidget(QWidget* paramWidget) const; + virtual void clearParamWidget(TQWidget* paramWidget) const; /** Read extra arguments from given string. */ - virtual void argsFromString(const QString argsStr); + virtual void argsFromString(const TQString argsStr); /** Return extra arguments as string. Must not contain newlines. */ - virtual const QString argsAsString() const; + virtual const TQString argsAsString() const; /** Returns a translated string describing this filter for visualization purposes, e.g. in the filter log. */ - virtual const QString displayString() const; + virtual const TQString displayString() const; protected: - QString mParameter; + TQString mParameter; }; @@ -644,7 +644,7 @@ typedef KMFilterAction* (*KMFilterActionNewFunc)(void); /** Auxiliary struct to KMFilterActionDict. */ struct KMFilterActionDesc { - QString label, name; + TQString label, name; KMFilterActionNewFunc create; }; @@ -670,23 +670,23 @@ struct KMFilterActionDesc @see KMFilterAction KMFilterActionDesc KMFilter */ -class KMFilterActionDict: public QDict<KMFilterActionDesc> +class KMFilterActionDict: public TQDict<KMFilterActionDesc> { public: KMFilterActionDict(); /** Overloaded member function, provided for convenience. Thin - wrapper around QDict::insert and QPtrList::insert. + wrapper around TQDict::insert and TQPtrList::insert. Inserts the resulting KMFilterActionDesc thrice: First with the name, then with the label as key into the - QDict, then into the QPtrList. For that, it creates an + TQDict, then into the TQPtrList. For that, it creates an instance of the action internally and deletes it again after querying it for name and label. */ void insert(KMFilterActionNewFunc aNewFunc); /** Provides read-only access to a list of all known filter actions. */ - const QPtrList<KMFilterActionDesc>& list() const { return mList; } + const TQPtrList<KMFilterActionDesc>& list() const { return mList; } protected: /** Populate the dictionary with all known KMFilterAction @@ -694,7 +694,7 @@ protected: virtual void init(void); private: - QPtrList<KMFilterActionDesc> mList; + TQPtrList<KMFilterActionDesc> mList; }; #endif /*kmfilteraction_h*/ diff --git a/kmail/kmfilterdlg.cpp b/kmail/kmfilterdlg.cpp index 29bbe037a..c5589c943 100644 --- a/kmail/kmfilterdlg.cpp +++ b/kmail/kmfilterdlg.cpp @@ -31,16 +31,16 @@ using KMail::FilterImporterExporter; #include <kpushbutton.h> // other Qt headers: -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qwidgetstack.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qvalidator.h> -#include <qtabwidget.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqwidgetstack.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqvalidator.h> +#include <tqtabwidget.h> // other headers: #include <assert.h> @@ -124,7 +124,7 @@ const char * KMPopFilterDlgHelpAnchor = "popfilters-id" ; // //============================================================================= -KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool createDummyFilter ) +KMFilterDlg::KMFilterDlg(TQWidget* parent, const char* name, bool popFilter, bool createDummyFilter ) : KDialogBase( parent, name, false /* modality */, (popFilter)? i18n("POP3 Filter Rules"): i18n("Filter Rules") /* caption*/, Help|Ok|Apply|Cancel|User1|User2 /* button mask */, @@ -135,37 +135,37 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool setHelp( (bPopFilter)? KMPopFilterDlgHelpAnchor: KMFilterDlgHelpAnchor ); setButtonText( User1, i18n("Import") ); setButtonText( User2, i18n("Export") ); - connect( this, SIGNAL(user1Clicked()), - this, SLOT( slotImportFilters()) ); - connect( this, SIGNAL(user2Clicked()), - this, SLOT( slotExportFilters()) ); + connect( this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT( slotImportFilters()) ); + connect( this, TQT_SIGNAL(user2Clicked()), + this, TQT_SLOT( slotExportFilters()) ); - QWidget *w = new QWidget( this ); + TQWidget *w = new TQWidget( this ); setMainWidget( w ); - QHBoxLayout *topLayout = new QHBoxLayout( w, 0, spacingHint(), "topLayout" ); - QHBoxLayout *hbl = topLayout; - QVBoxLayout *vbl2 = 0; - QWidget *page1 = 0; - QWidget *page2 = 0; + TQHBoxLayout *topLayout = new TQHBoxLayout( w, 0, spacingHint(), "topLayout" ); + TQHBoxLayout *hbl = topLayout; + TQVBoxLayout *vbl2 = 0; + TQWidget *page1 = 0; + TQWidget *page2 = 0; mFilterList = new KMFilterListBox( i18n("Available Filters"), w, 0, bPopFilter); topLayout->addWidget( mFilterList, 1 /*stretch*/ ); if(!bPopFilter) { - QTabWidget *tabWidget = new QTabWidget( w, "kmfd_tab" ); + TQTabWidget *tabWidget = new TQTabWidget( w, "kmfd_tab" ); tabWidget->setMargin( KDialog::marginHint() ); topLayout->addWidget( tabWidget ); - page1 = new QWidget( tabWidget ); + page1 = new TQWidget( tabWidget ); tabWidget->addTab( page1, i18n("&General") ); - hbl = new QHBoxLayout( page1, 0, spacingHint(), "kmfd_hbl" ); + hbl = new TQHBoxLayout( page1, 0, spacingHint(), "kmfd_hbl" ); - page2 = new QWidget( tabWidget ); + page2 = new TQWidget( tabWidget ); tabWidget->addTab( page2, i18n("A&dvanced") ); - vbl2 = new QVBoxLayout( page2, 0, spacingHint(), "kmfd_vbl2" ); + vbl2 = new TQVBoxLayout( page2, 0, spacingHint(), "kmfd_vbl2" ); } - QVBoxLayout *vbl = new QVBoxLayout( hbl, spacingHint(), "kmfd_vbl" ); + TQVBoxLayout *vbl = new TQVBoxLayout( hbl, spacingHint(), "kmfd_vbl" ); hbl->setStretchFactor( vbl, 2 ); mPatternEdit = new KMSearchPatternEdit( i18n("Filter Criteria"), bPopFilter ? w : page1 , "spe", bPopFilter); @@ -175,36 +175,36 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool mActionGroup = new KMPopFilterActionWidget( i18n("Filter Action"), w ); vbl->addWidget( mActionGroup, 0, Qt::AlignTop ); - mGlobalsBox = new QVGroupBox(i18n("Global Options"), w); - mShowLaterBtn = new QCheckBox(i18n("Always &show matched 'Download Later' messages in confirmation dialog"), mGlobalsBox); - QWhatsThis::add( mShowLaterBtn, i18n(_wt_filterdlg_showLater) ); + mGlobalsBox = new TQVGroupBox(i18n("Global Options"), w); + mShowLaterBtn = new TQCheckBox(i18n("Always &show matched 'Download Later' messages in confirmation dialog"), mGlobalsBox); + TQWhatsThis::add( mShowLaterBtn, i18n(_wt_filterdlg_showLater) ); vbl->addWidget( mGlobalsBox, 0, Qt::AlignTop ); } else { - QGroupBox *agb = new QGroupBox( 1 /*column*/, Vertical, i18n("Filter Actions"), page1 ); + TQGroupBox *agb = new TQGroupBox( 1 /*column*/, Vertical, i18n("Filter Actions"), page1 ); mActionLister = new KMFilterActionWidgetLister( agb ); vbl->addWidget( agb, 0, Qt::AlignTop ); - mAdvOptsGroup = new QGroupBox ( 1 /*columns*/, Vertical, + mAdvOptsGroup = new TQGroupBox ( 1 /*columns*/, Vertical, i18n("Advanced Options"), page2); { - QWidget *adv_w = new QWidget( mAdvOptsGroup ); - QGridLayout *gl = new QGridLayout( adv_w, 8 /*rows*/, 3 /*cols*/, + TQWidget *adv_w = new TQWidget( mAdvOptsGroup ); + TQGridLayout *gl = new TQGridLayout( adv_w, 8 /*rows*/, 3 /*cols*/, 0 /*border*/, spacingHint() ); - QVBoxLayout *vbl3 = new QVBoxLayout( gl, spacingHint(), "vbl3" ); + TQVBoxLayout *vbl3 = new TQVBoxLayout( gl, spacingHint(), "vbl3" ); vbl3->addStretch( 1 ); - mApplyOnIn = new QCheckBox( i18n("Apply this filter to incoming messages:"), adv_w ); + mApplyOnIn = new TQCheckBox( i18n("Apply this filter to incoming messages:"), adv_w ); vbl3->addWidget( mApplyOnIn ); - QButtonGroup *bg = new QButtonGroup( 0, "bg" ); + TQButtonGroup *bg = new TQButtonGroup( 0, "bg" ); bg->setExclusive( true ); - mApplyOnForAll = new QRadioButton( i18n("from all accounts"), adv_w ); + mApplyOnForAll = new TQRadioButton( i18n("from all accounts"), adv_w ); bg->insert( mApplyOnForAll ); vbl3->addWidget( mApplyOnForAll ); - mApplyOnForTraditional = new QRadioButton( i18n("from all but online IMAP accounts"), adv_w ); + mApplyOnForTraditional = new TQRadioButton( i18n("from all but online IMAP accounts"), adv_w ); bg->insert( mApplyOnForTraditional ); vbl3->addWidget( mApplyOnForTraditional ); - mApplyOnForChecked = new QRadioButton( i18n("from checked accounts only"), adv_w ); + mApplyOnForChecked = new TQRadioButton( i18n("from checked accounts only"), adv_w ); bg->insert( mApplyOnForChecked ); vbl3->addWidget( mApplyOnForChecked ); vbl3->addStretch( 2 ); @@ -213,34 +213,34 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool mAccountList->addColumn( i18n("Account Name") ); mAccountList->addColumn( i18n("Type") ); mAccountList->setAllColumnsShowFocus( true ); - mAccountList->setFrameStyle( QFrame::WinPanel + QFrame::Sunken ); + mAccountList->setFrameStyle( TQFrame::WinPanel + TQFrame::Sunken ); mAccountList->setSorting( -1 ); gl->addMultiCellWidget( mAccountList, 0, 3, 1, 3 ); - mApplyOnOut = new QCheckBox( i18n("Apply this filter to &sent messages"), adv_w ); + mApplyOnOut = new TQCheckBox( i18n("Apply this filter to &sent messages"), adv_w ); gl->addMultiCellWidget( mApplyOnOut, 4, 4, 0, 3 ); - mApplyOnCtrlJ = new QCheckBox( i18n("Apply this filter on manual &filtering"), adv_w ); + mApplyOnCtrlJ = new TQCheckBox( i18n("Apply this filter on manual &filtering"), adv_w ); gl->addMultiCellWidget( mApplyOnCtrlJ, 5, 5, 0, 3 ); - mStopProcessingHere = new QCheckBox( i18n("If this filter &matches, stop processing here"), adv_w ); + mStopProcessingHere = new TQCheckBox( i18n("If this filter &matches, stop processing here"), adv_w ); gl->addMultiCellWidget( mStopProcessingHere, 6, 6, /*from to row*/ 0, 3 /*from to col*/ ); - mConfigureShortcut = new QCheckBox( i18n("Add this filter to the Apply Filter menu"), adv_w ); + mConfigureShortcut = new TQCheckBox( i18n("Add this filter to the Apply Filter menu"), adv_w ); gl->addMultiCellWidget( mConfigureShortcut, 7, 7, 0, 1 ); - QLabel *keyButtonLabel = new QLabel( i18n( "Shortcut:" ), adv_w ); + TQLabel *keyButtonLabel = new TQLabel( i18n( "Shortcut:" ), adv_w ); keyButtonLabel->setAlignment( AlignVCenter | AlignRight ); gl->addMultiCellWidget( keyButtonLabel, 7, 7, 2, 2 ); mKeyButton = new KKeyButton( adv_w, "FilterShortcutSelector" ); gl->addMultiCellWidget( mKeyButton, 7, 7, 3, 3 ); mKeyButton->setEnabled( false ); - mConfigureToolbar = new QCheckBox( i18n("Additionally add this filter to the toolbar"), adv_w ); + mConfigureToolbar = new TQCheckBox( i18n("Additionally add this filter to the toolbar"), adv_w ); gl->addMultiCellWidget( mConfigureToolbar, 8, 8, 0, 3 ); mConfigureToolbar->setEnabled( false ); - QHBox *hbox = new QHBox( adv_w ); - mFilterActionLabel = new QLabel( i18n( "Icon for this filter:" ), + TQHBox *hbox = new TQHBox( adv_w ); + mFilterActionLabel = new TQLabel( i18n( "Icon for this filter:" ), hbox ); mFilterActionLabel->setEnabled( false ); @@ -259,81 +259,81 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool vbl->addStretch( 1 ); // load the filter parts into the edit widgets - connect( mFilterList, SIGNAL(filterSelected(KMFilter*)), - this, SLOT(slotFilterSelected(KMFilter*)) ); + connect( mFilterList, TQT_SIGNAL(filterSelected(KMFilter*)), + this, TQT_SLOT(slotFilterSelected(KMFilter*)) ); if (bPopFilter){ // set the state of the global setting 'show later msgs' - connect( mShowLaterBtn, SIGNAL(toggled(bool)), - mFilterList, SLOT(slotShowLaterToggled(bool))); + connect( mShowLaterBtn, TQT_SIGNAL(toggled(bool)), + mFilterList, TQT_SLOT(slotShowLaterToggled(bool))); // set the action in the filter when changed - connect( mActionGroup, SIGNAL(actionChanged(const KMPopFilterAction)), - this, SLOT(slotActionChanged(const KMPopFilterAction)) ); + connect( mActionGroup, TQT_SIGNAL(actionChanged(const KMPopFilterAction)), + this, TQT_SLOT(slotActionChanged(const KMPopFilterAction)) ); } else { // transfer changes from the 'Apply this filter on...' // combo box to the filter - connect( mApplyOnIn, SIGNAL(clicked()), - this, SLOT(slotApplicabilityChanged()) ); - connect( mApplyOnForAll, SIGNAL(clicked()), - this, SLOT(slotApplicabilityChanged()) ); - connect( mApplyOnForTraditional, SIGNAL(clicked()), - this, SLOT(slotApplicabilityChanged()) ); - connect( mApplyOnForChecked, SIGNAL(clicked()), - this, SLOT(slotApplicabilityChanged()) ); - connect( mApplyOnOut, SIGNAL(clicked()), - this, SLOT(slotApplicabilityChanged()) ); - connect( mApplyOnCtrlJ, SIGNAL(clicked()), - this, SLOT(slotApplicabilityChanged()) ); - connect( mAccountList, SIGNAL(clicked(QListViewItem*)), - this, SLOT(slotApplicableAccountsChanged()) ); - connect( mAccountList, SIGNAL(spacePressed(QListViewItem*)), - this, SLOT(slotApplicableAccountsChanged()) ); + connect( mApplyOnIn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplicabilityChanged()) ); + connect( mApplyOnForAll, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplicabilityChanged()) ); + connect( mApplyOnForTraditional, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplicabilityChanged()) ); + connect( mApplyOnForChecked, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplicabilityChanged()) ); + connect( mApplyOnOut, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplicabilityChanged()) ); + connect( mApplyOnCtrlJ, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplicabilityChanged()) ); + connect( mAccountList, TQT_SIGNAL(clicked(TQListViewItem*)), + this, TQT_SLOT(slotApplicableAccountsChanged()) ); + connect( mAccountList, TQT_SIGNAL(spacePressed(TQListViewItem*)), + this, TQT_SLOT(slotApplicableAccountsChanged()) ); // transfer changes from the 'stop processing here' // check box to the filter - connect( mStopProcessingHere, SIGNAL(toggled(bool)), - this, SLOT(slotStopProcessingButtonToggled(bool)) ); + connect( mStopProcessingHere, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotStopProcessingButtonToggled(bool)) ); - connect( mConfigureShortcut, SIGNAL(toggled(bool)), - this, SLOT(slotConfigureShortcutButtonToggled(bool)) ); + connect( mConfigureShortcut, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotConfigureShortcutButtonToggled(bool)) ); - connect( mKeyButton, SIGNAL( capturedShortcut( const KShortcut& ) ), - this, SLOT( slotCapturedShortcutChanged( const KShortcut& ) ) ); + connect( mKeyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ), + this, TQT_SLOT( slotCapturedShortcutChanged( const KShortcut& ) ) ); - connect( mConfigureToolbar, SIGNAL(toggled(bool)), - this, SLOT(slotConfigureToolbarButtonToggled(bool)) ); + connect( mConfigureToolbar, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotConfigureToolbarButtonToggled(bool)) ); - connect( mFilterActionIconButton, SIGNAL( iconChanged( QString ) ), - this, SLOT( slotFilterActionIconChanged( QString ) ) ); + connect( mFilterActionIconButton, TQT_SIGNAL( iconChanged( TQString ) ), + this, TQT_SLOT( slotFilterActionIconChanged( TQString ) ) ); } // reset all widgets here - connect( mFilterList, SIGNAL(resetWidgets()), - this, SLOT(slotReset()) ); + connect( mFilterList, TQT_SIGNAL(resetWidgets()), + this, TQT_SLOT(slotReset()) ); - connect( mFilterList, SIGNAL( applyWidgets() ), - this, SLOT( slotUpdateFilter() ) ); + connect( mFilterList, TQT_SIGNAL( applyWidgets() ), + this, TQT_SLOT( slotUpdateFilter() ) ); // support auto-naming the filter - connect( mPatternEdit, SIGNAL(maybeNameChanged()), - mFilterList, SLOT(slotUpdateFilterName()) ); + connect( mPatternEdit, TQT_SIGNAL(maybeNameChanged()), + mFilterList, TQT_SLOT(slotUpdateFilterName()) ); // apply changes on 'Apply' - connect( this, SIGNAL(applyClicked()), - mFilterList, SLOT(slotApplyFilterChanges()) ); + connect( this, TQT_SIGNAL(applyClicked()), + mFilterList, TQT_SLOT(slotApplyFilterChanges()) ); // apply changes on 'OK' - connect( this, SIGNAL(okClicked()), - mFilterList, SLOT(slotApplyFilterChanges()) ); + connect( this, TQT_SIGNAL(okClicked()), + mFilterList, TQT_SLOT(slotApplyFilterChanges()) ); // save dialog size on 'OK' - connect( this, SIGNAL(okClicked()), - this, SLOT(slotSaveSize()) ); + connect( this, TQT_SIGNAL(okClicked()), + this, TQT_SLOT(slotSaveSize()) ); // destruct the dialog on OK, close and Cancel - connect( this, SIGNAL(finished()), - this, SLOT(slotFinished()) ); + connect( this, TQT_SIGNAL(finished()), + this, TQT_SLOT(slotFinished()) ); KConfigGroup geometry( KMKernel::config(), "Geometry"); const char * configKey @@ -398,7 +398,7 @@ void KMFilterDlg::slotFilterSelected( KMFilter* aFilter ) const bool stopHere = aFilter->stopProcessingHere(); const bool configureShortcut = aFilter->configureShortcut(); const bool configureToolbar = aFilter->configureToolbar(); - const QString icon = aFilter->icon(); + const TQString icon = aFilter->icon(); const KShortcut shortcut( aFilter->shortcut() ); mApplyOnIn->setChecked( applyOnIn ); @@ -462,9 +462,9 @@ void KMFilterDlg::slotApplicabilityChanged() mAccountList->setEnabled( mApplyOnForChecked->isEnabled() && mApplyOnForChecked->isChecked() ); // Advanced tab functionality - Update list of accounts this filter applies to - QListViewItemIterator it( mAccountList ); + TQListViewItemIterator it( mAccountList ); while ( it.current() ) { - QCheckListItem *item = dynamic_cast<QCheckListItem*>( it.current() ); + TQCheckListItem *item = dynamic_cast<TQCheckListItem*>( it.current() ); if (item) { int id = item->text( 2 ).toInt(); item->setOn( mFilter->applyOnAccount( id ) ); @@ -484,9 +484,9 @@ void KMFilterDlg::slotApplicableAccountsChanged() { if ( mFilter && mApplyOnForChecked->isEnabled() && mApplyOnForChecked->isChecked() ) { // Advanced tab functionality - Update list of accounts this filter applies to - QListViewItemIterator it( mAccountList ); + TQListViewItemIterator it( mAccountList ); while ( it.current() ) { - QCheckListItem *item = dynamic_cast<QCheckListItem*>( it.current() ); + TQCheckListItem *item = dynamic_cast<TQCheckListItem*>( it.current() ); if (item) { int id = item->text( 2 ).toInt(); mFilter->setApplyOnAccount( id, item->isOn() ); @@ -523,7 +523,7 @@ void KMFilterDlg::slotCapturedShortcutChanged( const KShortcut& sc ) if ( mySc.isNull() || mySc.toString().isEmpty() ) mySc.clear(); if ( !mySc.isNull() && !( kmkernel->getKMMainWidget()->shortcutIsValid( mySc ) ) ) { - 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( this, msg ); } else { @@ -539,7 +539,7 @@ void KMFilterDlg::slotConfigureToolbarButtonToggled( bool aChecked ) mFilter->setConfigureToolbar( aChecked ); } -void KMFilterDlg::slotFilterActionIconChanged( QString icon ) +void KMFilterDlg::slotFilterActionIconChanged( TQString icon ) { if ( mFilter ) mFilter->setIcon( icon ); @@ -548,19 +548,19 @@ void KMFilterDlg::slotFilterActionIconChanged( QString icon ) void KMFilterDlg::slotUpdateAccountList() { mAccountList->clear(); - QListViewItem *top = 0; + TQListViewItem *top = 0; for( KMAccount *a = kmkernel->acctMgr()->first(); a!=0; a = kmkernel->acctMgr()->next() ) { - QCheckListItem *listItem = - new QCheckListItem( mAccountList, top, a->name(), QCheckListItem::CheckBox ); + TQCheckListItem *listItem = + new TQCheckListItem( mAccountList, top, a->name(), TQCheckListItem::CheckBox ); listItem->setText( 1, a->type() ); - listItem->setText( 2, QString( "%1" ).arg( a->id() ) ); + listItem->setText( 2, TQString( "%1" ).arg( a->id() ) ); if ( mFilter ) listItem->setOn( mFilter->applyOnAccount( a->id() ) ); top = listItem; } - QListViewItem *listItem = mAccountList->firstChild(); + TQListViewItem *listItem = mAccountList->firstChild(); if ( listItem ) { mAccountList->setCurrentItem( listItem ); mAccountList->setSelected( listItem, true ); @@ -573,89 +573,89 @@ void KMFilterDlg::slotUpdateAccountList() // //============================================================================= -KMFilterListBox::KMFilterListBox( const QString & title, QWidget *parent, const char* name, bool popFilter ) - : QGroupBox( 1, Horizontal, title, parent, name ), +KMFilterListBox::KMFilterListBox( const TQString & title, TQWidget *parent, const char* name, bool popFilter ) + : TQGroupBox( 1, Horizontal, title, parent, name ), bPopFilter(popFilter) { mFilterList.setAutoDelete( true ); mIdxSelItem = -1; //----------- the list box - mListBox = new QListBox(this); + mListBox = new TQListBox(this); mListBox->setMinimumWidth(150); - QWhatsThis::add( mListBox, i18n(_wt_filterlist) ); + TQWhatsThis::add( mListBox, i18n(_wt_filterlist) ); //----------- the first row of buttons - QHBox *hb = new QHBox(this); + TQHBox *hb = new TQHBox(this); hb->setSpacing(4); - mBtnTop = new KPushButton( QString::null, hb ); + mBtnTop = new KPushButton( TQString::null, hb ); mBtnTop->setAutoRepeat( true ); mBtnTop->setIconSet( BarIconSet( "top", KIcon::SizeSmall ) ); mBtnTop->setMinimumSize( mBtnTop->sizeHint() * 1.2 ); - mBtnUp = new KPushButton( QString::null, hb ); + mBtnUp = new KPushButton( TQString::null, hb ); mBtnUp->setAutoRepeat( true ); mBtnUp->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) ); mBtnUp->setMinimumSize( mBtnUp->sizeHint() * 1.2 ); - mBtnDown = new KPushButton( QString::null, hb ); + mBtnDown = new KPushButton( TQString::null, hb ); mBtnDown->setAutoRepeat( true ); mBtnDown->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) ); mBtnDown->setMinimumSize( mBtnDown->sizeHint() * 1.2 ); - mBtnBot = new KPushButton( QString::null, hb ); + mBtnBot = new KPushButton( TQString::null, hb ); mBtnBot->setAutoRepeat( true ); mBtnBot->setIconSet( BarIconSet( "bottom", KIcon::SizeSmall ) ); mBtnBot->setMinimumSize( mBtnBot->sizeHint() * 1.2 ); - QToolTip::add( mBtnTop, i18n("Top") ); - QToolTip::add( mBtnUp, i18n("Up") ); - QToolTip::add( mBtnDown, i18n("Down") ); - QToolTip::add( mBtnBot, i18n("Bottom") ); - QWhatsThis::add( mBtnTop, i18n(_wt_filterlist_top) ); - QWhatsThis::add( mBtnUp, i18n(_wt_filterlist_up) ); - QWhatsThis::add( mBtnDown, i18n(_wt_filterlist_down) ); - QWhatsThis::add( mBtnBot, i18n(_wt_filterlist_bot) ); + TQToolTip::add( mBtnTop, i18n("Top") ); + TQToolTip::add( mBtnUp, i18n("Up") ); + TQToolTip::add( mBtnDown, i18n("Down") ); + TQToolTip::add( mBtnBot, i18n("Bottom") ); + TQWhatsThis::add( mBtnTop, i18n(_wt_filterlist_top) ); + TQWhatsThis::add( mBtnUp, i18n(_wt_filterlist_up) ); + TQWhatsThis::add( mBtnDown, i18n(_wt_filterlist_down) ); + TQWhatsThis::add( mBtnBot, i18n(_wt_filterlist_bot) ); //----------- the second row of buttons - hb = new QHBox(this); + hb = new TQHBox(this); hb->setSpacing(4); - mBtnNew = new QPushButton( QString::null, hb ); + mBtnNew = new TQPushButton( TQString::null, hb ); mBtnNew->setPixmap( BarIcon( "filenew", KIcon::SizeSmall ) ); mBtnNew->setMinimumSize( mBtnNew->sizeHint() * 1.2 ); - mBtnCopy = new QPushButton( QString::null, hb ); + mBtnCopy = new TQPushButton( TQString::null, hb ); mBtnCopy->setIconSet( BarIconSet( "editcopy", KIcon::SizeSmall ) ); mBtnCopy->setMinimumSize( mBtnCopy->sizeHint() * 1.2 ); - mBtnDelete = new QPushButton( QString::null, hb ); + mBtnDelete = new TQPushButton( TQString::null, hb ); mBtnDelete->setIconSet( BarIconSet( "editdelete", KIcon::SizeSmall ) ); mBtnDelete->setMinimumSize( mBtnDelete->sizeHint() * 1.2 ); - mBtnRename = new QPushButton( i18n("Rename..."), hb ); - QToolTip::add( mBtnNew, i18n("New") ); - QToolTip::add( mBtnCopy, i18n("Copy") ); - QToolTip::add( mBtnDelete, i18n("Delete")); - QWhatsThis::add( mBtnNew, i18n(_wt_filterlist_new) ); - QWhatsThis::add( mBtnCopy, i18n(_wt_filterlist_copy) ); - QWhatsThis::add( mBtnDelete, i18n(_wt_filterlist_delete) ); - QWhatsThis::add( mBtnRename, i18n(_wt_filterlist_rename) ); + mBtnRename = new TQPushButton( i18n("Rename..."), hb ); + TQToolTip::add( mBtnNew, i18n("New") ); + TQToolTip::add( mBtnCopy, i18n("Copy") ); + TQToolTip::add( mBtnDelete, i18n("Delete")); + TQWhatsThis::add( mBtnNew, i18n(_wt_filterlist_new) ); + TQWhatsThis::add( mBtnCopy, i18n(_wt_filterlist_copy) ); + TQWhatsThis::add( mBtnDelete, i18n(_wt_filterlist_delete) ); + TQWhatsThis::add( mBtnRename, i18n(_wt_filterlist_rename) ); //----------- now connect everything - connect( mListBox, SIGNAL(highlighted(int)), - this, SLOT(slotSelected(int)) ); - connect( mListBox, SIGNAL( doubleClicked ( QListBoxItem * )), - this, SLOT( slotRename()) ); - connect( mBtnTop, SIGNAL(clicked()), - this, SLOT(slotTop()) ); - connect( mBtnUp, SIGNAL(clicked()), - this, SLOT(slotUp()) ); - connect( mBtnDown, SIGNAL(clicked()), - this, SLOT(slotDown()) ); - connect( mBtnBot, SIGNAL(clicked()), - this, SLOT(slotBottom()) ); - connect( mBtnNew, SIGNAL(clicked()), - this, SLOT(slotNew()) ); - connect( mBtnCopy, SIGNAL(clicked()), - this, SLOT(slotCopy()) ); - connect( mBtnDelete, SIGNAL(clicked()), - this, SLOT(slotDelete()) ); - connect( mBtnRename, SIGNAL(clicked()), - this, SLOT(slotRename()) ); + connect( mListBox, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotSelected(int)) ); + connect( mListBox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * )), + this, TQT_SLOT( slotRename()) ); + connect( mBtnTop, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotTop()) ); + connect( mBtnUp, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotUp()) ); + connect( mBtnDown, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDown()) ); + connect( mBtnBot, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotBottom()) ); + connect( mBtnNew, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNew()) ); + connect( mBtnCopy, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCopy()) ); + connect( mBtnDelete, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelete()) ); + connect( mBtnRename, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRename()) ); // the dialog should call loadFilterList() // when all signals are connected. @@ -663,14 +663,14 @@ KMFilterListBox::KMFilterListBox( const QString & title, QWidget *parent, const } -void KMFilterListBox::createFilter( const QCString & field, - const QString & value ) +void KMFilterListBox::createFilter( const TQCString & field, + const TQString & value ) { KMSearchRule *newRule = KMSearchRule::createInstance( field, KMSearchRule::FuncContains, value ); KMFilter *newFilter = new KMFilter(0, bPopFilter); newFilter->pattern()->append( newRule ); - newFilter->pattern()->setName( QString("<%1>:%2").arg( field ).arg( value) ); + newFilter->pattern()->setName( TQString("<%1>:%2").arg( field ).arg( value) ); KMFilterActionDesc *desc = (*kmkernel->filterActionDict())["transfer"]; if ( desc ) @@ -690,8 +690,8 @@ void KMFilterListBox::slotUpdateFilterName() KMSearchPattern *p = mFilterList.at(mIdxSelItem)->pattern(); if ( !p ) return; - QString shouldBeName = p->name(); - QString displayedName = mListBox->text( mIdxSelItem ); + TQString shouldBeName = p->name(); + TQString displayedName = mListBox->text( mIdxSelItem ); if ( shouldBeName.stripWhiteSpace().isEmpty() ) { mFilterList.at(mIdxSelItem)->setAutoNaming( true ); @@ -700,7 +700,7 @@ void KMFilterListBox::slotUpdateFilterName() if ( mFilterList.at(mIdxSelItem)->isAutoNaming() ) { // auto-naming of patterns if ( p->first() && !p->first()->field().stripWhiteSpace().isEmpty() ) - shouldBeName = QString( "<%1>: %2" ).arg( p->first()->field() ).arg( p->first()->contents() ); + shouldBeName = TQString( "<%1>: %2" ).arg( p->first()->field() ).arg( p->first()->contents() ); else shouldBeName = "<" + i18n("unnamed") + ">"; p->setName( shouldBeName ); @@ -734,28 +734,28 @@ void KMFilterListBox::slotApplyFilterChanges() else fm = kmkernel->filterMgr(); - QValueList<KMFilter*> newFilters = filtersForSaving(); + TQValueList<KMFilter*> newFilters = filtersForSaving(); if (bPopFilter) fm->setShowLaterMsgs(mShowLater); fm->setFilters( newFilters ); if (fm->atLeastOneOnlineImapFolderTarget()) { - QString str = i18n("At least one filter targets a folder on an online " + TQString str = i18n("At least one filter targets a folder on an online " "IMAP account. Such filters will only be applied " "when manually filtering and when filtering " "incoming online IMAP mail."); - KMessageBox::information( this, str, QString::null, + KMessageBox::information( this, str, TQString::null, "filterDlgOnlineImapCheck" ); } } -QValueList<KMFilter*> KMFilterListBox::filtersForSaving() const +TQValueList<KMFilter*> KMFilterListBox::filtersForSaving() const { const_cast<KMFilterListBox*>( this )->applyWidgets(); // signals aren't const - QValueList<KMFilter*> filters; - QStringList emptyFilters; - QPtrListIterator<KMFilter> it( mFilterList ); + TQValueList<KMFilter*> filters; + TQStringList emptyFilters; + TQPtrListIterator<KMFilter> it( mFilterList ); for ( it.toFirst() ; it.current() ; ++it ) { KMFilter *f = new KMFilter( **it ); // deep copy f->purify(); @@ -771,10 +771,10 @@ QValueList<KMFilter*> KMFilterListBox::filtersForSaving() const // report on invalid filters: if ( !emptyFilters.empty() ) { - QString msg = i18n("The following filters have not been saved because they " + TQString msg = i18n("The following filters have not been saved because they " "were invalid (e.g. containing no actions or no search " "rules)."); - KMessageBox::informationList( 0, msg, emptyFilters, QString::null, + KMessageBox::informationList( 0, msg, emptyFilters, TQString::null, "ShowInvalidFilterWarning" ); } return filters; @@ -783,7 +783,7 @@ QValueList<KMFilter*> KMFilterListBox::filtersForSaving() const void KMFilterListBox::slotSelected( int aIdx ) { mIdxSelItem = aIdx; - // QPtrList::at(i) will return 0 if i is out of range. + // TQPtrList::at(i) will return 0 if i is out of range. KMFilter *f = mFilterList.at(aIdx); if ( f ) emit filterSelected( f ); @@ -929,8 +929,8 @@ void KMFilterListBox::slotRename() assert( filter ); // allow empty names - those will turn auto-naming on again - QValidator *validator = new QRegExpValidator( QRegExp( ".*" ), 0 ); - QString newName = KInputDialog::getText + TQValidator *validator = new TQRegExpValidator( TQRegExp( ".*" ), 0 ); + TQString newName = KInputDialog::getText ( i18n("Rename Filter"), i18n("Rename filter \"%1\" to:\n(leave the field empty for automatic naming)") @@ -998,7 +998,7 @@ void KMFilterListBox::loadFilterList( bool createDummyFilter ) } Q_ASSERT( manager ); - QValueListConstIterator<KMFilter*> it; + TQValueListConstIterator<KMFilter*> it; for ( it = manager->filters().constBegin() ; it != manager->filters().constEnd() ; ++it ) { mFilterList.append( new KMFilter( **it ) ); // deep copy mListBox->insertItem( (*it)->pattern()->name() ); @@ -1024,7 +1024,7 @@ void KMFilterListBox::insertFilter( KMFilter* aFilter ) // must be really a filter... assert( aFilter ); - // if mIdxSelItem < 0, QListBox::insertItem will append. + // if mIdxSelItem < 0, TQListBox::insertItem will append. mListBox->insertItem( aFilter->pattern()->name(), mIdxSelItem ); if ( mIdxSelItem < 0 ) { // none selected -> append @@ -1053,7 +1053,7 @@ void KMFilterListBox::swapNeighbouringFilters( int untouchedOne, int movedOne ) // untouchedOne is at idx. to move it down(up), // remove item at idx+(-)1 w/o deleting it. - QListBoxItem *item = mListBox->item( movedOne ); + TQListBoxItem *item = mListBox->item( movedOne ); mListBox->takeItem( item ); // now selected item is at idx(idx-1), so // insert the other item at idx, ie. above(below). @@ -1067,7 +1067,7 @@ void KMFilterListBox::swapNeighbouringFilters( int untouchedOne, int movedOne ) void KMFilterListBox::swapFilters( int from, int to ) { - QListBoxItem *item = mListBox->item( from ); + TQListBoxItem *item = mListBox->item( from ); mListBox->takeItem( item ); mListBox->insertItem( item, to ); @@ -1085,20 +1085,20 @@ void KMFilterListBox::swapFilters( int from, int to ) // //============================================================================= -KMFilterActionWidget::KMFilterActionWidget( QWidget *parent, const char* name ) - : QHBox( parent, name ) +KMFilterActionWidget::KMFilterActionWidget( TQWidget *parent, const char* name ) + : TQHBox( parent, name ) { int i; mActionList.setAutoDelete( true ); - mComboBox = new QComboBox( false , this ); + mComboBox = new TQComboBox( false , this ); assert( mComboBox ); - mWidgetStack = new QWidgetStack(this); + mWidgetStack = new TQWidgetStack(this); assert( mWidgetStack ); setSpacing( 4 ); - QPtrListIterator<KMFilterActionDesc> it ( kmkernel->filterActionDict()->list() ); + TQPtrListIterator<KMFilterActionDesc> it ( kmkernel->filterActionDict()->list() ); for ( i=0, it.toFirst() ; it.current() ; ++it, ++i ) { //create an instance: KMFilterAction *a = (*it)->create(); @@ -1110,7 +1110,7 @@ KMFilterActionWidget::KMFilterActionWidget( QWidget *parent, const char* name ) mComboBox->insertItem( (*it)->label ); } // widget for the case where no action is selected. - mWidgetStack->addWidget( new QLabel( i18n("Please select an action."), mWidgetStack ), i ); + mWidgetStack->addWidget( new TQLabel( i18n("Please select an action."), mWidgetStack ), i ); mWidgetStack->raiseWidget(i); mComboBox->insertItem( " " ); mComboBox->setCurrentItem(i); @@ -1122,16 +1122,16 @@ KMFilterActionWidget::KMFilterActionWidget( QWidget *parent, const char* name ) // the parameter widget should grow instead. // o the whole widget takes all space horizontally, but is fixed vertically. mComboBox->adjustSize(); - mComboBox->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); + mComboBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); updateGeometry(); // redirect focus to the filter action combo box setFocusProxy( mComboBox ); // now connect the combo box and the widget stack - connect( mComboBox, SIGNAL(activated(int)), - mWidgetStack, SLOT(raiseWidget(int)) ); + connect( mComboBox, TQT_SIGNAL(activated(int)), + mWidgetStack, TQT_SLOT(raiseWidget(int)) ); } void KMFilterActionWidget::setAction( const KMFilterAction* aAction ) @@ -1139,7 +1139,7 @@ void KMFilterActionWidget::setAction( const KMFilterAction* aAction ) int i=0; bool found = false ; int count = mComboBox->count() - 1 ; // last entry is the empty one - QString label = ( aAction ) ? aAction->label() : QString::null ; + TQString label = ( aAction ) ? aAction->label() : TQString::null ; // find the index of typeOf(aAction) in mComboBox // and clear the other widgets on the way. @@ -1165,7 +1165,7 @@ void KMFilterActionWidget::setAction( const KMFilterAction* aAction ) KMFilterAction * KMFilterActionWidget::action() { // look up the action description via the label - // returned by QComboBox::currentText()... + // returned by TQComboBox::currentText()... KMFilterActionDesc *desc = (*kmkernel->filterActionDict())[ mComboBox->currentText() ]; if ( desc ) { // ...create an instance... @@ -1186,7 +1186,7 @@ KMFilterAction * KMFilterActionWidget::action() // //============================================================================= -KMFilterActionWidgetLister::KMFilterActionWidgetLister( QWidget *parent, const char* name ) +KMFilterActionWidgetLister::KMFilterActionWidgetLister( TQWidget *parent, const char* name ) : KWidgetLister( 1, FILTER_MAX_ACTIONS, parent, name ) { mActionList = 0; @@ -1196,7 +1196,7 @@ KMFilterActionWidgetLister::~KMFilterActionWidgetLister() { } -void KMFilterActionWidgetLister::setActionList( QPtrList<KMFilterAction> *aList ) +void KMFilterActionWidgetLister::setActionList( TQPtrList<KMFilterAction> *aList ) { assert ( aList ); @@ -1205,7 +1205,7 @@ void KMFilterActionWidgetLister::setActionList( QPtrList<KMFilterAction> *aList mActionList = aList; - ((QWidget*)parent())->setEnabled( true ); + ((TQWidget*)parent())->setEnabled( true ); if ( aList->count() == 0 ) { slotClear(); @@ -1225,8 +1225,8 @@ void KMFilterActionWidgetLister::setActionList( QPtrList<KMFilterAction> *aList setNumberOfShownWidgetsTo( mActionList->count() ); // load the actions into the widgets - QPtrListIterator<KMFilterAction> aIt( *mActionList ); - QPtrListIterator<QWidget> wIt( mWidgetList ); + TQPtrListIterator<KMFilterAction> aIt( *mActionList ); + TQPtrListIterator<TQWidget> wIt( mWidgetList ); for ( aIt.toFirst(), wIt.toFirst() ; aIt.current() && wIt.current() ; ++aIt, ++wIt ) ((KMFilterActionWidget*)(*wIt))->setAction( (*aIt) ); @@ -1239,15 +1239,15 @@ void KMFilterActionWidgetLister::reset() mActionList = 0; slotClear(); - ((QWidget*)parent())->setEnabled( false ); + ((TQWidget*)parent())->setEnabled( false ); } -QWidget* KMFilterActionWidgetLister::createWidget( QWidget *parent ) +TQWidget* KMFilterActionWidgetLister::createWidget( TQWidget *parent ) { return new KMFilterActionWidget(parent); } -void KMFilterActionWidgetLister::clearWidget( QWidget *aWidget ) +void KMFilterActionWidgetLister::clearWidget( TQWidget *aWidget ) { if ( aWidget ) ((KMFilterActionWidget*)aWidget)->setAction(0); @@ -1259,7 +1259,7 @@ void KMFilterActionWidgetLister::regenerateActionListFromWidgets() mActionList->clear(); - QPtrListIterator<QWidget> it( mWidgetList ); + TQPtrListIterator<TQWidget> it( mWidgetList ); for ( it.toFirst() ; it.current() ; ++it ) { KMFilterAction *a = ((KMFilterActionWidget*)(*it))->action(); if ( a ) @@ -1274,18 +1274,18 @@ void KMFilterActionWidgetLister::regenerateActionListFromWidgets() // //============================================================================= -KMPopFilterActionWidget::KMPopFilterActionWidget( const QString& title, QWidget *parent, const char* name ) - : QVButtonGroup( title, parent, name ) +KMPopFilterActionWidget::KMPopFilterActionWidget( const TQString& title, TQWidget *parent, const char* name ) + : TQVButtonGroup( title, parent, name ) { - mActionMap[Down] = new QRadioButton( i18n("&Download mail"), this ); - mActionMap[Later] = new QRadioButton( i18n("Download mail la&ter"), this ); - mActionMap[Delete] = new QRadioButton( i18n("D&elete mail from server"), this ); + mActionMap[Down] = new TQRadioButton( i18n("&Download mail"), this ); + mActionMap[Later] = new TQRadioButton( i18n("Download mail la&ter"), this ); + mActionMap[Delete] = new TQRadioButton( i18n("D&elete mail from server"), this ); mIdMap[id(mActionMap[Later])] = Later; mIdMap[id(mActionMap[Down])] = Down; mIdMap[id(mActionMap[Delete])] = Delete; - connect( this, SIGNAL(clicked(int)), - this, SLOT( slotActionClicked(int)) ); + connect( this, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT( slotActionClicked(int)) ); } void KMPopFilterActionWidget::setAction( KMPopFilterAction aAction ) @@ -1330,11 +1330,11 @@ void KMPopFilterActionWidget::reset() void KMFilterDlg::slotImportFilters() { FilterImporterExporter importer( this, bPopFilter ); - QValueList<KMFilter*> filters = importer.importFilters(); + TQValueList<KMFilter*> filters = importer.importFilters(); // FIXME message box how many were imported? if (filters.isEmpty()) return; - QValueListConstIterator<KMFilter*> it; + TQValueListConstIterator<KMFilter*> it; for ( it = filters.constBegin() ; it != filters.constEnd() ; ++it ) { mFilterList->appendFilter( *it ); // no need to deep copy, ownership passes to the list @@ -1344,9 +1344,9 @@ void KMFilterDlg::slotImportFilters() void KMFilterDlg::slotExportFilters() { FilterImporterExporter exporter( this, bPopFilter ); - QValueList<KMFilter*> filters = mFilterList->filtersForSaving(); + TQValueList<KMFilter*> filters = mFilterList->filtersForSaving(); exporter.exportFilters( filters ); - QValueList<KMFilter*>::iterator it; + TQValueList<KMFilter*>::iterator it; for ( it = filters.begin(); it != filters.end(); ++it ) delete *it; } diff --git a/kmail/kmfilterdlg.h b/kmail/kmfilterdlg.h index 9a12b6be4..ab71bc5f5 100644 --- a/kmail/kmfilterdlg.h +++ b/kmail/kmfilterdlg.h @@ -13,14 +13,14 @@ #include <kdialogbase.h> -#include <qvgroupbox.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qstring.h> -#include <qptrlist.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> -#include <qmap.h> +#include <tqvgroupbox.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> +#include <tqmap.h> class KMSearchPatternEdit; class QListBox; @@ -35,7 +35,7 @@ class KListView; /** This is a complex widget that is used to manipulate KMail's filter list. It consists of an internal list of filters, which is a deep - copy of the list KMFilterMgr manages, a QListBox displaying that list, + copy of the list KMFilterMgr manages, a TQListBox displaying that list, and a few buttons used to create new filters, delete them, rename them and change the order of filters. @@ -62,7 +62,7 @@ class KMFilterListBox : public QGroupBox Q_OBJECT public: /** Constuctor. */ - KMFilterListBox( const QString & title, QWidget* parent=0, const char* name=0, bool popFilter = false); + KMFilterListBox( const TQString & title, TQWidget* parent=0, const char* name=0, bool popFilter = false); /** Called from KMFilterDlg. Creates a new filter and presets the first rule with "field equals value". It's there mainly to @@ -70,7 +70,7 @@ public: instead call KMFilterMgr::createFilter. @see KMFilterMgr::createFilter KMFilterDlg::createFilter */ - void createFilter( const QCString & field, const QString & value ); + void createFilter( const TQCString & field, const TQString & value ); /** Loads the filter list and selects the first filter. Should be called when all signals are connected properly. If createDummyFilter @@ -88,7 +88,7 @@ public: /** Returns a list of _copies_ of the current list of filters. * The list owns the contents and thus the caller needs to clean them * up. */ - QValueList<KMFilter*> filtersForSaving() const; + TQValueList<KMFilter*> filtersForSaving() const; signals: /** Emitted when a new filter has been selected by the user or if @@ -151,12 +151,12 @@ protected slots: protected: /** The deep copy of the filter list. */ - QPtrList<KMFilter> mFilterList; + TQPtrList<KMFilter> mFilterList; /** The listbox displaying the filter list. */ - QListBox *mListBox; + TQListBox *mListBox; /** The various action buttons. */ - QPushButton *mBtnNew, *mBtnCopy, *mBtnDelete, *mBtnRename; - QPushButton *mBtnTop, *mBtnUp, *mBtnDown, *mBtnBot; + TQPushButton *mBtnNew, *mBtnCopy, *mBtnDelete, *mBtnRename; + TQPushButton *mBtnTop, *mBtnUp, *mBtnDown, *mBtnBot; /** The index of the currently selected item. */ int mIdxSelItem; bool mShowLater; @@ -173,7 +173,7 @@ private: any derived class that is registered in KMFilterActionDict). It consists of a combo box which allows to select the type of actions this widget should act upon and a - QWidgetStack, which holds the parameter widgets for the different + TQWidgetStack, which holds the parameter widgets for the different rule types. You can load a KMFilterAction into this widget with setAction, @@ -196,7 +196,7 @@ class KMFilterActionWidget : public QHBox public: /** Constructor. Creates a filter action widget with no type selected. */ - KMFilterActionWidget( QWidget* parent=0, const char* name=0 ); + KMFilterActionWidget( TQWidget* parent=0, const char* name=0 ); /** Set an action. The action's type is determined and the corresponding widget it loaded with @p aAction's parameters and @@ -213,21 +213,21 @@ private: subclass. The only reason that these 'slave' actions exist is that they are 'forced' to create parameter widgets for the widget stack and to clear them on setAction. */ - QPtrList<KMFilterAction> mActionList; + TQPtrList<KMFilterAction> mActionList; /** The combo box that contains the labels of all KMFilterActions. It's @p activated(int) signal is internally connected to the @p raiseWidget(int) slot of @p mWidgetStack. */ - QComboBox *mComboBox; + TQComboBox *mComboBox; /** The widget stack that holds all the parameter widgets for the filter actions. */ - QWidgetStack *mWidgetStack; + TQWidgetStack *mWidgetStack; }; class KMPopFilterActionWidget : public QVButtonGroup { Q_OBJECT public: - KMPopFilterActionWidget( const QString &title, QWidget* parent=0, const char* name=0 ); + KMPopFilterActionWidget( const TQString &title, TQWidget* parent=0, const char* name=0 ); void setAction( KMPopFilterAction aAction ); KMPopFilterAction action(); @@ -240,8 +240,8 @@ private slots: private: KMPopFilterAction mAction; KMFilter mFilter; - QMap<KMPopFilterAction, QRadioButton*> mActionMap; - QMap<int, KMPopFilterAction> mIdMap; + TQMap<KMPopFilterAction, TQRadioButton*> mActionMap; + TQMap<int, KMPopFilterAction> mIdMap; signals: // Signals void actionChanged(const KMPopFilterAction aAction); @@ -251,11 +251,11 @@ class KMFilterActionWidgetLister : public KWidgetLister { Q_OBJECT public: - KMFilterActionWidgetLister( QWidget *parent=0, const char* name=0 ); + KMFilterActionWidgetLister( TQWidget *parent=0, const char* name=0 ); virtual ~KMFilterActionWidgetLister(); - void setActionList( QPtrList<KMFilterAction> * aList ); + void setActionList( TQPtrList<KMFilterAction> * aList ); /** Updates the action list according to the current widget values */ void updateActionList() { regenerateActionListFromWidgets(); } @@ -264,12 +264,12 @@ public slots: void reset(); protected: - virtual void clearWidget( QWidget *aWidget ); - virtual QWidget* createWidget( QWidget *parent ); + virtual void clearWidget( TQWidget *aWidget ); + virtual TQWidget* createWidget( TQWidget *parent ); private: void regenerateActionListFromWidgets(); - QPtrList<KMFilterAction> *mActionList; + TQPtrList<KMFilterAction> *mActionList; }; @@ -321,7 +321,7 @@ private: turn delivers it to the KMFilterListBox. If you change the (DocBook) anchor for the filter dialog help, - make sure to change @p const @p QString @p KMFilterDlgHelpAnchor + make sure to change @p const @p TQString @p KMFilterDlgHelpAnchor in kmfilterdlg.cpp accordingly. @short The filter dialog. @@ -337,14 +337,14 @@ public: /** Create the filter dialog. The only class which should be able to do this is KMFilterMgr. This ensures that there is only a single filter dialog */ - KMFilterDlg( QWidget* parent=0, const char* name=0, bool popFilter=false, + KMFilterDlg( TQWidget* parent=0, const char* name=0, bool popFilter=false, bool createDummyFilter=true ); /** Called from KMFilterMgr. Creates a new filter and presets the first rule with "field equals value". Internally forwarded to KMFilterListBox::createFilter. You should instead call KMFilterMgr::createFilter. */ - void createFilter( const QCString & field, const QString & value ) + void createFilter( const TQCString & field, const TQString & value ) { mFilterList->createFilter( field, value ); } public slots: @@ -363,7 +363,7 @@ protected slots: void slotConfigureShortcutButtonToggled( bool aChecked ); void slotCapturedShortcutChanged( const KShortcut& ); void slotConfigureToolbarButtonToggled( bool aChecked ); - void slotFilterActionIconChanged( QString icon ); + void slotFilterActionIconChanged( TQString icon ); void slotReset(); void slotUpdateFilter(); void slotSaveSize(); @@ -396,22 +396,22 @@ protected: KMPopFilterActionWidget *mActionGroup; /** Lets the user select whether to apply this filter on inbound/outbound messages, both, or only on explicit CTRL-J. */ - QCheckBox *mApplyOnIn, *mApplyOnOut, *mApplyOnCtrlJ; + TQCheckBox *mApplyOnIn, *mApplyOnOut, *mApplyOnCtrlJ; /** For a filter applied to inbound messages selects whether to apply this filter to all accounts or to selected accounts only. */ - QRadioButton *mApplyOnForAll, *mApplyOnForTraditional, *mApplyOnForChecked; + TQRadioButton *mApplyOnForAll, *mApplyOnForTraditional, *mApplyOnForChecked; /** ListView that shows the accounts in the advanced tab */ KListView *mAccountList; - QCheckBox *mStopProcessingHere; - QCheckBox *mConfigureShortcut; - QCheckBox *mConfigureToolbar; - QLabel *mFilterActionLabel; + TQCheckBox *mStopProcessingHere; + TQCheckBox *mConfigureShortcut; + TQCheckBox *mConfigureToolbar; + TQLabel *mFilterActionLabel; KIconButton *mFilterActionIconButton; KKeyButton *mKeyButton; - QGroupBox *mAdvOptsGroup; - QVGroupBox *mGlobalsBox; - QCheckBox *mShowLaterBtn; + TQGroupBox *mAdvOptsGroup; + TQVGroupBox *mGlobalsBox; + TQCheckBox *mShowLaterBtn; KMFilter *mFilter; bool bPopFilter; diff --git a/kmail/kmfiltermgr.cpp b/kmail/kmfiltermgr.cpp index c75404f8f..13e5e0f1e 100644 --- a/kmail/kmfiltermgr.cpp +++ b/kmail/kmfiltermgr.cpp @@ -26,8 +26,8 @@ using KMail::MessageProperty; #include <kconfig.h> // other Qt headers -#include <qregexp.h> -#include <qvaluevector.h> +#include <tqregexp.h> +#include <tqvaluevector.h> // other headers #include <assert.h> @@ -44,8 +44,8 @@ KMFilterMgr::KMFilterMgr( bool popFilter ) { if (bPopFilter) kdDebug(5006) << "pPopFilter set" << endl; - connect( kmkernel, SIGNAL( folderRemoved( KMFolder* ) ), - this, SLOT( slotFolderRemoved( KMFolder* ) ) ); + connect( kmkernel, TQT_SIGNAL( folderRemoved( KMFolder* ) ), + this, TQT_SLOT( slotFolderRemoved( KMFolder* ) ) ); } @@ -60,7 +60,7 @@ KMFilterMgr::~KMFilterMgr() void KMFilterMgr::clear() { mDirtyBufferedFolderTarget = true; - for ( QValueListIterator<KMFilter*> it = mFilters.begin() ; + for ( TQValueListIterator<KMFilter*> it = mFilters.begin() ; it != mFilters.end() ; ++it ) { delete *it; } @@ -94,7 +94,7 @@ void KMFilterMgr::writeConfig(bool withSync) } int KMFilterMgr::processPop( KMMessage * msg ) const { - for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); it != mFilters.constEnd() ; ++it ) if ( (*it)->pattern()->matches( msg ) ) return (*it)->action(); @@ -149,7 +149,7 @@ int KMFilterMgr::process( KMMessage * msg, const KMFilter * filter ) { int result = 1; if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); + TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); logText.append( filter->pattern()->asString() ); FilterLog::instance()->add( logText, FilterLog::patternDesc ); } @@ -241,7 +241,7 @@ int KMFilterMgr::process( KMMessage * msg, FilterSet set, if (!beginFiltering( msg )) return 1; - for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); !stopIt && it != mFilters.constEnd() ; ++it ) { if ( ( ( (set&Inbound) && (*it)->applyOnInbound() ) && @@ -252,7 +252,7 @@ int KMFilterMgr::process( KMMessage * msg, FilterSet set, // filter is applicable if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); + TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); logText.append( (*it)->pattern()->asString() ); FilterLog::instance()->add( logText, FilterLog::patternDesc ); } @@ -290,7 +290,7 @@ bool KMFilterMgr::isMatching( Q_UINT32 serNum, const KMFilter *filter ) { bool result = false; if ( FilterLog::instance()->isLogging() ) { - QString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); + TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) ); logText.append( filter->pattern()->asString() ); FilterLog::instance()->add( logText, FilterLog::patternDesc ); } @@ -306,7 +306,7 @@ bool KMFilterMgr::isMatching( Q_UINT32 serNum, const KMFilter *filter ) bool KMFilterMgr::atLeastOneFilterAppliesTo( unsigned int accountID ) const { - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { if ( (*it)->applyOnAccount( accountID ) ) { return true; @@ -317,7 +317,7 @@ bool KMFilterMgr::atLeastOneFilterAppliesTo( unsigned int accountID ) const bool KMFilterMgr::atLeastOneIncomingFilterAppliesTo( unsigned int accountID ) const { - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { if ( (*it)->applyOnInbound() && (*it)->applyOnAccount( accountID ) ) { return true; @@ -333,15 +333,15 @@ bool KMFilterMgr::atLeastOneOnlineImapFolderTarget() mDirtyBufferedFolderTarget = false; - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { KMFilter *filter = *it; - QPtrListIterator<KMFilterAction> jt( *filter->actions() ); + TQPtrListIterator<KMFilterAction> jt( *filter->actions() ); for ( jt.toFirst() ; jt.current() ; ++jt ) { KMFilterActionWithFolder *f = dynamic_cast<KMFilterActionWithFolder*>(*jt); if (!f) continue; - QString name = f->argsAsString(); + TQString name = f->argsAsString(); KMFolder *folder = kmkernel->imapFolderMgr()->findIdString( name ); if (folder) { mBufferedFolderTarget = true; @@ -368,7 +368,7 @@ void KMFilterMgr::deref(bool force) mRefCount = 0; if (mRefCount && !force) return; - QValueVector< KMFolder *>::const_iterator it; + TQValueVector< KMFolder *>::const_iterator it; for ( it = mOpenFolders.constBegin(); it != mOpenFolders.constEnd(); ++it ) (*it)->close("filtermgr"); mOpenFolders.clear(); @@ -389,7 +389,7 @@ int KMFilterMgr::tempOpenFolder(KMFolder* aFolder) //----------------------------------------------------------------------------- -void KMFilterMgr::openDialog( QWidget *, bool checkForEmptyFilterList ) +void KMFilterMgr::openDialog( TQWidget *, bool checkForEmptyFilterList ) { if( !mEditDialog ) { @@ -405,7 +405,7 @@ void KMFilterMgr::openDialog( QWidget *, bool checkForEmptyFilterList ) //----------------------------------------------------------------------------- -void KMFilterMgr::createFilter( const QCString & field, const QString & value ) +void KMFilterMgr::createFilter( const TQCString & field, const TQString & value ) { openDialog( 0, false ); mEditDialog->createFilter( field, value ); @@ -413,22 +413,22 @@ void KMFilterMgr::createFilter( const QCString & field, const QString & value ) //----------------------------------------------------------------------------- -const QString KMFilterMgr::createUniqueName( const QString & name ) +const TQString KMFilterMgr::createUniqueName( const TQString & name ) { - QString uniqueName = name; + TQString uniqueName = name; int counter = 0; bool found = true; while ( found ) { found = false; - for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); it != mFilters.constEnd(); ++it ) { if ( !( (*it)->name().compare( uniqueName ) ) ) { found = true; ++counter; uniqueName = name; - uniqueName += QString( " (" ) + QString::number( counter ) - + QString( ")" ); + uniqueName += TQString( " (" ) + TQString::number( counter ) + + TQString( ")" ); break; } } @@ -438,15 +438,15 @@ const QString KMFilterMgr::createUniqueName( const QString & name ) //----------------------------------------------------------------------------- -void KMFilterMgr::appendFilters( const QValueList<KMFilter*> &filters, +void KMFilterMgr::appendFilters( const TQValueList<KMFilter*> &filters, bool replaceIfNameExists ) { mDirtyBufferedFolderTarget = true; beginUpdate(); if ( replaceIfNameExists ) { - QValueListConstIterator<KMFilter*> it1 = filters.constBegin(); + TQValueListConstIterator<KMFilter*> it1 = filters.constBegin(); for ( ; it1 != filters.constEnd() ; ++it1 ) { - QValueListConstIterator<KMFilter*> it2 = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it2 = mFilters.constBegin(); for ( ; it2 != mFilters.constEnd() ; ++it2 ) { if ( (*it1)->name() == (*it2)->name() ) { mFilters.remove( (*it2) ); @@ -460,7 +460,7 @@ void KMFilterMgr::appendFilters( const QValueList<KMFilter*> &filters, endUpdate(); } -void KMFilterMgr::setFilters( const QValueList<KMFilter*> &filters ) +void KMFilterMgr::setFilters( const TQValueList<KMFilter*> &filters ) { beginUpdate(); clear(); @@ -479,7 +479,7 @@ bool KMFilterMgr::folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder) { mDirtyBufferedFolderTarget = true; bool rem = false; - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) if ( (*it)->folderRemoved(aFolder, aNewFolder) ) rem = true; @@ -493,7 +493,7 @@ bool KMFilterMgr::folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder) void KMFilterMgr::dump(void) const { - QValueListConstIterator<KMFilter*> it = mFilters.constBegin(); + TQValueListConstIterator<KMFilter*> it = mFilters.constBegin(); for ( ; it != mFilters.constEnd() ; ++it ) { kdDebug(5006) << (*it)->asString() << endl; } diff --git a/kmail/kmfiltermgr.h b/kmail/kmfiltermgr.h index 0c38b4a88..9822c96d3 100644 --- a/kmail/kmfiltermgr.h +++ b/kmail/kmfiltermgr.h @@ -23,8 +23,8 @@ #include "kmfilteraction.h" // for KMFilterAction::ReturnCode #include "kmfolder.h" -#include <qguardedptr.h> -#include <qobject.h> +#include <tqguardedptr.h> +#include <tqobject.h> class KMFilter; class KMFilterDlg; @@ -54,11 +54,11 @@ public: /** Open an edit dialog. If checkForEmptyFilterList is true, an empty filter is created to improve the visibility of the dialog in case no filter has been defined so far. */ - void openDialog( QWidget *parent, bool checkForEmptyFilterList = true ); + void openDialog( TQWidget *parent, bool checkForEmptyFilterList = true ); /** Open an edit dialog, create a new filter and preset the first rule with "field equals value" */ - void createFilter( const QCString & field, const QString & value ); + void createFilter( const TQCString & field, const TQString & value ); bool beginFiltering(KMMsgBase *msgBase) const; int moveMessage(KMMessage *msg) const; @@ -83,20 +83,20 @@ public: /** Check for existing filters with the &p name and extend the "name" to "name (i)" until no match is found for i=1..n */ - const QString createUniqueName( const QString & name ); + const TQString createUniqueName( const TQString & name ); /** Append the list of filters to the current list of filters and write everything back into the configuration. The filter manager takes ownership of the filters in the list. */ - void appendFilters( const QValueList<KMFilter*> &filters, + void appendFilters( const TQValueList<KMFilter*> &filters, bool replaceIfNameExists = false ); /** Replace the list of filters under control of the filter manager. * The manager takes ownershipt of the filters. */ - void setFilters( const QValueList<KMFilter*> &filters ); + void setFilters( const TQValueList<KMFilter*> &filters ); /** @return the list of filters managed by this object */ - const QValueList<KMFilter*> & filters() const { return mFilters; } + const TQValueList<KMFilter*> & filters() const { return mFilters; } /** Process given message by applying the filter rules one by one. You can select which set of filters (incoming or outgoing) @@ -184,9 +184,9 @@ private: /** Find out if a message matches the filter criteria */ bool isMatching( Q_UINT32 serNum, const KMFilter *filter ); - QGuardedPtr<KMFilterDlg> mEditDialog; - QValueVector<KMFolder *> mOpenFolders; - QValueList<KMFilter *> mFilters; + TQGuardedPtr<KMFilterDlg> mEditDialog; + TQValueVector<KMFolder *> mOpenFolders; + TQValueList<KMFilter *> mFilters; bool bPopFilter; bool mShowLater; bool mDirtyBufferedFolderTarget; diff --git a/kmail/kmfolder.cpp b/kmail/kmfolder.cpp index 71b9cfc89..cae870710 100644 --- a/kmail/kmfolder.cpp +++ b/kmail/kmfolder.cpp @@ -41,11 +41,11 @@ #include <klocale.h> #include <kshortcut.h> #include <kmessagebox.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqfile.h> +#include <tqfileinfo.h> -KMFolder::KMFolder( KMFolderDir* aParent, const QString& aFolderName, +KMFolder::KMFolder( KMFolderDir* aParent, const TQString& aFolderName, KMFolderType aFolderType, bool withIndex, bool exportedSernums ) : KMFolderNode( aParent, aFolderName ), mStorage(0), mChild( 0 ), @@ -76,60 +76,60 @@ KMFolder::KMFolder( KMFolderDir* aParent, const QString& aFolderName, assert( mStorage ); - QFileInfo dirinfo; + TQFileInfo dirinfo; dirinfo.setFile( mStorage->location() ); if ( !dirinfo.exists() ) { int rc = mStorage->create(); - QString msg = i18n("<qt>Error while creating file <b>%1</b>:<br>%2</qt>").arg(aFolderName).arg(strerror(rc)); + TQString msg = i18n("<qt>Error while creating file <b>%1</b>:<br>%2</qt>").arg(aFolderName).arg(strerror(rc)); if ( rc ) { KMessageBox::information(0, msg); } } if ( aParent ) { - connect( mStorage, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), - aParent->manager(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) ); - connect( mStorage, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), - parent()->manager(), SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) ); - connect( this, SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ), - parent()->manager(), SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ) ); - connect( this, SIGNAL( msgHeaderChanged( KMFolder*, int ) ), - parent()->manager(), SIGNAL( msgHeaderChanged( KMFolder*, int ) ) ); - connect( mStorage, SIGNAL( invalidated( KMFolder* ) ), - parent()->manager(), SIGNAL( folderInvalidated( KMFolder* ) ) ); + connect( mStorage, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), + aParent->manager(), TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) ); + connect( mStorage, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), + parent()->manager(), TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) ); + connect( this, TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ), + parent()->manager(), TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ) ); + connect( this, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ), + parent()->manager(), TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ) ); + connect( mStorage, TQT_SIGNAL( invalidated( KMFolder* ) ), + parent()->manager(), TQT_SIGNAL( folderInvalidated( KMFolder* ) ) ); } // Resend all mStorage signals - connect( mStorage, SIGNAL( changed() ), SIGNAL( changed() ) ); - connect( mStorage, SIGNAL( cleared() ), SIGNAL( cleared() ) ); - connect( mStorage, SIGNAL( expunged( KMFolder* ) ), - SIGNAL( expunged( KMFolder* ) ) ); - connect( mStorage, SIGNAL( nameChanged() ), SIGNAL( nameChanged() ) ); - connect( mStorage, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), - SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) ); - connect( mStorage, SIGNAL( msgRemoved( int, QString ) ), - SIGNAL( msgRemoved( int, QString ) ) ); - connect( mStorage, SIGNAL( msgRemoved( KMFolder* ) ), - SIGNAL( msgRemoved( KMFolder* ) ) ); - connect( mStorage, SIGNAL( msgAdded( int ) ), SIGNAL( msgAdded( int ) ) ); - connect( mStorage, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), - SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) ); - connect( mStorage, SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ), - SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ) ); - connect( mStorage, SIGNAL( msgHeaderChanged( KMFolder*, int ) ), - SIGNAL( msgHeaderChanged( KMFolder*, int ) ) ); - connect( mStorage, SIGNAL( statusMsg( const QString& ) ), - SIGNAL( statusMsg( const QString& ) ) ); - connect( mStorage, SIGNAL( numUnreadMsgsChanged( KMFolder* ) ), - SIGNAL( numUnreadMsgsChanged( KMFolder* ) ) ); - connect( mStorage, SIGNAL( removed( KMFolder*, bool ) ), - SIGNAL( removed( KMFolder*, bool ) ) ); - - connect( mStorage, SIGNAL( contentsTypeChanged( KMail::FolderContentsType ) ), - this, SLOT( slotContentsTypeChanged( KMail::FolderContentsType ) ) ); - - connect( mStorage, SIGNAL( folderSizeChanged() ), - this, SLOT( slotFolderSizeChanged() ) ); + connect( mStorage, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) ); + connect( mStorage, TQT_SIGNAL( cleared() ), TQT_SIGNAL( cleared() ) ); + connect( mStorage, TQT_SIGNAL( expunged( KMFolder* ) ), + TQT_SIGNAL( expunged( KMFolder* ) ) ); + connect( mStorage, TQT_SIGNAL( nameChanged() ), TQT_SIGNAL( nameChanged() ) ); + connect( mStorage, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), + TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) ); + connect( mStorage, TQT_SIGNAL( msgRemoved( int, TQString ) ), + TQT_SIGNAL( msgRemoved( int, TQString ) ) ); + connect( mStorage, TQT_SIGNAL( msgRemoved( KMFolder* ) ), + TQT_SIGNAL( msgRemoved( KMFolder* ) ) ); + connect( mStorage, TQT_SIGNAL( msgAdded( int ) ), TQT_SIGNAL( msgAdded( int ) ) ); + connect( mStorage, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), + TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) ); + connect( mStorage, TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ), + TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ) ); + connect( mStorage, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ), + TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ) ); + connect( mStorage, TQT_SIGNAL( statusMsg( const TQString& ) ), + TQT_SIGNAL( statusMsg( const TQString& ) ) ); + connect( mStorage, TQT_SIGNAL( numUnreadMsgsChanged( KMFolder* ) ), + TQT_SIGNAL( numUnreadMsgsChanged( KMFolder* ) ) ); + connect( mStorage, TQT_SIGNAL( removed( KMFolder*, bool ) ), + TQT_SIGNAL( removed( KMFolder*, bool ) ) ); + + connect( mStorage, TQT_SIGNAL( contentsTypeChanged( KMail::FolderContentsType ) ), + this, TQT_SLOT( slotContentsTypeChanged( KMail::FolderContentsType ) ) ); + + connect( mStorage, TQT_SIGNAL( folderSizeChanged() ), + this, TQT_SLOT( slotFolderSizeChanged() ) ); //FIXME: Centralize all the readConfig calls somehow - Zack // Meanwhile, readConfig must be done before registerWithMessageDict, since @@ -186,7 +186,7 @@ void KMFolder::readConfig( KConfig* config ) if ( mUseCustomIcons ) emit iconsChanged(); - QString shortcut( config->readEntry( "Shortcut" ) ); + TQString shortcut( config->readEntry( "Shortcut" ) ); if ( !shortcut.isEmpty() ) { KShortcut sc( shortcut ); setShortcut( sc ); @@ -231,24 +231,24 @@ KMFolderType KMFolder::folderType() const return mStorage ? mStorage->folderType() : KMFolderTypeUnknown; } -QString KMFolder::fileName() const +TQString KMFolder::fileName() const { - return mStorage ? mStorage->fileName() : QString::null; + return mStorage ? mStorage->fileName() : TQString::null; } -QString KMFolder::location() const +TQString KMFolder::location() const { - return mStorage ? mStorage->location() : QString::null; + return mStorage ? mStorage->location() : TQString::null; } -QString KMFolder::indexLocation() const +TQString KMFolder::indexLocation() const { - return mStorage ? mStorage->indexLocation() : QString::null; + return mStorage ? mStorage->indexLocation() : TQString::null; } -QString KMFolder::subdirLocation() const +TQString KMFolder::subdirLocation() const { - QString sLocation( path() ); + TQString sLocation( path() ); if( !sLocation.isEmpty() ) sLocation += '/'; @@ -262,13 +262,13 @@ KMFolderDir* KMFolder::createChildFolder() if( mChild ) return mChild; - QString childName = "." + fileName() + ".directory"; - QString childDir = path() + "/" + childName; - if (access(QFile::encodeName(childDir), W_OK) != 0) // Not there or not writable + TQString childName = "." + fileName() + ".directory"; + TQString childDir = path() + "/" + childName; + if (access(TQFile::encodeName(childDir), W_OK) != 0) // Not there or not writable { - if (mkdir(QFile::encodeName(childDir), S_IRWXU) != 0 - && chmod(QFile::encodeName(childDir), S_IRWXU) != 0) { - QString wmsg = QString(" '%1': %2").arg(childDir).arg(strerror(errno)); + if (mkdir(TQFile::encodeName(childDir), S_IRWXU) != 0 + && chmod(TQFile::encodeName(childDir), S_IRWXU) != 0) { + TQString wmsg = TQString(" '%1': %2").arg(childDir).arg(strerror(errno)); KMessageBox::information(0,i18n("Failed to create folder") + wmsg); return 0; } @@ -340,14 +340,14 @@ void KMFolder::ignoreJobsForMessage( KMMessage* m ) } FolderJob* KMFolder::createJob( KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString partSpecifier, + KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as ) const { return mStorage->createJob( msg, jt, folder, partSpecifier, as ); } -FolderJob* KMFolder::createJob( QPtrList<KMMessage>& msgList, - const QString& sets, +FolderJob* KMFolder::createJob( TQPtrList<KMMessage>& msgList, + const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const { return mStorage->createJob( msgList, sets, jt, folder ); @@ -378,7 +378,7 @@ KMMessage* KMFolder::take( int idx ) return mStorage->take( idx ); } -void KMFolder::take( QPtrList<KMMessage> msgList ) // TODO const ref +void KMFolder::take( TQPtrList<KMMessage> msgList ) // TODO const ref { mStorage->take( msgList ); } @@ -393,7 +393,7 @@ int KMFolder::addMsgKeepUID( KMMessage* msg, int* index_return ) return mStorage->addMsgKeepUID( msg, index_return ); } -int KMFolder::addMsg( QPtrList<KMMessage>& list, QValueList<int>& index_return ) +int KMFolder::addMsg( TQPtrList<KMMessage>& list, TQValueList<int>& index_return ) { return mStorage->addMsg( list, index_return ); } @@ -408,7 +408,7 @@ void KMFolder::removeMsg( int i, bool imapQuiet ) mStorage->removeMsg( i, imapQuiet ); } -void KMFolder::removeMsg( QPtrList<KMMessage> msgList, bool imapQuiet ) // TODO const ref +void KMFolder::removeMsg( TQPtrList<KMMessage> msgList, bool imapQuiet ) // TODO const ref { mStorage->removeMsg( msgList, imapQuiet ); } @@ -423,7 +423,7 @@ int KMFolder::moveMsg( KMMessage* msg, int* index_return ) return mStorage->moveMsg( msg, index_return ); } -int KMFolder::moveMsg(QPtrList<KMMessage> q, int* index_return ) +int KMFolder::moveMsg(TQPtrList<KMMessage> q, int* index_return ) { return mStorage->moveMsg( q, index_return ); } @@ -456,7 +456,7 @@ int KMFolder::countUnreadRecursive() if (!dir) return count; - QPtrListIterator<KMFolderNode> it(*dir); + TQPtrListIterator<KMFolderNode> it(*dir); for ( ; it.current(); ++it ) if (!it.current()->isDir()) { folder = static_cast<KMFolder*>(it.current()); @@ -524,7 +524,7 @@ int KMFolder::expunge() return mStorage->expunge(); } -int KMFolder::rename( const QString& newName, KMFolderDir *aParent ) +int KMFolder::rename( const TQString& newName, KMFolderDir *aParent ) { return mStorage->rename( newName, aParent ); } @@ -559,7 +559,7 @@ bool KMFolder::isReadOnly() const return mStorage->isReadOnly(); } -QString KMFolder::label() const +TQString KMFolder::label() const { if ( !mSystemLabel.isEmpty() ) return mSystemLabel; @@ -571,9 +571,9 @@ QString KMFolder::label() const } //----------------------------------------------------------------------------- -QString KMFolder::prettyURL() const +TQString KMFolder::prettyURL() const { - QString parentUrl; + TQString parentUrl; if ( parent() ) parentUrl = parent()->prettyURL(); if ( !parentUrl.isEmpty() ) @@ -583,7 +583,7 @@ QString KMFolder::prettyURL() const } //-------------------------------------------------------------------------- -QString KMFolder::mailingListPostAddress() const +TQString KMFolder::mailingListPostAddress() const { if ( mMailingList.features() & MailingList::Post ) { KURL::List::const_iterator it; @@ -595,7 +595,7 @@ QString KMFolder::mailingListPostAddress() const return (*it).path(); } } - return QString::null; + return TQString::null; } void KMFolder::setMailingListEnabled( bool enabled ) @@ -626,7 +626,7 @@ uint KMFolder::identity() const return mIdentity; } -void KMFolder::setWhoField(const QString& aWhoField ) +void KMFolder::setWhoField(const TQString& aWhoField ) { mWhoField = aWhoField; #if 0 @@ -635,7 +635,7 @@ void KMFolder::setWhoField(const QString& aWhoField ) #endif } -void KMFolder::setUserWhoField( const QString& whoField, bool writeConfig ) +void KMFolder::setUserWhoField( const TQString& whoField, bool writeConfig ) { if ( mUserWhoField == whoField ) return; @@ -683,19 +683,19 @@ void KMFolder::correctUnreadMsgsCount() mStorage->correctUnreadMsgsCount(); } -QString KMFolder::idString() const +TQString KMFolder::idString() const { KMFolderNode* folderNode = parent(); if (!folderNode) return ""; while ( folderNode->parent() ) folderNode = folderNode->parent(); - QString myPath = path(); + TQString myPath = path(); int pathLen = myPath.length() - folderNode->path().length(); - QString relativePath = myPath.right( pathLen ); + TQString relativePath = myPath.right( pathLen ); if (!relativePath.isEmpty()) relativePath = relativePath.right( relativePath.length() - 1 ) + "/"; - QString escapedName = name(); + TQString escapedName = name(); /* Escape [ and ] as they are disallowed for kconfig sections and that is what the idString is primarily used for. */ escapedName.replace( "[", "%(" ); @@ -750,7 +750,7 @@ void KMFolder::setExpireAction( ExpireAction a ) } } -void KMFolder::setExpireToFolderId( const QString& id ) +void KMFolder::setExpireToFolderId( const TQString& id ) { if ( id != mExpireToFolderId ) { mExpireToFolderId = id; @@ -814,14 +814,14 @@ void KMFolder::setStatus( int idx, KMMsgStatus status, bool toggle ) mStorage->setStatus( idx, status, toggle ); } -void KMFolder::setStatus( QValueList<int>& ids, KMMsgStatus status, +void KMFolder::setStatus( TQValueList<int>& ids, KMMsgStatus status, bool toggle ) { mStorage->setStatus( ids, status, toggle); } -void KMFolder::setIconPaths( const QString &normalPath, - const QString &unreadPath ) +void KMFolder::setIconPaths( const TQString &normalPath, + const TQString &unreadPath ) { mNormalIconPath = normalPath; mUnreadIconPath = unreadPath; diff --git a/kmail/kmfolder.h b/kmail/kmfolder.h index db13ae8c3..4c7a2133b 100644 --- a/kmail/kmfolder.h +++ b/kmail/kmfolder.h @@ -36,7 +36,7 @@ using KMail::MailingList; #include "mimelib/string.h" -#include <qptrvector.h> +#include <tqptrvector.h> #include <sys/types.h> #include <stdio.h> #include <kshortcut.h> @@ -53,7 +53,7 @@ namespace KMail { } using KMail::AttachmentStrategy; -typedef QValueList<Q_UINT32> SerNumList; +typedef TQValueList<Q_UINT32> SerNumList; /** Mail folder. * (description will be here). @@ -86,7 +86,7 @@ public: * the global MsgDict for lookup. * @return A new folder instance. */ - KMFolder( KMFolderDir* parent, const QString& name, + KMFolder( KMFolderDir* parent, const TQString& name, KMFolderType aFolderType, bool withIndex = true, bool exportedSernums = true ); ~KMFolder(); @@ -140,16 +140,16 @@ public: KMFolderType folderType() const; /** Returns the filename of the folder (reimplemented in KMFolderImap) */ - QString fileName() const; + TQString fileName() const; /** Returns full path to folder file */ - QString location() const; + TQString location() const; /** Returns full path to index file */ - QString indexLocation() const; + TQString indexLocation() const; /** Returns full path to sub directory file */ - QString subdirLocation() const; + TQString subdirLocation() const; /** Returns the folder directory associated with this node or 0 if no such directory exists */ @@ -196,9 +196,9 @@ public: * for each derived KMFolder). */ 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; - FolderJob* createJob( QPtrList<KMMessage>& msgList, const QString& sets, + FolderJob* createJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt = FolderJob::tGetMessage, KMFolder *folder = 0 ) const; @@ -218,7 +218,7 @@ public: /** Detach message from this folder. Usable to call addMsg() afterwards. Loads the message if it is not loaded up to now. */ KMMessage* take(int idx); - void take(QPtrList<KMMessage> msgList); + void take(TQPtrList<KMMessage> msgList); /** Add the given message to the folder. Usually the message is added at the end of the folder. Returns zero on success and @@ -237,7 +237,7 @@ public: * Adds the given messages to the folder. Behaviour is identical * to addMsg(msg) */ - int addMsg(QPtrList<KMMessage>&, QValueList<int>& index_return); + int addMsg(TQPtrList<KMMessage>&, TQValueList<int>& index_return); /** Called by derived classes implementation of addMsg. Emits msgAdded signals */ @@ -245,7 +245,7 @@ public: /** Remove (first occurrence of) given message from the folder. */ void removeMsg(int i, bool imapQuiet = false); - void removeMsg(QPtrList<KMMessage> msgList, bool imapQuiet = false); + void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = false); /** Delete messages in the folder that are older than days. Return the * number of deleted messages. */ @@ -256,7 +256,7 @@ public: code on failure. The index of the new message is stored in index_return if given. */ int moveMsg(KMMessage* msg, int* index_return = 0); - int moveMsg(QPtrList<KMMessage>, int* index_return = 0); + int moveMsg(TQPtrList<KMMessage>, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ int find(const KMMsgBase* msg) const; @@ -327,7 +327,7 @@ public: /** Physically rename the folder. Returns zero on success and an errno on failure. */ - int rename(const QString& newName, KMFolderDir *aParent = 0); + int rename(const TQString& newName, KMFolderDir *aParent = 0); /** Returns true if the table of contents is dirty. This happens when a message is deleted from the folder. The toc will then be re-created @@ -362,15 +362,15 @@ public: void setSystemFolder(bool itIs) { mIsSystemFolder=itIs; } /** Returns the label of the folder for visualization. */ - virtual QString label() const; - void setLabel( const QString& l ) { mLabel = l; } + virtual TQString label() const; + void setLabel( const TQString& l ) { mLabel = l; } /** Set the label that is used as a system default */ - virtual QString systemLabel() const { return mSystemLabel; } - void setSystemLabel( const QString& l ) { mSystemLabel = l; } + virtual TQString systemLabel() const { return mSystemLabel; } + void setSystemLabel( const TQString& l ) { mSystemLabel = l; } /** URL of the node for visualization purposes. */ - virtual QString prettyURL() const; + virtual TQString prettyURL() const; /** Returns true if this folder is associated with a mailing-list. */ void setMailingListEnabled( bool enabled ); @@ -379,24 +379,24 @@ public: void setMailingList( const MailingList& mlist ); MailingList mailingList() const { return mMailingList; } - QString mailingListPostAddress() const; + TQString mailingListPostAddress() const; void setIdentity(uint identity); uint identity() const; /** Get / set the name of the field that is used for the Sender/Receiver column in the headers (From/To) */ - QString whoField() const { return mWhoField; } - void setWhoField(const QString& aWhoField); + TQString whoField() const { return mWhoField; } + void setWhoField(const TQString& aWhoField); /** Get / set the user-settings for the WhoField (From/To/Empty) */ - QString userWhoField(void) { return mUserWhoField; } - void setUserWhoField(const QString &whoField,bool writeConfig=true); + TQString userWhoField(void) { return mUserWhoField; } + void setUserWhoField(const TQString &whoField,bool writeConfig=true); /** A cludge to help make sure the count of unread messges is kept in sync */ void correctUnreadMsgsCount(); /** Returns a string that can be used to identify this folder */ - QString idString() const; + TQString idString() const; /** * Set whether this folder automatically expires messages. @@ -468,8 +468,8 @@ public: /** * If expiry should move to folder, return the ID of that folder */ - QString expireToFolderId() const { return mExpireToFolderId; } - void setExpireToFolderId( const QString& id ); + TQString expireToFolderId() const { return mExpireToFolderId; } + void setExpireToFolderId( const TQString& id ); /** * Expire old messages in this folder. @@ -484,15 +484,15 @@ public: /** Set the status of the message at index @p idx to @p status. */ void setStatus(int idx, KMMsgStatus status, bool toggle=false); - /** Set the status of the message(s) in the QValueList @p ids to @p status. */ - void setStatus(QValueList<int>& ids, KMMsgStatus status, bool toggle=false); + /** Set the status of the message(s) in the TQValueList @p ids to @p status. */ + void setStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle=false); /** Icon related methods */ bool useCustomIcons() const { return mUseCustomIcons; } void setUseCustomIcons(bool useCustomIcons) { mUseCustomIcons = useCustomIcons; } - QString normalIconPath() const { return mNormalIconPath; } - QString unreadIconPath() const { return mUnreadIconPath; } - void setIconPaths(const QString &normalPath, const QString &unreadPath); + TQString normalIconPath() const { return mNormalIconPath; } + TQString unreadIconPath() const { return mUnreadIconPath; } + void setIconPaths(const TQString &normalPath, const TQString &unreadPath); void removeJobs(); @@ -562,7 +562,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. */ @@ -576,7 +576,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* ); @@ -616,9 +616,9 @@ private: bool mExportsSernums :1; bool mMoveInProgress :1; - /** nationalized label or QString::null (then name() should be used) */ - QString mLabel; - QString mSystemLabel; + /** nationalized label or TQString::null (then name() should be used) */ + TQString mLabel; + TQString mSystemLabel; /** Support for automatic expiry of old messages */ bool mExpireMessages; // true if old messages are expired @@ -627,12 +627,12 @@ private: ExpireUnits mUnreadExpireUnits; ExpireUnits mReadExpireUnits; ExpireAction mExpireAction; - QString mExpireToFolderId; + TQString mExpireToFolderId; /** Icon related variables */ bool mUseCustomIcons; - QString mNormalIconPath; - QString mUnreadIconPath; + TQString mNormalIconPath; + TQString mUnreadIconPath; /** Mailing list attributes */ bool mMailingListEnabled; @@ -643,7 +643,7 @@ private: uint mIdentity; /** name of the field that is used for "From" in listbox */ - QString mWhoField, mUserWhoField; + TQString mWhoField, mUserWhoField; /** Should replies to messages in this folder be put in here? */ bool mPutRepliesInSameFolder; diff --git a/kmail/kmfoldercachedimap.cpp b/kmail/kmfoldercachedimap.cpp index 405176c4e..05f01b778 100644 --- a/kmail/kmfoldercachedimap.cpp +++ b/kmail/kmfoldercachedimap.cpp @@ -35,7 +35,7 @@ #include <errno.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "kmkernel.h" #include "kmfoldercachedimap.h" @@ -69,15 +69,15 @@ using KMail::ListJob; #include <kconfig.h> #include <kio/global.h> #include <kio/scheduler.h> -#include <qbuffer.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qfile.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qvaluelist.h> +#include <tqbuffer.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqfile.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqvaluelist.h> #include "annotationjobs.h" #include "quotajobs.h" using namespace KMail; @@ -86,32 +86,32 @@ using namespace KMail; #define UIDCACHE_VERSION 1 #define MAIL_LOSS_DEBUGGING 0 -static QString incidencesForToString( KMFolderCachedImap::IncidencesFor r ) { +static TQString incidencesForToString( KMFolderCachedImap::IncidencesFor r ) { switch (r) { case KMFolderCachedImap::IncForNobody: return "nobody"; case KMFolderCachedImap::IncForAdmins: return "admins"; case KMFolderCachedImap::IncForReaders: return "readers"; } - return QString::null; // can't happen + return TQString::null; // can't happen } -static KMFolderCachedImap::IncidencesFor incidencesForFromString( const QString& str ) { +static KMFolderCachedImap::IncidencesFor incidencesForFromString( const TQString& str ) { if ( str == "nobody" ) return KMFolderCachedImap::IncForNobody; if ( str == "admins" ) return KMFolderCachedImap::IncForAdmins; if ( str == "readers" ) return KMFolderCachedImap::IncForReaders; return KMFolderCachedImap::IncForAdmins; // by default } -DImapTroubleShootDialog::DImapTroubleShootDialog( QWidget* parent, +DImapTroubleShootDialog::DImapTroubleShootDialog( TQWidget* parent, const char* name ) : KDialogBase( Plain, i18n( "Troubleshooting IMAP Cache" ), Ok | Cancel, Cancel, parent, name, true ), rc( None ) { - QFrame* page = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0 ); + TQFrame* page = plainPage(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0 ); // spell "lose" correctly. but don't cause a fuzzy. - QString txt = i18n( "<p><b>Troubleshooting the IMAP cache.</b></p>" + TQString txt = i18n( "<p><b>Troubleshooting the IMAP cache.</b></p>" "<p>If you have problems with synchronizing an IMAP " "folder, you should first try rebuilding the index " "file. This will take some time to rebuild, but will " @@ -127,36 +127,36 @@ DImapTroubleShootDialog::DImapTroubleShootDialog( QWidget* parent, "you can try refreshing the IMAP cache. If you do this, " "you will lose all your local changes for this folder " "and all its subfolders.</p>" ); - topLayout->addWidget( new QLabel( txt, page ) ); + topLayout->addWidget( new TQLabel( txt, page ) ); - QButtonGroup *group = new QButtonGroup( 0 ); + TQButtonGroup *group = new TQButtonGroup( 0 ); - mIndexButton = new QRadioButton( page ); + mIndexButton = new TQRadioButton( page ); mIndexButton->setText( i18n( "Rebuild &Index" ) ); group->insert( mIndexButton ); topLayout->addWidget( mIndexButton ); - QHBox *hbox = new QHBox( page ); - QLabel *scopeLabel = new QLabel( i18n( "Scope:" ), hbox ); + TQHBox *hbox = new TQHBox( page ); + TQLabel *scopeLabel = new TQLabel( i18n( "Scope:" ), hbox ); scopeLabel->setEnabled( false ); - mIndexScope = new QComboBox( hbox ); + mIndexScope = new TQComboBox( hbox ); mIndexScope->insertItem( i18n( "Only current folder" ) ); mIndexScope->insertItem( i18n( "Current folder and all subfolders" ) ); mIndexScope->insertItem( i18n( "All folders of this account" ) ); mIndexScope->setEnabled( false ); topLayout->addWidget( hbox ); - mCacheButton = new QRadioButton( page ); + mCacheButton = new TQRadioButton( page ); mCacheButton->setText( i18n( "Refresh &Cache" ) ); group->insert( mCacheButton ); topLayout->addWidget( mCacheButton ); enableButtonSeparator( true ); - connect ( mIndexButton, SIGNAL(toggled(bool)), mIndexScope, SLOT(setEnabled(bool)) ); - connect ( mIndexButton, SIGNAL(toggled(bool)), scopeLabel, SLOT(setEnabled(bool)) ); + connect ( mIndexButton, TQT_SIGNAL(toggled(bool)), mIndexScope, TQT_SLOT(setEnabled(bool)) ); + connect ( mIndexButton, TQT_SIGNAL(toggled(bool)), scopeLabel, TQT_SLOT(setEnabled(bool)) ); - connect( this, SIGNAL( okClicked () ), this, SLOT( slotDone() ) ); + connect( this, TQT_SIGNAL( okClicked () ), this, TQT_SLOT( slotDone() ) ); } int DImapTroubleShootDialog::run() @@ -198,14 +198,14 @@ KMFolderCachedImap::KMFolderCachedImap( KMFolder* folder, const char* aName ) setUidValidity(""); // if we fail to read a uid file but there is one, nuke it if ( readUidCache() == -1 ) { - if ( QFile::exists( uidCacheLocation() ) ) { + if ( TQFile::exists( uidCacheLocation() ) ) { KMessageBox::error( 0, i18n( "The UID cache file for folder %1 could not be read. There " "could be a problem with file system permission, or it is corrupted." ).arg( folder->prettyURL() ) ); // try to unlink it, in case it was corruped. If it couldn't be read // because of permissions, this will fail, which is fine - unlink( QFile::encodeName( uidCacheLocation() ) ); + unlink( TQFile::encodeName( uidCacheLocation() ) ); } } @@ -239,7 +239,7 @@ void KMFolderCachedImap::readConfig() KConfig* config = KMKernel::config(); KConfigGroupSaver saver( config, "Folder-" + folder()->idString() ); if( mImapPath.isEmpty() ) mImapPath = config->readEntry( "ImapPath" ); - if( QString( name() ).upper() == "INBOX" && mImapPath == "/INBOX/" ) + if( TQString( name() ).upper() == "INBOX" && mImapPath == "/INBOX/" ) { folder()->setLabel( i18n( "inbox" ) ); // for the icon @@ -268,7 +268,7 @@ void KMFolderCachedImap::readConfig() int storageQuotaUsage = config->readNumEntry( "StorageQuotaUsage", -1 ); int storageQuotaLimit = config->readNumEntry( "StorageQuotaLimit", -1 ); - QString storageQuotaRoot = config->readEntry( "StorageQuotaRoot", QString::null ); + TQString storageQuotaRoot = config->readEntry( "StorageQuotaRoot", TQString::null ); if ( !storageQuotaRoot.isNull() ) { // isEmpty() means we know there is no quota set mQuotaInfo.setName( "STORAGE" ); mQuotaInfo.setRoot( storageQuotaRoot ); @@ -290,11 +290,11 @@ void KMFolderCachedImap::readConfig() mImapPathCreation = config->readEntry("ImapPathCreation"); } - QStringList uids = config->readListEntry( "UIDSDeletedSinceLastSync" ); + TQStringList uids = config->readListEntry( "UIDSDeletedSinceLastSync" ); #if MAIL_LOSS_DEBUGGING kdDebug( 5006 ) << "READING IN UIDSDeletedSinceLastSync: " << folder()->prettyURL() << endl << uids << endl; #endif - for ( QStringList::iterator it = uids.begin(); it != uids.end(); it++ ) { + for ( TQStringList::iterator it = uids.begin(); it != uids.end(); it++ ) { mDeletedUIDsSinceLastSync.insert( (*it).toULong(), 0); } } @@ -320,10 +320,10 @@ void KMFolderCachedImap::writeConfig() } } if ( !mDeletedUIDsSinceLastSync.isEmpty() ) { - QValueList<ulong> uids = mDeletedUIDsSinceLastSync.keys(); - QStringList uidstrings; - for( QValueList<ulong>::iterator it = uids.begin(); it != uids.end(); it++ ) { - uidstrings.append( QString::number( (*it) ) ); + TQValueList<ulong> uids = mDeletedUIDsSinceLastSync.keys(); + TQStringList uidstrings; + for( TQValueList<ulong>::iterator it = uids.begin(); it != uids.end(); it++ ) { + uidstrings.append( TQString::number( (*it) ) ); } configGroup.writeEntry( "UIDSDeletedSinceLastSync", uidstrings ); #if MAIL_LOSS_DEBUGGING @@ -377,26 +377,26 @@ void KMFolderCachedImap::remove() { mFolderRemoved = true; - QString part1 = folder()->path() + "/." + dotEscape(name()); - QString uidCacheFile = part1 + ".uidcache"; + TQString part1 = folder()->path() + "/." + dotEscape(name()); + TQString uidCacheFile = part1 + ".uidcache"; // This is the account folder of an account that was just removed // When this happens, be sure to delete all traces of the cache - if( QFile::exists(uidCacheFile) ) - unlink( QFile::encodeName( uidCacheFile ) ); + if( TQFile::exists(uidCacheFile) ) + unlink( TQFile::encodeName( uidCacheFile ) ); FolderStorage::remove(); } -QString KMFolderCachedImap::uidCacheLocation() const +TQString KMFolderCachedImap::uidCacheLocation() const { - QString sLocation(folder()->path()); + TQString sLocation(folder()->path()); if (!sLocation.isEmpty()) sLocation += '/'; return sLocation + '.' + dotEscape(fileName()) + ".uidcache"; } int KMFolderCachedImap::readUidCache() { - QFile uidcache( uidCacheLocation() ); + TQFile uidcache( uidCacheLocation() ); if( uidcache.open( IO_ReadOnly ) ) { char buf[1024]; int len = uidcache.readLine( buf, sizeof(buf) ); @@ -406,14 +406,14 @@ int KMFolderCachedImap::readUidCache() if( cacheVersion == UIDCACHE_VERSION ) { len = uidcache.readLine( buf, sizeof(buf) ); if( len > 0 ) { - setUidValidity( QString::fromLocal8Bit(buf).stripWhiteSpace() ); + setUidValidity( TQString::fromLocal8Bit(buf).stripWhiteSpace() ); len = uidcache.readLine( buf, sizeof(buf) ); if( len > 0 ) { #if MAIL_LOSS_DEBUGGING - kdDebug(5006) << "Reading in last uid from cache: " << QString::fromLocal8Bit(buf).stripWhiteSpace() << " in " << folder()->prettyURL() << endl; + kdDebug(5006) << "Reading in last uid from cache: " << TQString::fromLocal8Bit(buf).stripWhiteSpace() << " in " << folder()->prettyURL() << endl; #endif // load the last known highest uid from the on disk cache - setLastUid( QString::fromLocal8Bit(buf).stripWhiteSpace().toULong() ); + setLastUid( TQString::fromLocal8Bit(buf).stripWhiteSpace().toULong() ); return 0; } } @@ -427,16 +427,16 @@ int KMFolderCachedImap::writeUidCache() { if( uidValidity().isEmpty() || uidValidity() == "INVALID" ) { // No info from the server yet, remove the file. - if( QFile::exists( uidCacheLocation() ) ) - return unlink( QFile::encodeName( uidCacheLocation() ) ); + if( TQFile::exists( uidCacheLocation() ) ) + return unlink( TQFile::encodeName( uidCacheLocation() ) ); return 0; } #if MAIL_LOSS_DEBUGGING kdDebug(5006) << "Writing out UID cache lastuid: " << lastUid() << " in: " << folder()->prettyURL() << endl; #endif - QFile uidcache( uidCacheLocation() ); + TQFile uidcache( uidCacheLocation() ); if( uidcache.open( IO_WriteOnly ) ) { - QTextStream str( &uidcache ); + TQTextStream str( &uidcache ); str << "# KMail-UidCache V" << UIDCACHE_VERSION << endl; str << uidValidity() << endl; str << lastUid() << endl; @@ -553,17 +553,17 @@ bool KMFolderCachedImap::canRemoveFolder() const { } /* Reimplemented from KMFolderDir */ -int KMFolderCachedImap::rename( const QString& aName, +int KMFolderCachedImap::rename( const TQString& aName, KMFolderDir* /*aParent*/ ) { - QString oldName = mAccount->renamedFolder( imapPath() ); + TQString oldName = mAccount->renamedFolder( imapPath() ); if ( oldName.isEmpty() ) oldName = name(); if ( aName == oldName ) // Stupid user trying to rename it to it's old name :) return 0; if( account() == 0 || imapPath().isEmpty() ) { // I don't think any of this can happen anymore - QString err = i18n("You must synchronize with the server before renaming IMAP folders."); + TQString err = i18n("You must synchronize with the server before renaming IMAP folders."); KMessageBox::error( 0, err ); return -1; } @@ -586,7 +586,7 @@ int KMFolderCachedImap::rename( const QString& aName, KMFolder* KMFolderCachedImap::trashFolder() const { - QString trashStr = account()->trash(); + TQString trashStr = account()->trash(); return kmkernel->dimapFolderMgr()->findIdString( trashStr ); } @@ -601,12 +601,12 @@ void KMFolderCachedImap::setLastUid( ulong uid ) uidWriteTimer = startTimer( 60000 ); } -void KMFolderCachedImap::timerEvent( QTimerEvent* ) +void KMFolderCachedImap::timerEvent( TQTimerEvent* ) { killTimer( uidWriteTimer ); uidWriteTimer = -1; if ( writeUidCache() == -1 ) - unlink( QFile::encodeName( uidCacheLocation() ) ); + unlink( TQFile::encodeName( uidCacheLocation() ) ); } ulong KMFolderCachedImap::lastUid() @@ -622,7 +622,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) mapReloaded = true; } - QMap<ulong,int>::Iterator it = uidMap.find( uid ); + TQMap<ulong,int>::Iterator it = uidMap.find( uid ); if( it != uidMap.end() ) { KMMsgBase *msg = getMsgBase( *it ); #if MAIL_LOSS_DEBUGGING @@ -684,12 +684,12 @@ void KMFolderCachedImap::slotTroubleshoot() "Please try running a sync before this.") ); return; } - QString str = i18n("Are you sure you want to refresh the IMAP cache of " + TQString str = i18n("Are you sure you want to refresh the IMAP cache of " "the folder %1 and all its subfolders?\nThis will " "remove all changes you have done locally to your " "folders.").arg( label() ); - QString s1 = i18n("Refresh IMAP Cache"); - QString s2 = i18n("&Refresh"); + TQString s1 = i18n("Refresh IMAP Cache"); + TQString s2 = i18n("&Refresh"); if( KMessageBox::warningContinueCancel( 0, str, s1, s2 ) == KMessageBox::Continue ) account()->invalidateIMAPFolders( this ); @@ -722,7 +722,7 @@ void KMFolderCachedImap::slotTroubleshoot() void KMFolderCachedImap::serverSync( bool recurse ) { if( mSyncState != SYNC_STATE_INITIAL ) { - if( KMessageBox::warningYesNo( 0, i18n("Folder %1 is not in initial sync state (state was %2). Do you want to reset it to initial sync state and sync anyway?" ).arg( imapPath() ).arg( mSyncState ), QString::null, i18n("Reset && Sync"), KStdGuiItem::cancel() ) == KMessageBox::Yes ) { + if( KMessageBox::warningYesNo( 0, i18n("Folder %1 is not in initial sync state (state was %2). Do you want to reset it to initial sync state and sync anyway?" ).arg( imapPath() ).arg( mSyncState ), TQString::null, i18n("Reset && Sync"), KStdGuiItem::cancel() ) == KMessageBox::Yes ) { mSyncState = SYNC_STATE_INITIAL; } else return; } @@ -753,7 +753,7 @@ void KMFolderCachedImap::serverSync( bool recurse ) serverSyncInternal(); } -QString KMFolderCachedImap::state2String( int state ) const +TQString KMFolderCachedImap::state2String( int state ) const { switch( state ) { case SYNC_STATE_INITIAL: return "SYNC_STATE_INITIAL"; @@ -853,8 +853,8 @@ void KMFolderCachedImap::serverSyncInternal() // kdDebug(5006) << "makeConnection said Connecting, waiting for signal." << endl; newState( mProgress, i18n("Connecting to %1").arg( mAccount->host() ) ); // We'll wait for the connectionResult signal from the account. - connect( mAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + connect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); break; } else { // Connected @@ -874,8 +874,8 @@ void KMFolderCachedImap::serverSyncInternal() // Check the user's own rights. We do this every time in case they changed. mOldUserRights = mUserRights; newState( mProgress, i18n("Checking permissions")); - connect( mAccount, SIGNAL( receivedUserRights( KMFolder* ) ), - this, SLOT( slotReceivedUserRights( KMFolder* ) ) ); + connect( mAccount, TQT_SIGNAL( receivedUserRights( KMFolder* ) ), + this, TQT_SLOT( slotReceivedUserRights( KMFolder* ) ) ); mAccount->getUserRights( folder(), imapPath() ); // after connecting, due to the INBOX case break; } @@ -885,12 +885,12 @@ void KMFolderCachedImap::serverSyncInternal() mSyncState = SYNC_STATE_CHECK_UIDVALIDITY; // Returns the new name if the folder was renamed, empty otherwise. bool isResourceFolder = kmkernel->iCalIface().isStandardResourceFolder( folder() ); - QString newName = mAccount->renamedFolder( imapPath() ); + TQString newName = mAccount->renamedFolder( imapPath() ); if ( !newName.isEmpty() && !folder()->isSystemFolder() && !isResourceFolder ) { newState( mProgress, i18n("Renaming folder") ); CachedImapJob *job = new CachedImapJob( newName, CachedImapJob::tRenameFolder, this ); - connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) ); - connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) ); + connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) ); + connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) ); job->start(); break; } @@ -970,8 +970,8 @@ void KMFolderCachedImap::serverSyncInternal() newState( mProgress, i18n("Deleting folders from server")); CachedImapJob* job = new CachedImapJob( foldersForDeletionOnServer, CachedImapJob::tDeleteFolders, this ); - connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) ); - connect( job, SIGNAL( finished() ), this, SLOT( slotFolderDeletionOnServerFinished() ) ); + connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) ); + connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotFolderDeletionOnServerFinished() ) ); job->start(); break; } @@ -1007,10 +1007,10 @@ void KMFolderCachedImap::serverSyncInternal() mSyncState = SYNC_STATE_GET_MESSAGES; if( !noContent() ) { newState( mProgress, i18n("Expunging deleted messages")); - CachedImapJob *job = new CachedImapJob( QString::null, + CachedImapJob *job = new CachedImapJob( TQString::null, CachedImapJob::tExpungeFolder, this ); - connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) ); - connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) ); + connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) ); + connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) ); job->start(); break; } @@ -1024,10 +1024,10 @@ void KMFolderCachedImap::serverSyncInternal() CachedImapJob *job = new CachedImapJob( mMsgsForDownload, CachedImapJob::tGetMessage, this ); - connect( job, SIGNAL( progress(unsigned long, unsigned long) ), - this, SLOT( slotProgress(unsigned long, unsigned long) ) ); - connect( job, SIGNAL( finished() ), this, SLOT( slotUpdateLastUid() ) ); - connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) ); + connect( job, TQT_SIGNAL( progress(unsigned long, unsigned long) ), + this, TQT_SLOT( slotProgress(unsigned long, unsigned long) ) ); + connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotUpdateLastUid() ) ); + connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) ); job->start(); mMsgsForDownload.clear(); break; @@ -1080,8 +1080,8 @@ void KMFolderCachedImap::serverSyncInternal() ImapAccountBase::jobData jd( url.url(), folder() ); jd.cancellable = true; // we can always do so later mAccount->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotTestAnnotationResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotTestAnnotationResult(KIO::Job *))); break; } @@ -1096,7 +1096,7 @@ void KMFolderCachedImap::serverSyncInternal() // for a folder we didn't create ourselves: get annotation from server if ( mAnnotationFolderType == "FROMSERVER" ) { needToGetInitialAnnotations = true; - mAnnotationFolderType = QString::null; + mAnnotationFolderType = TQString::null; } else { updateAnnotationFolderType(); } @@ -1106,7 +1106,7 @@ void KMFolderCachedImap::serverSyncInternal() // On the other hand, if the user changed the contentstype, there's no need to get first. if ( !noContent() && mAccount->hasAnnotationSupport() && ( kmkernel->iCalIface().isEnabled() || needToGetInitialAnnotations ) ) { - QStringList annotations; // list of annotations to be fetched + TQStringList annotations; // list of annotations to be fetched if ( !mAnnotationFolderTypeChanged || mAnnotationFolderType.isEmpty() ) annotations << KOLAB_FOLDERTYPE; if ( !mIncidencesForChanged ) @@ -1121,10 +1121,10 @@ void KMFolderCachedImap::serverSyncInternal() jd.cancellable = true; mAccount->insertJob(job, jd); - connect( job, SIGNAL(annotationResult(const QString&, const QString&, bool)), - SLOT(slotAnnotationResult(const QString&, const QString&, bool)) ); - connect( job, SIGNAL(result(KIO::Job *)), - SLOT(slotGetAnnotationResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL(annotationResult(const TQString&, const TQString&, bool)), + TQT_SLOT(slotAnnotationResult(const TQString&, const TQString&, bool)) ); + connect( job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotGetAnnotationResult(KIO::Job *)) ); break; } } @@ -1144,7 +1144,7 @@ void KMFolderCachedImap::serverSyncInternal() kdDebug(5006) << "Setting folder-type annotation for " << label() << " to " << mAnnotationFolderType << endl; } if ( mIncidencesForChanged ) { - const QString val = incidencesForToString( mIncidencesFor ); + const TQString val = incidencesForToString( mIncidencesFor ); KMail::AnnotationAttribute attr( KOLAB_INCIDENCESFOR, "value.shared", val ); annotations.append( attr ); kdDebug(5006) << "Setting incidences-for annotation for " << label() << " to " << val << endl; @@ -1156,10 +1156,10 @@ void KMFolderCachedImap::serverSyncInternal() jd.cancellable = true; // we can always do so later mAccount->insertJob(job, jd); - connect(job, SIGNAL(annotationChanged( const QString&, const QString&, const QString& ) ), - SLOT( slotAnnotationChanged( const QString&, const QString&, const QString& ) )); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotSetAnnotationResult(KIO::Job *))); + connect(job, TQT_SIGNAL(annotationChanged( const TQString&, const TQString&, const TQString& ) ), + TQT_SLOT( slotAnnotationChanged( const TQString&, const TQString&, const TQString& ) )); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotSetAnnotationResult(KIO::Job *))); break; } } @@ -1182,10 +1182,10 @@ void KMFolderCachedImap::serverSyncInternal() ImapAccountBase::jobData jd( url.url(), folder() ); mAccount->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 )) ); break; } } @@ -1196,8 +1196,8 @@ void KMFolderCachedImap::serverSyncInternal() if( !noContent() && mAccount->hasACLSupport() ) { newState( mProgress, i18n( "Retrieving permissions" ) ); mAccount->getACL( folder(), mImapPath ); - connect( mAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), - this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); + connect( mAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), + this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); break; } case SYNC_STATE_GET_QUOTA: @@ -1210,10 +1210,10 @@ void KMFolderCachedImap::serverSyncInternal() KIO::Job* job = KMail::QuotaJobs::getStorageQuota( mAccount->slave(), url ); ImapAccountBase::jobData jd( url.url(), folder() ); mAccount->insertJob(job, jd); - connect( job, SIGNAL( storageQuotaResult( const QuotaInfo& ) ), - SLOT( slotStorageQuotaResult( const QuotaInfo& ) ) ); - connect( job, SIGNAL(result(KIO::Job *)), - SLOT(slotQuotaResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL( storageQuotaResult( const QuotaInfo& ) ), + TQT_SLOT( slotStorageQuotaResult( const QuotaInfo& ) ) ); + connect( job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotQuotaResult(KIO::Job *)) ); break; } case SYNC_STATE_FIND_SUBFOLDERS: @@ -1258,8 +1258,8 @@ void KMFolderCachedImap::serverSyncInternal() case SYNC_STATE_SYNC_SUBFOLDERS: { if( mCurrentSubfolder ) { - disconnect( mCurrentSubfolder, SIGNAL( folderComplete(KMFolderCachedImap*, bool) ), - this, SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) ); + disconnect( mCurrentSubfolder, TQT_SIGNAL( folderComplete(KMFolderCachedImap*, bool) ), + this, TQT_SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) ); mCurrentSubfolder = 0; } @@ -1271,8 +1271,8 @@ void KMFolderCachedImap::serverSyncInternal() } else { mCurrentSubfolder = mSubfoldersForSync.front(); mSubfoldersForSync.pop_front(); - connect( mCurrentSubfolder, SIGNAL( folderComplete(KMFolderCachedImap*, bool) ), - this, SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) ); + connect( mCurrentSubfolder, TQT_SIGNAL( folderComplete(KMFolderCachedImap*, bool) ), + this, TQT_SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) ); //kdDebug(5006) << "Sync'ing subfolder " << mCurrentSubfolder->imapPath() << endl; assert( !mCurrentSubfolder->imapPath().isEmpty() ); @@ -1292,10 +1292,10 @@ void KMFolderCachedImap::serverSyncInternal() /* Connected to the imap account's connectionResult signal. Emitted when the slave connected or failed to connect. */ -void KMFolderCachedImap::slotConnectionResult( int errorCode, const QString& errorMsg ) +void KMFolderCachedImap::slotConnectionResult( int errorCode, const TQString& errorMsg ) { - disconnect( mAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + disconnect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); if ( !errorCode ) { // Success mSyncState = SYNC_STATE_GET_USERRIGHTS; @@ -1309,9 +1309,9 @@ void KMFolderCachedImap::slotConnectionResult( int errorCode, const QString& err } /* find new messages (messages without a UID) */ -QValueList<unsigned long> KMFolderCachedImap::findNewMessages() +TQValueList<unsigned long> KMFolderCachedImap::findNewMessages() { - QValueList<unsigned long> result; + TQValueList<unsigned long> result; for( int i = 0; i < count(); ++i ) { KMMsgBase *msg = getMsgBase( i ); if( !msg ) continue; /* what goes on if getMsg() returns 0? */ @@ -1324,20 +1324,20 @@ QValueList<unsigned long> KMFolderCachedImap::findNewMessages() /* Upload new messages to server */ void KMFolderCachedImap::uploadNewMessages() { - QValueList<unsigned long> newMsgs = findNewMessages(); + TQValueList<unsigned long> newMsgs = findNewMessages(); if( !newMsgs.isEmpty() ) { if ( mUserRights <= 0 || ( mUserRights & ( KMail::ACLJobs::Insert ) ) ) { newState( mProgress, i18n("Uploading messages to server")); CachedImapJob *job = new CachedImapJob( newMsgs, CachedImapJob::tPutMessage, this ); - connect( job, SIGNAL( progress( unsigned long, unsigned long) ), - this, SLOT( slotPutProgress(unsigned long, unsigned long) ) ); - connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) ); + connect( job, TQT_SIGNAL( progress( unsigned long, unsigned long) ), + this, TQT_SLOT( slotPutProgress(unsigned long, unsigned long) ) ); + connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) ); job->start(); return; } else { KMCommand *command = rescueUnsyncedMessages(); - connect( command, SIGNAL( completed( KMCommand * ) ), - this, SLOT( serverSyncInternal() ) ); + connect( command, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( serverSyncInternal() ) ); } } else { // nothing to upload if ( mUserRights != mOldUserRights && (mOldUserRights & KMail::ACLJobs::Insert) @@ -1357,7 +1357,7 @@ void KMFolderCachedImap::slotPutProgress( unsigned long done, unsigned long tota { // (going from mProgress to mProgress+10) int progressSpan = 10; - newState( mProgress + (progressSpan * done) / total, QString::null ); + newState( mProgress + (progressSpan * done) / total, TQString::null ); if ( done == total ) // we're done mProgress += progressSpan; } @@ -1370,7 +1370,7 @@ void KMFolderCachedImap::uploadFlags() newState( mProgress, i18n("Uploading status of messages to server")); // FIXME DUPLICATED FROM KMFOLDERIMAP - QMap< QString, QStringList > groups; + TQMap< TQString, TQStringList > groups; //open(); //already done for( int i = 0; i < count(); ++i ) { KMMsgBase* msg = getMsgBase( i ); @@ -1378,28 +1378,28 @@ void KMFolderCachedImap::uploadFlags() // Either not a valid message or not one that is on the server yet continue; - QString flags = KMFolderImap::statusToFlags(msg->status(), mPermanentFlags); + TQString flags = KMFolderImap::statusToFlags(msg->status(), mPermanentFlags); // Collect uids for each typem of flags. - QString uid; + TQString uid; uid.setNum( msg->UID() ); groups[flags].append(uid); } - QMapIterator< QString, QStringList > dit; + TQMapIterator< TQString, TQStringList > dit; for( dit = groups.begin(); dit != groups.end(); ++dit ) { - QCString flags = dit.key().latin1(); - QStringList sets = KMFolderImap::makeSets( (*dit), true ); + TQCString flags = dit.key().latin1(); + TQStringList sets = KMFolderImap::makeSets( (*dit), true ); mStatusFlagsJobs += sets.count(); // ### that's not in kmfolderimap.... // Send off a status setting job for each set. - for( QStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) { - QString imappath = imapPath() + ";UID=" + ( *slit ); + for( TQStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) { + TQString imappath = imapPath() + ";UID=" + ( *slit ); mAccount->setImapStatus(folder(), imappath, flags); } } // FIXME END DUPLICATED FROM KMFOLDERIMAP if ( mStatusFlagsJobs ) { - connect( mAccount, SIGNAL( imapStatusChanged(KMFolder*, const QString&, bool) ), - this, SLOT( slotImapStatusChanged(KMFolder*, const QString&, bool) ) ); + connect( mAccount, TQT_SIGNAL( imapStatusChanged(KMFolder*, const TQString&, bool) ), + this, TQT_SLOT( slotImapStatusChanged(KMFolder*, const TQString&, bool) ) ); return; } } @@ -1413,7 +1413,7 @@ void KMFolderCachedImap::uploadSeenFlags() mStatusFlagsJobs = 0; newState( mProgress, i18n("Uploading status of messages to server")); - QValueList<ulong> seenUids, unseenUids; + TQValueList<ulong> seenUids, unseenUids; for( int i = 0; i < count(); ++i ) { KMMsgBase* msg = getMsgBase( i ); if( !msg || msg->UID() == 0 ) @@ -1426,25 +1426,25 @@ void KMFolderCachedImap::uploadSeenFlags() unseenUids.append( msg->UID() ); } if ( !seenUids.isEmpty() ) { - QStringList sets = KMFolderImap::makeSets( seenUids, true ); + TQStringList sets = KMFolderImap::makeSets( seenUids, true ); mStatusFlagsJobs += sets.count(); - for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { - QString imappath = imapPath() + ";UID=" + ( *it ); + for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { + TQString imappath = imapPath() + ";UID=" + ( *it ); mAccount->setImapSeenStatus( folder(), imappath, true ); } } if ( !unseenUids.isEmpty() ) { - QStringList sets = KMFolderImap::makeSets( unseenUids, true ); + TQStringList sets = KMFolderImap::makeSets( unseenUids, true ); mStatusFlagsJobs += sets.count(); - for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { - QString imappath = imapPath() + ";UID=" + ( *it ); + for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { + TQString imappath = imapPath() + ";UID=" + ( *it ); mAccount->setImapSeenStatus( folder(), imappath, false ); } } if ( mStatusFlagsJobs ) { - connect( mAccount, SIGNAL( imapStatusChanged(KMFolder*, const QString&, bool) ), - this, SLOT( slotImapStatusChanged(KMFolder*, const QString&, bool) ) ); + connect( mAccount, TQT_SIGNAL( imapStatusChanged(KMFolder*, const TQString&, bool) ), + this, TQT_SLOT( slotImapStatusChanged(KMFolder*, const TQString&, bool) ) ); return; } } @@ -1452,7 +1452,7 @@ void KMFolderCachedImap::uploadSeenFlags() serverSyncInternal(); } -void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const QString&, bool cont) +void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const TQString&, bool cont) { if ( mSyncState == SYNC_STATE_INITIAL ){ //kdDebug(5006) << "IMAP status changed but reset " << endl; @@ -1462,8 +1462,8 @@ void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const QString&, if ( folder->storage() == this ) { --mStatusFlagsJobs; if ( mStatusFlagsJobs == 0 || !cont ) // done or aborting - disconnect( mAccount, SIGNAL( imapStatusChanged(KMFolder*, const QString&, bool) ), - this, SLOT( slotImapStatusChanged(KMFolder*, const QString&, bool) ) ); + disconnect( mAccount, TQT_SIGNAL( imapStatusChanged(KMFolder*, const TQString&, bool) ), + this, TQT_SLOT( slotImapStatusChanged(KMFolder*, const TQString&, bool) ) ); if ( mStatusFlagsJobs == 0 && cont ) { mProgress += 5; serverSyncInternal(); @@ -1479,7 +1479,7 @@ void KMFolderCachedImap::setStatus( int idx, KMMsgStatus status, bool toggle) mStatusChangedLocally = true; } -void KMFolderCachedImap::setStatus(QValueList<int>& ids, KMMsgStatus status, bool toggle) +void KMFolderCachedImap::setStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle) { KMFolderMaildir::setStatus(ids, status, toggle); mStatusChangedLocally = true; @@ -1488,22 +1488,22 @@ void KMFolderCachedImap::setStatus(QValueList<int>& ids, KMMsgStatus status, boo /* Upload new folders to server */ void KMFolderCachedImap::createNewFolders() { - QValueList<KMFolderCachedImap*> newFolders = findNewFolders(); + TQValueList<KMFolderCachedImap*> newFolders = findNewFolders(); //kdDebug(5006) << label() << " createNewFolders:" << newFolders.count() << " new folders." << endl; if( !newFolders.isEmpty() ) { newState( mProgress, i18n("Creating subfolders on server")); CachedImapJob *job = new CachedImapJob( newFolders, CachedImapJob::tAddSubfolders, this ); - connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) ); - connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) ); + connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) ); + connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) ); job->start(); } else { serverSyncInternal(); } } -QValueList<KMFolderCachedImap*> KMFolderCachedImap::findNewFolders() +TQValueList<KMFolderCachedImap*> KMFolderCachedImap::findNewFolders() { - QValueList<KMFolderCachedImap*> newFolders; + TQValueList<KMFolderCachedImap*> newFolders; if( folder() && folder()->child() ) { KMFolderNode *node = folder()->child()->first(); while( node ) { @@ -1528,18 +1528,18 @@ QValueList<KMFolderCachedImap*> KMFolderCachedImap::findNewFolders() bool KMFolderCachedImap::deleteMessages() { /* Delete messages from cache that are gone from the server */ - QPtrList<KMMessage> msgsForDeletion; + TQPtrList<KMMessage> msgsForDeletion; // It is not possible to just go over all indices and remove // them one by one because the index list can get resized under // us. So use msg pointers instead - QStringList uids; - QMap<ulong,int>::const_iterator it = uidMap.constBegin(); + TQStringList uids; + TQMap<ulong,int>::const_iterator it = uidMap.constBegin(); for( ; it != uidMap.end(); it++ ) { ulong uid ( it.key() ); if( uid!=0 && !uidsOnServer.find( uid ) ) { - uids << QString::number( uid ); + uids << TQString::number( uid ); msgsForDeletion.append( getMsg( *it ) ); } } @@ -1560,12 +1560,12 @@ bool KMFolderCachedImap::deleteMessages() /* Delete messages from the server that we dont have anymore */ if( !uidsForDeletionOnServer.isEmpty() ) { newState( mProgress, i18n("Deleting removed messages from server")); - QStringList sets = KMFolderImap::makeSets( uidsForDeletionOnServer, true ); + TQStringList sets = KMFolderImap::makeSets( uidsForDeletionOnServer, true ); uidsForDeletionOnServer.clear(); kdDebug(5006) << "Deleting " << sets.count() << " sets of messages from server folder " << imapPath() << endl; CachedImapJob *job = new CachedImapJob( sets, CachedImapJob::tDeleteMessage, this ); - connect( job, SIGNAL( result(KMail::FolderJob *) ), - this, SLOT( slotDeleteMessagesResult(KMail::FolderJob *) ) ); + connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), + this, TQT_SLOT( slotDeleteMessagesResult(KMail::FolderJob *) ) ); job->start(); return true; } else { @@ -1600,9 +1600,9 @@ void KMFolderCachedImap::checkUidValidity() { else { newState( mProgress, i18n("Checking folder validity")); CachedImapJob *job = new CachedImapJob( FolderJob::tCheckUidValidity, this ); - connect( job, SIGNAL(permanentFlags(int)), SLOT(slotPermanentFlags(int)) ); - connect( job, SIGNAL( result( KMail::FolderJob* ) ), - this, SLOT( slotCheckUidValidityResult( KMail::FolderJob* ) ) ); + connect( job, TQT_SIGNAL(permanentFlags(int)), TQT_SLOT(slotPermanentFlags(int)) ); + connect( job, TQT_SIGNAL( result( KMail::FolderJob* ) ), + this, TQT_SLOT( slotCheckUidValidityResult( KMail::FolderJob* ) ) ); job->start(); } } @@ -1651,8 +1651,8 @@ void KMFolderCachedImap::listMessages() { mFoundAnIMAPDigest = false; CachedImapJob* job = new CachedImapJob( FolderJob::tListMessages, this ); - connect( job, SIGNAL( result(KMail::FolderJob *) ), - this, SLOT( slotGetLastMessagesResult(KMail::FolderJob *) ) ); + connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), + this, TQT_SLOT( slotGetLastMessagesResult(KMail::FolderJob *) ) ); job->start(); } @@ -1662,7 +1662,7 @@ void KMFolderCachedImap::slotGetLastMessagesResult(KMail::FolderJob *job) } // Connected to the listMessages job in CachedImapJob -void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data) +void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) { KMAcctCachedImap::JobIterator it = mAccount->findJob(job); if ( it == mAccount->jobsEnd() ) { // Shouldn't happen @@ -1674,7 +1674,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray & serverSyncInternal(); /* HACK^W Fix: we should at least try to keep going */ return; } - (*it).cdata += QCString(data, data.size() + 1); + (*it).cdata += TQCString(data, data.size() + 1); int pos = (*it).cdata.find("\r\n--IMAPDIGEST"); if (pos > 0) { int a = (*it).cdata.find("\r\nX-uidValidity:"); @@ -1690,7 +1690,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray & // sources for the readonly setting, in any case. if (a != -1 && mUserRights == -1 ) { int b = (*it).cdata.find("\r\n", a + 12); - const QString access = (*it).cdata.mid(a + 12, b - a - 12); + const TQString access = (*it).cdata.mid(a + 12, b - a - 12); setReadOnly( access == "Read only" ); } (*it).cdata.remove(0, pos); @@ -1711,7 +1711,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray & */ // The below is optimized for speed, not prettiness. The commented out chunk // above was the solution copied from kmfolderimap, and it's 15-20% slower. - const QCString& entry( (*it).cdata ); + const TQCString& entry( (*it).cdata ); const int indexOfUID = entry.find("X-UID", 16); const int startOfUIDValue = indexOfUID + 7; const int indexOfLength = entry.find("X-Length", startOfUIDValue ); // we know length comes after UID @@ -1833,7 +1833,7 @@ void KMFolderCachedImap::slotProgress(unsigned long done, unsigned long total) //kdDebug(5006) << "KMFolderCachedImap::slotProgress done=" << done << " total=" << total << "=> mProgress=" << mProgress + ( progressSpan * done ) / total << endl; // Progress info while retrieving new emails // (going from mProgress to mProgress+progressSpan) - newState( mProgress + (progressSpan * done) / total, QString::null ); + newState( mProgress + (progressSpan * done) / total, TQString::null ); } void KMFolderCachedImap::setAccount(KMAcctCachedImap *aAccount) @@ -1843,7 +1843,7 @@ void KMFolderCachedImap::setAccount(KMAcctCachedImap *aAccount) if( imapPath()=="/" ) aAccount->setFolder( folder() ); // Folder was renamed in a previous session, and the user didn't sync yet - QString newName = mAccount->renamedFolder( imapPath() ); + TQString newName = mAccount->renamedFolder( imapPath() ); if ( !newName.isEmpty() ) folder()->setLabel( newName ); @@ -1865,10 +1865,10 @@ void KMFolderCachedImap::listNamespaces() mSyncState = SYNC_STATE_DELETE_SUBFOLDERS; mPersonalNamespacesCheckDone = true; - QStringList ns = mAccount->namespaces()[ImapAccountBase::OtherUsersNS]; + TQStringList ns = mAccount->namespaces()[ImapAccountBase::OtherUsersNS]; ns += mAccount->namespaces()[ImapAccountBase::SharedNS]; mNamespacesToCheck = ns.count(); - for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) + for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) { if ( (*it).isEmpty() ) { // ignore empty listings as they have been listed before @@ -1877,10 +1877,10 @@ void KMFolderCachedImap::listNamespaces() } KMail::ListJob* job = new KMail::ListJob( mAccount, type, this, mAccount->addPathToNamespace( *it ) ); job->setHonorLocalSubscription( true ); - connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&)), - this, SLOT(slotCheckNamespace(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&))); + connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)), + this, TQT_SLOT(slotCheckNamespace(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&))); job->start(); } if ( mNamespacesToCheck == 0 ) { @@ -1890,7 +1890,7 @@ void KMFolderCachedImap::listNamespaces() } mPersonalNamespacesCheckDone = false; - QString ns = mNamespacesToList.front(); + TQString ns = mNamespacesToList.front(); mNamespacesToList.pop_front(); mSyncState = SYNC_STATE_LIST_SUBFOLDERS2; @@ -1899,17 +1899,17 @@ void KMFolderCachedImap::listNamespaces() mAccount->addPathToNamespace( ns ) ); job->setNamespace( ns ); job->setHonorLocalSubscription( true ); - connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&)), - this, SLOT(slotListResult(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&))); + connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)), + this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&))); job->start(); } -void KMFolderCachedImap::slotCheckNamespace( const QStringList& subfolderNames, - const QStringList& subfolderPaths, - const QStringList& subfolderMimeTypes, - const QStringList& subfolderAttributes, +void KMFolderCachedImap::slotCheckNamespace( const TQStringList& subfolderNames, + const TQStringList& subfolderPaths, + const TQStringList& subfolderMimeTypes, + const TQStringList& subfolderAttributes, const ImapAccountBase::jobData& jobData ) { Q_UNUSED( subfolderPaths ); @@ -1921,7 +1921,7 @@ void KMFolderCachedImap::slotCheckNamespace( const QStringList& subfolderNames, // get a correct foldername: // strip / and make sure it does not contain the delimiter - QString name = jobData.path.mid( 1, jobData.path.length()-2 ); + TQString name = jobData.path.mid( 1, jobData.path.length()-2 ); name.remove( mAccount->delimiterForNamespace( name ) ); if ( name.isEmpty() ) { // should not happen @@ -1987,19 +1987,19 @@ bool KMFolderCachedImap::listDirectory() type = ImapAccountBase::ListSubscribed; KMail::ListJob* job = new KMail::ListJob( mAccount, type, this ); job->setHonorLocalSubscription( true ); - connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&)), - this, SLOT(slotListResult(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&))); + connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)), + this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&))); job->start(); return true; } -void KMFolderCachedImap::slotListResult( const QStringList& folderNames, - const QStringList& folderPaths, - const QStringList& folderMimeTypes, - const QStringList& folderAttributes, +void KMFolderCachedImap::slotListResult( const TQStringList& folderNames, + const TQStringList& folderPaths, + const TQStringList& folderMimeTypes, + const TQStringList& folderAttributes, const ImapAccountBase::jobData& jobData ) { Q_UNUSED( jobData ); @@ -2016,7 +2016,7 @@ void KMFolderCachedImap::slotListResult( const QStringList& folderNames, KMFolderNode *node = folder()->child()->first(); bool root = ( this == mAccount->rootFolder() ); - QPtrList<KMFolder> toRemove; + TQPtrList<KMFolder> toRemove; bool emptyList = ( root && mSubfolderNames.empty() ); if ( !emptyList ) { while (node) { @@ -2024,7 +2024,7 @@ void KMFolderCachedImap::slotListResult( const QStringList& folderNames, KMFolderCachedImap *f = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); if ( mSubfolderNames.findIndex(node->name()) == -1 ) { - QString name = node->name(); + TQString name = node->name(); // as more than one namespace can be listed in the root folder we need to make sure // that the folder is within the current namespace bool isInNamespace = ( jobData.curNamespace.isEmpty() || @@ -2069,7 +2069,7 @@ void KMFolderCachedImap::slotListResult( const QStringList& folderNames, // This synchronizes the local folders as needed (creation/deletion). No network communication here. void KMFolderCachedImap::listDirectory2() { - QString path = folder()->path(); + TQString path = folder()->path(); kmkernel->dimapFolderMgr()->quiet(true); bool root = ( this == mAccount->rootFolder() ); @@ -2113,7 +2113,7 @@ void KMFolderCachedImap::listDirectory2() } // Find all subfolders present on server but not on disk - QValueVector<int> foldersNewOnServer; + TQValueVector<int> foldersNewOnServer; for (uint i = 0; i < mSubfolderNames.count(); i++) { // Find the subdir, if already present @@ -2126,7 +2126,7 @@ void KMFolderCachedImap::listDirectory2() if (!node) { // This folder is not present here // Either it's new on the server, or we just deleted it. - QString subfolderPath = mSubfolderPaths[i]; + TQString subfolderPath = mSubfolderPaths[i]; // The code used to look at the uidcache to know if it was "just deleted". // But this breaks with noContent folders and with shared folders. // So instead we keep a list in the account. @@ -2136,7 +2136,7 @@ void KMFolderCachedImap::listDirectory2() // (could be that the folder was deleted & recreated meanwhile from another client...) if ( !locallyDeleted && mAccount->isPreviouslyDeletedFolder( subfolderPath ) ) { locallyDeleted = KMessageBox::warningYesNo( - 0, i18n( "<qt><p>It seems that the folder <b>%1</b> was deleted. Do you want to delete it from the server?</p></qt>" ).arg( mSubfolderNames[i] ), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel() ) == KMessageBox::Yes; + 0, i18n( "<qt><p>It seems that the folder <b>%1</b> was deleted. Do you want to delete it from the server?</p></qt>" ).arg( mSubfolderNames[i] ), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel() ) == KMessageBox::Yes; } if ( locallyDeleted ) { @@ -2177,24 +2177,24 @@ void KMFolderCachedImap::listDirectory2() && GlobalSettings::self()->theIMAPResourceEnabled() && !foldersNewOnServer.isEmpty() ) { - QStringList paths; + TQStringList paths; for ( uint i = 0; i < foldersNewOnServer.count(); ++i ) paths << mSubfolderPaths[ foldersNewOnServer[i] ]; AnnotationJobs::MultiUrlGetAnnotationJob* job = AnnotationJobs::multiUrlGetAnnotation( mAccount->slave(), mAccount->getUrl(), paths, KOLAB_FOLDERTYPE ); - ImapAccountBase::jobData jd( QString::null, folder() ); + ImapAccountBase::jobData jd( TQString::null, folder() ); jd.cancellable = true; mAccount->insertJob(job, jd); - connect( job, SIGNAL(result(KIO::Job *)), - SLOT(slotMultiUrlGetAnnotationResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotMultiUrlGetAnnotationResult(KIO::Job *)) ); } else { createFoldersNewOnServerAndFinishListing( foldersNewOnServer ); } } -void KMFolderCachedImap::createFoldersNewOnServerAndFinishListing( const QValueVector<int> foldersNewOnServer ) +void KMFolderCachedImap::createFoldersNewOnServerAndFinishListing( const TQValueVector<int> foldersNewOnServer ) { for ( uint i = 0; i < foldersNewOnServer.count(); ++i ) { int idx = foldersNewOnServer[i]; @@ -2227,10 +2227,10 @@ void KMFolderCachedImap::createFoldersNewOnServerAndFinishListing( const QValueV } //----------------------------------------------------------------------------- -KMFolderCachedImap* KMFolderCachedImap::findParent( const QString& path, - const QString& name ) +KMFolderCachedImap* KMFolderCachedImap::findParent( const TQString& path, + const TQString& name ) { - QString parent = path.left( path.length() - name.length() - 2 ); + TQString parent = path.left( path.length() - name.length() - 2 ); if ( parent.length() > 1 ) { // extract name of the parent @@ -2267,8 +2267,8 @@ void KMFolderCachedImap::slotSubFolderComplete(KMFolderCachedImap* sub, bool suc // success == false means the sync was aborted. if ( mCurrentSubfolder ) { Q_ASSERT( sub == mCurrentSubfolder ); - disconnect( mCurrentSubfolder, SIGNAL( folderComplete(KMFolderCachedImap*, bool) ), - this, SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) ); + disconnect( mCurrentSubfolder, TQT_SIGNAL( folderComplete(KMFolderCachedImap*, bool) ), + this, TQT_SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) ); mCurrentSubfolder = 0; } @@ -2279,11 +2279,11 @@ void KMFolderCachedImap::slotSubFolderComplete(KMFolderCachedImap* sub, bool suc } } -void KMFolderCachedImap::slotSimpleData(KIO::Job * job, const QByteArray & data) +void KMFolderCachedImap::slotSimpleData(KIO::Job * job, const TQByteArray & data) { KMAcctCachedImap::JobIterator it = mAccount->findJob(job); if (it == mAccount->jobsEnd()) return; - QBuffer buff((*it).data); + TQBuffer buff((*it).data); buff.open(IO_WriteOnly | IO_Append); buff.writeBlock(data.data(), data.size()); buff.close(); @@ -2291,9 +2291,9 @@ void KMFolderCachedImap::slotSimpleData(KIO::Job * job, const QByteArray & data) FolderJob* KMFolderCachedImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, - QString, const AttachmentStrategy* ) const + TQString, const AttachmentStrategy* ) const { - QPtrList<KMMessage> msgList; + TQPtrList<KMMessage> msgList; msgList.append( msg ); CachedImapJob *job = new CachedImapJob( msgList, jt, folder? static_cast<KMFolderCachedImap*>( folder->storage() ):0 ); job->setParentFolder( this ); @@ -2301,7 +2301,7 @@ KMFolderCachedImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder } FolderJob* -KMFolderCachedImap::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, +KMFolderCachedImap::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const { //FIXME: how to handle sets here? @@ -2322,8 +2322,8 @@ void KMFolderCachedImap::slotReceivedUserRights( KMFolder* folder ) { if ( folder->storage() == this ) { - disconnect( mAccount, SIGNAL( receivedUserRights( KMFolder* ) ), - this, SLOT( slotReceivedUserRights( KMFolder* ) ) ); + disconnect( mAccount, TQT_SIGNAL( receivedUserRights( KMFolder* ) ), + this, TQT_SLOT( slotReceivedUserRights( KMFolder* ) ) ); if ( mUserRights == 0 ) // didn't work mUserRights = -1; // error code (used in folderdia) else @@ -2346,8 +2346,8 @@ void KMFolderCachedImap::slotReceivedACL( KMFolder* folder, KIO::Job*, const KMail::ACLList& aclList ) { if ( folder->storage() == this ) { - disconnect( mAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), - this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); + disconnect( mAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )), + this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) ); mACLList = aclList; serverSyncInternal(); } @@ -2393,7 +2393,7 @@ KMFolderCachedImap::slotMultiSetACLResult(KIO::Job *job) } void -KMFolderCachedImap::slotACLChanged( const QString& userId, int permissions ) +KMFolderCachedImap::slotACLChanged( const TQString& userId, int permissions ) { // The job indicates success in changing the permissions for this user // -> we note that it's been done. @@ -2417,7 +2417,7 @@ void KMFolderCachedImap::resetSyncState() close("cachedimap"); // Don't use newState here, it would revert to mProgress (which is < current value when listing messages) KPIM::ProgressItem *progressItem = mAccount->mailCheckProgressItem(); - QString str = i18n("Aborted"); + TQString str = i18n("Aborted"); if (progressItem) progressItem->setStatus( str ); emit statusMsg( str ); @@ -2428,19 +2428,19 @@ void KMFolderCachedImap::slotIncreaseProgress() mProgress += 5; } -void KMFolderCachedImap::newState( int progress, const QString& syncStatus ) +void KMFolderCachedImap::newState( int progress, const TQString& syncStatus ) { //kdDebug() << k_funcinfo << folder() << " " << mProgress << " " << syncStatus << endl; KPIM::ProgressItem *progressItem = mAccount->mailCheckProgressItem(); if( progressItem ) progressItem->setCompletedItems( progress ); if ( !syncStatus.isEmpty() ) { - QString str; + TQString str; // For a subfolder, show the label. But for the main folder, it's already shown. if ( mAccount->imapFolder() == this ) str = syncStatus; else - str = QString( "%1: %2" ).arg( label() ).arg( syncStatus ); + str = TQString( "%1: %2" ).arg( label() ).arg( syncStatus ); if( progressItem ) progressItem->setStatus( str ); emit statusMsg( str ); @@ -2456,7 +2456,7 @@ void KMFolderCachedImap::setSubfolderState( imapState state ) { // pass through to childs KMFolderNode* node; - QPtrListIterator<KMFolderNode> it( *folder()->child() ); + TQPtrListIterator<KMFolderNode> it( *folder()->child() ); for ( ; (node = it.current()); ) { ++it; @@ -2467,7 +2467,7 @@ void KMFolderCachedImap::setSubfolderState( imapState state ) } } -void KMFolderCachedImap::setImapPath(const QString &path) +void KMFolderCachedImap::setImapPath(const TQString &path) { mImapPath = path; } @@ -2479,15 +2479,15 @@ void KMFolderCachedImap::setImapPath(const QString &path) // on startup, it's too early there to know if this is a standard resource folder. void KMFolderCachedImap::updateAnnotationFolderType() { - QString oldType = mAnnotationFolderType; - QString oldSubType; + TQString oldType = mAnnotationFolderType; + TQString oldSubType; int dot = oldType.find( '.' ); if ( dot != -1 ) { oldType.truncate( dot ); oldSubType = mAnnotationFolderType.mid( dot + 1 ); } - QString newType, newSubType; + TQString newType, newSubType; // We want to store an annotation on the folder only if using the kolab storage. if ( kmkernel->iCalIface().storageFormat( folder() ) == KMailICalIfaceImpl::StorageXML ) { newType = KMailICalIfaceImpl::annotationForContentsType( mContentsType ); @@ -2499,7 +2499,7 @@ void KMFolderCachedImap::updateAnnotationFolderType() //kdDebug(5006) << mImapPath << ": updateAnnotationFolderType: " << newType << " " << newSubType << endl; if ( newType != oldType || newSubType != oldSubType ) { - mAnnotationFolderType = newType + ( newSubType.isEmpty() ? QString::null : "."+newSubType ); + mAnnotationFolderType = newType + ( newSubType.isEmpty() ? TQString::null : "."+newSubType ); mAnnotationFolderTypeChanged = true; // force a "set annotation" on next sync kdDebug(5006) << mImapPath << ": updateAnnotationFolderType: '" << mAnnotationFolderType << "', was (" << oldType << " " << oldSubType << ") => mAnnotationFolderTypeChanged set to TRUE" << endl; } @@ -2515,7 +2515,7 @@ void KMFolderCachedImap::setIncidencesFor( IncidencesFor incfor ) } } -void KMFolderCachedImap::slotAnnotationResult(const QString& entry, const QString& value, bool found) +void KMFolderCachedImap::slotAnnotationResult(const TQString& entry, const TQString& value, bool found) { if ( entry == KOLAB_FOLDERTYPE ) { // There are four cases. @@ -2524,8 +2524,8 @@ void KMFolderCachedImap::slotAnnotationResult(const QString& entry, const QStrin // 3) different (known) content-type on server, no local change -> get it // 4) different unknown content-type on server, probably some older version -> set it if ( found ) { - QString type = value; - QString subtype; + TQString type = value; + TQString subtype; int dot = value.find( '.' ); if ( dot != -1 ) { type.truncate( dot ); @@ -2618,7 +2618,7 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job ) Q_ASSERT( (*it).parent == folder() ); if ( (*it).parent != folder() ) return; // Shouldn't happen - QValueVector<int> folders; + TQValueVector<int> folders; AnnotationJobs::MultiUrlGetAnnotationJob* annjob = static_cast<AnnotationJobs::MultiUrlGetAnnotationJob *>( job ); if ( annjob->error() ) { @@ -2633,14 +2633,14 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job ) kdWarning(5006) << "slotGetMultiUrlAnnotationResult: " << job->errorString() << endl; } else { // we got the annotation allright, let's filter out the ones with the wrong type - QMap<QString, QString> annotations = annjob->annotations(); - QMap<QString, QString>::Iterator it = annotations.begin(); + TQMap<TQString, TQString> annotations = annjob->annotations(); + TQMap<TQString, TQString>::Iterator it = annotations.begin(); for ( ; it != annotations.end(); ++it ) { - const QString folderPath = it.key(); - const QString annotation = it.data(); + const TQString folderPath = it.key(); + const TQString annotation = it.data(); kdDebug(5006) << k_funcinfo << "Folder: " << folderPath << " has type: " << annotation << endl; // we're only interested in the main type - QString type(annotation); + TQString type(annotation); int dot = annotation.find( '.' ); if ( dot != -1 ) type.truncate( dot ); type = type.simplifyWhiteSpace(); @@ -2688,7 +2688,7 @@ void KMFolderCachedImap::slotQuotaResult( KIO::Job* job ) } void -KMFolderCachedImap::slotAnnotationChanged( const QString& entry, const QString& attribute, const QString& value ) +KMFolderCachedImap::slotAnnotationChanged( const TQString& entry, const TQString& attribute, const TQString& value ) { Q_UNUSED( attribute ); Q_UNUSED( value ); @@ -2790,7 +2790,7 @@ bool KMFolderCachedImap::isMoveable() const void KMFolderCachedImap::slotFolderDeletionOnServerFinished() { - for ( QStringList::const_iterator it = foldersForDeletionOnServer.constBegin(); + for ( TQStringList::const_iterator it = foldersForDeletionOnServer.constBegin(); it != foldersForDeletionOnServer.constEnd(); ++it ) { KURL url( mAccount->getUrl() ); url.setPath( *it ); @@ -2805,7 +2805,7 @@ int KMFolderCachedImap::createIndexFromContentsRecursive() return 0; KMFolderNode *node = 0; - for( QPtrListIterator<KMFolderNode> it( *folder()->child() ); (node = it.current()); ++it ) { + for( TQPtrListIterator<KMFolderNode> it( *folder()->child() ); (node = it.current()); ++it ) { if( !node->isDir() ) { KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage()); kdDebug() << k_funcinfo << "Re-indexing: " << storage->folder()->label() << endl; @@ -2842,7 +2842,7 @@ bool KMFolderCachedImap::isCloseToQuota() const KMCommand* KMFolderCachedImap::rescueUnsyncedMessages() { - QValueList<unsigned long> newMsgs = findNewMessages(); + TQValueList<unsigned long> newMsgs = findNewMessages(); kdDebug() << k_funcinfo << newMsgs << " of " << count() << endl; if ( newMsgs.isEmpty() ) return 0; @@ -2850,7 +2850,7 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages() bool manualMove = true; while ( GlobalSettings::autoLostFoundMove() ) { // find the inbox of this account - KMFolder *inboxFolder = kmkernel->findFolderById( QString(".%1.directory/INBOX").arg( account()->id() ) ); + KMFolder *inboxFolder = kmkernel->findFolderById( TQString(".%1.directory/INBOX").arg( account()->id() ) ); if ( !inboxFolder ) { kdWarning(5006) << k_funcinfo << "inbox not found!" << endl; break; @@ -2882,15 +2882,15 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages() break; // create subfolder for this incident - QDate today = QDate::currentDate(); - QString baseName = folder()->label() + "-" + QString::number( today.year() ) - + (today.month() < 10 ? "0" : "" ) + QString::number( today.month() ) - + (today.day() < 10 ? "0" : "" ) + QString::number( today.day() ); - QString name = baseName; + TQDate today = TQDate::currentDate(); + TQString baseName = folder()->label() + "-" + TQString::number( today.year() ) + + (today.month() < 10 ? "0" : "" ) + TQString::number( today.month() ) + + (today.day() < 10 ? "0" : "" ) + TQString::number( today.day() ); + TQString name = baseName; int suffix = 0; while ( (node = lfFolder->child()->hasNamedFolder( name )) ) { ++suffix; - name = baseName + '-' + QString::number( suffix ); + name = baseName + '-' + TQString::number( suffix ); } kdDebug(5006) << k_funcinfo << "creating lost+found folder " << name << endl; dest = kmkernel->dimapFolderMgr()->createFolder( name, false, KMFolderTypeCachedImap, lfFolder->child() ); @@ -2913,14 +2913,14 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages() } if ( manualMove ) { - const QString msg ( i18n( "<p>There are new messages in this folder (%1), which " + const TQString msg ( i18n( "<p>There are new messages in this folder (%1), which " "have not been uploaded to the server yet, but the folder has been deleted " "on the server or you do not " "have sufficient access rights on the folder now to upload them. " "Please contact your administrator to allow upload of new messages " "to you, or move them out of this folder.</p> " "<p>Do you want to move these messages to another folder now?</p>").arg( folder()->prettyURL() ) ); - if ( KMessageBox::warningYesNo( 0, msg, QString::null, i18n("Move"), i18n("Do Not Move") ) == KMessageBox::Yes ) { + if ( KMessageBox::warningYesNo( 0, msg, TQString::null, i18n("Move"), i18n("Do Not Move") ) == KMessageBox::Yes ) { KMail::KMFolderSelDlg dlg( kmkernel->getKMMainWidget(), i18n("Move Messages to Folder"), true ); if ( dlg.exec() ) { @@ -2929,7 +2929,7 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages() } } if ( dest ) { - QPtrList<KMMsgBase> msgs; + TQPtrList<KMMsgBase> msgs; for( int i = 0; i < count(); ++i ) { KMMsgBase *msg = getMsgBase( i ); if( !msg ) continue; /* what goes on if getMsg() returns 0? */ @@ -2953,8 +2953,8 @@ void KMFolderCachedImap::rescueUnsyncedMessagesAndDeleteFolder( KMFolder *folder if ( storage ) { KMCommand *command = storage->rescueUnsyncedMessages(); if ( command ) { - connect( command, SIGNAL(completed(KMCommand*)), - SLOT(slotRescueDone(KMCommand*)) ); + connect( command, TQT_SIGNAL(completed(KMCommand*)), + TQT_SLOT(slotRescueDone(KMCommand*)) ); ++mRescueCommandCount; } else { // nothing to rescue, close folder @@ -2981,7 +2981,7 @@ void KMFolderCachedImap::slotRescueDone(KMCommand * command) --mRescueCommandCount; if ( mRescueCommandCount > 0 ) return; - for ( QValueList<KMFolder*>::ConstIterator it = mToBeDeletedAfterRescue.constBegin(); + for ( TQValueList<KMFolder*>::ConstIterator it = mToBeDeletedAfterRescue.constBegin(); it != mToBeDeletedAfterRescue.constEnd(); ++it ) { kmkernel->dimapFolderMgr()->remove( *it ); } diff --git a/kmail/kmfoldercachedimap.h b/kmail/kmfoldercachedimap.h index 1ef82a3aa..726a7e06d 100644 --- a/kmail/kmfoldercachedimap.h +++ b/kmail/kmfoldercachedimap.h @@ -34,10 +34,10 @@ #include <kdialogbase.h> #include <kstandarddirs.h> -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qptrlist.h> -#include <qdialog.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqptrlist.h> +#include <tqdialog.h> #include "kmfoldermaildir.h" #include "kmfolderimap.h" @@ -73,7 +73,7 @@ public: RefreshCache }; - DImapTroubleShootDialog( QWidget* parent=0, const char* name=0 ); + DImapTroubleShootDialog( TQWidget* parent=0, const char* name=0 ); static int run(); @@ -81,8 +81,8 @@ private slots: void slotDone(); private: - QRadioButton *mIndexButton, *mCacheButton; - QComboBox *mIndexScope; + TQRadioButton *mIndexButton, *mCacheButton; + TQComboBox *mIndexScope; int rc; }; @@ -91,7 +91,7 @@ class KMFolderCachedImap : public KMFolderMaildir Q_OBJECT public: - static QString cacheLocation() { + static TQString cacheLocation() { return locateLocal("data", "kmail/dimap" ); } @@ -145,8 +145,8 @@ public: virtual void setSubfolderState(imapState state); /** The path to the imap folder on the server */ - void setImapPath(const QString &path); - QString imapPath() const { return mImapPath; } + void setImapPath(const TQString &path); + TQString imapPath() const { return mImapPath; } /** The highest UID in the folder */ void setLastUid( ulong uid ); @@ -156,8 +156,8 @@ public: KMMsgBase* findByUID( ulong uid ); /** The uidvalidity of the last update */ - void setUidValidity(const QString &validity) { mUidValidity = validity; } - QString uidValidity() const { return mUidValidity; } + void setUidValidity(const TQString &validity) { mUidValidity = validity; } + TQString uidValidity() const { return mUidValidity; } /** Forget which mails are considered locally present. Needed when uidvalidity * changes. */ @@ -168,7 +168,7 @@ public: KMAcctCachedImap* account() const; /** Returns the filename of the uidcache file */ - QString uidCacheLocation() const; + TQString uidCacheLocation() const; /** Read the uidValitidy and lastUid values from disk */ int readUidCache(); @@ -180,7 +180,7 @@ public: int progress() const { return mProgress; } /* Reimplemented from KMFolder. Moving is not supported, so aParent must be 0 */ - virtual int rename(const QString& aName, KMFolderDir *aParent=0); + virtual int rename(const TQString& aName, KMFolderDir *aParent=0); /** * Reimplemented from KMFolderMaildir @@ -206,7 +206,7 @@ public: /* Reimplemented from KMFolderMaildir */ virtual void removeMsg(int i, bool imapQuiet = false); - virtual void removeMsg(QPtrList<KMMessage> msgList, bool imapQuiet = false) + virtual void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = false) { FolderStorage::removeMsg(msgList, imapQuiet); } /// Is the folder readonly? @@ -269,7 +269,7 @@ public: void setQuotaInfo( const QuotaInfo & ); /// Return the list of ACL for this folder - typedef QValueVector<KMail::ACLListEntry> ACLList; + typedef TQValueVector<KMail::ACLListEntry> ACLList; const ACLList& aclList() const { return mACLList; } /// Set the list of ACL for this folder (for FolderDiaACLTab) @@ -277,9 +277,9 @@ public: // Reimplemented so the mStatusChangedLocally bool can be set virtual void setStatus( int id, KMMsgStatus status, bool toggle ); - virtual void setStatus( QValueList<int>& ids, KMMsgStatus status, bool toggle ); + virtual void setStatus( TQValueList<int>& ids, KMMsgStatus status, bool toggle ); - QString annotationFolderType() const { return mAnnotationFolderType; } + TQString annotationFolderType() const { return mAnnotationFolderType; } // For kmailicalifaceimpl only void updateAnnotationFolderType(); @@ -305,15 +305,15 @@ public: * List of namespaces that need to be queried * Is set by the account for the root folder when the listing starts */ - QStringList namespacesToList() { return mNamespacesToList; } - void setNamespacesToList( QStringList list ) { mNamespacesToList = list; } + TQStringList namespacesToList() { return mNamespacesToList; } + void setNamespacesToList( TQStringList list ) { mNamespacesToList = list; } /** * Specify an imap path that is used to create the folder on the server * Otherwise the parent folder is used to construct the path */ - const QString& imapPathForCreation() { return mImapPathCreation; } - void setImapPathForCreation( const QString& path ) { mImapPathCreation = path; } + const TQString& imapPathForCreation() { return mImapPathCreation; } + void setImapPathForCreation( const TQString& path ) { mImapPathCreation = path; } /** \reimp */ bool isCloseToQuota() const; @@ -322,10 +322,10 @@ public: int permanentFlags() const { return mPermanentFlags; } - QString folderAttributes() const { return mFolderAttributes; } + TQString folderAttributes() const { return mFolderAttributes; } protected slots: - void slotGetMessagesData(KIO::Job * job, const QByteArray & data); + void slotGetMessagesData(KIO::Job * job, const TQByteArray & data); void getMessagesResult(KMail::FolderJob *, bool lastSet); void slotGetLastMessagesResult(KMail::FolderJob *); void slotProgress(unsigned long done, unsigned long total); @@ -335,7 +335,7 @@ protected slots: void slotSubFolderComplete(KMFolderCachedImap*, bool); // Connected to the imap account - void slotConnectionResult( int errorCode, const QString& errorMsg ); + void slotConnectionResult( int errorCode, const TQString& errorMsg ); void slotCheckUidValidityResult( KMail::FolderJob* job ); void slotPermanentFlags( int flags ); @@ -347,11 +347,11 @@ protected slots: void slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& ); void slotMultiSetACLResult(KIO::Job *); - void slotACLChanged( const QString&, int ); - void slotAnnotationResult(const QString& entry, const QString& value, bool found); - void slotAnnotationChanged( const QString& entry, const QString& attribute, const QString& value ); + void slotACLChanged( const TQString&, int ); + void slotAnnotationResult(const TQString& entry, const TQString& value, bool found); + void slotAnnotationChanged( const TQString& entry, const TQString& attribute, const TQString& value ); void slotDeleteMessagesResult(KMail::FolderJob *); - void slotImapStatusChanged(KMFolder* folder, const QString&, bool); + void slotImapStatusChanged(KMFolder* folder, const TQString&, bool); void slotStorageQuotaResult( const QuotaInfo& ); void slotQuotaResult( KIO::Job* job ); @@ -366,32 +366,32 @@ protected: void createNewFolders(); void listDirectory2(); - void createFoldersNewOnServerAndFinishListing( const QValueVector<int> foldersNewOnServer ); + void createFoldersNewOnServerAndFinishListing( const TQValueVector<int> foldersNewOnServer ); /** Utility methods for syncing. Finds new messages in the local cache that must be uploaded */ - virtual QValueList<unsigned long> findNewMessages(); + virtual TQValueList<unsigned long> findNewMessages(); /** Utility methods for syncing. Finds new subfolders in the local cache that must be created in the server */ - virtual QValueList<KMFolderCachedImap*> findNewFolders(); + virtual TQValueList<KMFolderCachedImap*> findNewFolders(); /** This returns false if we have subfolders. Otherwise it returns ::canRemoveFolder() */ virtual bool canRemoveFolder() const; /** Reimplemented from KMFolder */ virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, - QString partSpecifier, const AttachmentStrategy *as ) const; - virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, + TQString partSpecifier, const AttachmentStrategy *as ) const; + virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const; - virtual void timerEvent( QTimerEvent* ); + virtual void timerEvent( TQTimerEvent* ); /* update progress status */ - void newState( int progress, const QString& syncStatus ); + void newState( int progress, const TQString& syncStatus ); /** See if there is a better parent then this folder */ - KMFolderCachedImap* findParent( const QString& path, const QString& name ); + KMFolderCachedImap* findParent( const TQString& path, const TQString& name ); @@ -399,7 +399,7 @@ public slots: /** * Add the data a KIO::Job retrieves to the buffer */ - void slotSimpleData(KIO::Job * job, const QByteArray & data); + void slotSimpleData(KIO::Job * job, const TQByteArray & data); /** * Troubleshoot the IMAP cache @@ -410,15 +410,15 @@ public slots: * Connected to ListJob::receivedFolders * creates/removes folders */ - void slotListResult( const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData& ); + void slotListResult( const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& ); /** * Connected to ListJob::receivedFolders * creates namespace folders */ - void slotCheckNamespace( const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData& ); + void slotCheckNamespace( const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& ); private slots: void serverSyncInternal(); @@ -438,7 +438,7 @@ signals: private: void setReadOnly( bool readOnly ); - QString state2String( int state ) const; + TQString state2String( int state ) const; void rememberDeletion( int ); /** Rescue not yet synced messages to a lost+found folder in case syncing is not possible because the folder has been deleted on the @@ -479,34 +479,34 @@ private: int mProgress; int mStatusFlagsJobs; - QString mUidValidity; - QString mImapPath; + TQString mUidValidity; + TQString mImapPath; imapState mContentState, mSubfolderState; - QStringList mSubfolderNames, mSubfolderPaths, + TQStringList mSubfolderNames, mSubfolderPaths, mSubfolderMimeTypes, mSubfolderAttributes; - QString mFolderAttributes; - QString mAnnotationFolderType; + TQString mFolderAttributes; + TQString mAnnotationFolderType; IncidencesFor mIncidencesFor; bool mHasInbox; bool mIsSelected; bool mCheckFlags; bool mReadOnly; - mutable QGuardedPtr<KMAcctCachedImap> mAccount; + mutable TQGuardedPtr<KMAcctCachedImap> mAccount; - QIntDict<int> uidsOnServer; - QValueList<ulong> uidsForDeletionOnServer; - QValueList<KMail::CachedImapJob::MsgForDownload> mMsgsForDownload; - QValueList<ulong> mUidsForDownload; - QStringList foldersForDeletionOnServer; + TQIntDict<int> uidsOnServer; + TQValueList<ulong> uidsForDeletionOnServer; + TQValueList<KMail::CachedImapJob::MsgForDownload> mMsgsForDownload; + TQValueList<ulong> mUidsForDownload; + TQStringList foldersForDeletionOnServer; - QValueList<KMFolderCachedImap*> mSubfoldersForSync; + TQValueList<KMFolderCachedImap*> mSubfoldersForSync; KMFolderCachedImap* mCurrentSubfolder; /** Mapping uid -> index Keep updated in addMsg, take and removeMsg. This is used to lookup whether a mail is present locally or not. */ - QMap<ulong,int> uidMap; + TQMap<ulong,int> uidMap; bool uidMapDirty; void reloadUidMap(); int uidWriteTimer; @@ -549,16 +549,16 @@ private: /// Set to true when the "incidences-for" annotation needs to be set on the next sync bool mIncidencesForChanged; - QStringList mNamespacesToList; + TQStringList mNamespacesToList; int mNamespacesToCheck; bool mPersonalNamespacesCheckDone; - QString mImapPathCreation; + TQString mImapPathCreation; QuotaInfo mQuotaInfo; - QMap<ulong,void*> mDeletedUIDsSinceLastSync; + TQMap<ulong,void*> mDeletedUIDsSinceLastSync; bool mAlarmsBlocked; - QValueList<KMFolder*> mToBeDeletedAfterRescue; + TQValueList<KMFolder*> mToBeDeletedAfterRescue; int mRescueCommandCount; int mPermanentFlags; diff --git a/kmail/kmfoldercombobox.cpp b/kmail/kmfoldercombobox.cpp index 49e14b573..499d444f1 100644 --- a/kmail/kmfoldercombobox.cpp +++ b/kmail/kmfoldercombobox.cpp @@ -8,8 +8,8 @@ //----------------------------------------------------------------------------- -KMFolderComboBox::KMFolderComboBox( QWidget *parent, char *name ) - : QComboBox( parent, name ) +KMFolderComboBox::KMFolderComboBox( TQWidget *parent, char *name ) + : TQComboBox( parent, name ) { init(); } @@ -17,8 +17,8 @@ KMFolderComboBox::KMFolderComboBox( QWidget *parent, char *name ) //----------------------------------------------------------------------------- -KMFolderComboBox::KMFolderComboBox( bool rw, QWidget *parent, char *name ) - : QComboBox( rw, parent, name ) +KMFolderComboBox::KMFolderComboBox( bool rw, TQWidget *parent, char *name ) + : TQComboBox( rw, parent, name ) { init(); } @@ -32,15 +32,15 @@ void KMFolderComboBox::init() mOutboxShown = true; mImapShown = true; refreshFolders(); - connect( this, SIGNAL( activated(int) ), - this, SLOT( slotActivated(int) ) ); - connect( kmkernel->folderMgr(), SIGNAL(changed()), - this, SLOT(refreshFolders()) ); - connect( kmkernel->dimapFolderMgr(), SIGNAL(changed()), - this, SLOT(refreshFolders()) ); + connect( this, TQT_SIGNAL( activated(int) ), + this, TQT_SLOT( slotActivated(int) ) ); + connect( kmkernel->folderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(refreshFolders()) ); + connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(refreshFolders()) ); if (mImapShown) - connect( kmkernel->imapFolderMgr(), SIGNAL(changed()), - this, SLOT(refreshFolders()) ); + connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(refreshFolders()) ); } @@ -59,22 +59,22 @@ void KMFolderComboBox::showImapFolders(bool shown) mImapShown = shown; refreshFolders(); if (shown) - connect( kmkernel->imapFolderMgr(), SIGNAL(changed()), - this, SLOT(refreshFolders()) ); + connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(refreshFolders()) ); else - disconnect( kmkernel->imapFolderMgr(), SIGNAL(changed()), - this, SLOT(refreshFolders()) ); + disconnect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(refreshFolders()) ); } //----------------------------------------------------------------------------- -void KMFolderComboBox::createFolderList(QStringList *names, - QValueList<QGuardedPtr<KMFolder> > *folders) +void KMFolderComboBox::createFolderList(TQStringList *names, + TQValueList<TQGuardedPtr<KMFolder> > *folders) { kmkernel->folderMgr()->createI18nFolderList( names, folders ); if ( !mOutboxShown ) { - QValueList< QGuardedPtr<KMFolder> >::iterator folderIt = folders->begin(); - QStringList::iterator namesIt = names->begin(); + TQValueList< TQGuardedPtr<KMFolder> >::iterator folderIt = folders->begin(); + TQStringList::iterator namesIt = names->begin(); for ( ; folderIt != folders->end(); ++folderIt, ++namesIt ) { KMFolder *folder = *folderIt; if ( folder == kmkernel->outboxFolder() ) @@ -96,8 +96,8 @@ void KMFolderComboBox::createFolderList(QStringList *names, void KMFolderComboBox::refreshFolders() { - QStringList names; - QValueList<QGuardedPtr<KMFolder> > folders; + TQStringList names; + TQValueList<TQGuardedPtr<KMFolder> > folders; createFolderList( &names, &folders ); KMFolder *folder = getFolder(); @@ -110,8 +110,8 @@ void KMFolderComboBox::refreshFolders() void KMFolderComboBox::setFolder( KMFolder *aFolder ) { - QStringList names; - QValueList<QGuardedPtr<KMFolder> > folders; + TQStringList names; + TQValueList<TQGuardedPtr<KMFolder> > folders; createFolderList( &names, &folders ); int idx = folders.findIndex( aFolder ); @@ -122,7 +122,7 @@ void KMFolderComboBox::setFolder( KMFolder *aFolder ) mFolder = aFolder; } -void KMFolderComboBox::setFolder( const QString &idString ) +void KMFolderComboBox::setFolder( const TQString &idString ) { KMFolder * folder = kmkernel->findFolderById( idString ); if (!folder && !idString.isEmpty()) @@ -146,16 +146,16 @@ KMFolder *KMFolderComboBox::getFolder() if (mFolder) return mFolder; - QStringList names; - QValueList<QGuardedPtr<KMFolder> > folders; + TQStringList names; + TQValueList<TQGuardedPtr<KMFolder> > folders; createFolderList( &names, &folders ); if (currentItem() == mSpecialIdx) return 0; - QString text = currentText(); + TQString text = currentText(); int idx = 0; - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = names.begin(); it != names.end(); ++it ) { if ( ! (*it).compare( text ) ) return *folders.at( idx ); @@ -169,8 +169,8 @@ KMFolder *KMFolderComboBox::getFolder() void KMFolderComboBox::slotActivated(int index) { - QStringList names; - QValueList<QGuardedPtr<KMFolder> > folders; + TQStringList names; + TQValueList<TQGuardedPtr<KMFolder> > folders; createFolderList( &names, &folders ); if (index == mSpecialIdx) diff --git a/kmail/kmfoldercombobox.h b/kmail/kmfoldercombobox.h index 1b46c104f..38268e752 100644 --- a/kmail/kmfoldercombobox.h +++ b/kmail/kmfoldercombobox.h @@ -1,5 +1,5 @@ /* kmail folder-list combo-box - * A specialized QComboBox widget that refreshes its contents when + * A specialized TQComboBox widget that refreshes its contents when * the folder list changes. */ @@ -8,16 +8,16 @@ #include "kmfolder.h" -#include <qcombobox.h> -#include <qguardedptr.h> +#include <tqcombobox.h> +#include <tqguardedptr.h> class KMFolderComboBox : public QComboBox { Q_OBJECT public: - KMFolderComboBox( QWidget *parent = 0, char *name = 0 ); - KMFolderComboBox( bool rw, QWidget *parent = 0, char *name = 0 ); + KMFolderComboBox( TQWidget *parent = 0, char *name = 0 ); + KMFolderComboBox( bool rw, TQWidget *parent = 0, char *name = 0 ); /** Select whether the outbox folder is shown. Default is yes. */ void showOutboxFolder(bool shown); @@ -26,7 +26,7 @@ public: void showImapFolders(bool shown); void setFolder( KMFolder *aFolder ); - void setFolder( const QString &idString ); + void setFolder( const TQString &idString ); KMFolder *getFolder(); public slots: @@ -38,11 +38,11 @@ private slots: private: /** Create folder list using the folder manager. */ - void createFolderList(QStringList *names, - QValueList<QGuardedPtr<KMFolder> > *folders); + void createFolderList(TQStringList *names, + TQValueList<TQGuardedPtr<KMFolder> > *folders); void init(); - QGuardedPtr<KMFolder> mFolder; + TQGuardedPtr<KMFolder> mFolder; bool mOutboxShown; bool mImapShown; int mSpecialIdx; diff --git a/kmail/kmfolderdia.cpp b/kmail/kmfolderdia.cpp index 2e4044ab0..cf02fcddf 100644 --- a/kmail/kmfolderdia.cpp +++ b/kmail/kmfolderdia.cpp @@ -59,19 +59,19 @@ #include <klistview.h> #include <kpushbutton.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qregexp.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqregexp.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <assert.h> -#include <qhbuttongroup.h> -#include <qradiobutton.h> -#include <qtextedit.h> +#include <tqhbuttongroup.h> +#include <tqradiobutton.h> +#include <tqtextedit.h> #include "templatesconfiguration.h" #include "templatesconfiguration_kfg.h" @@ -80,12 +80,12 @@ using namespace KMail; -static QString inCaseWeDecideToRenameTheTab( I18N_NOOP( "Permissions (ACL)" ) ); +static TQString inCaseWeDecideToRenameTheTab( I18N_NOOP( "Permissions (ACL)" ) ); //----------------------------------------------------------------------------- KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir, - KMFolderTree* aParent, const QString& aCap, - const QString& aName): + KMFolderTree* aParent, const TQString& aCap, + const TQString& aName): KDialogBase( KDialogBase::Tabbed, aCap, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, aParent, "KMFolderDialog", TRUE ), @@ -97,8 +97,8 @@ KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir, { kdDebug(5006)<<"KMFolderDialog::KMFolderDialog()" << endl; - QStringList folderNames; - QValueList<QGuardedPtr<KMFolder> > folders; + TQStringList folderNames; + TQValueList<TQGuardedPtr<KMFolder> > folders; // get all folders but search and folders that can not have children aParent->createFolderList(&folderNames, &folders, true, true, true, false, true, false); @@ -116,7 +116,7 @@ KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir, } FolderDiaTab* tab; - QVBox* box; + TQVBox* box; box = addVBoxPage( i18n("General") ); tab = new FolderDiaGeneralTab( this, aName, box ); @@ -149,12 +149,12 @@ KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir, void KMFolderDialog::addTab( FolderDiaTab* tab ) { - connect( tab, SIGNAL( readyForAccept() ), - this, SLOT( slotReadyForAccept() ) ); - connect( tab, SIGNAL( cancelAccept() ), - this, SLOT( slotCancelAccept() ) ); - //connect( tab, SIGNAL(changed( bool )), - // this, SLOT(slotChanged( bool )) ); + connect( tab, TQT_SIGNAL( readyForAccept() ), + this, TQT_SLOT( slotReadyForAccept() ) ); + connect( tab, TQT_SIGNAL( cancelAccept() ), + this, TQT_SLOT( slotCancelAccept() ) ); + //connect( tab, TQT_SIGNAL(changed( bool )), + // this, TQT_SLOT(slotChanged( bool )) ); mTabs.append( tab ); } @@ -233,20 +233,20 @@ void KMFolderDialog::setFolder( KMFolder* folder ) mFolder = folder; } -static void addLine( QWidget *parent, QVBoxLayout* layout ) +static void addLine( TQWidget *parent, TQVBoxLayout* layout ) { - QFrame *line = new QFrame( parent, "line" ); - line->setGeometry( QRect( 80, 150, 250, 20 ) ); - line->setFrameShape( QFrame::HLine ); - line->setFrameShadow( QFrame::Sunken ); - line->setFrameShape( QFrame::HLine ); + TQFrame *line = new TQFrame( parent, "line" ); + line->setGeometry( TQRect( 80, 150, 250, 20 ) ); + line->setFrameShape( TQFrame::HLine ); + line->setFrameShadow( TQFrame::Sunken ); + line->setFrameShape( TQFrame::HLine ); layout->addWidget( line ); } //---------------------------------------------------------------------------- KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, - const QString& aName, - QWidget* parent, const char* name ) + const TQString& aName, + TQWidget* parent, const char* name ) : FolderDiaTab( parent, name ), mDlg( dlg ) { @@ -255,17 +255,17 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, mDlg->folder()->folderType() != KMFolderTypeImap && mDlg->folder()->folderType() != KMFolderTypeCachedImap; - QLabel *label; + TQLabel *label; - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); // Musn't be able to edit details for a system folder. if ( !mIsLocalSystemFolder ) { - QHBoxLayout *hl = new QHBoxLayout( topLayout ); + TQHBoxLayout *hl = new TQHBoxLayout( topLayout ); hl->setSpacing( KDialog::spacingHint() ); - label = new QLabel( i18n("&Name:"), this ); + label = new TQLabel( i18n("&Name:"), this ); hl->addWidget( label ); mNameEdit = new KLineEdit( this ); @@ -277,7 +277,7 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, mNameEdit->setMinimumSize(mNameEdit->sizeHint()); // prevent renaming of IMAP inbox if ( mDlg->folder() && mDlg->folder()->isSystemFolder() ) { - QString imapPath; + TQString imapPath; if ( mDlg->folder()->folderType() == KMFolderTypeImap ) imapPath = static_cast<KMFolderImap*>( mDlg->folder()->storage() )->imapPath(); if ( mDlg->folder()->folderType() == KMFolderTypeCachedImap ) @@ -287,21 +287,21 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, } label->setBuddy( mNameEdit ); hl->addWidget( mNameEdit ); - connect( mNameEdit, SIGNAL( textChanged( const QString & ) ), - this, SLOT( slotFolderNameChanged( const QString & ) ) ); + connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( slotFolderNameChanged( const TQString & ) ) ); //start icons group - QVBoxLayout *ivl = new QVBoxLayout( topLayout ); + TQVBoxLayout *ivl = new TQVBoxLayout( topLayout ); ivl->setSpacing( KDialog::spacingHint() ); - QHBoxLayout *ihl = new QHBoxLayout( ivl ); - mIconsCheckBox = new QCheckBox( i18n("Use custom &icons"), this ); + TQHBoxLayout *ihl = new TQHBoxLayout( ivl ); + mIconsCheckBox = new TQCheckBox( i18n("Use custom &icons"), this ); mIconsCheckBox->setChecked( false ); ihl->addWidget( mIconsCheckBox ); ihl->addStretch( 2 ); - mNormalIconLabel = new QLabel( i18n("&Normal:"), this ); + mNormalIconLabel = new TQLabel( i18n("&Normal:"), this ); mNormalIconLabel->setEnabled( false ); ihl->addWidget( mNormalIconLabel ); @@ -316,7 +316,7 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, mNormalIconButton->setEnabled( false ); ihl->addWidget( mNormalIconButton ); - mUnreadIconLabel = new QLabel( i18n("&Unread:"), this ); + mUnreadIconLabel = new TQLabel( i18n("&Unread:"), this ); mUnreadIconLabel->setEnabled( false ); ihl->addWidget( mUnreadIconLabel ); @@ -332,17 +332,17 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, ihl->addWidget( mUnreadIconButton ); ihl->addStretch( 1 ); - connect( mIconsCheckBox, SIGNAL(toggled(bool)), - mNormalIconButton, SLOT(setEnabled(bool)) ); - connect( mIconsCheckBox, SIGNAL(toggled(bool)), - mUnreadIconButton, SLOT(setEnabled(bool)) ); - connect( mIconsCheckBox, SIGNAL(toggled(bool)), - mNormalIconLabel, SLOT(setEnabled(bool)) ); - connect( mIconsCheckBox, SIGNAL(toggled(bool)), - mUnreadIconLabel, SLOT(setEnabled(bool)) ); + connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)), + mNormalIconButton, TQT_SLOT(setEnabled(bool)) ); + connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)), + mUnreadIconButton, TQT_SLOT(setEnabled(bool)) ); + connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)), + mNormalIconLabel, TQT_SLOT(setEnabled(bool)) ); + connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)), + mUnreadIconLabel, TQT_SLOT(setEnabled(bool)) ); - connect( mNormalIconButton, SIGNAL(iconChanged(QString)), - this, SLOT(slotChangeIcon(QString)) ); + connect( mNormalIconButton, TQT_SIGNAL(iconChanged(TQString)), + this, TQT_SLOT(slotChangeIcon(TQString)) ); //end icons group addLine( this, topLayout); @@ -350,11 +350,11 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, // should new mail in this folder be ignored? - QHBoxLayout *hbl = new QHBoxLayout( topLayout ); + TQHBoxLayout *hbl = new TQHBoxLayout( topLayout ); hbl->setSpacing( KDialog::spacingHint() ); mNotifyOnNewMailCheckBox = - new QCheckBox( i18n("Act on new/unread mail in this folder" ), this ); - QWhatsThis::add( mNotifyOnNewMailCheckBox, + new TQCheckBox( i18n("Act on new/unread mail in this folder" ), this ); + TQWhatsThis::add( mNotifyOnNewMailCheckBox, i18n( "<qt><p>If this option is enabled then you will be notified about " "new/unread mail in this folder. Moreover, going to the " "next/previous folder with unread messages will stop at this " @@ -369,9 +369,9 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, if ( mDlg->folder()->folderType() == KMFolderTypeImap ) { // should this folder be included in new-mail-checks? - QHBoxLayout *nml = new QHBoxLayout( topLayout ); + TQHBoxLayout *nml = new TQHBoxLayout( topLayout ); nml->setSpacing( KDialog::spacingHint() ); - mNewMailCheckBox = new QCheckBox( i18n("Include this folder in mail checks"), this ); + mNewMailCheckBox = new TQCheckBox( i18n("Include this folder in mail checks"), this ); // default is on mNewMailCheckBox->setChecked(true); nml->addWidget( mNewMailCheckBox ); @@ -379,11 +379,11 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, } // should replies to mails in this folder be kept in this same folder? - hbl = new QHBoxLayout( topLayout ); + hbl = new TQHBoxLayout( topLayout ); hbl->setSpacing( KDialog::spacingHint() ); mKeepRepliesInSameFolderCheckBox = - new QCheckBox( i18n("Keep replies in this folder" ), this ); - QWhatsThis::add( mKeepRepliesInSameFolderCheckBox, + new TQCheckBox( i18n("Keep replies in this folder" ), this ); + TQWhatsThis::add( mKeepRepliesInSameFolderCheckBox, i18n( "Check this option if you want replies you write " "to mails in this folder to be put in this same folder " "after sending, instead of in the configured sent-mail folder." ) ); @@ -393,25 +393,25 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, addLine( this, topLayout ); // use grid layout for the following combobox settings - QGridLayout *gl = new QGridLayout( topLayout, 3, 2, KDialog::spacingHint() ); + TQGridLayout *gl = new TQGridLayout( topLayout, 3, 2, KDialog::spacingHint() ); gl->setColStretch( 1, 100 ); // make the second column use all available space int row = -1; // sender or receiver column? ++row; - QString tip = i18n("Show Sender/Receiver Column in List of Messages"); + TQString tip = i18n("Show Sender/Receiver Column in List of Messages"); - QLabel *sender_label = new QLabel( i18n("Sho&w column:" ), this ); + TQLabel *sender_label = new TQLabel( i18n("Sho&w column:" ), this ); gl->addWidget( sender_label, row, 0 ); - mShowSenderReceiverComboBox = new QComboBox( this ); - QToolTip::add( mShowSenderReceiverComboBox, tip ); + mShowSenderReceiverComboBox = new TQComboBox( this ); + TQToolTip::add( mShowSenderReceiverComboBox, tip ); sender_label->setBuddy(mShowSenderReceiverComboBox); gl->addWidget( mShowSenderReceiverComboBox, row, 1 ); mShowSenderReceiverComboBox->insertItem(i18n("Default"), 0); mShowSenderReceiverComboBox->insertItem(i18n("Sender"), 1); mShowSenderReceiverComboBox->insertItem(i18n("Receiver"), 2); - QString whoField; + TQString whoField; if (mDlg->folder()) whoField = mDlg->folder()->userWhoField(); if (whoField.isEmpty()) mShowSenderReceiverComboBox->setCurrentItem(0); else if (whoField == "From") mShowSenderReceiverComboBox->setCurrentItem(1); @@ -420,12 +420,12 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, // sender identity ++row; - label = new QLabel( i18n("&Sender identity:"), this ); + label = new TQLabel( i18n("&Sender identity:"), this ); gl->addWidget( label, row, 0 ); mIdentityComboBox = new KPIM::IdentityCombo( kmkernel->identityManager(), this ); label->setBuddy( mIdentityComboBox ); gl->addWidget( mIdentityComboBox, row, 1 ); - QWhatsThis::add( mIdentityComboBox, + TQWhatsThis::add( mIdentityComboBox, i18n( "Select the sender identity to be used when writing new mail " "or replying to mail in this folder. This means that if you are in " "one of your work folders, you can make KMail use the corresponding " @@ -439,9 +439,9 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, // Only do make this settable, if the IMAP resource is enabled // and it's not the personal folders (those must not be changed) ++row; - label = new QLabel( i18n("&Folder contents:"), this ); + label = new TQLabel( i18n("&Folder contents:"), this ); gl->addWidget( label, row, 0 ); - mContentsComboBox = new QComboBox( this ); + mContentsComboBox = new TQComboBox( this ); label->setBuddy( mContentsComboBox ); gl->addWidget( mContentsComboBox, row, 1 ); @@ -453,8 +453,8 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, mContentsComboBox->insertItem( i18n( "Journal" ) ); if ( mDlg->folder() ) mContentsComboBox->setCurrentItem( mDlg->folder()->storage()->contentsType() ); - connect ( mContentsComboBox, SIGNAL ( activated( int ) ), - this, SLOT( slotFolderContentsSelectionChanged( int ) ) ); + connect ( mContentsComboBox, TQT_SIGNAL ( activated( int ) ), + this, TQT_SLOT( slotFolderContentsSelectionChanged( int ) ) ); if ( mDlg->folder()->isReadOnly() ) mContentsComboBox->setEnabled( false ); } else { @@ -472,13 +472,13 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, mContentsComboBox ) { ++row; - QLabel* label = new QLabel( i18n( "Generate free/&busy and activate alarms for:" ), this ); + TQLabel* label = new TQLabel( i18n( "Generate free/&busy and activate alarms for:" ), this ); gl->addWidget( label, row, 0 ); - mIncidencesForComboBox = new QComboBox( this ); + mIncidencesForComboBox = new TQComboBox( this ); label->setBuddy( mIncidencesForComboBox ); gl->addWidget( mIncidencesForComboBox, row, 1 ); - const QString whatsThisForMyOwnFolders = + const TQString whatsThisForMyOwnFolders = i18n( "This setting defines which users sharing " "this folder should get \"busy\" periods in their freebusy lists " "and should see the alarms for the events or tasks in this folder. " @@ -493,20 +493,20 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg, "A company-wide folder with optional events in it would use \"Nobody\" " "since it is not known who will go to those events." ); - QWhatsThis::add( mIncidencesForComboBox, whatsThisForMyOwnFolders ); + TQWhatsThis::add( mIncidencesForComboBox, whatsThisForMyOwnFolders ); mIncidencesForComboBox->insertItem( i18n( "Nobody" ) ); mIncidencesForComboBox->insertItem( i18n( "Admins of This Folder" ) ); mIncidencesForComboBox->insertItem( i18n( "All Readers of This Folder" ) ); ++row; - const QString whatsThisForReadOnlyFolders = + const TQString whatsThisForReadOnlyFolders = i18n( "This setting allows you to disable alarms for folders shared by " "others. "); - mAlarmsBlockedCheckBox = new QCheckBox( this ); + mAlarmsBlockedCheckBox = new TQCheckBox( this ); gl->addWidget( mAlarmsBlockedCheckBox, row, 0 ); - label = new QLabel( i18n( "Block free/&busy and alarms locally" ), this ); + label = new TQLabel( i18n( "Block free/&busy and alarms locally" ), this ); gl->addWidget( label, row, 1 ); label->setBuddy( mAlarmsBlockedCheckBox ); - QWhatsThis::add( mAlarmsBlockedCheckBox, whatsThisForReadOnlyFolders ); + TQWhatsThis::add( mAlarmsBlockedCheckBox, whatsThisForReadOnlyFolders ); if ( mDlg->folder()->storage()->contentsType() != KMail::ContentsTypeCalendar && mDlg->folder()->storage()->contentsType() != KMail::ContentsTypeTask ) { @@ -535,7 +535,7 @@ void FolderDiaGeneralTab::initializeWithValuesFromFolder( KMFolder* folder ) { mNormalIconButton->setEnabled( folder->useCustomIcons() ); mUnreadIconLabel->setEnabled( folder->useCustomIcons() ); mUnreadIconButton->setEnabled( folder->useCustomIcons() ); - QString iconPath = folder->normalIconPath(); + TQString iconPath = folder->normalIconPath(); if ( !iconPath.isEmpty() ) mNormalIconButton->setIcon( iconPath ); iconPath = folder->unreadIconPath(); @@ -571,7 +571,7 @@ void FolderDiaGeneralTab::initializeWithValuesFromFolder( KMFolder* folder ) { } //----------------------------------------------------------------------------- -void FolderDiaGeneralTab::slotFolderNameChanged( const QString& str ) +void FolderDiaGeneralTab::slotFolderNameChanged( const TQString& str ) { mDlg->enableButtonOK( !str.isEmpty() ); } @@ -582,7 +582,7 @@ void FolderDiaGeneralTab::slotFolderContentsSelectionChanged( int ) KMail::FolderContentsType type = static_cast<KMail::FolderContentsType>( mContentsComboBox->currentItem() ); if( type != KMail::ContentsTypeMail && GlobalSettings::self()->hideGroupwareFolders() ) { - QString message = i18n("You have configured this folder to contain groupware information " + TQString message = i18n("You have configured this folder to contain groupware information " "and the general configuration option to hide groupware folders is " "set. That means that this folder will disappear once the configuration " "dialog is closed. If you want to remove the folder again, you will need " @@ -613,10 +613,10 @@ bool FolderDiaGeneralTab::save() folder->setIgnoreNewMail( !mNotifyOnNewMailCheckBox->isChecked() ); folder->setPutRepliesInSameFolder( mKeepRepliesInSameFolderCheckBox->isChecked() ); - QString fldName, oldFldName; + TQString fldName, oldFldName; if ( !mIsLocalSystemFolder ) { - QString acctName; + TQString acctName; oldFldName = mDlg->folder()->name(); if (!mNameEdit->text().isEmpty()) @@ -628,7 +628,7 @@ bool FolderDiaGeneralTab::save() mDlg->parentFolder()->folderType() != KMFolderTypeImap && mDlg->parentFolder()->folderType() != KMFolderTypeCachedImap ) fldName.remove('/'); - fldName.remove(QRegExp("^\\.*")); + fldName.remove(TQRegExp("^\\.*")); if (fldName.isEmpty()) fldName = i18n("unnamed"); @@ -697,14 +697,14 @@ bool FolderDiaGeneralTab::save() return true; } -void FolderDiaGeneralTab::slotChangeIcon( QString icon ) // can't use a const-ref here, due to KIconButton's signal +void FolderDiaGeneralTab::slotChangeIcon( TQString icon ) // can't use a const-ref here, due to KIconButton's signal { mUnreadIconButton->setIcon( icon ); } //---------------------------------------------------------------------------- KMail::FolderDiaTemplatesTab::FolderDiaTemplatesTab( KMFolderDialog* dlg, - QWidget* parent ) + TQWidget* parent ) : FolderDiaTab( parent, 0 ), mDlg( dlg ) { @@ -712,32 +712,32 @@ KMail::FolderDiaTemplatesTab::FolderDiaTemplatesTab( KMFolderDialog* dlg, mDlg->folder()->folderType() != KMFolderTypeImap && mDlg->folder()->folderType() != KMFolderTypeCachedImap; - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - mCustom = new QCheckBox( i18n("&Use custom message templates"), this ); + mCustom = new TQCheckBox( i18n("&Use custom message templates"), this ); topLayout->addWidget( mCustom ); mWidget = new TemplatesConfiguration( this , "folder-templates" ); mWidget->setEnabled( false ); topLayout->addWidget( mWidget ); - QHBoxLayout *btns = new QHBoxLayout( topLayout, KDialog::spacingHint() ); + TQHBoxLayout *btns = new TQHBoxLayout( topLayout, KDialog::spacingHint() ); mCopyGlobal = new KPushButton( i18n("&Copy global templates"), this ); 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( mCustom, TQT_SIGNAL(toggled(bool)), + mWidget, TQT_SLOT(setEnabled(bool)) ); + connect( mCustom, TQT_SIGNAL(toggled(bool)), + mCopyGlobal, TQT_SLOT(setEnabled(bool)) ); - connect( mCopyGlobal, SIGNAL(clicked()), - this, SLOT(slotCopyGlobal()) ); + connect( mCopyGlobal, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCopyGlobal()) ); initializeWithValuesFromFolder( mDlg->folder() ); - connect( mWidget, SIGNAL( changed() ), - this, SLOT( slotEmitChanged( void ) ) ); + connect( mWidget, TQT_SIGNAL( changed() ), + this, TQT_SLOT( slotEmitChanged( void ) ) ); } void FolderDiaTemplatesTab::load() @@ -751,7 +751,7 @@ void FolderDiaTemplatesTab::initializeWithValuesFromFolder( KMFolder* folder ) { mFolder = folder; - QString fid = folder->idString(); + TQString fid = folder->idString(); Templates t( fid ); @@ -767,7 +767,7 @@ bool FolderDiaTemplatesTab::save() { KMFolder* folder = mDlg->folder(); - QString fid = folder->idString(); + TQString fid = folder->idString(); Templates t(fid); kdDebug() << "use custom templates for folder " << fid << ": " << mCustom->isChecked() << endl; diff --git a/kmail/kmfolderdia.h b/kmail/kmfolderdia.h index c1df2b546..f516e8bac 100644 --- a/kmail/kmfolderdia.h +++ b/kmail/kmfolderdia.h @@ -34,7 +34,7 @@ #include <kdialogbase.h> #include "configuredialog_p.h" -#include <qvaluevector.h> +#include <tqvaluevector.h> class QCheckBox; class QPushButton; @@ -71,8 +71,8 @@ class FolderDiaTab : public QWidget { Q_OBJECT public: - FolderDiaTab( QWidget *parent=0, const char* name=0 ) - : QWidget( parent, name ) {} + FolderDiaTab( TQWidget *parent=0, const char* name=0 ) + : TQWidget( parent, name ) {} virtual void load() = 0; @@ -114,37 +114,37 @@ class FolderDiaGeneralTab : public FolderDiaTab public: FolderDiaGeneralTab( KMFolderDialog* dlg, - const QString& aName, - QWidget* parent, const char* name = 0 ); + const TQString& aName, + TQWidget* parent, const char* name = 0 ); virtual void load(); virtual bool save(); private slots: - void slotChangeIcon( QString icon ); + void slotChangeIcon( TQString icon ); /* * is called if the folder dropdown changes * then we update the other items to reflect the capabilities */ - void slotFolderNameChanged( const QString& ); + void slotFolderNameChanged( const TQString& ); void slotFolderContentsSelectionChanged( int ); private: void initializeWithValuesFromFolder( KMFolder* folder ); private: - QComboBox *mShowSenderReceiverComboBox; - QComboBox *mContentsComboBox; - QComboBox *mIncidencesForComboBox; - QCheckBox *mAlarmsBlockedCheckBox; - QLabel *mNormalIconLabel; + TQComboBox *mShowSenderReceiverComboBox; + TQComboBox *mContentsComboBox; + TQComboBox *mIncidencesForComboBox; + TQCheckBox *mAlarmsBlockedCheckBox; + TQLabel *mNormalIconLabel; KIconButton *mNormalIconButton; - QLabel *mUnreadIconLabel; + TQLabel *mUnreadIconLabel; KIconButton *mUnreadIconButton; - QCheckBox *mIconsCheckBox; - QCheckBox *mNewMailCheckBox; - QCheckBox *mNotifyOnNewMailCheckBox; - QCheckBox *mKeepRepliesInSameFolderCheckBox; + TQCheckBox *mIconsCheckBox; + TQCheckBox *mNewMailCheckBox; + TQCheckBox *mNotifyOnNewMailCheckBox; + TQCheckBox *mKeepRepliesInSameFolderCheckBox; KLineEdit *mNameEdit; KPIM::IdentityCombo *mIdentityComboBox; @@ -162,7 +162,7 @@ class FolderDiaTemplatesTab : public FolderDiaTab Q_OBJECT public: - FolderDiaTemplatesTab( KMFolderDialog *dlg, QWidget *parent ); + FolderDiaTemplatesTab( KMFolderDialog *dlg, TQWidget *parent ); virtual void load(); virtual bool save(); @@ -176,7 +176,7 @@ private: void initializeWithValuesFromFolder( KMFolder* folder ); private: - QCheckBox* mCustom; + TQCheckBox* mCustom; TemplatesConfiguration* mWidget; KPushButton* mCopyGlobal; KMFolder* mFolder; @@ -197,8 +197,8 @@ class KMFolderDialog : public KDialogBase public: KMFolderDialog( KMFolder *folder, KMFolderDir *aFolderDir, - KMFolderTree* parent, const QString& caption, - const QString& name = QString::null ); + KMFolderTree* parent, const TQString& caption, + const TQString& name = TQString::null ); KMFolder* folder() const { return mFolder; } void setFolder( KMFolder* folder ); @@ -207,7 +207,7 @@ public: bool isNewFolder() const { return mIsNewFolder; } KMFolderDir* folderDir() const { return mFolderDir; } - typedef QValueList<QGuardedPtr<KMFolder> > FolderList; + typedef TQValueList<TQGuardedPtr<KMFolder> > FolderList; KMFolder* parentFolder() const { return mParentFolder; } @@ -226,13 +226,13 @@ private: private: // Can be 0 initially when creating a folder, but will be set by save() in the first tab. - QGuardedPtr<KMFolder> mFolder; - QGuardedPtr<KMFolderDir> mFolderDir; - QGuardedPtr<KMFolder> mParentFolder; + TQGuardedPtr<KMFolder> mFolder; + TQGuardedPtr<KMFolderDir> mFolderDir; + TQGuardedPtr<KMFolder> mParentFolder; bool mIsNewFolder; // if true, save() did set mFolder. - QValueVector<KMail::FolderDiaTab*> mTabs; + TQValueVector<KMail::FolderDiaTab*> mTabs; int mDelayedSavingTabs; // this should go into a base class one day KMFolderTree* mFolderTree; }; diff --git a/kmail/kmfolderdir.cpp b/kmail/kmfolderdir.cpp index 1092e41cd..46aba345c 100644 --- a/kmail/kmfolderdir.cpp +++ b/kmail/kmfolderdir.cpp @@ -1,7 +1,7 @@ // kmfolderdir.cpp #include <config.h> -#include <qdir.h> +#include <tqdir.h> #include "kmfolderdir.h" #include "kmfoldersearch.h" @@ -18,7 +18,7 @@ //============================================================================= //============================================================================= -KMFolderRootDir::KMFolderRootDir(KMFolderMgr* manager, const QString& path, +KMFolderRootDir::KMFolderRootDir(KMFolderMgr* manager, const TQString& path, KMFolderDirType dirType) : KMFolderDir( 0, 0, path, dirType ), mPath( path ), @@ -36,31 +36,31 @@ KMFolderRootDir::~KMFolderRootDir() } //----------------------------------------------------------------------------- -void KMFolderRootDir::setPath(const QString& aPath) +void KMFolderRootDir::setPath(const TQString& aPath) { mPath = aPath; } //----------------------------------------------------------------------------- -QString KMFolderRootDir::path() const +TQString KMFolderRootDir::path() const { return mPath; } //----------------------------------------------------------------------------- -QString KMFolderRootDir::prettyURL() const +TQString KMFolderRootDir::prettyURL() const { if ( !mBaseURL.isEmpty() ) return i18n( mBaseURL.data() ); else - return QString::null; + return TQString::null; } //----------------------------------------------------------------------------- -void KMFolderRootDir::setBaseURL( const QCString &baseURL ) +void KMFolderRootDir::setBaseURL( const TQCString &baseURL ) { mBaseURL = baseURL; } @@ -76,7 +76,7 @@ KMFolderMgr* KMFolderRootDir::manager() const //============================================================================= //============================================================================= KMFolderDir::KMFolderDir( KMFolder * owner, KMFolderDir* parent, - const QString& name, KMFolderDirType dirType ) + const TQString& name, KMFolderDirType dirType ) : KMFolderNode( parent, name ), KMFolderNodeList(), mOwner( owner ), mDirType( dirType ) { @@ -92,7 +92,7 @@ KMFolderDir::~KMFolderDir() //----------------------------------------------------------------------------- -KMFolder* KMFolderDir::createFolder(const QString& aFolderName, bool aSysFldr, KMFolderType aFolderType) +KMFolder* KMFolderDir::createFolder(const TQString& aFolderName, bool aSysFldr, KMFolderType aFolderType) { KMFolder* fld; @@ -125,9 +125,9 @@ KMFolder* KMFolderDir::createFolder(const QString& aFolderName, bool aSysFldr, K //---------------------------------------------------------------------------- -QString KMFolderDir::path() const +TQString KMFolderDir::path() const { - static QString p; + static TQString p; if (parent()) { @@ -142,19 +142,19 @@ QString KMFolderDir::path() const //---------------------------------------------------------------------------- -QString KMFolderDir::label() const +TQString KMFolderDir::label() const { if ( mOwner ) return mOwner->label(); else - return QString::null; + return TQString::null; } //----------------------------------------------------------------------------- -QString KMFolderDir::prettyURL() const +TQString KMFolderDir::prettyURL() const { - QString parentUrl; + TQString parentUrl; if ( parent() ) parentUrl = parent()->prettyURL(); if ( !parentUrl.isEmpty() ) @@ -167,21 +167,21 @@ QString KMFolderDir::prettyURL() const //----------------------------------------------------------------------------- bool KMFolderDir::reload(void) { - QDir dir; + TQDir dir; KMFolder* folder; - QFileInfo* fileInfo; - QStringList diList; - QPtrList<KMFolder> folderList; + TQFileInfo* fileInfo; + TQStringList diList; + TQPtrList<KMFolder> folderList; clear(); - const QString fldPath = path(); - dir.setFilter(QDir::Files | QDir::Dirs | QDir::Hidden); + const TQString fldPath = path(); + dir.setFilter(TQDir::Files | TQDir::Dirs | TQDir::Hidden); dir.setNameFilter("*"); if (!dir.cd(fldPath, TRUE)) { - QString msg = i18n("<qt>Cannot enter folder <b>%1</b>.</qt>").arg(fldPath); + TQString msg = i18n("<qt>Cannot enter folder <b>%1</b>.</qt>").arg(fldPath); KMessageBox::information(0, msg); return FALSE; } @@ -189,14 +189,14 @@ bool KMFolderDir::reload(void) QFileInfoList* fiList=(QFileInfoList*)dir.entryInfoList(); if (!fiList) { - QString msg = i18n("<qt>Folder <b>%1</b> is unreadable.</qt>").arg(fldPath); + TQString msg = i18n("<qt>Folder <b>%1</b> is unreadable.</qt>").arg(fldPath); KMessageBox::information(0, msg); return FALSE; } for (fileInfo=fiList->first(); fileInfo; fileInfo=fiList->next()) { - const QString fname = fileInfo->fileName(); + const TQString fname = fileInfo->fileName(); if( ( fname[0] == '.' ) && !fname.endsWith( ".directory" ) ) { // ignore all hidden files except our subfolder containers continue; @@ -232,8 +232,8 @@ bool KMFolderDir::reload(void) { // For this to be a cached IMAP folder, it must be in the KMail dimap // subdir and must be have a uidcache file or be a maildir folder - QString maildir(fname + "/new"); - QString imapcachefile = QString::fromLatin1(".%1.uidcache").arg(fname); + TQString maildir(fname + "/new"); + TQString imapcachefile = TQString::fromLatin1(".%1.uidcache").arg(fname); if ( dir.exists( imapcachefile) || dir.exists( maildir ) ) { folder = new KMFolder( this, fname, KMFolderTypeCachedImap ); @@ -274,7 +274,7 @@ bool KMFolderDir::reload(void) for (folder=folderList.first(); folder; folder=folderList.next()) { - for(QStringList::Iterator it = diList.begin(); + for(TQStringList::Iterator it = diList.begin(); it != diList.end(); ++it) if (*it == "." + folder->fileName() + ".directory") @@ -291,7 +291,7 @@ bool KMFolderDir::reload(void) //----------------------------------------------------------------------------- -KMFolderNode* KMFolderDir::hasNamedFolder(const QString& aName) +KMFolderNode* KMFolderDir::hasNamedFolder(const TQString& aName) { KMFolderNode* fNode; for (fNode=first(); fNode; fNode=next()) { diff --git a/kmail/kmfolderdir.h b/kmail/kmfolderdir.h index 5fa30b86e..72f4c4326 100644 --- a/kmail/kmfolderdir.h +++ b/kmail/kmfolderdir.h @@ -1,7 +1,7 @@ #ifndef kmfolderdir_h #define kmfolderdir_h -#include <qstring.h> +#include <tqstring.h> #include "kmfoldernode.h" #include "kmfoldertype.h" @@ -18,7 +18,7 @@ class KMFolderDir: public KMFolderNode, public KMFolderNodeList public: KMFolderDir( KMFolder * owner, KMFolderDir * parent = 0, - const QString& path = QString::null, + const TQString& path = TQString::null, KMFolderDirType = KMStandardDir ); virtual ~KMFolderDir(); @@ -28,23 +28,23 @@ public: virtual bool reload(); /** Return full pathname of this directory. */ - virtual QString path() const; + virtual TQString path() const; /** Returns the label of the folder for visualization. */ - QString label() const; + TQString label() const; /** URL of the node for visualization purposes. */ - virtual QString prettyURL() const; + virtual TQString prettyURL() const; /** Create a mail folder in this directory with given name. If sysFldr==TRUE the folder is marked as a (KMail) system folder. Returns Folder on success. */ - virtual KMFolder* createFolder(const QString& folderName, + virtual KMFolder* createFolder(const TQString& folderName, bool sysFldr=false, KMFolderType folderType=KMFolderTypeMbox); /** Returns folder with given name or zero if it does not exist */ - virtual KMFolderNode* hasNamedFolder(const QString& name); + virtual KMFolderNode* hasNamedFolder(const TQString& name); /** Returns the folder manager that manages this folder */ virtual KMFolderMgr* manager() const; @@ -68,24 +68,24 @@ class KMFolderRootDir: public KMFolderDir public: KMFolderRootDir(KMFolderMgr* manager, - const QString& path=QString::null, + const TQString& path=TQString::null, KMFolderDirType dirType = KMStandardDir); virtual ~KMFolderRootDir(); - virtual QString path() const; + virtual TQString path() const; /** set the absolute path */ - virtual void setPath(const QString&); + virtual void setPath(const TQString&); - virtual QString prettyURL() const; + virtual TQString prettyURL() const; - void setBaseURL( const QCString& baseURL ); + void setBaseURL( const TQCString& baseURL ); virtual KMFolderMgr* manager() const; protected: - QString mPath; + TQString mPath; KMFolderMgr *mManager; - QCString mBaseURL; + TQCString mBaseURL; }; #endif /*kmfolderdir_h*/ diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp index f30e11b67..f32162f8a 100644 --- a/kmail/kmfolderimap.cpp +++ b/kmail/kmfolderimap.cpp @@ -54,9 +54,9 @@ using KMail::RenameJob; #include <kio/scheduler.h> #include <kconfig.h> -#include <qbuffer.h> -#include <qtextcodec.h> -#include <qstylesheet.h> +#include <tqbuffer.h> +#include <tqtextcodec.h> +#include <tqstylesheet.h> #include <assert.h> @@ -80,8 +80,8 @@ KMFolderImap::KMFolderImap(KMFolder* folder, const char* aName) mAddMessageProgressItem = 0; mReadOnly = false; - connect (this, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotCompleteMailCheckProgress()) ); + connect (this, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotCompleteMailCheckProgress()) ); } KMFolderImap::~KMFolderImap() @@ -130,7 +130,7 @@ void KMFolderImap::reallyDoClose(const char* owner) KMFolder* KMFolderImap::trashFolder() const { - QString trashStr = account()->trash(); + TQString trashStr = account()->trash(); return kmkernel->imapFolderMgr()->findIdString( trashStr ); } @@ -198,7 +198,7 @@ void KMFolderImap::readConfig() if ( mImapPath.isEmpty() ) { setImapPath( config->readEntry("ImapPath") ); } - if (QString(name()).upper() == "INBOX" && mImapPath == "/INBOX/") + if (TQString(name()).upper() == "INBOX" && mImapPath == "/INBOX/") { folder()->setSystemFolder( true ); folder()->setLabel( i18n("inbox") ); @@ -249,12 +249,12 @@ void KMFolderImap::remove() jd.progressItem = ProgressManager::createProgressItem( "ImapFolderRemove" + ProgressManager::getUniqueID(), i18n("Removing folder"), - i18n( "URL: %1" ).arg( QStyleSheet::escape( folder()->prettyURL() ) ), + i18n( "URL: %1" ).arg( TQStyleSheet::escape( folder()->prettyURL() ) ), false, account()->useSSL() || account()->useTLS() ); account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotRemoveFolderResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotRemoveFolderResult(KIO::Job *))); } //----------------------------------------------------------------------------- @@ -289,7 +289,7 @@ void KMFolderImap::removeMsg(int idx, bool quiet) KMFolderMbox::removeMsg(idx); } -void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet ) +void KMFolderImap::removeMsg( const TQPtrList<KMMessage>& msgList, bool quiet ) { if ( msgList.isEmpty() ) return; if (!quiet) @@ -298,11 +298,11 @@ void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet ) mLastUid = 0; /* Remove the messages from the local store as well. - We don't call KMFolderInherited::removeMsg(QPtrList<KMMessage>) but + We don't call KMFolderInherited::removeMsg(TQPtrList<KMMessage>) but iterate ourselves, as that would call KMFolderImap::removeMsg(int) and not the one from the store we want to be used. */ - QPtrListIterator<KMMessage> it( msgList ); + TQPtrListIterator<KMMessage> it( msgList ); KMMessage *msg; while ( (msg = it.current()) != 0 ) { ++it; @@ -314,7 +314,7 @@ void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet ) } //----------------------------------------------------------------------------- -int KMFolderImap::rename( const QString& newName, KMFolderDir *aParent ) +int KMFolderImap::rename( const TQString& newName, KMFolderDir *aParent ) { if ( !aParent ) KMFolderMbox::rename( newName ); @@ -350,7 +350,7 @@ void KMFolderImap::addMsgQuiet(KMMessage* aMsg) } //----------------------------------------------------------------------------- -void KMFolderImap::addMsgQuiet(QPtrList<KMMessage> msgList) +void KMFolderImap::addMsgQuiet(TQPtrList<KMMessage> msgList) { if ( mAddMessageProgressItem ) { @@ -387,15 +387,15 @@ void KMFolderImap::addMsgQuiet(QPtrList<KMMessage> msgList) //----------------------------------------------------------------------------- int KMFolderImap::addMsg(KMMessage* aMsg, int* aIndex_ret) { - QPtrList<KMMessage> list; + TQPtrList<KMMessage> list; list.append(aMsg); - QValueList<int> index; + TQValueList<int> index; int ret = addMsg(list, index); aIndex_ret = &index.first(); return ret; } -int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_ret) +int KMFolderImap::addMsg(TQPtrList<KMMessage>& msgList, TQValueList<int>& aIndex_ret) { KMMessage *aMsg = msgList.getFirst(); KMFolder *msgParent = aMsg->parent(); @@ -423,32 +423,32 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r msg = msgParent->getMsg(idx); } imapJob = new ImapJob(msg, ImapJob::tPutMessage, this); - connect(imapJob, SIGNAL(messageStored(KMMessage*)), - SLOT(addMsgQuiet(KMMessage*))); - connect(imapJob, SIGNAL(result(KMail::FolderJob*)), - SLOT(slotCopyMsgResult(KMail::FolderJob*))); + connect(imapJob, TQT_SIGNAL(messageStored(KMMessage*)), + TQT_SLOT(addMsgQuiet(KMMessage*))); + connect(imapJob, TQT_SIGNAL(result(KMail::FolderJob*)), + TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*))); imapJob->start(); } } else { // get the messages and the uids - QValueList<ulong> uids; + TQValueList<ulong> uids; getUids(msgList, uids); // get the sets (do not sort the uids) - QStringList sets = makeSets(uids, false); + TQStringList sets = makeSets(uids, false); - for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) + for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { // we need the messages that belong to the current set to pass them to the ImapJob - QPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList); + TQPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList); if ( temp_msgs.isEmpty() ) kdDebug(5006) << "Wow! KMFolderImap::splitMessageList() returned an empty list!" << endl; imapJob = new ImapJob(temp_msgs, *it, ImapJob::tMoveMessage, this); - connect(imapJob, SIGNAL(messageCopied(QPtrList<KMMessage>)), - SLOT(addMsgQuiet(QPtrList<KMMessage>))); - connect(imapJob, SIGNAL(result(KMail::FolderJob*)), - SLOT(slotCopyMsgResult(KMail::FolderJob*))); + connect(imapJob, TQT_SIGNAL(messageCopied(TQPtrList<KMMessage>)), + TQT_SLOT(addMsgQuiet(TQPtrList<KMMessage>))); + connect(imapJob, TQT_SIGNAL(result(KMail::FolderJob*)), + TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*))); imapJob->start(); } } @@ -457,7 +457,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r else { // different account, check if messages can be added - QPtrListIterator<KMMessage> it( msgList ); + TQPtrListIterator<KMMessage> it( msgList ); KMMessage *msg; while ( (msg = it.current()) != 0 ) { @@ -478,7 +478,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r if ( !msgList.isEmpty() ) { // transfer from local folders or other accounts - QPtrListIterator<KMMessage> it( msgList ); + TQPtrListIterator<KMMessage> it( msgList ); KMMessage* msg; while ( ( msg = it.current() ) != 0 ) { @@ -486,7 +486,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r if ( !msg->transferInProgress() ) msg->setTransferInProgress( true ); } - imapJob = new ImapJob( msgList, QString::null, ImapJob::tPutMessage, this ); + imapJob = new ImapJob( msgList, TQString::null, ImapJob::tPutMessage, this ); if ( !mAddMessageProgressItem && msgList.count() > 1 ) { // use a parent progress if we have more than 1 message @@ -494,18 +494,18 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r mAddMessageProgressItem = ProgressManager::createProgressItem( "Uploading"+ProgressManager::getUniqueID(), i18n("Uploading message data"), - i18n("Destination folder: %1").arg( QStyleSheet::escape( folder()->prettyURL() ) ), + i18n("Destination folder: %1").arg( TQStyleSheet::escape( folder()->prettyURL() ) ), true, account()->useSSL() || account()->useTLS() ); mAddMessageProgressItem->setTotalItems( msgList.count() ); - connect ( mAddMessageProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), - account(), SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); + connect ( mAddMessageProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), + account(), TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) ); imapJob->setParentProgressItem( mAddMessageProgressItem ); } - connect( imapJob, SIGNAL( messageCopied(QPtrList<KMMessage>) ), - SLOT( addMsgQuiet(QPtrList<KMMessage>) ) ); - connect( imapJob, SIGNAL(result(KMail::FolderJob*)), - SLOT(slotCopyMsgResult(KMail::FolderJob*)) ); + connect( imapJob, TQT_SIGNAL( messageCopied(TQPtrList<KMMessage>) ), + TQT_SLOT( addMsgQuiet(TQPtrList<KMMessage>) ) ); + connect( imapJob, TQT_SIGNAL(result(KMail::FolderJob*)), + TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)) ); imapJob->start(); } @@ -521,7 +521,7 @@ void KMFolderImap::slotCopyMsgResult( KMail::FolderJob* job ) } //----------------------------------------------------------------------------- -void KMFolderImap::copyMsg(QPtrList<KMMessage>& msgList) +void KMFolderImap::copyMsg(TQPtrList<KMMessage>& msgList) { if ( !account()->hasCapability("uidplus") ) { for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) { @@ -531,24 +531,24 @@ void KMFolderImap::copyMsg(QPtrList<KMMessage>& msgList) } } - QValueList<ulong> uids; + TQValueList<ulong> uids; getUids(msgList, uids); - QStringList sets = makeSets(uids, false); - for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) + TQStringList sets = makeSets(uids, false); + for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { // we need the messages that belong to the current set to pass them to the ImapJob - QPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList); + TQPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList); ImapJob *job = new ImapJob(temp_msgs, *it, ImapJob::tCopyMessage, this); - connect(job, SIGNAL(result(KMail::FolderJob*)), - SLOT(slotCopyMsgResult(KMail::FolderJob*))); + connect(job, TQT_SIGNAL(result(KMail::FolderJob*)), + TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*))); job->start(); } } //----------------------------------------------------------------------------- -QPtrList<KMMessage> KMFolderImap::splitMessageList(const QString& set, - QPtrList<KMMessage>& msgList) +TQPtrList<KMMessage> KMFolderImap::splitMessageList(const TQString& set, + TQPtrList<KMMessage>& msgList) { int lastcomma = set.findRev(","); int lastdub = set.findRev(":"); @@ -558,12 +558,12 @@ QPtrList<KMMessage> KMFolderImap::splitMessageList(const QString& set, last++; if (last < 0) last = set.length(); // the last uid of the current set - const QString last_uid = set.right(set.length() - last); - QPtrList<KMMessage> temp_msgs; - QString uid; + const TQString last_uid = set.right(set.length() - last); + TQPtrList<KMMessage> temp_msgs; + TQString uid; if (!last_uid.isEmpty()) { - QPtrListIterator<KMMessage> it( msgList ); + TQPtrListIterator<KMMessage> it( msgList ); KMMessage* msg = 0; while ( (msg = it.current()) != 0 ) { @@ -598,7 +598,7 @@ KMMessage* KMFolderImap::take(int idx) return KMFolderMbox::take(idx); } -void KMFolderImap::take(QPtrList<KMMessage> msgList) +void KMFolderImap::take(TQPtrList<KMMessage> msgList) { deleteMessage(msgList); @@ -609,8 +609,8 @@ void KMFolderImap::take(QPtrList<KMMessage> msgList) //----------------------------------------------------------------------------- void KMFolderImap::slotListNamespaces() { - disconnect( account(), SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotListNamespaces() ) ); + disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotListNamespaces() ) ); if ( account()->makeConnection() == ImapAccountBase::Error ) { kdWarning(5006) << "slotListNamespaces - got no connection" << endl; @@ -619,8 +619,8 @@ void KMFolderImap::slotListNamespaces() { // wait for the connectionResult kdDebug(5006) << "slotListNamespaces - waiting for connection" << endl; - connect( account(), SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotListNamespaces() ) ); + connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotListNamespaces() ) ); return; } kdDebug(5006) << "slotListNamespaces" << endl; @@ -634,48 +634,48 @@ void KMFolderImap::slotListNamespaces() type = ImapAccountBase::ListSubscribed; ImapAccountBase::nsMap map = account()->namespaces(); - QStringList personal = map[ImapAccountBase::PersonalNS]; + TQStringList personal = map[ImapAccountBase::PersonalNS]; // start personal namespace listing and send it directly to slotListResult - for ( QStringList::Iterator it = personal.begin(); it != personal.end(); ++it ) + for ( TQStringList::Iterator it = personal.begin(); it != personal.end(); ++it ) { KMail::ListJob* job = new KMail::ListJob( account(), type, this, account()->addPathToNamespace( *it ) ); job->setNamespace( *it ); job->setHonorLocalSubscription( true ); - connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&)), - this, SLOT(slotListResult(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&))); + connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)), + this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&))); job->start(); } // and now we list all other namespaces and check them ourself - QStringList ns = map[ImapAccountBase::OtherUsersNS]; + TQStringList ns = map[ImapAccountBase::OtherUsersNS]; ns += map[ImapAccountBase::SharedNS]; - for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) + for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) { KMail::ListJob* job = new KMail::ListJob( account(), type, this, account()->addPathToNamespace( *it ) ); job->setHonorLocalSubscription( true ); - connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&)), - this, SLOT(slotCheckNamespace(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&))); + connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)), + this, TQT_SLOT(slotCheckNamespace(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&))); job->start(); } } //----------------------------------------------------------------------------- -void KMFolderImap::slotCheckNamespace( const QStringList& subfolderNames, - const QStringList& subfolderPaths, - const QStringList& subfolderMimeTypes, - const QStringList& subfolderAttributes, +void KMFolderImap::slotCheckNamespace( const TQStringList& subfolderNames, + const TQStringList& subfolderPaths, + const TQStringList& subfolderMimeTypes, + const TQStringList& subfolderAttributes, const ImapAccountBase::jobData& jobData ) { kdDebug(5006) << "slotCheckNamespace - " << subfolderNames.join(",") << endl; // get a correct foldername: // strip / and make sure it does not contain the delimiter - QString name = jobData.path.mid( 1, jobData.path.length()-2 ); + TQString name = jobData.path.mid( 1, jobData.path.length()-2 ); name.remove( account()->delimiterForNamespace( name ) ); if ( name.isEmpty() ) { // happens when an empty namespace is defined @@ -760,10 +760,10 @@ bool KMFolderImap::listDirectory() KMail::ListJob* job = new KMail::ListJob( account(), type, this ); job->setParentProgressItem( account()->listDirProgressItem() ); job->setHonorLocalSubscription( true ); - connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&)), - this, SLOT(slotListResult(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&))); + connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)), + this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&))); job->start(); return true; @@ -771,10 +771,10 @@ bool KMFolderImap::listDirectory() //----------------------------------------------------------------------------- -void KMFolderImap::slotListResult( const QStringList& subfolderNames, - const QStringList& subfolderPaths, - const QStringList& subfolderMimeTypes, - const QStringList& subfolderAttributes, +void KMFolderImap::slotListResult( const TQStringList& subfolderNames, + const TQStringList& subfolderPaths, + const TQStringList& subfolderMimeTypes, + const TQStringList& subfolderAttributes, const ImapAccountBase::jobData& jobData ) { mSubfolderState = imapFinished; @@ -805,7 +805,7 @@ void KMFolderImap::slotListResult( const QStringList& subfolderNames, parent->slotListResult( subfolderNames, subfolderPaths, subfolderMimeTypes, subfolderAttributes, jobData ); // cleanup - QStringList list; + TQStringList list; checkFolders( list, jobData.curNamespace ); // finish emit directoryListingFinished( this ); @@ -911,16 +911,16 @@ void KMFolderImap::initInbox() } if ( f ) { f->initializeFrom( this, "/INBOX/", "message/directory" ); - f->setChildrenState( QString::null ); + f->setChildrenState( TQString::null ); } // so we have an INBOX account()->setHasInbox( true ); } //----------------------------------------------------------------------------- -KMFolderImap* KMFolderImap::findParent( const QString& path, const QString& name ) +KMFolderImap* KMFolderImap::findParent( const TQString& path, const TQString& name ) { - QString parent = path.left( path.length() - name.length() - 2 ); + TQString parent = path.left( path.length() - name.length() - 2 ); if ( parent.length() > 1 ) { // extract name of the parent @@ -945,10 +945,10 @@ KMFolderImap* KMFolderImap::findParent( const QString& path, const QString& name } //----------------------------------------------------------------------------- -void KMFolderImap::checkFolders( const QStringList& subfolderNames, - const QString& myNamespace ) +void KMFolderImap::checkFolders( const TQStringList& subfolderNames, + const TQString& myNamespace ) { - QPtrList<KMFolder> toRemove; + TQPtrList<KMFolder> toRemove; KMFolderNode *node = folder()->child()->first(); while ( node ) { @@ -963,7 +963,7 @@ void KMFolderImap::checkFolders( const QStringList& subfolderNames, kdDebug(5006) << node->name() << " in namespace " << myNamespace << ":" << isInNamespace << endl; // ignore some cases - QString name = node->name(); + TQString name = node->name(); bool ignore = ( ( this == account()->rootFolder() ) && ( imapFld->imapPath() == "/INBOX/" || account()->isNamespaceFolder( name ) || @@ -990,8 +990,8 @@ void KMFolderImap::checkFolders( const QStringList& subfolderNames, } //----------------------------------------------------------------------------- -void KMFolderImap::initializeFrom( KMFolderImap* parent, QString folderPath, - QString mimeType ) +void KMFolderImap::initializeFrom( KMFolderImap* parent, TQString folderPath, + TQString mimeType ) { setAccount( parent->account() ); setImapPath( folderPath ); @@ -1000,7 +1000,7 @@ void KMFolderImap::initializeFrom( KMFolderImap* parent, QString folderPath, } //----------------------------------------------------------------------------- -void KMFolderImap::setChildrenState( QString attributes ) +void KMFolderImap::setChildrenState( TQString attributes ) { // update children state if ( attributes.find( "haschildren", 0, false ) != -1 ) @@ -1033,8 +1033,8 @@ void KMFolderImap::checkValidity() kdDebug(5006) << "KMFolderImap::checkValidity of: " << imapPath() << endl; // Start with a clean slate - disconnect( account(), SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( checkValidity() ) ); + disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( checkValidity() ) ); KMAcctImap::ConnectionState connectionState = account()->makeConnection(); if ( connectionState == ImapAccountBase::Error ) { @@ -1047,8 +1047,8 @@ void KMFolderImap::checkValidity() // We'll wait for the connectionResult signal from the account. If it // errors, the above will catch it. kdDebug(5006) << "CheckValidity - waiting for connection" << endl; - connect( account(), SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( checkValidity() ) ); + connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( checkValidity() ) ); return; } // Only check once at a time. @@ -1064,7 +1064,7 @@ void KMFolderImap::checkValidity() mMailCheckProgressItem = ProgressManager::createProgressItem( parent, "MailCheck" + folder()->prettyURL(), - QStyleSheet::escape( folder()->prettyURL() ), + TQStyleSheet::escape( folder()->prettyURL() ), i18n("checking"), false, account()->useSSL() || account()->useTLS() ); @@ -1078,10 +1078,10 @@ void KMFolderImap::checkValidity() KIO::SimpleJob *job = KIO::get(url, false, false); KIO::Scheduler::assignJobToSlave(account()->slave(), job); account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotCheckValidityResult(KIO::Job *))); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - SLOT(slotSimpleData(KIO::Job *, const QByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotCheckValidityResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &))); // Only check once at a time. mCheckingValidity = true; } @@ -1121,15 +1121,15 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job) emit folderComplete(this, false); close("checkvalidity"); } else { - QCString cstr((*it).data.data(), (*it).data.size() + 1); + TQCString cstr((*it).data.data(), (*it).data.size() + 1); int a = cstr.find("X-uidValidity: "); int b = cstr.find("\r\n", a); - QString uidv; + TQString uidv; if ( (b - a - 15) >= 0 ) uidv = cstr.mid(a + 15, b - a - 15); a = cstr.find("X-Access: "); b = cstr.find("\r\n", a); - QString access; + TQString access; if ( (b - a - 10) >= 0 ) access = cstr.mid(a + 10, b - a - 10); mReadOnly = access == "Read only"; @@ -1145,7 +1145,7 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job) if ( a >= 0 && (b - a - 18) >= 0 ) mPermanentFlags = cstr.mid( a + 18, b - a - 18 ).toInt(&ok); if ( !ok ) mPermanentFlags = 0; - QString startUid; + TQString startUid; if (uidValidity() != uidv) { // uidValidity changed @@ -1161,7 +1161,7 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job) writeConfig(); } else { if (!mCheckFlags) - startUid = QString::number(lastUid() + 1); + startUid = TQString::number(lastUid() + 1); } account()->removeJob(it); if ( mMailCheckProgressItem ) @@ -1216,7 +1216,7 @@ void KMFolderImap::getFolder(bool force) //----------------------------------------------------------------------------- -void KMFolderImap::reallyGetFolder(const QString &startUid) +void KMFolderImap::reallyGetFolder(const TQString &startUid) { KURL url = account()->getUrl(); if ( account()->makeConnection() != ImapAccountBase::Connected ) @@ -1237,10 +1237,10 @@ void KMFolderImap::reallyGetFolder(const QString &startUid) ImapAccountBase::jobData jd( url.url(), folder() ); jd.cancellable = true; account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotListFolderResult(KIO::Job *))); - connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), - this, SLOT(slotListFolderEntries(KIO::Job *, + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotListFolderResult(KIO::Job *))); + connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), + this, TQT_SLOT(slotListFolderEntries(KIO::Job *, const KIO::UDSEntryList &))); } else { mContentState = imapDownloadInProgress; @@ -1253,10 +1253,10 @@ void KMFolderImap::reallyGetFolder(const QString &startUid) ImapAccountBase::jobData jd( url.url(), folder() ); jd.cancellable = true; account()->insertJob(newJob, jd); - connect(newJob, SIGNAL(result(KIO::Job *)), - this, SLOT(slotGetLastMessagesResult(KIO::Job *))); - connect(newJob, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotGetMessagesData(KIO::Job *, const QByteArray &))); + connect(newJob, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotGetLastMessagesResult(KIO::Job *))); + connect(newJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotGetMessagesData(KIO::Job *, const TQByteArray &))); } } @@ -1266,7 +1266,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) { ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; - QString uids; + TQString uids; if (job->error()) { account()->handleJobError( job, @@ -1276,7 +1276,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) return; } mCheckFlags = false; - QStringList::Iterator uid; + TQStringList::Iterator uid; /* The code below does the following: - for each mail in the local store and each entry we got from the server, @@ -1326,7 +1326,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) // strip the flags from the list of uids, so it can be reused for (uid = (*it).items.begin(); uid != (*it).items.end(); ++uid) (*uid).truncate((*uid).find(",")); - ImapAccountBase::jobData jd( QString::null, (*it).parent ); + ImapAccountBase::jobData jd( TQString::null, (*it).parent ); jd.total = (*it).items.count(); if (jd.total == 0) { @@ -1343,14 +1343,14 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) mMailCheckProgressItem->setStatus( i18n("Retrieving messages") ); } - QStringList sets; + TQStringList sets; uid = (*it).items.begin(); if (jd.total == 1) sets.append(*uid + ":" + *uid); else sets = makeSets( (*it).items ); account()->removeJob(it); // don't use *it below // Now kick off the getting of envelopes for the new mails in the folder - for (QStringList::Iterator i = sets.begin(); i != sets.end(); ++i) + for (TQStringList::Iterator i = sets.begin(); i != sets.end(); ++i) { mContentState = imapDownloadInProgress; KURL url = account()->getUrl(); @@ -1359,12 +1359,12 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) jd.url = url.url(); KIO::Scheduler::assignJobToSlave(account()->slave(), newJob); account()->insertJob(newJob, jd); - connect(newJob, SIGNAL(result(KIO::Job *)), + connect(newJob, TQT_SIGNAL(result(KIO::Job *)), this, (i == sets.at(sets.count() - 1)) - ? SLOT(slotGetLastMessagesResult(KIO::Job *)) - : SLOT(slotGetMessagesResult(KIO::Job *))); - connect(newJob, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotGetMessagesData(KIO::Job *, const QByteArray &))); + ? TQT_SLOT(slotGetLastMessagesResult(KIO::Job *)) + : TQT_SLOT(slotGetMessagesResult(KIO::Job *))); + connect(newJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotGetMessagesData(KIO::Job *, const TQByteArray &))); } } @@ -1375,7 +1375,7 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job, { ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; - QString mimeType, name; + TQString mimeType, name; long int flags = 0; for (KIO::UDSEntryList::ConstIterator udsIt = uds.begin(); udsIt != uds.end(); udsIt++) @@ -1392,7 +1392,7 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job, } if ((mimeType == "message/rfc822-imap" || mimeType == "message/rfc822") && !(flags & 8)) { - (*it).items.append(name + "," + QString::number(flags)); + (*it).items.append(name + "," + TQString::number(flags)); if ( mMailCheckProgressItem ) { mMailCheckProgressItem->incCompletedItems(); mMailCheckProgressItem->updateProgress(); @@ -1403,9 +1403,9 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job, // debugging helper -//X static QString flagsToString( int flags ) +//X static TQString flagsToString( int flags ) //X { -//X QString str("("); +//X TQString str("("); //X if ( flags & 4 ) { //X str += "\\Flagged "; //X } @@ -1477,9 +1477,9 @@ void KMFolderImap::seenFlagToStatus(KMMsgBase * msg, int flags, bool newMsg) //----------------------------------------------------------------------------- -QString KMFolderImap::statusToFlags(KMMsgStatus status, int supportedFlags) +TQString KMFolderImap::statusToFlags(KMMsgStatus status, int supportedFlags) { - QString flags; + TQString flags; if (status & KMMsgStatusDeleted) flags = "\\DELETED"; else { @@ -1518,12 +1518,12 @@ KMFolderImap::ignoreJobsForMessage( KMMessage* msg ) } //----------------------------------------------------------------------------- -void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data) +void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) { if ( data.isEmpty() ) return; // optimization ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; - (*it).cdata += QCString(data, data.size() + 1); + (*it).cdata += TQCString(data, data.size() + 1); int pos = (*it).cdata.find("\r\n--IMAPDIGEST"); if ( pos == -1 ) { // if we do not find the pattern in the complete string we will not find @@ -1545,7 +1545,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data) kdDebug(5006) << "KMFolderImap::slotGetMessagesData - server has less messages (" << exists << ") then folder (" << count() << "), so reload" << endl; open("getMessage"); - reallyGetFolder( QString::null ); + reallyGetFolder( TQString::null ); (*it).cdata.remove(0, pos); return; } else if ( ok ) { @@ -1599,7 +1599,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data) } else if ( !account()->hasCapability("uidplus") ) { // see if we have cached the msgIdMD5 and get the status + // serial number from there - QString id = msg->msgIdMD5(); + TQString id = msg->msgIdMD5(); if ( mMetaDataMap.find( id ) ) { md = mMetaDataMap[id]; msg->setStatus( md->status() ); @@ -1643,7 +1643,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data) //------------------------------------------------------------- FolderJob* KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString partSpecifier, + KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as ) const { KMFolderImap* kmfi = folder? dynamic_cast<KMFolderImap*>(folder->storage()) : 0; @@ -1666,7 +1666,7 @@ KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, } else { // download complete message or part (attachment) if ( partSpecifier == "STRUCTURE" ) // hide from outside - partSpecifier = QString::null; + partSpecifier = TQString::null; ImapJob *job = new ImapJob( msg, jt, kmfi, partSpecifier ); job->setParentFolder( this ); @@ -1676,7 +1676,7 @@ KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, //------------------------------------------------------------- FolderJob* -KMFolderImap::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, +KMFolderImap::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const { KMFolderImap* kmfi = dynamic_cast<KMFolderImap*>(folder->storage()); @@ -1717,7 +1717,7 @@ void KMFolderImap::slotGetMessagesResult(KIO::Job * job) //----------------------------------------------------------------------------- -void KMFolderImap::createFolder(const QString &name, const QString& parentPath, +void KMFolderImap::createFolder(const TQString &name, const TQString& parentPath, bool askUser) { kdDebug(5006) << "KMFolderImap::createFolder - name=" << name << ",parent=" << @@ -1727,8 +1727,8 @@ void KMFolderImap::createFolder(const QString &name, const QString& parentPath, return; } KURL url = account()->getUrl(); - QString parent = ( parentPath.isEmpty() ? imapPath() : parentPath ); - QString path = account()->createImapPath( parent, name ); + TQString parent = ( parentPath.isEmpty() ? imapPath() : parentPath ); + TQString path = account()->createImapPath( parent, name ); if ( askUser ) { path += "/;INFO=ASKUSER"; } @@ -1739,8 +1739,8 @@ void KMFolderImap::createFolder(const QString &name, const QString& parentPath, ImapAccountBase::jobData jd( url.url(), folder() ); jd.items = name; account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotCreateFolderResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotCreateFolderResult(KIO::Job *))); } @@ -1750,7 +1750,7 @@ void KMFolderImap::slotCreateFolderResult(KIO::Job * job) ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; - QString name; + TQString name; if ( it.data().items.count() > 0 ) name = it.data().items.first(); @@ -1771,27 +1771,27 @@ void KMFolderImap::slotCreateFolderResult(KIO::Job * job) //----------------------------------------------------------------------------- -static QTextCodec *sUtf7Codec = 0; +static TQTextCodec *sUtf7Codec = 0; -QTextCodec * KMFolderImap::utf7Codec() +TQTextCodec * KMFolderImap::utf7Codec() { - if (!sUtf7Codec) sUtf7Codec = QTextCodec::codecForName("utf-7"); + if (!sUtf7Codec) sUtf7Codec = TQTextCodec::codecForName("utf-7"); return sUtf7Codec; } //----------------------------------------------------------------------------- -QString KMFolderImap::encodeFileName(const QString &name) +TQString KMFolderImap::encodeFileName(const TQString &name) { - QString result = utf7Codec()->fromUnicode(name); + TQString result = utf7Codec()->fromUnicode(name); return KURL::encode_string_no_slash(result); } //----------------------------------------------------------------------------- -QString KMFolderImap::decodeFileName(const QString &name) +TQString KMFolderImap::decodeFileName(const TQString &name) { - QString result = KURL::decode_string(name); + TQString result = KURL::decode_string(name); return utf7Codec()->toUnicode(result.latin1()); } @@ -1806,12 +1806,12 @@ bool KMFolderImap::autoExpunge() //----------------------------------------------------------------------------- -void KMFolderImap::slotSimpleData(KIO::Job * job, const QByteArray & data) +void KMFolderImap::slotSimpleData(KIO::Job * job, const TQByteArray & data) { if ( data.isEmpty() ) return; // optimization ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; - QBuffer buff((*it).data); + TQBuffer buff((*it).data); buff.open(IO_WriteOnly | IO_Append); buff.writeBlock(data.data(), data.size()); buff.close(); @@ -1833,20 +1833,20 @@ void KMFolderImap::deleteMessage(KMMessage * msg) "an empty UID. Aborting." << endl; return; } - url.setPath(msg_parent->imapPath() + ";UID=" + QString::number(uid) ); + url.setPath(msg_parent->imapPath() + ";UID=" + TQString::number(uid) ); if ( account()->makeConnection() != ImapAccountBase::Connected ) return; KIO::SimpleJob *job = KIO::file_delete(url, false); KIO::Scheduler::assignJobToSlave(account()->slave(), job); ImapAccountBase::jobData jd( url.url(), 0 ); account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - account(), SLOT(slotSimpleResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + account(), TQT_SLOT(slotSimpleResult(KIO::Job *))); } -void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList) +void KMFolderImap::deleteMessage(const TQPtrList<KMMessage>& msgList) { - QPtrListIterator<KMMessage> it( msgList ); + TQPtrListIterator<KMMessage> it( msgList ); KMMessage *msg; while ( (msg = it.current()) != 0 ) { ++it; @@ -1854,15 +1854,15 @@ void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList) mMetaDataMap.remove( msg->msgIdMD5() ); } - QValueList<ulong> uids; + TQValueList<ulong> uids; getUids(msgList, uids); - QStringList sets = makeSets(uids); + TQStringList sets = makeSets(uids); KURL url = account()->getUrl(); KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msgList.getFirst()->storage()); - for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) + for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { - QString uid = *it; + TQString uid = *it; // Don't delete with no uid, that nukes the folder. Should not happen, but // better safe than sorry. if ( uid.isEmpty() ) continue; @@ -1873,22 +1873,22 @@ void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList) KIO::Scheduler::assignJobToSlave(account()->slave(), job); ImapAccountBase::jobData jd( url.url(), 0 ); account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - account(), SLOT(slotSimpleResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + account(), TQT_SLOT(slotSimpleResult(KIO::Job *))); } } //----------------------------------------------------------------------------- void KMFolderImap::setStatus(int idx, KMMsgStatus status, bool toggle) { - QValueList<int> ids; ids.append(idx); + TQValueList<int> ids; ids.append(idx); setStatus(ids, status, toggle); } -void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool toggle) +void KMFolderImap::setStatus(TQValueList<int>& _ids, KMMsgStatus status, bool toggle) { FolderStorage::setStatus(_ids, status, toggle); - QValueList<int> ids; + TQValueList<int> ids; if ( mUploadAllFlags ) { kdDebug(5006) << k_funcinfo << "Migrating all flags to the server" << endl; ids.clear(); @@ -1912,8 +1912,8 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog if ( mReadOnly ) { // mUserRights is not available here // FIXME duplicated code in KMFolderCachedImap - QValueList<ulong> seenUids, unseenUids; - for ( QValueList<int>::ConstIterator it = ids.constBegin(); it != ids.constEnd(); ++it ) { + TQValueList<ulong> seenUids, unseenUids; + for ( TQValueList<int>::ConstIterator it = ids.constBegin(); it != ids.constEnd(); ++it ) { KMMessage *msg = 0; bool unget = !isMessage(*it); msg = getMsg(*it); @@ -1925,40 +1925,40 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog if (unget) unGetMsg(*it); } if ( !seenUids.isEmpty() ) { - QStringList sets = KMFolderImap::makeSets( seenUids, true ); - for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { - QString imappath = imapPath() + ";UID=" + ( *it ); + TQStringList sets = KMFolderImap::makeSets( seenUids, true ); + for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { + TQString imappath = imapPath() + ";UID=" + ( *it ); account()->setImapSeenStatus( folder(), imappath, true ); } } if ( !unseenUids.isEmpty() ) { - QStringList sets = KMFolderImap::makeSets( unseenUids, true ); - for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { - QString imappath = imapPath() + ";UID=" + ( *it ); + TQStringList sets = KMFolderImap::makeSets( unseenUids, true ); + for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) { + TQString imappath = imapPath() + ";UID=" + ( *it ); account()->setImapSeenStatus( folder(), imappath, false ); } } return; } - QMap< QString, QStringList > groups; - for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) { + TQMap< TQString, TQStringList > groups; + for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) { KMMessage *msg = 0; bool unget = !isMessage(*it); msg = getMsg(*it); if (!msg) continue; - QString flags = statusToFlags(msg->status(), mPermanentFlags); + TQString flags = statusToFlags(msg->status(), mPermanentFlags); // Collect uids for each type of flags. - groups[flags].append(QString::number(msg->UID())); + groups[flags].append(TQString::number(msg->UID())); if (unget) unGetMsg(*it); } - QMapIterator< QString, QStringList > dit; + TQMapIterator< TQString, TQStringList > dit; for ( dit = groups.begin(); dit != groups.end(); ++dit ) { - QCString flags = dit.key().latin1(); - QStringList sets = makeSets( (*dit), true ); + TQCString flags = dit.key().latin1(); + TQStringList sets = makeSets( (*dit), true ); // Send off a status setting job for each set. - for ( QStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) { - QString imappath = imapPath() + ";UID=" + ( *slit ); + for ( TQStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) { + TQString imappath = imapPath() + ";UID=" + ( *slit ); account()->setImapStatus(folder(), imappath, flags); } } @@ -1967,29 +1967,29 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog // to make sure that we get the latest flags abort the current listing and // create a new one kdDebug(5006) << "Set status during folder listing, restarting listing." << endl; - disconnect(this, SLOT(slotListFolderResult(KIO::Job *))); + disconnect(this, TQT_SLOT(slotListFolderResult(KIO::Job *))); quiet( false ); - reallyGetFolder( QString::null ); + reallyGetFolder( TQString::null ); } } //----------------------------------------------------------------------------- -QStringList KMFolderImap::makeSets(const QStringList& uids, bool sort) +TQStringList KMFolderImap::makeSets(const TQStringList& uids, bool sort) { - QValueList<ulong> tmp; - for ( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) + TQValueList<ulong> tmp; + for ( TQStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) tmp.append( (*it).toInt() ); return makeSets(tmp, sort); } -QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort ) +TQStringList KMFolderImap::makeSets( TQValueList<ulong>& uids, bool sort ) { - QStringList sets; - QString set; + TQStringList sets; + TQString set; if (uids.size() == 1) { - sets.append(QString::number(uids.first())); + sets.append(TQString::number(uids.first())); return sets; } @@ -1999,10 +1999,10 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort ) // needed to make a uid like 124 instead of 124:124 bool inserted = false; /* iterate over uids and build sets like 120:122,124,126:150 */ - for ( QValueList<ulong>::Iterator it = uids.begin(); it != uids.end(); ++it ) + for ( TQValueList<ulong>::Iterator it = uids.begin(); it != uids.end(); ++it ) { if (it == uids.begin() || set.isEmpty()) { - set = QString::number(*it); + set = TQString::number(*it); inserted = true; } else { @@ -2010,9 +2010,9 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort ) { // end this range if (inserted) - set += ',' + QString::number(*it); + set += ',' + TQString::number(*it); else - set += ':' + QString::number(last) + ',' + QString::number(*it); + set += ':' + TQString::number(last) + ',' + TQString::number(*it); inserted = true; if (set.length() > 100) { @@ -2028,7 +2028,7 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort ) } // last element if (!inserted) - set += ':' + QString::number(uids.last()); + set += ':' + TQString::number(uids.last()); if (!set.isEmpty()) sets.append(set); @@ -2036,11 +2036,11 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort ) } //----------------------------------------------------------------------------- -void KMFolderImap::getUids(QValueList<int>& ids, QValueList<ulong>& uids) +void KMFolderImap::getUids(TQValueList<int>& ids, TQValueList<ulong>& uids) { KMMsgBase *msg = 0; // get the uids - for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) + for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) { msg = getMsgBase(*it); if (!msg) continue; @@ -2048,11 +2048,11 @@ void KMFolderImap::getUids(QValueList<int>& ids, QValueList<ulong>& uids) } } -void KMFolderImap::getUids(const QPtrList<KMMessage>& msgList, QValueList<ulong>& uids) +void KMFolderImap::getUids(const TQPtrList<KMMessage>& msgList, TQValueList<ulong>& uids) { KMMessage *msg = 0; - QPtrListIterator<KMMessage> it( msgList ); + TQPtrListIterator<KMMessage> it( msgList ); while ( (msg = it.current()) != 0 ) { ++it; if ( msg->UID() > 0 ) { @@ -2074,16 +2074,16 @@ void KMFolderImap::expungeFolder(KMFolderImap * aFolder, bool quiet) ImapAccountBase::jobData jd( url.url(), 0 ); jd.quiet = quiet; account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - account(), SLOT(slotSimpleResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + account(), TQT_SLOT(slotSimpleResult(KIO::Job *))); } //----------------------------------------------------------------------------- -void KMFolderImap::slotProcessNewMail( int errorCode, const QString &errorMsg ) +void KMFolderImap::slotProcessNewMail( int errorCode, const TQString &errorMsg ) { Q_UNUSED( errorMsg ); - disconnect( account(), SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotProcessNewMail(int, const QString&) ) ); + disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotProcessNewMail(int, const TQString&) ) ); if ( !errorCode ) processNewMail( false ); else @@ -2113,8 +2113,8 @@ bool KMFolderImap::processNewMail(bool) { // wait kdDebug(5006) << "KMFolderImap::processNewMail - waiting for connection: " << label() << endl; - connect( account(), SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotProcessNewMail(int, const QString&) ) ); + connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotProcessNewMail(int, const TQString&) ) ); return true; } KURL url = account()->getUrl(); @@ -2126,7 +2126,7 @@ bool KMFolderImap::processNewMail(bool) mMailCheckProgressItem = ProgressManager::createProgressItem( "MailCheckAccount" + account()->name(), "MailCheck" + folder()->prettyURL(), - QStyleSheet::escape( folder()->prettyURL() ), + TQStyleSheet::escape( folder()->prettyURL() ), i18n("updating message counts"), false, account()->useSSL() || account()->useTLS() ); @@ -2136,8 +2136,8 @@ bool KMFolderImap::processNewMail(bool) ImapAccountBase::jobData jd(url.url(), folder() ); jd.cancellable = true; account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - SLOT(slotStatResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotStatResult(KIO::Job *))); return true; } @@ -2179,17 +2179,17 @@ int KMFolderImap::create() return KMFolderMbox::create(); } -QValueList<ulong> KMFolderImap::splitSets(const QString uids) +TQValueList<ulong> KMFolderImap::splitSets(const TQString uids) { - QValueList<ulong> uidlist; + TQValueList<ulong> uidlist; // ex: 1205,1204,1203,1202,1236:1238 - QString buffer = QString::null; + TQString buffer = TQString::null; int setstart = -1; // iterate over the uids for (uint i = 0; i < uids.length(); i++) { - QChar chr = uids[i]; + TQChar chr = uids[i]; if (chr == ',') { if (setstart > -1) @@ -2209,7 +2209,7 @@ QValueList<ulong> KMFolderImap::splitSets(const QString uids) // remember the start of the range setstart = buffer.toInt(); buffer = ""; - } else if (chr.category() == QChar::Number_DecimalDigit) { + } else if (chr.category() == TQChar::Number_DecimalDigit) { // digit buffer += chr; } else { @@ -2246,8 +2246,8 @@ int KMFolderImap::expungeContents() ImapAccountBase::jobData jd( url.url(), 0 ); jd.quiet = true; account()->insertJob(job, jd); - connect(job, SIGNAL(result(KIO::Job *)), - account(), SLOT(slotSimpleResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), + account(), TQT_SLOT(slotSimpleResult(KIO::Job *))); } /* Is the below correct? If we are expunging (in the folder sense, not the imap sense), why delete but not (imap-)expunge? Since the folder is not active there is no concept @@ -2285,7 +2285,7 @@ void KMFolderImap::setSubfolderState( imapState state ) { // pass through to children KMFolderNode* node; - QPtrListIterator<KMFolderNode> it( *folder()->child() ); + TQPtrListIterator<KMFolderNode> it( *folder()->child() ); for ( ; (node = it.current()); ) { ++it; @@ -2313,7 +2313,7 @@ void KMFolderImap::setAlreadyRemoved( bool removed ) { // pass through to childs KMFolderNode* node; - QPtrListIterator<KMFolderNode> it( *folder()->child() ); + TQPtrListIterator<KMFolderNode> it( *folder()->child() ); for ( ; (node = it.current()); ) { ++it; @@ -2324,13 +2324,13 @@ void KMFolderImap::setAlreadyRemoved( bool removed ) } } -void KMFolderImap::slotCreatePendingFolders( int errorCode, const QString& errorMsg ) +void KMFolderImap::slotCreatePendingFolders( int errorCode, const TQString& errorMsg ) { Q_UNUSED( errorMsg ); - disconnect( account(), SIGNAL( connectionResult( int, const QString& ) ), - this, SLOT( slotCreatePendingFolders( int, const QString& ) ) ); + disconnect( account(), TQT_SIGNAL( connectionResult( int, const TQString& ) ), + this, TQT_SLOT( slotCreatePendingFolders( int, const TQString& ) ) ); if ( !errorCode ) { - QStringList::Iterator it = mFoldersPendingCreation.begin(); + TQStringList::Iterator it = mFoldersPendingCreation.begin(); for ( ; it != mFoldersPendingCreation.end(); ++it ) { createFolder( *it ); } @@ -2344,18 +2344,18 @@ void KMFolderImap::search( const KMSearchPattern* pattern ) if ( !pattern || pattern->isEmpty() ) { // not much to do here - QValueList<Q_UINT32> serNums; + TQValueList<Q_UINT32> serNums; emit searchResult( folder(), serNums, pattern, true ); return; } SearchJob* job = new SearchJob( this, account(), pattern ); - connect( job, SIGNAL( searchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ), - this, SLOT( slotSearchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) ); + connect( job, TQT_SIGNAL( searchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ), + this, TQT_SLOT( slotSearchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) ); job->start(); } //----------------------------------------------------------------------------- -void KMFolderImap::slotSearchDone( QValueList<Q_UINT32> serNums, +void KMFolderImap::slotSearchDone( TQValueList<Q_UINT32> serNums, const KMSearchPattern* pattern, bool complete ) { @@ -2372,8 +2372,8 @@ void KMFolderImap::search( const KMSearchPattern* pattern, Q_UINT32 serNum ) return; } SearchJob* job = new SearchJob( this, account(), pattern, serNum ); - connect( job, SIGNAL( searchDone( Q_UINT32, const KMSearchPattern*, bool ) ), - this, SLOT( slotSearchDone( Q_UINT32, const KMSearchPattern*, bool ) ) ); + connect( job, TQT_SIGNAL( searchDone( Q_UINT32, const KMSearchPattern*, bool ) ), + this, TQT_SLOT( slotSearchDone( Q_UINT32, const KMSearchPattern*, bool ) ) ); job->start(); } @@ -2414,7 +2414,7 @@ void KMFolderImap::saveMsgMetaData( KMMessage* msg, ulong uid ) } //----------------------------------------------------------------------------- -void KMFolderImap::setImapPath( const QString& path ) +void KMFolderImap::setImapPath( const TQString& path ) { if ( path.isEmpty() ) { kdWarning(5006) << k_funcinfo << "ignoring empty path" << endl; diff --git a/kmail/kmfolderimap.h b/kmail/kmfolderimap.h index f7c027e0e..da026728c 100644 --- a/kmail/kmfolderimap.h +++ b/kmail/kmfolderimap.h @@ -33,8 +33,8 @@ #include <kstandarddirs.h> -#include <qintdict.h> -#include <qdict.h> +#include <tqintdict.h> +#include <tqdict.h> template< typename T> class QPtrList; template< typename T> class QValueList; @@ -80,7 +80,7 @@ class KMFolderImap : public KMFolderMbox friend class ::KMail::ImapJob; public: - static QString cacheLocation() { + static TQString cacheLocation() { return locateLocal("data", "kmail/imap" ); } @@ -108,15 +108,15 @@ public: virtual KMMessage* getMsg(int idx); /** The path to the imap folder on the server */ - void setImapPath( const QString &path ); - QString imapPath() const { return mImapPath; } + void setImapPath( const TQString &path ); + TQString imapPath() const { return mImapPath; } /** The highest UID in the folder */ ulong lastUid(); /** The uidvalidity of the last update */ - void setUidValidity(const QString &validity) { mUidValidity = validity; } - QString uidValidity() { return mUidValidity; } + void setUidValidity(const TQString &validity) { mUidValidity = validity; } + TQString uidValidity() { return mUidValidity; } /** The imap account associated with this folder */ void setAccount(KMAcctImap *acct); @@ -124,9 +124,9 @@ public: /** Remove (first occurrence of) given message from the folder. */ virtual void removeMsg(int i, bool quiet = FALSE); - virtual void removeMsg(const QPtrList<KMMessage>& msgList, bool quiet = FALSE); + virtual void removeMsg(const TQPtrList<KMMessage>& msgList, bool quiet = FALSE); - virtual int rename( const QString& newName, KMFolderDir *aParent = 0 ); + virtual int rename( const TQString& newName, KMFolderDir *aParent = 0 ); /** Remove the IMAP folder on the server and if successful also locally */ virtual void remove(); @@ -169,14 +169,14 @@ public: * that contain messages _or_ folders the new folder is set to "contains messages" * by default */ - void createFolder(const QString &name, - const QString& imapPath = QString::null, bool askUser = true); + void createFolder(const TQString &name, + const TQString& imapPath = TQString::null, bool askUser = true); /** * Delete a message */ void deleteMessage(KMMessage * msg); - void deleteMessage(const QPtrList<KMMessage>& msgList); + void deleteMessage(const TQPtrList<KMMessage>& msgList); /** * Change the status of the message indicated by @p index @@ -187,21 +187,21 @@ public: /** * Change the status of several messages indicated by @p ids */ - virtual void setStatus(QValueList<int>& _ids, KMMsgStatus status, bool toggle); + virtual void setStatus(TQValueList<int>& _ids, KMMsgStatus status, bool toggle); /** generates sets of uids */ - static QStringList makeSets( QValueList<ulong>&, bool sort = true); - static QStringList makeSets(const QStringList&, bool sort = true); + static TQStringList makeSets( TQValueList<ulong>&, bool sort = true); + static TQStringList makeSets(const TQStringList&, bool sort = true); /** splits the message list according to sets. Modifies the @msgList. */ - static QPtrList<KMMessage> splitMessageList(const QString& set, - QPtrList<KMMessage>& msgList); + static TQPtrList<KMMessage> splitMessageList(const TQString& set, + TQPtrList<KMMessage>& msgList); /** gets the uids of the given ids */ - void getUids(QValueList<int>& ids, QValueList<ulong>& uids); + void getUids(TQValueList<int>& ids, TQValueList<ulong>& uids); /** same as above but accepts a Message-List */ - void getUids(const QPtrList<KMMessage>& msgList, QValueList<ulong>& uids); + void getUids(const TQPtrList<KMMessage>& msgList, TQValueList<ulong>& uids); /** * Expunge deleted messages from the folder @@ -232,19 +232,19 @@ public: /** * Encode the given string in a filename save 7 bit string */ - static QString encodeFileName(const QString &); - static QString decodeFileName(const QString &); - static QTextCodec * utf7Codec(); + static TQString encodeFileName(const TQString &); + static TQString decodeFileName(const TQString &); + static TQTextCodec * utf7Codec(); /** * Convert message status to a list of IMAP flags */ - static QString statusToFlags(KMMsgStatus status, int supportedFalgs); + static TQString statusToFlags(KMMsgStatus status, int supportedFalgs); /** * Return the filename of the folder (reimplemented from KFolder) */ - virtual QString fileName() const { + virtual TQString fileName() const { return encodeFileName( KMFolderMbox::fileName() ); } /** @@ -261,7 +261,7 @@ public: /** * Splits a uid-set into single uids */ - static QValueList<ulong> splitSets(const QString); + static TQValueList<ulong> splitSets(const TQString); virtual void ignoreJobsForMessage( KMMessage* ); @@ -316,7 +316,7 @@ public: virtual bool isMoveable() const; /** Initialize this storage from another one. Used when creating a child folder */ - void initializeFrom( KMFolderImap* parent, QString path, QString mimeType ); + void initializeFrom( KMFolderImap* parent, TQString path, TQString mimeType ); /** Returns the IMAP flags that can be stored on the server. */ int permanentFlags() const { return mPermanentFlags; } @@ -339,12 +339,12 @@ signals: * @param name The name of the folder that should have been created. * @param success True if the folder was created, false otherwise. */ - void folderCreationResult( const QString &name, bool success ); + void folderCreationResult( const TQString &name, bool success ); public slots: /** Add a message to a folder after is has been added on an IMAP server */ virtual void addMsgQuiet(KMMessage *); - virtual void addMsgQuiet(QPtrList<KMMessage>); + virtual void addMsgQuiet(TQPtrList<KMMessage>); /** Add the given message to the folder. Usually the message is added at the end of the folder. Returns zero on success and @@ -353,21 +353,21 @@ public slots: Please note that the message is added as is to the folder and the folder takes ownership of the message (deleting it in the destructor).*/ virtual int addMsg(KMMessage* msg, int* index_return = 0); - virtual int addMsg(QPtrList<KMMessage>&, QValueList<int>& index_return); + virtual int addMsg(TQPtrList<KMMessage>&, TQValueList<int>& index_return); /** Copy the messages to this folder */ - void copyMsg(QPtrList<KMMessage>& msgList/*, KMFolder* parent*/); + void copyMsg(TQPtrList<KMMessage>& msgList/*, KMFolder* parent*/); /** 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<KMMessage>); + virtual void take(TQPtrList<KMMessage>); /** * Add the data a KIO::Job retrieves to the buffer */ - void slotSimpleData(KIO::Job * job, const QByteArray & data); + void slotSimpleData(KIO::Job * job, const TQByteArray & data); /** * Convert IMAP flags to a message status @@ -389,7 +389,7 @@ public slots: /** * Called from the SearchJob when the folder is done or messages where found */ - void slotSearchDone( QValueList<Q_UINT32> serNums, + void slotSearchDone( TQValueList<Q_UINT32> serNums, const KMSearchPattern* pattern, bool complete ); @@ -402,21 +402,21 @@ public slots: * Connected to ListJob::receivedFolders * creates/removes folders */ - void slotListResult( const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData& ); + void slotListResult( const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& ); /** * Connected to slotListNamespaces * creates/removes namespace folders */ - void slotCheckNamespace( const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData& ); + void slotCheckNamespace( const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& ); protected: virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString partSpecifier, + KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as ) const; - virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, + virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const; void getMessagesResult(KIO::Job * job, bool lastSet); @@ -426,16 +426,16 @@ protected: the various index files deleted. Returns 0 on success. */ virtual int expungeContents(); - void setChildrenState( QString attributes ); + void setChildrenState( TQString attributes ); /** Create or find the INBOX and initialize it */ void initInbox(); /** See if there is a better parent then this folder */ - KMFolderImap* findParent( const QString& path, const QString& name ); + KMFolderImap* findParent( const TQString& path, const TQString& name ); /** See if all folders are still present on server, otherwise delete them */ - void checkFolders( const QStringList& folderNames, const QString& ns ); + void checkFolders( const TQStringList& folderNames, const TQString& ns ); void finishMailCheck( const char *func, imapState state ); @@ -450,7 +450,7 @@ protected slots: /** * Get the folder now (internal) */ - void reallyGetFolder(const QString &startUid = QString::null); + void reallyGetFolder(const TQString &startUid = TQString::null); /** * For listing the contents of a folder @@ -463,7 +463,7 @@ protected slots: */ void slotGetMessagesResult(KIO::Job * job); void slotGetLastMessagesResult(KIO::Job * job); - void slotGetMessagesData(KIO::Job * job, const QByteArray & data); + void slotGetMessagesData(KIO::Job * job, const TQByteArray & data); /** * For creating a new subfolder @@ -489,14 +489,14 @@ protected slots: /** * Is called when the slave is connected and triggers a newmail check */ - void slotProcessNewMail( int errorCode, const QString& errorMsg ); + void slotProcessNewMail( int errorCode, const TQString& errorMsg ); /** * Is connected when there are folders to be created on startup and the * account is still connecting. Once the account emits the connected * signal this slot is called and the folders created. */ - void slotCreatePendingFolders( int errorCode, const QString& errorMsg ); + void slotCreatePendingFolders( int errorCode, const TQString& errorMsg ); /** * Starts a namespace listing @@ -504,35 +504,35 @@ protected slots: void slotListNamespaces(); protected: - QString mImapPath; + TQString mImapPath; ulong mLastUid; imapState mContentState, mSubfolderState; bool mIsSelected; bool mCheckFlags; bool mReadOnly; bool mCheckMail; - mutable QGuardedPtr<KMAcctImap> mAccount; + mutable TQGuardedPtr<KMAcctImap> mAccount; // the current uidvalidity - QString mUidValidity; + TQString mUidValidity; unsigned int mUserRights; private: // if we're checking validity currently bool mCheckingValidity; // uid - metadata cache - QIntDict<KMMsgMetaData> mUidMetaDataMap; + TQIntDict<KMMsgMetaData> mUidMetaDataMap; // msgidMD5 - status map - QDict<KMMsgMetaData> mMetaDataMap; + TQDict<KMMsgMetaData> mMetaDataMap; // if the folder should be deleted without server roundtrip bool mAlreadyRemoved; // the progress for mailchecks - QGuardedPtr<ProgressItem> mMailCheckProgressItem; + TQGuardedPtr<ProgressItem> mMailCheckProgressItem; // the progress for listings ProgressItem *mListDirProgressItem; // the progress for addMsg ProgressItem *mAddMessageProgressItem; // to-be-added folders - QStringList mFoldersPendingCreation; + TQStringList mFoldersPendingCreation; // push all flags to the server instead of just the changed once // when doing a flag change the next time diff --git a/kmail/kmfolderindex.cpp b/kmail/kmfolderindex.cpp index a76b74f53..6a3781570 100644 --- a/kmail/kmfolderindex.cpp +++ b/kmail/kmfolderindex.cpp @@ -19,8 +19,8 @@ #include "kmfolderindex.h" #include "kmfolder.h" #include <config.h> -#include <qfileinfo.h> -#include <qtimer.h> +#include <tqfileinfo.h> +#include <tqtimer.h> #include <kdebug.h> @@ -90,9 +90,9 @@ KMFolderIndex::~KMFolderIndex() } -QString KMFolderIndex::indexLocation() const +TQString KMFolderIndex::indexLocation() const { - QString sLocation(folder()->path()); + TQString sLocation(folder()->path()); if ( !sLocation.isEmpty() ) { sLocation += '/'; @@ -122,22 +122,22 @@ int KMFolderIndex::updateIndex() int KMFolderIndex::writeIndex( bool createEmptyIndex ) { - QString tempName; - QString indexName; + TQString tempName; + TQString indexName; mode_t old_umask; int len; const uchar *buffer = 0; indexName = indexLocation(); tempName = indexName + ".temp"; - unlink(QFile::encodeName(tempName)); + unlink(TQFile::encodeName(tempName)); // We touch the folder, otherwise the index is regenerated, if KMail is // running, while the clock switches from daylight savings time to normal time - utime(QFile::encodeName(location()), 0); + utime(TQFile::encodeName(location()), 0); old_umask = umask(077); - FILE *tmpIndexStream = fopen(QFile::encodeName(tempName), "w"); + FILE *tmpIndexStream = fopen(TQFile::encodeName(tempName), "w"); umask(old_umask); if (!tmpIndexStream) return errno; @@ -189,7 +189,7 @@ int KMFolderIndex::writeIndex( bool createEmptyIndex ) if( fclose( tmpIndexStream ) != 0 ) return errno; - ::rename(QFile::encodeName(tempName), QFile::encodeName(indexName)); + ::rename(TQFile::encodeName(tempName), TQFile::encodeName(indexName)); mHeaderOffset = nho; if (mIndexStream) fclose(mIndexStream); @@ -197,7 +197,7 @@ int KMFolderIndex::writeIndex( bool createEmptyIndex ) if ( createEmptyIndex ) return 0; - mIndexStream = fopen(QFile::encodeName(indexName), "r+"); // index file + mIndexStream = fopen(TQFile::encodeName(indexName), "r+"); // index file assert( mIndexStream ); fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC); @@ -247,7 +247,7 @@ bool KMFolderIndex::readIndex() } else { - QCString line(MAX_LINE); + TQCString line(MAX_LINE); fgets(line.data(), MAX_LINE, mIndexStream); if (feof(mIndexStream)) break; if (*line.data() == '\0') { @@ -334,7 +334,7 @@ bool KMFolderIndex::readIndexHeader(int *gv) "The mail index for '%1' is from an unknown version of KMail (%2).\n" "This index can be regenerated from your mail folder, but some " "information, including status flags, may be lost. Do you wish " - "to downgrade your index file?") .arg(name()) .arg(indexVersion), QString::null, i18n("Downgrade"), i18n("Do Not Downgrade") ); + "to downgrade your index file?") .arg(name()) .arg(indexVersion), TQString::null, i18n("Downgrade"), i18n("Do Not Downgrade") ); kapp->restoreOverrideCursor(); if (r == KMessageBox::Yes) createIndexFromContents(); @@ -394,9 +394,9 @@ bool KMFolderIndex::updateIndexStreamPtr(bool) { // We touch the folder, otherwise the index is regenerated, if KMail is // running, while the clock switches from daylight savings time to normal time - utime(QFile::encodeName(location()), 0); - utime(QFile::encodeName(indexLocation()), 0); - utime(QFile::encodeName( KMMsgDict::getFolderIdsLocation( *this ) ), 0); + utime(TQFile::encodeName(location()), 0); + utime(TQFile::encodeName(indexLocation()), 0); + utime(TQFile::encodeName( KMMsgDict::getFolderIdsLocation( *this ) ), 0); mIndexSwapByteOrder = false; #ifdef HAVE_MMAP @@ -434,8 +434,8 @@ bool KMFolderIndex::updateIndexStreamPtr(bool) KMFolderIndex::IndexStatus KMFolderIndex::indexStatus() { - QFileInfo contInfo(location()); - QFileInfo indInfo(indexLocation()); + TQFileInfo contInfo(location()); + TQFileInfo indInfo(indexLocation()); if (!contInfo.exists()) return KMFolderIndex::IndexOk; if (!indInfo.exists()) return KMFolderIndex::IndexMissing; @@ -454,7 +454,7 @@ void KMFolderIndex::clearIndex(bool autoDelete, bool syncDict) void KMFolderIndex::truncateIndex() { if ( mHeaderOffset ) - truncate(QFile::encodeName(indexLocation()), mHeaderOffset); + truncate(TQFile::encodeName(indexLocation()), mHeaderOffset); else // The index file wasn't opened, so we don't know the header offset. // So let's just create a new empty index. diff --git a/kmail/kmfolderindex.h b/kmail/kmfolderindex.h index bb294b233..05453bb68 100644 --- a/kmail/kmfolderindex.h +++ b/kmail/kmfolderindex.h @@ -77,7 +77,7 @@ public: bool indexSwapByteOrder() { return mIndexSwapByteOrder; } int indexSizeOfLong() { return mIndexSizeOfLong; } - virtual QString indexLocation() const; + virtual TQString indexLocation() const; virtual int writeIndex( bool createEmptyIndex = false ); void recreateIndex(); diff --git a/kmail/kmfoldermaildir.cpp b/kmail/kmfoldermaildir.cpp index f13bb6761..bfb606f7e 100644 --- a/kmail/kmfoldermaildir.cpp +++ b/kmail/kmfoldermaildir.cpp @@ -6,8 +6,8 @@ #include <config.h> #endif -#include <qdir.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqregexp.h> #include <libkdepim/kfileio.h> #include "kmfoldermaildir.h" @@ -48,7 +48,7 @@ using KMail::MaildirJob; #endif // define the static member -QValueList<KMFolderMaildir::DirSizeJobQueueEntry> KMFolderMaildir::s_DirSizeJobQueue; +TQValueList<KMFolderMaildir::DirSizeJobQueueEntry> KMFolderMaildir::s_DirSizeJobQueue; //----------------------------------------------------------------------------- KMFolderMaildir::KMFolderMaildir(KMFolder* folder, const char* name) @@ -71,19 +71,19 @@ int KMFolderMaildir::canAccess() assert(!folder()->name().isEmpty()); - QString sBadFolderName; - if (access(QFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) { + TQString sBadFolderName; + if (access(TQFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location(); - } else if (access(QFile::encodeName(location() + "/new"), R_OK | W_OK | X_OK) != 0) { + } else if (access(TQFile::encodeName(location() + "/new"), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location() + "/new"; - } else if (access(QFile::encodeName(location() + "/cur"), R_OK | W_OK | X_OK) != 0) { + } else if (access(TQFile::encodeName(location() + "/cur"), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location() + "/cur"; - } else if (access(QFile::encodeName(location() + "/tmp"), R_OK | W_OK | X_OK) != 0) { + } else if (access(TQFile::encodeName(location() + "/tmp"), R_OK | W_OK | X_OK) != 0) { sBadFolderName = location() + "/tmp"; } if ( !sBadFolderName.isEmpty() ) { - int nRetVal = QFile::exists(sBadFolderName) ? EPERM : ENOENT; + int nRetVal = TQFile::exists(sBadFolderName) ? EPERM : ENOENT; KCursorSaver idle(KBusyPtr::idle()); if ( nRetVal == ENOENT ) KMessageBox::sorry(0, i18n("Error opening %1; this folder is missing.") @@ -119,13 +119,13 @@ int KMFolderMaildir::open(const char *) { if (KMFolderIndex::IndexOk != indexStatus()) // test if contents file has changed { - QString str; + TQString str; mIndexStream = 0; str = i18n("Folder `%1' changed; recreating index.") .arg(name()); emit statusMsg(str); } else { - mIndexStream = fopen(QFile::encodeName(indexLocation()), "r+"); // index file + mIndexStream = fopen(TQFile::encodeName(indexLocation()), "r+"); // index file if ( mIndexStream ) { fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC); updateIndexStreamPtr(); @@ -152,10 +152,10 @@ int KMFolderMaildir::open(const char *) //----------------------------------------------------------------------------- -int KMFolderMaildir::createMaildirFolders( const QString & folderPath ) +int KMFolderMaildir::createMaildirFolders( const TQString & folderPath ) { // Make sure that neither a new, cur or tmp subfolder exists already. - QFileInfo dirinfo; + TQFileInfo dirinfo; dirinfo.setFile( folderPath + "/new" ); if ( dirinfo.exists() ) return EEXIST; dirinfo.setFile( folderPath + "/cur" ); @@ -164,19 +164,19 @@ int KMFolderMaildir::createMaildirFolders( const QString & folderPath ) if ( dirinfo.exists() ) return EEXIST; // create the maildir directory structure - if ( ::mkdir( QFile::encodeName( folderPath ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << endl; return errno; } - if ( ::mkdir( QFile::encodeName( folderPath + "/new" ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath + "/new" ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << "/new" << endl; return errno; } - if ( ::mkdir( QFile::encodeName( folderPath + "/cur" ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath + "/cur" ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << "/cur" << endl; return errno; } - if ( ::mkdir( QFile::encodeName( folderPath + "/tmp" ), S_IRWXU ) > 0 ) { + if ( ::mkdir( TQFile::encodeName( folderPath + "/tmp" ), S_IRWXU ) > 0 ) { kdDebug(5006) << "Could not create folder " << folderPath << "/tmp" << endl; return errno; } @@ -201,7 +201,7 @@ int KMFolderMaildir::create() if (!folder()->path().isEmpty()) { old_umask = umask(077); - mIndexStream = fopen(QFile::encodeName(indexLocation()), "w+"); //sven; open RW + mIndexStream = fopen(TQFile::encodeName(indexLocation()), "w+"); //sven; open RW updateIndexStreamPtr(true); umask(old_umask); @@ -257,25 +257,25 @@ void KMFolderMaildir::sync() int KMFolderMaildir::expungeContents() { // nuke all messages in this folder now - QDir d(location() + "/new"); - // d.setFilter(QDir::Files); coolo: QFile::remove returns false for non-files - QStringList files(d.entryList()); - QStringList::ConstIterator it(files.begin()); + TQDir d(location() + "/new"); + // d.setFilter(TQDir::Files); coolo: TQFile::remove returns false for non-files + TQStringList files(d.entryList()); + TQStringList::ConstIterator it(files.begin()); for ( ; it != files.end(); ++it) - QFile::remove(d.filePath(*it)); + TQFile::remove(d.filePath(*it)); d.setPath(location() + "/cur"); files = d.entryList(); for (it = files.begin(); it != files.end(); ++it) - QFile::remove(d.filePath(*it)); + TQFile::remove(d.filePath(*it)); return 0; } -int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const QStringList& entryList, bool& done ) +int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const TQStringList& entryList, bool& done ) { - QString subdirNew(location() + "/new/"); - QString subdirCur(location() + "/cur/"); + TQString subdirNew(location() + "/new/"); + TQString subdirCur(location() + "/cur/"); unsigned int stopIndex = nbMessages == -1 ? mMsgList.count() : QMIN( mMsgList.count(), startIndex + nbMessages ); @@ -285,7 +285,7 @@ int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const QSt if (!mi) continue; - QString filename(mi->fileName()); + TQString filename(mi->fileName()); if (filename.isEmpty()) continue; @@ -330,7 +330,7 @@ int KMFolderMaildir::compact( bool silent ) //------------------------------------------------------------- FolderJob* KMFolderMaildir::doCreateJob( KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString, const AttachmentStrategy* ) const + KMFolder *folder, TQString, const AttachmentStrategy* ) const { MaildirJob *job = new MaildirJob( msg, jt, folder ); job->setParentFolder( this ); @@ -339,7 +339,7 @@ KMFolderMaildir::doCreateJob( KMMessage *msg, FolderJob::JobType jt, //------------------------------------------------------------- FolderJob* -KMFolderMaildir::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, +KMFolderMaildir::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const { MaildirJob *job = new MaildirJob( msgList, sets, jt, folder ); @@ -359,9 +359,9 @@ int KMFolderMaildir::addMsgInternal( KMMessage* aMsg, int* index_return, bool stripUid ) { /* -QFile fileD0( "testdat_xx-kmfoldermaildir-0" ); +TQFile fileD0( "testdat_xx-kmfoldermaildir-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. } @@ -369,7 +369,7 @@ if( fileD0.open( IO_WriteOnly ) ) { long len; unsigned long size; KMFolder* msgParent; - QCString msgText; + TQCString msgText; int idx(-1); int rc; @@ -389,7 +389,7 @@ if( fileD0.open( IO_WriteOnly ) ) { aMsg->removeHeaderField("Content-Type"); // the line above - const QString uidHeader = aMsg->headerField( "X-UID" ); + const TQString uidHeader = aMsg->headerField( "X-UID" ); if ( !uidHeader.isEmpty() && stripUid ) aMsg->removeHeaderField( "X-UID" ); @@ -408,15 +408,15 @@ if( fileD0.open( IO_WriteOnly ) ) { } // make sure the filename has the correct extension - QString filename = constructValidFileName( aMsg->fileName(), aMsg->status() ); + TQString filename = constructValidFileName( aMsg->fileName(), aMsg->status() ); - QString tmp_file(location() + "/tmp/"); + TQString tmp_file(location() + "/tmp/"); tmp_file += filename; if (!KPIM::kCStringToFile(msgText, tmp_file, false, false, false)) kmkernel->emergencyExit( i18n("Message could not be added to the folder, possibly disk space is low.") ); - QFile file(tmp_file); + TQFile file(tmp_file); size = msgText.length(); KMFolderOpener openThis(folder(), "maildir"); @@ -428,7 +428,7 @@ if( fileD0.open( IO_WriteOnly ) ) { } // now move the file to the correct location - QString new_loc(location() + "/cur/"); + TQString new_loc(location() + "/cur/"); new_loc += filename; if (moveInternal(tmp_file, new_loc, filename, aMsg->status()).isNull()) { @@ -505,7 +505,7 @@ if( fileD0.open( IO_WriteOnly ) ) { kdDebug(5006) << "Error: Could not add message to folder (No space left on device?)" << endl; if (ftell(mIndexStream) > revert) { kdDebug(5006) << "Undoing changes" << endl; - truncate( QFile::encodeName(indexLocation()), revert ); + truncate( TQFile::encodeName(indexLocation()), revert ); } kmkernel->emergencyExit(i18n("KMFolderMaildir::addMsg: abnormally terminating to prevent data loss.")); // exit(1); // don't ever use exit(), use the above! @@ -530,9 +530,9 @@ if( fileD0.open( IO_WriteOnly ) ) { needsCompact = true; /* -QFile fileD1( "testdat_xx-kmfoldermaildir-1" ); +TQFile fileD1( "testdat_xx-kmfoldermaildir-1" ); if( fileD1.open( IO_WriteOnly ) ) { - QDataStream ds( &fileD1 ); + TQDataStream ds( &fileD1 ); ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() ); fileD1.close(); // If data is 0 we just create a zero length file. } @@ -554,13 +554,13 @@ KMMessage* KMFolderMaildir::readMsg(int idx) DwString KMFolderMaildir::getDwString(int idx) { KMMsgInfo* mi = (KMMsgInfo*)mMsgList[idx]; - QString abs_file(location() + "/cur/"); + TQString abs_file(location() + "/cur/"); abs_file += mi->fileName(); - QFileInfo fi( abs_file ); + TQFileInfo fi( abs_file ); if (fi.exists() && fi.isFile() && fi.isWritable() && fi.size() > 0) { - FILE* stream = fopen(QFile::encodeName(abs_file), "r+"); + FILE* stream = fopen(TQFile::encodeName(abs_file), "r+"); if (stream) { size_t msgSize = fi.size(); char* msgText = new char[ msgSize + 1 ]; @@ -579,14 +579,14 @@ DwString KMFolderMaildir::getDwString(int idx) } -void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& file, KMMsgStatus status) +void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& file, KMMsgStatus status) { // we keep our current directory to restore it later char path_buffer[PATH_MAX]; if(!::getcwd(path_buffer, PATH_MAX - 1)) return; - ::chdir(QFile::encodeName(dir)); + ::chdir(TQFile::encodeName(dir)); // messages in the 'cur' directory are Read by default.. but may // actually be some other state (but not New) @@ -599,9 +599,9 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi } // open the file and get a pointer to it - QFile f(file); + TQFile f(file); if ( f.open( IO_ReadOnly ) == false ) { - kdWarning(5006) << "The file '" << QFile::encodeName(dir) << "/" << file + kdWarning(5006) << "The file '" << TQFile::encodeName(dir) << "/" << file << "' could not be opened for reading the message. " "Please check ownership and permissions." << endl; @@ -611,12 +611,12 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi char line[MAX_LINE]; bool atEof = false; bool inHeader = true; - QCString *lastStr = 0; + TQCString *lastStr = 0; - QCString dateStr, fromStr, toStr, subjStr; - QCString xmarkStr, replyToIdStr, msgIdStr, referencesStr; - QCString statusStr, replyToAuxIdStr, uidStr; - QCString contentTypeStr, charset; + TQCString dateStr, fromStr, toStr, subjStr; + TQCString xmarkStr, replyToIdStr, msgIdStr, referencesStr; + TQCString statusStr, replyToAuxIdStr, uidStr; + TQCString contentTypeStr, charset; // iterate through this file until done while (!atEof) @@ -734,8 +734,8 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi // if this is a New file and is in 'new', we move it to 'cur' if (status & KMMsgStatusNew) { - QString newDir(location() + "/new/"); - QString curDir(location() + "/cur/"); + TQString newDir(location() + "/new/"); + TQString curDir(location() + "/cur/"); moveInternal(newDir + file, curDir + file, mi); } @@ -764,55 +764,55 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi if (strncasecmp(line, "Date:", 5) == 0) { - dateStr = QCString(line+5); + dateStr = TQCString(line+5); lastStr = &dateStr; } else if (strncasecmp(line, "From:", 5) == 0) { - fromStr = QCString(line+5); + fromStr = TQCString(line+5); lastStr = &fromStr; } else if (strncasecmp(line, "To:", 3) == 0) { - toStr = QCString(line+3); + toStr = TQCString(line+3); lastStr = &toStr; } else if (strncasecmp(line, "Subject:", 8) == 0) { - subjStr = QCString(line+8); + subjStr = TQCString(line+8); lastStr = &subjStr; } else if (strncasecmp(line, "References:", 11) == 0) { - referencesStr = QCString(line+11); + referencesStr = TQCString(line+11); lastStr = &referencesStr; } else if (strncasecmp(line, "Message-Id:", 11) == 0) { - msgIdStr = QCString(line+11); + msgIdStr = TQCString(line+11); lastStr = &msgIdStr; } else if (strncasecmp(line, "X-KMail-Mark:", 13) == 0) { - xmarkStr = QCString(line+13); + xmarkStr = TQCString(line+13); } else if (strncasecmp(line, "X-Status:", 9) == 0) { - statusStr = QCString(line+9); + statusStr = TQCString(line+9); } else if (strncasecmp(line, "In-Reply-To:", 12) == 0) { - replyToIdStr = QCString(line+12); + replyToIdStr = TQCString(line+12); lastStr = &replyToIdStr; } else if (strncasecmp(line, "X-UID:", 6) == 0) { - uidStr = QCString(line+6); + uidStr = TQCString(line+6); lastStr = &uidStr; } else if (strncasecmp(line, "Content-Type:", 13) == 0) { - contentTypeStr = QCString(line+13); + contentTypeStr = TQCString(line+13); lastStr = &contentTypeStr; } @@ -839,7 +839,7 @@ int KMFolderMaildir::createIndexFromContents() // first, we make sure that all the directories are here as they // should be - QFileInfo dirinfo; + TQFileInfo dirinfo; dirinfo.setFile(location() + "/new"); if (!dirinfo.exists() || !dirinfo.isDir()) @@ -847,8 +847,8 @@ int KMFolderMaildir::createIndexFromContents() kdDebug(5006) << "Directory " << location() << "/new doesn't exist or is a file"<< endl; return 1; } - QDir newDir(location() + "/new"); - newDir.setFilter(QDir::Files); + TQDir newDir(location() + "/new"); + newDir.setFilter(TQDir::Files); dirinfo.setFile(location() + "/cur"); if (!dirinfo.exists() || !dirinfo.isDir()) @@ -856,13 +856,13 @@ int KMFolderMaildir::createIndexFromContents() kdDebug(5006) << "Directory " << location() << "/cur doesn't exist or is a file"<< endl; return 1; } - QDir curDir(location() + "/cur"); - curDir.setFilter(QDir::Files); + TQDir curDir(location() + "/cur"); + curDir.setFilter(TQDir::Files); // then, we look for all the 'cur' files const QFileInfoList *list = curDir.entryInfoList(); QFileInfoListIterator it(*list); - QFileInfo *fi; + TQFileInfo *fi; while ((fi = it.current())) { @@ -901,9 +901,9 @@ int KMFolderMaildir::createIndexFromContents() KMFolderIndex::IndexStatus KMFolderMaildir::indexStatus() { - QFileInfo new_info(location() + "/new"); - QFileInfo cur_info(location() + "/cur"); - QFileInfo index_info(indexLocation()); + TQFileInfo new_info(location() + "/new"); + TQFileInfo cur_info(location() + "/cur"); + TQFileInfo index_info(indexLocation()); if (!index_info.exists()) return KMFolderIndex::IndexMissing; @@ -946,19 +946,19 @@ KMMessage* KMFolderMaildir::take(int idx) } // static -bool KMFolderMaildir::removeFile( const QString & folderPath, - const QString & filename ) +bool KMFolderMaildir::removeFile( const TQString & folderPath, + const TQString & filename ) { // we need to look in both 'new' and 'cur' since it's possible to // delete a message before the folder is compacted. Since the file // naming and moving is done in ::compact, we can't assume any // location at this point. - QCString abs_file( QFile::encodeName( folderPath + "/cur/" + filename ) ); + TQCString abs_file( TQFile::encodeName( folderPath + "/cur/" + filename ) ); if ( ::unlink( abs_file ) == 0 ) return true; if ( errno == ENOENT ) { // doesn't exist - abs_file = QFile::encodeName( folderPath + "/new/" + filename ); + abs_file = TQFile::encodeName( folderPath + "/new/" + filename ); if ( ::unlink( abs_file ) == 0 ) return true; } @@ -967,24 +967,24 @@ bool KMFolderMaildir::removeFile( const QString & folderPath, return false; } -bool KMFolderMaildir::removeFile( const QString & filename ) +bool KMFolderMaildir::removeFile( const TQString & filename ) { return removeFile( location(), filename ); } #include <sys/types.h> #include <dirent.h> -static bool removeDirAndContentsRecursively( const QString & path ) +static bool removeDirAndContentsRecursively( const TQString & path ) { bool success = true; - QDir d; + TQDir d; d.setPath( path ); - d.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks ); + d.setFilter( TQDir::Files | TQDir::Dirs | TQDir::Hidden | TQDir::NoSymLinks ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { if( fi->isDir() ) { @@ -1013,22 +1013,22 @@ int KMFolderMaildir::removeContents() /* The subdirs are removed now. Check if there is anything else in the dir * and only if not delete the dir itself. The user could have data stored * that would otherwise be deleted. */ - QDir dir(location()); + TQDir dir(location()); if ( dir.count() == 2 ) { // only . and .. if ( !removeDirAndContentsRecursively( location() ), 0 ) return 1; } return 0; } -static QRegExp *suffix_regex = 0; -static KStaticDeleter<QRegExp> suffix_regex_sd; +static TQRegExp *suffix_regex = 0; +static KStaticDeleter<TQRegExp> suffix_regex_sd; //----------------------------------------------------------------------------- // static -QString KMFolderMaildir::constructValidFileName( const QString & filename, +TQString KMFolderMaildir::constructValidFileName( const TQString & filename, KMMsgStatus status ) { - QString aFileName( filename ); + TQString aFileName( filename ); if (aFileName.isEmpty()) { @@ -1037,14 +1037,14 @@ QString KMFolderMaildir::constructValidFileName( const QString & filename, } if (!suffix_regex) - suffix_regex_sd.setObject(suffix_regex, new QRegExp(":2,?R?S?$")); + suffix_regex_sd.setObject(suffix_regex, new TQRegExp(":2,?R?S?$")); aFileName.truncate(aFileName.findRev(*suffix_regex)); // only add status suffix if the message is neither new nor unread if (! ((status & KMMsgStatusNew) || (status & KMMsgStatusUnread)) ) { - QString suffix( ":2," ); + TQString suffix( ":2," ); if (status & KMMsgStatusReplied) suffix += "RS"; else @@ -1056,10 +1056,10 @@ QString KMFolderMaildir::constructValidFileName( const QString & filename, } //----------------------------------------------------------------------------- -QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newLoc, KMMsgInfo *mi) +TQString KMFolderMaildir::moveInternal(const TQString& oldLoc, const TQString& newLoc, KMMsgInfo *mi) { - QString filename(mi->fileName()); - QString ret(moveInternal(oldLoc, newLoc, filename, mi->status())); + TQString filename(mi->fileName()); + TQString ret(moveInternal(oldLoc, newLoc, filename, mi->status())); if (filename != mi->fileName()) mi->setFileName(filename); @@ -1068,22 +1068,22 @@ QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newL } //----------------------------------------------------------------------------- -QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newLoc, QString& aFileName, KMMsgStatus status) +TQString KMFolderMaildir::moveInternal(const TQString& oldLoc, const TQString& newLoc, TQString& aFileName, KMMsgStatus status) { - QString dest(newLoc); + TQString dest(newLoc); // make sure that our destination filename doesn't already exist - while (QFile::exists(dest)) + while (TQFile::exists(dest)) { - aFileName = constructValidFileName( QString(), status ); + aFileName = constructValidFileName( TQString(), status ); - QFileInfo fi(dest); + TQFileInfo fi(dest); dest = fi.dirPath(true) + "/" + aFileName; setDirty( true ); } - QDir d; + TQDir d; if (d.rename(oldLoc, dest) == false) - return QString::null; + return TQString::null; else return dest; } @@ -1116,7 +1116,7 @@ Q_INT64 KMFolderMaildir::doFolderSize() const item = new KFileItem( S_IFDIR, -1, location() + "/tmp" ); list.append( item ); s_DirSizeJobQueue.append( - qMakePair( QGuardedPtr<const KMFolderMaildir>( this ), list ) ); + qMakePair( TQGuardedPtr<const KMFolderMaildir>( this ), list ) ); // if there's only one entry in the queue then we can start // a dirSizeJob right away @@ -1125,8 +1125,8 @@ Q_INT64 KMFolderMaildir::doFolderSize() const //kdDebug(5006) << k_funcinfo << "Starting dirSizeJob for folder " // << location() << endl; KDirSize* job = KDirSize::dirSizeJob( list ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); } return -1; @@ -1157,8 +1157,8 @@ void KMFolderMaildir::slotDirSizeJobResult( KIO::Job* job ) //kdDebug(5006) << k_funcinfo << "Starting dirSizeJob for folder " // << entry.first->location() << endl; KDirSize* job = KDirSize::dirSizeJob( entry.second ); - connect( job, SIGNAL( result( KIO::Job* ) ), - entry.first, SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + entry.first, TQT_SLOT( slotDirSizeJobResult( KIO::Job* ) ) ); break; } else diff --git a/kmail/kmfoldermaildir.h b/kmail/kmfoldermaildir.h index 8e09a6f3f..12f24942c 100644 --- a/kmail/kmfoldermaildir.h +++ b/kmail/kmfoldermaildir.h @@ -5,7 +5,7 @@ #include <kfileitem.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> class KMFolderMaildir; namespace KMail { @@ -52,7 +52,7 @@ public: /** Remove (first occurrence of) given message from the folder. */ virtual void removeMsg(int i, bool imapQuiet = FALSE); - virtual void removeMsg(QPtrList<KMMessage> msgList, bool imapQuiet = FALSE) + virtual void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = FALSE) { return KMFolderIndex::removeMsg(msgList, imapQuiet); } // Called by KMMsgBase::setStatus when status of a message has changed @@ -83,20 +83,20 @@ public: @param folderPath the full path of the folder as returned by location() @return 0 on success and an error code (cf. man 3 errno) otherwise */ - static int createMaildirFolders( const QString & folderPath ); + static int createMaildirFolders( const TQString & folderPath ); - static QString constructValidFileName( const QString & filename = QString(), + static TQString constructValidFileName( const TQString & filename = TQString(), KMMsgStatus status = KMMsgStatusNew ); - static bool removeFile( const QString & folderPath, - const QString & filename ); + static bool removeFile( const TQString & folderPath, + const TQString & filename ); /** @reimpl */ virtual int create(); /** Remove some deleted messages from the folder. Returns zero on success and an errno on failure. This is only for use from MaildirCompactionJob. */ - int compact( unsigned int startIndex, int nbMessages, const QStringList& entryList, bool& done ); + int compact( unsigned int startIndex, int nbMessages, const TQStringList& entryList, bool& done ); /** Remove deleted messages from the folder. Returns zero on success and an errno on failure. */ @@ -110,8 +110,8 @@ public: protected: virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, - QString partSpecifier, const AttachmentStrategy *as ) const; - virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, + TQString partSpecifier, const AttachmentStrategy *as ) const; + virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const; /** Load message from file and store it at given index. Returns 0 on failure. */ @@ -147,10 +147,10 @@ private slots: void slotDirSizeJobResult( KIO::Job* job ); private: - void readFileHeaderIntern(const QString& dir, const QString& file, KMMsgStatus status); - QString moveInternal(const QString& oldLoc, const QString& newLoc, KMMsgInfo* mi); - QString moveInternal(const QString& oldLoc, const QString& newLoc, QString& aFileName, KMMsgStatus status); - bool removeFile(const QString& filename); + void readFileHeaderIntern(const TQString& dir, const TQString& file, KMMsgStatus status); + TQString moveInternal(const TQString& oldLoc, const TQString& newLoc, KMMsgInfo* mi); + TQString moveInternal(const TQString& oldLoc, const TQString& newLoc, TQString& aFileName, KMMsgStatus status); + bool removeFile(const TQString& filename); /** Tests whether the contents of this folder is newer than the index. Returns IndexTooOld if the index is older than the contents. @@ -159,10 +159,10 @@ private: */ virtual IndexStatus indexStatus(); - typedef QPair<QGuardedPtr<const KMFolderMaildir>,KFileItemList> DirSizeJobQueueEntry; - static QValueList<DirSizeJobQueueEntry> s_DirSizeJobQueue; + typedef QPair<TQGuardedPtr<const KMFolderMaildir>,KFileItemList> DirSizeJobQueueEntry; + static TQValueList<DirSizeJobQueueEntry> s_DirSizeJobQueue; - QStrList mIdxToFileList; + TQStrList mIdxToFileList; int mIdxCount; mutable bool mCurrentlyCheckingFolderSize; }; diff --git a/kmail/kmfoldermbox.cpp b/kmail/kmfoldermbox.cpp index 92f466a7c..dc35328db 100644 --- a/kmail/kmfoldermbox.cpp +++ b/kmail/kmfoldermbox.cpp @@ -18,8 +18,8 @@ * */ #include <config.h> -#include <qfileinfo.h> -#include <qregexp.h> +#include <tqfileinfo.h> +#include <tqregexp.h> #include "kmfoldermbox.h" #include "folderstorage.h" @@ -104,7 +104,7 @@ int KMFolderMbox::open(const char *owner) assert(!folder()->name().isEmpty()); mFilesLocked = false; - mStream = fopen(QFile::encodeName(location()), "r+"); // messages file + mStream = fopen(TQFile::encodeName(location()), "r+"); // messages file if (!mStream) { KNotifyClient::event( 0, "warning", @@ -125,7 +125,7 @@ int KMFolderMbox::open(const char *owner) // only show a warning if the index file exists, otherwise it can be // silently regenerated if (KMFolderIndex::IndexTooOld == index_status) { - QString msg = i18n("<qt><p>The index of folder '%2' seems " + TQString msg = i18n("<qt><p>The index of folder '%2' seems " "to be out of date. To prevent message " "corruption the index will be " "regenerated. As a result deleted " @@ -160,13 +160,13 @@ int KMFolderMbox::open(const char *owner) KMessageBox::AllowLink ); } } - QString str; + TQString str; mIndexStream = 0; str = i18n("Folder `%1' changed. Recreating index.") .arg(name()); emit statusMsg(str); } else { - mIndexStream = fopen(QFile::encodeName(indexLocation()), "r+"); // index file + mIndexStream = fopen(TQFile::encodeName(indexLocation()), "r+"); // index file if ( mIndexStream ) { fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC); updateIndexStreamPtr(); @@ -199,7 +199,7 @@ int KMFolderMbox::canAccess() { assert(!folder()->name().isEmpty()); - if (access(QFile::encodeName(location()), R_OK | W_OK) != 0) { + if (access(TQFile::encodeName(location()), R_OK | W_OK) != 0) { kdDebug(5006) << "KMFolderMbox::access call to access function failed" << endl; return 1; } @@ -216,7 +216,7 @@ int KMFolderMbox::create() assert(mOpenCount == 0); kdDebug(5006) << "Creating folder " << name() << endl; - if (access(QFile::encodeName(location()), F_OK) == 0) { + if (access(TQFile::encodeName(location()), F_OK) == 0) { kdDebug(5006) << "KMFolderMbox::create call to access function failed." << endl; kdDebug(5006) << "File:: " << endl; kdDebug(5006) << "Error " << endl; @@ -224,7 +224,7 @@ int KMFolderMbox::create() } old_umask = umask(077); - mStream = fopen(QFile::encodeName(location()), "w+"); //sven; open RW + mStream = fopen(TQFile::encodeName(location()), "w+"); //sven; open RW umask(old_umask); if (!mStream) return errno; @@ -234,7 +234,7 @@ int KMFolderMbox::create() if (!folder()->path().isEmpty()) { old_umask = umask(077); - mIndexStream = fopen(QFile::encodeName(indexLocation()), "w+"); //sven; open RW + mIndexStream = fopen(TQFile::encodeName(indexLocation()), "w+"); //sven; open RW updateIndexStreamPtr(true); umask(old_umask); @@ -295,7 +295,7 @@ void KMFolderMbox::sync() if (mOpenCount > 0) if (!mStream || fsync(fileno(mStream)) || !mIndexStream || fsync(fileno(mIndexStream))) { - kmkernel->emergencyExit( i18n("Could not sync index file <b>%1</b>: %2").arg( indexLocation() ).arg(errno ? QString::fromLocal8Bit(strerror(errno)) : i18n("Internal error. Please copy down the details and report a bug."))); + kmkernel->emergencyExit( i18n("Could not sync index file <b>%1</b>: %2").arg( indexLocation() ).arg(errno ? TQString::fromLocal8Bit(strerror(errno)) : i18n("Internal error. Please copy down the details and report a bug."))); } } @@ -309,7 +309,7 @@ int KMFolderMbox::lock() fl.l_start=0; fl.l_len=0; fl.l_pid=-1; - QCString cmd_str; + TQCString cmd_str; assert(mStream != 0); mFilesLocked = false; mReadOnly = false; @@ -347,9 +347,9 @@ int KMFolderMbox::lock() case procmail_lockfile: cmd_str = "lockfile -l20 -r5 "; if (!mProcmailLockFileName.isEmpty()) - cmd_str += QFile::encodeName(KProcess::quote(mProcmailLockFileName)); + cmd_str += TQFile::encodeName(KProcess::quote(mProcmailLockFileName)); else - cmd_str += QFile::encodeName(KProcess::quote(location() + ".lock")); + cmd_str += TQFile::encodeName(KProcess::quote(location() + ".lock")); rc = system( cmd_str.data() ); if( rc != 0 ) @@ -361,7 +361,7 @@ int KMFolderMbox::lock() } if( mIndexStream ) { - cmd_str = "lockfile -l20 -r5 " + QFile::encodeName(KProcess::quote(indexLocation() + ".lock")); + cmd_str = "lockfile -l20 -r5 " + TQFile::encodeName(KProcess::quote(indexLocation() + ".lock")); rc = system( cmd_str.data() ); if( rc != 0 ) { @@ -374,7 +374,7 @@ int KMFolderMbox::lock() break; case mutt_dotlock: - cmd_str = "mutt_dotlock " + QFile::encodeName(KProcess::quote(location())); + cmd_str = "mutt_dotlock " + TQFile::encodeName(KProcess::quote(location())); rc = system( cmd_str.data() ); if( rc != 0 ) { @@ -385,7 +385,7 @@ int KMFolderMbox::lock() } if( mIndexStream ) { - cmd_str = "mutt_dotlock " + QFile::encodeName(KProcess::quote(indexLocation())); + cmd_str = "mutt_dotlock " + TQFile::encodeName(KProcess::quote(indexLocation())); rc = system( cmd_str.data() ); if( rc != 0 ) { @@ -398,7 +398,7 @@ int KMFolderMbox::lock() break; case mutt_dotlock_privileged: - cmd_str = "mutt_dotlock -p " + QFile::encodeName(KProcess::quote(location())); + cmd_str = "mutt_dotlock -p " + TQFile::encodeName(KProcess::quote(location())); rc = system( cmd_str.data() ); if( rc != 0 ) { @@ -409,7 +409,7 @@ int KMFolderMbox::lock() } if( mIndexStream ) { - cmd_str = "mutt_dotlock -p " + QFile::encodeName(KProcess::quote(indexLocation())); + cmd_str = "mutt_dotlock -p " + TQFile::encodeName(KProcess::quote(indexLocation())); rc = system( cmd_str.data() ); if( rc != 0 ) { @@ -434,7 +434,7 @@ int KMFolderMbox::lock() //------------------------------------------------------------- FolderJob* KMFolderMbox::doCreateJob( KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString, const AttachmentStrategy* ) const + KMFolder *folder, TQString, const AttachmentStrategy* ) const { MboxJob *job = new MboxJob( msg, jt, folder ); job->setParent( this ); @@ -443,7 +443,7 @@ KMFolderMbox::doCreateJob( KMMessage *msg, FolderJob::JobType jt, //------------------------------------------------------------- FolderJob* -KMFolderMbox::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, +KMFolderMbox::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const { MboxJob *job = new MboxJob( msgList, sets, jt, folder ); @@ -460,7 +460,7 @@ int KMFolderMbox::unlock() fl.l_whence=0; fl.l_start=0; fl.l_len=0; - QCString cmd_str; + TQCString cmd_str; assert(mStream != 0); mFilesLocked = false; @@ -476,34 +476,34 @@ int KMFolderMbox::unlock() case procmail_lockfile: cmd_str = "rm -f "; if (!mProcmailLockFileName.isEmpty()) - cmd_str += QFile::encodeName(KProcess::quote(mProcmailLockFileName)); + cmd_str += TQFile::encodeName(KProcess::quote(mProcmailLockFileName)); else - cmd_str += QFile::encodeName(KProcess::quote(location() + ".lock")); + cmd_str += TQFile::encodeName(KProcess::quote(location() + ".lock")); rc = system( cmd_str.data() ); if( mIndexStream ) { - cmd_str = "rm -f " + QFile::encodeName(KProcess::quote(indexLocation() + ".lock")); + cmd_str = "rm -f " + TQFile::encodeName(KProcess::quote(indexLocation() + ".lock")); rc = system( cmd_str.data() ); } break; case mutt_dotlock: - cmd_str = "mutt_dotlock -u " + QFile::encodeName(KProcess::quote(location())); + cmd_str = "mutt_dotlock -u " + TQFile::encodeName(KProcess::quote(location())); rc = system( cmd_str.data() ); if( mIndexStream ) { - cmd_str = "mutt_dotlock -u " + QFile::encodeName(KProcess::quote(indexLocation())); + cmd_str = "mutt_dotlock -u " + TQFile::encodeName(KProcess::quote(indexLocation())); rc = system( cmd_str.data() ); } break; case mutt_dotlock_privileged: - cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(KProcess::quote(location())); + cmd_str = "mutt_dotlock -p -u " + TQFile::encodeName(KProcess::quote(location())); rc = system( cmd_str.data() ); if( mIndexStream ) { - cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(KProcess::quote(indexLocation())); + cmd_str = "mutt_dotlock -p -u " + TQFile::encodeName(KProcess::quote(indexLocation())); rc = system( cmd_str.data() ); } break; @@ -521,8 +521,8 @@ int KMFolderMbox::unlock() //----------------------------------------------------------------------------- KMFolderIndex::IndexStatus KMFolderMbox::indexStatus() { - QFileInfo contInfo(location()); - QFileInfo indInfo(indexLocation()); + TQFileInfo contInfo(location()); + TQFileInfo indInfo(indexLocation()); if (!contInfo.exists()) return KMFolderIndex::IndexOk; if (!indInfo.exists()) return KMFolderIndex::IndexMissing; @@ -541,15 +541,15 @@ int KMFolderMbox::createIndexFromContents() { char line[MAX_LINE]; char status[8], xstatus[8]; - QCString subjStr, dateStr, fromStr, toStr, xmarkStr, *lastStr=0; - QCString replyToIdStr, replyToAuxIdStr, referencesStr, msgIdStr; - QCString sizeServerStr, uidStr; - QCString contentTypeStr, charset; + TQCString subjStr, dateStr, fromStr, toStr, xmarkStr, *lastStr=0; + TQCString replyToIdStr, replyToAuxIdStr, referencesStr, msgIdStr; + TQCString sizeServerStr, uidStr; + TQCString contentTypeStr, charset; bool atEof = false; bool inHeader = true; KMMsgInfo* mi; - QString msgStr; - QRegExp regexp(MSG_SEPERATOR_REGEX); + TQString msgStr; + TQRegExp regexp(MSG_SEPERATOR_REGEX); int i, num, numStatus; short needStatus; @@ -737,54 +737,54 @@ int KMFolderMbox::createIndexFromContents() needStatus &= ~2; } else if (strncasecmp(line,"X-KMail-Mark:",13)==0) - xmarkStr = QCString(line+13); + xmarkStr = TQCString(line+13); else if (strncasecmp(line,"In-Reply-To:",12)==0) { - replyToIdStr = QCString(line+12); + replyToIdStr = TQCString(line+12); lastStr = &replyToIdStr; } else if (strncasecmp(line,"References:",11)==0) { - referencesStr = QCString(line+11); + referencesStr = TQCString(line+11); lastStr = &referencesStr; } else if (strncasecmp(line,"Message-Id:",11)==0) { - msgIdStr = QCString(line+11); + msgIdStr = TQCString(line+11); lastStr = &msgIdStr; } else if (strncasecmp(line,"Date:",5)==0) { - dateStr = QCString(line+5); + dateStr = TQCString(line+5); lastStr = &dateStr; } else if (strncasecmp(line,"From:", 5)==0) { - fromStr = QCString(line+5); + fromStr = TQCString(line+5); lastStr = &fromStr; } else if (strncasecmp(line,"To:", 3)==0) { - toStr = QCString(line+3); + toStr = TQCString(line+3); lastStr = &toStr; } else if (strncasecmp(line,"Subject:",8)==0) { - subjStr = QCString(line+8); + subjStr = TQCString(line+8); lastStr = &subjStr; } else if (strncasecmp(line,"X-Length:",9)==0) { - sizeServerStr = QCString(line+9); + sizeServerStr = TQCString(line+9); sizeServer = sizeServerStr.toULong(); lastStr = &sizeServerStr; } else if (strncasecmp(line,"X-UID:",6)==0) { - uidStr = QCString(line+6); + uidStr = TQCString(line+6); uid = uidStr.toULong(); lastStr = &uidStr; } else if (strncasecmp(line, "Content-Type:", 13) == 0) { - contentTypeStr = QCString(line+13); + contentTypeStr = TQCString(line+13); lastStr = &contentTypeStr; } } @@ -862,12 +862,12 @@ static size_t unescapeFrom( char* str, size_t strLen ) { } //static -QByteArray KMFolderMbox::escapeFrom( const DwString & str ) { +TQByteArray KMFolderMbox::escapeFrom( const DwString & str ) { const unsigned int strLen = str.length(); if ( strLen <= STRDIM("From ") ) return KMail::Util::ByteArray( str ); // worst case: \nFrom_\nFrom_\nFrom_... => grows to 7/6 - QByteArray result( int( strLen + 5 ) / 6 * 7 + 1 ); + TQByteArray result( int( strLen + 5 ) / 6 * 7 + 1 ); const char * s = str.data(); const char * const e = s + strLen - STRDIM("From "); @@ -929,7 +929,7 @@ DwString KMFolderMbox::getDwString(int idx) int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret ) { if (!canAddMsgNow(aMsg, aIndex_ret)) return 0; - QByteArray msgText; + TQByteArray msgText; char endStr[3]; int idx = -1, rc; KMFolder* msgParent; @@ -967,18 +967,18 @@ int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret ) if (folderType() != KMFolderTypeImap) { /* -QFile fileD0( "testdat_xx-kmfoldermbox-0" ); +TQFile fileD0( "testdat_xx-kmfoldermbox-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. } */ aMsg->setStatusFields(); /* -QFile fileD1( "testdat_xx-kmfoldermbox-1" ); +TQFile fileD1( "testdat_xx-kmfoldermbox-1" ); if( fileD1.open( IO_WriteOnly ) ) { - QDataStream ds( &fileD1 ); + TQDataStream ds( &fileD1 ); ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() ); fileD1.close(); // If data is 0 we just create a zero length file. } @@ -1020,7 +1020,7 @@ if( fileD1.open( IO_WriteOnly ) ) { if (error) return error; - QCString messageSeparator( aMsg->mboxMessageSeparator() ); + TQCString messageSeparator( aMsg->mboxMessageSeparator() ); fwrite( messageSeparator.data(), messageSeparator.length(), 1, mStream ); off_t offs = ftell(mStream); fwrite(msgText.data(), len, 1, mStream); @@ -1033,9 +1033,9 @@ if( fileD1.open( IO_WriteOnly ) ) { kdDebug(5006) << "Error: Could not add message to folder: " << strerror(errno) << endl; if (ftell(mStream) > revert) { kdDebug(5006) << "Undoing changes" << endl; - truncate( QFile::encodeName(location()), revert ); + truncate( TQFile::encodeName(location()), revert ); } - kmkernel->emergencyExit( i18n("Could not add message to folder: ") + QString::fromLocal8Bit(strerror(errno))); + kmkernel->emergencyExit( i18n("Could not add message to folder: ") + TQString::fromLocal8Bit(strerror(errno))); /* This code is not 100% reliable bool busy = kmkernel->kbp()->isBusy(); @@ -1113,10 +1113,10 @@ if( fileD1.open( IO_WriteOnly ) ) { kdWarning(5006) << "Error: Could not add message to folder (No space left on device?)" << endl; if (ftell(mIndexStream) > revert) { kdWarning(5006) << "Undoing changes" << endl; - truncate( QFile::encodeName(indexLocation()), revert ); + truncate( TQFile::encodeName(indexLocation()), revert ); } if ( errno ) - kmkernel->emergencyExit( i18n("Could not add message to folder:") + QString::fromLocal8Bit(strerror(errno))); + kmkernel->emergencyExit( i18n("Could not add message to folder:") + TQString::fromLocal8Bit(strerror(errno))); else kmkernel->emergencyExit( i18n("Could not add message to folder (No space left on device?)") ); @@ -1145,7 +1145,7 @@ if( fileD1.open( IO_WriteOnly ) ) { int KMFolderMbox::compact( unsigned int startIndex, int nbMessages, FILE* tmpfile, off_t& offs, bool& done ) { int rc = 0; - QCString mtext; + TQCString mtext; unsigned int stopIndex = nbMessages == -1 ? mMsgList.count() : QMIN( mMsgList.count(), startIndex + nbMessages ); //kdDebug(5006) << "KMFolderMbox: compacting from " << startIndex << " to " << stopIndex << endl; @@ -1230,7 +1230,7 @@ int KMFolderMbox::compact( bool silent ) // If this is the current folder, the changed signal will ultimately call // KMHeaders::setFolderInfoStatus which will override the message, so save/restore it - QString statusMsg = BroadcastStatus::instance()->statusMsg(); + TQString statusMsg = BroadcastStatus::instance()->statusMsg(); emit changed(); BroadcastStatus::instance()->setStatusMsg( statusMsg ); return rc; @@ -1244,7 +1244,7 @@ void KMFolderMbox::setLockType( LockType ltype ) } //----------------------------------------------------------------------------- -void KMFolderMbox::setProcmailLockFileName( const QString &fname ) +void KMFolderMbox::setProcmailLockFileName( const TQString &fname ) { mProcmailLockFileName = fname; } @@ -1253,7 +1253,7 @@ void KMFolderMbox::setProcmailLockFileName( const QString &fname ) int KMFolderMbox::removeContents() { int rc = 0; - rc = unlink(QFile::encodeName(location())); + rc = unlink(TQFile::encodeName(location())); return rc; } @@ -1261,7 +1261,7 @@ int KMFolderMbox::removeContents() int KMFolderMbox::expungeContents() { int rc = 0; - if (truncate(QFile::encodeName(location()), 0)) + if (truncate(TQFile::encodeName(location()), 0)) rc = errno; return rc; } @@ -1270,7 +1270,7 @@ int KMFolderMbox::expungeContents() /*virtual*/ Q_INT64 KMFolderMbox::doFolderSize() const { - QFileInfo info( location() ); + TQFileInfo info( location() ); return (Q_INT64)(info.size()); } diff --git a/kmail/kmfoldermbox.h b/kmail/kmfoldermbox.h index bcbe5980c..15159b98c 100644 --- a/kmail/kmfoldermbox.h +++ b/kmail/kmfoldermbox.h @@ -105,9 +105,9 @@ public: void setLockType( LockType ltype=FCNTL ); - void setProcmailLockFileName( const QString& ); + void setProcmailLockFileName( const TQString& ); - static QByteArray escapeFrom( const DwString & str ); + static TQByteArray escapeFrom( const DwString & str ); virtual IndexStatus indexStatus(); @@ -116,8 +116,8 @@ public: protected: virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, - QString partSpecifier, const AttachmentStrategy *as ) const; - virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets, + TQString partSpecifier, const AttachmentStrategy *as ) const; + virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder ) const; /** Load message from file and store it at given index. Returns 0 on failure. */ @@ -151,7 +151,7 @@ private: bool mFilesLocked; // TRUE if the files of the folder are locked (writable) bool mReadOnly; // true if locking failed LockType mLockType; - QString mProcmailLockFileName; + TQString mProcmailLockFileName; }; #endif // kmfoldermbox_h diff --git a/kmail/kmfoldermgr.cpp b/kmail/kmfoldermgr.cpp index ece90c239..81b6ca973 100644 --- a/kmail/kmfoldermgr.cpp +++ b/kmail/kmfoldermgr.cpp @@ -16,7 +16,7 @@ #include <unistd.h> #include <time.h> -#include <qdir.h> +#include <tqdir.h> #include <klocale.h> #include <kmessagebox.h> @@ -38,8 +38,8 @@ using KMail::RenameJob; using KMail::CopyFolderJob; //----------------------------------------------------------------------------- -KMFolderMgr::KMFolderMgr(const QString& aBasePath, KMFolderDirType dirType): - QObject(), mDir(this, QString::null, dirType) +KMFolderMgr::KMFolderMgr(const TQString& aBasePath, KMFolderDirType dirType): + TQObject(), mDir(this, TQString::null, dirType) { if ( dirType == KMStandardDir ) mDir.setBaseURL( I18N_NOOP("Local Folders") ); @@ -53,7 +53,7 @@ KMFolderMgr::KMFolderMgr(const QString& aBasePath, KMFolderDirType dirType): //----------------------------------------------------------------------------- KMFolderMgr::~KMFolderMgr() { - mBasePath = QString::null; + mBasePath = TQString::null; } @@ -77,7 +77,7 @@ void KMFolderMgr::expireAll() { #define DO_FOR_ALL(function, folder_code) \ KMFolderNode* node; \ - QPtrListIterator<KMFolderNode> it(*dir); \ + TQPtrListIterator<KMFolderNode> it(*dir); \ for ( ; (node = it.current()); ) { \ ++it; \ if (node->isDir()) continue; \ @@ -125,20 +125,20 @@ void KMFolderMgr::compactAllFolders(bool immediate, KMFolderDir* dir) //----------------------------------------------------------------------------- -void KMFolderMgr::setBasePath(const QString& aBasePath) +void KMFolderMgr::setBasePath(const TQString& aBasePath) { assert(!aBasePath.isNull()); if (aBasePath[0] == '~') { - mBasePath = QDir::homeDirPath(); + mBasePath = TQDir::homeDirPath(); mBasePath.append("/"); mBasePath.append(aBasePath.mid(1)); } else mBasePath = aBasePath; - QFileInfo info( mBasePath ); + TQFileInfo info( mBasePath ); // FIXME We should ask for an alternative dir, rather than bailing out, // I guess - till @@ -159,11 +159,11 @@ void KMFolderMgr::setBasePath(const QString& aBasePath) } } else { // ~/Mail (or whatever the user specified) doesn't exist, create it - if ( ::mkdir( QFile::encodeName( mBasePath ) , S_IRWXU ) == -1 ) { + if ( ::mkdir( TQFile::encodeName( mBasePath ) , S_IRWXU ) == -1 ) { KMessageBox::sorry(0, i18n("KMail could not create folder '%1';\n" "please make sure that you can view and " "modify the content of the folder '%2'.") - .arg( mBasePath ).arg( QDir::homeDirPath() ) ); + .arg( mBasePath ).arg( TQDir::homeDirPath() ) ); ::exit(-1); } } @@ -174,7 +174,7 @@ void KMFolderMgr::setBasePath(const QString& aBasePath) //----------------------------------------------------------------------------- -KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr, +KMFolder* KMFolderMgr::createFolder(const TQString& fName, bool sysFldr, KMFolderType aFolderType, KMFolderDir *aFolderDir) { @@ -190,7 +190,7 @@ KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr, KMFolderCachedImap *storage = static_cast<KMFolderCachedImap*>( fldDir->owner()->storage() ); KMAcctCachedImap *account = storage->account(); // guess imap path - QString imapPath = storage->imapPath(); + TQString imapPath = storage->imapPath(); if ( !imapPath.endsWith( "/" ) ) imapPath += "/"; imapPath += fName; @@ -219,7 +219,7 @@ KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr, //----------------------------------------------------------------------------- -KMFolder* KMFolderMgr::find(const QString& folderName, bool foldersOnly) +KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly) { KMFolderNode* node; @@ -234,11 +234,11 @@ KMFolder* KMFolderMgr::find(const QString& folderName, bool foldersOnly) //----------------------------------------------------------------------------- KMFolder* KMFolderMgr::findById(const uint id) { - return findIdString( QString::null, id ); + return findIdString( TQString::null, id ); } //----------------------------------------------------------------------------- -KMFolder* KMFolderMgr::findIdString( const QString& folderId, +KMFolder* KMFolderMgr::findIdString( const TQString& folderId, const uint id, KMFolderDir *dir ) { @@ -261,7 +261,7 @@ KMFolder* KMFolderMgr::findIdString( const QString& folderId, return 0; } -void KMFolderMgr::getFolderURLS( QStringList& flist, const QString& prefix, +void KMFolderMgr::getFolderURLS( TQStringList& flist, const TQString& prefix, KMFolderDir *adir ) { KMFolderDir* dir = adir ? adir : &mDir; @@ -276,20 +276,20 @@ void KMFolderMgr::getFolderURLS( QStringList& flist, const QString& prefix, ) } -KMFolder* KMFolderMgr::getFolderByURL( const QString& vpath, - const QString& prefix, +KMFolder* KMFolderMgr::getFolderByURL( const TQString& vpath, + const TQString& prefix, KMFolderDir *adir ) { KMFolderDir* dir = adir ? adir : &mDir; DO_FOR_ALL( { - QString a = prefix + "/" + folder->name(); + TQString a = prefix + "/" + folder->name(); KMFolder * mfolder = getFolderByURL( vpath, a,child ); if ( mfolder ) return mfolder; }, { - QString comp = prefix + "/" + folder->name(); + TQString comp = prefix + "/" + folder->name(); if ( comp == vpath ) return folder; } @@ -298,7 +298,7 @@ KMFolder* KMFolderMgr::getFolderByURL( const QString& vpath, } //----------------------------------------------------------------------------- -KMFolder* KMFolderMgr::findOrCreate(const QString& aFolderName, bool sysFldr, +KMFolder* KMFolderMgr::findOrCreate(const TQString& aFolderName, bool sysFldr, const uint id) { KMFolder* folder = 0; @@ -346,7 +346,7 @@ void KMFolderMgr::remove(KMFolder* aFolder) { // call remove for every child KMFolderNode* node; - QPtrListIterator<KMFolderNode> it(*aFolder->child()); + TQPtrListIterator<KMFolderNode> it(*aFolder->child()); for ( ; (node = it.current()); ) { ++it; @@ -361,8 +361,8 @@ void KMFolderMgr::remove(KMFolder* aFolder) void KMFolderMgr::removeFolder(KMFolder* aFolder) { - connect(aFolder, SIGNAL(removed(KMFolder*, bool)), - this, SLOT(removeFolderAux(KMFolder*, bool))); + connect(aFolder, TQT_SIGNAL(removed(KMFolder*, bool)), + this, TQT_SLOT(removeFolderAux(KMFolder*, bool))); aFolder->remove(); } @@ -370,7 +370,7 @@ KMFolder* KMFolderMgr::parentFolder( KMFolder* folder ) { // find the parent folder by stripping "." and ".directory" from the name KMFolderDir* fdir = folder->parent(); - QString parentName = fdir->name(); + TQString parentName = fdir->name(); parentName = parentName.mid( 1, parentName.length()-11 ); KMFolderNode* parent = fdir->hasNamedFolder( parentName ); if ( !parent && fdir->parent() ) // dimap obviously has a different structure @@ -422,8 +422,8 @@ void KMFolderMgr::removeFolderAux(KMFolder* aFolder, bool success) void KMFolderMgr::removeDirAux(KMFolderDir* aFolderDir) { - QDir dir; - QString folderDirLocation = aFolderDir->path(); + TQDir dir; + TQString folderDirLocation = aFolderDir->path(); aFolderDir->clear(); aFolderDir->parent()->remove(aFolderDir); dir.rmdir(folderDirLocation); @@ -450,24 +450,24 @@ void KMFolderMgr::reload(void) } //----------------------------------------------------------------------------- -void KMFolderMgr::createFolderList(QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders) +void KMFolderMgr::createFolderList(TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders) { createFolderList( str, folders, 0, "" ); } //----------------------------------------------------------------------------- -void KMFolderMgr::createI18nFolderList(QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders) +void KMFolderMgr::createI18nFolderList(TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders) { - createFolderList( str, folders, 0, QString::null, true ); + createFolderList( str, folders, 0, TQString::null, true ); } //----------------------------------------------------------------------------- -void KMFolderMgr::createFolderList(QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders, +void KMFolderMgr::createFolderList(TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders, KMFolderDir *adir, - const QString& prefix, + const TQString& prefix, bool i18nized) { KMFolderDir* dir = adir ? adir : &mDir; @@ -574,14 +574,14 @@ void KMFolderMgr::moveFolder( KMFolder* folder, KMFolderDir *newParent ) } //----------------------------------------------------------------------------- -void KMFolderMgr::renameFolder( KMFolder* folder, const QString& newName, +void KMFolderMgr::renameFolder( KMFolder* folder, const TQString& newName, KMFolderDir *newParent ) { RenameJob* job = new RenameJob( folder->storage(), newName, newParent ); - connect( job, SIGNAL( renameDone( QString, bool ) ), - this, SLOT( slotRenameDone( QString, bool ) ) ); - connect( job, SIGNAL( renameDone( QString, bool ) ), - this, SIGNAL( folderMoveOrCopyOperationFinished() ) ); + connect( job, TQT_SIGNAL( renameDone( TQString, bool ) ), + this, TQT_SLOT( slotRenameDone( TQString, bool ) ) ); + connect( job, TQT_SIGNAL( renameDone( TQString, bool ) ), + this, TQT_SIGNAL( folderMoveOrCopyOperationFinished() ) ); job->start(); } @@ -590,13 +590,13 @@ void KMFolderMgr::copyFolder( KMFolder* folder, KMFolderDir *newParent ) { kdDebug(5006) << "Copy folder: " << folder->prettyURL() << endl; CopyFolderJob* job = new CopyFolderJob( folder->storage(), newParent ); - connect( job, SIGNAL( folderCopyComplete( bool ) ), - this, SIGNAL( folderMoveOrCopyOperationFinished() ) ); + connect( job, TQT_SIGNAL( folderCopyComplete( bool ) ), + this, TQT_SIGNAL( folderMoveOrCopyOperationFinished() ) ); job->start(); } //----------------------------------------------------------------------------- -void KMFolderMgr::slotRenameDone( QString, bool success ) +void KMFolderMgr::slotRenameDone( TQString, bool success ) { kdDebug(5006) << k_funcinfo << success << endl; } diff --git a/kmail/kmfoldermgr.h b/kmail/kmfoldermgr.h index 290769428..d4ec786e0 100644 --- a/kmail/kmfoldermgr.h +++ b/kmail/kmfoldermgr.h @@ -4,10 +4,10 @@ #ifndef kmfoldermgr_h #define kmfoldermgr_h -#include <qstring.h> -#include <qvaluelist.h> -#include <qobject.h> -#include <qguardedptr.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqobject.h> +#include <tqguardedptr.h> #include "kmfolderdir.h" @@ -18,47 +18,47 @@ class KMFolderMgr: public QObject Q_OBJECT public: - KMFolderMgr(const QString& basePath, KMFolderDirType dirType = KMStandardDir); + KMFolderMgr(const TQString& basePath, KMFolderDirType dirType = KMStandardDir); virtual ~KMFolderMgr(); /** Returns path to directory where all the folders live. */ - QString basePath() const { return mBasePath; } + TQString basePath() const { return mBasePath; } /** Set base path. Also calls reload() on the base directory. */ - virtual void setBasePath(const QString&); + virtual void setBasePath(const TQString&); /** Provides access to base directory */ KMFolderRootDir& dir(); /** Searches folder and returns it. Skips directories (objects of type KMFolderDir) if foldersOnly is TRUE. */ - virtual KMFolder* find(const QString& folderName, bool foldersOnly=TRUE); + virtual KMFolder* find(const TQString& folderName, bool foldersOnly=TRUE); /** Searches for a folder with the given id, recurses into directories */ - virtual KMFolder* findIdString(const QString& folderId, + virtual KMFolder* findIdString(const TQString& folderId, const uint id = 0, KMFolderDir *dir = 0); /** Uses find() to find given folder. If not found the folder is * created. Directories are skipped. * If an id is passed this searches for it */ - virtual KMFolder* findOrCreate(const QString& folderName, bool sysFldr=TRUE, + virtual KMFolder* findOrCreate(const TQString& folderName, bool sysFldr=TRUE, const uint id = 0); /** Searches folder by id and returns it. Skips directories (objects of type KMFolderDir) */ virtual KMFolder* findById(const uint id); - virtual void getFolderURLS( QStringList& flist, - const QString& prefix=QString::null, + virtual void getFolderURLS( TQStringList& flist, + const TQString& prefix=TQString::null, KMFolderDir *adir=0 ); - virtual KMFolder* getFolderByURL( const QString& vpath, - const QString& prefix=QString::null, + virtual KMFolder* getFolderByURL( const TQString& vpath, + const TQString& prefix=TQString::null, KMFolderDir *adir=0 ); /** Create a mail folder in the root folder directory dir() with given name. Returns Folder on success. */ - virtual KMFolder* createFolder(const QString& fName, bool sysFldr=FALSE, + virtual KMFolder* createFolder(const TQString& fName, bool sysFldr=FALSE, KMFolderType aFolderType=KMFolderTypeMbox, KMFolderDir *aFolderDir = 0); @@ -73,21 +73,21 @@ public: /** Create a list of formatted formatted folder labels and corresponding folders*/ - virtual void createFolderList( QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders ); + virtual void createFolderList( TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders ); /** Auxillary function to facilitate creating a list of formatted - folder names, suitable for showing in QComboBox */ - virtual void createFolderList( QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders, + folder names, suitable for showing in TQComboBox */ + virtual void createFolderList( TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders, KMFolderDir *adir, - const QString& prefix, + const TQString& prefix, bool i18nized=FALSE ); /** Create a list of formatted formatted folder labels and corresponding folders. The system folder names are translated */ - virtual void createI18nFolderList( QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders ); + virtual void createI18nFolderList( TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders ); /** fsync all open folders to disk */ void syncAllFolders( KMFolderDir *adir = 0 ); @@ -115,7 +115,7 @@ public: void moveFolder( KMFolder* folder, KMFolderDir* newParent ); /** Rename or move a folder */ - void renameFolder( KMFolder* folder, const QString& newName, + void renameFolder( KMFolder* folder, const TQString& newName, KMFolderDir* newParent = 0 ); /** Copy a folder */ @@ -135,7 +135,7 @@ public slots: void removeFolderAux(KMFolder* obsoleteFolder, bool success); /** Called when the renaming of a folder is done */ - void slotRenameDone( QString newName, bool success ); + void slotRenameDone( TQString newName, bool success ); signals: /** Emitted when the list of folders has changed. This signal is a hook @@ -176,7 +176,7 @@ protected: /** Auxillary function to facilitate removal of a folder directory */ void removeDirAux(KMFolderDir* aFolderDir); - QString mBasePath; + TQString mBasePath; KMFolderRootDir mDir; int mQuiet; bool mChanged; diff --git a/kmail/kmfoldernode.cpp b/kmail/kmfoldernode.cpp index 49698dafd..e27a88f81 100644 --- a/kmail/kmfoldernode.cpp +++ b/kmail/kmfoldernode.cpp @@ -7,7 +7,7 @@ #include "kmfolderdir.h" //----------------------------------------------------------------------------- -KMFolderNode::KMFolderNode( KMFolderDir * parent, const QString & name ) +KMFolderNode::KMFolderNode( KMFolderDir * parent, const TQString & name ) : mName( name ), mParent( parent ), mDir( false ), @@ -29,14 +29,14 @@ bool KMFolderNode::isDir(void) const //----------------------------------------------------------------------------- -QString KMFolderNode::path() const +TQString KMFolderNode::path() const { if (parent()) return parent()->path(); - return QString::null; + return TQString::null; } //----------------------------------------------------------------------------- -QString KMFolderNode::label(void) const +TQString KMFolderNode::label(void) const { return name(); } diff --git a/kmail/kmfoldernode.h b/kmail/kmfoldernode.h index 56f22140a..3d0dbaddc 100644 --- a/kmail/kmfoldernode.h +++ b/kmail/kmfoldernode.h @@ -20,9 +20,9 @@ #ifndef kmfoldernode_h #define kmfoldernode_h -#include <qobject.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqptrlist.h> class KMFolderDir; @@ -31,7 +31,7 @@ class KMFolderNode: public QObject Q_OBJECT public: - KMFolderNode( KMFolderDir * parent, const QString & name ); + KMFolderNode( KMFolderDir * parent, const TQString & name ); virtual ~KMFolderNode(); /** Is it a directory where mail folders are stored or is it a folder that @@ -51,31 +51,31 @@ public: if the node has no parent. Example: if this object represents a folder ~joe/Mail/inbox then path() returns "/home/joe/Mail" and name() returns "inbox". */ - virtual QString path() const; + virtual TQString path() const; /** Name of the node. Also used as file name. */ - QString name() const { return mName; } - void setName(const QString& aName) { mName = aName; } + TQString name() const { return mName; } + void setName(const TQString& aName) { mName = aName; } /** Label of the node for visualzation purposes. Default the same as the name. */ - virtual QString label() const; + virtual TQString label() const; /** URL of the node for visualization purposes. */ - virtual QString prettyURL() const = 0; + virtual TQString prettyURL() const = 0; /** ID of the node */ uint id() const; void setId( uint id ) { mId = id; } protected: - QString mName; + TQString mName; KMFolderDir *mParent; bool mDir; uint mId; }; -typedef QPtrList<KMFolderNode> KMFolderNodeList; +typedef TQPtrList<KMFolderNode> KMFolderNodeList; #endif /*kmfoldernode_h*/ diff --git a/kmail/kmfoldersearch.cpp b/kmail/kmfoldersearch.cpp index 896383b42..85ba2040f 100644 --- a/kmail/kmfoldersearch.cpp +++ b/kmail/kmfoldersearch.cpp @@ -42,7 +42,7 @@ #include <sys/file.h> #include <utime.h> -#include <qfile.h> +#include <tqfile.h> #ifdef HAVE_BYTESWAP_H #include <byteswap.h> @@ -69,8 +69,8 @@ #define IDS_SEARCH_HEADER_LEN 30 -KMSearch::KMSearch(QObject * parent, const char * name) - :QObject(parent, name) +KMSearch::KMSearch(TQObject * parent, const char * name) + :TQObject(parent, name) { mRemainingFolders = -1; mRecursive = true; @@ -80,8 +80,8 @@ KMSearch::KMSearch(QObject * parent, const char * name) mFoundCount = 0; mSearchCount = 0; - mProcessNextBatchTimer = new QTimer(0, "mProcessNextBatchTimer"); - connect(mProcessNextBatchTimer, SIGNAL(timeout()), this, SLOT(slotProcessNextBatch())); + mProcessNextBatchTimer = new TQTimer(0, "mProcessNextBatchTimer"); + connect(mProcessNextBatchTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotProcessNextBatch())); } KMSearch::~KMSearch() @@ -90,7 +90,7 @@ KMSearch::~KMSearch() delete mSearchPattern; } -bool KMSearch::write(QString location) const +bool KMSearch::write(TQString location) const { KConfig config(location); config.setGroup("Search Folder"); @@ -104,14 +104,14 @@ bool KMSearch::write(QString location) const return true; } -bool KMSearch::read(QString location) +bool KMSearch::read(TQString location) { KConfig config( location ); config.setGroup( "Search Folder" ); if ( !mSearchPattern ) mSearchPattern = new KMSearchPattern(); mSearchPattern->readConfig( &config ); - QString rootString = config.readEntry( "Base" ); + TQString rootString = config.readEntry( "Base" ); mRoot = kmkernel->findFolderById( rootString ); mRecursive = config.readBoolEntry( "Recursive" ); return true; @@ -147,7 +147,7 @@ bool KMSearch::inScope(KMFolder* folder) const void KMSearch::start() { //close all referenced folders - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for (fit = mOpenedFolders.begin(); fit != mOpenedFolders.end(); ++fit) { if (!(*fit)) continue; @@ -180,7 +180,7 @@ void KMSearch::start() //Append all descendants to folders KMFolderNode* node; KMFolder* folder; - QValueListConstIterator<QGuardedPtr<KMFolder> > it; + TQValueListConstIterator<TQGuardedPtr<KMFolder> > it; for ( it = mFolders.begin(); it != mFolders.end(); ++it ) { folder = *it; @@ -191,7 +191,7 @@ void KMSearch::start() dir = &kmkernel->folderMgr()->dir(); if ( !dir ) continue; - QPtrListIterator<KMFolderNode> it(*dir); + TQPtrListIterator<KMFolderNode> it(*dir); while ( (node = it.current()) ) { ++it; if ( !node->isDir() ) { @@ -204,7 +204,7 @@ void KMSearch::start() } mRemainingFolders = mFolders.count(); - mLastFolder = QString::null; + mLastFolder = TQString::null; mProcessNextBatchTimer->start( 0, true ); } @@ -217,7 +217,7 @@ void KMSearch::stop() kmkernel->msgIndex()->stopQuery( this ); } else { mIncompleteFolders.clear(); - QValueListConstIterator<QGuardedPtr<KMFolder> > jt; + TQValueListConstIterator<TQGuardedPtr<KMFolder> > jt; for ( jt = mOpenedFolders.begin(); jt != mOpenedFolders.end(); ++jt ) { KMFolder *folder = *jt; if ( !folder ) @@ -237,7 +237,7 @@ void KMSearch::stop() mRemainingFolders = -1; mOpenedFolders.clear(); mFolders.clear(); - mLastFolder = QString::null; + mLastFolder = TQString::null; mRunByIndex = mRunning = false; emit finished(false); } @@ -262,9 +262,9 @@ void KMSearch::slotProcessNextBatch() folder->open("kmsearch"); mOpenedFolders.append( folder ); connect( folder->storage(), - SIGNAL( searchResult( KMFolder*, QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ), + TQT_SIGNAL( searchResult( KMFolder*, TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ), this, - SLOT( slotSearchFolderResult( KMFolder*, QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) ); + TQT_SLOT( slotSearchFolderResult( KMFolder*, TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) ); folder->storage()->search( mSearchPattern ); } else --mRemainingFolders; @@ -274,7 +274,7 @@ void KMSearch::slotProcessNextBatch() } void KMSearch::slotSearchFolderResult( KMFolder* folder, - QValueList<Q_UINT32> serNums, + TQValueList<Q_UINT32> serNums, const KMSearchPattern* pattern, bool complete ) { @@ -282,7 +282,7 @@ void KMSearch::slotSearchFolderResult( KMFolder* folder, return; kdDebug(5006) << k_funcinfo << folder->label() << " found " << serNums.count() << endl; mLastFolder = folder->label(); - QValueListIterator<Q_UINT32> it; + TQValueListIterator<Q_UINT32> it; for ( it = serNums.begin(); it != serNums.end(); ++it ) { emit found( *it ); @@ -291,10 +291,10 @@ void KMSearch::slotSearchFolderResult( KMFolder* folder, if ( complete ) { disconnect( folder->storage(), - SIGNAL( searchResult( KMFolder*, QValueList<Q_UINT32>, + TQT_SIGNAL( searchResult( KMFolder*, TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ), this, - SLOT( slotSearchFolderResult( KMFolder*, QValueList<Q_UINT32>, + TQT_SLOT( slotSearchFolderResult( KMFolder*, TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) ); --mRemainingFolders; mSearchCount += folder->count(); @@ -304,7 +304,7 @@ void KMSearch::slotSearchFolderResult( KMFolder* folder, { mRemainingFolders = 0; mRunning = false; - mLastFolder = QString::null; + mLastFolder = TQString::null; mRemainingFolders = -1; mFolders.clear(); emit finished( true ); @@ -325,54 +325,54 @@ KMFolderSearch::KMFolderSearch(KMFolder* folder, const char* name) //Hook up some slots for live updating of search folders //TODO: Optimize folderInvalidated, folderAdded, folderRemoved - connect(kmkernel->folderMgr(), SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(examineAddedMessage(KMFolder*, Q_UINT32))); - connect(kmkernel->folderMgr(), SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), - this, SLOT(examineRemovedMessage(KMFolder*, Q_UINT32))); - connect(kmkernel->folderMgr(), SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)), - this, SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int))); - connect(kmkernel->folderMgr(), SIGNAL(folderInvalidated(KMFolder*)), - this, SLOT(examineInvalidatedFolder(KMFolder*))); - connect(kmkernel->folderMgr(), SIGNAL(folderAdded(KMFolder*)), - this, SLOT(examineInvalidatedFolder(KMFolder*))); - connect(kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(examineRemovedFolder(KMFolder*))); - connect(kmkernel->folderMgr(), SIGNAL(msgHeaderChanged(KMFolder*,int)), - this, SLOT(propagateHeaderChanged(KMFolder*,int))); - - connect(kmkernel->imapFolderMgr(), SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(examineAddedMessage(KMFolder*, Q_UINT32))); - connect(kmkernel->imapFolderMgr(), SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), - this, SLOT(examineRemovedMessage(KMFolder*, Q_UINT32))); - connect(kmkernel->imapFolderMgr(), SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)), - this, SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int))); - connect(kmkernel->imapFolderMgr(), SIGNAL(folderInvalidated(KMFolder*)), - this, SLOT(examineInvalidatedFolder(KMFolder*))); - connect(kmkernel->imapFolderMgr(), SIGNAL(folderAdded(KMFolder*)), - this, SLOT(examineInvalidatedFolder(KMFolder*))); - connect(kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(examineRemovedFolder(KMFolder*))); - connect(kmkernel->imapFolderMgr(), SIGNAL(msgHeaderChanged(KMFolder*,int)), - this, SLOT(propagateHeaderChanged(KMFolder*,int))); - - connect(kmkernel->dimapFolderMgr(), SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(examineAddedMessage(KMFolder*, Q_UINT32))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), - this, SLOT(examineRemovedMessage(KMFolder*, Q_UINT32))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)), - this, SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(folderInvalidated(KMFolder*)), - this, SLOT(examineInvalidatedFolder(KMFolder*))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(folderAdded(KMFolder*)), - this, SLOT(examineInvalidatedFolder(KMFolder*))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(examineRemovedFolder(KMFolder*))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(msgHeaderChanged(KMFolder*,int)), - this, SLOT(propagateHeaderChanged(KMFolder*,int))); - - mExecuteSearchTimer = new QTimer(0, "mExecuteSearchTimer"); - connect(mExecuteSearchTimer, SIGNAL(timeout()), - this, SLOT(executeSearch())); + connect(kmkernel->folderMgr(), TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(examineAddedMessage(KMFolder*, Q_UINT32))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), + this, TQT_SLOT(examineRemovedMessage(KMFolder*, Q_UINT32))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)), + this, TQT_SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)), + this, TQT_SLOT(examineInvalidatedFolder(KMFolder*))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderAdded(KMFolder*)), + this, TQT_SLOT(examineInvalidatedFolder(KMFolder*))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(examineRemovedFolder(KMFolder*))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)), + this, TQT_SLOT(propagateHeaderChanged(KMFolder*,int))); + + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(examineAddedMessage(KMFolder*, Q_UINT32))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), + this, TQT_SLOT(examineRemovedMessage(KMFolder*, Q_UINT32))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)), + this, TQT_SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)), + this, TQT_SLOT(examineInvalidatedFolder(KMFolder*))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderAdded(KMFolder*)), + this, TQT_SLOT(examineInvalidatedFolder(KMFolder*))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(examineRemovedFolder(KMFolder*))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)), + this, TQT_SLOT(propagateHeaderChanged(KMFolder*,int))); + + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(examineAddedMessage(KMFolder*, Q_UINT32))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), + this, TQT_SLOT(examineRemovedMessage(KMFolder*, Q_UINT32))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)), + this, TQT_SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)), + this, TQT_SLOT(examineInvalidatedFolder(KMFolder*))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderAdded(KMFolder*)), + this, TQT_SLOT(examineInvalidatedFolder(KMFolder*))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(examineRemovedFolder(KMFolder*))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)), + this, TQT_SLOT(propagateHeaderChanged(KMFolder*,int))); + + mExecuteSearchTimer = new TQTimer(0, "mExecuteSearchTimer"); + connect(mExecuteSearchTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(executeSearch())); } KMFolderSearch::~KMFolderSearch() @@ -391,7 +391,7 @@ void KMFolderSearch::setSearch(KMSearch *search) mInvalid = false; setDirty( true ); //have to write the index if (!mUnlinked) { - unlink(QFile::encodeName(indexLocation())); + unlink(TQFile::encodeName(indexLocation())); mUnlinked = true; } if (mSearch != search) { @@ -399,10 +399,10 @@ void KMFolderSearch::setSearch(KMSearch *search) delete mSearch; mSearch = search; // take ownership if (mSearch) { - QObject::connect(search, SIGNAL(found(Q_UINT32)), - SLOT(addSerNum(Q_UINT32))); - QObject::connect(search, SIGNAL(finished(bool)), - SLOT(searchFinished(bool))); + TQObject::connect(search, TQT_SIGNAL(found(Q_UINT32)), + TQT_SLOT(addSerNum(Q_UINT32))); + TQObject::connect(search, TQT_SIGNAL(finished(bool)), + TQT_SLOT(searchFinished(bool))); } } if (mSearch) @@ -458,7 +458,7 @@ void KMFolderSearch::addSerNum(Q_UINT32 serNum) } setDirty( true ); //TODO append a single entry to .ids file and sync. if (!mUnlinked) { - unlink(QFile::encodeName(indexLocation())); + unlink(TQFile::encodeName(indexLocation())); mUnlinked = true; } mSerNums.append(serNum); @@ -474,7 +474,7 @@ void KMFolderSearch::addSerNum(Q_UINT32 serNum) void KMFolderSearch::removeSerNum(Q_UINT32 serNum) { - QValueVector<Q_UINT32>::const_iterator it; + TQValueVector<Q_UINT32>::const_iterator it; int i = 0; for(it = mSerNums.begin(); it != mSerNums.end(); ++it, ++i) if ((*it) == serNum) { @@ -487,7 +487,7 @@ void KMFolderSearch::removeSerNum(Q_UINT32 serNum) return; } if (!mUnlinked) { - unlink(QFile::encodeName(indexLocation())); + unlink(TQFile::encodeName(indexLocation())); mUnlinked = true; } } @@ -502,8 +502,8 @@ int KMFolderSearch::addMsg(KMMessage*, int* index_return) bool KMFolderSearch::readSearch() { mSearch = new KMSearch; - QObject::connect(mSearch, SIGNAL(found(Q_UINT32)), SLOT(addSerNum(Q_UINT32))); - QObject::connect(mSearch, SIGNAL(finished(bool)), SLOT(searchFinished(bool))); + TQObject::connect(mSearch, TQT_SIGNAL(found(Q_UINT32)), TQT_SLOT(addSerNum(Q_UINT32))); + TQObject::connect(mSearch, TQT_SIGNAL(finished(bool)), TQT_SLOT(searchFinished(bool))); return mSearch->read(location()); } @@ -531,7 +531,7 @@ int KMFolderSearch::canAccess() { assert(!folder()->name().isEmpty()); - if (access(QFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) + if (access(TQFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) return 1; return 0; } @@ -557,7 +557,7 @@ void KMFolderSearch::reallyDoClose(const char* owner) } //close all referenced folders - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for (fit = mFolders.begin(); fit != mFolders.end(); ++fit) { if (!(*fit)) continue; @@ -578,7 +578,7 @@ void KMFolderSearch::reallyDoClose(const char* owner) int KMFolderSearch::create() { int old_umask; - int rc = unlink(QFile::encodeName(location())); + int rc = unlink(TQFile::encodeName(location())); if (!rc) return rc; rc = 0; @@ -587,14 +587,14 @@ int KMFolderSearch::create() assert(mOpenCount == 0); kdDebug(5006) << "Creating folder " << location() << endl; - if (access(QFile::encodeName(location()), F_OK) == 0) { + if (access(TQFile::encodeName(location()), F_OK) == 0) { kdDebug(5006) << "KMFolderSearch::create call to access function failed." << endl; return EEXIST; } old_umask = umask(077); - FILE *mStream = fopen(QFile::encodeName(location()), "w+"); + FILE *mStream = fopen(TQFile::encodeName(location()), "w+"); umask(old_umask); if (!mStream) return errno; fclose(mStream); @@ -602,8 +602,8 @@ int KMFolderSearch::create() clearIndex(); if (!mSearch) { mSearch = new KMSearch(); - QObject::connect(mSearch, SIGNAL(found(Q_UINT32)), SLOT(addSerNum(Q_UINT32))); - QObject::connect(mSearch, SIGNAL(finished(bool)), SLOT(searchFinished(bool))); + TQObject::connect(mSearch, TQT_SIGNAL(found(Q_UINT32)), TQT_SLOT(addSerNum(Q_UINT32))); + TQObject::connect(mSearch, TQT_SIGNAL(finished(bool)), TQT_SLOT(searchFinished(bool))); } mSearch->write(location()); mOpenCount++; @@ -625,14 +625,14 @@ bool KMFolderSearch::isReadOnly() const } FolderJob* KMFolderSearch::doCreateJob(KMMessage*, FolderJob::JobType, - KMFolder*, QString, const AttachmentStrategy* ) const + KMFolder*, TQString, const AttachmentStrategy* ) const { // Should never be called assert(0); return 0; } -FolderJob* KMFolderSearch::doCreateJob(QPtrList<KMMessage>&, const QString&, +FolderJob* KMFolderSearch::doCreateJob(TQPtrList<KMMessage>&, const TQString&, FolderJob::JobType, KMFolder*) const { // Should never be called @@ -701,7 +701,7 @@ int KMFolderSearch::find(const KMMsgBase* msg) const { int pos = 0; Q_UINT32 serNum = msg->getMsgSerNum(); - QValueVector<Q_UINT32>::const_iterator it; + TQValueVector<Q_UINT32>::const_iterator it; for(it = mSerNums.begin(); it != mSerNums.end(); ++it) { if ((*it) == serNum) return pos; @@ -710,9 +710,9 @@ int KMFolderSearch::find(const KMMsgBase* msg) const return -1; } -QString KMFolderSearch::indexLocation() const +TQString KMFolderSearch::indexLocation() const { - QString sLocation(folder()->path()); + TQString sLocation(folder()->path()); if (!sLocation.isEmpty()) sLocation += '/'; sLocation += '.'; @@ -726,7 +726,7 @@ QString KMFolderSearch::indexLocation() const int KMFolderSearch::updateIndex() { if (mSearch && search()->running()) - unlink(QFile::encodeName(indexLocation())); + unlink(TQFile::encodeName(indexLocation())); else if (dirty()) return writeIndex(); @@ -737,22 +737,22 @@ int KMFolderSearch::writeIndex( bool ) { // TODO:If we fail to write the index we should panic the kernel // TODO:and the same for other folder types too, and the msgDict. - QString filename = indexLocation(); + TQString filename = indexLocation(); int old_umask = umask(077); - QString tempName = filename + ".temp"; - unlink(QFile::encodeName(tempName)); + TQString tempName = filename + ".temp"; + unlink(TQFile::encodeName(tempName)); // We touch the folder, otherwise the index is regenerated, if KMail is // running, while the clock switches from daylight savings time to normal time - utime(QFile::encodeName(location()), 0); + utime(TQFile::encodeName(location()), 0); - FILE *tmpIndexStream = fopen(QFile::encodeName(tempName), "w"); + FILE *tmpIndexStream = fopen(TQFile::encodeName(tempName), "w"); umask(old_umask); if (!tmpIndexStream) { kdDebug(5006) << "Cannot write '" << filename << strerror(errno) << " (" << errno << ")" << endl; - truncate(QFile::encodeName(filename), 0); + truncate(TQFile::encodeName(filename), 0); return -1; } fprintf(tmpIndexStream, IDS_SEARCH_HEADER, IDS_SEARCH_VERSION); @@ -762,11 +762,11 @@ int KMFolderSearch::writeIndex( bool ) Q_UINT32 count = mSerNums.count(); if (!fwrite(&count, sizeof(count), 1, tmpIndexStream)) { fclose(tmpIndexStream); - truncate(QFile::encodeName(filename), 0); + truncate(TQFile::encodeName(filename), 0); return -1; } - QValueVector<Q_UINT32>::iterator it; + TQValueVector<Q_UINT32>::iterator it; for(it = mSerNums.begin(); it != mSerNums.end(); ++it) { Q_UINT32 serNum = *it; if (!fwrite(&serNum, sizeof(serNum), 1, tmpIndexStream)) @@ -777,7 +777,7 @@ int KMFolderSearch::writeIndex( bool ) if (fsync(fileno(tmpIndexStream)) != 0) return errno; if (fclose(tmpIndexStream) != 0) return errno; - ::rename(QFile::encodeName(tempName), QFile::encodeName(indexLocation())); + ::rename(TQFile::encodeName(tempName), TQFile::encodeName(indexLocation())); mDirty = FALSE; mUnlinked = FALSE; @@ -801,8 +801,8 @@ KMMessage* KMFolderSearch::readMsg(int idx) bool KMFolderSearch::readIndex() { clearIndex(); - QString filename = indexLocation(); - mIdsStream = fopen(QFile::encodeName(filename), "r+"); + TQString filename = indexLocation(); + mIdsStream = fopen(TQFile::encodeName(filename), "r+"); if (!mIdsStream) return false; @@ -878,8 +878,8 @@ bool KMFolderSearch::readIndex() int KMFolderSearch::removeContents() { - unlink(QFile::encodeName(location())); - unlink(QFile::encodeName(indexLocation())); + unlink(TQFile::encodeName(location())); + unlink(TQFile::encodeName(indexLocation())); mUnlinked = true; return 0; } @@ -900,7 +900,7 @@ KMMsgBase* KMFolderSearch::takeIndexEntry(int idx) { assert(idx >= 0 && idx < (int)mSerNums.count()); KMMsgBase *msgBase = getMsgBase(idx); - QValueVector<Q_UINT32>::iterator it = mSerNums.begin(); + TQValueVector<Q_UINT32>::iterator it = mSerNums.begin(); mSerNums.erase(&it[idx]); return msgBase; } @@ -915,7 +915,7 @@ KMMsgInfo* KMFolderSearch::setIndexEntry(int idx, KMMessage *msg) void KMFolderSearch::clearIndex(bool, bool) { //close all referenced folders - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for (fit = mFolders.begin(); fit != mFolders.end(); ++fit) { if (!(*fit)) continue; @@ -928,7 +928,7 @@ void KMFolderSearch::clearIndex(bool, bool) void KMFolderSearch::truncateIndex() { - truncate(QFile::encodeName(indexLocation()), IDS_SEARCH_HEADER_LEN); + truncate(TQFile::encodeName(indexLocation()), IDS_SEARCH_HEADER_LEN); } void KMFolderSearch::examineAddedMessage(KMFolder *aFolder, Q_UINT32 serNum) @@ -958,9 +958,9 @@ void KMFolderSearch::examineAddedMessage(KMFolder *aFolder, Q_UINT32 serNum) mFoldersCurrentlyBeingSearched.replace( folder, count+1 ); } else { connect( folder->storage(), - SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ), + TQT_SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ), this, - SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32, + TQT_SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ) ); mFoldersCurrentlyBeingSearched.insert( folder, 1 ); } @@ -982,10 +982,10 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, unsigned int count = mFoldersCurrentlyBeingSearched[folder]; if ( count == 1 ) { disconnect( folder->storage(), - SIGNAL( searchDone( KMFolder*, Q_UINT32, + TQT_SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ), this, - SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32, + TQT_SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ) ); mFoldersCurrentlyBeingSearched.remove( folder ); } else { @@ -993,7 +993,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, } if ( !matches ) { - QValueVector<Q_UINT32>::const_iterator it; + TQValueVector<Q_UINT32>::const_iterator it; it = qFind( mSerNums.begin(), mSerNums.end(), serNum ); if (it != mSerNums.end()) { removeSerNum( serNum ); @@ -1005,7 +1005,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, // mSearch->stop(); // mExecuteSearchTimer->start( 0, true ); // } else { - QValueVector<Q_UINT32>::const_iterator it; + TQValueVector<Q_UINT32>::const_iterator it; it = qFind( mSerNums.begin(), mSerNums.end(), serNum ); if (it == mSerNums.end()) { addSerNum( serNum ); @@ -1041,7 +1041,7 @@ void KMFolderSearch::examineChangedMessage(KMFolder *aFolder, Q_UINT32 serNum, i open("foldersearch"); mTempOpened = true; } - QValueVector<Q_UINT32>::const_iterator it; + TQValueVector<Q_UINT32>::const_iterator it; it = qFind( mSerNums.begin(), mSerNums.end(), serNum ); if (it != mSerNums.end()) { mUnreadMsgs += delta; @@ -1066,7 +1066,7 @@ void KMFolderSearch::examineInvalidatedFolder(KMFolder *folder) mSearch->stop(); if (!mUnlinked) { - unlink(QFile::encodeName(indexLocation())); + unlink(TQFile::encodeName(indexLocation())); mUnlinked = true; } @@ -1102,7 +1102,7 @@ void KMFolderSearch::propagateHeaderChanged(KMFolder *aFolder, int idx) } Q_UINT32 serNum = KMMsgDict::instance()->getMsgSerNum(aFolder, idx); - QValueVector<Q_UINT32>::const_iterator it; + TQValueVector<Q_UINT32>::const_iterator it; for(it = mSerNums.begin(); it != mSerNums.end(); ++it) { if ((*it) == serNum) { emit msgHeaderChanged(folder(), pos); @@ -1119,9 +1119,9 @@ void KMFolderSearch::propagateHeaderChanged(KMFolder *aFolder, int idx) mFoldersCurrentlyBeingSearched.replace( aFolder, count+1 ); } else { connect( aFolder->storage(), - SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ), + TQT_SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ), this, - SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32, + TQT_SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ) ); mFoldersCurrentlyBeingSearched.insert( aFolder, 1 ); } diff --git a/kmail/kmfoldersearch.h b/kmail/kmfoldersearch.h index 9acb80724..ef3c87d0f 100644 --- a/kmail/kmfoldersearch.h +++ b/kmail/kmfoldersearch.h @@ -20,11 +20,11 @@ #ifndef kmfoldersearch_h #define kmfoldersearch_h -#include <qguardedptr.h> -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qvaluestack.h> -#include <qmap.h> +#include <tqguardedptr.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqvaluestack.h> +#include <tqmap.h> #include "kmfolder.h" #include "folderstorage.h" @@ -37,7 +37,7 @@ numbers of all messages that currently match the search. **/ -typedef QValueList<Q_UINT32> SerNumList; +typedef TQValueList<Q_UINT32> SerNumList; class KMSearchPattern; class KMFolderImap; class KMFolderSearchJob; @@ -54,11 +54,11 @@ class KMSearch: public QObject Q_OBJECT public: - KMSearch(QObject * parent = 0, const char * name = 0); + KMSearch(TQObject * parent = 0, const char * name = 0); ~KMSearch(); - bool write(QString location) const; - bool read(QString location); + bool write(TQString location) const; + bool read(TQString location); bool recursive() const { return mRecursive; } void setRecursive(bool recursive) { if (running()) stop(); mRecursive = recursive; } KMFolder* root() const { return mRoot; } @@ -72,7 +72,7 @@ public: void stop(); int foundCount() const { return mFoundCount; } int searchCount() const { return mSearchCount; } - QString currentFolder() const { return mLastFolder; } + TQString currentFolder() const { return mLastFolder; } public slots: void indexFinished(); @@ -83,27 +83,27 @@ signals: protected slots: void slotProcessNextBatch(); - void slotSearchFolderResult( KMFolder*, QValueList<Q_UINT32>, + void slotSearchFolderResult( KMFolder*, TQValueList<Q_UINT32>, const KMSearchPattern*, bool ); protected: friend class ::KMIndexSearchTarget; void setRunning(bool b) { mRunning = b; } void setFoundCount(int f) { mFoundCount = f; } - void setCurrentFolder(const QString &f) { mLastFolder = f; } + void setCurrentFolder(const TQString &f) { mLastFolder = f; } private: int mRemainingFolders; bool mRecursive, mRunning, mIdle, mRunByIndex; - QGuardedPtr<KMFolder> mRoot; + TQGuardedPtr<KMFolder> mRoot; KMSearchPattern* mSearchPattern; - QValueList<QGuardedPtr<KMFolder> > mFolders, mOpenedFolders; - QValueList<QGuardedPtr<KMFolderImap> > mIncompleteFolders; + TQValueList<TQGuardedPtr<KMFolder> > mFolders, mOpenedFolders; + TQValueList<TQGuardedPtr<KMFolderImap> > mIncompleteFolders; SerNumList mSerNums; - QString mLastFolder; + TQString mLastFolder; int mFoundCount; int mSearchCount; - QTimer *mProcessNextBatchTimer; + TQTimer *mProcessNextBatchTimer; }; class KMFolderSearch: public FolderStorage @@ -180,16 +180,16 @@ public: virtual const KMMsgBase* getMsgBase(int idx) const; virtual KMMsgBase* getMsgBase(int idx); virtual int find(const KMMsgBase* msg) const; - virtual QString indexLocation() const; + virtual TQString indexLocation() const; virtual int writeIndex( bool createEmptyIndex = false ); DwString getDwString(int idx); Q_UINT32 serNum(int idx) { return mSerNums[idx]; } protected: virtual FolderJob* doCreateJob(KMMessage *msg, FolderJob::JobType jt, - KMFolder *folder, QString partSpecifier, + KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as ) const; - virtual FolderJob* doCreateJob(QPtrList<KMMessage>& msgList, const QString& sets, + virtual FolderJob* doCreateJob(TQPtrList<KMMessage>& msgList, const TQString& sets, FolderJob::JobType jt, KMFolder *folder) const; virtual KMMessage* readMsg(int idx); virtual bool readIndex(); @@ -202,15 +202,15 @@ protected: virtual void truncateIndex(); private: - QValueVector<Q_UINT32> mSerNums; - QValueList<QGuardedPtr<KMFolder> > mFolders; - QValueStack<Q_UINT32> mUnexaminedMessages; + TQValueVector<Q_UINT32> mSerNums; + TQValueList<TQGuardedPtr<KMFolder> > mFolders; + TQValueStack<Q_UINT32> mUnexaminedMessages; FILE *mIdsStream; KMSearch *mSearch; bool mInvalid, mUnlinked; bool mTempOpened; - QTimer *mExecuteSearchTimer; - QMap<const KMFolder*, unsigned int>mFoldersCurrentlyBeingSearched; + TQTimer *mExecuteSearchTimer; + TQMap<const KMFolder*, unsigned int>mFoldersCurrentlyBeingSearched; }; #endif /*kmfoldersearch_h*/ diff --git a/kmail/kmfolderseldlg.cpp b/kmail/kmfolderseldlg.cpp index 21fc53231..607b42435 100644 --- a/kmail/kmfolderseldlg.cpp +++ b/kmail/kmfolderseldlg.cpp @@ -12,8 +12,8 @@ #include <kpopupmenu.h> #include <kiconloader.h> -#include <qlayout.h> -#include <qtoolbutton.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> namespace KMail { @@ -41,29 +41,29 @@ class FolderItem : public KFolderTreeItem // Must overload paintCell because neither KListViewItem::isAlternate() // or KListViewItem::backgroundColor() are virtual! - virtual void paintCell( QPainter *p, const QColorGroup &cg, + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { KListView* view = static_cast< KListView* >( listView() ); // Set alternate background to invalid - QColor nocolor; - QColor alt = view->alternateBackground(); + TQColor nocolor; + TQColor alt = view->alternateBackground(); view->setAlternateBackground( nocolor ); // Set the base and text to the appropriate colors - QColorGroup *cgroup = (QColorGroup *)&view->viewport()->colorGroup(); - QColor base = cgroup->base(); - QColor text = cgroup->text(); - cgroup->setColor( QColorGroup::Base, isAlternate() ? alt : base ); - cgroup->setColor( QColorGroup::Text, isEnabled() ? text : Qt::lightGray ); + TQColorGroup *cgroup = (TQColorGroup *)&view->viewport()->colorGroup(); + TQColor base = cgroup->base(); + TQColor text = cgroup->text(); + cgroup->setColor( TQColorGroup::Base, isAlternate() ? alt : base ); + cgroup->setColor( TQColorGroup::Text, isEnabled() ? text : Qt::lightGray ); // Call the parent paint routine KListViewItem::paintCell( p, cg, column, width, alignment ); // Restore the base and alternate background - cgroup->setColor( QColorGroup::Base, base ); - cgroup->setColor( QColorGroup::Text, text ); + cgroup->setColor( TQColorGroup::Base, base ); + cgroup->setColor( TQColorGroup::Text, text ); view->setAlternateBackground( alt ); } @@ -85,9 +85,9 @@ FolderItem::FolderItem( KFolderTreeItem * listViewItem ) {} //----------------------------------------------------------------------------- -SimpleFolderTree::SimpleFolderTree( QWidget * parent, +SimpleFolderTree::SimpleFolderTree( TQWidget * parent, KMFolderTree * folderTree, - const QString & preSelection, + const TQString & preSelection, bool mustBeReadWrite ) : KFolderTree( parent ), mFolderTree( folderTree ) { @@ -95,23 +95,23 @@ SimpleFolderTree::SimpleFolderTree( QWidget * parent, mFolderColumn = addColumn( i18n( "Folder" ), 0 ); mPathColumn = addColumn( i18n( "Path" ), 0 ); setAllColumnsShowFocus( true ); - setAlternateBackground( QColor( 0xf0, 0xf0, 0xf0 ) ); + setAlternateBackground( TQColor( 0xf0, 0xf0, 0xf0 ) ); reload( mustBeReadWrite, true, true, preSelection ); readColorConfig(); applyFilter( "" ); - connect(this, SIGNAL(collapsed(QListViewItem*)), SLOT(recolorRows())); - connect(this, SIGNAL(expanded(QListViewItem*)), SLOT(recolorRows())); + connect(this, TQT_SIGNAL(collapsed(TQListViewItem*)), TQT_SLOT(recolorRows())); + connect(this, TQT_SIGNAL(expanded(TQListViewItem*)), TQT_SLOT(recolorRows())); - connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int ) ), - this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint & ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int ) ), + this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint & ) ) ); } //----------------------------------------------------------------------------- void SimpleFolderTree::reload( bool mustBeReadWrite, bool showOutbox, - bool showImapFolders, const QString& preSelection ) + bool showImapFolders, const TQString& preSelection ) { mLastMustBeReadWrite = mustBeReadWrite; mLastShowOutbox = showOutbox; @@ -123,14 +123,14 @@ void SimpleFolderTree::reload( bool mustBeReadWrite, bool showOutbox, FolderItem * selectedItem = 0; int lastDepth = 0; - QString selected = preSelection; + TQString selected = preSelection; if ( selected.isEmpty() && folder() ) selected = folder()->idString(); mFilter = ""; - QString path; + TQString path; - for ( QListViewItemIterator it( mFolderTree ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( mFolderTree ) ; it.current() ; ++it ) { KMFolderTreeItem * fti = static_cast<KMFolderTreeItem *>( it.current() ); @@ -224,7 +224,7 @@ void SimpleFolderTree::reload( bool mustBeReadWrite, bool showOutbox, //----------------------------------------------------------------------------- const KMFolder * SimpleFolderTree::folder() const { - QListViewItem * item = currentItem(); + TQListViewItem * item = currentItem(); if ( item ) { const KMFolder * folder = static_cast<FolderItem *>( item )->folder(); if( folder ) return folder; @@ -235,7 +235,7 @@ const KMFolder * SimpleFolderTree::folder() const //----------------------------------------------------------------------------- void SimpleFolderTree::setFolder( KMFolder *folder ) { - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { const KMFolder *fld = static_cast<FolderItem *>( it.current() )->folder(); if ( fld == folder ) @@ -247,7 +247,7 @@ void SimpleFolderTree::setFolder( KMFolder *folder ) } //----------------------------------------------------------------------------- -void SimpleFolderTree::setFolder( const QString& idString ) +void SimpleFolderTree::setFolder( const TQString& idString ) { setFolder( kmkernel->findFolderById( idString ) ); } @@ -264,8 +264,8 @@ void SimpleFolderTree::addChildFolder() } //----------------------------------------------------------------------------- -void SimpleFolderTree::slotContextMenuRequested( QListViewItem *lvi, - const QPoint &p ) +void SimpleFolderTree::slotContextMenuRequested( TQListViewItem *lvi, + const TQPoint &p ) { if (!lvi) return; @@ -281,7 +281,7 @@ void SimpleFolderTree::slotContextMenuRequested( QListViewItem *lvi, folderMenu->insertSeparator(); folderMenu->insertItem(SmallIconSet("folder_new"), i18n("&New Subfolder..."), this, - SLOT(addChildFolder())); + TQT_SLOT(addChildFolder())); kmkernel->setContextMenuShown( true ); folderMenu->exec (p, 0); kmkernel->setContextMenuShown( false ); @@ -292,26 +292,26 @@ void SimpleFolderTree::slotContextMenuRequested( QListViewItem *lvi, //----------------------------------------------------------------------------- void SimpleFolderTree::readColorConfig (void) { - QColor c1=QColor(kapp->palette().active().text()); - QColor c2=QColor(kapp->palette().active().base()); + TQColor c1=TQColor(kapp->palette().active().text()); + TQColor c2=TQColor(kapp->palette().active().base()); mPaintInfo.colFore = c1; mPaintInfo.colBack = c2; - 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 ); } //----------------------------------------------------------------------------- -static int recurseFilter( QListViewItem * item, const QString& filter, int column ) +static int recurseFilter( TQListViewItem * item, const TQString& filter, int column ) { if ( item == 0 ) return 0; - QListViewItem * child; + TQListViewItem * child; child = item->firstChild(); int enabled = 0; @@ -337,13 +337,13 @@ void SimpleFolderTree::recolorRows() { // Iterate through the list to set the alternate row flags. int alt = 0; - QListViewItemIterator it ( this ); + TQListViewItemIterator it ( this ); while ( it.current() ) { FolderItem * item = static_cast< FolderItem* >( it.current() ); if ( item->isVisible() ) { bool visible = true; - QListViewItem * parent = item->parent(); + TQListViewItem * parent = item->parent(); while ( parent ) { if (!parent->isOpen()) { visible = false; @@ -362,12 +362,12 @@ void SimpleFolderTree::recolorRows() } } -void SimpleFolderTree::applyFilter( const QString& filter ) +void SimpleFolderTree::applyFilter( const TQString& filter ) { // Reset all items to visible, enabled, and open - QListViewItemIterator clean( this ); + TQListViewItemIterator clean( this ); while ( clean.current() ) { - QListViewItem * item = clean.current(); + TQListViewItem * item = clean.current(); item->setEnabled( true ); item->setVisible( true ); item->setOpen( true ); @@ -384,9 +384,9 @@ void SimpleFolderTree::applyFilter( const QString& filter ) // Set the visibility and enabled status of each list item. // The recursive algorithm is necessary because visiblity // changes are automatically applied to child nodes by Qt. - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); while ( it.current() ) { - QListViewItem * item = it.current(); + TQListViewItem * item = it.current(); if ( item->depth() <= 0 ) recurseFilter( item, filter, mPathColumn ); ++it; @@ -396,7 +396,7 @@ void SimpleFolderTree::applyFilter( const QString& filter ) recolorRows(); // Iterate through the list to find the first selectable item - QListViewItemIterator first ( this ); + TQListViewItemIterator first ( this ); while ( first.current() ) { FolderItem * item = static_cast< FolderItem* >( first.current() ); @@ -419,7 +419,7 @@ void SimpleFolderTree::applyFilter( const QString& filter ) } //----------------------------------------------------------------------------- -void SimpleFolderTree::keyPressEvent( QKeyEvent *e ) { +void SimpleFolderTree::keyPressEvent( TQKeyEvent *e ) { int ch = e->ascii(); if ( ch >= 32 && ch <= 126 ) @@ -438,7 +438,7 @@ void SimpleFolderTree::keyPressEvent( QKeyEvent *e ) { //----------------------------------------------------------------------------- -KMFolderSelDlg::KMFolderSelDlg( KMMainWidget * parent, const QString& caption, +KMFolderSelDlg::KMFolderSelDlg( KMMainWidget * parent, const TQString& caption, bool mustBeReadWrite, bool useGlobalSettings ) : KDialogBase( parent, "folder dialog", true, caption, Ok|Cancel|User1, Ok, true, @@ -450,16 +450,16 @@ KMFolderSelDlg::KMFolderSelDlg( KMMainWidget * parent, const QString& caption, KMFolderTree * ft = parent->folderTree(); assert( ft ); - QString preSelection = mUseGlobalSettings ? - GlobalSettings::self()->lastSelectedFolder() : QString::null; + TQString preSelection = mUseGlobalSettings ? + GlobalSettings::self()->lastSelectedFolder() : TQString::null; mTreeView = new KMail::SimpleFolderTree( makeVBoxMainWidget(), ft, preSelection, mustBeReadWrite ); init(); } //---------------------------------------------------------------------------- -KMFolderSelDlg::KMFolderSelDlg( QWidget * parent, KMFolderTree * tree, - const QString& caption, bool mustBeReadWrite, bool useGlobalSettings ) +KMFolderSelDlg::KMFolderSelDlg( TQWidget * parent, KMFolderTree * tree, + const TQString& caption, bool mustBeReadWrite, bool useGlobalSettings ) : KDialogBase( parent, "folder dialog", true, caption, Ok|Cancel|User1, Ok, true, KGuiItem(i18n("&New Subfolder..."), "folder_new", @@ -467,8 +467,8 @@ KMFolderSelDlg::KMFolderSelDlg( QWidget * parent, KMFolderTree * tree, ), // mainwin as parent, modal mUseGlobalSettings( useGlobalSettings ) { - QString preSelection = mUseGlobalSettings ? - GlobalSettings::self()->lastSelectedFolder() : QString::null; + TQString preSelection = mUseGlobalSettings ? + GlobalSettings::self()->lastSelectedFolder() : TQString::null; mTreeView = new KMail::SimpleFolderTree( makeVBoxMainWidget(), tree, preSelection, mustBeReadWrite ); init(); @@ -478,10 +478,10 @@ KMFolderSelDlg::KMFolderSelDlg( QWidget * parent, KMFolderTree * tree, void KMFolderSelDlg::init() { mTreeView->setFocus(); - connect( mTreeView, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ), - this, SLOT( slotSelect() ) ); - connect( mTreeView, SIGNAL( selectionChanged() ), - this, SLOT( slotUpdateBtnStatus() ) ); + connect( mTreeView, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ), + this, TQT_SLOT( slotSelect() ) ); + connect( mTreeView, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( slotUpdateBtnStatus() ) ); readConfig(); } @@ -541,11 +541,11 @@ void KMFolderSelDlg::readConfig() KConfig *config = KGlobal::config(); config->setGroup( "FolderSelectionDialog" ); - QSize size = config->readSizeEntry( "Size" ); + TQSize size = config->readSizeEntry( "Size" ); if ( !size.isEmpty() ) resize( size ); else resize( 500, 300 ); - QValueList<int> widths = config->readIntListEntry( "ColumnWidths" ); + TQValueList<int> widths = config->readIntListEntry( "ColumnWidths" ); if ( !widths.isEmpty() ) { mTreeView->setColumnWidth(mTreeView->mFolderColumn, widths[0]); mTreeView->setColumnWidth(mTreeView->mPathColumn, widths[1]); @@ -563,7 +563,7 @@ void KMFolderSelDlg::writeConfig() config->setGroup( "FolderSelectionDialog" ); config->writeEntry( "Size", size() ); - QValueList<int> widths; + TQValueList<int> widths; widths.push_back(mTreeView->columnWidth(mTreeView->mFolderColumn)); widths.push_back(mTreeView->columnWidth(mTreeView->mPathColumn)); config->writeEntry( "ColumnWidths", widths ); diff --git a/kmail/kmfolderseldlg.h b/kmail/kmfolderseldlg.h index 3adef4159..119ceff78 100644 --- a/kmail/kmfolderseldlg.h +++ b/kmail/kmfolderseldlg.h @@ -20,34 +20,34 @@ namespace KMail { Q_OBJECT public: - SimpleFolderTree( QWidget * parent, KMFolderTree * folderTree, - const QString & preSelection, bool mustBeReadWrite ); + SimpleFolderTree( TQWidget * parent, KMFolderTree * folderTree, + const TQString & preSelection, bool mustBeReadWrite ); /** Reload the tree and select what folders to show and what not */ void reload( bool mustBeReadWrite, bool showOutbox, bool showImapFolders, - const QString& preSelection = QString::null ); + const TQString& preSelection = TQString::null ); /** Return the current folder */ const KMFolder * folder() const; /** Set the current folder */ void setFolder( KMFolder* ); - void setFolder( const QString& idString ); + void setFolder( const TQString& idString ); /** Apply the given filter. */ - void applyFilter( const QString& filter ); + void applyFilter( const TQString& filter ); public slots: void addChildFolder(); protected slots: - void slotContextMenuRequested( QListViewItem *, const QPoint & ); + void slotContextMenuRequested( TQListViewItem *, const TQPoint & ); virtual void recolorRows(); protected: /** Read color options and set palette. */ virtual void readColorConfig(void); - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); /** Folder and path column IDs. */ friend class KMFolderSelDlg; @@ -56,7 +56,7 @@ namespace KMail { private: KMFolderTree* mFolderTree; - QString mFilter; + TQString mFilter; bool mLastMustBeReadWrite; bool mLastShowOutbox; bool mLastShowImapFolders; @@ -76,7 +76,7 @@ namespace KMail { * @param useGlobalSettings if true, the current folder is read and * written to GlobalSettings */ - KMFolderSelDlg( KMMainWidget * parent, const QString& caption, + KMFolderSelDlg( KMMainWidget * parent, const TQString& caption, bool mustBeReadWrite, bool useGlobalSettings = true ); /** * Constructor with separate KMFolderTree @@ -84,8 +84,8 @@ namespace KMail { * @param useGlobalSettings if true, the current folder is read and * written to GlobalSettings */ - KMFolderSelDlg( QWidget * parent, KMFolderTree * tree, - const QString& caption, bool mustBeReadWrite, + KMFolderSelDlg( TQWidget * parent, KMFolderTree * tree, + const TQString& caption, bool mustBeReadWrite, bool useGlobalSettings = true ); virtual ~KMFolderSelDlg(); diff --git a/kmail/kmfoldertree.cpp b/kmail/kmfoldertree.cpp index 6e67399c6..e99e7058b 100644 --- a/kmail/kmfoldertree.cpp +++ b/kmail/kmfoldertree.cpp @@ -38,10 +38,10 @@ using namespace KPIM; #include <kpopupmenu.h> #include <kdebug.h> -#include <qpainter.h> -#include <qcursor.h> -#include <qregexp.h> -#include <qpopupmenu.h> +#include <tqpainter.h> +#include <tqcursor.h> +#include <tqregexp.h> +#include <tqpopupmenu.h> #include <unistd.h> #include <assert.h> @@ -51,9 +51,9 @@ using namespace KPIM; //============================================================================= -KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, +KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const TQString & name, KFolderTreeItem::Protocol protocol ) - : QObject( parent, name.latin1() ), + : TQObject( parent, name.latin1() ), KFolderTreeItem( parent, name, protocol, Root ), mFolder( 0 ), mNeedsRepaint( true ) { @@ -62,9 +62,9 @@ KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, } //----------------------------------------------------------------------------- -KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, +KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const TQString & name, KMFolder* folder ) - : QObject( parent, name.latin1() ), + : TQObject( parent, name.latin1() ), KFolderTreeItem( parent, name ), mFolder( folder ), mNeedsRepaint( true ) { @@ -73,9 +73,9 @@ KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, } //----------------------------------------------------------------------------- -KMFolderTreeItem::KMFolderTreeItem( KFolderTreeItem *parent, const QString & name, +KMFolderTreeItem::KMFolderTreeItem( KFolderTreeItem *parent, const TQString & name, KMFolder* folder ) - : QObject( 0, name.latin1() ), + : TQObject( 0, name.latin1() ), KFolderTreeItem( parent, name ), mFolder( folder ), mNeedsRepaint( true ) { @@ -103,9 +103,9 @@ static KFolderTreeItem::Protocol protocolFor( KMFolderType t ) { } } -QPixmap KMFolderTreeItem::normalIcon(int size) const +TQPixmap KMFolderTreeItem::normalIcon(int size) const { - QString icon; + TQString icon; if ( (!mFolder && type() == Root) || useTopLevelIcon() ) { switch ( protocol() ) { case KFolderTreeItem::Imap: @@ -144,7 +144,7 @@ QPixmap KMFolderTreeItem::normalIcon(int size) const icon = mFolder->normalIconPath(); } KIconLoader * il = KGlobal::instance()->iconLoader(); - QPixmap pm = il->loadIcon( icon, KIcon::Small, size, + TQPixmap pm = il->loadIcon( icon, KIcon::Small, size, KIcon::DefaultState, 0, true ); if ( mFolder && pm.isNull() ) { pm = il->loadIcon( mFolder->normalIconPath(), KIcon::Small, size, @@ -154,9 +154,9 @@ QPixmap KMFolderTreeItem::normalIcon(int size) const return pm; } -QPixmap KMFolderTreeItem::unreadIcon(int size) const +TQPixmap KMFolderTreeItem::unreadIcon(int size) const { - QPixmap pm; + TQPixmap pm; if ( !mFolder || useTopLevelIcon() || mFolder->isSystemFolder() || kmkernel->folderIsTrash( mFolder ) || @@ -265,7 +265,7 @@ void KMFolderTreeItem::slotNameChanged() //----------------------------------------------------------------------------- -bool KMFolderTreeItem::acceptDrag(QDropEvent* e) const +bool KMFolderTreeItem::acceptDrag(TQDropEvent* e) const { // Do not allow drags from the favorite folder view, as they don't really // make sense and do not work. @@ -353,7 +353,7 @@ void KMFolderTreeItem::updateCount() //============================================================================= -KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, +KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, TQWidget *parent, const char *name ) : KMail::FolderTreeBase( mainWidget, parent, name ) , mUpdateTimer( 0, "mUpdateTimer" ) @@ -366,7 +366,7 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, mReloading = false; mCutFolder = false; - mUpdateCountTimer= new QTimer( this, "mUpdateCountTimer" ); + mUpdateCountTimer= new TQTimer( this, "mUpdateCountTimer" ); setDragEnabled( true ); addAcceptableDropMimetype( "application/x-qlistviewitem", false ); @@ -385,12 +385,12 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, mPopup = new KPopupMenu(this); mPopup->insertTitle(i18n("View Columns")); mPopup->setCheckable(true); - mUnreadPop = mPopup->insertItem(i18n("Unread Column"), this, SLOT(slotToggleUnreadColumn())); - mTotalPop = mPopup->insertItem(i18n("Total Column"), this, SLOT(slotToggleTotalColumn())); - mSizePop = mPopup->insertItem(i18n("Size Column"), this, SLOT(slotToggleSizeColumn())); + mUnreadPop = mPopup->insertItem(i18n("Unread Column"), this, TQT_SLOT(slotToggleUnreadColumn())); + mTotalPop = mPopup->insertItem(i18n("Total Column"), this, TQT_SLOT(slotToggleTotalColumn())); + mSizePop = mPopup->insertItem(i18n("Size Column"), this, TQT_SLOT(slotToggleSizeColumn())); - connect( this, SIGNAL( triggerRefresh() ), - this, SLOT( refresh() ) ); + connect( this, TQT_SIGNAL( triggerRefresh() ), + this, TQT_SLOT( refresh() ) ); new FolderViewToolTip( this ); } @@ -399,61 +399,61 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, // connects all needed signals to their slots void KMFolderTree::connectSignals() { - connect( mUpdateCountTimer, SIGNAL(timeout()), - this, SLOT(slotUpdateCountTimeout()) ); + connect( mUpdateCountTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotUpdateCountTimeout()) ); - connect(&mUpdateTimer, SIGNAL(timeout()), - this, SLOT(delayedUpdate())); + connect(&mUpdateTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(delayedUpdate())); - connect(kmkernel->folderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->folderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->folderMgr(), SIGNAL(folderMoveOrCopyOperationFinished()), - this, SLOT(slotFolderMoveOrCopyOperationFinished())); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderMoveOrCopyOperationFinished()), + this, TQT_SLOT(slotFolderMoveOrCopyOperationFinished())); - connect(kmkernel->imapFolderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->searchFolderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->acctMgr(), SIGNAL(accountRemoved(KMAccount*)), - this, SLOT(slotAccountRemoved(KMAccount*))); + connect(kmkernel->acctMgr(), TQT_SIGNAL(accountRemoved(KMAccount*)), + this, TQT_SLOT(slotAccountRemoved(KMAccount*))); - connect(kmkernel->acctMgr(), SIGNAL(accountAdded(KMAccount*)), - this, SLOT(slotUnhideLocalInbox())); + connect(kmkernel->acctMgr(), TQT_SIGNAL(accountAdded(KMAccount*)), + this, TQT_SLOT(slotUnhideLocalInbox())); - connect(kmkernel->searchFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect( &autoopen_timer, SIGNAL( timeout() ), - this, SLOT( openFolder() ) ); + connect( &autoopen_timer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( openFolder() ) ); - connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int ) ), - this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint & ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int ) ), + this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint & ) ) ); - connect( this, SIGNAL( expanded( QListViewItem* ) ), - this, SLOT( slotFolderExpanded( QListViewItem* ) ) ); + connect( this, TQT_SIGNAL( expanded( TQListViewItem* ) ), + this, TQT_SLOT( slotFolderExpanded( TQListViewItem* ) ) ); - connect( this, SIGNAL( collapsed( QListViewItem* ) ), - this, SLOT( slotFolderCollapsed( QListViewItem* ) ) ); + connect( this, TQT_SIGNAL( collapsed( TQListViewItem* ) ), + this, TQT_SLOT( slotFolderCollapsed( TQListViewItem* ) ) ); - connect( this, SIGNAL( itemRenamed( QListViewItem*, int, const QString &)), - this, SLOT( slotRenameFolder( QListViewItem*, int, const QString &))); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString &)), + this, TQT_SLOT( slotRenameFolder( TQListViewItem*, int, const TQString &))); - connect( this, SIGNAL(folderSelected(KMFolder*)), SLOT(updateCopyActions()) ); + connect( this, TQT_SIGNAL(folderSelected(KMFolder*)), TQT_SLOT(updateCopyActions()) ); } //----------------------------------------------------------------------------- @@ -467,7 +467,7 @@ void KMFolderTree::readConfig (void) { KConfigGroupSaver saver(conf, "Fonts"); if (!conf->readBoolEntry("defaultFonts",true)) { - QFont folderFont( KGlobalSettings::generalFont() ); + TQFont folderFont( KGlobalSettings::generalFont() ); setFont(conf->readFontEntry("folder-font", &folderFont)); } else @@ -483,7 +483,7 @@ void KMFolderTree::readConfig (void) void KMFolderTree::writeConfig() { // save the current state of the folders - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (fti) writeIsListViewItemOpen(fti); @@ -542,7 +542,7 @@ void KMFolderTree::reload(bool openFolders) KMFolder* selected = 0; KMFolder* oldCurrentFolder = ( oldCurrent ? static_cast<KMFolderTreeItem*>(oldCurrent)->folder(): 0 ); - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current()); writeIsListViewItemOpen( fti ); if ( fti->isSelected() ) @@ -576,52 +576,52 @@ void KMFolderTree::reload(bool openFolders) if (openFolders) { // we open all folders to update the count - mUpdateIterator = QListViewItemIterator (this); - QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) ); + mUpdateIterator = TQListViewItemIterator (this); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) ); } - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current()); if ( !fti || !fti->folder() ) continue; - disconnect(fti->folder(),SIGNAL(iconsChanged()), - fti,SLOT(slotIconsChanged())); - connect(fti->folder(),SIGNAL(iconsChanged()), - fti,SLOT(slotIconsChanged())); + disconnect(fti->folder(),TQT_SIGNAL(iconsChanged()), + fti,TQT_SLOT(slotIconsChanged())); + connect(fti->folder(),TQT_SIGNAL(iconsChanged()), + fti,TQT_SLOT(slotIconsChanged())); - disconnect(fti->folder(),SIGNAL(nameChanged()), - fti,SLOT(slotNameChanged())); - connect(fti->folder(),SIGNAL(nameChanged()), - fti,SLOT(slotNameChanged())); + disconnect(fti->folder(),TQT_SIGNAL(nameChanged()), + fti,TQT_SLOT(slotNameChanged())); + connect(fti->folder(),TQT_SIGNAL(nameChanged()), + fti,TQT_SLOT(slotNameChanged())); // we want to be noticed of changes to update the unread/total columns - disconnect(fti->folder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); //} - disconnect(fti->folder(), SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - disconnect(fti->folder(), SIGNAL(msgRemoved(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(msgRemoved(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(msgRemoved(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(msgRemoved(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); - disconnect(fti->folder(), SIGNAL(folderSizeChanged( KMFolder* )), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(folderSizeChanged( KMFolder* )), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(folderSizeChanged( KMFolder* )), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(folderSizeChanged( KMFolder* )), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); - disconnect(fti->folder(), SIGNAL(shortcutChanged(KMFolder*)), - mMainWidget, SLOT( slotShortcutChanged(KMFolder*))); - connect(fti->folder(), SIGNAL(shortcutChanged(KMFolder*)), - mMainWidget, SLOT( slotShortcutChanged(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(shortcutChanged(KMFolder*)), + mMainWidget, TQT_SLOT( slotShortcutChanged(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(shortcutChanged(KMFolder*)), + mMainWidget, TQT_SLOT( slotShortcutChanged(KMFolder*))); if (!openFolders) @@ -634,7 +634,7 @@ void KMFolderTree::reload(bool openFolders) } ensureVisible(0, top + visibleHeight(), 0, 0); // if current and selected folder did not change set it again - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { if ( last && static_cast<KMFolderTreeItem*>( it.current() )->folder() == last ) @@ -665,7 +665,7 @@ void KMFolderTree::slotUpdateOneCount() ++mUpdateIterator; if ( !fti->folder() ) { // next one please - QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) ); return; } @@ -676,7 +676,7 @@ void KMFolderTree::slotUpdateOneCount() // restore previous state if (!open) fti->folder()->close("updatecount"); - QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) ); } //----------------------------------------------------------------------------- @@ -706,7 +706,7 @@ void KMFolderTree::addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent ) } else { // hide local inbox if unused if ( kmkernel->inboxFolder() == folder && hideLocalInbox() ) { - connect( kmkernel->inboxFolder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), SLOT(slotUnhideLocalInbox()) ); + connect( kmkernel->inboxFolder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), TQT_SLOT(slotUnhideLocalInbox()) ); continue; } @@ -736,10 +736,10 @@ void KMFolderTree::addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent ) continue; } - connect (fti, SIGNAL(iconChanged(KMFolderTreeItem*)), - this, SIGNAL(iconChanged(KMFolderTreeItem*))); - connect (fti, SIGNAL(nameChanged(KMFolderTreeItem*)), - this, SIGNAL(nameChanged(KMFolderTreeItem*))); + connect (fti, TQT_SIGNAL(iconChanged(KMFolderTreeItem*)), + this, TQT_SIGNAL(iconChanged(KMFolderTreeItem*))); + connect (fti, TQT_SIGNAL(nameChanged(KMFolderTreeItem*)), + this, TQT_SIGNAL(nameChanged(KMFolderTreeItem*))); } // restore last open-state fti->setOpen( readIsListViewItemOpen(fti) ); @@ -761,7 +761,7 @@ void KMFolderTree::delayedUpdate() if ( upd ) { setUpdatesEnabled(false); - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (!fti || !fti->folder()) continue; @@ -797,7 +797,7 @@ void KMFolderTree::slotFolderMoveOrCopyOperationFinished() //----------------------------------------------------------------------------- void KMFolderTree::slotFolderRemoved(KMFolder *aFolder) { - QListViewItem *item = indexOfFolder(aFolder); + TQListViewItem *item = indexOfFolder(aFolder); if (!item) return; KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*> ( item ); if ( oldCurrent == fti ) @@ -807,7 +807,7 @@ void KMFolderTree::slotFolderRemoved(KMFolder *aFolder) if (!fti || !fti->folder()) return; if (fti == currentItem()) { - QListViewItem *qlvi = fti->itemAbove(); + TQListViewItem *qlvi = fti->itemAbove(); if (!qlvi) qlvi = fti->itemBelow(); doFolderSelected( qlvi ); } @@ -825,7 +825,7 @@ void KMFolderTree::slotFolderRemoved(KMFolder *aFolder) // Methods for navigating folders with the keyboard void KMFolderTree::prepareItem( KMFolderTreeItem* fti ) { - for ( QListViewItem * parent = fti->parent() ; parent ; parent = parent->parent() ) + for ( TQListViewItem * parent = fti->parent() ; parent ; parent = parent->parent() ) parent->setOpen( true ); ensureItemVisible( fti ); } @@ -839,7 +839,7 @@ void KMFolderTree::nextUnreadFolder() //----------------------------------------------------------------------------- void KMFolderTree::nextUnreadFolder(bool confirm) { - QListViewItemIterator it( currentItem() ? currentItem() : firstChild() ); + TQListViewItemIterator it( currentItem() ? currentItem() : firstChild() ); if ( currentItem() ) ++it; // don't find current item for ( ; it.current() ; ++it ) { @@ -905,7 +905,7 @@ bool KMFolderTree::checkUnreadFolder (KMFolderTreeItem* fti, bool confirm) //----------------------------------------------------------------------------- void KMFolderTree::prevUnreadFolder() { - QListViewItemIterator it( currentItem() ? currentItem() : lastItem() ); + TQListViewItemIterator it( currentItem() ? currentItem() : lastItem() ); if ( currentItem() ) --it; // don't find current item for ( ; it.current() ; --it ) { @@ -917,7 +917,7 @@ void KMFolderTree::prevUnreadFolder() //----------------------------------------------------------------------------- void KMFolderTree::incCurrentFolder() { - QListViewItemIterator it( currentItem() ); + TQListViewItemIterator it( currentItem() ); ++it; KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (fti) { @@ -930,7 +930,7 @@ void KMFolderTree::incCurrentFolder() //----------------------------------------------------------------------------- void KMFolderTree::decCurrentFolder() { - QListViewItemIterator it( currentItem() ); + TQListViewItemIterator it( currentItem() ); --it; KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (fti) { @@ -960,10 +960,10 @@ KMFolder *KMFolderTree::currentFolder() const return 0; } -QValueList<QGuardedPtr<KMFolder> > KMFolderTree::selectedFolders() +TQValueList<TQGuardedPtr<KMFolder> > KMFolderTree::selectedFolders() { - QValueList<QGuardedPtr<KMFolder> > rv; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + TQValueList<TQGuardedPtr<KMFolder> > rv; + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { if ( it.current()->isSelected() ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() ); rv.append( fti->folder() ); @@ -976,7 +976,7 @@ QValueList<QGuardedPtr<KMFolder> > KMFolderTree::selectedFolders() // When not dragging and dropping a change in the selected item // indicates the user has changed the active folder emit a signal // so that the header list and reader window can be udpated. -void KMFolderTree::doFolderSelected( QListViewItem* qlvi, bool keepSelection ) +void KMFolderTree::doFolderSelected( TQListViewItem* qlvi, bool keepSelection ) { if (!qlvi) return; if ( mLastItem && mLastItem == qlvi && (keepSelection || selectedFolders().count() == 1) ) @@ -1011,7 +1011,7 @@ void KMFolderTree::doFolderSelected( QListViewItem* qlvi, bool keepSelection ) } //----------------------------------------------------------------------------- -void KMFolderTree::resizeEvent(QResizeEvent* e) +void KMFolderTree::resizeEvent(TQResizeEvent* e) { KConfig* conf = KMKernel::config(); @@ -1023,8 +1023,8 @@ void KMFolderTree::resizeEvent(QResizeEvent* e) //----------------------------------------------------------------------------- // show context menu -void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, - const QPoint &p ) +void KMFolderTree::slotContextMenuRequested( TQListViewItem *lvi, + const TQPoint &p ) { if (!lvi) return; @@ -1056,13 +1056,13 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, if ((!fti->folder() || (fti->folder()->noContent() && !fti->parent()))) { - QString createChild = i18n("&New Subfolder..."); + TQString createChild = i18n("&New Subfolder..."); if (!fti->folder()) createChild = i18n("&New Folder..."); if (fti->folder() || (fti->text(0) != i18n("Searches")) && !multiFolder) folderMenu->insertItem(SmallIconSet("folder_new"), createChild, this, - SLOT(addChildFolder())); + TQT_SLOT(addChildFolder())); if (!fti->folder()) { mMainWidget->action("compact_all_folders")->plug(folderMenu); @@ -1070,7 +1070,7 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, } else if (fti->folder()->folderType() == KMFolderTypeImap) { folderMenu->insertItem(SmallIconSet("mail_get"), i18n("Check &Mail"), this, - SLOT(slotCheckMail())); + TQT_SLOT(slotCheckMail())); } } else { // regular folders @@ -1078,17 +1078,17 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, if ( !fti->folder()->noChildren() && !multiFolder ) { folderMenu->insertItem(SmallIconSet("folder_new"), i18n("&New Subfolder..."), this, - SLOT(addChildFolder())); + TQT_SLOT(addChildFolder())); } // copy folder - QPopupMenu *copyMenu = new QPopupMenu( folderMenu ); + TQPopupMenu *copyMenu = new TQPopupMenu( folderMenu ); folderToPopupMenu( CopyFolder, this, &mMenuToFolder, copyMenu ); folderMenu->insertItem( i18n("&Copy Folder To"), copyMenu ); if ( fti->folder()->isMoveable() ) { - QPopupMenu *moveMenu = new QPopupMenu( folderMenu ); + TQPopupMenu *moveMenu = new TQPopupMenu( folderMenu ); folderToPopupMenu( MoveFolder, this, &mMenuToFolder, moveMenu ); folderMenu->insertItem( i18n("&Move Folder To"), moveMenu ); } @@ -1105,7 +1105,7 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, if ( GlobalSettings::self()->enableFavoriteFolderView() ) { folderMenu->insertItem( SmallIconSet("bookmark_add"), i18n("Add to Favorite Folders"), - this, SLOT(slotAddToFavorites()) ); + this, TQT_SLOT(slotAddToFavorites()) ); } folderMenu->insertSeparator(); @@ -1124,24 +1124,24 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, { folderMenu->insertItem(SmallIconSet("bookmark_folder"), i18n("Subscription..."), mMainWidget, - SLOT(slotSubscriptionDialog())); + TQT_SLOT(slotSubscriptionDialog())); folderMenu->insertItem(SmallIcon("bookmark_folder"), i18n("Local Subscription..."), mMainWidget, - SLOT(slotLocalSubscriptionDialog())); + TQT_SLOT(slotLocalSubscriptionDialog())); if (!fti->folder()->noContent()) { mMainWidget->action("refresh_folder")->plug(folderMenu); if ( fti->folder()->folderType() == KMFolderTypeImap && !multiFolder ) { folderMenu->insertItem(SmallIconSet("reload"), i18n("Refresh Folder List"), this, - SLOT(slotResetFolderList())); + TQT_SLOT(slotResetFolderList())); } } if ( fti->folder()->folderType() == KMFolderTypeCachedImap && !multiFolder ) { KMFolderCachedImap * folder = static_cast<KMFolderCachedImap*>( fti->folder()->storage() ); folderMenu->insertItem( SmallIconSet("wizard"), i18n("&Troubleshoot IMAP Cache..."), - folder, SLOT(slotTroubleshoot()) ); + folder, TQT_SLOT(slotTroubleshoot()) ); } folderMenu->insertSeparator(); } @@ -1155,11 +1155,11 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, folderMenu->insertItem(SmallIconSet("configure_shortcuts"), i18n("&Assign Shortcut..."), fti, - SLOT(assignShortcut())); + TQT_SLOT(assignShortcut())); if ( !fti->folder()->noContent() ) { folderMenu->insertItem( i18n("Expire..."), fti, - SLOT( slotShowExpiryProperties() ) ); + TQT_SLOT( slotShowExpiryProperties() ) ); } mMainWidget->action("modify")->plug(folderMenu); } @@ -1174,16 +1174,16 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, } //----------------------------------------------------------------------------- -void KMFolderTree::contentsMousePressEvent(QMouseEvent * e) +void KMFolderTree::contentsMousePressEvent(TQMouseEvent * e) { // KFolderTree messes around with the selection mode KListView::contentsMousePressEvent( e ); } // If middle button and folder holds mailing-list, create a message to that list -void KMFolderTree::contentsMouseReleaseEvent(QMouseEvent* me) +void KMFolderTree::contentsMouseReleaseEvent(TQMouseEvent* me) { - QListViewItem *lvi = currentItem(); // Needed for when branches are clicked on + TQListViewItem *lvi = currentItem(); // Needed for when branches are clicked on ButtonState btn = me->button(); doFolderSelected(lvi, true); @@ -1228,7 +1228,7 @@ static bool folderHasCreateRights( const KMFolder *folder ) //----------------------------------------------------------------------------- // Create a subfolder. // Requires creating the appropriate subdirectory and show a dialog -void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent ) +void KMFolderTree::addChildFolder( KMFolder *folder, TQWidget * parent ) { KMFolder *aFolder = folder; if ( !aFolder ) { @@ -1242,7 +1242,7 @@ void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent ) return; if ( !folderHasCreateRights( aFolder ) ) { // FIXME: change this message to "Cannot create folder under ..." or similar - const QString message = i18n( "<qt>Cannot create folder <b>%1</b> because of insufficient " + const TQString message = i18n( "<qt>Cannot create folder <b>%1</b> because of insufficient " "permissions on the server. If you think you should be able to create " "subfolders here, ask your administrator to grant you rights to do so." "</qt> " ).arg(aFolder->label()); @@ -1265,7 +1265,7 @@ void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent ) new KMFolderDialog(0, dir, this, i18n("Create Subfolder") ); if (d->exec()) { // fti may be deleted here - QListViewItem *qlvi = indexOfFolder( aFolder ); + TQListViewItem *qlvi = indexOfFolder( aFolder ); if (qlvi) { qlvi->setOpen(true); blockSignals( true ); @@ -1288,7 +1288,7 @@ bool KMFolderTree::readIsListViewItemOpen(KMFolderTreeItem *fti) { KConfig* config = KMKernel::config(); KMFolder *folder = fti->folder(); - QString name; + TQString name; if (folder) { name = "Folder-" + folder->idString(); @@ -1314,7 +1314,7 @@ void KMFolderTree::writeIsListViewItemOpen(KMFolderTreeItem *fti) { KConfig* config = KMKernel::config(); KMFolder *folder = fti->folder(); - QString name; + TQString name; if (folder && !folder->idString().isEmpty()) { name = "Folder-" + folder->idString(); @@ -1340,19 +1340,19 @@ void KMFolderTree::cleanupConfigFile() if ( childCount() == 0 ) return; // just in case reload wasn't called before KConfig* config = KMKernel::config(); - QStringList existingFolders; - QListViewItemIterator fldIt(this); - QMap<QString,bool> folderMap; + TQStringList existingFolders; + TQListViewItemIterator fldIt(this); + TQMap<TQString,bool> folderMap; KMFolderTreeItem *fti; - for (QListViewItemIterator fldIt(this); fldIt.current(); fldIt++) + for (TQListViewItemIterator fldIt(this); fldIt.current(); fldIt++) { fti = static_cast<KMFolderTreeItem*>(fldIt.current()); if (fti && fti->folder()) folderMap.insert(fti->folder()->idString(), true); } - QStringList groupList = config->groupList(); - QString name; - for (QStringList::Iterator grpIt = groupList.begin(); + TQStringList groupList = config->groupList(); + TQString name; + for (TQStringList::Iterator grpIt = groupList.begin(); grpIt != groupList.end(); grpIt++) { if ((*grpIt).left(7) != "Folder-") continue; @@ -1391,19 +1391,19 @@ void KMFolderTree::openFolder() static const int autoopenTime = 750; //----------------------------------------------------------------------------- -void KMFolderTree::contentsDragEnterEvent( QDragEnterEvent *e ) +void KMFolderTree::contentsDragEnterEvent( TQDragEnterEvent *e ) { oldCurrent = 0; oldSelected = 0; oldCurrent = currentItem(); - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) if ( it.current()->isSelected() ) oldSelected = it.current(); setFocus(); - QListViewItem *i = itemAt( contentsToViewport(e->pos()) ); + TQListViewItem *i = itemAt( contentsToViewport(e->pos()) ); if ( i ) { dropItem = i; autoopen_timer.start( autoopenTime ); @@ -1415,10 +1415,10 @@ void KMFolderTree::contentsDragEnterEvent( QDragEnterEvent *e ) } //----------------------------------------------------------------------------- -void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e ) +void KMFolderTree::contentsDragMoveEvent( TQDragMoveEvent *e ) { - QPoint vp = contentsToViewport(e->pos()); - QListViewItem *i = itemAt( vp ); + TQPoint vp = contentsToViewport(e->pos()); + TQListViewItem *i = itemAt( vp ); if ( i ) { bool dragAccepted = acceptDrag( e ); if ( dragAccepted ) { @@ -1435,12 +1435,12 @@ void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e ) e->accept( itemRect(i) ); switch ( e->action() ) { - case QDropEvent::Copy: + case TQDropEvent::Copy: break; - case QDropEvent::Move: + case TQDropEvent::Move: e->acceptAction(); break; - case QDropEvent::Link: + case TQDropEvent::Link: e->acceptAction(); break; default: @@ -1457,7 +1457,7 @@ void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e ) } //----------------------------------------------------------------------------- -void KMFolderTree::contentsDragLeaveEvent( QDragLeaveEvent * ) +void KMFolderTree::contentsDragLeaveEvent( TQDragLeaveEvent * ) { if (!oldCurrent) return; @@ -1470,14 +1470,14 @@ void KMFolderTree::contentsDragLeaveEvent( QDragLeaveEvent * ) } //----------------------------------------------------------------------------- -void KMFolderTree::contentsDropEvent( QDropEvent *e ) +void KMFolderTree::contentsDropEvent( TQDropEvent *e ) { autoopen_timer.stop(); - QListViewItem *item = itemAt( contentsToViewport(e->pos()) ); + TQListViewItem *item = itemAt( contentsToViewport(e->pos()) ); KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); // Check that each pointer is not null - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); it != mCopySourceFolders.constEnd(); ++it ) { if ( ! (*it) ) { fti = 0; @@ -1495,7 +1495,7 @@ void KMFolderTree::contentsDropEvent( QDropEvent *e ) if ( e->provides("application/x-qlistviewitem") ) { int action = dndMode( true /* always ask */ ); if ( (action == DRAG_COPY || action == DRAG_MOVE) && !mCopySourceFolders.isEmpty() ) { - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); it != mCopySourceFolders.constEnd(); ++it ) { if ( ! (*it)->isMoveable() ) action = DRAG_COPY; @@ -1536,7 +1536,7 @@ void KMFolderTree::contentsDropEvent( QDropEvent *e ) } //----------------------------------------------------------------------------- -void KMFolderTree::slotFolderExpanded( QListViewItem * item ) +void KMFolderTree::slotFolderExpanded( TQListViewItem * item ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); if ( !fti || !fti->folder() || !fti->folder()->storage() ) return; @@ -1553,7 +1553,7 @@ void KMFolderTree::slotFolderExpanded( QListViewItem * item ) if ( folder->getSubfolderState() == KMFolderImap::imapNoInformation ) { // check if all parents are expanded - QListViewItem *parent = item->parent(); + TQListViewItem *parent = item->parent(); while ( parent ) { if ( !parent->isOpen() ) @@ -1571,7 +1571,7 @@ void KMFolderTree::slotFolderExpanded( QListViewItem * item ) //----------------------------------------------------------------------------- -void KMFolderTree::slotFolderCollapsed( QListViewItem * item ) +void KMFolderTree::slotFolderCollapsed( TQListViewItem * item ) { slotResetFolderList( item, false ); KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); @@ -1581,8 +1581,8 @@ void KMFolderTree::slotFolderCollapsed( QListViewItem * item ) } //----------------------------------------------------------------------------- -void KMFolderTree::slotRenameFolder(QListViewItem *item, int col, - const QString &text) +void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, + const TQString &text) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); @@ -1590,7 +1590,7 @@ void KMFolderTree::slotRenameFolder(QListViewItem *item, int col, if ((!fti) || (fti && fti->folder() && col != 0 && !currentFolder()->child())) return; - QString fldName, oldFldName; + TQString fldName, oldFldName; oldFldName = fti->name(0); @@ -1600,7 +1600,7 @@ void KMFolderTree::slotRenameFolder(QListViewItem *item, int col, fldName = oldFldName; fldName.replace("/", ""); - fldName.replace(QRegExp("^\\."), ""); + fldName.replace(TQRegExp("^\\."), ""); if (fldName.isEmpty()) fldName = i18n("unnamed"); @@ -1627,7 +1627,7 @@ void KMFolderTree::slotUpdateCountTimeout() { // kdDebug(5006) << "KMFolderTree::slotUpdateCountTimeout()" << endl; - QMap<QString,KMFolder*>::iterator it; + TQMap<TQString,KMFolder*>::iterator it; for ( it= mFolderToUpdateCount.begin(); it!=mFolderToUpdateCount.end(); ++it ) @@ -1715,13 +1715,13 @@ void KMFolderTree::slotToggleSizeColumn() //----------------------------------------------------------------------------- -bool KMFolderTree::eventFilter( QObject *o, QEvent *e ) +bool KMFolderTree::eventFilter( TQObject *o, TQEvent *e ) { - if ( e->type() == QEvent::MouseButtonPress && - static_cast<QMouseEvent*>(e)->button() == RightButton && - o->isA("QHeader") ) + if ( e->type() == TQEvent::MouseButtonPress && + static_cast<TQMouseEvent*>(e)->button() == RightButton && + o->isA("TQHeader") ) { - mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() ); + mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() ); return true; } return KFolderTree::eventFilter(o, e); @@ -1752,8 +1752,8 @@ void KMFolderTree::slotNewMessageToMailingList() } //----------------------------------------------------------------------------- -void KMFolderTree::createFolderList( QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders, +void KMFolderTree::createFolderList( TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders, bool localFolders, bool imapFolders, bool dimapFolders, @@ -1761,7 +1761,7 @@ void KMFolderTree::createFolderList( QStringList *str, bool includeNoContent, bool includeNoChildren ) { - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current()); if (!fti || !fti->folder()) continue; @@ -1774,7 +1774,7 @@ void KMFolderTree::createFolderList( QStringList *str, if (!searchFolders && folder->folderType() == KMFolderTypeSearch) continue; if (!includeNoContent && folder->noContent()) continue; if (!includeNoChildren && folder->noChildren()) continue; - QString prefix; + TQString prefix; prefix.fill( ' ', 2 * fti->depth() ); str->append(prefix + fti->text(0)); folders->append(fti->folder()); @@ -1782,7 +1782,7 @@ void KMFolderTree::createFolderList( QStringList *str, } //----------------------------------------------------------------------------- -void KMFolderTree::slotResetFolderList( QListViewItem* item, bool startList ) +void KMFolderTree::slotResetFolderList( TQListViewItem* item, bool startList ) { if ( !item ) item = currentItem(); @@ -1802,7 +1802,7 @@ void KMFolderTree::slotResetFolderList( QListViewItem* item, bool startList ) void KMFolderTree::showFolder( KMFolder* folder ) { if ( !folder ) return; - QListViewItem* item = indexOfFolder( folder ); + TQListViewItem* item = indexOfFolder( folder ); if ( item ) { doFolderSelected( item ); @@ -1811,12 +1811,12 @@ void KMFolderTree::showFolder( KMFolder* folder ) } //----------------------------------------------------------------------------- -void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, - KMMenuToFolder *aMenuToFolder, QPopupMenu *menu, QListViewItem *item ) +void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, + KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu, TQListViewItem *item ) { while ( menu->count() ) { - QPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if ( popup ) delete popup; else @@ -1825,15 +1825,15 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, // connect the signals if ( action == MoveMessage || action == MoveFolder ) { - disconnect( menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int)) ); - connect( menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int)) ); + disconnect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int)) ); + connect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int)) ); } else { - disconnect( menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int)) ); - connect( menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int)) ); + disconnect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int)) ); + connect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int)) ); } if ( !item ) { item = firstChild(); @@ -1861,12 +1861,12 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, item = item->nextSibling(); continue; } - QString label = fti->text( 0 ); + TQString label = fti->text( 0 ); label.replace( "&","&&" ); if ( fti->firstChild() ) { // new level - QPopupMenu* popup = new QPopupMenu( menu, "subMenu" ); + TQPopupMenu* popup = new TQPopupMenu( menu, "subMenu" ); folderToPopupMenu( action, receiver, aMenuToFolder, popup, fti->firstChild() ); bool subMenu = false; if ( ( action == MoveMessage || action == CopyMessage ) && @@ -1876,7 +1876,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, && ( !fti->folder() || ( fti->folder() && !fti->folder()->noChildren() ) ) ) subMenu = true; - QString sourceFolderName; + TQString sourceFolderName; KMFolderTreeItem* srcItem = dynamic_cast<KMFolderTreeItem*>( currentItem() ); if ( srcItem ) sourceFolderName = srcItem->text( 0 ); @@ -1928,7 +1928,7 @@ void KMFolderTree::copySelectedToFolder( int menuId ) } //----------------------------------------------------------------------------- -void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move ) +void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move ) { kdDebug(5006) << k_funcinfo << "source: " << sources << " destination: " << destination << " move: " << move << endl; @@ -1939,14 +1939,14 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, if ( destination ) parent = destination->createChildFolder(); - QStringList sourceFolderNames; + TQStringList sourceFolderNames; // check if move/copy is possible at all - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { KMFolder* source = *it; // check if folder with same name already exits - QString sourceFolderName; + TQString sourceFolderName; if ( source ) sourceFolderName = source->label(); @@ -1969,7 +1969,7 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, f = f->parent()->owner(); } - QString message = + TQString message = i18n( "<qt>Cannot move or copy folder <b>%1</b> into a subfolder below itself.</qt>" ). arg( sourceFolderName ); KMFolderDir* folderDir = parent; @@ -2002,11 +2002,11 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, } // check if the source folders are independent of each other - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); move && it != sources.constEnd(); ++it ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); move && it != sources.constEnd(); ++it ) { KMFolderDir *parentDir = (*it)->child(); if ( !parentDir ) continue; - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it2 = sources.constBegin(); it2 != sources.constEnd(); ++it2 ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it2 = sources.constBegin(); it2 != sources.constEnd(); ++it2 ) { if ( *it == *it2 ) continue; KMFolderDir *childDir = (*it2)->parent(); @@ -2028,7 +2028,7 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, } // do the actual move/copy - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { KMFolder* source = *it; if ( move ) { kdDebug(5006) << "move folder " << (source ? source->label(): "Unknown") << " to " @@ -2040,15 +2040,15 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, } } -QDragObject * KMFolderTree::dragObject() +TQDragObject * KMFolderTree::dragObject() { KMFolderTreeItem *item = static_cast<KMFolderTreeItem*> - (itemAt(viewport()->mapFromGlobal(QCursor::pos()))); + (itemAt(viewport()->mapFromGlobal(TQCursor::pos()))); if ( !item || !item->parent() || !item->folder() ) // top-level items or something invalid return 0; mCopySourceFolders = selectedFolders(); - QDragObject *drag = KFolderTree::dragObject(); + TQDragObject *drag = KFolderTree::dragObject(); if ( drag ) drag->setPixmap( SmallIcon("folder") ); return drag; @@ -2110,7 +2110,7 @@ void KMFolderTree::slotAddToFavorites() { KMail::FavoriteFolderView *favView = mMainWidget->favoriteFolderView(); assert( favView ); - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { if ( it.current()->isSelected() ) favView->addFolder( static_cast<KMFolderTreeItem*>( it.current() ) ); } @@ -2118,8 +2118,8 @@ void KMFolderTree::slotAddToFavorites() void KMFolderTree::slotUnhideLocalInbox() { - disconnect( kmkernel->inboxFolder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), - this, SLOT(slotUnhideLocalInbox()) ); + disconnect( kmkernel->inboxFolder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), + this, TQT_SLOT(slotUnhideLocalInbox()) ); reload(); } diff --git a/kmail/kmfoldertree.h b/kmail/kmfoldertree.h index e24f939b3..3db70d3bf 100644 --- a/kmail/kmfoldertree.h +++ b/kmail/kmfoldertree.h @@ -23,10 +23,10 @@ #include <klocale.h> #include <kdepimmacros.h> -#include <qguardedptr.h> -#include <qwidget.h> -#include <qtimer.h> -#include <qheader.h> +#include <tqguardedptr.h> +#include <tqwidget.h> +#include <tqtimer.h> +#include <tqheader.h> class QDropEvent; class QPixmap; @@ -39,42 +39,42 @@ class KMFolderImap; class KMFolderTree; class KMAccount; // duplication from kmcommands.h, to avoid the include -typedef QMap<int,KMFolder*> KMMenuToFolder; +typedef TQMap<int,KMFolder*> KMMenuToFolder; template <typename T> class QGuardedPtr; -class KDE_EXPORT KMFolderTreeItem : public QObject, public KFolderTreeItem +class KDE_EXPORT KMFolderTreeItem : public TQObject, public KFolderTreeItem { Q_OBJECT public: /** Construct a root item _without_ folder */ - KMFolderTreeItem( KFolderTree *parent, const QString & name, + KMFolderTreeItem( KFolderTree *parent, const TQString & name, KFolderTreeItem::Protocol protocol=KFolderTreeItem::NONE ); /** Construct a root item _with_ folder */ - KMFolderTreeItem( KFolderTree *parent, const QString & name, + KMFolderTreeItem( KFolderTree *parent, const TQString & name, KMFolder* folder ); /** Construct a child item */ - KMFolderTreeItem( KFolderTreeItem* parent, const QString & name, + KMFolderTreeItem( KFolderTreeItem* parent, const TQString & name, KMFolder* folder ); virtual ~KMFolderTreeItem(); - QPixmap normalIcon( int size ) const; - QPixmap unreadIcon( int size ) const; + TQPixmap normalIcon( int size ) const; + TQPixmap unreadIcon( int size ) const; void setNeedsRepaint( bool value ) { mNeedsRepaint = value; } bool needsRepaint() const { return mNeedsRepaint; } /** associated folder */ KMFolder* folder() const { return mFolder; } - QListViewItem* parent() const { return KFolderTreeItem::parent(); } + TQListViewItem* parent() const { return KFolderTreeItem::parent(); } /** Adjust the unread count from the folder and update the * pixmaps accordingly. */ void adjustUnreadCount( int newUnreadCount ); /** dnd */ - virtual bool acceptDrag(QDropEvent* e) const; + virtual bool acceptDrag(TQDropEvent* e) const; signals: /** Our icon changed */ @@ -109,7 +109,7 @@ class KMFolderTree : public KMail::FolderTreeBase Q_OBJECT public: - KMFolderTree( KMMainWidget *mainWidget, QWidget *parent=0, + KMFolderTree( KMMainWidget *mainWidget, TQWidget *parent=0, const char *name=0 ); /** Save config options */ @@ -122,8 +122,8 @@ public: virtual void addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent ); /** create a folderlist */ - void createFolderList( QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders, + void createFolderList( TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders, bool localFolders=true, bool imapFolders=true, bool dimapFolders=true, @@ -145,7 +145,7 @@ public: KMFolder *currentFolder() const; - QValueList<QGuardedPtr<KMFolder> > selectedFolders(); + TQValueList<TQGuardedPtr<KMFolder> > selectedFolders(); enum ColumnMode {unread=15, total=16, foldersize=17}; @@ -168,8 +168,8 @@ public: }; /** Generate a popup menu that contains all folders that can have content */ - void folderToPopupMenu( MenuAction action, QObject *receiver, KMMenuToFolder *, - QPopupMenu *menu, QListViewItem *start = 0 ); + void folderToPopupMenu( MenuAction action, TQObject *receiver, KMMenuToFolder *, + TQPopupMenu *menu, TQListViewItem *start = 0 ); signals: /** The selected folder has changed */ @@ -210,17 +210,17 @@ public slots: void slotAccountRemoved(KMAccount*); /** Select the item and switch to the folder */ - void doFolderSelected(QListViewItem *qlvi, bool keepSelection = false); + void doFolderSelected(TQListViewItem *qlvi, bool keepSelection = false); /** * Reset current folder and all childs * If no item is given we take the current one * If startListing is true a folder listing is started */ - void slotResetFolderList( QListViewItem* item = 0, bool startList = true ); + void slotResetFolderList( TQListViewItem* item = 0, bool startList = true ); /** Create a child folder */ - void addChildFolder( KMFolder *folder = 0, QWidget * parent = 0 ); + void addChildFolder( KMFolder *folder = 0, TQWidget * parent = 0 ); /** Copies the currently selected folder. */ void copyFolder(); @@ -249,13 +249,13 @@ protected slots: void openFolder(); /** Expand an IMAP folder */ - void slotFolderExpanded( QListViewItem * item ); + void slotFolderExpanded( TQListViewItem * item ); /** Tell the folder to refresh the contents on the next expansion */ - void slotFolderCollapsed( QListViewItem * item ); + void slotFolderCollapsed( TQListViewItem * item ); /** Check if the new name is valid and confirm the new name */ - void slotRenameFolder( QListViewItem * item, int col, const QString& text); + void slotRenameFolder( TQListViewItem * item, int col, const TQString& text); /** Update the total and unread columns but delayed */ void slotUpdateCountsDelayed(KMFolder * folder); @@ -267,7 +267,7 @@ protected slots: void slotToggleTotalColumn(); void slotToggleSizeColumn(); - void slotContextMenuRequested( QListViewItem *, const QPoint & ); + void slotContextMenuRequested( TQListViewItem *, const TQPoint & ); /** Fires a new-mail-check of the account that is accociated with currentItem */ void slotCheckMail(); @@ -283,35 +283,35 @@ protected slots: void updateCopyActions(); protected: - virtual void contentsMousePressEvent( QMouseEvent *e ); - virtual void contentsMouseReleaseEvent(QMouseEvent* me); + virtual void contentsMousePressEvent( TQMouseEvent *e ); + virtual void contentsMouseReleaseEvent(TQMouseEvent* me); /** Updates the number of unread messages for all folders */ virtual void updateUnreadAll( ); - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); /** Read/Save open/close state indicator for an item in folderTree list view */ bool readIsListViewItemOpen(KMFolderTreeItem *fti); void writeIsListViewItemOpen(KMFolderTreeItem *fti); - QTimer mUpdateTimer; + TQTimer mUpdateTimer; /** Drag and drop methods */ - void contentsDragEnterEvent( QDragEnterEvent *e ); - void contentsDragMoveEvent( QDragMoveEvent *e ); - void contentsDragLeaveEvent( QDragLeaveEvent *e ); - void contentsDropEvent( QDropEvent *e ); - virtual QDragObject* dragObject(); + void contentsDragEnterEvent( TQDragEnterEvent *e ); + void contentsDragMoveEvent( TQDragMoveEvent *e ); + void contentsDragLeaveEvent( TQDragLeaveEvent *e ); + void contentsDropEvent( TQDropEvent *e ); + virtual TQDragObject* dragObject(); /** Drag and drop variables */ - QListViewItem *oldCurrent, *oldSelected; - QListViewItem *dropItem; + TQListViewItem *oldCurrent, *oldSelected; + TQListViewItem *dropItem; KMFolderTreeItem *mLastItem; - QTimer autoopen_timer; + TQTimer autoopen_timer; // filter some rmb-events - bool eventFilter(QObject*, QEvent*); + bool eventFilter(TQObject*, TQEvent*); /** open ancestors and ensure item is visible */ void prepareItem( KMFolderTreeItem* ); @@ -320,7 +320,7 @@ protected: void connectSignals(); /** Move or copy the folder @p source to @p destination. */ - void moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move=false ); + void moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move=false ); private slots: void slotAddToFavorites(); @@ -328,7 +328,7 @@ private slots: private: /** total column */ - QListViewItemIterator mUpdateIterator; + TQListViewItemIterator mUpdateIterator; /** popup for unread/total */ KPopupMenu* mPopup; @@ -337,11 +337,11 @@ private: int mSizePop; bool mReloading; - QValueList<QGuardedPtr<KMFolder> > mCopySourceFolders; + TQValueList<TQGuardedPtr<KMFolder> > mCopySourceFolders; bool mCutFolder; - QTimer *mUpdateCountTimer; - QMap<QString,KMFolder*> mFolderToUpdateCount; + TQTimer *mUpdateCountTimer; + TQMap<TQString,KMFolder*> mFolderToUpdateCount; /** Map menu id into a folder */ KMMenuToFolder mMenuToFolder; diff --git a/kmail/kmgroupware.cpp b/kmail/kmgroupware.cpp index ecc960eef..08afc3316 100644 --- a/kmail/kmgroupware.cpp +++ b/kmail/kmgroupware.cpp @@ -43,7 +43,7 @@ #include <assert.h> -bool vPartFoundAndDecoded( KMMessage* msg, QString& s ) +bool vPartFoundAndDecoded( KMMessage* msg, TQString& s ) { assert( msg ); @@ -52,7 +52,7 @@ bool vPartFoundAndDecoded( KMMessage* msg, QString& s ) ( DwMime::kTypeApplication == msg->type() && DwMime::kSubtypeOctetStream == msg->subtype() ) ) { - s = QString::fromUtf8( msg->bodyDecoded() ); + s = TQString::fromUtf8( msg->bodyDecoded() ); return true; } else if( DwMime::kTypeMultipart == msg->type() && (DwMime::kSubtypeMixed == msg->subtype() ) || diff --git a/kmail/kmgroupware.h b/kmail/kmgroupware.h index 7296d4b3e..0c815b4c3 100644 --- a/kmail/kmgroupware.h +++ b/kmail/kmgroupware.h @@ -37,10 +37,10 @@ #ifndef KMGROUPWARE_H #define KMGROUPWARE_H -#include <qstring.h> +#include <tqstring.h> class KMMessage; -bool vPartFoundAndDecoded( KMMessage* msg, QString& s ); +bool vPartFoundAndDecoded( KMMessage* msg, TQString& s ); #endif /* KMGROUPWARE_H */ diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp index e2dd439d3..c0e5c4225 100644 --- a/kmail/kmheaders.cpp +++ b/kmail/kmheaders.cpp @@ -42,16 +42,16 @@ using namespace KPIM; #include <klocale.h> #include <kdebug.h> -#include <qbuffer.h> -#include <qeventloop.h> -#include <qfile.h> -#include <qheader.h> -#include <qptrstack.h> -#include <qptrqueue.h> -#include <qpainter.h> -#include <qtextcodec.h> -#include <qstyle.h> -#include <qlistview.h> +#include <tqbuffer.h> +#include <tqeventloop.h> +#include <tqfile.h> +#include <tqheader.h> +#include <tqptrstack.h> +#include <tqptrqueue.h> +#include <tqpainter.h> +#include <tqtextcodec.h> +#include <tqstyle.h> +#include <tqlistview.h> #include <mimelib/enum.h> #include <mimelib/field.h> @@ -62,36 +62,36 @@ using namespace KPIM; #include "textsource.h" -QPixmap* KMHeaders::pixNew = 0; -QPixmap* KMHeaders::pixUns = 0; -QPixmap* KMHeaders::pixDel = 0; -QPixmap* KMHeaders::pixRead = 0; -QPixmap* KMHeaders::pixRep = 0; -QPixmap* KMHeaders::pixQueued = 0; -QPixmap* KMHeaders::pixTodo = 0; -QPixmap* KMHeaders::pixSent = 0; -QPixmap* KMHeaders::pixFwd = 0; -QPixmap* KMHeaders::pixFlag = 0; -QPixmap* KMHeaders::pixWatched = 0; -QPixmap* KMHeaders::pixIgnored = 0; -QPixmap* KMHeaders::pixSpam = 0; -QPixmap* KMHeaders::pixHam = 0; -QPixmap* KMHeaders::pixFullySigned = 0; -QPixmap* KMHeaders::pixPartiallySigned = 0; -QPixmap* KMHeaders::pixUndefinedSigned = 0; -QPixmap* KMHeaders::pixFullyEncrypted = 0; -QPixmap* KMHeaders::pixPartiallyEncrypted = 0; -QPixmap* KMHeaders::pixUndefinedEncrypted = 0; -QPixmap* KMHeaders::pixEncryptionProblematic = 0; -QPixmap* KMHeaders::pixSignatureProblematic = 0; -QPixmap* KMHeaders::pixAttachment = 0; -QPixmap* KMHeaders::pixReadFwd = 0; -QPixmap* KMHeaders::pixReadReplied = 0; -QPixmap* KMHeaders::pixReadFwdReplied = 0; - - -//----------------------------------------------------------------------------- -KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent, +TQPixmap* KMHeaders::pixNew = 0; +TQPixmap* KMHeaders::pixUns = 0; +TQPixmap* KMHeaders::pixDel = 0; +TQPixmap* KMHeaders::pixRead = 0; +TQPixmap* KMHeaders::pixRep = 0; +TQPixmap* KMHeaders::pixQueued = 0; +TQPixmap* KMHeaders::pixTodo = 0; +TQPixmap* KMHeaders::pixSent = 0; +TQPixmap* KMHeaders::pixFwd = 0; +TQPixmap* KMHeaders::pixFlag = 0; +TQPixmap* KMHeaders::pixWatched = 0; +TQPixmap* KMHeaders::pixIgnored = 0; +TQPixmap* KMHeaders::pixSpam = 0; +TQPixmap* KMHeaders::pixHam = 0; +TQPixmap* KMHeaders::pixFullySigned = 0; +TQPixmap* KMHeaders::pixPartiallySigned = 0; +TQPixmap* KMHeaders::pixUndefinedSigned = 0; +TQPixmap* KMHeaders::pixFullyEncrypted = 0; +TQPixmap* KMHeaders::pixPartiallyEncrypted = 0; +TQPixmap* KMHeaders::pixUndefinedEncrypted = 0; +TQPixmap* KMHeaders::pixEncryptionProblematic = 0; +TQPixmap* KMHeaders::pixSignatureProblematic = 0; +TQPixmap* KMHeaders::pixAttachment = 0; +TQPixmap* KMHeaders::pixReadFwd = 0; +TQPixmap* KMHeaders::pixReadReplied = 0; +TQPixmap* KMHeaders::pixReadFwdReplied = 0; + + +//----------------------------------------------------------------------------- +KMHeaders::KMHeaders(KMMainWidget *aOwner, TQWidget *parent, const char *name) : KListView(parent, name) { @@ -103,7 +103,7 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent, noRepaint = false; getMsgIndex = -1; mTopItem = 0; - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); setAllColumnsShowFocus( true ); mNested = false; nestingPolicy = OpenUnread; @@ -138,7 +138,7 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent, mPopup->insertItem(i18n("Size"), KPaintInfo::COL_SIZE); mPopup->insertItem(i18n("Receiver"), KPaintInfo::COL_RECEIVER); - connect(mPopup, SIGNAL(activated(int)), this, SLOT(slotToggleColumn(int))); + connect(mPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotToggleColumn(int))); setShowSortIndicator(true); setFocusPolicy( WheelFocus ); @@ -146,32 +146,32 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent, if (!pixmapsLoaded) { pixmapsLoaded = true; - pixNew = new QPixmap( UserIcon( "kmmsgnew" ) ); - pixUns = new QPixmap( UserIcon( "kmmsgunseen" ) ); - pixDel = new QPixmap( UserIcon( "kmmsgdel" ) ); - pixRead = new QPixmap( UserIcon( "kmmsgread" ) ); - pixRep = new QPixmap( UserIcon( "kmmsgreplied" ) ); - pixQueued = new QPixmap( UserIcon( "kmmsgqueued" ) ); - pixTodo = new QPixmap( UserIcon( "kmmsgtodo" ) ); - pixSent = new QPixmap( UserIcon( "kmmsgsent" ) ); - pixFwd = new QPixmap( UserIcon( "kmmsgforwarded" ) ); - pixFlag = new QPixmap( UserIcon( "kmmsgflag" ) ); - pixWatched = new QPixmap( UserIcon( "kmmsgwatched" ) ); - pixIgnored = new QPixmap( UserIcon( "kmmsgignored" ) ); - pixSpam = new QPixmap( UserIcon( "kmmsgspam" ) ); - pixHam = new QPixmap( UserIcon( "kmmsgham" ) ); - pixFullySigned = new QPixmap( UserIcon( "kmmsgfullysigned" ) ); - pixPartiallySigned = new QPixmap( UserIcon( "kmmsgpartiallysigned" ) ); - pixUndefinedSigned = new QPixmap( UserIcon( "kmmsgundefinedsigned" ) ); - pixFullyEncrypted = new QPixmap( UserIcon( "kmmsgfullyencrypted" ) ); - pixPartiallyEncrypted = new QPixmap( UserIcon( "kmmsgpartiallyencrypted" ) ); - pixUndefinedEncrypted = new QPixmap( UserIcon( "kmmsgundefinedencrypted" ) ); - pixEncryptionProblematic = new QPixmap( UserIcon( "kmmsgencryptionproblematic" ) ); - pixSignatureProblematic = new QPixmap( UserIcon( "kmmsgsignatureproblematic" ) ); - pixAttachment = new QPixmap( UserIcon( "kmmsgattachment" ) ); - pixReadFwd = new QPixmap( UserIcon( "kmmsgread_fwd" ) ); - pixReadReplied = new QPixmap( UserIcon( "kmmsgread_replied" ) ); - pixReadFwdReplied = new QPixmap( UserIcon( "kmmsgread_fwd_replied" ) ); + pixNew = new TQPixmap( UserIcon( "kmmsgnew" ) ); + pixUns = new TQPixmap( UserIcon( "kmmsgunseen" ) ); + pixDel = new TQPixmap( UserIcon( "kmmsgdel" ) ); + pixRead = new TQPixmap( UserIcon( "kmmsgread" ) ); + pixRep = new TQPixmap( UserIcon( "kmmsgreplied" ) ); + pixQueued = new TQPixmap( UserIcon( "kmmsgqueued" ) ); + pixTodo = new TQPixmap( UserIcon( "kmmsgtodo" ) ); + pixSent = new TQPixmap( UserIcon( "kmmsgsent" ) ); + pixFwd = new TQPixmap( UserIcon( "kmmsgforwarded" ) ); + pixFlag = new TQPixmap( UserIcon( "kmmsgflag" ) ); + pixWatched = new TQPixmap( UserIcon( "kmmsgwatched" ) ); + pixIgnored = new TQPixmap( UserIcon( "kmmsgignored" ) ); + pixSpam = new TQPixmap( UserIcon( "kmmsgspam" ) ); + pixHam = new TQPixmap( UserIcon( "kmmsgham" ) ); + pixFullySigned = new TQPixmap( UserIcon( "kmmsgfullysigned" ) ); + pixPartiallySigned = new TQPixmap( UserIcon( "kmmsgpartiallysigned" ) ); + pixUndefinedSigned = new TQPixmap( UserIcon( "kmmsgundefinedsigned" ) ); + pixFullyEncrypted = new TQPixmap( UserIcon( "kmmsgfullyencrypted" ) ); + pixPartiallyEncrypted = new TQPixmap( UserIcon( "kmmsgpartiallyencrypted" ) ); + pixUndefinedEncrypted = new TQPixmap( UserIcon( "kmmsgundefinedencrypted" ) ); + pixEncryptionProblematic = new TQPixmap( UserIcon( "kmmsgencryptionproblematic" ) ); + pixSignatureProblematic = new TQPixmap( UserIcon( "kmmsgsignatureproblematic" ) ); + pixAttachment = new TQPixmap( UserIcon( "kmmsgattachment" ) ); + pixReadFwd = new TQPixmap( UserIcon( "kmmsgread_fwd" ) ); + pixReadReplied = new TQPixmap( UserIcon( "kmmsgread_replied" ) ); + pixReadFwdReplied = new TQPixmap( UserIcon( "kmmsgread_fwd_replied" ) ); } header()->setStretchEnabled( false ); @@ -192,25 +192,25 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent, mPaintInfo.signedCol = addColumn( *pixFullySigned , "", 0 ); mPaintInfo.cryptoCol = addColumn( *pixFullyEncrypted, "", 0 ); - setResizeMode( QListView::NoColumn ); + setResizeMode( TQListView::NoColumn ); // only the non-optional columns shall be resizeable header()->setResizeEnabled( true, mPaintInfo.subCol ); header()->setResizeEnabled( true, mPaintInfo.senderCol ); header()->setResizeEnabled( true, mPaintInfo.dateCol ); - connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int )), - this, SLOT( rightButtonPressed( QListViewItem*, const QPoint &, int ))); - connect(this, SIGNAL(doubleClicked(QListViewItem*)), - this,SLOT(selectMessage(QListViewItem*))); - connect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int )), + this, TQT_SLOT( rightButtonPressed( TQListViewItem*, const TQPoint &, int ))); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this,TQT_SLOT(selectMessage(TQListViewItem*))); + connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); resetCurrentTime(); mSubjectLists.setAutoDelete( true ); mMoveMessages = false; - connect( this, SIGNAL(selectionChanged()), SLOT(updateActions()) ); + connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateActions()) ); } @@ -228,11 +228,11 @@ KMHeaders::~KMHeaders () } //----------------------------------------------------------------------------- -bool KMHeaders::eventFilter ( QObject *o, QEvent *e ) +bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e ) { - if ( e->type() == QEvent::MouseButtonPress && - static_cast<QMouseEvent*>(e)->button() == RightButton && - o->isA("QHeader") ) + if ( e->type() == TQEvent::MouseButtonPress && + static_cast<TQMouseEvent*>(e)->button() == RightButton && + o->isA("TQHeader") ) { // if we currently only show one of either sender/receiver column // modify the popup text in the way, that it displays the text of the other of the two @@ -244,7 +244,7 @@ bool KMHeaders::eventFilter ( QObject *o, QEvent *e ) else mPopup->changeItem(KPaintInfo::COL_RECEIVER, i18n("Receiver")); - mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() ); + mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() ); return true; } return KListView::eventFilter(o, e); @@ -375,7 +375,7 @@ void KMHeaders::slotToggleColumn(int id, int mode) // if we change the visibility of the receiver column, // the sender column has to show either the sender or the receiver if ( static_cast<KPaintInfo::ColumnIds>(id) == KPaintInfo::COL_RECEIVER ) { - QString colText = i18n( "Sender" ); + TQString colText = i18n( "Sender" ); if ( mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver) colText = i18n( "Receiver" ); setColumnText( mPaintInfo.senderCol, colText ); @@ -387,7 +387,7 @@ void KMHeaders::slotToggleColumn(int id, int mode) //----------------------------------------------------------------------------- // Support for backing pixmap -void KMHeaders::paintEmptyArea( QPainter * p, const QRect & rect ) +void KMHeaders::paintEmptyArea( TQPainter * p, const TQRect & rect ) { if (mPaintInfo.pixmapOn) p->drawTiledPixmap( rect.left(), rect.top(), rect.width(), rect.height(), @@ -398,10 +398,10 @@ void KMHeaders::paintEmptyArea( QPainter * p, const QRect & rect ) p->fillRect( rect, colorGroup().base() ); } -bool KMHeaders::event(QEvent *e) +bool KMHeaders::event(TQEvent *e) { bool result = KListView::event(e); - if (e->type() == QEvent::ApplicationPaletteChange) + if (e->type() == TQEvent::ApplicationPaletteChange) { readColorConfig(); } @@ -415,20 +415,20 @@ void KMHeaders::readColorConfig (void) KConfig* config = KMKernel::config(); // Custom/System colors KConfigGroupSaver saver(config, "Reader"); - QColor c1=QColor(kapp->palette().active().text()); - QColor c2=QColor("red"); - QColor c3=QColor("blue"); - QColor c4=QColor(kapp->palette().active().base()); - QColor c5=QColor(0,0x7F,0); - QColor c6=QColor(0,0x98,0); - QColor c7=KGlobalSettings::alternateBackgroundColor(); + TQColor c1=TQColor(kapp->palette().active().text()); + TQColor c2=TQColor("red"); + TQColor c3=TQColor("blue"); + TQColor c4=TQColor(kapp->palette().active().base()); + TQColor c5=TQColor(0,0x7F,0); + TQColor c6=TQColor(0,0x98,0); + TQColor c7=KGlobalSettings::alternateBackgroundColor(); if (!config->readBoolEntry("defaultColors",true)) { mPaintInfo.colFore = config->readColorEntry("ForegroundColor",&c1); mPaintInfo.colBack = config->readColorEntry("BackgroundColor",&c4); - 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 ); mPaintInfo.colNew = config->readColorEntry("NewMessage",&c2); mPaintInfo.colUnread = config->readColorEntry("UnreadMessage",&c3); @@ -439,9 +439,9 @@ void KMHeaders::readColorConfig (void) else { mPaintInfo.colFore = c1; mPaintInfo.colBack = c4; - QPalette newPal = kapp->palette(); - newPal.setColor( QColorGroup::Base, c4 ); - newPal.setColor( QColorGroup::Text, c1 ); + TQPalette newPal = kapp->palette(); + newPal.setColor( TQColorGroup::Base, c4 ); + newPal.setColor( TQColorGroup::Text, c1 ); setPalette( newPal ); mPaintInfo.colNew = c2; mPaintInfo.colUnread = c3; @@ -459,11 +459,11 @@ void KMHeaders::readConfig (void) // Backing pixmap support { // area for config group "Pixmaps" KConfigGroupSaver saver(config, "Pixmaps"); - QString pixmapFile = config->readEntry("Headers"); + TQString pixmapFile = config->readEntry("Headers"); mPaintInfo.pixmapOn = false; if (!pixmapFile.isEmpty()) { mPaintInfo.pixmapOn = true; - mPaintInfo.pixmap = QPixmap( pixmapFile ); + mPaintInfo.pixmap = TQPixmap( pixmapFile ); } } @@ -515,7 +515,7 @@ void KMHeaders::readConfig (void) KConfigGroupSaver saver(config, "Fonts"); if (!(config->readBoolEntry("defaultFonts",true))) { - QFont listFont( KGlobalSettings::generalFont() ); + TQFont listFont( KGlobalSettings::generalFont() ); listFont = config->readFontEntry( "list-font", &listFont ); setFont( listFont ); mNewFont = config->readFontEntry( "list-new-font", &listFont ); @@ -546,7 +546,7 @@ void KMHeaders::reset() int id = currentItemIndex(); noRepaint = true; clear(); - QString colText = i18n( "Sender" ); + TQString colText = i18n( "Sender" ); if ( mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver) colText = i18n( "Receiver" ); setColumnText( mPaintInfo.senderCol, colText ); @@ -653,7 +653,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread ) START_TIMER(set_folder); int id; - QString str; + TQString str; mSortInfo.fakeSort = 0; if ( mFolder && static_cast<KMFolder*>(mFolder) == aFolder ) { @@ -670,28 +670,28 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread ) // from this folder, since it's msg's are about to be deleted. highlightMessage(0, false); - disconnect(mFolder, SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this, SLOT(setFolderInfoStatus())); + disconnect(mFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this, TQT_SLOT(setFolderInfoStatus())); mFolder->markNewAsUnread(); writeFolderConfig(); - disconnect(mFolder, SIGNAL(msgHeaderChanged(KMFolder*,int)), - this, SLOT(msgHeaderChanged(KMFolder*,int))); - disconnect(mFolder, SIGNAL(msgAdded(int)), - this, SLOT(msgAdded(int))); - disconnect(mFolder, SIGNAL( msgRemoved( int, QString ) ), - this, SLOT( msgRemoved( int, QString ) ) ); - disconnect(mFolder, SIGNAL(changed()), - this, SLOT(msgChanged())); - disconnect(mFolder, SIGNAL(cleared()), - this, SLOT(folderCleared())); - disconnect(mFolder, SIGNAL(expunged( KMFolder* )), - this, SLOT(folderCleared())); - disconnect(mFolder, SIGNAL(closed()), - this, SLOT(folderClosed())); - disconnect( mFolder, SIGNAL( statusMsg( const QString& ) ), - BroadcastStatus::instance(), SLOT( setStatusMsg( const QString& ) ) ); - disconnect(mFolder, SIGNAL(viewConfigChanged()), this, SLOT(reset())); + disconnect(mFolder, TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)), + this, TQT_SLOT(msgHeaderChanged(KMFolder*,int))); + disconnect(mFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(msgAdded(int))); + disconnect(mFolder, TQT_SIGNAL( msgRemoved( int, TQString ) ), + this, TQT_SLOT( msgRemoved( int, TQString ) ) ); + disconnect(mFolder, TQT_SIGNAL(changed()), + this, TQT_SLOT(msgChanged())); + disconnect(mFolder, TQT_SIGNAL(cleared()), + this, TQT_SLOT(folderCleared())); + disconnect(mFolder, TQT_SIGNAL(expunged( KMFolder* )), + this, TQT_SLOT(folderCleared())); + disconnect(mFolder, TQT_SIGNAL(closed()), + this, TQT_SLOT(folderClosed())); + disconnect( mFolder, TQT_SIGNAL( statusMsg( const TQString& ) ), + BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) ); + disconnect(mFolder, TQT_SIGNAL(viewConfigChanged()), this, TQT_SLOT(reset())); writeSortOrder(); mFolder->close("kmheaders"); // System folders remain open but we also should write the index from @@ -708,25 +708,25 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread ) mOwner->messageActions()->replyListAction()->setEnabled( mFolder ? mFolder->isMailingListEnabled() : false ); if ( mFolder ) { - connect(mFolder, SIGNAL(msgHeaderChanged(KMFolder*,int)), - this, SLOT(msgHeaderChanged(KMFolder*,int))); - connect(mFolder, SIGNAL(msgAdded(int)), - this, SLOT(msgAdded(int))); - connect(mFolder, SIGNAL(msgRemoved(int,QString)), - this, SLOT(msgRemoved(int,QString))); - connect(mFolder, SIGNAL(changed()), - this, SLOT(msgChanged())); - connect(mFolder, SIGNAL(cleared()), - this, SLOT(folderCleared())); - connect(mFolder, SIGNAL(expunged( KMFolder* )), - this, SLOT(folderCleared())); - connect(mFolder, SIGNAL(closed()), - this, SLOT(folderClosed())); - connect(mFolder, SIGNAL(statusMsg(const QString&)), - BroadcastStatus::instance(), SLOT( setStatusMsg( const QString& ) ) ); - connect(mFolder, SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this, SLOT(setFolderInfoStatus())); - connect(mFolder, SIGNAL(viewConfigChanged()), this, SLOT(reset())); + connect(mFolder, TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)), + this, TQT_SLOT(msgHeaderChanged(KMFolder*,int))); + connect(mFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(msgAdded(int))); + connect(mFolder, TQT_SIGNAL(msgRemoved(int,TQString)), + this, TQT_SLOT(msgRemoved(int,TQString))); + connect(mFolder, TQT_SIGNAL(changed()), + this, TQT_SLOT(msgChanged())); + connect(mFolder, TQT_SIGNAL(cleared()), + this, TQT_SLOT(folderCleared())); + connect(mFolder, TQT_SIGNAL(expunged( KMFolder* )), + this, TQT_SLOT(folderCleared())); + connect(mFolder, TQT_SIGNAL(closed()), + this, TQT_SLOT(folderClosed())); + connect(mFolder, TQT_SIGNAL(statusMsg(const TQString&)), + BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) ); + connect(mFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this, TQT_SLOT(setFolderInfoStatus())); + connect(mFolder, TQT_SIGNAL(viewConfigChanged()), this, TQT_SLOT(reset())); // Not very nice, but if we go from nested to non-nested // in the folderConfig below then we need to do this otherwise @@ -762,7 +762,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread ) makeHeaderVisible(); setFolderInfoStatus(); - QString colText = i18n( "Sender" ); + TQString colText = i18n( "Sender" ); if (mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver) colText = i18n("Receiver"); setColumnText( mPaintInfo.senderCol, colText); @@ -795,8 +795,8 @@ void KMHeaders::msgChanged() int i = topItemIndex(); int cur = currentItemIndex(); if (!isUpdatesEnabled()) return; - QString msgIdMD5; - QListViewItem *item = currentItem(); + TQString msgIdMD5; + TQListViewItem *item = currentItem(); HeaderItem *hi = dynamic_cast<HeaderItem*>(item); if (item && hi) { // get the msgIdMD5 to compare it later @@ -806,15 +806,15 @@ void KMHeaders::msgChanged() } // if (!isUpdatesEnabled()) return; // prevent IMAP messages from scrolling to top - disconnect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); // remember all selected messages - QValueList<int> curItems = selectedItems(); + TQValueList<int> curItems = selectedItems(); updateMessageList(); // do not change the selection // restore the old state, but move up when there are unread message just out of view HeaderItem *topOfList = mItems[i]; item = firstChild(); - QListViewItem *unreadItem = 0; + TQListViewItem *unreadItem = 0; while(item && item != topOfList) { KMMsgBase *msg = mFolder->getMsgBase( static_cast<HeaderItem*>(item)->msgId() ); if ( msg->isUnread() || msg->isNew() ) { @@ -829,8 +829,8 @@ void KMHeaders::msgChanged() setContentsPos( 0, itemPos( unreadItem )); setCurrentMsg( cur ); setSelectedByIndex( curItems, true ); - connect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); // if the current message has changed then emit // the selected signal to force an update @@ -877,10 +877,10 @@ void KMHeaders::msgAdded(int id) mSortCacheItems.resize(mFolder->count()*2); mSubjectLists.resize(mFolder->count()*2); } - QString msgId = mFolder->getMsgBase(id)->msgIdMD5(); + TQString msgId = mFolder->getMsgBase(id)->msgIdMD5(); if (msgId.isNull()) msgId = ""; - QString replyToId = mFolder->getMsgBase(id)->replyToIdMD5(); + TQString replyToId = mFolder->getMsgBase(id)->replyToIdMD5(); SortCacheItem *parent = findParent( sci ); if (!parent && mSubjThreading) { @@ -918,17 +918,17 @@ void KMHeaders::msgAdded(int id) /* Add to the list of potential parents for subject threading. But only if * we are top level. */ if (mSubjThreading && parent) { - QString subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5(); + TQString subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5(); if (subjMD5.isEmpty()) { mFolder->getMsgBase(id)->initStrippedSubjectMD5(); subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5(); } if( !subjMD5.isEmpty()) { if ( !mSubjectLists.find(subjMD5) ) - mSubjectLists.insert(subjMD5, new QPtrList<SortCacheItem>()); + mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>()); // insertion sort by date. See buildThreadTrees for details. int p=0; - for (QPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]); + for (TQPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]); it.current(); ++it) { KMMsgBase *mb = mFolder->getMsgBase((*it)->id()); if ( mb->date() < mFolder->getMsgBase(id)->date()) @@ -945,11 +945,11 @@ void KMHeaders::msgAdded(int id) /* In case the current item is taken during reparenting, prevent qlistview * from selecting some unrelated item as a result of take() emitting * currentChanged. */ - disconnect( this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(highlightMessage(QListViewItem*))); + disconnect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(highlightMessage(TQListViewItem*))); if ( !msgId.isEmpty() ) { - QPtrListIterator<HeaderItem> it(mImperfectlyThreadedList); + TQPtrListIterator<HeaderItem> it(mImperfectlyThreadedList); HeaderItem *cur; while ( (cur = it.current()) ) { ++it; @@ -963,7 +963,7 @@ void KMHeaders::msgAdded(int id) kdDebug(5006) << "otherMsg is NULL !!! tryMe: " << tryMe << endl; continue; } - QString otherId = otherMsg->replyToIdMD5(); + TQString otherId = otherMsg->replyToIdMD5(); if (msgId != otherId) { if (msgId != otherMsg->replyToAuxIdMD5()) continue; @@ -976,8 +976,8 @@ void KMHeaders::msgAdded(int id) perfectParent = false; } } - QListViewItem *newParent = mItems[id]; - QListViewItem *msg = mItems[tryMe]; + TQListViewItem *newParent = mItems[id]; + TQListViewItem *msg = mItems[tryMe]; if (msg->parent()) msg->parent()->takeItem(msg); @@ -993,8 +993,8 @@ void KMHeaders::msgAdded(int id) mImperfectlyThreadedList.removeRef (mItems[tryMe]); // The item was imperfectly thread before, now it's parent // is there. Update the .sorted file accordingly. - QString sortFile = KMAIL_SORT_FILE(mFolder); - FILE *sortStream = fopen(QFile::encodeName(sortFile), "r+"); + TQString sortFile = KMAIL_SORT_FILE(mFolder); + FILE *sortStream = fopen(TQFile::encodeName(sortFile), "r+"); if (sortStream) { mItems[tryMe]->sortCacheItem()->updateSortFile( sortStream, mFolder ); fclose (sortStream); @@ -1015,7 +1015,7 @@ void KMHeaders::msgAdded(int id) sci->setItem(hi); } if (mSortInfo.fakeSort) { - QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int))); + TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int))); KListView::setSorting(mSortCol, !mSortDescending ); mSortInfo.fakeSort = 0; } @@ -1031,8 +1031,8 @@ void KMHeaders::msgAdded(int id) } /* restore signal */ - connect( this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(highlightMessage(QListViewItem*))); + connect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(highlightMessage(TQListViewItem*))); emit msgAddedToListView( hi ); END_TIMER(msgAdded); @@ -1041,7 +1041,7 @@ void KMHeaders::msgAdded(int id) //----------------------------------------------------------------------------- -void KMHeaders::msgRemoved(int id, QString msgId ) +void KMHeaders::msgRemoved(int id, TQString msgId ) { if (!isUpdatesEnabled()) return; @@ -1052,8 +1052,8 @@ void KMHeaders::msgRemoved(int id, QString msgId ) * item once this one is removed. Sine we have already selected * something in prepare/finalizeMove that's counter productive */ - disconnect( this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(highlightMessage(QListViewItem*))); + disconnect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(highlightMessage(TQListViewItem*))); HeaderItem *removedItem = mItems[id]; if (!removedItem) return; @@ -1078,14 +1078,14 @@ void KMHeaders::msgRemoved(int id, QString msgId ) removedItem->sortCacheItem()->subjectThreadingList()->removeRef( removedItem->sortCacheItem() ); // Reparent children of item. - QListViewItem *myParent = removedItem; - QListViewItem *myChild = myParent->firstChild(); - QListViewItem *threadRoot = myParent; + TQListViewItem *myParent = removedItem; + TQListViewItem *myChild = myParent->firstChild(); + TQListViewItem *threadRoot = myParent; while (threadRoot->parent()) threadRoot = threadRoot->parent(); - QString key = static_cast<HeaderItem*>(threadRoot)->key(mSortCol, !mSortDescending); + TQString key = static_cast<HeaderItem*>(threadRoot)->key(mSortCol, !mSortDescending); - QPtrList<QListViewItem> childList; + TQPtrList<TQListViewItem> childList; while (myChild) { HeaderItem *item = static_cast<HeaderItem*>(myChild); // Just keep the item at top level, if it will be deleted anyhow @@ -1100,14 +1100,14 @@ void KMHeaders::msgRemoved(int id, QString msgId ) } item->setTempKey( key + item->key( mSortCol, !mSortDescending )); if (mSortInfo.fakeSort) { - QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int))); + TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int))); KListView::setSorting(mSortCol, !mSortDescending ); mSortInfo.fakeSort = 0; } } - for (QPtrListIterator<QListViewItem> it(childList); it.current() ; ++it ) { - QListViewItem *lvi = *it; + for (TQPtrListIterator<TQListViewItem> it(childList); it.current() ; ++it ) { + TQListViewItem *lvi = *it; HeaderItem *item = static_cast<HeaderItem*>(lvi); SortCacheItem *sci = item->sortCacheItem(); SortCacheItem *parent = findParent( sci ); @@ -1164,8 +1164,8 @@ void KMHeaders::msgRemoved(int id, QString msgId ) } } /* restore signal */ - connect( this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(highlightMessage(QListViewItem*))); + connect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(highlightMessage(TQListViewItem*))); } @@ -1194,23 +1194,23 @@ void KMHeaders::setMsgStatus (KMMsgStatus status, bool toggle) } -QPtrList<QListViewItem> KMHeaders::currentThread() const +TQPtrList<TQListViewItem> KMHeaders::currentThread() const { - if (!mFolder) return QPtrList<QListViewItem>(); + if (!mFolder) return TQPtrList<TQListViewItem>(); // starting with the current item... - QListViewItem *curItem = currentItem(); - if (!curItem) return QPtrList<QListViewItem>(); + TQListViewItem *curItem = currentItem(); + if (!curItem) return TQPtrList<TQListViewItem>(); // ...find the top-level item: - QListViewItem *topOfThread = curItem; + TQListViewItem *topOfThread = curItem; while ( topOfThread->parent() ) topOfThread = topOfThread->parent(); // collect the items in this thread: - QPtrList<QListViewItem> list; - QListViewItem *topOfNextThread = topOfThread->nextSibling(); - for ( QListViewItemIterator it( topOfThread ) ; + TQPtrList<TQListViewItem> list; + TQListViewItem *topOfNextThread = topOfThread->nextSibling(); + for ( TQListViewItemIterator it( topOfThread ) ; it.current() && it.current() != topOfNextThread ; ++it ) list.append( it.current() ); return list; @@ -1218,16 +1218,16 @@ QPtrList<QListViewItem> KMHeaders::currentThread() const void KMHeaders::setThreadStatus(KMMsgStatus status, bool toggle) { - QPtrList<QListViewItem> curThread; + TQPtrList<TQListViewItem> curThread; if (mFolder) { - QPtrList<QListViewItem> topOfThreads; + TQPtrList<TQListViewItem> topOfThreads; // for each selected item... - for (QListViewItem *item = firstChild(); item; item = item->itemBelow()) + for (TQListViewItem *item = firstChild(); item; item = item->itemBelow()) if (item->isSelected() ) { // ...find the top-level item: - QListViewItem *top = item; + TQListViewItem *top = item; while ( top->parent() ) top = top->parent(); if (!topOfThreads.contains(top)) { @@ -1236,19 +1236,19 @@ void KMHeaders::setThreadStatus(KMMsgStatus status, bool toggle) } // for each thread found... - for ( QPtrListIterator<QListViewItem> it( topOfThreads ) ; + for ( TQPtrListIterator<TQListViewItem> it( topOfThreads ) ; it.current() ; ++ it ) { - QListViewItem *top = *it; + TQListViewItem *top = *it; // collect the items in this thread: - QListViewItem *topOfNextThread = top->nextSibling(); - for ( QListViewItemIterator it( top ) ; + TQListViewItem *topOfNextThread = top->nextSibling(); + for ( TQListViewItemIterator it( top ) ; it.current() && it.current() != topOfNextThread ; ++it ) curThread.append( it.current() ); } } - QPtrListIterator<QListViewItem> it( curThread ); + TQPtrListIterator<TQListViewItem> it( curThread ); SerNumList serNums; for ( it.toFirst() ; it.current() ; ++it ) { @@ -1272,7 +1272,7 @@ int KMHeaders::slotFilterMsg(KMMessage *msg) int filterResult = kmkernel->filterMgr()->process(msg,KMFilterMgr::Explicit); 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 @@ -1291,7 +1291,7 @@ void KMHeaders::slotExpandOrCollapseThread( bool expand ) { if ( !isThreaded() ) return; // find top-level parent of currentItem(). - QListViewItem *item = currentItem(); + TQListViewItem *item = currentItem(); if ( !item ) return; clearSelection(); item->setSelected( true ); @@ -1308,17 +1308,17 @@ void KMHeaders::slotExpandOrCollapseAllThreads( bool expand ) { if ( !isThreaded() ) return; - QListViewItem * item = currentItem(); + TQListViewItem * item = currentItem(); if( item ) { clearSelection(); item->setSelected( true ); } - for ( QListViewItem *item = firstChild() ; + for ( TQListViewItem *item = firstChild() ; item ; item = item->nextSibling() ) static_cast<HeaderItem*>(item)->setOpenRecursive( expand ); if ( !expand ) { // collapse can hide the current item: - QListViewItem * item = currentItem(); + TQListViewItem * item = currentItem(); if( item ) { while ( item->parent() ) item = item->parent(); @@ -1334,9 +1334,9 @@ void KMHeaders::setStyleDependantFrameWidth() // set the width of the frame to a reasonable value for the current GUI style int frameWidth; if( style().isA("KeramikStyle") ) - frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1; + frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1; else - frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ); + frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ); if ( frameWidth < 0 ) frameWidth = 0; if ( frameWidth != lineWidth() ) @@ -1344,7 +1344,7 @@ void KMHeaders::setStyleDependantFrameWidth() } //----------------------------------------------------------------------------- -void KMHeaders::styleChange( QStyle& oldStyle ) +void KMHeaders::styleChange( TQStyle& oldStyle ) { setStyleDependantFrameWidth(); KListView::styleChange( oldStyle ); @@ -1354,7 +1354,7 @@ void KMHeaders::styleChange( QStyle& oldStyle ) void KMHeaders::setFolderInfoStatus () { if ( !mFolder ) return; - QString str; + TQString str; const int unread = mFolder->countUnread(); if ( static_cast<KMFolder*>(mFolder) == kmkernel->outboxFolder() ) str = unread ? i18n( "1 unsent", "%n unsent", unread ) : i18n( "0 unsent" ); @@ -1375,13 +1375,13 @@ void KMHeaders::applyFiltersOnMsg() kmkernel->filterMgr()->atLeastOneOnlineImapFolderTarget()) { // uses action scheduler KMFilterMgr::FilterSet set = KMFilterMgr::Explicit; - QValueList<KMFilter*> filters = kmkernel->filterMgr()->filters(); + TQValueList<KMFilter*> filters = kmkernel->filterMgr()->filters(); ActionScheduler *scheduler = new ActionScheduler( set, filters, this ); scheduler->setAutoDestruct( true ); int contentX, contentY; HeaderItem *nextItem = prepareMove( &contentX, &contentY ); - QPtrList<KMMsgBase> msgList = *selectedMsgs(true); + TQPtrList<KMMsgBase> msgList = *selectedMsgs(true); finalizeMove( nextItem, contentX, contentY ); for (KMMsgBase *msg = msgList.first(); msg; msg = msgList.next()) @@ -1391,7 +1391,7 @@ void KMHeaders::applyFiltersOnMsg() HeaderItem *nextItem = prepareMove( &contentX, &contentY ); //prevent issues with stale message pointers by using serial numbers instead - QValueList<unsigned long> serNums = KMMsgDict::serNumList( *selectedMsgs() ); + TQValueList<unsigned long> serNums = KMMsgDict::serNumList( *selectedMsgs() ); if ( serNums.isEmpty() ) return; @@ -1407,15 +1407,15 @@ void KMHeaders::applyFiltersOnMsg() i18n( "Filtering messages" ) ); progressItem->setTotalItems( msgCountToFilter ); - for ( QValueList<unsigned long>::ConstIterator it = serNums.constBegin(); + for ( TQValueList<unsigned long>::ConstIterator it = serNums.constBegin(); it != serNums.constEnd(); ++it ) { msgCount++; if ( msgCountToFilter - msgCount < 10 || !( msgCount % 20 ) || msgCount <= 10 ) { progressItem->updateProgress(); - QString statusMsg = i18n("Filtering message %1 of %2"); + TQString statusMsg = i18n("Filtering message %1 of %2"); statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter ); KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg ); - KApplication::kApplication()->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 50 ); + KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 ); } KMFolder *folder = 0; @@ -1430,8 +1430,8 @@ void KMHeaders::applyFiltersOnMsg() msg->setTransferInProgress(true); if (!msg->isComplete()) { FolderJob *job = mFolder->createJob(msg); - connect(job, SIGNAL(messageRetrieved(KMMessage*)), - this, SLOT(slotFilterMsg(KMMessage*))); + connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + this, TQT_SLOT(slotFilterMsg(KMMessage*))); job->start(); } else { if (slotFilterMsg(msg) == 2) @@ -1481,8 +1481,8 @@ void KMHeaders::deleteMsg () finalizeMove( nextItem, contentX, contentY ); KMCommand *command = new KMDeleteMsgCommand( mFolder, msgList ); - connect( command, SIGNAL( completed( KMCommand * ) ), - this, SLOT( slotMoveCompleted( KMCommand * ) ) ); + connect( command, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( slotMoveCompleted( KMCommand * ) ) ); command->start(); BroadcastStatus::instance()->setStatusMsg(""); @@ -1503,10 +1503,10 @@ HeaderItem* KMHeaders::prepareMove( int *contentX, int *contentY ) HeaderItem *ret = 0; emit maybeDeleting(); - disconnect( this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(highlightMessage(QListViewItem*))); + disconnect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(highlightMessage(TQListViewItem*))); - QListViewItem *curItem; + TQListViewItem *curItem; HeaderItem *item; curItem = currentItem(); while (curItem && curItem->isSelected() && curItem->itemBelow()) @@ -1540,8 +1540,8 @@ void KMHeaders::finalizeMove( HeaderItem *item, int contentX, int contentY ) setContentsPos( contentX, contentY ); makeHeaderVisible(); - connect( this, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(highlightMessage(QListViewItem*))); + connect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(highlightMessage(TQListViewItem*))); } @@ -1570,8 +1570,8 @@ void KMHeaders::moveMsgToFolder ( KMFolder* destFolder, bool askForConfirmation finalizeMove( nextItem, contentX, contentY ); KMCommand *command = new KMMoveCommand( destFolder, msgList ); - connect( command, SIGNAL( completed( KMCommand * ) ), - this, SLOT( slotMoveCompleted( KMCommand * ) ) ); + connect( command, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( slotMoveCompleted( KMCommand * ) ) ); command->start(); } @@ -1591,7 +1591,7 @@ void KMHeaders::slotMoveCompleted( KMCommand *command ) * Note: This potentially resets too many items if there is more than one * move going on. Oh well, I suppose no animals will be harmed. * */ - for (QListViewItemIterator it(this); it.current(); it++) { + for (TQListViewItemIterator it(this); it.current(); it++) { HeaderItem *item = static_cast<HeaderItem*>(it.current()); if ( item->aboutToBeDeleted() ) { item->setAboutToBeDeleted ( false ); @@ -1667,7 +1667,7 @@ void KMHeaders::setCurrentMsg(int cur) } //----------------------------------------------------------------------------- -void KMHeaders::setSelected( QListViewItem *item, bool selected ) +void KMHeaders::setSelected( TQListViewItem *item, bool selected ) { if ( !item ) return; @@ -1678,8 +1678,8 @@ void KMHeaders::setSelected( QListViewItem *item, bool selected ) // If the item is the parent of a closed thread recursively select // children . if ( isThreaded() && !item->isOpen() && item->firstChild() ) { - QListViewItem *nextRoot = item->itemBelow(); - QListViewItemIterator it( item->firstChild() ); + TQListViewItem *nextRoot = item->itemBelow(); + TQListViewItemIterator it( item->firstChild() ); for( ; (*it) != nextRoot; ++it ) { if ( (*it)->isVisible() ) (*it)->setSelected( selected ); @@ -1687,9 +1687,9 @@ void KMHeaders::setSelected( QListViewItem *item, bool selected ) } } -void KMHeaders::setSelectedByIndex( QValueList<int> items, bool selected ) +void KMHeaders::setSelectedByIndex( TQValueList<int> items, bool selected ) { - for ( QValueList<int>::Iterator it = items.begin(); it != items.end(); ++it ) + for ( TQValueList<int>::Iterator it = items.begin(); it != items.end(); ++it ) { if ( ((*it) >= 0) && ((*it) < (int)mItems.size()) ) { @@ -1701,7 +1701,7 @@ void KMHeaders::setSelectedByIndex( QValueList<int> items, bool selected ) void KMHeaders::clearSelectableAndAboutToBeDeleted( Q_UINT32 serNum ) { // fugly, but I see no way around it - for (QListViewItemIterator it(this); it.current(); it++) { + for (TQListViewItemIterator it(this); it.current(); it++) { HeaderItem *item = static_cast<HeaderItem*>(it.current()); if ( item->aboutToBeDeleted() ) { KMMsgBase *msgBase = mFolder->getMsgBase( item->msgId() ); @@ -1718,7 +1718,7 @@ void KMHeaders::clearSelectableAndAboutToBeDeleted( Q_UINT32 serNum ) KMMessageList* KMHeaders::selectedMsgs(bool toBeDeleted) { mSelMsgBaseList.clear(); - for (QListViewItemIterator it(this); it.current(); it++) { + for (TQListViewItemIterator it(this); it.current(); it++) { if ( it.current()->isSelected() && it.current()->isVisible() ) { HeaderItem *item = static_cast<HeaderItem*>(it.current()); if ( !item->aboutToBeDeleted() ) { // we are already working on this one @@ -1736,10 +1736,10 @@ KMMessageList* KMHeaders::selectedMsgs(bool toBeDeleted) } //----------------------------------------------------------------------------- -QValueList<int> KMHeaders::selectedItems() +TQValueList<int> KMHeaders::selectedItems() { - QValueList<int> items; - for ( QListViewItemIterator it(this); it.current(); it++ ) + TQValueList<int> items; + for ( TQListViewItemIterator it(this); it.current(); it++ ) { if ( it.current()->isSelected() && it.current()->isVisible() ) { @@ -1754,7 +1754,7 @@ QValueList<int> KMHeaders::selectedItems() int KMHeaders::firstSelectedMsg() const { int selectedMsg = -1; - QListViewItem *item; + TQListViewItem *item; for (item = firstChild(); item; item = item->itemBelow()) if (item->isSelected()) { selectedMsg = (static_cast<HeaderItem*>(item))->msgId(); @@ -1766,7 +1766,7 @@ int KMHeaders::firstSelectedMsg() const //----------------------------------------------------------------------------- void KMHeaders::nextMessage() { - QListViewItem *lvi = currentItem(); + TQListViewItem *lvi = currentItem(); if (lvi && lvi->itemBelow()) { clearSelection(); setSelected( lvi, false ); @@ -1781,10 +1781,10 @@ void KMHeaders::selectNextMessage() KMMessage *cm = currentMsg(); if ( cm && cm->isBeingParsed() ) return; - QListViewItem *lvi = currentItem(); + TQListViewItem *lvi = currentItem(); if( lvi ) { - QListViewItem *below = lvi->itemBelow(); - QListViewItem *temp = lvi; + TQListViewItem *below = lvi->itemBelow(); + TQListViewItem *temp = lvi; if (lvi && below ) { while (temp) { temp->firstChild(); @@ -1803,7 +1803,7 @@ void KMHeaders::selectNextMessage() //----------------------------------------------------------------------------- void KMHeaders::prevMessage() { - QListViewItem *lvi = currentItem(); + TQListViewItem *lvi = currentItem(); if (lvi && lvi->itemAbove()) { clearSelection(); setSelected( lvi, false ); @@ -1818,10 +1818,10 @@ void KMHeaders::selectPrevMessage() KMMessage *cm = currentMsg(); if ( cm && cm->isBeingParsed() ) return; - QListViewItem *lvi = currentItem(); + TQListViewItem *lvi = currentItem(); if( lvi ) { - QListViewItem *above = lvi->itemAbove(); - QListViewItem *temp = lvi; + TQListViewItem *above = lvi->itemAbove(); + TQListViewItem *temp = lvi; if (lvi && above) { while (temp) { @@ -1844,16 +1844,16 @@ void KMHeaders::incCurrentMessage() KMMessage *cm = currentMsg(); if ( cm && cm->isBeingParsed() ) return; - QListViewItem *lvi = currentItem(); + TQListViewItem *lvi = currentItem(); if ( lvi && lvi->itemBelow() ) { - disconnect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); setCurrentItem( lvi->itemBelow() ); ensureCurrentItemVisible(); setFocus(); - connect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); } } @@ -1862,15 +1862,15 @@ void KMHeaders::decCurrentMessage() KMMessage *cm = currentMsg(); if ( cm && cm->isBeingParsed() ) return; - QListViewItem *lvi = currentItem(); + TQListViewItem *lvi = currentItem(); if ( lvi && lvi->itemAbove() ) { - disconnect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); setCurrentItem( lvi->itemAbove() ); ensureCurrentItemVisible(); setFocus(); - connect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); } } @@ -1958,7 +1958,7 @@ int KMHeaders::findUnread(bool aDirNext, int aStartAt, bool onlyNew, bool accept // Find the ancestor of the unread item closest to the // root and recursively sort all of that ancestors children. if (item) { - QListViewItem *next = item; + TQListViewItem *next = item; while (next->parent()) next = next->parent(); next = static_cast<HeaderItem*>(next)->firstChildNonConst(); @@ -2062,7 +2062,7 @@ void KMHeaders::makeHeaderVisible() } //----------------------------------------------------------------------------- -void KMHeaders::highlightMessage(QListViewItem* lvi, bool markitread) +void KMHeaders::highlightMessage(TQListViewItem* lvi, bool markitread) { // shouldnt happen but will crash if it does if (lvi && !lvi->isSelectable()) return; @@ -2104,11 +2104,11 @@ void KMHeaders::highlightMessage(QListViewItem* lvi, bool markitread) void KMHeaders::highlightCurrentThread() { - QPtrList<QListViewItem> curThread = currentThread(); - QPtrListIterator<QListViewItem> it( curThread ); + TQPtrList<TQListViewItem> curThread = currentThread(); + TQPtrListIterator<TQListViewItem> it( curThread ); for ( it.toFirst() ; it.current() ; ++it ) { - QListViewItem *lvi = *it; + TQListViewItem *lvi = *it; lvi->setSelected( true ); lvi->repaint(); } @@ -2118,12 +2118,12 @@ void KMHeaders::resetCurrentTime() { mDate.reset(); // only reset exactly during minute switch - QTimer::singleShot( ( 60-QTime::currentTime().second() ) * 1000, - this, SLOT( resetCurrentTime() ) ); + TQTimer::singleShot( ( 60-TQTime::currentTime().second() ) * 1000, + this, TQT_SLOT( resetCurrentTime() ) ); } //----------------------------------------------------------------------------- -void KMHeaders::selectMessage(QListViewItem* lvi) +void KMHeaders::selectMessage(TQListViewItem* lvi) { HeaderItem *item = static_cast<HeaderItem*>(lvi); if (!item) @@ -2175,11 +2175,11 @@ void KMHeaders::updateMessageList( bool set_selection, bool forceJumpToUnread ) // // Exception: When shift selecting either with mouse or key press the reader // window is updated regardless of whether of not the selection has changed. -void KMHeaders::keyPressEvent( QKeyEvent * e ) +void KMHeaders::keyPressEvent( TQKeyEvent * e ) { bool cntrl = (e->state() & ControlButton ); bool shft = (e->state() & ShiftButton ); - QListViewItem *cur = currentItem(); + TQListViewItem *cur = currentItem(); if (!e || !firstChild()) return; @@ -2200,8 +2200,8 @@ void KMHeaders::keyPressEvent( QKeyEvent * e ) if (cntrl) { if (!shft) - disconnect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); switch (e->key()) { case Key_Down: case Key_Up: @@ -2213,14 +2213,14 @@ void KMHeaders::keyPressEvent( QKeyEvent * e ) KListView::keyPressEvent( e ); } if (!shft) - connect(this,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(highlightMessage(QListViewItem*))); + connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)), + this,TQT_SLOT(highlightMessage(TQListViewItem*))); } } //----------------------------------------------------------------------------- // Handle RMB press, show pop up menu -void KMHeaders::rightButtonPressed( QListViewItem *lvi, const QPoint &, int ) +void KMHeaders::rightButtonPressed( TQListViewItem *lvi, const TQPoint &, int ) { if (!lvi) return; @@ -2233,10 +2233,10 @@ void KMHeaders::rightButtonPressed( QListViewItem *lvi, const QPoint &, int ) } //----------------------------------------------------------------------------- -void KMHeaders::contentsMousePressEvent(QMouseEvent* e) +void KMHeaders::contentsMousePressEvent(TQMouseEvent* e) { mPressPos = e->pos(); - QListViewItem *lvi = itemAt( contentsToViewport( e->pos() )); + TQListViewItem *lvi = itemAt( contentsToViewport( e->pos() )); bool wasSelected = false; bool rootDecoClicked = false; if (lvi) { @@ -2252,8 +2252,8 @@ void KMHeaders::contentsMousePressEvent(QMouseEvent* e) // the thread. In that case, deselect all children, so opening the thread // doesn't cause a flicker. if ( !lvi->isOpen() && lvi->firstChild() ) { - QListViewItem *nextRoot = lvi->itemBelow(); - QListViewItemIterator it( lvi->firstChild() ); + TQListViewItem *nextRoot = lvi->itemBelow(); + TQListViewItemIterator it( lvi->firstChild() ); for( ; (*it) != nextRoot; ++it ) (*it)->setSelected( false ); } @@ -2266,7 +2266,7 @@ void KMHeaders::contentsMousePressEvent(QMouseEvent* e) fixed, we have to deselect hidden items here manually, so the quick search doesn't mess things up. */ if ( e->state() & ShiftButton ) { - QListViewItemIterator it( this, QListViewItemIterator::Invisible ); + TQListViewItemIterator it( this, TQListViewItemIterator::Invisible ); while ( it.current() ) { it.current()->setSelected( false ); ++it; @@ -2323,7 +2323,7 @@ void KMHeaders::contentsMousePressEvent(QMouseEvent* e) } //----------------------------------------------------------------------------- -void KMHeaders::contentsMouseReleaseEvent(QMouseEvent* e) +void KMHeaders::contentsMouseReleaseEvent(TQMouseEvent* e) { if (e->button() != RightButton) KListView::contentsMouseReleaseEvent(e); @@ -2332,16 +2332,16 @@ void KMHeaders::contentsMouseReleaseEvent(QMouseEvent* e) } //----------------------------------------------------------------------------- -void KMHeaders::contentsMouseMoveEvent( QMouseEvent* e ) +void KMHeaders::contentsMouseMoveEvent( TQMouseEvent* e ) { if (mMousePressed && (e->pos() - mPressPos).manhattanLength() > KGlobalSettings::dndEventDelay()) { mMousePressed = false; - QListViewItem *item = itemAt( contentsToViewport(mPressPos) ); + TQListViewItem *item = itemAt( contentsToViewport(mPressPos) ); if ( item ) { MailList mailList; unsigned int count = 0; - for( QListViewItemIterator it(this); it.current(); it++ ) + for( TQListViewItemIterator it(this); it.current(); it++ ) if( it.current()->isSelected() ) { HeaderItem *item = static_cast<HeaderItem*>(it.current()); KMMsgBase *msg = mFolder->getMsgBase(item->msgId()); @@ -2356,15 +2356,15 @@ void KMHeaders::contentsMouseMoveEvent( QMouseEvent* e ) MailListDrag *d = new MailListDrag( mailList, viewport(), new KMTextSource ); // Set pixmap - QPixmap pixmap; + TQPixmap pixmap; if( count == 1 ) - pixmap = QPixmap( DesktopIcon("message", KIcon::SizeSmall) ); + pixmap = TQPixmap( DesktopIcon("message", KIcon::SizeSmall) ); else - pixmap = QPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) ); + pixmap = TQPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) ); // Calculate hotspot (as in Konqueror) if( !pixmap.isNull() ) { - QPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 ); + TQPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 ); d->setPixmap( pixmap, hotspot ); } if ( mFolder->isReadOnly() ) @@ -2375,7 +2375,7 @@ void KMHeaders::contentsMouseMoveEvent( QMouseEvent* e ) } } -void KMHeaders::highlightMessage(QListViewItem* i) +void KMHeaders::highlightMessage(TQListViewItem* i) { highlightMessage( i, false ); } @@ -2387,21 +2387,21 @@ void KMHeaders::slotRMB() mOwner->updateMessageActions(); // check if the user clicked into a status column and only show the respective menues - QListViewItem *item = itemAt( viewport()->mapFromGlobal( QCursor::pos() ) ); + TQListViewItem *item = itemAt( viewport()->mapFromGlobal( TQCursor::pos() ) ); if ( item ) { - int section = header()->sectionAt( viewportToContents( viewport()->mapFromGlobal( QCursor::pos() ) ).x() ); + int section = header()->sectionAt( viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) ).x() ); if ( section == mPaintInfo.flagCol || section == mPaintInfo.importantCol || section == mPaintInfo.todoCol || section == mPaintInfo.statusCol ) { - mOwner->statusMenu()->popup( QCursor::pos() ); + mOwner->statusMenu()->popup( TQCursor::pos() ); return; } if ( section == mPaintInfo.watchedIgnoredCol ) { - mOwner->threadStatusMenu()->popup( QCursor::pos() ); + mOwner->threadStatusMenu()->popup( TQCursor::pos() ); return; } } - QPopupMenu *menu = new QPopupMenu(this); + TQPopupMenu *menu = new TQPopupMenu(this); mMenuToFolder.clear(); @@ -2425,7 +2425,7 @@ void KMHeaders::slotRMB() } menu->insertSeparator(); - QPopupMenu *msgCopyMenu = new QPopupMenu(menu); + TQPopupMenu *msgCopyMenu = new TQPopupMenu(menu); mOwner->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this, &mMenuToFolder, msgCopyMenu ); menu->insertItem(i18n("&Copy To"), msgCopyMenu); @@ -2434,7 +2434,7 @@ void KMHeaders::slotRMB() int id = menu->insertItem( i18n("&Move To") ); menu->setItemEnabled( id, false ); } else { - QPopupMenu *msgMoveMenu = new QPopupMenu(menu); + TQPopupMenu *msgMoveMenu = new TQPopupMenu(menu); mOwner->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage, this, &mMenuToFolder, msgMoveMenu ); menu->insertItem(i18n("&Move To"), msgMoveMenu); @@ -2470,7 +2470,7 @@ void KMHeaders::slotRMB() KAcceleratorManager::manage(menu); kmkernel->setContextMenuShown( true ); - menu->exec(QCursor::pos(), 0); + menu->exec(TQCursor::pos(), 0); kmkernel->setContextMenuShown( false ); delete menu; } @@ -2521,7 +2521,7 @@ void KMHeaders::setCurrentItemByIndex(int msgIdx) //----------------------------------------------------------------------------- int KMHeaders::topItemIndex() { - HeaderItem *item = static_cast<HeaderItem*>( itemAt( QPoint( 1, 1 ) ) ); + HeaderItem *item = static_cast<HeaderItem*>( itemAt( TQPoint( 1, 1 ) ) ); if ( item ) return item->msgId(); else @@ -2533,7 +2533,7 @@ void KMHeaders::setTopItemByIndex( int aMsgIdx) { if ( aMsgIdx < 0 || static_cast<unsigned int>( aMsgIdx ) >= mItems.size() ) return; - const QListViewItem * const item = mItems[aMsgIdx]; + const TQListViewItem * const item = mItems[aMsgIdx]; if ( item ) setContentsPos( 0, itemPos( item ) ); } @@ -2545,8 +2545,8 @@ void KMHeaders::setNestedOverride( bool override ) mNestedOverride = override; setRootIsDecorated( nestingPolicy != AlwaysOpen && isThreaded() ); - QString sortFile = mFolder->indexLocation() + ".sorted"; - unlink(QFile::encodeName(sortFile)); + TQString sortFile = mFolder->indexLocation() + ".sorted"; + unlink(TQFile::encodeName(sortFile)); reset(); } @@ -2555,20 +2555,20 @@ void KMHeaders::setSubjectThreading( bool aSubjThreading ) { mSortInfo.dirty = true; mSubjThreading = aSubjThreading; - QString sortFile = mFolder->indexLocation() + ".sorted"; - unlink(QFile::encodeName(sortFile)); + TQString sortFile = mFolder->indexLocation() + ".sorted"; + unlink(TQFile::encodeName(sortFile)); reset(); } //----------------------------------------------------------------------------- -void KMHeaders::setOpen( QListViewItem *item, bool open ) +void KMHeaders::setOpen( TQListViewItem *item, bool open ) { if ((nestingPolicy != AlwaysOpen)|| open) ((HeaderItem*)item)->setOpenRecursive( open ); } //----------------------------------------------------------------------------- -const KMMsgBase* KMHeaders::getMsgBaseForItem( const QListViewItem *item ) const +const KMMsgBase* KMHeaders::getMsgBaseForItem( const TQListViewItem *item ) const { const HeaderItem *hi = static_cast<const HeaderItem *> ( item ); return mFolder->getMsgBase( hi->msgId() ); @@ -2580,9 +2580,9 @@ void KMHeaders::setSorting( int column, bool ascending ) if (column != -1) { // carsten: really needed? // if (column != mSortCol) -// setColumnText( mSortCol, QIconSet( QPixmap()), columnText( mSortCol )); +// setColumnText( mSortCol, TQIconSet( TQPixmap()), columnText( mSortCol )); if(mSortInfo.dirty || column != mSortInfo.column || ascending != mSortInfo.ascending) { //dirtied - QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int))); + TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int))); mSortInfo.dirty = true; } @@ -2596,7 +2596,7 @@ void KMHeaders::setSorting( int column, bool ascending ) if (!ascending && (column == mPaintInfo.subCol)) mPaintInfo.status = !mPaintInfo.status; - QString colText = i18n( "Date" ); + TQString colText = i18n( "Date" ); if (mPaintInfo.orderOfArrival) colText = i18n( "Order of Arrival" ); setColumnText( mPaintInfo.dateCol, colText); @@ -2618,7 +2618,7 @@ void KMHeaders::setSorting( int column, bool ascending ) //Flatten the list and write it to disk static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid, - int parent_id, QString key, + int parent_id, TQString key, bool update_discover=true) { unsigned long msgSerNum; @@ -2631,7 +2631,7 @@ static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid, fwrite(&msgSerNum, sizeof(msgSerNum), 1, sortStream); fwrite(&parentSerNum, sizeof(parentSerNum), 1, sortStream); - Q_INT32 len = key.length() * sizeof(QChar); + Q_INT32 len = key.length() * sizeof(TQChar); fwrite(&len, sizeof(len), 1, sortStream); if (len) fwrite(key.unicode(), QMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream); @@ -2665,23 +2665,23 @@ void KMHeaders::folderClosed() bool KMHeaders::writeSortOrder() { - QString sortFile = KMAIL_SORT_FILE(mFolder); + TQString sortFile = KMAIL_SORT_FILE(mFolder); if (!mSortInfo.dirty) { struct stat stat_tmp; - if(stat(QFile::encodeName(sortFile), &stat_tmp) == -1) { + if(stat(TQFile::encodeName(sortFile), &stat_tmp) == -1) { mSortInfo.dirty = true; } } if (mSortInfo.dirty) { if (!mFolder->count()) { // Folder is empty now, remove the sort file. - unlink(QFile::encodeName(sortFile)); + unlink(TQFile::encodeName(sortFile)); return true; } - QString tempName = sortFile + ".temp"; - unlink(QFile::encodeName(tempName)); - FILE *sortStream = fopen(QFile::encodeName(tempName), "w"); + TQString tempName = sortFile + ".temp"; + unlink(TQFile::encodeName(tempName)); + FILE *sortStream = fopen(TQFile::encodeName(tempName), "w"); if (!sortStream) return false; @@ -2705,10 +2705,10 @@ bool KMHeaders::writeSortOrder() fwrite(&discovered_count, sizeof(discovered_count), 1, sortStream); fwrite(&sorted_count, sizeof(sorted_count), 1, sortStream); - QPtrStack<HeaderItem> items; + TQPtrStack<HeaderItem> items; { - QPtrStack<QListViewItem> s; - for (QListViewItem * i = firstChild(); i; ) { + TQPtrStack<TQListViewItem> s; + for (TQListViewItem * i = firstChild(); i; ) { items.push((HeaderItem *)i); if ( i->firstChild() ) { s.push( i ); @@ -2730,8 +2730,8 @@ bool KMHeaders::writeSortOrder() assert(kmb); // I have seen 0L come out of this, called from // KMHeaders::setFolder(0xgoodpointer, false); // I see this crash too. after rebuilding a broken index on a dimap folder. always - QString replymd5 = kmb->replyToIdMD5(); - QString replyToAuxId = kmb->replyToAuxIdMD5(); + TQString replymd5 = kmb->replyToIdMD5(); + TQString replyToAuxId = kmb->replyToAuxIdMD5(); SortCacheItem *p = NULL; if(!replymd5.isEmpty()) p = mSortCacheItems[replymd5]; @@ -2768,13 +2768,13 @@ bool KMHeaders::writeSortOrder() fwrite(&sorted_count, sizeof(sorted_count), 1, sortStream); if (sortStream && ferror(sortStream)) { fclose(sortStream); - unlink(QFile::encodeName(sortFile)); + unlink(TQFile::encodeName(sortFile)); kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl; kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl; kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile )); } fclose(sortStream); - ::rename(QFile::encodeName(tempName), QFile::encodeName(sortFile)); + ::rename(TQFile::encodeName(tempName), TQFile::encodeName(sortFile)); } return true; @@ -2782,8 +2782,8 @@ bool KMHeaders::writeSortOrder() void KMHeaders::appendItemToSortFile(HeaderItem *khi) { - QString sortFile = KMAIL_SORT_FILE(mFolder); - if(FILE *sortStream = fopen(QFile::encodeName(sortFile), "r+")) { + TQString sortFile = KMAIL_SORT_FILE(mFolder); + if(FILE *sortStream = fopen(TQFile::encodeName(sortFile), "r+")) { int parent_id = -1; //no parent, top level if (isThreaded()) { @@ -2808,7 +2808,7 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi) if (sortStream && ferror(sortStream)) { fclose(sortStream); - unlink(QFile::encodeName(sortFile)); + unlink(TQFile::encodeName(sortFile)); kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl; kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl; kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile )); @@ -2822,7 +2822,7 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi) void KMHeaders::dirtySortOrder(int column) { mSortInfo.dirty = true; - QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int))); + TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int))); setSorting(column, mSortInfo.column == column ? !mSortInfo.ascending : true); } @@ -2862,11 +2862,11 @@ static int compare_SortCacheItem(const void *s1, const void *s2) // Debugging helpers void KMHeaders::printSubjectThreadingTree() { - QDictIterator< QPtrList< SortCacheItem > > it ( mSubjectLists ); + TQDictIterator< TQPtrList< SortCacheItem > > it ( mSubjectLists ); kdDebug(5006) << "SubjectThreading tree: " << endl; for( ; it.current(); ++it ) { - QPtrList<SortCacheItem> list = *( it.current() ); - QPtrListIterator<SortCacheItem> it2( list ) ; + TQPtrList<SortCacheItem> list = *( it.current() ); + TQPtrListIterator<SortCacheItem> it2( list ) ; kdDebug(5006) << "Subject MD5: " << it.currentKey() << " list: " << endl; for( ; it2.current(); ++it2 ) { SortCacheItem *sci = it2.current(); @@ -2879,7 +2879,7 @@ void KMHeaders::printSubjectThreadingTree() void KMHeaders::printThreadingTree() { kdDebug(5006) << "Threading tree: " << endl; - QDictIterator<SortCacheItem> it( mSortCacheItems ); + TQDictIterator<SortCacheItem> it( mSortCacheItems ); kdDebug(5006) << endl; for( ; it.current(); ++it ) { SortCacheItem *sci = it.current(); @@ -2896,7 +2896,7 @@ void KMHeaders::printThreadingTree() // ------------------------------------- -void KMHeaders::buildThreadingTree( QMemArray<SortCacheItem *> sortCache ) +void KMHeaders::buildThreadingTree( TQMemArray<SortCacheItem *> sortCache ) { mSortCacheItems.clear(); mSortCacheItems.resize( mFolder->count() * 2 ); @@ -2904,14 +2904,14 @@ void KMHeaders::buildThreadingTree( QMemArray<SortCacheItem *> sortCache ) // build a dict of all message id's for(int x = 0; x < mFolder->count(); x++) { KMMsgBase *mi = mFolder->getMsgBase(x); - QString md5 = mi->msgIdMD5(); + TQString md5 = mi->msgIdMD5(); if(!md5.isEmpty()) mSortCacheItems.replace(md5, sortCache[x]); } } -void KMHeaders::buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache ) +void KMHeaders::buildSubjectThreadingTree( TQMemArray<SortCacheItem *> sortCache ) { mSubjectLists.clear(); // autoDelete is true mSubjectLists.resize( mFolder->count() * 2 ); @@ -2921,7 +2921,7 @@ void KMHeaders::buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache if ( sortCache[x]->parent() && sortCache[x]->parent()->id() != -666 ) continue; KMMsgBase *mi = mFolder->getMsgBase(x); - QString subjMD5 = mi->strippedSubjectMD5(); + TQString subjMD5 = mi->strippedSubjectMD5(); if (subjMD5.isEmpty()) { mFolder->getMsgBase(x)->initStrippedSubjectMD5(); subjMD5 = mFolder->getMsgBase(x)->strippedSubjectMD5(); @@ -2931,13 +2931,13 @@ void KMHeaders::buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache /* For each subject, keep a list of items with that subject * (stripped of prefixes) sorted by date. */ if (!mSubjectLists.find(subjMD5)) - mSubjectLists.insert(subjMD5, new QPtrList<SortCacheItem>()); + mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>()); /* Insertion sort by date. These lists are expected to be very small. * Also, since the messages are roughly ordered by date in the store, * they should mostly be prepended at the very start, so insertion is * cheap. */ int p=0; - for (QPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]); + for (TQPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]); it.current(); ++it) { KMMsgBase *mb = mFolder->getMsgBase((*it)->id()); if ( mb->date() < mi->date()) @@ -2955,7 +2955,7 @@ SortCacheItem* KMHeaders::findParent(SortCacheItem *item) SortCacheItem *parent = NULL; if (!item) return parent; KMMsgBase *msg = mFolder->getMsgBase(item->id()); - QString replyToIdMD5 = msg->replyToIdMD5(); + TQString replyToIdMD5 = msg->replyToIdMD5(); item->setImperfectlyThreaded(true); /* First, try if the message our Reply-To header points to * is available to thread below. */ @@ -2971,7 +2971,7 @@ SortCacheItem* KMHeaders::findParent(SortCacheItem *item) // example, try the list of references, because the second // to last will likely be in this folder. replyToAuxIdMD5 // contains the second to last one. - QString ref = msg->replyToAuxIdMD5(); + TQString ref = msg->replyToAuxIdMD5(); if (!ref.isEmpty()) parent = mSortCacheItems[ref]; } @@ -2991,12 +2991,12 @@ SortCacheItem* KMHeaders::findParentBySubject(SortCacheItem *item) if (!msg->subjectIsPrefixed()) return parent; - QString replyToIdMD5 = msg->replyToIdMD5(); - QString subjMD5 = msg->strippedSubjectMD5(); + TQString replyToIdMD5 = msg->replyToIdMD5(); + TQString subjMD5 = msg->strippedSubjectMD5(); if (!subjMD5.isEmpty() && mSubjectLists[subjMD5]) { /* Iterate over the list of potential parents with the same * subject, and take the closest one by date. */ - for (QPtrListIterator<SortCacheItem> it2(*mSubjectLists[subjMD5]); + for (TQPtrListIterator<SortCacheItem> it2(*mSubjectLists[subjMD5]); it2.current(); ++it2) { KMMsgBase *mb = mFolder->getMsgBase((*it2)->id()); if ( !mb ) return parent; @@ -3027,11 +3027,11 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) bool jumpToUnread = (GlobalSettings::self()->actionEnterFolder() == GlobalSettings::EnumActionEnterFolder::SelectFirstUnreadNew) || forceJumpToUnread; - QMemArray<SortCacheItem *> sortCache(mFolder->count()); + TQMemArray<SortCacheItem *> sortCache(mFolder->count()); bool error = false; //threaded cases - QPtrList<SortCacheItem> unparented; + TQPtrList<SortCacheItem> unparented; mImperfectlyThreadedList.clear(); //cleanup @@ -3040,8 +3040,8 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) mRoot->clearChildren(); - QString sortFile = KMAIL_SORT_FILE(mFolder); - FILE *sortStream = fopen(QFile::encodeName(sortFile), "r+"); + TQString sortFile = KMAIL_SORT_FILE(mFolder); + FILE *sortStream = fopen(TQFile::encodeName(sortFile), "r+"); mSortInfo.fakeSort = 0; if(sortStream) { @@ -3064,7 +3064,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) //Hackyness to work around qlistview problems KListView::setSorting(-1); header()->setSortIndicator(column, ascending); - QObject::connect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int))); + TQObject::connect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int))); //setup mSortInfo here now, as above may change it mSortInfo.dirty = false; mSortInfo.column = (short)column; @@ -3073,10 +3073,10 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) SortCacheItem *item; unsigned long serNum, parentSerNum; int id, len, parent, x; - QChar *tmp_qchar = 0; + TQChar *tmp_qchar = 0; int tmp_qchar_len = 0; const int mFolderCount = mFolder->count(); - QString key; + TQString key; CREATE_TIMER(parse); START_TIMER(parse); @@ -3096,14 +3096,14 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) } if(len) { if(len > tmp_qchar_len) { - tmp_qchar = (QChar *)realloc(tmp_qchar, len); + tmp_qchar = (TQChar *)realloc(tmp_qchar, len); tmp_qchar_len = len; } if(!fread(tmp_qchar, len, 1, sortStream)) break; - key = QString(tmp_qchar, len / 2); + key = TQString(tmp_qchar, len / 2); } else { - key = QString(""); //yuck + key = TQString(""); //yuck } KMMsgDict::instance()->getLocation(serNum, &folder, &id); @@ -3215,13 +3215,13 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) // Make sure we've placed everything in parent/child relationship. All // messages with a parent id of -1 in the sort file are reevaluated here. if (threaded) buildThreadingTree( sortCache ); - QPtrList<SortCacheItem> toBeSubjThreaded; + TQPtrList<SortCacheItem> toBeSubjThreaded; if (threaded && !unparented.isEmpty()) { CREATE_TIMER(reparent); START_TIMER(reparent); - for(QPtrListIterator<SortCacheItem> it(unparented); it.current(); ++it) { + for(TQPtrListIterator<SortCacheItem> it(unparented); it.current(); ++it) { SortCacheItem *item = (*it); SortCacheItem *parent = findParent( item ); // If we have a parent, make sure it's not ourselves @@ -3241,7 +3241,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) if (mSubjThreading) { buildSubjectThreadingTree( sortCache ); - for(QPtrListIterator<SortCacheItem> it(toBeSubjThreaded); it.current(); ++it) { + for(TQPtrListIterator<SortCacheItem> it(toBeSubjThreaded); it.current(); ++it) { SortCacheItem *item = (*it); SortCacheItem *parent = findParentBySubject( item ); @@ -3263,12 +3263,12 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) START_TIMER(header_creation); HeaderItem *khi; SortCacheItem *i, *new_kci; - QPtrQueue<SortCacheItem> s; + TQPtrQueue<SortCacheItem> s; s.enqueue(mRoot); compare_toplevel = true; do { i = s.dequeue(); - const QPtrList<SortCacheItem> *sorted = i->sortedChildren(); + const TQPtrList<SortCacheItem> *sorted = i->sortedChildren(); int unsorted_count, unsorted_off=0; SortCacheItem **unsorted = i->unsortedChildren(unsorted_count); if(unsorted) @@ -3279,7 +3279,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) * the (aptly named) unsorted array contains all as of yet unsorted * ones. It has just been qsorted, so it is in itself sorted. These two * sorted lists are now merged into one. */ - for(QPtrListIterator<SortCacheItem> it(*sorted); + for(TQPtrListIterator<SortCacheItem> it(*sorted); (unsorted && unsorted_off < unsorted_count) || it.current(); ) { /* As long as we have something in the sorted list and there is nothing unsorted left, use the item from the sorted list. Also @@ -3426,7 +3426,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread ) if (error || (sortStream && ferror(sortStream))) { if ( sortStream ) fclose(sortStream); - unlink(QFile::encodeName(sortFile)); + unlink(TQFile::encodeName(sortFile)); kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl; kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl; @@ -3515,7 +3515,7 @@ void KMHeaders::updateActions() paste->setEnabled( true ); } -void KMHeaders::setCopiedMessages(const QValueList< Q_UINT32 > & msgs, bool move) +void KMHeaders::setCopiedMessages(const TQValueList< Q_UINT32 > & msgs, bool move) { mCopiedMessages = msgs; mMoveMessages = move; @@ -3527,10 +3527,10 @@ bool KMHeaders::isMessageCut(Q_UINT32 serNum) const return mMoveMessages && mCopiedMessages.contains( serNum ); } -QValueList< Q_UINT32 > KMHeaders::selectedSernums() +TQValueList< Q_UINT32 > KMHeaders::selectedSernums() { - QValueList<Q_UINT32> list; - for ( QListViewItemIterator it(this); it.current(); it++ ) { + TQValueList<Q_UINT32> list; + for ( TQListViewItemIterator it(this); it.current(); it++ ) { if ( it.current()->isSelected() && it.current()->isVisible() ) { HeaderItem* item = static_cast<HeaderItem*>( it.current() ); KMMsgBase *msgBase = mFolder->getMsgBase( item->msgId() ); @@ -3540,20 +3540,20 @@ QValueList< Q_UINT32 > KMHeaders::selectedSernums() return list; } -QValueList< Q_UINT32 > KMHeaders::selectedVisibleSernums() +TQValueList< Q_UINT32 > KMHeaders::selectedVisibleSernums() { - QValueList<Q_UINT32> list; - QListViewItemIterator it(this, QListViewItemIterator::Selected|QListViewItemIterator::Visible); + TQValueList<Q_UINT32> list; + TQListViewItemIterator it(this, TQListViewItemIterator::Selected|TQListViewItemIterator::Visible); while( it.current() ) { if ( it.current()->isSelected() && it.current()->isVisible() ) { if ( it.current()->parent() && ( !it.current()->parent()->isOpen() ) ) { // the item's parent is closed, don't traverse any more of this subtree - QListViewItem * lastAncestorWithSiblings = it.current()->parent(); + TQListViewItem * lastAncestorWithSiblings = it.current()->parent(); // travel towards the root until we find an ancestor with siblings while ( ( lastAncestorWithSiblings->depth() > 0 ) && !lastAncestorWithSiblings->nextSibling() ) lastAncestorWithSiblings = lastAncestorWithSiblings->parent(); // move the iterator to that ancestor's next sibling - it = QListViewItemIterator( lastAncestorWithSiblings->nextSibling() ); + it = TQListViewItemIterator( lastAncestorWithSiblings->nextSibling() ); continue; } HeaderItem *item = static_cast<HeaderItem*>(it.current()); diff --git a/kmail/kmheaders.h b/kmail/kmheaders.h index 40487f8d9..bb49a1440 100644 --- a/kmail/kmheaders.h +++ b/kmail/kmheaders.h @@ -12,13 +12,13 @@ using KMail::HeaderItem; #include <kfoldertree.h> // for KPaintInfo #include <kmmsgbase.h> // for KMMsgStatus -#include <qwidget.h> -#include <qstrlist.h> -#include <qmemarray.h> -#include <qmap.h> -#include <qdragobject.h> -#include <qdict.h> -#include <qguardedptr.h> +#include <tqwidget.h> +#include <tqstrlist.h> +#include <tqmemarray.h> +#include <tqmap.h> +#include <tqdragobject.h> +#include <tqdict.h> +#include <tqguardedptr.h> class KMFolder; class KMMessage; @@ -31,9 +31,9 @@ class QPixmap; class QIconSet; class QDateTime; -typedef QPtrList<KMMsgBase> KMMessageList; -typedef QValueList<Q_UINT32> SerNumList; -typedef QMap<int,KMFolder*> KMMenuToFolder; +typedef TQPtrList<KMMsgBase> KMMessageList; +typedef TQValueList<Q_UINT32> SerNumList; +typedef TQMap<int,KMFolder*> KMMenuToFolder; enum NestingPolicy { AlwaysOpen = 0, DefaultOpen, DefaultClosed, OpenUnread }; @@ -52,7 +52,7 @@ class KMHeaders : public KListView friend class ::KMail::HeaderItem; // For easy access to the pixmaps public: - KMHeaders(KMMainWidget *owner, QWidget *parent=0, const char *name=0); + KMHeaders(KMMainWidget *owner, TQWidget *parent=0, const char *name=0); virtual ~KMHeaders(); /** A new folder has been selected update the list of headers shown @@ -72,7 +72,7 @@ public: virtual void setCurrentMsg(int msgId); /** Get a list of all items in the current thread */ - QPtrList<QListViewItem> currentThread() const; + TQPtrList<TQListViewItem> currentThread() const; /** Set all messages in the current thread to status @p status or toggle it, if specified. */ @@ -108,15 +108,15 @@ public: virtual KMMessageList* selectedMsgs(bool toBeDeleted = false); /** Returns the index values of currently selected items */ - QValueList<int> selectedItems(); + TQValueList<int> selectedItems(); /** Returns the sernums of all selected items. */ - QValueList<Q_UINT32> selectedSernums(); + TQValueList<Q_UINT32> selectedSernums(); /** Returns the sernums of all visible (ie. items with expanded parent, not hidden by eg. the quick search) selected items. */ - QValueList<Q_UINT32> selectedVisibleSernums(); + TQValueList<Q_UINT32> selectedVisibleSernums(); /** Returns index of message returned by last getMsg() call */ int indexOfGetMsg (void) const { return getMsgIndex; } @@ -151,7 +151,7 @@ public: virtual void setNestedOverride( bool override ); virtual void setSubjectThreading( bool subjThreading ); /** Double force items to always be open */ - virtual void setOpen ( QListViewItem *, bool ); + virtual void setOpen ( TQListViewItem *, bool ); NestingPolicy getNestingPolicy() const { return nestingPolicy; } /** Returns true if the current header list is threaded. */ @@ -163,33 +163,33 @@ public: is unset. */ virtual int findUnread(bool findNext, int startAt=-1, bool onlyNew = false, bool acceptCurrent = false); - void highlightMessage(QListViewItem*, bool markitread); + void highlightMessage(TQListViewItem*, bool markitread); void highlightCurrentThread(); /** return a string relativ to the current time */ - static QString fancyDate( time_t otime ); + static TQString fancyDate( time_t otime ); bool noRepaint; // filter events for popup - bool eventFilter ( QObject *o, QEvent *e ); + bool eventFilter ( TQObject *o, TQEvent *e ); /** gets the message represented by the item as a KMMsgBase. */ - const KMMsgBase * getMsgBaseForItem( const QListViewItem *item ) const; + const KMMsgBase * getMsgBaseForItem( const TQListViewItem *item ) const; // accessors - QFont newFont() const { return mNewFont; } - QFont unreadFont() const { return mUnreadFont; } - QFont importantFont() const { return mImportantFont; } - QFont todoFont() const { return mTodoFont; } - QFont dateFont() const { return mDateFont; } + TQFont newFont() const { return mNewFont; } + TQFont unreadFont() const { return mUnreadFont; } + TQFont importantFont() const { return mImportantFont; } + TQFont todoFont() const { return mTodoFont; } + TQFont dateFont() const { return mDateFont; } /** Sets the list of copied/cutted messages. @param msgs A list of serial numbers. @param move if true, the messages were cutted */ - void setCopiedMessages( const QValueList<Q_UINT32> &msgs, bool move ); + void setCopiedMessages( const TQValueList<Q_UINT32> &msgs, bool move ); /** Returns true if the message with the given serial number has been cut. @@ -214,13 +214,13 @@ signals: * from the ctor of the item, at which point the building of the item * is not yet far enough along to update the quick search, which is * what is connected to this signal. */ - void msgAddedToListView( QListViewItem* ); + void msgAddedToListView( TQListViewItem* ); public slots: /** For when a list view item has been double clicked */ - void selectMessage(QListViewItem*); + void selectMessage(TQListViewItem*); /** For when a list view item has been selected */ - void highlightMessage(QListViewItem*); + void highlightMessage(TQListViewItem*); /** For when righ mouse button is pressed */ void slotRMB(); /** Refresh list view item corresponding to the messae with the given id */ @@ -234,7 +234,7 @@ public slots: /** For when the message with the given message id has been added to a folder */ void msgAdded(int); /** For when the message with the given id has been removed for a folder */ - void msgRemoved( int, QString ); + void msgRemoved( int, TQString ); /** Make the next header visible scrolling if necessary */ void nextMessage(); /** Same as nextMessage() but don't clear the current selection */ @@ -274,12 +274,12 @@ public slots: /** Select an item and if it is the parent of a closed thread, also recursively select its children. */ - virtual void setSelected(QListViewItem *item, bool selected); + virtual void setSelected(TQListViewItem *item, bool selected); /** Select several items by message index * and if they are the parent of a closed thread, also * recursively select their children. */ - void setSelectedByIndex(QValueList<int> items, bool selected); + void setSelectedByIndex(TQValueList<int> items, bool selected); /** switch a column with the given id (see KPaintInfo enum) 1 for activate, 0 for deactivate, -1 for toggle*/ @@ -289,7 +289,7 @@ public slots: void setFolderInfoStatus(); protected: - static QPixmap *pixNew, *pixUns, *pixDel, *pixRead, *pixRep, *pixSent, + static TQPixmap *pixNew, *pixUns, *pixDel, *pixRead, *pixRep, *pixSent, *pixQueued, *pixFwd, *pixFlag, *pixWatched, *pixIgnored, *pixSpam, *pixHam, *pixFullySigned, *pixPartiallySigned, *pixUndefinedSigned, *pixFullyEncrypted, *pixPartiallyEncrypted, *pixUndefinedEncrypted, @@ -298,10 +298,10 @@ protected: *pixReadFwd, *pixReadReplied, *pixReadFwdReplied,*pixTodo; /** Look for color changes */ - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); /** Overridden to support backing pixmap */ - virtual void paintEmptyArea( QPainter * p, const QRect & rect ); + virtual void paintEmptyArea( TQPainter * p, const TQRect & rect ); /** Ensure the current item is visible */ void makeHeaderVisible(); @@ -325,19 +325,19 @@ protected: virtual void writeConfig(void); /** Handle shift and control selection */ - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent* e); - virtual void keyPressEvent( QKeyEvent * e ); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent* e); + virtual void keyPressEvent( TQKeyEvent * e ); /** Called when a header is clicked */ virtual void setSorting( int column, bool ascending = true); /** To initiate a drag operation */ - void contentsMouseMoveEvent( QMouseEvent *e ); + void contentsMouseMoveEvent( TQMouseEvent *e ); /** reimplemented in order to update the frame width in case of a changed GUI style */ - void styleChange( QStyle& oldStyle ); + void styleChange( TQStyle& oldStyle ); /** Set the width of the frame to a reasonable value for the current GUI style */ @@ -354,7 +354,7 @@ protected slots: /** dirties the sort order */ void dirtySortOrder(int); /** show context menu */ - void rightButtonPressed( QListViewItem *, const QPoint &, int ); + void rightButtonPressed( TQListViewItem *, const TQPoint &, int ); private slots: void slotMoveCompleted( KMCommand * ); @@ -372,7 +372,7 @@ private: bool forceJumpToUnread = false ); /** Currently associated folder */ - QGuardedPtr<KMFolder> mFolder; + TQGuardedPtr<KMFolder> mFolder; /** The KMMainWin for status bar updates */ KMMainWidget* mOwner; /** Top most visible item */ @@ -382,7 +382,7 @@ private: /** Serial number of the current item */ unsigned long mCurrentItemSerNum; /** Map messages ids into HeaderItems */ - QMemArray<HeaderItem*> mItems; + TQMemArray<HeaderItem*> mItems; // ===== threading and sorting ========== bool mNested, mNestedOverride, mSubjThreading; @@ -400,19 +400,19 @@ private: /** */ - QDict< SortCacheItem > mSortCacheItems; + TQDict< SortCacheItem > mSortCacheItems; /** */ - QDict< QPtrList< SortCacheItem > > mSubjectLists; + TQDict< TQPtrList< SortCacheItem > > mSubjectLists; /** */ - QPtrList<HeaderItem> mImperfectlyThreadedList; + TQPtrList<HeaderItem> mImperfectlyThreadedList; /** Debugging helpers for outputting the threading data structures. */ void printSubjectThreadingTree( ); void printThreadingTree( ); /** Initializes the mSortCacheItems tree with the contents of the folder */ - void buildThreadingTree( QMemArray<SortCacheItem *> sortCache ); + void buildThreadingTree( TQMemArray<SortCacheItem *> sortCache ); /** Initializes the mSubjectLists tree with the contents of the folder */ - void buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache ); + void buildSubjectThreadingTree( TQMemArray<SortCacheItem *> sortCache ); /** Find a msg to thread item below */ SortCacheItem* findParent(SortCacheItem *item); /** Find a msg to thread item below by subject */ @@ -440,17 +440,17 @@ private: /** Current colours and backing pixmap */ KPaintInfo mPaintInfo; - QFont mNewFont, mUnreadFont, mImportantFont, mDateFont,mTodoFont; + TQFont mNewFont, mUnreadFont, mImportantFont, mDateFont,mTodoFont; /** Icons shown in header */ - static QIconSet *up, *down; + static TQIconSet *up, *down; /** Map menu id into a folder */ KMMenuToFolder mMenuToFolder; /** Drag and drop support */ bool mMousePressed; /** ditto */ - QPoint mPressPos; + TQPoint mPressPos; KMime::DateFormatter mDate; bool mReaderWindowActive; @@ -459,7 +459,7 @@ private: KPopupMenu* mPopup; // copied messages - QValueList<Q_UINT32> mCopiedMessages; + TQValueList<Q_UINT32> mCopiedMessages; bool mMoveMessages; }; // class #endif diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp index a686cffd6..9bff9a72c 100644 --- a/kmail/kmkernel.cpp +++ b/kmail/kmkernel.cpp @@ -72,10 +72,10 @@ using KWallet::Wallet; #include "actionscheduler.h" #include <qutf7codec.h> -#include <qvbox.h> -#include <qdir.h> -#include <qwidgetlist.h> -#include <qobjectlist.h> +#include <tqvbox.h> +#include <tqdir.h> +#include <tqwidgetlist.h> +#include <tqobjectlist.h> #include <sys/types.h> #include <dirent.h> @@ -95,8 +95,8 @@ KMKernel *KMKernel::mySelf = 0; /********************************************************************/ /* Constructor and destructor */ /********************************************************************/ -KMKernel::KMKernel (QObject *parent, const char *name) : - DCOPObject("KMailIface"), QObject(parent, name), +KMKernel::KMKernel (TQObject *parent, const char *name) : + DCOPObject("KMailIface"), TQObject(parent, name), mIdentityManager(0), mConfigureDialog(0), mContextMenuShown( false ), mWallet( 0 ) { @@ -145,7 +145,7 @@ KMKernel::KMKernel (QObject *parent, const char *name) : // register our own (libkdenetwork) utf-7 codec as long as Qt // doesn't have it's own: - if ( !QTextCodec::codecForName("utf-7") ) { + if ( !TQTextCodec::codecForName("utf-7") ) { kdDebug(5006) << "No Qt-native utf-7 codec found; registering QUtf7Codec from libkdenetwork" << endl; (void) new QUtf7Codec(); } @@ -153,24 +153,24 @@ KMKernel::KMKernel (QObject *parent, const char *name) : // In the case of Japan. Japanese locale name is "eucjp" but // The Japanese mail systems normally used "iso-2022-jp" of locale name. // We want to change locale name from eucjp to iso-2022-jp at KMail only. - if ( QCString(QTextCodec::codecForLocale()->name()).lower() == "eucjp" ) + if ( TQCString(TQTextCodec::codecForLocale()->name()).lower() == "eucjp" ) { - netCodec = QTextCodec::codecForName("jis7"); - // QTextCodec *cdc = QTextCodec::codecForName("jis7"); - // QTextCodec::setCodecForLocale(cdc); + netCodec = TQTextCodec::codecForName("jis7"); + // TQTextCodec *cdc = TQTextCodec::codecForName("jis7"); + // TQTextCodec::setCodecForLocale(cdc); // KGlobal::locale()->setEncoding(cdc->mibEnum()); } else { - netCodec = QTextCodec::codecForLocale(); + netCodec = TQTextCodec::codecForLocale(); } mMailService = new MailServiceImpl(); - connectDCOPSignal( 0, 0, "kmailSelectFolder(QString)", - "selectFolder(QString)", false ); + connectDCOPSignal( 0, 0, "kmailSelectFolder(TQString)", + "selectFolder(TQString)", false ); } KMKernel::~KMKernel () { - QMap<KIO::Job*, putData>::Iterator it = mPutJobs.begin(); + TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.begin(); while ( it != mPutJobs.end() ) { KIO::Job *job = it.key(); @@ -193,7 +193,7 @@ KMKernel::~KMKernel () bool KMKernel::handleCommandLine( bool noArgsOpensReader ) { - QString to, cc, bcc, subj, body; + TQString to, cc, bcc, subj, body; QCStringList customHeaders; KURL messageFile; KURL::List attachURLs; @@ -206,7 +206,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader ) KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->getOption("subject")) { - subj = QString::fromLocal8Bit(args->getOption("subject")); + subj = TQString::fromLocal8Bit(args->getOption("subject")); // if kmail is called with 'kmail -session abc' then this doesn't mean // that the user wants to send a message with subject "ession" but // (most likely) that the user clicked on KMail's system tray applet @@ -215,7 +215,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader ) // command line arguments and those include "-session ..." if // kmail/kontact was restored by session management if ( subj == "ession" ) { - subj = QString::null; + subj = TQString::null; calledWithSession = true; } else @@ -225,25 +225,25 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader ) if (args->getOption("cc")) { mailto = true; - cc = QString::fromLocal8Bit(args->getOption("cc")); + cc = TQString::fromLocal8Bit(args->getOption("cc")); } if (args->getOption("bcc")) { mailto = true; - bcc = QString::fromLocal8Bit(args->getOption("bcc")); + bcc = TQString::fromLocal8Bit(args->getOption("bcc")); } if (args->getOption("msg")) { mailto = true; - messageFile.setPath( QString::fromLocal8Bit(args->getOption("msg")) ); + messageFile.setPath( TQString::fromLocal8Bit(args->getOption("msg")) ); } if (args->getOption("body")) { mailto = true; - body = QString::fromLocal8Bit(args->getOption("body")); + body = TQString::fromLocal8Bit(args->getOption("body")); } QCStringList attachList = args->getOptionList("attach"); @@ -252,7 +252,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader ) mailto = true; for ( QCStringList::Iterator it = attachList.begin() ; it != attachList.end() ; ++it ) if ( !(*it).isEmpty() ) - attachURLs += KURL( QString::fromLocal8Bit( *it ) ); + attachURLs += KURL( TQString::fromLocal8Bit( *it ) ); } customHeaders = args->getOptionList("header"); @@ -265,8 +265,8 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader ) if ( args->getOption( "view" ) ) { viewOnly = true; - const QString filename = - QString::fromLocal8Bit( args->getOption( "view" ) ); + const TQString filename = + TQString::fromLocal8Bit( args->getOption( "view" ) ); messageFile = KURL::fromPathOrURL( filename ); if ( !messageFile.isValid() ) { messageFile = KURL(); @@ -282,7 +282,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader ) if (strncasecmp(args->arg(i),"mailto:",7)==0) to += args->url(i).path() + ", "; else { - QString tmpArg = QString::fromLocal8Bit( args->arg(i) ); + TQString tmpArg = TQString::fromLocal8Bit( args->arg(i) ); KURL url( tmpArg ); if ( url.isValid() ) attachURLs += url; @@ -319,12 +319,12 @@ void KMKernel::checkMail () //might create a new reader but won't show!! kmkernel->acctMgr()->checkMail(false); } -QStringList KMKernel::accounts() +TQStringList KMKernel::accounts() { return kmkernel->acctMgr()->getAccounts(); } -void KMKernel::checkAccount (const QString &account) //might create a new reader but won't show!! +void KMKernel::checkAccount (const TQString &account) //might create a new reader but won't show!! { kdDebug(5006) << "KMKernel::checkMail called" << endl; @@ -333,11 +333,11 @@ void KMKernel::checkAccount (const QString &account) //might create a new reader kmkernel->acctMgr()->singleCheckMail(acct, false); } -void KMKernel::loadProfile( const QString& ) +void KMKernel::loadProfile( const TQString& ) { } -void KMKernel::saveToProfile( const QString& ) const +void KMKernel::saveToProfile( const TQString& ) const { } @@ -374,9 +374,9 @@ void KMKernel::openReader( bool onlyCheck ) } } -int KMKernel::openComposer (const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body, int hidden, +int KMKernel::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, const QCStringList &customHeaders) @@ -395,9 +395,9 @@ int KMKernel::openComposer (const QString &to, const QString &cc, msg->setBcc( KMMsgBase::decodeRFC2047String( bcc.latin1() ) ); if (!subject.isEmpty()) msg->setSubject(subject); if (!messageFile.isEmpty() && messageFile.isLocalFile()) { - QCString str = KPIM::kFileToString( messageFile.path(), true, false ); + TQCString str = KPIM::kFileToString( messageFile.path(), true, false ); if( !str.isEmpty() ) { - msg->setBody( QString::fromLocal8Bit( str ).utf8() ); + msg->setBody( TQString::fromLocal8Bit( str ).utf8() ); } else { TemplateParser parser( msg, TemplateParser::NewMessage, "", false, false, false, false ); @@ -423,7 +423,7 @@ int KMKernel::openComposer (const QString &to, const QString &cc, const int pos = (*it).find( ':' ); if ( pos > 0 ) { - QCString header, value; + TQCString header, value; header = (*it).left( pos ).stripWhiteSpace(); value = (*it).mid( pos+1 ).stripWhiteSpace(); if ( !header.isEmpty() && !value.isEmpty() ) @@ -448,38 +448,38 @@ int KMKernel::openComposer (const QString &to, const QString &cc, } -int KMKernel::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 ) +int KMKernel::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 ) { kdDebug(5006) << "KMKernel::openComposer called (deprecated version)" << endl; return openComposer ( to, cc, bcc, subject, body, hidden, attachName, attachCte, attachData, attachType, attachSubType, attachParamAttr, - attachParamValue, attachContDisp, QCString() ); -} - -int KMKernel::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 ) + attachParamValue, attachContDisp, TQCString() ); +} + +int KMKernel::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 ) { kdDebug(5006) << "KMKernel::openComposer()" << endl; @@ -516,7 +516,7 @@ int KMKernel::openComposer (const QString &to, const QString &cc, // KOrganizer invitation caught and to be sent as body instead msg->setBody( attachData ); msg->setHeaderField( "Content-Type", - QString( "text/calendar; method=%1; " + TQString( "text/calendar; method=%1; " "charset=\"utf-8\"" ). arg( attachParamValue ) ); @@ -572,10 +572,10 @@ int KMKernel::openComposer (const QString &to, const QString &cc, return 1; } -void KMKernel::setDefaultTransport( const QString & transport ) +void KMKernel::setDefaultTransport( const TQString & transport ) { - QStringList availTransports = KMail::TransportManager::transportNames(); - QStringList::const_iterator it = availTransports.find( transport ); + TQStringList availTransports = KMail::TransportManager::transportNames(); + TQStringList::const_iterator it = availTransports.find( transport ); if ( it == availTransports.end() ) { kdWarning() << "The transport you entered is not available" << endl; return; @@ -583,9 +583,9 @@ void KMKernel::setDefaultTransport( const QString & transport ) GlobalSettings::self()->setDefaultTransport( transport ); } -DCOPRef KMKernel::openComposer(const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body,bool hidden) +DCOPRef KMKernel::openComposer(const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body,bool hidden) { KMMessage *msg = new KMMessage; msg->initHeader(); @@ -616,9 +616,9 @@ DCOPRef KMKernel::openComposer(const QString &to, const QString &cc, return DCOPRef( cWin->asMailComposerIFace() ); } -DCOPRef KMKernel::newMessage(const QString &to, - const QString &cc, - const QString &bcc, +DCOPRef KMKernel::newMessage(const TQString &to, + const TQString &cc, + const TQString &bcc, bool hidden, bool useFolderId, const KURL & /*messageFile*/, @@ -676,7 +676,7 @@ int KMKernel::viewMessage( const KURL & messageFile ) return 1; } -int KMKernel::sendCertificate( const QString& to, const QByteArray& certData ) +int KMKernel::sendCertificate( const TQString& to, const TQByteArray& certData ) { KMMessage *msg = new KMMessage; msg->initHeader(); @@ -704,7 +704,7 @@ int KMKernel::sendCertificate( const QString& to, const QByteArray& certData ) return 1; } -KMMsgStatus KMKernel::strToStatus(const QString &flags) +KMMsgStatus KMKernel::strToStatus(const TQString &flags) { KMMsgStatus status = 0; if (!flags.isEmpty()) { @@ -769,14 +769,14 @@ KMMsgStatus KMKernel::strToStatus(const QString &flags) return status; } -int KMKernel::dcopAddMessage( const QString & foldername, const QString & msgUrlString, - const QString & MsgStatusFlags) +int KMKernel::dcopAddMessage( const TQString & foldername, const TQString & msgUrlString, + const TQString & MsgStatusFlags) { return dcopAddMessage(foldername, KURL(msgUrlString), MsgStatusFlags); } -int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, - const QString & MsgStatusFlags) +int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, + const TQString & MsgStatusFlags) { kdDebug(5006) << "KMKernel::dcopAddMessage called" << endl; @@ -785,7 +785,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, int retval; bool readFolderMsgIds = false; - QString _foldername = foldername.stripWhiteSpace(); + TQString _foldername = foldername.stripWhiteSpace(); _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { @@ -799,11 +799,11 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, // This is a proposed change by Daniel Andor. // He proposed to change from the fopen(blah) // to a KPIM::kFileToString(blah). - // Although it assigns a QString to a QString, + // Although it assigns a TQString to a TQString, // because of the implicit sharing this poses // no memory or performance penalty. - const QCString messageText = + const TQCString messageText = KPIM::kFileToString( msgUrl.path(), true, false ); if ( messageText.isEmpty() ) return -2; @@ -813,15 +813,15 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, if (readFolderMsgIds) { if ( foldername.contains("/")) { - QString tmp_fname = ""; + TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; bool root = true; - QStringList subFList = QStringList::split("/",_foldername,false); + TQStringList subFList = TQStringList::split("/",_foldername,false); - for ( QStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) { - QString _newFolder = *it; + for ( TQStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) { + TQString _newFolder = *it; if(_newFolder.startsWith(".")) return -1; if(root) { @@ -866,7 +866,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, // subject line + the date is only unique if the following // return a correct unique value: // time_t DT = mb->date(); - // QString dt = ctime(&DT); + // TQString dt = ctime(&DT); // But if the datestring in the Header isn't RFC conform // subject line + the date isn't unique. // @@ -879,7 +879,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, mAddMsgCurrentFolder->open("dcopadd"); for( i=0; i<mAddMsgCurrentFolder->count(); i++) { KMMsgBase *mb = mAddMsgCurrentFolder->getMsgBase(i); - QString id = mb->msgIdMD5(); + TQString id = mb->msgIdMD5(); if ( id.isEmpty() ) { id = mb->subject(); if ( id.isEmpty() ) @@ -898,7 +898,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, mAddMsgCurrentFolder->close("dcopadd"); } - QString msgId = msg->msgIdMD5(); + TQString msgId = msg->msgIdMD5(); if ( msgId.isEmpty()) { msgId = msg->subject(); if ( msgId.isEmpty() ) @@ -947,19 +947,19 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl, void KMKernel::dcopResetAddMessage() { mAddMessageMsgIds.clear(); - mAddMessageLastFolder = QString(); + mAddMessageLastFolder = TQString(); } -int KMKernel::dcopAddMessage_fastImport( const QString & foldername, - const QString & msgUrlString, - const QString & MsgStatusFlags) +int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, + const TQString & msgUrlString, + const TQString & MsgStatusFlags) { return dcopAddMessage_fastImport(foldername, KURL(msgUrlString), MsgStatusFlags); } -int KMKernel::dcopAddMessage_fastImport( const QString & foldername, +int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, const KURL & msgUrl, - const QString & MsgStatusFlags) + const TQString & MsgStatusFlags) { // Use this function to import messages without // search for already existing emails. @@ -971,7 +971,7 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername, int retval; bool createNewFolder = false; - QString _foldername = foldername.stripWhiteSpace(); + TQString _foldername = foldername.stripWhiteSpace(); _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { @@ -981,7 +981,7 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername, if ( !msgUrl.isEmpty() && msgUrl.isLocalFile() ) { - const QCString messageText = + const TQCString messageText = KPIM::kFileToString( msgUrl.path(), true, false ); if ( messageText.isEmpty() ) return -2; @@ -991,15 +991,15 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername, if (createNewFolder) { if ( foldername.contains("/")) { - QString tmp_fname = ""; + TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; bool root = true; - QStringList subFList = QStringList::split("/",_foldername,false); + TQStringList subFList = TQStringList::split("/",_foldername,false); - for ( QStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) { - QString _newFolder = *it; + for ( TQStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) { + TQString _newFolder = *it; if(_newFolder.startsWith(".")) return -1; if(root) { @@ -1053,10 +1053,10 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername, return retval; } -QStringList KMKernel::folderList() const +TQStringList KMKernel::folderList() const { - QStringList folders; - const QString localPrefix = "/Local"; + TQStringList folders; + const TQString localPrefix = "/Local"; folders << localPrefix; the_folderMgr->getFolderURLS( folders, localPrefix ); the_imapFolderMgr->getFolderURLS( folders ); @@ -1064,9 +1064,9 @@ QStringList KMKernel::folderList() const return folders; } -DCOPRef KMKernel::getFolder( const QString& vpath ) +DCOPRef KMKernel::getFolder( const TQString& vpath ) { - const QString localPrefix = "/Local"; + const TQString localPrefix = "/Local"; if ( the_folderMgr->getFolderByURL( vpath ) ) return DCOPRef( new FolderIface( vpath ) ); else if ( vpath.startsWith( localPrefix ) && @@ -1085,12 +1085,12 @@ void KMKernel::raise() kmail.call( "newInstance" ); } -bool KMKernel::showMail( Q_UINT32 serialNumber, QString /* messageId */ ) +bool KMKernel::showMail( Q_UINT32 serialNumber, TQString /* messageId */ ) { KMMainWidget *mainWidget = 0; if (KMainWindow::memberList) { KMainWindow *win = 0; - QObjectList *l; + TQObjectList *l; // First look for a KMainWindow. for (win = KMainWindow::memberList->first(); win; @@ -1134,34 +1134,34 @@ bool KMKernel::showMail( Q_UINT32 serialNumber, QString /* messageId */ ) return false; } -QString KMKernel::getFrom( Q_UINT32 serialNumber ) +TQString KMKernel::getFrom( Q_UINT32 serialNumber ) { int idx = -1; KMFolder *folder = 0; KMMsgDict::instance()->getLocation(serialNumber, &folder, &idx); if (!folder || (idx == -1)) - return QString::null; + return TQString::null; KMFolderOpener openFolder(folder, "getFrom"); KMMsgBase *msgBase = folder->getMsgBase(idx); if (!msgBase) - return QString::null; + return TQString::null; bool unGet = !msgBase->isMessage(); KMMessage *msg = folder->getMsg(idx); - QString result = msg->from(); + TQString result = msg->from(); if (unGet) folder->unGetMsg(idx); return result; } -QString KMKernel::debugScheduler() +TQString KMKernel::debugScheduler() { - QString res = KMail::ActionScheduler::debug(); + TQString res = KMail::ActionScheduler::debug(); return res; } -QString KMKernel::debugSernum( Q_UINT32 serialNumber ) +TQString KMKernel::debugSernum( Q_UINT32 serialNumber ) { - QString res; + TQString res; if (serialNumber != 0) { int idx = -1; KMFolder *folder = 0; @@ -1174,15 +1174,15 @@ QString KMKernel::debugSernum( Q_UINT32 serialNumber ) KMFolderOpener openFolder(folder, "debugser"); msg = folder->getMsgBase( idx ); if (msg) { - res.append( QString( " subject %s,\n sender %s,\n date %s.\n" ) + res.append( TQString( " subject %s,\n sender %s,\n date %s.\n" ) .arg( msg->subject() ) .arg( msg->fromStrip() ) .arg( msg->dateStr() ) ); } else { - res.append( QString( "Invalid serial number." ) ); + res.append( TQString( "Invalid serial number." ) ); } } else { - res.append( QString( "Invalid serial number." ) ); + res.append( TQString( "Invalid serial number." ) ); } } return res; @@ -1265,7 +1265,7 @@ void KMKernel::quit() /* TODO later: Asuming that: - msgsender is nonblocking - (our own, QSocketNotifier based. Pops up errors and sends signal + (our own, TQSocketNotifier based. Pops up errors and sends signal senderFinished when done) o If we are getting mail, stop it (but dont lose something!) @@ -1310,14 +1310,14 @@ void KMKernel::slotSenderFinished() /********************************************************************/ void KMKernel::testDir(const char *_name) { - QString foldersPath = QDir::homeDirPath() + QString( _name ); - QFileInfo info( foldersPath ); + TQString foldersPath = TQDir::homeDirPath() + TQString( _name ); + TQFileInfo info( foldersPath ); if ( !info.exists() ) { - if ( ::mkdir( QFile::encodeName( foldersPath ) , S_IRWXU ) == -1 ) { + if ( ::mkdir( TQFile::encodeName( foldersPath ) , S_IRWXU ) == -1 ) { KMessageBox::sorry(0, i18n("KMail could not create folder '%1';\n" "please make sure that you can view and " "modify the content of the folder '%2'.") - .arg( foldersPath ).arg( QDir::homeDirPath() ) ); + .arg( foldersPath ).arg( TQDir::homeDirPath() ) ); ::exit(-1); } } @@ -1336,8 +1336,8 @@ void KMKernel::testDir(const char *_name) // Open a composer for each message found in the dead.letter folder void KMKernel::recoverDeadLetters() { - const QString pathName = localDataPath(); - QDir dir( pathName ); + const TQString pathName = localDataPath(); + TQDir dir( pathName ); if ( !dir.exists( "autosave" ) ) return; @@ -1363,7 +1363,7 @@ void KMKernel::recoverDeadLetters() //----------------------------------------------------------------------------- void KMKernel::initFolders(KConfig* cfg) { - QString name; + TQString name; name = cfg->readEntry("inboxFolder"); @@ -1381,7 +1381,7 @@ void KMKernel::initFolders(KConfig* cfg) the_inboxFolder->setSystemFolder(true); if ( the_inboxFolder->userWhoField().isEmpty() ) - the_inboxFolder->setUserWhoField( QString::null ); + the_inboxFolder->setUserWhoField( TQString::null ); // inboxFolder->open(); the_outboxFolder = the_folderMgr->findOrCreate(cfg->readEntry("outboxFolder", I18N_NOOP("outbox"))); @@ -1392,7 +1392,7 @@ void KMKernel::initFolders(KConfig* cfg) the_outboxFolder->setSystemFolder(true); if ( the_outboxFolder->userWhoField().isEmpty() ) - the_outboxFolder->setUserWhoField( QString::null ); + the_outboxFolder->setUserWhoField( TQString::null ); /* Nuke the oubox's index file, to make sure that no ghost messages are in * it from a previous crash. Ghost messages happen in the outbox because it * the only folder where messages enter and leave within 5 seconds, which is @@ -1400,7 +1400,7 @@ void KMKernel::initFolders(KConfig* cfg) * this folder is expected to be very small, we can live with regenerating * the index on each start to be on the save side. */ //if ( the_outboxFolder->folderType() == KMFolderTypeMaildir ) - // unlink( QFile::encodeName( the_outboxFolder->indexLocation() ) ); + // unlink( TQFile::encodeName( the_outboxFolder->indexLocation() ) ); the_outboxFolder->open("kmkernel"); the_sentFolder = the_folderMgr->findOrCreate(cfg->readEntry("sentFolder", I18N_NOOP("sent-mail"))); @@ -1409,7 +1409,7 @@ void KMKernel::initFolders(KConfig* cfg) } the_sentFolder->setSystemFolder(true); if ( the_sentFolder->userWhoField().isEmpty() ) - the_sentFolder->setUserWhoField( QString::null ); + the_sentFolder->setUserWhoField( TQString::null ); // the_sentFolder->open(); the_trashFolder = the_folderMgr->findOrCreate(cfg->readEntry("trashFolder", I18N_NOOP("trash"))); @@ -1418,7 +1418,7 @@ void KMKernel::initFolders(KConfig* cfg) } the_trashFolder->setSystemFolder( true ); if ( the_trashFolder->userWhoField().isEmpty() ) - the_trashFolder->setUserWhoField( QString::null ); + the_trashFolder->setUserWhoField( TQString::null ); // the_trashFolder->open(); the_draftsFolder = the_folderMgr->findOrCreate(cfg->readEntry("draftsFolder", I18N_NOOP("drafts"))); @@ -1427,7 +1427,7 @@ void KMKernel::initFolders(KConfig* cfg) } the_draftsFolder->setSystemFolder( true ); if ( the_draftsFolder->userWhoField().isEmpty() ) - the_draftsFolder->setUserWhoField( QString::null ); + the_draftsFolder->setUserWhoField( TQString::null ); the_draftsFolder->open("kmkernel"); the_templatesFolder = @@ -1438,7 +1438,7 @@ void KMKernel::initFolders(KConfig* cfg) } the_templatesFolder->setSystemFolder( true ); if ( the_templatesFolder->userWhoField().isEmpty() ) - the_templatesFolder->setUserWhoField( QString::null ); + the_templatesFolder->setUserWhoField( TQString::null ); the_templatesFolder->open("kmkernel"); } @@ -1450,14 +1450,14 @@ void KMKernel::init() KConfig* cfg = KMKernel::config(); - QDir dir; + TQDir dir; KConfigGroupSaver saver(cfg, "General"); the_firstStart = cfg->readBoolEntry("first-start", true); cfg->writeEntry("first-start", false); the_previousVersion = cfg->readEntry("previous-version"); cfg->writeEntry("previous-version", KMAIL_VERSION); - QString foldersPath = cfg->readPathEntry( "folders" ); + TQString foldersPath = cfg->readPathEntry( "folders" ); kdDebug(5006) << k_funcinfo << "foldersPath (from config): '" << foldersPath << "'" << endl; if ( foldersPath.isEmpty() ) { @@ -1517,17 +1517,17 @@ void KMKernel::init() the_weaverLogger->attach (the_weaver); //#endif - connect( the_folderMgr, SIGNAL( folderRemoved(KMFolder*) ), - this, SIGNAL( folderRemoved(KMFolder*) ) ); - connect( the_dimapFolderMgr, SIGNAL( folderRemoved(KMFolder*) ), - this, SIGNAL( folderRemoved(KMFolder*) ) ); - connect( the_imapFolderMgr, SIGNAL( folderRemoved(KMFolder*) ), - this, SIGNAL( folderRemoved(KMFolder*) ) ); - connect( the_searchFolderMgr, SIGNAL( folderRemoved(KMFolder*) ), - this, SIGNAL( folderRemoved(KMFolder*) ) ); - - mBackgroundTasksTimer = new QTimer( this, "mBackgroundTasksTimer" ); - connect( mBackgroundTasksTimer, SIGNAL( timeout() ), this, SLOT( slotRunBackgroundTasks() ) ); + connect( the_folderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ), + this, TQT_SIGNAL( folderRemoved(KMFolder*) ) ); + connect( the_dimapFolderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ), + this, TQT_SIGNAL( folderRemoved(KMFolder*) ) ); + connect( the_imapFolderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ), + this, TQT_SIGNAL( folderRemoved(KMFolder*) ) ); + connect( the_searchFolderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ), + this, TQT_SIGNAL( folderRemoved(KMFolder*) ) ); + + mBackgroundTasksTimer = new TQTimer( this, "mBackgroundTasksTimer" ); + connect( mBackgroundTasksTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRunBackgroundTasks() ) ); #ifdef DEBUG_SCHEDULER // for debugging, see jobscheduler.h mBackgroundTasksTimer->start( 10000, true ); // 10s, singleshot #else @@ -1582,7 +1582,7 @@ void KMKernel::cleanupImapFolders() if (acct->type() != "imap") continue; fld = static_cast<KMFolderImap*>(the_imapFolderMgr - ->findOrCreate(QString::number(acct->id()), false, acct->id())->storage()); + ->findOrCreate(TQString::number(acct->id()), false, acct->id())->storage()); fld->setNoContent(true); fld->folder()->setLabel(acct->name()); imapAcct = static_cast<KMAcctImap*>(acct); @@ -1600,12 +1600,12 @@ void KMKernel::cleanupImapFolders() if (acct->type() != "cachedimap" ) continue; - KMFolder* fld = the_dimapFolderMgr->find(QString::number(acct->id())); + KMFolder* fld = the_dimapFolderMgr->find(TQString::number(acct->id())); if( fld ) cfld = static_cast<KMFolderCachedImap*>( fld->storage() ); if (cfld == 0) { // Folder doesn't exist yet - cfld = static_cast<KMFolderCachedImap*>(the_dimapFolderMgr->createFolder(QString::number(acct->id()), + cfld = static_cast<KMFolderCachedImap*>(the_dimapFolderMgr->createFolder(TQString::number(acct->id()), false, KMFolderTypeCachedImap)->storage()); if (!cfld) { KMessageBox::error(0,(i18n("Cannot create file `%1' in %2.\nKMail cannot start without it.").arg(acct->name()).arg(the_dimapFolderMgr->basePath()))); @@ -1644,7 +1644,7 @@ bool KMKernel::doSessionManagement() void KMKernel::closeAllKMailWindows() { if (!KMainWindow::memberList) return; - QPtrListIterator<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList); KMainWindow *window = 0; while ((window = it.current()) != 0) { ++it; @@ -1694,8 +1694,8 @@ void KMKernel::cleanup(void) mICalIface->cleanup(); - QValueList<QGuardedPtr<KMFolder> > folders; - QStringList strList; + TQValueList<TQGuardedPtr<KMFolder> > folders; + TQStringList strList; KMFolder *folder; the_folderMgr->createFolderList(&strList, &folders); for (int i = 0; folders.at(i) != folders.end(); i++) @@ -1735,14 +1735,14 @@ void KMKernel::cleanup(void) config->sync(); } -bool KMKernel::transferMail( QString & destinationDir ) +bool KMKernel::transferMail( TQString & destinationDir ) { - QString dir; + TQString dir; // check whether the user has a ~/KMail folder - QFileInfo fi( QDir::home(), "KMail" ); + TQFileInfo fi( TQDir::home(), "KMail" ); if ( fi.exists() && fi.isDir() ) { - dir = QDir::homeDirPath() + "/KMail"; + dir = TQDir::homeDirPath() + "/KMail"; // the following two lines can be removed once moving mail is reactivated destinationDir = dir; return true; @@ -1750,12 +1750,12 @@ bool KMKernel::transferMail( QString & destinationDir ) if ( dir.isEmpty() ) { // check whether the user has a ~/Mail folder - fi.setFile( QDir::home(), "Mail" ); + fi.setFile( TQDir::home(), "Mail" ); if ( fi.exists() && fi.isDir() && - QFile::exists( QDir::homeDirPath() + "/Mail/.inbox.index" ) ) { + TQFile::exists( TQDir::homeDirPath() + "/Mail/.inbox.index" ) ) { // there's a ~/Mail folder which seems to be used by KMail (because of the // index file) - dir = QDir::homeDirPath() + "/Mail"; + dir = TQDir::homeDirPath() + "/Mail"; // the following two lines can be removed once moving mail is reactivated destinationDir = dir; return true; @@ -1768,8 +1768,8 @@ bool KMKernel::transferMail( QString & destinationDir ) #if 0 // disabled for now since moving fails in certain cases (e.g. if symbolic links are involved) - const QString kmailName = kapp->aboutData()->programName(); - QString msg; + const TQString kmailName = kapp->aboutData()->programName(); + TQString msg; if ( KIO::NetAccess::exists( destinationDir, true, 0 ) ) { // if destinationDir exists, we need to warn about possible // overwriting of files. otherwise, we don't have to @@ -1795,8 +1795,8 @@ bool KMKernel::transferMail( QString & destinationDir ) .arg( kmailName, kmailName, kmailName ) .arg( dir, destinationDir, dir ); } - QString title = i18n( "Migrate Mail Files?" ); - QString buttonText = i18n( "Move" ); + TQString title = i18n( "Migrate Mail Files?" ); + TQString buttonText = i18n( "Move" ); if ( KMessageBox::questionYesNo( 0, msg, title, buttonText, i18n("Do Not Move") ) == KMessageBox::No ) { @@ -1820,7 +1820,7 @@ bool KMKernel::transferMail( QString & destinationDir ) void KMKernel::ungrabPtrKb(void) { if(!KMainWindow::memberList) return; - QWidget* widg = KMainWindow::memberList->first(); + TQWidget* widg = KMainWindow::memberList->first(); Display* dpy; if (!widg) return; @@ -1865,16 +1865,16 @@ void KMKernel::dumpDeadLetters() if ( !KMainWindow::memberList ) return; - for ( QPtrListIterator<KMainWindow> it(*KMainWindow::memberList) ; it.current() != 0; ++it ) + for ( TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList) ; it.current() != 0; ++it ) if ( KMail::Composer * win = ::qt_cast<KMail::Composer*>( it.current() ) ) win->autoSaveMessage(); } -void KMKernel::action(bool mailto, bool check, const QString &to, - const QString &cc, const QString &bcc, - const QString &subj, const QString &body, +void KMKernel::action(bool mailto, bool check, const TQString &to, + const TQString &cc, const TQString &bcc, + const TQString &subj, const TQString &body, const KURL &messageFile, const KURL::List &attachURLs, const QCStringList &customHeaders) @@ -1889,24 +1889,24 @@ void KMKernel::action(bool mailto, bool check, const QString &to, //Anything else? } -void KMKernel::byteArrayToRemoteFile(const QByteArray &aData, const KURL &aURL, +void KMKernel::byteArrayToRemoteFile(const TQByteArray &aData, const KURL &aURL, bool overwrite) { // ## when KDE 3.3 is out: use KIO::storedPut to remove slotDataReq altogether KIO::Job *job = KIO::put(aURL, -1, overwrite, false); putData pd; pd.url = aURL; pd.data = aData; pd.offset = 0; mPutJobs.insert(job, pd); - connect(job, SIGNAL(dataReq(KIO::Job*,QByteArray&)), - SLOT(slotDataReq(KIO::Job*,QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), - SLOT(slotResult(KIO::Job*))); + connect(job, TQT_SIGNAL(dataReq(KIO::Job*,TQByteArray&)), + TQT_SLOT(slotDataReq(KIO::Job*,TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + TQT_SLOT(slotResult(KIO::Job*))); } -void KMKernel::slotDataReq(KIO::Job *job, QByteArray &data) +void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data) { // send the data in 64 KB chunks const int MAX_CHUNK_SIZE = 64*1024; - QMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); + TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); int remainingBytes = (*it).data.size() - (*it).offset; if( remainingBytes > MAX_CHUNK_SIZE ) @@ -1921,7 +1921,7 @@ void KMKernel::slotDataReq(KIO::Job *job, QByteArray &data) { // send the remaining bytes to the receiver (deep copy) data.duplicate( (*it).data.data() + (*it).offset, remainingBytes ); - (*it).data = QByteArray(); + (*it).data = TQByteArray(); (*it).offset = 0; //kdDebug( 5006 ) << "Sending " << remainingBytes << " bytes\n"; } @@ -1929,7 +1929,7 @@ void KMKernel::slotDataReq(KIO::Job *job, QByteArray &data) void KMKernel::slotResult(KIO::Job *job) { - QMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); + TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); if (job->error()) { @@ -1955,8 +1955,8 @@ void KMKernel::slotShowConfigurationDialog() { if( !mConfigureDialog ) { mConfigureDialog = new ConfigureDialog( 0, "configure", false ); - connect( mConfigureDialog, SIGNAL( configCommitted() ), - this, SLOT( slotConfigChanged() ) ); + connect( mConfigureDialog, TQT_SIGNAL( configCommitted() ), + this, TQT_SLOT( slotConfigChanged() ) ); } if( KMKernel::getKMMainWidget() == 0 ) @@ -1982,7 +1982,7 @@ void KMKernel::slotConfigChanged() //------------------------------------------------------------------------------- //static -QString KMKernel::localDataPath() +TQString KMKernel::localDataPath() { return locateLocal( "data", "kmail/" ); } @@ -2006,7 +2006,7 @@ bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet ) bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet ) { - QValueList<const KSystemTray*>::iterator it = + TQValueList<const KSystemTray*>::iterator it = systemTrayApplets.find( applet ); if ( it != systemTrayApplets.end() ) { systemTrayApplets.remove( it ); @@ -2016,9 +2016,9 @@ bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet ) return false; } -void KMKernel::emergencyExit( const QString& reason ) +void KMKernel::emergencyExit( const TQString& reason ) { - QString mesg; + TQString mesg; if ( reason.length() == 0 ) { mesg = i18n("KMail encountered a fatal error and will terminate now"); } else { @@ -2049,7 +2049,7 @@ bool KMKernel::folderIsDrafts(const KMFolder * folder) if ( folder == the_draftsFolder ) return true; - QString idString = folder->idString(); + TQString idString = folder->idString(); if ( idString.isEmpty() ) return false; @@ -2067,7 +2067,7 @@ bool KMKernel::folderIsTemplates( const KMFolder *folder ) if ( folder == the_templatesFolder ) return true; - QString idString = folder->idString(); + TQString idString = folder->idString(); if ( idString.isEmpty() ) return false; @@ -2083,8 +2083,8 @@ bool KMKernel::folderIsTrash(KMFolder * folder) { assert(folder); if (folder == the_trashFolder) return true; - QStringList actList = acctMgr()->getAccounts(); - QStringList::Iterator it( actList.begin() ); + TQStringList actList = acctMgr()->getAccounts(); + TQStringList::Iterator it( actList.begin() ); for( ; it != actList.end() ; ++it ) { KMAccount* act = acctMgr()->findByName( *it ); if ( act && ( act->trash() == folder->idString() ) ) @@ -2099,7 +2099,7 @@ bool KMKernel::folderIsSentMailFolder( const KMFolder * folder ) if ( folder == the_sentFolder ) return true; - QString idString = folder->idString(); + TQString idString = folder->idString(); if ( idString.isEmpty() ) return false; // search the identities if the folder matches the sent-folder @@ -2155,8 +2155,8 @@ KMainWindow* KMKernel::mainWin() */ void KMKernel::slotEmptyTrash() { - QString title = i18n("Empty Trash"); - QString text = i18n("Are you sure you want to empty the trash folders of all accounts?"); + TQString title = i18n("Empty Trash"); + TQString text = i18n("Are you sure you want to empty the trash folders of all accounts?"); if (KMessageBox::warningContinueCancel(0, text, title, KStdGuiItem::cont(), "confirm_empty_trash") != KMessageBox::Continue) @@ -2192,10 +2192,10 @@ KMailICalIfaceImpl& KMKernel::iCalIface() return *mICalIface; } -void KMKernel::selectFolder( QString folderPath ) +void KMKernel::selectFolder( TQString folderPath ) { kdDebug(5006)<<"Selecting a folder "<<folderPath<<endl; - const QString localPrefix = "/Local"; + const TQString localPrefix = "/Local"; KMFolder *folder = kmkernel->folderMgr()->getFolderByURL( folderPath ); if ( !folder && folderPath.startsWith( localPrefix ) ) folder = the_folderMgr->getFolderByURL( folderPath.mid( localPrefix.length() ) ); @@ -2218,13 +2218,13 @@ void KMKernel::selectFolder( QString folderPath ) KMMainWidget *KMKernel::getKMMainWidget() { //This could definitely use a speadup - QWidgetList *l = kapp->topLevelWidgets(); - QWidgetListIt it( *l ); - QWidget *wid; + TQWidgetList *l = kapp->topLevelWidgets(); + TQWidgetListIt it( *l ); + TQWidget *wid; while ( ( wid = it.current() ) != 0 ) { ++it; - QObjectList *l2 = wid->topLevelWidget()->queryList( "KMMainWidget" ); + TQObjectList *l2 = wid->topLevelWidget()->queryList( "KMMainWidget" ); if (l2 && l2->first()) { KMMainWidget* kmmw = dynamic_cast<KMMainWidget *>( l2->first() ); Q_ASSERT( kmmw ); @@ -2280,7 +2280,7 @@ void KMKernel::compactAllFolders() // called by the GUI the_dimapFolderMgr->compactAllFolders( true /*immediate*/ ); } -KMFolder* KMKernel::findFolderById( const QString& idString ) +KMFolder* KMKernel::findFolderById( const TQString& idString ) { KMFolder * folder = the_folderMgr->findIdString( idString ); if ( !folder ) @@ -2373,10 +2373,10 @@ Wallet *KMKernel::wallet() { return mWallet; } -QValueList< QGuardedPtr<KMFolder> > KMKernel::allFolders() +TQValueList< TQGuardedPtr<KMFolder> > KMKernel::allFolders() { - QStringList names; - QValueList<QGuardedPtr<KMFolder> > folders; + TQStringList names; + TQValueList<TQGuardedPtr<KMFolder> > folders; folderMgr()->createFolderList(&names, &folders); imapFolderMgr()->createFolderList(&names, &folders); dimapFolderMgr()->createFolderList(&names, &folders); diff --git a/kmail/kmkernel.h b/kmail/kmkernel.h index cd30a6e26..cd536e825 100644 --- a/kmail/kmkernel.h +++ b/kmail/kmkernel.h @@ -3,9 +3,9 @@ #ifndef _KMCONTROL #define _KMCONTROL -#include <qobject.h> -#include <qstring.h> -#include <qguardedptr.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqguardedptr.h> #include <weaver.h> #include <weaverlogger.h> @@ -80,42 +80,42 @@ class ConfigureDialog; * (singleton) objects such as the UndoStack, the folder managers and filter * manager, etc. */ -class KDE_EXPORT KMKernel : public QObject, virtual public KMailIface +class KDE_EXPORT KMKernel : public TQObject, virtual public KMailIface { Q_OBJECT public: - KMKernel (QObject *parent=0, const char *name=0); + KMKernel (TQObject *parent=0, const char *name=0); ~KMKernel (); /** dcop callable stuff */ void checkMail (); - QStringList accounts(); - void checkAccount (const QString &account); + TQStringList accounts(); + void checkAccount (const TQString &account); /** returns id of composer if more are opened */ - int openComposer (const QString &to, const QString &cc, const QString &bcc, - const QString &subject, const QString &body, int hidden, + 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, const QCStringList &customHeaders); /** For backward compatibility */ - int openComposer (const QString &to, const QString &cc, const QString &bcc, - const QString &subject, const QString &body, int hidden, + 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) { QCStringList noCustomHeaders; return openComposer(to, cc, bcc, subject, body, hidden, messageFile, attachURLs, noCustomHeaders); } /** For backward compatibility */ - int openComposer (const QString &to, const QString &cc, const QString &bcc, - const QString &subject, const QString &body, int hidden, + 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) { return openComposer(to, cc, bcc, subject, body, hidden, messageFile, KURL::List(attachURL)); } /** For backward compatibility */ - int openComposer (const QString &to, const QString &cc, const QString &bcc, - const QString &subject, const QString &body, int hidden, + int openComposer (const TQString &to, const TQString &cc, const TQString &bcc, + const TQString &subject, const TQString &body, int hidden, const KURL &messageFile) { return openComposer(to, cc, bcc, subject, body, hidden, messageFile, KURL::List()); @@ -123,71 +123,71 @@ public: /** For backward compatibility * @deprecated */ - 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); - - 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); - - DCOPRef openComposer(const QString &to, const QString &cc, - const QString &bcc, const QString &subject, - const QString &body,bool hidden); + 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); + + 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); + + DCOPRef openComposer(const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subject, + const TQString &body,bool hidden); /** DCOP call used to set the default transport. */ - void setDefaultTransport( const QString & transport ); + void setDefaultTransport( const TQString & transport ); /** DCOP call used by the Kontact plugin to create a new message. */ - DCOPRef newMessage(const QString &to, - const QString &cc, - const QString &bcc, + DCOPRef newMessage(const TQString &to, + const TQString &cc, + const TQString &bcc, bool hidden, bool useFolderId, const KURL &messageFile, const KURL &attachURL); - int sendCertificate( const QString& to, const QByteArray& certData ); + int sendCertificate( const TQString& to, const TQByteArray& certData ); void openReader() { openReader( false ); } - int dcopAddMessage(const QString & foldername, const QString & messagefile, - const QString & MsgStatusFlags = QString()); - int dcopAddMessage(const QString & foldername, const KURL & messagefile, - const QString & MsgStatusFlags = QString()); + int dcopAddMessage(const TQString & foldername, const TQString & messagefile, + const TQString & MsgStatusFlags = TQString()); + int dcopAddMessage(const TQString & foldername, const KURL & messagefile, + const TQString & MsgStatusFlags = TQString()); void dcopResetAddMessage(); /** add messages without rejecting duplicates */ - int dcopAddMessage_fastImport(const QString & foldername, const QString & messagefile, - const QString & MsgStatusFlags = QString()); - int dcopAddMessage_fastImport(const QString & foldername, const KURL & messagefile, - const QString & MsgStatusFlags = QString()); - - QStringList folderList() const; - DCOPRef getFolder( const QString& vpath ); - void selectFolder( QString folder ); + int dcopAddMessage_fastImport(const TQString & foldername, const TQString & messagefile, + const TQString & MsgStatusFlags = TQString()); + int dcopAddMessage_fastImport(const TQString & foldername, const KURL & messagefile, + const TQString & MsgStatusFlags = TQString()); + + TQStringList folderList() const; + DCOPRef getFolder( const TQString& vpath ); + void selectFolder( TQString folder ); int timeOfLastMessageCountChange() const; - virtual bool showMail( Q_UINT32 serialNumber, QString messageId ); - virtual QString getFrom( Q_UINT32 serialNumber ); - virtual QString debugScheduler(); - virtual QString debugSernum( Q_UINT32 serialNumber ); + virtual bool showMail( Q_UINT32 serialNumber, TQString messageId ); + virtual TQString getFrom( Q_UINT32 serialNumber ); + virtual TQString debugScheduler(); + virtual TQString debugSernum( Q_UINT32 serialNumber ); int viewMessage( const KURL & messageFile ); /** @@ -246,17 +246,17 @@ public: * destinationDir contains the path to the current mail storage when the * method returns. */ - bool transferMail( QString & destinationDir ); + bool transferMail( TQString & destinationDir ); void ungrabPtrKb(void); void kmailMsgHandler(QtMsgType aType, const char* aMsg); bool doSessionManagement(); bool firstInstance() { return the_firstInstance; } void setFirstInstance(bool value) { the_firstInstance = value; } - void action (bool mailto, bool check, const QString &to, const QString &cc, - const QString &bcc, const QString &subj, const QString &body, + void action (bool mailto, bool check, const TQString &to, const TQString &cc, + const TQString &bcc, const TQString &subj, const TQString &body, const KURL &messageFile, const KURL::List &attach, const QCStringList &customHeaders); - void byteArrayToRemoteFile(const QByteArray&, const KURL&, + void byteArrayToRemoteFile(const TQByteArray&, const KURL&, bool overwrite = FALSE); bool folderIsDraftOrOutbox( const KMFolder * ); bool folderIsDrafts( const KMFolder * ); @@ -269,7 +269,7 @@ public: /** * Find a folder by ID string in all folder managers */ - KMFolder* findFolderById( const QString& idString ); + KMFolder* findFolderById( const TQString& idString ); KInstance *xmlGuiInstance() { return mXmlGuiInstance; } void setXmlGuiInstance( KInstance *instance ) { mXmlGuiInstance = instance; } @@ -307,7 +307,7 @@ public: KMailICalIfaceImpl& iCalIface(); bool firstStart() { return the_firstStart; } - QString previousVersion() { return the_previousVersion; } + TQString previousVersion() { return the_previousVersion; } bool startingUp() { return the_startingUp; } void setStartingUp (bool flag) { the_startingUp = flag; } bool shuttingDown() { return the_shuttingDown; } @@ -317,7 +317,7 @@ public: /** Returns the full path of the user's local data directory for KMail. The path ends with '/'. */ - static QString localDataPath(); + static TQString localDataPath(); /** Returns true if we have a system tray applet. This is needed in order * to know whether the application should be allowed to exit in case the @@ -330,11 +330,11 @@ public: /// Reimplemented from KMailIface bool handleCommandLine( bool noArgsOpensReader ); - void emergencyExit( const QString& reason ); + void emergencyExit( const TQString& reason ); /** Returns a message serial number that hasn't been used yet. */ unsigned long getNextMsgSerNum(); - QTextCodec *networkCodec() { return netCodec; } + TQTextCodec *networkCodec() { return netCodec; } /** returns a reference to the first Mainwin or a temporary Mainwin */ KMainWindow* mainWin(); @@ -382,13 +382,13 @@ public: KMMainWidget *getKMMainWidget(); /** @return a list of all folders from all folder managers. */ - QValueList< QGuardedPtr<KMFolder> > allFolders(); + TQValueList< TQGuardedPtr<KMFolder> > allFolders(); void raise(); - void loadProfile( const QString& path ); + void loadProfile( const TQString& path ); - void saveToProfile( const QString& path ) const; + void saveToProfile( const TQString& path ) const; public slots: /// Save contents of all open composer widnows to ~/dead.letter @@ -410,7 +410,7 @@ public slots: void slotConfigChanged(); protected slots: - void slotDataReq(KIO::Job*,QByteArray&); + void slotDataReq(KIO::Job*,TQByteArray&); void slotResult(KIO::Job*); signals: @@ -420,7 +420,7 @@ signals: private: void openReader( bool onlyCheck ); - KMMsgStatus strToStatus(const QString &flags); + KMMsgStatus strToStatus(const TQString &flags); KMFolder *currentFolder(); KMFolder *the_inboxFolder; @@ -445,13 +445,13 @@ private: struct putData { KURL url; - QByteArray data; + TQByteArray data; int offset; }; - QMap<KIO::Job *, putData> mPutJobs; + TQMap<KIO::Job *, putData> mPutJobs; /** previous KMail version. If different from current, the user has just updated. read from config */ - QString the_previousVersion; + TQString the_previousVersion; /** is this the first start? read from config */ bool the_firstStart; /** are we starting up? set in main.cpp directly before kapp->exec() */ @@ -466,11 +466,11 @@ private: bool mMailCheckAborted; static KMKernel *mySelf; KSharedConfig::Ptr mConfig; - QTextCodec *netCodec; + TQTextCodec *netCodec; KInstance* mXmlGuiInstance; ConfigureDialog *mConfigureDialog; - QTimer *mBackgroundTasksTimer; + TQTimer *mBackgroundTasksTimer; KMailICalIfaceImpl* mICalIface; JobScheduler* mJobScheduler; // temporary mainwin @@ -487,7 +487,7 @@ private: // context menus and the pinentry program bool mContextMenuShown; - QValueList<const KSystemTray*> systemTrayApplets; + TQValueList<const KSystemTray*> systemTrayApplets; /* Weaver */ KPIM::ThreadWeaver::Weaver *the_weaver; @@ -496,8 +496,8 @@ private: KWallet::Wallet *mWallet; // variables used by dcopAddMessage() - QStringList mAddMessageMsgIds; - QString mAddMessageLastFolder; + TQStringList mAddMessageMsgIds; + TQString mAddMessageLastFolder; KMFolder *mAddMsgCurrentFolder; }; diff --git a/kmail/kmlineeditspell.cpp b/kmail/kmlineeditspell.cpp index ca315dea1..835421873 100644 --- a/kmail/kmlineeditspell.cpp +++ b/kmail/kmlineeditspell.cpp @@ -22,14 +22,14 @@ #include <kcompletionbox.h> #include <klocale.h> -#include <qevent.h> -#include <qfile.h> -#include <qcstring.h> -#include <qcursor.h> +#include <tqevent.h> +#include <tqfile.h> +#include <tqcstring.h> +#include <tqcursor.h> KMLineEdit::KMLineEdit(bool useCompletion, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KPIM::AddresseeLineEdit(parent,useCompletion,name) { allowSemiColonAsSeparator( GlobalSettings::allowSemicolonAsAddressSeparator() ); @@ -37,7 +37,7 @@ KMLineEdit::KMLineEdit(bool useCompletion, //----------------------------------------------------------------------------- -void KMLineEdit::keyPressEvent(QKeyEvent *e) +void KMLineEdit::keyPressEvent(TQKeyEvent *e) { if ((e->key() == Key_Enter || e->key() == Key_Return) && !completionBox()->isVisible()) @@ -60,12 +60,12 @@ void KMLineEdit::keyPressEvent(QKeyEvent *e) } -void KMLineEdit::insertEmails( const QStringList & emails ) +void KMLineEdit::insertEmails( const TQStringList & emails ) { if ( emails.empty() ) return; - QString contents = text(); + TQString contents = text(); if ( !contents.isEmpty() ) contents += ','; // only one address, don't need kpopup to choose @@ -75,17 +75,17 @@ void KMLineEdit::insertEmails( const QStringList & emails ) } //multiple emails, let the user choose one KPopupMenu menu( this, "Addresschooser" ); - for ( QStringList::const_iterator it = emails.begin(), end = emails.end() ; it != end; ++it ) + for ( TQStringList::const_iterator it = emails.begin(), end = emails.end() ; it != end; ++it ) menu.insertItem( *it ); - const int result = menu.exec( QCursor::pos() ); + const int result = menu.exec( TQCursor::pos() ); if ( result < 0 ) return; setText( contents + menu.text( result ) ); } -void KMLineEdit::dropEvent(QDropEvent *event) +void KMLineEdit::dropEvent(TQDropEvent *event) { - QString vcards; + TQString vcards; KVCardDrag::decode( event, vcards ); if ( !vcards.isEmpty() ) { KABC::VCardConverter converter; @@ -101,19 +101,19 @@ void KMLineEdit::dropEvent(QDropEvent *event) KURL::List::Iterator it = urls.begin(); KABC::VCardConverter converter; KABC::Addressee::List list; - QString fileName; - QString caption( i18n( "vCard Import Failed" ) ); + TQString fileName; + TQString caption( i18n( "vCard Import Failed" ) ); for ( it = urls.begin(); it != urls.end(); ++it ) { if ( KIO::NetAccess::download( *it, fileName, parentWidget() ) ) { - QFile file( fileName ); + TQFile file( fileName ); file.open( IO_ReadOnly ); - QByteArray rawData = file.readAll(); + TQByteArray rawData = file.readAll(); file.close(); - QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); + TQString data = TQString::fromUtf8( rawData.data(), rawData.size() + 1 ); list += converter.parseVCards( data ); KIO::NetAccess::removeTempFile( fileName ); } else { - QString text = i18n( "<qt>Unable to access <b>%1</b>.</qt>" ); + TQString text = i18n( "<qt>Unable to access <b>%1</b>.</qt>" ); KMessageBox::error( parentWidget(), text.arg( (*it).url() ), caption ); } KABC::Addressee::List::Iterator ait; @@ -126,15 +126,15 @@ void KMLineEdit::dropEvent(QDropEvent *event) } } -QPopupMenu *KMLineEdit::createPopupMenu() +TQPopupMenu *KMLineEdit::createPopupMenu() { - QPopupMenu *menu = KPIM::AddresseeLineEdit::createPopupMenu(); + TQPopupMenu *menu = KPIM::AddresseeLineEdit::createPopupMenu(); if ( !menu ) return 0; menu->insertSeparator(); menu->insertItem( i18n( "Edit Recent Addresses..." ), - this, SLOT( editRecentAddresses() ) ); + this, TQT_SLOT( editRecentAddresses() ) ); return menu; } @@ -146,8 +146,8 @@ void KMLineEdit::editRecentAddresses() if ( !dlg.exec() ) return; KRecentAddress::RecentAddresses::self( KMKernel::config() )->clear(); - const QStringList addrList = dlg.addresses(); - for ( QStringList::const_iterator it = addrList.begin(), end = addrList.end() ; it != end ; ++it ) + const TQStringList addrList = dlg.addresses(); + for ( TQStringList::const_iterator it = addrList.begin(), end = addrList.end() ; it != end ; ++it ) KRecentAddress::RecentAddresses::self( KMKernel::config() )->add( *it ); loadContacts(); } @@ -161,10 +161,10 @@ void KMLineEdit::loadContacts() if ( GlobalSettings::self()->showRecentAddressesInComposer() ){ if ( KMKernel::self() ) { - QStringList recent = + TQStringList recent = KRecentAddress::RecentAddresses::self( KMKernel::config() )->addresses(); - QStringList::Iterator it = recent.begin(); - QString name, email; + TQStringList::Iterator it = recent.begin(); + TQString name, email; int idx = addCompletionSource( i18n( "Recent Addresses" ) ); for ( ; it != recent.end(); ++it ) { KABC::Addressee addr; @@ -179,7 +179,7 @@ void KMLineEdit::loadContacts() KMLineEditSpell::KMLineEditSpell(bool useCompletion, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KMLineEdit(useCompletion,parent,name) { } @@ -190,18 +190,18 @@ void KMLineEditSpell::highLightWord( unsigned int length, unsigned int pos ) setSelection ( pos, length ); } -void KMLineEditSpell::spellCheckDone( const QString &s ) +void KMLineEditSpell::spellCheckDone( const TQString &s ) { if( s != text() ) setText( s ); } -void KMLineEditSpell::spellCheckerMisspelling( const QString &_text, const QStringList&, unsigned int pos) +void KMLineEditSpell::spellCheckerMisspelling( const TQString &_text, const TQStringList&, unsigned int pos) { highLightWord( _text.length(),pos ); } -void KMLineEditSpell::spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos) +void KMLineEditSpell::spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos) { if( old!= corr ) { diff --git a/kmail/kmlineeditspell.h b/kmail/kmlineeditspell.h index 85b4c1c9d..1355cd0ec 100644 --- a/kmail/kmlineeditspell.h +++ b/kmail/kmlineeditspell.h @@ -13,7 +13,7 @@ class KMLineEdit : public KPIM::AddresseeLineEdit { Q_OBJECT public: - KMLineEdit(bool useCompletion, QWidget *parent = 0, + KMLineEdit(bool useCompletion, TQWidget *parent = 0, const char *name = 0); signals: @@ -24,16 +24,16 @@ protected: // Inherited. Always called by the parent when this widget is created. virtual void loadContacts(); - virtual void keyPressEvent(QKeyEvent*); + virtual void keyPressEvent(TQKeyEvent*); - virtual QPopupMenu *createPopupMenu(); + virtual TQPopupMenu *createPopupMenu(); private slots: void editRecentAddresses(); private: - void dropEvent( QDropEvent *event ); - void insertEmails( const QStringList & emails ); + void dropEvent( TQDropEvent *event ); + void insertEmails( const TQStringList & emails ); }; @@ -41,12 +41,12 @@ class KMLineEditSpell : public KMLineEdit { Q_OBJECT public: - KMLineEditSpell(bool useCompletion, QWidget *parent = 0, + KMLineEditSpell(bool useCompletion, TQWidget *parent = 0, const char *name = 0); void highLightWord( unsigned int length, unsigned int pos ); - void spellCheckDone( const QString &s ); - void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos); - void spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos); + void spellCheckDone( const TQString &s ); + void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos); + void spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos); signals: void subjectTextSpellChecked(); diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp index 2876e3b03..0b847ba64 100644 --- a/kmail/kmmainwidget.cpp +++ b/kmail/kmmainwidget.cpp @@ -13,13 +13,13 @@ #endif #undef Unsorted // X headers... -#include <qaccel.h> -#include <qlayout.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qptrlist.h> +#include <tqaccel.h> +#include <tqlayout.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqptrlist.h> #include <kopenwith.h> @@ -45,7 +45,7 @@ #include <kaccel.h> #include <kstringhandler.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "globalsettings.h" #include "kcursorsaver.h" @@ -81,7 +81,7 @@ using KMail::ImapAccountBase; using KMail::Vacation; #include "favoritefolderview.h" -#include <qsignalmapper.h> +#include <tqsignalmapper.h> #include "subscriptiondialog.h" using KMail::SubscriptionDialog; @@ -129,21 +129,21 @@ using KMime::Types::AddrSpecList; using KPIM::ProgressManager; #include "managesievescriptsdialog.h" -#include <qstylesheet.h> +#include <tqstylesheet.h> #include "customtemplates.h" #include "customtemplates_kfg.h" #include "kmmainwidget.moc" -QValueList<KMMainWidget*>* KMMainWidget::s_mainWidgetList = 0; -static KStaticDeleter<QValueList<KMMainWidget*> > mwlsd; +TQValueList<KMMainWidget*>* KMMainWidget::s_mainWidgetList = 0; +static KStaticDeleter<TQValueList<KMMainWidget*> > mwlsd; //----------------------------------------------------------------------------- -KMMainWidget::KMMainWidget(QWidget *parent, const char *name, +KMMainWidget::KMMainWidget(TQWidget *parent, const char *name, KXMLGUIClient *aGUIClient, KActionCollection *actionCollection, KConfig* config ) : - QWidget(parent, name), + TQWidget(parent, name), mFavoritesCheckMailAction( 0 ), mFavoriteFolderView( 0 ), mFolderView( 0 ), @@ -170,7 +170,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name, mSystemTray = 0; mDestructed = false; mActionCollection = actionCollection; - mTopLayout = new QVBoxLayout(this); + mTopLayout = new TQVBoxLayout(this); mFilterMenuActions.setAutoDelete(true); mFilterTBarActions.setAutoDelete(false); mFilterCommands.setAutoDelete(true); @@ -191,7 +191,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name, mToolbarActionSeparator = new KActionSeparator( actionCollection ); if( !s_mainWidgetList ) - mwlsd.setObject( s_mainWidgetList, new QValueList<KMMainWidget*>() ); + mwlsd.setObject( s_mainWidgetList, new TQValueList<KMMainWidget*>() ); s_mainWidgetList->append( this ); mPanner1Sep << 1 << 1; @@ -208,39 +208,39 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name, activatePanners(); - QTimer::singleShot( 0, this, SLOT( slotShowStartupFolder() )); + TQTimer::singleShot( 0, this, TQT_SLOT( slotShowStartupFolder() )); - connect( kmkernel->acctMgr(), SIGNAL( checkedMail( bool, bool, const QMap<QString, int> & ) ), - this, SLOT( slotMailChecked( bool, bool, const QMap<QString, int> & ) ) ); + connect( kmkernel->acctMgr(), TQT_SIGNAL( checkedMail( bool, bool, const TQMap<TQString, int> & ) ), + this, TQT_SLOT( slotMailChecked( bool, bool, const TQMap<TQString, int> & ) ) ); - connect( kmkernel->acctMgr(), SIGNAL( accountAdded( KMAccount* ) ), - this, SLOT( initializeIMAPActions() ) ); - connect( kmkernel->acctMgr(), SIGNAL( accountRemoved( KMAccount* ) ), - this, SLOT( initializeIMAPActions() ) ); + connect( kmkernel->acctMgr(), TQT_SIGNAL( accountAdded( KMAccount* ) ), + this, TQT_SLOT( initializeIMAPActions() ) ); + connect( kmkernel->acctMgr(), TQT_SIGNAL( accountRemoved( KMAccount* ) ), + this, TQT_SLOT( initializeIMAPActions() ) ); - connect(kmkernel, SIGNAL( configChanged() ), - this, SLOT( slotConfigChanged() )); + connect(kmkernel, TQT_SIGNAL( configChanged() ), + this, TQT_SLOT( slotConfigChanged() )); // display the full path to the folder in the caption - connect(mFolderTree, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(slotChangeCaption(QListViewItem*))); - connect(mFolderTree, SIGNAL(selectionChanged()), - SLOT(updateFolderMenu()) ); + connect(mFolderTree, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(slotChangeCaption(TQListViewItem*))); + connect(mFolderTree, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(updateFolderMenu()) ); - connect(kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->searchFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect( kmkernel, SIGNAL( onlineStatusChanged( GlobalSettings::EnumNetworkState::type ) ), - this, SLOT( slotUpdateOnlineStatus( GlobalSettings::EnumNetworkState::type ) ) ); + connect( kmkernel, TQT_SIGNAL( onlineStatusChanged( GlobalSettings::EnumNetworkState::type ) ), + this, TQT_SLOT( slotUpdateOnlineStatus( GlobalSettings::EnumNetworkState::type ) ) ); toggleSystemTray(); @@ -250,11 +250,11 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name, KMainWindow *mainWin = dynamic_cast<KMainWindow*>(topLevelWidget()); KStatusBar *sb = mainWin ? mainWin->statusBar() : 0; - mVacationScriptIndicator = new KStatusBarLabel( QString(), 0, sb ); + mVacationScriptIndicator = new KStatusBarLabel( TQString(), 0, sb ); mVacationScriptIndicator->hide(); - connect( mVacationScriptIndicator, SIGNAL(itemReleased(int)), SLOT(slotEditVacation()) ); + connect( mVacationScriptIndicator, TQT_SIGNAL(itemReleased(int)), TQT_SLOT(slotEditVacation()) ); if ( GlobalSettings::checkOutOfOfficeOnStartup() ) - QTimer::singleShot( 0, this, SLOT(slotCheckVacation()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotCheckVacation()) ); } @@ -347,8 +347,8 @@ void KMMainWidget::readConfig(void) bool oldFolderQuickSearch = mEnableFolderQuickSearch; bool oldQuickSearch = mEnableQuickSearch; - QString str; - QSize siz; + TQString str; + TQSize siz; if (mStartupDone) { @@ -377,7 +377,7 @@ void KMMainWidget::readConfig(void) { // area for config group "Geometry" KConfigGroupSaver saver(config, "Geometry"); // size of the mainwin - QSize defaultSize(750,560); + TQSize defaultSize(750,560); siz = config->readSizeEntry("MainWin", &defaultSize); if (!siz.isEmpty()) resize(siz); @@ -391,8 +391,8 @@ void KMMainWidget::readConfig(void) mPanner1Sep.clear(); mPanner2Sep.clear(); - QValueList<int> & widths = mLongFolderList ? mPanner1Sep : mPanner2Sep ; - QValueList<int> & heights = mLongFolderList ? mPanner2Sep : mPanner1Sep ; + TQValueList<int> & widths = mLongFolderList ? mPanner1Sep : mPanner2Sep ; + TQValueList<int> & heights = mLongFolderList ? mPanner2Sep : mPanner1Sep ; widths << folderW << headerW; heights << headerH << readerH; @@ -455,7 +455,7 @@ void KMMainWidget::readConfig(void) if ( mFolderViewSplitter && !GlobalSettings::self()->folderViewSplitterPosition().isEmpty() ) { mFolderViewSplitter->setSizes( GlobalSettings::self()->folderViewSplitterPosition() ); } else { - QValueList<int> defaults; + TQValueList<int> defaults; defaults << (int)(height() * 0.2) << (int)(height() * 0.8); mFolderViewSplitter->setSizes( defaults ); } @@ -477,7 +477,7 @@ void KMMainWidget::readConfig(void) bool check = config->readBoolEntry("checkmail-startup", false); if (check) // do it after building the kmmainwin, so that the progressdialog is available - QTimer::singleShot( 0, this, SLOT( slotCheckMail() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotCheckMail() ) ); } } @@ -524,7 +524,7 @@ void KMMainWidget::readConfig(void) //----------------------------------------------------------------------------- void KMMainWidget::writeConfig(void) { - QString s; + TQString s; KConfig *config = KMKernel::config(); KConfigGroup geometry( config, "Geometry" ); @@ -539,8 +539,8 @@ void KMMainWidget::writeConfig(void) geometry.writeEntry( "MainWin", this->geometry().size() ); - const QValueList<int> widths = ( mLongFolderList ? mPanner1 : mPanner2 )->sizes(); - const QValueList<int> heights = ( mLongFolderList ? mPanner2 : mPanner1 )->sizes(); + const TQValueList<int> widths = ( mLongFolderList ? mPanner1 : mPanner2 )->sizes(); + const TQValueList<int> heights = ( mLongFolderList ? mPanner2 : mPanner1 )->sizes(); geometry.writeEntry( "FolderPaneWidth", widths[0] ); geometry.writeEntry( "HeaderPaneWidth", widths[1] ); @@ -562,17 +562,17 @@ void KMMainWidget::writeConfig(void) void KMMainWidget::createWidgets(void) { // Create the splitters according to the layout settings - QWidget *headerParent = 0, + TQWidget *headerParent = 0, *mimeParent = 0, *messageParent = 0; const bool opaqueResize = KGlobalSettings::opaqueResize(); if ( mLongFolderList ) { // superior splitter: folder tree vs. rest // inferior splitter: headers vs. message vs. mime tree - mPanner1 = new QSplitter( Qt::Horizontal, this, "panner 1" ); + mPanner1 = new TQSplitter( Qt::Horizontal, this, "panner 1" ); mPanner1->setOpaqueResize( opaqueResize ); Qt::Orientation orientation = mReaderWindowBelow ? Qt::Vertical : Qt::Horizontal; - mPanner2 = new QSplitter( orientation, mPanner1, "panner 2" ); + mPanner2 = new TQSplitter( orientation, mPanner1, "panner 2" ); mPanner2->setOpaqueResize( opaqueResize ); mPanner2->setChildrenCollapsible( false ); mFolderViewParent = mPanner1; @@ -580,10 +580,10 @@ void KMMainWidget::createWidgets(void) } else /* !mLongFolderList */ { // superior splitter: ( folder tree + headers ) vs. message vs. mime // inferior splitter: folder tree vs. headers - mPanner1 = new QSplitter( Qt::Vertical, this, "panner 1" ); + mPanner1 = new TQSplitter( Qt::Vertical, this, "panner 1" ); mPanner1->setOpaqueResize( opaqueResize ); mPanner1->setChildrenCollapsible( false ); - mPanner2 = new QSplitter( Qt::Horizontal, mPanner1, "panner 2" ); + mPanner2 = new TQSplitter( Qt::Horizontal, mPanner1, "panner 2" ); mPanner2->setOpaqueResize( opaqueResize ); headerParent = mFolderViewParent = mPanner2; mimeParent = messageParent = mPanner1; @@ -604,11 +604,11 @@ void KMMainWidget::createWidgets(void) #ifndef NDEBUG headerParent->dumpObjectTree(); #endif - mSearchAndHeaders = new QVBox( headerParent ); + mSearchAndHeaders = new TQVBox( headerParent ); mSearchToolBar = new KToolBar( mSearchAndHeaders, "search toolbar"); mSearchToolBar->setMovingEnabled(false); mSearchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n("S&earch:"), mSearchToolBar, "kde toolbar widget" ); + TQLabel *label = new TQLabel( i18n("S&earch:"), mSearchToolBar, "kde toolbar widget" ); mHeaders = new KMHeaders(this, mSearchAndHeaders, "headers"); @@ -620,26 +620,26 @@ void KMMainWidget::createWidgets(void) actionCollection(), "headers quick search line" ); #endif label->setBuddy( mQuickSearchLine ); - connect( mQuickSearchLine, SIGNAL( requestFullSearch() ), - this, SLOT( slotRequestFullSearchFromQuickSearch() ) ); + connect( mQuickSearchLine, TQT_SIGNAL( requestFullSearch() ), + this, TQT_SLOT( slotRequestFullSearchFromQuickSearch() ) ); mSearchToolBar->setStretchableWidget( mQuickSearchLine ); - connect( mHeaders, SIGNAL( messageListUpdated() ), - mQuickSearchLine, SLOT( updateSearch() ) ); + connect( mHeaders, TQT_SIGNAL( messageListUpdated() ), + mQuickSearchLine, TQT_SLOT( updateSearch() ) ); if ( !GlobalSettings::self()->quickSearchActive() ) mSearchToolBar->hide(); if (mReaderWindowActive) { - connect(mHeaders, SIGNAL(selected(KMMessage*)), - this, SLOT(slotMsgSelected(KMMessage*))); - } - connect(mHeaders, SIGNAL(activated(KMMessage*)), - this, SLOT(slotMsgActivated(KMMessage*))); - connect( mHeaders, SIGNAL( selectionChanged() ), - SLOT( startUpdateMessageActionsTimer() ) ); - QAccel *accel = actionCollection()->kaccel(); + connect(mHeaders, TQT_SIGNAL(selected(KMMessage*)), + this, TQT_SLOT(slotMsgSelected(KMMessage*))); + } + connect(mHeaders, TQT_SIGNAL(activated(KMMessage*)), + this, TQT_SLOT(slotMsgActivated(KMMessage*))); + connect( mHeaders, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( startUpdateMessageActionsTimer() ) ); + TQAccel *accel = actionCollection()->kaccel(); accel->connectItem(accel->insertItem(SHIFT+Key_Left), - mHeaders, SLOT(selectPrevMessage())); + mHeaders, TQT_SLOT(selectPrevMessage())); accel->connectItem(accel->insertItem(SHIFT+Key_Right), - mHeaders, SLOT(selectNextMessage())); + mHeaders, TQT_SLOT(selectNextMessage())); if (mReaderWindowActive) { mMsgView = new KMReaderWin(messageParent, this, actionCollection(), 0 ); @@ -647,24 +647,24 @@ void KMMainWidget::createWidgets(void) mMsgActions->setMessageView( mMsgView ); } - connect(mMsgView, SIGNAL(replaceMsgByUnencryptedVersion()), - this, SLOT(slotReplaceMsgByUnencryptedVersion())); - connect(mMsgView, SIGNAL(popupMenu(KMMessage&,const KURL&,const QPoint&)), - this, SLOT(slotMsgPopup(KMMessage&,const KURL&,const QPoint&))); - connect(mMsgView, SIGNAL(urlClicked(const KURL&,int)), - mMsgView, SLOT(slotUrlClicked())); - connect(mHeaders, SIGNAL(maybeDeleting()), - mMsgView, SLOT(clearCache())); - connect(mMsgView, SIGNAL(noDrag()), - mHeaders, SLOT(slotNoDrag())); + connect(mMsgView, TQT_SIGNAL(replaceMsgByUnencryptedVersion()), + this, TQT_SLOT(slotReplaceMsgByUnencryptedVersion())); + connect(mMsgView, TQT_SIGNAL(popupMenu(KMMessage&,const KURL&,const TQPoint&)), + this, TQT_SLOT(slotMsgPopup(KMMessage&,const KURL&,const TQPoint&))); + connect(mMsgView, TQT_SIGNAL(urlClicked(const KURL&,int)), + mMsgView, TQT_SLOT(slotUrlClicked())); + connect(mHeaders, TQT_SIGNAL(maybeDeleting()), + mMsgView, TQT_SLOT(clearCache())); + connect(mMsgView, TQT_SIGNAL(noDrag()), + mHeaders, TQT_SLOT(slotNoDrag())); accel->connectItem(accel->insertItem(Key_Up), - mMsgView, SLOT(slotScrollUp())); + mMsgView, TQT_SLOT(slotScrollUp())); accel->connectItem(accel->insertItem(Key_Down), - mMsgView, SLOT(slotScrollDown())); + mMsgView, TQT_SLOT(slotScrollDown())); accel->connectItem(accel->insertItem(Key_Prior), - mMsgView, SLOT(slotScrollPrior())); + mMsgView, TQT_SLOT(slotScrollPrior())); accel->connectItem(accel->insertItem(Key_Next), - mMsgView, SLOT(slotScrollNext())); + mMsgView, TQT_SLOT(slotScrollNext())); } else { mMsgView = NULL; } @@ -672,43 +672,43 @@ void KMMainWidget::createWidgets(void) KAction *action; action = new KAction( i18n("Move Message to Folder"), Key_M, this, - SLOT(slotMoveMsg()), actionCollection(), + TQT_SLOT(slotMoveMsg()), actionCollection(), "move_message_to_folder" ); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Copy Message to Folder"), Key_C, this, - SLOT(slotCopyMsg()), actionCollection(), + TQT_SLOT(slotCopyMsg()), actionCollection(), "copy_message_to_folder" ); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Jump to Folder"), Key_J, this, - SLOT(slotJumpToFolder()), actionCollection(), + TQT_SLOT(slotJumpToFolder()), actionCollection(), "jump_to_folder" ); action->plugAccel( actionCollection()->kaccel() ); // create list of folders - mFolderViewSplitter = new QSplitter( Qt::Vertical, mFolderViewParent ); + mFolderViewSplitter = new TQSplitter( Qt::Vertical, mFolderViewParent ); mFolderViewSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() ); mFavoriteFolderView = new KMail::FavoriteFolderView( this, mFolderViewSplitter ); if ( mFavoritesCheckMailAction ) - connect( mFavoritesCheckMailAction, SIGNAL(activated()), mFavoriteFolderView, SLOT(checkMail()) ); - QWidget *folderTreeParent = mFolderViewParent; + connect( mFavoritesCheckMailAction, TQT_SIGNAL(activated()), mFavoriteFolderView, TQT_SLOT(checkMail()) ); + TQWidget *folderTreeParent = mFolderViewParent; if ( GlobalSettings::enableFavoriteFolderView() ) { folderTreeParent = mFolderViewSplitter; mFolderView = mFolderViewSplitter; } // the "folder tree" consists of a quicksearch input field and the tree itself - mSearchAndTree = new QVBox(folderTreeParent); - mFolderQuickSearch = new QHBox(mSearchAndTree); - QPushButton *clear = new QPushButton(QApplication::reverseLayout() + mSearchAndTree = new TQVBox(folderTreeParent); + mFolderQuickSearch = new TQHBox(mSearchAndTree); + TQPushButton *clear = new TQPushButton(TQApplication::reverseLayout() ? SmallIcon("clear_left") : SmallIcon("locationbar_erase"), "", mFolderQuickSearch); clear->setFlat(true); KListViewSearchLine *search = new KListViewSearchLine(mFolderQuickSearch); mFolderTree = new KMFolderTree(this, mSearchAndTree, "folderTree"); search->setListView(mFolderTree); - connect(clear, SIGNAL(clicked()), search, SLOT(clear())); + connect(clear, TQT_SIGNAL(clicked()), search, TQT_SLOT(clear())); if ( !GlobalSettings::enableFolderQuickSearch() ) { mFolderQuickSearch->hide(); @@ -717,72 +717,72 @@ void KMMainWidget::createWidgets(void) if ( !GlobalSettings::enableFavoriteFolderView() ) { mFolderView = mSearchAndTree; } - connect( mFolderTree, SIGNAL(folderSelected(KMFolder*)), - mFavoriteFolderView, SLOT(folderTreeSelectionChanged(KMFolder*)) ); - - connect(mFolderTree, SIGNAL(folderSelected(KMFolder*)), - this, SLOT(folderSelected(KMFolder*))); - connect( mFolderTree, SIGNAL( folderSelected( KMFolder* ) ), - mQuickSearchLine, SLOT( reset() ) ); - connect(mFolderTree, SIGNAL(folderSelectedUnread(KMFolder*)), - this, SLOT(folderSelectedUnread(KMFolder*))); - connect(mFolderTree, SIGNAL(folderDrop(KMFolder*)), - this, SLOT(slotMoveMsgToFolder(KMFolder*))); - connect(mFolderTree, SIGNAL(folderDropCopy(KMFolder*)), - this, SLOT(slotCopyMsgToFolder(KMFolder*))); - connect(mFolderTree, SIGNAL(columnsChanged()), - this, SLOT(slotFolderTreeColumnsChanged())); + connect( mFolderTree, TQT_SIGNAL(folderSelected(KMFolder*)), + mFavoriteFolderView, TQT_SLOT(folderTreeSelectionChanged(KMFolder*)) ); + + connect(mFolderTree, TQT_SIGNAL(folderSelected(KMFolder*)), + this, TQT_SLOT(folderSelected(KMFolder*))); + connect( mFolderTree, TQT_SIGNAL( folderSelected( KMFolder* ) ), + mQuickSearchLine, TQT_SLOT( reset() ) ); + connect(mFolderTree, TQT_SIGNAL(folderSelectedUnread(KMFolder*)), + this, TQT_SLOT(folderSelectedUnread(KMFolder*))); + connect(mFolderTree, TQT_SIGNAL(folderDrop(KMFolder*)), + this, TQT_SLOT(slotMoveMsgToFolder(KMFolder*))); + connect(mFolderTree, TQT_SIGNAL(folderDropCopy(KMFolder*)), + this, TQT_SLOT(slotCopyMsgToFolder(KMFolder*))); + connect(mFolderTree, TQT_SIGNAL(columnsChanged()), + this, TQT_SLOT(slotFolderTreeColumnsChanged())); if ( mFavoriteFolderView ) { - connect( mFavoriteFolderView, SIGNAL(folderDrop(KMFolder*)), SLOT(slotMoveMsgToFolder(KMFolder*)) ); - connect( mFavoriteFolderView, SIGNAL(folderDropCopy(KMFolder*)), SLOT(slotCopyMsgToFolder(KMFolder*)) ); + connect( mFavoriteFolderView, TQT_SIGNAL(folderDrop(KMFolder*)), TQT_SLOT(slotMoveMsgToFolder(KMFolder*)) ); + connect( mFavoriteFolderView, TQT_SIGNAL(folderDropCopy(KMFolder*)), TQT_SLOT(slotCopyMsgToFolder(KMFolder*)) ); } //Commands not worthy of menu items, but that deserve configurable keybindings mRemoveDuplicatesAction = new KAction( i18n("Remove Duplicate Messages"), CTRL+Key_Asterisk, this, - SLOT(removeDuplicates()), actionCollection(), "remove_duplicate_messages"); + TQT_SLOT(removeDuplicates()), actionCollection(), "remove_duplicate_messages"); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Abort Current Operation"), Key_Escape, ProgressManager::instance(), - SLOT(slotAbortAll()), actionCollection(), "cancel" ); + TQT_SLOT(slotAbortAll()), actionCollection(), "cancel" ); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Focus on Next Folder"), CTRL+Key_Right, mFolderTree, - SLOT(incCurrentFolder()), actionCollection(), "inc_current_folder"); + TQT_SLOT(incCurrentFolder()), actionCollection(), "inc_current_folder"); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Focus on Previous Folder"), CTRL+Key_Left, mFolderTree, - SLOT(decCurrentFolder()), actionCollection(), "dec_current_folder"); + TQT_SLOT(decCurrentFolder()), actionCollection(), "dec_current_folder"); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Select Folder with Focus"), CTRL+Key_Space, mFolderTree, - SLOT(selectCurrentFolder()), actionCollection(), "select_current_folder"); + TQT_SLOT(selectCurrentFolder()), actionCollection(), "select_current_folder"); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Focus on Next Message"), ALT+Key_Right, mHeaders, - SLOT(incCurrentMessage()), actionCollection(), "inc_current_message"); + TQT_SLOT(incCurrentMessage()), actionCollection(), "inc_current_message"); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Focus on Previous Message"), ALT+Key_Left, mHeaders, - SLOT(decCurrentMessage()), actionCollection(), "dec_current_message"); + TQT_SLOT(decCurrentMessage()), actionCollection(), "dec_current_message"); action->plugAccel( actionCollection()->kaccel() ); action = new KAction( i18n("Select Message with Focus"), ALT+Key_Space, mHeaders, - SLOT( selectCurrentMessage() ), actionCollection(), "select_current_message"); + TQT_SLOT( selectCurrentMessage() ), actionCollection(), "select_current_message"); action->plugAccel( actionCollection()->kaccel() ); - connect( kmkernel->outboxFolder(), SIGNAL( msgRemoved(int, QString) ), - SLOT( startUpdateMessageActionsTimer() ) ); - connect( kmkernel->outboxFolder(), SIGNAL( msgAdded(int) ), - SLOT( startUpdateMessageActionsTimer() ) ); + connect( kmkernel->outboxFolder(), TQT_SIGNAL( msgRemoved(int, TQString) ), + TQT_SLOT( startUpdateMessageActionsTimer() ) ); + connect( kmkernel->outboxFolder(), TQT_SIGNAL( msgAdded(int) ), + TQT_SLOT( startUpdateMessageActionsTimer() ) ); } @@ -790,45 +790,45 @@ void KMMainWidget::createWidgets(void) void KMMainWidget::activatePanners(void) { if (mMsgView) { - QObject::disconnect( mMsgView->copyAction(), - SIGNAL( activated() ), - mMsgView, SLOT( slotCopySelectedText() )); + TQObject::disconnect( mMsgView->copyAction(), + TQT_SIGNAL( activated() ), + mMsgView, TQT_SLOT( slotCopySelectedText() )); } setupFolderView(); if ( mLongFolderList ) { - mSearchAndHeaders->reparent( mPanner2, 0, QPoint( 0, 0 ) ); + mSearchAndHeaders->reparent( mPanner2, 0, TQPoint( 0, 0 ) ); if (mMsgView) { - mMsgView->reparent( mPanner2, 0, QPoint( 0, 0 ) ); + mMsgView->reparent( mPanner2, 0, TQPoint( 0, 0 ) ); mPanner2->moveToLast( mMsgView ); } mFolderViewParent = mPanner1; - mFolderView->reparent( mFolderViewParent, 0, QPoint( 0, 0 ) ); + mFolderView->reparent( mFolderViewParent, 0, TQPoint( 0, 0 ) ); mPanner1->moveToLast( mPanner2 ); mPanner1->setSizes( mPanner1Sep ); - mPanner1->setResizeMode( mFolderView, QSplitter::KeepSize ); + mPanner1->setResizeMode( mFolderView, TQSplitter::KeepSize ); mPanner2->setSizes( mPanner2Sep ); - mPanner2->setResizeMode( mSearchAndHeaders, QSplitter::KeepSize ); + mPanner2->setResizeMode( mSearchAndHeaders, TQSplitter::KeepSize ); } else /* !mLongFolderList */ { mFolderViewParent = mPanner2; - mFolderView->reparent( mFolderViewParent, 0, QPoint( 0, 0 ) ); - mSearchAndHeaders->reparent( mPanner2, 0, QPoint( 0, 0 ) ); + mFolderView->reparent( mFolderViewParent, 0, TQPoint( 0, 0 ) ); + mSearchAndHeaders->reparent( mPanner2, 0, TQPoint( 0, 0 ) ); mPanner2->moveToLast( mSearchAndHeaders ); mPanner1->moveToFirst( mPanner2 ); if (mMsgView) { - mMsgView->reparent( mPanner1, 0, QPoint( 0, 0 ) ); + mMsgView->reparent( mPanner1, 0, TQPoint( 0, 0 ) ); mPanner1->moveToLast( mMsgView ); } mPanner1->setSizes( mPanner1Sep ); mPanner2->setSizes( mPanner2Sep ); - mPanner1->setResizeMode( mPanner2, QSplitter::KeepSize ); - mPanner2->setResizeMode( mFolderView, QSplitter::KeepSize ); + mPanner1->setResizeMode( mPanner2, TQSplitter::KeepSize ); + mPanner2->setResizeMode( mFolderView, TQSplitter::KeepSize ); } if (mMsgView) { - QObject::connect( mMsgView->copyAction(), - SIGNAL( activated() ), - mMsgView, SLOT( slotCopySelectedText() )); + TQObject::connect( mMsgView->copyAction(), + TQT_SIGNAL( activated() ), + mMsgView, TQT_SLOT( slotCopySelectedText() )); } } @@ -836,14 +836,14 @@ void KMMainWidget::activatePanners(void) //----------------------------------------------------------------------------- void KMMainWidget::hide() { - QWidget::hide(); + TQWidget::hide(); } //----------------------------------------------------------------------------- void KMMainWidget::show() { - QWidget::show(); + TQWidget::show(); } //------------------------------------------------------------------------- @@ -852,8 +852,8 @@ void KMMainWidget::slotSearch() if(!mSearchWin) { mSearchWin = new SearchWindow(this, "Search", mFolder, false); - connect(mSearchWin, SIGNAL(destroyed()), - this, SLOT(slotSearchClosed())); + connect(mSearchWin, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(slotSearchClosed())); } else { @@ -943,7 +943,7 @@ void KMMainWidget::slotCheckOneAccount(int item) //----------------------------------------------------------------------------- void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, - const QMap<QString, int> & newInFolder ) + const TQMap<TQString, int> & newInFolder ) { const bool sendOnAll = GlobalSettings::self()->sendOnCheck() == GlobalSettings::EnumSendOnCheck::SendOnAllChecks; @@ -955,14 +955,14 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, if ( !newMail || newInFolder.isEmpty() ) return; - kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", QByteArray() ); + kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() ); // build summary for new mail message bool showNotification = false; - QString summary; - QStringList keys( newInFolder.keys() ); + TQString summary; + TQStringList keys( newInFolder.keys() ); keys.sort(); - for ( QStringList::const_iterator it = keys.begin(); + for ( TQStringList::const_iterator it = keys.begin(); it != keys.end(); ++it ) { kdDebug(5006) << newInFolder.find( *it ).data() << " new message(s) in " @@ -1053,7 +1053,7 @@ void KMMainWidget::slotShowNewFromTemplate() for ( int idx = 0; idx<mTemplateFolder->count(); ++idx ) { KMMsgBase *mb = mTemplateFolder->getMsgBase( idx ); - QString subj = mb->subject(); + TQString subj = mb->subject(); if ( subj.isEmpty() ) subj = i18n("No Subject"); mTemplateMenu->popupMenu()->insertItem( KStringHandler::rsqueeze( subj.replace( "&", "&&" ) ), idx ); @@ -1133,7 +1133,7 @@ void KMMainWidget::modifyFolder( KMFolderTreeItem* folderItem ) //----------------------------------------------------------------------------- void KMMainWidget::slotExpireFolder() { - QString str; + TQString str; bool canBeExpired = true; if (!mFolder) return; @@ -1154,7 +1154,7 @@ void KMMainWidget::slotExpireFolder() KConfigGroupSaver saver(config, "General"); if (config->readBoolEntry("warn-before-expire", true)) { - str = i18n("<qt>Are you sure you want to expire the folder <b>%1</b>?</qt>").arg(QStyleSheet::escape( mFolder->label() )); + str = i18n("<qt>Are you sure you want to expire the folder <b>%1</b>?</qt>").arg(TQStyleSheet::escape( mFolder->label() )); if (KMessageBox::warningContinueCancel(this, str, i18n("Expire Folder"), i18n("&Expire")) != KMessageBox::Continue) return; @@ -1166,18 +1166,18 @@ void KMMainWidget::slotExpireFolder() //----------------------------------------------------------------------------- void KMMainWidget::slotEmptyFolder() { - QString str; + TQString str; if (!mFolder) return; bool isTrash = kmkernel->folderIsTrash(mFolder); if (mConfirmEmpty) { - QString title = (isTrash) ? i18n("Empty Trash") : i18n("Move to Trash"); - QString text = (isTrash) ? + TQString title = (isTrash) ? i18n("Empty Trash") : i18n("Move to Trash"); + TQString text = (isTrash) ? i18n("Are you sure you want to empty the trash folder?") : i18n("<qt>Are you sure you want to move all messages from " - "folder <b>%1</b> to the trash?</qt>").arg( QStyleSheet::escape( mFolder->label() ) ); + "folder <b>%1</b> to the trash?</qt>").arg( TQStyleSheet::escape( mFolder->label() ) ); if (KMessageBox::warningContinueCancel(this, text, title, KGuiItem( title, "edittrash")) != KMessageBox::Continue) return; @@ -1208,26 +1208,26 @@ void KMMainWidget::slotEmptyFolder() //----------------------------------------------------------------------------- void KMMainWidget::slotRemoveFolder() { - QString str; - QDir dir; + TQString str; + TQDir dir; if ( !mFolder ) return; if ( mFolder->isSystemFolder() ) return; if ( mFolder->isReadOnly() ) return; - QString title; + TQString title; if ( mFolder->folderType() == KMFolderTypeSearch ) { title = i18n("Delete Search"); str = i18n("<qt>Are you sure you want to delete the search <b>%1</b>?<br>" "Any messages it shows will still be available in their original folder.</qt>") - .arg( QStyleSheet::escape( mFolder->label() ) ); + .arg( TQStyleSheet::escape( mFolder->label() ) ); } else { title = i18n("Delete Folder"); if ( mFolder->count() == 0 ) { if ( !mFolder->child() || mFolder->child()->isEmpty() ) { str = i18n("<qt>Are you sure you want to delete the empty folder " "<b>%1</b>?</qt>") - .arg( QStyleSheet::escape( mFolder->label() ) ); + .arg( TQStyleSheet::escape( mFolder->label() ) ); } else { str = i18n("<qt>Are you sure you want to delete the empty folder " @@ -1235,7 +1235,7 @@ void KMMainWidget::slotRemoveFolder() "not be empty and their contents will be discarded as well. " "<p><b>Beware</b> that discarded messages are not saved " "into your Trash folder and are permanently deleted.</qt>") - .arg( QStyleSheet::escape( mFolder->label() ) ); + .arg( TQStyleSheet::escape( mFolder->label() ) ); } } else { if ( !mFolder->child() || mFolder->child()->isEmpty() ) { @@ -1243,14 +1243,14 @@ void KMMainWidget::slotRemoveFolder() "<b>%1</b>, discarding its contents? " "<p><b>Beware</b> that discarded messages are not saved " "into your Trash folder and are permanently deleted.</qt>") - .arg( QStyleSheet::escape( mFolder->label() ) ); + .arg( TQStyleSheet::escape( mFolder->label() ) ); } else { str = i18n("<qt>Are you sure you want to delete the folder <b>%1</b> " "and all its subfolders, discarding their contents? " "<p><b>Beware</b> that discarded messages are not saved " "into your Trash folder and are permanently deleted.</qt>") - .arg( QStyleSheet::escape( mFolder->label() ) ); + .arg( TQStyleSheet::escape( mFolder->label() ) ); } } } @@ -1304,7 +1304,7 @@ void KMMainWidget::slotCompactFolder() KCursorSaver busy(KBusyPtr::busy()); mFolder->compact( KMFolder::CompactNow ); // setCurrentItemByIndex will override the statusbar message, so save/restore it - QString statusMsg = BroadcastStatus::instance()->statusMsg(); + TQString statusMsg = BroadcastStatus::instance()->statusMsg(); mHeaders->setCurrentItemByIndex(idx); BroadcastStatus::instance()->setStatusMsg( statusMsg ); } @@ -1549,8 +1549,8 @@ void KMMainWidget::slotRedirectMsg() //----------------------------------------------------------------------------- void KMMainWidget::slotCustomReplyToMsg( int tid ) { - QString text = mMsgView? mMsgView->copyText() : ""; - QString tmpl = mCustomTemplates[ tid ]; + TQString text = mMsgView? mMsgView->copyText() : ""; + TQString tmpl = mCustomTemplates[ tid ]; kdDebug() << "Reply with template: " << tmpl << " (" << tid << ")" << endl; KMCommand *command = new KMCustomReplyToCommand( this, mHeaders->currentMsg(), @@ -1563,8 +1563,8 @@ void KMMainWidget::slotCustomReplyToMsg( int tid ) //----------------------------------------------------------------------------- void KMMainWidget::slotCustomReplyAllToMsg( int tid ) { - QString text = mMsgView? mMsgView->copyText() : ""; - QString tmpl = mCustomTemplates[ tid ]; + TQString text = mMsgView? mMsgView->copyText() : ""; + TQString tmpl = mCustomTemplates[ tid ]; kdDebug() << "Reply to All with template: " << tmpl << " (" << tid << ")" << endl; KMCommand *command = new KMCustomReplyAllToCommand( this, mHeaders->currentMsg(), @@ -1577,7 +1577,7 @@ void KMMainWidget::slotCustomReplyAllToMsg( int tid ) //----------------------------------------------------------------------------- void KMMainWidget::slotCustomForwardMsg( int tid ) { - QString tmpl = mCustomTemplates[ tid ]; + TQString tmpl = mCustomTemplates[ tid ]; kdDebug() << "Forward with template: " << tmpl << " (" << tid << ")" << endl; KMMessageList* selected = mHeaders->selectedMsgs(); KMCommand *command = 0L; @@ -1652,9 +1652,9 @@ void KMMainWidget::slotToFilter() void KMMainWidget::updateListFilterAction() { //Proxy the mListFilterAction to update the action text - QCString name; - QString value; - QString lname = MailingList::name( mHeaders->currentMsg(), name, value ); + TQCString name; + TQString value; + TQString lname = MailingList::name( mHeaders->currentMsg(), name, value ); mListFilterAction->setText( i18n("Filter on Mailing-List...") ); if ( lname.isNull() ) mListFilterAction->setEnabled( false ); @@ -1741,7 +1741,7 @@ void KMMainWidget::slotCheckVacation() return; Vacation *vac = new Vacation( this, true /* check only */ ); - connect( vac, SIGNAL(scriptActive(bool)), SLOT(updateVactionScriptStatus(bool)) ); + connect( vac, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScriptStatus(bool)) ); } void KMMainWidget::slotEditVacation() @@ -1754,18 +1754,18 @@ void KMMainWidget::slotEditVacation() return; mVacation = new Vacation( this ); - connect( mVacation, SIGNAL(scriptActive(bool)), SLOT(updateVactionScriptStatus(bool)) ); + connect( mVacation, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScriptStatus(bool)) ); if ( mVacation->isUsable() ) { - connect( mVacation, SIGNAL(result(bool)), mVacation, SLOT(deleteLater()) ); + connect( mVacation, TQT_SIGNAL(result(bool)), mVacation, TQT_SLOT(deleteLater()) ); } else { - QString msg = i18n("KMail's Out of Office Reply functionality relies on " + TQString msg = i18n("KMail's Out of Office Reply functionality relies on " "server-side filtering. You have not yet configured an " "IMAP server for this.\n" "You can do this on the \"Filtering\" tab of the IMAP " "account configuration."); KMessageBox::sorry( this, msg, i18n("No Server-Side Filtering Configured") ); - delete mVacation; // QGuardedPtr sets itself to 0! + delete mVacation; // TQGuardedPtr sets itself to 0! } } @@ -1917,8 +1917,8 @@ void KMMainWidget::slotSendQueuedVia( int item ) return; } - QStringList availTransports= KMail::TransportManager::transportNames(); - QString customTransport = availTransports[ item ]; + TQStringList availTransports= KMail::TransportManager::transportNames(); + TQString customTransport = availTransports[ item ]; kmkernel->msgSender()->sendQueued( customTransport ); } @@ -2001,14 +2001,14 @@ void KMMainWidget::folderSelected( KMFolder* aFolder, bool forceJumpToUnread ) if ( newFolder ) writeFolderConfig(); if ( mFolder ) { - disconnect( mFolder, SIGNAL( changed() ), - this, SLOT( updateMarkAsReadAction() ) ); - disconnect( mFolder, SIGNAL( msgHeaderChanged( KMFolder*, int ) ), - this, SLOT( updateMarkAsReadAction() ) ); - disconnect( mFolder, SIGNAL( msgAdded( int ) ), - this, SLOT( updateMarkAsReadAction() ) ); - disconnect( mFolder, SIGNAL( msgRemoved( KMFolder * ) ), - this, SLOT( updateMarkAsReadAction() ) ); + disconnect( mFolder, TQT_SIGNAL( changed() ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); + disconnect( mFolder, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); + disconnect( mFolder, TQT_SIGNAL( msgAdded( int ) ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); + disconnect( mFolder, TQT_SIGNAL( msgRemoved( KMFolder * ) ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); } mFolder = aFolder; @@ -2025,8 +2025,8 @@ void KMMainWidget::folderSelected( KMFolder* aFolder, bool forceJumpToUnread ) imap->open("mainwidget"); // will be closed in the folderSelected slot // first get new headers before we select the folder imap->setSelected( true ); - connect( imap, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( folderSelected() ) ); + connect( imap, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( folderSelected() ) ); imap->getAndCheckFolder(); mHeaders->setFolder( 0 ); updateFolderMenu(); @@ -2034,27 +2034,27 @@ void KMMainWidget::folderSelected( KMFolder* aFolder, bool forceJumpToUnread ) // Set a timer to show a splash screen if fetching folder contents // takes more than the amount of seconds configured in the kmailrc (default 1000 msec) - mShowBusySplashTimer = new QTimer( this ); - connect( mShowBusySplashTimer, SIGNAL( timeout() ), this, SLOT( slotShowBusySplash() ) ); + mShowBusySplashTimer = new TQTimer( this ); + connect( mShowBusySplashTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotShowBusySplash() ) ); mShowBusySplashTimer->start( GlobalSettings::self()->folderLoadingTimeout(), true ); return; } else { // the folder is complete now - so go ahead - disconnect( imap, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( folderSelected() ) ); + disconnect( imap, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( folderSelected() ) ); forceJumpToUnread = mForceJumpToUnread; } } if ( mFolder ) { // == 0 -> pointing to toplevel ("Welcome to KMail") folder - connect( mFolder, SIGNAL( changed() ), - this, SLOT( updateMarkAsReadAction() ) ); - connect( mFolder, SIGNAL( msgHeaderChanged( KMFolder*, int ) ), - this, SLOT( updateMarkAsReadAction() ) ); - connect( mFolder, SIGNAL( msgAdded( int ) ), - this, SLOT( updateMarkAsReadAction() ) ); - connect( mFolder, SIGNAL( msgRemoved(KMFolder *) ), - this, SLOT( updateMarkAsReadAction() ) ); + connect( mFolder, TQT_SIGNAL( changed() ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); + connect( mFolder, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); + connect( mFolder, TQT_SIGNAL( msgAdded( int ) ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); + connect( mFolder, TQT_SIGNAL( msgRemoved(KMFolder *) ), + this, TQT_SLOT( updateMarkAsReadAction() ) ); } readFolderConfig(); if (mMsgView) @@ -2108,8 +2108,8 @@ void KMMainWidget::slotMsgSelected(KMMessage *msg) } mJob = msg->parent()->createJob( msg, FolderJob::tGetMessage, 0, "STRUCTURE", mMsgView->attachmentStrategy() ); - connect(mJob, SIGNAL(messageRetrieved(KMMessage*)), - mMsgView, SLOT(slotMessageArrived(KMMessage*))); + connect(mJob, TQT_SIGNAL(messageRetrieved(KMMessage*)), + mMsgView, TQT_SLOT(slotMessageArrived(KMMessage*))); mJob->start(); } else { mMsgView->setMsg(msg); @@ -2130,7 +2130,7 @@ void KMMainWidget::slotMsgChanged() //----------------------------------------------------------------------------- void KMMainWidget::slotSelectFolder(KMFolder* folder) { - QListViewItem* item = mFolderTree->indexOfFolder(folder); + TQListViewItem* item = mFolderTree->indexOfFolder(folder); if ( item ) { mFolderTree->ensureItemVisible( item ); mFolderTree->doFolderSelected( item ); @@ -2162,8 +2162,8 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() KMMessage* newMsg = oldMsg->unencryptedMsg(); // adjust the message id { - QString msgId( oldMsg->msgId() ); - QString prefix("DecryptedMsg."); + TQString msgId( oldMsg->msgId() ); + TQString prefix("DecryptedMsg."); int oldIdx = msgId.find(prefix, 0, false); if( -1 == oldIdx ) { int leftAngle = msgId.findRev( '<' ); @@ -2172,7 +2172,7 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() else { // toggle between "DecryptedMsg." and "DeCryptedMsg." // to avoid same message id - QCharRef c = msgId[ oldIdx+2 ]; + TQCharRef c = msgId[ oldIdx+2 ]; if( 'C' == c ) c = 'c'; else @@ -2293,8 +2293,8 @@ void KMMainWidget::slotMsgActivated(KMMessage *msg) if ( !msg ) return; if ( msg->parent() && !msg->isComplete() ) { FolderJob *job = msg->parent()->createJob( msg ); - connect( job, SIGNAL( messageRetrieved( KMMessage* ) ), - SLOT( slotMsgActivated( KMMessage* ) ) ); + connect( job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ), + TQT_SLOT( slotMsgActivated( KMMessage* ) ) ); job->start(); return; } @@ -2329,7 +2329,7 @@ void KMMainWidget::slotMarkAll() } //----------------------------------------------------------------------------- -void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const QPoint& aPoint) +void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const TQPoint& aPoint) { KPopupMenu * menu = new KPopupMenu; updateMessageMenu(); @@ -2438,11 +2438,11 @@ void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const QPoint& aPoi //----------------------------------------------------------------------------- void KMMainWidget::getAccountMenu() { - QStringList actList; + TQStringList actList; mActMenu->clear(); actList = kmkernel->acctMgr()->getAccounts(); - QStringList::Iterator it; + TQStringList::Iterator it; int id = 0; for(it = actList.begin(); it != actList.end() ; ++it, id++) mActMenu->insertItem((*it).replace("&", "&&"), id); @@ -2451,11 +2451,11 @@ void KMMainWidget::getAccountMenu() //----------------------------------------------------------------------------- void KMMainWidget::getTransportMenu() { - QStringList availTransports; + TQStringList availTransports; mSendMenu->clear(); availTransports = KMail::TransportManager::transportNames(); - QStringList::Iterator it; + TQStringList::Iterator it; int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) mSendMenu->insertItem((*it).replace("&", "&&"), id); @@ -2465,7 +2465,7 @@ void KMMainWidget::getTransportMenu() void KMMainWidget::updateCustomTemplateMenus() { if ( !mCustomTemplateActions.isEmpty() ) { - QPtrList<KAction>::iterator ait = mCustomTemplateActions.begin(); + TQPtrList<KAction>::iterator ait = mCustomTemplateActions.begin(); for ( ; ait != mCustomTemplateActions.end() ; ++ait ) { (*ait)->unplugAll(); delete (*ait); @@ -2485,32 +2485,32 @@ void KMMainWidget::updateCustomTemplateMenus() new KActionMenu( i18n("Forward With Custom Template"), "mail_custom_forward", actionCollection(), "custom_forward" ); - QSignalMapper *mCustomForwardMapper = new QSignalMapper( this ); - connect( mCustomForwardMapper, SIGNAL( mapped( int ) ), - this, SLOT( slotCustomForwardMsg( int ) ) ); + TQSignalMapper *mCustomForwardMapper = new TQSignalMapper( this ); + connect( mCustomForwardMapper, TQT_SIGNAL( mapped( int ) ), + this, TQT_SLOT( slotCustomForwardMsg( int ) ) ); mForwardActionMenu->insert( mCustomForwardActionMenu ); mCustomReplyActionMenu = new KActionMenu( i18n("Reply With Custom Template"), "mail_custom_reply", actionCollection(), "custom_reply" ); - QSignalMapper *mCustomReplyMapper = new QSignalMapper( this ); - connect( mCustomReplyMapper, SIGNAL( mapped( int ) ), - this, SLOT( slotCustomReplyToMsg( int ) ) ); + TQSignalMapper *mCustomReplyMapper = new TQSignalMapper( this ); + connect( mCustomReplyMapper, TQT_SIGNAL( mapped( int ) ), + this, TQT_SLOT( slotCustomReplyToMsg( int ) ) ); mMsgActions->replyMenu()->insert( mCustomReplyActionMenu ); mCustomReplyAllActionMenu = new KActionMenu( i18n("Reply to All With Custom Template"), "mail_custom_reply_all", actionCollection(), "custom_reply_all" ); - QSignalMapper *mCustomReplyAllMapper = new QSignalMapper( this ); - connect( mCustomReplyAllMapper, SIGNAL( mapped( int ) ), - this, SLOT( slotCustomReplyAllToMsg( int ) ) ); + TQSignalMapper *mCustomReplyAllMapper = new TQSignalMapper( this ); + connect( mCustomReplyAllMapper, TQT_SIGNAL( mapped( int ) ), + this, TQT_SLOT( slotCustomReplyAllToMsg( int ) ) ); mMsgActions->replyMenu()->insert( mCustomReplyAllActionMenu ); mCustomTemplates.clear(); - QStringList list = GlobalSettingsBase::self()->customTemplates(); - QStringList::iterator it = list.begin(); + TQStringList list = GlobalSettingsBase::self()->customTemplates(); + TQStringList::iterator it = list.begin(); int idx = 0; int replyc = 0; int replyallc = 0; @@ -2525,7 +2525,7 @@ void KMMainWidget::updateCustomTemplateMenus() action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyMapper, - SLOT( map() ), + TQT_SLOT( map() ), actionCollection(), (*it).utf8() ); mCustomReplyMapper->setMapping( action, idx ); @@ -2537,7 +2537,7 @@ void KMMainWidget::updateCustomTemplateMenus() action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyAllMapper, - SLOT( map() ), + TQT_SLOT( map() ), actionCollection(), (*it).utf8() ); mCustomReplyAllMapper->setMapping( action, idx ); @@ -2549,7 +2549,7 @@ void KMMainWidget::updateCustomTemplateMenus() action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomForwardMapper, - SLOT( map() ), + TQT_SLOT( map() ), actionCollection(), (*it).utf8() ); mCustomForwardMapper->setMapping( action, idx ); @@ -2561,7 +2561,7 @@ void KMMainWidget::updateCustomTemplateMenus() action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyMapper, - SLOT( map() ), + TQT_SLOT( map() ), actionCollection(), (*it).utf8() ); mCustomReplyMapper->setMapping( action, idx ); @@ -2571,7 +2571,7 @@ void KMMainWidget::updateCustomTemplateMenus() action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyAllMapper, - SLOT( map() ), + TQT_SLOT( map() ), actionCollection(), (*it).utf8() ); mCustomReplyAllMapper->setMapping( action, idx ); @@ -2581,7 +2581,7 @@ void KMMainWidget::updateCustomTemplateMenus() action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomForwardMapper, - SLOT( map() ), + TQT_SLOT( map() ), actionCollection(), (*it).utf8() ); mCustomForwardMapper->setMapping( action, idx ); @@ -2621,53 +2621,53 @@ void KMMainWidget::setupActions() //----- File Menu mSaveAsAction = new KAction( i18n("Save &As..."), "filesave", KStdAccel::shortcut(KStdAccel::Save), - this, SLOT(slotSaveMsg()), actionCollection(), "file_save_as" ); + this, TQT_SLOT(slotSaveMsg()), actionCollection(), "file_save_as" ); - mOpenAction = KStdAction::open( this, SLOT( slotOpenMsg() ), + mOpenAction = KStdAction::open( this, TQT_SLOT( slotOpenMsg() ), actionCollection() ); (void) new KAction( i18n("&Compact All Folders"), 0, - this, SLOT(slotCompactAll()), + this, TQT_SLOT(slotCompactAll()), actionCollection(), "compact_all_folders" ); (void) new KAction( i18n("&Expire All Folders"), 0, - this, SLOT(slotExpireAll()), + this, TQT_SLOT(slotExpireAll()), actionCollection(), "expire_all_folders" ); (void) new KAction( i18n("&Refresh Local IMAP Cache"), "refresh", - this, SLOT(slotInvalidateIMAPFolders()), + this, TQT_SLOT(slotInvalidateIMAPFolders()), actionCollection(), "file_invalidate_imap_cache" ); (void) new KAction( i18n("Empty All &Trash Folders"), 0, - KMKernel::self(), SLOT(slotEmptyTrash()), + KMKernel::self(), TQT_SLOT(slotEmptyTrash()), actionCollection(), "empty_trash" ); (void) new KAction( i18n("Check &Mail"), "mail_get", CTRL+Key_L, - this, SLOT(slotCheckMail()), + this, TQT_SLOT(slotCheckMail()), actionCollection(), "check_mail" ); mFavoritesCheckMailAction = new KAction( i18n("Check Mail in Favorite Folders"), "mail_get", CTRL+SHIFT+Key_L, 0, 0, actionCollection(), "favorite_check_mail" ); if ( mFavoriteFolderView ) - connect( mFavoritesCheckMailAction, SIGNAL(activated()), mFavoriteFolderView, SLOT(checkMail()) ); + connect( mFavoritesCheckMailAction, TQT_SIGNAL(activated()), mFavoriteFolderView, TQT_SLOT(checkMail()) ); KActionMenu *actActionMenu = new KActionMenu( i18n("Check Mail &In"), "mail_get", actionCollection(), "check_mail_in" ); actActionMenu->setDelayed(true); //needed for checking "all accounts" - connect(actActionMenu,SIGNAL(activated()),this,SLOT(slotCheckMail())); + connect(actActionMenu,TQT_SIGNAL(activated()),this,TQT_SLOT(slotCheckMail())); mActMenu = actActionMenu->popupMenu(); - connect(mActMenu,SIGNAL(activated(int)),this,SLOT(slotCheckOneAccount(int))); - connect(mActMenu,SIGNAL(aboutToShow()),this,SLOT(getAccountMenu())); + connect(mActMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotCheckOneAccount(int))); + connect(mActMenu,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(getAccountMenu())); (void) new KAction( i18n("&Send Queued Messages"), "mail_send", 0, this, - SLOT(slotSendQueued()), actionCollection(), "send_queued"); + TQT_SLOT(slotSendQueued()), actionCollection(), "send_queued"); (void) new KAction( i18n("Online Status (unknown)"), "online_status", 0, this, - SLOT(slotOnlineStatus()), actionCollection(), "online_status"); + TQT_SLOT(slotOnlineStatus()), actionCollection(), "online_status"); KActionMenu *sendActionMenu = new KActionMenu( i18n("Send Queued Messages Via"), "mail_send_via", actionCollection(), @@ -2675,56 +2675,56 @@ void KMMainWidget::setupActions() sendActionMenu->setDelayed(true); mSendMenu = sendActionMenu->popupMenu(); - connect(mSendMenu,SIGNAL(activated(int)), this, SLOT(slotSendQueuedVia(int))); - connect(mSendMenu,SIGNAL(aboutToShow()),this,SLOT(getTransportMenu())); + connect(mSendMenu,TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSendQueuedVia(int))); + connect(mSendMenu,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(getTransportMenu())); KAction *act; //----- Tools menu if (parent()->inherits("KMMainWin")) { act = new KAction( i18n("&Address Book..."), "contents", 0, this, - SLOT(slotAddrBook()), actionCollection(), "addressbook" ); + TQT_SLOT(slotAddrBook()), actionCollection(), "addressbook" ); if (KStandardDirs::findExe("kaddressbook").isEmpty()) act->setEnabled(false); } act = new KAction( i18n("Certificate Manager..."), "pgp-keys", 0, this, - SLOT(slotStartCertManager()), actionCollection(), "tools_start_certman"); + TQT_SLOT(slotStartCertManager()), actionCollection(), "tools_start_certman"); // disable action if no certman binary is around if (KStandardDirs::findExe("kleopatra").isEmpty()) act->setEnabled(false); act = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, this, - SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg"); + TQT_SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg"); // disable action if no kwatchgnupg binary is around if (KStandardDirs::findExe("kwatchgnupg").isEmpty()) act->setEnabled(false); act = new KAction( i18n("&Import Messages..."), "fileopen", 0, this, - SLOT(slotImport()), actionCollection(), "import" ); + TQT_SLOT(slotImport()), actionCollection(), "import" ); if (KStandardDirs::findExe("kmailcvt").isEmpty()) act->setEnabled(false); #if !defined(NDEBUG) (void) new KAction( i18n("&Debug Sieve..."), - "idea", 0, this, SLOT(slotDebugSieve()), + "idea", 0, this, TQT_SLOT(slotDebugSieve()), actionCollection(), "tools_debug_sieve" ); #endif if ( GlobalSettings::allowOutOfOfficeSettings() ) { (void) new KAction( i18n("Edit \"Out of Office\" Replies..."), - "configure", 0, this, SLOT(slotEditVacation()), + "configure", 0, this, TQT_SLOT(slotEditVacation()), actionCollection(), "tools_edit_vacation" ); } (void) new KAction( i18n("Filter &Log Viewer..."), 0, this, - SLOT(slotFilterLogViewer()), actionCollection(), "filter_log_viewer" ); + TQT_SLOT(slotFilterLogViewer()), actionCollection(), "filter_log_viewer" ); (void) new KAction( i18n("&Anti-Spam Wizard..."), 0, this, - SLOT(slotAntiSpamWizard()), actionCollection(), "antiSpamWizard" ); + TQT_SLOT(slotAntiSpamWizard()), actionCollection(), "antiSpamWizard" ); (void) new KAction( i18n("&Anti-Virus Wizard..."), 0, this, - SLOT(slotAntiVirusWizard()), actionCollection(), "antiVirusWizard" ); + TQT_SLOT(slotAntiVirusWizard()), actionCollection(), "antiVirusWizard" ); //----- Edit Menu mTrashAction = new KAction( KGuiItem( i18n("&Move to Trash"), "edittrash", i18n("Move message to trashcan") ), - Key_Delete, this, SLOT(slotTrashMsg()), + Key_Delete, this, TQT_SLOT(slotTrashMsg()), actionCollection(), "move_to_trash" ); /* The delete action is nowhere in the gui, by default, so we need to make @@ -2732,105 +2732,105 @@ void KMMainWidget::setupActions() * XMLGui construction or manual ->plug(). This is only a problem when run * as a part, though. */ mDeleteAction = new KAction( i18n("&Delete"), "editdelete", SHIFT+Key_Delete, this, - SLOT(slotDeleteMsg()), actionCollection(), "delete" ); + TQT_SLOT(slotDeleteMsg()), actionCollection(), "delete" ); mDeleteAction->plugAccel( actionCollection()->kaccel() ); mTrashThreadAction = new KAction( KGuiItem( i18n("M&ove Thread to Trash"), "edittrash", i18n("Move thread to trashcan") ), - CTRL+Key_Delete, this, SLOT(slotTrashThread()), + CTRL+Key_Delete, this, TQT_SLOT(slotTrashThread()), actionCollection(), "move_thread_to_trash" ); mDeleteThreadAction = new KAction( i18n("Delete T&hread"), "editdelete", CTRL+SHIFT+Key_Delete, this, - SLOT(slotDeleteThread()), actionCollection(), "delete_thread" ); + TQT_SLOT(slotDeleteThread()), actionCollection(), "delete_thread" ); (void) new KAction( i18n("&Find Messages..."), "mail_find", Key_S, this, - SLOT(slotRequestFullSearchFromQuickSearch()), actionCollection(), "search_messages" ); + TQT_SLOT(slotRequestFullSearchFromQuickSearch()), actionCollection(), "search_messages" ); mFindInMessageAction = new KAction( i18n("&Find in Message..."), "find", KStdAccel::shortcut(KStdAccel::Find), this, - SLOT(slotFind()), actionCollection(), "find_in_messages" ); + TQT_SLOT(slotFind()), actionCollection(), "find_in_messages" ); (void) new KAction( i18n("Select &All Messages"), KStdAccel::selectAll(), this, - SLOT(slotMarkAll()), actionCollection(), "mark_all_messages" ); + TQT_SLOT(slotMarkAll()), actionCollection(), "mark_all_messages" ); //----- Folder Menu mNewFolderAction = new KAction( i18n("&New Folder..."), "folder_new", 0, mFolderTree, - SLOT(addChildFolder()), actionCollection(), "new_folder" ); + TQT_SLOT(addChildFolder()), actionCollection(), "new_folder" ); mModifyFolderAction = new KAction( i18n("&Properties"), "configure", 0, this, - SLOT(slotModifyFolder()), actionCollection(), "modify" ); + TQT_SLOT(slotModifyFolder()), actionCollection(), "modify" ); mFolderMailingListPropertiesAction = new KAction( i18n("&Mailing List Management..."), - /*"folder_mailinglist_properties",*/ 0, this, SLOT( slotFolderMailingListProperties() ), + /*"folder_mailinglist_properties",*/ 0, this, TQT_SLOT( slotFolderMailingListProperties() ), actionCollection(), "folder_mailinglist_properties" ); mFolderShortCutCommandAction = new KAction( i18n("&Assign Shortcut..."), "configure_shortcuts", - 0, this, SLOT( slotFolderShortcutCommand() ), actionCollection(), + 0, this, TQT_SLOT( slotFolderShortcutCommand() ), actionCollection(), "folder_shortcut_command" ); mMarkAllAsReadAction = new KAction( i18n("Mark All Messages as &Read"), "goto", 0, this, - SLOT(slotMarkAllAsRead()), actionCollection(), "mark_all_as_read" ); + TQT_SLOT(slotMarkAllAsRead()), actionCollection(), "mark_all_as_read" ); - mExpireFolderAction = new KAction(i18n("&Expiration Settings"), 0, this, SLOT(slotExpireFolder()), + mExpireFolderAction = new KAction(i18n("&Expiration Settings"), 0, this, TQT_SLOT(slotExpireFolder()), actionCollection(), "expire"); mCompactFolderAction = new KAction( i18n("&Compact Folder"), 0, this, - SLOT(slotCompactFolder()), actionCollection(), "compact" ); + TQT_SLOT(slotCompactFolder()), actionCollection(), "compact" ); mRefreshFolderAction = new KAction( i18n("Check Mail &in This Folder"), "reload", KStdAccel::shortcut( KStdAccel::Reload ), this, - SLOT(slotRefreshFolder()), + TQT_SLOT(slotRefreshFolder()), actionCollection(), "refresh_folder" ); mTroubleshootFolderAction = 0; // set in initializeIMAPActions mEmptyFolderAction = new KAction( "foo" /*set in updateFolderMenu*/, "edittrash", 0, this, - SLOT(slotEmptyFolder()), actionCollection(), "empty" ); + TQT_SLOT(slotEmptyFolder()), actionCollection(), "empty" ); mRemoveFolderAction = new KAction( "foo" /*set in updateFolderMenu*/, "editdelete", 0, this, - SLOT(slotRemoveFolder()), actionCollection(), "delete_folder" ); + TQT_SLOT(slotRemoveFolder()), actionCollection(), "delete_folder" ); mPreferHtmlAction = new KToggleAction( i18n("Prefer &HTML to Plain Text"), 0, this, - SLOT(slotOverrideHtml()), actionCollection(), "prefer_html" ); + TQT_SLOT(slotOverrideHtml()), actionCollection(), "prefer_html" ); mPreferHtmlLoadExtAction = new KToggleAction( i18n("Load E&xternal References"), 0, this, - SLOT(slotOverrideHtmlLoadExt()), actionCollection(), "prefer_html_external_refs" ); + TQT_SLOT(slotOverrideHtmlLoadExt()), actionCollection(), "prefer_html_external_refs" ); mThreadMessagesAction = new KToggleAction( i18n("&Thread Messages"), 0, this, - SLOT(slotOverrideThread()), actionCollection(), "thread_messages" ); + TQT_SLOT(slotOverrideThread()), actionCollection(), "thread_messages" ); mThreadBySubjectAction = new KToggleAction( i18n("Thread Messages also by &Subject"), 0, this, - SLOT(slotToggleSubjectThreading()), actionCollection(), "thread_messages_by_subject" ); + TQT_SLOT(slotToggleSubjectThreading()), actionCollection(), "thread_messages_by_subject" ); new KAction( i18n("Copy Folder"), "editcopy", SHIFT+CTRL+Key_C, folderTree(), - SLOT(copyFolder()), actionCollection(), "copy_folder" ); + TQT_SLOT(copyFolder()), actionCollection(), "copy_folder" ); new KAction( i18n("Cut Folder"), "editcut", SHIFT+CTRL+Key_X, folderTree(), - SLOT(cutFolder()), actionCollection(), "cut_folder" ); + TQT_SLOT(cutFolder()), actionCollection(), "cut_folder" ); new KAction( i18n("Paste Folder"), "editpaste", SHIFT+CTRL+Key_V, folderTree(), - SLOT(pasteFolder()), actionCollection(), "paste_folder" ); + TQT_SLOT(pasteFolder()), actionCollection(), "paste_folder" ); new KAction( i18n("Copy Messages"), "editcopy", ALT+CTRL+Key_C, headers(), - SLOT(copyMessages()), actionCollection(), "copy_messages" ); + TQT_SLOT(copyMessages()), actionCollection(), "copy_messages" ); new KAction( i18n("Cut Messages"), "editcut", ALT+CTRL+Key_X, headers(), - SLOT(cutMessages()), actionCollection(), "cut_messages" ); + TQT_SLOT(cutMessages()), actionCollection(), "cut_messages" ); new KAction( i18n("Paste Messages"), "editpaste", ALT+CTRL+Key_V, headers(), - SLOT(pasteMessages()), actionCollection(), "paste_messages" ); + TQT_SLOT(pasteMessages()), actionCollection(), "paste_messages" ); //----- Message Menu (void) new KAction( i18n("&New Message..."), "mail_new", KStdAccel::shortcut(KStdAccel::New), this, - SLOT(slotCompose()), actionCollection(), "new_message" ); + TQT_SLOT(slotCompose()), actionCollection(), "new_message" ); mTemplateMenu = new KActionMenu( i18n("New Message From &Template"), "filenew", actionCollection(), "new_from_template" ); mTemplateMenu->setDelayed( true ); - connect( mTemplateMenu->popupMenu(), SIGNAL( aboutToShow() ), this, - SLOT( slotShowNewFromTemplate() ) ); - connect( mTemplateMenu->popupMenu(), SIGNAL( activated(int) ), this, - SLOT( slotNewFromTemplate(int) ) ); + connect( mTemplateMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, + TQT_SLOT( slotShowNewFromTemplate() ) ); + connect( mTemplateMenu->popupMenu(), TQT_SIGNAL( activated(int) ), this, + TQT_SLOT( slotNewFromTemplate(int) ) ); KAction* newToML = new KAction( i18n("New Message t&o Mailing-List..."), "mail_post_to", CTRL+SHIFT+Key_N, this, - SLOT(slotPostToML()), actionCollection(), "post_message" ); + TQT_SLOT(slotPostToML()), actionCollection(), "post_message" ); newToML->plugAccel( actionCollection()->kaccel() ); mForwardActionMenu = new KActionMenu( i18n("Message->","&Forward"), @@ -2839,25 +2839,25 @@ void KMMainWidget::setupActions() mForwardInlineAction = new KAction( i18n("&Inline..."), "mail_forward", 0, this, - SLOT(slotForwardInlineMsg()), + TQT_SLOT(slotForwardInlineMsg()), actionCollection(), "message_forward_inline" ); mForwardAttachedAction = new KAction( i18n("Message->Forward->","As &Attachment..."), "mail_forward", 0, this, - SLOT(slotForwardAttachedMsg()), + TQT_SLOT(slotForwardAttachedMsg()), actionCollection(), "message_forward_as_attachment" ); mForwardDigestAction = new KAction( i18n("Message->Forward->","As Di&gest..."), "mail_forward", 0, this, - SLOT(slotForwardDigestMsg()), + TQT_SLOT(slotForwardDigestMsg()), actionCollection(), "message_forward_as_digest" ); mRedirectAction = new KAction( i18n("Message->Forward->","&Redirect..."), "mail_forward", Key_E, this, - SLOT(slotRedirectMsg()), + TQT_SLOT(slotRedirectMsg()), actionCollection(), "message_forward_redirect" ); @@ -2867,53 +2867,53 @@ void KMMainWidget::setupActions() mForwardActionMenu->insert( mForwardAttachedAction ); mForwardInlineAction->setShortcut( Key_F ); mForwardAttachedAction->setShortcut( SHIFT+Key_F ); - connect( mForwardActionMenu, SIGNAL(activated()), this, - SLOT(slotForwardInlineMsg()) ); + connect( mForwardActionMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotForwardInlineMsg()) ); } else { mForwardActionMenu->insert( mForwardAttachedAction ); mForwardActionMenu->insert( mForwardInlineAction ); mForwardInlineAction->setShortcut( SHIFT+Key_F ); mForwardAttachedAction->setShortcut( Key_F ); - connect( mForwardActionMenu, SIGNAL(activated()), this, - SLOT(slotForwardAttachedMsg()) ); + connect( mForwardActionMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotForwardAttachedMsg()) ); } mForwardActionMenu->insert( mForwardDigestAction ); mForwardActionMenu->insert( mRedirectAction ); mSendAgainAction = new KAction( i18n("Send A&gain..."), 0, this, - SLOT(slotResendMsg()), actionCollection(), "send_again" ); + TQT_SLOT(slotResendMsg()), actionCollection(), "send_again" ); //----- Create filter actions mFilterMenu = new KActionMenu( i18n("&Create Filter"), "filter", actionCollection(), "create_filter" ); - connect( mFilterMenu, SIGNAL(activated()), this, - SLOT(slotFilter()) ); + connect( mFilterMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotFilter()) ); mSubjectFilterAction = new KAction( i18n("Filter on &Subject..."), 0, this, - SLOT(slotSubjectFilter()), + TQT_SLOT(slotSubjectFilter()), actionCollection(), "subject_filter"); mFilterMenu->insert( mSubjectFilterAction ); mFromFilterAction = new KAction( i18n("Filter on &From..."), 0, this, - SLOT(slotFromFilter()), + TQT_SLOT(slotFromFilter()), actionCollection(), "from_filter"); mFilterMenu->insert( mFromFilterAction ); mToFilterAction = new KAction( i18n("Filter on &To..."), 0, this, - SLOT(slotToFilter()), + TQT_SLOT(slotToFilter()), actionCollection(), "to_filter"); mFilterMenu->insert( mToFilterAction ); mListFilterAction = new KAction( i18n("Filter on Mailing-&List..."), 0, this, - SLOT(slotMailingListFilter()), actionCollection(), + TQT_SLOT(slotMailingListFilter()), actionCollection(), "mlist_filter"); mFilterMenu->insert( mListFilterAction ); - mPrintAction = KStdAction::print (this, SLOT(slotPrintMsg()), actionCollection()); + mPrintAction = KStdAction::print (this, TQT_SLOT(slotPrintMsg()), actionCollection()); mUseAction = new KAction( i18n("New Message From &Template"), "filenew", - Key_N, this, SLOT( slotUseTemplate() ), + Key_N, this, TQT_SLOT( slotUseTemplate() ), actionCollection(), "use_template" ); mUseAction->plugAccel( actionCollection()->kaccel() ); @@ -2923,19 +2923,19 @@ void KMMainWidget::setupActions() mMarkThreadAsReadAction = new KAction(KGuiItem(i18n("Mark Thread as &Read"), "kmmsgread", i18n("Mark all messages in the selected thread as read")), - 0, this, SLOT(slotSetThreadStatusRead()), + 0, this, TQT_SLOT(slotSetThreadStatusRead()), actionCollection(), "thread_read"); mThreadStatusMenu->insert( mMarkThreadAsReadAction ); mMarkThreadAsNewAction = new KAction(KGuiItem(i18n("Mark Thread as &New"), "kmmsgnew", i18n("Mark all messages in the selected thread as new")), - 0, this, SLOT(slotSetThreadStatusNew()), + 0, this, TQT_SLOT(slotSetThreadStatusNew()), actionCollection(), "thread_new"); mThreadStatusMenu->insert( mMarkThreadAsNewAction ); mMarkThreadAsUnreadAction = new KAction(KGuiItem(i18n("Mark Thread as &Unread"), "kmmsgunseen", i18n("Mark all messages in the selected thread as unread")), - 0, this, SLOT(slotSetThreadStatusUnread()), + 0, this, TQT_SLOT(slotSetThreadStatusUnread()), actionCollection(), "thread_unread"); mThreadStatusMenu->insert( mMarkThreadAsUnreadAction ); @@ -2943,24 +2943,24 @@ void KMMainWidget::setupActions() //----- "Mark Thread" toggle actions mToggleThreadFlagAction = new KToggleAction(i18n("Mark Thread as &Important"), "mail_flag", - 0, this, SLOT(slotSetThreadStatusFlag()), + 0, this, TQT_SLOT(slotSetThreadStatusFlag()), actionCollection(), "thread_flag"); mToggleThreadFlagAction->setCheckedState( i18n("Remove &Important Thread Mark") ); mThreadStatusMenu->insert( mToggleThreadFlagAction ); mToggleThreadTodoAction = new KToggleAction(i18n("Mark Thread as &Action Item"), "mail_todo", - 0, this, SLOT(slotSetThreadStatusTodo()), + 0, this, TQT_SLOT(slotSetThreadStatusTodo()), actionCollection(), "thread_todo"); mToggleThreadTodoAction->setCheckedState( i18n("Remove &Action Item Thread Mark") ); mThreadStatusMenu->insert( mToggleThreadTodoAction ); //------- "Watch and ignore thread" actions mWatchThreadAction = new KToggleAction(i18n("&Watch Thread"), "kmmsgwatched", - 0, this, SLOT(slotSetThreadStatusWatched()), + 0, this, TQT_SLOT(slotSetThreadStatusWatched()), actionCollection(), "thread_watched"); mIgnoreThreadAction = new KToggleAction(i18n("&Ignore Thread"), "mail_ignore", - 0, this, SLOT(slotSetThreadStatusIgnored()), + 0, this, TQT_SLOT(slotSetThreadStatusIgnored()), actionCollection(), "thread_ignored"); mThreadStatusMenu->insert( new KActionSeparator( this ) ); @@ -2968,7 +2968,7 @@ void KMMainWidget::setupActions() mThreadStatusMenu->insert( mIgnoreThreadAction ); mSaveAttachmentsAction = new KAction( i18n("Save A&ttachments..."), "attach", - 0, this, SLOT(slotSaveAttachments()), + 0, this, TQT_SLOT(slotSaveAttachments()), actionCollection(), "file_save_attachments" ); mMoveActionMenu = new KActionMenu( i18n("&Move To" ), @@ -2979,7 +2979,7 @@ void KMMainWidget::setupActions() mApplyAllFiltersAction = new KAction( i18n("Appl&y All Filters"), "filter", CTRL+Key_J, this, - SLOT(slotApplyFilters()), + TQT_SLOT(slotApplyFilters()), actionCollection(), "apply_filters" ); mApplyFilterActionsMenu = new KActionMenu( i18n("A&pply Filter" ), @@ -2994,158 +2994,158 @@ void KMMainWidget::setupActions() unreadMenu->setToolTip( i18n("Choose how to display the count of unread messages") ); mUnreadColumnToggle = new KRadioAction( i18n("View->Unread Count", "View in &Separate Column"), 0, this, - SLOT(slotToggleUnread()), + TQT_SLOT(slotToggleUnread()), actionCollection(), "view_unread_column" ); mUnreadColumnToggle->setExclusiveGroup( "view_unread_group" ); unreadMenu->insert( mUnreadColumnToggle ); mUnreadTextToggle = new KRadioAction( i18n("View->Unread Count", "View After &Folder Name"), 0, this, - SLOT(slotToggleUnread()), + TQT_SLOT(slotToggleUnread()), actionCollection(), "view_unread_text" ); mUnreadTextToggle->setExclusiveGroup( "view_unread_group" ); unreadMenu->insert( mUnreadTextToggle ); // toggle for total column mTotalColumnToggle = new KToggleAction( i18n("View->", "&Total Column"), 0, this, - SLOT(slotToggleTotalColumn()), + TQT_SLOT(slotToggleTotalColumn()), actionCollection(), "view_columns_total" ); mTotalColumnToggle->setToolTip( i18n("Toggle display of column showing the " "total number of messages in folders.") ); mSizeColumnToggle = new KToggleAction( i18n("View->", "&Size Column"), 0, this, - SLOT(slotToggleSizeColumn()), + TQT_SLOT(slotToggleSizeColumn()), actionCollection(), "view_columns_size" ); mSizeColumnToggle->setToolTip( i18n("Toggle display of column showing the " "total size of messages in folders.") ); - (void)new KAction( KGuiItem( i18n("View->","&Expand Thread"), QString::null, + (void)new KAction( KGuiItem( i18n("View->","&Expand Thread"), TQString::null, i18n("Expand the current thread") ), Key_Period, this, - SLOT(slotExpandThread()), + TQT_SLOT(slotExpandThread()), actionCollection(), "expand_thread" ); - (void)new KAction( KGuiItem( i18n("View->","&Collapse Thread"), QString::null, + (void)new KAction( KGuiItem( i18n("View->","&Collapse Thread"), TQString::null, i18n("Collapse the current thread") ), Key_Comma, this, - SLOT(slotCollapseThread()), + TQT_SLOT(slotCollapseThread()), actionCollection(), "collapse_thread" ); - (void)new KAction( KGuiItem( i18n("View->","Ex&pand All Threads"), QString::null, + (void)new KAction( KGuiItem( i18n("View->","Ex&pand All Threads"), TQString::null, i18n("Expand all threads in the current folder") ), CTRL+Key_Period, this, - SLOT(slotExpandAllThreads()), + TQT_SLOT(slotExpandAllThreads()), actionCollection(), "expand_all_threads" ); - (void)new KAction( KGuiItem( i18n("View->","C&ollapse All Threads"), QString::null, + (void)new KAction( KGuiItem( i18n("View->","C&ollapse All Threads"), TQString::null, i18n("Collapse all threads in the current folder") ), CTRL+Key_Comma, this, - SLOT(slotCollapseAllThreads()), + TQT_SLOT(slotCollapseAllThreads()), actionCollection(), "collapse_all_threads" ); mViewSourceAction = new KAction( i18n("&View Source"), Key_V, this, - SLOT(slotShowMsgSrc()), actionCollection(), + TQT_SLOT(slotShowMsgSrc()), actionCollection(), "view_source" ); KAction* dukeOfMonmoth = new KAction( i18n("&Display Message"), Key_Return, this, - SLOT( slotDisplayCurrentMessage() ), actionCollection(), + TQT_SLOT( slotDisplayCurrentMessage() ), actionCollection(), "display_message" ); dukeOfMonmoth->plugAccel( actionCollection()->kaccel() ); //----- Go Menu - new KAction( KGuiItem( i18n("&Next Message"), QString::null, + new KAction( KGuiItem( i18n("&Next Message"), TQString::null, i18n("Go to the next message") ), - "N;Right", this, SLOT(slotNextMessage()), + "N;Right", this, TQT_SLOT(slotNextMessage()), actionCollection(), "go_next_message" ); new KAction( KGuiItem( i18n("Next &Unread Message"), - QApplication::reverseLayout() ? "previous" : "next", + TQApplication::reverseLayout() ? "previous" : "next", i18n("Go to the next unread message") ), - Key_Plus, this, SLOT(slotNextUnreadMessage()), + Key_Plus, this, TQT_SLOT(slotNextUnreadMessage()), actionCollection(), "go_next_unread_message" ); /* ### needs better support from folders: - new KAction( KGuiItem( i18n("Next &Important Message"), QString::null, + new KAction( KGuiItem( i18n("Next &Important Message"), TQString::null, i18n("Go to the next important message") ), - 0, this, SLOT(slotNextImportantMessage()), + 0, this, TQT_SLOT(slotNextImportantMessage()), actionCollection(), "go_next_important_message" ); */ - new KAction( KGuiItem( i18n("&Previous Message"), QString::null, + new KAction( KGuiItem( i18n("&Previous Message"), TQString::null, i18n("Go to the previous message") ), - "P;Left", this, SLOT(slotPrevMessage()), + "P;Left", this, TQT_SLOT(slotPrevMessage()), actionCollection(), "go_prev_message" ); new KAction( KGuiItem( i18n("Previous Unread &Message"), - QApplication::reverseLayout() ? "next" : "previous", + TQApplication::reverseLayout() ? "next" : "previous", i18n("Go to the previous unread message") ), - Key_Minus, this, SLOT(slotPrevUnreadMessage()), + Key_Minus, this, TQT_SLOT(slotPrevUnreadMessage()), actionCollection(), "go_prev_unread_message" ); /* needs better support from folders: - new KAction( KGuiItem( i18n("Previous I&mportant Message"), QString::null, + new KAction( KGuiItem( i18n("Previous I&mportant Message"), TQString::null, i18n("Go to the previous important message") ), - 0, this, SLOT(slotPrevImportantMessage()), + 0, this, TQT_SLOT(slotPrevImportantMessage()), actionCollection(), "go_prev_important_message" ); */ KAction *action = - new KAction( KGuiItem( i18n("Next Unread &Folder"), QString::null, + new KAction( KGuiItem( i18n("Next Unread &Folder"), TQString::null, i18n("Go to the next folder with unread messages") ), - ALT+Key_Plus, this, SLOT(slotNextUnreadFolder()), + ALT+Key_Plus, this, TQT_SLOT(slotNextUnreadFolder()), actionCollection(), "go_next_unread_folder" ); KShortcut shortcut = action->shortcut(); shortcut.append( KKey( CTRL+Key_Plus ) ); action->setShortcut( shortcut ); action = - new KAction( KGuiItem( i18n("Previous Unread F&older"), QString::null, + new KAction( KGuiItem( i18n("Previous Unread F&older"), TQString::null, i18n("Go to the previous folder with unread messages") ), - ALT+Key_Minus, this, SLOT(slotPrevUnreadFolder()), + ALT+Key_Minus, this, TQT_SLOT(slotPrevUnreadFolder()), actionCollection(), "go_prev_unread_folder" ); shortcut = action->shortcut(); shortcut.append( KKey( CTRL+Key_Minus ) ); action->setShortcut( shortcut ); - new KAction( KGuiItem( i18n("Go->","Next Unread &Text"), QString::null, + new KAction( KGuiItem( i18n("Go->","Next Unread &Text"), TQString::null, i18n("Go to the next unread text"), i18n("Scroll down current message. " "If at end of current message, " "go to next unread message.") ), - Key_Space, this, SLOT(slotReadOn()), + Key_Space, this, TQT_SLOT(slotReadOn()), actionCollection(), "go_next_unread_text" ); //----- Settings Menu (void) new KAction( i18n("Configure &Filters..."), 0, this, - SLOT(slotFilter()), actionCollection(), "filter" ); + TQT_SLOT(slotFilter()), actionCollection(), "filter" ); (void) new KAction( i18n("Configure &POP Filters..."), 0, this, - SLOT(slotPopFilter()), actionCollection(), "popFilter" ); + TQT_SLOT(slotPopFilter()), actionCollection(), "popFilter" ); (void) new KAction( i18n("Manage &Sieve Scripts..."), 0, this, - SLOT(slotManageSieveScripts()), actionCollection(), "sieveFilters" ); + TQT_SLOT(slotManageSieveScripts()), actionCollection(), "sieveFilters" ); (void) new KAction( KGuiItem( i18n("KMail &Introduction"), 0, i18n("Display KMail's Welcome Page") ), - 0, this, SLOT(slotIntro()), + 0, this, TQT_SLOT(slotIntro()), actionCollection(), "help_kmail_welcomepage" ); // ----- Standard Actions -// KStdAction::configureNotifications(this, SLOT(slotEditNotifications()), actionCollection()); +// KStdAction::configureNotifications(this, TQT_SLOT(slotEditNotifications()), actionCollection()); (void) new KAction( i18n("Configure &Notifications..."), "knotify", 0, this, - SLOT(slotEditNotifications()), actionCollection(), + TQT_SLOT(slotEditNotifications()), actionCollection(), "kmail_configure_notifications" ); -// KStdAction::preferences(this, SLOT(slotSettings()), actionCollection()); +// KStdAction::preferences(this, TQT_SLOT(slotSettings()), actionCollection()); (void) new KAction( i18n("&Configure KMail..."), "configure", 0, kmkernel, - SLOT(slotShowConfigurationDialog()), actionCollection(), + TQT_SLOT(slotShowConfigurationDialog()), actionCollection(), "kmail_configure_kmail" ); - KStdAction::undo(this, SLOT(slotUndo()), actionCollection(), "kmail_undo"); + KStdAction::undo(this, TQT_SLOT(slotUndo()), actionCollection(), "kmail_undo"); - KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() ); + KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() ); - menutimer = new QTimer( this, "menutimer" ); - connect( menutimer, SIGNAL( timeout() ), SLOT( updateMessageActions() ) ); + menutimer = new TQTimer( this, "menutimer" ); + connect( menutimer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateMessageActions() ) ); connect( kmkernel->undoStack(), - SIGNAL( undoStackChanged() ), this, SLOT( slotUpdateUndo() )); + TQT_SIGNAL( undoStackChanged() ), this, TQT_SLOT( slotUpdateUndo() )); initializeIMAPActions( false ); // don't set state, config not read yet updateMessageActions(); @@ -3155,7 +3155,7 @@ void KMMainWidget::setupActions() void KMMainWidget::setupForwardingActionsList() { - QPtrList<KAction> mForwardActionList; + TQPtrList<KAction> mForwardActionList; if ( GlobalSettings::self()->forwardingInlineByDefault() ) { mGUIClient->unplugActionList( "forward_action_list" ); mForwardActionList.append( mForwardInlineAction ); @@ -3284,10 +3284,10 @@ void KMMainWidget::startUpdateMessageActionsTimer() void KMMainWidget::updateMessageActions() { int count = 0; - QPtrList<QListViewItem> selectedItems; + TQPtrList<TQListViewItem> selectedItems; if ( mFolder ) { - for (QListViewItem *item = mHeaders->firstChild(); item; item = item->itemBelow()) + for (TQListViewItem *item = mHeaders->firstChild(); item; item = item->itemBelow()) if (item->isSelected() ) selectedItems.append(item); if ( selectedItems.isEmpty() && mFolder->count() ) // there will always be one in mMsgView @@ -3306,9 +3306,9 @@ void KMMainWidget::updateMessageActions() bool allSelectedInCommonThread = false; if ( mHeaders->isThreaded() && count > 1 ) { allSelectedInCommonThread = true; - for ( QPtrListIterator<QListViewItem> it( selectedItems ) ; + for ( TQPtrListIterator<TQListViewItem> it( selectedItems ) ; it.current() ; ++ it ) { - QListViewItem * item = *it; + TQListViewItem * item = *it; if ( item->parent()==0 && item->childCount()==0 ) { allSelectedInCommonThread = false; break; @@ -3319,7 +3319,7 @@ void KMMainWidget::updateMessageActions() allSelectedInCommonThread = true; } - QListViewItem *curItemParent = mHeaders->currentItem(); + TQListViewItem *curItemParent = mHeaders->currentItem(); bool parent_thread = 0; if ( curItemParent && curItemParent->firstChild() != 0 ) parent_thread = 1; @@ -3454,7 +3454,7 @@ void KMMainWidget::updateFolderMenu() #ifdef MALLOC_DEBUG -static QString fmt(long n) { +static TQString fmt(long n) { char buf[32]; if(n > 1024*1024*1024) @@ -3465,7 +3465,7 @@ static QString fmt(long n) { sprintf(buf, "%0.2f KB", ((double)n)/1024.0); else sprintf(buf, "%ld Byte", n); - return QString(buf); + return TQString(buf); } #endif @@ -3474,7 +3474,7 @@ void KMMainWidget::slotMemInfo() { struct mallinfo mi; mi = mallinfo(); - QString s = QString("\nMALLOC - Info\n\n" + TQString s = TQString("\nMALLOC - Info\n\n" "Number of mmapped regions : %1\n" "Memory allocated in use : %2\n" "Memory allocated, not used: %3\n" @@ -3512,8 +3512,8 @@ void KMMainWidget::slotShowStartupFolder() mFolderTree->cleanupConfigFile(); } - connect( kmkernel->filterMgr(), SIGNAL( filterListUpdated() ), - this, SLOT( initializeFilterActions() )); + connect( kmkernel->filterMgr(), TQT_SIGNAL( filterListUpdated() ), + this, TQT_SLOT( initializeFilterActions() )); // plug shortcut filter actions now initializeFilterActions(); @@ -3521,7 +3521,7 @@ void KMMainWidget::slotShowStartupFolder() // plug folder shortcut actions initializeFolderShortcutActions(); - QString newFeaturesMD5 = KMReaderWin::newFeaturesMD5(); + TQString newFeaturesMD5 = KMReaderWin::newFeaturesMD5(); if ( kmkernel->firstStart() || GlobalSettings::self()->previousNewFeaturesMD5() != newFeaturesMD5 ) { GlobalSettings::self()->setPreviousNewFeaturesMD5( newFeaturesMD5 ); @@ -3544,16 +3544,16 @@ void KMMainWidget::slotShowStartupFolder() void KMMainWidget::slotShowTip() { - KTipDialog::showTip( this, QString::null, true ); + KTipDialog::showTip( this, TQString::null, true ); } //----------------------------------------------------------------------------- -void KMMainWidget::slotChangeCaption(QListViewItem * i) +void KMMainWidget::slotChangeCaption(TQListViewItem * i) { if ( !i ) return; // set the caption to the current full path - QStringList names; - for ( QListViewItem * item = i ; item ; item = item->parent() ) + TQStringList names; + for ( TQListViewItem * item = i ; item ; item = item->parent() ) names.prepend( item->text(0) ); emit captionChangeRequest( names.join( "/" ) ); } @@ -3565,29 +3565,29 @@ void KMMainWidget::removeDuplicates() return; KMFolder *oFolder = mFolder; mHeaders->setFolder(0); - QMap< QString, QValueList<int> > idMD5s; - QValueList<int> redundantIds; - QValueList<int>::Iterator kt; + TQMap< TQString, TQValueList<int> > idMD5s; + TQValueList<int> redundantIds; + TQValueList<int>::Iterator kt; mFolder->open("removedups"); for (int i = mFolder->count() - 1; i >= 0; --i) { - QString id = (*mFolder)[i]->msgIdMD5(); + TQString id = (*mFolder)[i]->msgIdMD5(); if ( !id.isEmpty() ) { - QString subjMD5 = (*mFolder)[i]->strippedSubjectMD5(); + TQString subjMD5 = (*mFolder)[i]->strippedSubjectMD5(); int other = -1; if ( idMD5s.contains(id) ) other = idMD5s[id].first(); else idMD5s[id].append( i ); if ( other != -1 ) { - QString otherSubjMD5 = (*mFolder)[other]->strippedSubjectMD5(); + TQString otherSubjMD5 = (*mFolder)[other]->strippedSubjectMD5(); if (otherSubjMD5 == subjMD5) idMD5s[id].append( i ); } } } - QMap< QString, QValueList<int> >::Iterator it; + TQMap< TQString, TQValueList<int> >::Iterator it; for ( it = idMD5s.begin(); it != idMD5s.end() ; ++it ) { - QValueList<int>::Iterator jt; + TQValueList<int>::Iterator jt; bool finished = false; for ( jt = (*it).begin(); jt != (*it).end() && !finished; ++jt ) if (!((*mFolder)[*jt]->isUnread())) { @@ -3609,7 +3609,7 @@ void KMMainWidget::removeDuplicates() mFolder->close("removedups"); mHeaders->setFolder(oFolder); - QString msg; + TQString msg; if ( numDuplicates ) msg = i18n("Removed %n duplicate message.", "Removed %n duplicate messages.", numDuplicates ); @@ -3654,8 +3654,8 @@ void KMMainWidget::initializeFolderShortcutActions() bool old = actionCollection()->isAutoConnectShortcuts(); actionCollection()->setAutoConnectShortcuts( true ); - QValueList< QGuardedPtr< KMFolder > > folders = kmkernel->allFolders(); - QValueList< QGuardedPtr< KMFolder > >::Iterator it = folders.begin(); + TQValueList< TQGuardedPtr< KMFolder > > folders = kmkernel->allFolders(); + TQValueList< TQGuardedPtr< KMFolder > >::Iterator it = folders.begin(); while ( it != folders.end() ) { KMFolder *folder = (*it); ++it; @@ -3668,28 +3668,28 @@ void KMMainWidget::initializeFolderShortcutActions() //----------------------------------------------------------------------------- void KMMainWidget::initializeFilterActions() { - QString filterName, normalizedName; + TQString filterName, normalizedName; KMMetaFilterActionCommand *filterCommand; KAction *filterAction = 0; clearFilterActions(); mApplyAllFiltersAction->plug(mApplyFilterActionsMenu->popupMenu()); bool addedSeparator = false; - QValueListConstIterator<KMFilter*> it = kmkernel->filterMgr()->filters().constBegin(); + TQValueListConstIterator<KMFilter*> it = kmkernel->filterMgr()->filters().constBegin(); for ( ;it != kmkernel->filterMgr()->filters().constEnd(); ++it ) { if (!(*it)->isEmpty() && (*it)->configureShortcut()) { - filterName = QString("Filter %1").arg((*it)->name()); + filterName = TQString("Filter %1").arg((*it)->name()); normalizedName = filterName.replace(" ", "_"); if (action(normalizedName.utf8())) continue; filterCommand = new KMMetaFilterActionCommand(*it, mHeaders, this); mFilterCommands.append(filterCommand); - QString as = i18n("Filter %1").arg((*it)->name()); - QString icon = (*it)->icon(); + TQString as = i18n("Filter %1").arg((*it)->name()); + TQString icon = (*it)->icon(); if ( icon.isEmpty() ) icon = "gear"; filterAction = new KAction(as, icon, (*it)->shortcut(), filterCommand, - SLOT(start()), actionCollection(), + TQT_SLOT(start()), actionCollection(), normalizedName.local8Bit()); if(!addedSeparator) { mApplyFilterActionsMenu->popupMenu()->insertSeparator(); @@ -3735,7 +3735,7 @@ void KMMainWidget::initializeIMAPActions( bool setState /* false the first time, if ( !mTroubleshootFolderAction ) { mTroubleshootFolderAction = new KAction( i18n("&Troubleshoot IMAP Cache..."), "wizard", 0, - this, SLOT(slotTroubleshootFolder()), actionCollection(), "troubleshoot_folder" ); + this, TQT_SLOT(slotTroubleshootFolder()), actionCollection(), "troubleshoot_folder" ); if ( setState ) updateFolderMenu(); // set initial state of the action } else { @@ -3767,20 +3767,20 @@ void KMMainWidget::slotShortcutChanged( KMFolder *folder ) FolderShortcutCommand *c = new FolderShortcutCommand( this, folder ); mFolderShortcutCommands.insert( folder->idString(), c ); - QString actionlabel = QString( "FolderShortcut %1").arg( folder->prettyURL() ); - QString actionname = QString( "FolderShortcut %1").arg( folder->idString() ); - QString normalizedName = actionname.replace(" ", "_"); + TQString actionlabel = TQString( "FolderShortcut %1").arg( folder->prettyURL() ); + TQString actionname = TQString( "FolderShortcut %1").arg( folder->idString() ); + TQString normalizedName = actionname.replace(" ", "_"); KAction* action = - new KAction(actionlabel, folder->shortcut(), c, SLOT(start()), + new KAction(actionlabel, folder->shortcut(), c, TQT_SLOT(start()), actionCollection(), normalizedName.local8Bit()); action->setIcon( folder->unreadIconPath() ); c->setAction( action ); // will be deleted along with the command } //----------------------------------------------------------------------------- -QString KMMainWidget::findCurrentImapPath() +TQString KMMainWidget::findCurrentImapPath() { - QString startPath; + TQString startPath; if (!mFolder) return startPath; if (mFolder->folderType() == KMFolderTypeImap) { @@ -3814,7 +3814,7 @@ void KMMainWidget::slotSubscriptionDialog() return; ImapAccountBase* account = findCurrentImapAccountBase(); if ( !account ) return; - const QString startPath = findCurrentImapPath(); + const TQString startPath = findCurrentImapPath(); // KSubscription sets "DestruciveClose" SubscriptionDialog * dialog = @@ -3832,7 +3832,7 @@ void KMMainWidget::slotLocalSubscriptionDialog() ImapAccountBase* account = findCurrentImapAccountBase(); if ( !account ) return; - const QString startPath = findCurrentImapPath(); + const TQString startPath = findCurrentImapPath(); // KSubscription sets "DestruciveClose" LocalSubscriptionDialog *dialog = new LocalSubscriptionDialog(this, i18n("Local Subscription"), account, startPath); @@ -3892,7 +3892,7 @@ void KMMainWidget::slotFilterLogViewer() //----------------------------------------------------------------------------- void KMMainWidget::updateFileMenu() { - QStringList actList = kmkernel->acctMgr()->getAccounts(); + TQStringList actList = kmkernel->acctMgr()->getAccounts(); actionCollection()->action("check_mail")->setEnabled( actList.size() > 0 ); actionCollection()->action("check_mail_in")->setEnabled( actList.size() > 0 ); @@ -3913,7 +3913,7 @@ KMSystemTray *KMMainWidget::systray() const } //----------------------------------------------------------------------------- -QString KMMainWidget::overrideEncoding() const +TQString KMMainWidget::overrideEncoding() const { if ( mMsgView ) return mMsgView->overrideEncoding(); @@ -3934,7 +3934,7 @@ void KMMainWidget::setupFolderView() { if ( GlobalSettings::self()->enableFavoriteFolderView() ) { mFolderView = mFolderViewSplitter; - mSearchAndTree->reparent( mFolderViewSplitter, 0, QPoint( 0, 0 ) ); + mSearchAndTree->reparent( mFolderViewSplitter, 0, TQPoint( 0, 0 ) ); mFolderViewSplitter->show(); mFavoriteFolderView->show(); } else { @@ -3942,7 +3942,7 @@ void KMMainWidget::setupFolderView() mFolderViewSplitter->hide(); mFavoriteFolderView->hide(); } - mFolderView->reparent( mFolderViewParent, 0, QPoint( 0, 0 ) ); + mFolderView->reparent( mFolderViewParent, 0, TQPoint( 0, 0 ) ); mFolderViewParent->moveToFirst( mFolderView ); mSearchAndTree->show(); } @@ -3970,7 +3970,7 @@ void KMMainWidget::updateVactionScriptStatus(bool active) if ( active ) { mVacationScriptIndicator->setText( i18n("Out of office reply active") ); mVacationScriptIndicator->setPaletteBackgroundColor( Qt::yellow ); - mVacationScriptIndicator->setCursor( QCursor( Qt::PointingHandCursor ) ); + mVacationScriptIndicator->setCursor( TQCursor( Qt::PointingHandCursor ) ); mVacationScriptIndicator->show(); } else { mVacationScriptIndicator->hide(); diff --git a/kmail/kmmainwidget.h b/kmail/kmmainwidget.h index c56cf813d..dd32fd7e3 100644 --- a/kmail/kmmainwidget.h +++ b/kmail/kmmainwidget.h @@ -23,10 +23,10 @@ #include <kurl.h> #include <kxmlguiclient.h> -#include <qguardedptr.h> -#include <qlistview.h> -#include <qvbox.h> -#include <qvaluevector.h> +#include <tqguardedptr.h> +#include <tqlistview.h> +#include <tqvbox.h> +#include <tqvaluevector.h> #include "kmreaderwin.h" //for inline actions #include "kmkernel.h" // for access to config @@ -76,7 +76,7 @@ namespace KMail { class FavoriteFolderView; } -typedef QMap<int,KMFolder*> KMMenuToFolder; +typedef TQMap<int,KMFolder*> KMMenuToFolder; class KDE_EXPORT KMMainWidget : public QWidget @@ -84,7 +84,7 @@ class KDE_EXPORT KMMainWidget : public QWidget Q_OBJECT public: - KMMainWidget(QWidget *parent, const char *name, + KMMainWidget(TQWidget *parent, const char *name, KXMLGUIClient *aGUIClient, KActionCollection *actionCollection, KConfig*config = KMKernel::config() ); @@ -155,7 +155,7 @@ public: /** Returns a list of all KMMainWidgets. Warning, the list itself can be 0. * @return the list of all main widgets, or 0 if it is not yet initialized */ - static const QValueList<KMMainWidget*>* mainWidgetList() { return s_mainWidgetList; } + static const TQValueList<KMMainWidget*>* mainWidgetList() { return s_mainWidgetList; } KMSystemTray *systray() const; @@ -244,7 +244,7 @@ public slots: signals: void messagesTransfered( bool ); - void captionChangeRequest( const QString & caption ); + void captionChangeRequest( const TQString & caption ); protected: void setupActions(); @@ -264,7 +264,7 @@ protected: protected slots: void slotCheckOneAccount(int); void slotMailChecked( bool newMail, bool sendOnCheck, - const QMap<QString, int> & newInFolder ); + const TQMap<TQString, int> & newInFolder ); void getAccountMenu(); void getTransportMenu(); void slotHelp(); @@ -334,7 +334,7 @@ protected slots: void slotSendQueuedVia( int item ); void slotOnlineStatus(); void slotUpdateOnlineStatus( GlobalSettings::EnumNetworkState::type ); - void slotMsgPopup(KMMessage &msg, const KURL &aUrl, const QPoint&); + void slotMsgPopup(KMMessage &msg, const KURL &aUrl, const TQPoint&); void slotMarkAll(); void slotMemInfo(); void slotSearch(); @@ -383,7 +383,7 @@ protected slots: void slotEditKeys(); /** changes the caption and displays the foldername */ - void slotChangeCaption(QListViewItem*); + void slotChangeCaption(TQListViewItem*); void removeDuplicates(); void slotCustomReplyToMsg( int tid ); @@ -413,7 +413,7 @@ protected slots: private: /** Get override character encoding. */ - QString overrideEncoding() const; + TQString overrideEncoding() const; void initializeIMAPActions( bool setState ); @@ -425,7 +425,7 @@ private: /** Helper which finds the associated IMAP path if there is a current * folder and it is an imap or disconnected imap one. */ - QString findCurrentImapPath(); + TQString findCurrentImapPath(); void setupFolderView(); @@ -456,7 +456,7 @@ private: *mCustomReplyAllActionMenu, *mCustomForwardActionMenu; // Signal mappers for custom template actions - QSignalMapper *mCustomReplyMapper, + TQSignalMapper *mCustomReplyMapper, *mCustomReplyAllMapper, *mCustomForwardMapper; @@ -476,32 +476,32 @@ private: KToggleAction* mTotalColumnToggle; KToggleAction* mSizeColumnToggle; - QVBox *mSearchAndTree; - QHBox *mFolderQuickSearch; + TQVBox *mSearchAndTree; + TQHBox *mFolderQuickSearch; KMFolderTree *mFolderTree; KMail::FavoriteFolderView *mFavoriteFolderView; - QWidget *mFolderView; - QSplitter *mFolderViewParent; + TQWidget *mFolderView; + TQSplitter *mFolderViewParent; KMReaderWin *mMsgView; - QSplitter *mPanner1, *mPanner2; - QSplitter *mFolderViewSplitter; + TQSplitter *mPanner1, *mPanner2; + TQSplitter *mFolderViewSplitter; KMHeaders *mHeaders; - QVBox *mSearchAndHeaders; + TQVBox *mSearchAndHeaders; KToolBar *mSearchToolBar; KMail::HeaderListQuickSearch *mQuickSearchLine; - QGuardedPtr<KMFolder> mFolder; + TQGuardedPtr<KMFolder> mFolder; KMFolder *mTemplateFolder; - QPopupMenu *mViewMenu, *mBodyPartsMenu; + TQPopupMenu *mViewMenu, *mBodyPartsMenu; KAction *mlistFilterAction; bool mIntegrated; bool mBeepOnNew; bool mConfirmEmpty; - QString mStartupFolder; + TQString mStartupFolder; int mMessageStatusId; - QValueList<int> mPanner1Sep, mPanner2Sep; + TQValueList<int> mPanner1Sep, mPanner2Sep; KURL mUrlCurrent; QPopupMenu *mActMenu; - QPopupMenu *mSendMenu; + TQPopupMenu *mSendMenu; QPopupMenu *mFileMenu; bool mLongFolderList; @@ -516,7 +516,7 @@ private: bool mEnableFolderQuickSearch; bool mEnableQuickSearch; -// QPopupMenu *mMessageMenu; +// TQPopupMenu *mMessageMenu; KMail::SearchWindow *mSearchWin; KAction *mNewFolderAction, *mModifyFolderAction, *mRemoveFolderAction, *mExpireFolderAction, @@ -528,25 +528,25 @@ private: KToggleAction *mThreadBySubjectAction; KToggleAction *mFolderAction, *mHeaderAction, *mMimeAction; - QTimer *menutimer; - QTimer *mShowBusySplashTimer; + TQTimer *menutimer; + TQTimer *mShowBusySplashTimer; - QGuardedPtr<KMail::Vacation> mVacation; + TQGuardedPtr<KMail::Vacation> mVacation; #if !defined(NDEBUG) - QGuardedPtr<KMail::SieveDebugDialog> mSieveDebugDialog; + TQGuardedPtr<KMail::SieveDebugDialog> mSieveDebugDialog; #endif KActionCollection *mActionCollection; KActionSeparator *mToolbarActionSeparator; - QVBoxLayout *mTopLayout; + TQVBoxLayout *mTopLayout; bool mDestructed, mForceJumpToUnread, mShowingOfflineScreen; - QPtrList<KAction> mFilterMenuActions; - QPtrList<KAction> mFilterTBarActions; - QPtrList<KMMetaFilterActionCommand> mFilterCommands; - QDict<FolderShortcutCommand> mFolderShortcutCommands; - QGuardedPtr <KMail::FolderJob> mJob; + TQPtrList<KAction> mFilterMenuActions; + TQPtrList<KAction> mFilterTBarActions; + TQPtrList<KMMetaFilterActionCommand> mFilterCommands; + TQDict<FolderShortcutCommand> mFolderShortcutCommands; + TQGuardedPtr <KMail::FolderJob> mJob; - QValueVector<QString> mCustomTemplates; - QPtrList<KAction> mCustomTemplateActions; + TQValueVector<TQString> mCustomTemplates; + TQPtrList<KAction> mCustomTemplateActions; KMSystemTray *mSystemTray; KConfig *mConfig; @@ -554,7 +554,7 @@ private: KMail::MessageActions *mMsgActions; - static QValueList<KMMainWidget*>* s_mainWidgetList; + static TQValueList<KMMainWidget*>* s_mainWidgetList; KStatusBarLabel *mVacationScriptIndicator; bool mVacationIndicatorActive; diff --git a/kmail/kmmainwin.cpp b/kmail/kmmainwin.cpp index ce0c64607..7d69e2ee2 100644 --- a/kmail/kmmainwin.cpp +++ b/kmail/kmmainwin.cpp @@ -25,7 +25,7 @@ #include "kmmainwin.moc" -KMMainWin::KMMainWin(QWidget *) +KMMainWin::KMMainWin(TQWidget *) : KMainWindow( 0, "kmail-mainwindow#" ), mReallyClose( false ) { @@ -36,7 +36,7 @@ KMMainWin::KMMainWin(QWidget *) kapp->ref(); (void) new KAction( i18n("New &Window"), "window_new", 0, - this, SLOT(slotNewMailReader()), + this, TQT_SLOT(slotNewMailReader()), actionCollection(), "new_mail_client" ); mKMMainWidget = new KMMainWidget( this, "KMMainWidget", this, actionCollection() ); @@ -47,17 +47,17 @@ KMMainWin::KMMainWin(QWidget *) setInstance( kmkernel->xmlGuiInstance() ); if ( kmkernel->firstInstance() ) - QTimer::singleShot( 200, this, SLOT(slotShowTipOnStart()) ); + TQTimer::singleShot( 200, this, TQT_SLOT(slotShowTipOnStart()) ); setStandardToolBarMenuEnabled(true); - KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), + KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()), actionCollection()); - KStdAction::keyBindings(mKMMainWidget, SLOT(slotEditKeys()), + KStdAction::keyBindings(mKMMainWidget, TQT_SLOT(slotEditKeys()), actionCollection()); - KStdAction::quit( this, SLOT(slotQuit()), actionCollection()); + KStdAction::quit( this, TQT_SLOT(slotQuit()), actionCollection()); createGUI( "kmmainwin.rc", false ); // Don't use conserveMemory() because this renders dynamic plugging // of actions unusable! @@ -66,14 +66,14 @@ KMMainWin::KMMainWin(QWidget *) applyMainWindowSettings(KMKernel::config(), "Main Window"); - connect( KPIM::BroadcastStatus::instance(), SIGNAL( statusMsg( const QString& ) ), - this, SLOT( displayStatusMsg(const QString&) ) ); + connect( KPIM::BroadcastStatus::instance(), TQT_SIGNAL( statusMsg( const TQString& ) ), + this, TQT_SLOT( displayStatusMsg(const TQString&) ) ); - connect(kmkernel, SIGNAL(configChanged()), - this, SLOT(slotConfigChanged())); + connect(kmkernel, TQT_SIGNAL(configChanged()), + this, TQT_SLOT(slotConfigChanged())); - connect(mKMMainWidget, SIGNAL(captionChangeRequest(const QString&)), - SLOT(setCaption(const QString&)) ); + connect(mKMMainWidget, TQT_SIGNAL(captionChangeRequest(const TQString&)), + TQT_SLOT(setCaption(const TQString&)) ); // Enable mail checks again (see destructor) kmkernel->enableMailCheck(); @@ -91,7 +91,7 @@ KMMainWin::~KMMainWin() if ( !kmkernel->haveSystemTrayApplet() ) { // Check if this was the last KMMainWin int not_withdrawn = 0; - QPtrListIterator<KMainWindow> it(*KMainWindow::memberList); + TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList); for (it.toFirst(); it.current(); ++it){ if ( !it.current()->isHidden() && it.current()->isTopLevel() && @@ -111,12 +111,12 @@ KMMainWin::~KMMainWin() } } -void KMMainWin::displayStatusMsg(const QString& aText) +void KMMainWin::displayStatusMsg(const TQString& aText) { if ( !statusBar() || !mLittleProgress) return; int statusWidth = statusBar()->width() - mLittleProgress->width() - fontMetrics().maxWidth(); - QString text = KStringHandler::rPixelSqueeze( " " + aText, fontMetrics(), + TQString text = KStringHandler::rPixelSqueeze( " " + aText, fontMetrics(), statusWidth ); // ### FIXME: We should disable richtext/HTML (to avoid possible denial of service attacks), @@ -145,8 +145,8 @@ void KMMainWin::slotEditToolbars() saveMainWindowSettings(KMKernel::config(), "Main Window"); KEditToolbar dlg(actionCollection(), "kmmainwin.rc"); - connect( &dlg, SIGNAL(newToolbarConfig()), - SLOT(slotUpdateToolbars()) ); + connect( &dlg, TQT_SIGNAL(newToolbarConfig()), + TQT_SLOT(slotUpdateToolbars()) ); dlg.exec(); } diff --git a/kmail/kmmainwin.h b/kmail/kmmainwin.h index eb5382670..201c3824b 100644 --- a/kmail/kmmainwin.h +++ b/kmail/kmmainwin.h @@ -22,7 +22,7 @@ #include <kmainwindow.h> #include "kdeversion.h" -#include "qstring.h" +#include "tqstring.h" class KMMainWidget; namespace KPIM { @@ -39,7 +39,7 @@ class KMMainWin : public KMainWindow public: // the main window needs to have a name since else restoring the window // settings by kwin doesn't work - KMMainWin(QWidget *parent = 0); + KMMainWin(TQWidget *parent = 0); virtual ~KMMainWin(); KMMainWidget *mainKMWidget() const { return mKMMainWidget; }; StatusbarProgressWidget* progressWidget() const { return mLittleProgress; } @@ -53,7 +53,7 @@ public: virtual void writeConfig(void); public slots: - void displayStatusMsg(const QString&); + void displayStatusMsg(const TQString&); void slotEditToolbars(); void slotUpdateToolbars(); void setupStatusBar(); diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp index 9c006b685..5a70afdb1 100644 --- a/kmail/kmmessage.cpp +++ b/kmail/kmmessage.cpp @@ -43,9 +43,9 @@ using KMail::HeaderStrategy; #include <kidna.h> #include <kasciistricmp.h> -#include <qcursor.h> -#include <qtextcodec.h> -#include <qmessagebox.h> +#include <tqcursor.h> +#include <tqtextcodec.h> +#include <tqmessagebox.h> #include <kmime_util.h> #include <kmime_charfreq.h> @@ -74,18 +74,18 @@ using namespace KMime; static DwString emptyString(""); // Values that are set from the config file with KMMessage::readConfig() -static QString sReplyLanguage, sReplyStr, sReplyAllStr, sIndentPrefixStr; +static TQString sReplyLanguage, sReplyStr, sReplyAllStr, sIndentPrefixStr; static bool sSmartQuote, sWordWrap; static int sWrapCol; -static QStringList sPrefCharsets; +static TQStringList sPrefCharsets; -QString KMMessage::sForwardStr; +TQString KMMessage::sForwardStr; const HeaderStrategy * KMMessage::sHeaderStrategy = HeaderStrategy::rich(); //helper static void applyHeadersToMessagePart( DwHeaders& headers, KMMessagePart* aPart ); -QValueList<KMMessage*> KMMessage::sPendingDeletes; +TQValueList<KMMessage*> KMMessage::sPendingDeletes; //----------------------------------------------------------------------------- KMMessage::KMMessage(DwMessage* aMsg) @@ -199,7 +199,7 @@ KMMessage::~KMMessage() //----------------------------------------------------------------------------- -void KMMessage::setReferences(const QCString& aStr) +void KMMessage::setReferences(const TQCString& aStr) { if (!aStr) return; mMsg->Headers().References().FromString(aStr); @@ -208,7 +208,7 @@ void KMMessage::setReferences(const QCString& aStr) //----------------------------------------------------------------------------- -QCString KMMessage::id() const +TQCString KMMessage::id() const { DwHeaders& header = mMsg->Headers(); if (header.HasMessageId()) @@ -273,15 +273,15 @@ void KMMessage::setUnencryptedMsg( KMMessage* unencrypted ) //----------------------------------------------------------------------------- //FIXME: move to libemailfunctions -KPIM::EmailParseResult KMMessage::isValidEmailAddressList( const QString& aStr, - QString& brokenAddress ) +KPIM::EmailParseResult KMMessage::isValidEmailAddressList( const TQString& aStr, + TQString& brokenAddress ) { if ( aStr.isEmpty() ) { return KPIM::AddressEmpty; } - QStringList list = KPIM::splitEmailAddrList( aStr ); - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = KPIM::splitEmailAddrList( aStr ); + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { KPIM::EmailParseResult errorCode = KPIM::isValidEmailAddress( *it ); if ( errorCode != KPIM::AddressOk ) { brokenAddress = ( *it ); @@ -314,12 +314,12 @@ const DwMessage* KMMessage::asDwMessage() } //----------------------------------------------------------------------------- -QCString KMMessage::asString() const { +TQCString KMMessage::asString() const { return KMail::Util::CString( asDwString() ); } -QByteArray KMMessage::asSendableString() const +TQByteArray KMMessage::asSendableString() const { KMMessage msg( new DwMessage( *this->mMsg ) ); msg.removePrivateHeaderFields(); @@ -327,7 +327,7 @@ QByteArray KMMessage::asSendableString() const return KMail::Util::ByteArray( msg.asDwString() ); // and another copy again! } -QCString KMMessage::headerAsSendableString() const +TQCString KMMessage::headerAsSendableString() const { KMMessage msg( new DwMessage( *this->mMsg ) ); msg.removePrivateHeaderFields(); @@ -378,13 +378,13 @@ void KMMessage::setStatusFields() //---------------------------------------------------------------------------- -QString KMMessage::headerAsString() const +TQString KMMessage::headerAsString() const { DwHeaders& header = mMsg->Headers(); header.Assemble(); if ( header.AsString().empty() ) - return QString::null; - return QString::fromLatin1( header.AsString().c_str() ); + return TQString::null; + return TQString::fromLatin1( header.AsString().c_str() ); } @@ -394,11 +394,11 @@ DwMediaType& KMMessage::dwContentType() return mMsg->Headers().ContentType(); } -void KMMessage::fromByteArray( const QByteArray & ba, bool setStatus ) { +void KMMessage::fromByteArray( const TQByteArray & ba, bool setStatus ) { return fromDwString( DwString( ba.data(), ba.size() ), setStatus ); } -void KMMessage::fromString( const QCString & str, bool aSetStatus ) { +void KMMessage::fromString( const TQCString & str, bool aSetStatus ) { return fromDwString( KMail::Util::dwString( str ), aSetStatus ); } @@ -424,10 +424,10 @@ void KMMessage::fromDwString(const DwString& str, bool aSetStatus) //----------------------------------------------------------------------------- -QString KMMessage::formatString(const QString& aStr) const +TQString KMMessage::formatString(const TQString& aStr) const { - QString result, str; - QChar ch; + TQString result, str; + TQChar ch; uint j; if (aStr.isEmpty()) @@ -505,7 +505,7 @@ QString KMMessage::formatString(const QString& aStr) const return result; } -static void removeTrailingSpace( QString &line ) +static void removeTrailingSpace( TQString &line ) { int i = line.length()-1; while( (i >= 0) && ((line[i] == ' ') || (line[i] == '\t'))) @@ -513,7 +513,7 @@ static void removeTrailingSpace( QString &line ) line.truncate( i+1); } -static QString splitLine( QString &line) +static TQString splitLine( TQString &line) { removeTrailingSpace( line ); int i = 0; @@ -524,7 +524,7 @@ static QString splitLine( QString &line) while(i < l) { - QChar c = line[i]; + TQChar c = line[i]; if ((c == '>') || (c == ':') || (c == '|')) j = i+1; else if ((c != ' ') && (c != '\t')) @@ -538,24 +538,24 @@ static QString splitLine( QString &line) } if ( i == l ) { - QString result = line.left(j); - line = QString::null; + TQString result = line.left(j); + line = TQString::null; return result; } - QString result = line.left(j); + TQString result = line.left(j); line = line.mid(j); return result; } -static QString flowText(QString &text, const QString& indent, int maxLength) +static TQString flowText(TQString &text, const TQString& indent, int maxLength) { maxLength--; if (text.isEmpty()) { return indent+"<NULL>\n"; } - QString result; + TQString result; while (1) { int i; @@ -577,11 +577,11 @@ static QString flowText(QString &text, const QString& indent, int maxLength) i = text.length(); } - QString line = text.left(i); + TQString line = text.left(i); if (i < (int) text.length()) text = text.mid(i); else - text = QString::null; + text = TQString::null; result += indent + line + '\n'; @@ -590,8 +590,8 @@ static QString flowText(QString &text, const QString& indent, int maxLength) } } -static bool flushPart(QString &msg, QStringList &part, - const QString &indent, int maxLength) +static bool flushPart(TQString &msg, TQStringList &part, + const TQString &indent, int maxLength) { maxLength -= indent.length(); if (maxLength < 20) maxLength = 20; @@ -602,12 +602,12 @@ static bool flushPart(QString &msg, QStringList &part, part.remove(part.fromLast()); } - QString text; - for(QStringList::Iterator it2 = part.begin(); + TQString text; + for(TQStringList::Iterator it2 = part.begin(); it2 != part.end(); it2++) { - QString line = (*it2); + TQString line = (*it2); if (line.isEmpty()) { @@ -637,35 +637,35 @@ static bool flushPart(QString &msg, QStringList &part, return appendEmptyLine; } -static QString stripSignature( const QString & msg, bool clearSigned ) { +static TQString stripSignature( const TQString & msg, bool clearSigned ) { if ( clearSigned ) - return msg.left( msg.findRev( QRegExp( "\n--\\s?\n" ) ) ); + return msg.left( msg.findRev( TQRegExp( "\n--\\s?\n" ) ) ); else return msg.left( msg.findRev( "\n-- \n" ) ); } -QString KMMessage::smartQuote( const QString & msg, int maxLineLength ) +TQString KMMessage::smartQuote( const TQString & msg, int maxLineLength ) { - QStringList part; - QString oldIndent; + TQStringList part; + TQString oldIndent; bool firstPart = true; - const QStringList lines = QStringList::split('\n', msg, true); + const TQStringList lines = TQStringList::split('\n', msg, true); - QString result; - for(QStringList::const_iterator it = lines.begin(); + TQString result; + for(TQStringList::const_iterator it = lines.begin(); it != lines.end(); ++it) { - QString line = *it; + TQString line = *it; - const QString indent = splitLine( line ); + const TQString indent = splitLine( line ); if ( line.isEmpty()) { if (!firstPart) - part.append(QString::null); + part.append(TQString::null); continue; }; @@ -677,11 +677,11 @@ QString KMMessage::smartQuote( const QString & msg, int maxLineLength ) if (oldIndent != indent) { - QString fromLine; + TQString fromLine; // Search if the last non-blank line could be "From" line if (part.count() && (oldIndent.length() < indent.length())) { - QStringList::Iterator it2 = part.fromLast(); + TQStringList::Iterator it2 = part.fromLast(); while( (it2 != part.end()) && (*it2).isEmpty()) --it2; @@ -713,8 +713,8 @@ QString KMMessage::smartQuote( const QString & msg, int maxLineLength ) //----------------------------------------------------------------------------- void KMMessage::parseTextStringFromDwPart( partNode * root, - QCString& parsedString, - const QTextCodec*& codec, + TQCString& parsedString, + const TQTextCodec*& codec, bool& isHTML ) const { if ( !root ) return; @@ -743,13 +743,13 @@ void KMMessage::parseTextStringFromDwPart( partNode * root, //----------------------------------------------------------------------------- -QString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) const { - QCString parsedString; +TQString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) const { + TQCString parsedString; bool isHTML = false; - const QTextCodec * codec = 0; + const TQTextCodec * codec = 0; partNode * root = partNode::fromMessage( this ); - if ( !root ) return QString::null; + if ( !root ) return TQString::null; parseTextStringFromDwPart( root, parsedString, codec, isHTML ); delete root; @@ -757,15 +757,15 @@ QString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) con codec = this->codec(); if ( parsedString.isEmpty() ) - return QString::null; + return TQString::null; bool clearSigned = false; - QString result; + TQString result; // decrypt if ( allowDecryption ) { - QPtrList<Kpgp::Block> pgpBlocks; - QStrList nonPgpBlocks; + TQPtrList<Kpgp::Block> pgpBlocks; + TQStrList nonPgpBlocks; if ( Kpgp::Module::prepareMessageForDecryption( parsedString, pgpBlocks, nonPgpBlocks ) ) { @@ -820,28 +820,28 @@ QString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) con return result; } -QString KMMessage::asQuotedString( const QString& aHeaderStr, - const QString& aIndentStr, - const QString& selection /* = QString::null */, +TQString KMMessage::asQuotedString( const TQString& aHeaderStr, + const TQString& aIndentStr, + const TQString& selection /* = TQString::null */, bool aStripSignature /* = true */, bool allowDecryption /* = true */) const { - QString content = selection.isEmpty() ? + TQString content = selection.isEmpty() ? asPlainText( aStripSignature, allowDecryption ) : selection ; // Remove blank lines at the beginning: - const int firstNonWS = content.find( QRegExp( "\\S" ) ); + const int firstNonWS = content.find( TQRegExp( "\\S" ) ); const int lineStart = content.findRev( '\n', firstNonWS ); if ( lineStart >= 0 ) content.remove( 0, static_cast<unsigned int>( lineStart ) ); - const QString indentStr = formatString( aIndentStr ); + const TQString indentStr = formatString( aIndentStr ); content.replace( '\n', '\n' + indentStr ); content.prepend( indentStr ); content += '\n'; - const QString headerStr = formatString( aHeaderStr ); + const TQString headerStr = formatString( aHeaderStr ); if ( sSmartQuote && sWordWrap ) return headerStr + smartQuote( content, sWrapCol ); return headerStr + content; @@ -849,16 +849,16 @@ QString KMMessage::asQuotedString( const QString& aHeaderStr, //----------------------------------------------------------------------------- KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, - QString selection /* = QString::null */, + TQString selection /* = TQString::null */, bool noQuote /* = false */, bool allowDecryption /* = true */, bool selectionIsBody /* = false */, - const QString &tmpl /* = QString::null */ ) + const TQString &tmpl /* = TQString::null */ ) { KMMessage* msg = new KMMessage; - QString str, replyStr, mailingListStr, replyToStr, toStr; - QStringList mailingListAddresses; - QCString refStr, headerName; + TQString str, replyStr, mailingListStr, replyToStr, toStr; + TQStringList mailingListAddresses; + TQCString refStr, headerName; bool replyAll = true; msg->initFromMessage(this); @@ -874,8 +874,8 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, mailingListAddresses << parent()->mailingListPostAddress(); } if ( headerField("List-Post").find( "mailto:", 0, false ) != -1 ) { - QString listPost = headerField("List-Post"); - QRegExp rx( "<mailto:([^@>]+)@([^>]+)>", false ); + TQString listPost = headerField("List-Post"); + TQRegExp rx( "<mailto:([^@>]+)@([^>]+)>", false ); if ( rx.search( listPost, 0 ) != -1 ) // matched mailingListAddresses << rx.cap(1) + '@' + rx.cap(2); } @@ -902,7 +902,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, replyAll = false; } // strip all my addresses from the list of recipients - QStringList recipients = KPIM::splitEmailAddrList( toStr ); + TQStringList recipients = KPIM::splitEmailAddrList( toStr ); toStr = stripMyAddressesFromAddressList( recipients ).join(", "); // ... unless the list contains only my addresses (reply to self) if ( toStr.isEmpty() && !recipients.isEmpty() ) @@ -922,21 +922,21 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, toStr = replyToStr; } // strip all my addresses from the list of recipients - QStringList recipients = KPIM::splitEmailAddrList( toStr ); + TQStringList recipients = KPIM::splitEmailAddrList( toStr ); toStr = stripMyAddressesFromAddressList( recipients ).join(", "); break; } case KMail::ReplyAll : { - QStringList recipients; - QStringList ccRecipients; + TQStringList recipients; + TQStringList ccRecipients; // add addresses from the Reply-To header to the list of recipients if( !replyToStr.isEmpty() ) { recipients += KPIM::splitEmailAddrList( replyToStr ); // strip all possible mailing list addresses from the list of Reply-To // addresses - for ( QStringList::const_iterator it = mailingListAddresses.begin(); + for ( TQStringList::const_iterator it = mailingListAddresses.begin(); it != mailingListAddresses.end(); ++it ) { recipients = stripAddressFromAddressList( *it, recipients ); @@ -971,12 +971,12 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, // merge To header and CC header into a list of CC recipients if( !cc().isEmpty() || !to().isEmpty() ) { - QStringList list; + TQStringList list; if (!to().isEmpty()) list += KPIM::splitEmailAddrList(to()); if (!cc().isEmpty()) list += KPIM::splitEmailAddrList(cc()); - for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if( !addressIsInAddressList( *it, recipients ) && !addressIsInAddressList( *it, ccRecipients ) ) { ccRecipients += *it; @@ -1008,10 +1008,10 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, } case KMail::ReplyAuthor : { if ( !replyToStr.isEmpty() ) { - QStringList recipients = KPIM::splitEmailAddrList( replyToStr ); + TQStringList recipients = KPIM::splitEmailAddrList( replyToStr ); // strip the mailing list post address from the list of Reply-To // addresses since we want to reply in private - for ( QStringList::const_iterator it = mailingListAddresses.begin(); + for ( TQStringList::const_iterator it = mailingListAddresses.begin(); it != mailingListAddresses.end(); ++it ) { recipients = stripAddressFromAddressList( *it, recipients ); @@ -1047,7 +1047,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, // if (!noQuote) { // if( selectionIsBody ){ -// QCString cStr = selection.latin1(); +// TQCString cStr = selection.latin1(); // msg->setBody( cStr ); // }else{ // msg->setBody(asQuotedString(replyStr + "\n", sIndentPrefixStr, selection, @@ -1082,9 +1082,9 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, //----------------------------------------------------------------------------- -QCString KMMessage::getRefStr() const +TQCString KMMessage::getRefStr() const { - QCString firstRef, lastRef, refStr, retRefStr; + TQCString firstRef, lastRef, refStr, retRefStr; int i, j; refStr = headerField("References").stripWhiteSpace().latin1(); @@ -1110,34 +1110,34 @@ QCString KMMessage::getRefStr() const } -KMMessage* KMMessage::createRedirect( const QString &toStr ) +KMMessage* KMMessage::createRedirect( const TQString &toStr ) { // copy the message 1:1 KMMessage* msg = new KMMessage( new DwMessage( *this->mMsg ) ); KMMessagePart msgPart; uint id = 0; - QString strId = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace(); + TQString strId = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace(); if ( !strId.isEmpty()) id = strId.toUInt(); const KPIM::Identity & ident = kmkernel->identityManager()->identityForUoidOrDefault( id ); // X-KMail-Redirect-From: content - QString strByWayOf = QString("%1 (by way of %2 <%3>)") + TQString strByWayOf = TQString("%1 (by way of %2 <%3>)") .arg( from() ) .arg( ident.fullName() ) .arg( ident.emailAddr() ); // Resent-From: content - QString strFrom = QString("%1 <%2>") + TQString strFrom = TQString("%1 <%2>") .arg( ident.fullName() ) .arg( ident.emailAddr() ); // format the current date to be used in Resent-Date: - QString origDate = msg->headerField( "Date" ); + TQString origDate = msg->headerField( "Date" ); msg->setDateToday(); - QString newDate = msg->headerField( "Date" ); + TQString newDate = msg->headerField( "Date" ); // make sure the Date: header is valid if ( origDate.isEmpty() ) msg->removeHeaderField( "Date" ); @@ -1161,15 +1161,15 @@ KMMessage* KMMessage::createRedirect( const QString &toStr ) //----------------------------------------------------------------------------- -QCString KMMessage::createForwardBody() +TQCString KMMessage::createForwardBody() { - QString s; - QCString str; + TQString s; + TQCString str; if (sHeaderStrategy == HeaderStrategy::all()) { s = "\n\n---------- " + sForwardStr + " ----------\n\n"; s += headerAsString(); - str = asQuotedString(s, "", QString::null, false, false).utf8(); + str = asQuotedString(s, "", TQString::null, false, false).utf8(); str += "\n-------------------------------------------------------\n"; } else { s = "\n\n---------- " + sForwardStr + " ----------\n\n"; @@ -1182,14 +1182,14 @@ QCString KMMessage::createForwardBody() s += "To: " + to() + "\n"; if (!cc().isEmpty()) s += "Cc: " + cc() + "\n"; s += "\n"; - str = asQuotedString(s, "", QString::null, false, false).utf8(); + str = asQuotedString(s, "", TQString::null, false, false).utf8(); str += "\n-------------------------------------------------------\n"; } return str; } -void KMMessage::sanitizeHeaders( const QStringList& whiteList ) +void KMMessage::sanitizeHeaders( const TQStringList& whiteList ) { // Strip out all headers apart from the content description and other // whitelisted ones, because we don't want to inherit them. @@ -1200,7 +1200,7 @@ void KMMessage::sanitizeHeaders( const QStringList& whiteList ) { nextField = field->Next(); if ( field->FieldNameStr().find( "ontent" ) == DwString::npos - && !whiteList.contains( QString::fromLatin1( field->FieldNameStr().c_str() ) ) ) + && !whiteList.contains( TQString::fromLatin1( field->FieldNameStr().c_str() ) ) ) header.RemoveField(field); field = nextField; } @@ -1208,10 +1208,10 @@ void KMMessage::sanitizeHeaders( const QStringList& whiteList ) } //----------------------------------------------------------------------------- -KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ ) +KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString::null */ ) { KMMessage* msg = new KMMessage(); - QString id; + TQString id; // If this is a multipart mail or if the main part is only the text part, // Make an identical copy of the mail, minus headers, so attachments are @@ -1228,12 +1228,12 @@ KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ ) msg->sanitizeHeaders(); // strip blacklisted parts - QStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding(); - for ( QStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) { - QString entry = (*it); + TQStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding(); + for ( TQStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) { + TQString entry = (*it); int sep = entry.find( '/' ); - QCString type = entry.left( sep ).latin1(); - QCString subtype = entry.mid( sep+1 ).latin1(); + TQCString type = entry.left( sep ).latin1(); + TQCString subtype = entry.mid( sep+1 ).latin1(); kdDebug( 5006 ) << "Looking for blacklisted type: " << type << "/" << subtype << endl; while ( DwBodyPart * part = msg->findDwBodyPart( type, subtype ) ) { msg->mMsg->Body().RemoveBodyPart( part ); @@ -1283,7 +1283,7 @@ KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ ) msg->mNeedsAssembly = true; msg->cleanupHeader(); } - // QString st = QString::fromUtf8(createForwardBody()); + // TQString st = TQString::fromUtf8(createForwardBody()); msg->setSubject( forwardSubject() ); @@ -1296,7 +1296,7 @@ KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ ) parser.process( this ); } - // QCString encoding = autoDetectCharset(charset(), sPrefCharsets, msg->body()); + // TQCString encoding = autoDetectCharset(charset(), sPrefCharsets, msg->body()); // if (encoding.isEmpty()) encoding = "utf-8"; // msg->setCharset(encoding); @@ -1354,15 +1354,15 @@ static int requestAdviceOnMDN( const char * what ) { for ( int i = 0 ; i < numMdnMessageBoxes ; ++i ) if ( !qstrcmp( what, mdnMessageBoxes[i].dontAskAgainID ) ) if ( mdnMessageBoxes[i].canDeny ) { - const KCursorSaver saver( QCursor::ArrowCursor ); - int answer = QMessageBox::information( 0, + const KCursorSaver saver( TQCursor::ArrowCursor ); + int answer = TQMessageBox::information( 0, i18n("Message Disposition Notification Request"), i18n( mdnMessageBoxes[i].text ), i18n("&Ignore"), i18n("Send \"&denied\""), i18n("&Send") ); return answer ? answer + 1 : 0 ; // map to "mode" in createMDN } else { - const KCursorSaver saver( QCursor::ArrowCursor ); - int answer = QMessageBox::information( 0, + const KCursorSaver saver( TQCursor::ArrowCursor ); + int answer = TQMessageBox::information( 0, i18n("Message Disposition Notification Request"), i18n( mdnMessageBoxes[i].text ), i18n("&Ignore"), i18n("&Send") ); @@ -1376,7 +1376,7 @@ static int requestAdviceOnMDN( const char * what ) { KMMessage* KMMessage::createMDN( MDN::ActionMode a, MDN::DispositionType d, bool allowGUI, - QValueList<MDN::DispositionModifier> m ) + TQValueList<MDN::DispositionModifier> m ) { // RFC 2298: At most one MDN may be issued on behalf of each // particular recipient by their user agent. That is, once an MDN @@ -1401,13 +1401,13 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, } // extract where to send to: - QString receiptTo = headerField("Disposition-Notification-To"); + TQString receiptTo = headerField("Disposition-Notification-To"); if ( receiptTo.stripWhiteSpace().isEmpty() ) return 0; receiptTo.remove( '\n' ); MDN::SendingMode s = MDN::SentAutomatically; // set to manual if asked user - QString special; // fill in case of error, warning or failure + TQString special; // fill in case of error, warning or failure KConfigGroup mdnConfig( KMKernel::config(), "MDN" ); // default: @@ -1424,7 +1424,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, // not understand the meaning of the parameter, it MUST NOT generate // an MDN with any disposition type other than "failed" in response // to the request. - QString notificationOptions = headerField("Disposition-Notification-Options"); + TQString notificationOptions = headerField("Disposition-Notification-Options"); if ( notificationOptions.contains( "required", false ) ) { // ### hacky; should parse... // There is a required option that we don't understand. We need to @@ -1456,7 +1456,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, // SHOULD be obtained (or no MDN sent) if there is no Return-Path // header in the message [...] AddrSpecList returnPathList = extractAddrSpecs("Return-Path"); - QString returnPath = returnPathList.isEmpty() ? QString::null + TQString returnPath = returnPathList.isEmpty() ? TQString::null : returnPathList.front().localPart + '@' + returnPathList.front().domain ; kdDebug(5006) << "clean return path: " << returnPath << endl; if ( returnPath.isEmpty() || !receiptTo.contains( returnPath, false ) ) { @@ -1495,7 +1495,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, // extract where to send from: - QString finalRecipient = kmkernel->identityManager() + TQString finalRecipient = kmkernel->identityManager() ->identityForUoidOrDefault( identityUoid() ).fullEmailAddr(); // @@ -1516,7 +1516,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, receipt->mNeedsAssembly = true; receipt->setContentTypeParam( "report-type", "disposition-notification" ); - QString description = replaceHeadersInString( MDN::descriptionFor( d, m ) ); + TQString description = replaceHeadersInString( MDN::descriptionFor( d, m ) ); // text/plain part: KMMessagePart firstMsgPart; @@ -1588,15 +1588,15 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, return receipt; } -QString KMMessage::replaceHeadersInString( const QString & s ) const { - QString result = s; - QRegExp rx( "\\$\\{([a-z0-9-]+)\\}", false ); +TQString KMMessage::replaceHeadersInString( const TQString & s ) const { + TQString result = s; + TQRegExp rx( "\\$\\{([a-z0-9-]+)\\}", false ); Q_ASSERT( rx.isValid() ); - QRegExp rxDate( "\\$\\{date\\}" ); + TQRegExp rxDate( "\\$\\{date\\}" ); Q_ASSERT( rxDate.isValid() ); - QString sDate = KMime::DateFormatter::formatDate( + TQString sDate = KMime::DateFormatter::formatDate( KMime::DateFormatter::Localized, date() ); int idx = 0; @@ -1606,7 +1606,7 @@ QString KMMessage::replaceHeadersInString( const QString & s ) const { idx = 0; while ( ( idx = rx.search( result, idx ) ) != -1 ) { - QString replacement = headerField( rx.cap(1).latin1() ); + TQString replacement = headerField( rx.cap(1).latin1() ); result.replace( idx, rx.matchedLength(), replacement ); idx += replacement.length(); } @@ -1615,7 +1615,7 @@ QString KMMessage::replaceHeadersInString( const QString & s ) const { KMMessage* KMMessage::createDeliveryReceipt() const { - QString str, receiptTo; + TQString str, receiptTo; KMMessage *receipt; receiptTo = headerField("Disposition-Notification-To"); @@ -1668,7 +1668,7 @@ void KMMessage::applyIdentity( uint id ) if (ident.isDefault()) removeHeaderField("X-KMail-Identity"); else - setHeaderField("X-KMail-Identity", QString::number( ident.uoid() )); + setHeaderField("X-KMail-Identity", TQString::number( ident.uoid() )); if ( ident.transport().isEmpty() ) removeHeaderField( "X-KMail-Transport" ); @@ -1676,17 +1676,17 @@ void KMMessage::applyIdentity( uint id ) setHeaderField( "X-KMail-Transport", ident.transport() ); if ( ident.fcc().isEmpty() ) - setFcc( QString::null ); + setFcc( TQString::null ); else setFcc( ident.fcc() ); if ( ident.drafts().isEmpty() ) - setDrafts( QString::null ); + setDrafts( TQString::null ); else setDrafts( ident.drafts() ); if ( ident.templates().isEmpty() ) - setTemplates( QString::null ); + setTemplates( TQString::null ); else setTemplates( ident.templates() ); @@ -1706,7 +1706,7 @@ void KMMessage::initHeader( uint id ) } uint KMMessage::identityUoid() const { - QString idString = headerField("X-KMail-Identity").stripWhiteSpace(); + TQString idString = headerField("X-KMail-Identity").stripWhiteSpace(); bool ok = false; int id = idString.toUInt( &ok ); @@ -1725,7 +1725,7 @@ void KMMessage::initFromMessage(const KMMessage *msg, bool idHeaders) uint id = msg->identityUoid(); if ( idHeaders ) initHeader(id); - else setHeaderField("X-KMail-Identity", QString::number(id)); + else setHeaderField("X-KMail-Identity", TQString::number(id)); if (!msg->headerField("X-KMail-Transport").isEmpty()) setHeaderField("X-KMail-Transport", msg->headerField("X-KMail-Transport")); } @@ -1775,7 +1775,7 @@ void KMMessage::setAutomaticFields(bool aIsMulti) //----------------------------------------------------------------------------- -QString KMMessage::dateStr() const +TQString KMMessage::dateStr() const { KConfigGroup general( KMKernel::config(), "General" ); DwHeaders& header = mMsg->Headers(); @@ -1793,7 +1793,7 @@ QString KMMessage::dateStr() const //----------------------------------------------------------------------------- -QCString KMMessage::dateShortStr() const +TQCString KMMessage::dateShortStr() const { DwHeaders& header = mMsg->Headers(); time_t unixTime; @@ -1801,7 +1801,7 @@ QCString KMMessage::dateShortStr() const if (!header.HasDate()) return ""; unixTime = header.Date().AsUnixTime(); - QCString result = ctime(&unixTime); + TQCString result = ctime(&unixTime); int len = result.length(); if (result[len-1]=='\n') result.truncate(len-1); @@ -1811,7 +1811,7 @@ QCString KMMessage::dateShortStr() const //----------------------------------------------------------------------------- -QString KMMessage::dateIsoStr() const +TQString KMMessage::dateIsoStr() const { DwHeaders& header = mMsg->Headers(); time_t unixTime; @@ -1821,7 +1821,7 @@ QString KMMessage::dateIsoStr() const char cstr[64]; strftime(cstr, 63, "%Y-%m-%d %H:%M:%S", localtime(&unixTime)); - return QString(cstr); + return TQString(cstr); } @@ -1857,7 +1857,7 @@ void KMMessage::setDate(time_t aDate) //----------------------------------------------------------------------------- -void KMMessage::setDate(const QCString& aStr) +void KMMessage::setDate(const TQCString& aStr) { DwHeaders& header = mMsg->Headers(); @@ -1872,12 +1872,12 @@ void KMMessage::setDate(const QCString& aStr) //----------------------------------------------------------------------------- -QString KMMessage::to() const +TQString KMMessage::to() const { // handle To same as Cc below, bug 80747 - QValueList<QCString> rawHeaders = rawHeaderFields( "To" ); - QStringList headers; - for ( QValueList<QCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) { + TQValueList<TQCString> rawHeaders = rawHeaderFields( "To" ); + TQStringList headers; + for ( TQValueList<TQCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) { headers << *it; } return KPIM::normalizeAddressesAndDecodeIDNs( headers.join( ", " ) ); @@ -1885,26 +1885,26 @@ QString KMMessage::to() const //----------------------------------------------------------------------------- -void KMMessage::setTo(const QString& aStr) +void KMMessage::setTo(const TQString& aStr) { setHeaderField( "To", aStr, Address ); } //----------------------------------------------------------------------------- -QString KMMessage::toStrip() const +TQString KMMessage::toStrip() const { return stripEmailAddr( to() ); } //----------------------------------------------------------------------------- -QString KMMessage::replyTo() const +TQString KMMessage::replyTo() const { return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField("Reply-To") ); } //----------------------------------------------------------------------------- -void KMMessage::setReplyTo(const QString& aStr) +void KMMessage::setReplyTo(const TQString& aStr) { setHeaderField( "Reply-To", aStr, Address ); } @@ -1918,13 +1918,13 @@ void KMMessage::setReplyTo(KMMessage* aMsg) //----------------------------------------------------------------------------- -QString KMMessage::cc() const +TQString KMMessage::cc() const { // get the combined contents of all Cc headers (as workaround for invalid // messages with multiple Cc headers) - QValueList<QCString> rawHeaders = rawHeaderFields( "Cc" ); - QStringList headers; - for ( QValueList<QCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) { + TQValueList<TQCString> rawHeaders = rawHeaderFields( "Cc" ); + TQStringList headers; + for ( TQValueList<TQCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) { headers << *it; } return KPIM::normalizeAddressesAndDecodeIDNs( headers.join( ", " ) ); @@ -1932,59 +1932,59 @@ QString KMMessage::cc() const //----------------------------------------------------------------------------- -void KMMessage::setCc(const QString& aStr) +void KMMessage::setCc(const TQString& aStr) { setHeaderField( "Cc", aStr, Address ); } //----------------------------------------------------------------------------- -QString KMMessage::ccStrip() const +TQString KMMessage::ccStrip() const { return stripEmailAddr( cc() ); } //----------------------------------------------------------------------------- -QString KMMessage::bcc() const +TQString KMMessage::bcc() const { return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField("Bcc") ); } //----------------------------------------------------------------------------- -void KMMessage::setBcc(const QString& aStr) +void KMMessage::setBcc(const TQString& aStr) { setHeaderField( "Bcc", aStr, Address ); } //----------------------------------------------------------------------------- -QString KMMessage::fcc() const +TQString KMMessage::fcc() const { return headerField( "X-KMail-Fcc" ); } //----------------------------------------------------------------------------- -void KMMessage::setFcc( const QString &aStr ) +void KMMessage::setFcc( const TQString &aStr ) { setHeaderField( "X-KMail-Fcc", aStr ); } //----------------------------------------------------------------------------- -void KMMessage::setDrafts( const QString &aStr ) +void KMMessage::setDrafts( const TQString &aStr ) { mDrafts = aStr; } //----------------------------------------------------------------------------- -void KMMessage::setTemplates( const QString &aStr ) +void KMMessage::setTemplates( const TQString &aStr ) { mTemplates = aStr; } //----------------------------------------------------------------------------- -QString KMMessage::who() const +TQString KMMessage::who() const { if (mParent) return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField(mParent->whoField().utf8()) ); @@ -1993,16 +1993,16 @@ QString KMMessage::who() const //----------------------------------------------------------------------------- -QString KMMessage::from() const +TQString KMMessage::from() const { return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField("From") ); } //----------------------------------------------------------------------------- -void KMMessage::setFrom(const QString& bStr) +void KMMessage::setFrom(const TQString& bStr) { - QString aStr = bStr; + TQString aStr = bStr; if (aStr.isNull()) aStr = ""; setHeaderField( "From", aStr, Address ); @@ -2011,30 +2011,30 @@ void KMMessage::setFrom(const QString& bStr) //----------------------------------------------------------------------------- -QString KMMessage::fromStrip() const +TQString KMMessage::fromStrip() const { return stripEmailAddr( from() ); } //----------------------------------------------------------------------------- -QString KMMessage::sender() const { +TQString KMMessage::sender() const { AddrSpecList asl = extractAddrSpecs( "Sender" ); if ( asl.empty() ) asl = extractAddrSpecs( "From" ); if ( asl.empty() ) - return QString::null; + return TQString::null; return asl.front().asString(); } //----------------------------------------------------------------------------- -QString KMMessage::subject() const +TQString KMMessage::subject() const { return headerField("Subject"); } //----------------------------------------------------------------------------- -void KMMessage::setSubject(const QString& aStr) +void KMMessage::setSubject(const TQString& aStr) { setHeaderField("Subject",aStr); mDirty = true; @@ -2042,14 +2042,14 @@ void KMMessage::setSubject(const QString& aStr) //----------------------------------------------------------------------------- -QString KMMessage::xmark() const +TQString KMMessage::xmark() const { return headerField("X-KMail-Mark"); } //----------------------------------------------------------------------------- -void KMMessage::setXMark(const QString& aStr) +void KMMessage::setXMark(const TQString& aStr) { setHeaderField("X-KMail-Mark", aStr); mDirty = true; @@ -2057,10 +2057,10 @@ void KMMessage::setXMark(const QString& aStr) //----------------------------------------------------------------------------- -QString KMMessage::replyToId() const +TQString KMMessage::replyToId() const { int leftAngle, rightAngle; - QString replyTo, references; + TQString replyTo, references; replyTo = headerField("In-Reply-To"); // search the end of the (first) message id in the In-Reply-To header @@ -2098,15 +2098,15 @@ QString KMMessage::replyToId() const //----------------------------------------------------------------------------- -QString KMMessage::replyToIdMD5() const { +TQString KMMessage::replyToIdMD5() const { return base64EncodedMD5( replyToId() ); } //----------------------------------------------------------------------------- -QString KMMessage::references() const +TQString KMMessage::references() const { int leftAngle, rightAngle; - QString references = headerField( "References" ); + TQString references = headerField( "References" ); // keep the last two entries for threading leftAngle = references.findRev( '<' ); @@ -2120,13 +2120,13 @@ QString KMMessage::references() const if( !references.isEmpty() && references[0] == '<' ) return references; else - return QString::null; + return TQString::null; } //----------------------------------------------------------------------------- -QString KMMessage::replyToAuxIdMD5() const +TQString KMMessage::replyToAuxIdMD5() const { - QString result = references(); + TQString result = references(); // references contains two items, use the first one // (the second to last reference) const int rightAngle = result.find( '>' ); @@ -2137,12 +2137,12 @@ QString KMMessage::replyToAuxIdMD5() const } //----------------------------------------------------------------------------- -QString KMMessage::strippedSubjectMD5() const { +TQString KMMessage::strippedSubjectMD5() const { return base64EncodedMD5( stripOffPrefixes( subject() ), true /*utf8*/ ); } //----------------------------------------------------------------------------- -QString KMMessage::subjectMD5() const { +TQString KMMessage::subjectMD5() const { return base64EncodedMD5( subject(), true /*utf8*/ ); } @@ -2152,7 +2152,7 @@ bool KMMessage::subjectIsPrefixed() const { } //----------------------------------------------------------------------------- -void KMMessage::setReplyToId(const QString& aStr) +void KMMessage::setReplyToId(const TQString& aStr) { setHeaderField("In-Reply-To", aStr); mDirty = true; @@ -2160,9 +2160,9 @@ void KMMessage::setReplyToId(const QString& aStr) //----------------------------------------------------------------------------- -QString KMMessage::msgId() const +TQString KMMessage::msgId() const { - QString msgId = headerField("Message-Id"); + TQString msgId = headerField("Message-Id"); // search the end of the message id const int rightAngle = msgId.find( '>' ); @@ -2177,13 +2177,13 @@ QString KMMessage::msgId() const //----------------------------------------------------------------------------- -QString KMMessage::msgIdMD5() const { +TQString KMMessage::msgIdMD5() const { return base64EncodedMD5( msgId() ); } //----------------------------------------------------------------------------- -void KMMessage::setMsgId(const QString& aStr) +void KMMessage::setMsgId(const TQString& aStr) { setHeaderField("Message-Id", aStr); mDirty = true; @@ -2198,7 +2198,7 @@ size_t KMMessage::msgSizeServer() const { //----------------------------------------------------------------------------- void KMMessage::setMsgSizeServer(size_t size) { - setHeaderField("X-Length", QCString().setNum(size)); + setHeaderField("X-Length", TQCString().setNum(size)); mDirty = true; } @@ -2211,12 +2211,12 @@ ulong KMMessage::UID() const { //----------------------------------------------------------------------------- void KMMessage::setUID(ulong uid) { - setHeaderField("X-UID", QCString().setNum(uid)); + setHeaderField("X-UID", TQCString().setNum(uid)); mDirty = true; } //----------------------------------------------------------------------------- -AddressList KMMessage::splitAddrField( const QCString & str ) +AddressList KMMessage::splitAddrField( const TQCString & str ) { AddressList result; const char * scursor = str.begin(); @@ -2229,11 +2229,11 @@ AddressList KMMessage::splitAddrField( const QCString & str ) return result; } -AddressList KMMessage::headerAddrField( const QCString & aName ) const { +AddressList KMMessage::headerAddrField( const TQCString & aName ) const { return KMMessage::splitAddrField( rawHeaderField( aName ) ); } -AddrSpecList KMMessage::extractAddrSpecs( const QCString & header ) const { +AddrSpecList KMMessage::extractAddrSpecs( const TQCString & header ) const { AddressList al = headerAddrField( header ); AddrSpecList result; for ( AddressList::const_iterator ait = al.begin() ; ait != al.end() ; ++ait ) @@ -2242,24 +2242,24 @@ AddrSpecList KMMessage::extractAddrSpecs( const QCString & header ) const { return result; } -QCString KMMessage::rawHeaderField( const QCString & name ) const { - if ( name.isEmpty() ) return QCString(); +TQCString KMMessage::rawHeaderField( const TQCString & name ) const { + if ( name.isEmpty() ) return TQCString(); DwHeaders & header = mMsg->Headers(); DwField * field = header.FindField( name ); - if ( !field ) return QCString(); + if ( !field ) return TQCString(); return header.FieldBody( name.data() ).AsString().c_str(); } -QValueList<QCString> KMMessage::rawHeaderFields( const QCString& field ) const +TQValueList<TQCString> KMMessage::rawHeaderFields( const TQCString& field ) const { if ( field.isEmpty() || !mMsg->Headers().FindField( field ) ) - return QValueList<QCString>(); + return TQValueList<TQCString>(); std::vector<DwFieldBody*> v = mMsg->Headers().AllFieldBodies( field.data() ); - QValueList<QCString> headerFields; + TQValueList<TQCString> headerFields; for ( uint i = 0; i < v.size(); ++i ) { headerFields.append( v[i]->AsString().c_str() ); } @@ -2267,26 +2267,26 @@ QValueList<QCString> KMMessage::rawHeaderFields( const QCString& field ) const return headerFields; } -QString KMMessage::headerField(const QCString& aName) const +TQString KMMessage::headerField(const TQCString& aName) const { if ( aName.isEmpty() ) - return QString::null; + return TQString::null; if ( !mMsg->Headers().FindField( aName ) ) - return QString::null; + return TQString::null; return decodeRFC2047String( mMsg->Headers().FieldBody( aName.data() ).AsString().c_str(), charset() ); } -QStringList KMMessage::headerFields( const QCString& field ) const +TQStringList KMMessage::headerFields( const TQCString& field ) const { if ( field.isEmpty() || !mMsg->Headers().FindField( field ) ) - return QStringList(); + return TQStringList(); std::vector<DwFieldBody*> v = mMsg->Headers().AllFieldBodies( field.data() ); - QStringList headerFields; + TQStringList headerFields; for ( uint i = 0; i < v.size(); ++i ) { headerFields.append( decodeRFC2047String( v[i]->AsString().c_str(), charset() ) ); } @@ -2295,7 +2295,7 @@ QStringList KMMessage::headerFields( const QCString& field ) const } //----------------------------------------------------------------------------- -void KMMessage::removeHeaderField(const QCString& aName) +void KMMessage::removeHeaderField(const TQCString& aName) { DwHeaders & header = mMsg->Headers(); DwField * field = header.FindField(aName); @@ -2306,7 +2306,7 @@ void KMMessage::removeHeaderField(const QCString& aName) } //----------------------------------------------------------------------------- -void KMMessage::removeHeaderFields(const QCString& aName) +void KMMessage::removeHeaderFields(const TQCString& aName) { DwHeaders & header = mMsg->Headers(); while ( DwField * field = header.FindField(aName) ) { @@ -2317,7 +2317,7 @@ void KMMessage::removeHeaderFields(const QCString& aName) //----------------------------------------------------------------------------- -void KMMessage::setHeaderField( const QCString& aName, const QString& bValue, +void KMMessage::setHeaderField( const TQCString& aName, const TQString& bValue, HeaderFieldType type, bool prepend ) { #if 0 @@ -2331,17 +2331,17 @@ void KMMessage::setHeaderField( const QCString& aName, const QString& bValue, DwString str; DwField* field; - QCString aValue; + TQCString aValue; if (!bValue.isEmpty()) { - QString value = bValue; + TQString value = bValue; if ( type == Address ) value = KPIM::normalizeAddressesAndEncodeIDNs( value ); #if 0 if ( type != Unstructured ) kdDebug(5006) << "value: \"" << value << "\"" << endl; #endif - QCString encoding = autoDetectCharset( charset(), sPrefCharsets, value ); + TQCString encoding = autoDetectCharset( charset(), sPrefCharsets, value ); if (encoding.isEmpty()) encoding = "utf-8"; aValue = encodeRFC2047String( value, encoding ); @@ -2369,7 +2369,7 @@ void KMMessage::setHeaderField( const QCString& aName, const QString& bValue, //----------------------------------------------------------------------------- -QCString KMMessage::typeStr() const +TQCString KMMessage::typeStr() const { DwHeaders& header = mMsg->Headers(); if (header.HasContentType()) return header.ContentType().TypeStr().c_str(); @@ -2387,7 +2387,7 @@ int KMMessage::type() const //----------------------------------------------------------------------------- -void KMMessage::setTypeStr(const QCString& aStr) +void KMMessage::setTypeStr(const TQCString& aStr) { dwContentType().SetTypeStr(DwString(aStr)); dwContentType().Parse(); @@ -2406,7 +2406,7 @@ void KMMessage::setType(int aType) //----------------------------------------------------------------------------- -QCString KMMessage::subtypeStr() const +TQCString KMMessage::subtypeStr() const { DwHeaders& header = mMsg->Headers(); if (header.HasContentType()) return header.ContentType().SubtypeStr().c_str(); @@ -2424,7 +2424,7 @@ int KMMessage::subtype() const //----------------------------------------------------------------------------- -void KMMessage::setSubtypeStr(const QCString& aStr) +void KMMessage::setSubtypeStr(const TQCString& aStr) { dwContentType().SetSubtypeStr(DwString(aStr)); dwContentType().Parse(); @@ -2443,8 +2443,8 @@ void KMMessage::setSubtype(int aSubtype) //----------------------------------------------------------------------------- void KMMessage::setDwMediaTypeParam( DwMediaType &mType, - const QCString& attr, - const QCString& val ) + const TQCString& attr, + const TQCString& val ) { mType.Parse(); DwParameter *param = mType.FirstParameter(); @@ -2467,7 +2467,7 @@ void KMMessage::setDwMediaTypeParam( DwMediaType &mType, //----------------------------------------------------------------------------- -void KMMessage::setContentTypeParam(const QCString& attr, const QCString& val) +void KMMessage::setContentTypeParam(const TQCString& attr, const TQCString& val) { if (mNeedsAssembly) mMsg->Assemble(); mNeedsAssembly = false; @@ -2477,7 +2477,7 @@ void KMMessage::setContentTypeParam(const QCString& attr, const QCString& val) //----------------------------------------------------------------------------- -QCString KMMessage::contentTransferEncodingStr() const +TQCString KMMessage::contentTransferEncodingStr() const { DwHeaders& header = mMsg->Headers(); if (header.HasContentTransferEncoding()) @@ -2497,7 +2497,7 @@ int KMMessage::contentTransferEncoding() const //----------------------------------------------------------------------------- -void KMMessage::setContentTransferEncodingStr(const QCString& aStr) +void KMMessage::setContentTransferEncodingStr(const TQCString& aStr) { mMsg->Headers().ContentTransferEncoding().FromString(aStr); mMsg->Headers().ContentTransferEncoding().Parse(); @@ -2528,10 +2528,10 @@ void KMMessage::setNeedsAssembly() //----------------------------------------------------------------------------- -QCString KMMessage::body() const +TQCString KMMessage::body() const { const DwString& body = mMsg->Body().AsString(); - QCString str = KMail::Util::CString( body ); + TQCString str = KMail::Util::CString( body ); // Calls length() -> slow //kdWarning( str.length() != body.length(), 5006 ) // << "KMMessage::body(): body is binary but used as text!" << endl; @@ -2540,7 +2540,7 @@ QCString KMMessage::body() const //----------------------------------------------------------------------------- -QByteArray KMMessage::bodyDecodedBinary() const +TQByteArray KMMessage::bodyDecodedBinary() const { DwString dwstr; const DwString& dwsrc = mMsg->Body().AsString(); @@ -2559,14 +2559,14 @@ QByteArray KMMessage::bodyDecodedBinary() const } int len = dwstr.size(); - QByteArray ba(len); + TQByteArray ba(len); memcpy(ba.data(),dwstr.data(),len); return ba; } //----------------------------------------------------------------------------- -QCString KMMessage::bodyDecoded() const +TQCString KMMessage::bodyDecoded() const { DwString dwstr; DwString dwsrc = mMsg->Body().AsString(); @@ -2586,8 +2586,8 @@ QCString KMMessage::bodyDecoded() const return KMail::Util::CString( dwstr ); - // Calling QCString::length() is slow - //QCString result = KMail::Util::CString( dwstr ); + // Calling TQCString::length() is slow + //TQCString result = KMail::Util::CString( dwstr ); //kdWarning(result.length() != len, 5006) // << "KMMessage::bodyDecoded(): body is binary but used as text!" << endl; //return result; @@ -2595,11 +2595,11 @@ QCString KMMessage::bodyDecoded() const //----------------------------------------------------------------------------- -QValueList<int> KMMessage::determineAllowedCtes( const CharFreq& cf, +TQValueList<int> KMMessage::determineAllowedCtes( const CharFreq& cf, bool allow8Bit, bool willBeSigned ) { - QValueList<int> allowedCtes; + TQValueList<int> allowedCtes; switch ( cf.type() ) { case CharFreq::SevenBitText: @@ -2643,8 +2643,8 @@ QValueList<int> KMMessage::determineAllowedCtes( const CharFreq& cf, //----------------------------------------------------------------------------- -void KMMessage::setBodyAndGuessCte( const QByteArray& aBuf, - QValueList<int> & allowedCte, +void KMMessage::setBodyAndGuessCte( const TQByteArray& aBuf, + TQValueList<int> & allowedCte, bool allow8Bit, bool willBeSigned ) { @@ -2666,8 +2666,8 @@ void KMMessage::setBodyAndGuessCte( const QByteArray& aBuf, //----------------------------------------------------------------------------- -void KMMessage::setBodyAndGuessCte( const QCString& aBuf, - QValueList<int> & allowedCte, +void KMMessage::setBodyAndGuessCte( const TQCString& aBuf, + TQValueList<int> & allowedCte, bool allow8Bit, bool willBeSigned ) { @@ -2689,7 +2689,7 @@ void KMMessage::setBodyAndGuessCte( const QCString& aBuf, //----------------------------------------------------------------------------- -void KMMessage::setBodyEncoded(const QCString& aStr) +void KMMessage::setBodyEncoded(const TQCString& aStr) { DwString dwSrc(aStr.data(), aStr.size()-1 /* not the trailing NUL */); DwString dwResult; @@ -2712,7 +2712,7 @@ void KMMessage::setBodyEncoded(const QCString& aStr) } //----------------------------------------------------------------------------- -void KMMessage::setBodyEncodedBinary(const QByteArray& aStr) +void KMMessage::setBodyEncodedBinary(const TQByteArray& aStr) { DwString dwSrc(aStr.data(), aStr.size()); DwString dwResult; @@ -2736,7 +2736,7 @@ void KMMessage::setBodyEncodedBinary(const QByteArray& aStr) //----------------------------------------------------------------------------- -void KMMessage::setBody(const QCString& aStr) +void KMMessage::setBody(const TQCString& aStr) { mMsg->Body().FromString(KMail::Util::dwString(aStr)); mNeedsAssembly = true; @@ -2752,7 +2752,7 @@ void KMMessage::setBody(const char* aStr) mNeedsAssembly = true; } -void KMMessage::setMultiPartBody( const QCString & aStr ) { +void KMMessage::setMultiPartBody( const TQCString & aStr ) { setBody( aStr ); mMsg->Body().Parse(); mNeedsAssembly = true; @@ -2771,7 +2771,7 @@ int KMMessage::numBodyParts() const { int count = 0; DwBodyPart* part = getFirstDwBodyPart(); - QPtrList< DwBodyPart > parts; + TQPtrList< DwBodyPart > parts; while (part) { @@ -2819,7 +2819,7 @@ DwBodyPart * KMMessage::getFirstDwBodyPart() const int KMMessage::partNumber( DwBodyPart * aDwBodyPart ) const { DwBodyPart *curpart; - QPtrList< DwBodyPart > parts; + TQPtrList< DwBodyPart > parts; int curIdx = 0; int idx = 0; // Get the DwBodyPart for this index @@ -2859,7 +2859,7 @@ int KMMessage::partNumber( DwBodyPart * aDwBodyPart ) const DwBodyPart * KMMessage::dwBodyPart( int aIdx ) const { DwBodyPart *part, *curpart; - QPtrList< DwBodyPart > parts; + TQPtrList< DwBodyPart > parts; int curIdx = 0; // Get the DwBodyPart for this index @@ -2899,7 +2899,7 @@ DwBodyPart * KMMessage::dwBodyPart( int aIdx ) const DwBodyPart * KMMessage::findDwBodyPart( int type, int subtype ) const { DwBodyPart *part, *curpart; - QPtrList< DwBodyPart > parts; + TQPtrList< DwBodyPart > parts; // Get the DwBodyPart for this index curpart = getFirstDwBodyPart(); @@ -2945,10 +2945,10 @@ DwBodyPart * KMMessage::findDwBodyPart( int type, int subtype ) const } //----------------------------------------------------------------------------- -DwBodyPart * KMMessage::findDwBodyPart( const QCString& type, const QCString& subtype ) const +DwBodyPart * KMMessage::findDwBodyPart( const TQCString& type, const TQCString& subtype ) const { DwBodyPart *part, *curpart; - QPtrList< DwBodyPart > parts; + TQPtrList< DwBodyPart > parts; // Get the DwBodyPart for this index curpart = getFirstDwBodyPart(); @@ -3006,7 +3006,7 @@ void applyHeadersToMessagePart( DwHeaders& headers, KMMessagePart* aPart ) // KMMsgPart::fileName; Name however is decoded here and stored as a // decoded String in KMMsgPart... // Content-type - QCString additionalCTypeParams; + TQCString additionalCTypeParams; if (headers.HasContentType()) { DwMediaType& ct = headers.ContentType(); @@ -3017,7 +3017,7 @@ void applyHeadersToMessagePart( DwHeaders& headers, KMMessagePart* aPart ) while(param) { if (!qstricmp(param->Attribute().c_str(), "charset")) - aPart->setCharset(QCString(param->Value().c_str()).lower()); + aPart->setCharset(TQCString(param->Value().c_str()).lower()); else if (!qstrnicmp(param->Attribute().c_str(), "name*", 5)) aPart->setName(KMMsgBase::decodeRFC2231String(KMMsgBase::extractRFC2231HeaderField( param->Value().c_str(), "name" ))); else { @@ -3078,7 +3078,7 @@ void KMMessage::bodyPart(DwBodyPart* aDwBodyPart, KMMessagePart* aPart, // spurious empty Subject: line in some of the parts. //aPart->setName(" "); // partSpecifier - QString partId( aDwBodyPart->partId() ); + TQString partId( aDwBodyPart->partId() ); aPart->setPartSpecifier( partId ); DwHeaders& headers = aDwBodyPart->Headers(); @@ -3088,11 +3088,11 @@ void KMMessage::bodyPart(DwBodyPart* aDwBodyPart, KMMessagePart* aPart, if (withBody) aPart->setBody( aDwBodyPart->Body().AsString() ); else - aPart->setBody( QCString("") ); + aPart->setBody( TQCString("") ); // Content-id if ( headers.HasContentId() ) { - const QCString contentId = headers.ContentId().AsString().c_str(); + const TQCString contentId = headers.ContentId().AsString().c_str(); // ignore leading '<' and trailing '>' aPart->setContentId( contentId.mid( 1, contentId.length() - 2 ) ); } @@ -3109,7 +3109,7 @@ void KMMessage::bodyPart(DwBodyPart* aDwBodyPart, KMMessagePart* aPart, //aPart->setName(" "); aPart->setContentDescription(""); aPart->setContentDisposition(""); - aPart->setBody(QCString("")); + aPart->setBody(TQCString("")); aPart->setContentId(""); } } @@ -3144,17 +3144,17 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) if ( !aPart ) return part; - QCString charset = aPart->charset(); - QCString type = aPart->typeStr(); - QCString subtype = aPart->subtypeStr(); - QCString cte = aPart->cteStr(); - QCString contDesc = aPart->contentDescriptionEncoded(); - QCString contDisp = aPart->contentDisposition(); - QCString encoding = autoDetectCharset(charset, sPrefCharsets, aPart->name()); + TQCString charset = aPart->charset(); + TQCString type = aPart->typeStr(); + TQCString subtype = aPart->subtypeStr(); + TQCString cte = aPart->cteStr(); + TQCString contDesc = aPart->contentDescriptionEncoded(); + TQCString contDisp = aPart->contentDisposition(); + TQCString encoding = autoDetectCharset(charset, sPrefCharsets, aPart->name()); if (encoding.isEmpty()) encoding = "utf-8"; - QCString name = KMMsgBase::encodeRFC2231String(aPart->name(), encoding); - bool RFC2231encoded = aPart->name() != QString(name); - QCString paramAttr = aPart->parameterAttribute(); + TQCString name = KMMsgBase::encodeRFC2231String(aPart->name(), encoding); + bool RFC2231encoded = aPart->name() != TQString(name); + TQCString paramAttr = aPart->parameterAttribute(); DwHeaders& headers = part->Headers(); @@ -3172,10 +3172,10 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) } } - QCString additionalParam = aPart->additionalCTypeParamStr(); + TQCString additionalParam = aPart->additionalCTypeParamStr(); if( !additionalParam.isEmpty() ) { - QCString parAV; + TQCString parAV; DwString parA, parV; int iL, i1, i2, iM; iL = additionalParam.length(); @@ -3229,14 +3229,14 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) if (!paramAttr.isEmpty()) { - QCString encoding = autoDetectCharset(charset, sPrefCharsets, + TQCString encoding = autoDetectCharset(charset, sPrefCharsets, aPart->parameterValue()); if (encoding.isEmpty()) encoding = "utf-8"; - QCString paramValue; + TQCString paramValue; paramValue = KMMsgBase::encodeRFC2231String(aPart->parameterValue(), encoding); DwParameter *param = new DwParameter; - if (aPart->parameterValue() != QString(paramValue)) + if (aPart->parameterValue() != TQString(paramValue)) { param->SetAttribute((paramAttr + '*').data()); param->SetValue(paramValue.data(),true); @@ -3289,14 +3289,14 @@ void KMMessage::addBodyPart(const KMMessagePart* aPart) //----------------------------------------------------------------------------- -QString KMMessage::generateMessageId( const QString& addr ) +TQString KMMessage::generateMessageId( const TQString& addr ) { - QDateTime datetime = QDateTime::currentDateTime(); - QString msgIdStr; + TQDateTime datetime = TQDateTime::currentDateTime(); + TQString msgIdStr; msgIdStr = '<' + datetime.toString( "yyyyMMddhhmm.sszzz" ); - QString msgIdSuffix; + TQString msgIdSuffix; KConfigGroup general( KMKernel::config(), "General" ); if( general.readBoolEntry( "useCustomMessageIdSuffix", false ) ) @@ -3314,12 +3314,12 @@ QString KMMessage::generateMessageId( const QString& addr ) //----------------------------------------------------------------------------- -QCString KMMessage::html2source( const QCString & src ) +TQCString KMMessage::html2source( const TQCString & src ) { - QCString result( 1 + 6*(src.size()-1) ); // maximal possible length + TQCString result( 1 + 6*(src.size()-1) ); // maximal possible length - QCString::ConstIterator s = src.begin(); - QCString::Iterator d = result.begin(); + TQCString::ConstIterator s = src.begin(); + TQCString::Iterator d = result.begin(); while ( *s ) { switch ( *s ) { case '<': { @@ -3387,10 +3387,10 @@ QCString KMMessage::html2source( const QCString & src ) } //----------------------------------------------------------------------------- -QString KMMessage::encodeMailtoUrl( const QString& str ) +TQString KMMessage::encodeMailtoUrl( const TQString& str ) { - QString result; - result = QString::fromLatin1( KMMsgBase::encodeRFC2047String( str, + TQString result; + result = TQString::fromLatin1( KMMsgBase::encodeRFC2047String( str, "utf-8" ) ); result = KURL::encode_string( result ); return result; @@ -3398,9 +3398,9 @@ QString KMMessage::encodeMailtoUrl( const QString& str ) //----------------------------------------------------------------------------- -QString KMMessage::decodeMailtoUrl( const QString& url ) +TQString KMMessage::decodeMailtoUrl( const TQString& url ) { - QString result; + TQString result; result = KURL::decode_string( url ); result = KMMsgBase::decodeRFC2047String( result.latin1() ); return result; @@ -3408,22 +3408,22 @@ QString KMMessage::decodeMailtoUrl( const QString& url ) //----------------------------------------------------------------------------- -QCString KMMessage::stripEmailAddr( const QCString& aStr ) +TQCString KMMessage::stripEmailAddr( const TQCString& aStr ) { //kdDebug(5006) << "KMMessage::stripEmailAddr( " << aStr << " )" << endl; if ( aStr.isEmpty() ) - return QCString(); + return TQCString(); - QCString result; + TQCString result; // The following is a primitive parser for a mailbox-list (cf. RFC 2822). // The purpose is to extract a displayable string from the mailboxes. // Comments in the addr-spec are not handled. No error checking is done. - QCString name; - QCString comment; - QCString angleAddress; + TQCString name; + TQCString comment; + TQCString angleAddress; enum { TopLevel, InComment, InAngleAddress } context = TopLevel; bool inQuotedString = false; int commentLevel = 0; @@ -3481,9 +3481,9 @@ QCString KMMessage::stripEmailAddr( const QCString& aStr ) else if ( !angleAddress.isEmpty() ) { result += angleAddress; } - name = QCString(); - comment = QCString(); - angleAddress = QCString(); + name = TQCString(); + comment = TQCString(); + angleAddress = TQCString(); } else name += *p; @@ -3567,27 +3567,27 @@ QCString KMMessage::stripEmailAddr( const QCString& aStr ) } //----------------------------------------------------------------------------- -QString KMMessage::stripEmailAddr( const QString& aStr ) +TQString KMMessage::stripEmailAddr( const TQString& aStr ) { //kdDebug(5006) << "KMMessage::stripEmailAddr( " << aStr << " )" << endl; if ( aStr.isEmpty() ) - return QString::null; + return TQString::null; - QString result; + TQString result; // The following is a primitive parser for a mailbox-list (cf. RFC 2822). // The purpose is to extract a displayable string from the mailboxes. // Comments in the addr-spec are not handled. No error checking is done. - QString name; - QString comment; - QString angleAddress; + TQString name; + TQString comment; + TQString angleAddress; enum { TopLevel, InComment, InAngleAddress } context = TopLevel; bool inQuotedString = false; int commentLevel = 0; - QChar ch; + TQChar ch; unsigned int strLength(aStr.length()); for ( uint index = 0; index < strLength; ++index ) { ch = aStr[index]; @@ -3643,9 +3643,9 @@ QString KMMessage::stripEmailAddr( const QString& aStr ) else if ( !angleAddress.isEmpty() ) { result += angleAddress; } - name = QString::null; - comment = QString::null; - angleAddress = QString::null; + name = TQString::null; + comment = TQString::null; + angleAddress = TQString::null; } else name += ch; @@ -3729,9 +3729,9 @@ QString KMMessage::stripEmailAddr( const QString& aStr ) } //----------------------------------------------------------------------------- -QString KMMessage::quoteHtmlChars( const QString& str, bool removeLineBreaks ) +TQString KMMessage::quoteHtmlChars( const TQString& str, bool removeLineBreaks ) { - QString result; + TQString result; unsigned int strLength(str.length()); result.reserve( 6*strLength ); // maximal possible length @@ -3765,20 +3765,20 @@ QString KMMessage::quoteHtmlChars( const QString& str, bool removeLineBreaks ) } //----------------------------------------------------------------------------- -QString KMMessage::emailAddrAsAnchor(const QString& aEmail, bool stripped, const QString& cssStyle, bool aLink) +TQString KMMessage::emailAddrAsAnchor(const TQString& aEmail, bool stripped, const TQString& cssStyle, bool aLink) { if( aEmail.isEmpty() ) return aEmail; - QStringList addressList = KPIM::splitEmailAddrList( aEmail ); + TQStringList addressList = KPIM::splitEmailAddrList( aEmail ); - QString result; + TQString result; - for( QStringList::ConstIterator it = addressList.begin(); + for( TQStringList::ConstIterator it = addressList.begin(); ( it != addressList.end() ); ++it ) { if( !(*it).isEmpty() ) { - QString address = *it; + TQString address = *it; if(aLink) { result += "<a href=\"mailto:" + KMMessage::encodeMailtoUrl( address ) @@ -3803,12 +3803,12 @@ QString KMMessage::emailAddrAsAnchor(const QString& aEmail, bool stripped, const //----------------------------------------------------------------------------- //static -QStringList KMMessage::stripAddressFromAddressList( const QString& address, - const QStringList& list ) +TQStringList KMMessage::stripAddressFromAddressList( const TQString& address, + const TQStringList& list ) { - QStringList addresses( list ); - QString addrSpec( KPIM::getEmailAddress( address ) ); - for ( QStringList::Iterator it = addresses.begin(); + TQStringList addresses( list ); + TQString addrSpec( KPIM::getEmailAddress( address ) ); + for ( TQStringList::Iterator it = addresses.begin(); it != addresses.end(); ) { if ( kasciistricmp( addrSpec.utf8().data(), KPIM::getEmailAddress( *it ).utf8().data() ) == 0 ) { @@ -3825,10 +3825,10 @@ QStringList KMMessage::stripAddressFromAddressList( const QString& address, //----------------------------------------------------------------------------- //static -QStringList KMMessage::stripMyAddressesFromAddressList( const QStringList& list ) +TQStringList KMMessage::stripMyAddressesFromAddressList( const TQStringList& list ) { - QStringList addresses = list; - for( QStringList::Iterator it = addresses.begin(); + TQStringList addresses = list; + for( TQStringList::Iterator it = addresses.begin(); it != addresses.end(); ) { kdDebug(5006) << "Check whether " << *it << " is one of my addresses" << endl; @@ -3846,11 +3846,11 @@ QStringList KMMessage::stripMyAddressesFromAddressList( const QStringList& list //----------------------------------------------------------------------------- //static -bool KMMessage::addressIsInAddressList( const QString& address, - const QStringList& addresses ) +bool KMMessage::addressIsInAddressList( const TQString& address, + const TQStringList& addresses ) { - QString addrSpec = KPIM::getEmailAddress( address ); - for( QStringList::ConstIterator it = addresses.begin(); + TQString addrSpec = KPIM::getEmailAddress( address ); + for( TQStringList::ConstIterator it = addresses.begin(); it != addresses.end(); ++it ) { if ( kasciistricmp( addrSpec.utf8().data(), KPIM::getEmailAddress( *it ).utf8().data() ) == 0 ) @@ -3862,29 +3862,29 @@ bool KMMessage::addressIsInAddressList( const QString& address, //----------------------------------------------------------------------------- //static -QString KMMessage::expandAliases( const QString& recipients ) +TQString KMMessage::expandAliases( const TQString& recipients ) { if ( recipients.isEmpty() ) - return QString(); + return TQString(); - QStringList recipientList = KPIM::splitEmailAddrList( recipients ); + TQStringList recipientList = KPIM::splitEmailAddrList( recipients ); - QString expandedRecipients; - for ( QStringList::Iterator it = recipientList.begin(); + TQString expandedRecipients; + for ( TQStringList::Iterator it = recipientList.begin(); it != recipientList.end(); ++it ) { if ( !expandedRecipients.isEmpty() ) expandedRecipients += ", "; - QString receiver = (*it).stripWhiteSpace(); + TQString receiver = (*it).stripWhiteSpace(); // try to expand distribution list - QString expandedList = KAddrBookExternal::expandDistributionList( receiver ); + TQString expandedList = KAddrBookExternal::expandDistributionList( receiver ); if ( !expandedList.isEmpty() ) { expandedRecipients += expandedList; continue; } // try to expand nick name - QString expandedNickName = KabcBridge::expandNickName( receiver ); + TQString expandedNickName = KabcBridge::expandNickName( receiver ); if ( !expandedNickName.isEmpty() ) { expandedRecipients += expandedNickName; continue; @@ -3894,7 +3894,7 @@ QString KMMessage::expandAliases( const QString& recipients ) // FIXME: looking for '@' might be wrong if ( receiver.find('@') == -1 ) { KConfigGroup general( KMKernel::config(), "General" ); - QString defaultdomain = general.readEntry( "Default domain" ); + TQString defaultdomain = general.readEntry( "Default domain" ); if( !defaultdomain.isEmpty() ) { expandedRecipients += receiver + "@" + defaultdomain; } @@ -3912,10 +3912,10 @@ QString KMMessage::expandAliases( const QString& recipients ) //----------------------------------------------------------------------------- //static -QString KMMessage::guessEmailAddressFromLoginName( const QString& loginName ) +TQString KMMessage::guessEmailAddressFromLoginName( const TQString& loginName ) { if ( loginName.isEmpty() ) - return QString(); + return TQString(); char hostnameC[256]; // null terminate this C string @@ -3923,15 +3923,15 @@ QString KMMessage::guessEmailAddressFromLoginName( const QString& loginName ) // set the string to 0 length if gethostname fails if ( gethostname( hostnameC, 255 ) ) hostnameC[0] = '\0'; - QString address = loginName; + TQString address = loginName; address += '@'; - address += QString::fromLocal8Bit( hostnameC ); + address += TQString::fromLocal8Bit( hostnameC ); // try to determine the real name const KUser user( loginName ); if ( user.isValid() ) { - QString fullName = user.fullName(); - if ( fullName.find( QRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) + TQString fullName = user.fullName(); + if ( fullName.find( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) address = '"' + fullName.replace( '\\', "\\" ).replace( '"', "\\" ) + "\" <" + address + '>'; else @@ -3954,7 +3954,7 @@ void KMMessage::readConfig() int languageNr = config->readNumEntry("reply-current-language",0); { // area for config group "KMMessage #n" - KConfigGroupSaver saver(config, QString("KMMessage #%1").arg(languageNr)); + KConfigGroupSaver saver(config, TQString("KMMessage #%1").arg(languageNr)); sReplyLanguage = config->readEntry("language",KGlobal::locale()->language()); sReplyStr = config->readEntry("phrase-reply", i18n("On %D, you wrote:")); @@ -3984,15 +3984,15 @@ void KMMessage::readConfig() } } -QCString KMMessage::defaultCharset() +TQCString KMMessage::defaultCharset() { - QCString retval; + TQCString retval; if (!sPrefCharsets.isEmpty()) retval = sPrefCharsets[0].latin1(); if (retval.isEmpty() || (retval == "locale")) { - retval = QCString(kmkernel->networkCodec()->mimeName()); + retval = TQCString(kmkernel->networkCodec()->mimeName()); KPIM::kAsciiToLower( retval.data() ); } @@ -4001,13 +4001,13 @@ QCString KMMessage::defaultCharset() return retval; } -const QStringList &KMMessage::preferredCharsets() +const TQStringList &KMMessage::preferredCharsets() { return sPrefCharsets; } //----------------------------------------------------------------------------- -QCString KMMessage::charset() const +TQCString KMMessage::charset() const { if ( mMsg->Headers().HasContentType() ) { DwMediaType &mType=mMsg->Headers().ContentType(); @@ -4023,7 +4023,7 @@ QCString KMMessage::charset() const } //----------------------------------------------------------------------------- -void KMMessage::setCharset(const QCString& bStr) +void KMMessage::setCharset(const TQCString& bStr) { kdWarning( type() != DwMime::kTypeText ) << "KMMessage::setCharset(): trying to set a charset for a non-textual mimetype." << endl @@ -4031,7 +4031,7 @@ void KMMessage::setCharset(const QCString& bStr) << "====================================================================" << endl << kdBacktrace( 5 ) << endl << "====================================================================" << endl; - QCString aStr = bStr; + TQCString aStr = bStr; KPIM::kAsciiToLower( aStr.data() ); DwMediaType &mType = dwContentType(); mType.Parse(); @@ -4095,14 +4095,14 @@ void KMMessage::link( const KMMessage *aMsg, KMMsgStatus aStatus ) || aStatus == KMMsgStatusForwarded || aStatus == KMMsgStatusDeleted ); - QString message = headerField( "X-KMail-Link-Message" ); + TQString message = headerField( "X-KMail-Link-Message" ); if ( !message.isEmpty() ) message += ','; - QString type = headerField( "X-KMail-Link-Type" ); + TQString type = headerField( "X-KMail-Link-Type" ); if ( !type.isEmpty() ) type += ','; - message += QString::number( aMsg->getMsgSerNum() ); + message += TQString::number( aMsg->getMsgSerNum() ); if ( aStatus == KMMsgStatusReplied ) type += "reply"; else if ( aStatus == KMMsgStatusForwarded ) @@ -4120,8 +4120,8 @@ void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgStatus *retStatus) cons *retMsgSerNum = 0; *retStatus = KMMsgStatusUnknown; - QString message = headerField("X-KMail-Link-Message"); - QString type = headerField("X-KMail-Link-Type"); + TQString message = headerField("X-KMail-Link-Message"); + TQString type = headerField("X-KMail-Link-Type"); message = message.section(',', n, n); type = type.section(',', n, n); @@ -4137,7 +4137,7 @@ void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgStatus *retStatus) cons } //----------------------------------------------------------------------------- -DwBodyPart* KMMessage::findDwBodyPart( DwBodyPart* part, const QString & partSpecifier ) +DwBodyPart* KMMessage::findDwBodyPart( DwBodyPart* part, const TQString & partSpecifier ) { if ( !part ) return 0; DwBodyPart* current; @@ -4169,7 +4169,7 @@ DwBodyPart* KMMessage::findDwBodyPart( DwBodyPart* part, const QString & partSpe } //----------------------------------------------------------------------------- -void KMMessage::updateBodyPart(const QString partSpecifier, const QByteArray & data) +void KMMessage::updateBodyPart(const TQString partSpecifier, const TQByteArray & data) { if ( !data.data() || !data.size() ) return; @@ -4179,7 +4179,7 @@ void KMMessage::updateBodyPart(const QString partSpecifier, const QByteArray & d partSpecifier != "0" && partSpecifier != "TEXT" ) { - QString specifier = partSpecifier; + TQString specifier = partSpecifier; if ( partSpecifier.endsWith(".HEADER") || partSpecifier.endsWith(".MIME") ) { // get the parent bodypart @@ -4213,7 +4213,7 @@ void KMMessage::updateBodyPart(const QString partSpecifier, const QByteArray & d } else { // update body mLastUpdated->Body().FromString( content ); - QString parentSpec = partSpecifier.section( '.', 0, -2 ); + TQString parentSpec = partSpecifier.section( '.', 0, -2 ); if ( !parentSpec.isEmpty() ) { DwBodyPart* parent = findDwBodyPart( getFirstDwBodyPart(), parentSpec ); @@ -4312,19 +4312,19 @@ void KMMessage::updateAttachmentState( DwBodyPart* part ) setStatus( KMMsgStatusHasNoAttach ); } -void KMMessage::setBodyFromUnicode( const QString & str ) { - QCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str ); +void KMMessage::setBodyFromUnicode( const TQString & str ) { + TQCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str ); if ( encoding.isEmpty() ) encoding = "utf-8"; - const QTextCodec * codec = KMMsgBase::codecForName( encoding ); + const TQTextCodec * codec = KMMsgBase::codecForName( encoding ); assert( codec ); - QValueList<int> dummy; + TQValueList<int> dummy; setCharset( encoding ); setBodyAndGuessCte( codec->fromUnicode( str ), dummy, false /* no 8bit */ ); } -const QTextCodec * KMMessage::codec() const { - const QTextCodec * c = mOverrideCodec; +const TQTextCodec * KMMessage::codec() const { + const TQTextCodec * c = mOverrideCodec; if ( !c ) // no override-codec set for this message, try the CT charset parameter: c = KMMsgBase::codecForName( charset() ); @@ -4341,7 +4341,7 @@ const QTextCodec * KMMessage::codec() const { return c; } -QString KMMessage::bodyToUnicode(const QTextCodec* codec) const { +TQString KMMessage::bodyToUnicode(const TQTextCodec* codec) const { if ( !codec ) // No codec was given, so try the charset in the mail codec = this->codec(); @@ -4351,12 +4351,12 @@ QString KMMessage::bodyToUnicode(const QTextCodec* codec) const { } //----------------------------------------------------------------------------- -QCString KMMessage::mboxMessageSeparator() +TQCString KMMessage::mboxMessageSeparator() { - QCString str( KPIM::getFirstEmailAddress( rawHeaderField("From") ) ); + TQCString str( KPIM::getFirstEmailAddress( rawHeaderField("From") ) ); if ( str.isEmpty() ) str = "unknown@unknown.invalid"; - QCString dateStr( dateShortStr() ); + TQCString dateStr( dateShortStr() ); if ( dateStr.isEmpty() ) { time_t t = ::time( 0 ); dateStr = ctime( &t ); diff --git a/kmail/kmmessage.h b/kmail/kmmessage.h index a19c9d510..f4353b836 100644 --- a/kmail/kmmessage.h +++ b/kmail/kmmessage.h @@ -40,8 +40,8 @@ namespace KMime { namespace Types { class AddrSpec; class Address; - typedef QValueList<Address> AddressList; - typedef QValueList<AddrSpec> AddrSpecList; + typedef TQValueList<Address> AddressList; + typedef TQValueList<AddrSpec> AddrSpecList; } } @@ -161,9 +161,9 @@ public: required header fields with the proper values. The returned message is not stored in any folder. Marks this message as replied. */ KMMessage* createReply( KMail::ReplyStrategy replyStrategy = KMail::ReplySmart, - QString selection=QString::null, bool noQuote=false, + TQString selection=TQString::null, bool noQuote=false, bool allowDecryption=true, bool selectionIsBody=false, - const QString &tmpl = QString::null ); + const TQString &tmpl = TQString::null ); /** Create a new message that is a redirect to this message, filling all required header fields with the proper values. The returned message @@ -172,15 +172,15 @@ public: user, mail is not changed and the reply-to field is set to the email address of the original sender */ - KMMessage* createRedirect( const QString &toStr ); + KMMessage* createRedirect( const TQString &toStr ); /** Create the forwarded body for the message. */ - QCString createForwardBody(); + TQCString createForwardBody(); /** Create a new message that is a forward of this message, filling all required header fields with the proper values. The returned message is not stored in any folder. Marks this message as forwarded. */ - KMMessage* createForward( const QString &tmpl = QString::null ); + KMMessage* createForward( const TQString &tmpl = TQString::null ); /** Create a new message that is a delivery receipt of this message, filling required header fileds with the proper values. The @@ -203,15 +203,15 @@ public: KMMessage* createMDN( KMime::MDN::ActionMode a, KMime::MDN::DispositionType d, bool allowGUI=false, - QValueList<KMime::MDN::DispositionModifier> m=QValueList<KMime::MDN::DispositionModifier>() ); + TQValueList<KMime::MDN::DispositionModifier> m=TQValueList<KMime::MDN::DispositionModifier>() ); /** Remove all headers but the content description ones, and those in the white list. */ - void sanitizeHeaders( const QStringList& whiteList = QStringList() ); + void sanitizeHeaders( const TQStringList& whiteList = TQStringList() ); /** Parse the string and create this message from it. */ void fromDwString(const DwString& str, bool setStatus=false); - void fromString(const QCString& str, bool setStatus=false); - void fromByteArray(const QByteArray & ba, bool setStatus=false); + void fromString(const TQCString& str, bool setStatus=false); + void fromByteArray(const TQByteArray & ba, bool setStatus=false); /** Return the entire message contents in the DwString. This function is *fast* even for large message since it does *not* involve a @@ -227,19 +227,19 @@ public: underlying mimelib, then you should use the asDwString function. @see asDwString */ - QCString asString() const; + TQCString asString() const; /** * Return the message contents with the headers that should not be * sent stripped off. */ - QByteArray asSendableString() const; + TQByteArray asSendableString() const; /** * Return the message header with the headers that should not be * sent stripped off. */ - QCString headerAsSendableString() const; + TQCString headerAsSendableString() const; /** * Remove all private header fields: *Status: and X-KMail-* @@ -250,15 +250,15 @@ public: DwMediaType& dwContentType(); /** Return header as string. */ - QString headerAsString() const; + TQString headerAsString() const; /** Returns a decoded body part string to be further processed by function asQuotedString(). THIS FUNCTION WILL BE REPLACED ONCE KMime IS FULLY INTEGRATED (khz, June 05 2002)*/ void parseTextStringFromDwPart( partNode * root, - QCString& parsedString, - const QTextCodec*& codec, + TQCString& parsedString, + const TQTextCodec*& codec, bool& isHTML ) const; /** Initialize header fields. Should be called on new messages @@ -293,78 +293,78 @@ public: void setAutomaticFields(bool isMultipart=false); /** Get or set the 'Date' header field */ - QString dateStr() const; + TQString dateStr() const; /** Returns the message date in asctime format or an empty string if the message lacks a Date header. */ - QCString dateShortStr() const; - QString dateIsoStr() const; + TQCString dateShortStr() const; + TQString dateIsoStr() const; time_t date() const; - void setDate(const QCString& str); + void setDate(const TQCString& str); void setDate(time_t aUnixTime); /** Set the 'Date' header field to the current date. */ void setDateToday(); /** Get or set the 'To' header field */ - QString to() const; - void setTo(const QString& aStr); - QString toStrip() const; + TQString to() const; + void setTo(const TQString& aStr); + TQString toStrip() const; /** Get or set the 'ReplyTo' header field */ - QString replyTo() const; - void setReplyTo( const QString &aStr ); + TQString replyTo() const; + void setReplyTo( const TQString &aStr ); void setReplyTo(KMMessage*); /** Get or set the 'Cc' header field */ - QString cc() const; - void setCc( const QString &aStr ); - QString ccStrip() const; + TQString cc() const; + void setCc( const TQString &aStr ); + TQString ccStrip() const; /** Get or set the 'Bcc' header field */ - QString bcc() const; - void setBcc( const QString &aStr ); + TQString bcc() const; + void setBcc( const TQString &aStr ); /** Get or set the 'Fcc' header field */ - QString fcc() const; - void setFcc( const QString &aStr ); + TQString fcc() const; + void setFcc( const TQString &aStr ); /** Get or set the 'Drafts' folder */ - QString drafts() const { return mDrafts; } - void setDrafts( const QString &aStr ); + TQString drafts() const { return mDrafts; } + void setDrafts( const TQString &aStr ); /** Get or set the 'Templates' folder */ - QString templates() const { return mTemplates; } - void setTemplates( const QString &aStr ); + TQString templates() const { return mTemplates; } + void setTemplates( const TQString &aStr ); /** Get or set the 'From' header field */ - QString from() const; - void setFrom(const QString& aStr); - QString fromStrip() const; + TQString from() const; + void setFrom(const TQString& aStr); + TQString fromStrip() const; /** @return The addr-spec of either the Sender: (if one is given) or * the first addr-spec in From: */ - QString sender() const; + TQString sender() const; /** Get or set the 'Who' header field. The actual field that is returned depends on the contents of the owning folders whoField(). Usually this is 'From', but it can also contain 'To'. */ - QString who() const; + TQString who() const; /** Get or set the 'Subject' header field */ - QString subject() const; - void setSubject(const QString& aStr); + TQString subject() const; + void setSubject(const TQString& aStr); /** Calculate strippedSubject */ void initStrippedSubjectMD5() {}; /** Get or set the 'X-Mark' header field */ - QString xmark() const; - void setXMark(const QString& aStr); + TQString xmark() const; + void setXMark(const TQString& aStr); /** Get or set the 'In-Reply-To' header field */ - QString replyToId() const; - void setReplyToId(const QString& aStr); - QString replyToIdMD5() const; + TQString replyToId() const; + void setReplyToId(const TQString& aStr); + TQString replyToIdMD5() const; /** Get the second to last id from the References header field. If outgoing messages are not kept in the same @@ -380,13 +380,13 @@ public: using replyToAuxIdMD5 */ - QString replyToAuxIdMD5() const; + TQString replyToAuxIdMD5() const; /** Get a hash of the subject with all prefixes such as Re: removed. Used for threading. */ - QString strippedSubjectMD5() const; + TQString strippedSubjectMD5() const; /** Validate a list of email addresses, and also allow @@ -398,29 +398,29 @@ public: requires moving expandAliases and all that it brings */ - static KPIM::EmailParseResult isValidEmailAddressList( const QString& aStr, - QString& brokenAddress ); + static KPIM::EmailParseResult isValidEmailAddressList( const TQString& aStr, + TQString& brokenAddress ); /** Get a hash of the subject. Used for threading. */ - QString subjectMD5() const; + TQString subjectMD5() const; /** Is the subject prefixed by Re: or similar? */ bool subjectIsPrefixed() const; /** Get or set the 'Message-Id' header field */ - QString msgId() const; - void setMsgId(const QString& aStr); - QString msgIdMD5() const; + TQString msgId() const; + void setMsgId(const TQString& aStr); + TQString msgIdMD5() const; /** Get or set the references for this message */ - QString references() const; - void setReferences(const QCString& aStr); + TQString references() const; + void setReferences(const TQCString& aStr); /** Returns the message ID, useful for followups */ - QCString id() const; + TQCString id() const; /** Sets the message serial number. If defaulted to zero, the serial number will be assigned using the dictionary. Note that @@ -432,7 +432,7 @@ public: header fields with the given name might exist then you should use headerFields() instead. */ - QString headerField(const QCString& name) const; + TQString headerField(const TQCString& name) const; enum HeaderFieldType { Unstructured, Structured, Address }; @@ -440,57 +440,57 @@ public: If prepend is set to true, the header is inserted at the beginning and does not overwrite an existing header field with the same name. */ - void setHeaderField( const QCString& name, const QString& value, + void setHeaderField( const TQCString& name, const TQString& value, HeaderFieldType type = Unstructured, bool prepend = false ); /** Returns a list of the values of all header fields with the given name. */ - QStringList headerFields( const QCString& name ) const; + TQStringList headerFields( const TQCString& name ) const; /** Returns the raw value of a header field with the given name. If multiple header fields with the given name might exist then you should use rawHeaderFields() instead. */ - QCString rawHeaderField( const QCString & name ) const; + TQCString rawHeaderField( const TQCString & name ) const; /** Returns a list of the raw values of all header fields with the given name. */ - QValueList<QCString> rawHeaderFields( const QCString & field ) const; + TQValueList<TQCString> rawHeaderFields( const TQCString & field ) const; /** Splits the given address list into separate addresses. */ - static KMime::Types::AddressList splitAddrField( const QCString & str ); + static KMime::Types::AddressList splitAddrField( const TQCString & str ); /** Returns header address list as string list. Valid for the following fields: To, Bcc, Cc, ReplyTo, ResentBcc, ResentCc, ResentReplyTo, ResentTo */ - KMime::Types::AddressList headerAddrField(const QCString& name) const; - KMime::Types::AddrSpecList extractAddrSpecs( const QCString & headerNames ) const; + KMime::Types::AddressList headerAddrField(const TQCString& name) const; + KMime::Types::AddrSpecList extractAddrSpecs( const TQCString & headerNames ) const; /** Remove header field with given name */ - void removeHeaderField(const QCString& name); + void removeHeaderField(const TQCString& name); /** Remove all header fields with given name */ - void removeHeaderFields(const QCString& name); + void removeHeaderFields(const TQCString& name); /** Get or set the 'Content-Type' header field The member functions that involve enumerated types (ints) will work only for well-known types or subtypes. */ - QCString typeStr() const; + TQCString typeStr() const; int type() const; - void setTypeStr(const QCString& aStr); + void setTypeStr(const TQCString& aStr); void setType(int aType); /** Subtype */ - QCString subtypeStr() const; + TQCString subtypeStr() const; int subtype() const; - void setSubtypeStr(const QCString& aStr); + void setSubtypeStr(const TQCString& aStr); void setSubtype(int aSubtype); /** add or change a parameter of a DwMediaType field */ static void setDwMediaTypeParam( DwMediaType &mType, - const QCString& attr, - const QCString& val ); + const TQCString& attr, + const TQCString& val ); /** add or change a parameter of the Content-Type field */ - void setContentTypeParam(const QCString& attr, const QCString& val); + void setContentTypeParam(const TQCString& attr, const TQCString& val); /** get the DwHeaders (make sure to call setNeedsAssembly() function after directly @@ -506,48 +506,48 @@ public: /** Get or set the 'Content-Transfer-Encoding' header field The member functions that involve enumerated types (ints) will work only for well-known encodings. */ - QCString contentTransferEncodingStr() const; + TQCString contentTransferEncodingStr() const; int contentTransferEncoding() const; - void setContentTransferEncodingStr(const QCString& aStr); + void setContentTransferEncodingStr(const TQCString& aStr); void setContentTransferEncoding(int aCte); /** Cte is short for ContentTransferEncoding. These functions are an alternative to the ones with longer names. */ - QCString cteStr() const { return contentTransferEncodingStr(); } + TQCString cteStr() const { return contentTransferEncodingStr(); } int cte() const { return contentTransferEncoding(); } - void setCteStr(const QCString& aStr) { setContentTransferEncodingStr(aStr); } + void setCteStr(const TQCString& aStr) { setContentTransferEncodingStr(aStr); } void setCte(int aCte) { setContentTransferEncoding(aCte); } /** Sets this body part's content to @p str. @p str is subject to automatic charset and CTE detection. **/ - void setBodyFromUnicode( const QString & str ); + void setBodyFromUnicode( const TQString & str ); /** Returns the body part decoded to unicode. **/ - QString bodyToUnicode(const QTextCodec* codec=0) const; + TQString bodyToUnicode(const TQTextCodec* codec=0) const; /** Get the message body. Does not decode the body. */ - QCString body() const; + TQCString body() const; /** Set the message body. Does not encode the body. */ - void setBody(const QCString& aStr); + void setBody(const TQCString& aStr); void setBody(const DwString& aStr); void setBody(const char* aStr); // avoid ambiguous calls /** Hack to enable structured body parts to be set as flat text... */ - void setMultiPartBody( const QCString & aStr ); + void setMultiPartBody( const TQCString & aStr ); /** Set the message body, encoding it according to the current content transfer encoding. The first method for null terminated strings, the second for binary data */ - void setBodyEncoded(const QCString& aStr); - void setBodyEncodedBinary(const QByteArray& aStr); + void setBodyEncoded(const TQCString& aStr); + void setBodyEncodedBinary(const TQByteArray& aStr); /** Returns a list of content-transfer-encodings that can be used with the given result of the character frequency analysis of a message or message part under the given restrictions. */ - static QValueList<int> determineAllowedCtes( const KMime::CharFreq& cf, + static TQValueList<int> determineAllowedCtes( const KMime::CharFreq& cf, bool allow8Bit, bool willBeSigned ); @@ -560,20 +560,20 @@ public: @param allow8Bit whether "8bit" is allowed as cte. @param willBeSigned whether "7bit"/"8bit" is allowed as cte according to RFC 3156 */ - void setBodyAndGuessCte( const QByteArray& aBuf, - QValueList<int>& allowedCte, + void setBodyAndGuessCte( const TQByteArray& aBuf, + TQValueList<int>& allowedCte, bool allow8Bit = false, bool willBeSigned = false ); - void setBodyAndGuessCte( const QCString& aBuf, - QValueList<int>& allowedCte, + void setBodyAndGuessCte( const TQCString& aBuf, + TQValueList<int>& allowedCte, bool allow8Bit = false, bool willBeSigned = false ); /** Returns a decoded version of the body from the current content transfer encoding. The first method returns a null terminated string, the second method is meant for binary data, not null is appended */ - QCString bodyDecoded() const; - QByteArray bodyDecodedBinary() const; + TQCString bodyDecoded() const; + TQByteArray bodyDecodedBinary() const; /** Number of body parts the message has. This is one for plain messages without any attachment. */ @@ -585,11 +585,11 @@ public: /** Return the first DwBodyPart matching a given Content-Type or zero, if no found. */ - DwBodyPart * findDwBodyPart( const QCString& type, const QCString& subtype ) const; + DwBodyPart * findDwBodyPart( const TQCString& type, const TQCString& subtype ) const; /** Return the first DwBodyPart matching a given partSpecifier or zero, if no found. */ - DwBodyPart* findDwBodyPart( DwBodyPart* part, const QString & partSpecifier ); + DwBodyPart* findDwBodyPart( DwBodyPart* part, const TQString & partSpecifier ); /** Get the DwBodyPart at position in aIdx. Indexing starts at 0. If there is no body part at that index, return value will be zero. */ @@ -635,22 +635,22 @@ public: * defined by the user or the given email address as suffix. The address * must be given as addr-spec as defined in RFC 2822. */ - static QString generateMessageId( const QString& addr ); + static TQString generateMessageId( const TQString& addr ); /** Convert '<' into "<" resp. '>' into ">" in order to * prevent their interpretation by KHTML. * Does *not* use the Qt replace function but runs a very fast C code * the same way as lf2crlf() does. */ - static QCString html2source( const QCString & src ); + static TQCString html2source( const TQCString & src ); /** Encodes an email address as mailto URL */ - static QString encodeMailtoUrl( const QString& str ); + static TQString encodeMailtoUrl( const TQString& str ); /** Decodes a mailto URL */ - static QString decodeMailtoUrl( const QString& url ); + static TQString decodeMailtoUrl( const TQString& url ); /** This function generates a displayable string from a list of email addresses. @@ -658,52 +658,52 @@ public: Output: comma separated list of display name resp. comment resp. address */ - static QCString stripEmailAddr(const QCString& emailAddr); + static TQCString stripEmailAddr(const TQCString& emailAddr); /** Does the same as the above function. Shouldn't be used. */ - static QString stripEmailAddr(const QString& emailAddr); + static TQString stripEmailAddr(const TQString& emailAddr); /** Quotes the following characters which have a special meaning in HTML: * '<' '>' '&' '"'. Additionally '\\n' is converted to "<br />" if * @p removeLineBreaks is false. If @p removeLineBreaks is true, then * '\\n' is removed. Last but not least '\\r' is removed. */ - static QString quoteHtmlChars( const QString& str, + static TQString quoteHtmlChars( const TQString& str, bool removeLineBreaks = false ); /** Converts the email address(es) to (a) nice HTML mailto: anchor(s). * If stripped is TRUE then the visible part of the anchor contains * only the name part and not the given emailAddr. */ - static QString emailAddrAsAnchor(const QString& emailAddr, - bool stripped=true, const QString& cssStyle = QString::null, bool link = true); + static TQString emailAddrAsAnchor(const TQString& emailAddr, + bool stripped=true, const TQString& cssStyle = TQString::null, bool link = true); /** Strips an address from an address list. This is for example used when replying to all. */ - static QStringList stripAddressFromAddressList( const QString& address, - const QStringList& addresses ); + static TQStringList stripAddressFromAddressList( const TQString& address, + const TQStringList& addresses ); /** Strips all the user's addresses from an address list. This is used when replying. */ - static QStringList stripMyAddressesFromAddressList( const QStringList& list ); + static TQStringList stripMyAddressesFromAddressList( const TQStringList& list ); /** Returns true if the given address is contained in the given address list. */ - static bool addressIsInAddressList( const QString& address, - const QStringList& addresses ); + static bool addressIsInAddressList( const TQString& address, + const TQStringList& addresses ); /** Expands aliases (distribution lists and nick names) and appends a domain part to all email addresses which are missing the domain part. */ - static QString expandAliases( const QString& recipients ); + static TQString expandAliases( const TQString& recipients ); /** Uses the hostname as domain part and tries to determine the real name from the entries in the password file. */ - static QString guessEmailAddressFromLoginName( const QString& userName ); + static TQString guessEmailAddressFromLoginName( const TQString& userName ); /** * Given argument msg add quoting characters and relayout for max width maxLength @@ -711,28 +711,28 @@ public: * @param maxLineLength reformat text to be this amount of columns at maximum, adding * linefeeds at word boundaries to make it fit. */ - static QString smartQuote( const QString &msg, int maxLineLength ); + static TQString smartQuote( const TQString &msg, int maxLineLength ); /** Get the default message charset.*/ - static QCString defaultCharset(); + static TQCString defaultCharset(); /** Get a list of preferred message charsets.*/ - static const QStringList &preferredCharsets(); + static const TQStringList &preferredCharsets(); /** Replaces every occurrence of "${foo}" in @p s with headerField("foo") */ - QString replaceHeadersInString( const QString & s ) const; + TQString replaceHeadersInString( const TQString & s ) const; /** Get the message charset.*/ - QCString charset() const; + TQCString charset() const; /** Set the message charset. */ - void setCharset(const QCString& aStr); + void setCharset(const TQCString& aStr); - /** Get a QTextCodec suitable for this message part */ - const QTextCodec * codec() const; + /** Get a TQTextCodec suitable for this message part */ + const TQTextCodec * codec() const; /** Set the charset the user selected for the message to display */ - void setOverrideCodec( const QTextCodec* codec ) { mOverrideCodec = codec; } + void setOverrideCodec( const TQTextCodec* codec ) { mOverrideCodec = codec; } /** Allow decoding of HTML for quoting */ void setDecodeHTML(bool aDecodeHTML) @@ -745,15 +745,15 @@ public: /** Creates reference string for reply to messages. * reference = original first reference + original last reference + original msg-id */ - QCString getRefStr() const; + TQCString getRefStr() const; /** Get/set offset in mail folder. */ off_t folderOffset() const { return mFolderOffset; } void setFolderOffset(off_t offs) { if(mFolderOffset != offs) { mFolderOffset=offs; setDirty(true); } } /** Get/set filename in mail folder. */ - QString fileName() const { return mFileName; } - void setFileName(const QString& file) { if(mFileName != file) { mFileName=file; setDirty(true); } } + TQString fileName() const { return mFileName; } + void setFileName(const TQString& file) { if(mFileName != file) { mFileName=file; setDirty(true); } } /** Get/set size of message in the folder including the whole header in bytes. Can be 0, if the message is not in a folder. @@ -804,10 +804,10 @@ public: void getLink(int n, ulong *retMsgSerNum, KMMsgStatus *retStatus) const; /** Convert wildcards into normal string */ - QString formatString(const QString&) const; + TQString formatString(const TQString&) const; /** Sets the body of the specified part */ - void updateBodyPart(const QString partSpecifier, const QByteArray & data); + void updateBodyPart(const TQString partSpecifier, const TQByteArray & data); /** Returns the last DwBodyPart that was updated */ DwBodyPart* lastUpdatedPart() { return mLastUpdated; } @@ -833,7 +833,7 @@ public: string of the form "From local@domain.invalid Sat Jun 12 14:00:00 2004\n". */ - QCString mboxMessageSeparator(); + TQCString mboxMessageSeparator(); /** Returns message body with quoting header and indented by the given indentation string. This is suitable for including the message @@ -850,15 +850,15 @@ public: The signature is stripped if aStripSignature is true and smart quoting is turned on. Signed or encrypted texts get converted to plain text when allowDecryption is true. */ - QString asQuotedString( const QString & headerStr, - const QString & indentStr, - const QString & selection=QString::null, + TQString asQuotedString( const TQString & headerStr, + const TQString & indentStr, + const TQString & selection=TQString::null, bool aStripSignature=true, bool allowDecryption=true) const; /** Return the textual content of the message as plain text, converting HTML to plain text if necessary. */ - QString asPlainText( bool stripSignature, bool allowDecryption ) const; + TQString asPlainText( bool stripSignature, bool allowDecryption ) const; /** Get stored cursor position */ int getCursorPos() { return mCursorPos; }; @@ -886,8 +886,8 @@ private: /** Assign the values of @param other to this message. Used in the copy c'tor. */ void assign( const KMMessage& other ); - QString mDrafts; - QString mTemplates; + TQString mDrafts; + TQString mTemplates; mutable DwMessage* mMsg; mutable bool mNeedsAssembly :1; bool mDecodeHTML :1; @@ -895,10 +895,10 @@ private: bool mComplete :1; bool mIsParsed : 1; static const KMail::HeaderStrategy * sHeaderStrategy; - static QString sForwardStr; - const QTextCodec * mOverrideCodec; + static TQString sForwardStr; + const TQTextCodec * mOverrideCodec; - QString mFileName; + TQString mFileName; off_t mFolderOffset; size_t mMsgSize, mMsgLength; time_t mDate; @@ -909,7 +909,7 @@ private: DwBodyPart* mLastUpdated; int mCursorPos; KMMsgInfo* mMsgInfo; // used to remember the KMMsgInfo object this KMMessage replaced in the KMMsgList - static QValueList<KMMessage*> sPendingDeletes; + static TQValueList<KMMessage*> sPendingDeletes; }; diff --git a/kmail/kmmimeparttree.cpp b/kmail/kmmimeparttree.cpp index 606b6891d..1d32a56e8 100644 --- a/kmail/kmmimeparttree.cpp +++ b/kmail/kmmimeparttree.cpp @@ -46,16 +46,16 @@ #include <kmessagebox.h> #include <kiconloader.h> -#include <qclipboard.h> -#include <qheader.h> -#include <qpopupmenu.h> -#include <qstyle.h> +#include <tqclipboard.h> +#include <tqheader.h> +#include <tqpopupmenu.h> +#include <tqstyle.h> #include <kurldrag.h> #include <kurl.h> KMMimePartTree::KMMimePartTree( KMReaderWin* readerWin, - QWidget* parent, + TQWidget* parent, const char* name ) : KListView( parent, name ), mReaderWin( readerWin ), mSizeColumn(0) @@ -68,12 +68,12 @@ KMMimePartTree::KMMimePartTree( KMReaderWin* readerWin, setColumnAlignment( 3, Qt::AlignRight ); restoreLayoutIfPresent(); - connect( this, SIGNAL( clicked( QListViewItem* ) ), - this, SLOT( itemClicked( QListViewItem* ) ) ); - connect( this, SIGNAL( contextMenuRequested( QListViewItem*, - const QPoint&, int ) ), - this, SLOT( itemRightClicked( QListViewItem*, const QPoint& ) ) ); - setSelectionMode( QListView::Extended ); + connect( this, TQT_SIGNAL( clicked( TQListViewItem* ) ), + this, TQT_SLOT( itemClicked( TQListViewItem* ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, + const TQPoint&, int ) ), + this, TQT_SLOT( itemRightClicked( TQListViewItem*, const TQPoint& ) ) ); + setSelectionMode( TQListView::Extended ); setRootIsDecorated( false ); setAllColumnsShowFocus( true ); setShowToolTips( true ); @@ -108,7 +108,7 @@ void KMMimePartTree::restoreLayoutIfPresent() { } -void KMMimePartTree::itemClicked( QListViewItem* item ) +void KMMimePartTree::itemClicked( TQListViewItem* item ) { if ( const KMMimePartTreeItem * i = dynamic_cast<KMMimePartTreeItem*>( item ) ) { if( mReaderWin->mRootNode == i->node() ) @@ -120,8 +120,8 @@ void KMMimePartTree::itemClicked( QListViewItem* item ) } -void KMMimePartTree::itemRightClicked( QListViewItem* item, - const QPoint& point ) +void KMMimePartTree::itemRightClicked( TQListViewItem* item, + const TQPoint& point ) { // TODO: remove this member var? mCurrentContextMenuItem = dynamic_cast<KMMimePartTreeItem*>( item ); @@ -131,34 +131,34 @@ void KMMimePartTree::itemRightClicked( QListViewItem* item, else { kdDebug(5006) << "\n**\n** KMMimePartTree::itemRightClicked() **\n**" << endl; - QPopupMenu* popup = new QPopupMenu; + TQPopupMenu* popup = new QPopupMenu; if ( mCurrentContextMenuItem->node()->nodeId() > 2 && mCurrentContextMenuItem->node()->typeString() != "Multipart" ) { - popup->insertItem( SmallIcon("fileopen"), i18n("to open", "Open"), this, SLOT(slotOpen()) ); - popup->insertItem( i18n("Open With..."), this, SLOT(slotOpenWith()) ); - popup->insertItem( i18n("to view something", "View"), this, SLOT(slotView()) ); + popup->insertItem( SmallIcon("fileopen"), i18n("to open", "Open"), this, TQT_SLOT(slotOpen()) ); + popup->insertItem( i18n("Open With..."), this, TQT_SLOT(slotOpenWith()) ); + popup->insertItem( i18n("to view something", "View"), this, TQT_SLOT(slotView()) ); } - popup->insertItem( SmallIcon("filesaveas"),i18n( "Save &As..." ), this, SLOT( slotSaveAs() ) ); + popup->insertItem( SmallIcon("filesaveas"),i18n( "Save &As..." ), this, TQT_SLOT( slotSaveAs() ) ); /* * FIXME mkae optional? popup->insertItem( i18n( "Save as &Encoded..." ), this, - SLOT( slotSaveAsEncoded() ) ); + TQT_SLOT( slotSaveAsEncoded() ) ); */ popup->insertItem( i18n( "Save All Attachments..." ), this, - SLOT( slotSaveAll() ) ); + TQT_SLOT( slotSaveAll() ) ); // edit + delete only for attachments if ( mCurrentContextMenuItem->node()->nodeId() > 2 && mCurrentContextMenuItem->node()->typeString() != "Multipart" ) { - popup->insertItem( SmallIcon("editcopy"), i18n("Copy"), this, SLOT(slotCopy()) ); + popup->insertItem( SmallIcon("editcopy"), i18n("Copy"), this, TQT_SLOT(slotCopy()) ); if ( GlobalSettings::self()->allowAttachmentDeletion() ) popup->insertItem( SmallIcon("editdelete"), i18n( "Delete Attachment" ), - this, SLOT( slotDelete() ) ); + this, TQT_SLOT( slotDelete() ) ); if ( GlobalSettings::self()->allowAttachmentEditing() ) popup->insertItem( SmallIcon( "edit" ), i18n( "Edit Attachment" ), - this, SLOT( slotEdit() ) ); + this, TQT_SLOT( slotEdit() ) ); } if ( mCurrentContextMenuItem->node()->nodeId() > 0 ) - popup->insertItem( i18n("Properties"), this, SLOT(slotProperties()) ); + popup->insertItem( i18n("Properties"), this, TQT_SLOT(slotProperties()) ); popup->exec( point ); delete popup; mCurrentContextMenuItem = 0; @@ -180,14 +180,14 @@ void KMMimePartTree::slotSaveAsEncoded() //----------------------------------------------------------------------------- void KMMimePartTree::saveSelectedBodyParts( bool encoded ) { - QPtrList<QListViewItem> selected = selectedItems(); + TQPtrList<TQListViewItem> selected = selectedItems(); Q_ASSERT( !selected.isEmpty() ); if ( selected.isEmpty() ) return; - QPtrListIterator<QListViewItem> it( selected ); - QPtrList<partNode> parts; + TQPtrListIterator<TQListViewItem> it( selected ); + TQPtrList<partNode> parts; while ( it.current() ) { parts.append( static_cast<KMMimePartTreeItem *>(it.current())->node() ); ++it; @@ -216,9 +216,9 @@ void KMMimePartTree::setStyleDependantFrameWidth() // set the width of the frame to a reasonable value for the current GUI style int frameWidth; if( style().isA("KeramikStyle") ) - frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1; + frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1; else - frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ); + frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ); if ( frameWidth < 0 ) frameWidth = 0; if ( frameWidth != lineWidth() ) @@ -227,19 +227,19 @@ void KMMimePartTree::setStyleDependantFrameWidth() //----------------------------------------------------------------------------- -void KMMimePartTree::styleChange( QStyle& oldStyle ) +void KMMimePartTree::styleChange( TQStyle& oldStyle ) { setStyleDependantFrameWidth(); KListView::styleChange( oldStyle ); } //----------------------------------------------------------------------------- -void KMMimePartTree::correctSize( QListViewItem * item ) +void KMMimePartTree::correctSize( TQListViewItem * item ) { if (!item) return; KIO::filesize_t totalSize = 0; - QListViewItem * myChild = item->firstChild(); + TQListViewItem * myChild = item->firstChild(); while ( myChild ) { totalSize += static_cast<KMMimePartTreeItem*>(myChild)->origSize(); @@ -253,7 +253,7 @@ void KMMimePartTree::correctSize( QListViewItem * item ) void KMMimePartTree::slotDelete() { - QPtrList<QListViewItem> selected = selectedItems(); + TQPtrList<TQListViewItem> selected = selectedItems(); if ( selected.count() != 1 ) return; mReaderWin->slotDeleteAttachment( static_cast<KMMimePartTreeItem*>( selected.first() )->node() ); @@ -261,7 +261,7 @@ void KMMimePartTree::slotDelete() void KMMimePartTree::slotEdit() { - QPtrList<QListViewItem> selected = selectedItems(); + TQPtrList<TQListViewItem> selected = selectedItems(); if ( selected.count() != 1 ) return; mReaderWin->slotEditAttachment( static_cast<KMMimePartTreeItem*>( selected.first() )->node() ); @@ -289,16 +289,16 @@ void KMMimePartTree::slotProperties() void KMMimePartTree::startHandleAttachmentCommand(int type) { - QPtrList<QListViewItem> selected = selectedItems(); + TQPtrList<TQListViewItem> selected = selectedItems(); if ( selected.count() != 1 ) return; partNode* node = static_cast<KMMimePartTreeItem*>( selected.first() )->node(); - QString name = mReaderWin->tempFileUrlFromPartNode( node ).path(); + TQString name = mReaderWin->tempFileUrlFromPartNode( node ).path(); KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand( node, mReaderWin->message(), node->nodeId(), name, KMHandleAttachmentCommand::AttachmentAction( type ), 0, this ); - connect( command, SIGNAL( showAttachment( int, const QString& ) ), - mReaderWin, SLOT( slotAtmView( int, const QString& ) ) ); + connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ), + mReaderWin, TQT_SLOT( slotAtmView( int, const TQString& ) ) ); command->start(); } @@ -311,18 +311,18 @@ void KMMimePartTree::slotCopy() if ( !url.isValid() ) return; urls.append( url ); KURLDrag* drag = new KURLDrag( urls, this ); - QApplication::clipboard()->setData( drag, QClipboard::Clipboard ); + TQApplication::clipboard()->setData( drag, QClipboard::Clipboard ); } //============================================================================= KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTree * parent, partNode* node, - const QString & description, - const QString & mimetype, - const QString & encoding, + const TQString & description, + const TQString & mimetype, + const TQString & encoding, KIO::filesize_t size ) - : QListViewItem( parent, description, - QString::null, // set by setIconAndTextForType() + : TQListViewItem( parent, description, + TQString::null, // set by setIconAndTextForType() encoding, KIO::convertSize( size ) ), mPartNode( node ), mOrigSize(size) @@ -336,19 +336,19 @@ KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTree * parent, KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTreeItem * parent, partNode* node, - const QString & description, - const QString & mimetype, - const QString & encoding, + const TQString & description, + const TQString & mimetype, + const TQString & encoding, KIO::filesize_t size, bool revertOrder ) - : QListViewItem( parent, description, - QString::null, // set by setIconAndTextForType() + : TQListViewItem( parent, description, + TQString::null, // set by setIconAndTextForType() encoding, KIO::convertSize( size ) ), mPartNode( node ), mOrigSize(size) { if( revertOrder && nextSibling() ){ - QListViewItem* sib = nextSibling(); + TQListViewItem* sib = nextSibling(); while( sib->nextSibling() ) sib = sib->nextSibling(); moveItem( sib ); @@ -360,9 +360,9 @@ KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTreeItem * parent, static_cast<KMMimePartTree*>(listView())->correctSize(this); } -void KMMimePartTreeItem::setIconAndTextForType( const QString & mime ) +void KMMimePartTreeItem::setIconAndTextForType( const TQString & mime ) { - QString mimetype = mime.lower(); + TQString mimetype = mime.lower(); if ( mimetype.startsWith( "multipart/" ) ) { setText( 1, mimetype ); setPixmap( 0, SmallIcon("folder") ); diff --git a/kmail/kmmimeparttree.h b/kmail/kmmimeparttree.h index fe33c1f63..a2e4370a6 100644 --- a/kmail/kmmimeparttree.h +++ b/kmail/kmmimeparttree.h @@ -38,7 +38,7 @@ #include <klistview.h> #include <kio/global.h> -#include <qstring.h> +#include <tqstring.h> class partNode; class KMReaderWin; @@ -51,15 +51,15 @@ class KMMimePartTree : public KListView public: KMMimePartTree( KMReaderWin* readerWin, - QWidget* parent, + TQWidget* parent, const char* name = 0 ); virtual ~KMMimePartTree(); - void correctSize( QListViewItem * item ); + void correctSize( TQListViewItem * item ); protected slots: - void itemClicked( QListViewItem* ); - void itemRightClicked( QListViewItem*, const QPoint& ); + void itemClicked( TQListViewItem* ); + void itemRightClicked( TQListViewItem*, const TQPoint& ); void slotSaveAs(); void slotSaveAsEncoded(); void slotSaveAll(); @@ -74,7 +74,7 @@ protected slots: protected: /** reimplemented in order to update the frame width in case of a changed GUI style */ - void styleChange( QStyle& oldStyle ); + void styleChange( TQStyle& oldStyle ); /** Set the width of the frame to a reasonable value for the current GUI style */ @@ -99,15 +99,15 @@ class KMMimePartTreeItem :public QListViewItem public: KMMimePartTreeItem( KMMimePartTree * parent, partNode* node, - const QString & labelDescr, - const QString & labelCntType = QString::null, - const QString & labelEncoding = QString::null, + const TQString & labelDescr, + const TQString & labelCntType = TQString::null, + const TQString & labelEncoding = TQString::null, KIO::filesize_t size=0 ); KMMimePartTreeItem( KMMimePartTreeItem * parent, partNode* node, - const QString & labelDescr, - const QString & labelCntType = QString::null, - const QString & labelEncoding = QString::null, + const TQString & labelDescr, + const TQString & labelCntType = TQString::null, + const TQString & labelEncoding = TQString::null, KIO::filesize_t size=0, bool revertOrder = false ); partNode* node() const { return mPartNode; } @@ -116,7 +116,7 @@ public: void setOrigSize( KIO::filesize_t size ) { mOrigSize = size; } private: - void setIconAndTextForType( const QString & mimetype ); + void setIconAndTextForType( const TQString & mimetype ); partNode* mPartNode; KIO::filesize_t mOrigSize; diff --git a/kmail/kmmsgbase.cpp b/kmail/kmmsgbase.cpp index 00c7e5761..df53e6e57 100644 --- a/kmail/kmmsgbase.cpp +++ b/kmail/kmmsgbase.cpp @@ -22,9 +22,9 @@ using KMail::MessageProperty; #include <mimelib/mimepp.h> #include <kmime_codecs.h> -#include <qtextcodec.h> -#include <qdeepcopy.h> -#include <qregexp.h> +#include <tqtextcodec.h> +#include <tqdeepcopy.h> +#include <tqregexp.h> #include <ctype.h> #include <stdlib.h> @@ -305,7 +305,7 @@ void KMMsgBase::setEncryptionState( const KMMsgEncryptionState /*status*/, int i storage()->headerOfMsgChanged(this, idx); } -void KMMsgBase::setEncryptionStateChar( QChar status, int idx ) +void KMMsgBase::setEncryptionStateChar( TQChar status, int idx ) { //kdDebug(5006) << "***setEncryptionState2( " << (status.isNull() ? '?' : status.latin1()) << " )" << endl; @@ -336,7 +336,7 @@ void KMMsgBase::setMDNSentState( KMMsgMDNSentState, int idx ) { storage()->headerOfMsgChanged(this, idx); } -void KMMsgBase::setSignatureStateChar( QChar status, int idx ) +void KMMsgBase::setSignatureStateChar( TQChar status, int idx ) { //kdDebug(5006) << "***setSignatureState2( " << (status.isNull() ? '?' : status.latin1()) << " )" << endl; @@ -465,9 +465,9 @@ bool KMMsgBase::isHam(void) const } //----------------------------------------------------------------------------- -QCString KMMsgBase::statusToStr(const KMMsgStatus status) +TQCString KMMsgBase::statusToStr(const KMMsgStatus status) { - QCString sstr; + TQCString sstr; if (status & KMMsgStatusNew) sstr += 'N'; if (status & KMMsgStatusUnread) sstr += 'U'; if (status & KMMsgStatusOld) sstr += 'O'; @@ -490,9 +490,9 @@ QCString KMMsgBase::statusToStr(const KMMsgStatus status) } //----------------------------------------------------------------------------- -QString KMMsgBase::statusToSortRank() +TQString KMMsgBase::statusToSortRank() { - QString sstr = "bcbbbbbbbb"; + TQString sstr = "bcbbbbbbbb"; // put watched ones first, then normal ones, ignored ones last if (status() & KMMsgStatusWatched) sstr[0] = 'a'; @@ -520,14 +520,14 @@ QString KMMsgBase::statusToSortRank() //----------------------------------------------------------------------------- -void KMMsgBase::setDate(const QCString& aDateStr) +void KMMsgBase::setDate(const TQCString& aDateStr) { setDate( KRFCDate::parseDate( aDateStr ) ); } //----------------------------------------------------------------------------- -QString KMMsgBase::dateStr(void) const +TQString KMMsgBase::dateStr(void) const { time_t d = date(); return KMime::DateFormatter::formatDate(KMime::DateFormatter::Fancy, d); @@ -535,11 +535,11 @@ QString KMMsgBase::dateStr(void) const //----------------------------------------------------------------------------- -QString KMMsgBase::skipKeyword(const QString& aStr, QChar sepChar, +TQString KMMsgBase::skipKeyword(const TQString& aStr, TQChar sepChar, bool* hasKeyword) { unsigned int i = 0, maxChars = 3; - QString str = aStr; + TQString str = aStr; while (str[0] == ' ') str.remove(0,1); if (hasKeyword) *hasKeyword=false; @@ -563,20 +563,20 @@ QString KMMsgBase::skipKeyword(const QString& aStr, QChar sepChar, //----------------------------------------------------------------------------- -const QTextCodec* KMMsgBase::codecForName(const QCString& _str) +const TQTextCodec* KMMsgBase::codecForName(const TQCString& _str) { if (_str.isEmpty()) return 0; - QCString codec = _str; + TQCString codec = _str; KPIM::kAsciiToLower(codec.data()); return KGlobal::charsets()->codecForName(codec); } //----------------------------------------------------------------------------- -QCString KMMsgBase::toUsAscii(const QString& _str, bool *ok) +TQCString KMMsgBase::toUsAscii(const TQString& _str, bool *ok) { bool all_ok =true; - QString result = _str; + TQString result = _str; int len = result.length(); for (int i = 0; i < len; i++) if (result.at(i).unicode() >= 128) { @@ -590,16 +590,16 @@ QCString KMMsgBase::toUsAscii(const QString& _str, bool *ok) //----------------------------------------------------------------------------- -QStringList KMMsgBase::supportedEncodings(bool usAscii) +TQStringList KMMsgBase::supportedEncodings(bool usAscii) { - QStringList encodingNames = KGlobal::charsets()->availableEncodingNames(); - QStringList encodings; - QMap<QString,bool> mimeNames; - for (QStringList::Iterator it = encodingNames.begin(); + TQStringList encodingNames = KGlobal::charsets()->availableEncodingNames(); + TQStringList encodings; + TQMap<TQString,bool> mimeNames; + for (TQStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); it++) { - QTextCodec *codec = KGlobal::charsets()->codecForName(*it); - QString mimeName = (codec) ? QString(codec->mimeName()).lower() : (*it); + TQTextCodec *codec = KGlobal::charsets()->codecForName(*it); + TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it); if (mimeNames.find(mimeName) == mimeNames.end()) { encodings.append(KGlobal::charsets()->languageForEncoding(*it) @@ -620,11 +620,11 @@ namespace { // it's definition... inline bool isBlank( char ch ) { return ch == ' ' || ch == '\t' ; } - QCString unfold( const QCString & header ) { + TQCString unfold( const TQCString & header ) { if ( header.isEmpty() ) - return QCString(); + return TQCString(); - QCString result( header.size() ); // size() >= length()+1 and size() is O(1) + TQCString result( header.size() ); // size() >= length()+1 and size() is O(1) char * d = result.data(); for ( const char * s = header.data() ; *s ; ) @@ -647,15 +647,15 @@ namespace { //----------------------------------------------------------------------------- -QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharset) +TQString KMMsgBase::decodeRFC2047String(const TQCString& aStr, TQCString prefCharset) { if ( aStr.isEmpty() ) - return QString::null; + return TQString::null; - const QCString str = unfold( aStr ); + const TQCString str = unfold( aStr ); if ( str.isEmpty() ) - return QString::null; + return TQString::null; if ( str.find( "=?" ) < 0 ) { if ( !prefCharset.isEmpty() ) { @@ -671,8 +671,8 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse } } - QString result; - QCString LWSP_buffer; + TQString result; + TQCString LWSP_buffer; bool lastWasEncodedWord = false; for ( const char * pos = str.data() ; *pos ; ++pos ) { @@ -694,7 +694,7 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse const char * const beg = pos; { // parse charset name - QCString charset; + TQCString charset; int i = 2; pos += 2; for ( ; *pos != '?' && ( *pos==' ' || ispunct(*pos) || isalnum(*pos) ); @@ -723,11 +723,11 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse const KMime::Codec * c = KMime::Codec::codecForName( encoding ); kdFatal( !c, 5006 ) << "No \"" << encoding << "\" codec!?" << endl; - QByteArray in; in.setRawData( enc_start, pos - enc_start ); - const QByteArray enc = c->decode( in ); + TQByteArray in; in.setRawData( enc_start, pos - enc_start ); + const TQByteArray enc = c->decode( in ); in.resetRawData( enc_start, pos - enc_start ); - const QTextCodec * codec = codecForName(charset); + const TQTextCodec * codec = codecForName(charset); if (!codec) codec = kmkernel->networkCodec(); result += codec->toUnicode(enc); lastWasEncodedWord = true; @@ -751,27 +751,27 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse //----------------------------------------------------------------------------- -static const QCString especials = "()<>@,;:\"/[]?.= \033"; +static const TQCString especials = "()<>@,;:\"/[]?.= \033"; -QCString KMMsgBase::encodeRFC2047Quoted( const QCString & s, bool base64 ) { +TQCString KMMsgBase::encodeRFC2047Quoted( const TQCString & s, bool base64 ) { const char * codecName = base64 ? "b" : "q" ; const KMime::Codec * codec = KMime::Codec::codecForName( codecName ); kdFatal( !codec, 5006 ) << "No \"" << codecName << "\" found!?" << endl; - QByteArray in; in.setRawData( s.data(), s.length() ); - const QByteArray result = codec->encode( in ); + TQByteArray in; in.setRawData( s.data(), s.length() ); + const TQByteArray result = codec->encode( in ); in.resetRawData( s.data(), s.length() ); - return QCString( result.data(), result.size() + 1 ); + return TQCString( result.data(), result.size() + 1 ); } -QCString KMMsgBase::encodeRFC2047String(const QString& _str, - const QCString& charset) +TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, + const TQCString& charset) { - static const QString dontQuote = "\"()<>,@"; + static const TQString dontQuote = "\"()<>,@"; - if (_str.isEmpty()) return QCString(); + if (_str.isEmpty()) return TQCString(); if (charset == "us-ascii") return toUsAscii(_str); - QCString cset; + TQCString cset; if (charset.isEmpty()) { cset = kmkernel->networkCodec()->mimeName(); @@ -779,7 +779,7 @@ QCString KMMsgBase::encodeRFC2047String(const QString& _str, } else cset = charset; - const QTextCodec *codec = codecForName(cset); + const TQTextCodec *codec = codecForName(cset); if (!codec) codec = kmkernel->networkCodec(); unsigned int nonAscii = 0; @@ -789,7 +789,7 @@ QCString KMMsgBase::encodeRFC2047String(const QString& _str, bool useBase64 = (nonAscii * 6 > strLength); unsigned int start, stop, p, pos = 0, encLength; - QCString result; + TQCString result; bool breakLine = false; const unsigned int maxLen = 75 - 7 - cset.length(); @@ -856,13 +856,13 @@ QCString KMMsgBase::encodeRFC2047String(const QString& _str, //----------------------------------------------------------------------------- -QCString KMMsgBase::encodeRFC2231String( const QString& _str, - const QCString& charset ) +TQCString KMMsgBase::encodeRFC2231String( const TQString& _str, + const TQCString& charset ) { if ( _str.isEmpty() ) - return QCString(); + return TQCString(); - QCString cset; + TQCString cset; if ( charset.isEmpty() ) { cset = kmkernel->networkCodec()->mimeName(); @@ -870,8 +870,8 @@ QCString KMMsgBase::encodeRFC2231String( const QString& _str, } else cset = charset; - const QTextCodec *codec = codecForName( cset ); - QCString latin; + const TQTextCodec *codec = codecForName( cset ); + TQCString latin; if ( charset == "us-ascii" ) latin = toUsAscii( _str ); else if ( codec ) @@ -888,7 +888,7 @@ QCString KMMsgBase::encodeRFC2231String( const QString& _str, if ( !*l ) return latin; - QCString result = cset + "''"; + TQCString result = cset + "''"; for ( l = latin.data(); *l; ++l ) { bool needsQuoting = ( *l & 0x80 ); if( !needsQuoting ) { @@ -919,14 +919,14 @@ QCString KMMsgBase::encodeRFC2231String( const QString& _str, //----------------------------------------------------------------------------- -QString KMMsgBase::decodeRFC2231String(const QCString& _str) +TQString KMMsgBase::decodeRFC2231String(const TQCString& _str) { int p = _str.find('\''); if (p < 0) return kmkernel->networkCodec()->toUnicode(_str); - QCString charset = _str.left(p); + TQCString charset = _str.left(p); - QCString st = _str.mid(_str.findRev('\'') + 1); + TQCString st = _str.mid(_str.findRev('\'') + 1); char ch, ch2; p = 0; while (p < (int)st.length()) @@ -942,27 +942,27 @@ QString KMMsgBase::decodeRFC2231String(const QCString& _str) } p++; } - QString result; - const QTextCodec * codec = codecForName( charset ); + TQString result; + const TQTextCodec * codec = codecForName( charset ); if ( !codec ) codec = kmkernel->networkCodec(); return codec->toUnicode( st ); } -QCString KMMsgBase::extractRFC2231HeaderField( const QCString &aStr, const QCString &field ) +TQCString KMMsgBase::extractRFC2231HeaderField( const TQCString &aStr, const TQCString &field ) { int n=-1; - QCString str; + TQCString str; bool found = false; while ( n<=0 || found ) { - QString pattern( field ); + TQString pattern( field ); pattern += "[*]"; // match a literal * after the fieldname, as defined by RFC 2231 if ( n>=0 ) { // If n<0, check for fieldname*=..., otherwise for fieldname*n= - pattern += QString::number(n) + "[*]?"; + pattern += TQString::number(n) + "[*]?"; } pattern += "="; - QRegExp fnamePart( pattern, false ); + TQRegExp fnamePart( pattern, false ); int startPart = fnamePart.search( aStr ); int endPart; found = ( startPart >= 0 ); @@ -985,20 +985,20 @@ QCString KMMsgBase::extractRFC2231HeaderField( const QCString &aStr, const QCStr return str; } -QString KMMsgBase::base64EncodedMD5( const QString & s, bool utf8 ) { +TQString KMMsgBase::base64EncodedMD5( const TQString & s, bool utf8 ) { if (s.stripWhiteSpace().isEmpty()) return ""; if ( utf8 ) - return base64EncodedMD5( s.stripWhiteSpace().utf8() ); // QCString overload + return base64EncodedMD5( s.stripWhiteSpace().utf8() ); // TQCString overload else return base64EncodedMD5( s.stripWhiteSpace().latin1() ); // const char * overload } -QString KMMsgBase::base64EncodedMD5( const QCString & s ) { +TQString KMMsgBase::base64EncodedMD5( const TQCString & s ) { if (s.stripWhiteSpace().isEmpty()) return ""; return base64EncodedMD5( s.stripWhiteSpace().data() ); } -QString KMMsgBase::base64EncodedMD5( const char * s, int len ) { +TQString KMMsgBase::base64EncodedMD5( const char * s, int len ) { if (!s || !len) return ""; static const int Base64EncodedMD5Len = 22; KMD5 md5( s, len ); @@ -1007,20 +1007,20 @@ QString KMMsgBase::base64EncodedMD5( const char * s, int len ) { //----------------------------------------------------------------------------- -QCString KMMsgBase::autoDetectCharset(const QCString &_encoding, const QStringList &encodingList, const QString &text) +TQCString KMMsgBase::autoDetectCharset(const TQCString &_encoding, const TQStringList &encodingList, const TQString &text) { - QStringList charsets = encodingList; + TQStringList charsets = encodingList; if (!_encoding.isEmpty()) { - QString currentCharset = QString::fromLatin1(_encoding); + TQString currentCharset = TQString::fromLatin1(_encoding); charsets.remove(currentCharset); charsets.prepend(currentCharset); } - QStringList::ConstIterator it = charsets.begin(); + TQStringList::ConstIterator it = charsets.begin(); for (; it != charsets.end(); ++it) { - QCString encoding = (*it).latin1(); + TQCString encoding = (*it).latin1(); if (encoding == "locale") { encoding = kmkernel->networkCodec()->mimeName(); @@ -1036,7 +1036,7 @@ QCString KMMsgBase::autoDetectCharset(const QCString &_encoding, const QStringLi } else { - const QTextCodec *codec = KMMsgBase::codecForName(encoding); + const TQTextCodec *codec = KMMsgBase::codecForName(encoding); if (!codec) { kdDebug(5006) << "Auto-Charset: Something is wrong and I can not get a codec. [" << encoding << "]" << endl; } else { @@ -1078,11 +1078,11 @@ KMMsgAttachmentState KMMsgBase::attachmentState() const } //----------------------------------------------------------------------------- -static void swapEndian(QString &str) +static void swapEndian(TQString &str) { uint len = str.length(); - str = QDeepCopy<QString>(str); - QChar *unicode = const_cast<QChar*>( str.unicode() ); + str = TQDeepCopy<TQString>(str); + TQChar *unicode = const_cast<TQChar*>( str.unicode() ); for (uint i = 0; i < len; i++) unicode[i] = kmail_swap_16(unicode[i].unicode()); } @@ -1108,10 +1108,10 @@ namespace { } //----------------------------------------------------------------------------- -QString KMMsgBase::getStringPart(MsgPartType t) const +TQString KMMsgBase::getStringPart(MsgPartType t) const { retry: - QString ret; + TQString ret; g_chunk_offset = 0; bool using_mmap = false; @@ -1155,10 +1155,10 @@ retry: goto retry; } if(type == t) { - // This works because the QString constructor does a memcpy. + // This works because the TQString constructor does a memcpy. // Otherwise we would need to be concerned about the alignment. if(l) - ret = QString((QChar *)(g_chunk + g_chunk_offset), l/2); + ret = TQString((TQChar *)(g_chunk + g_chunk_offset), l/2); break; } g_chunk_offset += l; @@ -1330,7 +1330,7 @@ const uchar *KMMsgBase::asIndexString(int &length) const length = 0; unsigned long tmp; - QString tmp_str; + TQString tmp_str; //these is at the beginning because it is queried quite often tmp_str = msgIdMD5().stripWhiteSpace(); @@ -1397,7 +1397,7 @@ bool KMMsgBase::syncIndexString() const return false; } -static QStringList sReplySubjPrefixes, sForwardSubjPrefixes; +static TQStringList sReplySubjPrefixes, sForwardSubjPrefixes; static bool sReplaceSubjPrefix, sReplaceForwSubjPrefix; //----------------------------------------------------------------------------- @@ -1416,26 +1416,26 @@ void KMMsgBase::readConfig() //----------------------------------------------------------------------------- // static -QString KMMsgBase::stripOffPrefixes( const QString& str ) +TQString KMMsgBase::stripOffPrefixes( const TQString& str ) { return replacePrefixes( str, sReplySubjPrefixes + sForwardSubjPrefixes, - true, QString::null ).stripWhiteSpace(); + true, TQString::null ).stripWhiteSpace(); } //----------------------------------------------------------------------------- // static -QString KMMsgBase::replacePrefixes( const QString& str, - const QStringList& prefixRegExps, +TQString KMMsgBase::replacePrefixes( const TQString& str, + const TQStringList& prefixRegExps, bool replace, - const QString& newPrefix ) + const TQString& newPrefix ) { bool recognized = false; // construct a big regexp that // 1. is anchored to the beginning of str (sans whitespace) // 2. matches at least one of the part regexps in prefixRegExps - QString bigRegExp = QString::fromLatin1("^(?:\\s+|(?:%1))+\\s*") + TQString bigRegExp = TQString::fromLatin1("^(?:\\s+|(?:%1))+\\s*") .arg( prefixRegExps.join(")|(?:") ); - QRegExp rx( bigRegExp, false /*case insens.*/ ); + TQRegExp rx( bigRegExp, false /*case insens.*/ ); if ( !rx.isValid() ) { kdWarning(5006) << "KMMessage::replacePrefixes(): bigRegExp = \"" << bigRegExp << "\"\n" @@ -1443,7 +1443,7 @@ QString KMMsgBase::replacePrefixes( const QString& str, // try good ole Re/Fwd: recognized = str.startsWith( newPrefix ); } else { // valid rx - QString tmp = str; + TQString tmp = str; if ( rx.search( tmp ) == 0 ) { recognized = true; if ( replace ) @@ -1457,27 +1457,27 @@ QString KMMsgBase::replacePrefixes( const QString& str, } //----------------------------------------------------------------------------- -QString KMMsgBase::cleanSubject() const +TQString KMMsgBase::cleanSubject() const { return cleanSubject( sReplySubjPrefixes + sForwardSubjPrefixes, - true, QString::null ).stripWhiteSpace(); + true, TQString::null ).stripWhiteSpace(); } //----------------------------------------------------------------------------- -QString KMMsgBase::cleanSubject( const QStringList & prefixRegExps, +TQString KMMsgBase::cleanSubject( const TQStringList & prefixRegExps, bool replace, - const QString & newPrefix ) const + const TQString & newPrefix ) const { return KMMsgBase::replacePrefixes( subject(), prefixRegExps, replace, newPrefix ); } //----------------------------------------------------------------------------- -QString KMMsgBase::forwardSubject() const { +TQString KMMsgBase::forwardSubject() const { return cleanSubject( sForwardSubjPrefixes, sReplaceForwSubjPrefix, "Fwd:" ); } //----------------------------------------------------------------------------- -QString KMMsgBase::replySubject() const { +TQString KMMsgBase::replySubject() const { return cleanSubject( sReplySubjPrefixes, sReplaceSubjPrefix, "Re:" ); } diff --git a/kmail/kmmsgbase.h b/kmail/kmmsgbase.h index 355666823..9e7d70cb0 100644 --- a/kmail/kmmsgbase.h +++ b/kmail/kmmsgbase.h @@ -23,7 +23,7 @@ // for large file support flags #include <config.h> #include <sys/types.h> -#include <qstring.h> +#include <tqstring.h> #include <time.h> class QCString; @@ -149,10 +149,10 @@ public: void setParent(KMFolder* p) { mParent = p; } /** Convert the given message status to a string. */ - static QCString statusToStr(const KMMsgStatus status); + static TQCString statusToStr(const KMMsgStatus status); /** Convert the given message status to a string. */ - QString statusToSortRank(); + TQString statusToSortRank(); /** Returns TRUE if object is a real message (not KMMsgInfo or KMMsgBase) */ virtual bool isMessage(void) const; @@ -240,28 +240,28 @@ public: /** Set encryption status of the message and mark dirty. Optional * optimization: @p idx may specify the index of this message within * the parent folder. */ - virtual void setEncryptionStateChar( QChar status, int idx = -1 ); + virtual void setEncryptionStateChar( TQChar status, int idx = -1 ); /** Set signature status of the message and mark dirty. Optional * optimization: @p idx may specify the index of this message within * the parent folder. */ - virtual void setSignatureStateChar( QChar status, int idx = -1 ); + virtual void setSignatureStateChar( TQChar status, int idx = -1 ); /** Important header fields of the message that are also kept in the index. */ - virtual QString subject(void) const = 0; - virtual QString fromStrip(void) const = 0; - virtual QString toStrip(void) const = 0; - virtual QString replyToIdMD5(void) const = 0; - virtual QString msgIdMD5(void) const = 0; - virtual QString replyToAuxIdMD5() const = 0; - virtual QString strippedSubjectMD5() const = 0; + virtual TQString subject(void) const = 0; + virtual TQString fromStrip(void) const = 0; + virtual TQString toStrip(void) const = 0; + virtual TQString replyToIdMD5(void) const = 0; + virtual TQString msgIdMD5(void) const = 0; + virtual TQString replyToAuxIdMD5() const = 0; + virtual TQString strippedSubjectMD5() const = 0; virtual bool subjectIsPrefixed() const = 0; virtual time_t date(void) const = 0; - virtual QString dateStr(void) const; - virtual QString xmark(void) const = 0; + virtual TQString dateStr(void) const; + virtual TQString xmark(void) const = 0; /** Set date. */ - virtual void setDate(const QCString &aStrDate); + virtual void setDate(const TQCString &aStrDate); virtual void setDate(time_t aUnixTime) = 0; /** Returns TRUE if changed since last folder-sync. */ @@ -271,8 +271,8 @@ public: void setDirty(bool b) { mDirty = b; } /** Set subject/from/date and xmark. */ - virtual void setSubject(const QString&) = 0; - virtual void setXMark(const QString&) = 0; + virtual void setSubject(const TQString&) = 0; + virtual void setXMark(const TQString&) = 0; /** Calculate strippedSubject */ virtual void initStrippedSubjectMD5() = 0; @@ -285,8 +285,8 @@ public: virtual void setFolderOffset(off_t offs) = 0; /** Get/set msg filename */ - virtual QString fileName(void) const = 0; - virtual void setFileName(const QString& filename) = 0; + virtual TQString fileName(void) const = 0; + virtual void setFileName(const TQString& filename) = 0; /** Get/set size of message including the whole header in bytes. */ virtual size_t msgSize(void) const = 0; @@ -312,20 +312,20 @@ public: * (e.g. ':' or ',') and skip the then following blanks (if any) too. * If keywordFound is specified it will be TRUE if a keyword was skipped * and FALSE otherwise. */ - static QString skipKeyword(const QString& str, QChar sepChar=':', + static TQString skipKeyword(const TQString& str, TQChar sepChar=':', bool* keywordFound=0); - /** Return a QTextCodec for the specified charset. - * This function is a bit more tolerant, than QTextCodec::codecForName */ - static const QTextCodec* codecForName(const QCString& _str); + /** Return a TQTextCodec for the specified charset. + * This function is a bit more tolerant, than TQTextCodec::codecForName */ + static const TQTextCodec* codecForName(const TQCString& _str); /** Convert all non-ascii characters to question marks * If ok is non-null, *ok will be set to true if all characters * where ascii, *ok will be set to false otherwise */ - static QCString toUsAscii(const QString& _str, bool *ok=0); + static TQCString toUsAscii(const TQString& _str, bool *ok=0); /** Return a list of the supported encodings */ - static QStringList supportedEncodings(bool usAscii); + static TQStringList supportedEncodings(bool usAscii); /** Copy all values from other to this object. */ void assign(const KMMsgBase* other); @@ -337,43 +337,43 @@ public: KMMsgBase( const KMMsgBase& other ); /** Helper function for encodeRFC2047String */ - static QCString encodeRFC2047Quoted(const QCString& aStr, bool base64); + static TQCString encodeRFC2047Quoted(const TQCString& aStr, bool base64); /** This function handles both encodings described in RFC2047: Base64 ("=?iso-8859-1?b?...?=") and quoted-printable */ - static QString decodeRFC2047String(const QCString& aStr, const QCString prefCharset = ""); + static TQString decodeRFC2047String(const TQCString& aStr, const TQCString prefCharset = ""); /** Encode given string as described in RFC2047: using quoted-printable. */ - static QCString encodeRFC2047String(const QString& aStr, - const QCString& charset); + static TQCString encodeRFC2047String(const TQString& aStr, + const TQCString& charset); /** Encode given string as described in RFC2231 (parameters in MIME headers) */ - static QCString encodeRFC2231String(const QString& aStr, - const QCString& charset); + static TQCString encodeRFC2231String(const TQString& aStr, + const TQCString& charset); /** Decode given string as described in RFC2231 */ - static QString decodeRFC2231String(const QCString& aStr); + static TQString decodeRFC2231String(const TQCString& aStr); /** Extract a given param from the RFC2231-encoded header field, in particular concatenate possibly multiple entries, which are given as paramname*0=..; paramname*1=..; ... or paramname*0*=..; paramname*1*=..; ... and return their value as one string. That string will still be encoded */ - static QCString extractRFC2231HeaderField( const QCString &aStr, const QCString &field ); + static TQCString extractRFC2231HeaderField( const TQCString &aStr, const TQCString &field ); /** Calculate the base64 encoded md5sum (sans the trailing equal - signs). If @p utf8 is false, uses QString::latin1() to calculate - the md5sum of, else uses QString::utf8() */ - static QString base64EncodedMD5( const QString & aStr, bool utf8=false ); - static QString base64EncodedMD5( const QCString & aStr ); - static QString base64EncodedMD5( const char * aStr, int len=-1 ); + signs). If @p utf8 is false, uses TQString::latin1() to calculate + the md5sum of, else uses TQString::utf8() */ + static TQString base64EncodedMD5( const TQString & aStr, bool utf8=false ); + static TQString base64EncodedMD5( const TQCString & aStr ); + static TQString base64EncodedMD5( const char * aStr, int len=-1 ); /** * Find out preferred charset for 'text'. * First @p encoding is tried and if that one is not suitable, * the encodings in @p encodingList are tried. */ - static QCString autoDetectCharset(const QCString &encoding, const QStringList &encodingList, const QString &text); + static TQCString autoDetectCharset(const TQCString &encoding, const TQStringList &encodingList, const TQString &text); /** Returns the message serial number for the message. */ virtual unsigned long getMsgSerNum() const; @@ -391,14 +391,14 @@ public: sequence of whitespace-delimited prefixes at the beginning of @p str is replaced by @p newPrefix. **/ - static QString replacePrefixes( const QString& str, - const QStringList& prefixRegExps, + static TQString replacePrefixes( const TQString& str, + const TQStringList& prefixRegExps, bool replace, - const QString& newPrefix ); + const TQString& newPrefix ); /** Returns @p str with all "forward" and "reply" prefixes stripped off. **/ - static QString stripOffPrefixes( const QString& str ); + static TQString stripOffPrefixes( const TQString& str ); /** Check for prefixes @p prefixRegExps in #subject(). If none is found, @p newPrefix + ' ' is prepended to the subject and the @@ -406,18 +406,18 @@ public: sequence of whitespace-delimited prefixes at the beginning of #subject() is replaced by @p newPrefix **/ - QString cleanSubject(const QStringList& prefixRegExps, bool replace, - const QString& newPrefix) const; + TQString cleanSubject(const TQStringList& prefixRegExps, bool replace, + const TQString& newPrefix) const; /** Return this mails subject, with all "forward" and "reply" prefixes removed */ - QString cleanSubject() const; + TQString cleanSubject() const; /** Return this mails subject, formatted for "forward" mails */ - QString forwardSubject() const; + TQString forwardSubject() const; /** Return this mails subject, formatted for "reply" mails */ - QString replySubject() const; + TQString replySubject() const; /** Reads config settings from group "Composer" and sets all internal * variables (e.g. indent-prefix, etc.) */ @@ -464,7 +464,7 @@ public: /** access to long msgparts */ off_t getLongPart(MsgPartType) const; /** access to string msgparts */ - QString getStringPart(MsgPartType) const; + TQString getStringPart(MsgPartType) const; /** sync'ing just one KMMsgBase */ bool syncIndexString() const; }; diff --git a/kmail/kmmsgdict.cpp b/kmail/kmmsgdict.cpp index 6f834e02d..bedc3bb44 100644 --- a/kmail/kmmsgdict.cpp +++ b/kmail/kmmsgdict.cpp @@ -8,7 +8,7 @@ #include "globalsettings.h" #include "folderstorage.h" -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kdebug.h> #include <kstaticdeleter.h> @@ -133,7 +133,7 @@ public: } public: - QMemArray<KMMsgDictEntry *> array; + TQMemArray<KMMsgDictEntry *> array; FILE *fp; bool swapByteOrder; off_t baseOffset; @@ -356,9 +356,9 @@ unsigned long KMMsgDict::getMsgSerNum(KMFolder *folder, int index) const //----------------------------------------------------------------------------- //static -QValueList<unsigned long> KMMsgDict::serNumList(QPtrList<KMMsgBase> msgList) +TQValueList<unsigned long> KMMsgDict::serNumList(TQPtrList<KMMsgBase> msgList) { - QValueList<unsigned long> ret; + TQValueList<unsigned long> ret; for ( unsigned int i = 0; i < msgList.count(); i++ ) { unsigned long serNum = msgList.at(i)->getMsgSerNum(); assert( serNum ); @@ -369,7 +369,7 @@ QValueList<unsigned long> KMMsgDict::serNumList(QPtrList<KMMsgBase> msgList) //----------------------------------------------------------------------------- -QString KMMsgDict::getFolderIdsLocation( const FolderStorage &storage ) +TQString KMMsgDict::getFolderIdsLocation( const FolderStorage &storage ) { return storage.indexLocation() + ".ids"; } @@ -380,8 +380,8 @@ bool KMMsgDict::isFolderIdsOutdated( const FolderStorage &storage ) { bool outdated = false; - QFileInfo indexInfo( storage.indexLocation() ); - QFileInfo idsInfo( getFolderIdsLocation( storage ) ); + TQFileInfo indexInfo( storage.indexLocation() ); + TQFileInfo idsInfo( getFolderIdsLocation( storage ) ); if (!indexInfo.exists() || !idsInfo.exists()) outdated = true; @@ -398,8 +398,8 @@ int KMMsgDict::readFolderIds( FolderStorage& storage ) if ( isFolderIdsOutdated( storage ) ) return -1; - QString filename = getFolderIdsLocation( storage ); - FILE *fp = fopen(QFile::encodeName(filename), "r+"); + TQString filename = getFolderIdsLocation( storage ); + FILE *fp = fopen(TQFile::encodeName(filename), "r+"); if (!fp) return -1; @@ -491,8 +491,8 @@ KMMsgDictREntry *KMMsgDict::openFolderIds( const FolderStorage& storage, bool tr } if (!rentry->fp) { - QString filename = getFolderIdsLocation( storage ); - FILE *fp = truncate ? 0 : fopen(QFile::encodeName(filename), "r+"); + TQString filename = getFolderIdsLocation( storage ); + FILE *fp = truncate ? 0 : fopen(TQFile::encodeName(filename), "r+"); if (fp) { int version = 0; @@ -512,7 +512,7 @@ KMMsgDictREntry *KMMsgDict::openFolderIds( const FolderStorage& storage, bool tr if (!fp) { - fp = fopen(QFile::encodeName(filename), "w+"); + fp = fopen(TQFile::encodeName(filename), "w+"); if (!fp) { kdDebug(5006) << "Dict '" << filename @@ -561,8 +561,8 @@ int KMMsgDict::writeFolderIds( const FolderStorage &storage ) rentry->sync(); off_t eof = ftell(fp); - QString filename = getFolderIdsLocation( storage ); - truncate(QFile::encodeName(filename), eof); + TQString filename = getFolderIdsLocation( storage ); + truncate(TQFile::encodeName(filename), eof); fclose(rentry->fp); rentry->fp = 0; @@ -646,6 +646,6 @@ bool KMMsgDict::hasFolderIds( const FolderStorage& storage ) bool KMMsgDict::removeFolderIds( FolderStorage& storage ) { storage.setRDict( 0 ); - QString filename = getFolderIdsLocation( storage ); - return unlink( QFile::encodeName( filename) ); + TQString filename = getFolderIdsLocation( storage ); + return unlink( TQFile::encodeName( filename) ); } diff --git a/kmail/kmmsgdict.h b/kmail/kmmsgdict.h index 0a4978e56..99332dd20 100644 --- a/kmail/kmmsgdict.h +++ b/kmail/kmmsgdict.h @@ -20,8 +20,8 @@ #ifndef __KMMSGDICT #define __KMMSGDICT -#include <qvaluelist.h> -#include <qptrlist.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> class KMFolder; class KMMsgBase; @@ -72,7 +72,7 @@ class KMMsgDict unsigned long getMsgSerNum( KMFolder *folder, int index ) const; /** Convert a list of KMMsgBase pointers to a list of serial numbers */ - static QValueList<unsigned long> serNumList(QPtrList<KMMsgBase> msgList); + static TQValueList<unsigned long> serNumList(TQPtrList<KMMsgBase> msgList); private: /* FIXME It would be better to do without these, they are the classes @@ -113,7 +113,7 @@ private: // ----- per folder serial number on-disk structure handling ("ids files") /** Returns the name of the .folder.index.ids file. */ - static QString getFolderIdsLocation( const FolderStorage &folder ); + static TQString getFolderIdsLocation( const FolderStorage &folder ); /** Returns TRUE if the .folder.index.ids file should not be read. */ bool isFolderIdsOutdated( const FolderStorage &folder ); diff --git a/kmail/kmmsginfo.cpp b/kmail/kmmsginfo.cpp index 67c33588a..3b1112dc4 100644 --- a/kmail/kmmsginfo.cpp +++ b/kmail/kmmsginfo.cpp @@ -27,7 +27,7 @@ public: ALL_SET = 0xFFFFFF, NONE_SET = 0x000000 }; uint modifiers; - QString subject, from, to, replyToIdMD5, replyToAuxIdMD5, + TQString subject, from, to, replyToIdMD5, replyToAuxIdMD5, strippedSubjectMD5, msgIdMD5, xmark, file; off_t folderOffset; size_t msgSize, msgSizeServer; @@ -178,15 +178,15 @@ KMMsgInfo& KMMsgInfo::operator=(const KMMessage& msg) } //----------------------------------------------------------------------------- -void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom, - const QCString& aTo, time_t aDate, - KMMsgStatus aStatus, const QCString& aXMark, - const QCString& replyToId, const QCString& replyToAuxId, - const QCString& msgId, +void KMMsgInfo::init(const TQCString& aSubject, const TQCString& aFrom, + const TQCString& aTo, time_t aDate, + KMMsgStatus aStatus, const TQCString& aXMark, + const TQCString& replyToId, const TQCString& replyToAuxId, + const TQCString& msgId, KMMsgEncryptionState encryptionState, KMMsgSignatureState signatureState, KMMsgMDNSentState mdnSentState, - const QCString& prefCharset, + const TQCString& prefCharset, off_t aFolderOffset, size_t aMsgSize, size_t aMsgSizeServer, ulong aUID) { @@ -216,16 +216,16 @@ void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom, mDirty = false; } -void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom, - const QCString& aTo, time_t aDate, - KMMsgStatus aStatus, const QCString& aXMark, - const QCString& replyToId, const QCString& replyToAuxId, - const QCString& msgId, - const QCString& aFileName, +void KMMsgInfo::init(const TQCString& aSubject, const TQCString& aFrom, + const TQCString& aTo, time_t aDate, + KMMsgStatus aStatus, const TQCString& aXMark, + const TQCString& replyToId, const TQCString& replyToAuxId, + const TQCString& msgId, + const TQCString& aFileName, KMMsgEncryptionState encryptionState, KMMsgSignatureState signatureState, KMMsgMDNSentState mdnSentState, - const QCString& prefCharset, + const TQCString& prefCharset, size_t aMsgSize, size_t aMsgSizeServer, ulong aUID) { @@ -238,7 +238,7 @@ void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom, //----------------------------------------------------------------------------- -QString KMMsgInfo::subject(void) const +TQString KMMsgInfo::subject(void) const { if (kd && kd->modifiers & KMMsgInfoPrivate::SUBJECT_SET) return kd->subject; @@ -247,7 +247,7 @@ QString KMMsgInfo::subject(void) const //----------------------------------------------------------------------------- -QString KMMsgInfo::fromStrip(void) const +TQString KMMsgInfo::fromStrip(void) const { if (kd && kd->modifiers & KMMsgInfoPrivate::FROM_SET) return kd->from; @@ -255,7 +255,7 @@ QString KMMsgInfo::fromStrip(void) const } //----------------------------------------------------------------------------- -QString KMMsgInfo::fileName(void) const +TQString KMMsgInfo::fileName(void) const { if (kd && kd->modifiers & KMMsgInfoPrivate::FILE_SET) return kd->file; @@ -264,7 +264,7 @@ QString KMMsgInfo::fileName(void) const //----------------------------------------------------------------------------- -QString KMMsgInfo::toStrip(void) const +TQString KMMsgInfo::toStrip(void) const { if (kd && kd->modifiers & KMMsgInfoPrivate::TO_SET) return kd->to; @@ -272,7 +272,7 @@ QString KMMsgInfo::toStrip(void) const } //----------------------------------------------------------------------------- -QString KMMsgInfo::xmark(void) const +TQString KMMsgInfo::xmark(void) const { if (kd && kd->modifiers & KMMsgInfoPrivate::XMARK_SET) return kd->xmark; @@ -281,7 +281,7 @@ QString KMMsgInfo::xmark(void) const //----------------------------------------------------------------------------- -QString KMMsgInfo::replyToIdMD5(void) const +TQString KMMsgInfo::replyToIdMD5(void) const { if (kd && kd->modifiers & KMMsgInfoPrivate::REPLYTO_SET) return kd->replyToIdMD5; @@ -289,7 +289,7 @@ QString KMMsgInfo::replyToIdMD5(void) const } //----------------------------------------------------------------------------- -QString KMMsgInfo::replyToAuxIdMD5() const +TQString KMMsgInfo::replyToAuxIdMD5() const { if( kd && kd->modifiers & KMMsgInfoPrivate::REPLYTOAUX_SET ) return kd->replyToAuxIdMD5; @@ -297,7 +297,7 @@ QString KMMsgInfo::replyToAuxIdMD5() const } //----------------------------------------------------------------------------- -QString KMMsgInfo::strippedSubjectMD5() const +TQString KMMsgInfo::strippedSubjectMD5() const { if( kd && kd->modifiers & KMMsgInfoPrivate::STRIPPEDSUBJECT_SET ) return kd->strippedSubjectMD5; @@ -312,7 +312,7 @@ bool KMMsgInfo::subjectIsPrefixed() const } //----------------------------------------------------------------------------- -QString KMMsgInfo::msgIdMD5(void) const +TQString KMMsgInfo::msgIdMD5(void) const { if (kd && kd->modifiers & KMMsgInfoPrivate::MSGID_SET) return kd->msgIdMD5; @@ -321,7 +321,7 @@ QString KMMsgInfo::msgIdMD5(void) const //----------------------------------------------------------------------------- -void KMMsgInfo::setSubject(const QString& aSubject) +void KMMsgInfo::setSubject(const TQString& aSubject) { if(aSubject == subject()) return; @@ -335,7 +335,7 @@ void KMMsgInfo::setSubject(const QString& aSubject) //----------------------------------------------------------------------------- -void KMMsgInfo::setXMark(const QString& aXMark) +void KMMsgInfo::setXMark(const TQString& aXMark) { if (aXMark == xmark()) return; @@ -349,7 +349,7 @@ void KMMsgInfo::setXMark(const QString& aXMark) //----------------------------------------------------------------------------- -void KMMsgInfo::setReplyToIdMD5(const QString& aReplyToIdMD5) +void KMMsgInfo::setReplyToIdMD5(const TQString& aReplyToIdMD5) { if (aReplyToIdMD5 == replyToIdMD5()) return; @@ -363,7 +363,7 @@ void KMMsgInfo::setReplyToIdMD5(const QString& aReplyToIdMD5) //----------------------------------------------------------------------------- -void KMMsgInfo::setReplyToAuxIdMD5( const QString& aReplyToAuxIdMD5 ) +void KMMsgInfo::setReplyToAuxIdMD5( const TQString& aReplyToAuxIdMD5 ) { if( aReplyToAuxIdMD5 == replyToAuxIdMD5() ) return; @@ -381,8 +381,8 @@ void KMMsgInfo::initStrippedSubjectMD5() { if( kd && kd->modifiers & KMMsgInfoPrivate::STRIPPEDSUBJECT_SET ) return; - QString rawSubject = KMMessage::stripOffPrefixes( subject() ); - QString subjectMD5 = base64EncodedMD5( rawSubject, true /*utf8*/ ); + TQString rawSubject = KMMessage::stripOffPrefixes( subject() ); + TQString subjectMD5 = base64EncodedMD5( rawSubject, true /*utf8*/ ); if( !kd ) kd = new KMMsgInfoPrivate; kd->modifiers |= KMMsgInfoPrivate::STRIPPEDSUBJECT_SET; @@ -392,7 +392,7 @@ void KMMsgInfo::initStrippedSubjectMD5() //----------------------------------------------------------------------------- -void KMMsgInfo::setMsgIdMD5(const QString& aMsgIdMD5) +void KMMsgInfo::setMsgIdMD5(const TQString& aMsgIdMD5) { if (aMsgIdMD5 == msgIdMD5()) return; @@ -623,7 +623,7 @@ void KMMsgInfo::setFolderOffset(off_t offs) } //----------------------------------------------------------------------------- -void KMMsgInfo::setFileName(const QString& file) +void KMMsgInfo::setFileName(const TQString& file) { if (fileName() == file) return; @@ -657,7 +657,7 @@ void KMMsgInfo::setDate(time_t aUnixTime) } //--- For compatability with old index files -void KMMsgInfo::compat_fromOldIndexString(const QCString& str, bool toUtf8) +void KMMsgInfo::compat_fromOldIndexString(const TQCString& str, bool toUtf8) { char *start, *offset; @@ -676,15 +676,15 @@ void KMMsgInfo::compat_fromOldIndexString(const QCString& str, bool toUtf8) } else { start = offset = str.data() + 37; while (*start == ' ' && start - offset < 100) start++; - kd->subject = QString::fromUtf8(str.mid(start - str.data(), + kd->subject = TQString::fromUtf8(str.mid(start - str.data(), 100 - (start - offset)), 100 - (start - offset)); start = offset = str.data() + 138; while (*start == ' ' && start - offset < 50) start++; - kd->from = QString::fromUtf8(str.mid(start - str.data(), + kd->from = TQString::fromUtf8(str.mid(start - str.data(), 50 - (start - offset)), 50 - (start - offset)); start = offset = str.data() + 189; while (*start == ' ' && start - offset < 50) start++; - kd->to = QString::fromUtf8(str.mid(start - str.data(), + kd->to = TQString::fromUtf8(str.mid(start - str.data(), 50 - (start - offset)), 50 - (start - offset)); } kd->replyToIdMD5 = str.mid(240, 22).stripWhiteSpace(); diff --git a/kmail/kmmsginfo.h b/kmail/kmmsginfo.h index e4db8d47d..043830200 100644 --- a/kmail/kmmsginfo.h +++ b/kmail/kmmsginfo.h @@ -33,49 +33,49 @@ public: virtual ~KMMsgInfo(); /** left for old style index files */ - void compat_fromOldIndexString(const QCString& str, bool toUtf8); + void compat_fromOldIndexString(const TQCString& str, bool toUtf8); /** Initialize with given values and set dirty flag to FALSE. */ - virtual void init(const QCString& subject, const QCString& from, - const QCString& to, time_t date, - KMMsgStatus status, const QCString& xmark, - const QCString& replyToId, - const QCString& replyToAuxId, - const QCString& msgId, + virtual void init(const TQCString& subject, const TQCString& from, + const TQCString& to, time_t date, + KMMsgStatus status, const TQCString& xmark, + const TQCString& replyToId, + const TQCString& replyToAuxId, + const TQCString& msgId, KMMsgEncryptionState encryptionState, KMMsgSignatureState signatureState, KMMsgMDNSentState mdnSentState, - const QCString& prefCharset, + const TQCString& prefCharset, off_t folderOffset=0, size_t msgSize=0, size_t msgSizeServer = 0, ulong UID = 0); /** Initialize with given values and set dirty flag to FALSE. */ - virtual void init(const QCString& subject, const QCString& from, - const QCString& to, time_t date, - KMMsgStatus status, const QCString& xmark, - const QCString& replyToId, - const QCString& replyToAuxId, - const QCString& msgId, - const QCString& fileName, + virtual void init(const TQCString& subject, const TQCString& from, + const TQCString& to, time_t date, + KMMsgStatus status, const TQCString& xmark, + const TQCString& replyToId, + const TQCString& replyToAuxId, + const TQCString& msgId, + const TQCString& fileName, KMMsgEncryptionState encryptionState, KMMsgSignatureState signatureState, KMMsgMDNSentState mdnSentState, - const QCString& prefCharset, + const TQCString& prefCharset, size_t msgSize=0, size_t msgSizeServer = 0, ulong UID = 0); /** Inherited methods (see KMMsgBase for description): */ - virtual QString subject(void) const; - virtual QString fromStrip(void) const; - virtual QString toStrip(void) const; - virtual QString xmark(void) const; - virtual QString replyToIdMD5(void) const; - virtual QString replyToAuxIdMD5() const; - virtual QString strippedSubjectMD5() const; + virtual TQString subject(void) const; + virtual TQString fromStrip(void) const; + virtual TQString toStrip(void) const; + virtual TQString xmark(void) const; + virtual TQString replyToIdMD5(void) const; + virtual TQString replyToAuxIdMD5() const; + virtual TQString strippedSubjectMD5() const; virtual bool subjectIsPrefixed() const; - virtual QString msgIdMD5(void) const; - virtual QString fileName(void) const; + virtual TQString msgIdMD5(void) const; + virtual TQString fileName(void) const; virtual KMMsgStatus status(void) const; virtual KMMsgEncryptionState encryptionState() const; virtual KMMsgSignatureState signatureState() const; @@ -88,15 +88,15 @@ public: void setMsgSize(size_t sz); void setMsgSizeServer(size_t sz); void setFolderOffset(off_t offs); - void setFileName(const QString& file); + void setFileName(const TQString& file); virtual void setStatus(const KMMsgStatus status, int idx = -1); virtual void setDate(time_t aUnixTime); - virtual void setSubject(const QString&); - virtual void setXMark(const QString&); - virtual void setReplyToIdMD5(const QString&); - virtual void setReplyToAuxIdMD5( const QString& ); + virtual void setSubject(const TQString&); + virtual void setXMark(const TQString&); + virtual void setReplyToIdMD5(const TQString&); + virtual void setReplyToAuxIdMD5( const TQString& ); virtual void initStrippedSubjectMD5(); - virtual void setMsgIdMD5(const QString&); + virtual void setMsgIdMD5(const TQString&); virtual void setEncryptionState( const KMMsgEncryptionState, int idx = -1 ); virtual void setSignatureState( const KMMsgSignatureState, int idx = -1 ); virtual void setMDNSentState( const KMMsgMDNSentState, int idx = -1 ); diff --git a/kmail/kmmsglist.cpp b/kmail/kmmsglist.cpp index b5af84894..9689467b4 100644 --- a/kmail/kmmsglist.cpp +++ b/kmail/kmmsglist.cpp @@ -12,12 +12,12 @@ //----------------------------------------------------------------------------- KMMsgList::KMMsgList(int initSize) - : QMemArray<KMMsgBase*>(initSize), + : TQMemArray<KMMsgBase*>(initSize), mHigh( 0 ), mCount( 0 ) { if ( size() > 0 ) for (unsigned int i=size(); i>0; i--) - QMemArray<KMMsgBase*>::at(i-1) = 0; + TQMemArray<KMMsgBase*>::at(i-1) = 0; } @@ -69,7 +69,7 @@ bool KMMsgList::resize(unsigned int aSize) } // do the resizing - if (!QMemArray<KMMsgBase*>::resize(aSize)) return FALSE; + if (!TQMemArray<KMMsgBase*>::resize(aSize)) return FALSE; // initialize new elements for (i=oldSize; i<aSize; i++) diff --git a/kmail/kmmsglist.h b/kmail/kmmsglist.h index 1319fde40..83d9e8dbe 100644 --- a/kmail/kmmsglist.h +++ b/kmail/kmmsglist.h @@ -22,7 +22,7 @@ #include "kmmsgbase.h" -#include <qmemarray.h> +#include <tqmemarray.h> /** * @short An abstraction of an array of pointers to messages. @@ -34,7 +34,7 @@ * * @author Stefan Taferner <taferner@kde.org> */ -class KMMsgList: public QMemArray<KMMsgBase*> +class KMMsgList: public TQMemArray<KMMsgBase*> { public: diff --git a/kmail/kmmsgpart.cpp b/kmail/kmmsgpart.cpp index 48dc55ca8..085e36c0f 100644 --- a/kmail/kmmsgpart.cpp +++ b/kmail/kmmsgpart.cpp @@ -20,7 +20,7 @@ #include <mimelib/string.h> #include <kiconloader.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <assert.h> @@ -34,7 +34,7 @@ KMMessagePart::KMMessagePart() } //----------------------------------------------------------------------------- -KMMessagePart::KMMessagePart( QDataStream & stream ) +KMMessagePart::KMMessagePart( TQDataStream & stream ) : mParent(0), mLoadHeaders(false), mLoadPart(false) { unsigned long size; @@ -62,19 +62,19 @@ KMMessagePart::~KMMessagePart() //----------------------------------------------------------------------------- void KMMessagePart::clear() { - mOriginalContentTypeStr = QCString(); + mOriginalContentTypeStr = TQCString(); mType = "text"; mSubtype = "plain"; mCte = "7bit"; - mContentDescription = QCString(); - mContentDisposition = QCString(); + mContentDescription = TQCString(); + mContentDisposition = TQCString(); mBody.truncate( 0 ); - mAdditionalCTypeParamStr = QCString(); - mName = QString::null; - mParameterAttribute = QCString(); - mParameterValue = QString::null; - mCharset = QCString(); - mPartSpecifier = QString::null; + mAdditionalCTypeParamStr = TQCString(); + mName = TQString::null; + mParameterAttribute = TQCString(); + mParameterValue = TQString::null; + mCharset = TQCString(); + mPartSpecifier = TQString::null; mBodyDecodedSize = 0; mParent = 0; mLoadHeaders = false; @@ -101,7 +101,7 @@ int KMMessagePart::decodedSize(void) const //----------------------------------------------------------------------------- -void KMMessagePart::setBody(const QCString &aStr) +void KMMessagePart::setBody(const TQCString &aStr) { KMail::Util::setFromQCString( mBody, aStr ); @@ -123,7 +123,7 @@ void KMMessagePart::setBody(const DwString &aStr) mBodyDecodedSize = -1; // Can't know the decoded size } -void KMMessagePart::setBody(const QByteArray &aStr) +void KMMessagePart::setBody(const TQByteArray &aStr) { mBody = aStr; @@ -134,19 +134,19 @@ void KMMessagePart::setBody(const QByteArray &aStr) mBodyDecodedSize = -1; // Can't know the decoded size } -void KMMessagePart::setBodyFromUnicode( const QString & str ) { - QCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str ); +void KMMessagePart::setBodyFromUnicode( const TQString & str ) { + TQCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str ); if ( encoding.isEmpty() ) encoding = "utf-8"; - const QTextCodec * codec = KMMsgBase::codecForName( encoding ); + const TQTextCodec * codec = KMMsgBase::codecForName( encoding ); assert( codec ); - QValueList<int> dummy; + TQValueList<int> dummy; setCharset( encoding ); setBodyAndGuessCte( codec->fromUnicode( str ), dummy, false /* no 8bit */ ); } -const QTextCodec * KMMessagePart::codec() const { - const QTextCodec * c = KMMsgBase::codecForName( charset() ); +const TQTextCodec * KMMessagePart::codec() const { + const TQTextCodec * c = KMMsgBase::codecForName( charset() ); if ( !c ) { // Ok, no override and nothing in the message, let's use the fallback @@ -161,7 +161,7 @@ const QTextCodec * KMMessagePart::codec() const { return c; } -QString KMMessagePart::bodyToUnicode(const QTextCodec* codec) const { +TQString KMMessagePart::bodyToUnicode(const TQTextCodec* codec) const { if ( !codec ) // No codec was given, so try the charset in the mail codec = this->codec(); @@ -170,7 +170,7 @@ QString KMMessagePart::bodyToUnicode(const QTextCodec* codec) const { return codec->toUnicode( bodyDecoded() ); } -void KMMessagePart::setCharset( const QCString & c ) { +void KMMessagePart::setCharset( const TQCString & c ) { if ( type() != DwMime::kTypeText ) kdWarning() << "KMMessagePart::setCharset(): trying to set a charset for a non-textual mimetype." << endl @@ -182,7 +182,7 @@ void KMMessagePart::setCharset( const QCString & c ) { } //----------------------------------------------------------------------------- -void KMMessagePart::setBodyEncoded(const QCString& aStr) +void KMMessagePart::setBodyEncoded(const TQCString& aStr) { mBodyDecodedSize = aStr.size() - 1; // same as aStr.length() but faster - assuming no embedded nuls switch (cte()) @@ -193,12 +193,12 @@ void KMMessagePart::setBodyEncoded(const QCString& aStr) Codec * codec = Codec::codecForName( cteStr() ); assert( codec ); // we can't use the convenience function here, since aStr is not - // a QByteArray...: + // a TQByteArray...: mBody.resize( codec->maxEncodedSizeFor( mBodyDecodedSize ) ); - QCString::ConstIterator iit = aStr.data(); - QCString::ConstIterator iend = aStr.data() + mBodyDecodedSize; - QByteArray::Iterator oit = mBody.begin(); - QByteArray::ConstIterator oend = mBody.end(); + TQCString::ConstIterator iit = aStr.data(); + TQCString::ConstIterator iend = aStr.data() + mBodyDecodedSize; + TQByteArray::Iterator oit = mBody.begin(); + TQByteArray::ConstIterator oend = mBody.end(); if ( !codec->encode( iit, iend, oit, oend ) ) kdWarning(5006) << codec->name() << " codec lies about it's maxEncodedSizeFor( " @@ -219,8 +219,8 @@ void KMMessagePart::setBodyEncoded(const QCString& aStr) } } -void KMMessagePart::setBodyAndGuessCte(const QByteArray& aBuf, - QValueList<int> & allowedCte, +void KMMessagePart::setBodyAndGuessCte(const TQByteArray& aBuf, + TQValueList<int> & allowedCte, bool allow8Bit, bool willBeSigned ) { @@ -242,8 +242,8 @@ void KMMessagePart::setBodyAndGuessCte(const QByteArray& aBuf, setBodyEncodedBinary( aBuf ); } -void KMMessagePart::setBodyAndGuessCte(const QCString& aBuf, - QValueList<int> & allowedCte, +void KMMessagePart::setBodyAndGuessCte(const TQCString& aBuf, + TQValueList<int> & allowedCte, bool allow8Bit, bool willBeSigned ) { @@ -266,7 +266,7 @@ void KMMessagePart::setBodyAndGuessCte(const QCString& aBuf, } //----------------------------------------------------------------------------- -void KMMessagePart::setBodyEncodedBinary(const QByteArray& aStr) +void KMMessagePart::setBodyEncodedBinary(const TQByteArray& aStr) { mBodyDecodedSize = aStr.size(); if (aStr.isEmpty()) @@ -300,7 +300,7 @@ void KMMessagePart::setBodyEncodedBinary(const QByteArray& aStr) } } -void KMMessagePart::setMessageBody( const QByteArray& aBuf ) +void KMMessagePart::setMessageBody( const TQByteArray& aBuf ) { CharFreq cf( aBuf ); // it's safe to pass null arrays mBodyDecodedSize = aBuf.size(); @@ -325,10 +325,10 @@ void KMMessagePart::setMessageBody( const QByteArray& aBuf ) } //----------------------------------------------------------------------------- -QByteArray KMMessagePart::bodyDecodedBinary() const +TQByteArray KMMessagePart::bodyDecodedBinary() const { - if (mBody.isEmpty()) return QByteArray(); - QByteArray result; + if (mBody.isEmpty()) return TQByteArray(); + TQByteArray result; switch (cte()) { @@ -356,11 +356,11 @@ QByteArray KMMessagePart::bodyDecodedBinary() const return result; } -QCString KMMessagePart::bodyDecoded(void) const +TQCString KMMessagePart::bodyDecoded(void) const { - if (mBody.isEmpty()) return QCString(""); + if (mBody.isEmpty()) return TQCString(""); bool decodeBinary = false; - QCString result; + TQCString result; int len; switch (cte()) @@ -375,12 +375,12 @@ QCString KMMessagePart::bodyDecoded(void) const default: if ( const Codec * codec = Codec::codecForName( cteStr() ) ) { // We can't use the codec convenience functions, since we must - // return a QCString, not a QByteArray: + // return a TQCString, not a TQByteArray: int bufSize = codec->maxDecodedSizeFor( mBody.size() ) + 1; // trailing NUL result.resize( bufSize ); - QByteArray::ConstIterator iit = mBody.begin(); - QCString::Iterator oit = result.begin(); - QCString::ConstIterator oend = result.begin() + bufSize; + TQByteArray::ConstIterator iit = mBody.begin(); + TQCString::Iterator oit = result.begin(); + TQCString::ConstIterator oend = result.begin() + bufSize; if ( !codec->decode( iit, mBody.end(), oit, oend ) ) kdWarning(5006) << codec->name() << " lies about it's maxDecodedSizeFor( " @@ -418,10 +418,10 @@ void KMMessagePart::magicSetType(bool aAutoDecode) { KMimeMagic::self()->setFollowLinks( true ); // is it necessary ? - const QByteArray body = ( aAutoDecode ) ? bodyDecodedBinary() : mBody ; + const TQByteArray body = ( aAutoDecode ) ? bodyDecodedBinary() : mBody ; KMimeMagicResult * result = KMimeMagic::self()->findBufferType( body ); - QString mimetype = result->mimeType(); + TQString mimetype = result->mimeType(); const int sep = mimetype.find('/'); mType = mimetype.left(sep).latin1(); mSubtype = mimetype.mid(sep+1).latin1(); @@ -429,20 +429,20 @@ void KMMessagePart::magicSetType(bool aAutoDecode) //----------------------------------------------------------------------------- -QString KMMessagePart::iconName( int size ) const +TQString KMMessagePart::iconName( int size ) const { - QCString mimeType( mType + "/" + mSubtype ); + TQCString mimeType( mType + "/" + mSubtype ); KPIM::kAsciiToLower( mimeType.data() ); - QString fileName = - KMimeType::mimeType( mimeType )->icon( QString::null, false ); + TQString fileName = + KMimeType::mimeType( mimeType )->icon( TQString::null, false ); if ( fileName.isEmpty() ) { fileName = this->fileName(); if ( fileName.isEmpty() ) fileName = this->name(); if ( !fileName.isEmpty() ) { - fileName = KMimeType::findByPath( "/tmp/"+fileName, 0, true )->icon( QString::null, true ); + fileName = KMimeType::findByPath( "/tmp/"+fileName, 0, true )->icon( TQString::null, true ); } } @@ -481,27 +481,27 @@ void KMMessagePart::setSubtype(int aSubtype) } //----------------------------------------------------------------------------- -QCString KMMessagePart::parameterAttribute(void) const +TQCString KMMessagePart::parameterAttribute(void) const { return mParameterAttribute; } //----------------------------------------------------------------------------- -QString KMMessagePart::parameterValue(void) const +TQString KMMessagePart::parameterValue(void) const { return mParameterValue; } //----------------------------------------------------------------------------- -void KMMessagePart::setParameter(const QCString &attribute, - const QString &value) +void KMMessagePart::setParameter(const TQCString &attribute, + const TQString &value) { mParameterAttribute = attribute; mParameterValue = value; } //----------------------------------------------------------------------------- -QCString KMMessagePart::contentTransferEncodingStr(void) const +TQCString KMMessagePart::contentTransferEncodingStr(void) const { return mCte; } @@ -515,7 +515,7 @@ int KMMessagePart::contentTransferEncoding(void) const //----------------------------------------------------------------------------- -void KMMessagePart::setContentTransferEncodingStr(const QCString &aStr) +void KMMessagePart::setContentTransferEncodingStr(const TQCString &aStr) { mCte = aStr; } @@ -532,16 +532,16 @@ void KMMessagePart::setContentTransferEncoding(int aCte) //----------------------------------------------------------------------------- -QString KMMessagePart::contentDescription(void) const +TQString KMMessagePart::contentDescription(void) const { return KMMsgBase::decodeRFC2047String(mContentDescription, charset()); } //----------------------------------------------------------------------------- -void KMMessagePart::setContentDescription(const QString &aStr) +void KMMessagePart::setContentDescription(const TQString &aStr) { - QCString encoding = KMMsgBase::autoDetectCharset(charset(), + TQCString encoding = KMMsgBase::autoDetectCharset(charset(), KMMessage::preferredCharsets(), aStr); if (encoding.isEmpty()) encoding = "utf-8"; mContentDescription = KMMsgBase::encodeRFC2047String(aStr, encoding); @@ -549,9 +549,9 @@ void KMMessagePart::setContentDescription(const QString &aStr) //----------------------------------------------------------------------------- -QString KMMessagePart::fileName(void) const +TQString KMMessagePart::fileName(void) const { - QCString str; + TQCString str; // Allow for multiple filname*0, filename*1, ... params (defined by RFC 2231) // in the Content-Disposision @@ -567,7 +567,7 @@ QString KMMessagePart::fileName(void) const // search the start of the filename int startOfFilename = mContentDisposition.find("filename=", 0, false); if (startOfFilename < 0) - return QString::null; + return TQString::null; startOfFilename += 9; // search the end of the filename @@ -582,18 +582,18 @@ QString KMMessagePart::fileName(void) const if (endOfFilename < 0) endOfFilename = 32767; - const QCString str = mContentDisposition.mid(startOfFilename, + const TQCString str = mContentDisposition.mid(startOfFilename, endOfFilename-startOfFilename+1) .stripWhiteSpace(); return KMMsgBase::decodeRFC2047String(str, charset()); } - return QString::null; + return TQString::null; } -QCString KMMessagePart::body() const +TQCString KMMessagePart::body() const { - return QCString( mBody.data(), mBody.size() + 1 ); // space for trailing NUL + return TQCString( mBody.data(), mBody.size() + 1 ); // space for trailing NUL } DwString KMMessagePart::dwBody() const diff --git a/kmail/kmmsgpart.h b/kmail/kmmsgpart.h index a28238177..ce3245c89 100644 --- a/kmail/kmmsgpart.h +++ b/kmail/kmmsgpart.h @@ -22,9 +22,9 @@ #include <kiconloader.h> -#include <qstring.h> -#include <qcstring.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqdict.h> template <typename T> class QValueList; @@ -35,7 +35,7 @@ class KMMessagePart { public: KMMessagePart(); - KMMessagePart( QDataStream & stream ); + KMMessagePart( TQDataStream & stream ); virtual ~KMMessagePart(); /** Reset to text/plain with 7bit cte and clear all other properties. */ @@ -46,30 +46,30 @@ public: void duplicate( const KMMessagePart & msgPart ); /** Get or set the message body */ - QCString body(void) const; - void setBody(const QCString &aStr); + TQCString body(void) const; + void setBody(const TQCString &aStr); DwString dwBody() const; void setBody(const DwString &aStr); // warning, doesn't detach from 'arr' - void setBody(const QByteArray &arr); + void setBody(const TQByteArray &arr); /** Sets this body part's content to @p str. @p str is subject to automatic charset and CTE detection. **/ - void setBodyFromUnicode( const QString & str ); + void setBodyFromUnicode( const TQString & str ); /** Returns the body part decoded to unicode. **/ - QString bodyToUnicode(const QTextCodec* codec=0) const; + TQString bodyToUnicode(const TQTextCodec* codec=0) const; /** Returns body as decoded string. Assumes that content-transfer-encoding contains the correct encoding. This routine is meant for binary data. No trailing 0 is appended. */ - QByteArray bodyDecodedBinary(void) const; + TQByteArray bodyDecodedBinary(void) const; /** Returns body as decoded string. Assumes that content-transfer-encoding contains the correct encoding. This routine is meant for text strings! */ - QCString bodyDecoded(void) const; + TQCString bodyDecoded(void) const; /** Sets body, encoded in the best fitting content-transfer-encoding, which is determined by character @@ -80,13 +80,13 @@ public: @param allow8Bit whether "8bit" is allowed as cte. @param willBeSigned whether "7bit"/"8bit" is allowed as cte according to RFC 3156 */ - void setBodyAndGuessCte(const QByteArray& aBuf, - QValueList<int>& allowedCte, + void setBodyAndGuessCte(const TQByteArray& aBuf, + TQValueList<int>& allowedCte, bool allow8Bit = false, bool willBeSigned = false); /** Same for text */ - void setBodyAndGuessCte(const QCString& aBuf, - QValueList<int>& allowedCte, + void setBodyAndGuessCte(const TQCString& aBuf, + TQValueList<int>& allowedCte, bool allow8Bit = false, bool willBeSigned = false); @@ -94,22 +94,22 @@ public: BEWARE: The entire aStr is used including trailing 0 of text strings! This version is faster than setBodyEncoded, no duplication necessary. */ - void setBodyEncodedBinary(const QByteArray& aStr); + void setBodyEncodedBinary(const TQByteArray& aStr); /** Sets body, encoded according to the content-transfer-encoding. This one is for text strings, the trailing 0 is not used. For speed reasons, prefer setBodyEncodedBinary. - When possible (the QCString isn't used afterwards), change setBodyEncoded(myQCString) into: + When possible (the TQCString isn't used afterwards), change setBodyEncoded(myQCString) into: setBodyEncodedBinary(byteArrayFromQCStringNoDetach(myQCString)); */ - void setBodyEncoded(const QCString& aStr); + void setBodyEncoded(const TQCString& aStr); /** Set a full message string as the body of the message part, disallowing anything but 7bit or 8bit encoding. (RFC 1521 section 7.3) */ - void setMessageBody( const QByteArray & aBuf ); + void setMessageBody( const TQByteArray & aBuf ); /** Returns decoded length of body. */ int decodedSize(void) const; @@ -117,24 +117,24 @@ public: /** Get or set the 'Content-Type' header field The member functions that involve enumerated types (ints) will work only for well-known types or subtypes. */ - QCString originalContentTypeStr(void) const { return mOriginalContentTypeStr; } - void setOriginalContentTypeStr( const QCString& txt ) + TQCString originalContentTypeStr(void) const { return mOriginalContentTypeStr; } + void setOriginalContentTypeStr( const TQCString& txt ) { mOriginalContentTypeStr = txt; } - QCString typeStr() const { return mType; } - void setTypeStr( const QCString & aStr ) { mType = aStr; } + TQCString typeStr() const { return mType; } + void setTypeStr( const TQCString & aStr ) { mType = aStr; } int type() const; void setType(int aType); /** Subtype */ - QCString subtypeStr() const { return mSubtype; } - void setSubtypeStr( const QCString & aStr ) { mSubtype = aStr; } + TQCString subtypeStr() const { return mSubtype; } + void setSubtypeStr( const TQCString & aStr ) { mSubtype = aStr; } int subtype() const; void setSubtype(int aSubtype); /** Content-Id */ - QCString contentId() const { return mContentId; } - void setContentId( const QCString & aStr ) { mContentId = aStr; } + TQCString contentId() const { return mContentId; } + void setContentId( const TQCString & aStr ) { mContentId = aStr; } /** Set the 'Content-Type' by mime-magic from the contents of the body. If autoDecode is TRUE the decoded body will be used for mime type @@ -143,15 +143,15 @@ public: /** Get or set a custom content type parameter, consisting of an attribute name and a corresponding value. */ - QCString parameterAttribute(void) const; - QString parameterValue(void) const; - void setParameter(const QCString &attribute, const QString &value); + TQCString parameterAttribute(void) const; + TQString parameterValue(void) const; + void setParameter(const TQCString &attribute, const TQString &value); - QCString additionalCTypeParamStr(void) const + TQCString additionalCTypeParamStr(void) const { return mAdditionalCTypeParamStr; } - void setAdditionalCTypeParamStr( const QCString ¶m ) + void setAdditionalCTypeParamStr( const TQCString ¶m ) { mAdditionalCTypeParamStr = param; } @@ -159,55 +159,55 @@ public: /** Tries to find a good icon for the 'Content-Type' by scanning the installed mimelnk files. Returns the found icon. If no matching icon is found, the one for application/octet-stream is returned. */ - QString iconName( int size = KIcon::Desktop ) const; + TQString iconName( int size = KIcon::Desktop ) const; /** Get or set the 'Content-Transfer-Encoding' header field The member functions that involve enumerated types (ints) will work only for well-known encodings. */ - QCString contentTransferEncodingStr(void) const; + TQCString contentTransferEncodingStr(void) const; int contentTransferEncoding(void) const; - void setContentTransferEncodingStr(const QCString &aStr); + void setContentTransferEncodingStr(const TQCString &aStr); void setContentTransferEncoding(int aCte); /** Cte is short for ContentTransferEncoding. These functions are an alternative to the ones with longer names. */ - QCString cteStr(void) const { return contentTransferEncodingStr(); } + TQCString cteStr(void) const { return contentTransferEncodingStr(); } int cte(void) const { return contentTransferEncoding(); } - void setCteStr(const QCString& aStr) { setContentTransferEncodingStr(aStr); } + void setCteStr(const TQCString& aStr) { setContentTransferEncodingStr(aStr); } void setCte(int aCte) { setContentTransferEncoding(aCte); } /** Get or set the 'Content-Description' header field */ - QString contentDescription() const; - QCString contentDescriptionEncoded() const { return mContentDescription; } - void setContentDescription(const QString &aStr); + TQString contentDescription() const; + TQCString contentDescriptionEncoded() const { return mContentDescription; } + void setContentDescription(const TQString &aStr); /** Get or set the 'Content-Disposition' header field */ - QCString contentDisposition() const { return mContentDisposition; } - void setContentDisposition( const QCString & cd ) { mContentDisposition = cd; } + TQCString contentDisposition() const { return mContentDisposition; } + void setContentDisposition( const TQCString & cd ) { mContentDisposition = cd; } /** Get the message part charset.*/ - QCString charset() const { return mCharset; } + TQCString charset() const { return mCharset; } /** Set the message part charset. */ - void setCharset( const QCString & c ); + void setCharset( const TQCString & c ); - /** Get a QTextCodec suitable for this message part */ - const QTextCodec * codec() const; + /** Get a TQTextCodec suitable for this message part */ + const TQTextCodec * codec() const; /** Get or set name parameter */ - QString name() const { return mName; } - void setName( const QString & name ) { mName = name; } + TQString name() const { return mName; } + void setName( const TQString & name ) { mName = name; } /** Returns name of filename part of 'Content-Disposition' header field, if present. */ - QString fileName(void) const; + TQString fileName(void) const; /** Returns the part number */ - QString partSpecifier() const { return mPartSpecifier; } + TQString partSpecifier() const { return mPartSpecifier; } /** Sets the part number */ - void setPartSpecifier( const QString & part ) { mPartSpecifier = part; } + void setPartSpecifier( const TQString & part ) { mPartSpecifier = part; } /** If this part is complete (contains a body) */ bool isComplete() { return (!mBody.isNull()); } @@ -231,20 +231,20 @@ public: void setLoadPart( bool load ) { mLoadPart = load; } protected: - QCString mOriginalContentTypeStr; - QCString mType; - QCString mSubtype; - QCString mCte; - QCString mContentDescription; - QCString mContentDisposition; - QCString mContentId; - QByteArray mBody; - QCString mAdditionalCTypeParamStr; - QString mName; - QCString mParameterAttribute; - QString mParameterValue; - QCString mCharset; - QString mPartSpecifier; + TQCString mOriginalContentTypeStr; + TQCString mType; + TQCString mSubtype; + TQCString mCte; + TQCString mContentDescription; + TQCString mContentDisposition; + TQCString mContentId; + TQByteArray mBody; + TQCString mAdditionalCTypeParamStr; + TQString mName; + TQCString mParameterAttribute; + TQString mParameterValue; + TQCString mCharset; + TQString mPartSpecifier; mutable int mBodyDecodedSize; KMMessagePart* mParent; bool mLoadHeaders; diff --git a/kmail/kmmsgpartdlg.cpp b/kmail/kmmsgpartdlg.cpp index 63407aeeb..921c9d55b 100644 --- a/kmail/kmmsgpartdlg.cpp +++ b/kmail/kmmsgpartdlg.cpp @@ -22,11 +22,11 @@ #include <kdebug.h> // other Qt includes: -#include <qlabel.h> -#include <qlayout.h> -#include <qwhatsthis.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> #include <klineedit.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> // other includes: #include <assert.h> @@ -43,46 +43,46 @@ static const struct { static const int numEncodingTypes = sizeof encodingTypes / sizeof *encodingTypes; -KMMsgPartDialog::KMMsgPartDialog( const QString & caption, - QWidget * parent, const char * name ) +KMMsgPartDialog::KMMsgPartDialog( const TQString & caption, + TQWidget * parent, const char * name ) : KDialogBase( Plain, caption.isEmpty() ? i18n("Message Part Properties") : caption, Ok|Cancel|Help, Ok, parent, name, true, true) { // tmp vars: - QGridLayout * glay; - QLabel * label; - QString msg; + TQGridLayout * glay; + TQLabel * label; + TQString msg; - setHelp( QString::fromLatin1("attachments") ); + setHelp( TQString::fromLatin1("attachments") ); for ( int i = 0 ; i < numEncodingTypes ; ++i ) mI18nizedEncodings << i18n( encodingTypes[i].displayName ); - glay = new QGridLayout( plainPage(), 9 /*rows*/, 2 /*cols*/, spacingHint() ); + glay = new TQGridLayout( plainPage(), 9 /*rows*/, 2 /*cols*/, spacingHint() ); glay->setColStretch( 1, 1 ); glay->setRowStretch( 8, 1 ); // mimetype icon: - mIcon = new QLabel( plainPage() ); + mIcon = new TQLabel( plainPage() ); mIcon->setPixmap( DesktopIcon("unknown") ); glay->addMultiCellWidget( mIcon, 0, 1, 0, 0 ); // row 0: Type combobox: mMimeType = new KComboBox( true, plainPage() ); - mMimeType->setInsertionPolicy( QComboBox::NoInsertion ); + mMimeType->setInsertionPolicy( TQComboBox::NoInsertion ); mMimeType->setValidator( new KMimeTypeValidator( mMimeType ) ); - mMimeType->insertStringList( QStringList() - << QString::fromLatin1("text/html") - << QString::fromLatin1("text/plain") - << QString::fromLatin1("image/gif") - << QString::fromLatin1("image/jpeg") - << QString::fromLatin1("image/png") - << QString::fromLatin1("application/octet-stream") - << QString::fromLatin1("application/x-gunzip") - << QString::fromLatin1("application/zip") ); - connect( mMimeType, SIGNAL(textChanged(const QString&)), - this, SLOT(slotMimeTypeChanged(const QString&)) ); + mMimeType->insertStringList( TQStringList() + << TQString::fromLatin1("text/html") + << TQString::fromLatin1("text/plain") + << TQString::fromLatin1("image/gif") + << TQString::fromLatin1("image/jpeg") + << TQString::fromLatin1("image/png") + << TQString::fromLatin1("application/octet-stream") + << TQString::fromLatin1("application/x-gunzip") + << TQString::fromLatin1("application/zip") ); + connect( mMimeType, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotMimeTypeChanged(const TQString&)) ); glay->addWidget( mMimeType, 0, 1 ); msg = i18n("<qt><p>The <em>MIME type</em> of the file:</p>" @@ -90,10 +90,10 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption, "type of the file is automatically checked; but, sometimes, %1 " "may not detect the type correctly -- here is where you can fix " "that.</p></qt>").arg( kapp->aboutData()->programName() ); - QWhatsThis::add( mMimeType, msg ); + TQWhatsThis::add( mMimeType, msg ); // row 1: Size label: - mSize = new QLabel( plainPage() ); + mSize = new TQLabel( plainPage() ); setSize( KIO::filesize_t(0) ); glay->addWidget( mSize, 1, 1 ); @@ -103,11 +103,11 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption, "when this is the case, it will be made visible by adding " "\"(est.)\" to the size displayed.</p></qt>") .arg( kapp->aboutData()->programName() ); - QWhatsThis::add( mSize, msg ); + TQWhatsThis::add( mSize, msg ); // row 2: "Name" lineedit and label: mFileName = new KLineEdit( plainPage() ); - label = new QLabel( mFileName, i18n("&Name:"), plainPage() ); + label = new TQLabel( mFileName, i18n("&Name:"), plainPage() ); glay->addWidget( label, 2, 0 ); glay->addWidget( mFileName, 2, 1 ); @@ -116,12 +116,12 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption, "it does not specify the file to be attached; rather, it " "suggests a file name to be used by the recipient's mail agent " "when saving the part to disk.</p></qt>"); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mFileName, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mFileName, msg ); // row 3: "Description" lineedit and label: mDescription = new KLineEdit( plainPage() ); - label = new QLabel( mDescription, i18n("&Description:"), plainPage() ); + label = new TQLabel( mDescription, i18n("&Description:"), plainPage() ); glay->addWidget( label, 3, 0 ); glay->addWidget( mDescription, 3, 1 ); @@ -130,13 +130,13 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption, "much like the Subject is for the whole message; most " "mail agents will show this information in their message " "previews alongside the attachment's icon.</p></qt>"); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mDescription, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mDescription, msg ); // row 4: "Encoding" combobox and label: - mEncoding = new QComboBox( false, plainPage() ); + mEncoding = new TQComboBox( false, plainPage() ); mEncoding->insertStringList( mI18nizedEncodings ); - label = new QLabel( mEncoding, i18n("&Encoding:"), plainPage() ); + label = new TQLabel( mEncoding, i18n("&Encoding:"), plainPage() ); glay->addWidget( label, 4, 0 ); glay->addWidget( mEncoding, 4, 1 ); @@ -149,11 +149,11 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption, "\"quoted-printable\" over the default \"base64\" will save up " "to 25% in resulting message size.</p></qt>") .arg( kapp->aboutData()->programName() ); - QWhatsThis::add( label, msg ); - QWhatsThis::add( mEncoding, msg ); + TQWhatsThis::add( label, msg ); + TQWhatsThis::add( mEncoding, msg ); // row 5: "Suggest automatic display..." checkbox: - mInline = new QCheckBox( i18n("Suggest &automatic display"), plainPage() ); + mInline = new TQCheckBox( i18n("Suggest &automatic display"), plainPage() ); glay->addMultiCellWidget( mInline, 5, 5, 0, 1 ); msg = i18n("<qt><p>Check this option if you want to suggest to the " @@ -162,27 +162,27 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption, "<p>technically, this is carried out by setting this part's " "<em>Content-Disposition</em> header field to \"inline\" " "instead of the default \"attachment\".</p></qt>"); - QWhatsThis::add( mInline, msg ); + TQWhatsThis::add( mInline, msg ); // row 6: "Sign" checkbox: - mSigned = new QCheckBox( i18n("&Sign this part"), plainPage() ); + mSigned = new TQCheckBox( i18n("&Sign this part"), plainPage() ); glay->addMultiCellWidget( mSigned, 6, 6, 0, 1 ); msg = i18n("<qt><p>Check this option if you want this message part to be " "signed;</p>" "<p>the signature will be made with the key that you associated " "with the currently-selected identity.</p></qt>"); - QWhatsThis::add( mSigned, msg ); + TQWhatsThis::add( mSigned, msg ); // row 7: "Encrypt" checkbox: - mEncrypted = new QCheckBox( i18n("Encr&ypt this part"), plainPage() ); + mEncrypted = new TQCheckBox( i18n("Encr&ypt this part"), plainPage() ); glay->addMultiCellWidget( mEncrypted, 7, 7, 0, 1 ); msg = i18n("<qt><p>Check this option if you want this message part to be " "encrypted;</p>" "<p>the part will be encrypted for the recipients of this " "message</p></qt>"); - QWhatsThis::add( mEncrypted, msg ); + TQWhatsThis::add( mEncrypted, msg ); // (row 8: spacer) } @@ -190,13 +190,13 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption, KMMsgPartDialog::~KMMsgPartDialog() {} -QString KMMsgPartDialog::mimeType() const { +TQString KMMsgPartDialog::mimeType() const { return mMimeType->currentText(); } -void KMMsgPartDialog::setMimeType( const QString & mimeType ) { +void KMMsgPartDialog::setMimeType( const TQString & mimeType ) { int dummy = 0; - QString tmp = mimeType; // get rid of const'ness + TQString tmp = mimeType; // get rid of const'ness if ( mMimeType->validator() && mMimeType->validator()->validate( tmp, dummy ) ) for ( int i = 0 ; i < mMimeType->count() ; ++i ) if ( mMimeType->text( i ) == mimeType ) { @@ -208,41 +208,41 @@ void KMMsgPartDialog::setMimeType( const QString & mimeType ) { slotMimeTypeChanged( mimeType ); } -void KMMsgPartDialog::setMimeType( const QString & type, - const QString & subtype ) { - setMimeType( QString::fromLatin1("%1/%2").arg(type).arg(subtype) ); +void KMMsgPartDialog::setMimeType( const TQString & type, + const TQString & subtype ) { + setMimeType( TQString::fromLatin1("%1/%2").arg(type).arg(subtype) ); } -void KMMsgPartDialog::setMimeTypeList( const QStringList & mimeTypes ) { +void KMMsgPartDialog::setMimeTypeList( const TQStringList & mimeTypes ) { mMimeType->insertStringList( mimeTypes ); } void KMMsgPartDialog::setSize( KIO::filesize_t size, bool estimated ) { - QString text = KIO::convertSize( size ); + TQString text = KIO::convertSize( size ); if ( estimated ) text = i18n("%1: a filesize incl. unit (e.g. \"1.3 KB\")", "%1 (est.)").arg( text ); mSize->setText( text ); } -QString KMMsgPartDialog::fileName() const { +TQString KMMsgPartDialog::fileName() const { return mFileName->text(); } -void KMMsgPartDialog::setFileName( const QString & fileName ) { +void KMMsgPartDialog::setFileName( const TQString & fileName ) { mFileName->setText( fileName ); } -QString KMMsgPartDialog::description() const { +TQString KMMsgPartDialog::description() const { return mDescription->text(); } -void KMMsgPartDialog::setDescription( const QString & description ) { +void KMMsgPartDialog::setDescription( const TQString & description ) { mDescription->setText( description ); } KMMsgPartDialog::Encoding KMMsgPartDialog::encoding() const { - QString s = mEncoding->currentText(); + TQString s = mEncoding->currentText(); for ( unsigned int i = 0 ; i < mI18nizedEncodings.count() ; ++i ) if ( s == *mI18nizedEncodings.at(i) ) return encodingTypes[i].encoding; @@ -254,7 +254,7 @@ KMMsgPartDialog::Encoding KMMsgPartDialog::encoding() const { void KMMsgPartDialog::setEncoding( Encoding encoding ) { for ( int i = 0 ; i < numEncodingTypes ; ++i ) if ( encodingTypes[i].encoding == encoding ) { - QString text = *mI18nizedEncodings.at(i); + TQString text = *mI18nizedEncodings.at(i); for ( int j = 0 ; j < mEncoding->count() ; ++j ) if ( mEncoding->text(j) == text ) { mEncoding->setCurrentItem( j ); @@ -306,7 +306,7 @@ void KMMsgPartDialog::setCanSign( bool enable ) { mSigned->setEnabled( enable ); } -void KMMsgPartDialog::slotMimeTypeChanged( const QString & mimeType ) { +void KMMsgPartDialog::slotMimeTypeChanged( const TQString & mimeType ) { // message subparts MUST have 7bit or 8bit encoding... #if 0 // ...but until KMail can recode 8bit messages on attach, so that @@ -320,9 +320,9 @@ void KMMsgPartDialog::slotMimeTypeChanged( const QString & mimeType ) { #endif // find a mimetype icon: int dummy = 0; - QString tmp = mimeType; // get rid of const'ness + TQString tmp = mimeType; // get rid of const'ness if ( mMimeType->validator() && mMimeType->validator()->validate( tmp, dummy ) - == QValidator::Acceptable ) + == TQValidator::Acceptable ) mIcon->setPixmap( KMimeType::mimeType( mimeType )->pixmap( KIcon::Desktop ) ); else mIcon->setPixmap( DesktopIcon("unknown") ); @@ -331,8 +331,8 @@ void KMMsgPartDialog::slotMimeTypeChanged( const QString & mimeType ) { -KMMsgPartDialogCompat::KMMsgPartDialogCompat( QWidget * parent, const char *, bool readOnly) - : KMMsgPartDialog(QString::null, parent ), mMsgPart( 0 ) +KMMsgPartDialogCompat::KMMsgPartDialogCompat( TQWidget * parent, const char *, bool readOnly) + : KMMsgPartDialog(TQString::null, parent ), mMsgPart( 0 ) { setShownEncodings( SevenBit|EightBit|QuotedPrintable|Base64 ); if (readOnly) @@ -355,7 +355,7 @@ void KMMsgPartDialogCompat::setMsgPart( KMMessagePart * aMsgPart ) mMsgPart = aMsgPart; assert( mMsgPart ); - QCString enc = mMsgPart->cteStr(); + TQCString enc = mMsgPart->cteStr(); if ( enc == "7bit" ) setEncoding( SevenBit ); else if ( enc == "8bit" ) @@ -370,7 +370,7 @@ void KMMsgPartDialogCompat::setMsgPart( KMMessagePart * aMsgPart ) setMimeType( mMsgPart->typeStr(), mMsgPart->subtypeStr() ); setSize( mMsgPart->decodedSize() ); setInline( mMsgPart->contentDisposition() - .find( QRegExp("^\\s*inline", false) ) >= 0 ); + .find( TQRegExp("^\\s*inline", false) ) >= 0 ); } @@ -381,22 +381,22 @@ void KMMsgPartDialogCompat::applyChanges() KCursorSaver busy(KBusyPtr::busy()); // apply Content-Disposition: - QCString cDisp; + TQCString cDisp; if ( isInline() ) cDisp = "inline;"; else cDisp = "attachment;"; - QString name = fileName(); + TQString name = fileName(); if ( !name.isEmpty() || !mMsgPart->name().isEmpty()) { mMsgPart->setName( name ); - QCString encoding = KMMsgBase::autoDetectCharset( mMsgPart->charset(), + TQCString encoding = KMMsgBase::autoDetectCharset( mMsgPart->charset(), KMMessage::preferredCharsets(), name ); if ( encoding.isEmpty() ) encoding = "utf-8"; - QCString encName = KMMsgBase::encodeRFC2231String( name, encoding ); + TQCString encName = KMMsgBase::encodeRFC2231String( name, encoding ); cDisp += "\n\tfilename"; - if ( name != QString( encName ) ) + if ( name != TQString( encName ) ) cDisp += "*=" + encName; else cDisp += "=\"" + encName.replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"'; @@ -404,13 +404,13 @@ void KMMsgPartDialogCompat::applyChanges() } // apply Content-Description" - QString desc = description(); + TQString desc = description(); if ( !desc.isEmpty() || !mMsgPart->contentDescription().isEmpty() ) mMsgPart->setContentDescription( desc ); // apply Content-Type: - QCString type = mimeType().latin1(); - QCString subtype; + TQCString type = mimeType().latin1(); + TQCString subtype; int idx = type.find('/'); if ( idx < 0 ) subtype = ""; @@ -422,7 +422,7 @@ void KMMsgPartDialogCompat::applyChanges() mMsgPart->setSubtypeStr(subtype); // apply Content-Transfer-Encoding: - QCString cte; + TQCString cte; if (subtype == "rfc822" && type == "message") kdWarning( encoding() != SevenBit && encoding() != EightBit, 5006 ) << "encoding on rfc822/message must be \"7bit\" or \"8bit\"" << endl; @@ -433,7 +433,7 @@ void KMMsgPartDialogCompat::applyChanges() case Base64: default: cte = "base64"; break; } if ( cte != mMsgPart->cteStr().lower() ) { - QByteArray body = mMsgPart->bodyDecodedBinary(); + TQByteArray body = mMsgPart->bodyDecodedBinary(); mMsgPart->setCteStr( cte ); mMsgPart->setBodyEncodedBinary( body ); } diff --git a/kmail/kmmsgpartdlg.h b/kmail/kmmsgpartdlg.h index c913799cf..601d2ca3b 100644 --- a/kmail/kmmsgpartdlg.h +++ b/kmail/kmmsgpartdlg.h @@ -41,23 +41,23 @@ class KMMsgPartDialog: public KDialogBase Q_OBJECT public: - KMMsgPartDialog( const QString & caption=QString::null, - QWidget * parent=0, const char * name=0 ); + KMMsgPartDialog( const TQString & caption=TQString::null, + TQWidget * parent=0, const char * name=0 ); virtual ~KMMsgPartDialog(); /** Get the currently selected mimetype */ - QString mimeType() const; + TQString mimeType() const; /** Sets the mime type to be displayed. */ - void setMimeType( const QString & type, const QString & subtype ); + void setMimeType( const TQString & type, const TQString & subtype ); /** This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Sets the mime type to be displayed, but only if @p mimeType passes KMimeTypeValidator's test. */ - void setMimeType( const QString & mimeType ); + void setMimeType( const TQString & mimeType ); /** Sets the initial list of mime types to be displayed in the combobox. The items are @em not validated. */ - void setMimeTypeList( const QStringList & mimeTypes ); + void setMimeTypeList( const TQStringList & mimeTypes ); /** Sets the size of the file to be attached in bytes. This is strictly informational and thus can't be queried. If @p approx @@ -67,18 +67,18 @@ public: /** Returns the current file name of the attachment. Note that this doesn't define which file is being attached. It only defines what the attachment's filename parameter should contain. */ - QString fileName() const; + TQString fileName() const; /** Sets the file name of the attachment. Note that this doesn't define which file is being attached. It only defines what the attachment's filename parameter should contain. */ - void setFileName( const QString & fileName ); + void setFileName( const TQString & fileName ); /** Returns the content of the Content-Description header field. This field is only informational. */ - QString description() const; + TQString description() const; /** Sets the description of the attachment, ie. the content of the Content-Description header field. */ - void setDescription( const QString & description ); + void setDescription( const TQString & description ); /** The list of supported encodings */ enum Encoding { @@ -119,19 +119,19 @@ public: void setCanSign( bool enable ); protected slots: - void slotMimeTypeChanged( const QString & mimeType ); + void slotMimeTypeChanged( const TQString & mimeType ); protected: KComboBox *mMimeType; - QLabel *mIcon; - QLabel *mSize; - QLineEdit *mFileName; - QLineEdit *mDescription; - QComboBox *mEncoding; - QCheckBox *mInline; - QCheckBox *mEncrypted; - QCheckBox *mSigned; - QStringList mI18nizedEncodings; + TQLabel *mIcon; + TQLabel *mSize; + TQLineEdit *mFileName; + TQLineEdit *mDescription; + TQComboBox *mEncoding; + TQCheckBox *mInline; + TQCheckBox *mEncrypted; + TQCheckBox *mSigned; + TQStringList mI18nizedEncodings; }; /** @short The attachment dialog with convenience backward compatible methods @@ -140,7 +140,7 @@ protected: class KMMsgPartDialogCompat : public KMMsgPartDialog { Q_OBJECT public: - KMMsgPartDialogCompat( QWidget * parent=0, const char * caption=0, bool=FALSE ); + KMMsgPartDialogCompat( TQWidget * parent=0, const char * caption=0, bool=FALSE ); virtual ~KMMsgPartDialogCompat(); /** Display information about this message part. */ diff --git a/kmail/kmpopfiltercnfrmdlg.cpp b/kmail/kmpopfiltercnfrmdlg.cpp index a51333e21..2654f52ca 100644 --- a/kmail/kmpopfiltercnfrmdlg.cpp +++ b/kmail/kmpopfiltercnfrmdlg.cpp @@ -12,12 +12,12 @@ #include "kmpopfiltercnfrmdlg.h" #include "kmheaders.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qheader.h> -#include <qcheckbox.h> -#include <qvgroupbox.h> -#include <qtimer.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqheader.h> +#include <tqcheckbox.h> +#include <tqvgroupbox.h> +#include <tqtimer.h> #include <klocale.h> #include <kio/global.h> @@ -26,15 +26,15 @@ //////////////////////////////////////// /// view -KMPopHeadersView::KMPopHeadersView(QWidget *aParent, KMPopFilterCnfrmDlg *aDialog) +KMPopHeadersView::KMPopHeadersView(TQWidget *aParent, KMPopFilterCnfrmDlg *aDialog) : KListView(aParent) { mDialog=aDialog; - int mDownIndex=addColumn(QIconSet(QPixmap(mDown)), QString::null, 24); + int mDownIndex=addColumn(TQIconSet(TQPixmap(mDown)), TQString::null, 24); assert( mDownIndex == Down ); //This code relies on the fact that radiobuttons are the first three columns for easier Column-Action mapping //it does not necessarily be true - you could redefine mapToColumn and mapToAction to eg. shift those numbers by 1 - addColumn(QIconSet(QPixmap(mLater)), QString::null, 24); - addColumn(QIconSet(QPixmap(mDel)), QString::null, 24); + addColumn(TQIconSet(TQPixmap(mLater)), TQString::null, 24); + addColumn(TQIconSet(TQPixmap(mDel)), TQString::null, 24); /*int subjCol =*/ addColumn(i18n("Subject"), 180); /*int sendCol =*/ addColumn(i18n("Sender"), 150); @@ -61,8 +61,8 @@ KMPopHeadersView::KMPopHeadersView(QWidget *aParent, KMPopFilterCnfrmDlg *aDialo //we rely on fixed column order, so we forbid this header()->setMovingEnabled(false); - connect(this, SIGNAL(pressed(QListViewItem*, const QPoint&, int)), - SLOT(slotPressed(QListViewItem*, const QPoint&, int))); + connect(this, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)), + TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int))); } KMPopHeadersView::~KMPopHeadersView() @@ -70,7 +70,7 @@ KMPopHeadersView::~KMPopHeadersView() } //Handle keystrokes - Left and Right key select previous/next action correspondingly -void KMPopHeadersView::keyPressEvent( QKeyEvent *e ) +void KMPopHeadersView::keyPressEvent( TQKeyEvent *e ) { if (e->key() == Key_Left) { KMPopHeadersViewItem *item = dynamic_cast<KMPopHeadersViewItem*>( selectedItem() ); @@ -89,11 +89,11 @@ void KMPopHeadersView::keyPressEvent( QKeyEvent *e ) } } } else { - QListView::keyPressEvent( e ); + TQListView::keyPressEvent( e ); } } -void KMPopHeadersView::slotPressed(QListViewItem* aItem, const QPoint&, int aColumn) { +void KMPopHeadersView::slotPressed(TQListViewItem* aItem, const TQPoint&, int aColumn) { if ( !( aItem && aColumn>=0 && aColumn<NoAction ) ) return; KMPopHeadersViewItem *item = dynamic_cast<KMPopHeadersViewItem*>(aItem); assert( item ); @@ -238,9 +238,9 @@ KMPopHeadersViewItem::KMPopHeadersViewItem(KMPopHeadersView *aParent, KMPopFilte mParent = aParent; mAction = NoAction; - setPixmap(mParent->mapToColumn(Delete), QPixmap(KMPopHeadersView::mUnchecked)); - setPixmap(mParent->mapToColumn(Down), QPixmap(KMPopHeadersView::mUnchecked)); - setPixmap(mParent->mapToColumn(Later), QPixmap(KMPopHeadersView::mUnchecked)); + setPixmap(mParent->mapToColumn(Delete), TQPixmap(KMPopHeadersView::mUnchecked)); + setPixmap(mParent->mapToColumn(Down), TQPixmap(KMPopHeadersView::mUnchecked)); + setPixmap(mParent->mapToColumn(Later), TQPixmap(KMPopHeadersView::mUnchecked)); setAction( aAction ); } @@ -253,17 +253,17 @@ void KMPopHeadersViewItem::setAction(KMPopFilterAction aAction) { if(aAction != NoAction && aAction!=mAction) { - if ( mAction!=NoAction ) setPixmap(mParent->mapToColumn(mAction), QPixmap(KMPopHeadersView::mUnchecked)); - setPixmap(mParent->mapToColumn(aAction), QPixmap(KMPopHeadersView::mChecked)); + if ( mAction!=NoAction ) setPixmap(mParent->mapToColumn(mAction), TQPixmap(KMPopHeadersView::mUnchecked)); + setPixmap(mParent->mapToColumn(aAction), TQPixmap(KMPopHeadersView::mChecked)); mAction=aAction; } } -void KMPopHeadersViewItem::paintFocus(QPainter *, const QColorGroup &, const QRect &) +void KMPopHeadersViewItem::paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) { } -QString KMPopHeadersViewItem::key(int col, bool) const +TQString KMPopHeadersViewItem::key(int col, bool) const { if (col == 3) return KMMsgBase::skipKeyword(text(col).lower()); if (col == 6) return text(8); @@ -277,7 +277,7 @@ QString KMPopHeadersViewItem::key(int col, bool) const /// dlg ///////////////////////////////////////// ///////////////////////////////////////// -KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const QString &aAccount, bool aShowLaterMsgs, QWidget *aParent, const char *aName) +KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(TQPtrList<KMPopHeaders> *aHeaders, const TQString &aAccount, bool aShowLaterMsgs, TQWidget *aParent, const char *aName) : KDialogBase(aParent, aName, true, i18n("POP Filter"), Ok | Help, Ok, false) { unsigned int rulesetCount = 0; @@ -285,26 +285,26 @@ KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const mShowLaterMsgs = aShowLaterMsgs; mLowerBoxVisible = false; - QWidget *w = new QWidget(this); + TQWidget *w = new TQWidget(this); setMainWidget(w); - QVBoxLayout *vbl = new QVBoxLayout(w, 0, spacingHint()); + TQVBoxLayout *vbl = new TQVBoxLayout(w, 0, spacingHint()); - QLabel *l = new QLabel(i18n("Messages to filter found on POP Account: <b>%1</b><p>" + TQLabel *l = new TQLabel(i18n("Messages to filter found on POP Account: <b>%1</b><p>" "The messages shown exceed the maximum size limit you defined for this account.<br>You can select " "what you want to do with them by checking the appropriate button.").arg(aAccount), w); vbl->addWidget(l); - QVGroupBox *upperBox = new QVGroupBox(i18n("Messages Exceeding Size"), w); + TQVGroupBox *upperBox = new TQVGroupBox(i18n("Messages Exceeding Size"), w); upperBox->hide(); KMPopHeadersView *lv = new KMPopHeadersView(upperBox, this); vbl->addWidget(upperBox); - QVGroupBox *lowerBox = new QVGroupBox(i18n("Ruleset Filtered Messages: none"), w); - QString checkBoxText((aShowLaterMsgs)? + TQVGroupBox *lowerBox = new TQVGroupBox(i18n("Ruleset Filtered Messages: none"), w); + TQString checkBoxText((aShowLaterMsgs)? i18n("Show messages matched by a ruleset and tagged 'Download' or 'Delete'"): i18n("Show messages matched by a filter ruleset")); - QCheckBox* cb = new QCheckBox(checkBoxText, lowerBox); + TQCheckBox* cb = new TQCheckBox(checkBoxText, lowerBox); cb->setEnabled(false); mFilteredHeaders = new KMPopHeadersView(lowerBox, this); mFilteredHeaders->hide(); @@ -363,15 +363,15 @@ KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const lowerBox->setTitle(i18n("Ruleset Filtered Messages: %1").arg(rulesetCount)); // connect signals and slots - connect(lv, SIGNAL(pressed(QListViewItem*, const QPoint&, int)), - this, SLOT(slotPressed(QListViewItem*, const QPoint&, int))); - connect(mFilteredHeaders, SIGNAL(pressed(QListViewItem*, const QPoint&, int)), - this, SLOT(slotPressed(QListViewItem*, const QPoint&, int))); - connect(cb, SIGNAL(toggled(bool)), - this, SLOT(slotToggled(bool))); + connect(lv, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int))); + connect(mFilteredHeaders, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int))); + connect(cb, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggled(bool))); adjustSize(); - QTimer::singleShot(0, this, SLOT(slotUpdateMinimumSize())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateMinimumSize())); } KMPopFilterCnfrmDlg::~KMPopFilterCnfrmDlg() @@ -381,7 +381,7 @@ KMPopFilterCnfrmDlg::~KMPopFilterCnfrmDlg() void KMPopFilterCnfrmDlg::setupLVI(KMPopHeadersViewItem *lvi, KMMessage *msg) { // set the subject - QString tmp = msg->subject(); + TQString tmp = msg->subject(); if(tmp.isEmpty()) tmp = i18n("no subject"); lvi->setText(3, tmp); @@ -406,7 +406,7 @@ void KMPopFilterCnfrmDlg::setupLVI(KMPopHeadersViewItem *lvi, KMMessage *msg) lvi->setText(8, msg->dateIsoStr()); } -void KMPopFilterCnfrmDlg::setAction(QListViewItem *aItem, KMPopFilterAction aAction) +void KMPopFilterCnfrmDlg::setAction(TQListViewItem *aItem, KMPopFilterAction aAction) { mItemMap[aItem]->setAction(aAction); } @@ -416,7 +416,7 @@ void KMPopFilterCnfrmDlg::setAction(QListViewItem *aItem, KMPopFilterAction aAct click happened over a radio button column. Of course the radio button state is changed as well if the above is true. */ -void KMPopFilterCnfrmDlg::slotPressed(QListViewItem *aItem, const QPoint &, int aColumn) +void KMPopFilterCnfrmDlg::slotPressed(TQListViewItem *aItem, const TQPoint &, int aColumn) { if ( aColumn>=0 && aColumn<NoAction ) setAction(aItem,KMPopHeadersView::mapToAction(aColumn)); } @@ -459,7 +459,7 @@ void KMPopFilterCnfrmDlg::slotToggled(bool aOn) mFilteredHeaders->hide(); } } - QTimer::singleShot(0, this, SLOT(slotUpdateMinimumSize())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateMinimumSize())); } void KMPopFilterCnfrmDlg::slotUpdateMinimumSize() diff --git a/kmail/kmpopfiltercnfrmdlg.h b/kmail/kmpopfiltercnfrmdlg.h index 745fdcdd5..35548c27b 100644 --- a/kmail/kmpopfiltercnfrmdlg.h +++ b/kmail/kmpopfiltercnfrmdlg.h @@ -23,8 +23,8 @@ #include <kdialogbase.h> #include <klistview.h> -#include <qptrlist.h> -#include <qmap.h> +#include <tqptrlist.h> +#include <tqmap.h> class QWidget; class QString; @@ -38,7 +38,7 @@ class KMPopHeadersView : public KListView Q_OBJECT public: - KMPopHeadersView(QWidget *aParent=0, KMPopFilterCnfrmDlg *aDialog=0); + KMPopHeadersView(TQWidget *aParent=0, KMPopFilterCnfrmDlg *aDialog=0); ~KMPopHeadersView(); static const KMPopFilterAction mapToAction(int aColumn) { return (KMPopFilterAction)aColumn;}; static const int mapToColumn(KMPopFilterAction aAction) { return (int)aAction;}; @@ -48,10 +48,10 @@ protected: static const char *mLater[25]; static const char *mDown[20]; static const char *mDel[19]; - void keyPressEvent( QKeyEvent *k); + void keyPressEvent( TQKeyEvent *k); protected slots: // Protected slots - void slotPressed(QListViewItem* aItem, const QPoint& aPoint, int aColumn); + void slotPressed(TQListViewItem* aItem, const TQPoint& aPoint, int aColumn); private: KMPopFilterCnfrmDlg *mDialog; @@ -66,8 +66,8 @@ public: ~KMPopHeadersViewItem(); void setAction(KMPopFilterAction aAction); KMPopFilterAction action() { return mAction; }; - virtual void paintFocus(QPainter *, const QColorGroup & cg, const QRect &r); - virtual QString key(int col, bool ascending) const; + virtual void paintFocus(TQPainter *, const TQColorGroup & cg, const TQRect &r); + virtual TQString key(int col, bool ascending) const; protected: KMPopHeadersView *mParent; KMPopFilterAction mAction; @@ -80,9 +80,9 @@ class KMPopFilterCnfrmDlg : public KDialogBase Q_OBJECT protected: KMPopFilterCnfrmDlg() { }; - QMap<QListViewItem*, KMPopHeaders*> mItemMap; - QPtrList<KMPopHeadersViewItem> mDelList; - QPtrList<KMPopHeaders> mDDLList; + TQMap<TQListViewItem*, KMPopHeaders*> mItemMap; + TQPtrList<KMPopHeadersViewItem> mDelList; + TQPtrList<KMPopHeaders> mDDLList; KMPopHeadersView *mFilteredHeaders; bool mLowerBoxVisible; bool mShowLaterMsgs; @@ -90,11 +90,11 @@ protected: public: - KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const QString &aAccount, bool aShowLaterMsgs = false, QWidget *aParent=0, const char *aName=0); + KMPopFilterCnfrmDlg(TQPtrList<KMPopHeaders> *aHeaders, const TQString &aAccount, bool aShowLaterMsgs = false, TQWidget *aParent=0, const char *aName=0); ~KMPopFilterCnfrmDlg(); public: - void setAction(QListViewItem *aItem, KMPopFilterAction aAction); + void setAction(TQListViewItem *aItem, KMPopFilterAction aAction); protected slots: // Protected slots /** @@ -103,7 +103,7 @@ protected slots: // Protected slots click happened over a radio button column. Of course the radio button state is changed as well if the above is true. */ - void slotPressed(QListViewItem *aItem, const QPoint &aPnt, int aColumn); + void slotPressed(TQListViewItem *aItem, const TQPoint &aPnt, int aColumn); void slotToggled(bool aOn); void slotUpdateMinimumSize(); }; diff --git a/kmail/kmpopheaders.cpp b/kmail/kmpopheaders.cpp index 8c5866007..85445abd2 100644 --- a/kmail/kmpopheaders.cpp +++ b/kmail/kmpopheaders.cpp @@ -27,7 +27,7 @@ KMPopHeaders::~KMPopHeaders(){ } /** No descriptions */ -KMPopHeaders::KMPopHeaders(const QString& aId, const QString& aUid, KMPopFilterAction aAction) +KMPopHeaders::KMPopHeaders(const TQString& aId, const TQString& aUid, KMPopFilterAction aAction) : mAction(aAction), mId(aId), mUid(aUid), @@ -37,12 +37,12 @@ KMPopHeaders::KMPopHeaders(const QString& aId, const QString& aUid, KMPopFilterA } /** No descriptions */ -QString KMPopHeaders::id() const{ +TQString KMPopHeaders::id() const{ return mId; } /** No descriptions */ -QString KMPopHeaders::uid() const{ +TQString KMPopHeaders::uid() const{ return mUid; } diff --git a/kmail/kmpopheaders.h b/kmail/kmpopheaders.h index 0106319f4..bb7cc5b5a 100644 --- a/kmail/kmpopheaders.h +++ b/kmail/kmpopheaders.h @@ -11,7 +11,7 @@ #ifndef KMPopHeaders_H #define KMPopHeaders_H -#include <qstring.h> +#include <tqstring.h> #include "kmmessage.h" @@ -24,13 +24,13 @@ public: KMPopHeaders(); ~KMPopHeaders(); /** constructor */ - KMPopHeaders(const QString& aId, const QString& aUid, KMPopFilterAction aAction); + KMPopHeaders(const TQString& aId, const TQString& aUid, KMPopFilterAction aAction); /** returns the id of the message */ - QString id() const; + TQString id() const; /** returns the uid of the message */ - QString uid() const; + TQString uid() const; /** returns the header of the message */ KMMessage * header() const; @@ -51,9 +51,9 @@ protected: // Protected attributes /** */ KMPopFilterAction mAction; /** */ - QString mId; + TQString mId; /** */ - QString mUid; + TQString mUid; /** */ bool mRuleMatched; /** */ diff --git a/kmail/kmreadermainwin.cpp b/kmail/kmreadermainwin.cpp index 655e09181..8e77ad9d7 100644 --- a/kmail/kmreadermainwin.cpp +++ b/kmail/kmreadermainwin.cpp @@ -26,7 +26,7 @@ #include <config.h> #endif -#include <qaccel.h> +#include <tqaccel.h> #include <kapplication.h> #include <kedittoolbar.h> #include <klocale.h> @@ -79,8 +79,8 @@ KMReaderMainWin::KMReaderMainWin( char *name ) //----------------------------------------------------------------------------- KMReaderMainWin::KMReaderMainWin(KMMessagePart* aMsgPart, - bool aHTML, const QString& aFileName, const QString& pname, - const QString & encoding, char *name ) + bool aHTML, const TQString& aFileName, const TQString& pname, + const TQString & encoding, char *name ) : KMail::SecondaryWindow( name ? name : "readerwindow#" ), mMsg( 0 ) { @@ -103,13 +103,13 @@ void KMReaderMainWin::initKMReaderMainWin() { toolBar( "mainToolBar" )->hide(); } - connect( kmkernel, SIGNAL( configChanged() ), - this, SLOT( slotConfigChanged() ) ); + connect( kmkernel, TQT_SIGNAL( configChanged() ), + this, TQT_SLOT( slotConfigChanged() ) ); } void KMReaderMainWin::setupForwardingActionsList() { - QPtrList<KAction> mForwardActionList; + TQPtrList<KAction> mForwardActionList; if ( GlobalSettings::self()->forwardingInlineByDefault() ) { unplugActionList( "forward_action_list" ); mForwardActionList.append( mForwardInlineAction ); @@ -140,7 +140,7 @@ void KMReaderMainWin::setUseFixedFont( bool useFixedFont ) } //----------------------------------------------------------------------------- -void KMReaderMainWin::showMsg( const QString & encoding, KMMessage *msg ) +void KMReaderMainWin::showMsg( const TQString & encoding, KMMessage *msg ) { mReaderWin->setOverrideEncoding( encoding ); mReaderWin->setMsg( msg, true ); @@ -151,11 +151,11 @@ void KMReaderMainWin::showMsg( const QString & encoding, KMMessage *msg ) menuBar()->show(); toolBar( "mainToolBar" )->show(); - connect ( msg->parent(), SIGNAL( destroyed( QObject* ) ), this, SLOT( slotFolderRemoved( QObject* ) ) ); + connect ( msg->parent(), TQT_SIGNAL( destroyed( TQObject* ) ), this, TQT_SLOT( slotFolderRemoved( TQObject* ) ) ); } -void KMReaderMainWin::slotFolderRemoved( QObject* folderPtr ) +void KMReaderMainWin::slotFolderRemoved( TQObject* folderPtr ) { assert(mMsg); assert(folderPtr == mMsg->parent()); @@ -289,38 +289,38 @@ void KMReaderMainWin::setupAccel() mMsgActions = new KMail::MessageActions( actionCollection(), this ); mMsgActions->setMessageView( mReaderWin ); //----- File Menu - //mOpenAction = KStdAction::open( this, SLOT( slotOpenMsg() ), + //mOpenAction = KStdAction::open( this, TQT_SLOT( slotOpenMsg() ), // actionCollection() ); //mSaveAsAction = new KAction( i18n("Save &As..."), "filesave", // KStdAccel::shortcut( KStdAccel::Save ), - // this, SLOT( slotSaveMsg() ), + // this, TQT_SLOT( slotSaveMsg() ), // actionCollection(), "file_save_as" ); - mSaveAsAction = KStdAction::saveAs( mReaderWin, SLOT( slotSaveMsg() ), + mSaveAsAction = KStdAction::saveAs( mReaderWin, TQT_SLOT( slotSaveMsg() ), actionCollection() ); mSaveAsAction->setShortcut( KStdAccel::shortcut( KStdAccel::Save ) ); - mPrintAction = KStdAction::print( this, SLOT( slotPrintMsg() ), + mPrintAction = KStdAction::print( this, TQT_SLOT( slotPrintMsg() ), actionCollection() ); - KAction *closeAction = KStdAction::close( this, SLOT( close() ), actionCollection() ); + KAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() ); KShortcut closeShortcut = closeAction->shortcut(); closeShortcut.append( KKey(Key_Escape)); closeAction->setShortcut(closeShortcut); //----- Edit Menu - KStdAction::copy( this, SLOT( slotCopy() ), actionCollection() ); - KStdAction::selectAll( this, SLOT( slotMarkAll() ), actionCollection() ); - KStdAction::find( this, SLOT(slotFind()), actionCollection() ); - KStdAction::findNext( this, SLOT( slotFindNext() ), actionCollection() ); + KStdAction::copy( this, TQT_SLOT( slotCopy() ), actionCollection() ); + KStdAction::selectAll( this, TQT_SLOT( slotMarkAll() ), actionCollection() ); + KStdAction::find( this, TQT_SLOT(slotFind()), actionCollection() ); + KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), actionCollection() ); mTrashAction = new KAction( KGuiItem( i18n( "&Move to Trash" ), "edittrash", i18n( "Move message to trashcan" ) ), - Key_Delete, this, SLOT( slotTrashMsg() ), + Key_Delete, this, TQT_SLOT( slotTrashMsg() ), actionCollection(), "move_to_trash" ); //----- View Menu mViewSourceAction = new KAction( i18n("&View Source"), Key_V, this, - SLOT(slotShowMsgSrc()), actionCollection(), + TQT_SLOT(slotShowMsgSrc()), actionCollection(), "view_source" ); @@ -329,25 +329,25 @@ void KMReaderMainWin::setupAccel() "message_forward" ); mForwardInlineAction = new KAction( i18n("&Inline..."), "mail_forward", SHIFT+Key_F, this, - SLOT(slotForwardInlineMsg()), + TQT_SLOT(slotForwardInlineMsg()), actionCollection(), "message_forward_inline" ); mForwardAttachedAction = new KAction( i18n("Message->Forward->","As &Attachment..."), "mail_forward", Key_F, this, - SLOT(slotForwardAttachedMsg()), + TQT_SLOT(slotForwardAttachedMsg()), actionCollection(), "message_forward_as_attachment" ); mForwardDigestAction = new KAction( i18n("Message->Forward->","As Di&gest..."), "mail_forward", 0, this, - SLOT(slotForwardDigestMsg()), + TQT_SLOT(slotForwardDigestMsg()), actionCollection(), "message_forward_as_digest" ); mRedirectAction = new KAction( i18n("Message->Forward->","&Redirect..."), "mail_forward", Key_E, this, - SLOT(slotRedirectMsg()), + TQT_SLOT(slotRedirectMsg()), actionCollection(), "message_forward_redirect" ); @@ -356,15 +356,15 @@ void KMReaderMainWin::setupAccel() mForwardActionMenu->insert( mForwardAttachedAction ); mForwardInlineAction->setShortcut( Key_F ); mForwardAttachedAction->setShortcut( SHIFT+Key_F ); - connect( mForwardActionMenu, SIGNAL(activated()), this, - SLOT(slotForwardInlineMsg()) ); + connect( mForwardActionMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotForwardInlineMsg()) ); } else { mForwardActionMenu->insert( mForwardAttachedAction ); mForwardActionMenu->insert( mForwardInlineAction ); mForwardInlineAction->setShortcut( SHIFT+Key_F ); mForwardAttachedAction->setShortcut( Key_F ); - connect( mForwardActionMenu, SIGNAL(activated()), this, - SLOT(slotForwardAttachedMsg()) ); + connect( mForwardActionMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotForwardAttachedMsg()) ); } mForwardActionMenu->insert( mForwardDigestAction ); @@ -373,36 +373,36 @@ void KMReaderMainWin::setupAccel() fontAction = new KFontAction( "Select Font", 0, actionCollection(), "text_font" ); fontAction->setFont( mReaderWin->cssHelper()->bodyFont().family() ); - connect( fontAction, SIGNAL( activated( const QString& ) ), - SLOT( slotFontAction( const QString& ) ) ); + connect( fontAction, TQT_SIGNAL( activated( const TQString& ) ), + TQT_SLOT( slotFontAction( const TQString& ) ) ); fontSizeAction = new KFontSizeAction( "Select Size", 0, actionCollection(), "text_size" ); fontSizeAction->setFontSize( mReaderWin->cssHelper()->bodyFont().pointSize() ); - connect( fontSizeAction, SIGNAL( fontSizeChanged( int ) ), - SLOT( slotSizeAction( int ) ) ); + connect( fontSizeAction, TQT_SIGNAL( fontSizeChanged( int ) ), + TQT_SLOT( slotSizeAction( int ) ) ); - QAccel *accel = new QAccel(mReaderWin, "showMsg()"); + TQAccel *accel = new TQAccel(mReaderWin, "showMsg()"); accel->connectItem(accel->insertItem(Key_Up), - mReaderWin, SLOT(slotScrollUp())); + mReaderWin, TQT_SLOT(slotScrollUp())); accel->connectItem(accel->insertItem(Key_Down), - mReaderWin, SLOT(slotScrollDown())); + mReaderWin, TQT_SLOT(slotScrollDown())); accel->connectItem(accel->insertItem(Key_Prior), - mReaderWin, SLOT(slotScrollPrior())); + mReaderWin, TQT_SLOT(slotScrollPrior())); accel->connectItem(accel->insertItem(Key_Next), - mReaderWin, SLOT(slotScrollNext())); + mReaderWin, TQT_SLOT(slotScrollNext())); accel->connectItem(accel->insertItem(KStdAccel::shortcut(KStdAccel::Copy)), - mReaderWin, SLOT(slotCopySelectedText())); - connect( mReaderWin, SIGNAL(popupMenu(KMMessage&,const KURL&,const QPoint&)), - this, SLOT(slotMsgPopup(KMMessage&,const KURL&,const QPoint&))); - connect(mReaderWin, SIGNAL(urlClicked(const KURL&,int)), - mReaderWin, SLOT(slotUrlClicked())); + mReaderWin, TQT_SLOT(slotCopySelectedText())); + connect( mReaderWin, TQT_SIGNAL(popupMenu(KMMessage&,const KURL&,const TQPoint&)), + this, TQT_SLOT(slotMsgPopup(KMMessage&,const KURL&,const TQPoint&))); + connect(mReaderWin, TQT_SIGNAL(urlClicked(const KURL&,int)), + mReaderWin, TQT_SLOT(slotUrlClicked())); setStandardToolBarMenuEnabled(true); - KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()), actionCollection()); } -void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoint& aPoint) +void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const TQPoint& aPoint) { KPopupMenu * menu = new KPopupMenu; mUrl = aUrl; @@ -462,7 +462,7 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi menu->insertSeparator(); } - QPopupMenu* copyMenu = new QPopupMenu(menu); + TQPopupMenu* copyMenu = new TQPopupMenu(menu); KMMainWidget* mainwin = kmkernel->getKMMainWidget(); if ( mainwin ) mainwin->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this, @@ -474,7 +474,7 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi menu->insertSeparator(); mPrintAction->plug( menu ); mSaveAsAction->plug( menu ); - menu->insertItem( i18n("Save Attachments..."), mReaderWin, SLOT(slotSaveAttachments()) ); + menu->insertItem( i18n("Save Attachments..."), mReaderWin, TQT_SLOT(slotSaveAttachments()) ); mMsgActions->createTodoAction()->plug( menu ); } menu->exec(aPoint, 0); @@ -490,9 +490,9 @@ void KMReaderMainWin::copySelectedToFolder( int menuId ) command->start(); } -void KMReaderMainWin::slotFontAction( const QString& font) +void KMReaderMainWin::slotFontAction( const TQString& font) { - QFont f( mReaderWin->cssHelper()->bodyFont() ); + TQFont f( mReaderWin->cssHelper()->bodyFont() ); f.setFamily( font ); mReaderWin->cssHelper()->setBodyFont( f ); mReaderWin->cssHelper()->setPrintFont( f ); @@ -502,7 +502,7 @@ void KMReaderMainWin::slotFontAction( const QString& font) void KMReaderMainWin::slotSizeAction( int size ) { - QFont f( mReaderWin->cssHelper()->bodyFont() ); + TQFont f( mReaderWin->cssHelper()->bodyFont() ); f.setPointSize( size ); mReaderWin->cssHelper()->setBodyFont( f ); mReaderWin->cssHelper()->setPrintFont( f ); @@ -522,7 +522,7 @@ void KMReaderMainWin::slotEditToolbars() { saveMainWindowSettings( KMKernel::config(), "ReaderWindow" ); KEditToolbar dlg( guiFactory(), this ); - connect( &dlg, SIGNAL(newToolbarConfig()), SLOT(slotUpdateToolbars()) ); + connect( &dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(slotUpdateToolbars()) ); dlg.exec(); } diff --git a/kmail/kmreadermainwin.h b/kmail/kmreadermainwin.h index 1e62a4e79..2d19324b6 100644 --- a/kmail/kmreadermainwin.h +++ b/kmail/kmreadermainwin.h @@ -30,14 +30,14 @@ public: KMReaderMainWin( bool htmlOverride, bool htmlLoadExtOverride, char *name = 0 ); KMReaderMainWin( char *name = 0 ); KMReaderMainWin(KMMessagePart* aMsgPart, - bool aHTML, const QString& aFileName, const QString& pname, - const QString & encoding, char *name = 0 ); + bool aHTML, const TQString& aFileName, const TQString& pname, + const TQString & encoding, char *name = 0 ); virtual ~KMReaderMainWin(); void setUseFixedFont( bool useFixedFont ); // take ownership of and show @param msg - void showMsg( const QString & encoding, KMMessage *msg ); + void showMsg( const TQString & encoding, KMMessage *msg ); /** * Sets up action list for forward menu. @@ -45,7 +45,7 @@ public: void setupForwardingActionsList(); private slots: - void slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoint& aPoint); + void slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const TQPoint& aPoint); /** Copy selected messages to folder with corresponding to given menuid */ void copySelectedToFolder( int menuId ); @@ -60,7 +60,7 @@ private slots: void slotCopy(); void slotFind(); void slotFindNext(); - void slotFontAction(const QString &); + void slotFontAction(const TQString &); void slotSizeAction(int); void slotCreateTodo(); void slotEditToolbars(); @@ -68,7 +68,7 @@ private slots: void slotConfigChanged(); void slotUpdateToolbars(); - void slotFolderRemoved( QObject* folderPtr ); + void slotFolderRemoved( TQObject* folderPtr ); private: void initKMReaderMainWin(); @@ -77,7 +77,7 @@ private: KMReaderWin *mReaderWin; KMMessage *mMsg; KURL mUrl; - QMap<int,KMFolder*> mMenuToFolder; + TQMap<int,KMFolder*> mMenuToFolder; // a few actions duplicated from kmmainwidget KAction *mTrashAction, *mPrintAction, *mSaveAsAction, *mForwardInlineAction, *mForwardAttachedAction, *mForwardDigestAction, *mRedirectAction, diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp index c3030304c..b5ee41052 100644 --- a/kmail/kmreaderwin.cpp +++ b/kmail/kmreaderwin.cpp @@ -110,14 +110,14 @@ using KMail::TeeHtmlWriter; #include <kasciistricmp.h> #include <kurldrag.h> -#include <qclipboard.h> -#include <qhbox.h> -#include <qtextcodec.h> -#include <qpaintdevicemetrics.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qsplitter.h> -#include <qstyle.h> +#include <tqclipboard.h> +#include <tqhbox.h> +#include <tqtextcodec.h> +#include <tqpaintdevicemetrics.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqsplitter.h> +#include <tqstyle.h> // X headers... #undef Never @@ -140,16 +140,16 @@ class NewByteArray : public QByteArray public: NewByteArray &appendNULL(); NewByteArray &operator+=( const char * ); - NewByteArray &operator+=( const QByteArray & ); - NewByteArray &operator+=( const QCString & ); - QByteArray& qByteArray(); + NewByteArray &operator+=( const TQByteArray & ); + NewByteArray &operator+=( const TQCString & ); + TQByteArray& qByteArray(); }; NewByteArray& NewByteArray::appendNULL() { - QByteArray::detach(); + TQByteArray::detach(); uint len1 = size(); - if ( !QByteArray::resize( len1 + 1 ) ) + if ( !TQByteArray::resize( len1 + 1 ) ) return *this; *(data() + len1) = '\0'; return *this; @@ -158,41 +158,41 @@ NewByteArray& NewByteArray::operator+=( const char * newData ) { if ( !newData ) return *this; - QByteArray::detach(); + TQByteArray::detach(); uint len1 = size(); uint len2 = qstrlen( newData ); - if ( !QByteArray::resize( len1 + len2 ) ) + if ( !TQByteArray::resize( len1 + len2 ) ) return *this; memcpy( data() + len1, newData, len2 ); return *this; } -NewByteArray& NewByteArray::operator+=( const QByteArray & newData ) +NewByteArray& NewByteArray::operator+=( const TQByteArray & newData ) { if ( newData.isNull() ) return *this; - QByteArray::detach(); + TQByteArray::detach(); uint len1 = size(); uint len2 = newData.size(); - if ( !QByteArray::resize( len1 + len2 ) ) + if ( !TQByteArray::resize( len1 + len2 ) ) return *this; memcpy( data() + len1, newData.data(), len2 ); return *this; } -NewByteArray& NewByteArray::operator+=( const QCString & newData ) +NewByteArray& NewByteArray::operator+=( const TQCString & newData ) { if ( newData.isEmpty() ) return *this; - QByteArray::detach(); + TQByteArray::detach(); uint len1 = size(); uint len2 = newData.length(); // forget about the trailing 0x00 ! - if ( !QByteArray::resize( len1 + len2 ) ) + if ( !TQByteArray::resize( len1 + len2 ) ) return *this; memcpy( data() + len1, newData.data(), len2 ); return *this; } -QByteArray& NewByteArray::qByteArray() +TQByteArray& NewByteArray::qByteArray() { - return *((QByteArray*)this); + return *((TQByteArray*)this); } // This function returns the complete data that were in this @@ -205,8 +205,8 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node, bool weAreReplacingTheRootNode, int recCount ) { - kdDebug(5006) << QString("-------------------------------------------------" ) << endl; - kdDebug(5006) << QString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").arg( recCount ) << endl; + kdDebug(5006) << TQString("-------------------------------------------------" ) << endl; + kdDebug(5006) << TQString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").arg( recCount ) << endl; if( node ) { partNode* curNode = node; partNode* dataNode = curNode; @@ -392,15 +392,15 @@ kdDebug(5006) << " new Content-Type = " << headers->ContentType( // B) Store the body of this part. if( headers && bIsMultipart && dataNode->firstChild() ) { kdDebug(5006) << "is valid Multipart, processing children:" << endl; - QCString boundary = headers->ContentType().Boundary().c_str(); + TQCString boundary = headers->ContentType().Boundary().c_str(); curNode = dataNode->firstChild(); // store children of multipart while( curNode ) { kdDebug(5006) << "--boundary" << endl; if( resultingData.size() && ( '\n' != resultingData.at( resultingData.size()-1 ) ) ) - resultingData += QCString( "\n" ); - resultingData += QCString( "\n" ); + resultingData += TQCString( "\n" ); + resultingData += TQCString( "\n" ); resultingData += "--"; resultingData += boundary; resultingData += "\n"; @@ -441,7 +441,7 @@ kdDebug(5006) << " Root node will NOT be replaced." << endl recCount + 1 ); } } - kdDebug(5006) << QString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").arg( recCount ) << endl; + kdDebug(5006) << TQString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").arg( recCount ) << endl; } @@ -466,28 +466,28 @@ kdDebug(5006) << " Root node will NOT be replaced." << endl void KMReaderWin::createWidgets() { - QVBoxLayout * vlay = new QVBoxLayout( this ); - mSplitter = new QSplitter( Qt::Vertical, this, "mSplitter" ); + TQVBoxLayout * vlay = new TQVBoxLayout( this ); + mSplitter = new TQSplitter( Qt::Vertical, this, "mSplitter" ); vlay->addWidget( mSplitter ); mMimePartTree = new KMMimePartTree( this, mSplitter, "mMimePartTree" ); - mBox = new QHBox( mSplitter, "mBox" ); + mBox = new TQHBox( mSplitter, "mBox" ); setStyleDependantFrameWidth(); mBox->setFrameStyle( mMimePartTree->frameStyle() ); mColorBar = new HtmlStatusBar( mBox, "mColorBar" ); mViewer = new KHTMLPart( mBox, "mViewer" ); mSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() ); - mSplitter->setResizeMode( mMimePartTree, QSplitter::KeepSize ); + mSplitter->setResizeMode( mMimePartTree, TQSplitter::KeepSize ); } const int KMReaderWin::delay = 150; //----------------------------------------------------------------------------- -KMReaderWin::KMReaderWin(QWidget *aParent, - QWidget *mainWindow, +KMReaderWin::KMReaderWin(TQWidget *aParent, + TQWidget *mainWindow, KActionCollection* actionCollection, const char *aName, int aFlags ) - : QWidget(aParent, aName, aFlags | Qt::WDestructiveClose), + : TQWidget(aParent, aName, aFlags | Qt::WDestructiveClose), mAttachmentStrategy( 0 ), mHeaderStrategy( 0 ), mHeaderStyle( 0 ), @@ -542,12 +542,12 @@ KMReaderWin::KMReaderWin(QWidget *aParent, mLevelQuote = GlobalSettings::self()->collapseQuoteLevelSpin() - 1; - connect( &mUpdateReaderWinTimer, SIGNAL(timeout()), - this, SLOT(updateReaderWin()) ); - connect( &mResizeTimer, SIGNAL(timeout()), - this, SLOT(slotDelayedResize()) ); - connect( &mDelayedMarkTimer, SIGNAL(timeout()), - this, SLOT(slotTouchMessage()) ); + connect( &mUpdateReaderWinTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(updateReaderWin()) ); + connect( &mResizeTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotDelayedResize()) ); + connect( &mDelayedMarkTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotTouchMessage()) ); } @@ -562,46 +562,46 @@ void KMReaderWin::createActions( KActionCollection * ac ) { new KActionMenu( i18n("View->", "&Headers"), ac, "view_headers" ); headerMenu->setToolTip( i18n("Choose display style of message headers") ); - connect( headerMenu, SIGNAL(activated()), - this, SLOT(slotCycleHeaderStyles()) ); + connect( headerMenu, TQT_SIGNAL(activated()), + this, TQT_SLOT(slotCycleHeaderStyles()) ); raction = new KRadioAction( i18n("View->headers->", "&Enterprise Headers"), 0, - this, SLOT(slotEnterpriseHeaders()), + this, TQT_SLOT(slotEnterpriseHeaders()), ac, "view_headers_enterprise" ); raction->setToolTip( i18n("Show the list of headers in Enterprise style") ); raction->setExclusiveGroup( "view_headers_group" ); headerMenu->insert(raction); raction = new KRadioAction( i18n("View->headers->", "&Fancy Headers"), 0, - this, SLOT(slotFancyHeaders()), + this, TQT_SLOT(slotFancyHeaders()), ac, "view_headers_fancy" ); raction->setToolTip( i18n("Show the list of headers in a fancy format") ); raction->setExclusiveGroup( "view_headers_group" ); headerMenu->insert( raction ); raction = new KRadioAction( i18n("View->headers->", "&Brief Headers"), 0, - this, SLOT(slotBriefHeaders()), + this, TQT_SLOT(slotBriefHeaders()), ac, "view_headers_brief" ); raction->setToolTip( i18n("Show brief list of message headers") ); raction->setExclusiveGroup( "view_headers_group" ); headerMenu->insert( raction ); raction = new KRadioAction( i18n("View->headers->", "&Standard Headers"), 0, - this, SLOT(slotStandardHeaders()), + this, TQT_SLOT(slotStandardHeaders()), ac, "view_headers_standard" ); raction->setToolTip( i18n("Show standard list of message headers") ); raction->setExclusiveGroup( "view_headers_group" ); headerMenu->insert( raction ); raction = new KRadioAction( i18n("View->headers->", "&Long Headers"), 0, - this, SLOT(slotLongHeaders()), + this, TQT_SLOT(slotLongHeaders()), ac, "view_headers_long" ); raction->setToolTip( i18n("Show long list of message headers") ); raction->setExclusiveGroup( "view_headers_group" ); headerMenu->insert( raction ); raction = new KRadioAction( i18n("View->headers->", "&All Headers"), 0, - this, SLOT(slotAllHeaders()), + this, TQT_SLOT(slotAllHeaders()), ac, "view_headers_all" ); raction->setToolTip( i18n("Show all message headers") ); raction->setExclusiveGroup( "view_headers_group" ); @@ -611,32 +611,32 @@ void KMReaderWin::createActions( KActionCollection * ac ) { KActionMenu *attachmentMenu = new KActionMenu( i18n("View->", "&Attachments"), ac, "view_attachments" ); attachmentMenu->setToolTip( i18n("Choose display style of attachments") ); - connect( attachmentMenu, SIGNAL(activated()), - this, SLOT(slotCycleAttachmentStrategy()) ); + connect( attachmentMenu, TQT_SIGNAL(activated()), + this, TQT_SLOT(slotCycleAttachmentStrategy()) ); raction = new KRadioAction( i18n("View->attachments->", "&As Icons"), 0, - this, SLOT(slotIconicAttachments()), + this, TQT_SLOT(slotIconicAttachments()), ac, "view_attachments_as_icons" ); raction->setToolTip( i18n("Show all attachments as icons. Click to see them.") ); raction->setExclusiveGroup( "view_attachments_group" ); attachmentMenu->insert( raction ); raction = new KRadioAction( i18n("View->attachments->", "&Smart"), 0, - this, SLOT(slotSmartAttachments()), + this, TQT_SLOT(slotSmartAttachments()), ac, "view_attachments_smart" ); raction->setToolTip( i18n("Show attachments as suggested by sender.") ); raction->setExclusiveGroup( "view_attachments_group" ); attachmentMenu->insert( raction ); raction = new KRadioAction( i18n("View->attachments->", "&Inline"), 0, - this, SLOT(slotInlineAttachments()), + this, TQT_SLOT(slotInlineAttachments()), ac, "view_attachments_inline" ); raction->setToolTip( i18n("Show all attachments inline (if possible)") ); raction->setExclusiveGroup( "view_attachments_group" ); attachmentMenu->insert( raction ); raction = new KRadioAction( i18n("View->attachments->", "&Hide"), 0, - this, SLOT(slotHideAttachments()), + this, TQT_SLOT(slotHideAttachments()), ac, "view_attachments_hide" ); raction->setToolTip( i18n("Do not show attachments in the message viewer") ); raction->setExclusiveGroup( "view_attachments_group" ); @@ -644,48 +644,48 @@ void KMReaderWin::createActions( KActionCollection * ac ) { // Set Encoding submenu mSelectEncodingAction = new KSelectAction( i18n( "&Set Encoding" ), "charset", 0, - this, SLOT( slotSetEncoding() ), + this, TQT_SLOT( slotSetEncoding() ), ac, "encoding" ); - QStringList encodings = KMMsgBase::supportedEncodings( false ); + TQStringList encodings = KMMsgBase::supportedEncodings( false ); encodings.prepend( i18n( "Auto" ) ); mSelectEncodingAction->setItems( encodings ); mSelectEncodingAction->setCurrentItem( 0 ); mMailToComposeAction = new KAction( i18n("New Message To..."), "mail_new", - 0, this, SLOT(slotMailtoCompose()), ac, + 0, this, TQT_SLOT(slotMailtoCompose()), ac, "mailto_compose" ); mMailToReplyAction = new KAction( i18n("Reply To..."), "mail_reply", - 0, this, SLOT(slotMailtoReply()), ac, + 0, this, TQT_SLOT(slotMailtoReply()), ac, "mailto_reply" ); mMailToForwardAction = new KAction( i18n("Forward To..."), "mail_forward", - 0, this, SLOT(slotMailtoForward()), ac, + 0, this, TQT_SLOT(slotMailtoForward()), ac, "mailto_forward" ); mAddAddrBookAction = new KAction( i18n("Add to Address Book"), - 0, this, SLOT(slotMailtoAddAddrBook()), + 0, this, TQT_SLOT(slotMailtoAddAddrBook()), ac, "add_addr_book" ); mOpenAddrBookAction = new KAction( i18n("Open in Address Book"), - 0, this, SLOT(slotMailtoOpenAddrBook()), + 0, this, TQT_SLOT(slotMailtoOpenAddrBook()), ac, "openin_addr_book" ); - mCopyAction = KStdAction::copy( this, SLOT(slotCopySelectedText()), ac, "kmail_copy"); + mCopyAction = KStdAction::copy( this, TQT_SLOT(slotCopySelectedText()), ac, "kmail_copy"); mSelectAllAction = new KAction( i18n("Select All Text"), CTRL+SHIFT+Key_A, this, - SLOT(selectAll()), ac, "mark_all_text" ); + TQT_SLOT(selectAll()), ac, "mark_all_text" ); mCopyURLAction = new KAction( i18n("Copy Link Address"), 0, this, - SLOT(slotUrlCopy()), ac, "copy_url" ); + TQT_SLOT(slotUrlCopy()), ac, "copy_url" ); mUrlOpenAction = new KAction( i18n("Open URL"), 0, this, - SLOT(slotUrlOpen()), ac, "open_url" ); + TQT_SLOT(slotUrlOpen()), ac, "open_url" ); mAddBookmarksAction = new KAction( i18n("Bookmark This Link"), "bookmark_add", - 0, this, SLOT(slotAddBookmarks()), + 0, this, TQT_SLOT(slotAddBookmarks()), ac, "add_bookmarks" ); mUrlSaveAsAction = new KAction( i18n("Save Link As..."), 0, this, - SLOT(slotUrlSave()), ac, "saveas_url" ); + TQT_SLOT(slotUrlSave()), ac, "saveas_url" ); mToggleFixFontAction = new KToggleAction( i18n("Use Fi&xed Font"), - Key_X, this, SLOT(slotToggleFixedFont()), + Key_X, this, TQT_SLOT(slotToggleFixedFont()), ac, "toggle_fixedfont" ); mStartIMChatAction = new KAction( i18n("Chat &With..."), 0, this, - SLOT(slotIMChat()), ac, "start_im_chat" ); + TQT_SLOT(slotIMChat()), ac, "start_im_chat" ); } // little helper function @@ -881,14 +881,14 @@ void KMReaderWin::update( KMail::Interface::Observable * observable ) // update the tmp file // we have to set it writeable temporarily - ::chmod( QFile::encodeName( mAtmCurrentName ), S_IRWXU ); - QByteArray data = node->msgPart().bodyDecodedBinary(); + ::chmod( TQFile::encodeName( mAtmCurrentName ), S_IRWXU ); + TQByteArray data = node->msgPart().bodyDecodedBinary(); size_t size = data.size(); if ( node->msgPart().type() == DwMime::kTypeText && size) { size = KMail::Util::crlf2lf( data.data(), size ); } KPIM::kBytesToFile( data.data(), size, mAtmCurrentName, false, false, false ); - ::chmod( QFile::encodeName( mAtmCurrentName ), S_IRUSR ); + ::chmod( TQFile::encodeName( mAtmCurrentName ), S_IRUSR ); mAtmUpdate = false; } @@ -896,34 +896,34 @@ void KMReaderWin::update( KMail::Interface::Observable * observable ) //----------------------------------------------------------------------------- void KMReaderWin::removeTempFiles() { - for (QStringList::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); + for (TQStringList::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); it++) { - QFile::remove(*it); + TQFile::remove(*it); } mTempFiles.clear(); - for (QStringList::Iterator it = mTempDirs.begin(); it != mTempDirs.end(); + for (TQStringList::Iterator it = mTempDirs.begin(); it != mTempDirs.end(); it++) { - QDir(*it).rmdir(*it); + TQDir(*it).rmdir(*it); } mTempDirs.clear(); } //----------------------------------------------------------------------------- -bool KMReaderWin::event(QEvent *e) +bool KMReaderWin::event(TQEvent *e) { - if (e->type() == QEvent::ApplicationPaletteChange) + if (e->type() == TQEvent::ApplicationPaletteChange) { delete mCSSHelper; - mCSSHelper = new KMail::CSSHelper( QPaintDeviceMetrics( mViewer->view() ) ); + mCSSHelper = new KMail::CSSHelper( TQPaintDeviceMetrics( mViewer->view() ) ); if (message()) message()->readConfig(); update( true ); // Force update return true; } - return QWidget::event(e); + return TQWidget::event(e); } @@ -934,7 +934,7 @@ void KMReaderWin::readConfig(void) /*should be: const*/ KConfigGroup reader( KMKernel::config(), "Reader" ); delete mCSSHelper; - mCSSHelper = new KMail::CSSHelper( QPaintDeviceMetrics( mViewer->view() ) ); + mCSSHelper = new KMail::CSSHelper( TQPaintDeviceMetrics( mViewer->view() ) ); mNoMDNsWhenEncrypted = mdnGroup.readBoolEntry( "not-send-when-encrypted", true ); @@ -965,7 +965,7 @@ void KMReaderWin::readConfig(void) reader.writeEntry( "showColorbar", mShowColorbar ); mMimeTreeAtBottom = reader.readEntry( "MimeTreeLocation", "bottom" ) != "top"; - const QString s = reader.readEntry( "MimeTreeMode", "smart" ); + const TQString s = reader.readEntry( "MimeTreeMode", "smart" ); if ( s == "never" ) mMimeTreeMode = 0; else if ( s == "always" ) @@ -1014,7 +1014,7 @@ void KMReaderWin::saveSplitterSizes( KConfigBase & c ) const { if ( !mSplitter || !mMimePartTree ) return; if ( mMimePartTree->isHidden() ) - return; // don't rely on QSplitter maintaining sizes for hidden widgets. + return; // don't rely on TQSplitter maintaining sizes for hidden widgets. c.writeEntry( "MimePaneHeight", mSplitter->sizes()[ mMimeTreeAtBottom ? 1 : 0 ] ); c.writeEntry( "MessagePaneHeight", mSplitter->sizes()[ mMimeTreeAtBottom ? 0 : 1 ] ); @@ -1055,41 +1055,41 @@ void KMReaderWin::initHtmlWidget(void) if ( !htmlWriter() ) #ifdef KMAIL_READER_HTML_DEBUG - mHtmlWriter = new TeeHtmlWriter( new FileHtmlWriter( QString::null ), + mHtmlWriter = new TeeHtmlWriter( new FileHtmlWriter( TQString::null ), new KHtmlPartHtmlWriter( mViewer, 0 ) ); #else mHtmlWriter = new KHtmlPartHtmlWriter( mViewer, 0 ); #endif connect(mViewer->browserExtension(), - SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),this, - SLOT(slotUrlOpen(const KURL &))); + TQT_SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),this, + TQT_SLOT(slotUrlOpen(const KURL &))); connect(mViewer->browserExtension(), - SIGNAL(createNewWindow(const KURL &, const KParts::URLArgs &)),this, - SLOT(slotUrlOpen(const KURL &))); - connect(mViewer,SIGNAL(onURL(const QString &)),this, - SLOT(slotUrlOn(const QString &))); - connect(mViewer,SIGNAL(popupMenu(const QString &, const QPoint &)), - SLOT(slotUrlPopup(const QString &, const QPoint &))); - connect( kmkernel->imProxy(), SIGNAL( sigContactPresenceChanged( const QString & ) ), - this, SLOT( contactStatusChanged( const QString & ) ) ); - connect( kmkernel->imProxy(), SIGNAL( sigPresenceInfoExpired() ), - this, SLOT( updateReaderWin() ) ); + TQT_SIGNAL(createNewWindow(const KURL &, const KParts::URLArgs &)),this, + TQT_SLOT(slotUrlOpen(const KURL &))); + connect(mViewer,TQT_SIGNAL(onURL(const TQString &)),this, + TQT_SLOT(slotUrlOn(const TQString &))); + connect(mViewer,TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), + TQT_SLOT(slotUrlPopup(const TQString &, const TQPoint &))); + connect( kmkernel->imProxy(), TQT_SIGNAL( sigContactPresenceChanged( const TQString & ) ), + this, TQT_SLOT( contactStatusChanged( const TQString & ) ) ); + connect( kmkernel->imProxy(), TQT_SIGNAL( sigPresenceInfoExpired() ), + this, TQT_SLOT( updateReaderWin() ) ); } -void KMReaderWin::contactStatusChanged( const QString &uid) +void KMReaderWin::contactStatusChanged( const TQString &uid) { // kdDebug( 5006 ) << k_funcinfo << " got a presence change for " << uid << endl; // get the list of nodes for this contact from the htmlView DOM::NodeList presenceNodes = mViewer->htmlDocument() - .getElementsByName( DOM::DOMString( QString::fromLatin1("presence-") + uid ) ); + .getElementsByName( DOM::DOMString( TQString::fromLatin1("presence-") + uid ) ); for ( unsigned int i = 0; i < presenceNodes.length(); ++i ) { DOM::Node n = presenceNodes.item( i ); kdDebug( 5006 ) << "name is " << n.nodeName().string() << endl; kdDebug( 5006 ) << "value of content was " << n.firstChild().nodeValue().string() << endl; - QString newPresence = kmkernel->imProxy()->presenceString( uid ); - if ( newPresence.isNull() ) // KHTML crashes if you setNodeValue( QString::null ) - newPresence = QString::fromLatin1( "ENOIMRUNNING" ); + TQString newPresence = kmkernel->imProxy()->presenceString( uid ); + if ( newPresence.isNull() ) // KHTML crashes if you setNodeValue( TQString::null ) + newPresence = TQString::fromLatin1( "ENOIMRUNNING" ); n.firstChild().setNodeValue( newPresence ); // kdDebug( 5006 ) << "value of content is now " << n.firstChild().nodeValue().string() << endl; } @@ -1109,7 +1109,7 @@ void KMReaderWin::setHeaderStyleAndStrategy( const HeaderStyle * style, } //----------------------------------------------------------------------------- -void KMReaderWin::setOverrideEncoding( const QString & encoding ) +void KMReaderWin::setOverrideEncoding( const TQString & encoding ) { if ( encoding == mOverrideEncoding ) return; @@ -1120,9 +1120,9 @@ void KMReaderWin::setOverrideEncoding( const QString & encoding ) mSelectEncodingAction->setCurrentItem( 0 ); } else { - QStringList encodings = mSelectEncodingAction->items(); + TQStringList encodings = mSelectEncodingAction->items(); uint i = 0; - for ( QStringList::const_iterator it = encodings.begin(), end = encodings.end(); it != end; ++it, ++i ) { + for ( TQStringList::const_iterator it = encodings.begin(), end = encodings.end(); it != end; ++it, ++i ) { if ( KGlobal::charsets()->encodingForName( *it ) == encoding ) { mSelectEncodingAction->setCurrentItem( i ); break; @@ -1133,7 +1133,7 @@ void KMReaderWin::setOverrideEncoding( const QString & encoding ) kdWarning(5006) << "Unknown override character encoding \"" << encoding << "\". Using Auto instead." << endl; mSelectEncodingAction->setCurrentItem( 0 ); - mOverrideEncoding = QString::null; + mOverrideEncoding = TQString::null; } } } @@ -1141,14 +1141,14 @@ void KMReaderWin::setOverrideEncoding( const QString & encoding ) } -void KMReaderWin::setPrintFont( const QFont& font ) +void KMReaderWin::setPrintFont( const TQFont& font ) { mCSSHelper->setPrintFont( font ); } //----------------------------------------------------------------------------- -const QTextCodec * KMReaderWin::overrideCodec() const +const TQTextCodec * KMReaderWin::overrideCodec() const { kdDebug(5006) << k_funcinfo << " mOverrideEncoding == '" << mOverrideEncoding << "'" << endl; if ( mOverrideEncoding.isEmpty() || mOverrideEncoding == "Auto" ) // Auto @@ -1161,7 +1161,7 @@ const QTextCodec * KMReaderWin::overrideCodec() const void KMReaderWin::slotSetEncoding() { if ( mSelectEncodingAction->currentItem() == 0 ) // Auto - mOverrideEncoding = QString(); + mOverrideEncoding = TQString(); else mOverrideEncoding = KGlobal::charsets()->encodingForName( mSelectEncodingAction->currentText() ); update( true ); @@ -1305,9 +1305,9 @@ static const int numKMailNewFeatures = //----------------------------------------------------------------------------- //static -QString KMReaderWin::newFeaturesMD5() +TQString KMReaderWin::newFeaturesMD5() { - QCString str; + TQCString str; for ( int i = 0 ; i < numKMailChanges ; ++i ) str += kmailChanges[i]; for ( int i = 0 ; i < numKMailNewFeatures ; ++i ) @@ -1317,13 +1317,13 @@ QString KMReaderWin::newFeaturesMD5() } //----------------------------------------------------------------------------- -void KMReaderWin::displaySplashPage( const QString &info ) +void KMReaderWin::displaySplashPage( const TQString &info ) { mMsgDisplay = false; adjustLayout(); - QString location = locate("data", "kmail/about/main.html"); - QString content = KPIM::kFileToString(location); + TQString location = locate("data", "kmail/about/main.html"); + TQString content = KPIM::kFileToString(location); content = content.arg( locate( "data", "libkdepim/about/kde_infopage.css" ) ); if ( kapp->reverseLayout() ) content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libkdepim/about/kde_infopage_rtl.css" ) ); @@ -1332,17 +1332,17 @@ void KMReaderWin::displaySplashPage( const QString &info ) mViewer->begin(KURL( location )); - QString fontSize = QString::number( pointsToPixel( mCSSHelper->bodyFont().pointSize() ) ); - QString appTitle = i18n("KMail"); - QString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite"); - QString quickDescription = i18n("The email client for the K Desktop Environment."); + TQString fontSize = TQString::number( pointsToPixel( mCSSHelper->bodyFont().pointSize() ) ); + TQString appTitle = i18n("KMail"); + TQString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite"); + TQString quickDescription = i18n("The email client for the K Desktop Environment."); mViewer->write(content.arg(fontSize).arg(appTitle).arg(catchPhrase).arg(quickDescription).arg(info)); mViewer->end(); } void KMReaderWin::displayBusyPage() { - QString info = + TQString info = i18n( "<h2 style='margin-top: 0px;'>Retrieving Folder Contents</h2><p>Please wait . . .</p> " ); displaySplashPage( info ); @@ -1350,7 +1350,7 @@ void KMReaderWin::displayBusyPage() void KMReaderWin::displayOfflinePage() { - QString info = + TQString info = i18n( "<h2 style='margin-top: 0px;'>Offline</h2><p>KMail is currently in offline mode. " "Click <a href=\"kmail:goOnline\">here</a> to go online . . .</p> " ); @@ -1361,7 +1361,7 @@ void KMReaderWin::displayOfflinePage() //----------------------------------------------------------------------------- void KMReaderWin::displayAboutPage() { - QString info = + TQString info = i18n("%1: KMail version; %2: help:// URL; %3: homepage URL; " "%4: prior KMail version; %5: prior KDE version; " "%6: generated list of new features; " @@ -1389,7 +1389,7 @@ void KMReaderWin::displayAboutPage() .arg("http://kontact.kde.org/kmail/") // KMail homepage URL .arg("1.8").arg("3.4"); // prior KMail and KDE version - QString featureItems; + TQString featureItems; for ( int i = 0 ; i < numKMailNewFeatures ; i++ ) featureItems += i18n("<li>%1</li>\n").arg( i18n( kmailNewFeatures[i] ) ); @@ -1403,11 +1403,11 @@ void KMReaderWin::displayAboutPage() "an incoming as well as outgoing mail account." "</p>\n") ); } else { - info = info.arg( QString::null ); + info = info.arg( TQString::null ); } if ( ( numKMailChanges > 1 ) || ( numKMailChanges == 1 && strlen(kmailChanges[0]) > 0 ) ) { - QString changesText = + TQString changesText = i18n("<p><span style='font-size:125%; font-weight:bold;'>" "Important changes</span> (compared to KMail %1):</p>\n") .arg("1.8"); @@ -1460,7 +1460,7 @@ void KMReaderWin::updateReaderWin() if (mSavedRelativePosition) { - QScrollView * scrollview = static_cast<QScrollView *>(mViewer->widget()); + TQScrollView * scrollview = static_cast<TQScrollView *>(mViewer->widget()); scrollview->setContentsPos( 0, qRound( scrollview->contentsHeight() * mSavedRelativePosition ) ); mSavedRelativePosition = 0; @@ -1470,7 +1470,7 @@ void KMReaderWin::updateReaderWin() //----------------------------------------------------------------------------- int KMReaderWin::pointsToPixel(int pointSize) const { - const QPaintDeviceMetrics pdm(mViewer->view()); + const TQPaintDeviceMetrics pdm(mViewer->view()); return (pointSize * pdm.logicalDpiY() + 36) / 72; } @@ -1481,7 +1481,7 @@ void KMReaderWin::showHideMimeTree( bool isPlainTextTopLevel ) { ( mMimeTreeMode == 1 && !isPlainTextTopLevel ) ) mMimePartTree->show(); else { - // don't rely on QSplitter maintaining sizes for hidden widgets: + // don't rely on TQSplitter maintaining sizes for hidden widgets: KConfigGroup reader( KMKernel::config(), "Reader" ); saveSplitterSizes( reader ); mMimePartTree->hide(); @@ -1519,7 +1519,7 @@ void KMReaderWin::displayMessage() { htmlWriter()->queue("</body></html>"); htmlWriter()->flush(); - QTimer::singleShot( 1, this, SLOT(injectAttachments()) ); + TQTimer::singleShot( 1, this, TQT_SLOT(injectAttachments()) ); } @@ -1534,8 +1534,8 @@ void KMReaderWin::parseMsg(KMMessage* aMsg) #endif KMMessagePart msgPart; - QCString subtype, contDisp; - QByteArray str; + TQCString subtype, contDisp; + TQByteArray str; assert(aMsg!=0); @@ -1548,13 +1548,13 @@ void KMReaderWin::parseMsg(KMMessage* aMsg) } else delete mRootNode; mRootNode = partNode::fromMessage( aMsg ); - const QCString mainCntTypeStr = mRootNode->typeString() + '/' + mRootNode->subTypeString(); + const TQCString mainCntTypeStr = mRootNode->typeString() + '/' + mRootNode->subTypeString(); - QString cntDesc = aMsg->subject(); + TQString cntDesc = aMsg->subject(); if( cntDesc.isEmpty() ) cntDesc = i18n("( body part )"); KIO::filesize_t cntSize = aMsg->msgSize(); - QString cntEnc; + TQString cntEnc; if( aMsg->contentTransferEncodingStr().isEmpty() ) cntEnc = "7bit"; else @@ -1573,7 +1573,7 @@ void KMReaderWin::parseMsg(KMMessage* aMsg) if( vCardNode ) { // ### FIXME: We should only do this if the vCard belongs to the sender, // ### i.e. if the sender's email address is contained in the vCard. - const QString vcard = vCardNode->msgPart().bodyToUnicode( overrideCodec() ); + const TQString vcard = vCardNode->msgPart().bodyToUnicode( overrideCodec() ); KABC::VCardConverter t; if ( !t.parseVCards( vcard ).empty() ) { hasVCard = true; @@ -1645,7 +1645,7 @@ kdDebug(5006) << "KMReaderWin - calling objectTreeToDecryptedMsg()" << endl; objectTreeToDecryptedMsg( mRootNode, decryptedData, *aMsg ); // add a \0 to the data decryptedData.appendNULL(); - QCString resultString( decryptedData.data() ); + TQCString resultString( decryptedData.data() ); kdDebug(5006) << "KMReaderWin - resulting data:" << resultString << endl; if( !resultString.isEmpty() ) { @@ -1690,15 +1690,15 @@ kdDebug(5006) << "KMReaderWin - composing unencrypted message" << endl; //----------------------------------------------------------------------------- -QString KMReaderWin::writeMsgHeader(KMMessage* aMsg, bool hasVCard, bool topLevel) +TQString KMReaderWin::writeMsgHeader(KMMessage* aMsg, bool hasVCard, bool topLevel) { kdFatal( !headerStyle(), 5006 ) << "trying to writeMsgHeader() without a header style set!" << endl; kdFatal( !headerStrategy(), 5006 ) << "trying to writeMsgHeader() without a header strategy set!" << endl; - QString href; + TQString href; if (hasVCard) - href = QString("file:") + KURL::encode_string( mTempFiles.last() ); + href = TQString("file:") + KURL::encode_string( mTempFiles.last() ); return headerStyle()->format( aMsg, headerStrategy(), href, mPrinting, topLevel ); } @@ -1706,17 +1706,17 @@ QString KMReaderWin::writeMsgHeader(KMMessage* aMsg, bool hasVCard, bool topLeve //----------------------------------------------------------------------------- -QString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart, +TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart, int aPartNum ) { - QString fileName = aMsgPart->fileName(); + TQString fileName = aMsgPart->fileName(); if( fileName.isEmpty() ) fileName = aMsgPart->name(); //--- Sven's save attachments to /tmp start --- - QString fname = createTempDir( QString::number( aPartNum ) ); + TQString fname = createTempDir( TQString::number( aPartNum ) ); if ( fname.isEmpty() ) - return QString(); + return TQString(); // strip off a leading path int slashPos = fileName.findRev( '/' ); @@ -1726,35 +1726,35 @@ QString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart, fileName = "unnamed"; fname += "/" + fileName; - QByteArray data = aMsgPart->bodyDecodedBinary(); + TQByteArray data = aMsgPart->bodyDecodedBinary(); size_t size = data.size(); if ( aMsgPart->type() == DwMime::kTypeText && size) { // convert CRLF to LF before writing text attachments to disk size = KMail::Util::crlf2lf( data.data(), size ); } if( !KPIM::kBytesToFile( data.data(), size, fname, false, false, false ) ) - return QString::null; + return TQString::null; mTempFiles.append( fname ); // make file read-only so that nobody gets the impression that he might // edit attached files (cf. bug #52813) - ::chmod( QFile::encodeName( fname ), S_IRUSR ); + ::chmod( TQFile::encodeName( fname ), S_IRUSR ); return fname; } -QString KMReaderWin::createTempDir( const QString ¶m ) +TQString KMReaderWin::createTempDir( const TQString ¶m ) { - KTempFile *tempFile = new KTempFile( QString::null, "." + param ); + KTempFile *tempFile = new KTempFile( TQString::null, "." + param ); tempFile->setAutoDelete( true ); - QString fname = tempFile->name(); + TQString fname = tempFile->name(); delete tempFile; - if( ::access( QFile::encodeName( fname ), W_OK ) != 0 ) + if( ::access( TQFile::encodeName( fname ), W_OK ) != 0 ) // Not there or not writable - if( ::mkdir( QFile::encodeName( fname ), 0 ) != 0 - || ::chmod( QFile::encodeName( fname ), S_IRWXU ) != 0 ) - return QString::null; //failed create + if( ::mkdir( TQFile::encodeName( fname ), 0 ) != 0 + || ::chmod( TQFile::encodeName( fname ), S_IRWXU ) != 0 ) + return TQString::null; //failed create assert( !fname.isNull() ); @@ -1764,7 +1764,7 @@ QString KMReaderWin::createTempDir( const QString ¶m ) //----------------------------------------------------------------------------- void KMReaderWin::showVCard( KMMessagePart * msgPart ) { - const QString vCard = msgPart->bodyToUnicode( overrideCodec() ); + const TQString vCard = msgPart->bodyToUnicode( overrideCodec() ); VCardViewer *vcv = new VCardViewer(this, vCard, "vCardDialog"); vcv->show(); @@ -1791,7 +1791,7 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl) if (!aUrl.isLocalFile()) return -1; - QString path = aUrl.path(); + TQString path = aUrl.path(); uint right = path.findRev('/'); uint left = path.findRev('.', right); @@ -1801,7 +1801,7 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl) //----------------------------------------------------------------------------- -void KMReaderWin::resizeEvent(QResizeEvent *) +void KMReaderWin::resizeEvent(TQResizeEvent *) { if( !mResizeTimer.isActive() ) { @@ -1856,19 +1856,19 @@ void KMReaderWin::slotTouchMessage() //----------------------------------------------------------------------------- -void KMReaderWin::closeEvent(QCloseEvent *e) +void KMReaderWin::closeEvent(TQCloseEvent *e) { - QWidget::closeEvent(e); + TQWidget::closeEvent(e); writeConfig(); } -bool foundSMIMEData( const QString aUrl, - QString& displayName, - QString& libName, - QString& keyId ) +bool foundSMIMEData( const TQString aUrl, + TQString& displayName, + TQString& libName, + TQString& keyId ) { - static QString showCertMan("showCertificate#"); + static TQString showCertMan("showCertificate#"); displayName = ""; libName = ""; keyId = ""; @@ -1907,7 +1907,7 @@ bool foundSMIMEData( const QString aUrl, //----------------------------------------------------------------------------- -void KMReaderWin::slotUrlOn(const QString &aUrl) +void KMReaderWin::slotUrlOn(const TQString &aUrl) { const KURL url(aUrl); if ( url.protocol() == "kmail" || url.protocol() == "x-kmail" @@ -1924,7 +1924,7 @@ void KMReaderWin::slotUrlOn(const QString &aUrl) mUrlClicked = url; - const QString msg = URLHandlerManager::instance()->statusBarMessage( url, this ); + const TQString msg = URLHandlerManager::instance()->statusBarMessage( url, this ); kdWarning( msg.isEmpty(), 5006 ) << "KMReaderWin::slotUrlOn(): Unhandled URL hover!" << endl; KPIM::BroadcastStatus::instance()->setTransientStatusMsg( msg ); @@ -1944,7 +1944,7 @@ void KMReaderWin::slotUrlOpen(const KURL &aUrl, const KParts::URLArgs &) } //----------------------------------------------------------------------------- -void KMReaderWin::slotUrlPopup(const QString &aUrl, const QPoint& aPos) +void KMReaderWin::slotUrlPopup(const TQString &aUrl, const TQPoint& aPos) { const KURL url( aUrl ); mUrlClicked = url; @@ -1959,7 +1959,7 @@ void KMReaderWin::slotUrlPopup(const QString &aUrl, const QPoint& aPos) } //----------------------------------------------------------------------------- -void KMReaderWin::showAttachmentPopup( int id, const QString & name, const QPoint & p ) +void KMReaderWin::showAttachmentPopup( int id, const TQString & name, const TQPoint & p ) { mAtmCurrent = id; mAtmCurrentName = name; @@ -1977,7 +1977,7 @@ void KMReaderWin::showAttachmentPopup( int id, const QString & name, const QPoin Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ) ) menu->insertItem( i18n( "Decrypt With Chiasmus..." ), 6 ); menu->insertItem(i18n("Properties"), 5); - connect(menu, SIGNAL(activated(int)), this, SLOT(slotHandleAttachment(int))); + connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotHandleAttachment(int))); menu->exec( p ,0 ); delete menu; } @@ -1990,9 +1990,9 @@ void KMReaderWin::setStyleDependantFrameWidth() // set the width of the frame to a reasonable value for the current GUI style int frameWidth; if( style().isA("KeramikStyle") ) - frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1; + frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1; else - frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ); + frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ); if ( frameWidth < 0 ) frameWidth = 0; if ( frameWidth != mBox->lineWidth() ) @@ -2000,10 +2000,10 @@ void KMReaderWin::setStyleDependantFrameWidth() } //----------------------------------------------------------------------------- -void KMReaderWin::styleChange( QStyle& oldStyle ) +void KMReaderWin::styleChange( TQStyle& oldStyle ) { setStyleDependantFrameWidth(); - QWidget::styleChange( oldStyle ); + TQWidget::styleChange( oldStyle ); } //----------------------------------------------------------------------------- @@ -2017,8 +2017,8 @@ void KMReaderWin::slotHandleAttachment( int choice ) KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand( node, message(), mAtmCurrent, mAtmCurrentName, KMHandleAttachmentCommand::AttachmentAction( choice ), 0, this ); - connect( command, SIGNAL( showAttachment( int, const QString& ) ), - this, SLOT( slotAtmView( int, const QString& ) ) ); + connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ), + this, TQT_SLOT( slotAtmView( int, const TQString& ) ) ); command->start(); } else if ( choice == 7 ) { slotDeleteAttachment( node ); @@ -2031,7 +2031,7 @@ void KMReaderWin::slotHandleAttachment( int choice ) if (!url.isValid() ) return; urls.append( url ); KURLDrag* drag = new KURLDrag( urls, this ); - QApplication::clipboard()->setData( drag, QClipboard::Clipboard ); + TQApplication::clipboard()->setData( drag, QClipboard::Clipboard ); } } @@ -2098,7 +2098,7 @@ void KMReaderWin::setMsgPart( partNode * node ) { //----------------------------------------------------------------------------- void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML, - const QString& aFileName, const QString& pname ) + const TQString& aFileName, const TQString& pname ) { KCursorSaver busy(KBusyPtr::busy()); if (kasciistricmp(aMsgPart->typeStr(), "message")==0) { @@ -2122,11 +2122,11 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML, htmlWriter()->queue( aMsgPart->bodyToUnicode( overrideCodec() ) ); mColorBar->setHtmlMode(); } else { // plain text - const QCString str = aMsgPart->bodyDecoded(); + const TQCString str = aMsgPart->bodyDecoded(); ObjectTreeParser otp( this ); otp.writeBodyStr( str, overrideCodec() ? overrideCodec() : aMsgPart->codec(), - message() ? message()->from() : QString::null ); + message() ? message()->from() : TQString::null ); } htmlWriter()->queue("</body></html>"); htmlWriter()->flush(); @@ -2137,11 +2137,11 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML, { if (aFileName.isEmpty()) return; // prevent crash // Open the window with a size so the image fits in (if possible): - QImageIO *iio = new QImageIO(); + TQImageIO *iio = new TQImageIO(); iio->setFileName(aFileName); if( iio->read() ) { - QImage img = iio->image(); - QRect desk = KGlobalSettings::desktopGeometry(mMainWindow); + TQImage img = iio->image(); + TQRect desk = KGlobalSettings::desktopGeometry(mMainWindow); // determine a reasonable window size int width, height; if( img.width() < 50 ) @@ -2173,15 +2173,15 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML, htmlWriter()->queue( mCSSHelper->htmlHead( isFixedFont() ) ); htmlWriter()->queue( "<pre>" ); - QString str = aMsgPart->bodyDecoded(); - // A QString cannot handle binary data. So if it's shorter than the + TQString str = aMsgPart->bodyDecoded(); + // A TQString cannot handle binary data. So if it's shorter than the // attachment, we assume the attachment is binary: if( str.length() < (unsigned) aMsgPart->decodedSize() ) { str.prepend( i18n("[KMail: Attachment contains binary data. Trying to show first character.]", "[KMail: Attachment contains binary data. Trying to show first %n characters.]", - str.length()) + QChar('\n') ); + str.length()) + TQChar('\n') ); } - htmlWriter()->queue( QStyleSheet::escape( str ) ); + htmlWriter()->queue( TQStyleSheet::escape( str ) ); htmlWriter()->queue( "</pre>" ); htmlWriter()->queue("</body></html>"); htmlWriter()->flush(); @@ -2192,7 +2192,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML, //----------------------------------------------------------------------------- -void KMReaderWin::slotAtmView( int id, const QString& name ) +void KMReaderWin::slotAtmView( int id, const TQString& name ) { partNode* node = mRootNode ? mRootNode->findId( id ) : 0; if( node ) { @@ -2202,7 +2202,7 @@ void KMReaderWin::slotAtmView( int id, const QString& name ) mAtmCurrentName = tempFileUrlFromPartNode( node ).path(); KMMessagePart& msgPart = node->msgPart(); - QString pname = msgPart.fileName(); + TQString pname = msgPart.fileName(); if (pname.isEmpty()) pname=msgPart.name(); if (pname.isEmpty()) pname=msgPart.contentDescription(); if (pname.isEmpty()) pname="unnamed"; @@ -2221,12 +2221,12 @@ void KMReaderWin::slotAtmView( int id, const QString& name ) } //----------------------------------------------------------------------------- -void KMReaderWin::openAttachment( int id, const QString & name ) +void KMReaderWin::openAttachment( int id, const TQString & name ) { mAtmCurrentName = name; mAtmCurrent = id; - QString str, pname, cmd, fileName; + TQString str, pname, cmd, fileName; partNode* node = mRootNode ? mRootNode->findId( id ) : 0; if( !node ) { @@ -2243,7 +2243,7 @@ void KMReaderWin::openAttachment( int id, const QString & name ) return; } - QCString contentTypeStr( msgPart.typeStr() + '/' + msgPart.subtypeStr() ); + TQCString contentTypeStr( msgPart.typeStr() + '/' + msgPart.subtypeStr() ); KPIM::kAsciiToLower( contentTypeStr.data() ); if ( qstrcmp( contentTypeStr, "text/x-vcard" ) == 0 ) { @@ -2254,7 +2254,7 @@ void KMReaderWin::openAttachment( int id, const QString & name ) // determine the MIME type of the attachment KMimeType::Ptr mimetype; // prefer the value of the Content-Type header - mimetype = KMimeType::mimeType( QString::fromLatin1( contentTypeStr ) ); + mimetype = KMimeType::mimeType( TQString::fromLatin1( contentTypeStr ) ); if ( mimetype->name() == "application/octet-stream" ) { // consider the filename if Content-Type is application/octet-stream mimetype = KMimeType::findByPath( name, 0, true /* no disk access */ ); @@ -2269,8 +2269,8 @@ void KMReaderWin::openAttachment( int id, const QString & name ) KService::Ptr offer = KServiceTypeProfile::preferredService( mimetype->name(), "Application" ); - QString open_text; - QString filenameText = msgPart.fileName(); + TQString open_text; + TQString filenameText = msgPart.fileName(); if ( filenameText.isEmpty() ) filenameText = msgPart.name(); if ( offer ) { @@ -2278,21 +2278,21 @@ void KMReaderWin::openAttachment( int id, const QString & name ) } else { open_text = i18n("&Open With..."); } - const QString text = i18n("Open attachment '%1'?\n" + const TQString text = i18n("Open attachment '%1'?\n" "Note that opening an attachment may compromise " "your system's security.") .arg( filenameText ); const int choice = KMessageBox::questionYesNoCancel( this, text, i18n("Open Attachment?"), KStdGuiItem::saveAs(), open_text, - QString::fromLatin1("askSave") + mimetype->name() ); // dontAskAgainName + TQString::fromLatin1("askSave") + mimetype->name() ); // dontAskAgainName if( choice == KMessageBox::Yes ) { // Save mAtmUpdate = true; KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand( node, message(), mAtmCurrent, mAtmCurrentName, KMHandleAttachmentCommand::Save, offer, this ); - connect( command, SIGNAL( showAttachment( int, const QString& ) ), - this, SLOT( slotAtmView( int, const QString& ) ) ); + connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ), + this, TQT_SLOT( slotAtmView( int, const TQString& ) ) ); command->start(); } else if( choice == KMessageBox::No ) { // Open @@ -2301,8 +2301,8 @@ void KMReaderWin::openAttachment( int id, const QString & name ) mAtmUpdate = true; KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand( node, message(), mAtmCurrent, mAtmCurrentName, action, offer, this ); - connect( command, SIGNAL( showAttachment( int, const QString& ) ), - this, SLOT( slotAtmView( int, const QString& ) ) ); + connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ), + this, TQT_SLOT( slotAtmView( int, const TQString& ) ) ); command->start(); } else { // Cancel kdDebug(5006) << "Canceled opening attachment" << endl; @@ -2312,26 +2312,26 @@ void KMReaderWin::openAttachment( int id, const QString & name ) //----------------------------------------------------------------------------- void KMReaderWin::slotScrollUp() { - static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, -10); + static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, -10); } //----------------------------------------------------------------------------- void KMReaderWin::slotScrollDown() { - static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, 10); + static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, 10); } bool KMReaderWin::atBottom() const { - const QScrollView *view = static_cast<const QScrollView *>(mViewer->widget()); + const TQScrollView *view = static_cast<const TQScrollView *>(mViewer->widget()); return view->contentsY() + view->visibleHeight() >= view->contentsHeight(); } //----------------------------------------------------------------------------- void KMReaderWin::slotJumpDown() { - QScrollView *view = static_cast<QScrollView *>(mViewer->widget()); + TQScrollView *view = static_cast<TQScrollView *>(mViewer->widget()); int offs = (view->clipper()->height() < 30) ? view->clipper()->height() : 30; view->scrollBy( 0, view->clipper()->height() - offs ); } @@ -2339,14 +2339,14 @@ void KMReaderWin::slotJumpDown() //----------------------------------------------------------------------------- void KMReaderWin::slotScrollPrior() { - static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, -(int)(height()*0.8)); + static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, -(int)(height()*0.8)); } //----------------------------------------------------------------------------- void KMReaderWin::slotScrollNext() { - static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, (int)(height()*0.8)); + static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, (int)(height()*0.8)); } //----------------------------------------------------------------------------- @@ -2359,7 +2359,7 @@ void KMReaderWin::slotDocumentChanged() //----------------------------------------------------------------------------- void KMReaderWin::slotTextSelected(bool) { - QString temp = mViewer->selectedText(); + TQString temp = mViewer->selectedText(); kapp->clipboard()->setText(temp); } @@ -2370,9 +2370,9 @@ void KMReaderWin::selectAll() } //----------------------------------------------------------------------------- -QString KMReaderWin::copyText() +TQString KMReaderWin::copyText() { - QString temp = mViewer->selectedText(); + TQString temp = mViewer->selectedText(); return temp; } @@ -2420,7 +2420,7 @@ bool KMReaderWin::htmlLoadExternal() //----------------------------------------------------------------------------- void KMReaderWin::saveRelativePosition() { - const QScrollView * scrollview = static_cast<QScrollView *>( mViewer->widget() ); + const TQScrollView * scrollview = static_cast<TQScrollView *>( mViewer->widget() ); mSavedRelativePosition = static_cast<float>( scrollview->contentsY() ) / scrollview->contentsHeight(); } @@ -2558,11 +2558,11 @@ partNode * KMReaderWin::partNodeForId( int id ) { KURL KMReaderWin::tempFileUrlFromPartNode( const partNode * node ) { if (!node) return KURL(); - QStringList::const_iterator it = mTempFiles.begin(); - QStringList::const_iterator end = mTempFiles.end(); + TQStringList::const_iterator it = mTempFiles.begin(); + TQStringList::const_iterator end = mTempFiles.end(); while ( it != end ) { - QString path = *it; + TQString path = *it; it++; uint right = path.findRev('/'); uint left = path.findRev('.', right); @@ -2602,10 +2602,10 @@ void KMReaderWin::slotIMChat() } //----------------------------------------------------------------------------- -bool KMReaderWin::eventFilter( QObject *, QEvent *e ) +bool KMReaderWin::eventFilter( TQObject *, TQEvent *e ) { - if ( e->type() == QEvent::MouseButtonPress ) { - QMouseEvent* me = static_cast<QMouseEvent*>(e); + if ( e->type() == TQEvent::MouseButtonPress ) { + TQMouseEvent* me = static_cast<TQMouseEvent*>(e); if ( me->button() == LeftButton && ( me->state() & ShiftButton ) ) { // special processing for shift+click mAtmCurrent = msgPartFromUrl( mUrlClicked ); @@ -2664,10 +2664,10 @@ void KMReaderWin::injectAttachments() if ( injectionPoint.isNull() ) return; - QString imgpath( locate("data","kmail/pics/") ); - QString visibility; - QString urlHandle; - QString imgSrc; + TQString imgpath( locate("data","kmail/pics/") ); + TQString visibility; + TQString urlHandle; + TQString imgSrc; if( !showAttachmentQuicklist() ) { urlHandle.append( "kmail:showAttachmentQuicklist" ); @@ -2677,15 +2677,15 @@ void KMReaderWin::injectAttachments() imgSrc.append( "attachmentQuicklistOpened.png" ); } - QString html = renderAttachments( mRootNode, QApplication::palette().active().background() ); + TQString html = renderAttachments( mRootNode, TQApplication::palette().active().background() ); if ( html.isEmpty() ) return; if ( headerStyle() == HeaderStyle::fancy() ) - html.prepend( QString::fromLatin1("<div style=\"float:left;\">%1 </div>" ).arg(i18n("Attachments:")) ); + html.prepend( TQString::fromLatin1("<div style=\"float:left;\">%1 </div>" ).arg(i18n("Attachments:")) ); if ( headerStyle() == HeaderStyle::enterprise() ) { - QString link(""); + TQString link(""); link += "<div style=\"text-align: right;\"><a href=\""+urlHandle+"\"><img src=\""+imgpath+imgSrc+"\"/></a></div>"; html.prepend( link ); } @@ -2694,41 +2694,41 @@ void KMReaderWin::injectAttachments() static_cast<DOM::HTMLElement>( injectionPoint ).setInnerHTML( html ); } -static QColor nextColor( const QColor & c ) +static TQColor nextColor( const TQColor & c ) { int h, s, v; c.hsv( &h, &s, &v ); - return QColor( (h + 50) % 360, QMAX(s, 64), v, QColor::Hsv ); + return TQColor( (h + 50) % 360, QMAX(s, 64), v, TQColor::Hsv ); } -QString KMReaderWin::renderAttachments(partNode * node, const QColor &bgColor ) +TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor ) { if ( !node ) - return QString(); + return TQString(); - QString html; + TQString html; if ( node->firstChild() ) { - QString subHtml = renderAttachments( node->firstChild(), nextColor( bgColor ) ); + TQString subHtml = renderAttachments( node->firstChild(), nextColor( bgColor ) ); if ( !subHtml.isEmpty() ) { - QString visibility; + TQString visibility; if( !showAttachmentQuicklist() ) { visibility.append( "display:none;" ); } - QString margin; + TQString margin; if ( node != mRootNode || headerStyle() != HeaderStyle::enterprise() ) margin = "padding:2px; margin:2px; "; if ( node->msgPart().typeStr() == "message" || node == mRootNode ) - html += QString::fromLatin1("<div style=\"background:%1; %2" + html += TQString::fromLatin1("<div style=\"background:%1; %2" "vertical-align:middle; float:left; %3\">").arg( bgColor.name() ).arg( margin ).arg( visibility ); html += subHtml; if ( node->msgPart().typeStr() == "message" || node == mRootNode ) html += "</div>"; } } else { - QString label, icon; + TQString label, icon; icon = node->msgPart().iconName( KIcon::Small ); label = node->msgPart().contentDescription(); if( label.isEmpty() ) @@ -2745,12 +2745,12 @@ QString KMReaderWin::renderAttachments(partNode * node, const QColor &bgColor ) typeBlacklisted = typeBlacklisted || node == mRootNode; if ( !label.isEmpty() && !icon.isEmpty() && !typeBlacklisted ) { html += "<div style=\"float:left;\">"; - html += QString::fromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() ); - html += QString::fromLatin1( "<a href=\"#att%1\">" ).arg( node->nodeId() ); + html += TQString::fromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() ); + html += TQString::fromLatin1( "<a href=\"#att%1\">" ).arg( node->nodeId() ); html += "<img style=\"vertical-align:middle;\" src=\"" + icon + "\"/> "; if ( headerStyle() == HeaderStyle::enterprise() ) { - QFont bodyFont = mCSSHelper->bodyFont( isFixedFont() ); - QFontMetrics fm( bodyFont ); + TQFont bodyFont = mCSSHelper->bodyFont( isFixedFont() ); + TQFontMetrics fm( bodyFont ); html += KStringHandler::rPixelSqueeze( label, fm, 140 ); } else html += label; diff --git a/kmail/kmreaderwin.h b/kmail/kmreaderwin.h index 2942d77c5..40c4f3a82 100644 --- a/kmail/kmreaderwin.h +++ b/kmail/kmreaderwin.h @@ -5,9 +5,9 @@ #ifndef KMREADERWIN_H #define KMREADERWIN_H -#include <qwidget.h> -#include <qtimer.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqtimer.h> +#include <tqstringlist.h> #include <kurl.h> #include <kservice.h> #include "kmmsgbase.h" @@ -59,7 +59,7 @@ namespace KMail { class partNode; // might be removed when KMime is used instead of mimelib // (khz, 29.11.2001) -class NewByteArray; // providing operator+ on a QByteArray (khz, 21.06.2002) +class NewByteArray; // providing operator+ on a TQByteArray (khz, 21.06.2002) namespace KParts { struct URLArgs; @@ -70,11 +70,11 @@ namespace KParts { used for reading or viewing messages. */ -class KMReaderWin: public QWidget, public KMail::Interface::Observer { +class KMReaderWin: public TQWidget, public KMail::Interface::Observer { Q_OBJECT - friend void KMMimePartTree::itemClicked( QListViewItem* item ); - friend void KMMimePartTree::itemRightClicked( QListViewItem* item, const QPoint & ); + friend void KMMimePartTree::itemClicked( TQListViewItem* item ); + friend void KMMimePartTree::itemRightClicked( TQListViewItem* item, const TQPoint & ); friend void KMMimePartTree::slotSaveAs(); friend void KMMimePartTree::startDrag(); @@ -82,8 +82,8 @@ class KMReaderWin: public QWidget, public KMail::Interface::Observer { friend class KMail::KHtmlPartHtmlWriter; public: - KMReaderWin( QWidget *parent, - QWidget *mainWindow, + KMReaderWin( TQWidget *parent, + TQWidget *mainWindow, KActionCollection *actionCollection, const char *name=0, int f=0 ); @@ -123,16 +123,16 @@ public: /** Get selected override character encoding. @return The encoding selected by the user or an empty string if auto-detection is selected. */ - QString overrideEncoding() const { return mOverrideEncoding; } + TQString overrideEncoding() const { return mOverrideEncoding; } /** Set the override character encoding. */ - void setOverrideEncoding( const QString & encoding ); + void setOverrideEncoding( const TQString & encoding ); - void setPrintFont( const QFont& font ); + void setPrintFont( const TQFont& font ); /** Get codec corresponding to the currently selected override character encoding. @return The override codec or 0 if auto-detection is selected. */ - const QTextCodec * overrideCodec() const; + const TQTextCodec * overrideCodec() const; /** Set printing mode */ virtual void setPrinting(bool enable) { mPrinting = enable; } @@ -144,7 +144,7 @@ public: /** Instead of settings a message to be shown sets a message part to be shown */ void setMsgPart( KMMessagePart* aMsgPart, bool aHTML, - const QString& aFileName, const QString& pname ); + const TQString& aFileName, const TQString& pname ); void setMsgPart( partNode * node ); @@ -156,7 +156,7 @@ public: normally no need to call this function directly, since correct value is set automatically in parseMsg(KMMessage* aMsg, bool onlyProcessHeaders). */ - void setIdOfLastViewedMessage( const QString & msgId ) + void setIdOfLastViewedMessage( const TQString & msgId ) { mIdOfLastViewedMessage = msgId; } /** Clear the reader and discard the current message. */ @@ -173,7 +173,7 @@ public: virtual void printMsg(void); /** Return selected text */ - QString copyText(); + TQString copyText(); /** Get/set auto-delete msg flag. */ bool autoDelete(void) const { return mAutoDelete; } @@ -194,10 +194,10 @@ public: bool htmlLoadExternal(); /** Returns the MD5 hash for the list of new features */ - static QString newFeaturesMD5(); + static TQString newFeaturesMD5(); /** Display a generic HTML splash page instead of a message */ - void displaySplashPage( const QString &info ); + void displaySplashPage( const TQString &info ); /** Display the about page instead of a message */ void displayAboutPage(); @@ -265,24 +265,24 @@ public: /** Returns the current message or 0 if none. */ KMMessage* message(KMFolder** folder=0) const; - void openAttachment( int id, const QString & name ); + void openAttachment( int id, const TQString & name ); void emitUrlClicked( const KURL & url, int button ) { emit urlClicked( url, button ); } - void emitPopupMenu( const KURL & url, const QPoint & p ) { + void emitPopupMenu( const KURL & url, const TQPoint & p ) { if ( message() ) emit popupMenu( *message(), url, p ); } - void showAttachmentPopup( int id, const QString & name, const QPoint & p ); + void showAttachmentPopup( int id, const TQString & name, const TQPoint & p ); /** Set the serial number of the message this reader window is currently * waiting for. Used to discard updates for already deselected messages. */ void setWaitingForSerNum( unsigned long serNum ) { mWaitingForSerNum = serNum; } - QWidget* mainWindow() { return mMainWindow; } + TQWidget* mainWindow() { return mMainWindow; } /** Returns wether the message should be decryted. */ bool decryptMessage() const; @@ -308,7 +308,7 @@ signals: void replaceMsgByUnencryptedVersion(); /** The user presses the right mouse button. 'url' may be 0. */ - void popupMenu(KMMessage &msg, const KURL &url, const QPoint& mousePos); + void popupMenu(KMMessage &msg, const KURL &url, const TQPoint& mousePos); /** The user has clicked onto an URL that is no attachment. */ void urlClicked(const KURL &url, int button); @@ -341,10 +341,10 @@ public slots: void slotUrlOpen(const KURL &url, const KParts::URLArgs &args); /** The mouse has moved on or off an URL. */ - void slotUrlOn(const QString &url); + void slotUrlOn(const TQString &url); /** The user presses the right mouse button on an URL. */ - void slotUrlPopup(const QString &, const QPoint& mousePos); + void slotUrlPopup(const TQString &, const TQPoint& mousePos); /** The user selected "Find" from the menu. */ void slotFind(); @@ -378,7 +378,7 @@ public slots: void slotMessageArrived( KMMessage *msg ); /** start IM Chat with addressee */ void slotIMChat(); - void contactStatusChanged( const QString &uid); + void contactStatusChanged( const TQString &uid); void slotLevelQuote( int l ); void slotTouchMessage(); @@ -404,21 +404,21 @@ protected slots: void slotHideAttachments(); /** Some attachment operations. */ - void slotAtmView( int id, const QString& name ); + void slotAtmView( int id, const TQString& name ); void slotDelayedResize(); void slotHandleAttachment( int ); protected: /** reimplemented in order to update the frame width in case of a changed GUI style */ - void styleChange( QStyle& oldStyle ); + void styleChange( TQStyle& oldStyle ); /** Set the width of the frame to a reasonable value for the current GUI style */ void setStyleDependantFrameWidth(); /** Watch for palette changes */ - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); /** Calculate the pixel size */ int pointsToPixel(int pointSize) const; @@ -432,19 +432,19 @@ protected: /** Creates a nice mail header depending on the current selected header style. */ - QString writeMsgHeader(KMMessage* aMsg, bool hasVCard=false, bool topLevel=false); + TQString writeMsgHeader(KMMessage* aMsg, bool hasVCard=false, bool topLevel=false); /** Writes the given message part to a temporary file and returns the - name of this file or QString::null if writing failed. + name of this file or TQString::null if writing failed. */ - QString writeMessagePartToTempFile( KMMessagePart* msgPart, int partNumber ); + TQString writeMessagePartToTempFile( KMMessagePart* msgPart, int partNumber ); /** Creates a temporary dir for saving attachments, etc. Will be automatically deleted when another message is viewed. @param param Optional part of the directory name. */ - QString createTempDir( const QString ¶m = QString() ); + TQString createTempDir( const TQString ¶m = TQString() ); /** show window containing infos about a vCard. */ void showVCard(KMMessagePart *msgPart); @@ -453,14 +453,14 @@ protected: virtual void initHtmlWidget(void); /** Some necessary event handling. */ - virtual void closeEvent(QCloseEvent *); - virtual void resizeEvent(QResizeEvent *); + virtual void closeEvent(TQCloseEvent *); + virtual void resizeEvent(TQResizeEvent *); /** Cleanup the attachment temp files */ virtual void removeTempFiles(); /** Event filter */ - bool eventFilter( QObject *obj, QEvent *ev ); + bool eventFilter( TQObject *obj, TQEvent *ev ); private slots: void slotSetEncoding(); @@ -478,16 +478,16 @@ private: /** Read override codec from configuration */ void readGlobalOverrideCodec(); - QString renderAttachments( partNode *node, const QColor &bgColor ); + TQString renderAttachments( partNode *node, const TQColor &bgColor ); private: bool mHtmlMail, mHtmlLoadExternal, mHtmlOverride, mHtmlLoadExtOverride; int mAtmCurrent; - QString mAtmCurrentName; + TQString mAtmCurrentName; KMMessage *mMessage; // widgets: - QSplitter * mSplitter; - QHBox *mBox; + TQSplitter * mSplitter; + TQHBox *mBox; KMail::HtmlStatusBar *mColorBar; KMMimePartTree* mMimePartTree; KHTMLPart *mViewer; @@ -497,13 +497,13 @@ private: const KMail::HeaderStyle * mHeaderStyle; bool mAutoDelete; /** where did the user save the attachment last time */ - QString mSaveAttachDir; + TQString mSaveAttachDir; static const int delay; - QTimer mUpdateReaderWinTimer; - QTimer mResizeTimer; - QTimer mDelayedMarkTimer; - QString mOverrideEncoding; - QString mOldGlobalOverrideEncoding; // used to detect changes of the global override character encoding + TQTimer mUpdateReaderWinTimer; + TQTimer mResizeTimer; + TQTimer mDelayedMarkTimer; + TQString mOverrideEncoding; + TQString mOldGlobalOverrideEncoding; // used to detect changes of the global override character encoding bool mMsgDisplay; bool mNoMDNsWhenEncrypted; unsigned long mLastSerNum; @@ -514,14 +514,14 @@ private: bool mPrinting; bool mShowColorbar; //bool mShowCompleteMessage; - QStringList mTempFiles; - QStringList mTempDirs; + TQStringList mTempFiles; + TQStringList mTempDirs; int mMimeTreeMode; bool mMimeTreeAtBottom; - QValueList<int> mSplitterSizes; + TQValueList<int> mSplitterSizes; partNode* mRootNode; - QString mIdOfLastViewedMessage; - QWidget *mMainWindow; + TQString mIdOfLastViewedMessage; + TQWidget *mMainWindow; KActionCollection *mActionCollection; KAction *mMailToComposeAction, *mMailToReplyAction, *mMailToForwardAction, *mAddAddrBookAction, *mOpenAddrBookAction, *mCopyAction, *mCopyURLAction, diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp index 1b9e36530..bec476ef6 100644 --- a/kmail/kmsearchpattern.cpp +++ b/kmail/kmsearchpattern.cpp @@ -23,7 +23,7 @@ using KMail::FilterLog; #include <kabc/stdaddressbook.h> -#include <qregexp.h> +#include <tqregexp.h> #include <mimelib/string.h> #include <mimelib/boyermor.h> @@ -70,7 +70,7 @@ static const int numStatusNames = sizeof statusNames / sizeof ( struct _statusNa // //================================================== -KMSearchRule::KMSearchRule( const QCString & field, Function func, const QString & contents ) +KMSearchRule::KMSearchRule( const TQCString & field, Function func, const TQString & contents ) : mField( field ), mFunction( func ), mContents( contents ) @@ -95,9 +95,9 @@ const KMSearchRule & KMSearchRule::operator=( const KMSearchRule & other ) { return *this; } -KMSearchRule * KMSearchRule::createInstance( const QCString & field, +KMSearchRule * KMSearchRule::createInstance( const TQCString & field, Function func, - const QString & contents ) + const TQString & contents ) { KMSearchRule *ret = 0; if (field == "<status>") @@ -110,9 +110,9 @@ KMSearchRule * KMSearchRule::createInstance( const QCString & field, return ret; } -KMSearchRule * KMSearchRule::createInstance( const QCString & field, +KMSearchRule * KMSearchRule::createInstance( const TQCString & field, const char *func, - const QString & contents ) + const TQString & contents ) { return ( createInstance( field, configValueToFunc( func ), contents ) ); } @@ -126,13 +126,13 @@ KMSearchRule * KMSearchRule::createInstanceFromConfig( const KConfig * config, i { const char cIdx = char( int('A') + aIdx ); - static const QString & field = KGlobal::staticQString( "field" ); - static const QString & func = KGlobal::staticQString( "func" ); - static const QString & contents = KGlobal::staticQString( "contents" ); + static const TQString & field = KGlobal::staticQString( "field" ); + static const TQString & func = KGlobal::staticQString( "func" ); + static const TQString & contents = KGlobal::staticQString( "contents" ); - const QCString &field2 = config->readEntry( field + cIdx ).latin1(); + const TQCString &field2 = config->readEntry( field + cIdx ).latin1(); Function func2 = configValueToFunc( config->readEntry( func + cIdx ).latin1() ); - const QString & contents2 = config->readEntry( contents + cIdx ); + const TQString & contents2 = config->readEntry( contents + cIdx ); if ( field2 == "<To or Cc>" ) // backwards compat return KMSearchRule::createInstance( "<recipients>", func2, contents2 ); @@ -150,7 +150,7 @@ KMSearchRule::Function KMSearchRule::configValueToFunc( const char * str ) { return FuncNone; } -QString KMSearchRule::functionToString( Function function ) +TQString KMSearchRule::functionToString( Function function ) { if ( function != FuncNone ) return funcConfigNames[int( function )]; @@ -160,11 +160,11 @@ QString KMSearchRule::functionToString( Function function ) void KMSearchRule::writeConfig( KConfig * config, int aIdx ) const { const char cIdx = char('A' + aIdx); - static const QString & field = KGlobal::staticQString( "field" ); - static const QString & func = KGlobal::staticQString( "func" ); - static const QString & contents = KGlobal::staticQString( "contents" ); + static const TQString & field = KGlobal::staticQString( "field" ); + static const TQString & func = KGlobal::staticQString( "func" ); + static const TQString & contents = KGlobal::staticQString( "contents" ); - config->writeEntry( field + cIdx, QString(mField) ); + config->writeEntry( field + cIdx, TQString(mField) ); config->writeEntry( func + cIdx, functionToString( mFunction ) ); config->writeEntry( contents + cIdx, mContents ); } @@ -179,9 +179,9 @@ bool KMSearchRule::matches( const DwString & aStr, KMMessage & msg, return matches( &msg ); } -const QString KMSearchRule::asString() const +const TQString KMSearchRule::asString() const { - QString result = "\"" + mField + "\" <"; + TQString result = "\"" + mField + "\" <"; result += functionToString( mFunction ); result += "> \"" + mContents + "\""; @@ -194,8 +194,8 @@ const QString KMSearchRule::asString() const // //================================================== -KMSearchRuleString::KMSearchRuleString( const QCString & field, - Function func, const QString & contents ) +KMSearchRuleString::KMSearchRuleString( const TQCString & field, + Function func, const TQString & contents ) : KMSearchRule(field, func, contents) { if ( field.isEmpty() || field[0] == '<' ) @@ -283,8 +283,8 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, while ( stop != DwString::npos && ( ch = aStr.at( stop + 1 ) ) == ' ' || ch == '\t' ) stop = aStr.find( '\n', stop + 1 ); const int len = stop == DwString::npos ? aStr.length() - start : stop - start ; - const QCString codedValue( aStr.data() + start, len + 1 ); - const QString msgContents = KMMsgBase::decodeRFC2047String( codedValue ).stripWhiteSpace(); // FIXME: This needs to be changed for IDN support. + const TQCString codedValue( aStr.data() + start, len + 1 ); + const TQString msgContents = KMMsgBase::decodeRFC2047String( codedValue ).stripWhiteSpace(); // FIXME: This needs to be changed for IDN support. rc = matchesInternal( msgContents ); } } else if ( field() == "<recipients>" ) { @@ -308,7 +308,7 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, } } if ( FilterLog::instance()->isLogging() ) { - QString msg = ( rc ? "<font color=#00FF00>1 = </font>" + TQString msg = ( rc ? "<font color=#00FF00>1 = </font>" : "<font color=#FF0000>0 = </font>" ); msg += FilterLog::recode( asString() ); // only log headers bcause messages and bodies can be pretty large @@ -327,7 +327,7 @@ bool KMSearchRuleString::matches( const KMMessage * msg ) const if ( isEmpty() ) return false; - QString msgContents; + TQString msgContents; // Show the value used to compare the rules against in the log. // Overwrite the value for complete messages and all headers! bool logContents = true; @@ -382,7 +382,7 @@ bool KMSearchRuleString::matches( const KMMessage * msg ) const bool rc = matchesInternal( msgContents ); if ( FilterLog::instance()->isLogging() ) { - QString msg = ( rc ? "<font color=#00FF00>1 = </font>" + TQString msg = ( rc ? "<font color=#00FF00>1 = </font>" : "<font color=#FF0000>0 = </font>" ); msg += FilterLog::recode( asString() ); // only log headers bcause messages and bodies can be pretty large @@ -394,14 +394,14 @@ bool KMSearchRuleString::matches( const KMMessage * msg ) const } // helper, does the actual comparing -bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const +bool KMSearchRuleString::matchesInternal( const TQString & msgContents ) const { switch ( function() ) { case KMSearchRule::FuncEquals: - return ( QString::compare( msgContents.lower(), contents().lower() ) == 0 ); + return ( TQString::compare( msgContents.lower(), contents().lower() ) == 0 ); case KMSearchRule::FuncNotEqual: - return ( QString::compare( msgContents.lower(), contents().lower() ) != 0 ); + return ( TQString::compare( msgContents.lower(), contents().lower() ) != 0 ); case KMSearchRule::FuncContains: return ( msgContents.find( contents(), 0, false ) >= 0 ); @@ -411,33 +411,33 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const case KMSearchRule::FuncRegExp: { - QRegExp regexp( contents(), false ); + TQRegExp regexp( contents(), false ); return ( regexp.search( msgContents ) >= 0 ); } case KMSearchRule::FuncNotRegExp: { - QRegExp regexp( contents(), false ); + TQRegExp regexp( contents(), false ); return ( regexp.search( msgContents ) < 0 ); } case FuncIsGreater: - return ( QString::compare( msgContents.lower(), contents().lower() ) > 0 ); + return ( TQString::compare( msgContents.lower(), contents().lower() ) > 0 ); case FuncIsLessOrEqual: - return ( QString::compare( msgContents.lower(), contents().lower() ) <= 0 ); + return ( TQString::compare( msgContents.lower(), contents().lower() ) <= 0 ); case FuncIsLess: - return ( QString::compare( msgContents.lower(), contents().lower() ) < 0 ); + return ( TQString::compare( msgContents.lower(), contents().lower() ) < 0 ); case FuncIsGreaterOrEqual: - return ( QString::compare( msgContents.lower(), contents().lower() ) >= 0 ); + return ( TQString::compare( msgContents.lower(), contents().lower() ) >= 0 ); case FuncIsInAddressbook: { KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true ); - QStringList addressList = + TQStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() ); - for( QStringList::ConstIterator it = addressList.begin(); + for( TQStringList::ConstIterator it = addressList.begin(); ( it != addressList.end() ); ++it ) { if ( !stdAb->findByEmail( KPIM::getEmailAddress( *it ) ).isEmpty() ) @@ -448,9 +448,9 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const case FuncIsNotInAddressbook: { KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true ); - QStringList addressList = + TQStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() ); - for( QStringList::ConstIterator it = addressList.begin(); + for( TQStringList::ConstIterator it = addressList.begin(); ( it != addressList.end() ); ++it ) { if ( stdAb->findByEmail( KPIM::getEmailAddress( *it ) ).isEmpty() ) @@ -460,11 +460,11 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const } case FuncIsInCategory: { - QString category = contents(); - QStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() ); + TQString category = contents(); + TQStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() ); KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true ); - for( QStringList::ConstIterator it = addressList.begin(); + for( TQStringList::ConstIterator it = addressList.begin(); it != addressList.end(); ++it ) { KABC::Addressee::List addresses = stdAb->findByEmail( KPIM::getEmailAddress( *it ) ); @@ -477,11 +477,11 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const } case FuncIsNotInCategory: { - QString category = contents(); - QStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() ); + TQString category = contents(); + TQStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() ); KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true ); - for( QStringList::ConstIterator it = addressList.begin(); + for( TQStringList::ConstIterator it = addressList.begin(); it != addressList.end(); ++it ) { KABC::Addressee::List addresses = stdAb->findByEmail( KPIM::getEmailAddress( *it ) ); @@ -506,8 +506,8 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const // //================================================== -KMSearchRuleNumerical::KMSearchRuleNumerical( const QCString & field, - Function func, const QString & contents ) +KMSearchRuleNumerical::KMSearchRuleNumerical( const TQCString & field, + Function func, const TQString & contents ) : KMSearchRule(field, func, contents) { } @@ -524,7 +524,7 @@ bool KMSearchRuleNumerical::isEmpty() const bool KMSearchRuleNumerical::matches( const KMMessage * msg ) const { - QString msgContents; + TQString msgContents; int numericalMsgContents = 0; int numericalValue = 0; @@ -533,25 +533,25 @@ bool KMSearchRuleNumerical::matches( const KMMessage * msg ) const numericalValue = contents().toInt(); msgContents.setNum( numericalMsgContents ); } else if ( field() == "<age in days>" ) { - QDateTime msgDateTime; + TQDateTime msgDateTime; msgDateTime.setTime_t( msg->date() ); - numericalMsgContents = msgDateTime.daysTo( QDateTime::currentDateTime() ); + numericalMsgContents = msgDateTime.daysTo( TQDateTime::currentDateTime() ); numericalValue = contents().toInt(); msgContents.setNum( numericalMsgContents ); } bool rc = matchesInternal( numericalValue, numericalMsgContents, msgContents ); if ( FilterLog::instance()->isLogging() ) { - QString msg = ( rc ? "<font color=#00FF00>1 = </font>" + TQString msg = ( rc ? "<font color=#00FF00>1 = </font>" : "<font color=#FF0000>0 = </font>" ); msg += FilterLog::recode( asString() ); - msg += " ( <i>" + QString::number( numericalMsgContents ) + "</i> )"; + msg += " ( <i>" + TQString::number( numericalMsgContents ) + "</i> )"; FilterLog::instance()->add( msg, FilterLog::ruleResult ); } return rc; } bool KMSearchRuleNumerical::matchesInternal( long numericalValue, - long numericalMsgContents, const QString & msgContents ) const + long numericalMsgContents, const TQString & msgContents ) const { switch ( function() ) { case KMSearchRule::FuncEquals: @@ -568,13 +568,13 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue, case KMSearchRule::FuncRegExp: { - QRegExp regexp( contents(), false ); + TQRegExp regexp( contents(), false ); return ( regexp.search( msgContents ) >= 0 ); } case KMSearchRule::FuncNotRegExp: { - QRegExp regexp( contents(), false ); + TQRegExp regexp( contents(), false ); return ( regexp.search( msgContents ) < 0 ); } @@ -610,18 +610,18 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue, // class KMSearchRuleStatus // //================================================== -QString englishNameForStatus( const KMMsgStatus& status ) +TQString englishNameForStatus( const KMMsgStatus& status ) { for ( int i=0; i< numStatusNames; i++ ) { if ( statusNames[i].status == status ) { return statusNames[i].name; } } - return QString::null; + return TQString::null; } -KMSearchRuleStatus::KMSearchRuleStatus( const QCString & field, - Function func, const QString & aContents ) +KMSearchRuleStatus::KMSearchRuleStatus( const TQCString & field, + Function func, const TQString & aContents ) : KMSearchRule(field, func, aContents) { // the values are always in english, both from the conf file as well as @@ -635,7 +635,7 @@ KMSearchRuleStatus::KMSearchRuleStatus( int status, Function func ) mStatus = status; } -KMMsgStatus KMSearchRuleStatus::statusFromEnglishName( const QString & aStatusString ) +KMMsgStatus KMSearchRuleStatus::statusFromEnglishName( const TQString & aStatusString ) { for ( int i=0; i< numStatusNames; i++ ) { if ( !aStatusString.compare( statusNames[i].name ) ) { @@ -681,7 +681,7 @@ bool KMSearchRuleStatus::matches( const KMMessage * msg ) const } if ( FilterLog::instance()->isLogging() ) { - QString msg = ( rc ? "<font color=#00FF00>1 = </font>" + TQString msg = ( rc ? "<font color=#00FF00>1 = </font>" : "<font color=#FF0000>0 = </font>" ); msg += FilterLog::recode( asString() ); FilterLog::instance()->add( msg, FilterLog::ruleResult ); @@ -698,7 +698,7 @@ bool KMSearchRuleStatus::matches( const KMMessage * msg ) const //================================================== KMSearchPattern::KMSearchPattern( const KConfig * config ) - : QPtrList<KMSearchRule>() + : TQPtrList<KMSearchRule>() { setAutoDelete( true ); if ( config ) @@ -716,7 +716,7 @@ bool KMSearchPattern::matches( const KMMessage * msg, bool ignoreBody ) const if ( isEmpty() ) return true; - QPtrListIterator<KMSearchRule> it( *this ); + TQPtrListIterator<KMSearchRule> it( *this ); switch ( mOperator ) { case OpAnd: // all rules must match for ( it.toFirst() ; it.current() ; ++it ) @@ -741,7 +741,7 @@ bool KMSearchPattern::matches( const DwString & aStr, bool ignoreBody ) const return true; KMMessage msg; - QPtrListIterator<KMSearchRule> it( *this ); + TQPtrListIterator<KMSearchRule> it( *this ); switch ( mOperator ) { case OpAnd: // all rules must match for ( it.toFirst() ; it.current() ; ++it ) @@ -791,7 +791,7 @@ bool KMSearchPattern::matches( Q_UINT32 serNum, bool ignoreBody ) const } bool KMSearchPattern::requiresBody() const { - QPtrListIterator<KMSearchRule> it( *this ); + TQPtrListIterator<KMSearchRule> it( *this ); for ( it.toFirst() ; it.current() ; ++it ) if ( (*it)->requiresBody() ) return true; @@ -799,7 +799,7 @@ bool KMSearchPattern::requiresBody() const { } void KMSearchPattern::purify() { - QPtrListIterator<KMSearchRule> it( *this ); + TQPtrListIterator<KMSearchRule> it( *this ); it.toLast(); while ( it.current() ) if ( (*it)->isEmpty() ) { @@ -847,7 +847,7 @@ void KMSearchPattern::importLegacyConfig( const KConfig * config ) { } append( rule ); - const QString sOperator = config->readEntry("operator"); + const TQString sOperator = config->readEntry("operator"); if ( sOperator == "ignore" ) return; rule = KMSearchRule::createInstance( config->readEntry("fieldB").latin1(), @@ -883,7 +883,7 @@ void KMSearchPattern::writeConfig( KConfig * config ) const { config->writeEntry("operator", (mOperator == KMSearchPattern::OpOr) ? "or" : "and" ); int i = 0; - for ( QPtrListIterator<KMSearchRule> it( *this ) ; it.current() && i < FILTER_MAX_RULES ; ++i , ++it ) + for ( TQPtrListIterator<KMSearchRule> it( *this ) ; it.current() && i < FILTER_MAX_RULES ; ++i , ++it ) // we could do this ourselves, but we want the rules to be extensible, // so we give the rule it's number and let it do the rest. (*it)->writeConfig( config, i ); @@ -898,14 +898,14 @@ void KMSearchPattern::init() { mName = '<' + i18n("name used for a virgin filter","unknown") + '>'; } -QString KMSearchPattern::asString() const { - QString result; +TQString KMSearchPattern::asString() const { + TQString result; if ( mOperator == OpOr ) result = i18n("(match any of the following)"); else result = i18n("(match all of the following)"); - for ( QPtrListIterator<KMSearchRule> it( *this ) ; it.current() ; ++it ) + for ( TQPtrListIterator<KMSearchRule> it( *this ) ; it.current() ; ++it ) result += "\n\t" + FilterLog::recode( (*it)->asString() ); return result; @@ -920,7 +920,7 @@ const KMSearchPattern & KMSearchPattern::operator=( const KMSearchPattern & othe clear(); // ### - for ( QPtrListIterator<KMSearchRule> it( other ) ; it.current() ; ++it ) { + for ( TQPtrListIterator<KMSearchRule> it( other ) ; it.current() ; ++it ) { KMSearchRule * rule = KMSearchRule::createInstance( **it ); // deep copy append( rule ); } diff --git a/kmail/kmsearchpattern.h b/kmail/kmsearchpattern.h index bb9a9600d..00a26c7b4 100644 --- a/kmail/kmsearchpattern.h +++ b/kmail/kmsearchpattern.h @@ -7,9 +7,9 @@ #define _kmsearchpattern_h_ #include <klocale.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qcstring.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqcstring.h> #include "kmmsgbase.h" // for KMMsgStatus class KMMessage; @@ -47,21 +47,21 @@ public: FuncIsInAddressbook, FuncIsNotInAddressbook, FuncIsInCategory, FuncIsNotInCategory, FuncHasAttachment, FuncHasNoAttachment}; - KMSearchRule ( const QCString & field=0, Function=FuncContains, - const QString &contents=QString::null ); + KMSearchRule ( const TQCString & field=0, Function=FuncContains, + const TQString &contents=TQString::null ); KMSearchRule ( const KMSearchRule &other ); const KMSearchRule & operator=( const KMSearchRule & other ); /** Create a search rule of a certain type by instantiating the appro- priate subclass depending on the @p field. */ - static KMSearchRule* createInstance( const QCString & field=0, + static KMSearchRule* createInstance( const TQCString & field=0, Function function=FuncContains, - const QString & contents=QString::null ); + const TQString & contents=TQString::null ); - static KMSearchRule* createInstance( const QCString & field, + static KMSearchRule* createInstance( const TQCString & field, const char * function, - const QString & contents ); + const TQString & contents ); static KMSearchRule * createInstance( const KMSearchRule & other ); @@ -123,28 +123,28 @@ public: @li \<age in days\>: Try to match against age of message (numerical). @li \<status\>: Try to match against status of message (status). */ - QCString field() const { return mField; } + TQCString field() const { return mField; } /** Set message header field name (make sure there's no trailing colon ':') */ - void setField( const QCString & field ) { mField = field; } + void setField( const TQCString & field ) { mField = field; } /** Return the value. This can be either a substring to search for in or a regexp pattern to match against the header. */ - QString contents() const { return mContents; } + TQString contents() const { return mContents; } /** Set the value. */ - void setContents( const QString & aContents ) { mContents = aContents; } + void setContents( const TQString & aContents ) { mContents = aContents; } /** Returns the rule as string. For debugging.*/ - const QString asString() const; + const TQString asString() const; private: static Function configValueToFunc( const char * str ); - static QString functionToString( Function function ); + static TQString functionToString( Function function ); - QCString mField; + TQCString mField; Function mFunction; - QString mContents; + TQString mContents; }; @@ -159,8 +159,8 @@ private: class KMSearchRuleString : public KMSearchRule { public: - KMSearchRuleString( const QCString & field=0, Function function=FuncContains, - const QString & contents=QString::null ); + KMSearchRuleString( const TQCString & field=0, Function function=FuncContains, + const TQString & contents=TQString::null ); KMSearchRuleString( const KMSearchRuleString & other ); const KMSearchRuleString & operator=( const KMSearchRuleString & other ); @@ -178,7 +178,7 @@ public: int headerLen=-1 ) const; /** Helper for the main matches() method. Does the actual comparing. */ - bool matchesInternal( const QString & msgContents ) const; + bool matchesInternal( const TQString & msgContents ) const; private: const DwBoyerMoore *mBmHeaderField; @@ -194,15 +194,15 @@ private: class KMSearchRuleNumerical : public KMSearchRule { public: - KMSearchRuleNumerical( const QCString & field=0, Function function=FuncContains, - const QString & contents=QString::null ); + KMSearchRuleNumerical( const TQCString & field=0, Function function=FuncContains, + const TQString & contents=TQString::null ); virtual bool isEmpty() const ; virtual bool matches( const KMMessage * msg ) const; /** Helper for the main matches() method. Does the actual comparing. */ bool matchesInternal( long numericalValue, long numericalMsgContents, - const QString & msgContents ) const; + const TQString & msgContents ) const; }; @@ -268,8 +268,8 @@ namespace KMail { class KMSearchRuleStatus : public KMSearchRule { public: - KMSearchRuleStatus( const QCString & field=0, Function function=FuncContains, - const QString & contents=QString::null ); + KMSearchRuleStatus( const TQCString & field=0, Function function=FuncContains, + const TQString & contents=TQString::null ); KMSearchRuleStatus( int status, Function function=FuncContains ); virtual bool isEmpty() const ; @@ -278,7 +278,7 @@ public: virtual bool matches( const DwString &, KMMessage &, const DwBoyerMoore *, int ) const; - static KMMsgStatus statusFromEnglishName(const QString&); + static KMMsgStatus statusFromEnglishName(const TQString&); private: KMMsgStatus mStatus; }; @@ -291,19 +291,19 @@ public: KConfig group and there is a constructor, mainly used by KMFilter to initialize from a preset KConfig-Group. - From a class hierarchy point of view, it is a QPtrList of + From a class hierarchy point of view, it is a TQPtrList of KMSearchRule's that adds the boolean operators (see Operator) 'and' and 'or' that connect the rules logically, and has a name under which it could be stored in the config file. - As a QPtrList with autoDelete enabled, it assumes that it is the + As a TQPtrList with autoDelete enabled, it assumes that it is the central repository for the rules it contains. So if you want to reuse a rule in another pattern, make a deep copy of that rule. @short An abstraction of a search over messages. @author Marc Mutz <Marc@Mutz.com> */ -class KMSearchPattern : public QPtrList<KMSearchRule> +class KMSearchPattern : public TQPtrList<KMSearchRule> { public: @@ -319,7 +319,7 @@ public: If config is 0, provides a pattern with minimal, but sufficient initialization. Unmodified, such a pattern will fail to match any KMMessage. You can query for such an empty - rule by using isEmpty, which is inherited from QPtrList. + rule by using isEmpty, which is inherited from TQPtrList. */ KMSearchPattern( const KConfig * config=0 ); @@ -363,7 +363,7 @@ public: */ void readConfig( const KConfig * config ); /** Writes itself into @p config. The group has to be preset. Tries - to delete old-style keys by overwriting them with QString::null. + to delete old-style keys by overwriting them with TQString::null. Derived classes reimplementing writeConfig() should also call this method, or else the rules will not be stored. @@ -371,10 +371,10 @@ public: void writeConfig( KConfig * config ) const; /** Get the name of the search pattern. */ - QString name() const { return mName; } + TQString name() const { return mName; } /** Set the name of the search pattern. KMFilter uses this to store it's own name, too. */ - void setName( const QString & newName ) { mName = newName ; } + void setName( const TQString & newName ) { mName = newName ; } /** Get the filter operator */ KMSearchPattern::Operator op() const { return mOperator; } @@ -382,7 +382,7 @@ public: void setOp( KMSearchPattern::Operator aOp ) { mOperator = aOp; } /** Returns the pattern as string. For debugging.*/ - QString asString() const; + TQString asString() const; /** Overloaded assignment operator. Makes a deep copy. */ const KMSearchPattern & operator=( const KMSearchPattern & aPattern ); @@ -400,7 +400,7 @@ private: to "<i18n("unnamed")>", and the boolean operator to @p OpAnd. */ void init(); - QString mName; + TQString mName; Operator mOperator; }; diff --git a/kmail/kmsearchpatternedit.cpp b/kmail/kmsearchpatternedit.cpp index df09bbd21..a928e57f3 100644 --- a/kmail/kmsearchpatternedit.cpp +++ b/kmail/kmsearchpatternedit.cpp @@ -14,11 +14,11 @@ using KMail::RuleWidgetHandlerManager; #include <kdialog.h> #include <kdebug.h> -#include <qradiobutton.h> -#include <qcombobox.h> -#include <qbuttongroup.h> -#include <qwidgetstack.h> -#include <qlayout.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> +#include <tqwidgetstack.h> +#include <tqlayout.h> #include <assert.h> @@ -48,10 +48,10 @@ static const int SpecialRuleFieldsCount = // //============================================================================= -KMSearchRuleWidget::KMSearchRuleWidget( QWidget *parent, KMSearchRule *aRule, +KMSearchRuleWidget::KMSearchRuleWidget( TQWidget *parent, KMSearchRule *aRule, const char *name, bool headersOnly, bool absoluteDates ) - : QWidget( parent, name ), + : TQWidget( parent, name ), mRuleField( 0 ), mFunctionStack( 0 ), mValueStack( 0 ), @@ -69,7 +69,7 @@ KMSearchRuleWidget::KMSearchRuleWidget( QWidget *parent, KMSearchRule *aRule, void KMSearchRuleWidget::setHeadersOnly( bool headersOnly ) { KMSearchRule* srule = rule(); - QCString currentText = srule->field(); + TQCString currentText = srule->field(); delete srule; initFieldList( headersOnly, mAbsoluteDates ); @@ -80,17 +80,17 @@ void KMSearchRuleWidget::setHeadersOnly( bool headersOnly ) if (( currentText != "<message>") && ( currentText != "<body>")) - mRuleField->changeItem( QString::fromAscii( currentText ), 0 ); + mRuleField->changeItem( TQString::fromAscii( currentText ), 0 ); else - mRuleField->changeItem( QString::null, 0 ); + mRuleField->changeItem( TQString::null, 0 ); } void KMSearchRuleWidget::initWidget() { - QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() ); + TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() ); // initialize the header field combo box - mRuleField = new QComboBox( true, this, "mRuleField" ); + mRuleField = new TQComboBox( true, this, "mRuleField" ); mRuleField->insertStringList( mFilterFieldList ); // don't show sliders when popping up this menu mRuleField->setSizeLimit( mRuleField->count() ); @@ -98,14 +98,14 @@ void KMSearchRuleWidget::initWidget() hlay->addWidget( mRuleField ); // initialize the function/value widget stack - mFunctionStack = new QWidgetStack( this, "mFunctionStack" ); + mFunctionStack = new TQWidgetStack( this, "mFunctionStack" ); //Don't expand the widget in vertical direction - mFunctionStack->setSizePolicy( QSizePolicy::Preferred,QSizePolicy::Fixed ); + mFunctionStack->setSizePolicy( TQSizePolicy::Preferred,TQSizePolicy::Fixed ); hlay->addWidget( mFunctionStack ); - mValueStack = new QWidgetStack( this, "mValueStack" ); - mValueStack->setSizePolicy( QSizePolicy::Preferred,QSizePolicy::Fixed ); + mValueStack = new TQWidgetStack( this, "mValueStack" ); + mValueStack->setSizePolicy( TQSizePolicy::Preferred,TQSizePolicy::Fixed ); hlay->addWidget( mValueStack ); hlay->setStretchFactor( mValueStack, 10 ); @@ -116,12 +116,12 @@ void KMSearchRuleWidget::initWidget() // redirect focus to the header field combo box setFocusProxy( mRuleField ); - connect( mRuleField, SIGNAL( activated( const QString & ) ), - this, SLOT( slotRuleFieldChanged( const QString & ) ) ); - connect( mRuleField, SIGNAL( textChanged( const QString & ) ), - this, SLOT( slotRuleFieldChanged( const QString & ) ) ); - connect( mRuleField, SIGNAL( textChanged( const QString & ) ), - this, SIGNAL( fieldChanged( const QString & ) ) ); + connect( mRuleField, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( slotRuleFieldChanged( const TQString & ) ) ); + connect( mRuleField, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( slotRuleFieldChanged( const TQString & ) ) ); + connect( mRuleField, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SIGNAL( fieldChanged( const TQString & ) ) ); } void KMSearchRuleWidget::setRule( KMSearchRule *aRule ) @@ -137,10 +137,10 @@ void KMSearchRuleWidget::setRule( KMSearchRule *aRule ) mRuleField->blockSignals( true ); if ( i < 0 ) { // not found -> user defined field - mRuleField->changeItem( QString::fromLatin1( aRule->field() ), 0 ); + mRuleField->changeItem( TQString::fromLatin1( aRule->field() ), 0 ); i = 0; } else { // found in the list of predefined fields - mRuleField->changeItem( QString::null, 0 ); + mRuleField->changeItem( TQString::null, 0 ); } mRuleField->setCurrentItem( i ); @@ -151,11 +151,11 @@ void KMSearchRuleWidget::setRule( KMSearchRule *aRule ) } KMSearchRule* KMSearchRuleWidget::rule() const { - const QCString ruleField = ruleFieldToEnglish( mRuleField->currentText() ); + const TQCString ruleField = ruleFieldToEnglish( mRuleField->currentText() ); const KMSearchRule::Function function = RuleWidgetHandlerManager::instance()->function( ruleField, mFunctionStack ); - const QString value = + const TQString value = RuleWidgetHandlerManager::instance()->value( ruleField, mFunctionStack, mValueStack ); @@ -174,7 +174,7 @@ void KMSearchRuleWidget::reset() void KMSearchRuleWidget::slotFunctionChanged() { - const QCString ruleField = ruleFieldToEnglish( mRuleField->currentText() ); + const TQCString ruleField = ruleFieldToEnglish( mRuleField->currentText() ); RuleWidgetHandlerManager::instance()->update( ruleField, mFunctionStack, mValueStack ); @@ -182,15 +182,15 @@ void KMSearchRuleWidget::slotFunctionChanged() void KMSearchRuleWidget::slotValueChanged() { - const QCString ruleField = ruleFieldToEnglish( mRuleField->currentText() ); - const QString prettyValue = + const TQCString ruleField = ruleFieldToEnglish( mRuleField->currentText() ); + const TQString prettyValue = RuleWidgetHandlerManager::instance()->prettyValue( ruleField, mFunctionStack, mValueStack ); emit contentsChanged( prettyValue ); } -QCString KMSearchRuleWidget::ruleFieldToEnglish( const QString & i18nVal ) +TQCString KMSearchRuleWidget::ruleFieldToEnglish( const TQString & i18nVal ) { for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) { if ( i18nVal == i18n( SpecialRuleFields[i].displayName ) ) @@ -199,7 +199,7 @@ QCString KMSearchRuleWidget::ruleFieldToEnglish( const QString & i18nVal ) return i18nVal.latin1(); } -int KMSearchRuleWidget::ruleFieldToId( const QString & i18nVal ) +int KMSearchRuleWidget::ruleFieldToId( const TQString & i18nVal ) { for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) { if ( i18nVal == i18n( SpecialRuleFields[i].displayName ) ) @@ -208,7 +208,7 @@ int KMSearchRuleWidget::ruleFieldToId( const QString & i18nVal ) return -1; // no pseudo header } -static QString displayNameFromInternalName( const QString & internal ) +static TQString displayNameFromInternalName( const TQString & internal ) { for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) { if ( internal == SpecialRuleFields[i].internalName ) @@ -219,12 +219,12 @@ static QString displayNameFromInternalName( const QString & internal ) -int KMSearchRuleWidget::indexOfRuleField( const QCString & aName ) const +int KMSearchRuleWidget::indexOfRuleField( const TQCString & aName ) const { if ( aName.isEmpty() ) return -1; - QString i18n_aName = displayNameFromInternalName( aName ); + TQString i18n_aName = displayNameFromInternalName( aName ); for ( int i = 1; i < mRuleField->count(); ++i ) { if ( mRuleField->text( i ) == i18n_aName ) @@ -263,7 +263,7 @@ void KMSearchRuleWidget::initFieldList( bool headersOnly, bool absoluteDates ) mFilterFieldList.append("X-Spam-Flag"); } -void KMSearchRuleWidget::slotRuleFieldChanged( const QString & field ) +void KMSearchRuleWidget::slotRuleFieldChanged( const TQString & field ) { RuleWidgetHandlerManager::instance()->update( ruleFieldToEnglish( field ), mFunctionStack, @@ -276,7 +276,7 @@ void KMSearchRuleWidget::slotRuleFieldChanged( const QString & field ) // //============================================================================= -KMSearchRuleWidgetLister::KMSearchRuleWidgetLister( QWidget *parent, const char* name, bool headersOnly, bool absoluteDates ) +KMSearchRuleWidgetLister::KMSearchRuleWidgetLister( TQWidget *parent, const char* name, bool headersOnly, bool absoluteDates ) : KWidgetLister( 2, FILTER_MAX_RULES, parent, name ) { mRuleList = 0; @@ -288,7 +288,7 @@ KMSearchRuleWidgetLister::~KMSearchRuleWidgetLister() { } -void KMSearchRuleWidgetLister::setRuleList( QPtrList<KMSearchRule> *aList ) +void KMSearchRuleWidgetLister::setRuleList( TQPtrList<KMSearchRule> *aList ) { assert ( aList ); @@ -321,8 +321,8 @@ void KMSearchRuleWidgetLister::setRuleList( QPtrList<KMSearchRule> *aList ) setNumberOfShownWidgetsTo( QMAX((int)mRuleList->count(),mMinWidgets) ); // load the actions into the widgets - QPtrListIterator<KMSearchRule> rIt( *mRuleList ); - QPtrListIterator<QWidget> wIt( mWidgetList ); + TQPtrListIterator<KMSearchRule> rIt( *mRuleList ); + TQPtrListIterator<TQWidget> wIt( mWidgetList ); for ( rIt.toFirst(), wIt.toFirst() ; rIt.current() && wIt.current() ; ++rIt, ++wIt ) { static_cast<KMSearchRuleWidget*>(*wIt)->setRule( (*rIt) ); @@ -336,7 +336,7 @@ void KMSearchRuleWidgetLister::setRuleList( QPtrList<KMSearchRule> *aList ) void KMSearchRuleWidgetLister::setHeadersOnly( bool headersOnly ) { - QPtrListIterator<QWidget> wIt( mWidgetList ); + TQPtrListIterator<TQWidget> wIt( mWidgetList ); for ( wIt.toFirst() ; wIt.current() ; ++wIt ) { (static_cast<KMSearchRuleWidget*>(*wIt))->setHeadersOnly( headersOnly ); } @@ -351,12 +351,12 @@ void KMSearchRuleWidgetLister::reset() slotClear(); } -QWidget* KMSearchRuleWidgetLister::createWidget( QWidget *parent ) +TQWidget* KMSearchRuleWidgetLister::createWidget( TQWidget *parent ) { return new KMSearchRuleWidget(parent, 0, 0, mHeadersOnly, mAbsoluteDates); } -void KMSearchRuleWidgetLister::clearWidget( QWidget *aWidget ) +void KMSearchRuleWidgetLister::clearWidget( TQWidget *aWidget ) { if ( aWidget ) ((KMSearchRuleWidget*)aWidget)->reset(); @@ -368,7 +368,7 @@ void KMSearchRuleWidgetLister::regenerateRuleListFromWidgets() mRuleList->clear(); - QPtrListIterator<QWidget> it( mWidgetList ); + TQPtrListIterator<TQWidget> it( mWidgetList ); for ( it.toFirst() ; it.current() ; ++it ) { KMSearchRule *r = ((KMSearchRuleWidget*)(*it))->rule(); if ( r ) @@ -385,15 +385,15 @@ void KMSearchRuleWidgetLister::regenerateRuleListFromWidgets() // //============================================================================= -KMSearchPatternEdit::KMSearchPatternEdit(QWidget *parent, const char *name, bool headersOnly, bool absoluteDates ) - : QGroupBox( 1/*columns*/, Horizontal, parent, name ) +KMSearchPatternEdit::KMSearchPatternEdit(TQWidget *parent, const char *name, bool headersOnly, bool absoluteDates ) + : TQGroupBox( 1/*columns*/, Horizontal, parent, name ) { setTitle( i18n("Search Criteria") ); initLayout( headersOnly, absoluteDates ); } -KMSearchPatternEdit::KMSearchPatternEdit(const QString & title, QWidget *parent, const char *name, bool headersOnly, bool absoluteDates) - : QGroupBox( 1/*column*/, Horizontal, title, parent, name ) +KMSearchPatternEdit::KMSearchPatternEdit(const TQString & title, TQWidget *parent, const char *name, bool headersOnly, bool absoluteDates) + : TQGroupBox( 1/*column*/, Horizontal, title, parent, name ) { initLayout( headersOnly, absoluteDates ); } @@ -405,13 +405,13 @@ KMSearchPatternEdit::~KMSearchPatternEdit() void KMSearchPatternEdit::initLayout(bool headersOnly, bool absoluteDates) { //------------the radio buttons - mAllRBtn = new QRadioButton( i18n("Match a&ll of the following"), this, "mAllRBtn" ); - mAnyRBtn = new QRadioButton( i18n("Match an&y of the following"), this, "mAnyRBtn" ); + mAllRBtn = new TQRadioButton( i18n("Match a&ll of the following"), this, "mAllRBtn" ); + mAnyRBtn = new TQRadioButton( i18n("Match an&y of the following"), this, "mAnyRBtn" ); mAllRBtn->setChecked(true); mAnyRBtn->setChecked(false); - QButtonGroup *bg = new QButtonGroup( this ); + TQButtonGroup *bg = new TQButtonGroup( this ); bg->hide(); bg->insert( mAllRBtn, (int)KMSearchPattern::OpAnd ); bg->insert( mAnyRBtn, (int)KMSearchPattern::OpOr ); @@ -421,15 +421,15 @@ void KMSearchPatternEdit::initLayout(bool headersOnly, bool absoluteDates) mRuleLister->slotClear(); //------------connect a few signals - connect( bg, SIGNAL(clicked(int)), - this, SLOT(slotRadioClicked(int)) ); + connect( bg, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(slotRadioClicked(int)) ); KMSearchRuleWidget *srw = (KMSearchRuleWidget*)mRuleLister->mWidgetList.first(); if ( srw ) { - connect( srw, SIGNAL(fieldChanged(const QString &)), - this, SLOT(slotAutoNameHack()) ); - connect( srw, SIGNAL(contentsChanged(const QString &)), - this, SLOT(slotAutoNameHack()) ); + connect( srw, TQT_SIGNAL(fieldChanged(const TQString &)), + this, TQT_SLOT(slotAutoNameHack()) ); + connect( srw, TQT_SIGNAL(contentsChanged(const TQString &)), + this, TQT_SLOT(slotAutoNameHack()) ); } else kdDebug(5006) << "KMSearchPatternEdit: no first KMSearchRuleWidget, though slotClear() has been called!" << endl; } diff --git a/kmail/kmsearchpatternedit.h b/kmail/kmsearchpatternedit.h index 7a3c3614e..c8ef9a2f5 100644 --- a/kmail/kmsearchpatternedit.h +++ b/kmail/kmsearchpatternedit.h @@ -8,8 +8,8 @@ #include "kwidgetlister.h" -#include <qgroupbox.h> -#include <qstringlist.h> +#include <tqgroupbox.h> +#include <tqstringlist.h> class KMSearchRule; class KMSearchPattern; @@ -24,9 +24,9 @@ class QLabel; class KMSearchPatternEdit; /** A widget to edit a single KMSearchRule. - It consists of an editable QComboBox for the field, - a read-only QComboBox for the function and - a QLineEdit for the content or the pattern (in case of regexps). + It consists of an editable TQComboBox for the field, + a read-only TQComboBox for the function and + a TQLineEdit for the content or the pattern (in case of regexps). It manages the i18n itself, so field name should be in it's english form. To use, you essentially give it the reference to a KMSearchRule and @@ -43,7 +43,7 @@ class KMSearchRuleWidget : public QWidget public: /** Constructor. You can give a KMSearchRule as parameter, which will be used to initialize the widget. */ - KMSearchRuleWidget( QWidget* parent=0, KMSearchRule* aRule=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false ); + KMSearchRuleWidget( TQWidget* parent=0, KMSearchRule* aRule=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false ); enum { Message, Body, AnyHeader, Recipients, Size, AgeInDays, Status }; @@ -62,7 +62,7 @@ public: /** Resets the rule currently worked on and updates the widget accordingly. */ void reset(); - static int ruleFieldToId( const QString & i18nVal ); + static int ruleFieldToId( const TQString & i18nVal ); public slots: void slotFunctionChanged(); @@ -72,31 +72,31 @@ signals: /** This signal is emitted whenever the user alters the field. The pseudo-headers <...> are returned in their i18n form, but stored in their english form in the rule. */ - void fieldChanged( const QString & ); + void fieldChanged( const TQString & ); /** This signal is emitted whenever the user alters the contents/value of the rule. */ - void contentsChanged( const QString & ); + void contentsChanged( const TQString & ); protected: /** Used internally to translate i18n-ized pseudo-headers back to english. */ - static QCString ruleFieldToEnglish(const QString & i18nVal); + static TQCString ruleFieldToEnglish(const TQString & i18nVal); /** Used internally to find the corresponding index into the field ComboBox. Returns the index if found or -1 if the search failed, */ - int indexOfRuleField( const QCString & aName ) const; + int indexOfRuleField( const TQCString & aName ) const; protected slots: - void slotRuleFieldChanged( const QString & ); + void slotRuleFieldChanged( const TQString & ); private: void initWidget(); void initFieldList( bool headersOnly, bool absoluteDates ); - QStringList mFilterFieldList; - QComboBox *mRuleField; - QWidgetStack *mFunctionStack; - QWidgetStack *mValueStack; + TQStringList mFilterFieldList; + TQComboBox *mRuleField; + TQWidgetStack *mFunctionStack; + TQWidgetStack *mValueStack; bool mAbsoluteDates; }; @@ -108,23 +108,23 @@ class KMSearchRuleWidgetLister : public KWidgetLister friend class ::KMSearchPatternEdit; public: - KMSearchRuleWidgetLister( QWidget *parent=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false ); + KMSearchRuleWidgetLister( TQWidget *parent=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false ); virtual ~KMSearchRuleWidgetLister(); - void setRuleList( QPtrList<KMSearchRule> * aList ); + void setRuleList( TQPtrList<KMSearchRule> * aList ); void setHeadersOnly( bool headersOnly ); public slots: void reset(); protected: - virtual void clearWidget( QWidget *aWidget ); - virtual QWidget* createWidget( QWidget *parent ); + virtual void clearWidget( TQWidget *aWidget ); + virtual TQWidget* createWidget( TQWidget *parent ); private: void regenerateRuleListFromWidgets(); - QPtrList<KMSearchRule> *mRuleList; + TQPtrList<KMSearchRule> *mRuleList; bool mHeadersOnly; bool mAbsoluteDates; }; @@ -162,15 +162,15 @@ private: @author Marc Mutz <Marc@Mutz.com> */ -class KMSearchPatternEdit : public QGroupBox { +class KMSearchPatternEdit : public TQGroupBox { Q_OBJECT public: /** Constructor. The parent and name parameters are passed to the underlying - QGroupBox, as usual. */ - KMSearchPatternEdit(QWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false); + TQGroupBox, as usual. */ + KMSearchPatternEdit(TQWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false); /** Constructor. This one allows you to set a title different from i18n("Search Criteria"). */ - KMSearchPatternEdit(const QString & title, QWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false); + KMSearchPatternEdit(const TQString & title, TQWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false); ~KMSearchPatternEdit(); /** Set the search pattern. Rules are inserted regardless of the @@ -204,7 +204,7 @@ private: void initLayout( bool headersOnly, bool absoluteDates ); KMSearchPattern *mPattern; - QRadioButton *mAllRBtn, *mAnyRBtn; + TQRadioButton *mAllRBtn, *mAnyRBtn; KMSearchRuleWidgetLister *mRuleLister; }; diff --git a/kmail/kmsender.cpp b/kmail/kmsender.cpp index fc2bfba1f..a79da268f 100644 --- a/kmail/kmsender.cpp +++ b/kmail/kmsender.cpp @@ -77,7 +77,7 @@ KMSender::~KMSender() } //----------------------------------------------------------------------------- -void KMSender::setStatusMsg(const QString &msg) +void KMSender::setStatusMsg(const TQString &msg) { if ( mProgressItem ) mProgressItem->setStatus(msg); @@ -86,7 +86,7 @@ void KMSender::setStatusMsg(const QString &msg) //----------------------------------------------------------------------------- void KMSender::readConfig(void) { - QString str; + TQString str; KConfigGroup config(KMKernel::config(), SENDER_GROUP); mSendImmediate = config.readBoolEntry("Immediate", true); @@ -118,8 +118,8 @@ bool KMSender::settingsOk() const } static void handleRedirections( KMMessage * m ) { - const QString from = m->headerField("X-KMail-Redirect-From"); - const QString msgId = m->msgId(); + const TQString from = m->headerField("X-KMail-Redirect-From"); + const TQString msgId = m->msgId(); if( from.isEmpty() || msgId.isEmpty() ) m->setMsgId( KMMessage::generateMessageId( m->sender() ) ); } @@ -208,7 +208,7 @@ void KMSender::outboxMsgAdded(int idx) //----------------------------------------------------------------------------- -bool KMSender::doSendQueued( const QString &customTransport ) +bool KMSender::doSendQueued( const TQString &customTransport ) { if (!settingsOk()) return false; @@ -231,8 +231,8 @@ bool KMSender::doSendQueued( const QString &customTransport ) for( int i = 0 ; i<mTotalMessages ; ++i ) mTotalBytes += mOutboxFolder->getMsgBase(i)->msgSize(); - connect( mOutboxFolder, SIGNAL(msgAdded(int)), - this, SLOT(outboxMsgAdded(int)) ); + connect( mOutboxFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(outboxMsgAdded(int)) ); mCurrentMsg = 0; mSentFolder = kmkernel->sentFolder(); @@ -300,7 +300,7 @@ void KMSender::doSendMsg() KMMessage & newMsg( *mCurrentMsg->unencryptedMsg() ); mCurrentMsg->dwContentType() = newMsg.dwContentType(); mCurrentMsg->setContentTransferEncodingStr( newMsg.contentTransferEncodingStr() ); - QCString newDispo = newMsg.headerField("Content-Disposition").latin1(); + TQCString newDispo = newMsg.headerField("Content-Disposition").latin1(); if( newDispo.isEmpty() ) mCurrentMsg->removeHeaderField( "Content-Disposition" ); else @@ -471,18 +471,18 @@ void KMSender::doSendMsg() i18n( "Sending messages" ), i18n("Initiating sender process..."), true ); - connect( mProgressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), - this, SLOT( slotAbortSend() ) ); + connect( mProgressItem, TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), + this, TQT_SLOT( slotAbortSend() ) ); kapp->ref(); mSendInProgress = true; } - QString msgTransport = mCustomTransport; + TQString msgTransport = mCustomTransport; if ( msgTransport.isEmpty() ) { msgTransport = mCurrentMsg->headerField("X-KMail-Transport"); } if ( msgTransport.isEmpty() ) { - const QStringList sl = KMTransportInfo::availableTransports(); + const TQStringList sl = KMTransportInfo::availableTransports(); if (!sl.empty()) msgTransport = sl.front(); } @@ -516,8 +516,8 @@ void KMSender::doSendMsg() if (!mSendProc) sendProcStarted(false); else { - connect(mSendProc, SIGNAL(idle()), SLOT(slotIdle())); - connect(mSendProc, SIGNAL(started(bool)), SLOT(sendProcStarted(bool))); + connect(mSendProc, TQT_SIGNAL(idle()), TQT_SLOT(slotIdle())); + connect(mSendProc, TQT_SIGNAL(started(bool)), TQT_SLOT(sendProcStarted(bool))); // Run the precommand if there is one if ( !mTransportInfo->precommand.isEmpty() ) { @@ -534,11 +534,11 @@ void KMSender::doSendMsg() doSendMsgAux(); } -bool KMSender::runPrecommand( const QString & cmd ) { +bool KMSender::runPrecommand( const TQString & cmd ) { setStatusMsg( i18n("Executing precommand %1").arg( cmd ) ); mPrecommand = new KMPrecommand( cmd ); - connect( mPrecommand, SIGNAL(finished(bool)), - SLOT(slotPrecommandFinished(bool)) ); + connect( mPrecommand, TQT_SIGNAL(finished(bool)), + TQT_SLOT(slotPrecommandFinished(bool)) ); if ( !mPrecommand->start() ) { delete mPrecommand; mPrecommand = 0; return false; @@ -563,17 +563,17 @@ void KMSender::sendProcStarted(bool success) } -static QStringList addrSpecListToStringList( const AddrSpecList & l, bool allowEmpty=false ) { - QStringList result; +static TQStringList addrSpecListToStringList( const AddrSpecList & l, bool allowEmpty=false ) { + TQStringList result; for ( AddrSpecList::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it ) { - const QString s = (*it).asString(); + const TQString s = (*it).asString(); if ( allowEmpty || !s.isEmpty() ) result.push_back( s ); } return result; } -static void extractSenderToCCAndBcc( KMMessage * aMsg, QString * sender, QStringList * to, QStringList * cc, QStringList * bcc ) { +static void extractSenderToCCAndBcc( KMMessage * aMsg, TQString * sender, TQStringList * to, TQStringList * cc, TQStringList * bcc ) { if ( sender ) *sender = aMsg->sender(); if( !aMsg->headerField("X-KMail-Recipients").isEmpty() ) { // extended BCC handling to prevent TOs and CCs from seeing @@ -597,15 +597,15 @@ void KMSender::doSendMsgAux() setStatusMsg(i18n("%3: subject of message","Sending message %1 of %2: %3") .arg(mSentMessages+mFailedMessages+1).arg(mTotalMessages) .arg(mCurrentMsg->subject())); - QStringList to, cc, bcc; - QString sender; + TQStringList to, cc, bcc; + TQString sender; extractSenderToCCAndBcc( mCurrentMsg, &sender, &to, &cc, &bcc ); // MDNs are required to have an empty envelope from as per RFC2298. if ( messageIsDispositionNotificationReport( mCurrentMsg ) && GlobalSettings::self()->sendMDNsWithEmptySender() ) sender = "<>"; - const QByteArray message = mCurrentMsg->asSendableString(); + const TQByteArray message = mCurrentMsg->asSendableString(); if ( sender.isEmpty() || !mSendProc->send( sender, to, cc, bcc, message ) ) { if ( mCurrentMsg ) mCurrentMsg->setTransferInProgress( false ); @@ -640,8 +640,8 @@ void KMSender::cleanup(void) mSentFolder = 0; } if ( mOutboxFolder ) { - disconnect( mOutboxFolder, SIGNAL(msgAdded(int)), - this, SLOT(outboxMsgAdded(int)) ); + disconnect( mOutboxFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(outboxMsgAdded(int)) ); mOutboxFolder->close("dosendoutbox"); if ( mOutboxFolder->count( true ) == 0 ) { mOutboxFolder->expunge(); @@ -677,8 +677,8 @@ void KMSender::slotIdle() { assert(mSendProc != 0); - QString msg; - QString errString; + TQString msg; + TQString errString; if (mSendProc) errString = mSendProc->lastErrorMessage(); @@ -708,7 +708,7 @@ void KMSender::slotIdle() mCurrentMsg = 0; mFailedMessages++; // reset cached password - QMapIterator <QString,QString> pc; + TQMapIterator <TQString,TQString> pc; if ( (pc = mPasswdCache.find( mMethodStr )) != mPasswdCache.end() ) { mPasswdCache.erase(pc); } @@ -785,9 +785,9 @@ void KMSender::setSendQuotedPrintable(bool aSendQuotedPrintable) //----------------------------------------------------------------------------- -KMSendProc* KMSender::createSendProcFromString( const QString & transport ) +KMSendProc* KMSender::createSendProcFromString( const TQString & transport ) { - mTransportInfo->type = QString::null; + mTransportInfo->type = TQString::null; int nr = KMTransportInfo::findTransport(transport); if (nr) { @@ -798,7 +798,7 @@ KMSendProc* KMSender::createSendProcFromString( const QString & transport ) mTransportInfo->type = "smtp"; mTransportInfo->auth = false; mTransportInfo->encryption = "NONE"; - QString serverport = transport.mid(7); + TQString serverport = transport.mid(7); int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); @@ -813,7 +813,7 @@ KMSendProc* KMSender::createSendProcFromString( const QString & transport ) mTransportInfo->type = "smtps"; mTransportInfo->auth = false; mTransportInfo->encryption = "ssl"; - QString serverport = transport.mid(7); + TQString serverport = transport.mid(7); int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); @@ -877,7 +877,7 @@ void KMSender::setStatusByLink(const KMMessage *aMsg) //============================================================================= //============================================================================= KMSendProc::KMSendProc( KMSender * sender ) - : QObject( 0 ), + : TQObject( 0 ), mSender( sender ), mLastErrorMessage(), mSendOk( false ), @@ -890,11 +890,11 @@ void KMSendProc::reset() { mSending = false; mSendOk = false; - mLastErrorMessage = QString::null; + mLastErrorMessage = TQString::null; } //----------------------------------------------------------------------------- -void KMSendProc::failed(const QString &aMsg) +void KMSendProc::failed(const TQString &aMsg) { mSending = false; mSendOk = false; @@ -902,7 +902,7 @@ void KMSendProc::failed(const QString &aMsg) } //----------------------------------------------------------------------------- -void KMSendProc::statusMsg(const QString& aMsg) +void KMSendProc::statusMsg(const TQString& aMsg) { if (mSender) mSender->setStatusMsg(aMsg); } @@ -927,8 +927,8 @@ bool KMSendSendmail::doStart() { if (mSender->transportInfo()->host.isEmpty()) { - const QString str = i18n("Please specify a mailer program in the settings."); - const QString msg = i18n("Sending failed:\n%1\n" + const TQString str = i18n("Please specify a mailer program in the settings."); + const TQString msg = i18n("Sending failed:\n%1\n" "The message will stay in the 'outbox' folder and will be resent.\n" "Please remove it from there if you do not want the message to " "be resent.\n" @@ -943,12 +943,12 @@ bool KMSendSendmail::doStart() { { mMailerProc = new KProcess; assert(mMailerProc != 0); - connect(mMailerProc,SIGNAL(processExited(KProcess*)), - this, SLOT(sendmailExited(KProcess*))); - connect(mMailerProc,SIGNAL(wroteStdin(KProcess*)), - this, SLOT(wroteStdin(KProcess*))); - connect(mMailerProc,SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(receivedStderr(KProcess*, char*, int))); + connect(mMailerProc,TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(sendmailExited(KProcess*))); + connect(mMailerProc,TQT_SIGNAL(wroteStdin(KProcess*)), + this, TQT_SLOT(wroteStdin(KProcess*))); + connect(mMailerProc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(receivedStderr(KProcess*, char*, int))); } return true; } @@ -967,7 +967,7 @@ void KMSendSendmail::abort() idle(); } -bool KMSendSendmail::doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) { +bool KMSendSendmail::doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) { mMailerProc->clearArguments(); *mMailerProc << mSender->transportInfo()->host << "-i" << "-f" << sender @@ -1042,9 +1042,9 @@ KMSendSMTP::KMSendSMTP(KMSender *sender) mJob(0), mSlave(0) { - KIO::Scheduler::connect(SIGNAL(slaveError(KIO::Slave *, int, - const QString &)), this, SLOT(slaveError(KIO::Slave *, int, - const QString &))); + KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave *, int, + const TQString &)), this, TQT_SLOT(slaveError(KIO::Slave *, int, + const TQString &))); } KMSendSMTP::~KMSendSMTP() @@ -1052,11 +1052,11 @@ KMSendSMTP::~KMSendSMTP() if (mJob) mJob->kill(); } -bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) { - QString query = "headers=0&from="; +bool KMSendSMTP::doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) { + TQString query = "headers=0&from="; query += KURL::encode_string( sender ); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = to.begin(); it != to.end(); ++it ) query += "&to=" + KURL::encode_string(*it); @@ -1081,8 +1081,8 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q if (ti->auth) { - QMapIterator<QString,QString> tpc = mSender->mPasswdCache.find( ti->name ); - QString tpwd = ( tpc != mSender->mPasswdCache.end() )?(*tpc):QString::null; + TQMapIterator<TQString,TQString> tpc = mSender->mPasswdCache.find( ti->name ); + TQString tpwd = ( tpc != mSender->mPasswdCache.end() )?(*tpc):TQString::null; if ( ti->passwd().isEmpty() ) ti->setPasswd( tpwd ); @@ -1094,12 +1094,12 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q int result; KCursorSaver idle(KBusyPtr::idle()); - QString passwd = ti->passwd(); + TQString passwd = ti->passwd(); result = KIO::PasswordDialog::getNameAndPassword(ti->user, passwd, &b, i18n("You need to supply a username and a password to use this " - "SMTP server."), false, QString::null, ti->name, QString::null); + "SMTP server."), false, TQString::null, ti->name, TQString::null); - if ( result != QDialog::Accepted ) + if ( result != TQDialog::Accepted ) { abort(); return false; @@ -1138,7 +1138,7 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q if ( mMessageLength ) // allow +5% for subsequent LF->CRLF and dotstuffing (an average // over 2G-lines gives an average line length of 42-43): - query += "&size=" + QString::number( qRound( mMessageLength * 1.05 ) ); + query += "&size=" + TQString::number( qRound( mMessageLength * 1.05 ) ); destination.setPath("/send"); destination.setQuery( query ); @@ -1150,9 +1150,9 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q } mJob->addMetaData( "lf2crlf+dotstuff", "slave" ); KIO::Scheduler::assignJobToSlave(mSlave, mJob); - connect(mJob, SIGNAL(result(KIO::Job *)), this, SLOT(result(KIO::Job *))); - connect(mJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)), - this, SLOT(dataReq(KIO::Job *, QByteArray &))); + connect(mJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(result(KIO::Job *))); + connect(mJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)), + this, TQT_SLOT(dataReq(KIO::Job *, TQByteArray &))); mSendOk = true; mInProcess = true; return true; @@ -1184,7 +1184,7 @@ void KMSendSMTP::doFinish() { cleanup(); } -void KMSendSMTP::dataReq(KIO::Job *, QByteArray &array) +void KMSendSMTP::dataReq(KIO::Job *, TQByteArray &array) { // Send it by 32K chuncks const int chunkSize = QMIN( mMessageLength - mMessageOffset, 32*1024 ); @@ -1215,7 +1215,7 @@ void KMSendSMTP::result(KIO::Job *_job) } } -void KMSendSMTP::slaveError(KIO::Slave *aSlave, int error, const QString &errorMsg) +void KMSendSMTP::slaveError(KIO::Slave *aSlave, int error, const TQString &errorMsg) { if (aSlave == mSlave) { diff --git a/kmail/kmsender.h b/kmail/kmsender.h index bf9864621..f97edfe80 100644 --- a/kmail/kmsender.h +++ b/kmail/kmsender.h @@ -27,11 +27,11 @@ # endif #endif -#include <qcstring.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qmap.h> -#include <qobject.h> +#include <tqcstring.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqmap.h> +#include <tqobject.h> #include <kdeversion.h> class KMMessage; @@ -50,7 +50,7 @@ namespace KPIM { class ProgressItem; } -class KMSender: public QObject, public KMail::MessageSender +class KMSender: public TQObject, public KMail::MessageSender { Q_OBJECT friend class ::KMSendProc; @@ -74,7 +74,7 @@ protected: /** Send queued messages, using the specified transport or the * default, if none is given. */ - bool doSendQueued( const QString& transport ); + bool doSendQueued( const TQString& transport ); private: /** Returns TRUE if sending is in progress. */ @@ -104,7 +104,7 @@ public: private: /** sets a status msg and emits statusMsg() */ - void setStatusMsg(const QString&); + void setStatusMsg(const TQString&); /** sets replied/forwarded status in the linked message for @p aMsg. */ void setStatusByLink(const KMMessage *aMsg); @@ -144,9 +144,9 @@ private: /** Parse protocol '://' (host port? | mailer) string and set transport settings */ - KMSendProc* createSendProcFromString( const QString & transport ); + KMSendProc* createSendProcFromString( const TQString & transport ); - bool runPrecommand( const QString & cmd ); + bool runPrecommand( const TQString & cmd ); private: bool mSendImmediate; @@ -154,11 +154,11 @@ private: KMTransportInfo *mTransportInfo; KMPrecommand *mPrecommand; - QString mCustomTransport; + TQString mCustomTransport; bool mSentOk, mSendAborted; - QString mErrorMsg; + TQString mErrorMsg; KMSendProc *mSendProc; - QString mMethodStr; + TQString mMethodStr; bool mSendProcStarted; bool mSendInProgress; KMFolder *mOutboxFolder; @@ -168,7 +168,7 @@ private: int mSentMessages, mTotalMessages; int mSentBytes, mTotalBytes; int mFailedMessages; - QMap<QString,QString> mPasswdCache; + TQMap<TQString,TQString> mPasswdCache; }; #endif /*kmsender_h*/ diff --git a/kmail/kmsender_p.h b/kmail/kmsender_p.h index e9517974b..a842027a1 100644 --- a/kmail/kmsender_p.h +++ b/kmail/kmsender_p.h @@ -6,9 +6,9 @@ #define __KMAIL_SENDER_P_H__ #include "kmsender.h" -#include <qstring.h> -#include <qstringlist.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqobject.h> #include <kio/global.h> #include <kdeversion.h> @@ -32,7 +32,7 @@ public: void start() { emit started( doStart() ); } /** Send given message. May return before message is sent. */ - bool send( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) { + bool send( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) { reset(); return doSend( sender, to, cc, bcc, message ); } @@ -47,7 +47,7 @@ public: bool sendOk() const { return mSendOk; } /** Returns error message of last call of failed(). */ - QString lastErrorMessage() const { return mLastErrorMessage; } + TQString lastErrorMessage() const { return mLastErrorMessage; } signals: /** Emitted when the current message is sent or an error occurred. */ @@ -61,22 +61,22 @@ protected: /** Called to signal a transmission error. The sender then calls finish() and terminates sending of messages. Sets mSending to FALSE. */ - void failed(const QString &msg); + void failed(const TQString &msg); /** Informs the user about what is going on. */ - void statusMsg(const QString&); + void statusMsg(const TQString&); private: void reset(); private: virtual void doFinish() = 0; - virtual bool doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) = 0; + virtual bool doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) = 0; virtual bool doStart() = 0; protected: KMSender* mSender; - QString mLastErrorMessage; + TQString mLastErrorMessage; bool mSendOk : 1; bool mSending : 1; }; @@ -101,12 +101,12 @@ private: /** implemented from KMSendProc */ void doFinish(); /** implemented from KMSendProc */ - bool doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ); + bool doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ); /** implemented from KMSendProc */ bool doStart(); private: - QByteArray mMsgStr; + TQByteArray mMsgStr; char* mMsgPos; int mMsgRest; KProcess* mMailerProc; @@ -123,22 +123,22 @@ public: void abort(); private slots: - void dataReq(KIO::Job *, QByteArray &); + void dataReq(KIO::Job *, TQByteArray &); void result(KIO::Job *); - void slaveError(KIO::Slave *, int, const QString &); + void slaveError(KIO::Slave *, int, const TQString &); private: /** implemented from KMSendProc */ void doFinish(); /** implemented from KMSendProc */ - bool doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ); + bool doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ); /** implemented from KMSendProc */ bool doStart() { return true; } void cleanup(); private: - QByteArray mMessage; + TQByteArray mMessage; uint mMessageLength; uint mMessageOffset; diff --git a/kmail/kmservertest.cpp b/kmail/kmservertest.cpp index 49fb0ad8b..c184e6dfc 100644 --- a/kmail/kmservertest.cpp +++ b/kmail/kmservertest.cpp @@ -45,14 +45,14 @@ #include <kio/global.h> //----------------------------------------------------------------------------- -KMServerTest::KMServerTest( const QString & protocol, const QString & host, int port ) - : QObject(), +KMServerTest::KMServerTest( const TQString & protocol, const TQString & host, int port ) + : TQObject(), mProtocol( protocol ), mHost( host ), mSSL( false ), mJob( 0 ), mSlave( 0 ), mConnectionErrorCount( 0 ) { KIO::Scheduler::connect( - SIGNAL(slaveError(KIO::Slave *, int, const QString &)), - this, SLOT(slotSlaveResult(KIO::Slave *, int, const QString &))); + TQT_SIGNAL(slaveError(KIO::Slave *, int, const TQString &)), + this, TQT_SLOT(slotSlaveResult(KIO::Slave *, int, const TQString &))); if ( port == 993 || port == 995 || port == 465 ) port = 0; @@ -85,29 +85,29 @@ void KMServerTest::startOffSlave( int port ) { slotSlaveResult( 0, 1 ); return; } - connect( mSlave, SIGNAL(metaData(const KIO::MetaData&)), - SLOT(slotMetaData(const KIO::MetaData&)) ); + connect( mSlave, TQT_SIGNAL(metaData(const KIO::MetaData&)), + TQT_SLOT(slotMetaData(const KIO::MetaData&)) ); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int) 'c'; mJob = KIO::special( url, packedArgs, false ); KIO::Scheduler::assignJobToSlave( mSlave, mJob ); - connect( mJob, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)) ); - connect( mJob, SIGNAL(infoMessage(KIO::Job*,const QString&)), - SLOT(slotData(KIO::Job*,const QString&)) ); + connect( mJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)) ); + connect( mJob, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)), + TQT_SLOT(slotData(KIO::Job*,const TQString&)) ); } //----------------------------------------------------------------------------- -void KMServerTest::slotData(KIO::Job *, const QString &data) +void KMServerTest::slotData(KIO::Job *, const TQString &data) { if ( mSSL ) - mListSSL = QStringList::split(' ', data); + mListSSL = TQStringList::split(' ', data); else - mListNormal = QStringList::split(' ', data); + mListNormal = TQStringList::split(' ', data); } @@ -137,7 +137,7 @@ void KMServerTest::slotResult(KIO::Job *job) //----------------------------------------------------------------------------- void KMServerTest::slotSlaveResult(KIO::Slave *aSlave, int error, - const QString &errorText) + const TQString &errorText) { if (aSlave != mSlave) return; if ( mSSL && error == 0 ) { diff --git a/kmail/kmservertest.h b/kmail/kmservertest.h index d6ce9c2df..6c19da1ce 100644 --- a/kmail/kmservertest.h +++ b/kmail/kmservertest.h @@ -33,9 +33,9 @@ #ifndef kmservertest_h #define kmservertest_h -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace KIO { class Job; @@ -49,37 +49,37 @@ class KMServerTest : public QObject Q_OBJECT public: - KMServerTest( const QString & protocol, const QString & host, int port ); + KMServerTest( const TQString & protocol, const TQString & host, int port ); virtual ~KMServerTest(); signals: - void capabilities( const QStringList & capaNormal, - const QStringList & capaSSL ); - void capabilities( const QStringList & capaNormal, - const QStringList & capaSSL, - const QString & authNone, const QString & authSSL, - const QString & authTLS ); + void capabilities( const TQStringList & capaNormal, + const TQStringList & capaSSL ); + void capabilities( const TQStringList & capaNormal, + const TQStringList & capaSSL, + const TQString & authNone, const TQString & authSSL, + const TQString & authTLS ); protected slots: - void slotData(KIO::Job *job, const QString &data); + void slotData(KIO::Job *job, const TQString &data); void slotResult(KIO::Job *job); void slotMetaData( const KIO::MetaData & ); void slotSlaveResult(KIO::Slave *aSlave, int error, - const QString &errorText = QString::null); + const TQString &errorText = TQString::null); protected: KIO::MetaData slaveConfig() const; void startOffSlave( int port=0 ); protected: - const QString mProtocol; - const QString mHost; + const TQString mProtocol; + const TQString mHost; bool mSSL; - QStringList mListNormal; - QStringList mListSSL; - QString mAuthNone; - QString mAuthSSL; - QString mAuthTLS; + TQStringList mListNormal; + TQStringList mListSSL; + TQString mAuthNone; + TQString mAuthSSL; + TQString mAuthTLS; KIO::SimpleJob *mJob; KIO::Slave *mSlave; int mConnectionErrorCount; diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp index 5daf4ed02..f0a560e5c 100644 --- a/kmail/kmstartup.cpp +++ b/kmail/kmstartup.cpp @@ -41,7 +41,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include <qfile.h> +#include <tqfile.h> #undef Status // stupid X headers @@ -81,14 +81,14 @@ void kmsetSignalHandler(void (*handler)(int)) //----------------------------------------------------------------------------- namespace { - QString getMyHostName() { + TQString getMyHostName() { char hostNameC[256]; // null terminate this C string hostNameC[255] = 0; // set the string to 0 length if gethostname fails if(gethostname(hostNameC, 255)) hostNameC[0] = 0; - return QString::fromLocal8Bit(hostNameC); + return TQString::fromLocal8Bit(hostNameC); } } // anon namespace @@ -137,24 +137,24 @@ void checkConfigUpdates() { void lockOrDie() { // Check and create a lock file to prevent concurrent access to kmail files - QString appName = kapp->instanceName(); + TQString appName = kapp->instanceName(); if ( appName.isEmpty() ) appName = "kmail"; - QString programName; + TQString programName; const KAboutData *about = kapp->aboutData(); if ( about ) programName = about->programName(); if ( programName.isEmpty() ) programName = i18n("KMail"); - QString lockLocation = locateLocal("data", "kmail/lock"); + TQString lockLocation = locateLocal("data", "kmail/lock"); KSimpleConfig config(lockLocation); int oldPid = config.readNumEntry("pid", -1); - const QString oldHostName = config.readEntry("hostname"); - const QString oldAppName = config.readEntry( "appName", appName ); - const QString oldProgramName = config.readEntry( "programName", programName ); - const QString hostName = getMyHostName(); + const TQString oldHostName = config.readEntry("hostname"); + const TQString oldAppName = config.readEntry( "appName", appName ); + const TQString oldProgramName = config.readEntry( "programName", programName ); + const TQString hostName = getMyHostName(); bool first_instance = false; if ( oldPid == -1 ) first_instance = true; @@ -165,16 +165,16 @@ void lockOrDie() { // On linux with /proc we can even check that it's really kmail and not something else char path_buffer[MAXPATHLEN + 1]; path_buffer[MAXPATHLEN] = 0; - const QString procPath = QString("/proc/%1/exe").arg(oldPid); + const TQString procPath = TQString("/proc/%1/exe").arg(oldPid); const int length = readlink (procPath.latin1(), path_buffer, MAXPATHLEN); if ( length == -1 ) // not such pid first_instance = true; else { path_buffer[length] = '\0'; - const QString path = QFile::decodeName(path_buffer); + const TQString path = TQFile::decodeName(path_buffer); kdDebug() << k_funcinfo << path << endl; const int pos = path.findRev('/'); - const QString fileName = path.mid(pos+1); + const TQString fileName = path.mid(pos+1); kdDebug() << "Found process " << oldPid << " running. It's: " << fileName << endl; first_instance = fileName != "kmail" && fileName != "kontact"; } @@ -189,7 +189,7 @@ void lockOrDie() { } if ( !first_instance ) { - QString msg; + TQString msg; if ( oldHostName == hostName ) { // this can only happen if the user is running this application on // different displays on the same machine. All other cases will be @@ -200,8 +200,8 @@ void lockOrDie() { "can cause the loss of mail. You should not start %1 " "unless you are sure that it is not already running.") .arg( programName, programName ); - // QString::arg( st ) only replaces the first occurrence of %1 - // with st while QString::arg( s1, s2 ) replacess all occurrences + // TQString::arg( st ) only replaces the first occurrence of %1 + // with st while TQString::arg( s1, s2 ) replacess all occurrences // of %1 with s1 and all occurrences of %2 with s2. So don't // even think about changing the above to .arg( programName ). else @@ -228,7 +228,7 @@ void lockOrDie() { KCursorSaver idle( KBusyPtr::idle() ); if ( KMessageBox::No == - KMessageBox::warningYesNo( 0, msg, QString::null, + KMessageBox::warningYesNo( 0, msg, TQString::null, i18n("Start %1").arg( programName ), i18n("Exit") ) ) { exit(1); @@ -261,7 +261,7 @@ void insertLibraryCataloguesAndIcons() { void cleanup() { - const QString lockLocation = locateLocal("data", "kmail/lock"); + const TQString lockLocation = locateLocal("data", "kmail/lock"); KSimpleConfig config(lockLocation); config.writeEntry("pid", -1); config.sync(); diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp index c8595a88f..4e6463c15 100644 --- a/kmail/kmsystemtray.cpp +++ b/kmail/kmsystemtray.cpp @@ -37,11 +37,11 @@ using KMail::AccountManager; #include <kdebug.h> #include <kpopupmenu.h> -#include <qpainter.h> -#include <qbitmap.h> -#include <qtooltip.h> -#include <qwidgetlist.h> -#include <qobjectlist.h> +#include <tqpainter.h> +#include <tqbitmap.h> +#include <tqtooltip.h> +#include <tqwidgetlist.h> +#include <tqobjectlist.h> #include <math.h> #include <assert.h> @@ -57,7 +57,7 @@ using KMail::AccountManager; * with its count of unread messages, allowing the user to jump * to the first unread message in each folder. */ -KMSystemTray::KMSystemTray(QWidget *parent, const char *name) +KMSystemTray::KMSystemTray(TQWidget *parent, const char *name) : KSystemTray( parent, name ), mParentVisible( true ), mPosOfMainWin( 0, 0 ), @@ -71,8 +71,8 @@ KMSystemTray::KMSystemTray(QWidget *parent, const char *name) kdDebug(5006) << "Initting systray" << endl; mLastUpdate = time( 0 ); - mUpdateTimer = new QTimer( this, "systraytimer" ); - connect( mUpdateTimer, SIGNAL( timeout() ), SLOT( updateNewMessages() ) ); + mUpdateTimer = new TQTimer( this, "systraytimer" ); + connect( mUpdateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateNewMessages() ) ); mDefaultIcon = loadIcon( "kmail" ); mLightIconImage = loadIcon( "kmaillight" ).convertToImage(); @@ -81,7 +81,7 @@ KMSystemTray::KMSystemTray(QWidget *parent, const char *name) KMMainWidget * mainWidget = kmkernel->getKMMainWidget(); if ( mainWidget ) { - QWidget * mainWin = mainWidget->topLevelWidget(); + TQWidget * mainWin = mainWidget->topLevelWidget(); if ( mainWin ) { mDesktopOfMainWin = KWin::windowInfo( mainWin->winId(), NET::WMDesktop ).desktop(); @@ -95,13 +95,13 @@ KMSystemTray::KMSystemTray(QWidget *parent, const char *name) /** Initiate connections between folders and this object */ foldersChanged(); - connect( kmkernel->folderMgr(), SIGNAL(changed()), SLOT(foldersChanged())); - connect( kmkernel->imapFolderMgr(), SIGNAL(changed()), SLOT(foldersChanged())); - connect( kmkernel->dimapFolderMgr(), SIGNAL(changed()), SLOT(foldersChanged())); - connect( kmkernel->searchFolderMgr(), SIGNAL(changed()), SLOT(foldersChanged())); + connect( kmkernel->folderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged())); + connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged())); + connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged())); + connect( kmkernel->searchFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged())); - connect( kmkernel->acctMgr(), SIGNAL( checkedMail( bool, bool, const QMap<QString, int> & ) ), - SLOT( updateNewMessages() ) ); + connect( kmkernel->acctMgr(), TQT_SIGNAL( checkedMail( bool, bool, const TQMap<TQString, int> & ) ), + TQT_SLOT( updateNewMessages() ) ); } void KMSystemTray::buildPopupMenu() @@ -187,14 +187,14 @@ void KMSystemTray::updateCount() int oldPixmapWidth = pixmap()->size().width(); int oldPixmapHeight = pixmap()->size().height(); - QString countString = QString::number( mCount ); - QFont countFont = KGlobalSettings::generalFont(); + TQString countString = TQString::number( mCount ); + TQFont countFont = KGlobalSettings::generalFont(); countFont.setBold(true); // decrease the size of the font for the number of unread messages if the // number doesn't fit into the available space float countFontSize = countFont.pointSizeFloat(); - QFontMetrics qfm( countFont ); + TQFontMetrics qfm( countFont ); int width = qfm.width( countString ); if( width > oldPixmapWidth ) { @@ -208,31 +208,31 @@ void KMSystemTray::updateCount() // reason text that is drawn on a transparent pixmap is invisible // (apparently the alpha channel isn't changed when the text is drawn). // Therefore I have to draw the text on a solid background and then remove - // the background by making it transparent with QPixmap::setMask. This + // the background by making it transparent with TQPixmap::setMask. This // involves the slow createHeuristicMask() function (from the API docs: - // "This function is slow because it involves transformation to a QImage, - // non-trivial computations and a transformation back to a QBitmap."). Then - // I have to convert the resulting QPixmap to a QImage in order to overlay + // "This function is slow because it involves transformation to a TQImage, + // non-trivial computations and a transformation back to a TQBitmap."). Then + // I have to convert the resulting TQPixmap to a TQImage in order to overlay // the light KMail icon with the number (because KIconEffect::overlay only - // works with QImage). Finally the resulting QImage has to be converted - // back to a QPixmap. + // works with TQImage). Finally the resulting TQImage has to be converted + // back to a TQPixmap. // That's a lot of work for overlaying the KMail icon with the number of // unread messages, but every other approach I tried failed miserably. // IK, 2003-09-22 - QPixmap numberPixmap( oldPixmapWidth, oldPixmapHeight ); + TQPixmap numberPixmap( oldPixmapWidth, oldPixmapHeight ); numberPixmap.fill( Qt::white ); - QPainter p( &numberPixmap ); + TQPainter p( &numberPixmap ); p.setFont( countFont ); p.setPen( Qt::blue ); p.drawText( numberPixmap.rect(), Qt::AlignCenter, countString ); numberPixmap.setMask( numberPixmap.createHeuristicMask() ); - QImage numberImage = numberPixmap.convertToImage(); + TQImage numberImage = numberPixmap.convertToImage(); // Overlay the light KMail icon with the number image - QImage iconWithNumberImage = mLightIconImage.copy(); + TQImage iconWithNumberImage = mLightIconImage.copy(); KIconEffect::overlay( iconWithNumberImage, numberImage ); - QPixmap iconWithNumber; + TQPixmap iconWithNumber; iconWithNumber.convertFromImage( iconWithNumberImage ); setPixmap( iconWithNumber ); } else @@ -259,30 +259,30 @@ void KMSystemTray::foldersChanged() } /** Disconnect all previous connections */ - disconnect(this, SLOT(updateNewMessageNotification(KMFolder *))); + disconnect(this, TQT_SLOT(updateNewMessageNotification(KMFolder *))); - QStringList folderNames; - QValueList<QGuardedPtr<KMFolder> > folderList; + TQStringList folderNames; + TQValueList<TQGuardedPtr<KMFolder> > folderList; kmkernel->folderMgr()->createFolderList(&folderNames, &folderList); kmkernel->imapFolderMgr()->createFolderList(&folderNames, &folderList); kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList); kmkernel->searchFolderMgr()->createFolderList(&folderNames, &folderList); - QStringList::iterator strIt = folderNames.begin(); + TQStringList::iterator strIt = folderNames.begin(); - for(QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin(); + for(TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin(); it != folderList.end() && strIt != folderNames.end(); ++it, ++strIt) { KMFolder * currentFolder = *it; - QString currentName = *strIt; + TQString currentName = *strIt; if ( ((!currentFolder->isSystemFolder() || (currentFolder->name().lower() == "inbox")) || (currentFolder->folderType() == KMFolderTypeImap)) && !currentFolder->ignoreNewMail() ) { /** If this is a new folder, start listening for messages */ - connect(currentFolder, SIGNAL(numUnreadMsgsChanged(KMFolder *)), - this, SLOT(updateNewMessageNotification(KMFolder *))); + connect(currentFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder *)), + this, TQT_SLOT(updateNewMessageNotification(KMFolder *))); /** Check all new folders to see if we started with any new messages */ updateNewMessageNotification(currentFolder); @@ -294,7 +294,7 @@ void KMSystemTray::foldersChanged() * On left mouse click, switch focus to the first KMMainWidget. On right * click, bring up a list of all folders with a count of unread messages. */ -void KMSystemTray::mousePressEvent(QMouseEvent *e) +void KMSystemTray::mousePressEvent(TQMouseEvent *e) { // switch to kmail on left mouse button if( e->button() == LeftButton ) @@ -324,13 +324,13 @@ void KMSystemTray::mousePressEvent(QMouseEvent *e) { KPopupMenu *newMessagesPopup = new KPopupMenu(); - QMap<QGuardedPtr<KMFolder>, int>::Iterator it = mFoldersWithUnread.begin(); + TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it = mFoldersWithUnread.begin(); for(uint i=0; it != mFoldersWithUnread.end(); ++i) { kdDebug(5006) << "Adding folder" << endl; mPopupFolders.append( it.key() ); - QString item = prettyName(it.key()) + " (" + QString::number(it.data()) + ")"; - newMessagesPopup->insertItem(item, this, SLOT(selectedAccount(int)), 0, i); + TQString item = prettyName(it.key()) + " (" + TQString::number(it.data()) + ")"; + newMessagesPopup->insertItem(item, this, TQT_SLOT(selectedAccount(int)), 0, i); ++it; } @@ -349,9 +349,9 @@ void KMSystemTray::mousePressEvent(QMouseEvent *e) * Return the name of the folder in which the mail is deposited, prepended * with the account name if the folder is IMAP. */ -QString KMSystemTray::prettyName(KMFolder * fldr) +TQString KMSystemTray::prettyName(KMFolder * fldr) { - QString rvalue = fldr->label(); + TQString rvalue = fldr->label(); if(fldr->folderType() == KMFolderTypeImap) { KMFolderImap * imap = dynamic_cast<KMFolderImap*> (fldr->storage()); @@ -377,7 +377,7 @@ bool KMSystemTray::mainWindowIsOnCurrentDesktop() if ( !mainWidget ) return false; - QWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget(); + TQWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget(); if ( !mainWin ) return false; @@ -393,7 +393,7 @@ void KMSystemTray::showKMail() { if (!kmkernel->getKMMainWidget()) return; - QWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget(); + TQWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget(); assert(mainWin); if(mainWin) { @@ -421,7 +421,7 @@ void KMSystemTray::hideKMail() { if (!kmkernel->getKMMainWidget()) return; - QWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget(); + TQWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget(); assert(mainWin); if(mainWin) { @@ -464,7 +464,7 @@ void KMSystemTray::updateNewMessageNotification(KMFolder * fldr) void KMSystemTray::updateNewMessages() { - for ( QMap<QGuardedPtr<KMFolder>, bool>::Iterator it = mPendingUpdates.begin(); + for ( TQMap<TQGuardedPtr<KMFolder>, bool>::Iterator it = mPendingUpdates.begin(); it != mPendingUpdates.end(); ++it) { KMFolder *fldr = it.key(); @@ -474,7 +474,7 @@ void KMSystemTray::updateNewMessages() /** The number of unread messages in that folder */ int unread = fldr->countUnread(); - QMap<QGuardedPtr<KMFolder>, int>::Iterator it = + TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it = mFoldersWithUnread.find(fldr); bool unmapped = (it == mFoldersWithUnread.end()); @@ -526,7 +526,7 @@ void KMSystemTray::updateNewMessages() if(mFoldersWithUnread.count() == 0) { mPopupFolders.clear(); - disconnect(this, SLOT(selectedAccount(int))); + disconnect(this, TQT_SLOT(selectedAccount(int))); mCount = 0; @@ -542,8 +542,8 @@ void KMSystemTray::updateNewMessages() updateCount(); /** Update tooltip to reflect count of unread messages */ - QToolTip::remove(this); - QToolTip::add(this, mCount == 0 ? + TQToolTip::remove(this); + TQToolTip::add(this, mCount == 0 ? i18n("There are no unread messages") : i18n("There is 1 unread message.", "There are %n unread messages.", @@ -575,7 +575,7 @@ void KMSystemTray::selectedAccount(int id) if(!fldr) return; KMFolderTree * ft = mainWidget->folderTree(); if(!ft) return; - QListViewItem * fldrIdx = ft->indexOfFolder(fldr); + TQListViewItem * fldrIdx = ft->indexOfFolder(fldr); if(!fldrIdx) return; ft->setCurrentItem(fldrIdx); diff --git a/kmail/kmsystemtray.h b/kmail/kmsystemtray.h index 2d2e2bf61..4314ccfe1 100644 --- a/kmail/kmsystemtray.h +++ b/kmail/kmsystemtray.h @@ -20,11 +20,11 @@ #include <ksystemtray.h> -#include <qmap.h> -#include <qguardedptr.h> -#include <qvaluevector.h> -#include <qpixmap.h> -#include <qimage.h> +#include <tqmap.h> +#include <tqguardedptr.h> +#include <tqvaluevector.h> +#include <tqpixmap.h> +#include <tqimage.h> #include <time.h> @@ -43,7 +43,7 @@ class KMSystemTray : public KSystemTray Q_OBJECT public: /** construtor */ - KMSystemTray(QWidget* parent=0, const char *name=0); + KMSystemTray(TQWidget* parent=0, const char *name=0); /** destructor */ ~KMSystemTray(); @@ -59,18 +59,18 @@ private slots: void updateNewMessages(); protected: - void mousePressEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *); bool mainWindowIsOnCurrentDesktop(); void showKMail(); void buildPopupMenu(); void updateCount(); - QString prettyName(KMFolder *); + TQString prettyName(KMFolder *); private: bool mParentVisible; - QPoint mPosOfMainWin; + TQPoint mPosOfMainWin; int mDesktopOfMainWin; int mMode; @@ -78,13 +78,13 @@ private: int mNewMessagePopupId; KPopupMenu * mPopupMenu; - QPixmap mDefaultIcon; - QImage mLightIconImage; + TQPixmap mDefaultIcon; + TQImage mLightIconImage; - QValueVector<KMFolder*> mPopupFolders; - QMap<QGuardedPtr<KMFolder>, int> mFoldersWithUnread; - QMap<QGuardedPtr<KMFolder>, bool> mPendingUpdates; - QTimer *mUpdateTimer; + TQValueVector<KMFolder*> mPopupFolders; + TQMap<TQGuardedPtr<KMFolder>, int> mFoldersWithUnread; + TQMap<TQGuardedPtr<KMFolder>, bool> mPendingUpdates; + TQTimer *mUpdateTimer; time_t mLastUpdate; }; diff --git a/kmail/kmtransport.cpp b/kmail/kmtransport.cpp index 60e56d190..690329715 100644 --- a/kmail/kmtransport.cpp +++ b/kmail/kmtransport.cpp @@ -22,16 +22,16 @@ #include "kmtransport.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qradiobutton.h> -#include <qtabwidget.h> -#include <qvalidator.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqradiobutton.h> +#include <tqtabwidget.h> +#include <tqvalidator.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include <kfiledialog.h> #include <klocale.h> @@ -67,7 +67,7 @@ KMTransportInfo::~KMTransportInfo() void KMTransportInfo::readConfig(int id) { KConfig *config = KMKernel::config(); - KConfigGroupSaver saver(config, "Transport " + QString::number(id)); + KConfigGroupSaver saver(config, "Transport " + TQString::number(id)); mId = config->readUnsignedNumEntry( "id", 0 ); type = config->readEntry("type", "smtp"); name = config->readEntry("name", i18n("Unnamed")); @@ -106,7 +106,7 @@ void KMTransportInfo::readConfig(int id) void KMTransportInfo::writeConfig(int id) { KConfig *config = KMKernel::config(); - KConfigGroupSaver saver(config, "Transport " + QString::number(id)); + KConfigGroupSaver saver(config, "Transport " + TQString::number(id)); if (!mId) mId = TransportManager::createId(); config->writeEntry("id", mId); @@ -128,7 +128,7 @@ void KMTransportInfo::writeConfig(int id) bool passwdStored = false; Wallet *wallet = kmkernel->wallet(); if ( mPasswdDirty ) { - if ( wallet && wallet->writePassword( "transport-" + QString::number(mId), passwd() ) == 0 ) { + if ( wallet && wallet->writePassword( "transport-" + TQString::number(mId), passwd() ) == 0 ) { passwdStored = true; mPasswdDirty = false; mStorePasswdInConfig = false; @@ -158,46 +158,46 @@ void KMTransportInfo::writeConfig(int id) // delete already stored password if password storage is disabled if ( !storePasswd() ) { if ( !Wallet::keyDoesNotExist( - Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) ) { + Wallet::NetworkWallet(), "kmail", "transport-" + TQString::number(mId) ) ) { Wallet *wallet = kmkernel->wallet(); if ( wallet ) - wallet->removeEntry( "transport-" + QString::number(mId) ); + wallet->removeEntry( "transport-" + TQString::number(mId) ); } config->deleteEntry( "pass" ); } } -int KMTransportInfo::findTransport(const QString &name) +int KMTransportInfo::findTransport(const TQString &name) { KConfig *config = KMKernel::config(); KConfigGroupSaver saver(config, "General"); int numTransports = config->readNumEntry("transports", 0); for (int i = 1; i <= numTransports; i++) { - KConfigGroupSaver saver(config, "Transport " + QString::number(i)); + KConfigGroupSaver saver(config, "Transport " + TQString::number(i)); if (config->readEntry("name") == name) return i; } return 0; } -QStringList KMTransportInfo::availableTransports() +TQStringList KMTransportInfo::availableTransports() { - QStringList result; + TQStringList result; KConfig *config = KMKernel::config(); KConfigGroupSaver saver(config, "General"); int numTransports = config->readNumEntry("transports", 0); for (int i = 1; i <= numTransports; i++) { - KConfigGroupSaver saver(config, "Transport " + QString::number(i)); + KConfigGroupSaver saver(config, "Transport " + TQString::number(i)); result.append(config->readEntry("name")); } return result; } -QString KMTransportInfo::passwd() const +TQString KMTransportInfo::passwd() const { if ( auth && storePasswd() && mPasswd.isEmpty() ) readPassword(); @@ -205,7 +205,7 @@ QString KMTransportInfo::passwd() const } -void KMTransportInfo::setPasswd( const QString &passwd ) +void KMTransportInfo::setPasswd( const TQString &passwd ) { if ( passwd != mPasswd ) { mPasswd = passwd; @@ -231,35 +231,35 @@ void KMTransportInfo::readPassword() const // results for new entries without closing and reopening the wallet if ( Wallet::isOpen( Wallet::NetworkWallet() ) ) { Wallet* wallet = kmkernel->wallet(); - if ( !wallet || !wallet->hasEntry( "transport-" + QString::number(mId) ) ) + if ( !wallet || !wallet->hasEntry( "transport-" + TQString::number(mId) ) ) return; } else { - if ( Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) ) + if ( Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + TQString::number(mId) ) ) return; } if ( kmkernel->wallet() ) - kmkernel->wallet()->readPassword( "transport-" + QString::number(mId), mPasswd ); + kmkernel->wallet()->readPassword( "transport-" + TQString::number(mId), mPasswd ); } -KMTransportSelDlg::KMTransportSelDlg( QWidget *parent, const char *name, +KMTransportSelDlg::KMTransportSelDlg( TQWidget *parent, const char *name, bool modal ) : KDialogBase( parent, name, modal, i18n("Add Transport"), 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("Transport"), page ); - connect(group, SIGNAL(clicked(int)), SLOT(buttonClicked(int)) ); + TQButtonGroup *group = new TQButtonGroup( i18n("Transport"), 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("SM&TP"), group ); + TQRadioButton *radioButton1 = new TQRadioButton( i18n("SM&TP"), group ); vlay->addWidget( radioButton1 ); - QRadioButton *radioButton2 = new QRadioButton( i18n("&Sendmail"), group ); + TQRadioButton *radioButton2 = new TQRadioButton( i18n("&Sendmail"), group ); vlay->addWidget( radioButton2 ); vlay->addStretch( 10 ); @@ -280,9 +280,9 @@ int KMTransportSelDlg::selected( void ) const } -KMTransportDialog::KMTransportDialog( const QString & caption, +KMTransportDialog::KMTransportDialog( const TQString & caption, KMTransportInfo *transportInfo, - QWidget *parent, const char *name, + TQWidget *parent, const char *name, bool modal ) : KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok, true ), mServerTest( 0 ), @@ -291,7 +291,7 @@ KMTransportDialog::KMTransportDialog( const QString & caption, { assert(transportInfo != 0); - if( transportInfo->type == QString::fromLatin1("sendmail") ) + if( transportInfo->type == TQString::fromLatin1("sendmail") ) { makeSendmailPage(); } else { @@ -309,109 +309,109 @@ KMTransportDialog::~KMTransportDialog() void KMTransportDialog::makeSendmailPage() { - QFrame *page = makeMainWidget(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); - mSendmail.titleLabel = new QLabel( page ); + mSendmail.titleLabel = new TQLabel( page ); mSendmail.titleLabel->setText( i18n("Transport: Sendmail") ); - QFont titleFont( mSendmail.titleLabel->font() ); + TQFont titleFont( mSendmail.titleLabel->font() ); titleFont.setBold( true ); mSendmail.titleLabel->setFont( titleFont ); topLayout->addWidget( mSendmail.titleLabel ); KSeparator *hline = new KSeparator( KSeparator::HLine, page); topLayout->addWidget( hline ); - QGridLayout *grid = new QGridLayout( topLayout, 3, 3, spacingHint() ); + TQGridLayout *grid = new TQGridLayout( topLayout, 3, 3, spacingHint() ); grid->addColSpacing( 1, fontMetrics().maxWidth()*15 ); grid->setRowStretch( 2, 10 ); grid->setColStretch( 1, 10 ); - QLabel *label = new QLabel( i18n("&Name:"), page ); + TQLabel *label = new TQLabel( i18n("&Name:"), page ); grid->addWidget( label, 0, 0 ); mSendmail.nameEdit = new KLineEdit( page ); label->setBuddy( mSendmail.nameEdit ); grid->addWidget( mSendmail.nameEdit, 0, 1 ); - label = new QLabel( i18n("&Location:"), page ); + label = new TQLabel( i18n("&Location:"), page ); grid->addWidget( label, 1, 0 ); mSendmail.locationEdit = new KLineEdit( page ); label->setBuddy(mSendmail.locationEdit); grid->addWidget( mSendmail.locationEdit, 1, 1 ); mSendmail.chooseButton = - new QPushButton( i18n("Choos&e..."), page ); - connect( mSendmail.chooseButton, SIGNAL(clicked()), - this, SLOT(slotSendmailChooser()) ); + new TQPushButton( i18n("Choos&e..."), page ); + connect( mSendmail.chooseButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSendmailChooser()) ); - connect( mSendmail.locationEdit, SIGNAL(textChanged ( const QString & )), - this, SLOT(slotSendmailEditPath(const QString &)) ); + connect( mSendmail.locationEdit, TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT(slotSendmailEditPath(const TQString &)) ); mSendmail.chooseButton->setAutoDefault( false ); grid->addWidget( mSendmail.chooseButton, 1, 2 ); slotSendmailEditPath(mSendmail.locationEdit->text()); } -void KMTransportDialog::slotSendmailEditPath(const QString & _text) +void KMTransportDialog::slotSendmailEditPath(const TQString & _text) { enableButtonOK( !_text.isEmpty() ); } void KMTransportDialog::makeSmtpPage() { - QFrame *page = makeMainWidget(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); - mSmtp.titleLabel = new QLabel( page ); + mSmtp.titleLabel = new TQLabel( page ); mSmtp.titleLabel->setText( i18n("Transport: SMTP") ); - QFont titleFont( mSmtp.titleLabel->font() ); + TQFont titleFont( mSmtp.titleLabel->font() ); titleFont.setBold( true ); mSmtp.titleLabel->setFont( titleFont ); topLayout->addWidget( mSmtp.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, 14, 2, spacingHint() ); + TQGridLayout *grid = new TQGridLayout( page1, 14, 2, spacingHint() ); grid->addColSpacing( 1, fontMetrics().maxWidth()*15 ); grid->setRowStretch( 13, 10 ); grid->setColStretch( 1, 10 ); - QLabel *label = new QLabel( i18n("&Name:"), page1 ); + TQLabel *label = new TQLabel( i18n("&Name:"), page1 ); grid->addWidget( label, 0, 0 ); mSmtp.nameEdit = new KLineEdit( page1 ); - QWhatsThis::add(mSmtp.nameEdit, + TQWhatsThis::add(mSmtp.nameEdit, i18n("The name that KMail will use when " "referring to this server.")); label->setBuddy( mSmtp.nameEdit ); grid->addWidget( mSmtp.nameEdit, 0, 1 ); - label = new QLabel( i18n("&Host:"), page1 ); + label = new TQLabel( i18n("&Host:"), page1 ); grid->addWidget( label, 3, 0 ); mSmtp.hostEdit = new KLineEdit( page1 ); - QWhatsThis::add(mSmtp.hostEdit, + TQWhatsThis::add(mSmtp.hostEdit, i18n("The domain name or numerical address " "of the SMTP server.")); label->setBuddy( mSmtp.hostEdit ); grid->addWidget( mSmtp.hostEdit, 3, 1 ); - label = new QLabel( i18n("&Port:"), page1 ); + label = new TQLabel( i18n("&Port:"), page1 ); grid->addWidget( label, 4, 0 ); mSmtp.portEdit = new KLineEdit( page1 ); - mSmtp.portEdit->setValidator( new QIntValidator(this) ); - QWhatsThis::add(mSmtp.portEdit, + mSmtp.portEdit->setValidator( new TQIntValidator(this) ); + TQWhatsThis::add(mSmtp.portEdit, i18n("The port number that the SMTP server " "is listening on. The default port is 25.")); label->setBuddy( mSmtp.portEdit ); grid->addWidget( mSmtp.portEdit, 4, 1 ); - label = new QLabel( i18n("Preco&mmand:"), page1 ); + label = new TQLabel( i18n("Preco&mmand:"), page1 ); grid->addWidget( label, 5, 0 ); mSmtp.precommand = new KLineEdit( page1 ); - QWhatsThis::add(mSmtp.precommand, + TQWhatsThis::add(mSmtp.precommand, i18n("A command to run locally, prior " "to sending email. This can be used " "to set up ssh tunnels, for example. " @@ -419,43 +419,43 @@ void KMTransportDialog::makeSmtpPage() label->setBuddy(mSmtp.precommand); grid->addWidget( mSmtp.precommand, 5, 1 ); - QFrame* line = new QFrame( page1 ); - line->setFrameStyle( QFrame::HLine | QFrame::Plain ); + TQFrame* line = new TQFrame( page1 ); + line->setFrameStyle( TQFrame::HLine | TQFrame::Plain ); grid->addMultiCellWidget( line, 6, 6, 0, 1 ); mSmtp.authCheck = - new QCheckBox( i18n("Server &requires authentication"), page1 ); - QWhatsThis::add(mSmtp.authCheck, + new TQCheckBox( i18n("Server &requires authentication"), page1 ); + TQWhatsThis::add(mSmtp.authCheck, i18n("Check this option if your SMTP server " "requires authentication before accepting " "mail. This is known as " "'Authenticated SMTP' or simply ASMTP.")); - connect(mSmtp.authCheck, SIGNAL(clicked()), - SLOT(slotRequiresAuthClicked())); + connect(mSmtp.authCheck, TQT_SIGNAL(clicked()), + TQT_SLOT(slotRequiresAuthClicked())); grid->addMultiCellWidget( mSmtp.authCheck, 7, 7, 0, 1 ); - mSmtp.loginLabel = new QLabel( i18n("&Login:"), page1 ); + mSmtp.loginLabel = new TQLabel( i18n("&Login:"), page1 ); grid->addWidget( mSmtp.loginLabel, 8, 0 ); mSmtp.loginEdit = new KLineEdit( page1 ); mSmtp.loginLabel->setBuddy( mSmtp.loginEdit ); - QWhatsThis::add(mSmtp.loginEdit, + TQWhatsThis::add(mSmtp.loginEdit, i18n("The user name to send to the server " "for authorization")); grid->addWidget( mSmtp.loginEdit, 8, 1 ); - mSmtp.passwordLabel = new QLabel( i18n("P&assword:"), page1 ); + mSmtp.passwordLabel = new TQLabel( i18n("P&assword:"), page1 ); grid->addWidget( mSmtp.passwordLabel, 9, 0 ); mSmtp.passwordEdit = new KLineEdit( page1 ); - mSmtp.passwordEdit->setEchoMode( QLineEdit::Password ); + mSmtp.passwordEdit->setEchoMode( TQLineEdit::Password ); mSmtp.passwordLabel->setBuddy( mSmtp.passwordEdit ); - QWhatsThis::add(mSmtp.passwordEdit, + TQWhatsThis::add(mSmtp.passwordEdit, i18n("The password to send to the server " "for authorization")); grid->addWidget( mSmtp.passwordEdit, 9, 1 ); mSmtp.storePasswordCheck = - new QCheckBox( i18n("&Store SMTP password"), page1 ); - QWhatsThis::add(mSmtp.storePasswordCheck, + new TQCheckBox( i18n("&Store SMTP password"), page1 ); + TQWhatsThis::add(mSmtp.storePasswordCheck, i18n("Check this option to have KMail store " "the password.\nIf KWallet is available " "the password will be stored there which is considered " @@ -467,14 +467,14 @@ void KMTransportDialog::makeSmtpPage() "if access to the configuration file is obtained.")); grid->addMultiCellWidget( mSmtp.storePasswordCheck, 10, 10, 0, 1 ); - line = new QFrame( page1 ); - line->setFrameStyle( QFrame::HLine | QFrame::Plain ); + line = new TQFrame( page1 ); + line->setFrameStyle( TQFrame::HLine | TQFrame::Plain ); grid->addMultiCellWidget( line, 11, 11, 0, 1 ); mSmtp.specifyHostnameCheck = - new QCheckBox( i18n("Sen&d custom hostname to server"), page1 ); + new TQCheckBox( i18n("Sen&d custom hostname to server"), page1 ); grid->addMultiCellWidget( mSmtp.specifyHostnameCheck, 12, 12, 0, 1 ); - QWhatsThis::add(mSmtp.specifyHostnameCheck, + TQWhatsThis::add(mSmtp.specifyHostnameCheck, i18n("Check this option to have KMail use " "a custom hostname when identifying itself " "to the mail server." @@ -482,46 +482,46 @@ void KMTransportDialog::makeSmtpPage() "may not be set correctly or to mask your " "system's true hostname.")); - mSmtp.localHostnameLabel = new QLabel( i18n("Hos&tname:"), page1 ); + mSmtp.localHostnameLabel = new TQLabel( i18n("Hos&tname:"), page1 ); grid->addWidget( mSmtp.localHostnameLabel, 13, 0); mSmtp.localHostnameEdit = new KLineEdit( page1 ); - QWhatsThis::add(mSmtp.localHostnameEdit, + TQWhatsThis::add(mSmtp.localHostnameEdit, i18n("Enter the hostname KMail should use when " "identifying itself to the server.")); mSmtp.localHostnameLabel->setBuddy( mSmtp.localHostnameEdit ); grid->addWidget( mSmtp.localHostnameEdit, 13, 1 ); - connect( mSmtp.specifyHostnameCheck, SIGNAL(toggled(bool)), - mSmtp.localHostnameEdit, SLOT(setEnabled(bool))); - connect( mSmtp.specifyHostnameCheck, SIGNAL(toggled(bool)), - mSmtp.localHostnameLabel, SLOT(setEnabled(bool))); + connect( mSmtp.specifyHostnameCheck, TQT_SIGNAL(toggled(bool)), + mSmtp.localHostnameEdit, TQT_SLOT(setEnabled(bool))); + connect( mSmtp.specifyHostnameCheck, TQT_SIGNAL(toggled(bool)), + mSmtp.localHostnameLabel, TQT_SLOT(setEnabled(bool))); - QWidget *page2 = new QWidget( tabWidget ); + TQWidget *page2 = new TQWidget( tabWidget ); tabWidget->addTab( page2, i18n("S&ecurity") ); - QVBoxLayout *vlay = new QVBoxLayout( page2, spacingHint() ); - mSmtp.encryptionGroup = new QButtonGroup( 1, Qt::Horizontal, + TQVBoxLayout *vlay = new TQVBoxLayout( page2, spacingHint() ); + mSmtp.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Encryption"), page2 ); mSmtp.encryptionNone = - new QRadioButton( i18n("&None"), mSmtp.encryptionGroup ); + new TQRadioButton( i18n("&None"), mSmtp.encryptionGroup ); mSmtp.encryptionSSL = - new QRadioButton( i18n("&SSL"), mSmtp.encryptionGroup ); + new TQRadioButton( i18n("&SSL"), mSmtp.encryptionGroup ); mSmtp.encryptionTLS = - new QRadioButton( i18n("&TLS"), mSmtp.encryptionGroup ); - connect(mSmtp.encryptionGroup, SIGNAL(clicked(int)), - SLOT(slotSmtpEncryptionChanged(int))); + new TQRadioButton( i18n("&TLS"), mSmtp.encryptionGroup ); + connect(mSmtp.encryptionGroup, TQT_SIGNAL(clicked(int)), + TQT_SLOT(slotSmtpEncryptionChanged(int))); vlay->addWidget( mSmtp.encryptionGroup ); - mSmtp.authGroup = new QButtonGroup( 1, Qt::Horizontal, + mSmtp.authGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Authentication Method"), page2 ); - mSmtp.authLogin = new QRadioButton( i18n("Please translate this " + mSmtp.authLogin = new TQRadioButton( i18n("Please translate this " "authentication method only if you have a good reason", "&LOGIN"), mSmtp.authGroup ); - mSmtp.authPlain = new QRadioButton( i18n("Please translate this " + mSmtp.authPlain = new TQRadioButton( i18n("Please translate this " "authentication method only if you have a good reason", "&PLAIN"), mSmtp.authGroup ); - mSmtp.authCramMd5 = new QRadioButton( i18n("CRAM-MD&5"), mSmtp.authGroup ); - mSmtp.authDigestMd5 = new QRadioButton( i18n("&DIGEST-MD5"), mSmtp.authGroup ); - mSmtp.authNTLM = new QRadioButton( i18n("&NTLM"), mSmtp.authGroup ); - mSmtp.authGSSAPI = new QRadioButton( i18n("&GSSAPI"), mSmtp.authGroup ); + mSmtp.authCramMd5 = new TQRadioButton( i18n("CRAM-MD&5"), mSmtp.authGroup ); + mSmtp.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mSmtp.authGroup ); + mSmtp.authNTLM = new TQRadioButton( i18n("&NTLM"), mSmtp.authGroup ); + mSmtp.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mSmtp.authGroup ); if ( KProtocolInfo::capabilities("smtp").contains("SASL") == 0 ) { mSmtp.authNTLM->hide(); mSmtp.authGSSAPI->hide(); @@ -530,11 +530,11 @@ void KMTransportDialog::makeSmtpPage() vlay->addStretch(); - QHBoxLayout *buttonLay = new QHBoxLayout( vlay ); + TQHBoxLayout *buttonLay = new TQHBoxLayout( vlay ); mSmtp.checkCapabilities = - new QPushButton( i18n("Check &What the Server Supports"), page2 ); - connect(mSmtp.checkCapabilities, SIGNAL(clicked()), - SLOT(slotCheckSmtpCapabilities())); + new TQPushButton( i18n("Check &What the Server Supports"), page2 ); + connect(mSmtp.checkCapabilities, TQT_SIGNAL(clicked()), + TQT_SLOT(slotCheckSmtpCapabilities())); buttonLay->addStretch(); buttonLay->addWidget( mSmtp.checkCapabilities ); } @@ -615,10 +615,10 @@ void KMTransportDialog::saveSettings() void KMTransportDialog::slotSendmailChooser() { - KFileDialog dialog("/", QString::null, this, 0, true ); + KFileDialog dialog("/", TQString::null, this, 0, true ); dialog.setCaption(i18n("Choose sendmail Location") ); - if( dialog.exec() == QDialog::Accepted ) + if( dialog.exec() == TQDialog::Accepted ) { KURL url = dialog.selectedURL(); if( url.isEmpty() == true ) @@ -657,7 +657,7 @@ void KMTransportDialog::slotSmtpEncryptionChanged(int id) mSmtp.portEdit->setText((id == SSL) ? "465" : "25"); // switch supported auth methods: - QButton * old = mSmtp.authGroup->selected(); + TQButton * old = mSmtp.authGroup->selected(); int authMethods = id == TLS ? mAuthTLS : id == SSL ? mAuthSSL : mAuthNone ; enableAuthMethods( authMethods ); if ( !old->isEnabled() ) @@ -677,10 +677,10 @@ void KMTransportDialog::enableAuthMethods( unsigned int auth ) { mSmtp.authGSSAPI->setEnabled( auth & GSSAPI ); } -unsigned int KMTransportDialog::authMethodsFromString( const QString & s ) { +unsigned int KMTransportDialog::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" ) @@ -696,9 +696,9 @@ unsigned int KMTransportDialog::authMethodsFromString( const QString & s ) { return result; } -unsigned int KMTransportDialog::authMethodsFromStringList( const QStringList & sl ) { +unsigned int KMTransportDialog::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" ) @@ -720,22 +720,22 @@ void KMTransportDialog::slotCheckSmtpCapabilities() mServerTest = new KMServerTest(SMTP_PROTOCOL, mSmtp.hostEdit->text(), mSmtp.portEdit->text().toInt()); connect( mServerTest, - SIGNAL( capabilities( const QStringList &, const QStringList &, - const QString &, const QString &, - const QString & )), + TQT_SIGNAL( capabilities( const TQStringList &, const TQStringList &, + const TQString &, const TQString &, + const TQString & )), this, - SLOT( slotSmtpCapabilities( const QStringList &, - const QStringList &, const QString &, - const QString &, const QString & ) ) ); + TQT_SLOT( slotSmtpCapabilities( const TQStringList &, + const TQStringList &, const TQString &, + const TQString &, const TQString & ) ) ); mSmtp.checkCapabilities->setEnabled(false); } -void KMTransportDialog::checkHighest(QButtonGroup *btnGroup) +void KMTransportDialog::checkHighest(TQButtonGroup *btnGroup) { 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(); @@ -745,11 +745,11 @@ void KMTransportDialog::checkHighest(QButtonGroup *btnGroup) } -void KMTransportDialog::slotSmtpCapabilities( const QStringList & capaNormal, - const QStringList & capaSSL, - const QString & authNone, - const QString & authSSL, - const QString & authTLS ) +void KMTransportDialog::slotSmtpCapabilities( const TQStringList & capaNormal, + const TQStringList & capaSSL, + const TQString & authNone, + const TQString & authSSL, + const TQString & authTLS ) { mSmtp.checkCapabilities->setEnabled( true ); kdDebug(5006) << "KMTransportDialog::slotSmtpCapabilities( ..., " @@ -783,7 +783,7 @@ bool KMTransportDialog::sanityCheckSmtpInput() // FIXME: add additional checks for all fields that needs it // this is only the beginning if ( mSmtp.hostEdit->text().isEmpty() ) { - QString errorMsg = i18n("The Host field cannot be empty. Please " + TQString errorMsg = i18n("The Host field cannot be empty. Please " "enter the name or the IP address of the SMTP server."); KMessageBox::sorry( this, errorMsg, i18n("Invalid Hostname or Address") ); return false; diff --git a/kmail/kmtransport.h b/kmail/kmtransport.h index 3f4c57a37..a71541fe1 100644 --- a/kmail/kmtransport.h +++ b/kmail/kmtransport.h @@ -36,13 +36,13 @@ public: virtual ~KMTransportInfo(); void readConfig(int id); void writeConfig(int id); - static int findTransport(const QString &name); - static QStringList availableTransports(); + static int findTransport(const TQString &name); + static TQStringList availableTransports(); uint id() const { return mId; } /** Get/set password for this account */ - QString passwd() const; - void setPasswd( const QString& passwd ); + TQString passwd() const; + void setPasswd( const TQString& passwd ); /** Get/set password storage flag */ bool storePasswd() const { return mStorePasswd; } @@ -51,12 +51,12 @@ public: /** Read password from wallet */ void readPassword() const; - QString type, name, host, port, user, precommand, encryption, authType; - QString localHostname; + TQString type, name, host, port, user, precommand, encryption, authType; + TQString localHostname; bool auth, specifyHostname; private: - mutable QString mPasswd; + mutable TQString mPasswd; bool mPasswdDirty, mStorePasswd, mStorePasswdInConfig; uint mId; }; @@ -66,7 +66,7 @@ class KMTransportSelDlg : public KDialogBase Q_OBJECT public: - KMTransportSelDlg( QWidget *parent=0, const char *name=0, bool modal=TRUE ); + KMTransportSelDlg( TQWidget *parent=0, const char *name=0, bool modal=TRUE ); int selected() const; private slots: @@ -81,8 +81,8 @@ class KMTransportDialog : public KDialogBase Q_OBJECT public: - KMTransportDialog( const QString & caption, KMTransportInfo *transportInfo, - QWidget *parent=0, const char *name=0, bool modal=TRUE ); + KMTransportDialog( const TQString & caption, KMTransportInfo *transportInfo, + TQWidget *parent=0, const char *name=0, bool modal=TRUE ); virtual ~KMTransportDialog(); private slots: @@ -91,57 +91,57 @@ private slots: void slotRequiresAuthClicked(); void slotSmtpEncryptionChanged(int); void slotCheckSmtpCapabilities(); - void slotSmtpCapabilities( const QStringList &, const QStringList &, - const QString &, const QString &, - const QString & ); - void slotSendmailEditPath(const QString &); + void slotSmtpCapabilities( const TQStringList &, const TQStringList &, + const TQString &, const TQString &, + const TQString & ); + void slotSendmailEditPath(const TQString &); private: struct SendmailWidgets { - QLabel *titleLabel; - QLineEdit *nameEdit; - QLineEdit *locationEdit; - QPushButton *chooseButton; + TQLabel *titleLabel; + TQLineEdit *nameEdit; + TQLineEdit *locationEdit; + TQPushButton *chooseButton; }; struct SmtpWidgets { - QLabel *titleLabel; - QLineEdit *nameEdit; - QLineEdit *hostEdit; - QLineEdit *portEdit; - QCheckBox *authCheck; - QLabel *loginLabel; - QLineEdit *loginEdit; - QLabel *passwordLabel; - QLineEdit *passwordEdit; - QLineEdit *precommand; - QButtonGroup *encryptionGroup; - QRadioButton *encryptionNone; - QRadioButton *encryptionSSL; - QRadioButton *encryptionTLS; - QButtonGroup *authGroup; - QRadioButton *authPlain; - QRadioButton *authLogin; - QRadioButton *authCramMd5; - QRadioButton *authDigestMd5; - QRadioButton *authNTLM; - QRadioButton *authGSSAPI; - QPushButton *checkCapabilities; - QCheckBox *storePasswordCheck; - QCheckBox *specifyHostnameCheck; - QLineEdit *localHostnameEdit; - QLabel *localHostnameLabel; + TQLabel *titleLabel; + TQLineEdit *nameEdit; + TQLineEdit *hostEdit; + TQLineEdit *portEdit; + TQCheckBox *authCheck; + TQLabel *loginLabel; + TQLineEdit *loginEdit; + TQLabel *passwordLabel; + TQLineEdit *passwordEdit; + TQLineEdit *precommand; + TQButtonGroup *encryptionGroup; + TQRadioButton *encryptionNone; + TQRadioButton *encryptionSSL; + TQRadioButton *encryptionTLS; + TQButtonGroup *authGroup; + TQRadioButton *authPlain; + TQRadioButton *authLogin; + TQRadioButton *authCramMd5; + TQRadioButton *authDigestMd5; + TQRadioButton *authNTLM; + TQRadioButton *authGSSAPI; + TQPushButton *checkCapabilities; + TQCheckBox *storePasswordCheck; + TQCheckBox *specifyHostnameCheck; + TQLineEdit *localHostnameEdit; + TQLabel *localHostnameLabel; }; void makeSendmailPage(); void makeSmtpPage(); void setupSettings(); void saveSettings(); - void checkHighest( QButtonGroup * ); + void checkHighest( TQButtonGroup * ); void enableAuthMethods( unsigned int which ); bool sanityCheckSmtpInput(); - static unsigned int authMethodsFromString( const QString & s ); - static unsigned int authMethodsFromStringList( const QStringList & sl ); + static unsigned int authMethodsFromString( const TQString & s ); + static unsigned int authMethodsFromStringList( const TQStringList & sl ); KMServerTest *mServerTest; SmtpWidgets mSmtp; diff --git a/kmail/korghelper.cpp b/kmail/korghelper.cpp index 57968bd93..789d85ea7 100644 --- a/kmail/korghelper.cpp +++ b/kmail/korghelper.cpp @@ -27,20 +27,20 @@ void KMail::KorgHelper::ensureRunning() { - QString error; - QCString dcopService; - int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/Organizer", QString::null, QString::null, &error, &dcopService ); + TQString error; + TQCString dcopService; + int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/Organizer", TQString::null, TQString::null, &error, &dcopService ); if ( result == 0 ) { // OK, so korganizer (or kontact) is running. Now ensure the object we want is available // [that's not the case when kontact was already running, but korganizer not loaded into it...] static const char* const dcopObjectId = "KOrganizerIface"; - QCString dummy; - if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) ) { + TQCString dummy; + if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) ) { DCOPRef ref( dcopService, dcopService ); // talk to the KUniqueApplication or its kontact wrapper DCOPReply reply = ref.call( "load()" ); if ( reply.isValid() && (bool)reply ) { kdDebug() << "Loaded " << dcopService << " successfully" << endl; - Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) ); + Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) ); } else kdWarning() << "Error loading " << dcopService << endl; } diff --git a/kmail/kwindowpositioner.cpp b/kmail/kwindowpositioner.cpp index c99ab7c0b..fefbdde2c 100644 --- a/kmail/kwindowpositioner.cpp +++ b/kmail/kwindowpositioner.cpp @@ -23,18 +23,18 @@ #include <kdebug.h> -#include <qwidget.h> +#include <tqwidget.h> -KWindowPositioner::KWindowPositioner( QWidget *master, QWidget *slave, +KWindowPositioner::KWindowPositioner( TQWidget *master, TQWidget *slave, Mode mode ) - : QObject( master ), mMaster( master ), mSlave( slave ), mMode( mode ) + : TQObject( master ), mMaster( master ), mSlave( slave ), mMode( mode ) { master->topLevelWidget()->installEventFilter( this ); } -bool KWindowPositioner::eventFilter( QObject *, QEvent *e ) +bool KWindowPositioner::eventFilter( TQObject *, TQEvent *e ) { - if ( e->type() == QEvent::Move ) { + if ( e->type() == TQEvent::Move ) { reposition(); } @@ -43,16 +43,16 @@ bool KWindowPositioner::eventFilter( QObject *, QEvent *e ) void KWindowPositioner::reposition() { - QPoint relativePos; + TQPoint relativePos; if ( mMode == Right ) { - relativePos = QPoint( mMaster->width(), -100 ); + relativePos = TQPoint( mMaster->width(), -100 ); } else if ( mMode == Bottom ) { - relativePos = QPoint( 100 - mSlave->width() + mMaster->width(), + relativePos = TQPoint( 100 - mSlave->width() + mMaster->width(), mMaster->height() ); } else { kdError() << "KWindowPositioner: Illegal mode" << endl; } - QPoint pos = mMaster->mapToGlobal( relativePos ); + TQPoint pos = mMaster->mapToGlobal( relativePos ); mSlave->move( pos ); mSlave->raise(); } diff --git a/kmail/kwindowpositioner.h b/kmail/kwindowpositioner.h index 1b5ad97de..d85f5ceec 100644 --- a/kmail/kwindowpositioner.h +++ b/kmail/kwindowpositioner.h @@ -21,7 +21,7 @@ #ifndef KWINDOWPOSITIONER_H #define KWINDOWPOSITIONER_H -#include <qobject.h> +#include <tqobject.h> class QWindow; @@ -31,15 +31,15 @@ class KWindowPositioner : public QObject public: enum Mode { Right, Bottom }; - KWindowPositioner( QWidget *master, QWidget *slave, Mode mode = Bottom ); + KWindowPositioner( TQWidget *master, TQWidget *slave, Mode mode = Bottom ); - bool eventFilter( QObject *watched, QEvent *e ); + bool eventFilter( TQObject *watched, TQEvent *e ); void reposition(); private: - QWidget *mMaster; - QWidget *mSlave; + TQWidget *mMaster; + TQWidget *mSlave; Mode mMode; }; diff --git a/kmail/listjob.cpp b/kmail/listjob.cpp index 341e934a5..f51a04eec 100644 --- a/kmail/listjob.cpp +++ b/kmail/listjob.cpp @@ -44,14 +44,14 @@ using KPIM::ProgressManager; #include <kio/global.h> #include <klocale.h> -#include <qstylesheet.h> +#include <tqstylesheet.h> #include <stdlib.h> using namespace KMail; ListJob::ListJob( ImapAccountBase* account, ImapAccountBase::ListType type, - FolderStorage* storage, const QString& path, bool complete, + FolderStorage* storage, const TQString& path, bool complete, KPIM::ProgressItem* item ) : FolderJob( 0, tOther, (storage ? storage->folder() : 0) ), mStorage( storage ), mAccount( account ), mType( type ), @@ -76,8 +76,8 @@ void ListJob::execute() { // We'll wait for the connectionResult signal from the account. kdDebug(5006) << "ListJob - waiting for connection" << endl; - connect( mAccount, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + connect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); return; } // this is needed until we have a common base class for d(imap) @@ -109,8 +109,8 @@ void ListJob::execute() jd.curNamespace = mNamespace; if ( mParentProgressItem ) { - QString escapedStatus = mDestFolder ? QStyleSheet::escape( mDestFolder->prettyURL() ) - : QString::null; + TQString escapedStatus = mDestFolder ? TQStyleSheet::escape( mDestFolder->prettyURL() ) + : TQString::null; jd.progressItem = ProgressManager::createProgressItem( mParentProgressItem, "ListDir" + ProgressManager::getUniqueID(), @@ -122,14 +122,14 @@ void ListJob::execute() } // make the URL - QString ltype = "LIST"; + TQString ltype = "LIST"; if ( mType == ImapAccountBase::ListSubscribed || mType == ImapAccountBase::ListFolderOnlySubscribed ) ltype = "LSUB"; else if ( mType == ImapAccountBase::ListSubscribedNoCheck ) ltype = "LSUBNOCHECK"; - QString section; + TQString section; if ( mComplete ) section = ";SECTION=COMPLETE"; else if ( mType == ImapAccountBase::ListFolderOnly || @@ -145,13 +145,13 @@ void ListJob::execute() KIO::SimpleJob *job = KIO::listDir( url, false ); KIO::Scheduler::assignJobToSlave( mAccount->slave(), job ); mAccount->insertJob( job, jd ); - connect( job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotListResult(KIO::Job *)) ); - connect( job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), - this, SLOT(slotListEntries(KIO::Job *, const KIO::UDSEntryList &)) ); + connect( job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotListResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), + this, TQT_SLOT(slotListEntries(KIO::Job *, const KIO::UDSEntryList &)) ); } -void ListJob::slotConnectionResult( int errorCode, const QString& errorMsg ) +void ListJob::slotConnectionResult( int errorCode, const TQString& errorMsg ) { Q_UNUSED( errorMsg ); if ( !errorCode ) @@ -196,15 +196,15 @@ void ListJob::slotListEntries( KIO::Job* job, const KIO::UDSEntryList& uds ) } if( (*it).progressItem ) (*it).progressItem->setProgress( 50 ); - QString name; + TQString name; KURL url; - QString mimeType; - QString attributes; + TQString mimeType; + TQString attributes; for ( KIO::UDSEntryList::ConstIterator udsIt = uds.begin(); udsIt != uds.end(); udsIt++ ) { - mimeType = QString::null; - attributes = QString::null; + mimeType = TQString::null; + attributes = TQString::null; for ( KIO::UDSEntry::ConstIterator eIt = (*udsIt).begin(); eIt != (*udsIt).end(); eIt++ ) { diff --git a/kmail/listjob.h b/kmail/listjob.h index 75213f5ce..f1adcba61 100644 --- a/kmail/listjob.h +++ b/kmail/listjob.h @@ -66,7 +66,7 @@ public: * @param item a parent ProgressItem */ ListJob( ImapAccountBase* account, ImapAccountBase::ListType type, - FolderStorage* storage = 0, const QString& path = QString::null, + FolderStorage* storage = 0, const TQString& path = TQString::null, bool complete = false, KPIM::ProgressItem* item = 0 ); virtual ~ListJob(); @@ -88,7 +88,7 @@ public: virtual void execute(); /** Path */ - void setPath( const QString& path ) { mPath = path; } + void setPath( const TQString& path ) { mPath = path; } /** Storage */ void setStorage( FolderStorage* st ) { mStorage = st; } @@ -101,7 +101,7 @@ public: mParentProgressItem = it; } /** Set the namespace for this listing */ - void setNamespace( const QString& ns ) { mNamespace = ns; } + void setNamespace( const TQString& ns ) { mNamespace = ns; } protected slots: /** @@ -118,14 +118,14 @@ protected slots: /** * Called from the account when a connection was established */ - void slotConnectionResult( int errorCode, const QString& errorMsg ); + void slotConnectionResult( int errorCode, const TQString& errorMsg ); signals: /** * Emitted when new folders have been received */ - void receivedFolders( const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData& ); + void receivedFolders( const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& ); protected: FolderStorage* mStorage; @@ -133,11 +133,11 @@ protected: ImapAccountBase::ListType mType; bool mComplete; bool mHonorLocalSubscription; - QString mPath; - QStringList mSubfolderNames, mSubfolderPaths, + TQString mPath; + TQStringList mSubfolderNames, mSubfolderPaths, mSubfolderMimeTypes, mSubfolderAttributes; KPIM::ProgressItem* mParentProgressItem; - QString mNamespace; + TQString mNamespace; }; } // namespace diff --git a/kmail/localsubscriptiondialog.cpp b/kmail/localsubscriptiondialog.cpp index f5dfc2b62..0816ba40a 100644 --- a/kmail/localsubscriptiondialog.cpp +++ b/kmail/localsubscriptiondialog.cpp @@ -46,8 +46,8 @@ namespace KMail { -LocalSubscriptionDialog::LocalSubscriptionDialog( QWidget *parent, const QString &caption, - ImapAccountBase *acct, QString startPath ) +LocalSubscriptionDialog::LocalSubscriptionDialog( TQWidget *parent, const TQString &caption, + ImapAccountBase *acct, TQString startPath ) : SubscriptionDialog( parent, caption, acct, startPath ), mAccount( acct ) { @@ -76,7 +76,7 @@ void LocalSubscriptionDialog::processFolderListing() if (done == 1000) { emit listChanged(); - QTimer::singleShot(0, this, SLOT(processItems())); + TQTimer::singleShot(0, this, TQT_SLOT(processItems())); return; } ++mCount; @@ -94,10 +94,10 @@ void LocalSubscriptionDialog::setCheckedStateOfAllItems() { // iterate over all items and check them, unless they are // in the account's local subscription blacklist - QDictIterator<GroupItem> it( mItemDict ); + TQDictIterator<GroupItem> it( mItemDict ); for ( ; it.current(); ++it ) { GroupItem *item = it.current(); - QString path = it.currentKey(); + TQString path = it.currentKey(); item->setOn( mAccount->locallySubscribedTo( path ) ); } } @@ -107,7 +107,7 @@ void LocalSubscriptionDialog::doSave() { bool somethingHappened = false; // subscribe - QListViewItemIterator it(subView); + TQListViewItemIterator it(subView); for ( ; it.current(); ++it) { static_cast<ImapAccountBase*>(account())->changeLocalSubscription( static_cast<GroupItem*>(it.current())->info().path, true ); @@ -115,13 +115,13 @@ void LocalSubscriptionDialog::doSave() } // unsubscribe - QListViewItemIterator it2(unsubView); + TQListViewItemIterator it2(unsubView); if ( unsubView->childCount() > 0 ) { - const QString message = i18n("Locally unsubscribing from folders will remove all " + const TQString message = i18n("Locally unsubscribing from folders will remove all " "information that is present locally about those folders. The folders will " "not be changed on the server. Press cancel now if you want to make sure " "all local changes have been written to the server by checking mail first."); - const QString caption = i18n("Local changes will be lost when unsubscribing"); + const TQString caption = i18n("Local changes will be lost when unsubscribing"); if ( KMessageBox::warningContinueCancel( this, message, caption ) != KMessageBox::Cancel ) { somethingHappened = true; diff --git a/kmail/localsubscriptiondialog.h b/kmail/localsubscriptiondialog.h index 5a1428c8c..2061ab278 100644 --- a/kmail/localsubscriptiondialog.h +++ b/kmail/localsubscriptiondialog.h @@ -42,9 +42,9 @@ namespace KMail { Q_OBJECT public: - LocalSubscriptionDialog( QWidget *parent, const QString &caption, + LocalSubscriptionDialog( TQWidget *parent, const TQString &caption, ImapAccountBase* acct, - QString startPath = QString::null ); + TQString startPath = TQString::null ); virtual ~LocalSubscriptionDialog(); protected: diff --git a/kmail/mailcomposerIface.h b/kmail/mailcomposerIface.h index 285865787..130a99e1f 100644 --- a/kmail/mailcomposerIface.h +++ b/kmail/mailcomposerIface.h @@ -23,11 +23,11 @@ class MailComposerIface : virtual public DCOPObject /** Add url as attachment with a user-defined comment. */ - virtual void addAttachment(KURL url,QString comment) = 0; + virtual void addAttachment(KURL url,TQString comment) = 0; /** Set message body. */ - virtual void setBody (QString body) = 0; + virtual void setBody (TQString body) = 0; /** Add attachment. @@ -40,14 +40,14 @@ class MailComposerIface : virtual public DCOPObject @param paramValue Value of parameter of content type @param contDisp Content disposition */ - virtual void addAttachment(const QString &name, - const QCString &cte, - const QByteArray &data, - const QCString &type, - const QCString &subType, - const QCString ¶mAttr, - const QString ¶mValue, - const QCString &contDisp) = 0; + virtual void addAttachment(const TQString &name, + const TQCString &cte, + const TQByteArray &data, + const TQCString &type, + const TQCString &subType, + const TQCString ¶mAttr, + const TQString ¶mValue, + const TQCString &contDisp) = 0; }; #endif diff --git a/kmail/maildirjob.cpp b/kmail/maildirjob.cpp index 424ea434a..5833cfe4e 100644 --- a/kmail/maildirjob.cpp +++ b/kmail/maildirjob.cpp @@ -39,8 +39,8 @@ #include <kapplication.h> #include <kdebug.h> -#include <qtimer.h> -#include <qdatetime.h> +#include <tqtimer.h> +#include <tqdatetime.h> namespace KMail { @@ -52,7 +52,7 @@ MaildirJob::MaildirJob( KMMessage *msg, JobType jt , KMFolder *folder ) } //----------------------------------------------------------------------------- -MaildirJob::MaildirJob( QPtrList<KMMessage>& msgList, const QString& sets, +MaildirJob::MaildirJob( TQPtrList<KMMessage>& msgList, const TQString& sets, JobType jt , KMFolder *folder ) : FolderJob( msgList, sets, jt, folder ), mParentFolder( 0 ) { @@ -74,7 +74,7 @@ void MaildirJob::setParentFolder( const KMFolderMaildir* parent ) //----------------------------------------------------------------------------- void MaildirJob::execute() { - QTimer::singleShot( 0, this, SLOT(startJob()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(startJob()) ); } //----------------------------------------------------------------------------- diff --git a/kmail/maildirjob.h b/kmail/maildirjob.h index e94558cba..a2209f087 100644 --- a/kmail/maildirjob.h +++ b/kmail/maildirjob.h @@ -43,7 +43,7 @@ class MaildirJob : public FolderJob Q_OBJECT public: MaildirJob( KMMessage *msg, JobType jt = tGetMessage, KMFolder *folder = 0 ); - MaildirJob( QPtrList<KMMessage>& msgList, const QString& sets, + MaildirJob( TQPtrList<KMMessage>& msgList, const TQString& sets, JobType jt = tGetMessage, KMFolder *folder = 0 ); virtual ~MaildirJob(); diff --git a/kmail/mailinglist-magic.cpp b/kmail/mailinglist-magic.cpp index 25b2abd0c..4483323de 100644 --- a/kmail/mailinglist-magic.cpp +++ b/kmail/mailinglist-magic.cpp @@ -11,21 +11,21 @@ #include <kurl.h> #include <kdebug.h> -#include <qstringlist.h> +#include <tqstringlist.h> using namespace KMail; -typedef QString (*MagicDetectorFunc) (const KMMessage *, QCString &, QString &); +typedef TQString (*MagicDetectorFunc) (const KMMessage *, TQCString &, TQString &); /* Sender: (owner-([^@]+)|([^@+]-owner)@ */ -static QString check_sender(const KMMessage *message, - QCString &header_name, - QString &header_value ) +static TQString check_sender(const KMMessage *message, + TQCString &header_name, + TQString &header_value ) { - QString header = message->headerField( "Sender" ); + TQString header = message->headerField( "Sender" ); if ( header.isEmpty() ) - return QString::null; + return TQString::null; if ( header.left( 6 ) == "owner-" ) { @@ -36,7 +36,7 @@ static QString check_sender(const KMMessage *message, } else { int index = header.find( "-owner@ " ); if ( index == -1 ) - return QString::null; + return TQString::null; header.truncate( index ); header_name = "Sender"; @@ -47,13 +47,13 @@ static QString check_sender(const KMMessage *message, } /* X-BeenThere: ([^@]+) */ -static QString check_x_beenthere(const KMMessage *message, - QCString &header_name, - QString &header_value ) +static TQString check_x_beenthere(const KMMessage *message, + TQCString &header_name, + TQString &header_value ) { - QString header = message->headerField( "X-BeenThere" ); + TQString header = message->headerField( "X-BeenThere" ); if ( header.isNull() || header.find( '@' ) == -1 ) - return QString::null; + return TQString::null; header_name = "X-BeenThere"; header_value = header; @@ -62,14 +62,14 @@ static QString check_x_beenthere(const KMMessage *message, } /* Delivered-To:: <([^@]+) */ -static QString check_delivered_to(const KMMessage *message, - QCString &header_name, - QString &header_value ) +static TQString check_delivered_to(const KMMessage *message, + TQCString &header_name, + TQString &header_value ) { - QString header = message->headerField( "Delivered-To" ); + TQString header = message->headerField( "Delivered-To" ); if ( header.isNull() || header.left(13 ) != "mailing list" || header.find( '@' ) == -1 ) - return QString::null; + return TQString::null; header_name = "Delivered-To"; header_value = header; @@ -78,16 +78,16 @@ static QString check_delivered_to(const KMMessage *message, } /* X-Mailing-List: <?([^@]+) */ -static QString check_x_mailing_list(const KMMessage *message, - QCString &header_name, - QString &header_value ) +static TQString check_x_mailing_list(const KMMessage *message, + TQCString &header_name, + TQString &header_value ) { - QString header = message->headerField( "X-Mailing-List"); + TQString header = message->headerField( "X-Mailing-List"); if ( header.isEmpty() ) - return QString::null; + return TQString::null; if ( header.find( '@' ) < 1 ) - return QString::null; + return TQString::null; header_name = "X-Mailing-List"; header_value = header; @@ -99,22 +99,22 @@ static QString check_x_mailing_list(const KMMessage *message, } /* List-Id: [^<]* <([^.]+) */ -static QString check_list_id(const KMMessage *message, - QCString &header_name, - QString &header_value ) +static TQString check_list_id(const KMMessage *message, + TQCString &header_name, + TQString &header_value ) { int lAnglePos, firstDotPos; - QString header = message->headerField( "List-Id" ); + TQString header = message->headerField( "List-Id" ); if ( header.isEmpty() ) - return QString::null; + return TQString::null; lAnglePos = header.find( '<' ); if ( lAnglePos < 0 ) - return QString::null; + return TQString::null; firstDotPos = header.find( '.', lAnglePos ); if ( firstDotPos < 0 ) - return QString::null; + return TQString::null; header_name = "List-Id"; header_value = header.mid( lAnglePos ); @@ -124,17 +124,17 @@ static QString check_list_id(const KMMessage *message, /* List-Post: <mailto:[^< ]*>) */ -static QString check_list_post(const KMMessage *message, - QCString &header_name, - QString &header_value ) +static TQString check_list_post(const KMMessage *message, + TQCString &header_name, + TQString &header_value ) { - QString header = message->headerField( "List-Post" ); + TQString header = message->headerField( "List-Post" ); if ( header.isEmpty() ) - return QString::null; + return TQString::null; int lAnglePos = header.find( "<mailto:" ); if ( lAnglePos < 0 ) - return QString::null; + return TQString::null; header_name = "List-Post"; header_value = header; @@ -144,16 +144,16 @@ static QString check_list_post(const KMMessage *message, } /* Mailing-List: list ([^@]+) */ -static QString check_mailing_list(const KMMessage *message, - QCString &header_name, - QString &header_value ) +static TQString check_mailing_list(const KMMessage *message, + TQCString &header_name, + TQString &header_value ) { - QString header = message->headerField( "Mailing-List"); + TQString header = message->headerField( "Mailing-List"); if ( header.isEmpty() ) - return QString::null; + return TQString::null; if (header.left( 5 ) != "list " || header.find( '@' ) < 5 ) - return QString::null; + return TQString::null; header_name = "Mailing-List"; header_value = header; @@ -163,15 +163,15 @@ static QString check_mailing_list(const KMMessage *message, /* X-Loop: ([^@]+) */ -static QString check_x_loop(const KMMessage *message, - QCString &header_name, - QString &header_value ){ - QString header = message->headerField( "X-Loop"); +static TQString check_x_loop(const KMMessage *message, + TQCString &header_name, + TQString &header_value ){ + TQString header = message->headerField( "X-Loop"); if ( header.isEmpty() ) - return QString::null; + return TQString::null; if (header.find( '@' ) < 2 ) - return QString::null; + return TQString::null; header_name = "X-Loop"; header_value = header; @@ -180,12 +180,12 @@ static QString check_x_loop(const KMMessage *message, } /* X-ML-Name: (.+) */ -static QString check_x_ml_name(const KMMessage *message, - QCString &header_name, - QString &header_value ){ - QString header = message->headerField( "X-ML-Name"); +static TQString check_x_ml_name(const KMMessage *message, + TQCString &header_name, + TQString &header_value ){ + TQString header = message->headerField( "X-ML-Name"); if ( header.isEmpty() ) - return QString::null; + return TQString::null; header_name = "X-ML-Name"; header_value = header; @@ -209,9 +209,9 @@ MagicDetectorFunc magic_detector[] = static const int num_detectors = sizeof (magic_detector) / sizeof (magic_detector[0]); static QStringList -headerToAddress( const QString& header ) +headerToAddress( const TQString& header ) { - QStringList addr; + TQStringList addr; int start = 0; int end = 0; @@ -250,15 +250,15 @@ MailingList::detect( const KMMessage *message ) } QString -MailingList::name( const KMMessage *message, QCString &header_name, - QString &header_value ) +MailingList::name( const KMMessage *message, TQCString &header_name, + TQString &header_value ) { - QString mlist; - header_name = QCString(); - header_value = QString::null; + TQString mlist; + header_name = TQCString(); + header_value = TQString::null; if ( !message ) - return QString::null; + return TQString::null; for (int i = 0; i < num_detectors; i++) { mlist = magic_detector[i] (message, header_name, header_value); @@ -266,7 +266,7 @@ MailingList::name( const KMMessage *message, QCString &header_name, return mlist; } - return QString::null; + return TQString::null; } MailingList::MailingList() @@ -370,7 +370,7 @@ MailingList::archiveURLS() const } void -MailingList::setId( const QString& str ) +MailingList::setId( const TQString& str ) { mFeatures |= Id; if ( str.isEmpty() ) { diff --git a/kmail/mailinglist-magic.h b/kmail/mailinglist-magic.h index 8c30c20eb..bcccf66f5 100644 --- a/kmail/mailinglist-magic.h +++ b/kmail/mailinglist-magic.h @@ -3,7 +3,7 @@ #define MAILINGLIST_MAGIC_H #include <kurl.h> -#include <qstring.h> +#include <tqstring.h> class KMMessage; class KConfig; @@ -39,8 +39,8 @@ public: }; public: static MailingList detect( const KMMessage* msg ); - static QString name( const KMMessage *message, QCString &header_name, - QString &header_value ); + static TQString name( const KMMessage *message, TQCString &header_name, + TQString &header_value ); public: MailingList(); @@ -64,8 +64,8 @@ public: void setArchiveURLS( const KURL::List& ); KURL::List archiveURLS() const; - void setId( const QString& ); - QString id() const; + void setId( const TQString& ); + TQString id() const; void writeConfig( KConfig* config ) const; void readConfig( KConfig* config ); @@ -77,7 +77,7 @@ private: KURL::List mUnsubscribeURLS; KURL::List mHelpURLS; KURL::List mArchiveURLS; - QString mId; + TQString mId; }; } diff --git a/kmail/mailinglistpropertiesdialog.cpp b/kmail/mailinglistpropertiesdialog.cpp index 3ea3beaa4..8a9487b06 100644 --- a/kmail/mailinglistpropertiesdialog.cpp +++ b/kmail/mailinglistpropertiesdialog.cpp @@ -25,12 +25,12 @@ ** you do not wish to do so, delete this exception statement from ** your version. *******************************************************************************/ -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <klocale.h> #include <keditlistbox.h> @@ -45,69 +45,69 @@ using namespace KMail; -MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* parent, KMFolder *folder ) +MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( TQWidget* parent, KMFolder *folder ) : KDialogBase( parent, "mailinglist_properties", false, i18n( "Mailinglist Folder Properties" ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ), mFolder( folder ) { setWFlags( getWFlags() | WDestructiveClose ); - QLabel* label; + TQLabel* label; mLastItem = 0; - QVBoxLayout *topLayout = new QVBoxLayout( layout(), spacingHint(), + TQVBoxLayout *topLayout = new TQVBoxLayout( layout(), spacingHint(), "topLayout" ); - QGroupBox *mlGroup = new QGroupBox( i18n("Associated Mailing List" ), this ); + TQGroupBox *mlGroup = new TQGroupBox( i18n("Associated Mailing List" ), this ); mlGroup->setColumnLayout( 0, Qt::Vertical ); - QGridLayout *groupLayout = new QGridLayout( mlGroup->layout(), 6, 3, spacingHint() ); + TQGridLayout *groupLayout = new TQGridLayout( mlGroup->layout(), 6, 3, spacingHint() ); topLayout->addWidget( mlGroup ); setMainWidget( mlGroup ); - mHoldsMailingList = new QCheckBox( i18n("&Folder holds a mailing list"), mlGroup ); - QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)), - SLOT(slotHoldsML(bool)) ); + mHoldsMailingList = new TQCheckBox( i18n("&Folder holds a mailing list"), mlGroup ); + TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotHoldsML(bool)) ); groupLayout->addMultiCellWidget( mHoldsMailingList, 0, 0, 0, 2 ); - groupLayout->addItem( new QSpacerItem( 0, 10 ), 1, 0 ); + groupLayout->addItem( new TQSpacerItem( 0, 10 ), 1, 0 ); - mDetectButton = new QPushButton( i18n("Detect Automatically"), mlGroup ); + mDetectButton = new TQPushButton( i18n("Detect Automatically"), mlGroup ); mDetectButton->setEnabled( false ); - QObject::connect( mDetectButton, SIGNAL(pressed()), SLOT(slotDetectMailingList()) ); + TQObject::connect( mDetectButton, TQT_SIGNAL(pressed()), TQT_SLOT(slotDetectMailingList()) ); groupLayout->addWidget( mDetectButton, 2, 1 ); - groupLayout->addItem( new QSpacerItem( 0, 10 ), 3, 0 ); + groupLayout->addItem( new TQSpacerItem( 0, 10 ), 3, 0 ); - label = new QLabel( i18n("Mailing list description:"), mlGroup ); + label = new TQLabel( i18n("Mailing list description:"), mlGroup ); label->setEnabled( false ); - QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); + TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); groupLayout->addWidget( label, 4, 0 ); - mMLId = new QLabel( label, "", mlGroup ); + mMLId = new TQLabel( label, "", mlGroup ); groupLayout->addMultiCellWidget( mMLId, 4, 4, 1, 2 ); mMLId->setEnabled( false ); //FIXME: add QWhatsThis - label = new QLabel( i18n("Preferred handler:"), mlGroup ); + label = new TQLabel( i18n("Preferred handler:"), mlGroup ); label->setEnabled(false); - QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); + TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); groupLayout->addWidget( label, 5, 0 ); - mMLHandlerCombo = new QComboBox( mlGroup ); + mMLHandlerCombo = new TQComboBox( mlGroup ); mMLHandlerCombo->insertItem( i18n("KMail"), MailingList::KMail ); mMLHandlerCombo->insertItem( i18n("Browser"), MailingList::Browser ); mMLHandlerCombo->setEnabled( false ); groupLayout->addMultiCellWidget( mMLHandlerCombo, 5, 5, 1, 2 ); - QObject::connect( mMLHandlerCombo, SIGNAL(activated(int)), - SLOT(slotMLHandling(int)) ); + TQObject::connect( mMLHandlerCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotMLHandling(int)) ); label->setBuddy( mMLHandlerCombo ); - label = new QLabel( i18n("&Address type:"), mlGroup ); + label = new TQLabel( i18n("&Address type:"), mlGroup ); label->setEnabled(false); - QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); + TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); groupLayout->addWidget( label, 6, 0 ); - mAddressCombo = new QComboBox( mlGroup ); + mAddressCombo = new TQComboBox( mlGroup ); label->setBuddy( mAddressCombo ); groupLayout->addWidget( mAddressCombo, 6, 1 ); mAddressCombo->setEnabled( false ); @@ -115,14 +115,14 @@ MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* p //FIXME: if the mailing list actions have either KAction's or toolbar buttons // associated with them - remove this button since it's really silly // here - QPushButton *handleButton = new QPushButton( i18n( "Invoke Handler" ), mlGroup ); + TQPushButton *handleButton = new TQPushButton( i18n( "Invoke Handler" ), mlGroup ); handleButton->setEnabled( false ); if( mFolder) { - QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)), - handleButton, SLOT(setEnabled(bool)) ); - QObject::connect( handleButton, SIGNAL(clicked()), - SLOT(slotInvokeHandler()) ); + TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)), + handleButton, TQT_SLOT(setEnabled(bool)) ); + TQObject::connect( handleButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotInvokeHandler()) ); } groupLayout->addWidget( handleButton, 6, 2 ); @@ -130,7 +130,7 @@ MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* p mEditList->setEnabled( false ); groupLayout->addMultiCellWidget( mEditList, 7, 7, 0, 3 ); - QStringList el; + TQStringList el; //Order is important because the activate handler and fillMLFromWidgets //depend on it @@ -140,11 +140,11 @@ MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* p << i18n( "List Archives" ) << i18n( "List Help" ); mAddressCombo->insertStringList( el ); - QObject::connect( mAddressCombo, SIGNAL(activated(int)), - SLOT(slotAddressChanged(int)) ); + TQObject::connect( mAddressCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotAddressChanged(int)) ); load(); - resize( QSize(295, 204).expandedTo(minimumSizeHint()) ); + resize( TQSize(295, 204).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); } @@ -252,9 +252,9 @@ void MailingListFolderPropertiesDialog::fillMLFromWidgets() // make sure that email addresses are prepended by "mailto:" bool changed = false; - QStringList oldList = mEditList->items(); - QStringList newList; // the correct string list - for ( QStringList::ConstIterator it = oldList.begin(); + TQStringList oldList = mEditList->items(); + TQStringList newList; // the correct string list + for ( TQStringList::ConstIterator it = oldList.begin(); it != oldList.end(); ++it ) { if ( !(*it).startsWith("http:") && !(*it).startsWith("https:") && !(*it).startsWith("mailto:") && ( (*it).find('@') != -1 ) ) { diff --git a/kmail/mailinglistpropertiesdialog.h b/kmail/mailinglistpropertiesdialog.h index 5996d607d..71c049e11 100644 --- a/kmail/mailinglistpropertiesdialog.h +++ b/kmail/mailinglistpropertiesdialog.h @@ -46,7 +46,7 @@ class MailingListFolderPropertiesDialog : public KDialogBase { Q_OBJECT public: - MailingListFolderPropertiesDialog( QWidget *parent, KMFolder *folder ); + MailingListFolderPropertiesDialog( TQWidget *parent, KMFolder *folder ); ~MailingListFolderPropertiesDialog() {}; protected: void load(); @@ -71,13 +71,13 @@ private: void fillEditBox(); bool mMLInfoChanged; - QCheckBox *mHoldsMailingList; - QComboBox *mMLHandlerCombo; - QPushButton *mDetectButton; - QComboBox *mAddressCombo; + TQCheckBox *mHoldsMailingList; + TQComboBox *mMLHandlerCombo; + TQPushButton *mDetectButton; + TQComboBox *mAddressCombo; int mLastItem; KEditListBox *mEditList; - QLabel *mMLId; + TQLabel *mMLId; MailingList mMailingList; }; // End of class MailingListFolderProperties diff --git a/kmail/mailserviceimpl.cpp b/kmail/mailserviceimpl.cpp index 6d82f5a45..e7337e810 100644 --- a/kmail/mailserviceimpl.cpp +++ b/kmail/mailserviceimpl.cpp @@ -42,7 +42,7 @@ #include <dcopobject.h> #include <kurl.h> #include <kdebug.h> -#include <qstring.h> +#include <tqstring.h> namespace KMail { @@ -52,9 +52,9 @@ MailServiceImpl::MailServiceImpl() { } -bool MailServiceImpl::sendMessage( const QString& from, const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, +bool MailServiceImpl::sendMessage( const TQString& from, const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, const KURL::List& attachments ) { if ( to.isEmpty() && cc.isEmpty() && bcc.isEmpty() ) @@ -79,21 +79,21 @@ bool MailServiceImpl::sendMessage( const QString& from, const QString& to, return true; } -bool MailServiceImpl::sendMessage( const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, +bool MailServiceImpl::sendMessage( const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, const KURL::List& attachments ) { - kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(QString to,QString cc,QString bcc,QString subject,QString body,KURL::List attachments)" << endl; - kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter QString from instead." << endl; - return sendMessage( QString::null, to, cc, bcc, subject, body, attachments ); + kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(TQString to,TQString cc,TQString bcc,TQString subject,TQString body,KURL::List attachments)" << endl; + kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter TQString from instead." << endl; + return sendMessage( TQString::null, to, cc, bcc, subject, body, attachments ); } -bool MailServiceImpl::sendMessage( const QString& from, const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, - const QByteArray& attachment ) +bool MailServiceImpl::sendMessage( const TQString& from, const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, + const TQByteArray& attachment ) { if ( to.isEmpty() && cc.isEmpty() && bcc.isEmpty() ) return false; @@ -121,14 +121,14 @@ bool MailServiceImpl::sendMessage( const QString& from, const QString& to, } -bool MailServiceImpl::sendMessage( const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, - const QByteArray& attachment ) +bool MailServiceImpl::sendMessage( const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, + const TQByteArray& attachment ) { - kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(QString to,QString cc,QString bcc,QString subject,QString body,QByteArray attachment)" << endl; - kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter QString from instead." << endl; - return sendMessage( QString::null, to, cc, bcc, subject, body, attachment ); + kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(TQString to,TQString cc,TQString bcc,TQString subject,TQString body,TQByteArray attachment)" << endl; + kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter TQString from instead." << endl; + return sendMessage( TQString::null, to, cc, bcc, subject, body, attachment ); } }//end namespace KMail diff --git a/kmail/mailserviceimpl.h b/kmail/mailserviceimpl.h index 0bb925572..a31950663 100644 --- a/kmail/mailserviceimpl.h +++ b/kmail/mailserviceimpl.h @@ -35,7 +35,7 @@ class QString; class KURL; template <typename T> class QMemArray; -typedef QMemArray<char> QByteArray; +typedef TQMemArray<char> QByteArray; namespace KMail { @@ -44,29 +44,29 @@ namespace KMail { { public: MailServiceImpl(); - bool sendMessage( const QString& from, const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, + bool sendMessage( const TQString& from, const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, const KURL::List& attachments ); // FIXME KDE 4.0: Remove this. // (cf. libkdepim/interfaces/MailTransportServiceIface.h) - bool sendMessage( const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, + bool sendMessage( const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, const KURL::List& attachments ); - bool sendMessage( const QString& from, const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, - const QByteArray& attachment ); + bool sendMessage( const TQString& from, const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, + const TQByteArray& attachment ); // FIXME KDE 4.0: Remove this. // (cf. libkdepim/interfaces/MailTransportServiceIface.h) - bool sendMessage( const QString& to, - const QString& cc, const QString& bcc, - const QString& subject, const QString& body, - const QByteArray& attachment ); + bool sendMessage( const TQString& to, + const TQString& cc, const TQString& bcc, + const TQString& subject, const TQString& body, + const TQByteArray& attachment ); }; } diff --git a/kmail/mailsourceviewer.cpp b/kmail/mailsourceviewer.cpp index ac77b7dd4..0cfa11bb3 100644 --- a/kmail/mailsourceviewer.cpp +++ b/kmail/mailsourceviewer.cpp @@ -38,28 +38,28 @@ #include <kapplication.h> #include <kwin.h> -#include <qregexp.h> -#include <qaccel.h> +#include <tqregexp.h> +#include <tqaccel.h> namespace KMail { -int MailSourceHighlighter::highlightParagraph( const QString& text, int ) { - QRegExp regexp( "^([\\w-]+:\\s)" ); +int MailSourceHighlighter::highlightParagraph( const TQString& text, int ) { + TQRegExp regexp( "^([\\w-]+:\\s)" ); if( regexp.search( text ) != -1 ) { - QFont font = textEdit()->currentFont(); + TQFont font = textEdit()->currentFont(); font.setBold( true ); setFormat( 0, regexp.matchedLength(), font ); } return 0; } -MailSourceViewer::MailSourceViewer( QWidget *parent, const char *name ) +MailSourceViewer::MailSourceViewer( TQWidget *parent, const char *name ) : KTextBrowser( parent, name ), mSourceHighLighter( 0 ) { setWFlags( WDestructiveClose ); - QAccel *accel = new QAccel( this, "browser close-accel" ); - accel->connectItem( accel->insertItem( Qt::Key_Escape ), this , SLOT( close() )); - accel->connectItem( accel->insertItem( Qt::Key_W+CTRL ), this , SLOT( close() )); + TQAccel *accel = new TQAccel( this, "browser close-accel" ); + accel->connectItem( accel->insertItem( Qt::Key_Escape ), this , TQT_SLOT( close() )); + accel->connectItem( accel->insertItem( Qt::Key_W+CTRL ), this , TQT_SLOT( close() )); setWordWrap( KTextBrowser::NoWrap ); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); } @@ -69,7 +69,7 @@ MailSourceViewer::~MailSourceViewer() delete mSourceHighLighter; mSourceHighLighter = 0; } -void MailSourceViewer::setText( const QString& text ) +void MailSourceViewer::setText( const TQString& text ) { delete mSourceHighLighter; mSourceHighLighter = 0; if ( text.length() > 500000 ) { diff --git a/kmail/mailsourceviewer.h b/kmail/mailsourceviewer.h index 0bed8b415..10d242584 100644 --- a/kmail/mailsourceviewer.h +++ b/kmail/mailsourceviewer.h @@ -33,7 +33,7 @@ #define MAILSOURCEVIEWER_H #include <ktextbrowser.h> -#include <qsyntaxhighlighter.h> +#include <tqsyntaxhighlighter.h> /** @@ -49,19 +49,19 @@ namespace KMail { class MailSourceHighlighter : public QSyntaxHighlighter { public: - MailSourceHighlighter( QTextEdit* edit ) - : QSyntaxHighlighter( edit ) + MailSourceHighlighter( TQTextEdit* edit ) + : TQSyntaxHighlighter( edit ) {} - int highlightParagraph( const QString& text, int ); + int highlightParagraph( const TQString& text, int ); }; class MailSourceViewer : public KTextBrowser { public: - MailSourceViewer( QWidget *parent = 0, const char *name = 0 ); + MailSourceViewer( TQWidget *parent = 0, const char *name = 0 ); ~MailSourceViewer(); - void setText( const QString& text ); + void setText( const TQString& text ); private: MailSourceHighlighter *mSourceHighLighter; }; diff --git a/kmail/managesievescriptsdialog.cpp b/kmail/managesievescriptsdialog.cpp index 594a467d0..a089c94a6 100644 --- a/kmail/managesievescriptsdialog.cpp +++ b/kmail/managesievescriptsdialog.cpp @@ -15,21 +15,21 @@ #include <kglobalsettings.h> #include <kmessagebox.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qtextedit.h> -#include <qpopupmenu.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqtextedit.h> +#include <tqpopupmenu.h> #include <cassert> -inline QCheckListItem * qcli_cast( QListViewItem * lvi ) { - return lvi && lvi->rtti() == 1 ? static_cast<QCheckListItem*>( lvi ) : 0 ; +inline TQCheckListItem * qcli_cast( TQListViewItem * lvi ) { + return lvi && lvi->rtti() == 1 ? static_cast<TQCheckListItem*>( lvi ) : 0 ; } -inline const QCheckListItem * qcli_cast( const QListViewItem * lvi ) { - return lvi && lvi->rtti() == 1 ? static_cast<const QCheckListItem*>( lvi ) : 0 ; +inline const TQCheckListItem * qcli_cast( const TQListViewItem * lvi ) { + return lvi && lvi->rtti() == 1 ? static_cast<const TQCheckListItem*>( lvi ) : 0 ; } -KMail::ManageSieveScriptsDialog::ManageSieveScriptsDialog( QWidget * parent, const char * name ) +KMail::ManageSieveScriptsDialog::ManageSieveScriptsDialog( TQWidget * parent, const char * name ) : KDialogBase( Plain, i18n( "Manage Sieve Scripts" ), Close, Close, parent, name, false ), mSieveEditor( 0 ), @@ -39,19 +39,19 @@ KMail::ManageSieveScriptsDialog::ManageSieveScriptsDialog( QWidget * parent, con setWFlags( WGroupLeader|WDestructiveClose ); KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() ); - QVBoxLayout * vlay = new QVBoxLayout( plainPage(), 0, 0 ); + TQVBoxLayout * vlay = new TQVBoxLayout( plainPage(), 0, 0 ); - mListView = new QListView( plainPage() ); + mListView = new TQListView( plainPage() ); mListView->addColumn( i18n( "Available Scripts" ) ); - mListView->setResizeMode( QListView::LastColumn ); + mListView->setResizeMode( TQListView::LastColumn ); mListView->setRootIsDecorated( true ); - mListView->setSelectionMode( QListView::Single ); - connect( mListView, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)), - this, SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&)) ); - connect( mListView, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)), - this, SLOT(slotDoubleClicked(QListViewItem*)) ); - connect( mListView, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(slotSelectionChanged(QListViewItem*)) ); + mListView->setSelectionMode( TQListView::Single ); + connect( mListView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)), + this, TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&)) ); + connect( mListView, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), + this, TQT_SLOT(slotDoubleClicked(TQListViewItem*)) ); + connect( mListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)) ); vlay->addWidget( mListView ); resize( 2 * sizeHint().width(), sizeHint().height() ); @@ -64,7 +64,7 @@ KMail::ManageSieveScriptsDialog::~ManageSieveScriptsDialog() { } void KMail::ManageSieveScriptsDialog::killAllJobs() { - for ( QMap<SieveJob*,QCheckListItem*>::const_iterator it = mJobs.constBegin(), end = mJobs.constEnd() ; it != end ; ++it ) + for ( TQMap<SieveJob*,TQCheckListItem*>::const_iterator it = mJobs.constBegin(), end = mJobs.constEnd() ; it != end ; ++it ) it.key()->kill(); mJobs.clear(); } @@ -97,31 +97,31 @@ void KMail::ManageSieveScriptsDialog::slotRefresh() { KMail::AccountManager * am = kmkernel->acctMgr(); assert( am ); - QCheckListItem * last = 0; + TQCheckListItem * last = 0; for ( KMAccount * a = am->first() ; a ; a = am->next() ) { - last = new QCheckListItem( mListView, last, a->name(), QCheckListItem::Controller ); + last = new TQCheckListItem( mListView, last, a->name(), TQCheckListItem::Controller ); last->setPixmap( 0, SmallIcon( "server" ) ); if ( ImapAccountBase * iab = dynamic_cast<ImapAccountBase*>( a ) ) { const KURL u = ::findUrlForAccount( iab ); if ( u.isEmpty() ) continue; SieveJob * job = SieveJob::list( u ); - connect( job, SIGNAL(item(KMail::SieveJob*,const QString&,bool)), - this, SLOT(slotItem(KMail::SieveJob*,const QString&,bool)) ); - connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)), - this, SLOT(slotResult(KMail::SieveJob*,bool,const QString&,bool)) ); + connect( job, TQT_SIGNAL(item(KMail::SieveJob*,const TQString&,bool)), + this, TQT_SLOT(slotItem(KMail::SieveJob*,const TQString&,bool)) ); + connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)), + this, TQT_SLOT(slotResult(KMail::SieveJob*,bool,const TQString&,bool)) ); mJobs.insert( job, last ); mUrls.insert( last, u ); } else { - QListViewItem * item = new QListViewItem( last, i18n( "No Sieve URL configured" ) ); + TQListViewItem * item = new TQListViewItem( last, i18n( "No Sieve URL configured" ) ); item->setEnabled( false ); last->setOpen( true ); } } } -void KMail::ManageSieveScriptsDialog::slotResult( KMail::SieveJob * job, bool success, const QString &, bool ) { - QCheckListItem * parent = mJobs[job]; +void KMail::ManageSieveScriptsDialog::slotResult( KMail::SieveJob * job, bool success, const TQString &, bool ) { + TQCheckListItem * parent = mJobs[job]; if ( !parent ) return; @@ -132,46 +132,46 @@ void KMail::ManageSieveScriptsDialog::slotResult( KMail::SieveJob * job, bool su if ( success ) return; - QListViewItem * item = new QListViewItem( parent, i18n( "Failed to fetch the list of scripts" ) ); + TQListViewItem * item = new TQListViewItem( parent, i18n( "Failed to fetch the list of scripts" ) ); item->setEnabled( false ); } -void KMail::ManageSieveScriptsDialog::slotItem( KMail::SieveJob * job, const QString & filename, bool isActive ) { - QCheckListItem * parent = mJobs[job]; +void KMail::ManageSieveScriptsDialog::slotItem( KMail::SieveJob * job, const TQString & filename, bool isActive ) { + TQCheckListItem * parent = mJobs[job]; if ( !parent ) return; - QCheckListItem * item = new QCheckListItem( parent, filename, QCheckListItem::RadioButton ); + TQCheckListItem * item = new TQCheckListItem( parent, filename, TQCheckListItem::RadioButton ); if ( isActive ) { item->setOn( true ); mSelectedItems[parent] = item; } } -void KMail::ManageSieveScriptsDialog::slotContextMenuRequested( QListViewItem * i, const QPoint & p ) { - QCheckListItem * item = qcli_cast( i ); +void KMail::ManageSieveScriptsDialog::slotContextMenuRequested( TQListViewItem * i, const TQPoint & p ) { + TQCheckListItem * item = qcli_cast( i ); if ( !item ) return; if ( !item->depth() && !mUrls.count( item ) ) return; - QPopupMenu menu; + TQPopupMenu menu; mContextMenuItem = item; if ( item->depth() ) { // script items: - menu.insertItem( i18n( "Delete Script" ), this, SLOT(slotDeleteScript()) ); - menu.insertItem( i18n( "Edit Script..." ), this, SLOT(slotEditScript()) ); + menu.insertItem( i18n( "Delete Script" ), this, TQT_SLOT(slotDeleteScript()) ); + menu.insertItem( i18n( "Edit Script..." ), this, TQT_SLOT(slotEditScript()) ); } else { // top-levels: - menu.insertItem( i18n( "New Script..." ), this, SLOT(slotNewScript()) ); + menu.insertItem( i18n( "New Script..." ), this, TQT_SLOT(slotNewScript()) ); } menu.exec( p ); mContextMenuItem = 0; } -void KMail::ManageSieveScriptsDialog::slotSelectionChanged( QListViewItem * i ) { - QCheckListItem * item = qcli_cast( i ); +void KMail::ManageSieveScriptsDialog::slotSelectionChanged( TQListViewItem * i ) { + TQCheckListItem * item = qcli_cast( i ); if ( !item ) return; - QCheckListItem * parent = qcli_cast( item->parent() ); + TQCheckListItem * parent = qcli_cast( item->parent() ); if ( !parent ) return; if ( item->isOn() && mSelectedItems[parent] != item ) { @@ -180,7 +180,7 @@ void KMail::ManageSieveScriptsDialog::slotSelectionChanged( QListViewItem * i ) } } -void KMail::ManageSieveScriptsDialog::changeActiveScript( QCheckListItem * item ) { +void KMail::ManageSieveScriptsDialog::changeActiveScript( TQCheckListItem * item ) { if ( !item ) return; if ( !mUrls.count( item ) ) @@ -190,18 +190,18 @@ void KMail::ManageSieveScriptsDialog::changeActiveScript( QCheckListItem * item KURL u = mUrls[item]; if ( u.isEmpty() ) return; - QCheckListItem * selected = mSelectedItems[item]; + TQCheckListItem * selected = mSelectedItems[item]; if ( !selected ) return; u.setFileName( selected->text( 0 ) ); SieveJob * job = SieveJob::activate( u ); - connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)), - this, SLOT(slotRefresh()) ); + connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)), + this, TQT_SLOT(slotRefresh()) ); } -void KMail::ManageSieveScriptsDialog::slotDoubleClicked( QListViewItem * i ) { - QCheckListItem * item = qcli_cast( i ); +void KMail::ManageSieveScriptsDialog::slotDoubleClicked( TQListViewItem * i ) { + TQCheckListItem * item = qcli_cast( i ); if ( !item ) return; if ( !item->depth() ) @@ -217,7 +217,7 @@ void KMail::ManageSieveScriptsDialog::slotDeleteScript() { if ( !mContextMenuItem->depth() ) return; - QCheckListItem * parent = qcli_cast( mContextMenuItem->parent() ); + TQCheckListItem * parent = qcli_cast( mContextMenuItem->parent() ); if ( !parent ) return; @@ -237,8 +237,8 @@ void KMail::ManageSieveScriptsDialog::slotDeleteScript() { return; SieveJob * job = SieveJob::del( u ); - connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)), - this, SLOT(slotRefresh()) ); + connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)), + this, TQT_SLOT(slotRefresh()) ); } void KMail::ManageSieveScriptsDialog::slotEditScript() { @@ -246,7 +246,7 @@ void KMail::ManageSieveScriptsDialog::slotEditScript() { return; if ( !mContextMenuItem->depth() ) return; - QCheckListItem * parent = qcli_cast( mContextMenuItem->parent() ); + TQCheckListItem * parent = qcli_cast( mContextMenuItem->parent() ); if ( !mUrls.count( parent ) ) return; KURL url = mUrls[parent]; @@ -255,8 +255,8 @@ void KMail::ManageSieveScriptsDialog::slotEditScript() { url.setFileName( mContextMenuItem->text( 0 ) ); mCurrentURL = url; SieveJob * job = SieveJob::get( url ); - connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)), - this, SLOT(slotGetResult(KMail::SieveJob*,bool,const QString&,bool)) ); + connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)), + this, TQT_SLOT(slotGetResult(KMail::SieveJob*,bool,const TQString&,bool)) ); } void KMail::ManageSieveScriptsDialog::slotNewScript() { @@ -275,7 +275,7 @@ void KMail::ManageSieveScriptsDialog::slotNewScript() { return; bool ok = false; - const QString name = KInputDialog::getText( i18n( "New Sieve Script" ), + const TQString name = KInputDialog::getText( i18n( "New Sieve Script" ), i18n( "Please enter a name for the new Sieve script:" ), i18n( "unnamed" ), &ok, this ); if ( !ok || name.isEmpty() ) @@ -283,20 +283,20 @@ void KMail::ManageSieveScriptsDialog::slotNewScript() { u.setFileName( name ); - (void) new QCheckListItem( mContextMenuItem, name, QCheckListItem::RadioButton ); + (void) new TQCheckListItem( mContextMenuItem, name, TQCheckListItem::RadioButton ); mCurrentURL = u; - slotGetResult( 0, true, QString::null, false ); + slotGetResult( 0, true, TQString::null, false ); } -KMail::SieveEditor::SieveEditor( QWidget * parent, const char * name ) +KMail::SieveEditor::SieveEditor( TQWidget * parent, const char * name ) : KDialogBase( Plain, i18n( "Edit Sieve Script" ), Ok|Cancel, Ok, parent, name ) { - QVBoxLayout * vlay = new QVBoxLayout( plainPage(), 0, spacingHint() ); - mTextEdit = new QTextEdit( plainPage() ); + TQVBoxLayout * vlay = new TQVBoxLayout( plainPage(), 0, spacingHint() ); + mTextEdit = new TQTextEdit( plainPage() ); vlay->addWidget( mTextEdit ); - mTextEdit->setTextFormat( QTextEdit::PlainText ); - mTextEdit->setWordWrap( QTextEdit::NoWrap ); + mTextEdit->setTextFormat( TQTextEdit::PlainText ); + mTextEdit->setWordWrap( TQTextEdit::NoWrap ); mTextEdit->setFont( KGlobalSettings::fixedFont() ); resize( 3 * sizeHint() ); @@ -304,7 +304,7 @@ KMail::SieveEditor::SieveEditor( QWidget * parent, const char * name ) KMail::SieveEditor::~SieveEditor() {} -void KMail::ManageSieveScriptsDialog::slotGetResult( KMail::SieveJob *, bool success, const QString & script, bool isActive ) { +void KMail::ManageSieveScriptsDialog::slotGetResult( KMail::SieveJob *, bool success, const TQString & script, bool isActive ) { if ( !success ) return; @@ -313,8 +313,8 @@ void KMail::ManageSieveScriptsDialog::slotGetResult( KMail::SieveJob *, bool suc mSieveEditor = new SieveEditor( this ); mSieveEditor->setScript( script ); - connect( mSieveEditor, SIGNAL(okClicked()), this, SLOT(slotSieveEditorOkClicked()) ); - connect( mSieveEditor, SIGNAL(cancelClicked()), this, SLOT(slotSieveEditorCancelClicked()) ); + connect( mSieveEditor, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotSieveEditorOkClicked()) ); + connect( mSieveEditor, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotSieveEditorCancelClicked()) ); mSieveEditor->show(); mWasActive = isActive; } @@ -323,8 +323,8 @@ void KMail::ManageSieveScriptsDialog::slotSieveEditorOkClicked() { if ( !mSieveEditor ) return; SieveJob * job = SieveJob::put( mCurrentURL,mSieveEditor->script(), mWasActive, mWasActive ); - connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)), - this, SLOT(slotPutResult(KMail::SieveJob*,bool)) ); + connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)), + this, TQT_SLOT(slotPutResult(KMail::SieveJob*,bool)) ); } void KMail::ManageSieveScriptsDialog::slotSieveEditorCancelClicked() { diff --git a/kmail/managesievescriptsdialog.h b/kmail/managesievescriptsdialog.h index f0b99ebc3..f4167a0d7 100644 --- a/kmail/managesievescriptsdialog.h +++ b/kmail/managesievescriptsdialog.h @@ -3,7 +3,7 @@ #include <kdialogbase.h> #include <kurl.h> -#include <qmap.h> +#include <tqmap.h> class QListView; class QCheckListItem; @@ -16,35 +16,35 @@ class SieveEditor; class ManageSieveScriptsDialog : public KDialogBase { Q_OBJECT public: - ManageSieveScriptsDialog( QWidget * parent=0, const char * name=0 ); + ManageSieveScriptsDialog( TQWidget * parent=0, const char * name=0 ); ~ManageSieveScriptsDialog(); private slots: void slotRefresh(); - void slotItem( KMail::SieveJob *, const QString &, bool ); - void slotResult( KMail::SieveJob *, bool, const QString &, bool ); - void slotContextMenuRequested( QListViewItem *, const QPoint & ); - void slotDoubleClicked( QListViewItem * ); - void slotSelectionChanged( QListViewItem * ); + void slotItem( KMail::SieveJob *, const TQString &, bool ); + void slotResult( KMail::SieveJob *, bool, const TQString &, bool ); + void slotContextMenuRequested( TQListViewItem *, const TQPoint & ); + void slotDoubleClicked( TQListViewItem * ); + void slotSelectionChanged( TQListViewItem * ); void slotNewScript(); void slotEditScript(); void slotDeleteScript(); - void slotGetResult( KMail::SieveJob *, bool, const QString &, bool ); + void slotGetResult( KMail::SieveJob *, bool, const TQString &, bool ); void slotPutResult( KMail::SieveJob *, bool ); void slotSieveEditorOkClicked(); void slotSieveEditorCancelClicked(); private: void killAllJobs(); - void changeActiveScript( QCheckListItem * ); + void changeActiveScript( TQCheckListItem * ); private: - QListView * mListView; + TQListView * mListView; SieveEditor * mSieveEditor; - QMap<KMail::SieveJob*,QCheckListItem*> mJobs; - QMap<QCheckListItem*,KURL> mUrls; - QMap<QCheckListItem*,QCheckListItem*> mSelectedItems; - QCheckListItem * mContextMenuItem; + TQMap<KMail::SieveJob*,TQCheckListItem*> mJobs; + TQMap<TQCheckListItem*,KURL> mUrls; + TQMap<TQCheckListItem*,TQCheckListItem*> mSelectedItems; + TQCheckListItem * mContextMenuItem; KURL mCurrentURL; bool mWasActive : 1; }; diff --git a/kmail/managesievescriptsdialog_p.h b/kmail/managesievescriptsdialog_p.h index d46b2d11a..83fde06b0 100644 --- a/kmail/managesievescriptsdialog_p.h +++ b/kmail/managesievescriptsdialog_p.h @@ -3,22 +3,22 @@ #include <kdialogbase.h> -#include <qtextedit.h> +#include <tqtextedit.h> namespace KMail { class SieveEditor : public KDialogBase { Q_OBJECT - Q_PROPERTY( QString script READ script WRITE setScript ) + Q_PROPERTY( TQString script READ script WRITE setScript ) public: - SieveEditor( QWidget * parent=0, const char * name=0 ); + SieveEditor( TQWidget * parent=0, const char * name=0 ); ~SieveEditor(); - QString script() const { return mTextEdit->text(); } - void setScript( const QString & script ) { mTextEdit->setText( script ); } + TQString script() const { return mTextEdit->text(); } + void setScript( const TQString & script ) { mTextEdit->setText( script ); } private: - QTextEdit * mTextEdit; + TQTextEdit * mTextEdit; }; } diff --git a/kmail/mboxjob.cpp b/kmail/mboxjob.cpp index ee2cc7a39..1b6b32233 100644 --- a/kmail/mboxjob.cpp +++ b/kmail/mboxjob.cpp @@ -39,8 +39,8 @@ #include <kapplication.h> #include <kdebug.h> -#include <qtimer.h> -#include <qdatetime.h> +#include <tqtimer.h> +#include <tqdatetime.h> namespace KMail { @@ -52,7 +52,7 @@ MboxJob::MboxJob( KMMessage *msg, JobType jt , KMFolder *folder ) } //----------------------------------------------------------------------------- -MboxJob::MboxJob( QPtrList<KMMessage>& msgList, const QString& sets, +MboxJob::MboxJob( TQPtrList<KMMessage>& msgList, const TQString& sets, JobType jt, KMFolder *folder ) : FolderJob( msgList, sets, jt, folder ) { @@ -67,7 +67,7 @@ MboxJob::~MboxJob() void MboxJob::execute() { - QTimer::singleShot( 0, this, SLOT(startJob()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(startJob()) ); } //----------------------------------------------------------------------------- diff --git a/kmail/mboxjob.h b/kmail/mboxjob.h index a9318a5e9..406edef7d 100644 --- a/kmail/mboxjob.h +++ b/kmail/mboxjob.h @@ -44,7 +44,7 @@ class MboxJob : public FolderJob friend class ::KMFolderMbox; public: MboxJob( KMMessage *msg, JobType jt = tGetMessage, KMFolder *folder = 0 ); - MboxJob( QPtrList<KMMessage>& msgList, const QString& sets, + MboxJob( TQPtrList<KMMessage>& msgList, const TQString& sets, JobType jt = tGetMessage, KMFolder *folder = 0 ); virtual ~MboxJob(); protected: diff --git a/kmail/messageactions.cpp b/kmail/messageactions.cpp index 5c655cc34..b900b7b59 100644 --- a/kmail/messageactions.cpp +++ b/kmail/messageactions.cpp @@ -28,12 +28,12 @@ #include <kdebug.h> #include <klocale.h> -#include <qwidget.h> +#include <tqwidget.h> using namespace KMail; -MessageActions::MessageActions( KActionCollection *ac, QWidget * parent ) : - QObject( parent ), +MessageActions::MessageActions( KActionCollection *ac, TQWidget * parent ) : + TQObject( parent ), mParent( parent ), mActionCollection( ac ), mCurrentMessage( 0 ), @@ -42,36 +42,36 @@ MessageActions::MessageActions( KActionCollection *ac, QWidget * parent ) : mReplyActionMenu = new KActionMenu( i18n("Message->","&Reply"), "mail_reply", mActionCollection, "message_reply_menu" ); - connect( mReplyActionMenu, SIGNAL(activated()), this, - SLOT(slotReplyToMsg()) ); + connect( mReplyActionMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotReplyToMsg()) ); mReplyAction = new KAction( i18n("&Reply..."), "mail_reply", Key_R, this, - SLOT(slotReplyToMsg()), mActionCollection, "reply" ); + TQT_SLOT(slotReplyToMsg()), mActionCollection, "reply" ); mReplyActionMenu->insert( mReplyAction ); mReplyAuthorAction = new KAction( i18n("Reply to A&uthor..."), "mail_reply", SHIFT+Key_A, this, - SLOT(slotReplyAuthorToMsg()), + TQT_SLOT(slotReplyAuthorToMsg()), mActionCollection, "reply_author" ); mReplyActionMenu->insert( mReplyAuthorAction ); mReplyAllAction = new KAction( i18n("Reply to &All..."), "mail_replyall", - Key_A, this, SLOT(slotReplyAllToMsg()), + Key_A, this, TQT_SLOT(slotReplyAllToMsg()), mActionCollection, "reply_all" ); mReplyActionMenu->insert( mReplyAllAction ); mReplyListAction = new KAction( i18n("Reply to Mailing-&List..."), "mail_replylist", Key_L, this, - SLOT(slotReplyListToMsg()), mActionCollection, + TQT_SLOT(slotReplyListToMsg()), mActionCollection, "reply_list" ); mReplyActionMenu->insert( mReplyListAction ); mNoQuoteReplyAction = new KAction( i18n("Reply Without &Quote..."), SHIFT+Key_R, - this, SLOT(slotNoQuoteReplyToMsg()), mActionCollection, "noquotereply" ); + this, TQT_SLOT(slotNoQuoteReplyToMsg()), mActionCollection, "noquotereply" ); mCreateTodoAction = new KAction( i18n("Create Task/Reminder..."), "mail_todo", - 0, this, SLOT(slotCreateTodo()), mActionCollection, + 0, this, TQT_SLOT(slotCreateTodo()), mActionCollection, "create_todo" ); @@ -80,35 +80,35 @@ MessageActions::MessageActions( KActionCollection *ac, QWidget * parent ) : mStatusMenu->insert(new KAction(KGuiItem(i18n("Mark Message as &Read"), "kmmsgread", i18n("Mark selected messages as read")), - 0, this, SLOT(slotSetMsgStatusRead()), + 0, this, TQT_SLOT(slotSetMsgStatusRead()), mActionCollection, "status_read")); mStatusMenu->insert(new KAction(KGuiItem(i18n("Mark Message as &New"), "kmmsgnew", i18n("Mark selected messages as new")), - 0, this, SLOT(slotSetMsgStatusNew()), + 0, this, TQT_SLOT(slotSetMsgStatusNew()), mActionCollection, "status_new" )); mStatusMenu->insert(new KAction(KGuiItem(i18n("Mark Message as &Unread"), "kmmsgunseen", i18n("Mark selected messages as unread")), - 0, this, SLOT(slotSetMsgStatusUnread()), + 0, this, TQT_SLOT(slotSetMsgStatusUnread()), mActionCollection, "status_unread")); mStatusMenu->insert( new KActionSeparator( this ) ); mToggleFlagAction = new KToggleAction(i18n("Mark Message as &Important"), "mail_flag", - 0, this, SLOT(slotSetMsgStatusFlag()), + 0, this, TQT_SLOT(slotSetMsgStatusFlag()), mActionCollection, "status_flag"); mToggleFlagAction->setCheckedState( i18n("Remove &Important Message Mark") ); mStatusMenu->insert( mToggleFlagAction ); mToggleTodoAction = new KToggleAction(i18n("Mark Message as &Action Item"), "mail_todo", - 0, this, SLOT(slotSetMsgStatusTodo()), + 0, this, TQT_SLOT(slotSetMsgStatusTodo()), mActionCollection, "status_todo"); mToggleTodoAction->setCheckedState( i18n("Remove &Action Item Message Mark") ); mStatusMenu->insert( mToggleTodoAction ); mEditAction = new KAction( i18n("&Edit Message"), "edit", Key_T, this, - SLOT(editCurrentMessage()), mActionCollection, "edit" ); + TQT_SLOT(editCurrentMessage()), mActionCollection, "edit" ); mEditAction->plugAccel( mActionCollection->kaccel() ); updateActions(); @@ -124,13 +124,13 @@ void MessageActions::setCurrentMessage(KMMessage * msg) updateActions(); } -void MessageActions::setSelectedSernums(const QValueList< Q_UINT32 > & sernums) +void MessageActions::setSelectedSernums(const TQValueList< Q_UINT32 > & sernums) { mSelectedSernums = sernums; updateActions(); } -void MessageActions::setSelectedVisibleSernums(const QValueList< Q_UINT32 > & sernums) +void MessageActions::setSelectedVisibleSernums(const TQValueList< Q_UINT32 > & sernums) { mVisibleSernums = sernums; updateActions(); @@ -232,7 +232,7 @@ void MessageActions::slotSetMsgStatusTodo() void MessageActions::setMessageStatus( KMMsgStatus status, bool toggle ) { - QValueList<Q_UINT32> serNums = mVisibleSernums; + TQValueList<Q_UINT32> serNums = mVisibleSernums; if ( serNums.isEmpty() && mCurrentMessage ) serNums.append( mCurrentMessage->getMsgSerNum() ); if ( serNums.empty() ) diff --git a/kmail/messageactions.h b/kmail/messageactions.h index 6761a0667..3307f15fb 100644 --- a/kmail/messageactions.h +++ b/kmail/messageactions.h @@ -22,8 +22,8 @@ #include "kmcommands.h" #include "kmreaderwin.h" -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> class QWidget; class KAction; @@ -40,12 +40,12 @@ class MessageActions : public QObject { Q_OBJECT public: - MessageActions( KActionCollection* ac, QWidget *parent ); + MessageActions( KActionCollection* ac, TQWidget *parent ); void setMessageView( KMReaderWin *msgView ); void setCurrentMessage( KMMessage *msg ); - void setSelectedSernums( const QValueList<Q_UINT32> &sernums ); - void setSelectedVisibleSernums( const QValueList<Q_UINT32> &sernums ); + void setSelectedSernums( const TQValueList<Q_UINT32> &sernums ); + void setSelectedVisibleSernums( const TQValueList<Q_UINT32> &sernums ); KActionMenu* replyMenu() const { return mReplyActionMenu; } KAction* replyListAction() const { return mReplyListAction; } @@ -64,7 +64,7 @@ class MessageActions : public QObject { if ( !mCurrentMessage ) return; - const QString text = mMessageView ? mMessageView->copyText() : ""; + const TQString text = mMessageView ? mMessageView->copyText() : ""; KMCommand *command = new T( mParent, mCurrentMessage, text ); command->start(); } @@ -84,11 +84,11 @@ class MessageActions : public QObject void slotSetMsgStatusFlag(); private: - QWidget *mParent; + TQWidget *mParent; KActionCollection *mActionCollection; KMMessage* mCurrentMessage; - QValueList<Q_UINT32> mSelectedSernums; - QValueList<Q_UINT32> mVisibleSernums; + TQValueList<Q_UINT32> mSelectedSernums; + TQValueList<Q_UINT32> mVisibleSernums; KMReaderWin *mMessageView; KActionMenu *mReplyActionMenu; diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp index 2cf5b8138..8d9950738 100644 --- a/kmail/messagecomposer.cpp +++ b/kmail/messagecomposer.cpp @@ -74,10 +74,10 @@ #include <kinputdialog.h> #include <kdebug.h> #include <kaction.h> -#include <qfile.h> -#include <qtextcodec.h> -#include <qtextedit.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqtextcodec.h> +#include <tqtextedit.h> +#include <tqtimer.h> #include <gpgmepp/key.h> #include <gpgmepp/keylistresult.h> @@ -218,11 +218,11 @@ static inline int signingChainCertNearExpiryWarningThresholdInDays() { "Encrypt whenever possible" (aka opportunistic encryption). */ -static QString mErrorProcessingStructuringInfo = +static TQString mErrorProcessingStructuringInfo = i18n("<qt><p>Structuring information returned by the Crypto plug-in " "could not be processed correctly; the plug-in might be damaged.</p>" "<p>Please contact your system administrator.</p></qt>"); -static QString mErrorNoCryptPlugAndNoBuildIn = +static TQString mErrorNoCryptPlugAndNoBuildIn = i18n("<p>No active Crypto Plug-In was found and the built-in OpenPGP code " "did not run successfully.</p>" "<p>You can do two things to change this:</p>" @@ -287,7 +287,7 @@ public: }; MessageComposer::MessageComposer( KMComposeWin* win, const char* name ) - : QObject( win, name ), mComposeWin( win ), mCurrentJob( 0 ), + : TQObject( win, name ), mComposeWin( win ), mCurrentJob( 0 ), mReferenceMessage( 0 ), mKeyResolver( 0 ), mUseOpportunisticEncryption( false ), mSignBody( false ), mEncryptBody( false ), @@ -319,7 +319,7 @@ void MessageComposer::applyChanges( bool disableCrypto ) { // Do the initial setup if( getenv("KMAIL_DEBUG_COMPOSER_CRYPTO") != 0 ) { - QCString cE = getenv("KMAIL_DEBUG_COMPOSER_CRYPTO"); + TQCString cE = getenv("KMAIL_DEBUG_COMPOSER_CRYPTO"); mDebugComposerCrypto = cE == "1" || cE.upper() == "ON" || cE.upper() == "TRUE"; kdDebug(5006) << "KMAIL_DEBUG_COMPOSER_CRYPTO = TRUE" << endl; } else { @@ -372,13 +372,13 @@ void MessageComposer::doNextJob() } // We have more jobs to do, but allow others to come first - QTimer::singleShot( 0, this, SLOT( slotDoNextJob() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoNextJob() ) ); } void MessageComposer::emitDone( bool b ) { // Save memory - before sending the mail - mEncodedBody = QByteArray(); + mEncodedBody = TQByteArray(); delete mNewBodyPart; mNewBodyPart = 0; mOldBodyPart.clear(); emit done( b ); @@ -437,7 +437,7 @@ void MessageComposer::readFromComposeWin() mAllowedCryptoMessageFormats = mComposeWin->cryptoMessageFormat(); if( mAutoCharset ) { - QCString charset = KMMsgBase::autoDetectCharset( mCharset, KMMessage::preferredCharsets(), mComposeWin->mEditor->text() ); + TQCString charset = KMMsgBase::autoDetectCharset( mCharset, KMMessage::preferredCharsets(), mComposeWin->mEditor->text() ); if( charset.isEmpty() ) { KMessageBox::sorry( mComposeWin, @@ -474,9 +474,9 @@ void MessageComposer::readFromComposeWin() if (id.isDefault()) mReferenceMessage->removeHeaderField("X-KMail-Identity"); - else mReferenceMessage->setHeaderField("X-KMail-Identity", QString::number( id.uoid() )); + else mReferenceMessage->setHeaderField("X-KMail-Identity", TQString::number( id.uoid() )); - QString replyAddr; + TQString replyAddr; if (!mComposeWin->replyTo().isEmpty()) replyAddr = mComposeWin->replyTo(); else replyAddr = mComposeWin->from(); @@ -495,7 +495,7 @@ void MessageComposer::readFromComposeWin() int num = GlobalSettings::self()->custHeaderCount(); for(int ix=0; ix<num; ix++) { - CustomMimeHeader customMimeHeader( QString::number(ix) ); + CustomMimeHeader customMimeHeader( TQString::number(ix) ); customMimeHeader.readConfig(); mReferenceMessage->setHeaderField( KMMsgBase::toUsAscii( customMimeHeader.custHeaderName() ), @@ -530,8 +530,8 @@ void MessageComposer::readFromComposeWin() mLineBreakColumn = mComposeWin->mEditor->lineBreakColumn(); } -static QCString escape_quoted_string( const QCString & str ) { - QCString result; +static TQCString escape_quoted_string( const TQCString & str ) { + TQCString result; const unsigned int str_len = str.length(); result.resize( 2*str_len + 1 ); char * d = result.data(); @@ -548,12 +548,12 @@ static QCString escape_quoted_string( const QCString & str ) { } bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol * chiasmus, - const QByteArray& body, - QByteArray& resultData ) + const TQByteArray& body, + TQByteArray& resultData ) { - std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", QMap<QString,QVariant>() ) ); + std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", TQMap<TQString,TQVariant>() ) ); if ( !job.get() ) { - const QString msg = i18n( "Chiasmus backend does not offer the " + const TQString msg = i18n( "Chiasmus backend does not offer the " "\"x-encrypt\" function. Please report this bug." ); KMessageBox::error( mComposeWin, msg, i18n( "Chiasmus Backend Error" ) ); return false; @@ -561,7 +561,7 @@ bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol * if ( !job->setProperty( "key", GlobalSettings::chiasmusKey() ) || !job->setProperty( "options", GlobalSettings::chiasmusOptions() ) || !job->setProperty( "input", body ) ) { - const QString msg = i18n( "The \"x-encrypt\" function does not accept " + const TQString msg = i18n( "The \"x-encrypt\" function does not accept " "the expected parameters. Please report this bug." ); KMessageBox::error( mComposeWin, msg, i18n( "Chiasmus Backend Error" ) ); return false; @@ -572,9 +572,9 @@ bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol * job->showErrorDialog( mComposeWin, i18n( "Chiasmus Encryption Error" ) ); return false; } - const QVariant result = job->property( "result" ); - if ( result.type() != QVariant::ByteArray ) { - const QString msg = i18n( "Unexpected return value from Chiasmus backend: " + const TQVariant result = job->property( "result" ); + if ( result.type() != TQVariant::ByteArray ) { + const TQString msg = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-encrypt\" function did not return a " "byte array. Please report this bug." ); KMessageBox::error( mComposeWin, msg, i18n( "Chiasmus Backend Error" ) ); @@ -595,30 +595,30 @@ void MessageComposer::chiasmusEncryptAllAttachments() { assert( chiasmus ); // kmcomposewin code should have made sure - for ( QValueVector<Attachment>::iterator it = mAttachments.begin(), end = mAttachments.end() ; it != end ; ++it ) { + for ( TQValueVector<Attachment>::iterator it = mAttachments.begin(), end = mAttachments.end() ; it != end ; ++it ) { KMMessagePart * part = it->part; - const QString filename = part->fileName(); + const TQString filename = part->fileName(); if ( filename.endsWith( ".xia", false ) ) continue; // already encrypted - const QByteArray body = part->bodyDecodedBinary(); - QByteArray resultData; + const TQByteArray body = part->bodyDecodedBinary(); + TQByteArray resultData; if ( !encryptWithChiasmus( chiasmus, body, resultData ) ) { mRc = false; return; } // everything ok, so let's fill in the part again: - QValueList<int> dummy; + TQValueList<int> dummy; part->setBodyAndGuessCte( resultData, dummy ); part->setTypeStr( "application" ); part->setSubtypeStr( "vnd.de.bund.bsi.chiasmus" ); part->setName( filename + ".xia" ); // this is taken from kmmsgpartdlg.cpp: - QCString encoding = KMMsgBase::autoDetectCharset( part->charset(), KMMessage::preferredCharsets(), filename ); + TQCString encoding = KMMsgBase::autoDetectCharset( part->charset(), KMMessage::preferredCharsets(), filename ); if ( encoding.isEmpty() ) encoding = "utf-8"; - const QCString enc_name = KMMsgBase::encodeRFC2231String( filename + ".xia", encoding ); - const QCString cDisp = "attachment;\n\tfilename" - + ( QString( enc_name ) != filename + ".xia" + const TQCString enc_name = KMMsgBase::encodeRFC2231String( filename + ".xia", encoding ); + const TQCString cDisp = "attachment;\n\tfilename" + + ( TQString( enc_name ) != filename + ".xia" ? "*=" + enc_name : "=\"" + escape_quoted_string( enc_name ) + '\"' ); part->setContentDisposition( cDisp ); @@ -683,7 +683,7 @@ void MessageComposer::adjustCryptFlags() const KPIM::Identity & id = kmkernel->identityManager()->identityForUoidOrDefault( mIdentityUid ); - QStringList encryptToSelfKeys; + TQStringList encryptToSelfKeys; if ( !id.pgpEncryptionKey().isEmpty() ) encryptToSelfKeys.push_back( id.pgpEncryptionKey() ); if ( !id.smimeEncryptionKey().isEmpty() ) @@ -693,7 +693,7 @@ void MessageComposer::adjustCryptFlags() return; } - QStringList signKeys; + TQStringList signKeys; if ( !id.pgpSigningKey().isEmpty() ) signKeys.push_back( mPGPSigningKey = id.pgpSigningKey() ); if ( !id.smimeSigningKey().isEmpty() ) @@ -757,7 +757,7 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) { { // the user wants to be asked or has to be asked const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = i18n("Examination of the recipient's signing preferences " + const TQString msg = i18n("Examination of the recipient's signing preferences " "yielded that you be asked whether or not to sign " "this message.\n" "Sign this message?"); @@ -781,7 +781,7 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) { { // warn the user that there are conflicting signing preferences const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = i18n("There are conflicting signing preferences " + const TQString msg = i18n("There are conflicting signing preferences " "for these recipients.\n" "Sign this message?"); switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg, @@ -803,7 +803,7 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) { case Kleo::Impossible: { const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = i18n("You have requested to sign this message, " + const TQString msg = i18n("You have requested to sign this message, " "but no valid signing keys have been configured " "for this identity."); if ( KMessageBox::warningContinueCancel( mComposeWin, msg, @@ -822,14 +822,14 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) { if ( !sign || !doSignCompletely ) { if ( warnSendUnsigned() ) { const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = sign && !doSignCompletely + const TQString msg = sign && !doSignCompletely ? i18n("Some parts of this message will not be signed.\n" "Sending only partially signed messages might violate site policy.\n" "Sign all parts instead?") // oh, I hate this... : i18n("This message will not be signed.\n" "Sending unsigned message might violate site policy.\n" "Sign message instead?") ; // oh, I hate this... - const QString buttonText = sign && !doSignCompletely + const TQString buttonText = sign && !doSignCompletely ? i18n("&Sign All Parts") : i18n("&Sign") ; switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg, i18n("Unsigned-Message Warning"), @@ -871,7 +871,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) { { // the user wants to be asked or has to be asked const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = opportunistic + const TQString msg = opportunistic ? i18n("Valid trusted encryption keys were found for all recipients.\n" "Encrypt this message?") : i18n("Examination of the recipient's encryption preferences " @@ -902,7 +902,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) { { // warn the user that there are conflicting encryption preferences const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = i18n("There are conflicting encryption preferences " + const TQString msg = i18n("There are conflicting encryption preferences " "for these recipients.\n" "Encrypt this message?"); switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg, @@ -924,7 +924,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) { case Kleo::Impossible: { const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = i18n("You have requested to encrypt this message, " + const TQString msg = i18n("You have requested to encrypt this message, " "and to encrypt a copy to yourself, " "but no valid trusted encryption keys have been " "configured for this identity."); @@ -944,7 +944,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) { if ( !encrypt || !doEncryptCompletely ) { if ( warnSendUnencrypted() ) { const KCursorSaver idle( KBusyPtr::idle() ); - const QString msg = !doEncryptCompletely + const TQString msg = !doEncryptCompletely ? i18n("Some parts of this message will not be encrypted.\n" "Sending only partially encrypted messages might violate site policy " "and/or leak sensitive information.\n" @@ -953,7 +953,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) { "Sending unencrypted messages might violate site policy and/or " "leak sensitive information.\n" "Encrypt messages instead?") ; // oh, I hate this... - const QString buttonText = !doEncryptCompletely + const TQString buttonText = !doEncryptCompletely ? i18n("&Encrypt All Parts") : i18n("&Encrypt") ; switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg, i18n("Unencrypted Message Warning"), @@ -978,13 +978,13 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) { void MessageComposer::markAllAttachmentsForSigning( bool sign ) { mSignBody = sign; - for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) + for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) it->sign = sign; } void MessageComposer::markAllAttachmentsForEncryption( bool enc ) { mEncryptBody = enc; - for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) + for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) it->encrypt = enc; } @@ -1145,7 +1145,7 @@ static inline GpgME::Context::SignatureMode signingMode( Kleo::CryptoMessageForm class EncryptMessageJob : public MessageComposerJob { public: EncryptMessageJob( KMMessage* msg, const Kleo::KeyResolver::SplitInfo & si, - bool doSign, bool doEncrypt, const QByteArray& encodedBody, + bool doSign, bool doEncrypt, const TQByteArray& encodedBody, int boundaryLevel, /*const KMMessagePart& oldBodyPart,*/ KMMessagePart* newBodyPart, Kleo::CryptoMessageFormat format, MessageComposer* composer ) @@ -1173,7 +1173,7 @@ private: KMMessage* mMsg; Kleo::KeyResolver::SplitInfo mSplitInfo; bool mDoSign, mDoEncrypt; - QByteArray mEncodedBody; + TQByteArray mEncodedBody; int mBoundaryLevel; //KMMessagePart mOldBodyPart; KMMessagePart* mNewBodyPart; @@ -1196,7 +1196,7 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage, bool doSign, bool doEncrypt ) { // preprocess the body text - const QByteArray bodyData = mText; + const TQByteArray bodyData = mText; if (bodyData.isNull()) { mRc = false; return; @@ -1208,7 +1208,7 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage, // set the main headers theMessage.deleteBodyParts(); - QString oldContentType = theMessage.headerField( "Content-Type" ); + TQString oldContentType = theMessage.headerField( "Content-Type" ); theMessage.removeHeaderField("Content-Type"); theMessage.removeHeaderField("Content-Transfer-Encoding"); @@ -1223,7 +1223,7 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage, KMMessage* msg = new KMMessage( theMessage ); if ( doEncrypt ) { Kpgp::Result result; - QByteArray encryptedBody; + TQByteArray encryptedBody; if ( doSign ) { // Sign and encrypt const std::vector<GpgME::Key> signingKeys = mKeyResolver->signingKeys( Kleo::InlineOpenPGPFormat ); result = pgpSignedAndEncryptedMsg( encryptedBody, bodyData, signingKeys, @@ -1278,7 +1278,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt assert( chiasmus ); // kmcomposewin code should have made sure // preprocess the body text - const QByteArray bodyData = mText; + const TQByteArray bodyData = mText; if (bodyData.isNull()) { mRc = false; return; @@ -1290,7 +1290,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt // set the main headers theMessage.deleteBodyParts(); - QString oldContentType = theMessage.headerField( "Content-Type" ); + TQString oldContentType = theMessage.headerField( "Content-Type" ); theMessage.removeHeaderField("Content-Type"); theMessage.removeHeaderField("Content-Transfer-Encoding"); @@ -1303,7 +1303,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt { const Kleo::KeyResolver::SplitInfo& splitInfo = *it; KMMessage* msg = new KMMessage( theMessage ); - QByteArray encryptedBody; + TQByteArray encryptedBody; if ( !encryptWithChiasmus( chiasmus, bodyData, encryptedBody ) ) { mRc = false; @@ -1314,7 +1314,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt //mOldBodyPart.setBodyEncodedBinary( encryptedBody ); bool doSign = false; - QValueList<int> allowedCTEs; + TQValueList<int> allowedCTEs; mOldBodyPart.setBodyAndGuessCte( encryptedBody, allowedCTEs, !kmkernel->msgSender()->sendQuotedPrintable() && !doSign, doSign ); @@ -1326,7 +1326,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt // Used in case of attachments mOldBodyPart.setTypeStr( "application" ); mOldBodyPart.setSubtypeStr( "vnd.de.bund.bsi.chiasmus-text" ); - mOldBodyPart.setAdditionalCTypeParamStr( QCString( "chiasmus-charset=" + mCharset ) ); + mOldBodyPart.setAdditionalCTypeParamStr( TQCString( "chiasmus-charset=" + mCharset ) ); addBodyAndAttachments( msg, splitInfo, false, false, mOldBodyPart, Kleo::InlineOpenPGPFormat ); mMessageList.push_back( msg ); @@ -1362,14 +1362,14 @@ void MessageComposer::composeMessage( KMMessage& theMessage, theMessage.setBody( "This message is in MIME format." ); // preprocess the body text - QByteArray bodyData = mText; + TQByteArray bodyData = mText; if (bodyData.isNull()) { mRc = false; return; } // set the main headers - QString oldContentType = theMessage.headerField( "Content-Type" ); + TQString oldContentType = theMessage.headerField( "Content-Type" ); theMessage.deleteBodyParts(); theMessage.removeHeaderField("Content-Type"); theMessage.removeHeaderField("Content-Transfer-Encoding"); @@ -1394,7 +1394,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, // test whether there ARE attachments that can be included into the body if( mEarlyAddAttachments ) { bool someOk = false; - for ( QValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { + for ( TQValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { if ( it->encrypt == doEncryptBody && it->sign == doSignBody ) someOk = true; else @@ -1427,18 +1427,18 @@ void MessageComposer::composeMessage( KMMessage& theMessage, if ( mIsRichText ) { // create a multipart body // calculate a boundary string - QCString boundaryCStr; // storing boundary string data - QCString newbody; + TQCString boundaryCStr; // storing boundary string data + TQCString newbody; DwMediaType tmpCT; tmpCT.CreateBoundary( ++mPreviousBoundaryLevel ); boundaryCStr = KMail::Util::CString( tmpCT.Boundary() ); - QValueList<int> allowedCTEs; + TQValueList<int> allowedCTEs; KMMessagePart textBodyPart; textBodyPart.setTypeStr("text"); textBodyPart.setSubtypeStr("plain"); - QCString textbody = plainTextFromMarkup( mText /* converted to QString */ ); + TQCString textbody = plainTextFromMarkup( mText /* converted to TQString */ ); // the signed body must not be 8bit encoded textBodyPart.setBodyAndGuessCte( textbody, allowedCTEs, @@ -1458,7 +1458,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, KMMessagePart htmlBodyPart; htmlBodyPart.setTypeStr("text"); htmlBodyPart.setSubtypeStr("html"); - QByteArray htmlbody = mText; + TQByteArray htmlbody = mText; // the signed body must not be 8bit encoded htmlBodyPart.setBodyAndGuessCte( htmlbody, allowedCTEs, !kmkernel->msgSender()->sendQuotedPrintable() && !doSign, @@ -1484,7 +1484,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, } // Prepare attachments that will be signed/encrypted - for ( QValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { + for ( TQValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { // signed/encrypted body parts must be either QP or base64 encoded // Why not 7 bit? Because the LF->CRLF canonicalization would render // e.g. 7 bit encoded shell scripts unusable because of the CRs. @@ -1493,12 +1493,12 @@ void MessageComposer::composeMessage( KMMessage& theMessage, // respect the CRLF->LF de-canonicalisation. We should // eventually get rid of this: if( it->sign || it->encrypt ) { - QCString cte = it->part->cteStr().lower(); + TQCString cte = it->part->cteStr().lower(); if( ( "8bit" == cte && it->part->type() != DwMime::kTypeMessage ) || ( ( it->part->type() == DwMime::kTypeText ) && ( "7bit" == cte ) ) ) { - const QByteArray body = it->part->bodyDecodedBinary(); - QValueList<int> dummy; + const TQByteArray body = it->part->bodyDecodedBinary(); + TQValueList<int> dummy; it->part->setBodyAndGuessCte(body, dummy, false, it->sign); kdDebug(5006) << "Changed encoding of message part from " << cte << " to " << it->part->cteStr() << endl; @@ -1517,7 +1517,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, innerBodyPart.setOriginalContentTypeStr( oldContentType.utf8() ); } innerBodyPart.setContentDisposition( "inline" ); - QValueList<int> allowedCTEs; + TQValueList<int> allowedCTEs; // the signed body must not be 8bit encoded innerBodyPart.setBodyAndGuessCte( bodyData, allowedCTEs, !kmkernel->msgSender()->sendQuotedPrintable() && !doSign, @@ -1527,11 +1527,11 @@ void MessageComposer::composeMessage( KMMessage& theMessage, innerBodyPart.setBodyEncodedBinary( bodyData ); // do we need this, since setBodyAndGuessCte does this already? DwBodyPart* innerDwPart = theMessage.createDWBodyPart( &innerBodyPart ); innerDwPart->Assemble(); - QByteArray tmpbody = KMail::Util::ByteArray( innerDwPart->AsString() ); + TQByteArray tmpbody = KMail::Util::ByteArray( innerDwPart->AsString() ); if ( mIsRichText ) { // and add our mp/a boundary int boundPos = tmpbody.find( '\n' ); if( -1 < boundPos ) { - QCString bStr( ";\n boundary=\"" ); + TQCString bStr( ";\n boundary=\"" ); bStr += mSaveBoundary.c_str(); bStr += "\""; bodyData = tmpbody; @@ -1547,19 +1547,19 @@ void MessageComposer::composeMessage( KMMessage& theMessage, innerDwPart = 0; // add all matching Attachments // NOTE: This code will be changed when KMime is complete. - for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { + for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { if ( it->encrypt == doEncryptBody && it->sign == doSignBody ) { innerDwPart = theMessage.createDWBodyPart( it->part ); innerDwPart->Assemble(); - KMail::Util::append( bodyData, QCString( "\n--" + mMultipartMixedBoundary + "\n" ) ); + KMail::Util::append( bodyData, TQCString( "\n--" + mMultipartMixedBoundary + "\n" ) ); KMail::Util::append( bodyData, innerDwPart->AsString().c_str() ); delete innerDwPart; innerDwPart = 0; } } - KMail::Util::append( bodyData, QCString( "\n--" + mMultipartMixedBoundary + "--\n" ) ); + KMail::Util::append( bodyData, TQCString( "\n--" + mMultipartMixedBoundary + "--\n" ) ); } else { // !earlyAddAttachments - QValueList<int> allowedCTEs; + TQValueList<int> allowedCTEs; // the signed body must not be 8bit encoded mOldBodyPart.setBodyAndGuessCte(bodyData, allowedCTEs, !kmkernel->msgSender()->sendQuotedPrintable() && !doSign, doSign); @@ -1595,7 +1595,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, int boundPos = mEncodedBody.find( '\n' ); if( -1 < boundPos ) { // insert new "boundary" parameter - QCString bStr( ";\n boundary=\"" ); + TQCString bStr( ";\n boundary=\"" ); bStr += mMultipartMixedBoundary; bStr += "\""; KMail::Util::insert( mEncodedBody, boundPos, bStr.data() ); @@ -1618,7 +1618,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, mRc = false; return; } - mRc = processStructuringInfo( QString::null, + mRc = processStructuringInfo( TQString::null, mOldBodyPart.contentDescription(), mOldBodyPart.typeStr(), mOldBodyPart.subtypeStr(), @@ -1689,7 +1689,7 @@ void MessageComposer::encryptMessage( KMMessage* msg, const bool doSignBody = doSign && mSignBody; if ( doEncryptBody ) { - QByteArray innerContent; + TQByteArray innerContent; if ( doSignBody ) { // extract signed body from newBodyPart DwBodyPart* dwPart = msg->createDWBodyPart( &newBodyPart ); @@ -1708,7 +1708,7 @@ void MessageComposer::encryptMessage( KMMessage* msg, innerContent = KMail::Util::lf2crlf( innerContent ); //kdDebug(5006) << " done." << endl; - QByteArray encryptedBody; + TQByteArray encryptedBody; Kpgp::Result result = pgpEncryptedMsg( encryptedBody, innerContent, splitInfo.keys, format ); if ( result != Kpgp::Ok ) { @@ -1769,7 +1769,7 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg, // add Attachments // create additional bodyparts for the attachments (if any) KMMessagePart newAttachPart; - for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { + for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) { const bool cryptFlagsDifferent = ( it->encrypt != doEncryptBody || it->sign != doSignBody ) ; @@ -1790,7 +1790,7 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg, DwBodyPart* innerDwPart = msg->createDWBodyPart( it->part ); innerDwPart->Assemble(); - QByteArray encodedAttachment = KMail::Util::ByteArray( innerDwPart->AsString() ); + TQByteArray encodedAttachment = KMail::Util::ByteArray( innerDwPart->AsString() ); delete innerDwPart; innerDwPart = 0; @@ -1831,7 +1831,7 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg, } } if( encryptThisNow ) { - QByteArray encryptedBody; + TQByteArray encryptedBody; Kpgp::Result result = pgpEncryptedMsg( encryptedBody, encodedAttachment, splitInfo.keys, @@ -1862,11 +1862,11 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg, msg->headers().ContentType().Parse(); kdDebug(5006) << "MessageComposer::addBodyAndAttachments() : set top level Content-Type from originalContentTypeStr()=" << ourFineBodyPart.originalContentTypeStr() << endl; } else { - QCString ct = ourFineBodyPart.typeStr() + "/" + ourFineBodyPart.subtypeStr(); + TQCString ct = ourFineBodyPart.typeStr() + "/" + ourFineBodyPart.subtypeStr(); if ( ct == "multipart/mixed" ) ct += ";\n\tboundary=\"" + mMultipartMixedBoundary + '"'; else if ( ct == "multipart/alternative" ) - ct += ";\n\tboundary=\"" + QCString(mSaveBoundary.c_str()) + '"'; + ct += ";\n\tboundary=\"" + TQCString(mSaveBoundary.c_str()) + '"'; msg->headers().ContentType().FromString( ct ); msg->headers().ContentType().Parse(); kdDebug(5006) << "MessageComposer::addBodyAndAttachments() : set top level Content-Type to " << ct << endl; @@ -1900,23 +1900,23 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg, //----------------------------------------------------------------------------- // This method does not call any crypto ops, so it does not need to be async -bool MessageComposer::processStructuringInfo( const QString bugURL, - const QString contentDescClear, - const QCString contentTypeClear, - const QCString contentSubtypeClear, - const QCString contentDispClear, - const QCString contentTEncClear, - const QByteArray& clearCStr, - const QString /*contentDescCiph*/, - const QByteArray& ciphertext, +bool MessageComposer::processStructuringInfo( const TQString bugURL, + const TQString contentDescClear, + const TQCString contentTypeClear, + const TQCString contentSubtypeClear, + const TQCString contentDispClear, + const TQCString contentTEncClear, + const TQByteArray& clearCStr, + const TQString /*contentDescCiph*/, + const TQByteArray& ciphertext, KMMessagePart& resultingPart, bool signing, Kleo::CryptoMessageFormat format ) { - assert( clearCStr.isEmpty() || clearCStr[clearCStr.size()-1] != '\0' ); // I was called with a QCString !? + assert( clearCStr.isEmpty() || clearCStr[clearCStr.size()-1] != '\0' ); // I was called with a TQCString !? bool bOk = true; if ( makeMimeObject( format, signing ) ) { - QCString mainHeader = "Content-Type: "; + TQCString mainHeader = "Content-Type: "; const char * toplevelCT = toplevelContentType( format, signing ); if ( toplevelCT ) mainHeader += toplevelCT; @@ -1927,7 +1927,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL, mainHeader += contentTypeClear + '/' + contentSubtypeClear; } - const QCString boundaryCStr = KMime::multiPartBoundary(); + const TQCString boundaryCStr = KMime::multiPartBoundary(); // add "boundary" parameter if ( makeMultiMime( format, signing ) ) mainHeader.replace( "%boundary", boundaryCStr ); @@ -1960,7 +1960,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL, KMMessage::bodyPart( &mainDwPa, &resultingPart ); if( !makeMultiMime( format, signing ) ) { if ( signing && includeCleartextWhenSigning( format ) ) { - QByteArray bodyText( clearCStr ); + TQByteArray bodyText( clearCStr ); KMail::Util::append( bodyText, "\n" ); KMail::Util::append( bodyText, ciphertext ); resultingPart.setBodyEncodedBinary( bodyText ); @@ -1972,7 +1972,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL, // Build a MIME part holding the version information // taking the body contents returned in // structuring.data.bodyTextVersion. - QCString versCStr, codeCStr; + TQCString versCStr, codeCStr; if ( !signing && format == Kleo::OpenPGPMIMEFormat ) versCStr = "Content-Type: application/pgp-encrypted\n" @@ -1996,10 +1996,10 @@ bool MessageComposer::processStructuringInfo( const QString bugURL, codeCStr += "Content-Transfer-Encoding: base64\n\n"; codeCStr += KMime::Codec::codecForName( "base64" )->encodeToQCString( ciphertext ); } else - codeCStr += '\n' + QCString( ciphertext.data(), ciphertext.size() + 1 ); + codeCStr += '\n' + TQCString( ciphertext.data(), ciphertext.size() + 1 ); - QByteArray mainStr; + TQByteArray mainStr; KMail::Util::append( mainStr, "--" ); KMail::Util::append( mainStr, boundaryCStr ); if ( signing && includeCleartextWhenSigning( format ) && @@ -2026,7 +2026,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL, resultingPart.setSubtypeStr( contentSubtypeClear ); resultingPart.setContentDisposition( contentDispClear ); resultingPart.setContentTransferEncodingStr( contentTEncClear ); - QByteArray resultingBody; + TQByteArray resultingBody; if ( signing && includeCleartextWhenSigning( format ) ) { if( !clearCStr.isEmpty() ) @@ -2050,18 +2050,18 @@ bool MessageComposer::processStructuringInfo( const QString bugURL, } //----------------------------------------------------------------------------- -QCString MessageComposer::plainTextFromMarkup( const QString& markupText ) +TQCString MessageComposer::plainTextFromMarkup( const TQString& markupText ) { - QTextEdit *hackConspiratorTextEdit = new QTextEdit( markupText ); + TQTextEdit *hackConspiratorTextEdit = new TQTextEdit( markupText ); hackConspiratorTextEdit->setTextFormat(Qt::PlainText); if ( !mDisableBreaking ) { - hackConspiratorTextEdit->setWordWrap( QTextEdit::FixedColumnWidth ); + hackConspiratorTextEdit->setWordWrap( TQTextEdit::FixedColumnWidth ); hackConspiratorTextEdit->setWrapColumnOrWidth( mLineBreakColumn ); } - QString text = hackConspiratorTextEdit->text(); - QCString textbody; + TQString text = hackConspiratorTextEdit->text(); + TQCString textbody; - const QTextCodec *codec = KMMsgBase::codecForName( mCharset ); + const TQTextCodec *codec = KMMsgBase::codecForName( mCharset ); if( mCharset == "us-ascii" ) { textbody = KMMsgBase::toUsAscii( text ); } else if( codec == 0 ) { @@ -2078,10 +2078,10 @@ QCString MessageComposer::plainTextFromMarkup( const QString& markupText ) } //----------------------------------------------------------------------------- -QByteArray MessageComposer::breakLinesAndApplyCodec() +TQByteArray MessageComposer::breakLinesAndApplyCodec() { - QString text; - QCString cText; + TQString text; + TQCString cText; if( mDisableBreaking || mIsRichText || !GlobalSettings::self()->wordWrap() ) text = mComposeWin->mEditor->text(); @@ -2089,16 +2089,16 @@ QByteArray MessageComposer::breakLinesAndApplyCodec() text = mComposeWin->mEditor->brokenText(); text.truncate( text.length() ); // to ensure text.size()==text.length()+1 - QString newText; - const QTextCodec *codec = KMMsgBase::codecForName( mCharset ); + TQString newText; + const TQTextCodec *codec = KMMsgBase::codecForName( mCharset ); if( mCharset == "us-ascii" ) { cText = KMMsgBase::toUsAscii( text ); - newText = QString::fromLatin1( cText ); + newText = TQString::fromLatin1( cText ); } else if( codec == 0 ) { kdDebug(5006) << "Something is wrong and I can not get a codec." << endl; cText = text.local8Bit(); - newText = QString::fromLocal8Bit( cText ); + newText = TQString::fromLocal8Bit( cText ); } else { cText = codec->fromUnicode( text ); newText = codec->toUnicode( cText ); @@ -2106,7 +2106,7 @@ QByteArray MessageComposer::breakLinesAndApplyCodec() if (cText.isNull()) cText = ""; if( !text.isEmpty() && (newText != text) ) { - QString oldText = mComposeWin->mEditor->text(); + TQString oldText = mComposeWin->mEditor->text(); mComposeWin->mEditor->setText( newText ); KCursorSaver idle( KBusyPtr::idle() ); bool anyway = ( KMessageBox::warningYesNo( mComposeWin, @@ -2116,7 +2116,7 @@ QByteArray MessageComposer::breakLinesAndApplyCodec() i18n("Lose Characters"), i18n("Change Encoding") ) == KMessageBox::Yes ); if( !anyway ) { mComposeWin->mEditor->setText(oldText); - return QByteArray(); + return TQByteArray(); } } @@ -2140,10 +2140,10 @@ QByteArray MessageComposer::breakLinesAndApplyCodec() //----------------------------------------------------------------------------- -void MessageComposer::pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessageFormat format ) { +void MessageComposer::pgpSignedMsg( const TQByteArray& cText, Kleo::CryptoMessageFormat format ) { - assert( cText.isEmpty() || cText[cText.size()-1] != '\0' ); // I was called with a QCString !? - mSignature = QByteArray(); + assert( cText.isEmpty() || cText[cText.size()-1] != '\0' ); // I was called with a TQCString !? + mSignature = TQByteArray(); const std::vector<GpgME::Key> signingKeys = mKeyResolver->signingKeys( format ); @@ -2168,7 +2168,7 @@ void MessageComposer::pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessage return; } - QByteArray signature; + TQByteArray signature; const GpgME::SigningResult res = job->exec( signingKeys, cText, signingMode( format ), signature ); if ( res.error().isCanceled() ) { @@ -2194,8 +2194,8 @@ void MessageComposer::pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessage } //----------------------------------------------------------------------------- -Kpgp::Result MessageComposer::pgpEncryptedMsg( QByteArray & encryptedBody, - const QByteArray& cText, +Kpgp::Result MessageComposer::pgpEncryptedMsg( TQByteArray & encryptedBody, + const TQByteArray& cText, const std::vector<GpgME::Key> & encryptionKeys, Kleo::CryptoMessageFormat format ) { @@ -2235,8 +2235,8 @@ Kpgp::Result MessageComposer::pgpEncryptedMsg( QByteArray & encryptedBody, return Kpgp::Ok; } -Kpgp::Result MessageComposer::pgpSignedAndEncryptedMsg( QByteArray & encryptedBody, - const QByteArray& cText, +Kpgp::Result MessageComposer::pgpSignedAndEncryptedMsg( TQByteArray & encryptedBody, + const TQByteArray& cText, const std::vector<GpgME::Key> & signingKeys, const std::vector<GpgME::Key> & encryptionKeys, Kleo::CryptoMessageFormat format ) diff --git a/kmail/messagecomposer.h b/kmail/messagecomposer.h index 7d908bfac..2284b04a8 100644 --- a/kmail/messagecomposer.h +++ b/kmail/messagecomposer.h @@ -34,8 +34,8 @@ #include "kmmsgpart.h" #include "keyresolver.h" -#include <qobject.h> -#include <qvaluevector.h> +#include <tqobject.h> +#include <tqvaluevector.h> #include <mimelib/mediatyp.h> #include <kleo/cryptobackend.h> @@ -62,7 +62,7 @@ namespace KPIM { class Identity; } -class MessageComposer : public QObject { +class MessageComposer : public TQObject { Q_OBJECT friend class ::MessageComposerJob; friend class ::EncryptMessageJob; @@ -83,11 +83,11 @@ public: */ void applyChanges( bool disableCrypto ); - QString originalBCC() const { return mBcc; } + TQString originalBCC() const { return mBcc; } void setDisableBreaking( bool b ) { mDisableBreaking = b; } - const QValueVector<KMMessage*> & composedMessageList() const { + const TQValueVector<KMMessage*> & composedMessageList() const { return mMessageList; } @@ -101,8 +101,8 @@ private: void adjustCryptFlags(); bool encryptWithChiasmus( const Kleo::CryptoBackend::Protocol * chiasmus, - const QByteArray& body, - QByteArray& resultData ); + const TQByteArray& body, + TQByteArray& resultData ); void chiasmusEncryptAllAttachments(); void composeChiasmusMessage( KMMessage& theMessage, Kleo::CryptoMessageFormat format ); @@ -135,25 +135,25 @@ private: * Get message ready for sending or saving. * This must be done _before_ signing and/or encrypting it. */ - QByteArray breakLinesAndApplyCodec(); + TQByteArray breakLinesAndApplyCodec(); /** * Create a plain text version of a marked up mail for use as the plain * part in a multipart/alternative mail. */ - QCString plainTextFromMarkup( const QString& markupText ); + TQCString plainTextFromMarkup( const TQString& markupText ); /** * Get signature for a message (into mMessage). * To build nice S/MIME objects signing and encoding must be separated. */ - void pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessageFormat f ); + void pgpSignedMsg( const TQByteArray& cText, Kleo::CryptoMessageFormat f ); /** * Get encrypted message. * To build nice S/MIME objects signing and encrypting must be separate. */ - Kpgp::Result pgpEncryptedMsg( QByteArray& rEncryptedBody, - const QByteArray& cText, + Kpgp::Result pgpEncryptedMsg( TQByteArray& rEncryptedBody, + const TQByteArray& cText, const std::vector<GpgME::Key> & encryptionKeys, Kleo::CryptoMessageFormat f ); @@ -161,8 +161,8 @@ private: * Get signed & encrypted message. * To build nice S/MIME objects signing and encrypting must be separate. */ - Kpgp::Result pgpSignedAndEncryptedMsg( QByteArray& rEncryptedBody, - const QByteArray& cText, + Kpgp::Result pgpSignedAndEncryptedMsg( TQByteArray& rEncryptedBody, + const TQByteArray& cText, const std::vector<GpgME::Key> & signingKeys, const std::vector<GpgME::Key> & encryptionKeys, Kleo::CryptoMessageFormat f ); @@ -170,8 +170,8 @@ private: /** * Check for expiry of various certificates. */ - bool checkForEncryptCertificateExpiry( const QString& recipient, - const QCString& certFingerprint ); + bool checkForEncryptCertificateExpiry( const TQString& recipient, + const TQCString& certFingerprint ); /** * Build a MIME object (or a flat text resp.) based upon @@ -184,15 +184,15 @@ private: * This string *is* encoded according to contentTEncClear * and thus should be ready for being sent via SMTP. */ - bool processStructuringInfo( const QString bugURL, - const QString contentDescriptionClear, - const QCString contentTypeClear, - const QCString contentSubtypeClear, - const QCString contentDispClear, - const QCString contentTEncClear, - const QByteArray& bodytext, - const QString contentDescriptionCiph, - const QByteArray& ciphertext, + bool processStructuringInfo( const TQString bugURL, + const TQString contentDescriptionClear, + const TQCString contentTypeClear, + const TQCString contentSubtypeClear, + const TQCString contentDispClear, + const TQCString contentTEncClear, + const TQByteArray& bodytext, + const TQString contentDescriptionCiph, + const TQByteArray& ciphertext, KMMessagePart& resultingPart, bool signing, Kleo::CryptoMessageFormat format ); @@ -213,7 +213,7 @@ private: void doNextJob(); void emitDone( bool ok ); - int encryptionPossible( const QStringList & recipients, bool openPGP ); + int encryptionPossible( const TQStringList & recipients, bool openPGP ); bool determineWhetherToSign( bool doSignCompletely ); bool determineWhetherToEncrypt( bool doEncryptCompletely ); void markAllAttachmentsForSigning( bool sign ); @@ -222,11 +222,11 @@ private: KMComposeWin* mComposeWin; MessageComposerJob * mCurrentJob; KMMessage* mReferenceMessage; - QValueVector<KMMessage*> mMessageList; + TQValueVector<KMMessage*> mMessageList; Kleo::KeyResolver * mKeyResolver; - QCString mSignCertFingerprint; + TQCString mSignCertFingerprint; struct Attachment { Attachment( KMMessagePart * p=0, bool s=false, bool e=false ) @@ -235,9 +235,9 @@ private: bool sign; bool encrypt; }; - QValueVector<Attachment> mAttachments; + TQValueVector<Attachment> mAttachments; - QString mPGPSigningKey, mSMIMESigningKey; + TQString mPGPSigningKey, mSMIMESigningKey; bool mUseOpportunisticEncryption; bool mSignBody, mEncryptBody; bool mSigningRequested, mEncryptionRequested; @@ -245,33 +245,33 @@ private: unsigned int mAllowedCryptoMessageFormats; bool mDisableCrypto; bool mDisableBreaking; - QString mBcc; - QStringList mTo, mCc, mBccList; + TQString mBcc; + TQStringList mTo, mCc, mBccList; bool mDebugComposerCrypto; bool mAutoCharset; - QCString mCharset; + TQCString mCharset; bool mIsRichText; uint mIdentityUid; bool mRc; // Set this to false, if something fails during the processes bool mHoldJobs; // Don't run the next job yet - QByteArray mText; // textual representation of the message text, encoded + TQByteArray mText; // textual representation of the message text, encoded unsigned int mLineBreakColumn; // used for line breaking // These are the variables of the big composeMessage(X,Y,Z) message KMMessagePart* mNewBodyPart; - QByteArray mSignature; + TQByteArray mSignature; - QByteArray mEncodedBody; // Only needed if signing and/or encrypting + TQByteArray mEncodedBody; // Only needed if signing and/or encrypting bool mEarlyAddAttachments, mAllAttachmentsAreInBody; KMMessagePart mOldBodyPart; int mPreviousBoundaryLevel; // The boundary is saved for later addition into mp/a body DwString mSaveBoundary; - QCString mMultipartMixedBoundary; + TQCString mMultipartMixedBoundary; - QValueList<MessageComposerJob*> mJobs; + TQValueList<MessageComposerJob*> mJobs; bool mEncryptWithChiasmus; bool mPerformingSignOperation; }; diff --git a/kmail/messagecopyhelper.cpp b/kmail/messagecopyhelper.cpp index 2a36c53a7..e0a27fc35 100644 --- a/kmail/messagecopyhelper.cpp +++ b/kmail/messagecopyhelper.cpp @@ -26,18 +26,18 @@ using namespace KMail; using namespace KPIM; -MessageCopyHelper::MessageCopyHelper( const QValueList< Q_UINT32 > & msgs, - KMFolder * dest, bool move, QObject * parent ) : - QObject( parent ) +MessageCopyHelper::MessageCopyHelper( const TQValueList< Q_UINT32 > & msgs, + KMFolder * dest, bool move, TQObject * parent ) : + TQObject( parent ) { if ( msgs.isEmpty() || !dest ) return; KMFolder *f = 0; int index; - QPtrList<KMMsgBase> list; + TQPtrList<KMMsgBase> list; - for ( QValueList<Q_UINT32>::ConstIterator it = msgs.constBegin(); it != msgs.constEnd(); ++it ) { + for ( TQValueList<Q_UINT32>::ConstIterator it = msgs.constBegin(); it != msgs.constEnd(); ++it ) { KMMsgDict::instance()->getLocation( *it, &f, &index ); if ( !f ) // not found continue; @@ -62,7 +62,7 @@ MessageCopyHelper::MessageCopyHelper( const QValueList< Q_UINT32 > & msgs, command = new KMCopyCommand( dest, list ); } - connect( command, SIGNAL(completed(KMCommand*)), SLOT(copyCompleted(KMCommand*)) ); + connect( command, TQT_SIGNAL(completed(KMCommand*)), TQT_SLOT(copyCompleted(KMCommand*)) ); command->start(); } @@ -71,7 +71,7 @@ void MessageCopyHelper::copyCompleted(KMCommand * cmd) Q_UNUSED( cmd ); // close all folders we opened - for ( QMap<QGuardedPtr<KMFolder>, int>::ConstIterator it = mOpenFolders.constBegin(); + for ( TQMap<TQGuardedPtr<KMFolder>, int>::ConstIterator it = mOpenFolders.constBegin(); it != mOpenFolders.constEnd(); ++it ) { it.key()->close( "messagecopyhelper" ); } @@ -79,17 +79,17 @@ void MessageCopyHelper::copyCompleted(KMCommand * cmd) deleteLater(); } -QValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMailList(const KPIM::MailList & list) +TQValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMailList(const KPIM::MailList & list) { - QValueList<Q_UINT32> rv; + TQValueList<Q_UINT32> rv; for ( MailList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) rv.append( (*it).serialNumber() ); return rv; } -QValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMsgList(QPtrList< KMMsgBase > list) +TQValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMsgList(TQPtrList< KMMsgBase > list) { - QValueList<Q_UINT32> rv; + TQValueList<Q_UINT32> rv; KMMsgBase* msg = list.first(); while( msg ) { rv.append( msg->getMsgSerNum() ); @@ -98,11 +98,11 @@ QValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMsgList(QPtrList< KMMsgB return rv; } -bool MessageCopyHelper::inReadOnlyFolder(const QValueList< Q_UINT32 > & sernums) +bool MessageCopyHelper::inReadOnlyFolder(const TQValueList< Q_UINT32 > & sernums) { KMFolder *f = 0; int index; - for ( QValueList<Q_UINT32>::ConstIterator it = sernums.begin(); it != sernums.end(); ++it ) { + for ( TQValueList<Q_UINT32>::ConstIterator it = sernums.begin(); it != sernums.end(); ++it ) { KMMsgDict::instance()->getLocation( *it, &f, &index ); if ( !f ) // not found continue; diff --git a/kmail/messagecopyhelper.h b/kmail/messagecopyhelper.h index 2291fce9d..22a718dc6 100644 --- a/kmail/messagecopyhelper.h +++ b/kmail/messagecopyhelper.h @@ -20,9 +20,9 @@ #ifndef KMAIL_MESSAGECOPYHELPER_H #define KMAIL_MESSAGECOPYHELPER_H -#include <qguardedptr.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqptrlist.h> #include <maillistdrag.h> @@ -49,29 +49,29 @@ class MessageCopyHelper : public QObject @param move If set to true, messages will be moved instead of copied @param parent The parent object. */ - MessageCopyHelper( const QValueList<Q_UINT32> &msgs, KMFolder *dest, - bool move, QObject *parent = 0 ); + MessageCopyHelper( const TQValueList<Q_UINT32> &msgs, KMFolder *dest, + bool move, TQObject *parent = 0 ); /** Converts a MailList into a serial number list. */ - static QValueList<Q_UINT32> serNumListFromMailList( const KPIM::MailList &list ); + static TQValueList<Q_UINT32> serNumListFromMailList( const KPIM::MailList &list ); /** Converts a KMMsgsBase* list into a serial number list. */ - static QValueList<Q_UINT32> serNumListFromMsgList( QPtrList<KMMsgBase> list ); + static TQValueList<Q_UINT32> serNumListFromMsgList( TQPtrList<KMMsgBase> list ); /** Checks of any of the given messages comes from a read-only source. */ - static bool inReadOnlyFolder( const QValueList<Q_UINT32> &sernums ); + static bool inReadOnlyFolder( const TQValueList<Q_UINT32> &sernums ); private slots: void copyCompleted( KMCommand *cmd ); private: - QMap<QGuardedPtr<KMFolder>, int> mOpenFolders; + TQMap<TQGuardedPtr<KMFolder>, int> mOpenFolders; }; } diff --git a/kmail/messageproperty.cpp b/kmail/messageproperty.cpp index 66444ff87..7de13eb35 100644 --- a/kmail/messageproperty.cpp +++ b/kmail/messageproperty.cpp @@ -35,10 +35,10 @@ #include "messageproperty.h" using namespace KMail; -QMap<Q_UINT32, QGuardedPtr<KMFolder> > MessageProperty::sFolders; -QMap<Q_UINT32, QGuardedPtr<ActionScheduler> > MessageProperty::sHandlers; -QMap<Q_UINT32, int > MessageProperty::sTransfers; -QMap<const KMMsgBase*, long > MessageProperty::sSerialCache; +TQMap<Q_UINT32, TQGuardedPtr<KMFolder> > MessageProperty::sFolders; +TQMap<Q_UINT32, TQGuardedPtr<ActionScheduler> > MessageProperty::sHandlers; +TQMap<Q_UINT32, int > MessageProperty::sTransfers; +TQMap<const KMMsgBase*, long > MessageProperty::sSerialCache; bool MessageProperty::filtering( Q_UINT32 serNum ) { @@ -49,7 +49,7 @@ void MessageProperty::setFiltering( Q_UINT32 serNum, bool filter ) { assert(!filtering(serNum) || !filter); if (filter && !filtering(serNum)) - sFolders.replace(serNum, QGuardedPtr<KMFolder>(0) ); + sFolders.replace(serNum, TQGuardedPtr<KMFolder>(0) ); else if (!filter) sFolders.remove(serNum); } @@ -73,7 +73,7 @@ KMFolder* MessageProperty::filterFolder( Q_UINT32 serNum ) void MessageProperty::setFilterFolder( Q_UINT32 serNum, KMFolder* folder ) { - sFolders.replace(serNum, QGuardedPtr<KMFolder>(folder) ); + sFolders.replace(serNum, TQGuardedPtr<KMFolder>(folder) ); } KMFolder* MessageProperty::filterFolder( const KMMsgBase *msgBase ) @@ -96,7 +96,7 @@ ActionScheduler* MessageProperty::filterHandler( Q_UINT32 serNum ) void MessageProperty::setFilterHandler( Q_UINT32 serNum, ActionScheduler* handler ) { if (handler) - sHandlers.replace( serNum, QGuardedPtr<ActionScheduler>(handler) ); + sHandlers.replace( serNum, TQGuardedPtr<ActionScheduler>(handler) ); else sHandlers.remove( serNum ); } diff --git a/kmail/messageproperty.h b/kmail/messageproperty.h index 1ffbdcc7b..4809cd7ad 100644 --- a/kmail/messageproperty.h +++ b/kmail/messageproperty.h @@ -33,9 +33,9 @@ #include "kmfilteraction.h" // for KMFilterAction::ReturnCode #include "kmfolder.h" -#include <qptrlist.h> -#include <qguardedptr.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqguardedptr.h> +#include <tqobject.h> class KMFilter; class KMFilterDlg; @@ -98,13 +98,13 @@ public: private: // The folder a message is to be moved into once filtering is finished if any - static QMap<Q_UINT32, QGuardedPtr<KMFolder> > sFolders; + static TQMap<Q_UINT32, TQGuardedPtr<KMFolder> > sFolders; // The action scheduler currently processing a message if any - static QMap<Q_UINT32, QGuardedPtr<ActionScheduler> > sHandlers; + static TQMap<Q_UINT32, TQGuardedPtr<ActionScheduler> > sHandlers; // The transferInProgres state of a message if any. - static QMap<Q_UINT32, int > sTransfers; + static TQMap<Q_UINT32, int > sTransfers; // The cached serial number of a message if any. - static QMap<const KMMsgBase*, long > sSerialCache; + static TQMap<const KMMsgBase*, long > sSerialCache; }; } diff --git a/kmail/messagesender.h b/kmail/messagesender.h index 4f25b378c..0c45923b9 100644 --- a/kmail/messagesender.h +++ b/kmail/messagesender.h @@ -32,7 +32,7 @@ #ifndef __KMAIL_MESSAGESENDER_H__ #define __KMAIL_MESSAGESENDER_H__ -#include <qstring.h> +#include <tqstring.h> class KMMessage; @@ -74,7 +74,7 @@ public: @return true on success. */ - bool sendQueued( const QString & transport=QString::null ) { return doSendQueued( transport ); } + bool sendQueued( const TQString & transport=TQString::null ) { return doSendQueued( transport ); } virtual void readConfig() = 0; virtual void writeConfig( bool withSync = true ) = 0; @@ -86,7 +86,7 @@ public: virtual void setSendQuotedPrintable( bool qp ) = 0; protected: virtual bool doSend( KMMessage * msg, short sendNow ) = 0; - virtual bool doSendQueued( const QString& transport ) = 0; + virtual bool doSendQueued( const TQString& transport ) = 0; }; inline MessageSender::~MessageSender() {} diff --git a/kmail/networkaccount.cpp b/kmail/networkaccount.cpp index 3639ab7b5..4721e1e12 100644 --- a/kmail/networkaccount.cpp +++ b/kmail/networkaccount.cpp @@ -47,9 +47,9 @@ namespace KMail { // for restricting number of concurrent connections to the same server - static QMap<QString, int> s_serverConnections; + static TQMap<TQString, int> s_serverConnections; - NetworkAccount::NetworkAccount( AccountManager * parent, const QString & name, uint id ) + NetworkAccount::NetworkAccount( AccountManager * parent, const TQString & name, uint id ) : KMAccount( parent, name, id ), mSlave( 0 ), mAuth( "*" ), @@ -72,10 +72,10 @@ namespace KMail { KMAccount::init(); mSieveConfig = SieveConfig(); - mLogin = QString::null; - mPasswd = QString::null; + mLogin = TQString::null; + mPasswd = TQString::null; mAuth = "*"; - mHost = QString::null; + mHost = TQString::null; mPort = defaultPort(); mStorePasswd = false; mUseSSL = false; @@ -89,17 +89,17 @@ namespace KMail { // // - void NetworkAccount::setLogin( const QString & login ) { + void NetworkAccount::setLogin( const TQString & login ) { mLogin = login; } - QString NetworkAccount::passwd() const { + TQString NetworkAccount::passwd() const { if ( storePasswd() && mPasswd.isEmpty() ) mOwner->readPasswords(); return decryptStr( mPasswd ); } - void NetworkAccount::setPasswd( const QString & passwd, bool storeInConfig ) { + void NetworkAccount::setPasswd( const TQString & passwd, bool storeInConfig ) { if ( mPasswd != encryptStr( passwd ) ) { mPasswd = encryptStr( passwd ); mPasswdDirty = true; @@ -111,7 +111,7 @@ namespace KMail { setPasswd( "", false ); } - void NetworkAccount::setAuth( const QString & auth ) { + void NetworkAccount::setAuth( const TQString & auth ) { mAuth = auth; } @@ -121,7 +121,7 @@ namespace KMail { mStorePasswd = store; } - void NetworkAccount::setHost( const QString & host ) { + void NetworkAccount::setHost( const TQString & host ) { mHost = host; } @@ -154,7 +154,7 @@ namespace KMail { if ( config.readNumEntry( "store-passwd", false ) ) { // ### s/Num/Bool/ mStorePasswd = true; - QString encpasswd = config.readEntry( "pass" ); + TQString encpasswd = config.readEntry( "pass" ); if ( encpasswd.isEmpty() ) { encpasswd = config.readEntry( "passwd" ); if ( !encpasswd.isEmpty() ) encpasswd = importPassword( encpasswd ); @@ -206,7 +206,7 @@ namespace KMail { bool passwdStored = false; if ( mPasswdDirty ) { Wallet *wallet = kmkernel->wallet(); - if ( wallet && wallet->writePassword( "account-" + QString::number(mId), passwd() ) == 0 ) { + if ( wallet && wallet->writePassword( "account-" + TQString::number(mId), passwd() ) == 0 ) { passwdStored = true; mPasswdDirty = false; mStorePasswdInConfig = false; @@ -236,10 +236,10 @@ namespace KMail { // delete password from the wallet if password storage is disabled if (!storePasswd() && !Wallet::keyDoesNotExist( - Wallet::NetworkWallet(), "kmail", "account-" + QString::number(mId))) { + Wallet::NetworkWallet(), "kmail", "account-" + TQString::number(mId))) { Wallet *wallet = kmkernel->wallet(); if (wallet) - wallet->removeEntry( "account-" + QString::number(mId) ); + wallet->removeEntry( "account-" + TQString::number(mId) ); } config.writeEntry( "host", host() ); @@ -298,18 +298,18 @@ namespace KMail { if ( Wallet::isOpen( Wallet::NetworkWallet() ) ) { Wallet *wallet = kmkernel->wallet(); - if (!wallet || !wallet->hasEntry( "account-" + QString::number(mId) ) ) + if (!wallet || !wallet->hasEntry( "account-" + TQString::number(mId) ) ) return; } else { - if (Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "account-" + QString::number(mId) ) ) + if (Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "account-" + TQString::number(mId) ) ) return; } if ( kmkernel->wallet() ) { - QString passwd; - kmkernel->wallet()->readPassword( "account-" + QString::number(mId), passwd ); + TQString passwd; + kmkernel->wallet()->readPassword( "account-" + TQString::number(mId), passwd ); setPasswd( passwd, true ); mPasswdDirty = false; } diff --git a/kmail/networkaccount.h b/kmail/networkaccount.h index 616de6711..868e20553 100644 --- a/kmail/networkaccount.h +++ b/kmail/networkaccount.h @@ -25,13 +25,13 @@ #ifndef __KMAIL_NETWORKACCOUNT_H__ #define __KMAIL_NETWORKACCOUNT_H__ -#include <qguardedptr.h> +#include <tqguardedptr.h> #include "kmaccount.h" #include "sieveconfig.h" -#include <qstring.h> +#include <tqstring.h> class AccountManager; class KConfig/*Base*/; @@ -46,7 +46,7 @@ namespace KMail { class NetworkAccount : public KMAccount { Q_OBJECT protected: - NetworkAccount( AccountManager * parent, const QString & name, uint id ); + NetworkAccount( AccountManager * parent, const TQString & name, uint id ); public: virtual ~NetworkAccount(); @@ -57,12 +57,12 @@ namespace KMail { virtual void pseudoAssign( const KMAccount * a ); /** User login name */ - QString login() const { return mLogin; } - virtual void setLogin( const QString & login ); + TQString login() const { return mLogin; } + virtual void setLogin( const TQString & login ); /** User password */ - QString passwd() const; - virtual void setPasswd( const QString & passwd, bool storeInConfig=false ); + TQString passwd() const; + virtual void setPasswd( const TQString & passwd, bool storeInConfig=false ); /** * Set the password to "" (empty string) @@ -70,16 +70,16 @@ namespace KMail { virtual void clearPasswd(); /** authentication method */ - QString auth() const { return mAuth; } - virtual void setAuth( const QString & auth ); + TQString auth() const { return mAuth; } + virtual void setAuth( const TQString & auth ); /** @return whether to store the password in the config file */ bool storePasswd() const { return mStorePasswd; } virtual void setStorePasswd( bool store ); /** Server hostname */ - QString host() const { return mHost; } - virtual void setHost( const QString & host ); + TQString host() const { return mHost; } + virtual void setHost( const TQString & host ); /** Server port number */ unsigned short int port() const { return mPort; } @@ -122,13 +122,13 @@ namespace KMail { /** Reset connection list for the account */ static void resetConnectionList( NetworkAccount* acct ); protected: - virtual QString protocol() const = 0; + virtual TQString protocol() const = 0; virtual unsigned short int defaultPort() const = 0; protected: KMail::SieveConfig mSieveConfig; - QGuardedPtr<KIO::Slave> mSlave; - QString mLogin, mPasswd, mAuth, mHost; + TQGuardedPtr<KIO::Slave> mSlave; + TQString mLogin, mPasswd, mAuth, mHost; unsigned short int mPort; bool mStorePasswd : 1; bool mUseSSL : 1; diff --git a/kmail/newfolderdialog.cpp b/kmail/newfolderdialog.cpp index 35bb461b7..78294e5f9 100644 --- a/kmail/newfolderdialog.cpp +++ b/kmail/newfolderdialog.cpp @@ -26,15 +26,15 @@ ** your version. *******************************************************************************/ -#include <qvariant.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qregexp.h> +#include <tqvariant.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqregexp.h> #include <klocale.h> #include <kdialogbase.h> @@ -54,7 +54,7 @@ using namespace KMail; -NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder ) +NewFolderDialog::NewFolderDialog( TQWidget* parent, KMFolder *folder ) : KDialogBase( parent, "new_folder_dialog", false, i18n( "New Folder" ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ), @@ -64,37 +64,37 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder ) if ( mFolder ) { setCaption( i18n("New Subfolder of %1").arg( mFolder->prettyURL() ) ); } - QWidget* privateLayoutWidget = new QWidget( this, "mTopLevelLayout" ); - privateLayoutWidget->setGeometry( QRect( 10, 10, 260, 80 ) ); + TQWidget* privateLayoutWidget = new TQWidget( this, "mTopLevelLayout" ); + privateLayoutWidget->setGeometry( TQRect( 10, 10, 260, 80 ) ); setMainWidget( privateLayoutWidget ); - mTopLevelLayout = new QVBoxLayout( privateLayoutWidget, 0, spacingHint(), + mTopLevelLayout = new TQVBoxLayout( privateLayoutWidget, 0, spacingHint(), "mTopLevelLayout"); - mNameHBox = new QHBoxLayout( 0, 0, 6, "mNameHBox"); + mNameHBox = new TQHBoxLayout( 0, 0, 6, "mNameHBox"); - mNameLabel = new QLabel( privateLayoutWidget, "mNameLabel" ); + mNameLabel = new TQLabel( privateLayoutWidget, "mNameLabel" ); mNameLabel->setText( i18n( "&Name:" ) ); mNameHBox->addWidget( mNameLabel ); - mNameLineEdit = new QLineEdit( privateLayoutWidget, "mNameLineEdit" ); + mNameLineEdit = new TQLineEdit( privateLayoutWidget, "mNameLineEdit" ); mNameLabel->setBuddy( mNameLineEdit ); - QWhatsThis::add( mNameLineEdit, i18n( "Enter a name for the new folder." ) ); + TQWhatsThis::add( mNameLineEdit, i18n( "Enter a name for the new folder." ) ); mNameLineEdit->setFocus(); mNameHBox->addWidget( mNameLineEdit ); mTopLevelLayout->addLayout( mNameHBox ); - connect( mNameLineEdit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotFolderNameChanged( const QString & ) ) ); + connect( mNameLineEdit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotFolderNameChanged( const TQString & ) ) ); if ( !mFolder || ( mFolder->folderType() != KMFolderTypeImap && mFolder->folderType() != KMFolderTypeCachedImap ) ) { - mFormatHBox = new QHBoxLayout( 0, 0, 6, "mFormatHBox"); - mMailboxFormatLabel = new QLabel( privateLayoutWidget, "mMailboxFormatLabel" ); + mFormatHBox = new TQHBoxLayout( 0, 0, 6, "mFormatHBox"); + mMailboxFormatLabel = new TQLabel( privateLayoutWidget, "mMailboxFormatLabel" ); mMailboxFormatLabel->setText( i18n( "Mailbox &format:" ) ); mFormatHBox->addWidget( mMailboxFormatLabel ); - mFormatComboBox = new QComboBox( false, privateLayoutWidget, "mFormatComboBox" ); + mFormatComboBox = new TQComboBox( false, privateLayoutWidget, "mFormatComboBox" ); mMailboxFormatLabel->setBuddy( mFormatComboBox ); - QWhatsThis::add( mFormatComboBox, i18n( "Select whether you want to store the messages in this folder as one file per message (maildir) or as one big file (mbox). KMail uses maildir by default and this only needs to be changed in rare circumstances. If you are unsure, leave this option as-is." ) ); + TQWhatsThis::add( mFormatComboBox, i18n( "Select whether you want to store the messages in this folder as one file per message (maildir) or as one big file (mbox). KMail uses maildir by default and this only needs to be changed in rare circumstances. If you are unsure, leave this option as-is." ) ); mFormatComboBox->insertItem("mbox", 0); mFormatComboBox->insertItem("maildir", 1); @@ -113,15 +113,15 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder ) // --- contents ----- if ( kmkernel->iCalIface().isEnabled() ) { - mContentsHBox = new QHBoxLayout( 0, 0, 6, "mContentsHBox"); + mContentsHBox = new TQHBoxLayout( 0, 0, 6, "mContentsHBox"); - mContentsLabel = new QLabel( privateLayoutWidget, "mContentsLabel" ); + mContentsLabel = new TQLabel( privateLayoutWidget, "mContentsLabel" ); mContentsLabel->setText( i18n( "Folder &contains:" ) ); mContentsHBox->addWidget( mContentsLabel ); - mContentsComboBox = new QComboBox( false, privateLayoutWidget, "mContentsComboBox" ); + mContentsComboBox = new TQComboBox( false, privateLayoutWidget, "mContentsComboBox" ); mContentsLabel->setBuddy( mContentsComboBox ); - QWhatsThis::add( mContentsComboBox, i18n( "Select whether you want the new folder to be used for mail storage of for storage of groupware items such as tasks or notes. The default is mail. If you are unsure, leave this option as-is." ) ); + TQWhatsThis::add( mContentsComboBox, i18n( "Select whether you want the new folder to be used for mail storage of for storage of groupware items such as tasks or notes. The default is mail. If you are unsure, leave this option as-is." ) ); mContentsComboBox->insertItem( i18n( "Mail" ) ); mContentsComboBox->insertItem( i18n( "Calendar" ) ); mContentsComboBox->insertItem( i18n( "Contacts" ) ); @@ -138,7 +138,7 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder ) ( mFolder->folderType() == KMFolderTypeImap || mFolder->folderType() == KMFolderTypeCachedImap ) ) { bool rootFolder = false; - QStringList namespaces; + TQStringList namespaces; if ( mFolder->folderType() == KMFolderTypeImap ) { ImapAccountBase* ai = static_cast<KMFolderImap*>(mFolder->storage())->account(); if ( mFolder->storage() == ai->rootFolder() ) { @@ -154,15 +154,15 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder ) } } if ( rootFolder && namespaces.count() > 1 ) { - mNamespacesHBox = new QHBoxLayout( 0, 0, 6, "mNamespaceHBox"); + mNamespacesHBox = new TQHBoxLayout( 0, 0, 6, "mNamespaceHBox"); - mNamespacesLabel = new QLabel( privateLayoutWidget, "mNamespacesLabel" ); + mNamespacesLabel = new TQLabel( privateLayoutWidget, "mNamespacesLabel" ); mNamespacesLabel->setText( i18n( "Namespace for &folder:" ) ); mNamespacesHBox->addWidget( mNamespacesLabel ); - mNamespacesComboBox = new QComboBox( false, privateLayoutWidget, "mNamespacesComboBox" ); + mNamespacesComboBox = new TQComboBox( false, privateLayoutWidget, "mNamespacesComboBox" ); mNamespacesLabel->setBuddy( mNamespacesComboBox ); - QWhatsThis::add( mNamespacesComboBox, i18n( "Select the personal namespace the folder should be created in." ) ); + TQWhatsThis::add( mNamespacesComboBox, i18n( "Select the personal namespace the folder should be created in." ) ); mNamespacesComboBox->insertStringList( namespaces ); mNamespacesHBox->addWidget( mNamespacesComboBox ); mTopLevelLayout->addLayout( mNamespacesHBox ); @@ -171,19 +171,19 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder ) } } - resize( QSize(282, 108).expandedTo(minimumSizeHint()) ); + resize( TQSize(282, 108).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); slotFolderNameChanged( mNameLineEdit->text()); } -void NewFolderDialog::slotFolderNameChanged( const QString & _text) +void NewFolderDialog::slotFolderNameChanged( const TQString & _text) { enableButtonOK( !_text.isEmpty() ); } void NewFolderDialog::slotOk() { - const QString fldName = mNameLineEdit->text(); + const TQString fldName = mNameLineEdit->text(); if ( fldName.isEmpty() ) { KMessageBox::error( this, i18n("Please specify a name for the new folder."), i18n( "No Name Specified" ) ); @@ -209,7 +209,7 @@ void NewFolderDialog::slotOk() if ( mFolder && ( mFolder->folderType() == KMFolderTypeImap || mFolder->folderType() == KMFolderTypeCachedImap ) ) { - QString delimiter; + TQString delimiter; if ( mFolder->folderType() == KMFolderTypeImap ) { KMAcctImap* ai = static_cast<KMFolderImap*>( mFolder->storage() )->account(); if ( ai ) @@ -237,13 +237,13 @@ void NewFolderDialog::slotOk() && ( selectedFolderDir == mFolder->parent() ) && ( mFolder->storage()->name() == fldName ) ) ) ) { - const QString message = i18n( "<qt>Failed to create folder <b>%1</b>, folder already exists.</qt>" ).arg(fldName); + const TQString message = i18n( "<qt>Failed to create folder <b>%1</b>, folder already exists.</qt>" ).arg(fldName); KMessageBox::error( this, message ); return; } /* Ok, obvious errors caught, let's try creating it for real. */ - const QString message = i18n( "<qt>Failed to create folder <b>%1</b>." + const TQString message = i18n( "<qt>Failed to create folder <b>%1</b>." "</qt> " ).arg(fldName); bool success = false; KMFolder *newFolder = 0; @@ -255,7 +255,7 @@ void NewFolderDialog::slotOk() if (anAccount->makeConnection() == ImapAccountBase::Connected) { newFolder = kmkernel->imapFolderMgr()->createFolder( fldName, false, KMFolderTypeImap, selectedFolderDir ); if ( newFolder ) { - QString imapPath, parent; + TQString imapPath, parent; if ( mNamespacesComboBox ) { // create folder with namespace parent = anAccount->addPathToNamespace( mNamespacesComboBox->currentText() ); @@ -265,7 +265,7 @@ void NewFolderDialog::slotOk() } KMFolderImap* newStorage = static_cast<KMFolderImap*>( newFolder->storage() ); selectedStorage->createFolder(fldName, parent); // create it on the server - newStorage->initializeFrom( selectedStorage, imapPath, QString::null ); + newStorage->initializeFrom( selectedStorage, imapPath, TQString::null ); static_cast<KMFolderImap*>(mFolder->storage())->setAccount( selectedStorage->account() ); success = true; } @@ -278,7 +278,7 @@ void NewFolderDialog::slotOk() newStorage->initializeFrom( selectedStorage ); if ( mNamespacesComboBox ) { // create folder with namespace - QString path = selectedStorage->account()->createImapPath( + TQString path = selectedStorage->account()->createImapPath( mNamespacesComboBox->currentText(), fldName ); newStorage->setImapPathForCreation( path ); } diff --git a/kmail/newfolderdialog.h b/kmail/newfolderdialog.h index f5065bcd6..3f3c88265 100644 --- a/kmail/newfolderdialog.h +++ b/kmail/newfolderdialog.h @@ -29,8 +29,8 @@ #ifndef NEW_FOLDER_DIALOG_H #define NEW_FOLDER_DIALOG_H -#include <qvariant.h> -#include <qdialog.h> +#include <tqvariant.h> +#include <tqdialog.h> #include <kdialogbase.h> class QVBoxLayout; @@ -49,27 +49,27 @@ class NewFolderDialog : public KDialogBase Q_OBJECT public: - NewFolderDialog( QWidget* parent = 0, KMFolder *folder = 0 ); + NewFolderDialog( TQWidget* parent = 0, KMFolder *folder = 0 ); ~NewFolderDialog() {}; - QLabel* mNameLabel; - QLineEdit* mNameLineEdit; - QLabel* mMailboxFormatLabel; - QComboBox* mFormatComboBox; - QLabel* mContentsLabel; - QComboBox* mContentsComboBox; - QLabel* mNamespacesLabel; - QComboBox* mNamespacesComboBox; + TQLabel* mNameLabel; + TQLineEdit* mNameLineEdit; + TQLabel* mMailboxFormatLabel; + TQComboBox* mFormatComboBox; + TQLabel* mContentsLabel; + TQComboBox* mContentsComboBox; + TQLabel* mNamespacesLabel; + TQComboBox* mNamespacesComboBox; protected: - QVBoxLayout* mTopLevelLayout; - QHBoxLayout* mNameHBox; - QHBoxLayout* mFormatHBox; - QHBoxLayout* mContentsHBox; - QHBoxLayout* mNamespacesHBox; + TQVBoxLayout* mTopLevelLayout; + TQHBoxLayout* mNameHBox; + TQHBoxLayout* mFormatHBox; + TQHBoxLayout* mContentsHBox; + TQHBoxLayout* mNamespacesHBox; protected slots: void slotOk(); - void slotFolderNameChanged( const QString & _text); + void slotFolderNameChanged( const TQString & _text); private: KMFolder* mFolder; diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp index 6f4bd4650..4c56a7bd4 100644 --- a/kmail/objecttreeparser.cpp +++ b/kmail/objecttreeparser.cpp @@ -96,15 +96,15 @@ #include <kmdcodec.h> // other Qt headers -#include <qtextcodec.h> -#include <qdir.h> -#include <qfile.h> -#include <qapplication.h> +#include <tqtextcodec.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqapplication.h> #include <kstyle.h> -#include <qbuffer.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qregexp.h> +#include <tqbuffer.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqregexp.h> // other headers #include <memory> @@ -214,7 +214,7 @@ namespace KMail { if ( startNode.mimePartTreeItem() ) { kdDebug(5006) << "\n -----> Inserting items into MimePartTree\n" << endl; newNode->fillMimePartTree( startNode.mimePartTreeItem(), 0, - QString::null, QString::null, QString::null, 0, + TQString::null, TQString::null, TQString::null, 0, append ); kdDebug(5006) << "\n <----- Finished inserting items into MimePartTree\n" << endl; } else { @@ -261,7 +261,7 @@ namespace KMail { ProcessResult processResult; if ( mReader ) - htmlWriter()->queue( QString::fromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) ); + htmlWriter()->queue( TQString::fromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) ); if ( const Interface::BodyPartFormatter * formatter = BodyPartFormatterFactory::instance()->createFor( node->typeString(), node->subTypeString() ) ) { PartNodeBodyPart part( *node, codecFor( node ) ); @@ -377,9 +377,9 @@ namespace KMail { bool ObjectTreeParser::writeOpaqueOrMultipartSignedData( partNode* data, partNode& sign, - const QString& fromAddress, + const TQString& fromAddress, bool doCheck, - QCString* cleartextData, + TQCString* cleartextData, std::vector<GpgME::Signature> paramSignatures, bool hideErrors ) { @@ -389,8 +389,8 @@ namespace KMail { const Kleo::CryptoBackend::Protocol* cryptProto = cryptoProtocol(); - QString cryptPlugLibName; - QString cryptPlugDisplayName; + TQString cryptPlugLibName; + TQString cryptPlugDisplayName; if ( cryptProto ) { cryptPlugLibName = cryptProto->name(); cryptPlugDisplayName = cryptProto->displayName(); @@ -411,8 +411,8 @@ namespace KMail { << cryptPlugLibName << endl; } - QCString cleartext; - QByteArray signaturetext; + TQCString cleartext; + TQByteArray signaturetext; if ( doCheck && cryptProto ) { if ( data ) { @@ -454,7 +454,7 @@ namespace KMail { GpgME::VerificationResult result; if ( data ) { // detached if ( Kleo::VerifyDetachedJob * const job = cryptProto->verifyDetachedJob() ) { - QByteArray plainData = cleartext; + TQByteArray plainData = cleartext; plainData.resize( cleartext.size() - 1 ); result = job->exec( signaturetext, plainData ); messagePart.auditLog = job->auditLogAsHtml(); @@ -463,9 +463,9 @@ namespace KMail { } } else { // opaque if ( Kleo::VerifyOpaqueJob * const job = cryptProto->verifyOpaqueJob() ) { - QByteArray plainData; + TQByteArray plainData; result = job->exec( signaturetext, plainData ); - cleartext = QCString( plainData.data(), plainData.size() + 1 ); + cleartext = TQCString( plainData.data(), plainData.size() + 1 ); messagePart.auditLog = job->auditLogAsHtml(); } else { cryptPlugError = CANT_VERIFY_SIGNATURES; @@ -483,7 +483,7 @@ namespace KMail { GpgME::Signature signature = signatures[0]; messagePart.status_code = signatureToStatus( signature ); - messagePart.status = QString::fromUtf8( signature.status().asString() ); + messagePart.status = TQString::fromUtf8( signature.status().asString() ); for ( uint i = 1; i < signatures.size(); ++i ) { if ( signatureToStatus( signatures[i] ) != messagePart.status_code ) { messagePart.status_code = GPGME_SIG_STAT_DIFF; @@ -496,7 +496,7 @@ namespace KMail { // get key for this signature Kleo::KeyListJob *job = cryptProto->keyListJob(); std::vector<GpgME::Key> keys; - GpgME::KeyListResult keyListRes = job->exec( QString::fromLatin1( signature.fingerprint() ), false, keys ); + GpgME::KeyListResult keyListRes = job->exec( TQString::fromLatin1( signature.fingerprint() ), false, keys ); GpgME::Key key; if ( keys.size() == 1 ) key = keys[0]; @@ -518,7 +518,7 @@ namespace KMail { // The following if /should/ always result in TRUE but we // won't trust implicitely the plugin that gave us these data. if ( key.userID( iMail ).email() ) { - QString email = QString::fromUtf8( key.userID( iMail ).email() ); + TQString email = TQString::fromUtf8( key.userID( iMail ).email() ); // ### work around gpgme 0.3.x / cryptplug bug where the // ### email addresses are specified as angle-addr, not addr-spec: if ( email.startsWith( "<" ) && email.endsWith( ">" ) ) @@ -531,7 +531,7 @@ namespace KMail { if ( signature.creationTime() ) messagePart.creationTime.setTime_t( signature.creationTime() ); else - messagePart.creationTime = QDateTime(); + messagePart.creationTime = TQDateTime(); if ( messagePart.signer.isEmpty() ) { if ( key.numUserIDs() > 0 && key.userID( 0 ).name() ) messagePart.signer = Kleo::DN( key.userID( 0 ).name() ).prettyDN(); @@ -548,7 +548,7 @@ namespace KMail { << "\n signer: " << messagePart.signer << endl; } else { - messagePart.creationTime = QDateTime(); + messagePart.creationTime = TQDateTime(); } if ( !doCheck || !data ){ @@ -568,7 +568,7 @@ namespace KMail { } else if ( !hideErrors ) { - QString txt; + TQString txt; txt = "<hr><b><h2>"; txt.append( i18n( "The crypto engine returned no cleartext data." ) ); txt.append( "</h2></b>" ); @@ -588,7 +588,7 @@ namespace KMail { else { if ( mReader ) { if ( !cryptProto ) { - QString errorMsg; + TQString errorMsg; switch ( cryptPlugError ) { case NOT_INITIALIZED: errorMsg = i18n( "Crypto plug-in \"%1\" is not initialized." ) @@ -638,30 +638,30 @@ namespace KMail { bool ObjectTreeParser::okDecryptMIME( partNode& data, - QCString& decryptedData, + TQCString& decryptedData, bool& signatureFound, std::vector<GpgME::Signature> &signatures, bool showWarning, bool& passphraseError, bool& actuallyEncrypted, - QString& aErrorText, - QString& auditLog ) + TQString& aErrorText, + TQString& auditLog ) { passphraseError = false; - aErrorText = QString::null; - auditLog = QString::null; + aErrorText = TQString::null; + auditLog = TQString::null; bool bDecryptionOk = false; enum { NO_PLUGIN, NOT_INITIALIZED, CANT_DECRYPT } cryptPlugError = NO_PLUGIN; const Kleo::CryptoBackend::Protocol* cryptProto = cryptoProtocol(); - QString cryptPlugLibName; + TQString cryptPlugLibName; if ( cryptProto ) cryptPlugLibName = cryptProto->name(); if ( mReader && !mReader->decryptMessage() ) { - QString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small ); + TQString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small ); decryptedData = "<div style=\"font-size:large; text-align:center;" "padding-top:20pt;\">" + i18n("This message is encrypted.").utf8() @@ -675,16 +675,16 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, } if ( cryptProto && !kmkernel->contextMenuShown() ) { - QByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); + TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); #ifdef MARCS_DEBUG - QCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); + TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); dumpToFile( "dat_04_reader.encrypted", ciphertext.data(), ciphertext.size() ); - QCString deb; + TQCString deb; deb = "\n\nE N C R Y P T E D D A T A = "; if ( cipherIsBinary ) deb += "[binary data]"; @@ -708,7 +708,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, cryptPlugError = CANT_DECRYPT; cryptProto = 0; } else { - QByteArray plainText; + TQByteArray plainText; const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> res = job->exec( ciphertext, plainText ); const GpgME::DecryptionResult & decryptResult = res.first; const GpgME::VerificationResult & verifyResult = res.second; @@ -718,13 +718,13 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, passphraseError = decryptResult.error().isCanceled() || decryptResult.error().code() == GPG_ERR_NO_SECKEY; actuallyEncrypted = decryptResult.error().code() != GPG_ERR_NO_DATA; - aErrorText = QString::fromLocal8Bit( decryptResult.error().asString() ); + aErrorText = TQString::fromLocal8Bit( decryptResult.error().asString() ); auditLog = job->auditLogAsHtml(); kdDebug(5006) << "ObjectTreeParser::decryptMIME: returned from CRYPTPLUG" << endl; if ( bDecryptionOk ) - decryptedData = QCString( plainText.data(), plainText.size() + 1 ); + decryptedData = TQCString( plainText.data(), plainText.size() + 1 ); else if ( mReader && showWarning ) { decryptedData = "<div style=\"font-size:x-large; text-align:center;" "padding:20pt;\">" @@ -759,8 +759,8 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, } else if ( kmkernel->contextMenuShown() ) { // ### Workaround for bug 56693 (kmail freeze with the complete desktop // ### while pinentry-qt appears) - QByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); - QCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); + TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); + TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); @@ -781,9 +781,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, } //static - bool ObjectTreeParser::containsExternalReferences( const QCString & str ) + bool ObjectTreeParser::containsExternalReferences( const TQCString & str ) { - QRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:"); + TQRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:"); int httpPos = str.find( httpRegExp, 0 ); while ( httpPos >= 0 ) { @@ -803,7 +803,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, } bool ObjectTreeParser::processTextHtmlSubtype( partNode * curNode, ProcessResult & ) { - QCString cstr( curNode->msgPart().bodyDecoded() ); + TQCString cstr( curNode->msgPart().bodyDecoded() ); mRawReplyString = cstr; if ( curNode->isFirstTextPart() ) { @@ -874,7 +874,7 @@ static bool isMailmanMessage( partNode * curNode ) { if ( headers.HasField("X-Mailman-Version") ) return true; if ( headers.HasField("X-Mailer") && - 0 == QCString( headers.FieldBody("X-Mailer").AsString().c_str() ) + 0 == TQCString( headers.FieldBody("X-Mailer").AsString().c_str() ) .find("MAILMAN", 0, false) ) return true; return false; @@ -883,14 +883,14 @@ static bool isMailmanMessage( partNode * curNode ) { namespace KMail { bool ObjectTreeParser::processMailmanMessage( partNode * curNode ) { - const QCString cstr = curNode->msgPart().bodyDecoded(); + const TQCString cstr = curNode->msgPart().bodyDecoded(); //### - const QCString delim1( "--__--__--\n\nMessage:"); - const QCString delim2( "--__--__--\r\n\r\nMessage:"); - const QCString delimZ2("--__--__--\n\n_____________"); - const QCString delimZ1("--__--__--\r\n\r\n_____________"); - QCString partStr, digestHeaderStr; + const TQCString delim1( "--__--__--\n\nMessage:"); + const TQCString delim2( "--__--__--\r\n\r\nMessage:"); + const TQCString delimZ2("--__--__--\n\n_____________"); + const TQCString delimZ1("--__--__--\r\n\r\n_____________"); + TQCString partStr, digestHeaderStr; int thisDelim = cstr.find(delim1, 0, false); if ( thisDelim == -1 ) thisDelim = cstr.find(delim2, 0, false); @@ -943,8 +943,8 @@ namespace KMail { partStr = "Content-Type=message/rfc822\nContent-Description=embedded message\n"; partStr += cstr.mid( thisDelim, nextDelim-thisDelim ); - QCString subject("embedded message"); - QCString subSearch("\nSubject:"); + TQCString subject("embedded message"); + TQCString subSearch("\nSubject:"); int subPos = partStr.find(subSearch, 0, false); if ( -1 < subPos ){ subject = partStr.mid(subPos+subSearch.length()); @@ -1007,7 +1007,7 @@ namespace KMail { mTextualContentCharset = curNode->msgPart().charset(); } - QString label = curNode->msgPart().fileName().stripWhiteSpace(); + TQString label = curNode->msgPart().fileName().stripWhiteSpace(); if ( label.isEmpty() ) label = curNode->msgPart().name().stripWhiteSpace(); @@ -1017,19 +1017,19 @@ namespace KMail { if ( bDrawFrame ) { label = KMMessage::quoteHtmlChars( label, true ); - const QString comment = + const TQString comment = KMMessage::quoteHtmlChars( curNode->msgPart().contentDescription(), true ); - const QString fileName = + const TQString fileName = mReader->writeMessagePartToTempFile( &curNode->msgPart(), curNode->nodeId() ); - const QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ; + const TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ; - QString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">" + TQString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">" "<tr class=\"textAtmH\"><td dir=\"" + dir + "\">"; if ( !fileName.isEmpty() ) - htmlStr += "<a href=\"" + QString("file:") + htmlStr += "<a href=\"" + TQString("file:") + KURL::encode_string( fileName ) + "\">" + label + "</a>"; else @@ -1138,7 +1138,7 @@ namespace KMail { // mimetype of "signature" (not required by the RFC, but practised // by all implementaions of security multiparts - const QString contentType = node->contentTypeParameter( "protocol" ).lower(); + const TQString contentType = node->contentTypeParameter( "protocol" ).lower(); const Kleo::CryptoBackend::Protocol *protocol = 0; if ( contentType == "application/pkcs7-signature" || contentType == "application/x-pkcs7-signature" ) protocol = Kleo::CryptoBackendFactory::instance()->smime(); @@ -1166,7 +1166,7 @@ namespace KMail { if ( keepEncryptions() ) { node->setEncryptionState( KMMsgFullyEncrypted ); - const QCString cstr = node->msgPart().bodyDecoded(); + const TQCString cstr = node->msgPart().bodyDecoded(); if ( mReader ) writeBodyString( cstr, node->trueFromAddress(), codecFor( node ), result, false ); @@ -1212,7 +1212,7 @@ namespace KMail { kdDebug(5006) << "\n-----> Initially processing encrypted data\n" << endl; PartMetaData messagePart; node->setEncryptionState( KMMsgFullyEncrypted ); - QCString decryptedData; + TQCString decryptedData; bool signatureFound; std::vector<GpgME::Signature> signatures; bool passphraseError; @@ -1269,7 +1269,7 @@ namespace KMail { if ( mReader ) { // print the error message that was returned in decryptedData // (utf8-encoded) - htmlWriter()->queue( QString::fromUtf8( decryptedData.data() ) ); + htmlWriter()->queue( TQString::fromUtf8( decryptedData.data() ) ); } } @@ -1304,7 +1304,7 @@ namespace KMail { messagePart.isEncrypted = false; messagePart.isSigned = false; messagePart.isEncapsulatedRfc822Message = true; - QString filename = + TQString filename = mReader->writeMessagePartToTempFile( &node->msgPart(), node->nodeId() ); htmlWriter()->queue( writeSigstatHeader( messagePart, @@ -1312,7 +1312,7 @@ namespace KMail { node->trueFromAddress(), filename ) ); } - QCString rfc822messageStr( node->msgPart().bodyDecoded() ); + TQCString rfc822messageStr( node->msgPart().bodyDecoded() ); // display the headers of the encapsulated message DwMessage* rfc822DwMessage = new DwMessage(); // will be deleted by c'tor of rfc822headers rfc822DwMessage->FromString( rfc822messageStr ); @@ -1353,7 +1353,7 @@ namespace KMail { kdDebug(5006) << "\n-----> Initially processing encrypted data\n" << endl; node->setEncryptionState( KMMsgFullyEncrypted ); if ( keepEncryptions() ) { - const QCString cstr = node->msgPart().bodyDecoded(); + const TQCString cstr = node->msgPart().bodyDecoded(); if ( mReader ) writeBodyString( cstr, node->trueFromAddress(), codecFor( node ), result, false ); @@ -1364,7 +1364,7 @@ namespace KMail { */ PartMetaData messagePart; setCryptoProtocol( Kleo::CryptoBackendFactory::instance()->openpgp() ); - QCString decryptedData; + TQCString decryptedData; bool signatureFound; std::vector<GpgME::Signature> signatures; bool passphraseError; @@ -1400,7 +1400,7 @@ namespace KMail { if ( mReader ) { // print the error message that was returned in decryptedData // (utf8-encoded) - htmlWriter()->queue( QString::fromUtf8( decryptedData.data() ) ); + htmlWriter()->queue( TQString::fromUtf8( decryptedData.data() ) ); } } @@ -1432,7 +1432,7 @@ namespace KMail { const Kleo::CryptoBackend::Protocol * smimeCrypto = Kleo::CryptoBackendFactory::instance()->smime(); - const QString smimeType = node->contentTypeParameter("smime-type").lower(); + const TQString smimeType = node->contentTypeParameter("smime-type").lower(); if ( smimeType == "certs-only" ) { result.setNeverDisplayInline( true ); @@ -1443,13 +1443,13 @@ namespace KMail { if ( !reader.readBoolEntry( "AutoImportKeys", false ) ) return false; - const QByteArray certData = node->msgPart().bodyDecodedBinary(); + const TQByteArray certData = node->msgPart().bodyDecodedBinary(); Kleo::ImportJob *import = smimeCrypto->importJob(); const GpgME::ImportResult res = import->exec( certData ); if ( res.error() ) { htmlWriter()->queue( i18n( "Sorry, certificate could not be imported.<br>" - "Reason: %1").arg( QString::fromLocal8Bit( res.error().asString() ) ) ); + "Reason: %1").arg( TQString::fromLocal8Bit( res.error().asString() ) ) ); return true; } @@ -1461,7 +1461,7 @@ namespace KMail { htmlWriter()->queue( i18n( "Sorry, no certificates were found in this message." ) ); return true; } - QString comment = "<b>" + i18n( "Certificate import status:" ) + "</b><br> <br>"; + TQString comment = "<b>" + i18n( "Certificate import status:" ) + "</b><br> <br>"; if ( nImp ) comment += i18n( "1 new certificate was imported.", "%n new certificates were imported.", nImp ) + "<br>"; @@ -1490,7 +1490,7 @@ namespace KMail { if ( (*it).error() ) htmlWriter()->queue( i18n( "Failed: %1 (%2)" ) .arg( (*it).fingerprint(), - QString::fromLocal8Bit( (*it).error().asString() ) ) ); + TQString::fromLocal8Bit( (*it).error().asString() ) ) ); else if ( (*it).status() & ~GpgME::Import::ContainedSecretKey ) if ( (*it).status() & GpgME::Import::ContainedSecretKey ) htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)" ).arg( (*it).fingerprint() ) ); @@ -1524,7 +1524,7 @@ namespace KMail { kdDebug(5006) << "pkcs7 mime == S/MIME TYPE: enveloped (encrypted) data" << endl; else kdDebug(5006) << "pkcs7 mime - type unknown - enveloped (encrypted) data ?" << endl; - QCString decryptedData; + TQCString decryptedData; PartMetaData messagePart; messagePart.isEncrypted = true; messagePart.isSigned = false; @@ -1578,7 +1578,7 @@ namespace KMail { if ( mReader->decryptMessage() ) writePartIcon( &node->msgPart(), node->nodeId() ); else - htmlWriter()->queue( QString::fromUtf8( decryptedData ) ); + htmlWriter()->queue( TQString::fromUtf8( decryptedData ) ); htmlWriter()->queue( writeSigstatFooter( messagePart ) ); } } else { @@ -1619,7 +1619,7 @@ namespace KMail { return isSigned || isEncrypted; } -bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& bodyDecoded, QString& errorText ) +bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bodyDecoded, TQString& errorText ) { const Kleo::CryptoBackend::Protocol * chiasmus = Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ); @@ -1627,7 +1627,7 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body if ( !chiasmus ) return false; - const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) ); + const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) ); if ( !listjob.get() ) { errorText = i18n( "Chiasmus backend does not offer the " "\"x-obtain-keys\" function. Please report this bug." ); @@ -1639,15 +1639,15 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body return false; } - const QVariant result = listjob->property( "result" ); - if ( result.type() != QVariant::StringList ) { + const TQVariant result = listjob->property( "result" ); + if ( result.type() != TQVariant::StringList ) { errorText = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-obtain-keys\" function did not return a " "string list. Please report this bug." ); return false; } - const QStringList keys = result.toStringList(); + const TQStringList keys = result.toStringList(); if ( keys.empty() ) { errorText = i18n( "No keys have been found. Please check that a " "valid key path has been set in the Chiasmus " @@ -1659,14 +1659,14 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body ChiasmusKeySelector selectorDlg( mReader, i18n( "Chiasmus Decryption Key Selection" ), keys, GlobalSettings::chiasmusDecryptionKey(), GlobalSettings::chiasmusDecryptionOptions() ); - if ( selectorDlg.exec() != QDialog::Accepted ) + if ( selectorDlg.exec() != TQDialog::Accepted ) return false; GlobalSettings::setChiasmusDecryptionOptions( selectorDlg.options() ); GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() ); assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() ); - Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", QMap<QString,QVariant>() ); + Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() ); if ( !job ) { errorText = i18n( "Chiasmus backend does not offer the " "\"x-decrypt\" function. Please report this bug." ); @@ -1686,8 +1686,8 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body return false; } - const QVariant resultData = job->property( "result" ); - if ( resultData.type() != QVariant::ByteArray ) { + const TQVariant resultData = job->property( "result" ); + if ( resultData.type() != TQVariant::ByteArray ) { errorText = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-decrypt\" function did not return a " "byte array. Please report this bug." ); @@ -1706,9 +1706,9 @@ bool ObjectTreeParser::processApplicationChiasmusTextSubtype( partNode * curNode return true; } - QByteArray decryptedBody; - QString errorText; - const QByteArray data = curNode->msgPart().bodyDecodedBinary(); + TQByteArray decryptedBody; + TQString errorText; + const TQByteArray data = curNode->msgPart().bodyDecodedBinary(); bool bOkDecrypt = decryptChiasmus( data, decryptedBody, errorText ); PartMetaData messagePart; messagePart.isDecryptable = bOkDecrypt; @@ -1719,9 +1719,9 @@ bool ObjectTreeParser::processApplicationChiasmusTextSubtype( partNode * curNode htmlWriter()->queue( writeSigstatHeader( messagePart, 0, //cryptPlugWrapper(), curNode->trueFromAddress() ) ); - const QByteArray body = bOkDecrypt ? decryptedBody : data; - const QString chiasmusCharset = curNode->contentTypeParameter("chiasmus-charset"); - const QTextCodec* aCodec = chiasmusCharset.isEmpty() + const TQByteArray body = bOkDecrypt ? decryptedBody : data; + const TQString chiasmusCharset = curNode->contentTypeParameter("chiasmus-charset"); + const TQTextCodec* aCodec = chiasmusCharset.isEmpty() ? codecFor( curNode ) : KMMsgBase::codecForName( chiasmusCharset.ascii() ); htmlWriter()->queue( quotedHTML( aCodec->toUnicode( body ), false /*decorate*/ ) ); @@ -1737,31 +1737,31 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR if ( !mReader ) return false; - const QString fileName = mReader->writeMessagePartToTempFile( &node->msgPart(), node->nodeId() ); + const TQString fileName = mReader->writeMessagePartToTempFile( &node->msgPart(), node->nodeId() ); KTNEFParser parser; if ( !parser.openFile( fileName ) || !parser.message()) { kdDebug() << k_funcinfo << "Could not parse " << fileName << endl; return false; } - QPtrList<KTNEFAttach> tnefatts = parser.message()->attachmentList(); + TQPtrList<KTNEFAttach> tnefatts = parser.message()->attachmentList(); if ( tnefatts.isEmpty() ) { kdDebug() << k_funcinfo << "No attachments found in " << fileName << endl; return false; } if ( !showOnlyOneMimePart() ) { - QString label = node->msgPart().fileName().stripWhiteSpace(); + TQString label = node->msgPart().fileName().stripWhiteSpace(); if ( label.isEmpty() ) label = node->msgPart().name().stripWhiteSpace(); label = KMMessage::quoteHtmlChars( label, true ); - const QString comment = KMMessage::quoteHtmlChars( node->msgPart().contentDescription(), true ); - const QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ; + const TQString comment = KMMessage::quoteHtmlChars( node->msgPart().contentDescription(), true ); + const TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ; - QString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">" + TQString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">" "<tr class=\"textAtmH\"><td dir=\"" + dir + "\">"; if ( !fileName.isEmpty() ) - htmlStr += "<a href=\"" + QString("file:") + htmlStr += "<a href=\"" + TQString("file:") + KURL::encode_string( fileName ) + "\">" + label + "</a>"; else @@ -1774,18 +1774,18 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR for ( uint i = 0; i < tnefatts.count(); ++i ) { KTNEFAttach *att = tnefatts.at( i ); - QString label = att->displayName(); + TQString label = att->displayName(); if( label.isEmpty() ) label = att->name(); label = KMMessage::quoteHtmlChars( label, true ); - QString dir = mReader->createTempDir( "ktnef-" + QString::number( i ) ); + TQString dir = mReader->createTempDir( "ktnef-" + TQString::number( i ) ); parser.extractFileTo( att->name(), dir ); - mReader->mTempFiles.append( dir + QDir::separator() + att->name() ); - QString href = "file:" + KURL::encode_string( dir + QDir::separator() + att->name() ); + mReader->mTempFiles.append( dir + TQDir::separator() + att->name() ); + TQString href = "file:" + KURL::encode_string( dir + TQDir::separator() + att->name() ); KMimeType::Ptr mimeType = KMimeType::mimeType( att->mimeTag() ); - QString iconName = KGlobal::instance()->iconLoader()->iconPath( mimeType->icon( QString(), false ), KIcon::Desktop ); + TQString iconName = KGlobal::instance()->iconLoader()->iconPath( mimeType->icon( TQString(), false ), KIcon::Desktop ); htmlWriter()->queue( "<div><a href=\"" + href + "\"><img src=\"" + iconName + "\" border=\"0\" style=\"max-width: 100%\">" + label + @@ -1798,9 +1798,9 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR return true; } - void ObjectTreeParser::writeBodyString( const QCString & bodyString, - const QString & fromAddress, - const QTextCodec * codec, + void ObjectTreeParser::writeBodyString( const TQCString & bodyString, + const TQString & fromAddress, + const TQTextCodec * codec, ProcessResult & result, bool decorate ) { assert( mReader ); assert( codec ); @@ -1818,24 +1818,24 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR kdDebug(5006) << "writePartIcon: PartNum: " << partNum << endl; - QString label = msgPart->fileName(); + TQString label = msgPart->fileName(); if( label.isEmpty() ) label = msgPart->name(); if( label.isEmpty() ) label = "unnamed"; label = KMMessage::quoteHtmlChars( label, true ); - QString comment = msgPart->contentDescription(); + TQString comment = msgPart->contentDescription(); comment = KMMessage::quoteHtmlChars( comment, true ); - if ( label == comment ) comment = QString::null; + if ( label == comment ) comment = TQString::null; - QString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum ); + TQString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum ); - QString href = fileName.isEmpty() ? - "part://" + QString::number( partNum + 1 ) : + TQString href = fileName.isEmpty() ? + "part://" + TQString::number( partNum + 1 ) : "file:" + KURL::encode_string( fileName ) ; - QString iconName; + TQString iconName; if( inlineImage ) iconName = href; else { @@ -1846,7 +1846,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR } } - QCString contentId = msgPart->contentId(); + TQCString contentId = msgPart->contentId(); if ( !contentId.isEmpty() ) { htmlWriter()->embedPart( contentId, href ); } @@ -1871,7 +1871,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR #define SIG_FRAME_COL_RED -1 #define SIG_FRAME_COL_YELLOW 0 #define SIG_FRAME_COL_GREEN 1 -QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol* cryptProto, +TQString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol* cryptProto, int status_code, GpgME::Signature::Summary summary, int& frameColor, @@ -1881,7 +1881,7 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol // used for CMS only but not for PGP signatures // pending(khz): Implement usage of these for PGP sigs as well. showKeyInfos = true; - QString result; + TQString result; if( cryptProto ) { if( cryptProto == Kleo::CryptoBackendFactory::instance()->openpgp() ) { // process enum according to it's definition to be read in @@ -1951,7 +1951,7 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol // we assume green, test for yellow or red (in this order!) frameColor = SIG_FRAME_COL_GREEN; - QString result2; + TQString result2; if( summary & GpgME::Signature::KeyExpired ){ // still is green! result2 += i18n("One key has expired."); @@ -2040,9 +2040,9 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol } -static QString writeSimpleSigstatHeader( const PartMetaData &block ) +static TQString writeSimpleSigstatHeader( const PartMetaData &block ) { - QString html; + TQString html; html += "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>"; if ( block.signClass == "signErr" ) { @@ -2050,10 +2050,10 @@ static QString writeSimpleSigstatHeader( const PartMetaData &block ) } else if ( block.signClass == "signOkKeyBad" || block.signClass == "signWarn" ) { html += i18n( "Not enough information to check signature validity." ); } else if ( block.signClass == "signOkKeyOk" ) { - QString addr; + TQString addr; if ( !block.signerMailAddresses.isEmpty() ) addr = block.signerMailAddresses.first(); - QString name = addr; + TQString name = addr; if ( name.isEmpty() ) name = block.signer; if ( addr.isEmpty() ) { @@ -2072,12 +2072,12 @@ static QString writeSimpleSigstatHeader( const PartMetaData &block ) return html; } -static QString beginVerboseSigstatHeader() +static TQString beginVerboseSigstatHeader() { return "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td rowspan=\"2\">"; } -static QString makeShowAuditLogLink( const QString & auditLog ) { +static TQString makeShowAuditLogLink( const TQString & auditLog ) { if ( auditLog.isEmpty() ) return i18n("No Audit Log available"); @@ -2089,9 +2089,9 @@ static QString makeShowAuditLogLink( const QString & auditLog ) { return "<a href=\"" + url.htmlURL() + "\">" + i18n("The Audit Log is a detailed error log from the gnupg backend", "Show Audit Log") + "</a>"; } -static QString endVerboseSigstatHeader( const PartMetaData & pmd ) +static TQString endVerboseSigstatHeader( const PartMetaData & pmd ) { - QString html; + TQString html; html += "</td><td align=\"right\" valign=\"top\" nowrap=\"nowrap\">"; html += "<a href=\"kmail:hideSignatureDetails\">"; html += i18n( "Hide Details" ); @@ -2102,24 +2102,24 @@ static QString endVerboseSigstatHeader( const PartMetaData & pmd ) return html; } -QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, +TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, const Kleo::CryptoBackend::Protocol * cryptProto, - const QString & fromAddress, - const QString & filename ) + const TQString & fromAddress, + const TQString & filename ) { const bool isSMIME = cryptProto && ( cryptProto == Kleo::CryptoBackendFactory::instance()->smime() ); - QString signer = block.signer; + TQString signer = block.signer; - QString htmlStr, simpleHtmlStr; - QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" ); - QString cellPadding("cellpadding=\"1\""); + TQString htmlStr, simpleHtmlStr; + TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); + TQString cellPadding("cellpadding=\"1\""); if( block.isEncapsulatedRfc822Message ) { htmlStr += "<table cellspacing=\"1\" "+cellPadding+" class=\"rfc822\">" "<tr class=\"rfc822H\"><td dir=\"" + dir + "\">"; if( !filename.isEmpty() ) - htmlStr += "<a href=\"" + QString("file:") + htmlStr += "<a href=\"" + TQString("file:") + KURL::encode_string( filename ) + "\">" + i18n("Encapsulated message") + "</a>"; else @@ -2143,7 +2143,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, simpleHtmlStr = htmlStr; if( block.isSigned ) { - QStringList& blockAddrs( block.signerMailAddresses ); + TQStringList& blockAddrs( block.signerMailAddresses ); // note: At the moment frameColor and showKeyInfos are // used for CMS only but not for PGP signatures // pending(khz): Implement usage of these for PGP sigs as well. @@ -2151,7 +2151,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, bool showKeyInfos; bool onlyShowKeyURL = false; bool cannotCheckSignature = true; - QString statusStr = sigStatusToString( cryptProto, + TQString statusStr = sigStatusToString( cryptProto, block.status_code, block.sigSummary, frameColor, @@ -2180,26 +2180,26 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, // note: Once we can start PGP key manager programs // from within KMail we could change this and // always show the URL. (khz, 2002/06/27) - QString startKeyHREF; + TQString startKeyHREF; if( isSMIME ) startKeyHREF = - QString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">") + TQString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">") .arg( cryptProto->displayName(), cryptProto->name(), block.keyId ); - QString keyWithWithoutURL + TQString keyWithWithoutURL = isSMIME - ? QString("%1%2</a>") + ? TQString("%1%2</a>") .arg( startKeyHREF, cannotCheckSignature ? i18n("[Details]") : ("0x" + block.keyId) ) - : "0x" + QString::fromUtf8( block.keyId ); + : "0x" + TQString::fromUtf8( block.keyId ); // temporary hack: always show key infos! showKeyInfos = true; // Sorry for using 'black' as null color but .isValid() - // checking with QColor default c'tor did not work for + // checking with TQColor default c'tor did not work for // some reason. if( isSMIME && (SIG_FRAME_COL_UNDEF != frameColor) ) { @@ -2226,9 +2226,9 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, block.signClass = "signOkKeyOk";//"signCMSGreen"; // extra hint for green case // that email addresses in DN do not match fromAddress - QString greenCaseWarning; - QString msgFrom( KPIM::getEmailAddress(fromAddress) ); - QString certificate; + TQString greenCaseWarning; + TQString msgFrom( KPIM::getEmailAddress(fromAddress) ); + TQString certificate; if( block.keyId.isEmpty() ) certificate = i18n("certificate"); else @@ -2253,7 +2253,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, // extract the mail addresses (without '<''>') // before including it into our string: bool bStart = true; - for(QStringList::ConstIterator it = blockAddrs.begin(); + for(TQStringList::ConstIterator it = blockAddrs.begin(); it != blockAddrs.end(); ++it ){ if( !bStart ) greenCaseWarning.append(", <br /> "); @@ -2278,7 +2278,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, break; } - QString frame = "<table cellspacing=\"1\" "+cellPadding+" " + TQString frame = "<table cellspacing=\"1\" "+cellPadding+" " "class=\"" + block.signClass + "\">" "<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">"; htmlStr += frame + beginVerboseSigstatHeader(); @@ -2299,7 +2299,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, signer = ""; else { if( !blockAddrs.empty() ){ - QString address = KMMessage::encodeMailtoUrl( blockAddrs.first() ); + TQString address = KMMessage::encodeMailtoUrl( blockAddrs.first() ); signer = "<a href=\"mailto:" + address + "\">" + signer + "</a>"; } } @@ -2311,7 +2311,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, htmlStr += i18n( "Message was signed by %1." ) .arg( signer ); } else { - QDateTime created = block.creationTime; + TQDateTime created = block.creationTime; if( created.isValid() ) { if( signer.isEmpty() ) { if( onlyShowKeyURL ) @@ -2363,7 +2363,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, if( block.signer.isEmpty() || block.technicalProblem ) { block.signClass = "signWarn"; - QString frame = "<table cellspacing=\"1\" "+cellPadding+" " + TQString frame = "<table cellspacing=\"1\" "+cellPadding+" " "class=\"" + block.signClass + "\">" "<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">"; htmlStr += frame + beginVerboseSigstatHeader(); @@ -2374,7 +2374,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, } else { if( !block.keyId.isEmpty() ) { - QDateTime created = block.creationTime; + TQDateTime created = block.creationTime; if ( created.isValid() ) htmlStr += i18n( "Message was signed on %1 with unknown key %2." ) .arg( KGlobal::locale()->formatDateTime( created ), @@ -2411,7 +2411,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, block.signClass = "signOkKeyBad"; else block.signClass = "signOkKeyOk"; - QString frame = "<table cellspacing=\"1\" "+cellPadding+" " + TQString frame = "<table cellspacing=\"1\" "+cellPadding+" " "class=\"" + block.signClass + "\">" "<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">"; htmlStr += frame + beginVerboseSigstatHeader(); @@ -2455,7 +2455,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, else { block.signClass = "signErr"; - QString frame = "<table cellspacing=\"1\" "+cellPadding+" " + TQString frame = "<table cellspacing=\"1\" "+cellPadding+" " "class=\"" + block.signClass + "\">" "<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">"; htmlStr += frame + beginVerboseSigstatHeader(); @@ -2483,11 +2483,11 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, return simpleHtmlStr; } -QString ObjectTreeParser::writeSigstatFooter( PartMetaData& block ) +TQString ObjectTreeParser::writeSigstatFooter( PartMetaData& block ) { - QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" ); + TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); - QString htmlStr; + TQString htmlStr; if (block.isSigned) { htmlStr += "</td></tr><tr class=\"" + block.signClass + "H\">"; @@ -2513,8 +2513,8 @@ QString ObjectTreeParser::writeSigstatFooter( PartMetaData& block ) } //----------------------------------------------------------------------------- -void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCodec, - const QString& fromAddress ) +void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *aCodec, + const TQString& fromAddress ) { KMMsgSignatureState dummy1; KMMsgEncryptionState dummy2; @@ -2522,8 +2522,8 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo } //----------------------------------------------------------------------------- -void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCodec, - const QString& fromAddress, +void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *aCodec, + const TQString& fromAddress, KMMsgSignatureState& inlineSignatureState, KMMsgEncryptionState& inlineEncryptionState, bool decorate ) @@ -2533,33 +2533,33 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo assert(pgp != 0); bool isPgpMessage = false; // true if the message contains at least one // PGP MESSAGE or one PGP SIGNED MESSAGE block - QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" ); - QString headerStr = QString("<div dir=\"%1\">").arg(dir); + TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); + TQString headerStr = TQString("<div dir=\"%1\">").arg(dir); inlineSignatureState = KMMsgNotSigned; inlineEncryptionState = KMMsgNotEncrypted; - QPtrList<Kpgp::Block> pgpBlocks; - QStrList nonPgpBlocks; + TQPtrList<Kpgp::Block> pgpBlocks; + TQStrList nonPgpBlocks; if( Kpgp::Module::prepareMessageForDecryption( aStr, pgpBlocks, nonPgpBlocks ) ) { bool isEncrypted = false, isSigned = false; bool fullySignedOrEncrypted = true; bool firstNonPgpBlock = true; bool couldDecrypt = false; - QString signer; - QCString keyId; - QString decryptionError; + TQString signer; + TQCString keyId; + TQString decryptionError; Kpgp::Validity keyTrust = Kpgp::KPGP_VALIDITY_FULL; - QPtrListIterator<Kpgp::Block> pbit( pgpBlocks ); + TQPtrListIterator<Kpgp::Block> pbit( pgpBlocks ); - QStrListIterator npbit( nonPgpBlocks ); + TQStrListIterator npbit( nonPgpBlocks ); - QString htmlStr; + TQString htmlStr; for( ; *pbit != 0; ++pbit, ++npbit ) { // insert the next Non-OpenPGP block - QCString str( *npbit ); + TQCString str( *npbit ); if( !str.isEmpty() ) { htmlStr += quotedHTML( aCodec->toUnicode( str ), decorate ); kdDebug( 5006 ) << "Non-empty Non-OpenPGP block found: '" << str @@ -2568,7 +2568,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo // block as fully signed/encrypted if( firstNonPgpBlock ) { // check whether str only consists of \n - for( QCString::ConstIterator c = str.begin(); *c; ++c ) { + for( TQCString::ConstIterator c = str.begin(); *c; ++c ) { if( *c != '\n' ) { fullySignedOrEncrypted = false; break; @@ -2660,7 +2660,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo } // add the last Non-OpenPGP block - QCString str( nonPgpBlocks.last() ); + TQCString str( nonPgpBlocks.last() ); if( !str.isEmpty() ) { htmlStr += quotedHTML( aCodec->toUnicode( str ), decorate ); // Even if the trailing Non-OpenPGP block isn't empty we still @@ -2682,7 +2682,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo } -QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) +TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) { assert( mReader ); assert( cssHelper() ); @@ -2691,16 +2691,16 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) if ( decorate && GlobalSettings::self()->showEmoticons() ) { convertFlags |= LinkLocator::ReplaceSmileys; } - QString htmlStr; - const QString normalStartTag = cssHelper()->nonQuotedFontTag(); - QString quoteFontTag[3]; - QString deepQuoteFontTag[3]; + TQString htmlStr; + const TQString normalStartTag = cssHelper()->nonQuotedFontTag(); + TQString quoteFontTag[3]; + TQString deepQuoteFontTag[3]; for ( int i = 0 ; i < 3 ; ++i ) { quoteFontTag[i] = cssHelper()->quoteFontTag( i ); deepQuoteFontTag[i] = cssHelper()->quoteFontTag( i+3 ); } - const QString normalEndTag = "</div>"; - const QString quoteEnd = "</div>"; + const TQString normalEndTag = "</div>"; + const TQString quoteEnd = "</div>"; unsigned int pos, beg; const unsigned int length = s.length(); @@ -2715,7 +2715,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) while (beg<length) { - QString line; + TQString line; /* search next occurrence of '\n' */ pos = s.find('\n', beg, FALSE); @@ -2757,7 +2757,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) } /* for() */ bool actHidden = false; - QString textExpand; + TQString textExpand; // This quoted line needs be hiden if (GlobalSettings::self()->showExpandQuotesMark() && mReader->mLevelQuote >= 0 @@ -2785,7 +2785,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) { //Expand all quotes htmlStr += "<div class=\"quotelevelmark\" >" ; - htmlStr += QString( "<a href=\"kmail:levelquote?%1 \">" + htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">" "<img src=\"%2\" alt=\"\" title=\"\"/></a>" ) .arg(-1) .arg( mExpandIcon ); @@ -2794,7 +2794,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) } }else { htmlStr += "<div class=\"quotelevelmark\" >" ; - htmlStr += QString( "<a href=\"kmail:levelquote?%1 \">" + htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">" "<img src=\"%2\" alt=\"\" title=\"\"/></a>" ) .arg(actQuoteLevel) .arg( mCollapseIcon); @@ -2821,9 +2821,9 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) // ignore ^M DOS linebreaks if( !line.replace('\015', "").isEmpty() ) { - htmlStr +=QString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" ); + htmlStr +=TQString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" ); htmlStr += LinkLocator::convertToHtml( line, convertFlags ); - htmlStr += QString( "</div>" ); + htmlStr += TQString( "</div>" ); } else htmlStr += "<br>"; @@ -2845,7 +2845,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) - const QTextCodec * ObjectTreeParser::codecFor( partNode * node ) const { + const TQTextCodec * ObjectTreeParser::codecFor( partNode * node ) const { assert( node ); if ( mReader && mReader->overrideCodec() ) return mReader->overrideCodec(); @@ -2857,10 +2857,10 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate ) size_t len ) { assert( filename ); - QFile f( filename ); + TQFile f( filename ); if ( f.open( IO_WriteOnly ) ) { if ( start ) { - QDataStream ds( &f ); + TQDataStream ds( &f ); ds.writeRawBytes( start, len ); } f.close(); // If data is 0 we just create a zero length file. diff --git a/kmail/objecttreeparser.h b/kmail/objecttreeparser.h index bcc137b0d..6a55462b6 100644 --- a/kmail/objecttreeparser.h +++ b/kmail/objecttreeparser.h @@ -35,7 +35,7 @@ #include "kmmsgbase.h" -#include <qcstring.h> +#include <tqcstring.h> #include <kleo/cryptobackend.h> #include <gpgmepp/verificationresult.h> @@ -110,13 +110,13 @@ namespace KMail { KMail::CSSHelper * cssHelper=0 ); virtual ~ObjectTreeParser(); - QCString rawReplyString() const { return mRawReplyString; } + TQCString rawReplyString() const { return mRawReplyString; } /*! @return the text of the message, ie. what would appear in the composer's text editor if this was edited. */ - QString textualContent() const { return mTextualContent; } + TQString textualContent() const { return mTextualContent; } - QCString textualContentCharset() const { return mTextualContentCharset; } + TQCString textualContentCharset() const { return mTextualContentCharset; } void setCryptoProtocol( const Kleo::CryptoBackend::Protocol * protocol ) { mCryptoProtocol = protocol; @@ -183,23 +183,23 @@ namespace KMail { find out if opaque data is signed or not. */ bool writeOpaqueOrMultipartSignedData( partNode * data, partNode & sign, - const QString & fromAddress, + const TQString & fromAddress, bool doCheck=true, - QCString * cleartextData=0, + TQCString * cleartextData=0, std::vector<GpgME::Signature> paramSignatures = std::vector<GpgME::Signature>(), bool hideErrors=false ); /** Returns the contents of the given multipart/encrypted object. Data is decypted. May contain body parts. */ bool okDecryptMIME( partNode& data, - QCString& decryptedData, + TQCString& decryptedData, bool& signatureFound, std::vector<GpgME::Signature> &signatures, bool showWarning, bool& passphraseError, bool& actuallyEncrypted, - QString& aErrorText, - QString& auditLog ); + TQString& aErrorText, + TQString& auditLog ); bool processMailmanMessage( partNode * node ); @@ -207,7 +207,7 @@ namespace KMail { we only check whether @p str contains 'xxx="http[s]:' where xxx is not href. Obfuscated external references are ignored on purpose. */ - static bool containsExternalReferences( const QCString & str ); + static bool containsExternalReferences( const TQCString & str ); public:// (during refactoring) @@ -229,42 +229,42 @@ namespace KMail { bool processApplicationMsTnefSubtype( partNode *node, ProcessResult &result ); private: - bool decryptChiasmus( const QByteArray& data, QByteArray& bodyDecoded, QString& errorText ); - void writeBodyString( const QCString & bodyString, - const QString & fromAddress, - const QTextCodec * codec, + bool decryptChiasmus( const TQByteArray& data, TQByteArray& bodyDecoded, TQString& errorText ); + void writeBodyString( const TQCString & bodyString, + const TQString & fromAddress, + const TQTextCodec * codec, ProcessResult & result, bool decorate ); void writePartIcon( KMMessagePart * msgPart, int partNumber, bool inlineImage=false ); - QString sigStatusToString( const Kleo::CryptoBackend::Protocol * cryptProto, + TQString sigStatusToString( const Kleo::CryptoBackend::Protocol * cryptProto, int status_code, GpgME::Signature::Summary summary, int & frameColor, bool & showKeyInfos ); - QString writeSigstatHeader( KMail::PartMetaData & part, + TQString writeSigstatHeader( KMail::PartMetaData & part, const Kleo::CryptoBackend::Protocol * cryptProto, - const QString & fromAddress, - const QString & filename = QString::null ); - QString writeSigstatFooter( KMail::PartMetaData & part ); + const TQString & fromAddress, + const TQString & filename = TQString::null ); + TQString writeSigstatFooter( KMail::PartMetaData & part ); - void writeBodyStr( const QCString & bodyString, - const QTextCodec * aCodec, - const QString & fromAddress, + void writeBodyStr( const TQCString & bodyString, + const TQTextCodec * aCodec, + const TQString & fromAddress, KMMsgSignatureState & inlineSignatureState, KMMsgEncryptionState & inlineEncryptionState, bool decorate ); public: // KMReaderWin still needs this... - void writeBodyStr( const QCString & bodyString, - const QTextCodec * aCodec, - const QString & fromAddress ); + void writeBodyStr( const TQCString & bodyString, + const TQTextCodec * aCodec, + const TQString & fromAddress ); private: /** Change the string to `quoted' html (meaning, that the quoted part of the message get italized */ - QString quotedHTML(const QString& pos, bool decorate); + TQString quotedHTML(const TQString& pos, bool decorate); - const QTextCodec * codecFor( partNode * node ) const; + const TQTextCodec * codecFor( partNode * node ) const; #ifdef MARCS_DEBUG void dumpToFile( const char * filename, const char * dataStart, size_t dataLen ); @@ -274,9 +274,9 @@ namespace KMail { private: KMReaderWin * mReader; - QCString mRawReplyString; - QCString mTextualContentCharset; - QString mTextualContent; + TQCString mRawReplyString; + TQCString mTextualContentCharset; + TQString mTextualContent; const Kleo::CryptoBackend::Protocol * mCryptoProtocol; bool mShowOnlyOneMimePart; bool mKeepEncryptions; @@ -285,8 +285,8 @@ namespace KMail { KMail::HtmlWriter * mHtmlWriter; KMail::CSSHelper * mCSSHelper; // DataUrl Icons cache - QString mCollapseIcon; - QString mExpandIcon; + TQString mCollapseIcon; + TQString mExpandIcon; }; } // namespace KMail diff --git a/kmail/partNode.cpp b/kmail/partNode.cpp index 4fd51c857..80e0545bf 100644 --- a/kmail/partNode.cpp +++ b/kmail/partNode.cpp @@ -35,7 +35,7 @@ #include <kdebug.h> #include "kmmimeparttree.h" #include <mimelib/utility.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kasciistricmp.h> #include "util.h" @@ -164,7 +164,7 @@ partNode::~partNode() { #ifndef NDEBUG void partNode::dump( int chars ) const { - kdDebug(5006) << QString().fill( ' ', chars ) << "+ " + kdDebug(5006) << TQString().fill( ' ', chars ) << "+ " << typeString() << '/' << subTypeString() << endl; if ( mChild ) mChild->dump( chars + 1 ); @@ -175,7 +175,7 @@ void partNode::dump( int chars ) const { void partNode::dump( int ) const {} #endif -const QCString & partNode::encodedBody() { +const TQCString & partNode::encodedBody() { if ( mEncodedOk ) return mEncodedBody; @@ -218,13 +218,13 @@ void partNode::buildObjectTree( bool processSiblings ) } } -QCString partNode::typeString() const { +TQCString partNode::typeString() const { DwString s; DwTypeEnumToStr( type(), s ); return s.c_str(); } -QCString partNode::subTypeString() const { +TQCString partNode::subTypeString() const { DwString s; DwSubtypeEnumToStr( subType(), s ); return s.c_str(); @@ -237,22 +237,22 @@ int partNode::childCount() const { return count; } -QString partNode::contentTypeParameter( const char * name ) const { +TQString partNode::contentTypeParameter( const char * name ) const { if ( !mDwPart || !mDwPart->hasHeaders() ) - return QString::null; + return TQString::null; DwHeaders & headers = mDwPart->Headers(); if ( !headers.HasContentType() ) - return QString::null; + return TQString::null; DwString attr = name; attr.ConvertToLowerCase(); for ( DwParameter * param = headers.ContentType().FirstParameter() ; param ; param = param->Next() ) { DwString this_attr = param->Attribute(); this_attr.ConvertToLowerCase(); // what a braindead design! if ( this_attr == attr ) - return QString::fromLatin1( param->Value().data(), param->Value().size() ); + return TQString::fromLatin1( param->Value().data(), param->Value().size() ); // warning: misses rfc2231 handling! } - return QString::null; + return TQString::null; } KMMsgEncryptionState partNode::overallEncryptionState() const @@ -441,9 +441,9 @@ partNode* partNode::findTypeNot( int type, int subType, bool deep, bool wide ) void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem, KMMimePartTree* mimePartTree, - QString labelDescr, - QString labelCntType, - QString labelEncoding, + TQString labelDescr, + TQString labelCntType, + TQString labelEncoding, KIO::filesize_t size, bool revertOrder ) { @@ -451,10 +451,10 @@ void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem, if( mNext ) mNext->fillMimePartTree( parentItem, mimePartTree, - QString::null, QString::null, QString::null, 0, + TQString::null, TQString::null, TQString::null, 0, revertOrder ); - QString cntDesc, cntType, cntEnc; + TQString cntDesc, cntType, cntEnc; KIO::filesize_t cntSize = 0; if( labelDescr.isEmpty() ) { @@ -492,7 +492,7 @@ void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem, cntSize = size; } // remove linebreak+whitespace from folded Content-Description - cntDesc.replace( QRegExp("\\n\\s*"), " " ); + cntDesc.replace( TQRegExp("\\n\\s*"), " " ); kdDebug(5006) << " Inserting one item into MimePartTree" << endl; kdDebug(5006) << " Content-Type: " << cntType << endl; @@ -514,7 +514,7 @@ kdDebug(5006) << " Content-Type: " << cntType << endl; mMimePartTreeItem->setOpen( true ); if( mChild ) mChild->fillMimePartTree( mMimePartTreeItem, 0, - QString::null, QString::null, QString::null, 0, + TQString::null, TQString::null, TQString::null, 0, revertOrder ); } @@ -603,7 +603,7 @@ bool partNode::hasContentDispositionInline() const return false; } -const QString& partNode::trueFromAddress() const +const TQString& partNode::trueFromAddress() const { const partNode* node = this; while( node->mFromAddress.isEmpty() && node->mRoot ) diff --git a/kmail/partNode.h b/kmail/partNode.h index 9ca76ebf0..d53977035 100644 --- a/kmail/partNode.h +++ b/kmail/partNode.h @@ -101,7 +101,7 @@ public: return mMsgPart; } - const QCString & encodedBody(); + const TQCString & encodedBody(); void setType( int type ) { mType = type; @@ -115,13 +115,13 @@ public: return mType; } - QCString typeString() const; + TQCString typeString() const; int subType() const { return mSubType; } - QCString subTypeString() const; + TQCString subTypeString() const; bool hasType( int type ) { return mType == type; @@ -164,9 +164,9 @@ public: void fillMimePartTree( KMMimePartTreeItem* parentItem, KMMimePartTree* mimePartTree, - QString labelDescr = QString::null, - QString labelCntType = QString::null, - QString labelEncoding = QString::null, + TQString labelDescr = TQString::null, + TQString labelCntType = TQString::null, + TQString labelEncoding = TQString::null, KIO::filesize_t size=0, bool revertOrder = false ); @@ -206,7 +206,7 @@ public: return mMimePartTreeItem; } - void setFromAddress( const QString& address ) { + void setFromAddress( const TQString& address ) { mFromAddress = address; } @@ -219,9 +219,9 @@ public: bool hasContentDispositionInline() const; - QString contentTypeParameter( const char * name ) const; + TQString contentTypeParameter( const char * name ) const; - const QString& trueFromAddress() const; + const TQString& trueFromAddress() const; partNode * parentNode() const { return mRoot; } partNode * nextSibling() const { return mNext; } @@ -243,8 +243,8 @@ private: private: DwBodyPart* mDwPart; // may be zero mutable KMMessagePart mMsgPart; // is valid - even if mDwPart is zero - QCString mEncodedBody; - QString mFromAddress; + TQCString mEncodedBody; + TQString mFromAddress; int mType; int mSubType; KMMsgEncryptionState mEncryptionState; diff --git a/kmail/partmetadata.h b/kmail/partmetadata.h index 84e7d1f15..1bc93d81e 100644 --- a/kmail/partmetadata.h +++ b/kmail/partmetadata.h @@ -20,9 +20,9 @@ #include <gpgmepp/verificationresult.h> #include <kpgp.h> -#include <qstring.h> -#include <qcstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqdatetime.h> namespace KMail { @@ -39,17 +39,17 @@ namespace KMail { { } GpgME::Signature::Summary sigSummary; - QString signClass; - QString signer; - QStringList signerMailAddresses; - QCString keyId; + TQString signClass; + TQString signer; + TQStringList signerMailAddresses; + TQCString keyId; Kpgp::Validity keyTrust; - QString status; // to be used for unknown plug-ins + TQString status; // to be used for unknown plug-ins int status_code; // to be used for i18n of OpenPGP and S/MIME CryptPlugs - QString errorText; - QDateTime creationTime; - QString decryptionError; - QString auditLog; + TQString errorText; + TQDateTime creationTime; + TQString decryptionError; + TQString auditLog; bool isSigned : 1; bool isGoodSignature : 1; bool isEncrypted : 1; diff --git a/kmail/partnodebodypart.cpp b/kmail/partnodebodypart.cpp index 50ec3cda4..37e37353f 100644 --- a/kmail/partnodebodypart.cpp +++ b/kmail/partnodebodypart.cpp @@ -35,45 +35,45 @@ #include "partNode.h" -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> static int serial = 0; -KMail::PartNodeBodyPart::PartNodeBodyPart( partNode & n, const QTextCodec * codec ) +KMail::PartNodeBodyPart::PartNodeBodyPart( partNode & n, const TQTextCodec * codec ) : KMail::Interface::BodyPart(), mPartNode( n ), mCodec( codec ), mDefaultDisplay( KMail::Interface::BodyPart::None ) {} -QString KMail::PartNodeBodyPart::makeLink( const QString & path ) const { +TQString KMail::PartNodeBodyPart::makeLink( const TQString & path ) const { static const int utf8 = 106; // FIXME: use a PRNG for the first arg, instead of a serial number - return QString( "x-kmail:/bodypart/%1/%2/%3" ) + return TQString( "x-kmail:/bodypart/%1/%2/%3" ) .arg( serial++ ).arg( mPartNode.nodeId() ) .arg( KURL::encode_string_no_slash( path, utf8 ) ); } -QString KMail::PartNodeBodyPart::asText() const { +TQString KMail::PartNodeBodyPart::asText() const { if ( mPartNode.type() != DwMime::kTypeText ) - return QString::null; + return TQString::null; return mPartNode.msgPart().bodyToUnicode( mCodec ); } -QByteArray KMail::PartNodeBodyPart::asBinary() const { +TQByteArray KMail::PartNodeBodyPart::asBinary() const { return mPartNode.msgPart().bodyDecodedBinary(); } -QString KMail::PartNodeBodyPart::contentTypeParameter( const char * param ) const { +TQString KMail::PartNodeBodyPart::contentTypeParameter( const char * param ) const { return mPartNode.contentTypeParameter( param ); } -QString KMail::PartNodeBodyPart::contentDescription() const { +TQString KMail::PartNodeBodyPart::contentDescription() const { return mPartNode.msgPart().contentDescription(); } -QString KMail::PartNodeBodyPart::contentDispositionParameter( const char * ) const { +TQString KMail::PartNodeBodyPart::contentDispositionParameter( const char * ) const { kdWarning( 5006 ) << "Sorry, not yet implemented: PartNodeBodyPart::contentDispositionParameter()" << endl; - return QString::null; + return TQString::null; } bool KMail::PartNodeBodyPart::hasCompleteBody() const { diff --git a/kmail/partnodebodypart.h b/kmail/partnodebodypart.h index 8421650ee..0694b3ca8 100644 --- a/kmail/partnodebodypart.h +++ b/kmail/partnodebodypart.h @@ -47,15 +47,15 @@ namespace KMail { */ class PartNodeBodyPart : public Interface::BodyPart { public: - PartNodeBodyPart( partNode & n, const QTextCodec * codec=0 ); + PartNodeBodyPart( partNode & n, const TQTextCodec * codec=0 ); - QString makeLink( const QString & path ) const; - QString asText() const; - QByteArray asBinary() const; - QString contentTypeParameter( const char * param ) const; - QString contentDescription() const; + TQString makeLink( const TQString & path ) const; + TQString asText() const; + TQByteArray asBinary() const; + TQString contentTypeParameter( const char * param ) const; + TQString contentDescription() const; //int contentDisposition() const; - QString contentDispositionParameter( const char * param ) const; + TQString contentDispositionParameter( const char * param ) const; bool hasCompleteBody() const; Interface::BodyPartMemento * memento() const; @@ -65,7 +65,7 @@ namespace KMail { private: partNode & mPartNode; - const QTextCodec * mCodec; + const TQTextCodec * mCodec; BodyPart::Display mDefaultDisplay; }; diff --git a/kmail/popaccount.cpp b/kmail/popaccount.cpp index ebe8bf48b..94dbf8a5e 100644 --- a/kmail/popaccount.cpp +++ b/kmail/popaccount.cpp @@ -47,13 +47,13 @@ using KPIM::BroadcastStatus; #include <kconfig.h> using KIO::MetaData; -#include <qstylesheet.h> +#include <tqstylesheet.h> static const unsigned short int pop3DefaultPort = 110; namespace KMail { //----------------------------------------------------------------------------- -PopAccount::PopAccount(AccountManager* aOwner, const QString& aAccountName, uint id) +PopAccount::PopAccount(AccountManager* aOwner, const TQString& aAccountName, uint id) : NetworkAccount(aOwner, aAccountName, id), headerIt(headersOnServer), processMsgsTimer( 0, "processMsgsTimer" ) @@ -72,10 +72,10 @@ PopAccount::PopAccount(AccountManager* aOwner, const QString& aAccountName, uint mUidsOfNextSeenMsgsDict.setAutoDelete( false ); headersOnServer.setAutoDelete(true); - connect(&processMsgsTimer,SIGNAL(timeout()),SLOT(slotProcessPendingMsgs())); + connect(&processMsgsTimer,TQT_SIGNAL(timeout()),TQT_SLOT(slotProcessPendingMsgs())); KIO::Scheduler::connect( - SIGNAL(slaveError(KIO::Slave *, int, const QString &)), - this, SLOT(slotSlaveError(KIO::Slave *, int, const QString &))); + TQT_SIGNAL(slaveError(KIO::Slave *, int, const TQString &)), + this, TQT_SLOT(slotSlaveError(KIO::Slave *, int, const TQString &))); mHeaderDeleteUids.clear(); mHeaderDownUids.clear(); @@ -96,12 +96,12 @@ PopAccount::~PopAccount() //----------------------------------------------------------------------------- -QString PopAccount::type(void) const +TQString PopAccount::type(void) const { return "pop"; } -QString PopAccount::protocol() const { +TQString PopAccount::protocol() const { return useSSL() ? POP_SSL_PROTOCOL : POP_PROTOCOL; } @@ -148,12 +148,12 @@ void PopAccount::processNewMail(bool _interactive) if ( (mAskAgain || passwd().isEmpty() || mLogin.isEmpty()) && mAuth != "GSSAPI" ) { - QString passwd = NetworkAccount::passwd(); + TQString passwd = NetworkAccount::passwd(); bool b = storePasswd(); if (KIO::PasswordDialog::getNameAndPassword(mLogin, passwd, &b, i18n("You need to supply a username and a password to access this " - "mailbox."), false, QString::null, mName, i18n("Account:")) - != QDialog::Accepted) + "mailbox."), false, TQString::null, mName, i18n("Account:")) + != TQDialog::Accepted) { checkDone( false, CheckAborted ); return; @@ -166,15 +166,15 @@ void PopAccount::processNewMail(bool _interactive) } } - QString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" + - mHost + ":" + QString("%1").arg(mPort) ); + TQString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" + + mHost + ":" + TQString("%1").arg(mPort) ); KConfig config( seenUidList ); - QStringList uidsOfSeenMsgs = config.readListEntry( "seenUidList" ); - QValueList<int> timeOfSeenMsgs = config.readIntListEntry( "seenUidTimeList" ); + TQStringList uidsOfSeenMsgs = config.readListEntry( "seenUidList" ); + TQValueList<int> timeOfSeenMsgs = config.readIntListEntry( "seenUidTimeList" ); mUidsOfSeenMsgsDict.clear(); mUidsOfSeenMsgsDict.resize( KMail::nextPrime( ( uidsOfSeenMsgs.count() * 11 ) / 10 ) ); int idx = 1; - for ( QStringList::ConstIterator it = uidsOfSeenMsgs.begin(); + for ( TQStringList::ConstIterator it = uidsOfSeenMsgs.begin(); it != uidsOfSeenMsgs.end(); ++it, idx++ ) { // we use mUidsOfSeenMsgsDict to just provide fast random access to the // keys, so we can store the index(+1) that corresponds to the index of @@ -183,7 +183,7 @@ void PopAccount::processNewMail(bool _interactive) } mTimeOfSeenMsgsVector.clear(); mTimeOfSeenMsgsVector.reserve( timeOfSeenMsgs.size() ); - for ( QValueList<int>::ConstIterator it = timeOfSeenMsgs.begin(); + for ( TQValueList<int>::ConstIterator it = timeOfSeenMsgs.begin(); it != timeOfSeenMsgs.end(); ++it) { mTimeOfSeenMsgsVector.append( *it ); } @@ -192,8 +192,8 @@ void PopAccount::processNewMail(bool _interactive) // them all as newly seen by clearing the seen times vector if ( mTimeOfSeenMsgsVector.count() != mUidsOfSeenMsgsDict.count() ) mTimeOfSeenMsgsVector.clear(); - QStringList downloadLater = config.readListEntry( "downloadLater" ); - for ( QStringList::Iterator it = downloadLater.begin(); it != downloadLater.end(); ++it ) { + TQStringList downloadLater = config.readListEntry( "downloadLater" ); + for ( TQStringList::Iterator it = downloadLater.begin(); it != downloadLater.end(); ++it ) { mHeaderLaterUids.insert( *it, true ); } mUidsOfNextSeenMsgsDict.clear(); @@ -286,12 +286,12 @@ void PopAccount::setFilterOnServerCheckSize(unsigned int aSize) //----------------------------------------------------------------------------- void PopAccount::connectJob() { KIO::Scheduler::assignJobToSlave(mSlave, job); - connect(job, SIGNAL( data( KIO::Job*, const QByteArray &)), - SLOT( slotData( KIO::Job*, const QByteArray &))); - connect(job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotResult( KIO::Job * ) ) ); - connect(job, SIGNAL(infoMessage( KIO::Job*, const QString & )), - SLOT( slotMsgRetrieved(KIO::Job*, const QString &))); + connect(job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)), + TQT_SLOT( slotData( KIO::Job*, const TQByteArray &))); + connect(job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotResult( KIO::Job * ) ) ); + connect(job, TQT_SIGNAL(infoMessage( KIO::Job*, const TQString & )), + TQT_SLOT( slotMsgRetrieved(KIO::Job*, const TQString &))); } @@ -313,9 +313,9 @@ void PopAccount::slotProcessPendingMsgs() mProcessing = true; bool addedOk; - QValueList<KMMessage*>::Iterator cur = msgsAwaitingProcessing.begin(); - QStringList::Iterator curId = msgIdsAwaitingProcessing.begin(); - QStringList::Iterator curUid = msgUidsAwaitingProcessing.begin(); + TQValueList<KMMessage*>::Iterator cur = msgsAwaitingProcessing.begin(); + TQStringList::Iterator curId = msgIdsAwaitingProcessing.begin(); + TQStringList::Iterator curUid = msgUidsAwaitingProcessing.begin(); while (cur != msgsAwaitingProcessing.end()) { // note we can actually end up processing events in processNewMsg @@ -353,8 +353,8 @@ void PopAccount::slotAbortRequested() { if (stage == Idle) return; if ( mMailCheckProgressItem ) - disconnect( mMailCheckProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), - this, SLOT( slotAbortRequested() ) ); + disconnect( mMailCheckProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), + this, TQT_SLOT( slotAbortRequested() ) ); stage = Quit; if (job) job->kill(); job = 0; @@ -397,15 +397,15 @@ void PopAccount::startJob() indexOfCurrentMsg = -1; Q_ASSERT( !mMailCheckProgressItem ); - QString escapedName = QStyleSheet::escape( mName ); + TQString escapedName = TQStyleSheet::escape( mName ); mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem( "MailCheck" + mName, escapedName, i18n("Preparing transmission from \"%1\"...").arg( escapedName ), true, // can be canceled useSSL() || useTLS() ); - connect( mMailCheckProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), - this, SLOT( slotAbortRequested() ) ); + connect( mMailCheckProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), + this, TQT_SLOT( slotAbortRequested() ) ); numBytes = 0; numBytesRead = 0; @@ -416,7 +416,7 @@ void PopAccount::startJob() slotSlaveError(0, KIO::ERR_CANNOT_LAUNCH_PROCESS, url.protocol()); return; } - url.setPath(QString("/index")); + url.setPath(TQString("/index")); job = KIO::get( url, false, false ); connectJob(); } @@ -441,7 +441,7 @@ MetaData PopAccount::slaveConfig() const { //----------------------------------------------------------------------------- // one message is finished // add data to a KMMessage -void PopAccount::slotMsgRetrieved(KIO::Job*, const QString & infoMsg) +void PopAccount::slotMsgRetrieved(KIO::Job*, const TQString & infoMsg) { if (infoMsg != "message complete") return; KMMessage *msg = new KMMessage; @@ -474,14 +474,14 @@ void PopAccount::slotMsgRetrieved(KIO::Job*, const QString & infoMsg) //----------------------------------------------------------------------------- // finit state machine to cycle trow the stages void PopAccount::slotJobFinished() { - QStringList emptyList; + TQStringList emptyList; if (stage == List) { kdDebug(5006) << k_funcinfo << "stage == List" << endl; // set the initial size of mUidsOfNextSeenMsgsDict to the number of // messages on the server + 10% mUidsOfNextSeenMsgsDict.resize( KMail::nextPrime( ( idsOfMsgs.count() * 11 ) / 10 ) ); KURL url = getUrl(); - url.setPath(QString("/uidl")); + url.setPath(TQString("/uidl")); job = KIO::get( url, false, false ); connectJob(); stage = Uidl; @@ -503,7 +503,7 @@ void PopAccount::slotJobFinished() { //check if filter on server if (mFilterOnServer == true) { - QMap<QString, int>::Iterator hids; + TQMap<TQString, int>::Iterator hids; for ( hids = mMsgsPendingDownload.begin(); hids != mMsgsPendingDownload.end(); hids++ ) { kdDebug(5006) << "Length: " << hids.data() << endl; @@ -535,7 +535,7 @@ void PopAccount::slotJobFinished() { if ((headersOnServer.count() > 0) && (mFilterOnServer == true)) { headerIt.toFirst(); KURL url = getUrl(); - QString headerIds; + TQString headerIds; while (headerIt.current()) { headerIds += headerIt.current()->id(); @@ -543,7 +543,7 @@ void PopAccount::slotJobFinished() { ++headerIt; } headerIt.toFirst(); - url.setPath(QString("/headers/") + headerIds); + url.setPath(TQString("/headers/") + headerIds); job = KIO::get( url, false, false ); connectJob(); slotGetNextHdr(); @@ -553,11 +553,11 @@ void PopAccount::slotJobFinished() { stage = Retr; numMsgs = mMsgsPendingDownload.count(); numBytesToRead = 0; - QMap<QString, int>::Iterator len; + TQMap<TQString, int>::Iterator len; for ( len = mMsgsPendingDownload.begin(); len != mMsgsPendingDownload.end(); len++ ) numBytesToRead += len.data(); - idsOfMsgs = QStringList( mMsgsPendingDownload.keys() ); + idsOfMsgs = TQStringList( mMsgsPendingDownload.keys() ); KURL url = getUrl(); url.setPath( "/download/" + idsOfMsgs.join(",") ); job = KIO::get( url, false, false ); @@ -649,11 +649,11 @@ void PopAccount::slotJobFinished() { stage = Retr; numMsgs = mMsgsPendingDownload.count(); numBytesToRead = 0; - QMap<QString, int>::Iterator len; + TQMap<TQString, int>::Iterator len; for (len = mMsgsPendingDownload.begin(); len != mMsgsPendingDownload.end(); len++) numBytesToRead += len.data(); - idsOfMsgs = QStringList( mMsgsPendingDownload.keys() ); + idsOfMsgs = TQStringList( mMsgsPendingDownload.keys() ); KURL url = getUrl(); url.setPath( "/download/" + idsOfMsgs.join(",") ); job = KIO::get( url, false, false ); @@ -673,7 +673,7 @@ void PopAccount::slotJobFinished() { kmkernel->folderMgr()->syncAllFolders(); KURL url = getUrl(); - QMap< QPair<time_t, QString>, int > idsToSave; + TQMap< QPair<time_t, TQString>, int > idsToSave; idsToSave.clear(); // Check if we want to keep any messages if ( mLeaveOnServer && !idsOfMsgsToDelete.isEmpty() ) { @@ -685,14 +685,14 @@ void PopAccount::slotJobFinished() { else if ( mLeaveOnServerDays > 0 && !mTimeOfNextSeenMsgsMap.isEmpty() ) { time_t timeLimit = time(0) - (86400 * mLeaveOnServerDays); kdDebug() << "timeLimit is " << timeLimit << endl; - QStringList::Iterator cur = idsOfMsgsToDelete.begin(); + TQStringList::Iterator cur = idsOfMsgsToDelete.begin(); for ( ; cur != idsOfMsgsToDelete.end(); ++cur) { time_t msgTime = mTimeOfNextSeenMsgsMap[mUidForIdMap[*cur]]; kdDebug() << "id: " << *cur << " msgTime: " << msgTime << endl; if (msgTime >= timeLimit || !mTimeOfNextSeenMsgsMap[mUidForIdMap[*cur]]) { kdDebug() << "Saving msg id " << *cur << endl; - QPair<time_t, QString> msg(msgTime, *cur); + QPair<time_t, TQString> msg(msgTime, *cur); idsToSave.insert( msg, 1 ); } } @@ -702,7 +702,7 @@ void PopAccount::slotJobFinished() { int numToDelete = idsToSave.count() - mLeaveOnServerCount; kdDebug() << "numToDelete is " << numToDelete << endl; if ( numToDelete > 0 && (unsigned)numToDelete < idsToSave.count() ) { - QMap< QPair<time_t, QString>, int >::Iterator cur = idsToSave.begin(); + TQMap< QPair<time_t, TQString>, int >::Iterator cur = idsToSave.begin(); for ( int deleted = 0; deleted < numToDelete && cur != idsToSave.end() ; deleted++, cur++ ) { kdDebug() << "deleting msg id " << cur.key().second << endl; @@ -715,7 +715,7 @@ void PopAccount::slotJobFinished() { // Delete more old messages until we're under mLeaveOnServerSize MBs if ( mLeaveOnServerSize > 0 ) { double sizeOnServer = 0; - QMap< QPair<time_t, QString>, int >::Iterator cur = idsToSave.begin(); + TQMap< QPair<time_t, TQString>, int >::Iterator cur = idsToSave.begin(); for ( ; cur != idsToSave.end(); cur++ ) { sizeOnServer += *mSizeOfNextSeenMsgsDict[ mUidForIdMap[ cur.key().second ] ]; @@ -730,7 +730,7 @@ void PopAccount::slotJobFinished() { } } // Save msgs from deletion - QMap< QPair<time_t, QString>, int >::Iterator it = idsToSave.begin(); + TQMap< QPair<time_t, TQString>, int >::Iterator it = idsToSave.begin(); kdDebug() << "Going to save " << idsToSave.count() << endl; for ( ; it != idsToSave.end(); ++it ) { kdDebug() << "saving msg id " << it.key().second << endl; @@ -762,7 +762,7 @@ void PopAccount::slotJobFinished() { "Fetched %n messages from %1. Terminating transmission...", numMsgs ) .arg( mHost ) ); - url.setPath(QString("/commit")); + url.setPath(TQString("/commit")); kdDebug(5006) << "url: " << url.prettyURL() << endl; } job = KIO::get( url, false, false ); @@ -771,7 +771,7 @@ void PopAccount::slotJobFinished() { else if (stage == Dele) { kdDebug(5006) << k_funcinfo << "stage == Dele" << endl; // remove the uids of all messages which have been deleted - for ( QStringList::ConstIterator it = idsOfMsgsToDelete.begin(); + for ( TQStringList::ConstIterator it = idsOfMsgsToDelete.begin(); it != idsOfMsgsToDelete.end(); ++it ) { mUidsOfNextSeenMsgsDict.remove( mUidForIdMap[*it] ); } @@ -783,7 +783,7 @@ void PopAccount::slotJobFinished() { numMsgs ) .arg( mHost ) ); KURL url = getUrl(); - url.setPath(QString("/commit")); + url.setPath(TQString("/commit")); job = KIO::get( url, false, false ); stage = Quit; connectJob(); @@ -833,19 +833,19 @@ void PopAccount::saveUidList() // a new list from the server if (!mUidlFinished) return; - QStringList uidsOfNextSeenMsgs; - QValueList<int> seenUidTimeList; - QDictIterator<int> it( mUidsOfNextSeenMsgsDict ); + TQStringList uidsOfNextSeenMsgs; + TQValueList<int> seenUidTimeList; + TQDictIterator<int> it( mUidsOfNextSeenMsgsDict ); for( ; it.current(); ++it ) { uidsOfNextSeenMsgs.append( it.currentKey() ); seenUidTimeList.append( mTimeOfNextSeenMsgsMap[it.currentKey()] ); } - QString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" + - mHost + ":" + QString("%1").arg(mPort) ); + TQString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" + + mHost + ":" + TQString("%1").arg(mPort) ); KConfig config( seenUidList ); config.writeEntry( "seenUidList", uidsOfNextSeenMsgs ); config.writeEntry( "seenUidTimeList", seenUidTimeList ); - config.writeEntry( "downloadLater", QStringList( mHeaderLaterUids.keys() ) ); + config.writeEntry( "downloadLater", TQStringList( mHeaderLaterUids.keys() ) ); config.sync(); } @@ -853,7 +853,7 @@ void PopAccount::saveUidList() //----------------------------------------------------------------------------- void PopAccount::slotGetNextMsg() { - QMap<QString, int>::Iterator next = mMsgsPendingDownload.begin(); + TQMap<TQString, int>::Iterator next = mMsgsPendingDownload.begin(); curMsgData.resize(0); numMsgBytesRead = 0; @@ -864,17 +864,17 @@ void PopAccount::slotGetNextMsg() if ( next != mMsgsPendingDownload.end() ) { // get the next message int nextLen = next.data(); - curMsgStrm = new QDataStream( curMsgData, IO_WriteOnly ); + curMsgStrm = new TQDataStream( curMsgData, IO_WriteOnly ); curMsgLen = nextLen; ++indexOfCurrentMsg; - kdDebug(5006) << QString("Length of message about to get %1").arg( nextLen ) << endl; + kdDebug(5006) << TQString("Length of message about to get %1").arg( nextLen ) << endl; mMsgsPendingDownload.remove( next.key() ); } } //----------------------------------------------------------------------------- -void PopAccount::slotData( KIO::Job* job, const QByteArray &data) +void PopAccount::slotData( KIO::Job* job, const TQByteArray &data) { if (data.size() == 0) { kdDebug(5006) << "Data: <End>" << endl; @@ -899,7 +899,7 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data) ( dataCounter % 5 == 0 || ( indexOfCurrentMsg + 1 == numMsgs && numMsgBytesRead == curMsgLen ) ) ) { - QString msg; + TQString msg; if (numBytes != numBytesToRead && mLeaveOnServer) { msg = i18n("Fetching message %1 of %2 (%3 of %4 KB) for %5@%6 " @@ -928,16 +928,16 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data) } // otherwise stage is List Or Uidl - QString qdata = data; + TQString qdata = data; qdata = qdata.simplifyWhiteSpace(); // Workaround for Maillennium POP3/UNIBOX int spc = qdata.find( ' ' ); if ( stage == List ) { if ( spc > 0 ) { - QString length = qdata.mid(spc+1); + TQString length = qdata.mid(spc+1); if (length.find(' ') != -1) length.truncate(length.find(' ')); int len = length.toInt(); numBytes += len; - QString id = qdata.left(spc); + TQString id = qdata.left(spc); idsOfMsgs.append( id ); mMsgsPendingDownload.insert( id, len ); } @@ -954,8 +954,8 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data) else { // stage == Uidl Q_ASSERT ( stage == Uidl); - QString id; - QString uid; + TQString id; + TQString uid; if ( spc <= 0 ) { // an invalid uidl line. we might just need to skip it, but @@ -972,11 +972,11 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data) } id.setNum (testid, 10); - QString datestring, serialstring; + TQString datestring, serialstring; serialstring.setNum ( ++dataCounter, 10 ); datestring.setNum ( time(NULL),10 ); - uid = QString( "uidlgen" ) + datestring + QString( "." ) + serialstring; + uid = TQString( "uidlgen" ) + datestring + TQString( "." ) + serialstring; kdDebug(5006) << "PopAccount::slotData message " << id.ascii() << "%d has bad UIDL, cannot keep a copy on server" << endl; idsOfForcedDeletes.append( id ); @@ -1042,7 +1042,7 @@ void PopAccount::slotResult( KIO::Job* ) //----------------------------------------------------------------------------- void PopAccount::slotSlaveError(KIO::Slave *aSlave, int error, - const QString &errorMsg) + const TQString &errorMsg) { if (aSlave != mSlave) return; if (error == KIO::ERR_SLAVE_DIED) mSlave = 0; @@ -1064,7 +1064,7 @@ void PopAccount::slotSlaveError(KIO::Slave *aSlave, int error, /* We need a timer, otherwise slotSlaveError of the next account is also executed, if it reuses the slave, because the slave member variable is changed too early */ - QTimer::singleShot(0, this, SLOT(slotCancel())); + TQTimer::singleShot(0, this, TQT_SLOT(slotCancel())); } //----------------------------------------------------------------------------- @@ -1075,7 +1075,7 @@ void PopAccount::slotGetNextHdr(){ delete curMsgStrm; curMsgStrm = 0; - curMsgStrm = new QDataStream( curMsgData, IO_WriteOnly ); + curMsgStrm = new TQDataStream( curMsgData, IO_WriteOnly ); } void PopAccount::killAllJobs( bool ) { diff --git a/kmail/popaccount.h b/kmail/popaccount.h index 718ac3165..840629a47 100644 --- a/kmail/popaccount.h +++ b/kmail/popaccount.h @@ -4,11 +4,11 @@ #include "networkaccount.h" -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qvaluevector.h> -#include <qtimer.h> -#include <qdict.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqvaluevector.h> +#include <tqtimer.h> +#include <tqdict.h> class KMPopHeaders; class KMMessage; @@ -37,7 +37,7 @@ public: /** A weak assignment operator */ virtual void pseudoAssign( const KMAccount * a ); - virtual QString protocol() const; + virtual TQString protocol() const; virtual unsigned short int defaultPort() const; /** @@ -88,7 +88,7 @@ public: /** * Inherited methods. */ - virtual QString type(void) const; + virtual TQString type(void) const; virtual void readConfig(KConfig&); virtual void writeConfig(KConfig&); virtual void processNewMail(bool _interactive); @@ -98,7 +98,7 @@ public: protected: enum Stage { Idle, List, Uidl, Head, Retr, Dele, Quit }; friend class ::AccountManager; - PopAccount(AccountManager* owner, const QString& accountName, uint id); + PopAccount(AccountManager* owner, const TQString& accountName, uint id); /** * Start a KIO Job to get a list of messages on the pop server @@ -131,38 +131,38 @@ protected: KIO::SimpleJob *job; //Map of ID's vs. sizes of messages which should be downloaded - QMap<QString, int> mMsgsPendingDownload; + TQMap<TQString, int> mMsgsPendingDownload; - QPtrList<KMPopHeaders> headersOnServer; - QPtrListIterator<KMPopHeaders> headerIt; + TQPtrList<KMPopHeaders> headersOnServer; + TQPtrListIterator<KMPopHeaders> headerIt; bool headers; - QMap<QString, bool> mHeaderDeleteUids; - QMap<QString, bool> mHeaderDownUids; - QMap<QString, bool> mHeaderLaterUids; - - QStringList idsOfMsgs; //used for ids and for count - QValueList<int> lensOfMsgs; - QMap<QString, QString> mUidForIdMap; // maps message ID (i.e. index on the server) to UID - QDict<int> mUidsOfSeenMsgsDict; // set of UIDs of previously seen messages (for fast lookup) - QDict<int> mUidsOfNextSeenMsgsDict; // set of UIDs of seen messages (for the next check) - QValueVector<int> mTimeOfSeenMsgsVector; // list of times of previously seen messages - QMap<QString, int> mTimeOfNextSeenMsgsMap; // map of uid to times of seen messages - QDict<int> mSizeOfNextSeenMsgsDict; - QStringList idsOfMsgsToDelete; - QStringList idsOfForcedDeletes; + TQMap<TQString, bool> mHeaderDeleteUids; + TQMap<TQString, bool> mHeaderDownUids; + TQMap<TQString, bool> mHeaderLaterUids; + + TQStringList idsOfMsgs; //used for ids and for count + TQValueList<int> lensOfMsgs; + TQMap<TQString, TQString> mUidForIdMap; // maps message ID (i.e. index on the server) to UID + TQDict<int> mUidsOfSeenMsgsDict; // set of UIDs of previously seen messages (for fast lookup) + TQDict<int> mUidsOfNextSeenMsgsDict; // set of UIDs of seen messages (for the next check) + TQValueVector<int> mTimeOfSeenMsgsVector; // list of times of previously seen messages + TQMap<TQString, int> mTimeOfNextSeenMsgsMap; // map of uid to times of seen messages + TQDict<int> mSizeOfNextSeenMsgsDict; + TQStringList idsOfMsgsToDelete; + TQStringList idsOfForcedDeletes; int indexOfCurrentMsg; - QValueList<KMMessage*> msgsAwaitingProcessing; - QStringList msgIdsAwaitingProcessing; - QStringList msgUidsAwaitingProcessing; + TQValueList<KMMessage*> msgsAwaitingProcessing; + TQStringList msgIdsAwaitingProcessing; + TQStringList msgUidsAwaitingProcessing; - QByteArray curMsgData; - QDataStream *curMsgStrm; + TQByteArray curMsgData; + TQDataStream *curMsgStrm; int curMsgLen; Stage stage; - QTimer processMsgsTimer; + TQTimer processMsgsTimer; int processingDelay; int numMsgs, numBytes, numBytesToRead, numBytesRead, numMsgBytesRead; bool interactive; @@ -193,12 +193,12 @@ protected slots: * A messages has been retrieved successfully. The next data belongs to the * next message. */ - void slotMsgRetrieved(KIO::Job*, const QString &); + void slotMsgRetrieved(KIO::Job*, const TQString &); /** * New data has arrived append it to the end of the current message */ - void slotData( KIO::Job*, const QByteArray &); + void slotData( KIO::Job*, const TQByteArray &); /** * Finished downloading the current kio job, either due to an error @@ -226,7 +226,7 @@ protected slots: /** * Slave error handling */ - void slotSlaveError(KIO::Slave *, int, const QString &); + void slotSlaveError(KIO::Slave *, int, const TQString &); /** * If there are more headers to be downloaded then start a new kio job diff --git a/kmail/quotajobs.cpp b/kmail/quotajobs.cpp index 5a6948d41..334e87e50 100644 --- a/kmail/quotajobs.cpp +++ b/kmail/quotajobs.cpp @@ -37,8 +37,8 @@ using namespace KMail; QuotaJobs::GetQuotarootJob* QuotaJobs::getQuotaroot( KIO::Slave* slave, const KURL& url ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'Q' << (int)'R' << url; GetQuotarootJob* job = new GetQuotarootJob( url, packedArgs, false ); @@ -47,36 +47,36 @@ QuotaJobs::GetQuotarootJob* QuotaJobs::getQuotaroot( } QuotaJobs::GetQuotarootJob::GetQuotarootJob( const KURL& url, - const QByteArray &packedArgs, + 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 QuotaJobs::GetQuotarootJob::slotInfoMessage( KIO::Job*, const QString& str ) +void QuotaJobs::GetQuotarootJob::slotInfoMessage( KIO::Job*, const TQString& str ) { // Parse the result - QStringList results = QStringList::split("\r", str); - QStringList roots; + TQStringList results = TQStringList::split("\r", str); + TQStringList roots; QuotaInfoList quotas; if ( results.size() > 0 ) { // the first line is the available roots - roots = QStringList::split(" ", results.front() ); + roots = TQStringList::split(" ", results.front() ); results.pop_front(); // the rest are pairs of root -> list of triplets while ( results.size() > 0 ) { - QString root = results.front(); results.pop_front(); + TQString root = results.front(); results.pop_front(); // and the quotas if ( results.size() > 0 ) { - QStringList triplets = QStringList::split(" ", results.front() ); + TQStringList triplets = TQStringList::split(" ", results.front() ); results.pop_front(); while ( triplets.size() > 0 ) { // there's always three, the label, current and max values - QString name = triplets.front(); triplets.pop_front(); - QString current = triplets.front(); triplets.pop_front(); - QString max = triplets.front(); triplets.pop_front(); + TQString name = triplets.front(); triplets.pop_front(); + TQString current = triplets.front(); triplets.pop_front(); + TQString max = triplets.front(); triplets.pop_front(); QuotaInfo info( name, root, current, max ); quotas.append( info ); } @@ -100,21 +100,21 @@ QuotaJobs::GetStorageQuotaJob* QuotaJobs::getStorageQuota( QuotaJobs::GetStorageQuotaJob::GetStorageQuotaJob( KIO::Slave* slave, const KURL& url ) : KIO::Job( false ) { - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int)'Q' << (int)'R' << url; QuotaJobs::GetQuotarootJob *job = new QuotaJobs::GetQuotarootJob( url, packedArgs, false ); - connect(job, SIGNAL(quotaInfoReceived(const QuotaInfoList&)), - SLOT(slotQuotaInfoReceived(const QuotaInfoList&))); - connect(job, SIGNAL(quotaRootResult(const QStringList&)), - SLOT(slotQuotarootResult(const QStringList&))); + connect(job, TQT_SIGNAL(quotaInfoReceived(const QuotaInfoList&)), + TQT_SLOT(slotQuotaInfoReceived(const QuotaInfoList&))); + connect(job, TQT_SIGNAL(quotaRootResult(const TQStringList&)), + TQT_SLOT(slotQuotarootResult(const TQStringList&))); KIO::Scheduler::assignJobToSlave( slave, job ); addSubjob( job ); } -void QuotaJobs::GetStorageQuotaJob::slotQuotarootResult( const QStringList& roots ) +void QuotaJobs::GetStorageQuotaJob::slotQuotarootResult( const TQStringList& roots ) { Q_UNUSED(roots); // we only support one for now if ( !mStorageQuotaInfo.isValid() && !error() ) { diff --git a/kmail/quotajobs.h b/kmail/quotajobs.h index 01112d46d..a27e70f8c 100644 --- a/kmail/quotajobs.h +++ b/kmail/quotajobs.h @@ -32,11 +32,11 @@ #ifndef QUOTAJOBS_H #define QUOTAJOBS_H -#include <qvariant.h> +#include <tqvariant.h> #include <kio/job.h> #include <klocale.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <math.h> @@ -49,7 +49,7 @@ namespace KMail { class QuotaInfo { public : QuotaInfo() {} // for QValueVector - QuotaInfo( const QString& _name, const QString& _root, const QVariant& _current, const QVariant& _max ) + QuotaInfo( const TQString& _name, const TQString& _root, const TQVariant& _current, const TQVariant& _max ) : mName( _name ), mRoot( _root ), mCurrent( _current ),mMax( _max ) {} bool operator==( const QuotaInfo & other ) const { return mName == other.mName && mRoot == other.mRoot && mMax == other.mMax && mCurrent == other.mCurrent; @@ -60,23 +60,23 @@ class QuotaInfo { bool isValid() const { return !mName.isEmpty(); } bool isEmpty() const { return mName.isEmpty() || ( mRoot.isEmpty() && !mCurrent.isValid() && !mMax.isValid() ); } - QString name() const { return mName; } - void setName( const QString& n ) { mName = n; } - QString root() const { return mRoot; } - void setRoot( const QString& r ) { mRoot = r; } - QVariant max() const { return mMax; } - void setMax( const QVariant& m ) { mMax = m; } - QVariant current() const { return mCurrent; } - void setCurrent( const QVariant& c ) { mCurrent = c; } + TQString name() const { return mName; } + void setName( const TQString& n ) { mName = n; } + TQString root() const { return mRoot; } + void setRoot( const TQString& r ) { mRoot = r; } + TQVariant max() const { return mMax; } + void setMax( const TQVariant& m ) { mMax = m; } + TQVariant current() const { return mCurrent; } + void setCurrent( const TQVariant& c ) { mCurrent = c; } - QString toString() const { + TQString toString() const { if ( isValid() && !isEmpty() ) { readConfig(); int factor = static_cast<int> ( pow( 1000, mFactor ) ); return i18n("%1 of %2 %3 used").arg( mCurrent.toInt() / factor ) .arg( mMax.toInt() / factor ).arg( mUnits ); } - return QString(); + return TQString(); } private: @@ -98,15 +98,15 @@ class QuotaInfo { } } - QString mName; // e.g. STORAGE - QString mRoot; /// e.g. INBOX - QVariant mCurrent; - QVariant mMax; - mutable QString mUnits; //used by readConfig (const) privately and is modified + TQString mName; // e.g. STORAGE + TQString mRoot; /// e.g. INBOX + TQVariant mCurrent; + TQVariant mMax; + mutable TQString mUnits; //used by readConfig (const) privately and is modified mutable int mFactor; }; -typedef QValueVector<QuotaInfo> QuotaInfoList; +typedef TQValueVector<QuotaInfo> QuotaInfoList; /** * This namespace contains functions that return jobs for quota operations. @@ -138,14 +138,14 @@ class GetQuotarootJob : public KIO::SimpleJob { Q_OBJECT public: - GetQuotarootJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo ); + GetQuotarootJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo ); signals: /** Emitted when the server returns a (potentially empty) list of * quota roots for the specified mailbox. * @param roots List of quota roots for the mailbox */ - void quotaRootResult( const QStringList& roots ); + void quotaRootResult( const TQStringList& roots ); /** * Emitted when the server returns a list of quota infos for the specified @@ -156,7 +156,7 @@ signals: void quotaInfoReceived( const QuotaInfoList& info ); protected slots: - void slotInfoMessage( KIO::Job*, const QString& ); + void slotInfoMessage( KIO::Job*, const TQString& ); }; /// for getStorageQuota() @@ -179,7 +179,7 @@ signals: protected slots: - void slotQuotarootResult( const QStringList& roots ); + void slotQuotarootResult( const TQStringList& roots ); void slotQuotaInfoReceived( const QuotaInfoList& roots ); private: QuotaInfo mStorageQuotaInfo; diff --git a/kmail/recipientseditor.cpp b/kmail/recipientseditor.cpp index 62e11b904..5ca2d7355 100644 --- a/kmail/recipientseditor.cpp +++ b/kmail/recipientseditor.cpp @@ -39,16 +39,16 @@ #include <kiconloader.h> #include <kmessagebox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qscrollview.h> -#include <qcombobox.h> -#include <qhbox.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qstylesheet.h> - -Recipient::Recipient( const QString &email, Recipient::Type type ) +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqscrollview.h> +#include <tqcombobox.h> +#include <tqhbox.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqstylesheet.h> + +Recipient::Recipient( const TQString &email, Recipient::Type type ) : mEmail( email ), mType( type ) { } @@ -63,12 +63,12 @@ Recipient::Type Recipient::type() const return mType; } -void Recipient::setEmail( const QString &email ) +void Recipient::setEmail( const TQString &email ) { mEmail = email; } -QString Recipient::email() const +TQString Recipient::email() const { return mEmail; } @@ -88,12 +88,12 @@ Recipient::Type Recipient::idToType( int id ) return static_cast<Type>( id ); } -QString Recipient::typeLabel() const +TQString Recipient::typeLabel() const { return typeLabel( mType ); } -QString Recipient::typeLabel( Recipient::Type type ) +TQString Recipient::typeLabel( Recipient::Type type ) { switch( type ) { case To: @@ -109,9 +109,9 @@ QString Recipient::typeLabel( Recipient::Type type ) return i18n("<Undefined RecipientType>"); } -QStringList Recipient::allTypeLabels() +TQStringList Recipient::allTypeLabels() { - QStringList types; + TQStringList types; types.append( typeLabel( To ) ); types.append( typeLabel( Cc ) ); types.append( typeLabel( Bcc ) ); @@ -119,19 +119,19 @@ QStringList Recipient::allTypeLabels() } -RecipientComboBox::RecipientComboBox( QWidget *parent ) - : QComboBox( parent ) +RecipientComboBox::RecipientComboBox( TQWidget *parent ) + : TQComboBox( parent ) { } -void RecipientComboBox::keyPressEvent( QKeyEvent *ev ) +void RecipientComboBox::keyPressEvent( TQKeyEvent *ev ) { if ( ev->key() == Key_Right ) emit rightPressed(); - else QComboBox::keyPressEvent( ev ); + else TQComboBox::keyPressEvent( ev ); } -void RecipientLineEdit::keyPressEvent( QKeyEvent *ev ) +void RecipientLineEdit::keyPressEvent( TQKeyEvent *ev ) { if ( ev->key() == Key_Backspace && text().isEmpty() ) { ev->accept(); @@ -145,40 +145,40 @@ void RecipientLineEdit::keyPressEvent( QKeyEvent *ev ) } } -RecipientLine::RecipientLine( QWidget *parent ) - : QWidget( parent ), mRecipientsCount( 0 ), mModified( false ) +RecipientLine::RecipientLine( TQWidget *parent ) + : TQWidget( parent ), mRecipientsCount( 0 ), mModified( false ) { - QBoxLayout *topLayout = new QHBoxLayout( this ); + TQBoxLayout *topLayout = new TQHBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); - QStringList recipientTypes = Recipient::allTypeLabels(); + TQStringList recipientTypes = Recipient::allTypeLabels(); mCombo = new RecipientComboBox( this ); mCombo->insertStringList( recipientTypes ); topLayout->addWidget( mCombo ); - QToolTip::add( mCombo, i18n("Select type of recipient") ); + TQToolTip::add( mCombo, i18n("Select type of recipient") ); mEdit = new RecipientLineEdit( this ); topLayout->addWidget( mEdit ); - connect( mEdit, SIGNAL( returnPressed() ), SLOT( slotReturnPressed() ) ); - connect( mEdit, SIGNAL( deleteMe() ), SLOT( slotPropagateDeletion() ) ); - connect( mEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( analyzeLine( const QString & ) ) ); - connect( mEdit, SIGNAL( focusUp() ), SLOT( slotFocusUp() ) ); - connect( mEdit, SIGNAL( focusDown() ), SLOT( slotFocusDown() ) ); - connect( mEdit, SIGNAL( rightPressed() ), SIGNAL( rightPressed() ) ); + connect( mEdit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotReturnPressed() ) ); + connect( mEdit, TQT_SIGNAL( deleteMe() ), TQT_SLOT( slotPropagateDeletion() ) ); + connect( mEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( analyzeLine( const TQString & ) ) ); + connect( mEdit, TQT_SIGNAL( focusUp() ), TQT_SLOT( slotFocusUp() ) ); + connect( mEdit, TQT_SIGNAL( focusDown() ), TQT_SLOT( slotFocusDown() ) ); + connect( mEdit, TQT_SIGNAL( rightPressed() ), TQT_SIGNAL( rightPressed() ) ); - connect( mEdit, SIGNAL( leftPressed() ), mCombo, SLOT( setFocus() ) ); - connect( mCombo, SIGNAL( rightPressed() ), mEdit, SLOT( setFocus() ) ); + connect( mEdit, TQT_SIGNAL( leftPressed() ), mCombo, TQT_SLOT( setFocus() ) ); + connect( mCombo, TQT_SIGNAL( rightPressed() ), mEdit, TQT_SLOT( setFocus() ) ); - connect( mCombo, SIGNAL( activated ( int ) ), - this, SLOT( slotTypeModified() ) ); + connect( mCombo, TQT_SIGNAL( activated ( int ) ), + this, TQT_SLOT( slotTypeModified() ) ); - mRemoveButton = new QPushButton( this ); + mRemoveButton = new TQPushButton( this ); mRemoveButton->setIconSet( KApplication::reverseLayout() ? SmallIconSet("locationbar_erase") : SmallIconSet( "clear_left" ) ); topLayout->addWidget( mRemoveButton ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( slotPropagateDeletion() ) ); - QToolTip::add( mRemoveButton, i18n("Remove recipient line") ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotPropagateDeletion() ) ); + TQToolTip::add( mRemoveButton, i18n("Remove recipient line") ); } void RecipientLine::slotFocusUp() @@ -198,9 +198,9 @@ void RecipientLine::slotTypeModified() emit typeModified( this ); } -void RecipientLine::analyzeLine( const QString &text ) +void RecipientLine::analyzeLine( const TQString &text ) { - QStringList r = KPIM::splitEmailAddrList( text ); + TQStringList r = KPIM::splitEmailAddrList( text ); if ( int( r.count() ) != mRecipientsCount ) { mRecipientsCount = r.count(); emit countChanged(); @@ -218,7 +218,7 @@ void RecipientLine::setRecipient( const Recipient &rec ) mCombo->setCurrentItem( Recipient::typeToId( rec.type() ) ); } -void RecipientLine::setRecipient( const QString &email ) +void RecipientLine::setRecipient( const TQString &email ) { setRecipient( Recipient( email ) ); } @@ -275,7 +275,7 @@ void RecipientLine::slotPropagateDeletion() emit deleteLine( this ); } -void RecipientLine::keyPressEvent( QKeyEvent *ev ) +void RecipientLine::keyPressEvent( TQKeyEvent *ev ) { if ( ev->key() == Key_Up ) { emit upPressed( this ); @@ -293,14 +293,14 @@ int RecipientLine::setComboWidth( int w ) return w; } -void RecipientLine::fixTabOrder( QWidget *previous ) +void RecipientLine::fixTabOrder( TQWidget *previous ) { setTabOrder( previous, mCombo ); setTabOrder( mCombo, mEdit ); setTabOrder( mEdit, mRemoveButton ); } -QWidget *RecipientLine::tabOut() const +TQWidget *RecipientLine::tabOut() const { return mRemoveButton; } @@ -318,8 +318,8 @@ void RecipientLine::setRemoveLineButtonEnabled( bool b ) // ------------ RecipientsView --------------------- -RecipientsView::RecipientsView( QWidget *parent ) - : QScrollView( parent ), mCurDelLine( 0 ), +RecipientsView::RecipientsView( TQWidget *parent ) + : TQScrollView( parent ), mCurDelLine( 0 ), mLineHeight( 0 ), mFirstColumnWidth( 0 ), mModified( false ) { @@ -328,8 +328,8 @@ RecipientsView::RecipientsView( QWidget *parent ) setLineWidth( 0 ); addLine(); - setResizePolicy( QScrollView::Manual ); - setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + setResizePolicy( TQScrollView::Manual ); + setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); viewport()->setPaletteBackgroundColor( paletteBackgroundColor() ); } @@ -355,20 +355,20 @@ RecipientLine *RecipientsView::addLine() addChild( line, 0, mLines.count() * mLineHeight ); line->mEdit->setCompletionMode( mCompletionMode ); line->show(); - connect( line, SIGNAL( returnPressed( RecipientLine * ) ), - SLOT( slotReturnPressed( RecipientLine * ) ) ); - connect( line, SIGNAL( upPressed( RecipientLine * ) ), - SLOT( slotUpPressed( RecipientLine * ) ) ); - connect( line, SIGNAL( downPressed( RecipientLine * ) ), - SLOT( slotDownPressed( RecipientLine * ) ) ); - connect( line, SIGNAL( rightPressed() ), SIGNAL( focusRight() ) ); - connect( line, SIGNAL( deleteLine( RecipientLine * ) ), - SLOT( slotDecideLineDeletion( RecipientLine * ) ) ); - connect( line, SIGNAL( countChanged() ), SLOT( calculateTotal() ) ); - connect( line, SIGNAL( typeModified( RecipientLine * ) ), - SLOT( slotTypeModified( RecipientLine * ) ) ); - connect( line->mEdit, SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ), - SLOT( setCompletionMode( KGlobalSettings::Completion ) ) ); + connect( line, TQT_SIGNAL( returnPressed( RecipientLine * ) ), + TQT_SLOT( slotReturnPressed( RecipientLine * ) ) ); + connect( line, TQT_SIGNAL( upPressed( RecipientLine * ) ), + TQT_SLOT( slotUpPressed( RecipientLine * ) ) ); + connect( line, TQT_SIGNAL( downPressed( RecipientLine * ) ), + TQT_SLOT( slotDownPressed( RecipientLine * ) ) ); + connect( line, TQT_SIGNAL( rightPressed() ), TQT_SIGNAL( focusRight() ) ); + connect( line, TQT_SIGNAL( deleteLine( RecipientLine * ) ), + TQT_SLOT( slotDecideLineDeletion( RecipientLine * ) ) ); + connect( line, TQT_SIGNAL( countChanged() ), TQT_SLOT( calculateTotal() ) ); + connect( line, TQT_SIGNAL( typeModified( RecipientLine * ) ), + TQT_SLOT( slotTypeModified( RecipientLine * ) ) ); + connect( line->mEdit, TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ), + TQT_SLOT( setCompletionMode( KGlobalSettings::Completion ) ) ); if ( mLines.last() ) { if ( mLines.count() == 1 ) { @@ -480,7 +480,7 @@ void RecipientsView::slotDecideLineDeletion( RecipientLine *line ) line->clear(); } else { mCurDelLine = line; - QTimer::singleShot( 0, this, SLOT( slotDeleteLine( ) ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteLine( ) ) ); } } @@ -536,7 +536,7 @@ void RecipientsView::resizeView() parentWidget()->layout()->activate(); emit sizeHintChanged(); - QTimer::singleShot( 0, this, SLOT(moveCompletionPopup()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(moveCompletionPopup()) ); } void RecipientsView::activateLine( RecipientLine *line ) @@ -545,7 +545,7 @@ void RecipientsView::activateLine( RecipientLine *line ) ensureVisible( 0, childY( line ) ); } -void RecipientsView::viewportResizeEvent ( QResizeEvent *ev ) +void RecipientsView::viewportResizeEvent ( TQResizeEvent *ev ) { for( uint i = 0; i < mLines.count(); ++i ) { mLines.at( i )->resize( ev->size().width(), mLineHeight ); @@ -553,25 +553,25 @@ void RecipientsView::viewportResizeEvent ( QResizeEvent *ev ) ensureVisible( 0, mLines.count() * mLineHeight ); } -QSize RecipientsView::sizeHint() const +TQSize RecipientsView::sizeHint() const { - return QSize( 200, mLineHeight * mLines.count() ); + return TQSize( 200, mLineHeight * mLines.count() ); } -QSize RecipientsView::minimumSizeHint() const +TQSize RecipientsView::minimumSizeHint() const { int height; uint numLines = 5; if ( mLines.count() < numLines ) height = mLineHeight * mLines.count(); else height = mLineHeight * numLines; - return QSize( 200, height ); + return TQSize( 200, height ); } Recipient::List RecipientsView::recipients() const { Recipient::List recipients; - QPtrListIterator<RecipientLine> it( mLines ); + TQPtrListIterator<RecipientLine> it( mLines ); RecipientLine *line; while( ( line = it.current() ) ) { if ( !line->recipient().isEmpty() ) { @@ -590,7 +590,7 @@ void RecipientsView::setCompletionMode ( KGlobalSettings::Completion mode ) return; mCompletionMode = mode; - QPtrListIterator<RecipientLine> it( mLines ); + TQPtrListIterator<RecipientLine> it( mLines ); RecipientLine *line; while( ( line = it.current() ) ) { line->mEdit->blockSignals( true ); @@ -601,11 +601,11 @@ void RecipientsView::setCompletionMode ( KGlobalSettings::Completion mode ) emit completionModeChanged( mode ); //report change to RecipientsEditor } -void RecipientsView::removeRecipient( const QString & recipient, +void RecipientsView::removeRecipient( const TQString & recipient, Recipient::Type type ) { // search a line which matches recipient and type - QPtrListIterator<RecipientLine> it( mLines ); + TQPtrListIterator<RecipientLine> it( mLines ); RecipientLine *line; while( ( line = it.current() ) ) { if ( ( line->recipient().email() == recipient ) && @@ -623,7 +623,7 @@ bool RecipientsView::isModified() if ( mModified ) return true; - QPtrListIterator<RecipientLine> it( mLines ); + TQPtrListIterator<RecipientLine> it( mLines ); RecipientLine *line; while( ( line = it.current() ) ) { if ( line->isModified() ) { @@ -639,7 +639,7 @@ void RecipientsView::clearModified() { mModified = false; - QPtrListIterator<RecipientLine> it( mLines ); + TQPtrListIterator<RecipientLine> it( mLines ); RecipientLine *line; while( ( line = it.current() ) ) { line->clearModified(); @@ -671,7 +671,7 @@ int RecipientsView::setFirstColumnWidth( int w ) { mFirstColumnWidth = w; - QPtrListIterator<RecipientLine> it( mLines ); + TQPtrListIterator<RecipientLine> it( mLines ); RecipientLine *line; while( ( line = it.current() ) ) { mFirstColumnWidth = line->setComboWidth( mFirstColumnWidth ); @@ -696,25 +696,25 @@ void RecipientsView::moveCompletionPopup() } -RecipientsToolTip::RecipientsToolTip( RecipientsView *view, QWidget *parent ) - : QToolTip( parent ), mView( view ) +RecipientsToolTip::RecipientsToolTip( RecipientsView *view, TQWidget *parent ) + : TQToolTip( parent ), mView( view ) { } -QString RecipientsToolTip::line( const Recipient &r ) +TQString RecipientsToolTip::line( const Recipient &r ) { - QString txt = r.email(); + TQString txt = r.email(); - return " " + QStyleSheet::escape( txt ) + "<br/>"; + return " " + TQStyleSheet::escape( txt ) + "<br/>"; } -void RecipientsToolTip::maybeTip( const QPoint & p ) +void RecipientsToolTip::maybeTip( const TQPoint & p ) { - QString text = "<qt>"; + TQString text = "<qt>"; - QString to; - QString cc; - QString bcc; + TQString to; + TQString cc; + TQString bcc; Recipient::List recipients = mView->recipients(); Recipient::List::ConstIterator it; @@ -740,21 +740,21 @@ void RecipientsToolTip::maybeTip( const QPoint & p ) text.append( "</qt>" ); - QRect geometry( p + QPoint( 2, 2 ), QPoint( 400, 100 ) ); + TQRect geometry( p + TQPoint( 2, 2 ), TQPoint( 400, 100 ) ); - tip( QRect( p.x() - 20, p.y() - 20, 40, 40 ), text, geometry ); + tip( TQRect( p.x() - 20, p.y() - 20, 40, 40 ), text, geometry ); } -SideWidget::SideWidget( RecipientsView *view, QWidget *parent ) - : QWidget( parent ), mView( view ), mRecipientPicker( 0 ) +SideWidget::SideWidget( RecipientsView *view, TQWidget *parent ) + : TQWidget( parent ), mView( view ), mRecipientPicker( 0 ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); topLayout->addStretch( 1 ); - mTotalLabel = new QLabel( this ); + mTotalLabel = new TQLabel( this ); mTotalLabel->setAlignment( AlignCenter ); topLayout->addWidget( mTotalLabel ); mTotalLabel->hide(); @@ -763,18 +763,18 @@ SideWidget::SideWidget( RecipientsView *view, QWidget *parent ) new RecipientsToolTip( view, mTotalLabel ); - mDistributionListButton = new QPushButton( i18n("Save List..."), this ); + mDistributionListButton = new TQPushButton( i18n("Save List..."), this ); topLayout->addWidget( mDistributionListButton ); mDistributionListButton->hide(); - connect( mDistributionListButton, SIGNAL( clicked() ), - SIGNAL( saveDistributionList() ) ); - QToolTip::add( mDistributionListButton, + connect( mDistributionListButton, TQT_SIGNAL( clicked() ), + TQT_SIGNAL( saveDistributionList() ) ); + TQToolTip::add( mDistributionListButton, i18n("Save recipients as distribution list") ); - mSelectButton = new QPushButton( i18n("Se&lect..."), this ); + mSelectButton = new TQPushButton( i18n("Se&lect..."), this ); topLayout->addWidget( mSelectButton ); - connect( mSelectButton, SIGNAL( clicked() ), SLOT( pickRecipient() ) ); - QToolTip::add( mSelectButton, i18n("Select recipients from address book") ); + connect( mSelectButton, TQT_SIGNAL( clicked() ), TQT_SLOT( pickRecipient() ) ); + TQToolTip::add( mSelectButton, i18n("Select recipients from address book") ); } SideWidget::~SideWidget() @@ -787,8 +787,8 @@ RecipientsPicker* SideWidget::picker() const // hacks to allow picker() to be const in the presence of lazy loading SideWidget *non_const_this = const_cast<SideWidget*>( this ); mRecipientPicker = new RecipientsPicker( non_const_this ); - connect( mRecipientPicker, SIGNAL( pickedRecipient( const Recipient & ) ), - non_const_this, SIGNAL( pickedRecipient( const Recipient & ) ) ); + connect( mRecipientPicker, TQT_SIGNAL( pickedRecipient( const Recipient & ) ), + non_const_this, TQT_SIGNAL( pickedRecipient( const Recipient & ) ) ); mPickerPositioner = new KWindowPositioner( non_const_this, mRecipientPicker ); } return mRecipientPicker; @@ -806,7 +806,7 @@ void SideWidget::setTotal( int recipients, int lines ) " lines: " << lines << endl; #endif - QString labelText; + TQString labelText; if ( recipients == 0 ) labelText = i18n("No recipients"); else labelText = i18n("1 recipient","%n recipients", recipients ); mTotalLabel->setText( labelText ); @@ -821,7 +821,7 @@ void SideWidget::setTotal( int recipients, int lines ) void SideWidget::pickRecipient() { #if 0 - QString rec = KInputDialog::getText( "Pick Recipient", + TQString rec = KInputDialog::getText( "Pick Recipient", "Email address of recipient" ); if ( !rec.isEmpty() ) emit pickedRecipient( rec ); #else @@ -835,33 +835,33 @@ void SideWidget::pickRecipient() } -RecipientsEditor::RecipientsEditor( QWidget *parent ) - : QWidget( parent ), mModified( false ) +RecipientsEditor::RecipientsEditor( TQWidget *parent ) + : TQWidget( parent ), mModified( false ) { - QBoxLayout *topLayout = new QHBoxLayout( this ); + TQBoxLayout *topLayout = new TQHBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); mRecipientsView = new RecipientsView( this ); topLayout->addWidget( mRecipientsView ); - connect( mRecipientsView, SIGNAL( focusUp() ), SIGNAL( focusUp() ) ); - connect( mRecipientsView, SIGNAL( focusDown() ), SIGNAL( focusDown() ) ); - connect( mRecipientsView, SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ), - SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ) ); + connect( mRecipientsView, TQT_SIGNAL( focusUp() ), TQT_SIGNAL( focusUp() ) ); + connect( mRecipientsView, TQT_SIGNAL( focusDown() ), TQT_SIGNAL( focusDown() ) ); + connect( mRecipientsView, TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ), + TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ) ); mSideWidget = new SideWidget( mRecipientsView, this ); topLayout->addWidget( mSideWidget ); - connect( mSideWidget, SIGNAL( pickedRecipient( const Recipient & ) ), - SLOT( slotPickedRecipient( const Recipient & ) ) ); - connect( mSideWidget, SIGNAL( saveDistributionList() ), - SLOT( saveDistributionList() ) ); + connect( mSideWidget, TQT_SIGNAL( pickedRecipient( const Recipient & ) ), + TQT_SLOT( slotPickedRecipient( const Recipient & ) ) ); + connect( mSideWidget, TQT_SIGNAL( saveDistributionList() ), + TQT_SLOT( saveDistributionList() ) ); - connect( mRecipientsView, SIGNAL( totalChanged( int, int ) ), - mSideWidget, SLOT( setTotal( int, int ) ) ); - connect( mRecipientsView, SIGNAL( focusRight() ), - mSideWidget, SLOT( setFocus() ) ); + connect( mRecipientsView, TQT_SIGNAL( totalChanged( int, int ) ), + mSideWidget, TQT_SLOT( setTotal( int, int ) ) ); + connect( mRecipientsView, TQT_SIGNAL( focusRight() ), + mSideWidget, TQT_SLOT( setFocus() ) ); - connect( mRecipientsView, SIGNAL(sizeHintChanged()), - SIGNAL(sizeHintChanged()) ); + connect( mRecipientsView, TQT_SIGNAL(sizeHintChanged()), + TQT_SIGNAL(sizeHintChanged()) ); } RecipientsEditor::~RecipientsEditor() @@ -899,15 +899,15 @@ Recipient::List RecipientsEditor::recipients() const return mRecipientsView->recipients(); } -void RecipientsEditor::setRecipientString( const QString &str, +void RecipientsEditor::setRecipientString( const TQString &str, Recipient::Type type ) { clear(); int count = 1; - QStringList r = KPIM::splitEmailAddrList( str ); - QStringList::ConstIterator it; + TQStringList r = KPIM::splitEmailAddrList( str ); + TQStringList::ConstIterator it; for( it = r.begin(); it != r.end(); ++it ) { if ( count++ > GlobalSettings::self()->maximumRecipients() ) { KMessageBox::sorry( this, @@ -920,9 +920,9 @@ void RecipientsEditor::setRecipientString( const QString &str, } } -QString RecipientsEditor::recipientString( Recipient::Type type ) +TQString RecipientsEditor::recipientString( Recipient::Type type ) { - QString str; + TQString str; Recipient::List recipients = mRecipientsView->recipients(); Recipient::List::ConstIterator it; @@ -936,7 +936,7 @@ QString RecipientsEditor::recipientString( Recipient::Type type ) return str; } -void RecipientsEditor::addRecipient( const QString & recipient, +void RecipientsEditor::addRecipient( const TQString & recipient, Recipient::Type type ) { RecipientLine *line = mRecipientsView->emptyLine(); @@ -944,7 +944,7 @@ void RecipientsEditor::addRecipient( const QString & recipient, line->setRecipient( Recipient( recipient, type ) ); } -void RecipientsEditor::removeRecipient( const QString & recipient, +void RecipientsEditor::removeRecipient( const TQString & recipient, Recipient::Type type ) { mRecipientsView->removeRecipient( recipient, type ); diff --git a/kmail/recipientseditor.h b/kmail/recipientseditor.h index 91adee7d0..92b5165f2 100644 --- a/kmail/recipientseditor.h +++ b/kmail/recipientseditor.h @@ -24,14 +24,14 @@ #ifndef RECIPIENTSEDITOR_H #define RECIPIENTSEDITOR_H -#include <qwidget.h> -#include <qscrollview.h> -#include <qguardedptr.h> -#include <qlineedit.h> -#include <qtooltip.h> +#include <tqwidget.h> +#include <tqscrollview.h> +#include <tqguardedptr.h> +#include <tqlineedit.h> +#include <tqtooltip.h> #include "kmlineeditspell.h" -#include <qcombobox.h> +#include <tqcombobox.h> class RecipientsPicker; @@ -44,28 +44,28 @@ class SideWidget; class Recipient { public: - typedef QValueList<Recipient> List; + typedef TQValueList<Recipient> List; enum Type { To, Cc, Bcc, Undefined }; - Recipient( const QString &email = QString::null, Type type = To ); + Recipient( const TQString &email = TQString::null, Type type = To ); void setType( Type ); Type type() const; - void setEmail( const QString & ); - QString email() const; + void setEmail( const TQString & ); + TQString email() const; bool isEmpty() const; static int typeToId( Type ); static Type idToType( int ); - QString typeLabel() const; static QString typeLabel( Type ); - static QStringList allTypeLabels(); + TQString typeLabel() const; static TQString typeLabel( Type ); + static TQStringList allTypeLabels(); private: - QString mEmail; + TQString mEmail; Type mType; }; @@ -73,20 +73,20 @@ class RecipientComboBox : public QComboBox { Q_OBJECT public: - RecipientComboBox( QWidget *parent ); + RecipientComboBox( TQWidget *parent ); signals: void rightPressed(); protected: - void keyPressEvent( QKeyEvent *ev ); + void keyPressEvent( TQKeyEvent *ev ); }; class RecipientLineEdit : public KMLineEdit { Q_OBJECT public: - RecipientLineEdit( QWidget * parent ) : + RecipientLineEdit( TQWidget * parent ) : KMLineEdit( true, parent ) {} signals: @@ -95,14 +95,14 @@ class RecipientLineEdit : public KMLineEdit void rightPressed(); protected: - void keyPressEvent( QKeyEvent *ev ); + void keyPressEvent( TQKeyEvent *ev ); }; class RecipientLine : public QWidget { Q_OBJECT public: - RecipientLine( QWidget *parent ); + RecipientLine( TQWidget *parent ); void setRecipient( const Recipient & ); Recipient recipient() const; @@ -110,7 +110,7 @@ class RecipientLine : public QWidget void setRecipientType( Recipient::Type ); Recipient::Type recipientType() const; - void setRecipient( const QString & ); + void setRecipient( const TQString & ); void activate(); bool isActive(); @@ -128,8 +128,8 @@ class RecipientLine : public QWidget int setComboWidth( int w ); - void fixTabOrder( QWidget *previous ); - QWidget *tabOut() const; + void fixTabOrder( TQWidget *previous ); + TQWidget *tabOut() const; void clear(); @@ -147,12 +147,12 @@ class RecipientLine : public QWidget void typeModified( RecipientLine * ); protected: - void keyPressEvent( QKeyEvent * ); + void keyPressEvent( TQKeyEvent * ); RecipientLineEdit* lineEdit() const { return mEdit; } protected slots: void slotReturnPressed(); - void analyzeLine( const QString & ); + void analyzeLine( const TQString & ); void slotFocusUp(); void slotFocusDown(); void slotPropagateDeletion(); @@ -160,9 +160,9 @@ class RecipientLine : public QWidget private: friend class RecipientsView; - QComboBox *mCombo; + TQComboBox *mCombo; RecipientLineEdit *mEdit; - QPushButton *mRemoveButton; + TQPushButton *mRemoveButton; int mRecipientsCount; bool mModified; }; @@ -171,10 +171,10 @@ class RecipientsView : public QScrollView { Q_OBJECT public: - RecipientsView( QWidget *parent ); + RecipientsView( TQWidget *parent ); - QSize minimumSizeHint() const; - QSize sizeHint() const; + TQSize minimumSizeHint() const; + TQSize sizeHint() const; RecipientLine *activeLine(); @@ -186,7 +186,7 @@ class RecipientsView : public QScrollView @param recipient The recipient(s) you want to remove. @param type The recipient type. */ - void removeRecipient( const QString & recipient, Recipient::Type type ); + void removeRecipient( const TQString & recipient, Recipient::Type type ); /** Returns true if the user has made any modifications to the list of recipients. @@ -224,7 +224,7 @@ class RecipientsView : public QScrollView void sizeHintChanged(); protected: - void viewportResizeEvent( QResizeEvent * ); + void viewportResizeEvent( TQResizeEvent * ); void resizeView(); protected slots: @@ -238,8 +238,8 @@ class RecipientsView : public QScrollView void moveCompletionPopup(); private: - QPtrList<RecipientLine> mLines; - QGuardedPtr<RecipientLine> mCurDelLine; + TQPtrList<RecipientLine> mLines; + TQGuardedPtr<RecipientLine> mCurDelLine; int mLineHeight; int mFirstColumnWidth; bool mModified; @@ -249,12 +249,12 @@ class RecipientsView : public QScrollView class RecipientsToolTip : public QToolTip { public: - RecipientsToolTip( RecipientsView *, QWidget *parent ); + RecipientsToolTip( RecipientsView *, TQWidget *parent ); protected: - void maybeTip( const QPoint & p ); + void maybeTip( const TQPoint & p ); - QString line( const Recipient & ); + TQString line( const Recipient & ); private: RecipientsView *mView; @@ -264,7 +264,7 @@ class SideWidget : public QWidget { Q_OBJECT public: - SideWidget( RecipientsView *view, QWidget *parent ); + SideWidget( RecipientsView *view, TQWidget *parent ); ~SideWidget(); RecipientsPicker* picker() const; @@ -281,9 +281,9 @@ class SideWidget : public QWidget private: RecipientsView *mView; - QLabel *mTotalLabel; - QPushButton *mDistributionListButton; - QPushButton *mSelectButton; + TQLabel *mTotalLabel; + TQPushButton *mDistributionListButton; + TQPushButton *mSelectButton; /** The RecipientsPicker is lazy loaded, never access it directly, only through picker() */ mutable RecipientsPicker *mRecipientPicker; @@ -295,7 +295,7 @@ class RecipientsEditor : public QWidget { Q_OBJECT public: - RecipientsEditor( QWidget *parent ); + RecipientsEditor( TQWidget *parent ); ~RecipientsEditor(); void clear(); @@ -303,20 +303,20 @@ class RecipientsEditor : public QWidget Recipient::List recipients() const; RecipientsPicker* picker() const; - void setRecipientString( const QString &, Recipient::Type ); - QString recipientString( Recipient::Type ); + void setRecipientString( const TQString &, Recipient::Type ); + TQString recipientString( Recipient::Type ); /** Adds a recipient (or multiple recipients) to one line of the editor. @param recipient The recipient(s) you want to add. @param type The recipient type. */ - void addRecipient( const QString & recipient, Recipient::Type type ); + void addRecipient( const TQString & recipient, Recipient::Type type ); /** Removes the recipient provided it can be found and has the given type. @param recipient The recipient(s) you want to remove. @param type The recipient type. */ - void removeRecipient( const QString & recipient, Recipient::Type type ); + void removeRecipient( const TQString & recipient, Recipient::Type type ); /** Returns true if the user has made any modifications to the list of recipients. diff --git a/kmail/recipientseditortest.cpp b/kmail/recipientseditortest.cpp index 2455fdba0..44df528c9 100644 --- a/kmail/recipientseditortest.cpp +++ b/kmail/recipientseditortest.cpp @@ -33,22 +33,22 @@ #include <kmessagebox.h> #include "aboutdata.h" -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qtextedit.h> - -Composer::Composer( QWidget *parent ) - : QWidget( parent ) +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqtextedit.h> + +Composer::Composer( TQWidget *parent ) + : TQWidget( parent ) { - QGridLayout *topLayout = new QGridLayout( this ); + TQGridLayout *topLayout = new TQGridLayout( this ); topLayout->setMargin( 4 ); topLayout->setSpacing( 4 ); - QLabel *label = new QLabel( "From:", this ); + TQLabel *label = new TQLabel( "From:", this ); topLayout->addWidget( label, 0, 0 ); - QLineEdit *edit = new QLineEdit( this ); + TQLineEdit *edit = new TQLineEdit( this ); topLayout->addWidget( edit, 0, 1 ); mRecipients = new RecipientsEditor( this ); @@ -58,19 +58,19 @@ Composer::Composer( QWidget *parent ) // mRecipients->setFixedHeight( 10 ); - QTextEdit *editor = new QTextEdit( this ); + TQTextEdit *editor = new TQTextEdit( this ); topLayout->addMultiCellWidget( editor, 2, 2, 0, 1 ); topLayout->setRowStretch( 2, 1 ); - QPushButton *button = new QPushButton( "&Close", this ); + TQPushButton *button = new TQPushButton( "&Close", this ); topLayout->addMultiCellWidget( button, 3, 3, 0, 1 ); - connect( button, SIGNAL( clicked() ), SLOT( slotClose() ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClose() ) ); } void Composer::slotClose() { #if 0 - QString text; + TQString text; text += "<qt>"; @@ -96,9 +96,9 @@ int main( int argc, char **argv ) KApplication app; - QObject::connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) ); + TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); - QWidget *wid = new Composer( 0 ); + TQWidget *wid = new Composer( 0 ); wid->show(); diff --git a/kmail/recipientseditortest.h b/kmail/recipientseditortest.h index 5a24c4e66..be468e833 100644 --- a/kmail/recipientseditortest.h +++ b/kmail/recipientseditortest.h @@ -24,7 +24,7 @@ #ifndef RECIPIENTSEDITORTEST_H #define RECIPIENTSEDITORTEST_H -#include <qwidget.h> +#include <tqwidget.h> class RecipientsEditor; @@ -32,7 +32,7 @@ class Composer : public QWidget { Q_OBJECT public: - Composer( QWidget *parent ); + Composer( TQWidget *parent ); public slots: void slotClose(); diff --git a/kmail/recipientspicker.cpp b/kmail/recipientspicker.cpp index 7f0d8fa36..839898cbf 100644 --- a/kmail/recipientspicker.cpp +++ b/kmail/recipientspicker.cpp @@ -40,11 +40,11 @@ #include <kwin.h> #include <kmessagebox.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqtoolbutton.h> +#include <tqlabel.h> #ifdef KDEPIM_NEW_DISTRLISTS RecipientItem::RecipientItem( KABC::AddressBook *ab ) @@ -95,15 +95,15 @@ void RecipientItem::setDistributionList( KABC::DistributionList *list ) #endif void RecipientItem::setAddressee( const KABC::Addressee &a, - const QString &email ) + const TQString &email ) { mAddressee = a; mEmail = email; mRecipient = mAddressee.fullEmail( mEmail ); - QImage img = a.photo().data(); + TQImage img = a.photo().data(); if ( !img.isNull() ) - mIcon = img.smoothScale( 20, 20, QImage::ScaleMin ); + mIcon = img.smoothScale( 20, 20, TQImage::ScaleMin ); else mIcon = KGlobal::iconLoader()->loadIcon( "personal", KIcon::Small ); @@ -117,27 +117,27 @@ void RecipientItem::setAddressee( const KABC::Addressee &a, mTooltip += "<b>" + mEmail + "</b>"; } -QPixmap RecipientItem::icon() const +TQPixmap RecipientItem::icon() const { return mIcon; } -QString RecipientItem::name() const +TQString RecipientItem::name() const { return mName; } -QString RecipientItem::email() const +TQString RecipientItem::email() const { return mEmail; } -QString RecipientItem::recipient() const +TQString RecipientItem::recipient() const { return mRecipient; } -QString RecipientItem::tooltip() const +TQString RecipientItem::tooltip() const { return mTooltip; } @@ -153,9 +153,9 @@ KABC::DistributionList * RecipientItem::distributionList() { #endif #ifdef KDEPIM_NEW_DISTRLISTS -QString RecipientItem::createTooltip( KPIM::DistributionList &distributionList ) const +TQString RecipientItem::createTooltip( KPIM::DistributionList &distributionList ) const { - QString txt = "<qt>"; + TQString txt = "<qt>"; txt += "<b>" + i18n( "Distribution List %1" ).arg ( distributionList.name() ) + "</b>"; txt += "<ul>"; @@ -176,9 +176,9 @@ QString RecipientItem::createTooltip( KPIM::DistributionList &distributionList ) return txt; } #else -QString RecipientItem::createTooltip( KABC::DistributionList *distributionList ) const +TQString RecipientItem::createTooltip( KABC::DistributionList *distributionList ) const { - QString txt = "<qt>"; + TQString txt = "<qt>"; txt += "<b>" + i18n("Distribution List %1" ).arg ( distributionList->name() ) + "</b>"; txt += "<ul>"; @@ -200,12 +200,12 @@ QString RecipientItem::createTooltip( KABC::DistributionList *distributionList ) } #endif -void RecipientItem::setRecipientType( const QString &type ) +void RecipientItem::setRecipientType( const TQString &type ) { mType = type; } -QString RecipientItem::recipientType() const +TQString RecipientItem::recipientType() const { return mType; } @@ -227,22 +227,22 @@ RecipientItem *RecipientViewItem::recipientItem() const } -RecipientsListToolTip::RecipientsListToolTip( QWidget *parent, +RecipientsListToolTip::RecipientsListToolTip( TQWidget *parent, KListView *listView ) - : QToolTip( parent ) + : TQToolTip( parent ) { mListView = listView; } -void RecipientsListToolTip::maybeTip( const QPoint & pos ) +void RecipientsListToolTip::maybeTip( const TQPoint & pos ) { - QRect r; - QListViewItem *item = mListView->itemAt( pos ); + TQRect r; + TQListViewItem *item = mListView->itemAt( pos ); RecipientViewItem *i = static_cast<RecipientViewItem *>( item ); if( item ) { r = mListView->itemRect( item ); - QString tipText( i->recipientItem()->tooltip() ); + TQString tipText( i->recipientItem()->tooltip() ); if ( !tipText.isEmpty() ) { tip( r, tipText ); } @@ -250,7 +250,7 @@ void RecipientsListToolTip::maybeTip( const QPoint & pos ) } -RecipientsCollection::RecipientsCollection( const QString &id ) +RecipientsCollection::RecipientsCollection( const TQString &id ) { mId = id; mTitle = id; @@ -272,12 +272,12 @@ bool RecipientsCollection::isReferenceContainer() const return mIsReferenceContainer; } -void RecipientsCollection::setTitle( const QString &title ) +void RecipientsCollection::setTitle( const TQString &title ) { mTitle = title; } -QString RecipientsCollection::title() const +TQString RecipientsCollection::title() const { return mTitle; } @@ -299,7 +299,7 @@ bool RecipientsCollection::hasEquivalentItem( RecipientItem *item ) const RecipientItem * RecipientsCollection::getEquivalentItem( RecipientItem *item) const { - QMap<QString, RecipientItem *>::ConstIterator it; + TQMap<TQString, RecipientItem *>::ConstIterator it; it = mKeyMap.find( item->key() ); if ( it == mKeyMap.end() ) return 0; @@ -314,7 +314,7 @@ void RecipientsCollection::clear() void RecipientsCollection::deleteAll() { if ( !isReferenceContainer() ) { - QMap<QString, RecipientItem *>::ConstIterator it; + TQMap<TQString, RecipientItem *>::ConstIterator it; for( it = mKeyMap.begin(); it != mKeyMap.end(); ++it ) { delete *it; } @@ -322,17 +322,17 @@ void RecipientsCollection::deleteAll() clear(); } -QString RecipientsCollection::id() const +TQString RecipientsCollection::id() const { return mId; } -SearchLine::SearchLine( QWidget *parent, KListView *listView ) +SearchLine::SearchLine( TQWidget *parent, KListView *listView ) : KListViewSearchLine( parent, listView ) { } -void SearchLine::keyPressEvent( QKeyEvent *ev ) +void SearchLine::keyPressEvent( TQKeyEvent *ev ) { if ( ev->key() == Key_Down ) emit downPressed(); @@ -340,8 +340,8 @@ void SearchLine::keyPressEvent( QKeyEvent *ev ) } -RecipientsPicker::RecipientsPicker( QWidget *parent ) - : QDialog( parent, "RecipientsPicker" ) +RecipientsPicker::RecipientsPicker( TQWidget *parent ) + : TQDialog( parent, "RecipientsPicker" ) #ifndef KDEPIM_NEW_DISTRLISTS , mDistributionListManager( 0 ) #endif @@ -351,86 +351,86 @@ RecipientsPicker::RecipientsPicker( QWidget *parent ) setCaption( i18n("Select Recipient") ); - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); topLayout->setMargin( KDialog::marginHint() ); - QBoxLayout *resLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *resLayout = new TQHBoxLayout( topLayout ); - QLabel *label = new QLabel( i18n("Address book:"), this ); + TQLabel *label = new TQLabel( i18n("Address book:"), this ); resLayout->addWidget( label ); - mCollectionCombo = new QComboBox( this ); + mCollectionCombo = new TQComboBox( this ); resLayout->addWidget( mCollectionCombo ); - resLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding)); + resLayout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Expanding)); -// connect( mCollectionCombo, SIGNAL( highlighted( int ) ), -// SLOT( updateList() ) ); - connect( mCollectionCombo, SIGNAL( activated( int ) ), - SLOT( updateList() ) ); +// connect( mCollectionCombo, TQT_SIGNAL( highlighted( int ) ), +// TQT_SLOT( updateList() ) ); + connect( mCollectionCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( updateList() ) ); - QBoxLayout *searchLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *searchLayout = new TQHBoxLayout( topLayout ); - QToolButton *button = new QToolButton( this ); + TQToolButton *button = new TQToolButton( this ); button->setIconSet( KGlobal::iconLoader()->loadIconSet( KApplication::reverseLayout() ? "clear_left":"locationbar_erase", KIcon::Small, 0 ) ); searchLayout->addWidget( button ); - connect( button, SIGNAL( clicked() ), SLOT( resetSearch() ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( resetSearch() ) ); - label = new QLabel( i18n("&Search:"), this ); + label = new TQLabel( i18n("&Search:"), this ); searchLayout->addWidget( label ); mRecipientList = new KListView( this ); - mRecipientList->setSelectionMode( QListView::Extended ); + mRecipientList->setSelectionMode( TQListView::Extended ); mRecipientList->setAllColumnsShowFocus( true ); mRecipientList->setFullWidth( true ); topLayout->addWidget( mRecipientList ); mRecipientList->addColumn( i18n("->") ); mRecipientList->addColumn( i18n("Name") ); mRecipientList->addColumn( i18n("Email") ); - connect( mRecipientList, SIGNAL( doubleClicked( QListViewItem *, - const QPoint &, int ) ), SLOT( slotPicked() ) ); - connect( mRecipientList, SIGNAL( returnPressed( QListViewItem * ) ), - SLOT( slotPicked() ) ); + connect( mRecipientList, TQT_SIGNAL( doubleClicked( TQListViewItem *, + const TQPoint &, int ) ), TQT_SLOT( slotPicked() ) ); + connect( mRecipientList, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + TQT_SLOT( slotPicked() ) ); new RecipientsListToolTip( mRecipientList->viewport(), mRecipientList ); mSearchLine = new SearchLine( this, mRecipientList ); searchLayout->addWidget( mSearchLine ); label->setBuddy( label ); - connect( mSearchLine, SIGNAL( downPressed() ), SLOT( setFocusList() ) ); + connect( mSearchLine, TQT_SIGNAL( downPressed() ), TQT_SLOT( setFocusList() ) ); - mSearchLDAPButton = new QPushButton( i18n("Search &Directory Service"), this ); + mSearchLDAPButton = new TQPushButton( i18n("Search &Directory Service"), this ); searchLayout->addWidget( mSearchLDAPButton ); - connect( mSearchLDAPButton, SIGNAL( clicked() ), SLOT( slotSearchLDAP() ) ); + connect( mSearchLDAPButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSearchLDAP() ) ); - QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); + TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout ); buttonLayout->addStretch( 1 ); - mToButton = new QPushButton( i18n("Add as To"), this ); + mToButton = new TQPushButton( i18n("Add as To"), this ); buttonLayout->addWidget( mToButton ); - connect( mToButton, SIGNAL( clicked() ), SLOT( slotToClicked() ) ); + connect( mToButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotToClicked() ) ); - mCcButton = new QPushButton( i18n("Add as CC"), this ); + mCcButton = new TQPushButton( i18n("Add as CC"), this ); buttonLayout->addWidget( mCcButton ); - connect( mCcButton, SIGNAL( clicked() ), SLOT( slotCcClicked() ) ); + connect( mCcButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCcClicked() ) ); - mBccButton = new QPushButton( i18n("Add as BCC"), this ); + mBccButton = new TQPushButton( i18n("Add as BCC"), this ); buttonLayout->addWidget( mBccButton ); - connect( mBccButton, SIGNAL( clicked() ), SLOT( slotBccClicked() ) ); + connect( mBccButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotBccClicked() ) ); // BCC isn't commonly used, so hide it for now //mBccButton->hide(); - QPushButton *closeButton = new QPushButton( i18n("&Cancel"), this ); + TQPushButton *closeButton = new TQPushButton( i18n("&Cancel"), this ); buttonLayout->addWidget( closeButton ); - connect( closeButton, SIGNAL( clicked() ), SLOT( close() ) ); + connect( closeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( close() ) ); { using namespace KABC; mAddressBook = KABC::StdAddressBook::self( true ); - connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), - this, SLOT( insertAddressBook( AddressBook * ) ) ); + connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), + this, TQT_SLOT( insertAddressBook( AddressBook * ) ) ); } initCollections(); @@ -456,7 +456,7 @@ RecipientsPicker::~RecipientsPicker() delete mDistributionListManager; #endif - QMap<int,RecipientsCollection *>::ConstIterator it; + TQMap<int,RecipientsCollection *>::ConstIterator it; for( it = mCollectionMap.begin(); it != mCollectionMap.end(); ++it ) { delete *it; } @@ -480,9 +480,9 @@ void RecipientsPicker::initCollections() void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) { - QMap<KABC::Resource *,RecipientsCollection *> collectionMap; + TQMap<KABC::Resource *,RecipientsCollection *> collectionMap; - QPtrList<KABC::Resource> resources = addressbook->resources(); + TQPtrList<KABC::Resource> resources = addressbook->resources(); KABC::Resource *res; for( res = resources.first(); res; res = resources.next() ) { RecipientsCollection *collection = new RecipientsCollection( res->identifier() ); @@ -490,12 +490,12 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) collection->setTitle( res->resourceName() ); } - QMap<QString,RecipientsCollection *> categoryMap; + TQMap<TQString,RecipientsCollection *> categoryMap; KABC::AddressBook::Iterator it; for( it = addressbook->begin(); it != addressbook->end(); ++it ) { - QStringList emails = (*it).emails(); - QStringList::ConstIterator it3; + TQStringList emails = (*it).emails(); + TQStringList::ConstIterator it3; for( it3 = emails.begin(); it3 != emails.end(); ++it3 ) { #ifdef KDEPIM_NEW_DISTRLISTS RecipientItem *item = new RecipientItem( mAddressBook ); @@ -504,16 +504,16 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) #endif item->setAddressee( *it, *it3 ); - QMap<KABC::Resource *,RecipientsCollection *>::ConstIterator collIt; + TQMap<KABC::Resource *,RecipientsCollection *>::ConstIterator collIt; collIt = collectionMap.find( it->resource() ); if ( collIt != collectionMap.end() ) { (*collIt)->addItem( item ); } - QStringList categories = (*it).categories(); - QStringList::ConstIterator catIt; + TQStringList categories = (*it).categories(); + TQStringList::ConstIterator catIt; for( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - QMap<QString, RecipientsCollection *>::ConstIterator catMapIt; + TQMap<TQString, RecipientsCollection *>::ConstIterator catMapIt; catMapIt = categoryMap.find( *catIt ); RecipientsCollection *collection; if ( catMapIt == categoryMap.end() ) { @@ -528,12 +528,12 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) } } - QMap<KABC::Resource *,RecipientsCollection *>::ConstIterator it2; + TQMap<KABC::Resource *,RecipientsCollection *>::ConstIterator it2; for( it2 = collectionMap.begin(); it2 != collectionMap.end(); ++it2 ) { insertCollection( *it2 ); } - QMap<QString, RecipientsCollection *>::ConstIterator it3; + TQMap<TQString, RecipientsCollection *>::ConstIterator it3; for( it3 = categoryMap.begin(); it3 != categoryMap.end(); ++it3 ) { insertCollection( *it3 ); } @@ -548,7 +548,7 @@ void RecipientsPicker::insertDistributionLists() mDistributionLists->deleteAll(); #ifdef KDEPIM_NEW_DISTRLISTS - QValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( mAddressBook ); + TQValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( mAddressBook ); for ( uint i = 0; i < lists.count(); ++i ) { RecipientItem *item = new RecipientItem( mAddressBook ); item->setDistributionList( lists[ i ] ); @@ -561,9 +561,9 @@ void RecipientsPicker::insertDistributionLists() mDistributionListManager->load(); - QStringList lists = mDistributionListManager->listNames(); + TQStringList lists = mDistributionListManager->listNames(); - QStringList::Iterator listIt; + TQStringList::Iterator listIt; for ( listIt = lists.begin(); listIt != lists.end(); ++listIt ) { KABC::DistributionList *list = mDistributionListManager->list( *listIt ); RecipientItem *item = new RecipientItem; @@ -598,7 +598,7 @@ void RecipientsPicker::insertRecentAddresses() void RecipientsPicker::insertCollection( RecipientsCollection *coll ) { int index = 0; - QMap<int,RecipientsCollection *>::ConstIterator it; + TQMap<int,RecipientsCollection *>::ConstIterator it; for ( it = mCollectionMap.begin(); it != mCollectionMap.end(); ++it ) { if ( (*it)->id() == coll->id() ) { delete *it; @@ -655,8 +655,8 @@ void RecipientsPicker::setRecipients( const Recipient::List &recipients ) if ( !item ) { KABC::Addressee a; - QString name; - QString email; + TQString name; + TQString email; KABC::Addressee::parseEmailAddress( (*it).email(), name, email ); a.setNameFromString( name ); a.insertEmail( email ); @@ -676,7 +676,7 @@ void RecipientsPicker::setRecipients( const Recipient::List &recipients ) updateList(); } -void RecipientsPicker::setDefaultButton( QPushButton *button ) +void RecipientsPicker::setDefaultButton( TQPushButton *button ) { // button->setText( "<qt><b>" + button->text() + "</b></qt>" ); button->setDefault( true ); @@ -699,7 +699,7 @@ void RecipientsPicker::rebuildAllRecipientsList() { mAllRecipients->clear(); - QMap<int,RecipientsCollection *>::ConstIterator it; + TQMap<int,RecipientsCollection *>::ConstIterator it; for( it = mCollectionMap.begin(); it != mCollectionMap.end(); ++it ) { // skip self if ( (*it) == mAllRecipients ) @@ -728,7 +728,7 @@ void RecipientsPicker::updateList() if ( selItem ) { (*it)->setRecipientType( selItem->recipientType() ); } else { - (*it)->setRecipientType( QString() ); + (*it)->setRecipientType( TQString() ); } } new RecipientViewItem( *it, mRecipientList ); @@ -752,7 +752,7 @@ void RecipientsPicker::slotBccClicked() pick( Recipient::Bcc ); } -void RecipientsPicker::slotPicked( QListViewItem *viewItem ) +void RecipientsPicker::slotPicked( TQListViewItem *viewItem ) { RecipientViewItem *item = static_cast<RecipientViewItem *>( viewItem ); if ( item ) { @@ -772,8 +772,8 @@ void RecipientsPicker::pick( Recipient::Type type ) kdDebug() << "RecipientsPicker::pick " << int( type ) << endl; int count = 0; - QListViewItemIterator it( mRecipientList , - QListViewItemIterator::Visible | QListViewItemIterator::Selected ); + TQListViewItemIterator it( mRecipientList , + TQListViewItemIterator::Visible | TQListViewItemIterator::Selected ); for ( ; it.current(); ++it ) ++count; @@ -787,8 +787,8 @@ void RecipientsPicker::pick( Recipient::Type type ) return; } - it = QListViewItemIterator( mRecipientList , - QListViewItemIterator::Visible | QListViewItemIterator::Selected ); + it = TQListViewItemIterator( mRecipientList , + TQListViewItemIterator::Visible | TQListViewItemIterator::Selected ); for ( ; it.current(); ++it ) { RecipientViewItem *item = static_cast<RecipientViewItem *>( it.current() ); if ( item ) { @@ -801,18 +801,18 @@ void RecipientsPicker::pick( Recipient::Type type ) close(); } -void RecipientsPicker::keyPressEvent( QKeyEvent *ev ) +void RecipientsPicker::keyPressEvent( TQKeyEvent *ev ) { if ( ev->key() == Key_Escape ) close(); - QWidget::keyPressEvent( ev ); + TQWidget::keyPressEvent( ev ); } void RecipientsPicker::readConfig() { KConfig *cfg = KGlobal::config(); cfg->setGroup( "RecipientsPicker" ); - QSize size = cfg->readSizeEntry( "Size" ); + TQSize size = cfg->readSizeEntry( "Size" ); if ( !size.isEmpty() ) { resize( size ); } @@ -838,15 +838,15 @@ void RecipientsPicker::setFocusList() void RecipientsPicker::resetSearch() { - mSearchLine->setText( QString::null ); + mSearchLine->setText( TQString::null ); } void RecipientsPicker::slotSearchLDAP() { if ( !mLdapSearchDialog ) { mLdapSearchDialog = new KPIM::LDAPSearchDialog( this ); - connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), - SLOT(ldapSearchResult() ) ); + connect( mLdapSearchDialog, TQT_SIGNAL( addresseesAdded() ), + TQT_SLOT(ldapSearchResult() ) ); } mLdapSearchDialog->setSearchText( mSearchLine->text() ); mLdapSearchDialog->show(); @@ -855,12 +855,12 @@ void RecipientsPicker::slotSearchLDAP() void RecipientsPicker::ldapSearchResult() { - QStringList emails = QStringList::split(',', mLdapSearchDialog->selectedEMails() ); - QStringList::iterator it( emails.begin() ); - QStringList::iterator end( emails.end() ); + TQStringList emails = TQStringList::split(',', mLdapSearchDialog->selectedEMails() ); + TQStringList::iterator it( emails.begin() ); + TQStringList::iterator end( emails.end() ); for ( ; it != end; ++it ){ - QString name; - QString email; + TQString name; + TQString email; KPIM::getNameAndMail( (*it), name, email ); KABC::Addressee ad; ad.setNameFromString( name ); diff --git a/kmail/recipientspicker.h b/kmail/recipientspicker.h index 4f8b82bb8..82e1d0bf7 100644 --- a/kmail/recipientspicker.h +++ b/kmail/recipientspicker.h @@ -30,9 +30,9 @@ #include <kabc/addressee.h> #include <kabc/stdaddressbook.h> -#include <qwidget.h> -#include <qdialog.h> -#include <qtooltip.h> +#include <tqwidget.h> +#include <tqdialog.h> +#include <tqtooltip.h> class QComboBox; @@ -52,7 +52,7 @@ class LDAPSearchDialog; class RecipientItem { public: - typedef QValueList<RecipientItem *> List; + typedef TQValueList<RecipientItem *> List; #ifdef KDEPIM_NEW_DISTRLISTS RecipientItem( KABC::AddressBook *ab ); @@ -63,44 +63,44 @@ class RecipientItem void setDistributionList( KABC::DistributionList * ); KABC::DistributionList * distributionList(); #endif - void setAddressee( const KABC::Addressee &, const QString &email ); + void setAddressee( const KABC::Addressee &, const TQString &email ); - void setRecipientType( const QString &type ); - QString recipientType() const; + void setRecipientType( const TQString &type ); + TQString recipientType() const; - QString recipient() const; + TQString recipient() const; - QPixmap icon() const; - QString name() const; - QString email() const; + TQPixmap icon() const; + TQString name() const; + TQString email() const; - QString key() const { return mKey; } + TQString key() const { return mKey; } - QString tooltip() const; + TQString tooltip() const; private: #ifdef KDEPIM_NEW_DISTRLISTS - QString createTooltip( KPIM::DistributionList & ) const; + TQString createTooltip( KPIM::DistributionList & ) const; #else - QString createTooltip( KABC::DistributionList * ) const; + TQString createTooltip( KABC::DistributionList * ) const; #endif KABC::Addressee mAddressee; - QString mName; - QString mEmail; - QString mRecipient; + TQString mName; + TQString mEmail; + TQString mRecipient; #ifdef KDEPIM_NEW_DISTRLISTS KPIM::DistributionList mDistributionList; KABC::AddressBook *mAddressBook; #else KABC::DistributionList *mDistributionList; #endif - QString mType; - QString mTooltip; + TQString mType; + TQString mTooltip; - QPixmap mIcon; + TQPixmap mIcon; - QString mKey; + TQString mKey; }; class RecipientViewItem : public KListViewItem @@ -117,10 +117,10 @@ class RecipientViewItem : public KListViewItem class RecipientsListToolTip : public QToolTip { public: - RecipientsListToolTip( QWidget *parent, KListView * ); + RecipientsListToolTip( TQWidget *parent, KListView * ); protected: - void maybeTip( const QPoint &pos ); + void maybeTip( const TQPoint &pos ); private: KListView *mListView; @@ -129,14 +129,14 @@ class RecipientsListToolTip : public QToolTip class RecipientsCollection { public: - RecipientsCollection( const QString & ); + RecipientsCollection( const TQString & ); ~RecipientsCollection(); void setReferenceContainer( bool ); bool isReferenceContainer() const; - void setTitle( const QString & ); - QString title() const; + void setTitle( const TQString & ); + TQString title() const; void addItem( RecipientItem * ); @@ -149,28 +149,28 @@ class RecipientsCollection void deleteAll(); - QString id() const; + TQString id() const; private: // flag to indicate if this collection contains just references // or should manage memory (de)allocation as well. bool mIsReferenceContainer; - QString mId; - QString mTitle; - QMap<QString, RecipientItem *> mKeyMap; + TQString mId; + TQString mTitle; + TQMap<TQString, RecipientItem *> mKeyMap; }; class SearchLine : public KListViewSearchLine { Q_OBJECT public: - SearchLine( QWidget *parent, KListView *listView ); + SearchLine( TQWidget *parent, KListView *listView ); signals: void downPressed(); protected: - void keyPressEvent( QKeyEvent * ); + void keyPressEvent( TQKeyEvent * ); }; using namespace KABC; @@ -179,7 +179,7 @@ class RecipientsPicker : public QDialog { Q_OBJECT public: - RecipientsPicker( QWidget *parent ); + RecipientsPicker( TQWidget *parent ); ~RecipientsPicker(); void setRecipients( const Recipient::List & ); @@ -196,14 +196,14 @@ class RecipientsPicker : public QDialog void insertRecentAddresses(); void insertCollection( RecipientsCollection *coll ); - void keyPressEvent( QKeyEvent *ev ); + void keyPressEvent( TQKeyEvent *ev ); void readConfig(); void writeConfig(); void pick( Recipient::Type ); - void setDefaultButton( QPushButton *button ); + void setDefaultButton( TQPushButton *button ); void rebuildAllRecipientsList(); @@ -212,7 +212,7 @@ class RecipientsPicker : public QDialog void slotToClicked(); void slotCcClicked(); void slotBccClicked(); - void slotPicked( QListViewItem * ); + void slotPicked( TQListViewItem * ); void slotPicked(); void setFocusList(); void resetSearch(); @@ -222,18 +222,18 @@ class RecipientsPicker : public QDialog private: KABC::StdAddressBook *mAddressBook; - QComboBox *mCollectionCombo; + TQComboBox *mCollectionCombo; KListView *mRecipientList; KListViewSearchLine *mSearchLine; - QPushButton *mToButton; - QPushButton *mCcButton; - QPushButton *mBccButton; + TQPushButton *mToButton; + TQPushButton *mCcButton; + TQPushButton *mBccButton; - QPushButton *mSearchLDAPButton; + TQPushButton *mSearchLDAPButton; KPIM::LDAPSearchDialog *mLdapSearchDialog; - QMap<int,RecipientsCollection *> mCollectionMap; + TQMap<int,RecipientsCollection *> mCollectionMap; RecipientsCollection *mAllRecipients; RecipientsCollection *mDistributionLists; RecipientsCollection *mSelectedRecipients; diff --git a/kmail/redirectdialog.cpp b/kmail/redirectdialog.cpp index b81a04827..150e6a5d5 100644 --- a/kmail/redirectdialog.cpp +++ b/kmail/redirectdialog.cpp @@ -42,39 +42,39 @@ using KRecentAddress::RecentAddresses; #include <klocale.h> #include <kmessagebox.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qstringlist.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqstringlist.h> using namespace KMail; -RedirectDialog::RedirectDialog( QWidget *parent, const char *name, +RedirectDialog::RedirectDialog( TQWidget *parent, const char *name, bool modal, bool immediate ) : KDialogBase( parent, name, modal, i18n( "Redirect Message" ), User1|User2|Cancel, ( immediate ? User1 : User2 ), false ) { - QVBox *vbox = makeVBoxMainWidget(); - mLabelTo = new QLabel( i18n( "Select the recipient &addresses " + TQVBox *vbox = makeVBoxMainWidget(); + mLabelTo = new TQLabel( i18n( "Select the recipient &addresses " "to redirect to:" ), vbox ); - QHBox *hbox = new QHBox( vbox ); + TQHBox *hbox = new TQHBox( vbox ); hbox->setSpacing(4); mEditTo = new KMLineEdit( true, hbox, "toLine" ); mEditTo->setMinimumWidth( 300 ); - mBtnTo = new QPushButton( QString::null, hbox, "toBtn" ); + mBtnTo = new TQPushButton( TQString::null, hbox, "toBtn" ); mBtnTo->setPixmap( BarIcon( "contents", KIcon::SizeSmall ) ); mBtnTo->setMinimumSize( mBtnTo->sizeHint() * 1.2 ); - QToolTip::add( mBtnTo, i18n("Use the Address-Selection Dialog") ); - QWhatsThis::add( mBtnTo, i18n("This button opens a separate dialog " + TQToolTip::add( mBtnTo, i18n("Use the Address-Selection Dialog") ); + TQWhatsThis::add( mBtnTo, i18n("This button opens a separate dialog " "where you can select recipients out " "of all available addresses." ) ); - connect( mBtnTo, SIGNAL(clicked()), SLOT(slotAddrBook()) ); + connect( mBtnTo, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddrBook()) ); mLabelTo->setBuddy( mBtnTo ); mEditTo->setFocus(); @@ -118,7 +118,7 @@ void RedirectDialog::slotAddrBook() mResentTo = mEditTo->text(); if ( !mResentTo.isEmpty() ) { - QStringList lst = KPIM::splitEmailAddrList( mResentTo ); + TQStringList lst = KPIM::splitEmailAddrList( mResentTo ); dlg.setSelectedTo( lst ); } @@ -130,7 +130,7 @@ void RedirectDialog::slotAddrBook() dlg.setShowCC( false ); dlg.setShowBCC( false ); - if (dlg.exec()==QDialog::Rejected) return; + if (dlg.exec()==TQDialog::Rejected) return; mEditTo->setText( dlg.to().join(", ") ); mEditTo->setEdited( true ); diff --git a/kmail/redirectdialog.h b/kmail/redirectdialog.h index de2472d4c..4b0b7b347 100644 --- a/kmail/redirectdialog.h +++ b/kmail/redirectdialog.h @@ -59,11 +59,11 @@ namespace KMail { @param immediate True, if the Send Now button should be default or false if the Queue button should be default */ - RedirectDialog( QWidget *parent=0, const char *name=0, + RedirectDialog( TQWidget *parent=0, const char *name=0, bool modal=false, bool immediate=true ); /** Return the addresses for the redirection */ - QString to() { return mResentTo; }; + TQString to() { return mResentTo; }; /** Returns the send mode */ bool sendImmediate() { return mImmediate; }; @@ -80,10 +80,10 @@ namespace KMail { void slotUser2(); private: - QLabel *mLabelTo; + TQLabel *mLabelTo; KMLineEdit *mEditTo; - QPushButton *mBtnTo; - QString mResentTo; + TQPushButton *mBtnTo; + TQString mResentTo; bool mImmediate; }; diff --git a/kmail/regexplineedit.cpp b/kmail/regexplineedit.cpp index d629d401a..81748c220 100644 --- a/kmail/regexplineedit.cpp +++ b/kmail/regexplineedit.cpp @@ -42,15 +42,15 @@ #include <kregexpeditorinterface.h> #include <kdialog.h> -#include <qlayout.h> -#include <qstring.h> -#include <qpushbutton.h> -#include <qdialog.h> +#include <tqlayout.h> +#include <tqstring.h> +#include <tqpushbutton.h> +#include <tqdialog.h> namespace KMail { - RegExpLineEdit::RegExpLineEdit( QWidget *parent, const char *name ) - : QWidget( parent, name ), + RegExpLineEdit::RegExpLineEdit( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mLineEdit( 0 ), mRegExpEditButton( 0 ), mRegExpEditDialog( 0 ) @@ -58,9 +58,9 @@ namespace KMail { initWidget(); } - RegExpLineEdit::RegExpLineEdit( const QString &str, QWidget *parent, + RegExpLineEdit::RegExpLineEdit( const TQString &str, TQWidget *parent, const char *name ) - : QWidget( parent, name ), + : TQWidget( parent, name ), mLineEdit( 0 ), mRegExpEditButton( 0 ), mRegExpEditDialog( 0 ) @@ -68,26 +68,26 @@ namespace KMail { initWidget( str ); } - void RegExpLineEdit::initWidget( const QString &str ) + void RegExpLineEdit::initWidget( const TQString &str ) { - QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() ); + TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() ); mLineEdit = new KLineEdit( str, this ); setFocusProxy( mLineEdit ); hlay->addWidget( mLineEdit ); - connect( mLineEdit, SIGNAL( textChanged( const QString & ) ), - this, SIGNAL( textChanged( const QString & ) ) ); + connect( mLineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SIGNAL( textChanged( const TQString & ) ) ); if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) { - mRegExpEditButton = new QPushButton( i18n("Edit..."), this, + mRegExpEditButton = new TQPushButton( i18n("Edit..."), this, "mRegExpEditButton" ); - mRegExpEditButton->setSizePolicy( QSizePolicy::Minimum, - QSizePolicy::Fixed ); + mRegExpEditButton->setSizePolicy( TQSizePolicy::Minimum, + TQSizePolicy::Fixed ); hlay->addWidget( mRegExpEditButton ); - connect( mRegExpEditButton, SIGNAL( clicked() ), - this, SLOT( slotEditRegExp() ) ); + connect( mRegExpEditButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotEditRegExp() ) ); } } @@ -96,12 +96,12 @@ namespace KMail { mLineEdit->clear(); } - QString RegExpLineEdit::text() const + TQString RegExpLineEdit::text() const { return mLineEdit->text(); } - void RegExpLineEdit::setText( const QString & str ) + void RegExpLineEdit::setText( const TQString & str ) { mLineEdit->setText( str ); } @@ -120,13 +120,13 @@ namespace KMail { void RegExpLineEdit::slotEditRegExp() { if ( !mRegExpEditDialog ) - mRegExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this ); + mRegExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this ); KRegExpEditorInterface *iface = static_cast<KRegExpEditorInterface *>( mRegExpEditDialog->qt_cast( "KRegExpEditorInterface" ) ); if( iface ) { iface->setRegExp( mLineEdit->text() ); - if( mRegExpEditDialog->exec() == QDialog::Accepted ) + if( mRegExpEditDialog->exec() == TQDialog::Accepted ) mLineEdit->setText( iface->regExp() ); } } diff --git a/kmail/regexplineedit.h b/kmail/regexplineedit.h index 23332fedc..0eeebb315 100644 --- a/kmail/regexplineedit.h +++ b/kmail/regexplineedit.h @@ -33,8 +33,8 @@ #ifndef __KMAIL_REGEXPLINEEDIT_H__ #define __KMAIL_REGEXPLINEEDIT_H__ -#include <qobject.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqwidget.h> class KLineEdit; @@ -49,29 +49,29 @@ namespace KMail { Q_OBJECT public: - RegExpLineEdit( const QString &str, QWidget *parent = 0, + RegExpLineEdit( const TQString &str, TQWidget *parent = 0, const char *name = 0 ); - RegExpLineEdit( QWidget *parent = 0, const char *name = 0 ); + RegExpLineEdit( TQWidget *parent = 0, const char *name = 0 ); - QString text() const; + TQString text() const; public slots: void clear(); - void setText( const QString & ); + void setText( const TQString & ); void showEditButton( bool ); signals: - void textChanged( const QString & ); + void textChanged( const TQString & ); protected slots: void slotEditRegExp(); private: - void initWidget( const QString & = QString::null ); + void initWidget( const TQString & = TQString::null ); KLineEdit * mLineEdit; - QPushButton * mRegExpEditButton; - QDialog * mRegExpEditDialog; + TQPushButton * mRegExpEditButton; + TQDialog * mRegExpEditDialog; }; } // namespace KMail diff --git a/kmail/renamejob.cpp b/kmail/renamejob.cpp index 79b0793e1..09966cf9d 100644 --- a/kmail/renamejob.cpp +++ b/kmail/renamejob.cpp @@ -47,13 +47,13 @@ #include <klocale.h> #include <config.h> -#include <qmap.h> +#include <tqmap.h> using namespace KMail; -template <typename T> static QStringList imapPaths( FolderStorage* storage ) +template <typename T> static TQStringList imapPaths( FolderStorage* storage ) { - QStringList rv; + TQStringList rv; rv.append( static_cast<T>( storage )->imapPath() ); KMFolderDir* dir = storage->folder()->child(); if ( dir ) { @@ -68,7 +68,7 @@ template <typename T> static QStringList imapPaths( FolderStorage* storage ) return rv; } -RenameJob::RenameJob( FolderStorage* storage, const QString& newName, +RenameJob::RenameJob( FolderStorage* storage, const TQString& newName, KMFolderDir* newParent ) : FolderJob( 0, tOther, (storage ? storage->folder() : 0) ), mStorage( storage ), mNewParent( newParent ), @@ -110,7 +110,7 @@ void RenameJob::execute() } // copy to the new folder mCopyFolderJob = new CopyFolderJob( mStorage, mNewParent ); - connect( mCopyFolderJob, SIGNAL(folderCopyComplete(bool)), SLOT(folderCopyComplete(bool)) ); + connect( mCopyFolderJob, TQT_SIGNAL(folderCopyComplete(bool)), TQT_SLOT(folderCopyComplete(bool)) ); mCopyFolderJob->execute(); } else @@ -149,8 +149,8 @@ void RenameJob::execute() ImapAccountBase::jobData jd( src.url() ); account->insertJob( job, jd ); KIO::Scheduler::assignJobToSlave( account->slave(), job ); - connect( job, SIGNAL(result(KIO::Job*)), - SLOT(slotRenameResult(KIO::Job*)) ); + connect( job, TQT_SIGNAL(result(KIO::Job*)), + TQT_SLOT(slotRenameResult(KIO::Job*)) ); } } @@ -207,11 +207,11 @@ void RenameJob::folderCopyComplete(bool success) kdDebug(5006) << "deleting old folder" << endl; // move complete or not necessary // save our settings - QString oldconfig = "Folder-" + mStorage->folder()->idString(); + TQString oldconfig = "Folder-" + mStorage->folder()->idString(); KConfig* config = KMKernel::config(); - QMap<QString, QString> entries = config->entryMap( oldconfig ); + TQMap<TQString, TQString> entries = config->entryMap( oldconfig ); KConfigGroupSaver saver(config, "Folder-" + mNewFolder->idString()); - for ( QMap<QString, QString>::Iterator it = entries.begin(); + for ( TQMap<TQString, TQString>::Iterator it = entries.begin(); it != entries.end(); ++it ) { if ( it.key() == "Id" || it.key() == "ImapPath" || @@ -235,7 +235,7 @@ void RenameJob::folderCopyComplete(bool success) // tell the account (see KMFolderCachedImap::listDirectory2) KMAcctCachedImap* acct = static_cast<KMFolderCachedImap*>(mStorage)->account(); if ( acct ) { - for ( QStringList::ConstIterator it = mOldImapPaths.constBegin(); it != mOldImapPaths.constEnd(); ++it ) + for ( TQStringList::ConstIterator it = mOldImapPaths.constBegin(); it != mOldImapPaths.constEnd(); ++it ) acct->addDeletedFolder( *it ); } kmkernel->dimapFolderMgr()->remove( mStorage->folder() ); diff --git a/kmail/renamejob.h b/kmail/renamejob.h index 3c4c1543c..78102c3a6 100644 --- a/kmail/renamejob.h +++ b/kmail/renamejob.h @@ -58,7 +58,7 @@ public: * @param newName the new name of the folder * @param newParent the new parent if the folder should be moved, else 0 */ - RenameJob( FolderStorage* storage, const QString& newName, + RenameJob( FolderStorage* storage, const TQString& newName, KMFolderDir* newParent = 0 ); virtual ~RenameJob(); @@ -74,17 +74,17 @@ protected slots: signals: /** Emitted when the job is done, check the success bool */ - void renameDone( QString newName, bool success ); + void renameDone( TQString newName, bool success ); protected: FolderStorage* mStorage; FolderStorage* mStorageTempOpened; KMFolderDir* mNewParent; - QString mNewName; - QString mNewImapPath; - QString mOldName; - QString mOldImapPath; - QStringList mOldImapPaths; + TQString mNewName; + TQString mNewImapPath; + TQString mOldName; + TQString mOldImapPath; + TQStringList mOldImapPaths; KMFolder* mNewFolder; CopyFolderJob *mCopyFolderJob; }; diff --git a/kmail/rulewidgethandlermanager.cpp b/kmail/rulewidgethandlermanager.cpp index c965db35b..016b8a577 100644 --- a/kmail/rulewidgethandlermanager.cpp +++ b/kmail/rulewidgethandlermanager.cpp @@ -42,11 +42,11 @@ #include <kdebug.h> #include <kiconloader.h> -#include <qwidgetstack.h> -#include <qstring.h> -#include <qcstring.h> -#include <qobject.h> -#include <qobjectlist.h> +#include <tqwidgetstack.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqobject.h> +#include <tqobjectlist.h> #include <assert.h> @@ -62,33 +62,33 @@ namespace { TextRuleWidgetHandler() : KMail::RuleWidgetHandler() {} ~TextRuleWidgetHandler() {} - QWidget * createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const; - QWidget * createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const; - KMSearchRule::Function function( const QCString & field, - const QWidgetStack *functionStack ) const; - QString value( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - QString prettyValue( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - bool handlesField( const QCString & field ) const; - void reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; - bool setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + TQWidget * createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const; + TQWidget * createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const; + KMSearchRule::Function function( const TQCString & field, + const TQWidgetStack *functionStack ) const; + TQString value( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + TQString prettyValue( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + bool handlesField( const TQCString & field ) const; + void reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; + bool setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const; - bool update( const QCString & field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; + bool update( const TQCString & field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; private: - KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const; - QString currentValue( const QWidgetStack *valueStack, + KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const; + TQString currentValue( const TQWidgetStack *valueStack, KMSearchRule::Function func ) const; }; @@ -97,33 +97,33 @@ namespace { MessageRuleWidgetHandler() : KMail::RuleWidgetHandler() {} ~MessageRuleWidgetHandler() {} - QWidget * createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const; - QWidget * createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const; - KMSearchRule::Function function( const QCString & field, - const QWidgetStack *functionStack ) const; - QString value( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - QString prettyValue( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - bool handlesField( const QCString & field ) const; - void reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; - bool setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + TQWidget * createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const; + TQWidget * createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const; + KMSearchRule::Function function( const TQCString & field, + const TQWidgetStack *functionStack ) const; + TQString value( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + TQString prettyValue( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + bool handlesField( const TQCString & field ) const; + void reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; + bool setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const; - bool update( const QCString & field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; + bool update( const TQCString & field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; private: - KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const; - QString currentValue( const QWidgetStack *valueStack, + KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const; + TQString currentValue( const TQWidgetStack *valueStack, KMSearchRule::Function func ) const; }; @@ -133,33 +133,33 @@ namespace { StatusRuleWidgetHandler() : KMail::RuleWidgetHandler() {} ~StatusRuleWidgetHandler() {} - QWidget * createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const; - QWidget * createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const; - KMSearchRule::Function function( const QCString & field, - const QWidgetStack *functionStack ) const; - QString value( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - QString prettyValue( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - bool handlesField( const QCString & field ) const; - void reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; - bool setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + TQWidget * createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const; + TQWidget * createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const; + KMSearchRule::Function function( const TQCString & field, + const TQWidgetStack *functionStack ) const; + TQString value( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + TQString prettyValue( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + bool handlesField( const TQCString & field ) const; + void reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; + bool setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const; - bool update( const QCString & field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; + bool update( const TQCString & field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; private: - KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const; - int currentStatusValue( const QWidgetStack *valueStack ) const; + KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const; + int currentStatusValue( const TQWidgetStack *valueStack ) const; }; class NumericRuleWidgetHandler : public KMail::RuleWidgetHandler { @@ -167,33 +167,33 @@ namespace { NumericRuleWidgetHandler() : KMail::RuleWidgetHandler() {} ~NumericRuleWidgetHandler() {} - QWidget * createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const; - QWidget * createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const; - KMSearchRule::Function function( const QCString & field, - const QWidgetStack *functionStack ) const; - QString value( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - QString prettyValue( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - bool handlesField( const QCString & field ) const; - void reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; - bool setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + TQWidget * createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const; + TQWidget * createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const; + KMSearchRule::Function function( const TQCString & field, + const TQWidgetStack *functionStack ) const; + TQString value( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + TQString prettyValue( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + bool handlesField( const TQCString & field ) const; + void reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; + bool setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const; - bool update( const QCString & field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; + bool update( const TQCString & field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; private: - KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const; - QString currentValue( const QWidgetStack *valueStack ) const; + KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const; + TQString currentValue( const TQWidgetStack *valueStack ) const; }; } @@ -231,9 +231,9 @@ namespace { /** Returns the number of immediate children of parent with the given object name. Used by RuleWidgetHandlerManager::createWidgets(). */ - int childCount( const QObject *parent, const char *objName ) + int childCount( const TQObject *parent, const char *objName ) { - QObjectList *list = parent->queryList( 0, objName, false, false ); + TQObjectList *list = parent->queryList( 0, objName, false, false ); if ( !list ) return 0; const int count = list->count(); @@ -242,12 +242,12 @@ namespace { } } -void KMail::RuleWidgetHandlerManager::createWidgets( QWidgetStack *functionStack, - QWidgetStack *valueStack, - const QObject *receiver ) const +void KMail::RuleWidgetHandlerManager::createWidgets( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, + const TQObject *receiver ) const { for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) { - QWidget *w = 0; + TQWidget *w = 0; for ( int i = 0; ( w = (*it)->createFunctionWidget( i, functionStack, receiver ) ); ++i ) { @@ -281,8 +281,8 @@ void KMail::RuleWidgetHandlerManager::createWidgets( QWidgetStack *functionStack } } -KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const QCString& field, - const QWidgetStack *functionStack ) const +KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const TQCString& field, + const TQWidgetStack *functionStack ) const { for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) { const KMSearchRule::Function func = (*it)->function( field, @@ -293,32 +293,32 @@ KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const QCString return KMSearchRule::FuncNone; } -QString KMail::RuleWidgetHandlerManager::value( const QCString& field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const +TQString KMail::RuleWidgetHandlerManager::value( const TQCString& field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const { for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) { - const QString val = (*it)->value( field, functionStack, valueStack ); + const TQString val = (*it)->value( field, functionStack, valueStack ); if ( !val.isEmpty() ) return val; } - return QString::null; + return TQString::null; } -QString KMail::RuleWidgetHandlerManager::prettyValue( const QCString& field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const +TQString KMail::RuleWidgetHandlerManager::prettyValue( const TQCString& field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const { for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) { - const QString val = (*it)->prettyValue( field, functionStack, valueStack ); + const TQString val = (*it)->prettyValue( field, functionStack, valueStack ); if ( !val.isEmpty() ) return val; } - return QString::null; + return TQString::null; } -void KMail::RuleWidgetHandlerManager::reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const +void KMail::RuleWidgetHandlerManager::reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) { (*it)->reset( functionStack, valueStack ); @@ -326,8 +326,8 @@ void KMail::RuleWidgetHandlerManager::reset( QWidgetStack *functionStack, update( "", functionStack, valueStack ); } -void KMail::RuleWidgetHandlerManager::setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, +void KMail::RuleWidgetHandlerManager::setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const { assert( rule ); @@ -338,9 +338,9 @@ void KMail::RuleWidgetHandlerManager::setRule( QWidgetStack *functionStack, } } -void KMail::RuleWidgetHandlerManager::update( const QCString &field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const +void KMail::RuleWidgetHandlerManager::update( const TQCString &field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { //kdDebug(5006) << "RuleWidgetHandlerManager::update( \"" << field // << "\", ... )" << endl; @@ -354,18 +354,18 @@ void KMail::RuleWidgetHandlerManager::update( const QCString &field, namespace { // FIXME (Qt >= 4.0): - // This is a simplified and constified copy of QObject::child(). According - // to a comment in qobject.h QObject::child() will be made const in Qt 4.0. + // This is a simplified and constified copy of TQObject::child(). According + // to a comment in tqobject.h TQObject::child() will be made const in Qt 4.0. // So once we require Qt 4.0 this can be removed. - QObject* QObject_child_const( const QObject *parent, + TQObject* QObject_child_const( const TQObject *parent, const char *objName ) { - const QObjectList *list = parent->children(); + const TQObjectList *list = parent->children(); if ( !list ) return 0; - QObjectListIterator it( *list ); - QObject *obj; + TQObjectListIterator it( *list ); + TQObject *obj; while ( ( obj = it.current() ) ) { ++it; if ( !objName || qstrcmp( objName, obj->name() ) == 0 ) @@ -387,8 +387,8 @@ using KMail::RegExpLineEdit; #include <klocale.h> #include <knuminput.h> -#include <qcombobox.h> -#include <qlabel.h> +#include <tqcombobox.h> +#include <tqlabel.h> //============================================================================= // @@ -419,48 +419,48 @@ namespace { //--------------------------------------------------------------------------- - QWidget * TextRuleWidgetHandler::createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const + TQWidget * TextRuleWidgetHandler::createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const { if ( number != 0 ) return 0; - QComboBox *funcCombo = new QComboBox( functionStack, "textRuleFuncCombo" ); + TQComboBox *funcCombo = new TQComboBox( functionStack, "textRuleFuncCombo" ); for ( int i = 0; i < TextFunctionCount; ++i ) { funcCombo->insertItem( i18n( TextFunctions[i].displayName ) ); } funcCombo->adjustSize(); - QObject::connect( funcCombo, SIGNAL( activated( int ) ), - receiver, SLOT( slotFunctionChanged() ) ); + TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ), + receiver, TQT_SLOT( slotFunctionChanged() ) ); return funcCombo; } //--------------------------------------------------------------------------- - QWidget * TextRuleWidgetHandler::createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const + TQWidget * TextRuleWidgetHandler::createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const { if ( number == 0 ) { RegExpLineEdit *lineEdit = new RegExpLineEdit( valueStack, "regExpLineEdit" ); - QObject::connect( lineEdit, SIGNAL( textChanged( const QString & ) ), - receiver, SLOT( slotValueChanged() ) ); + TQObject::connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + receiver, TQT_SLOT( slotValueChanged() ) ); return lineEdit; } - // blank QLabel to hide value widget for in-address-book rule + // blank TQLabel to hide value widget for in-address-book rule if ( number == 1 ) { - return new QLabel( valueStack, "textRuleValueHider" ); + return new TQLabel( valueStack, "textRuleValueHider" ); } if ( number == 2 ) { - QComboBox *combo = new QComboBox( valueStack, "categoryCombo" ); - QStringList categories = KabcBridge::categories(); + TQComboBox *combo = new TQComboBox( valueStack, "categoryCombo" ); + TQStringList categories = KabcBridge::categories(); combo->insertStringList( categories ); - QObject::connect( combo, SIGNAL( activated( int ) ), - receiver, SLOT( slotValueChanged() ) ); + TQObject::connect( combo, TQT_SIGNAL( activated( int ) ), + receiver, TQT_SLOT( slotValueChanged() ) ); return combo; } @@ -469,13 +469,13 @@ namespace { //--------------------------------------------------------------------------- - KMSearchRule::Function TextRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const + KMSearchRule::Function TextRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { - const QComboBox *funcCombo = - dynamic_cast<QComboBox*>( QObject_child_const( functionStack, + const TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( QObject_child_const( functionStack, "textRuleFuncCombo" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. - // dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo", + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. + // dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo", // 0, false ) ); if ( funcCombo ) { return TextFunctions[funcCombo->currentItem()].id; @@ -488,25 +488,25 @@ namespace { //--------------------------------------------------------------------------- - KMSearchRule::Function TextRuleWidgetHandler::function( const QCString &, - const QWidgetStack *functionStack ) const + KMSearchRule::Function TextRuleWidgetHandler::function( const TQCString &, + const TQWidgetStack *functionStack ) const { return currentFunction( functionStack ); } //--------------------------------------------------------------------------- - QString TextRuleWidgetHandler::currentValue( const QWidgetStack *valueStack, + TQString TextRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack, KMSearchRule::Function func ) const { // here we gotta check the combobox which contains the categories if ( func == KMSearchRule::FuncIsInCategory || func == KMSearchRule::FuncIsNotInCategory ) { - const QComboBox *combo= - dynamic_cast<QComboBox*>( QObject_child_const( valueStack, + const TQComboBox *combo= + dynamic_cast<TQComboBox*>( QObject_child_const( valueStack, "categoryCombo" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. - // dynamic_cast<QComboBox*>( valueStack->child( "categoryCombo", + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. + // dynamic_cast<TQComboBox*>( valueStack->child( "categoryCombo", // 0, false ) ); if ( combo ) { return combo->currentText(); @@ -514,7 +514,7 @@ namespace { else { kdDebug(5006) << "TextRuleWidgetHandler::currentValue: " "categoryCombo not found." << endl; - return QString::null; + return TQString::null; } } @@ -522,7 +522,7 @@ namespace { const RegExpLineEdit *lineEdit = dynamic_cast<RegExpLineEdit*>( QObject_child_const( valueStack, "regExpLineEdit" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast<RegExpLineEdit*>( valueStack->child( "regExpLineEdit", // 0, false ) ); if ( lineEdit ) { @@ -533,14 +533,14 @@ namespace { "regExpLineEdit not found." << endl; // or anything else, like addressbook - return QString::null; + return TQString::null; } //--------------------------------------------------------------------------- - QString TextRuleWidgetHandler::value( const QCString &, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const + TQString TextRuleWidgetHandler::value( const TQCString &, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const { KMSearchRule::Function func = currentFunction( functionStack ); if ( func == KMSearchRule::FuncIsInAddressbook ) @@ -553,9 +553,9 @@ namespace { //--------------------------------------------------------------------------- - QString TextRuleWidgetHandler::prettyValue( const QCString &, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const + TQString TextRuleWidgetHandler::prettyValue( const TQCString &, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const { KMSearchRule::Function func = currentFunction( functionStack ); if ( func == KMSearchRule::FuncIsInAddressbook ) @@ -568,19 +568,19 @@ namespace { //--------------------------------------------------------------------------- - bool TextRuleWidgetHandler::handlesField( const QCString & ) const + bool TextRuleWidgetHandler::handlesField( const TQCString & ) const { return true; // we handle all fields (as fallback) } //--------------------------------------------------------------------------- - void TextRuleWidgetHandler::reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + void TextRuleWidgetHandler::reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { // reset the function combo box - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -600,8 +600,8 @@ namespace { valueStack->raiseWidget( lineEdit ); } - QComboBox *combo = - dynamic_cast<QComboBox*>( valueStack->child( "categoryCombo", + TQComboBox *combo = + dynamic_cast<TQComboBox*>( valueStack->child( "categoryCombo", 0, false ) ); if (combo) { combo->blockSignals( true ); @@ -612,8 +612,8 @@ namespace { //--------------------------------------------------------------------------- - bool TextRuleWidgetHandler::setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + bool TextRuleWidgetHandler::setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const { if ( !rule ) { @@ -626,8 +626,8 @@ namespace { for ( ; i < TextFunctionCount; ++i ) if ( func == TextFunctions[i].id ) break; - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -645,15 +645,15 @@ namespace { if ( func == KMSearchRule::FuncIsInAddressbook || func == KMSearchRule::FuncIsNotInAddressbook ) { - QWidget *w = - static_cast<QWidget*>( valueStack->child( "textRuleValueHider", + TQWidget *w = + static_cast<TQWidget*>( valueStack->child( "textRuleValueHider", 0, false ) ); valueStack->raiseWidget( w ); } else if ( func == KMSearchRule::FuncIsInCategory || func == KMSearchRule::FuncIsNotInCategory) { - QComboBox *combo = - static_cast<QComboBox*>( valueStack->child( "categoryCombo", + TQComboBox *combo = + static_cast<TQComboBox*>( valueStack->child( "categoryCombo", 0, false ) ); combo->blockSignals( true ); for ( i = 0; i < combo->count(); ++i ) @@ -686,13 +686,13 @@ namespace { //--------------------------------------------------------------------------- - bool TextRuleWidgetHandler::update( const QCString &, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + bool TextRuleWidgetHandler::update( const TQCString &, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { // raise the correct function widget functionStack->raiseWidget( - static_cast<QWidget*>( functionStack->child( "textRuleFuncCombo", + static_cast<TQWidget*>( functionStack->child( "textRuleFuncCombo", 0, false ) ) ); // raise the correct value widget @@ -700,13 +700,13 @@ namespace { if ( func == KMSearchRule::FuncIsInAddressbook || func == KMSearchRule::FuncIsNotInAddressbook ) { valueStack->raiseWidget( - static_cast<QWidget*>( valueStack->child( "textRuleValueHider", + static_cast<TQWidget*>( valueStack->child( "textRuleValueHider", 0, false ) ) ); } else if ( func == KMSearchRule::FuncIsInCategory || func == KMSearchRule::FuncIsNotInCategory) { valueStack->raiseWidget( - static_cast<QWidget*>( valueStack->child( "categoryCombo", + static_cast<TQWidget*>( valueStack->child( "categoryCombo", 0, false ) ) ); } else { @@ -750,40 +750,40 @@ namespace { //--------------------------------------------------------------------------- - QWidget * MessageRuleWidgetHandler::createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const + TQWidget * MessageRuleWidgetHandler::createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const { if ( number != 0 ) return 0; - QComboBox *funcCombo = new QComboBox( functionStack, "messageRuleFuncCombo" ); + TQComboBox *funcCombo = new TQComboBox( functionStack, "messageRuleFuncCombo" ); for ( int i = 0; i < MessageFunctionCount; ++i ) { funcCombo->insertItem( i18n( MessageFunctions[i].displayName ) ); } funcCombo->adjustSize(); - QObject::connect( funcCombo, SIGNAL( activated( int ) ), - receiver, SLOT( slotFunctionChanged() ) ); + TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ), + receiver, TQT_SLOT( slotFunctionChanged() ) ); return funcCombo; } //--------------------------------------------------------------------------- - QWidget * MessageRuleWidgetHandler::createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const + TQWidget * MessageRuleWidgetHandler::createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const { if ( number == 0 ) { RegExpLineEdit *lineEdit = new RegExpLineEdit( valueStack, "regExpLineEdit" ); - QObject::connect( lineEdit, SIGNAL( textChanged( const QString & ) ), - receiver, SLOT( slotValueChanged() ) ); + TQObject::connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + receiver, TQT_SLOT( slotValueChanged() ) ); return lineEdit; } - // blank QLabel to hide value widget for has-attachment rule + // blank TQLabel to hide value widget for has-attachment rule if ( number == 1 ) { - return new QLabel( valueStack, "textRuleValueHider" ); + return new TQLabel( valueStack, "textRuleValueHider" ); } return 0; @@ -791,13 +791,13 @@ namespace { //--------------------------------------------------------------------------- - KMSearchRule::Function MessageRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const + KMSearchRule::Function MessageRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { - const QComboBox *funcCombo = - dynamic_cast<QComboBox*>( QObject_child_const( functionStack, + const TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( QObject_child_const( functionStack, "messageRuleFuncCombo" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. - // dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo", + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. + // dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo", // 0, false ) ); if ( funcCombo ) { return MessageFunctions[funcCombo->currentItem()].id; @@ -810,8 +810,8 @@ namespace { //--------------------------------------------------------------------------- - KMSearchRule::Function MessageRuleWidgetHandler::function( const QCString & field, - const QWidgetStack *functionStack ) const + KMSearchRule::Function MessageRuleWidgetHandler::function( const TQCString & field, + const TQWidgetStack *functionStack ) const { if ( !handlesField( field ) ) return KMSearchRule::FuncNone; @@ -821,13 +821,13 @@ namespace { //--------------------------------------------------------------------------- - QString MessageRuleWidgetHandler::currentValue( const QWidgetStack *valueStack, + TQString MessageRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack, KMSearchRule::Function ) const { const RegExpLineEdit *lineEdit = dynamic_cast<RegExpLineEdit*>( QObject_child_const( valueStack, "regExpLineEdit" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast<RegExpLineEdit*>( valueStack->child( "regExpLineEdit", // 0, false ) ); if ( lineEdit ) { @@ -837,17 +837,17 @@ namespace { kdDebug(5006) << "MessageRuleWidgetHandler::currentValue: " "regExpLineEdit not found." << endl; - return QString::null; + return TQString::null; } //--------------------------------------------------------------------------- - QString MessageRuleWidgetHandler::value( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const + TQString MessageRuleWidgetHandler::value( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) - return QString::null; + return TQString::null; KMSearchRule::Function func = currentFunction( functionStack ); if ( func == KMSearchRule::FuncHasAttachment ) @@ -860,12 +860,12 @@ namespace { //--------------------------------------------------------------------------- - QString MessageRuleWidgetHandler::prettyValue( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const + TQString MessageRuleWidgetHandler::prettyValue( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) - return QString::null; + return TQString::null; KMSearchRule::Function func = currentFunction( functionStack ); if ( func == KMSearchRule::FuncHasAttachment ) @@ -878,19 +878,19 @@ namespace { //--------------------------------------------------------------------------- - bool MessageRuleWidgetHandler::handlesField( const QCString & field ) const + bool MessageRuleWidgetHandler::handlesField( const TQCString & field ) const { return ( field == "<message>" ); } //--------------------------------------------------------------------------- - void MessageRuleWidgetHandler::reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + void MessageRuleWidgetHandler::reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { // reset the function combo box - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -913,8 +913,8 @@ namespace { //--------------------------------------------------------------------------- - bool MessageRuleWidgetHandler::setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + bool MessageRuleWidgetHandler::setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const { if ( !rule || !handlesField( rule->field() ) ) { @@ -927,8 +927,8 @@ namespace { for ( ; i < MessageFunctionCount; ++i ) if ( func == MessageFunctions[i].id ) break; - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -946,8 +946,8 @@ namespace { if ( func == KMSearchRule::FuncHasAttachment || func == KMSearchRule::FuncHasNoAttachment ) { - QWidget *w = - static_cast<QWidget*>( valueStack->child( "textRuleValueHider", + TQWidget *w = + static_cast<TQWidget*>( valueStack->child( "textRuleValueHider", 0, false ) ); valueStack->raiseWidget( w ); } @@ -970,23 +970,23 @@ namespace { //--------------------------------------------------------------------------- - bool MessageRuleWidgetHandler::update( const QCString & field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + bool MessageRuleWidgetHandler::update( const TQCString & field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) return false; // raise the correct function widget functionStack->raiseWidget( - static_cast<QWidget*>( functionStack->child( "messageRuleFuncCombo", + static_cast<TQWidget*>( functionStack->child( "messageRuleFuncCombo", 0, false ) ) ); // raise the correct value widget KMSearchRule::Function func = currentFunction( functionStack ); if ( func == KMSearchRule::FuncHasAttachment || func == KMSearchRule::FuncHasNoAttachment ) { - QWidget *w = - static_cast<QWidget*>( valueStack->child( "textRuleValueHider", + TQWidget *w = + static_cast<TQWidget*>( valueStack->child( "textRuleValueHider", 0, false ) ); valueStack->raiseWidget( w ); } @@ -1025,53 +1025,53 @@ namespace { //--------------------------------------------------------------------------- - QWidget * StatusRuleWidgetHandler::createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const + TQWidget * StatusRuleWidgetHandler::createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const { if ( number != 0 ) return 0; - QComboBox *funcCombo = new QComboBox( functionStack, + TQComboBox *funcCombo = new TQComboBox( functionStack, "statusRuleFuncCombo" ); for ( int i = 0; i < StatusFunctionCount; ++i ) { funcCombo->insertItem( i18n( StatusFunctions[i].displayName ) ); } funcCombo->adjustSize(); - QObject::connect( funcCombo, SIGNAL( activated( int ) ), - receiver, SLOT( slotFunctionChanged() ) ); + TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ), + receiver, TQT_SLOT( slotFunctionChanged() ) ); return funcCombo; } //--------------------------------------------------------------------------- - QWidget * StatusRuleWidgetHandler::createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const + TQWidget * StatusRuleWidgetHandler::createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const { if ( number != 0 ) return 0; - QComboBox *statusCombo = new QComboBox( valueStack, + TQComboBox *statusCombo = new TQComboBox( valueStack, "statusRuleValueCombo" ); for ( int i = 0; i < KMail::StatusValueCountWithoutHidden; ++i ) { statusCombo->insertItem( UserIcon( KMail::StatusValues[ i ].icon ), i18n( KMail::StatusValues[ i ].text ) ); } statusCombo->adjustSize(); - QObject::connect( statusCombo, SIGNAL( activated( int ) ), - receiver, SLOT( slotValueChanged() ) ); + TQObject::connect( statusCombo, TQT_SIGNAL( activated( int ) ), + receiver, TQT_SLOT( slotValueChanged() ) ); return statusCombo; } //--------------------------------------------------------------------------- - KMSearchRule::Function StatusRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const + KMSearchRule::Function StatusRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { - const QComboBox *funcCombo = - dynamic_cast<QComboBox*>( QObject_child_const( functionStack, + const TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( QObject_child_const( functionStack, "statusRuleFuncCombo" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. - // dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo", + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. + // dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo", // 0, false ) ); if ( funcCombo ) { return StatusFunctions[funcCombo->currentItem()].id; @@ -1084,8 +1084,8 @@ namespace { //--------------------------------------------------------------------------- - KMSearchRule::Function StatusRuleWidgetHandler::function( const QCString & field, - const QWidgetStack *functionStack ) const + KMSearchRule::Function StatusRuleWidgetHandler::function( const TQCString & field, + const TQWidgetStack *functionStack ) const { if ( !handlesField( field ) ) return KMSearchRule::FuncNone; @@ -1095,13 +1095,13 @@ namespace { //--------------------------------------------------------------------------- - int StatusRuleWidgetHandler::currentStatusValue( const QWidgetStack *valueStack ) const + int StatusRuleWidgetHandler::currentStatusValue( const TQWidgetStack *valueStack ) const { - const QComboBox *statusCombo = - dynamic_cast<QComboBox*>( QObject_child_const( valueStack, + const TQComboBox *statusCombo = + dynamic_cast<TQComboBox*>( QObject_child_const( valueStack, "statusRuleValueCombo" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. - // dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo", + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. + // dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo", // 0, false ) ); if ( statusCombo ) { return statusCombo->currentItem(); @@ -1114,51 +1114,51 @@ namespace { //--------------------------------------------------------------------------- - QString StatusRuleWidgetHandler::value( const QCString & field, - const QWidgetStack *, - const QWidgetStack *valueStack ) const + TQString StatusRuleWidgetHandler::value( const TQCString & field, + const TQWidgetStack *, + const TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) - return QString::null; + return TQString::null; const int status = currentStatusValue( valueStack ); if ( status != -1 ) - return QString::fromLatin1( KMail::StatusValues[ status ].text ); + return TQString::fromLatin1( KMail::StatusValues[ status ].text ); else - return QString::null; + return TQString::null; } //--------------------------------------------------------------------------- - QString StatusRuleWidgetHandler::prettyValue( const QCString & field, - const QWidgetStack *, - const QWidgetStack *valueStack ) const + TQString StatusRuleWidgetHandler::prettyValue( const TQCString & field, + const TQWidgetStack *, + const TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) - return QString::null; + return TQString::null; const int status = currentStatusValue( valueStack ); if ( status != -1 ) return i18n( KMail::StatusValues[ status ].text ); else - return QString::null; + return TQString::null; } //--------------------------------------------------------------------------- - bool StatusRuleWidgetHandler::handlesField( const QCString & field ) const + bool StatusRuleWidgetHandler::handlesField( const TQCString & field ) const { return ( field == "<status>" ); } //--------------------------------------------------------------------------- - void StatusRuleWidgetHandler::reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + void StatusRuleWidgetHandler::reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { // reset the function combo box - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -1167,8 +1167,8 @@ namespace { } // reset the status value combo box - QComboBox *statusCombo = - dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo", + TQComboBox *statusCombo = + dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo", 0, false ) ); if ( statusCombo ) { statusCombo->blockSignals( true ); @@ -1179,8 +1179,8 @@ namespace { //--------------------------------------------------------------------------- - bool StatusRuleWidgetHandler::setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + bool StatusRuleWidgetHandler::setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const { if ( !rule || !handlesField( rule->field() ) ) { @@ -1194,8 +1194,8 @@ namespace { for ( ; funcIndex < StatusFunctionCount; ++funcIndex ) if ( func == StatusFunctions[funcIndex].id ) break; - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -1212,14 +1212,14 @@ namespace { } // set the value - const QString value = rule->contents(); + const TQString value = rule->contents(); int valueIndex = 0; for ( ; valueIndex < KMail::StatusValueCountWithoutHidden; ++valueIndex ) - if ( value == QString::fromLatin1( + if ( value == TQString::fromLatin1( KMail::StatusValues[ valueIndex ].text ) ) break; - QComboBox *statusCombo = - dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo", + TQComboBox *statusCombo = + dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo", 0, false ) ); if ( statusCombo ) { statusCombo->blockSignals( true ); @@ -1240,21 +1240,21 @@ namespace { //--------------------------------------------------------------------------- - bool StatusRuleWidgetHandler::update( const QCString &field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + bool StatusRuleWidgetHandler::update( const TQCString &field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) return false; // raise the correct function widget functionStack->raiseWidget( - static_cast<QWidget*>( functionStack->child( "statusRuleFuncCombo", + static_cast<TQWidget*>( functionStack->child( "statusRuleFuncCombo", 0, false ) ) ); // raise the correct value widget valueStack->raiseWidget( - static_cast<QWidget*>( valueStack->child( "statusRuleValueCombo", + static_cast<TQWidget*>( valueStack->child( "statusRuleValueCombo", 0, false ) ) ); return true; } @@ -1285,48 +1285,48 @@ namespace { //--------------------------------------------------------------------------- - QWidget * NumericRuleWidgetHandler::createFunctionWidget( int number, - QWidgetStack *functionStack, - const QObject *receiver ) const + TQWidget * NumericRuleWidgetHandler::createFunctionWidget( int number, + TQWidgetStack *functionStack, + const TQObject *receiver ) const { if ( number != 0 ) return 0; - QComboBox *funcCombo = new QComboBox( functionStack, + TQComboBox *funcCombo = new TQComboBox( functionStack, "numericRuleFuncCombo" ); for ( int i = 0; i < NumericFunctionCount; ++i ) { funcCombo->insertItem( i18n( NumericFunctions[i].displayName ) ); } funcCombo->adjustSize(); - QObject::connect( funcCombo, SIGNAL( activated( int ) ), - receiver, SLOT( slotFunctionChanged() ) ); + TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ), + receiver, TQT_SLOT( slotFunctionChanged() ) ); return funcCombo; } //--------------------------------------------------------------------------- - QWidget * NumericRuleWidgetHandler::createValueWidget( int number, - QWidgetStack *valueStack, - const QObject *receiver ) const + TQWidget * NumericRuleWidgetHandler::createValueWidget( int number, + TQWidgetStack *valueStack, + const TQObject *receiver ) const { if ( number != 0 ) return 0; KIntNumInput *numInput = new KIntNumInput( valueStack, "KIntNumInput" ); - QObject::connect( numInput, SIGNAL( valueChanged( int ) ), - receiver, SLOT( slotValueChanged() ) ); + TQObject::connect( numInput, TQT_SIGNAL( valueChanged( int ) ), + receiver, TQT_SLOT( slotValueChanged() ) ); return numInput; } //--------------------------------------------------------------------------- - KMSearchRule::Function NumericRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const + KMSearchRule::Function NumericRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const { - const QComboBox *funcCombo = - dynamic_cast<QComboBox*>( QObject_child_const( functionStack, + const TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( QObject_child_const( functionStack, "numericRuleFuncCombo" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. - // dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo", + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. + // dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo", // 0, false ) ); if ( funcCombo ) { return NumericFunctions[funcCombo->currentItem()].id; @@ -1339,8 +1339,8 @@ namespace { //--------------------------------------------------------------------------- - KMSearchRule::Function NumericRuleWidgetHandler::function( const QCString & field, - const QWidgetStack *functionStack ) const + KMSearchRule::Function NumericRuleWidgetHandler::function( const TQCString & field, + const TQWidgetStack *functionStack ) const { if ( !handlesField( field ) ) return KMSearchRule::FuncNone; @@ -1350,62 +1350,62 @@ namespace { //--------------------------------------------------------------------------- - QString NumericRuleWidgetHandler::currentValue( const QWidgetStack *valueStack ) const + TQString NumericRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack ) const { const KIntNumInput *numInput = dynamic_cast<KIntNumInput*>( QObject_child_const( valueStack, "KIntNumInput" ) ); - // FIXME (Qt >= 4.0): Use the following when QObject::child() is const. + // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const. // dynamic_cast<KIntNumInput*>( valueStack->child( "KIntNumInput", // 0, false ) ); if ( numInput ) { - return QString::number( numInput->value() ); + return TQString::number( numInput->value() ); } else kdDebug(5006) << "NumericRuleWidgetHandler::currentValue: " "KIntNumInput not found." << endl; - return QString::null; + return TQString::null; } //--------------------------------------------------------------------------- - QString NumericRuleWidgetHandler::value( const QCString & field, - const QWidgetStack *, - const QWidgetStack *valueStack ) const + TQString NumericRuleWidgetHandler::value( const TQCString & field, + const TQWidgetStack *, + const TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) - return QString::null; + return TQString::null; return currentValue( valueStack ); } //--------------------------------------------------------------------------- - QString NumericRuleWidgetHandler::prettyValue( const QCString & field, - const QWidgetStack *, - const QWidgetStack *valueStack ) const + TQString NumericRuleWidgetHandler::prettyValue( const TQCString & field, + const TQWidgetStack *, + const TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) - return QString::null; + return TQString::null; return currentValue( valueStack ); } //--------------------------------------------------------------------------- - bool NumericRuleWidgetHandler::handlesField( const QCString & field ) const + bool NumericRuleWidgetHandler::handlesField( const TQCString & field ) const { return ( field == "<size>" || field == "<age in days>" ); } //--------------------------------------------------------------------------- - void NumericRuleWidgetHandler::reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + void NumericRuleWidgetHandler::reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { // reset the function combo box - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -1426,7 +1426,7 @@ namespace { //--------------------------------------------------------------------------- - void initNumInput( KIntNumInput *numInput, const QCString &field ) + void initNumInput( KIntNumInput *numInput, const TQCString &field ) { if ( field == "<size>" ) { numInput->setMinValue( 0 ); @@ -1440,8 +1440,8 @@ namespace { //--------------------------------------------------------------------------- - bool NumericRuleWidgetHandler::setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + bool NumericRuleWidgetHandler::setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const { if ( !rule || !handlesField( rule->field() ) ) { @@ -1455,8 +1455,8 @@ namespace { for ( ; funcIndex < NumericFunctionCount; ++funcIndex ) if ( func == NumericFunctions[funcIndex].id ) break; - QComboBox *funcCombo = - dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo", + TQComboBox *funcCombo = + dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo", 0, false ) ); if ( funcCombo ) { funcCombo->blockSignals( true ); @@ -1493,16 +1493,16 @@ namespace { //--------------------------------------------------------------------------- - bool NumericRuleWidgetHandler::update( const QCString &field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const + bool NumericRuleWidgetHandler::update( const TQCString &field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const { if ( !handlesField( field ) ) return false; // raise the correct function widget functionStack->raiseWidget( - static_cast<QWidget*>( functionStack->child( "numericRuleFuncCombo", + static_cast<TQWidget*>( functionStack->child( "numericRuleFuncCombo", 0, false ) ) ); // raise the correct value widget diff --git a/kmail/rulewidgethandlermanager.h b/kmail/rulewidgethandlermanager.h index eee848c69..0e419411a 100644 --- a/kmail/rulewidgethandlermanager.h +++ b/kmail/rulewidgethandlermanager.h @@ -35,7 +35,7 @@ #include "kmsearchpattern.h" -#include <qvaluevector.h> +#include <tqvaluevector.h> class QObject; class QCString; @@ -65,34 +65,34 @@ namespace KMail { void registerHandler( const RuleWidgetHandler * handler ); void unregisterHandler( const RuleWidgetHandler * handler ); - void createWidgets( QWidgetStack *functionStack, - QWidgetStack *valueStack, - const QObject *receiver ) const; - KMSearchRule::Function function( const QCString & field, - const QWidgetStack *functionStack ) const; - QString value( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - QString prettyValue( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - bool handlesField( const QCString & field, - const QWidgetStack *functionStack, - const QWidgetStack *valueStack ) const; - void reset( QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; - void setRule( QWidgetStack *functionStack, - QWidgetStack *valueStack, + void createWidgets( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, + const TQObject *receiver ) const; + KMSearchRule::Function function( const TQCString & field, + const TQWidgetStack *functionStack ) const; + TQString value( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + TQString prettyValue( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + bool handlesField( const TQCString & field, + const TQWidgetStack *functionStack, + const TQWidgetStack *valueStack ) const; + void reset( TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; + void setRule( TQWidgetStack *functionStack, + TQWidgetStack *valueStack, const KMSearchRule *rule ) const; - void update( const QCString & field, - QWidgetStack *functionStack, - QWidgetStack *valueStack ) const; + void update( const TQCString & field, + TQWidgetStack *functionStack, + TQWidgetStack *valueStack ) const; private: - typedef QValueVector<const RuleWidgetHandler*>::const_iterator const_iterator; - typedef QValueVector<const RuleWidgetHandler*>::iterator iterator; + typedef TQValueVector<const RuleWidgetHandler*>::const_iterator const_iterator; + typedef TQValueVector<const RuleWidgetHandler*>::iterator iterator; - QValueVector<const RuleWidgetHandler*> mHandlers; + TQValueVector<const RuleWidgetHandler*> mHandlers; }; } // namespace KMail diff --git a/kmail/scalix.cpp b/kmail/scalix.cpp index aef77ff8b..4910119d0 100644 --- a/kmail/scalix.cpp +++ b/kmail/scalix.cpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qmap.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqstringlist.h> #include "scalix.h" @@ -28,9 +28,9 @@ using namespace Scalix; -FolderAttributeParser::FolderAttributeParser( const QString &attribute ) +FolderAttributeParser::FolderAttributeParser( const TQString &attribute ) { - QStringList parts = QStringList::split( ",", attribute, false ); + TQStringList parts = TQStringList::split( ",", attribute, false ); for ( uint i = 0; i < parts.count(); ++i ) { if ( parts[i].startsWith( "\\X-SpecialFolder=" ) ) @@ -40,21 +40,21 @@ FolderAttributeParser::FolderAttributeParser( const QString &attribute ) } } -QString FolderAttributeParser::folderClass() const +TQString FolderAttributeParser::folderClass() const { return mFolderClass; } -QString FolderAttributeParser::folderName() const +TQString FolderAttributeParser::folderName() const { return mFolderName; } KMFolder* Utils::findStandardResourceFolder( KMFolderDir* folderParentDir, KMail::FolderContentsType contentsType, - const QStringList &attributes ) + const TQStringList &attributes ) { - QMap<int, QString> typeMap; + TQMap<int, TQString> typeMap; typeMap.insert( KMail::ContentsTypeCalendar, "IPF.Appointment" ); typeMap.insert( KMail::ContentsTypeContact, "IPF.Contact" ); typeMap.insert( KMail::ContentsTypeNote, "IPF.StickyNote" ); @@ -75,7 +75,7 @@ KMFolder* Utils::findStandardResourceFolder( KMFolderDir* folderParentDir, return 0; } -KMail::FolderContentsType Utils::scalixIdToContentsType( const QString &name ) +KMail::FolderContentsType Utils::scalixIdToContentsType( const TQString &name ) { if ( name == "IPF.Appointment" ) return KMail::ContentsTypeCalendar; @@ -89,7 +89,7 @@ KMail::FolderContentsType Utils::scalixIdToContentsType( const QString &name ) return KMail::ContentsTypeMail; } -QString Utils::contentsTypeToScalixId( KMail::FolderContentsType type ) +TQString Utils::contentsTypeToScalixId( KMail::FolderContentsType type ) { if ( type == KMail::ContentsTypeCalendar ) return "IPF.Appointment"; diff --git a/kmail/scalix.h b/kmail/scalix.h index cb202cff1..ac07f504a 100644 --- a/kmail/scalix.h +++ b/kmail/scalix.h @@ -40,7 +40,7 @@ #ifndef SCALIX_H #define SCALIX_H -#include <qstring.h> +#include <tqstring.h> #include "kmfoldertype.h" @@ -56,14 +56,14 @@ namespace Scalix { class FolderAttributeParser { public: - FolderAttributeParser( const QString &attribute ); + FolderAttributeParser( const TQString &attribute ); - QString folderClass() const; - QString folderName() const; + TQString folderClass() const; + TQString folderName() const; private: - QString mFolderClass; - QString mFolderName; + TQString mFolderClass; + TQString mFolderName; }; class Utils @@ -71,11 +71,11 @@ class Utils public: static KMFolder* findStandardResourceFolder( KMFolderDir* folderParentDir, KMail::FolderContentsType contentsType, - const QStringList &attributes ); + const TQStringList &attributes ); - static KMail::FolderContentsType scalixIdToContentsType( const QString &name ); + static KMail::FolderContentsType scalixIdToContentsType( const TQString &name ); - static QString contentsTypeToScalixId( KMail::FolderContentsType type ); + static TQString contentsTypeToScalixId( KMail::FolderContentsType type ); }; } diff --git a/kmail/searchjob.cpp b/kmail/searchjob.cpp index dde86495f..89dde8214 100644 --- a/kmail/searchjob.cpp +++ b/kmail/searchjob.cpp @@ -46,7 +46,7 @@ using KPIM::ProgressManager; #include <klocale.h> #include <kmessagebox.h> -#include <qstylesheet.h> +#include <tqstylesheet.h> namespace KMail { @@ -77,47 +77,47 @@ void SearchJob::execute() void SearchJob::searchCompleteFolder() { // generate imap search command and save local search patterns - QString searchString = searchStringFromPattern( mSearchPattern ); + TQString searchString = searchStringFromPattern( mSearchPattern ); if ( searchString.isEmpty() ) // skip imap search and download the messages - return slotSearchData( 0, QString::null ); + return slotSearchData( 0, TQString::null ); // do the IMAP search KURL url = mAccount->getUrl(); url.setPath( mFolder->imapPath() + ";SECTION=" + searchString ); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int) 'E' << url; KIO::SimpleJob *job = KIO::special( url, packedArgs, false ); - if ( mFolder->imapPath() != QString( "/" ) ) + if ( mFolder->imapPath() != TQString( "/" ) ) { KIO::Scheduler::assignJobToSlave( mAccount->slave(), job ); - connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ), - SLOT( slotSearchData( KIO::Job*, const QString& ) ) ); - connect( job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotSearchResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ), + TQT_SLOT( slotSearchData( KIO::Job*, const TQString& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotSearchResult( KIO::Job * ) ) ); } else { // for the "/ folder" of an imap account, searching blocks the kioslave - slotSearchData( job, QString() ); + slotSearchData( job, TQString() ); slotSearchResult( job ); } } //----------------------------------------------------------------------------- -QString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern ) +TQString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern ) { - QStringList parts; + TQStringList parts; // this is for the search pattern that can only be done local mLocalSearchPattern = new KMSearchPattern(); mLocalSearchPattern->setOp( pattern->op() ); - for ( QPtrListIterator<KMSearchRule> it( *pattern ) ; it.current() ; ++it ) + for ( TQPtrListIterator<KMSearchRule> it( *pattern ) ; it.current() ; ++it ) { // construct an imap search command bool accept = true; - QString result; - QString field = (*it)->field(); + TQString result; + TQString field = (*it)->field(); // check if the operation is supported if ( (*it)->function() == KMSearchRule::FuncContainsNot ) { result = "NOT "; @@ -161,7 +161,7 @@ QString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern ) } } - QString search; + TQString search; if ( !parts.isEmpty() ) { if ( pattern->op() == KMSearchPattern::OpOr && parts.size() > 1 ) { search = "(OR " + parts.join(" ") + ")"; @@ -176,7 +176,7 @@ QString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern ) } //----------------------------------------------------------------------------- -void SearchJob::slotSearchData( KIO::Job* job, const QString& data ) +void SearchJob::slotSearchData( KIO::Job* job, const TQString& data ) { if ( job && job->error() ) { // error is handled in slotSearchResult @@ -186,12 +186,12 @@ void SearchJob::slotSearchData( KIO::Job* job, const QString& data ) if ( mLocalSearchPattern->isEmpty() && data.isEmpty() ) { // no local search and the server found nothing - QValueList<Q_UINT32> serNums; + TQValueList<Q_UINT32> serNums; emit searchDone( serNums, mSearchPattern, true ); } else { // remember the uids the server found - mImapSearchHits = QStringList::split( " ", data ); + mImapSearchHits = TQStringList::split( " ", data ); if ( canMapAllUIDs() ) { @@ -199,8 +199,8 @@ void SearchJob::slotSearchData( KIO::Job* job, const QString& data ) } else { // get the folder to make sure we have all messages - connect ( mFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotSearchFolder()) ); + connect ( mFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotSearchFolder()) ); mFolder->getFolder(); } } @@ -209,7 +209,7 @@ void SearchJob::slotSearchData( KIO::Job* job, const QString& data ) //----------------------------------------------------------------------------- bool SearchJob::canMapAllUIDs() { - for ( QStringList::Iterator it = mImapSearchHits.begin(); + for ( TQStringList::Iterator it = mImapSearchHits.begin(); it != mImapSearchHits.end(); ++it ) { if ( mFolder->serNumForUID( (*it).toULong() ) == 0 ) @@ -221,13 +221,13 @@ bool SearchJob::canMapAllUIDs() //----------------------------------------------------------------------------- void SearchJob::slotSearchFolder() { - disconnect ( mFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotSearchFolder()) ); + disconnect ( mFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotSearchFolder()) ); if ( mLocalSearchPattern->isEmpty() ) { // pure imap search - now get the serial number for the UIDs - QValueList<Q_UINT32> serNums; - for ( QStringList::Iterator it = mImapSearchHits.begin(); + TQValueList<Q_UINT32> serNums; + for ( TQStringList::Iterator it = mImapSearchHits.begin(); it != mImapSearchHits.end(); ++it ) { ulong serNum = mFolder->serNumForUID( (*it).toULong() ); @@ -250,14 +250,14 @@ void SearchJob::slotSearchFolder() bool needToDownload = needsDownload(); if ( needToDownload ) { // so we need to download all messages and check - QString question = i18n("To execute your search all messages of the folder %1 " + TQString question = i18n("To execute your search all messages of the folder %1 " "have to be downloaded from the server. This may take some time. " "Do you want to continue your search?").arg( mFolder->label() ); if ( KMessageBox::warningContinueCancel( 0, question, i18n("Continue Search"), i18n("&Search"), "continuedownloadingforsearch" ) != KMessageBox::Continue ) { - QValueList<Q_UINT32> serNums; + TQValueList<Q_UINT32> serNums; emit searchDone( serNums, mSearchPattern, true ); return; } @@ -267,12 +267,12 @@ void SearchJob::slotSearchFolder() mProgress = ProgressManager::createProgressItem( "ImapSearchDownload" + ProgressManager::getUniqueID(), i18n("Downloading emails from IMAP server"), - i18n( "URL: %1" ).arg( QStyleSheet::escape( mFolder->folder()->prettyURL() ) ), + i18n( "URL: %1" ).arg( TQStyleSheet::escape( mFolder->folder()->prettyURL() ) ), true, mAccount->useSSL() || mAccount->useTLS() ); mProgress->setTotalItems( numMsgs ); - connect ( mProgress, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), - this, SLOT( slotAbortSearch( KPIM::ProgressItem* ) ) ); + connect ( mProgress, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)), + this, TQT_SLOT( slotAbortSearch( KPIM::ProgressItem* ) ) ); for ( unsigned int i = 0; i < numMsgs ; ++i ) { KMMessage * msg = mFolder->getMsg( i ); @@ -280,8 +280,8 @@ void SearchJob::slotSearchFolder() ImapJob *job = new ImapJob( msg ); job->setParentFolder( mFolder ); job->setParentProgressItem( mProgress ); - connect( job, SIGNAL(messageRetrieved(KMMessage*)), - this, SLOT(slotSearchMessageArrived(KMMessage*)) ); + connect( job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + this, TQT_SLOT(slotSearchMessageArrived(KMMessage*)) ); job->start(); } else { slotSearchMessageArrived( msg ); @@ -305,7 +305,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg ) // imap and local search have to match if ( mLocalSearchPattern->matches( msg ) && ( mImapSearchHits.isEmpty() || - mImapSearchHits.find( QString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) { + mImapSearchHits.find( TQString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) { Q_UINT32 serNum = msg->getMsgSerNum(); mSearchSerNums.append( serNum ); matches = true; @@ -313,7 +313,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg ) } else if ( mLocalSearchPattern->op() == KMSearchPattern::OpOr ) { // imap or local search have to match if ( mLocalSearchPattern->matches( msg ) || - mImapSearchHits.find( QString::number(msg->UID()) ) != mImapSearchHits.end() ) { + mImapSearchHits.find( TQString::number(msg->UID()) ) != mImapSearchHits.end() ) { Q_UINT32 serNum = msg->getMsgSerNum(); mSearchSerNums.append( serNum ); matches = true; @@ -352,7 +352,7 @@ void SearchJob::slotSearchResult( KIO::Job *job ) if ( mSerNum == 0 ) { // folder - QValueList<Q_UINT32> serNums; + TQValueList<Q_UINT32> serNums; emit searchDone( serNums, mSearchPattern, true ); } else { // message @@ -364,11 +364,11 @@ void SearchJob::slotSearchResult( KIO::Job *job ) //----------------------------------------------------------------------------- void SearchJob::searchSingleMessage() { - QString searchString = searchStringFromPattern( mSearchPattern ); + TQString searchString = searchStringFromPattern( mSearchPattern ); if ( searchString.isEmpty() ) { // no imap search - slotSearchDataSingleMessage( 0, QString::null ); + slotSearchDataSingleMessage( 0, TQString::null ); } else { // imap search @@ -379,23 +379,23 @@ void SearchJob::searchSingleMessage() KMMsgBase *mb = mFolder->getMsgBase( idx ); // only search for that UID - searchString += " UID " + QString::number( mb->UID() ); + searchString += " UID " + TQString::number( mb->UID() ); KURL url = mAccount->getUrl(); url.setPath( mFolder->imapPath() + ";SECTION=" + searchString ); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); stream << (int) 'E' << url; KIO::SimpleJob *job = KIO::special( url, packedArgs, false ); KIO::Scheduler::assignJobToSlave(mAccount->slave(), job); - connect( job, SIGNAL(infoMessage(KIO::Job*,const QString&)), - SLOT(slotSearchDataSingleMessage(KIO::Job*,const QString&)) ); - connect( job, SIGNAL(result(KIO::Job *)), - SLOT(slotSearchResult(KIO::Job *)) ); + connect( job, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)), + TQT_SLOT(slotSearchDataSingleMessage(KIO::Job*,const TQString&)) ); + connect( job, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotSearchResult(KIO::Job *)) ); } } //----------------------------------------------------------------------------- -void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const QString& data ) +void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const TQString& data ) { if ( job && job->error() ) { // error is handled in slotSearchResult @@ -408,7 +408,7 @@ void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const QString& data return; } // remember what the server found - mImapSearchHits = QStringList::split( " ", data ); + mImapSearchHits = TQStringList::split( " ", data ); // add the local search int idx = -1; @@ -420,8 +420,8 @@ void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const QString& data if ( needsDownload() ) { ImapJob *job = new ImapJob( msg ); job->setParentFolder( mFolder ); - connect( job, SIGNAL(messageRetrieved(KMMessage*)), - this, SLOT(slotSearchMessageArrived(KMMessage*)) ); + connect( job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + this, TQT_SLOT(slotSearchMessageArrived(KMMessage*)) ); job->start(); } else { slotSearchMessageArrived( msg ); @@ -434,14 +434,14 @@ void SearchJob::slotAbortSearch( KPIM::ProgressItem* item ) if ( item ) item->setComplete(); mAccount->killAllJobs(); - QValueList<Q_UINT32> serNums; + TQValueList<Q_UINT32> serNums; emit searchDone( serNums, mSearchPattern, true ); } //----------------------------------------------------------------------------- bool SearchJob::needsDownload() { - for ( QPtrListIterator<KMSearchRule> it( *mLocalSearchPattern ) ; it.current() ; ++it ) { + for ( TQPtrListIterator<KMSearchRule> it( *mLocalSearchPattern ) ; it.current() ; ++it ) { if ( (*it)->field() != "<status>" ) { return true; } diff --git a/kmail/searchjob.h b/kmail/searchjob.h index 5a655c62a..d48d96b6d 100644 --- a/kmail/searchjob.h +++ b/kmail/searchjob.h @@ -28,7 +28,7 @@ #ifndef SEARCHJOB_H #define SEARCHJOB_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "folderjob.h" class KMFolderImap; @@ -77,7 +77,7 @@ protected: void searchSingleMessage(); // creates an imap search command - QString searchStringFromPattern( const KMSearchPattern* ); + TQString searchStringFromPattern( const KMSearchPattern* ); // returns true if all uids can be mapped to sernums bool canMapAllUIDs(); @@ -91,7 +91,7 @@ protected slots: void slotSearchFolder(); // processes the server answer - void slotSearchData( KIO::Job* job, const QString& data ); + void slotSearchData( KIO::Job* job, const TQString& data ); // message is downloaded and searched void slotSearchMessageArrived( KMMessage* msg ); @@ -100,14 +100,14 @@ protected slots: void slotSearchResult( KIO::Job *job ); // imap search result from a single message - void slotSearchDataSingleMessage( KIO::Job* job, const QString& data ); + void slotSearchDataSingleMessage( KIO::Job* job, const TQString& data ); // the user cancelled the search progress void slotAbortSearch( KPIM::ProgressItem* item ); signals: // emitted when a list of matching serial numbers was found - void searchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool complete ); + void searchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool complete ); // emitted when a single message (identified by the serial number) was checked void searchDone( Q_UINT32, const KMSearchPattern*, bool matches ); @@ -119,9 +119,9 @@ protected: KMSearchPattern* mLocalSearchPattern; Q_UINT32 mSerNum; // saves the results of the imap search - QStringList mImapSearchHits; + TQStringList mImapSearchHits; // collects the serial numbers from imap and local search - QValueList<Q_UINT32> mSearchSerNums; + TQValueList<Q_UINT32> mSearchSerNums; // the remaining messages that have to be downloaded for local search uint mRemainingMsgs; // progress item for local searches diff --git a/kmail/searchwindow.cpp b/kmail/searchwindow.cpp index 7b9ef5588..81d64167f 100644 --- a/kmail/searchwindow.cpp +++ b/kmail/searchwindow.cpp @@ -43,16 +43,16 @@ #include <kstdaction.h> #include <kiconloader.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qobjectlist.h> //for mPatternEdit->queryList( 0, "mRuleField" )->first(); -#include <qcursor.h> -#include <qpopupmenu.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqobjectlist.h> //for mPatternEdit->queryList( 0, "mRuleField" )->first(); +#include <tqcursor.h> +#include <tqpopupmenu.h> #include <maillistdrag.h> using namespace KPIM; @@ -71,13 +71,13 @@ const int SearchWindow::MSGID_COLUMN = 4; class MatchListView : public KListView { public: - MatchListView( QWidget *parent, SearchWindow* sw, const char* name = 0 ) : + MatchListView( TQWidget *parent, SearchWindow* sw, const char* name = 0 ) : KListView( parent, name ), mSearchWindow( sw ) {} protected: - virtual QDragObject* dragObject() + virtual TQDragObject* dragObject() { KMMessageList list = mSearchWindow->selectedMessages(); MailList mailList; @@ -91,11 +91,11 @@ class MatchListView : public KListView } MailListDrag *d = new MailListDrag( mailList, viewport(), new KMTextSource ); - QPixmap pixmap; + TQPixmap pixmap; if( mailList.count() == 1 ) - pixmap = QPixmap( DesktopIcon("message", KIcon::SizeSmall) ); + pixmap = TQPixmap( DesktopIcon("message", KIcon::SizeSmall) ); else - pixmap = QPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) ); + pixmap = TQPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) ); d->setPixmap( pixmap ); return d; @@ -117,7 +117,7 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mSortColumn(0), mSortOrder(Ascending), mFolder(0), - mTimer(new QTimer(this, "mTimer")), + mTimer(new TQTimer(this, "mTimer")), mLastFocus(0), mKMMainWidget(w) { @@ -132,18 +132,18 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, KConfig* config = KMKernel::config(); config->setGroup("SearchDialog"); - QWidget* searchWidget = new QWidget(this); - QVBoxLayout *vbl = new QVBoxLayout( searchWidget, 0, spacingHint(), "kmfs_vbl" ); + TQWidget* searchWidget = new TQWidget(this); + TQVBoxLayout *vbl = new TQVBoxLayout( searchWidget, 0, spacingHint(), "kmfs_vbl" ); - QButtonGroup * radioGroup = new QButtonGroup( searchWidget ); + TQButtonGroup * radioGroup = new TQButtonGroup( searchWidget ); radioGroup->hide(); - mChkbxAllFolders = new QRadioButton(i18n("Search in &all local folders"), searchWidget); + mChkbxAllFolders = new TQRadioButton(i18n("Search in &all local folders"), searchWidget); vbl->addWidget( mChkbxAllFolders ); radioGroup->insert( mChkbxAllFolders ); - QHBoxLayout *hbl = new QHBoxLayout( vbl, spacingHint(), "kmfs_hbl" ); - mChkbxSpecificFolders = new QRadioButton(i18n("Search &only in:"), searchWidget); + TQHBoxLayout *hbl = new TQHBoxLayout( vbl, spacingHint(), "kmfs_hbl" ); + mChkbxSpecificFolders = new TQRadioButton(i18n("Search &only in:"), searchWidget); hbl->addWidget(mChkbxSpecificFolders); mChkbxSpecificFolders->setChecked(true); radioGroup->insert( mChkbxSpecificFolders ); @@ -154,16 +154,16 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mCbxFolders->setFolder(curFolder); hbl->addWidget(mCbxFolders); - mChkSubFolders = new QCheckBox(i18n("I&nclude sub-folders"), searchWidget); + mChkSubFolders = new TQCheckBox(i18n("I&nclude sub-folders"), searchWidget); mChkSubFolders->setChecked(true); hbl->addWidget(mChkSubFolders); - QWidget *spacer = new QWidget( searchWidget, "spacer" ); + TQWidget *spacer = new TQWidget( searchWidget, "spacer" ); spacer->setMinimumHeight( 2 ); vbl->addWidget( spacer ); mPatternEdit = new KMSearchPatternEdit( "", searchWidget , "spe", false, true ); - mPatternEdit->setFrameStyle( QFrame::NoFrame | QFrame::Plain ); + mPatternEdit->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain ); mPatternEdit->setInsideMargin( 0 ); mSearchPattern = new KMSearchPattern(); KMFolderSearch *searchFolder = 0; @@ -184,23 +184,23 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mFolder = searchFolder; } mPatternEdit->setSearchPattern( mSearchPattern ); - QObjectList *list = mPatternEdit->queryList( 0, "mRuleField" ); - QObject *object = 0; + TQObjectList *list = mPatternEdit->queryList( 0, "mRuleField" ); + TQObject *object = 0; if ( list ) object = list->first(); delete list; - if (!searchFolder && object && ::qt_cast<QComboBox*>(object)) - static_cast<QComboBox*>(object)->setCurrentText("Subject"); + if (!searchFolder && object && ::qt_cast<TQComboBox*>(object)) + static_cast<TQComboBox*>(object)->setCurrentText("Subject"); vbl->addWidget( mPatternEdit ); // enable/disable widgets depending on radio buttons: - connect( mChkbxSpecificFolders, SIGNAL(toggled(bool)), - mCbxFolders, SLOT(setEnabled(bool)) ); - connect( mChkbxSpecificFolders, SIGNAL(toggled(bool)), - mChkSubFolders, SLOT(setEnabled(bool)) ); - connect( mChkbxAllFolders, SIGNAL(toggled(bool)), - this, SLOT(setEnabledSearchButton(bool)) ); + connect( mChkbxSpecificFolders, TQT_SIGNAL(toggled(bool)), + mCbxFolders, TQT_SLOT(setEnabled(bool)) ); + connect( mChkbxSpecificFolders, TQT_SIGNAL(toggled(bool)), + mChkSubFolders, TQT_SLOT(setEnabled(bool)) ); + connect( mChkbxAllFolders, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(setEnabledSearchButton(bool)) ); mLbxMatches = new MatchListView(searchWidget, this, "Find Messages"); @@ -231,22 +231,22 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, config->readNumEntry("FolderWidth", 100)); mLbxMatches->addColumn(""); // should be hidden - mLbxMatches->setColumnWidthMode( MSGID_COLUMN, QListView::Manual ); + mLbxMatches->setColumnWidthMode( MSGID_COLUMN, TQListView::Manual ); mLbxMatches->setColumnWidth(MSGID_COLUMN, 0); mLbxMatches->header()->setResizeEnabled(false, MSGID_COLUMN); mLbxMatches->setDragEnabled( true ); - connect(mLbxMatches, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotShowMsg(QListViewItem *))); - connect(mLbxMatches, SIGNAL(currentChanged(QListViewItem *)), - this, SLOT(slotCurrentChanged(QListViewItem *))); - connect( mLbxMatches, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int )), - this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint &, int ))); + connect(mLbxMatches, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotShowMsg(TQListViewItem *))); + connect(mLbxMatches, TQT_SIGNAL(currentChanged(TQListViewItem *)), + this, TQT_SLOT(slotCurrentChanged(TQListViewItem *))); + connect( mLbxMatches, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int )), + this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint &, int ))); vbl->addWidget(mLbxMatches); - QHBoxLayout *hbl2 = new QHBoxLayout( vbl, spacingHint(), "kmfs_hbl2" ); - mSearchFolderLbl = new QLabel(i18n("Search folder &name:"), searchWidget); + TQHBoxLayout *hbl2 = new TQHBoxLayout( vbl, spacingHint(), "kmfs_hbl2" ); + mSearchFolderLbl = new TQLabel(i18n("Search folder &name:"), searchWidget); hbl2->addWidget(mSearchFolderLbl); mSearchFolderEdt = new KLineEdit(searchWidget); if (searchFolder) @@ -256,25 +256,25 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mSearchFolderLbl->setBuddy(mSearchFolderEdt); hbl2->addWidget(mSearchFolderEdt); - mSearchFolderOpenBtn = new QPushButton(i18n("Op&en Search Folder"), searchWidget); + mSearchFolderOpenBtn = new TQPushButton(i18n("Op&en Search Folder"), searchWidget); mSearchFolderOpenBtn->setEnabled(false); hbl2->addWidget(mSearchFolderOpenBtn); - connect( mSearchFolderEdt, SIGNAL( textChanged( const QString &)), - this, SLOT( scheduleRename( const QString & ))); - connect( &mRenameTimer, SIGNAL( timeout() ), - this, SLOT( renameSearchFolder() )); - connect( mSearchFolderOpenBtn, SIGNAL( clicked() ), - this, SLOT( openSearchFolder() )); - mSearchResultOpenBtn = new QPushButton(i18n("Open &Message"), searchWidget); + connect( mSearchFolderEdt, TQT_SIGNAL( textChanged( const TQString &)), + this, TQT_SLOT( scheduleRename( const TQString & ))); + connect( &mRenameTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( renameSearchFolder() )); + connect( mSearchFolderOpenBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( openSearchFolder() )); + mSearchResultOpenBtn = new TQPushButton(i18n("Open &Message"), searchWidget); mSearchResultOpenBtn->setEnabled(false); hbl2->addWidget(mSearchResultOpenBtn); - connect( mSearchResultOpenBtn, SIGNAL( clicked() ), - this, SLOT( slotShowSelectedMsg() )); + connect( mSearchResultOpenBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotShowSelectedMsg() )); mStatusBar = new KStatusBar(searchWidget); mStatusBar->insertFixedItem(i18n("AMiddleLengthText..."), 0, true); mStatusBar->changeItem(i18n("Ready."), 0); mStatusBar->setItemAlignment(0, AlignLeft | AlignVCenter); - mStatusBar->insertItem(QString::null, 1, 1, true); + mStatusBar->insertItem(TQString::null, 1, 1, true); mStatusBar->setItemAlignment(1, AlignLeft | AlignVCenter); vbl->addWidget(mStatusBar); @@ -285,20 +285,20 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, resize(mainWidth, mainHeight); setMainWidget(searchWidget); - setButtonBoxOrientation(QWidget::Vertical); + setButtonBoxOrientation(TQWidget::Vertical); mBtnSearch = actionButton(KDialogBase::User1); mBtnStop = actionButton(KDialogBase::User2); mBtnStop->setEnabled(false); - connect(this, SIGNAL(user1Clicked()), SLOT(slotSearch())); - connect(this, SIGNAL(user2Clicked()), SLOT(slotStop())); - connect(this, SIGNAL(finished()), this, SLOT(deleteLater())); + connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotSearch())); + connect(this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(slotStop())); + connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(deleteLater())); // give focus to the value field of the first search rule object = mPatternEdit->child( "regExpLineEdit" ); if ( object && object->isWidgetType() ) { - static_cast<QWidget*>(object)->setFocus(); + static_cast<TQWidget*>(object)->setFocus(); //kdDebug(5006) << "SearchWindow: focus has been given to widget " // << object->name() << endl; } @@ -309,26 +309,26 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, KActionCollection *ac = actionCollection(); ac->setWidget( this ); mReplyAction = new KAction( i18n("&Reply..."), "mail_reply", 0, this, - SLOT(slotReplyToMsg()), ac, "search_reply" ); + TQT_SLOT(slotReplyToMsg()), ac, "search_reply" ); mReplyAllAction = new KAction( i18n("Reply to &All..."), "mail_replyall", - 0, this, SLOT(slotReplyAllToMsg()), + 0, this, TQT_SLOT(slotReplyAllToMsg()), ac, "search_reply_all" ); mReplyListAction = new KAction( i18n("Reply to Mailing-&List..."), "mail_replylist", 0, this, - SLOT(slotReplyListToMsg()), ac, + TQT_SLOT(slotReplyListToMsg()), ac, "search_reply_list" ); mForwardActionMenu = new KActionMenu( i18n("Message->","&Forward"), "mail_forward", ac, "search_message_forward" ); - connect( mForwardActionMenu, SIGNAL(activated()), this, - SLOT(slotForwardInlineMsg()) ); + connect( mForwardActionMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotForwardInlineMsg()) ); mForwardAttachedAction = new KAction( i18n("Message->Forward->","As &Attachment..."), "mail_forward", 0, this, - SLOT(slotForwardAttachedMsg()), ac, + TQT_SLOT(slotForwardAttachedMsg()), ac, "search_message_forward_as_attachment" ); mForwardInlineAction = new KAction( i18n("&Inline..."), "mail_forward", 0, this, - SLOT(slotForwardInlineMsg()), ac, + TQT_SLOT(slotForwardInlineMsg()), ac, "search_message_forward_inline" ); if ( GlobalSettings::self()->forwardingInlineByDefault() ) { mForwardActionMenu->insert( mForwardInlineAction ); @@ -340,38 +340,38 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mForwardDigestAction = new KAction( i18n("Message->Forward->","As Di&gest..."), "mail_forward", 0, this, - SLOT(slotForwardDigestMsg()), ac, + TQT_SLOT(slotForwardDigestMsg()), ac, "search_message_forward_as_digest" ); mForwardActionMenu->insert( mForwardDigestAction ); mRedirectAction = new KAction( i18n("Message->Forward->","&Redirect..."), "mail_forward", 0, this, - SLOT(slotRedirectMsg()), ac, + TQT_SLOT(slotRedirectMsg()), ac, "search_message_forward_redirect" ); mForwardActionMenu->insert( mRedirectAction ); - mSaveAsAction = KStdAction::saveAs( this, SLOT(slotSaveMsg()), ac, "search_file_save_as" ); + mSaveAsAction = KStdAction::saveAs( this, TQT_SLOT(slotSaveMsg()), ac, "search_file_save_as" ); mSaveAtchAction = new KAction( i18n("Save Attachments..."), "attach", 0, - this, SLOT(slotSaveAttachments()), ac, "search_save_attachments" ); + this, TQT_SLOT(slotSaveAttachments()), ac, "search_save_attachments" ); - mPrintAction = KStdAction::print( this, SLOT(slotPrintMsg()), ac, "search_print" ); + mPrintAction = KStdAction::print( this, TQT_SLOT(slotPrintMsg()), ac, "search_print" ); mClearAction = new KAction( i18n("Clear Selection"), 0, 0, this, - SLOT(slotClearSelection()), ac, "search_clear_selection" ); + TQT_SLOT(slotClearSelection()), ac, "search_clear_selection" ); - mCopyAction = KStdAction::copy( this, SLOT(slotCopyMsgs()), ac, "search_copy_messages" ); - mCutAction = KStdAction::cut( this, SLOT(slotCutMsgs()), ac, "search_cut_messages" ); + mCopyAction = KStdAction::copy( this, TQT_SLOT(slotCopyMsgs()), ac, "search_copy_messages" ); + mCutAction = KStdAction::cut( this, TQT_SLOT(slotCutMsgs()), ac, "search_cut_messages" ); - connect(mTimer, SIGNAL(timeout()), this, SLOT(updStatus())); - connect(kmkernel->searchFolderMgr(), SIGNAL(folderInvalidated(KMFolder*)), - this, SLOT(folderInvalidated(KMFolder*))); + connect(mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updStatus())); + connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)), + this, TQT_SLOT(folderInvalidated(KMFolder*))); - connect(mCbxFolders, SIGNAL(folderChanged(KMFolder*)), - this, SLOT(slotFolderActivated())); + connect(mCbxFolders, TQT_SIGNAL(folderChanged(KMFolder*)), + this, TQT_SLOT(slotFolderActivated())); } //----------------------------------------------------------------------------- SearchWindow::~SearchWindow() { - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) { if (!(*fit)) continue; @@ -401,10 +401,10 @@ void SearchWindow::setEnabledSearchButton(bool) //----------------------------------------------------------------------------- void SearchWindow::updStatus(void) { - QString genMsg, detailMsg, procMsg; + TQString genMsg, detailMsg, procMsg; int numMatches = 0, numProcessed = 0; KMSearch const *search = (mFolder) ? (mFolder->search()) : 0; - QString folderName; + TQString folderName; if (search) { numMatches = search->foundCount(); numProcessed = search->searchCount(); @@ -436,7 +436,7 @@ void SearchWindow::updStatus(void) //----------------------------------------------------------------------------- -void SearchWindow::keyPressEvent(QKeyEvent *evt) +void SearchWindow::keyPressEvent(TQKeyEvent *evt) { KMSearch const *search = (mFolder) ? mFolder->search() : 0; bool searching = (search) ? search->running() : false; @@ -488,14 +488,14 @@ void SearchWindow::slotSearch() KMFolderMgr *mgr = kmkernel->searchFolderMgr(); if (mSearchFolderEdt->text().isEmpty()) mSearchFolderEdt->setText(i18n("Last Search")); - QString baseName = mSearchFolderEdt->text(); - QString fullName = baseName; + TQString baseName = mSearchFolderEdt->text(); + TQString fullName = baseName; int count = 0; KMFolder *folder; while ((folder = mgr->find(fullName))) { if (folder->storage()->inherits("KMFolderSearch")) break; - fullName = QString("%1 %2").arg(baseName).arg(++count); + fullName = TQString("%1 %2").arg(baseName).arg(++count); } if (!folder) @@ -505,18 +505,18 @@ void SearchWindow::slotSearch() mFolder = dynamic_cast<KMFolderSearch*>( folder->storage() ); } mFolder->stopSearch(); - disconnect(mFolder, SIGNAL(msgAdded(int)), - this, SLOT(slotAddMsg(int))); - disconnect(mFolder, SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), - this, SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); - connect(mFolder, SIGNAL(msgAdded(int)), - this, SLOT(slotAddMsg(int))); - connect(mFolder, SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), - this, SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); + disconnect(mFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(slotAddMsg(int))); + disconnect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); + connect(mFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(slotAddMsg(int))); + connect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); mSearchFolderEdt->setEnabled(false); KMSearch *search = new KMSearch(); - connect(search, SIGNAL(finished(bool)), - this, SLOT(searchDone())); + connect(search, TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(searchDone())); if (mChkbxAllFolders->isChecked()) { search->setRecursive(true); } else { @@ -541,7 +541,7 @@ void SearchWindow::searchDone() mTimer->stop(); updStatus(); - QTimer::singleShot(0, this, SLOT(enableGUI())); + TQTimer::singleShot(0, this, TQT_SLOT(enableGUI())); if(mLastFocus) mLastFocus->setFocus(); if (mCloseRequested) @@ -559,7 +559,7 @@ void SearchWindow::slotAddMsg(int idx) return; bool unget = !mFolder->isMessage(idx); KMMessage *msg = mFolder->getMsg(idx); - QString from, fName; + TQString from, fName; KMFolder *pFolder = msg->parent(); if (!mFolders.contains(pFolder)) { mFolders.append(pFolder); @@ -577,7 +577,7 @@ void SearchWindow::slotAddMsg(int idx) (void)new KListViewItem(mLbxMatches, mLbxMatches->lastItem(), msg->subject(), from, msg->dateIsoStr(), fName, - QString::number(mFolder->serNum(idx))); + TQString::number(mFolder->serNum(idx))); if (unget) mFolder->unGetMsg(idx); } @@ -586,9 +586,9 @@ void SearchWindow::slotRemoveMsg(KMFolder *, Q_UINT32 serNum) { if (!mFolder) return; - QListViewItemIterator it(mLbxMatches); + TQListViewItemIterator it(mLbxMatches); while (it.current()) { - QListViewItem *item = *it; + TQListViewItem *item = *it; if (serNum == (*it)->text(MSGID_COLUMN).toUInt()) { delete item; return; @@ -614,21 +614,21 @@ void SearchWindow::slotClose() //----------------------------------------------------------------------------- -void SearchWindow::closeEvent(QCloseEvent *e) +void SearchWindow::closeEvent(TQCloseEvent *e) { if (mFolder && mFolder->search() && mFolder->search()->running()) { mCloseRequested = true; //Cancel search in progress by setting the search folder search to //the null search mFolder->setSearch(new KMSearch()); - QTimer::singleShot(0, this, SLOT(slotClose())); + TQTimer::singleShot(0, this, TQT_SLOT(slotClose())); } else { KDialogBase::closeEvent(e); } } //----------------------------------------------------------------------------- -void SearchWindow::scheduleRename( const QString &s) +void SearchWindow::scheduleRename( const TQString &s) { if (!s.isEmpty() && s != i18n("Last Search")) { mRenameTimer.start(250, true); @@ -644,7 +644,7 @@ void SearchWindow::renameSearchFolder() { if (mFolder && (mFolder->folder()->name() != mSearchFolderEdt->text())) { int i = 1; - QString name = mSearchFolderEdt->text(); + TQString name = mSearchFolderEdt->text(); while (i < 100) { if (!kmkernel->searchFolderMgr()->find( name )) { mFolder->rename( name ); @@ -672,15 +672,15 @@ void SearchWindow::folderInvalidated(KMFolder *folder) if (folder->storage() == mFolder) { mLbxMatches->clear(); if (mFolder->search()) - connect(mFolder->search(), SIGNAL(finished(bool)), - this, SLOT(searchDone())); + connect(mFolder->search(), TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(searchDone())); mTimer->start(200); enableGUI(); } } //----------------------------------------------------------------------------- -bool SearchWindow::slotShowMsg(QListViewItem *item) +bool SearchWindow::slotShowMsg(TQListViewItem *item) { if(!item) return false; @@ -709,7 +709,7 @@ void SearchWindow::slotShowSelectedMsg() } //----------------------------------------------------------------------------- -void SearchWindow::slotCurrentChanged(QListViewItem *item) +void SearchWindow::slotCurrentChanged(TQListViewItem *item) { mSearchResultOpenBtn->setEnabled(item!=0); } @@ -736,7 +736,7 @@ KMMessageList SearchWindow::selectedMessages() KMMessageList msgList; KMFolder* folder = 0; int msgIndex = -1; - for (QListViewItemIterator it(mLbxMatches); it.current(); it++) + for (TQListViewItemIterator it(mLbxMatches); it.current(); it++) if (it.current()->isSelected()) { KMMsgDict::instance()->getLocation((*it)->text(MSGID_COLUMN).toUInt(), &folder, &msgIndex); @@ -749,7 +749,7 @@ KMMessageList SearchWindow::selectedMessages() //----------------------------------------------------------------------------- KMMessage* SearchWindow::message() { - QListViewItem *item = mLbxMatches->currentItem(); + TQListViewItem *item = mLbxMatches->currentItem(); KMFolder* folder = 0; int msgIndex = -1; if (!item) @@ -802,7 +802,7 @@ void SearchWindow::updateContextMenuActions() } //----------------------------------------------------------------------------- -void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &, int ) +void SearchWindow::slotContextMenuRequested( TQListViewItem *lvi, const TQPoint &, int ) { if (!lvi) return; @@ -811,14 +811,14 @@ void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &, // FIXME is this ever unGetMsg()'d? if (!message()) return; - QPopupMenu *menu = new QPopupMenu(this); + TQPopupMenu *menu = new TQPopupMenu(this); updateContextMenuActions(); mMenuToFolder.clear(); - QPopupMenu *msgMoveMenu = new QPopupMenu(menu); + TQPopupMenu *msgMoveMenu = new TQPopupMenu(menu); mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage, this, &mMenuToFolder, msgMoveMenu ); - QPopupMenu *msgCopyMenu = new QPopupMenu(menu); + TQPopupMenu *msgCopyMenu = new TQPopupMenu(menu); mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this, &mMenuToFolder, msgCopyMenu ); @@ -838,7 +838,7 @@ void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &, mPrintAction->plug(menu); menu->insertSeparator(); mClearAction->plug(menu); - menu->exec (QCursor::pos(), 0); + menu->exec (TQCursor::pos(), 0); delete menu; } @@ -925,13 +925,13 @@ void SearchWindow::slotPrintMsg() void SearchWindow::slotCopyMsgs() { - QValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); + TQValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); mKMMainWidget->headers()->setCopiedMessages( list, false ); } void SearchWindow::slotCutMsgs() { - QValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); + TQValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); mKMMainWidget->headers()->setCopiedMessages( list, true ); } diff --git a/kmail/searchwindow.h b/kmail/searchwindow.h index 62c6e6ce3..ac0b203c4 100644 --- a/kmail/searchwindow.h +++ b/kmail/searchwindow.h @@ -21,11 +21,11 @@ #ifndef searchwindow_h #define searchwindow_h -#include <qvaluelist.h> -#include <qptrlist.h> -#include <qstringlist.h> -#include <qguardedptr.h> -#include <qtimer.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> +#include <tqstringlist.h> +#include <tqguardedptr.h> +#include <tqtimer.h> #include <kdialogbase.h> #include <kxmlguiclient.h> @@ -55,7 +55,7 @@ namespace KMail { class FolderRequester; } -typedef QPtrList<KMMsgBase> KMMessageList; +typedef TQPtrList<KMMsgBase> KMMessageList; namespace KMail { @@ -109,15 +109,15 @@ protected slots: virtual void slotClose(); virtual void slotSearch(); virtual void slotStop(); - void scheduleRename( const QString &); + void scheduleRename( const TQString &); void renameSearchFolder(); void openSearchFolder(); void folderInvalidated(KMFolder *); - virtual bool slotShowMsg(QListViewItem *); + virtual bool slotShowMsg(TQListViewItem *); void slotShowSelectedMsg(); - void slotCurrentChanged(QListViewItem *); + void slotCurrentChanged(TQListViewItem *); virtual void updateContextMenuActions(); - virtual void slotContextMenuRequested( QListViewItem*, const QPoint &, int ); + virtual void slotContextMenuRequested( TQListViewItem*, const TQPoint &, int ); virtual void copySelectedToFolder( int menuId ); virtual void moveSelectedToFolder( int menuId ); virtual void slotFolderActivated(); @@ -146,10 +146,10 @@ protected slots: protected: /** Reimplemented to react to Escape. */ - virtual void keyPressEvent(QKeyEvent*); + virtual void keyPressEvent(TQKeyEvent*); /** Reimplemented to stop searching when the window is closed */ - virtual void closeEvent(QCloseEvent*); + virtual void closeEvent(TQCloseEvent*); protected: bool mStopped; @@ -157,31 +157,31 @@ protected: int mFetchingInProgress; int mSortColumn; SortOrder mSortOrder; - QGuardedPtr<KMFolderSearch> mFolder; - QTimer *mTimer; + TQGuardedPtr<KMFolderSearch> mFolder; + TQTimer *mTimer; // GC'd by Qt - QRadioButton *mChkbxAllFolders; - QRadioButton *mChkbxSpecificFolders; + TQRadioButton *mChkbxAllFolders; + TQRadioButton *mChkbxSpecificFolders; KMail::FolderRequester *mCbxFolders; - QPushButton *mBtnSearch; - QPushButton *mBtnStop; - QCheckBox *mChkSubFolders; + TQPushButton *mBtnSearch; + TQPushButton *mBtnStop; + TQCheckBox *mChkSubFolders; KListView* mLbxMatches; - QLabel *mSearchFolderLbl; - QLineEdit *mSearchFolderEdt; - QPushButton *mSearchFolderOpenBtn; - QPushButton *mSearchResultOpenBtn; + TQLabel *mSearchFolderLbl; + TQLineEdit *mSearchFolderEdt; + TQPushButton *mSearchFolderOpenBtn; + TQPushButton *mSearchResultOpenBtn; KStatusBar* mStatusBar; - QWidget* mLastFocus; // to remember the position of the focus - QMap<int,KMFolder*> mMenuToFolder; + TQWidget* mLastFocus; // to remember the position of the focus + TQMap<int,KMFolder*> mMenuToFolder; KAction *mReplyAction, *mReplyAllAction, *mReplyListAction, *mSaveAsAction, *mForwardInlineAction, *mForwardAttachedAction, *mForwardDigestAction, *mRedirectAction, *mPrintAction, *mClearAction, *mSaveAtchAction, *mCopyAction, *mCutAction; KActionMenu *mForwardActionMenu; - QValueList<QGuardedPtr<KMFolder> > mFolders; - QTimer mRenameTimer; + TQValueList<TQGuardedPtr<KMFolder> > mFolders; + TQTimer mRenameTimer; // not owned by us KMMainWidget* mKMMainWidget; diff --git a/kmail/secondarywindow.cpp b/kmail/secondarywindow.cpp index 396036e24..272be70cd 100644 --- a/kmail/secondarywindow.cpp +++ b/kmail/secondarywindow.cpp @@ -57,7 +57,7 @@ namespace KMail { //--------------------------------------------------------------------------- - void SecondaryWindow::closeEvent( QCloseEvent * e ) + void SecondaryWindow::closeEvent( TQCloseEvent * e ) { // if there's a system tray applet then just do what needs to be done if a // window is closed. diff --git a/kmail/secondarywindow.h b/kmail/secondarywindow.h index 3319c07aa..dbe787178 100644 --- a/kmail/secondarywindow.h +++ b/kmail/secondarywindow.h @@ -55,7 +55,7 @@ namespace KMail { * last _visible_ secondary window is closed in case a system tray applet * exists. */ - virtual void closeEvent( QCloseEvent * ); + virtual void closeEvent( TQCloseEvent * ); }; } // namespace KMail diff --git a/kmail/sieveconfig.cpp b/kmail/sieveconfig.cpp index 872dee01d..2d320883a 100644 --- a/kmail/sieveconfig.cpp +++ b/kmail/sieveconfig.cpp @@ -23,9 +23,9 @@ #include <kdialog.h> #include <kconfigbase.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <klineedit.h> @@ -53,39 +53,39 @@ namespace KMail { config.writeEntry( "sieve-vacation-filename", mVacationFileName ); } - SieveConfigEditor::SieveConfigEditor( QWidget * parent, const char * name ) - : QWidget( parent, name ) + SieveConfigEditor::SieveConfigEditor( TQWidget * parent, const char * name ) + : TQWidget( parent, name ) { // tmp. vars: int row = -1; - QLabel * label; + TQLabel * label; - QGridLayout * glay = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); + TQGridLayout * glay = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); glay->setRowStretch( 4, 1 ); glay->setColStretch( 1, 1 ); // "Server supports sieve" checkbox: ++row; - mManagesieveCheck = new QCheckBox( i18n("&Server supports Sieve"), this ); + mManagesieveCheck = new TQCheckBox( i18n("&Server supports Sieve"), this ); glay->addMultiCellWidget( mManagesieveCheck, row, row, 0, 1 ); - connect( mManagesieveCheck, SIGNAL(toggled(bool)), SLOT(slotEnableWidgets()) ); + connect( mManagesieveCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableWidgets()) ); // "reuse host and login config" checkbox: ++row; - mSameConfigCheck = new QCheckBox( i18n("&Reuse host and login configuration"), this ); + mSameConfigCheck = new TQCheckBox( i18n("&Reuse host and login configuration"), this ); mSameConfigCheck->setChecked( true ); mSameConfigCheck->setEnabled( false ); glay->addMultiCellWidget( mSameConfigCheck, row, row, 0, 1 ); - connect( mSameConfigCheck, SIGNAL(toggled(bool)), SLOT(slotEnableWidgets()) ); + connect( mSameConfigCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableWidgets()) ); // "Managesieve port" spinbox and label: ++row; mPortSpin = new KIntSpinBox( 1, USHRT_MAX, 1, 2000, 10, this ); mPortSpin->setEnabled( false ); - label = new QLabel( mPortSpin, i18n("Managesieve &port:"), this ); + label = new TQLabel( mPortSpin, i18n("Managesieve &port:"), this ); glay->addWidget( label, row, 0 ); glay->addWidget( mPortSpin, row, 1 ); @@ -93,7 +93,7 @@ namespace KMail { ++row; mAlternateURLEdit = new KLineEdit( this ); mAlternateURLEdit->setEnabled( false ); - glay->addWidget( new QLabel( mAlternateURLEdit, i18n("&Alternate URL:"), this ), row, 0 ); + glay->addWidget( new TQLabel( mAlternateURLEdit, i18n("&Alternate URL:"), this ), row, 0 ); glay->addWidget( mAlternateURLEdit, row, 1 ); // row 4 is spacer @@ -139,7 +139,7 @@ namespace KMail { return KURL(); if ( url.hasPass() ) - url.setPass( QString::null ); + url.setPass( TQString::null ); return url; } @@ -149,11 +149,11 @@ namespace KMail { } - QString SieveConfigEditor::vacationFileName() const { + TQString SieveConfigEditor::vacationFileName() const { return mVacationFileName; } - void SieveConfigEditor::setVacationFileName( const QString& name ) { + void SieveConfigEditor::setVacationFileName( const TQString& name ) { mVacationFileName = name; } diff --git a/kmail/sieveconfig.h b/kmail/sieveconfig.h index 55c63cc55..39bbe4ae7 100644 --- a/kmail/sieveconfig.h +++ b/kmail/sieveconfig.h @@ -15,7 +15,7 @@ #ifndef __KMAIL_SIEVECONFIG_H__ #define __KMAIL_SIEVECONFIG_H__ -#include <qwidget.h> +#include <tqwidget.h> #include <kurl.h> @@ -30,7 +30,7 @@ namespace KMail { public: SieveConfig( bool managesieveSupported=false, bool reuseConfig=true, unsigned int port=2000, const KURL & alternateURL=KURL(), - const QString& vacationFileName = QString::null ) + const TQString& vacationFileName = TQString::null ) : mManagesieveSupported( managesieveSupported ), mReuseConfig( reuseConfig ), mPort( port ), @@ -72,7 +72,7 @@ namespace KMail { mAlternateURL = url; } - QString vacationFileName() const { return mVacationFileName; } + TQString vacationFileName() const { return mVacationFileName; } void readConfig( const KConfigBase & config ); void writeConfig( KConfigBase & config ) const; @@ -82,13 +82,13 @@ namespace KMail { bool mReuseConfig; unsigned short mPort; KURL mAlternateURL; - QString mVacationFileName; + TQString mVacationFileName; }; - class SieveConfigEditor : public QWidget { + class SieveConfigEditor : public TQWidget { Q_OBJECT public: - SieveConfigEditor( QWidget * parent=0, const char * name=0 ); + SieveConfigEditor( TQWidget * parent=0, const char * name=0 ); bool managesieveSupported() const; virtual void setManagesieveSupported( bool enable ); @@ -102,8 +102,8 @@ namespace KMail { KURL alternateURL() const; virtual void setAlternateURL( const KURL & url ); - QString vacationFileName() const; - virtual void setVacationFileName( const QString & url ); + TQString vacationFileName() const; + virtual void setVacationFileName( const TQString & url ); SieveConfig config() const { return SieveConfig( managesieveSupported(), reuseConfig(), @@ -116,11 +116,11 @@ namespace KMail { void slotEnableWidgets(); protected: - QCheckBox * mManagesieveCheck; - QCheckBox * mSameConfigCheck; + TQCheckBox * mManagesieveCheck; + TQCheckBox * mSameConfigCheck; KIntSpinBox * mPortSpin; - QLineEdit * mAlternateURLEdit; - QString mVacationFileName; + TQLineEdit * mAlternateURLEdit; + TQString mVacationFileName; }; } // namespace KMail diff --git a/kmail/sievedebugdialog.cpp b/kmail/sievedebugdialog.cpp index 30a34136a..5ab305e83 100644 --- a/kmail/sievedebugdialog.cpp +++ b/kmail/sievedebugdialog.cpp @@ -25,7 +25,7 @@ #include <cassert> #include <limits.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <kdebug.h> #include <klocale.h> @@ -43,7 +43,7 @@ using KMail::AccountManager; #include "kmkernel.h" #include "sievejob.h" -#include <qtextedit.h> +#include <tqtextedit.h> using KMail::SieveJob; using KMime::Types::AddrSpecList; @@ -77,7 +77,7 @@ public: } private: - void commandStart( const QString & identifier ) + void commandStart( const TQString & identifier ) { kdDebug( 5006 ) << k_funcinfo << "Identifier: '" << identifier << "'" << endl; reset(); @@ -88,7 +88,7 @@ private: kdDebug( 5006 ) << k_funcinfo << endl; } - void testStart( const QString & ) + void testStart( const TQString & ) { kdDebug( 5006 ) << k_funcinfo << endl; } @@ -118,12 +118,12 @@ private: kdDebug( 5006 ) << k_funcinfo << endl; } - void hashComment( const QString & ) + void hashComment( const TQString & ) { kdDebug( 5006 ) << k_funcinfo << endl; } - void bracketComment( const QString & ) + void bracketComment( const TQString & ) { kdDebug( 5006 ) << k_funcinfo << endl; } @@ -144,12 +144,12 @@ private: kdDebug( 5006 ) << k_funcinfo << endl; } - void taggedArgument( const QString & tag ) + void taggedArgument( const TQString & tag ) { kdDebug( 5006 ) << k_funcinfo << "Tag: '" << tag << "'" << endl; } - void stringArgument( const QString & string, bool, const QString & ) + void stringArgument( const TQString & string, bool, const TQString & ) { kdDebug( 5006 ) << k_funcinfo << "String: '" << string << "'" << endl; } @@ -164,7 +164,7 @@ private: kdDebug( 5006 ) << k_funcinfo << endl; } - void stringListEntry( const QString & string, bool, const QString & ) + void stringListEntry( const TQString & string, bool, const TQString & ) { kdDebug( 5006 ) << k_funcinfo << "String: '" << string << "'" << endl; } @@ -186,7 +186,7 @@ private: namespace KMail { -SieveDebugDialog::SieveDebugDialog( QWidget *parent, const char *name ) +SieveDebugDialog::SieveDebugDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Sieve Diagnostics" ), KDialogBase::Ok, KDialogBase::Ok, true ), mSieveJob( 0 ) @@ -197,16 +197,16 @@ SieveDebugDialog::SieveDebugDialog( QWidget *parent, const char *name ) for ( KMAccount *a = am->first(); a; a = am->next() ) mAccountList.append( a ); - mEdit = new QTextEdit( this ); + mEdit = new TQTextEdit( this ); mEdit->setReadOnly(true); setMainWidget( mEdit ); mEdit->setText( i18n( "Collecting diagnostic information about Sieve support...\n\n" ) ); - setInitialSize( QSize( 640, 480 ) ); + setInitialSize( TQSize( 640, 480 ) ); if ( !mAccountList.isEmpty() ) - QTimer::singleShot( 0, this, SLOT( slotDiagNextAccount() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextAccount() ) ); } SieveDebugDialog::~SieveDebugDialog() @@ -256,8 +256,8 @@ void SieveDebugDialog::slotDiagNextAccount() mSieveJob = SieveJob::list( mUrl ); - connect( mSieveJob, SIGNAL( gotList( KMail::SieveJob *, bool, const QStringList &, const QString & ) ), - SLOT( slotGetScriptList( KMail::SieveJob *, bool, const QStringList &, const QString & ) ) ); + connect( mSieveJob, TQT_SIGNAL( gotList( KMail::SieveJob *, bool, const TQStringList &, const TQString & ) ), + TQT_SLOT( slotGetScriptList( KMail::SieveJob *, bool, const TQStringList &, const TQString & ) ) ); // Bypass the singleShot timer -- it's fired when we get our data return; @@ -267,7 +267,7 @@ void SieveDebugDialog::slotDiagNextAccount() } // Handle next account async - QTimer::singleShot( 0, this, SLOT( slotDiagNextAccount() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextAccount() ) ); } void SieveDebugDialog::slotDiagNextScript() @@ -276,11 +276,11 @@ void SieveDebugDialog::slotDiagNextScript() { // Continue handling accounts instead mScriptList.clear(); - QTimer::singleShot( 0, this, SLOT( slotDiagNextAccount() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextAccount() ) ); return; } - QString scriptFile = mScriptList.first(); + TQString scriptFile = mScriptList.first(); mScriptList.pop_front(); mEdit->append( i18n( "Contents of script '%1':\n" ).arg( scriptFile ) ); @@ -303,12 +303,12 @@ void SieveDebugDialog::slotDiagNextScript() mSieveJob = SieveJob::get( mUrl ); - connect( mSieveJob, SIGNAL( gotScript( KMail::SieveJob *, bool, const QString &, bool ) ), - SLOT( slotGetScript( KMail::SieveJob *, bool, const QString &, bool ) ) ); + connect( mSieveJob, TQT_SIGNAL( gotScript( KMail::SieveJob *, bool, const TQString &, bool ) ), + TQT_SLOT( slotGetScript( KMail::SieveJob *, bool, const TQString &, bool ) ) ); } void SieveDebugDialog::slotGetScript( SieveJob * /* job */, bool success, - const QString &script, bool active ) + const TQString &script, bool active ) { kdDebug( 5006 ) << "SieveDebugDialog::slotGetScript( ??, " << success << ", ?, " << active << " )" << endl @@ -329,25 +329,25 @@ void SieveDebugDialog::slotGetScript( SieveJob * /* job */, bool success, } // Fetch next script - QTimer::singleShot( 0, this, SLOT( slotDiagNextScript() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextScript() ) ); } void SieveDebugDialog::slotGetScriptList( SieveJob *job, bool success, - const QStringList &scriptList, const QString &activeScript ) + const TQStringList &scriptList, const TQString &activeScript ) { kdDebug( 5006 ) << k_funcinfo << "Success: " << success << ", List: " << scriptList.join( ", " ) << ", active: " << activeScript << endl; mSieveJob = 0; // job deletes itself after returning from this slot! mEdit->append( i18n( "Sieve capabilities:\n" ) ); - QStringList caps = job->sieveCapabilities(); + TQStringList caps = job->sieveCapabilities(); if ( caps.isEmpty() ) { mEdit->append( i18n( "(No special capabilities available)" ) ); } else { - for ( QStringList::const_iterator it = caps.begin(); it != caps.end(); ++it ) + for ( TQStringList::const_iterator it = caps.begin(); it != caps.end(); ++it ) mEdit->append( "* " + *it + "\n" ); mEdit->append( "\n" ); } @@ -361,14 +361,14 @@ void SieveDebugDialog::slotGetScriptList( SieveJob *job, bool success, else { mScriptList = scriptList; - for ( QStringList::const_iterator it = scriptList.begin(); it != scriptList.end(); ++it ) + for ( TQStringList::const_iterator it = scriptList.begin(); it != scriptList.end(); ++it ) mEdit->append( "* " + *it + "\n" ); mEdit->append( "\n" ); mEdit->append( i18n( "Active script: %1\n\n" ).arg( activeScript ) ); } // Handle next job: dump scripts for this server - QTimer::singleShot( 0, this, SLOT( slotDiagNextScript() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextScript() ) ); } void SieveDebugDialog::slotDialogOk() diff --git a/kmail/sievedebugdialog.h b/kmail/sievedebugdialog.h index ba51368a7..384c003d1 100644 --- a/kmail/sievedebugdialog.h +++ b/kmail/sievedebugdialog.h @@ -34,7 +34,7 @@ namespace KMime namespace Types { struct AddrSpec; - typedef QValueList<AddrSpec> AddrSpecList; + typedef TQValueList<AddrSpec> AddrSpecList; } } @@ -52,7 +52,7 @@ class SieveDebugDialog : public KDialogBase Q_OBJECT public: - SieveDebugDialog( QWidget *parent = 0, const char *name = 0 ); + SieveDebugDialog( TQWidget *parent = 0, const char *name = 0 ); virtual ~SieveDebugDialog(); protected: @@ -62,8 +62,8 @@ signals: void result( bool success ); protected slots: - void slotGetScript( KMail::SieveJob *job, bool success, const QString &script, bool active ); - void slotGetScriptList( KMail::SieveJob *job, bool success, const QStringList &scriptList, const QString &activeScript ); + void slotGetScript( KMail::SieveJob *job, bool success, const TQString &script, bool active ); + void slotGetScriptList( KMail::SieveJob *job, bool success, const TQStringList &scriptList, const TQString &activeScript ); void slotDialogOk(); void slotPutActiveResult( KMail::SieveJob*, bool ); @@ -75,14 +75,14 @@ protected: KMail::SieveJob *mSieveJob; KURL mUrl; - QTextEdit *mEdit; + TQTextEdit *mEdit; // Copied from AccountManager, because we have to do an async iteration // WARNING: When copy/pasting this code, be aware that accounts may // get removed inbetween! For debugging this is good enough // though. - Martijn - QValueList<KMAccount *> mAccountList; - QStringList mScriptList; + TQValueList<KMAccount *> mAccountList; + TQStringList mScriptList; KMail::ImapAccountBase *mAccountBase; }; diff --git a/kmail/sievejob.cpp b/kmail/sievejob.cpp index c876c4284..ade08b1da 100644 --- a/kmail/sievejob.cpp +++ b/kmail/sievejob.cpp @@ -26,16 +26,16 @@ using KIO::UDSEntryList; using KIO::UDSEntry; #include <kdebug.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <cassert> namespace KMail { - SieveJob::SieveJob( const KURL & url, const QString & script, - const QValueStack<Command> & commands, - QObject * parent, const char * name ) - : QObject( parent, name ), + SieveJob::SieveJob( const KURL & url, const TQString & script, + const TQValueStack<Command> & commands, + TQObject * parent, const char * name ) + : TQObject( parent, name ), mUrl( url ), mJob( 0 ), mDec( 0 ), mScript( script ), mFileExists( DontKnow ), mCommands( commands ), mShowProgressInfo(true) @@ -44,11 +44,11 @@ namespace KMail { schedule( commands.top(), true ); } - SieveJob::SieveJob( const KURL & url, const QString & script, - const QValueStack<Command> & commands, + SieveJob::SieveJob( const KURL & url, const TQString & script, + const TQValueStack<Command> & commands, bool showProgressInfo, - QObject * parent, const char * name ) - : QObject( parent, name ), + TQObject * parent, const char * name ) + : TQObject( parent, name ), mUrl( url ), mJob( 0 ), mDec( 0 ), mScript( script ), mFileExists( DontKnow ), mCommands( commands ), mShowProgressInfo(showProgressInfo) @@ -72,14 +72,14 @@ namespace KMail { case Get: kdDebug(5006) << "SieveJob::schedule: get( " << mUrl.prettyURL() << " )" << endl; mJob = KIO::get( mUrl, false /*reload*/, showProgressInfo ); - connect( mJob, SIGNAL(data(KIO::Job*,const QByteArray&)), - SLOT(slotData(KIO::Job*,const QByteArray&)) ); + connect( mJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)), + TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) ); break; case Put: kdDebug(5006) << "SieveJob::schedule: put( " << mUrl.prettyURL() << " )" << endl; mJob = KIO::put( mUrl, 0600, true /*overwrite*/, false /*resume*/, showProgressInfo ); - connect( mJob, SIGNAL(dataReq(KIO::Job*,QByteArray&)), - SLOT(slotDataReq(KIO::Job*,QByteArray&)) ); + connect( mJob, TQT_SIGNAL(dataReq(KIO::Job*,TQByteArray&)), + TQT_SLOT(slotDataReq(KIO::Job*,TQByteArray&)) ); break; case Activate: kdDebug(5006) << "SieveJob::schedule: chmod( " << mUrl.prettyURL() << ", 0700 )" @@ -95,23 +95,23 @@ namespace KMail { kdDebug(5006) << "SieveJob::schedule: listDir( " << mUrl.prettyURL() << " )" << endl; { KURL url = mUrl; - QString query = url.query(); //save query part, because KURL::cd() erases it + TQString query = url.query(); //save query part, because KURL::cd() erases it if ( !url.fileName().isEmpty() ) url.cd(".."); url.setQuery( query ); kdDebug(5006) << "SieveJob::schedule: listDir's real URL: " << url.prettyURL() << endl; mJob = KIO::listDir( url, showProgressInfo ); - connect( mJob, SIGNAL(entries(KIO::Job*,const KIO::UDSEntryList&)), - SLOT(slotEntries(KIO::Job*,const KIO::UDSEntryList&)) ); + connect( mJob, TQT_SIGNAL(entries(KIO::Job*,const KIO::UDSEntryList&)), + TQT_SLOT(slotEntries(KIO::Job*,const KIO::UDSEntryList&)) ); break; } case List: kdDebug(5006) << "SieveJob::schedule: listDir( " << mUrl.prettyURL() << " )" << endl; { mJob = KIO::listDir( mUrl, showProgressInfo ); - connect( mJob, SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList & ) ), - SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) ); + connect( mJob, TQT_SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList & ) ), + TQT_SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) ); break; } case Delete: @@ -123,26 +123,26 @@ namespace KMail { } mJob->setInteractive(showProgressInfo); // common to all jobs: - connect( mJob, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)) ); + connect( mJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)) ); } - void SieveJob::slotData( Job *, const QByteArray & data ) { + void SieveJob::slotData( Job *, const TQByteArray & data ) { // check for end-of-data marker: if ( data.size() == 0 ) return; // make sure we have a textdecoder; if ( !mDec ) - mDec = QTextCodec::codecForMib( 106 /*utf8*/ )->makeDecoder(); + mDec = TQTextCodec::codecForMib( 106 /*utf8*/ )->makeDecoder(); // decode utf8; add to mScript: mScript += mDec->toUnicode( data.data(), data.size() ); } - void SieveJob::slotDataReq( Job *, QByteArray & data ) { + void SieveJob::slotDataReq( Job *, TQByteArray & data ) { // check whether we have already sent our data: if ( mScript.isEmpty() ) { - data = QByteArray(); // end-of-data marker + data = TQByteArray(); // end-of-data marker return; } @@ -154,7 +154,7 @@ namespace KMail { data.resize( data.size() - 1 ); // mark mScript sent: - mScript = QString::null; + mScript = TQString::null; } void SieveJob::slotEntries( Job *, const UDSEntryList & l ) { @@ -163,7 +163,7 @@ namespace KMail { // Loop over all UDS atoms to find the UDS_ACCESS and UDS_NAME atoms; // note if we find an exec'able file ( == active script ) // or the requested filename (mUrl.fileName()). - QString filename; + TQString filename; bool isActive = false; for ( UDSEntry::const_iterator et = (*it).begin() ; et != (*it).end() ; ++ et ) { if ( ( *et ).m_uds == KIO::UDS_NAME ) { @@ -197,7 +197,7 @@ namespace KMail { delete mDec; mDec = 0; if ( mSieveCapabilities.empty() ) { - mSieveCapabilities = QStringList::split( ' ', job->queryMetaData( "sieveExtensions" ) ); + mSieveCapabilities = TQStringList::split( ' ', job->queryMetaData( "sieveExtensions" ) ); kdDebug(5006) << "Received Sieve extensions supported:" << endl << mSieveCapabilities.join("\n") << endl; } @@ -224,7 +224,7 @@ namespace KMail { if ( !mCommands.empty() ) { // Don't fail get'ting a non-existant script: if ( mCommands.top() == Get && mFileExists == No ) { - mScript = QString::null; + mScript = TQString::null; mCommands.pop(); } } @@ -246,9 +246,9 @@ namespace KMail { } } - SieveJob * SieveJob::put( const KURL & dest, const QString & script, + SieveJob * SieveJob::put( const KURL & dest, const TQString & script, bool makeActive, bool wasActive ) { - QValueStack<Command> commands; + TQValueStack<Command> commands; if ( makeActive ) commands.push( Activate ); if ( wasActive ) @@ -258,27 +258,27 @@ namespace KMail { } SieveJob * SieveJob::get( const KURL & src, bool showProgressInfo ) { - QValueStack<Command> commands; + TQValueStack<Command> commands; commands.push( Get ); commands.push( SearchActive ); - return new SieveJob( src, QString::null, commands, showProgressInfo ); + return new SieveJob( src, TQString::null, commands, showProgressInfo ); } SieveJob * SieveJob::list( const KURL & src ) { - QValueStack<Command> commands; + TQValueStack<Command> commands; commands.push( List ); - return new SieveJob( src, QString::null, commands ); + return new SieveJob( src, TQString::null, commands ); } SieveJob * SieveJob::del( const KURL & url ) { - QValueStack<Command> commands; + TQValueStack<Command> commands; commands.push( Delete ); - return new SieveJob( url, QString::null, commands ); + return new SieveJob( url, TQString::null, commands ); } SieveJob * SieveJob::activate( const KURL & url ) { - QValueStack<Command> commands; + TQValueStack<Command> commands; commands.push( Activate ); - return new SieveJob( url, QString::null, commands ); + return new SieveJob( url, TQString::null, commands ); } } // namespace KMail diff --git a/kmail/sievejob.h b/kmail/sievejob.h index f7c353cf2..67f3d231e 100644 --- a/kmail/sievejob.h +++ b/kmail/sievejob.h @@ -15,11 +15,11 @@ #ifndef __KMAIL_SIEVE_JOB_H__ #define __KMAIL_SIEVE_JOB_H__ -#include <qobject.h> -#include <qvaluestack.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqvaluestack.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqcstring.h> #include <kurl.h> #include <kio/global.h> @@ -31,17 +31,17 @@ namespace KIO { namespace KMail { - class SieveJob : public QObject { + class SieveJob : public TQObject { Q_OBJECT protected: enum Command { Get, Put, Activate, Deactivate, SearchActive, List, Delete }; - SieveJob( const KURL & url, const QString & script, - const QValueStack<Command> & commands, - QObject * parent=0, const char * name=0 ); - SieveJob( const KURL & url, const QString & script, - const QValueStack<Command> & commands, + SieveJob( const KURL & url, const TQString & script, + const TQValueStack<Command> & commands, + TQObject * parent=0, const char * name=0 ); + SieveJob( const KURL & url, const TQString & script, + const TQValueStack<Command> & commands, bool showProgressInfo, - QObject * parent=0, const char * name=0 ); + TQObject * parent=0, const char * name=0 ); virtual ~SieveJob(); public: @@ -51,7 +51,7 @@ namespace KMail { * Store a Sieve script. If @param makeActive is set, also mark the * script active */ - static SieveJob * put( const KURL & dest, const QString & script, + static SieveJob * put( const KURL & dest, const TQString & script, bool makeActive, bool wasActive ); /** @@ -70,7 +70,7 @@ namespace KMail { void kill( bool quiet=true ); - const QStringList & sieveCapabilities() const { + const TQStringList & sieveCapabilities() const { return mSieveCapabilities; } @@ -80,7 +80,7 @@ namespace KMail { signals: void gotScript( KMail::SieveJob * job, bool success, - const QString & script, bool active ); + const TQString & script, bool active ); /** * We got the list of available scripts @@ -90,35 +90,35 @@ namespace KMail { * empty string if no script is active. */ void gotList( KMail::SieveJob *job, bool success, - const QStringList &scriptList, const QString &activeScript ); + const TQStringList &scriptList, const TQString &activeScript ); void result( KMail::SieveJob * job, bool success, - const QString & script, bool active ); + const TQString & script, bool active ); - void item( KMail::SieveJob * job, const QString & filename, bool active ); + void item( KMail::SieveJob * job, const TQString & filename, bool active ); protected: void schedule( Command command, bool showProgressInfo ); protected slots: - void slotData( KIO::Job *, const QByteArray & ); // for get - void slotDataReq( KIO::Job *, QByteArray & ); // for put + void slotData( KIO::Job *, const TQByteArray & ); // for get + void slotDataReq( KIO::Job *, TQByteArray & ); // for put void slotEntries( KIO::Job *, const KIO::UDSEntryList & ); // for listDir void slotResult( KIO::Job * ); // for all commands protected: KURL mUrl; KIO::Job * mJob; - QTextDecoder * mDec; - QString mScript; - QString mActiveScriptName; + TQTextDecoder * mDec; + TQString mScript; + TQString mActiveScriptName; Existence mFileExists; - QStringList mSieveCapabilities; - QValueStack<Command> mCommands; + TQStringList mSieveCapabilities; + TQValueStack<Command> mCommands; bool mShowProgressInfo; // List of Sieve scripts on the server, used by @ref list() - QStringList mAvailableScripts; + TQStringList mAvailableScripts; }; } // namespace KMail diff --git a/kmail/signatureconfigurator.cpp b/kmail/signatureconfigurator.cpp index 68bfd1949..606d460de 100644 --- a/kmail/signatureconfigurator.cpp +++ b/kmail/signatureconfigurator.cpp @@ -26,15 +26,15 @@ #include <kshellcompletion.h> #include <krun.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtextedit.h> -#include <qwhatsthis.h> -#include <qwidgetstack.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtextedit.h> +#include <tqwhatsthis.h> +#include <tqwidgetstack.h> #include <assert.h> @@ -42,32 +42,32 @@ using namespace KMail; namespace KMail { - SignatureConfigurator::SignatureConfigurator( QWidget * parent, const char * name ) - : QWidget( parent, name ) + SignatureConfigurator::SignatureConfigurator( TQWidget * parent, const char * name ) + : TQWidget( parent, name ) { // tmp. vars: - QLabel * label; - QWidget * page; - QHBoxLayout * hlay; - QVBoxLayout * vlay; - QVBoxLayout * page_vlay; + TQLabel * label; + TQWidget * page; + TQHBoxLayout * hlay; + TQVBoxLayout * vlay; + TQVBoxLayout * page_vlay; - vlay = new QVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" ); + vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" ); // "enable signatue" checkbox: - mEnableCheck = new QCheckBox( i18n("&Enable signature"), this ); - QWhatsThis::add(mEnableCheck, + mEnableCheck = new TQCheckBox( i18n("&Enable signature"), this ); + TQWhatsThis::add(mEnableCheck, i18n("Check this box if you want KMail to append a signature to mails " "written with this identity.")); vlay->addWidget( mEnableCheck ); // "obtain signature text from" combo and label: - hlay = new QHBoxLayout( vlay ); // inherits spacing - mSourceCombo = new QComboBox( false, this ); - QWhatsThis::add(mSourceCombo, + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mSourceCombo = new TQComboBox( false, this ); + TQWhatsThis::add(mSourceCombo, i18n("Click on the widgets below to obtain help on the input methods.")); mSourceCombo->setEnabled( false ); // since !mEnableCheck->isChecked() - mSourceCombo->insertStringList( QStringList() + mSourceCombo->insertStringList( TQStringList() << i18n("continuation of \"obtain signature text from\"", "Input Field Below") << i18n("continuation of \"obtain signature text from\"", @@ -75,62 +75,62 @@ namespace KMail { << i18n("continuation of \"obtain signature text from\"", "Output of Command") ); - label = new QLabel( mSourceCombo, + label = new TQLabel( mSourceCombo, i18n("Obtain signature &text from:"), this ); label->setEnabled( false ); // since !mEnableCheck->isChecked() hlay->addWidget( label ); hlay->addWidget( mSourceCombo, 1 ); // widget stack that is controlled by the source combo: - QWidgetStack * widgetStack = new QWidgetStack( this ); + TQWidgetStack * widgetStack = new TQWidgetStack( this ); widgetStack->setEnabled( false ); // since !mEnableCheck->isChecked() vlay->addWidget( widgetStack, 1 ); - connect( mSourceCombo, SIGNAL(highlighted(int)), - widgetStack, SLOT(raiseWidget(int)) ); + connect( mSourceCombo, TQT_SIGNAL(highlighted(int)), + widgetStack, TQT_SLOT(raiseWidget(int)) ); // connects for the enabling of the widgets depending on // signatureEnabled: - connect( mEnableCheck, SIGNAL(toggled(bool)), - mSourceCombo, SLOT(setEnabled(bool)) ); - connect( mEnableCheck, SIGNAL(toggled(bool)), - widgetStack, SLOT(setEnabled(bool)) ); - connect( mEnableCheck, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); + connect( mEnableCheck, TQT_SIGNAL(toggled(bool)), + mSourceCombo, TQT_SLOT(setEnabled(bool)) ); + connect( mEnableCheck, TQT_SIGNAL(toggled(bool)), + widgetStack, TQT_SLOT(setEnabled(bool)) ); + connect( mEnableCheck, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); // The focus might be still in the widget that is disabled - connect( mEnableCheck, SIGNAL(clicked()), - mEnableCheck, SLOT(setFocus()) ); + connect( mEnableCheck, TQT_SIGNAL(clicked()), + mEnableCheck, TQT_SLOT(setFocus()) ); int pageno = 0; // page 0: input field for direct entering: - mTextEdit = new QTextEdit( widgetStack ); - QWhatsThis::add(mTextEdit, + mTextEdit = new TQTextEdit( widgetStack ); + TQWhatsThis::add(mTextEdit, i18n("Use this field to enter an arbitrary static signature.")); widgetStack->addWidget( mTextEdit, pageno ); mTextEdit->setFont( KGlobalSettings::fixedFont() ); - mTextEdit->setWordWrap( QTextEdit::NoWrap ); + mTextEdit->setWordWrap( TQTextEdit::NoWrap ); mTextEdit->setTextFormat( Qt::PlainText ); widgetStack->raiseWidget( 0 ); // since mSourceCombo->currentItem() == 0 // page 1: "signature file" requester, label, "edit file" button: ++pageno; - page = new QWidget( widgetStack ); + page = new TQWidget( widgetStack ); widgetStack->addWidget( page, pageno ); // force sequential numbers (play safe) - page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() ); - hlay = new QHBoxLayout( page_vlay ); // inherits spacing + page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() ); + hlay = new TQHBoxLayout( page_vlay ); // inherits spacing mFileRequester = new KURLRequester( page ); - QWhatsThis::add(mFileRequester, + TQWhatsThis::add(mFileRequester, i18n("Use this requester to specify a text file that contains your " "signature. It will be read every time you create a new mail or " "append a new signature.")); - hlay->addWidget( new QLabel( mFileRequester, + hlay->addWidget( new TQLabel( mFileRequester, i18n("S&pecify file:"), page ) ); hlay->addWidget( mFileRequester, 1 ); mFileRequester->button()->setAutoDefault( false ); - connect( mFileRequester, SIGNAL(textChanged(const QString &)), - this, SLOT(slotEnableEditButton(const QString &)) ); - mEditButton = new QPushButton( i18n("Edit &File"), page ); - QWhatsThis::add(mEditButton, i18n("Opens the specified file in a text editor.")); - connect( mEditButton, SIGNAL(clicked()), SLOT(slotEdit()) ); + connect( mFileRequester, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotEnableEditButton(const TQString &)) ); + mEditButton = new TQPushButton( i18n("Edit &File"), page ); + TQWhatsThis::add(mEditButton, i18n("Opens the specified file in a text editor.")); + connect( mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()) ); mEditButton->setAutoDefault( false ); mEditButton->setEnabled( false ); // initially nothing to edit hlay->addWidget( mEditButton ); @@ -138,20 +138,20 @@ namespace KMail { // page 2: "signature command" requester and label: ++pageno; - page = new QWidget( widgetStack ); + page = new TQWidget( widgetStack ); widgetStack->addWidget( page, pageno ); - page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() ); - hlay = new QHBoxLayout( page_vlay ); // inherits spacing + page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() ); + hlay = new TQHBoxLayout( page_vlay ); // inherits spacing mCommandEdit = new KLineEdit( page ); mCommandEdit->setCompletionObject( new KShellCompletion() ); mCommandEdit->setAutoDeleteCompletionObject( true ); - QWhatsThis::add(mCommandEdit, + TQWhatsThis::add(mCommandEdit, i18n("You can add an arbitrary command here, either with or without path " "depending on whether or not the command is in your Path. For every " "new mail, KMail will execute the command and use what it outputs (to " "standard output) as a signature. Usual commands for use with this " "mechanism are \"fortune\" or \"ksig -random\".")); - hlay->addWidget( new QLabel( mCommandEdit, + hlay->addWidget( new TQLabel( mCommandEdit, i18n("S&pecify command:"), page ) ); hlay->addWidget( mCommandEdit, 1 ); page_vlay->addStretch( 1 ); // spacer @@ -195,34 +195,34 @@ namespace KMail { mSourceCombo->setCurrentItem( idx ); } - QString SignatureConfigurator::inlineText() const { + TQString SignatureConfigurator::inlineText() const { return mTextEdit->text(); } - void SignatureConfigurator::setInlineText( const QString & text ) { + void SignatureConfigurator::setInlineText( const TQString & text ) { mTextEdit->setText( text ); } - QString SignatureConfigurator::fileURL() const { - QString file = mFileRequester->url().stripWhiteSpace(); + TQString SignatureConfigurator::fileURL() const { + TQString file = mFileRequester->url().stripWhiteSpace(); // Force the filename to be relative to ~ instead of $PWD depending // on the rest of the code (KRun::run in Edit and KFileItem on save) - if ( !file.isEmpty() && QFileInfo( file ).isRelative() ) - file = QDir::home().absPath() + QDir::separator() + file; + if ( !file.isEmpty() && TQFileInfo( file ).isRelative() ) + file = TQDir::home().absPath() + TQDir::separator() + file; return file; } - void SignatureConfigurator::setFileURL( const QString & url ) { + void SignatureConfigurator::setFileURL( const TQString & url ) { mFileRequester->setURL( url ); } - QString SignatureConfigurator::commandURL() const { + TQString SignatureConfigurator::commandURL() const { return mCommandEdit->text(); } - void SignatureConfigurator::setCommandURL( const QString & url ) { + void SignatureConfigurator::setCommandURL( const TQString & url ) { mCommandEdit->setText( url ); } @@ -244,23 +244,23 @@ namespace KMail { if ( sig.type() == Signature::FromFile ) setFileURL( sig.url() ); else - setFileURL( QString::null ); + setFileURL( TQString::null ); if ( sig.type() == Signature::FromCommand ) setCommandURL( sig.url() ); else - setCommandURL( QString::null ); + setCommandURL( TQString::null ); } - void SignatureConfigurator::slotEnableEditButton( const QString & url ) { + void SignatureConfigurator::slotEnableEditButton( const TQString & url ) { mEditButton->setDisabled( url.stripWhiteSpace().isEmpty() ); } void SignatureConfigurator::slotEdit() { - QString url = fileURL(); + TQString url = fileURL(); // slotEnableEditButton should prevent this assert from being hit: assert( !url.isEmpty() ); - (void)KRun::runURL( KURL( url ), QString::fromLatin1("text/plain") ); + (void)KRun::runURL( KURL( url ), TQString::fromLatin1("text/plain") ); } } // namespace KMail diff --git a/kmail/signatureconfigurator.h b/kmail/signatureconfigurator.h index f67a9f9d8..2599961ae 100644 --- a/kmail/signatureconfigurator.h +++ b/kmail/signatureconfigurator.h @@ -16,7 +16,7 @@ #ifndef __KMAIL_SIGNATURECONFIGURATOR_H__ #define __KMAIL_SIGNATURECONFIGURATOR_H__ -#include <qwidget.h> +#include <tqwidget.h> #include <libkpimidentities/identity.h> // for Signature::Type using KPIM::Signature; @@ -31,10 +31,10 @@ class QTextEdit; namespace KMail { - class SignatureConfigurator : public QWidget { + class SignatureConfigurator : public TQWidget { Q_OBJECT public: - SignatureConfigurator( QWidget * parent=0, const char * name=0 ); + SignatureConfigurator( TQWidget * parent=0, const char * name=0 ); virtual ~SignatureConfigurator(); bool isSignatureEnabled() const; @@ -43,14 +43,14 @@ namespace KMail { Signature::Type signatureType() const; void setSignatureType( Signature::Type type ); - QString inlineText() const; - void setInlineText( const QString & text ); + TQString inlineText() const; + void setInlineText( const TQString & text ); - QString fileURL() const; - void setFileURL( const QString & url ); + TQString fileURL() const; + void setFileURL( const TQString & url ); - QString commandURL() const; - void setCommandURL( const QString & url ); + TQString commandURL() const; + void setCommandURL( const TQString & url ); /** Conveniece method. @@ -63,16 +63,16 @@ namespace KMail { void setSignature( const Signature & sig ); protected slots: - void slotEnableEditButton( const QString & ); + void slotEnableEditButton( const TQString & ); void slotEdit(); protected: - QCheckBox * mEnableCheck; - QComboBox * mSourceCombo; + TQCheckBox * mEnableCheck; + TQComboBox * mSourceCombo; KURLRequester * mFileRequester; - QPushButton * mEditButton; + TQPushButton * mEditButton; KLineEdit * mCommandEdit; - QTextEdit * mTextEdit; + TQTextEdit * mTextEdit; }; } // namespace KMail diff --git a/kmail/simplestringlisteditor.cpp b/kmail/simplestringlisteditor.cpp index e8dc56473..8d71e2215 100644 --- a/kmail/simplestringlisteditor.cpp +++ b/kmail/simplestringlisteditor.cpp @@ -41,7 +41,7 @@ #include <kdebug.h> #include <kpushbutton.h> -#include <qlayout.h> +#include <tqlayout.h> //******************************************************** @@ -49,125 +49,125 @@ //******************************************************** // small helper function: -static inline QListBoxItem * findSelectedItem( QListBox * lb ) { - QListBoxItem * item = 0; +static inline TQListBoxItem * findSelectedItem( TQListBox * lb ) { + TQListBoxItem * item = 0; for ( item = lb->firstItem() ; item && !item->isSelected() ; item = item->next() ) ; return item; } -SimpleStringListEditor::SimpleStringListEditor( QWidget * parent, +SimpleStringListEditor::SimpleStringListEditor( TQWidget * parent, const char * name, ButtonCode buttons, - const QString & addLabel, - const QString & removeLabel, - const QString & modifyLabel, - const QString & addDialogLabel ) - : QWidget( parent, name ), + const TQString & addLabel, + const TQString & removeLabel, + const TQString & modifyLabel, + const TQString & addDialogLabel ) + : TQWidget( parent, name ), mAddButton(0), mRemoveButton(0), mModifyButton(0), mUpButton(0), mDownButton(0), mAddDialogLabel( addDialogLabel.isEmpty() ? i18n("New entry:") : addDialogLabel ) { - QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() ); + TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() ); - mListBox = new QListBox( this ); + mListBox = new TQListBox( this ); hlay->addWidget( mListBox, 1 ); if ( buttons == None ) kdDebug(5006) << "SimpleStringListBox called with no buttons. " - "Consider using a plain QListBox instead!" << endl; + "Consider using a plain TQListBox instead!" << endl; - QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing + TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing if ( buttons & Add ) { if ( addLabel.isEmpty() ) - mAddButton = new QPushButton( i18n("&Add..."), this ); + mAddButton = new TQPushButton( i18n("&Add..."), this ); else - mAddButton = new QPushButton( addLabel, this ); + mAddButton = new TQPushButton( addLabel, this ); mAddButton->setAutoDefault( false ); vlay->addWidget( mAddButton ); - connect( mAddButton, SIGNAL(clicked()), - this, SLOT(slotAdd()) ); + connect( mAddButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAdd()) ); } if ( buttons & Remove ) { if ( removeLabel.isEmpty() ) - mRemoveButton = new QPushButton( i18n("&Remove"), this ); + mRemoveButton = new TQPushButton( i18n("&Remove"), this ); else - mRemoveButton = new QPushButton( removeLabel, this ); + mRemoveButton = new TQPushButton( removeLabel, this ); mRemoveButton->setAutoDefault( false ); mRemoveButton->setEnabled( false ); // no selection yet vlay->addWidget( mRemoveButton ); - connect( mRemoveButton, SIGNAL(clicked()), - this, SLOT(slotRemove()) ); + connect( mRemoveButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemove()) ); } if ( buttons & Modify ) { if ( modifyLabel.isEmpty() ) - mModifyButton = new QPushButton( i18n("&Modify..."), this ); + mModifyButton = new TQPushButton( i18n("&Modify..."), this ); else - mModifyButton = new QPushButton( modifyLabel, this ); + mModifyButton = new TQPushButton( modifyLabel, this ); mModifyButton->setAutoDefault( false ); mModifyButton->setEnabled( false ); // no selection yet vlay->addWidget( mModifyButton ); - connect( mModifyButton, SIGNAL(clicked()), - this, SLOT(slotModify()) ); - connect( mListBox, SIGNAL( doubleClicked( QListBoxItem* ) ), - this, SLOT( slotModify() ) ); + connect( mModifyButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotModify()) ); + connect( mListBox, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ), + this, TQT_SLOT( slotModify() ) ); } if ( buttons & Up ) { if ( !(buttons & Down) ) kdDebug(5006) << "Are you sure you want to use an Up button " "without a Down button??" << endl; - mUpButton = new KPushButton( QString::null, this ); + mUpButton = new KPushButton( TQString::null, this ); mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) ); mUpButton->setAutoDefault( false ); mUpButton->setEnabled( false ); // no selection yet vlay->addWidget( mUpButton ); - connect( mUpButton, SIGNAL(clicked()), - this, SLOT(slotUp()) ); + connect( mUpButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotUp()) ); } if ( buttons & Down ) { if ( !(buttons & Up) ) kdDebug(5006) << "Are you sure you want to use a Down button " "without an Up button??" << endl; - mDownButton = new KPushButton( QString::null, this ); + mDownButton = new KPushButton( TQString::null, this ); mDownButton->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) ); mDownButton->setAutoDefault( false ); mDownButton->setEnabled( false ); // no selection yet vlay->addWidget( mDownButton ); - connect( mDownButton, SIGNAL(clicked()), - this, SLOT(slotDown()) ); + connect( mDownButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDown()) ); } vlay->addStretch( 1 ); // spacer - connect( mListBox, SIGNAL(selectionChanged()), - this, SLOT(slotSelectionChanged()) ); + connect( mListBox, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectionChanged()) ); } -void SimpleStringListEditor::setStringList( const QStringList & strings ) { +void SimpleStringListEditor::setStringList( const TQStringList & strings ) { mListBox->clear(); mListBox->insertStringList( strings ); } -void SimpleStringListEditor::appendStringList( const QStringList & strings ) { +void SimpleStringListEditor::appendStringList( const TQStringList & strings ) { mListBox->insertStringList( strings ); } -QStringList SimpleStringListEditor::stringList() const { - QStringList result; - for ( QListBoxItem * item = mListBox->firstItem() ; +TQStringList SimpleStringListEditor::stringList() const { + TQStringList result; + for ( TQListBoxItem * item = mListBox->firstItem() ; item ; item = item->next() ) result << item->text(); return result; } void SimpleStringListEditor::setButtonText( ButtonCode button, - const QString & text ) { + const TQString & text ) { switch ( button ) { case Add: if ( !mAddButton ) break; @@ -202,8 +202,8 @@ void SimpleStringListEditor::setButtonText( ButtonCode button, void SimpleStringListEditor::slotAdd() { bool ok = false; - QString newEntry = KInputDialog::getText( i18n("New Value"), - mAddDialogLabel, QString::null, + TQString newEntry = KInputDialog::getText( i18n("New Value"), + mAddDialogLabel, TQString::null, &ok, this ); // let the user verify the string before adding emit aboutToAdd( newEntry ); @@ -218,11 +218,11 @@ void SimpleStringListEditor::slotRemove() { } void SimpleStringListEditor::slotModify() { - QListBoxItem * item = findSelectedItem( mListBox ); + TQListBoxItem * item = findSelectedItem( mListBox ); if ( !item ) return; bool ok = false; - QString newText = KInputDialog::getText( i18n("Change Value"), + TQString newText = KInputDialog::getText( i18n("Change Value"), mAddDialogLabel, item->text(), &ok, this ); emit aboutToAdd( newText ); @@ -236,11 +236,11 @@ void SimpleStringListEditor::slotModify() { } void SimpleStringListEditor::slotUp() { - QListBoxItem * item = findSelectedItem( mListBox ); + TQListBoxItem * item = findSelectedItem( mListBox ); if ( !item || !item->prev() ) return; // find the item that we want to insert after: - QListBoxItem * pprev = item->prev()->prev(); + TQListBoxItem * pprev = item->prev()->prev(); // take the item from it's current position... mListBox->takeItem( item ); // ...and insert it after the above mentioned item: @@ -260,11 +260,11 @@ void SimpleStringListEditor::slotUp() { } void SimpleStringListEditor::slotDown() { - QListBoxItem * item = findSelectedItem( mListBox ); + TQListBoxItem * item = findSelectedItem( mListBox ); if ( !item || !item->next() ) return; // find the item that we want to insert after: - QListBoxItem * next = item->next(); + TQListBoxItem * next = item->next(); // take the item from it's current position... mListBox->takeItem( item ); // ...and insert it after the above mentioned item: @@ -288,7 +288,7 @@ void SimpleStringListEditor::slotDown() { void SimpleStringListEditor::slotSelectionChanged() { // try to find a selected item: - QListBoxItem * item = findSelectedItem( mListBox ); + TQListBoxItem * item = findSelectedItem( mListBox ); // if there is one, item will be non-null (ie. true), else 0 // (ie. false): diff --git a/kmail/simplestringlisteditor.h b/kmail/simplestringlisteditor.h index fc9c0367f..9a45e7417 100644 --- a/kmail/simplestringlisteditor.h +++ b/kmail/simplestringlisteditor.h @@ -32,9 +32,9 @@ #ifndef _SIMPLESTRINGLISTEDITOR_H_ #define _SIMPLESTRINGLISTEDITOR_H_ -#include <qwidget.h> -#include <qstringlist.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstringlist.h> +#include <tqstring.h> class QListBox; class QPushButton; @@ -45,7 +45,7 @@ class QPushButton; // // -class SimpleStringListEditor : public QWidget { +class SimpleStringListEditor : public TQWidget { Q_OBJECT public: enum ButtonCode { @@ -57,28 +57,28 @@ public: }; /** Constructor. Populates the list with @p strings. */ - SimpleStringListEditor( QWidget * parent=0, const char * name=0, + SimpleStringListEditor( TQWidget * parent=0, const char * name=0, ButtonCode buttons=Unsorted, - const QString & addLabel=QString::null, - const QString & removeLabel=QString::null, - const QString & modifyLabel=QString::null, - const QString & addDialogLabel=QString::null ); + const TQString & addLabel=TQString::null, + const TQString & removeLabel=TQString::null, + const TQString & modifyLabel=TQString::null, + const TQString & addDialogLabel=TQString::null ); /** Sets the list of strings displayed to @p strings */ - void setStringList( const QStringList & strings ); + void setStringList( const TQStringList & strings ); /** Adds @p strings to the list of displayed strings */ - void appendStringList( const QStringList & strings ); + void appendStringList( const TQStringList & strings ); /** Retrieves the current list of strings */ - QStringList stringList() const; + TQStringList stringList() const; /** Sets the text of button @p button to @p text */ - void setButtonText( ButtonCode button, const QString & text ); + void setButtonText( ButtonCode button, const TQString & text ); signals: /** Connected slots can alter the argument to be added or set the - argument to QString::null to suppress adding. + argument to TQString::null to suppress adding. */ - void aboutToAdd(QString&); + void aboutToAdd(TQString&); void changed(void); protected slots: @@ -91,13 +91,13 @@ protected slots: void slotSelectionChanged(); protected: - QListBox *mListBox; - QPushButton *mAddButton; - QPushButton *mRemoveButton; - QPushButton *mModifyButton; - QPushButton *mUpButton; - QPushButton *mDownButton; - const QString mAddDialogLabel; + TQListBox *mListBox; + TQPushButton *mAddButton; + TQPushButton *mRemoveButton; + TQPushButton *mModifyButton; + TQPushButton *mUpButton; + TQPushButton *mDownButton; + const TQString mAddDialogLabel; }; diff --git a/kmail/snippetconfig.h b/kmail/snippetconfig.h index 9baad64cb..48738b7a1 100644 --- a/kmail/snippetconfig.h +++ b/kmail/snippetconfig.h @@ -14,8 +14,8 @@ #ifndef SNIPPETCONFIG_H #define SNIPPETCONFIG_H -#include <qstring.h> -#include <qrect.h> +#include <tqstring.h> +#include <tqrect.h> /** @@ -31,28 +31,28 @@ public: bool useToolTips() { return (bToolTip); }; int getInputMethod() { return (iInputMethod); }; - QString getDelimiter() { return (strDelimiter); }; - QRect getSingleRect() { return (rSingle); }; - QRect getMultiRect() { return (rMulti); }; + TQString getDelimiter() { return (strDelimiter); }; + TQRect getSingleRect() { return (rSingle); }; + TQRect getMultiRect() { return (rMulti); }; int getAutoOpenGroups() { return iAutoOpenGroups; } void setToolTips(bool b) { bToolTip=b; }; void setInputMethod(int i) { iInputMethod=i; }; - void setDelimiter(QString s) { strDelimiter=s; }; - void setSingleRect(QRect r) { - rSingle = (r.isValid())?r:QRect(); + void setDelimiter(TQString s) { strDelimiter=s; }; + void setSingleRect(TQRect r) { + rSingle = (r.isValid())?r:TQRect(); } - void setMultiRect(QRect r) { - rMulti = (r.isValid())?r:QRect(); + void setMultiRect(TQRect r) { + rMulti = (r.isValid())?r:TQRect(); } void setAutoOpenGroups(int autoopen) { iAutoOpenGroups = autoopen; } protected: bool bToolTip; int iInputMethod; - QString strDelimiter; - QRect rSingle; - QRect rMulti; + TQString strDelimiter; + TQRect rSingle; + TQRect rMulti; int iMultiBasicHeight; int iMultiCount; int iAutoOpenGroups; diff --git a/kmail/snippetdlg.cpp b/kmail/snippetdlg.cpp index 76b4fe178..61c75db88 100644 --- a/kmail/snippetdlg.cpp +++ b/kmail/snippetdlg.cpp @@ -16,8 +16,8 @@ #include <kdialog.h> #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kpushbutton.h> #include <ktextedit.h> #include "kkeybutton.h" @@ -31,16 +31,16 @@ * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -SnippetDlg::SnippetDlg( KActionCollection* ac, QWidget* parent, const char* name, bool modal, WFlags fl ) +SnippetDlg::SnippetDlg( KActionCollection* ac, TQWidget* parent, const char* name, bool modal, WFlags fl ) : SnippetDlgBase( parent, name, modal, fl ), actionCollection( ac ) { if ( !name ) setName( "SnippetDlg" ); - textLabel3 = new QLabel( this, "textLabel3" ); + textLabel3 = new TQLabel( this, "textLabel3" ); keyButton = new KKeyButton( this ); - connect( keyButton, SIGNAL( capturedShortcut( const KShortcut& ) ), - this, SLOT( slotCapturedShortcut( const KShortcut& ) ) ); + connect( keyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ), + this, TQT_SLOT( slotCapturedShortcut( const KShortcut& ) ) ); layout3->addWidget( textLabel3, 7, 0 ); layout3->addWidget( keyButton, 7, 1 ); @@ -90,7 +90,7 @@ void SnippetDlg::slotCapturedShortcut( const KShortcut& sc ) keyButton->setShortcut( KShortcut::null(), false ); } else { if( !shortcutIsValid( actionCollection, 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( this, msg ); } else { diff --git a/kmail/snippetdlg.h b/kmail/snippetdlg.h index 1a9a1f02f..fd990539f 100644 --- a/kmail/snippetdlg.h +++ b/kmail/snippetdlg.h @@ -21,13 +21,13 @@ class SnippetDlg : public SnippetDlgBase Q_OBJECT public: - SnippetDlg( KActionCollection* ac, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + SnippetDlg( KActionCollection* ac, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~SnippetDlg(); void setShowShortcut( bool show ); - QLabel* textLabel3; - QLabel* textLabelGroup; + TQLabel* textLabel3; + TQLabel* textLabelGroup; KKeyButton* keyButton; KActionCollection* actionCollection; diff --git a/kmail/snippetitem.cpp b/kmail/snippetitem.cpp index 46d28c941..206114ace 100644 --- a/kmail/snippetitem.cpp +++ b/kmail/snippetitem.cpp @@ -15,18 +15,18 @@ #include <kaction.h> -#include <qstring.h> +#include <tqstring.h> -SnippetItem::SnippetItem(QListView * parent, QString name, QString text ) - : QListViewItem( parent, name ), action(0) +SnippetItem::SnippetItem(TQListView * parent, TQString name, TQString text ) + : TQListViewItem( parent, name ), action(0) { strName = name; strText = text; iParent = -1; } -SnippetItem::SnippetItem(QListViewItem * parent, QString name, QString text) - : QListViewItem( parent, name ), action(0) +SnippetItem::SnippetItem(TQListViewItem * parent, TQString name, TQString text) + : TQListViewItem( parent, name ), action(0) { strName = name; strText = text; @@ -45,7 +45,7 @@ SnippetItem::~SnippetItem() /*! \fn SnippetItem::getName() */ -QString SnippetItem::getName() +TQString SnippetItem::getName() { return strName; } @@ -54,25 +54,25 @@ QString SnippetItem::getName() /*! \fn SnippetItem::getText */ -QString SnippetItem::getText() +TQString SnippetItem::getText() { return strText; } /*! - \fn SnippetItem::setText(QString text) + \fn SnippetItem::setText(TQString text) */ -void SnippetItem::setText(QString text) +void SnippetItem::setText(TQString text) { strText = text; } /*! - \fn SnippetItem::setName(QString name) + \fn SnippetItem::setName(TQString name) */ -void SnippetItem::setName(QString name) +void SnippetItem::setName(TQString name) { strName = name; } @@ -101,7 +101,7 @@ void SnippetItem::slotExecute() } -SnippetItem * SnippetItem::findItemByName(QString name, QPtrList<SnippetItem> &list) +SnippetItem * SnippetItem::findItemByName(TQString name, TQPtrList<SnippetItem> &list) { for ( SnippetItem * item = list.first(); item; item = list.next() ) { //write the snippet-list if (item->getName() == name) @@ -110,7 +110,7 @@ SnippetItem * SnippetItem::findItemByName(QString name, QPtrList<SnippetItem> &l return NULL; } -SnippetGroup * SnippetItem::findGroupById(int id, QPtrList<SnippetItem> &list) +SnippetGroup * SnippetItem::findGroupById(int id, TQPtrList<SnippetItem> &list) { for ( SnippetItem * item = list.first(); item; item = list.next() ) { //write the snippet-list SnippetGroup * group = dynamic_cast<SnippetGroup*>(item); @@ -127,7 +127,7 @@ Deklaration for class SnippetGroup int SnippetGroup::iMaxId = 1; -SnippetGroup::SnippetGroup(QListView * parent, QString name, int id) +SnippetGroup::SnippetGroup(TQListView * parent, TQString name, int id) : SnippetItem(parent, name, "GROUP") { if (id > 0) { diff --git a/kmail/snippetitem.h b/kmail/snippetitem.h index ce7cd1807..3c20661d5 100644 --- a/kmail/snippetitem.h +++ b/kmail/snippetitem.h @@ -17,7 +17,7 @@ #include <klistview.h> #include <klocale.h> -#include <qobject.h> +#include <tqobject.h> class QString; class KAction; @@ -29,34 +29,34 @@ This class represents one CodeSnippet-Item in the listview. It also holds the needed data for one snippet. @author Robert Gruber */ -class SnippetItem : public QObject, public QListViewItem { +class SnippetItem : public TQObject, public TQListViewItem { friend class SnippetGroup; Q_OBJECT public: - SnippetItem(QListViewItem * parent, QString name, QString text); + SnippetItem(TQListViewItem * parent, TQString name, TQString text); ~SnippetItem(); - QString getName(); - QString getText(); - using QListViewItem::parent; + TQString getName(); + TQString getText(); + using TQListViewItem::parent; int getParent() { return iParent; } void resetParent(); - void setText(QString text); - void setName(QString name); + void setText(TQString text); + void setName(TQString name); void setAction( KAction* ); KAction* getAction(); - static SnippetItem * findItemByName(QString name, QPtrList<SnippetItem> &list); - static SnippetGroup * findGroupById(int id, QPtrList<SnippetItem> &list); + static SnippetItem * findItemByName(TQString name, TQPtrList<SnippetItem> &list); + static SnippetGroup * findGroupById(int id, TQPtrList<SnippetItem> &list); signals: - void execute( QListViewItem * ); + void execute( TQListViewItem * ); public slots: void slotExecute(); private: - SnippetItem(QListView * parent, QString name, QString text); - QString strName; - QString strText; + SnippetItem(TQListView * parent, TQString name, TQString text); + TQString strName; + TQString strText; int iParent; KAction *action; }; @@ -64,12 +64,12 @@ private: /** This class represents one group in the listview. It is derived from SnippetItem in order to allow storing -it in the main QPtrList<SnippetItem>. +it in the main TQPtrList<SnippetItem>. @author Robert Gruber */ class SnippetGroup : public SnippetItem { public: - SnippetGroup(QListView * parent, QString name, int id); + SnippetGroup(TQListView * parent, TQString name, int id); ~SnippetGroup(); int getId() { return iId; } diff --git a/kmail/snippetsettings.cpp b/kmail/snippetsettings.cpp index 0e34fb738..e61ebf43c 100644 --- a/kmail/snippetsettings.cpp +++ b/kmail/snippetsettings.cpp @@ -11,22 +11,22 @@ * * ***************************************************************************/ -#include <qstring.h> +#include <tqstring.h> #include <klineedit.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> #include "snippetsettings.h" #include "snippetwidget.h" -SnippetSettings::SnippetSettings(QWidget *parent, const char *name) +SnippetSettings::SnippetSettings(TQWidget *parent, const char *name) : SnippetSettingsBase(parent, name) { _widget = NULL; } -SnippetSettings::SnippetSettings(SnippetWidget * w, QWidget *parent, const char *name) +SnippetSettings::SnippetSettings(SnippetWidget * w, TQWidget *parent, const char *name) : SnippetSettingsBase(parent, name) { _cfg = w->getSnippetConfig(); diff --git a/kmail/snippetsettings.h b/kmail/snippetsettings.h index 849cc4386..f6362d969 100644 --- a/kmail/snippetsettings.h +++ b/kmail/snippetsettings.h @@ -30,8 +30,8 @@ class SnippetSettings : public SnippetSettingsBase { Q_OBJECT public: - SnippetSettings(QWidget *parent = 0, const char *name = 0); - SnippetSettings(SnippetWidget * w, QWidget *parent = 0, const char *name = 0); + SnippetSettings(TQWidget *parent = 0, const char *name = 0); + SnippetSettings(SnippetWidget * w, TQWidget *parent = 0, const char *name = 0); ~SnippetSettings(); diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp index 1682e2580..617021748 100644 --- a/kmail/snippetwidget.cpp +++ b/kmail/snippetwidget.cpp @@ -14,23 +14,23 @@ #include <kurl.h> #include <kdebug.h> #include <klocale.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kpushbutton.h> #include <klistview.h> -#include <qheader.h> +#include <tqheader.h> #include <klineedit.h> #include <ktextedit.h> #include <kmessagebox.h> #include <kconfig.h> -#include <qtooltip.h> +#include <tqtooltip.h> #include <kpopupmenu.h> -#include <qregexp.h> -#include <qinputdialog.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qdragobject.h> -#include <qtimer.h> +#include <tqregexp.h> +#include <tqinputdialog.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqdragobject.h> +#include <tqtimer.h> #include <kcombobox.h> #include <kmedit.h> #include <kiconloader.h> @@ -44,8 +44,8 @@ #include <cassert> -SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, QWidget* parent) - : KListView(parent, "snippet widget"), QToolTip( viewport() ), +SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, TQWidget* parent) + : KListView(parent, "snippet widget"), TQToolTip( viewport() ), mEditor( editor ), mActionCollection( actionCollection ) { // init the QPtrList @@ -62,22 +62,22 @@ SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection setRootIsDecorated(true); //connect the signals - connect( this, SIGNAL( contextMenuRequested ( QListViewItem *, const QPoint & , int ) ), - this, SLOT( showPopupMenu(QListViewItem *, const QPoint & , int ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *, const TQPoint & , int ) ), + this, TQT_SLOT( showPopupMenu(TQListViewItem *, const TQPoint & , int ) ) ); - connect( this, SIGNAL( doubleClicked (QListViewItem *) ), - this, SLOT( slotEdit( QListViewItem *) ) ); - connect( this, SIGNAL( returnPressed (QListViewItem *) ), - this, SLOT( slotExecuted( QListViewItem *) ) ); + connect( this, TQT_SIGNAL( doubleClicked (TQListViewItem *) ), + this, TQT_SLOT( slotEdit( TQListViewItem *) ) ); + connect( this, TQT_SIGNAL( returnPressed (TQListViewItem *) ), + this, TQT_SLOT( slotExecuted( TQListViewItem *) ) ); - connect( this, SIGNAL( dropped(QDropEvent *, QListViewItem *) ), - this, SLOT( slotDropped(QDropEvent *, QListViewItem *) ) ); + connect( this, TQT_SIGNAL( dropped(TQDropEvent *, TQListViewItem *) ), + this, TQT_SLOT( slotDropped(TQDropEvent *, TQListViewItem *) ) ); - connect( editor, SIGNAL( insertSnippet() ), this, SLOT( slotExecute() )); + connect( editor, TQT_SIGNAL( insertSnippet() ), this, TQT_SLOT( slotExecute() )); _cfg = 0; - QTimer::singleShot(0, this, SLOT(initConfig())); + TQTimer::singleShot(0, this, TQT_SLOT(initConfig())); } SnippetWidget::~SnippetWidget() @@ -132,28 +132,28 @@ void SnippetWidget::slotAdd() } dlg.cbGroup->setCurrentText(group->getName()); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { group = dynamic_cast<SnippetGroup*>(SnippetItem::findItemByName(dlg.cbGroup->currentText(), _list)); _list.append( makeItem( group, dlg.snippetName->text(), dlg.snippetText->text(), dlg.keyButton->shortcut() ) ); } } /*! - \fn SnippetWidget::makeItem( SnippetItem* parent, const QString& name, const QString& text ) + \fn SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text ) Helper factory method. */ -SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const QString& name, const QString& text, const KShortcut& shortcut ) +SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const KShortcut& shortcut ) { SnippetItem * item = new SnippetItem(parent, name, text); - const QString actionName = i18n("Snippet %1").arg(name); - const QString normalizedName = QString(actionName).replace(" ", "_"); + const TQString actionName = i18n("Snippet %1").arg(name); + const TQString normalizedName = TQString(actionName).replace(" ", "_"); if ( !mActionCollection->action(normalizedName.utf8() ) ) { KAction * action = new KAction( actionName, shortcut, item, - SLOT( slotExecute() ), mActionCollection, + TQT_SLOT( slotExecute() ), mActionCollection, normalizedName.utf8() ); item->setAction(action); - connect( item, SIGNAL( execute( QListViewItem* ) ), - this, SLOT( slotExecuted( QListViewItem* ) ) ); + connect( item, TQT_SIGNAL( execute( TQListViewItem* ) ), + this, TQT_SLOT( slotExecuted( TQListViewItem* ) ) ); } return item; } @@ -173,7 +173,7 @@ void SnippetWidget::slotAddGroup() dlg.cbGroup->insertItem(i18n("All")); dlg.cbGroup->setCurrentText(i18n("All")); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { _list.append( new SnippetGroup(this, dlg.snippetName->text(), SnippetGroup::getMaxId() ) ); } } @@ -186,7 +186,7 @@ void SnippetWidget::slotAddGroup() void SnippetWidget::slotRemove() { //get current data - QListViewItem * item = currentItem(); + TQListViewItem * item = currentItem(); SnippetItem *snip = dynamic_cast<SnippetItem*>( item ); SnippetGroup *group = dynamic_cast<SnippetGroup*>( item ); if (!snip) @@ -194,7 +194,7 @@ void SnippetWidget::slotRemove() if (group) { if (group->childCount() > 0 && - KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove this group and all its snippets?"),QString::null,KStdGuiItem::del()) + KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove this group and all its snippets?"),TQString::null,KStdGuiItem::del()) == KMessageBox::Cancel) return; @@ -221,7 +221,7 @@ void SnippetWidget::slotRemove() \fn SnippetWidget::slotEdit() Opens the dialog of editing the selected snippet */ -void SnippetWidget::slotEdit( QListViewItem* item ) +void SnippetWidget::slotEdit( TQListViewItem* item ) { if( item == 0 ) { item = currentItem(); @@ -248,7 +248,7 @@ void SnippetWidget::slotEdit( QListViewItem* item ) } dlg.cbGroup->setCurrentText(SnippetItem::findGroupById(pSnippet->getParent(), _list)->getName()); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { //update the KListView and the SnippetItem item->setText( 0, dlg.snippetName->text() ); pSnippet->setName( dlg.snippetName->text() ); @@ -274,7 +274,7 @@ void SnippetWidget::slotEdit( QListViewItem* item ) void SnippetWidget::slotEditGroup() { //get current data - QListViewItem * item = currentItem(); + TQListViewItem * item = currentItem(); SnippetGroup *pGroup = dynamic_cast<SnippetGroup*>( item ); if (!pGroup) /*selected item MUST be a SnippetGroup*/ @@ -290,7 +290,7 @@ void SnippetWidget::slotEditGroup() dlg.setCaption(i18n("Edit Group")); dlg.cbGroup->insertItem(i18n("All")); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { //update the KListView and the SnippetGroup item->setText( 0, dlg.snippetName->text() ); pGroup->setName( dlg.snippetName->text() ); @@ -299,7 +299,7 @@ void SnippetWidget::slotEditGroup() } } -void SnippetWidget::slotExecuted(QListViewItem * item) +void SnippetWidget::slotExecuted(TQListViewItem * item) { if( item == 0 ) { @@ -316,10 +316,10 @@ void SnippetWidget::slotExecuted(QListViewItem * item) /*! - \fn SnippetWidget::insertIntoActiveView(QString text) + \fn SnippetWidget::insertIntoActiveView(TQString text) Inserts the parameter text into the activ view */ -void SnippetWidget::insertIntoActiveView( const QString &text ) +void SnippetWidget::insertIntoActiveView( const TQString &text ) { mEditor->insert( text ); } @@ -337,9 +337,9 @@ void SnippetWidget::writeConfig() //they get overwritten by a more recent entry _cfg->setGroup("SnippetPart"); - QString strKeyName=""; - QString strKeyText=""; - QString strKeyId=""; + TQString strKeyName=""; + TQString strKeyText=""; + TQString strKeyId=""; int iSnipCount = 0; int iGroupCount = 0; @@ -352,8 +352,8 @@ void SnippetWidget::writeConfig() SnippetGroup * group = dynamic_cast<SnippetGroup*>(item); if (group) { //kdDebug(5006) << "-->GROUP " << item->getName() << group->getId() << " " << iGroupCount<< endl; - strKeyName=QString("snippetGroupName_%1").arg(iGroupCount); - strKeyId=QString("snippetGroupId_%1").arg(iGroupCount); + strKeyName=TQString("snippetGroupName_%1").arg(iGroupCount); + strKeyId=TQString("snippetGroupId_%1").arg(iGroupCount); _cfg->writeEntry(strKeyName, group->getName()); _cfg->writeEntry(strKeyId, group->getId()); @@ -361,9 +361,9 @@ void SnippetWidget::writeConfig() iGroupCount++; } else if (dynamic_cast<SnippetItem*>(item)) { //kdDebug(5006) << "-->ITEM " << item->getName() << item->getParent() << " " << iSnipCount << endl; - strKeyName=QString("snippetName_%1").arg(iSnipCount); - strKeyText=QString("snippetText_%1").arg(iSnipCount); - strKeyId=QString("snippetParent_%1").arg(iSnipCount); + strKeyName=TQString("snippetName_%1").arg(iSnipCount); + strKeyText=TQString("snippetText_%1").arg(iSnipCount); + strKeyId=TQString("snippetParent_%1").arg(iSnipCount); _cfg->writeEntry(strKeyName, item->getName()); _cfg->writeEntry(strKeyText, item->getText()); @@ -373,7 +373,7 @@ void SnippetWidget::writeConfig() assert( action ); const KShortcut& sc = action->shortcut(); if (!sc.isNull() ) { - _cfg->writeEntry( QString("snippetShortcut_%1").arg(iSnipCount), sc.toString() ); + _cfg->writeEntry( TQString("snippetShortcut_%1").arg(iSnipCount), sc.toString() ); } iSnipCount++; } else { @@ -385,12 +385,12 @@ void SnippetWidget::writeConfig() _cfg->writeEntry("snippetGroupCount", iGroupCount); int iCount = 1; - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; for ( it = _mapSaved.begin(); it != _mapSaved.end(); ++it ) { //write the saved variable values if (it.data().length()<=0) continue; //is the saved value has no length -> no need to save it - strKeyName=QString("snippetSavedName_%1").arg(iCount); - strKeyText=QString("snippetSavedVal_%1").arg(iCount); + strKeyName=TQString("snippetSavedName_%1").arg(iCount); + strKeyText=TQString("snippetSavedVal_%1").arg(iCount); _cfg->writeEntry(strKeyName, it.key()); _cfg->writeEntry(strKeyText, it.data()); @@ -422,9 +422,9 @@ void SnippetWidget::initConfig() _cfg->setGroup("SnippetPart"); - QString strKeyName=""; - QString strKeyText=""; - QString strKeyId=""; + TQString strKeyName=""; + TQString strKeyText=""; + TQString strKeyId=""; SnippetItem *item; SnippetGroup *group; @@ -434,10 +434,10 @@ void SnippetWidget::initConfig() int iCount = _cfg->readNumEntry("snippetGroupCount", -1); for ( int i=0; i<iCount; i++) { //read the group-list - strKeyName=QString("snippetGroupName_%1").arg(i); - strKeyId=QString("snippetGroupId_%1").arg(i); + strKeyName=TQString("snippetGroupName_%1").arg(i); + strKeyId=TQString("snippetGroupId_%1").arg(i); - QString strNameVal=""; + TQString strNameVal=""; int iIdVal=-1; strNameVal = _cfg->readEntry(strKeyName, ""); @@ -460,12 +460,12 @@ void SnippetWidget::initConfig() if (iCount != -1) { iCount = _cfg->readNumEntry("snippetCount", 0); for ( int i=0; i<iCount; i++) { //read the snippet-list - strKeyName=QString("snippetName_%1").arg(i); - strKeyText=QString("snippetText_%1").arg(i); - strKeyId=QString("snippetParent_%1").arg(i); + strKeyName=TQString("snippetName_%1").arg(i); + strKeyText=TQString("snippetText_%1").arg(i); + strKeyId=TQString("snippetParent_%1").arg(i); - QString strNameVal=""; - QString strTextVal=""; + TQString strNameVal=""; + TQString strTextVal=""; int iParentVal = -1; strNameVal = _cfg->readEntry(strKeyName, ""); @@ -474,7 +474,7 @@ void SnippetWidget::initConfig() //kdDebug(5006) << "Read item " << strNameVal << " " << iParentVal << endl; if (strNameVal != "" && strTextVal != "" && iParentVal != -1) { - KShortcut shortcut( _cfg->readEntry( QString("snippetShortcut_%1").arg(i), QString() ) ); + KShortcut shortcut( _cfg->readEntry( TQString("snippetShortcut_%1").arg(i), TQString() ) ); item = makeItem( SnippetItem::findGroupById(iParentVal, _list), strNameVal, strTextVal, shortcut ); //kdDebug(5006) << "Created item " << item->getName() << " " << item->getParent() << endl; _list.append(item); @@ -487,11 +487,11 @@ void SnippetWidget::initConfig() iCount = _cfg->readNumEntry("snippetSavedCount", 0); for ( int i=1; i<=iCount; i++) { //read the saved-values and store in QMap - strKeyName=QString("snippetSavedName_%1").arg(i); - strKeyText=QString("snippetSavedVal_%1").arg(i); + strKeyName=TQString("snippetSavedName_%1").arg(i); + strKeyText=TQString("snippetSavedVal_%1").arg(i); - QString strNameVal=""; - QString strTextVal=""; + TQString strNameVal=""; + TQString strTextVal=""; strNameVal = _cfg->readEntry(strKeyName, ""); strTextVal = _cfg->readEntry(strKeyText, ""); @@ -512,16 +512,16 @@ void SnippetWidget::initConfig() } /*! - \fn SnippetWidget::maybeTip( const QPoint & p ) + \fn SnippetWidget::maybeTip( const TQPoint & p ) Shows the Snippet-Text as ToolTip */ -void SnippetWidget::maybeTip( const QPoint & p ) +void SnippetWidget::maybeTip( const TQPoint & p ) { SnippetItem * item = dynamic_cast<SnippetItem*>( itemAt( p ) ); if (!item) return; - QRect r = itemRect( item ); + TQRect r = itemRect( item ); if (r.isValid() && _SnippetConfig.useToolTips() ) @@ -531,10 +531,10 @@ void SnippetWidget::maybeTip( const QPoint & p ) } /*! - \fn SnippetWidget::showPopupMenu( QListViewItem * item, const QPoint & p, int ) + \fn SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int ) Shows the Popup-Menu depending item is a valid pointer */ -void SnippetWidget::showPopupMenu( QListViewItem * item, const QPoint & p, int ) +void SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int ) { KPopupMenu popup; @@ -542,43 +542,43 @@ void SnippetWidget::showPopupMenu( QListViewItem * item, const QPoint & p, int ) if ( item ) { popup.insertTitle( selectedItem->getName() ); if (dynamic_cast<SnippetGroup*>(item)) { - popup.insertItem( i18n("Edit &group..."), this, SLOT( slotEditGroup() ) ); + popup.insertItem( i18n("Edit &group..."), this, TQT_SLOT( slotEditGroup() ) ); } else { - popup.insertItem( SmallIconSet("editpaste"), i18n("&Paste"), this, SLOT( slotExecuted() ) ); - popup.insertItem( SmallIconSet("edit"), i18n("&Edit..."), this, SLOT( slotEdit() ) ); + popup.insertItem( SmallIconSet("editpaste"), i18n("&Paste"), this, TQT_SLOT( slotExecuted() ) ); + popup.insertItem( SmallIconSet("edit"), i18n("&Edit..."), this, TQT_SLOT( slotEdit() ) ); } - popup.insertItem( SmallIconSet("editdelete"), i18n("&Remove"), this, SLOT( slotRemove() ) ); + popup.insertItem( SmallIconSet("editdelete"), i18n("&Remove"), this, TQT_SLOT( slotRemove() ) ); popup.insertSeparator(); } else { popup.insertTitle(i18n("Text Snippets")); } - popup.insertItem( i18n("&Add Snippet..."), this, SLOT( slotAdd() ) ); - popup.insertItem( i18n("Add G&roup..."), this, SLOT( slotAddGroup() ) ); + popup.insertItem( i18n("&Add Snippet..."), this, TQT_SLOT( slotAdd() ) ); + popup.insertItem( i18n("Add G&roup..."), this, TQT_SLOT( slotAddGroup() ) ); popup.exec(p); } -// fn SnippetWidget::parseText(QString text, QString del) +// fn SnippetWidget::parseText(TQString text, TQString del) /*! - This function is used to parse the given QString for variables. If found the user will be prompted + This function is used to parse the given TQString for variables. If found the user will be prompted for a replacement value. It returns the string text with all replacements made */ -QString SnippetWidget::parseText(QString text, QString del) +TQString SnippetWidget::parseText(TQString text, TQString del) { - QString str = text; - QString strName = ""; - QString strNew = ""; - QString strMsg=""; + TQString str = text; + TQString strName = ""; + TQString strNew = ""; + TQString strMsg=""; int iFound = -1; int iEnd = -1; - QMap<QString, QString> mapVar; + TQMap<TQString, TQString> mapVar; int iInMeth = _SnippetConfig.getInputMethod(); - QRect rSingle = _SnippetConfig.getSingleRect(); - QRect rMulti = _SnippetConfig.getMultiRect(); + TQRect rSingle = _SnippetConfig.getSingleRect(); + TQRect rMulti = _SnippetConfig.getMultiRect(); do { - iFound = text.find(QRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this QRegExp + iFound = text.find(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this QRegExp if (iFound >= 0) { iEnd = text.find(del, iFound+1)+1; strName = text.mid(iFound, iEnd-iFound); @@ -614,7 +614,7 @@ QString SnippetWidget::parseText(QString text, QString del) bh = rMulti.height(); oh = rMulti.top(); if (showMultiVarDialog( &mapVar, &_mapSaved, w, bh, oh )) { //generate and show the dialog - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; for ( it = mapVar.begin(); it != mapVar.end(); ++it ) { //walk through the map and do the replacement str.replace(it.key(), it.data()); } @@ -641,7 +641,7 @@ QString SnippetWidget::parseText(QString text, QString del) variable that is stored in the given map except the double-delimiter entry It return true if everything was ok and false if the user hit cancel */ -bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QString, QString> * mapSave, +bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQString, TQString> * mapSave, int & iWidth, int & iBasicHeight, int & iOneHeight) { //if no var -> no need to show @@ -649,28 +649,28 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin return true; //if only var is the double-delimiter -> no need to show - QMap<QString, QString>::Iterator it = map->begin(); + TQMap<TQString, TQString>::Iterator it = map->begin(); if ( map->count() == 1 && it.data()==_SnippetConfig.getDelimiter()+_SnippetConfig.getDelimiter() ) return true; - QMap<QString, KTextEdit *> mapVar2Te; //this map will help keeping track which TEXTEDIT goes with which variable - QMap<QString, QCheckBox *> mapVar2Cb; //this map will help keeping track which CHECKBOX goes with which variable + TQMap<TQString, KTextEdit *> mapVar2Te; //this map will help keeping track which TEXTEDIT goes with which variable + TQMap<TQString, TQCheckBox *> mapVar2Cb; //this map will help keeping track which CHECKBOX goes with which variable // --BEGIN-- building a dynamic dialog - QDialog dlg(this); + TQDialog dlg(this); dlg.setCaption(i18n("Enter Values for Variables")); - QGridLayout * layout = new QGridLayout( &dlg, 1, 1, 11, 6, "layout"); - QGridLayout * layoutTop = new QGridLayout( 0, 1, 1, 0, 6, "layoutTop"); - QGridLayout * layoutVar = new QGridLayout( 0, 1, 1, 0, 6, "layoutVar"); - QGridLayout * layoutBtn = new QGridLayout( 0, 1, 1, 0, 6, "layoutBtn"); + TQGridLayout * layout = new TQGridLayout( &dlg, 1, 1, 11, 6, "layout"); + TQGridLayout * layoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "layoutTop"); + TQGridLayout * layoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "layoutVar"); + TQGridLayout * layoutBtn = new TQGridLayout( 0, 1, 1, 0, 6, "layoutBtn"); KTextEdit *te = NULL; - QLabel * labTop = NULL; - QCheckBox * cb = NULL; + TQLabel * labTop = NULL; + TQCheckBox * cb = NULL; - labTop = new QLabel( &dlg, "label" ); - labTop->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, + labTop = new TQLabel( &dlg, "label" ); + labTop->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, labTop->sizePolicy().hasHeightForWidth() ) ); labTop->setText(i18n("Enter the replacement values for these variables:")); layoutTop->addWidget(labTop, 0, 0); @@ -682,7 +682,7 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin if (it.key() == _SnippetConfig.getDelimiter() + _SnippetConfig.getDelimiter()) continue; - cb = new QCheckBox( &dlg, "cbVar" ); + cb = new TQCheckBox( &dlg, "cbVar" ); cb->setChecked( FALSE ); cb->setText(it.key()); layoutVar->addWidget( cb, i ,0, Qt::AlignTop ); @@ -698,8 +698,8 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin mapVar2Te[it.key()] = te; mapVar2Cb[it.key()] = cb; - QToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") ); - QWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. " + TQToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") ); + TQWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. " "If you use the same variable later, even in another snippet, the value entered to the right " "will be the default value for that variable.") ); @@ -708,36 +708,36 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin layout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 ); KPushButton * btn1 = new KPushButton( KStdGuiItem::cancel(), &dlg, "pushButton1" ); - btn1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, + btn1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btn1->sizePolicy().hasHeightForWidth() ) ); layoutBtn->addWidget( btn1, 0, 0 ); KPushButton * btn2 = new KPushButton( KStdGuiItem::apply(), &dlg, "pushButton2" ); btn2->setDefault( TRUE ); - btn2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, + btn2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btn2->sizePolicy().hasHeightForWidth() ) ); layoutBtn->addWidget( btn2, 0, 1 ); layout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 ); // --END-- building a dynamic dialog - //connect the buttons to the QDialog default slots - connect(btn1, SIGNAL(clicked()), &dlg, SLOT(reject()) ); - connect(btn2, SIGNAL(clicked()), &dlg, SLOT(accept()) ); + //connect the buttons to the TQDialog default slots + connect(btn1, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(reject()) ); + connect(btn2, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(accept()) ); //prepare to execute the dialog bool bReturn = false; //resize the textedits if (iWidth > 1) { - QRect r = dlg.geometry(); + TQRect r = dlg.geometry(); r.setHeight(iBasicHeight + iOneHeight*mapVar2Te.count()); r.setWidth(iWidth); dlg.setGeometry(r); } if ( i > 0 && // only if there are any variables - dlg.exec() == QDialog::Accepted ) { + dlg.exec() == TQDialog::Accepted ) { - QMap<QString, KTextEdit *>::Iterator it2; + TQMap<TQString, KTextEdit *>::Iterator it2; for ( it2 = mapVar2Te.begin(); it2 != mapVar2Te.end(); ++it2 ) { if (it2.key() == _SnippetConfig.getDelimiter() + _SnippetConfig.getDelimiter()) continue; @@ -756,11 +756,11 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin } //do some cleanup - QMap<QString, KTextEdit *>::Iterator it1; + TQMap<TQString, KTextEdit *>::Iterator it1; for (it1 = mapVar2Te.begin(); it1 != mapVar2Te.end(); ++it1) delete it1.data(); mapVar2Te.clear(); - QMap<QString, QCheckBox *>::Iterator it2; + TQMap<TQString, TQCheckBox *>::Iterator it2; for (it2 = mapVar2Cb.begin(); it2 != mapVar2Cb.end(); ++it2) delete it2.data(); mapVar2Cb.clear(); @@ -777,33 +777,33 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin } -// fn SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> * mapSave) +// fn SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQString> * mapSave) /*! This function constructs a dialog which contains a label and a linedit for the given variable It return either the entered value or an empty string if the user hit cancel */ -QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> * mapSave, QRect & dlgSize) +TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQString> * mapSave, TQRect & dlgSize) { // --BEGIN-- building a dynamic dialog - QDialog dlg(this); + TQDialog dlg(this); dlg.setCaption(i18n("Enter Values for Variables")); - QGridLayout * layout = new QGridLayout( &dlg, 1, 1, 11, 6, "layout"); - QGridLayout * layoutTop = new QGridLayout( 0, 1, 1, 0, 6, "layoutTop"); - QGridLayout * layoutVar = new QGridLayout( 0, 1, 1, 0, 6, "layoutVar"); - QGridLayout * layoutBtn = new QGridLayout( 0, 2, 1, 0, 6, "layoutBtn"); + TQGridLayout * layout = new TQGridLayout( &dlg, 1, 1, 11, 6, "layout"); + TQGridLayout * layoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "layoutTop"); + TQGridLayout * layoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "layoutVar"); + TQGridLayout * layoutBtn = new TQGridLayout( 0, 2, 1, 0, 6, "layoutBtn"); KTextEdit *te = NULL; - QLabel * labTop = NULL; - QCheckBox * cb = NULL; + TQLabel * labTop = NULL; + TQCheckBox * cb = NULL; - labTop = new QLabel( &dlg, "label" ); + labTop = new TQLabel( &dlg, "label" ); layoutTop->addWidget(labTop, 0, 0); labTop->setText(i18n("Enter the replacement values for %1:").arg( var )); layout->addMultiCellLayout( layoutTop, 0, 0, 0, 1 ); - cb = new QCheckBox( &dlg, "cbVar" ); + cb = new TQCheckBox( &dlg, "cbVar" ); cb->setChecked( FALSE ); cb->setText(i18n( "Make value &default" )); @@ -815,8 +815,8 @@ QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> * te->setText((*mapSave)[var]); } - QToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") ); - QWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. " + TQToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") ); + TQWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. " "If you use the same variable later, even in another snippet, the value entered to the right " "will be the default value for that variable.") ); @@ -833,15 +833,15 @@ QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> * te->setFocus(); // --END-- building a dynamic dialog - //connect the buttons to the QDialog default slots - connect(btn1, SIGNAL(clicked()), &dlg, SLOT(reject()) ); - connect(btn2, SIGNAL(clicked()), &dlg, SLOT(accept()) ); + //connect the buttons to the TQDialog default slots + connect(btn1, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(reject()) ); + connect(btn2, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(accept()) ); //execute the dialog - QString strReturn = ""; + TQString strReturn = ""; if (dlgSize.isValid()) dlg.setGeometry(dlgSize); - if ( dlg.exec() == QDialog::Accepted ) { + if ( dlg.exec() == TQDialog::Accepted ) { if (cb->isChecked()) //if the checkbox is on; save the values for later (*mapSave)[var] = te->text(); else @@ -866,26 +866,26 @@ QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> * return strReturn; } -// fn SnippetWidget::acceptDrag (QDropEvent *event) const +// fn SnippetWidget::acceptDrag (TQDropEvent *event) const /*! Reimplementation from KListView. Check here if the data the user is about to drop fits our restrictions. We only accept dropps of plaintext, because from the dropped text we will create a snippet. */ -bool SnippetWidget::acceptDrag (QDropEvent *event) const +bool SnippetWidget::acceptDrag (TQDropEvent *event) const { //kdDebug(5006) << "Format: " << event->format() << "" << event->pos() << endl; - QListViewItem * item = itemAt(event->pos()); + TQListViewItem * item = itemAt(event->pos()); if (item && - QString(event->format()).startsWith("text/plain") && + TQString(event->format()).startsWith("text/plain") && static_cast<SnippetWidget *>(event->source()) != this) { ///kdDebug(5006) << "returning TRUE " << endl; return TRUE; } else if(item && - QString(event->format()).startsWith("x-kmailsnippet") && + TQString(event->format()).startsWith("x-kmailsnippet") && static_cast<SnippetWidget *>(event->source()) != this) { //kdDebug(5006) << "returning TRUE " << endl; @@ -897,25 +897,25 @@ bool SnippetWidget::acceptDrag (QDropEvent *event) const } } -// fn SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *after) +// fn SnippetWidget::slotDropped(TQDropEvent *e, TQListViewItem *after) /*! This slot is connected to the dropped signal. If it is emitted, we need to construct a new snippet entry with the data given */ -void SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *) +void SnippetWidget::slotDropped(TQDropEvent *e, TQListViewItem *) { - QListViewItem * item2 = itemAt(e->pos()); + TQListViewItem * item2 = itemAt(e->pos()); SnippetGroup *group = dynamic_cast<SnippetGroup *>(item2); if (!group) group = dynamic_cast<SnippetGroup *>(item2->parent()); - QCString dropped; - QByteArray data = e->encodedData("text/plain"); + TQCString dropped; + TQByteArray data = e->encodedData("text/plain"); if ( e->provides("text/plain") && data.size()>0 ) { //get the data from the event... - QString encData(data.data()); + TQString encData(data.data()); //kdDebug(5006) << "encData: " << encData << endl; //... then fill the dialog with the given data @@ -931,7 +931,7 @@ void SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *) } dlg.cbGroup->setCurrentText(group->getName()); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { /* get the group that the user selected with the combobox */ group = dynamic_cast<SnippetGroup*>(SnippetItem::findItemByName(dlg.cbGroup->currentText(), _list)); _list.append( makeItem(group, dlg.snippetName->text(), dlg.snippetText->text(), dlg.keyButton->shortcut() ) ); @@ -941,8 +941,8 @@ void SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *) void SnippetWidget::startDrag() { - QString text = dynamic_cast<SnippetItem*>( currentItem() )->getText(); - QTextDrag *drag = new QTextDrag(text, this); + TQString text = dynamic_cast<SnippetItem*>( currentItem() )->getText(); + TQTextDrag *drag = new TQTextDrag(text, this); drag->setSubtype("x-textsnippet"); drag->drag(); } diff --git a/kmail/snippetwidget.h b/kmail/snippetwidget.h index e267ff5dd..b60c3ea6e 100644 --- a/kmail/snippetwidget.h +++ b/kmail/snippetwidget.h @@ -13,11 +13,11 @@ #ifndef __SNIPPET_WIDGET_H__ #define __SNIPPET_WIDGET_H__ -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> #include <klistview.h> -#include <qtooltip.h> -#include <qrect.h> +#include <tqtooltip.h> +#include <tqrect.h> #include <ktexteditor/editinterface.h> #include <ktexteditor/view.h> @@ -38,7 +38,7 @@ class KActionCollection; /** This is the widget which gets added to the right TreeToolView. -It inherits KListView and QToolTip which is needed for showing the +It inherits KListView and TQToolTip which is needed for showing the tooltips which contains the text of the snippet @author Robert Gruber */ @@ -47,9 +47,9 @@ class SnippetWidget : public KListView, public QToolTip Q_OBJECT public: - SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, QWidget* parent = 0); + SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, TQWidget* parent = 0); ~SnippetWidget(); - QPtrList<SnippetItem> * getList() { return (&_list); } + TQPtrList<SnippetItem> * getList() { return (&_list); } void writeConfig(); SnippetConfig * getSnippetConfig() { return (&_SnippetConfig); } @@ -58,19 +58,19 @@ private slots: void initConfig(); protected: - void maybeTip( const QPoint & ); - bool acceptDrag (QDropEvent *event) const; + void maybeTip( const TQPoint & ); + bool acceptDrag (TQDropEvent *event) const; private: - void insertIntoActiveView( const QString &text ); - QString parseText(QString text, QString del="$"); - bool showMultiVarDialog(QMap<QString, QString> * map, QMap<QString, QString> * mapSave, + void insertIntoActiveView( const TQString &text ); + TQString parseText(TQString text, TQString del="$"); + bool showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQString, TQString> * mapSave, int & iWidth, int & iBasicHeight, int & iOneHeight); - QString showSingleVarDialog(QString var, QMap<QString, QString> * mapSave, QRect & dlgSize); - SnippetItem* makeItem( SnippetItem* parent, const QString& name, const QString& text, const KShortcut& shortcut ); + TQString showSingleVarDialog(TQString var, TQMap<TQString, TQString> * mapSave, TQRect & dlgSize); + SnippetItem* makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const KShortcut& shortcut ); - QPtrList<SnippetItem> _list; - QMap<QString, QString> _mapSaved; + TQPtrList<SnippetItem> _list; + TQMap<TQString, TQString> _mapSaved; KConfig * _cfg; SnippetConfig _SnippetConfig; KMEdit* mEditor; @@ -78,16 +78,16 @@ private: public slots: void slotRemove(); - void slotEdit( QListViewItem* item_ = 0 ); + void slotEdit( TQListViewItem* item_ = 0 ); void slotEditGroup(); void slotAdd(); void slotAddGroup(); void slotExecute(); protected slots: - void showPopupMenu( QListViewItem * item, const QPoint & p, int ); - void slotExecuted(QListViewItem * item = 0); - void slotDropped(QDropEvent *e, QListViewItem *after); + void showPopupMenu( TQListViewItem * item, const TQPoint & p, int ); + void slotExecuted(TQListViewItem * item = 0); + void slotDropped(TQDropEvent *e, TQListViewItem *after); void startDrag(); }; diff --git a/kmail/spamheaderanalyzer.cpp b/kmail/spamheaderanalyzer.cpp index b64303631..ad77605ea 100644 --- a/kmail/spamheaderanalyzer.cpp +++ b/kmail/spamheaderanalyzer.cpp @@ -54,16 +54,16 @@ SpamScores SpamHeaderAnalyzer::getSpamScores( const KMMessage* message ) { continue; // Do we have the needed field for this agent? - QString mField = message->headerField( (*it).header() ); + TQString mField = message->headerField( (*it).header() ); if ( mField.isEmpty() ) continue; - QString scoreString; + TQString scoreString; bool scoreValid = false; if ( (*it).scoreType() != SpamAgentBool ) { // Can we extract the score? - QRegExp scorePattern = (*it).scorePattern(); + TQRegExp scorePattern = (*it).scorePattern(); if ( scorePattern.search( mField ) != -1 ) { scoreString = scorePattern.cap( 1 ); scoreValid = true; @@ -119,8 +119,8 @@ SpamScores SpamHeaderAnalyzer::getSpamScores( const KMMessage* message ) { } // Find the threshold value. - QString thresholdString; - QRegExp thresholdPattern = (*it).thresholdPattern(); + TQString thresholdString; + TQRegExp thresholdPattern = (*it).thresholdPattern(); if ( thresholdPattern.search( mField ) != -1 ) { thresholdString = thresholdPattern.cap( 1 ); } diff --git a/kmail/spamheaderanalyzer.h b/kmail/spamheaderanalyzer.h index b74f60293..5cf433b77 100644 --- a/kmail/spamheaderanalyzer.h +++ b/kmail/spamheaderanalyzer.h @@ -34,7 +34,7 @@ #ifndef __KMAIL_SPAMHEADERANALYZER_H__ #define __KMAIL_SPAMHEADERANALYZER_H__ -#include <qvaluelist.h> +#include <tqvaluelist.h> class QString; class KMMessage; @@ -56,19 +56,19 @@ namespace KMail { class SpamScore { public: SpamScore() : mScore( -2.0 ) {} - SpamScore( const QString & agent, float score, const QString & header ) + SpamScore( const TQString & agent, float score, const TQString & header ) : mAgent( agent ), mScore( score ), mHeader( header ) {} - QString agent() const { return mAgent; } + TQString agent() const { return mAgent; } float score() const { return mScore; } - QString spamHeader() const { return mHeader; } + TQString spamHeader() const { return mHeader; } private: - QString mAgent; + TQString mAgent; float mScore; - QString mHeader; + TQString mHeader; }; - typedef QValueList<SpamScore> SpamScores; - typedef QValueListIterator<SpamScore> SpamScoresIterator; + typedef TQValueList<SpamScore> SpamScores; + typedef TQValueListIterator<SpamScore> SpamScoresIterator; /** diff --git a/kmail/subscriptiondialog.cpp b/kmail/subscriptiondialog.cpp index ac5909936..725317437 100644 --- a/kmail/subscriptiondialog.cpp +++ b/kmail/subscriptiondialog.cpp @@ -45,9 +45,9 @@ namespace KMail { -SubscriptionDialogBase::SubscriptionDialogBase( QWidget *parent, const QString &caption, - KAccount *acct, QString startPath ) - : KSubscription( parent, caption, acct, User1, QString::null, false ), +SubscriptionDialogBase::SubscriptionDialogBase( TQWidget *parent, const TQString &caption, + KAccount *acct, TQString startPath ) + : KSubscription( parent, caption, acct, User1, TQString::null, false ), mStartPath( startPath ), mSubscribed( false ), mForceSubscriptionEnable( false) { // hide unneeded checkboxes @@ -55,21 +55,21 @@ SubscriptionDialogBase::SubscriptionDialogBase( QWidget *parent, const QString & hideNewOnlyCheckbox(); // ok-button - connect(this, SIGNAL(okClicked()), SLOT(slotSave())); + connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotSave())); // reload-list button - connect(this, SIGNAL(user1Clicked()), SLOT(slotLoadFolders())); + connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotLoadFolders())); // get the folders, delayed execution style, otherwise there's bother // with virtuals from ctors and whatnot - QTimer::singleShot(0, this, SLOT(slotLoadFolders())); + TQTimer::singleShot(0, this, TQT_SLOT(slotLoadFolders())); } //------------------------------------------------------------------------------ -void SubscriptionDialogBase::slotListDirectory( const QStringList& subfolderNames, - const QStringList& subfolderPaths, - const QStringList& subfolderMimeTypes, - const QStringList& subfolderAttributes, +void SubscriptionDialogBase::slotListDirectory( const TQStringList& subfolderNames, + const TQStringList& subfolderPaths, + const TQStringList& subfolderMimeTypes, + const TQStringList& subfolderAttributes, const ImapAccountBase::jobData& jobData ) { mFolderNames = subfolderNames; @@ -87,15 +87,15 @@ void SubscriptionDialogBase::moveChildrenToNewParent( GroupItem *oldItem, GroupI { if ( !oldItem || !item ) return; - QPtrList<QListViewItem> itemsToMove; - QListViewItem * myChild = oldItem->firstChild(); + TQPtrList<TQListViewItem> itemsToMove; + TQListViewItem * myChild = oldItem->firstChild(); while (myChild) { itemsToMove.append(myChild); myChild = myChild->nextSibling(); } - QPtrListIterator<QListViewItem> it( itemsToMove ); - QListViewItem *cur; + TQPtrListIterator<TQListViewItem> it( itemsToMove ); + TQListViewItem *cur; while ((cur = it.current())) { oldItem->takeItem(cur); @@ -115,7 +115,7 @@ void SubscriptionDialogBase::createListViewItem( int i ) // get the parent GroupItem *oldItem = 0; - QString parentPath; + TQString parentPath; findParentItem( mFolderNames[i], mFolderPaths[i], parentPath, &parent, &oldItem ); if (!parent && parentPath != "/") @@ -123,11 +123,11 @@ void SubscriptionDialogBase::createListViewItem( int i ) // the parent is not available and it's no root-item // this happens when the folders do not arrive in hierarchical order // so we create each parent in advance - QStringList folders = QStringList::split(mDelimiter, parentPath); + TQStringList folders = TQStringList::split(mDelimiter, parentPath); uint i = 0; - for ( QStringList::Iterator it = folders.begin(); it != folders.end(); ++it ) + for ( TQStringList::Iterator it = folders.begin(); it != folders.end(); ++it ) { - QString name = *it; + TQString name = *it; if (name.startsWith("/")) name = name.right(name.length()-1); if (name.endsWith("/")) @@ -135,10 +135,10 @@ void SubscriptionDialogBase::createListViewItem( int i ) KGroupInfo info(name); info.subscribed = false; - QStringList tmpPath; + TQStringList tmpPath; for ( uint j = 0; j <= i; ++j ) tmpPath << folders[j]; - QString path = tmpPath.join(mDelimiter); + TQString path = tmpPath.join(mDelimiter); if (!path.startsWith("/")) path = "/" + path; if (!path.endsWith("/")) @@ -198,7 +198,7 @@ void SubscriptionDialogBase::createListViewItem( int i ) //------------------------------------------------------------------------------ -void SubscriptionDialogBase::findParentItem( QString &name, QString &path, QString &parentPath, +void SubscriptionDialogBase::findParentItem( TQString &name, TQString &path, TQString &parentPath, GroupItem **parent, GroupItem **oldItem ) { // remove the name (and the separator) from the path to get the parent path @@ -234,8 +234,8 @@ void SubscriptionDialogBase::slotLoadFolders() { // We'll wait for the connectionResult signal from the account. kdDebug(5006) << "SubscriptionDialog - waiting for connection" << endl; - connect( ai, SIGNAL( connectionResult(int, const QString&) ), - this, SLOT( slotConnectionResult(int, const QString&) ) ); + connect( ai, TQT_SIGNAL( connectionResult(int, const TQString&) ), + this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) ); return; } // clear the views @@ -286,10 +286,10 @@ void SubscriptionDialogBase::processNext() // kdDebug(5006) << "process " << mCurrentNamespace << ",subscribed=" << mSubscribed << endl; ListJob* job = new ListJob( ai, type, 0, ai->addPathToNamespace( mCurrentNamespace ), completeListing ); - connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&)), - this, SLOT(slotListDirectory(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData&))); + connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)), + this, TQT_SLOT(slotListDirectory(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&))); job->start(); } @@ -303,8 +303,8 @@ void SubscriptionDialogBase::loadingComplete() // implementation for server side subscription //------------------------------------------------------------------------------ -SubscriptionDialog::SubscriptionDialog( QWidget *parent, const QString &caption, - KAccount *acct, QString startPath ) +SubscriptionDialog::SubscriptionDialog( TQWidget *parent, const TQString &caption, + KAccount *acct, TQString startPath ) : SubscriptionDialogBase( parent, caption, acct, startPath ) { } @@ -330,8 +330,8 @@ void SubscriptionDialogBase::initPrefixList() mPrefixList.clear(); bool hasInbox = false; - const QStringList ns = map[ImapAccountBase::PersonalNS]; - for ( QStringList::ConstIterator it = ns.begin(); it != ns.end(); ++it ) + const TQStringList ns = map[ImapAccountBase::PersonalNS]; + for ( TQStringList::ConstIterator it = ns.begin(); it != ns.end(); ++it ) { if ( (*it).isEmpty() ) hasInbox = true; @@ -348,7 +348,7 @@ void SubscriptionDialogBase::initPrefixList() mPrefixList += map[ImapAccountBase::SharedNS]; } -void SubscriptionDialogBase::slotConnectionResult( int errorCode, const QString& errorMsg ) +void SubscriptionDialogBase::slotConnectionResult( int errorCode, const TQString& errorMsg ) { Q_UNUSED( errorMsg ); if ( !errorCode ) @@ -388,7 +388,7 @@ void SubscriptionDialog::doSave() } // subscribe - QListViewItemIterator it(subView); + TQListViewItemIterator it(subView); for ( ; it.current(); ++it) { static_cast<ImapAccountBase*>(account())->changeSubscription(true, @@ -396,7 +396,7 @@ void SubscriptionDialog::doSave() } // unsubscribe - QListViewItemIterator it2(unsubView); + TQListViewItemIterator it2(unsubView); for ( ; it2.current(); ++it2) { static_cast<ImapAccountBase*>(account())->changeSubscription(false, @@ -418,7 +418,7 @@ void SubscriptionDialog::processItems() if (done == 1000) { emit listChanged(); - QTimer::singleShot(0, this, SLOT(processItems())); + TQTimer::singleShot(0, this, TQT_SLOT(processItems())); return; } ++mCount; diff --git a/kmail/subscriptiondialog.h b/kmail/subscriptiondialog.h index 011a529bd..1d5a01481 100644 --- a/kmail/subscriptiondialog.h +++ b/kmail/subscriptiondialog.h @@ -32,7 +32,7 @@ #ifndef __SUBSCRIPTIONDIALOG #define __SUBSCRIPTIONDIALOG -#include <qdict.h> +#include <tqdict.h> #include <ksubscription.h> #include "imapaccountbase.h" @@ -49,10 +49,10 @@ namespace KMail { Q_OBJECT public: - SubscriptionDialogBase( QWidget *parent, - const QString &caption, + SubscriptionDialogBase( TQWidget *parent, + const TQString &caption, KAccount* acct, - QString startPath = QString::null ); + TQString startPath = TQString::null ); virtual ~SubscriptionDialogBase() {} void show(); @@ -61,7 +61,7 @@ namespace KMail { /** * Find the parent item */ - void findParentItem ( QString &name, QString &path, QString &compare, + void findParentItem ( TQString &name, TQString &path, TQString &compare, GroupItem **parent, GroupItem **oldItem ); /** @@ -80,8 +80,8 @@ namespace KMail { /** * get the listing from the imap-server */ - void slotListDirectory(const QStringList&, const QStringList&, - const QStringList&, const QStringList&, const ImapAccountBase::jobData &); + void slotListDirectory(const TQStringList&, const TQStringList&, + const TQStringList&, const TQStringList&, const ImapAccountBase::jobData &); /** * called by Ok-button, saves the changes @@ -91,7 +91,7 @@ namespace KMail { /** * Called from the account when a connection was established */ - void slotConnectionResult( int errorCode, const QString& errorMsg ); + void slotConnectionResult( int errorCode, const TQString& errorMsg ); protected slots: /** @@ -112,16 +112,16 @@ namespace KMail { * folders. */ void createListViewItem( int i ); - QString mDelimiter; - QStringList mFolderNames, mFolderPaths, + TQString mDelimiter; + TQStringList mFolderNames, mFolderPaths, mFolderMimeTypes, mFolderAttributes; ImapAccountBase::jobData mJobData; uint mCount; - QDict<GroupItem> mItemDict; - QString mStartPath; + TQDict<GroupItem> mItemDict; + TQString mStartPath; bool mSubscribed, mForceSubscriptionEnable; - QStringList mPrefixList; - QString mCurrentNamespace; + TQStringList mPrefixList; + TQString mCurrentNamespace; }; class SubscriptionDialog : public SubscriptionDialogBase @@ -129,10 +129,10 @@ namespace KMail { Q_OBJECT public: - SubscriptionDialog( QWidget *parent, - const QString &caption, + SubscriptionDialog( TQWidget *parent, + const TQString &caption, KAccount* acct, - QString startPath = QString::null ); + TQString startPath = TQString::null ); virtual ~SubscriptionDialog(); protected: /** reimpl */ diff --git a/kmail/teehtmlwriter.cpp b/kmail/teehtmlwriter.cpp index 91bc05a90..05d9969c9 100644 --- a/kmail/teehtmlwriter.cpp +++ b/kmail/teehtmlwriter.cpp @@ -37,7 +37,7 @@ #include <kdebug.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> namespace KMail { @@ -51,7 +51,7 @@ namespace KMail { } TeeHtmlWriter::~TeeHtmlWriter() { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) delete (*it); } @@ -60,38 +60,38 @@ namespace KMail { mWriters.append( writer ); } - void TeeHtmlWriter::begin( const QString & css ) { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + void TeeHtmlWriter::begin( const TQString & css ) { + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) (*it)->begin( css ); } void TeeHtmlWriter::end() { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) (*it)->end(); } void TeeHtmlWriter::reset() { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) (*it)->reset(); } - void TeeHtmlWriter::write( const QString & str ) { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + void TeeHtmlWriter::write( const TQString & str ) { + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) (*it)->write( str ); } - void TeeHtmlWriter::queue( const QString & str ) { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + void TeeHtmlWriter::queue( const TQString & str ) { + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) (*it)->queue( str ); } void TeeHtmlWriter::flush() { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) (*it)->flush(); } - void TeeHtmlWriter::embedPart( const QCString & contentId, const QString & url ) { - for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) + void TeeHtmlWriter::embedPart( const TQCString & contentId, const TQString & url ) { + for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it ) (*it)->embedPart( contentId, url ); } diff --git a/kmail/teehtmlwriter.h b/kmail/teehtmlwriter.h index d7b1cec28..26efc1ded 100644 --- a/kmail/teehtmlwriter.h +++ b/kmail/teehtmlwriter.h @@ -34,7 +34,7 @@ #include "interfaces/htmlwriter.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> class QString; @@ -53,17 +53,17 @@ namespace KMail { // // HtmlWriter Interface // - 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: /** We own the HtmlWriters added to us! */ - QValueList<KMail::HtmlWriter*> mWriters; + TQValueList<KMail::HtmlWriter*> mWriters; }; } // namespace KMail diff --git a/kmail/templateparser.cpp b/kmail/templateparser.cpp index 39591358b..4112b58ed 100644 --- a/kmail/templateparser.cpp +++ b/kmail/templateparser.cpp @@ -20,18 +20,18 @@ #include <config.h> -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> #include <klocale.h> #include <kcalendarsystem.h> #include <kmime_util.h> #include <kglobal.h> #include <kprocess.h> -#include <qregexp.h> -#include <qfile.h> +#include <tqregexp.h> +#include <tqfile.h> #include <kmessagebox.h> #include <kshell.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "kmmessage.h" #include "kmmsgbase.h" @@ -47,7 +47,7 @@ #include "templateparser.h" TemplateParser::TemplateParser( KMMessage *amsg, const Mode amode, - const QString aselection, + const TQString aselection, bool asmartQuote, bool anoQuote, bool aallowDecryption, bool aselectionIsBody ) : mMode( amode ), mFolder( 0 ), mIdentity( 0 ), mSelection( aselection ), @@ -58,20 +58,20 @@ TemplateParser::TemplateParser( KMMessage *amsg, const Mode amode, mMsg = amsg; } -int TemplateParser::parseQuotes( const QString &prefix, const QString &str, - QString "e ) const +int TemplateParser::parseQuotes( const TQString &prefix, const TQString &str, + TQString "e ) const { int pos = prefix.length(); int len; int str_len = str.length(); - QChar qc = '"'; - QChar prev = 0; + TQChar qc = '"'; + TQChar prev = 0; pos++; len = pos; while ( pos < str_len ) { - QChar c = str[pos]; + TQChar c = str[pos]; pos++; len++; @@ -93,18 +93,18 @@ int TemplateParser::parseQuotes( const QString &prefix, const QString &str, return len; } -QString TemplateParser::getFName( const QString &str ) +TQString TemplateParser::getFName( const TQString &str ) { // simple logic: // if there is ',' in name, than format is 'Last, First' // else format is 'First Last' // last resort -- return 'name' from 'name@domain' int sep_pos; - QString res; + TQString res; if ( ( sep_pos = str.find( '@' ) ) > 0 ) { int i; for ( i = (sep_pos - 1); i >= 0; --i ) { - QChar c = str[i]; + TQChar c = str[i]; if ( c.isLetterOrNumber() ) { res.prepend( c ); } else { @@ -115,7 +115,7 @@ QString TemplateParser::getFName( const QString &str ) unsigned int i; bool begin = false; for ( i = sep_pos; i < str.length(); ++i ) { - QChar c = str[i]; + TQChar c = str[i]; if ( c.isLetterOrNumber() ) { begin = true; res.append( c ); @@ -126,7 +126,7 @@ QString TemplateParser::getFName( const QString &str ) } else { unsigned int i; for ( i = 0; i < str.length(); ++i ) { - QChar c = str[i]; + TQChar c = str[i]; if ( c.isLetterOrNumber() ) { res.append( c ); } else { @@ -137,17 +137,17 @@ QString TemplateParser::getFName( const QString &str ) return res; } -QString TemplateParser::getLName( const QString &str ) +TQString TemplateParser::getLName( const TQString &str ) { // simple logic: // if there is ',' in name, than format is 'Last, First' // else format is 'First Last' int sep_pos; - QString res; + TQString res; if ( ( sep_pos = str.find(',') ) > 0 ) { int i; for ( i = sep_pos; i >= 0; --i ) { - QChar c = str[i]; + TQChar c = str[i]; if ( c.isLetterOrNumber() ) { res.prepend( c ); } else { @@ -159,7 +159,7 @@ QString TemplateParser::getLName( const QString &str ) unsigned int i; bool begin = false; for ( i = sep_pos; i < str.length(); ++i ) { - QChar c = str[i]; + TQChar c = str[i]; if ( c.isLetterOrNumber() ) { begin = true; res.append( c ); @@ -177,30 +177,30 @@ void TemplateParser::process( KMMessage *aorig_msg, KMFolder *afolder, bool appe mAppend = append; mOrigMsg = aorig_msg; mFolder = afolder; - QString tmpl = findTemplate(); + TQString tmpl = findTemplate(); return processWithTemplate( tmpl ); } -void TemplateParser::process( const QString &tmplName, KMMessage *aorig_msg, +void TemplateParser::process( const TQString &tmplName, KMMessage *aorig_msg, KMFolder *afolder, bool append ) { mAppend = append; mOrigMsg = aorig_msg; mFolder = afolder; - QString tmpl = findCustomTemplate( tmplName ); + TQString tmpl = findCustomTemplate( tmplName ); return processWithTemplate( tmpl ); } -void TemplateParser::processWithTemplate( const QString &tmpl ) +void TemplateParser::processWithTemplate( const TQString &tmpl ) { - QString body; + TQString body; int tmpl_len = tmpl.length(); bool dnl = false; for ( int i = 0; i < tmpl_len; ++i ) { - QChar c = tmpl[i]; + TQChar c = tmpl[i]; // kdDebug() << "Next char: " << c << endl; if ( c == '%' ) { - QString cmd = tmpl.mid( i + 1 ); + TQString cmd = tmpl.mid( i + 1 ); if ( cmd.startsWith( "-" ) ) { // dnl @@ -211,27 +211,27 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) } else if ( cmd.startsWith( "REM=" ) ) { // comments kdDebug() << "Command: REM=" << endl; - QString q; + TQString q; int len = parseQuotes( "REM=", cmd, q ); i += len; } else if ( cmd.startsWith( "INSERT=" ) ) { // insert content of specified file as is kdDebug() << "Command: INSERT=" << endl; - QString q; + TQString q; int len = parseQuotes( "INSERT=", cmd, q ); i += len; - QString path = KShell::tildeExpand( q ); - QFileInfo finfo( path ); + TQString path = KShell::tildeExpand( q ); + TQFileInfo finfo( path ); if (finfo.isRelative() ) { path = KShell::homeDir( "" ); path += '/'; path += q; } - QFile file( path ); + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QByteArray content = file.readAll(); - QString str = QString::fromLocal8Bit( content, content.size() ); + TQByteArray content = file.readAll(); + TQString str = TQString::fromLocal8Bit( content, content.size() ); body.append( str ); } else if ( mDebug ) { KMessageBox::error( 0, @@ -242,30 +242,30 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) } else if ( cmd.startsWith( "SYSTEM=" ) ) { // insert content of specified file as is kdDebug() << "Command: SYSTEM=" << endl; - QString q; + TQString q; int len = parseQuotes( "SYSTEM=", cmd, q ); i += len; - QString pipe_cmd = q; - QString str = pipe( pipe_cmd, "" ); + TQString pipe_cmd = q; + TQString str = pipe( pipe_cmd, "" ); body.append( str ); } else if ( cmd.startsWith( "PUT=" ) ) { // insert content of specified file as is kdDebug() << "Command: PUT=" << endl; - QString q; + TQString q; int len = parseQuotes( "PUT=", cmd, q ); i += len; - QString path = KShell::tildeExpand( q ); - QFileInfo finfo( path ); + TQString path = KShell::tildeExpand( q ); + TQFileInfo finfo( path ); if (finfo.isRelative() ) { path = KShell::homeDir( "" ); path += '/'; path += q; } - QFile file( path ); + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QByteArray content = file.readAll(); - body.append( QString::fromLocal8Bit( content, content.size() ) ); + TQByteArray content = file.readAll(); + body.append( TQString::fromLocal8Bit( content, content.size() ) ); } else if ( mDebug ) { KMessageBox::error( 0, i18n( "Cannot insert content from file %1: %2"). @@ -275,13 +275,13 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) } else if ( cmd.startsWith( "QUOTEPIPE=" ) ) { // pipe message body throw command and insert it as quotation kdDebug() << "Command: QUOTEPIPE=" << endl; - QString q; + TQString q; int len = parseQuotes( "QUOTEPIPE=", cmd, q ); i += len; - QString pipe_cmd = q; + TQString pipe_cmd = q; if ( mOrigMsg && !mNoQuote ) { - QString str = pipe( pipe_cmd, mSelection ); - QString quote = mOrigMsg->asQuotedString( "", mQuoteString, str, + TQString str = pipe( pipe_cmd, mSelection ); + TQString quote = mOrigMsg->asQuotedString( "", mQuoteString, str, mSmartQuote, mAllowDecryption ); body.append( quote ); } @@ -290,7 +290,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: QUOTE" << endl; i += strlen( "QUOTE" ); if ( mOrigMsg && !mNoQuote ) { - QString quote = mOrigMsg->asQuotedString( "", mQuoteString, mSelection, + TQString quote = mOrigMsg->asQuotedString( "", mQuoteString, mSelection, mSmartQuote, mAllowDecryption ); body.append( quote ); } @@ -299,7 +299,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: QHEADERS" << endl; i += strlen( "QHEADERS" ); if ( mOrigMsg && !mNoQuote ) { - QString quote = mOrigMsg->asQuotedString( "", mQuoteString, + TQString quote = mOrigMsg->asQuotedString( "", mQuoteString, mOrigMsg->headerAsSendableString(), mSmartQuote, false ); body.append( quote ); @@ -309,53 +309,53 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: HEADERS" << endl; i += strlen( "HEADERS" ); if ( mOrigMsg && !mNoQuote ) { - QString str = mOrigMsg->headerAsSendableString(); + TQString str = mOrigMsg->headerAsSendableString(); body.append( str ); } } else if ( cmd.startsWith( "TEXTPIPE=" ) ) { // pipe message body throw command and insert it as is kdDebug() << "Command: TEXTPIPE=" << endl; - QString q; + TQString q; int len = parseQuotes( "TEXTPIPE=", cmd, q ); i += len; - QString pipe_cmd = q; + TQString pipe_cmd = q; if ( mOrigMsg ) { - QString str = pipe(pipe_cmd, mSelection ); + TQString str = pipe(pipe_cmd, mSelection ); body.append( str ); } } else if ( cmd.startsWith( "MSGPIPE=" ) ) { // pipe full message throw command and insert result as is kdDebug() << "Command: MSGPIPE=" << endl; - QString q; + TQString q; int len = parseQuotes( "MSGPIPE=", cmd, q ); i += len; - QString pipe_cmd = q; + TQString pipe_cmd = q; if ( mOrigMsg ) { - QString str = pipe(pipe_cmd, mOrigMsg->asString() ); + TQString str = pipe(pipe_cmd, mOrigMsg->asString() ); body.append( str ); } } else if ( cmd.startsWith( "BODYPIPE=" ) ) { // pipe message body generated so far throw command and insert result as is kdDebug() << "Command: BODYPIPE=" << endl; - QString q; + TQString q; int len = parseQuotes( "BODYPIPE=", cmd, q ); i += len; - QString pipe_cmd = q; - QString str = pipe( pipe_cmd, body ); + TQString pipe_cmd = q; + TQString str = pipe( pipe_cmd, body ); body.append( str ); } else if ( cmd.startsWith( "CLEARPIPE=" ) ) { // pipe message body generated so far throw command and // insert result as is replacing current body kdDebug() << "Command: CLEARPIPE=" << endl; - QString q; + TQString q; int len = parseQuotes( "CLEARPIPE=", cmd, q ); i += len; - QString pipe_cmd = q; - QString str = pipe( pipe_cmd, body ); + TQString pipe_cmd = q; + TQString str = pipe( pipe_cmd, body ); body = str; mMsg->setCursorPos( 0 ); @@ -363,7 +363,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: TEXT" << endl; i += strlen( "TEXT" ); if ( mOrigMsg ) { - QString quote = mOrigMsg->asPlainText( false, mAllowDecryption ); + TQString quote = mOrigMsg->asPlainText( false, mAllowDecryption ); body.append( quote ); } @@ -371,7 +371,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTEXTSIZE" << endl; i += strlen( "OTEXTSIZE" ); if ( mOrigMsg ) { - QString str = QString( "%1" ).arg( mOrigMsg->body().length() ); + TQString str = TQString( "%1" ).arg( mOrigMsg->body().length() ); body.append( str ); } @@ -379,132 +379,132 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTEXT" << endl; i += strlen( "OTEXT" ); if ( mOrigMsg ) { - QString quote = mOrigMsg->asPlainText( false, mAllowDecryption ); + TQString quote = mOrigMsg->asPlainText( false, mAllowDecryption ); body.append( quote ); } } else if ( cmd.startsWith( "CCADDR" ) ) { kdDebug() << "Command: CCADDR" << endl; i += strlen( "CCADDR" ); - QString str = mMsg->cc(); + TQString str = mMsg->cc(); body.append( str ); } else if ( cmd.startsWith( "CCNAME" ) ) { kdDebug() << "Command: CCNAME" << endl; i += strlen( "CCNAME" ); - QString str = mMsg->ccStrip(); + TQString str = mMsg->ccStrip(); body.append( str ); } else if ( cmd.startsWith( "CCFNAME" ) ) { kdDebug() << "Command: CCFNAME" << endl; i += strlen( "CCFNAME" ); - QString str = mMsg->ccStrip(); + TQString str = mMsg->ccStrip(); body.append( getFName( str ) ); } else if ( cmd.startsWith( "CCLNAME" ) ) { kdDebug() << "Command: CCLNAME" << endl; i += strlen( "CCLNAME" ); - QString str = mMsg->ccStrip(); + TQString str = mMsg->ccStrip(); body.append( getLName( str ) ); } else if ( cmd.startsWith( "TOADDR" ) ) { kdDebug() << "Command: TOADDR" << endl; i += strlen( "TOADDR" ); - QString str = mMsg->to(); + TQString str = mMsg->to(); body.append( str ); } else if ( cmd.startsWith( "TONAME" ) ) { kdDebug() << "Command: TONAME" << endl; i += strlen( "TONAME" ); - QString str = mMsg->toStrip(); + TQString str = mMsg->toStrip(); body.append( str ); } else if ( cmd.startsWith( "TOFNAME" ) ) { kdDebug() << "Command: TOFNAME" << endl; i += strlen( "TOFNAME" ); - QString str = mMsg->toStrip(); + TQString str = mMsg->toStrip(); body.append( getFName( str ) ); } else if ( cmd.startsWith( "TOLNAME" ) ) { kdDebug() << "Command: TOLNAME" << endl; i += strlen( "TOLNAME" ); - QString str = mMsg->toStrip(); + TQString str = mMsg->toStrip(); body.append( getLName( str ) ); } else if ( cmd.startsWith( "TOLIST" ) ) { kdDebug() << "Command: TOLIST" << endl; i += strlen( "TOLIST" ); - QString str = mMsg->to(); + TQString str = mMsg->to(); body.append( str ); } else if ( cmd.startsWith( "FROMADDR" ) ) { kdDebug() << "Command: FROMADDR" << endl; i += strlen( "FROMADDR" ); - QString str = mMsg->from(); + TQString str = mMsg->from(); body.append( str ); } else if ( cmd.startsWith( "FROMNAME" ) ) { kdDebug() << "Command: FROMNAME" << endl; i += strlen( "FROMNAME" ); - QString str = mMsg->fromStrip(); + TQString str = mMsg->fromStrip(); body.append( str ); } else if ( cmd.startsWith( "FROMFNAME" ) ) { kdDebug() << "Command: FROMFNAME" << endl; i += strlen( "FROMFNAME" ); - QString str = mMsg->fromStrip(); + TQString str = mMsg->fromStrip(); body.append( getFName( str ) ); } else if ( cmd.startsWith( "FROMLNAME" ) ) { kdDebug() << "Command: FROMLNAME" << endl; i += strlen( "FROMLNAME" ); - QString str = mMsg->fromStrip(); + TQString str = mMsg->fromStrip(); body.append( getLName( str ) ); } else if ( cmd.startsWith( "FULLSUBJECT" ) ) { kdDebug() << "Command: FULLSUBJECT" << endl; i += strlen( "FULLSUBJECT" ); - QString str = mMsg->subject(); + TQString str = mMsg->subject(); body.append( str ); } else if ( cmd.startsWith( "FULLSUBJ" ) ) { kdDebug() << "Command: FULLSUBJ" << endl; i += strlen( "FULLSUBJ" ); - QString str = mMsg->subject(); + TQString str = mMsg->subject(); body.append( str ); } else if ( cmd.startsWith( "MSGID" ) ) { kdDebug() << "Command: MSGID" << endl; i += strlen( "MSGID" ); - QString str = mMsg->id(); + TQString str = mMsg->id(); body.append( str ); } else if ( cmd.startsWith( "OHEADER=" ) ) { // insert specified content of header from original message kdDebug() << "Command: OHEADER=" << endl; - QString q; + TQString q; int len = parseQuotes( "OHEADER=", cmd, q ); i += len; if ( mOrigMsg ) { - QString hdr = q; - QString str = mOrigMsg->headerFields(hdr.local8Bit() ).join( ", " ); + TQString hdr = q; + TQString str = mOrigMsg->headerFields(hdr.local8Bit() ).join( ", " ); body.append( str ); } } else if ( cmd.startsWith( "HEADER=" ) ) { // insert specified content of header from current message kdDebug() << "Command: HEADER=" << endl; - QString q; + TQString q; int len = parseQuotes( "HEADER=", cmd, q ); i += len; - QString hdr = q; - QString str = mMsg->headerFields(hdr.local8Bit() ).join( ", " ); + TQString hdr = q; + TQString str = mMsg->headerFields(hdr.local8Bit() ).join( ", " ); body.append( str ); } else if ( cmd.startsWith( "HEADER( " ) ) { // insert specified content of header from current message kdDebug() << "Command: HEADER( " << endl; - QRegExp re = QRegExp( "^HEADER\\((.+)\\)" ); + TQRegExp re = TQRegExp( "^HEADER\\((.+)\\)" ); re.setMinimal( true ); int res = re.search( cmd ); if ( res != 0 ) { @@ -512,8 +512,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) i += strlen( "HEADER( " ); } else { i += re.matchedLength(); - QString hdr = re.cap( 1 ); - QString str = mMsg->headerFields( hdr.local8Bit() ).join( ", " ); + TQString hdr = re.cap( 1 ); + TQString str = mMsg->headerFields( hdr.local8Bit() ).join( ", " ); body.append( str ); } @@ -521,7 +521,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OCCADDR" << endl; i += strlen( "OCCADDR" ); if ( mOrigMsg ) { - QString str = mOrigMsg->cc(); + TQString str = mOrigMsg->cc(); body.append( str ); } @@ -529,7 +529,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OCCNAME" << endl; i += strlen( "OCCNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->ccStrip(); + TQString str = mOrigMsg->ccStrip(); body.append( str ); } @@ -537,7 +537,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OCCFNAME" << endl; i += strlen( "OCCFNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->ccStrip(); + TQString str = mOrigMsg->ccStrip(); body.append( getFName( str ) ); } @@ -545,7 +545,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OCCLNAME" << endl; i += strlen( "OCCLNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->ccStrip(); + TQString str = mOrigMsg->ccStrip(); body.append( getLName( str ) ); } @@ -553,7 +553,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTOADDR" << endl; i += strlen( "OTOADDR" ); if ( mOrigMsg ) { - QString str = mOrigMsg->to(); + TQString str = mOrigMsg->to(); body.append( str ); } @@ -561,7 +561,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTONAME" << endl; i += strlen( "OTONAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->toStrip(); + TQString str = mOrigMsg->toStrip(); body.append( str ); } @@ -569,7 +569,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTOFNAME" << endl; i += strlen( "OTOFNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->toStrip(); + TQString str = mOrigMsg->toStrip(); body.append( getFName( str ) ); } @@ -577,7 +577,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTOLNAME" << endl; i += strlen( "OTOLNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->toStrip(); + TQString str = mOrigMsg->toStrip(); body.append( getLName( str ) ); } @@ -585,7 +585,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTOLIST" << endl; i += strlen( "OTOLIST" ); if ( mOrigMsg ) { - QString str = mOrigMsg->to(); + TQString str = mOrigMsg->to(); body.append( str ); } @@ -593,7 +593,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTO" << endl; i += strlen( "OTO" ); if ( mOrigMsg ) { - QString str = mOrigMsg->to(); + TQString str = mOrigMsg->to(); body.append( str ); } @@ -601,7 +601,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OFROMADDR" << endl; i += strlen( "OFROMADDR" ); if ( mOrigMsg ) { - QString str = mOrigMsg->from(); + TQString str = mOrigMsg->from(); body.append( str ); } @@ -609,7 +609,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OFROMNAME" << endl; i += strlen( "OFROMNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->fromStrip(); + TQString str = mOrigMsg->fromStrip(); body.append( str ); } @@ -617,7 +617,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OFROMFNAME" << endl; i += strlen( "OFROMFNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->fromStrip(); + TQString str = mOrigMsg->fromStrip(); body.append( getFName( str ) ); } @@ -625,7 +625,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OFROMLNAME" << endl; i += strlen( "OFROMLNAME" ); if ( mOrigMsg ) { - QString str = mOrigMsg->fromStrip(); + TQString str = mOrigMsg->fromStrip(); body.append( getLName( str ) ); } @@ -633,7 +633,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OFULLSUBJECT" << endl; i += strlen( "OFULLSUBJECT" ); if ( mOrigMsg ) { - QString str = mOrigMsg->subject(); + TQString str = mOrigMsg->subject(); body.append( str ); } @@ -641,7 +641,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OFULLSUBJ" << endl; i += strlen( "OFULLSUBJ" ); if ( mOrigMsg ) { - QString str = mOrigMsg->subject(); + TQString str = mOrigMsg->subject(); body.append( str ); } @@ -649,69 +649,69 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OMSGID" << endl; i += strlen( "OMSGID" ); if ( mOrigMsg ) { - QString str = mOrigMsg->id(); + TQString str = mOrigMsg->id(); body.append( str ); } } else if ( cmd.startsWith( "DATEEN" ) ) { kdDebug() << "Command: DATEEN" << endl; i += strlen( "DATEEN" ); - QDateTime date = QDateTime::currentDateTime(); + TQDateTime date = TQDateTime::currentDateTime(); KLocale locale( "C" ); - QString str = locale.formatDate( date.date(), false ); + TQString str = locale.formatDate( date.date(), false ); body.append( str ); } else if ( cmd.startsWith( "DATESHORT" ) ) { kdDebug() << "Command: DATESHORT" << endl; i += strlen( "DATESHORT" ); - QDateTime date = QDateTime::currentDateTime(); - QString str = KGlobal::locale()->formatDate( date.date(), true ); + TQDateTime date = TQDateTime::currentDateTime(); + TQString str = KGlobal::locale()->formatDate( date.date(), true ); body.append( str ); } else if ( cmd.startsWith( "DATE" ) ) { kdDebug() << "Command: DATE" << endl; i += strlen( "DATE" ); - QDateTime date = QDateTime::currentDateTime(); - QString str = KGlobal::locale()->formatDate( date.date(), false ); + TQDateTime date = TQDateTime::currentDateTime(); + TQString str = KGlobal::locale()->formatDate( date.date(), false ); body.append( str ); } else if ( cmd.startsWith( "DOW" ) ) { kdDebug() << "Command: DOW" << endl; i += strlen( "DOW" ); - QDateTime date = QDateTime::currentDateTime(); - QString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false ); + TQDateTime date = TQDateTime::currentDateTime(); + TQString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false ); body.append( str ); } else if ( cmd.startsWith( "TIMELONGEN" ) ) { kdDebug() << "Command: TIMELONGEN" << endl; i += strlen( "TIMELONGEN" ); - QDateTime date = QDateTime::currentDateTime(); + TQDateTime date = TQDateTime::currentDateTime(); KLocale locale( "C"); - QString str = locale.formatTime( date.time(), true ); + TQString str = locale.formatTime( date.time(), true ); body.append( str ); } else if ( cmd.startsWith( "TIMELONG" ) ) { kdDebug() << "Command: TIMELONG" << endl; i += strlen( "TIMELONG" ); - QDateTime date = QDateTime::currentDateTime(); - QString str = KGlobal::locale()->formatTime( date.time(), true ); + TQDateTime date = TQDateTime::currentDateTime(); + TQString str = KGlobal::locale()->formatTime( date.time(), true ); body.append( str ); } else if ( cmd.startsWith( "TIME" ) ) { kdDebug() << "Command: TIME" << endl; i += strlen( "TIME" ); - QDateTime date = QDateTime::currentDateTime(); - QString str = KGlobal::locale()->formatTime( date.time(), false ); + TQDateTime date = TQDateTime::currentDateTime(); + TQString str = KGlobal::locale()->formatTime( date.time(), false ); body.append( str ); } else if ( cmd.startsWith( "ODATEEN" ) ) { kdDebug() << "Command: ODATEEN" << endl; i += strlen( "ODATEEN" ); if ( mOrigMsg ) { - QDateTime date; + TQDateTime date; date.setTime_t( mOrigMsg->date() ); KLocale locale( "C"); - QString str = locale.formatDate( date.date(), false ); + TQString str = locale.formatDate( date.date(), false ); body.append( str ); } @@ -719,9 +719,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: ODATESHORT" << endl; i += strlen( "ODATESHORT"); if ( mOrigMsg ) { - QDateTime date; + TQDateTime date; date.setTime_t( mOrigMsg->date() ); - QString str = KGlobal::locale()->formatDate( date.date(), true ); + TQString str = KGlobal::locale()->formatDate( date.date(), true ); body.append( str ); } @@ -729,9 +729,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: ODATE" << endl; i += strlen( "ODATE"); if ( mOrigMsg ) { - QDateTime date; + TQDateTime date; date.setTime_t( mOrigMsg->date() ); - QString str = KGlobal::locale()->formatDate( date.date(), false ); + TQString str = KGlobal::locale()->formatDate( date.date(), false ); body.append( str ); } @@ -739,9 +739,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: ODOW" << endl; i += strlen( "ODOW"); if ( mOrigMsg ) { - QDateTime date; + TQDateTime date; date.setTime_t( mOrigMsg->date() ); - QString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false ); + TQString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false ); body.append( str ); } @@ -749,10 +749,10 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTIMELONGEN" << endl; i += strlen( "OTIMELONGEN"); if ( mOrigMsg ) { - QDateTime date; + TQDateTime date; date.setTime_t( mOrigMsg->date() ); KLocale locale( "C"); - QString str = locale.formatTime( date.time(), true ); + TQString str = locale.formatTime( date.time(), true ); body.append( str ); } @@ -760,9 +760,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTIMELONG" << endl; i += strlen( "OTIMELONG"); if ( mOrigMsg ) { - QDateTime date; + TQDateTime date; date.setTime_t( mOrigMsg->date() ); - QString str = KGlobal::locale()->formatTime( date.time(), true ); + TQString str = KGlobal::locale()->formatTime( date.time(), true ); body.append( str ); } @@ -770,9 +770,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) kdDebug() << "Command: OTIME" << endl; i += strlen( "OTIME"); if ( mOrigMsg ) { - QDateTime date; + TQDateTime date; date.setTime_t( mOrigMsg->date() ); - QString str = KGlobal::locale()->formatTime( date.time(), false ); + TQString str = KGlobal::locale()->formatTime( date.time(), false ); body.append( str ); } @@ -832,7 +832,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) // kdDebug() << "Message body: " << body << endl; if ( mAppend ) { - QCString msg_body = mMsg->body(); + TQCString msg_body = mMsg->body(); msg_body.append( body.utf8() ); mMsg->setBody( msg_body ); } else { @@ -840,10 +840,10 @@ void TemplateParser::processWithTemplate( const QString &tmpl ) } } -QString TemplateParser::findCustomTemplate( const QString &tmplName ) +TQString TemplateParser::findCustomTemplate( const TQString &tmplName ) { CTemplates t( tmplName ); - QString content = t.content(); + TQString content = t.content(); if ( !content.isEmpty() ) { return content; } else { @@ -851,7 +851,7 @@ QString TemplateParser::findCustomTemplate( const QString &tmplName ) } } -QString TemplateParser::findTemplate() +TQString TemplateParser::findTemplate() { // import 'Phrases' if it not done yet if ( !GlobalSettings::self()->phrasesConverted() ) { @@ -860,7 +860,7 @@ QString TemplateParser::findTemplate() // kdDebug() << "Trying to find template for mode " << mode << endl; - QString tmpl; + TQString tmpl; if ( !mFolder ) { // find folder message belongs to mFolder = mMsg->parent(); @@ -877,7 +877,7 @@ QString TemplateParser::findTemplate() if ( mFolder ) // only if a folder was found { - QString fid = mFolder->idString(); + TQString fid = mFolder->idString(); Templates fconf( fid ); if ( fconf.useCustomTemplates() ) { // does folder use custom templates? switch( mMode ) { @@ -916,9 +916,9 @@ QString TemplateParser::findTemplate() } kdDebug(5006) << "Identity found: " << mIdentity << endl; - QString iid; + TQString iid; if ( mIdentity ) { - iid = QString("IDENTITY_%1").arg( mIdentity ); // templates ID for that identity + iid = TQString("IDENTITY_%1").arg( mIdentity ); // templates ID for that identity } else { iid = "IDENTITY_NO_IDENTITY"; // templates ID for no identity @@ -971,25 +971,25 @@ QString TemplateParser::findTemplate() return tmpl; } -QString TemplateParser::pipe( const QString &cmd, const QString &buf ) +TQString TemplateParser::pipe( const TQString &cmd, const TQString &buf ) { mPipeOut = ""; mPipeErr = ""; mPipeRc = 0; KProcess proc; - QCString data = buf.local8Bit(); + TQCString data = buf.local8Bit(); // kdDebug() << "Command data: " << data << endl; proc << KShell::splitArgs( cmd, KShell::TildeExpand ); proc.setUseShell( true ); - connect( &proc, SIGNAL( receivedStdout( KProcess *, char *, int ) ), - this, SLOT( onReceivedStdout( KProcess *, char *, int ) ) ); - connect( &proc, SIGNAL( receivedStderr( KProcess *, char *, int ) ), - this, SLOT( onReceivedStderr( KProcess *, char *, int ) ) ); - connect( &proc, SIGNAL( wroteStdin( KProcess * ) ), - this, SLOT( onWroteStdin( KProcess * ) ) ); + connect( &proc, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), + this, TQT_SLOT( onReceivedStdout( KProcess *, char *, int ) ) ); + connect( &proc, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ), + this, TQT_SLOT( onReceivedStderr( KProcess *, char *, int ) ) ); + connect( &proc, TQT_SIGNAL( wroteStdin( KProcess * ) ), + this, TQT_SLOT( onWroteStdin( KProcess * ) ) ); if ( proc.start( KProcess::NotifyOnExit, KProcess::All ) ) { @@ -1076,13 +1076,13 @@ void TemplateParser::onProcessExited( KProcess *proc ) void TemplateParser::onReceivedStdout( KProcess *proc, char *buffer, int buflen ) { Q_UNUSED( proc ); - mPipeOut += QString::fromLocal8Bit( buffer, buflen ); + mPipeOut += TQString::fromLocal8Bit( buffer, buflen ); } void TemplateParser::onReceivedStderr( KProcess *proc, char *buffer, int buflen ) { Q_UNUSED( proc ); - mPipeErr += QString::fromLocal8Bit( buffer, buflen ); + mPipeErr += TQString::fromLocal8Bit( buffer, buflen ); } void TemplateParser::onWroteStdin( KProcess *proc ) diff --git a/kmail/templateparser.h b/kmail/templateparser.h index dac78e5f7..77db0e76f 100644 --- a/kmail/templateparser.h +++ b/kmail/templateparser.h @@ -21,7 +21,7 @@ #ifndef __KMAIL_TEMPLATEPARSER_H__ #define __KMAIL_TEMPLATEPARSER_H__ -#include <qobject.h> +#include <tqobject.h> class KMMessage; class QString; @@ -44,20 +44,20 @@ class TemplateParser : public QObject static const int PipeTimeout = 15; public: - TemplateParser( KMMessage *amsg, const Mode amode, const QString aselection, + TemplateParser( KMMessage *amsg, const Mode amode, const TQString aselection, bool aSmartQuote, bool anoQuote, bool aallowDecryption, bool aselectionIsBody ); virtual void process( KMMessage *aorig_msg, KMFolder *afolder = NULL, bool append = false ); - virtual void process( const QString &tmplName, KMMessage *aorig_msg, + virtual void process( const TQString &tmplName, KMMessage *aorig_msg, KMFolder *afolder = NULL, bool append = false ); - virtual void processWithTemplate( const QString &tmpl ); - virtual QString findTemplate(); - virtual QString findCustomTemplate( const QString &tmpl ); - virtual QString pipe( const QString &cmd, const QString &buf ); + virtual void processWithTemplate( const TQString &tmpl ); + virtual TQString findTemplate(); + virtual TQString findCustomTemplate( const TQString &tmpl ); + virtual TQString pipe( const TQString &cmd, const TQString &buf ); - virtual QString getFName( const QString &str ); - virtual QString getLName( const QString &str ); + virtual TQString getFName( const TQString &str ); + virtual TQString getLName( const TQString &str ); protected: Mode mMode; @@ -65,20 +65,20 @@ class TemplateParser : public QObject uint mIdentity; KMMessage *mMsg; KMMessage *mOrigMsg; - QString mSelection; + TQString mSelection; bool mSmartQuote; bool mNoQuote; bool mAllowDecryption; bool mSelectionIsBody; int mPipeRc; - QString mPipeOut; - QString mPipeErr; + TQString mPipeOut; + TQString mPipeErr; bool mDebug; - QString mQuoteString; + TQString mQuoteString; bool mAppend; - int parseQuotes( const QString &prefix, const QString &str, - QString "e ) const; + int parseQuotes( const TQString &prefix, const TQString &str, + TQString "e ) const; protected slots: void onProcessExited( KProcess *proc ); diff --git a/kmail/templatesconfiguration.cpp b/kmail/templatesconfiguration.cpp index bc09eff44..1e2d74cbd 100644 --- a/kmail/templatesconfiguration.cpp +++ b/kmail/templatesconfiguration.cpp @@ -22,13 +22,13 @@ #include <klocale.h> #include <kglobal.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qtextedit.h> -#include <qlineedit.h> -#include <qtoolbox.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> +#include <tqlineedit.h> +#include <tqtoolbox.h> #include <kdebug.h> -#include <qfont.h> +#include <tqfont.h> #include <kactivelabel.h> #include "templatesconfiguration_base.h" @@ -38,34 +38,34 @@ #include "templatesconfiguration.h" -TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *name ) +TemplatesConfiguration::TemplatesConfiguration( TQWidget *parent, const char *name ) :TemplatesConfigurationBase( parent, name ) { - QFont f = KGlobalSettings::fixedFont(); + TQFont f = KGlobalSettings::fixedFont(); textEdit_new->setFont( f ); textEdit_reply->setFont( f ); textEdit_reply_all->setFont( f ); textEdit_forward->setFont( f ); - setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); sizeHint(); - connect( textEdit_new, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( textEdit_reply, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( textEdit_reply_all, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( textEdit_forward, SIGNAL( textChanged() ), - this, SLOT( slotTextChanged( void ) ) ); - connect( lineEdit_quote, SIGNAL( textChanged( const QString & ) ), - this, SLOT( slotTextChanged( void ) ) ); - - connect( mInsertCommand, SIGNAL( insertCommand(QString, int) ), - this, SLOT( slotInsertCommand(QString, int) ) ); - - QString help; - if ( QString( name ) == "folder-templates" ) { + connect( textEdit_new, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( textEdit_reply, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( textEdit_reply_all, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( textEdit_forward, TQT_SIGNAL( textChanged() ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + connect( lineEdit_quote, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( slotTextChanged( void ) ) ); + + connect( mInsertCommand, TQT_SIGNAL( insertCommand(TQString, int) ), + this, TQT_SLOT( slotInsertCommand(TQString, int) ) ); + + TQString help; + if ( TQString( name ) == "folder-templates" ) { help = i18n( "<qt>" "<p>Here you can create message templates to use when you " @@ -77,7 +77,7 @@ TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *nam "They override both global templates and per-identity " "templates if they are specified.</p>" "</qt>" ); - } else if ( QString( name ) == "identity-templates" ) { + } else if ( TQString( name ) == "identity-templates" ) { help = i18n( "<qt>" "<p>Here you can create message templates to use when you " @@ -117,7 +117,7 @@ void TemplatesConfiguration::loadFromGlobal() importFromPhrases(); } - QString str; + TQString str; str = GlobalSettings::self()->templateNewMessage(); if ( str.isEmpty() ) { textEdit_new->setText( defaultNewMessage() ); @@ -163,9 +163,9 @@ void TemplatesConfiguration::saveToGlobal() void TemplatesConfiguration::loadFromIdentity( uint id ) { - Templates t( QString("IDENTITY_%1").arg( id ) ); + Templates t( TQString("IDENTITY_%1").arg( id ) ); - QString str; + TQString str; str = t.templateNewMessage(); if ( str.isEmpty() ) { @@ -215,7 +215,7 @@ void TemplatesConfiguration::loadFromIdentity( uint id ) void TemplatesConfiguration::saveToIdentity( uint id ) { - Templates t( QString("IDENTITY_%1").arg( id ) ); + Templates t( TQString("IDENTITY_%1").arg( id ) ); t.setTemplateNewMessage( strOrBlank( textEdit_new->text() ) ); t.setTemplateReply( strOrBlank( textEdit_reply->text() ) ); @@ -225,16 +225,16 @@ void TemplatesConfiguration::saveToIdentity( uint id ) t.writeConfig(); } -void TemplatesConfiguration::loadFromFolder( QString id, uint identity ) +void TemplatesConfiguration::loadFromFolder( TQString id, uint identity ) { Templates t( id ); Templates* tid = 0; if ( identity ) { - tid = new Templates( QString("IDENTITY_%1").arg( identity ) ); + tid = new Templates( TQString("IDENTITY_%1").arg( identity ) ); } - QString str; + TQString str; str = t.templateNewMessage(); if ( str.isEmpty() && tid ) { @@ -299,7 +299,7 @@ void TemplatesConfiguration::loadFromFolder( QString id, uint identity ) delete(tid); } -void TemplatesConfiguration::saveToFolder( QString id ) +void TemplatesConfiguration::saveToFolder( TQString id ) { Templates t( id ); @@ -315,11 +315,11 @@ void TemplatesConfiguration::loadFromPhrases() { int currentNr = GlobalSettings::self()->replyCurrentLanguage(); - ReplyPhrases replyPhrases( QString::number( currentNr ) ); + ReplyPhrases replyPhrases( TQString::number( currentNr ) ); textEdit_new->setText( defaultNewMessage() ); - QString str; + TQString str; str = replyPhrases.phraseReplySender(); if ( !str.isEmpty() ) { @@ -339,7 +339,7 @@ void TemplatesConfiguration::loadFromPhrases() str = replyPhrases.phraseForward(); if ( !str.isEmpty() ) { - textEdit_forward->setText( QString( i18n( + textEdit_forward->setText( TQString( i18n( "%REM=\"Default forward template\"%-\n" "---------- %1 ----------\n" "%TEXT\n" @@ -366,9 +366,9 @@ void TemplatesConfiguration::importFromPhrases() int currentNr = GlobalSettings::self()->replyCurrentLanguage(); - ReplyPhrases replyPhrases( QString::number( currentNr ) ); + ReplyPhrases replyPhrases( TQString::number( currentNr ) ); - QString str; + TQString str; str = replyPhrases.phraseReplySender(); if ( !str.isEmpty() ) { @@ -388,7 +388,7 @@ void TemplatesConfiguration::importFromPhrases() str = replyPhrases.phraseForward(); if ( !str.isEmpty() ) { - GlobalSettings::self()->setTemplateForward( QString( i18n( + GlobalSettings::self()->setTemplateForward( TQString( i18n( "%REM=\"Default forward template\"%-\n" "\n" "---------- %1 ----------\n" @@ -419,10 +419,10 @@ void TemplatesConfiguration::importFromPhrases() GlobalSettings::self()->writeConfig(); } -QString TemplatesConfiguration::convertPhrases( QString &str ) +TQString TemplatesConfiguration::convertPhrases( TQString &str ) { - QString result; - QChar ch; + TQString result; + TQChar ch; unsigned int strLength( str.length() ); for ( uint i = 0; i < strLength; ) { @@ -478,9 +478,9 @@ QString TemplatesConfiguration::convertPhrases( QString &str ) return result; } -void TemplatesConfiguration::slotInsertCommand( QString cmd, int adjustCursor ) +void TemplatesConfiguration::slotInsertCommand( TQString cmd, int adjustCursor ) { - QTextEdit* edit; + TQTextEdit* edit; if( toolBox1->currentItem() == page_new ) { edit = textEdit_new; @@ -506,14 +506,14 @@ void TemplatesConfiguration::slotInsertCommand( QString cmd, int adjustCursor ) edit->setCursorPosition( para, index + cmd.length() ); } -QString TemplatesConfiguration::defaultNewMessage() { +TQString TemplatesConfiguration::defaultNewMessage() { return i18n( "%REM=\"Default new message template\"%-\n" "%BLANK" ); } -QString TemplatesConfiguration::defaultReply() { +TQString TemplatesConfiguration::defaultReply() { return i18n( "%REM=\"Default reply template\"%-\n" "On %ODATEEN %OTIMELONGEN you wrote:\n" @@ -522,7 +522,7 @@ QString TemplatesConfiguration::defaultReply() { ); } -QString TemplatesConfiguration::defaultReplyAll() { +TQString TemplatesConfiguration::defaultReplyAll() { return i18n( "%REM=\"Default reply all template\"%-\n" "On %ODATEEN %OTIMELONGEN %OFROMNAME wrote:\n" @@ -531,7 +531,7 @@ QString TemplatesConfiguration::defaultReplyAll() { ); } -QString TemplatesConfiguration::defaultForward() { +TQString TemplatesConfiguration::defaultForward() { return i18n( "%REM=\"Default forward template\"%-\n" "\n" @@ -547,13 +547,13 @@ QString TemplatesConfiguration::defaultForward() { ); } -QString TemplatesConfiguration::defaultQuoteString() { +TQString TemplatesConfiguration::defaultQuoteString() { return "> "; } -QString TemplatesConfiguration::strOrBlank( QString str ) { +TQString TemplatesConfiguration::strOrBlank( TQString str ) { if ( str.stripWhiteSpace().isEmpty() ) { - return QString( "%BLANK" ); + return TQString( "%BLANK" ); } return str; } diff --git a/kmail/templatesconfiguration.h b/kmail/templatesconfiguration.h index cb2480052..b1479af31 100644 --- a/kmail/templatesconfiguration.h +++ b/kmail/templatesconfiguration.h @@ -32,14 +32,14 @@ class TemplatesConfiguration : public TemplatesConfigurationBase public: - TemplatesConfiguration( QWidget *parent = 0, const char *name = 0 ); + TemplatesConfiguration( TQWidget *parent = 0, const char *name = 0 ); void loadFromGlobal(); void saveToGlobal(); void loadFromIdentity( uint id ); void saveToIdentity( uint id ); - void loadFromFolder( QString id, uint identity = 0 ); - void saveToFolder( QString id ); + void loadFromFolder( TQString id, uint identity = 0 ); + void saveToFolder( TQString id ); /** Do import settings from 'Phrases' configuration. */ void loadFromPhrases(); @@ -48,17 +48,17 @@ class TemplatesConfiguration : public TemplatesConfigurationBase static void importFromPhrases(); /** Convert 'Phrases'-like placeholders into 'Templates' compatible. */ - static QString convertPhrases( QString &str ); + static TQString convertPhrases( TQString &str ); - static QString defaultNewMessage(); - static QString defaultReply(); - static QString defaultReplyAll(); - static QString defaultForward(); - static QString defaultQuoteString(); + static TQString defaultNewMessage(); + static TQString defaultReply(); + static TQString defaultReplyAll(); + static TQString defaultForward(); + static TQString defaultQuoteString(); public slots: - void slotInsertCommand( QString cmd, int adjustCursor = 0 ); + void slotInsertCommand( TQString cmd, int adjustCursor = 0 ); void slotTextChanged(); @@ -68,7 +68,7 @@ class TemplatesConfiguration : public TemplatesConfigurationBase protected: - QString strOrBlank( QString str ); + TQString strOrBlank( TQString str ); }; diff --git a/kmail/templatesinsertcommand.cpp b/kmail/templatesinsertcommand.cpp index f74820352..ee07c375b 100644 --- a/kmail/templatesinsertcommand.cpp +++ b/kmail/templatesinsertcommand.cpp @@ -20,30 +20,30 @@ #include <config.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kaction.h> #include <kactionclasses.h> #include <kpopupmenu.h> #include <klocale.h> -#include <qsignalmapper.h> +#include <tqsignalmapper.h> #include <kdebug.h> #include "templatesinsertcommand.h" -TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, +TemplatesInsertCommand::TemplatesInsertCommand( TQWidget *parent, const char *name ) - : QPushButton( parent, name ) + : TQPushButton( parent, name ) { setText( i18n( "&Insert Command..." ) ); - connect( this, SIGNAL( clicked() ), - this, SLOT( slotClicked() ) ); + connect( this, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotClicked() ) ); KAction *action; KActionMenu *menu; - QSignalMapper *mapper = new QSignalMapper( this ); - connect( mapper, SIGNAL( mapped(int) ), - this, SLOT( slotMapped(int) ) ); + TQSignalMapper *mapper = new TQSignalMapper( this ); + connect( mapper, TQT_SIGNAL( mapped(int) ), + this, TQT_SLOT( slotMapped(int) ) ); mMenu = new KActionMenu( i18n( "Insert Command..." ), this ); @@ -52,107 +52,107 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, mMenu->insert( menu ); action = new KAction( i18n("Quoted Message"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CQuote ); menu->insert( action ); action = new KAction( i18n("Message Text as Is"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CText ); menu->insert( action ); action = new KAction( i18n("Message Id"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COMsgId ); menu->insert( action ); action = new KAction( i18n("Date"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CODate ); menu->insert( action ); action = new KAction( i18n("Date in Short Format"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CODateShort ); menu->insert( action ); action = new KAction( i18n("Date in C Locale"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CODateEn ); menu->insert( action ); action = new KAction( i18n("Day of Week"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CODow ); menu->insert( action ); action = new KAction( i18n("Time"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COTime ); menu->insert( action ); action = new KAction( i18n("Time in Long Format"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COTimeLong ); menu->insert( action ); action = new KAction( i18n("Time in C Locale"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COTimeLongEn ); menu->insert( action ); action = new KAction( i18n("To Field Address"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COToAddr ); menu->insert( action ); action = new KAction( i18n("To Field Name"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COToName ); menu->insert( action ); action = new KAction( i18n("To Field First Name"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COToFName ); menu->insert( action ); action = new KAction( i18n("To Field Last Name"), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COToLName ); menu->insert( action ); action = new KAction( i18n( "CC Field Address" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COCCAddr ); menu->insert( action ); action = new KAction( i18n( "CC Field Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COCCName ); menu->insert( action ); action = new KAction( i18n( "CC Field First Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COCCFName ); menu->insert( action ); action = new KAction( i18n( "CC Field Last Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COCCLName ); menu->insert( action ); action = new KAction( i18n( "From Field Address" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COFromAddr ); menu->insert( action ); action = new KAction( i18n( "From Field Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COFromName ); menu->insert( action ); action = new KAction( i18n( "From Field First Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COFromFName ); menu->insert( action ); action = new KAction( i18n( "From Field Last Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COFromLName ); menu->insert( action ); action = new KAction( i18n( "Subject" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COFullSubject ); menu->insert( action ); action = new KAction( i18n( "Quoted Headers" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CQHeaders ); menu->insert( action ); action = new KAction( i18n( "Headers as Is" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CHeaders ); menu->insert( action ); action = new KAction( i18n( "Header Content" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, COHeader ); menu->insert( action ); @@ -161,91 +161,91 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, mMenu->insert( menu ); action = new KAction( i18n( "Message Id" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CMsgId ); menu->insert( action ); action = new KAction( i18n( "Date" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CDate ); menu->insert( action ); action = new KAction( i18n( "Date in Short Format" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CDateShort ); menu->insert( action ); action = new KAction( i18n( "Date in C Locale" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CDateEn ); menu->insert( action ); action = new KAction( i18n( "Day of Week" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CDow ); menu->insert( action ); action = new KAction( i18n( "Time" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CTime ); menu->insert( action ); action = new KAction( i18n( "Time in Long Format" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CTimeLong ); menu->insert( action ); action = new KAction( i18n( "Time in C Locale" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CTimeLongEn ); menu->insert( action ); action = new KAction( i18n( "To Field Address" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CToAddr ); menu->insert( action ); action = new KAction( i18n( "To Field Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CToName ); menu->insert( action ); action = new KAction( i18n( "To Field First Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CToFName ); menu->insert( action ); action = new KAction( i18n( "To Field Last Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CToLName ); menu->insert( action ); action = new KAction( i18n( "CC Field Address" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CCCAddr ); menu->insert( action ); action = new KAction( i18n( "CC Field Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CCCName ); menu->insert( action ); action = new KAction( i18n( "CC Field First Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CCCFName ); menu->insert( action ); action = new KAction( i18n( "CC Field Last Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CCCLName ); menu->insert( action ); action = new KAction( i18n( "From Field Address" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CFromAddr ); menu->insert( action ); action = new KAction( i18n( "From Field Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CFromName ); menu->insert( action ); action = new KAction( i18n( "From Field First Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CFromFName ); menu->insert( action ); action = new KAction( i18n( "From Field Last Name" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CFromLName ); menu->insert( action ); action = new KAction( i18n( "Subject" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CFullSubject ); menu->insert( action ); action = new KAction( i18n( "Header Content" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CHeader ); menu->insert( action ); @@ -254,27 +254,27 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, mMenu->insert( menu ); action = new KAction( i18n( "Insert Result of Command" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CSystem ); menu->insert( action ); action = new KAction( i18n( "Pipe Original Message Body and Insert Result as Quoted Text" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CQuotePipe ); menu->insert( action ); action = new KAction( i18n( "Pipe Original Message Body and Insert Result as Is" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CTextPipe ); menu->insert( action ); action = new KAction( i18n( "Pipe Original Message with Headers and Insert Result as Is" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CMsgPipe ); menu->insert( action ); action = new KAction( i18n( "Pipe Current Message Body and Insert Result as Is" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CBodyPipe ); menu->insert( action ); action = new KAction( i18n( "Pipe Current Message Body and Replace with Result" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CClearPipe ); menu->insert( action ); @@ -283,35 +283,35 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, mMenu->insert( menu ); action = new KAction( i18n( "Set Cursor Position" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CCursor ); menu->insert( action ); action = new KAction( i18n( "Insert File Content" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CInsert ); menu->insert( action ); action = new KAction( i18n( "DNL" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CDnl ); menu->insert( action ); action = new KAction( i18n( "Template Comment" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CRem ); menu->insert( action ); action = new KAction( i18n( "No Operation" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CNop ); menu->insert( action ); action = new KAction( i18n( "Clear Generated Message" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CClear ); menu->insert( action ); action = new KAction( i18n( "Turn Debug On" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CDebug ); menu->insert( action ); action = new KAction( i18n( "Turn Debug Off" ), - 0, mapper, SLOT( map() ), menu ); + 0, mapper, TQT_SLOT( map() ), menu ); mapper->setMapping( action, CDebugOff ); menu->insert( action ); } @@ -322,8 +322,8 @@ TemplatesInsertCommand::~TemplatesInsertCommand() void TemplatesInsertCommand::slotClicked() { - QSize ps = mMenu->popupMenu()->sizeHint(); - mMenu->popup( mapToGlobal( QPoint( 0, -(ps.height()) ) ) ); + TQSize ps = mMenu->popupMenu()->sizeHint(); + mMenu->popup( mapToGlobal( TQPoint( 0, -(ps.height()) ) ) ); } void TemplatesInsertCommand::slotMapped( int cmd ) diff --git a/kmail/templatesinsertcommand.h b/kmail/templatesinsertcommand.h index f6d54cc1c..4a94a979b 100644 --- a/kmail/templatesinsertcommand.h +++ b/kmail/templatesinsertcommand.h @@ -23,7 +23,7 @@ #ifndef TEMPLATESINSERTCOMMAND_H #define TEMPLATESINSERTCOMMAND_H -#include <qpushbutton.h> +#include <tqpushbutton.h> class KActionMenu; @@ -32,7 +32,7 @@ class TemplatesInsertCommand : public QPushButton Q_OBJECT public: - TemplatesInsertCommand( QWidget *parent, const char *name = 0 ); + TemplatesInsertCommand( TQWidget *parent, const char *name = 0 ); ~TemplatesInsertCommand(); public: @@ -48,7 +48,7 @@ class TemplatesInsertCommand : public QPushButton signals: void insertCommand( TemplatesInsertCommand::Command cmd ); - void insertCommand( QString cmd, int adjustCursor = 0 ); + void insertCommand( TQString cmd, int adjustCursor = 0 ); public slots: void slotClicked(); diff --git a/kmail/tests/messagedicttests.cpp b/kmail/tests/messagedicttests.cpp index 063fc1cb4..cdb24f6d8 100644 --- a/kmail/tests/messagedicttests.cpp +++ b/kmail/tests/messagedicttests.cpp @@ -11,7 +11,7 @@ #include "messagedicttests.h" -static void p( const QString & str ) +static void p( const TQString & str ) { kdDebug() << str << endl; } diff --git a/kmail/tests/mimelibtests.cpp b/kmail/tests/mimelibtests.cpp index 8d9cf9e78..b152fdcf6 100644 --- a/kmail/tests/mimelibtests.cpp +++ b/kmail/tests/mimelibtests.cpp @@ -32,39 +32,39 @@ KUNITTEST_MODULE_REGISTER_TESTER( MimeLibTester ); #include <mimelib/string.h> #include <mimelib/message.h> #include "util.h" -#include <qfile.h> +#include <tqfile.h> #include <assert.h> #if 0 -static QString makePrintable( const QCString& str ) +static TQString makePrintable( const TQCString& str ) { - QString a = str; + TQString a = str; a = a.replace( '\r', "\\r" ); a = a.replace( '\n', "\\n" ); return a; } #endif -static QString makePrintable( const DwString& str ) +static TQString makePrintable( const DwString& str ) { - QString a = KMail::Util::CString( str ); // ## we assume latin1 + TQString a = KMail::Util::CString( str ); // ## we assume latin1 a = a.replace( '\r', "\\r" ); a = a.replace( '\n', "\\n" ); return a; } -QCString MimeLibTester::readFile(const QString& fileName) +TQCString MimeLibTester::readFile(const TQString& fileName) { - QFile file( fileName ); + TQFile file( fileName ); // #!@#$& kunittest... VERIFY() does nothing in setUp. Using assert instead. bool ok = file.open( IO_ReadOnly ); if ( !ok ) { kdError() << fileName << " not found!" << endl; abort(); } - QByteArray data = file.readAll(); + TQByteArray data = file.readAll(); assert( data.size() > 1 ); - QCString result; + TQCString result; KMail::Util::setFromByteArray( result, data ); return result; } diff --git a/kmail/tests/mimelibtests.h b/kmail/tests/mimelibtests.h index 3c0dad71c..e12bc15f6 100644 --- a/kmail/tests/mimelibtests.h +++ b/kmail/tests/mimelibtests.h @@ -33,11 +33,11 @@ public slots: void test_dwMessage_AsString(); private: - QCString readFile(const QString& fileName); + TQCString readFile(const TQString& fileName); bool test_dwMessage_AsString( const DwString& ); - QCString mMultipartMixedMail; - QCString mSignedMail; + TQCString mMultipartMixedMail; + TQCString mSignedMail; }; #endif /* MIMELIBTEST_H */ diff --git a/kmail/tests/utiltests.cpp b/kmail/tests/utiltests.cpp index 6f09416ff..22c141669 100644 --- a/kmail/tests/utiltests.cpp +++ b/kmail/tests/utiltests.cpp @@ -27,46 +27,46 @@ void UtilTester::tearDown() kdDebug() << "tearDown" << endl; } -static QString makePrintable( const QCString& str ) +static TQString makePrintable( const TQCString& str ) { - QString a = str; + TQString a = str; a = a.replace( '\r', "\\r" ); a = a.replace( '\n', "\\n" ); return a; } -static QString makePrintable( const QByteArray& arr ) +static TQString makePrintable( const TQByteArray& arr ) { - QCString str; + TQCString str; KMail::Util::setFromByteArray( str, arr ); return makePrintable( str ); } void UtilTester::test_lf2crlf() { - QCString src = "\nfoo\r\n\nbar\rblah\n\r\r\n\n\r"; - QCString conv = KMail::Util::lf2crlf( src ); + TQCString src = "\nfoo\r\n\nbar\rblah\n\r\r\n\n\r"; + TQCString conv = KMail::Util::lf2crlf( src ); COMPARE( makePrintable( conv ), makePrintable("\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r") ); - COMPARE( KMail::Util::lf2crlf( QCString("") ), QCString("") ); + COMPARE( KMail::Util::lf2crlf( TQCString("") ), TQCString("") ); - // QByteArray version - QByteArray arr; KMail::Util::setFromQCString( arr, src ); + // TQByteArray version + TQByteArray arr; KMail::Util::setFromQCString( arr, src ); COMPARE( arr[arr.size()-1], '\r' ); - QByteArray arrConv = KMail::Util::lf2crlf( arr ); + TQByteArray arrConv = KMail::Util::lf2crlf( arr ); COMPARE( arrConv[arrConv.size()-1], '\r' ); COMPARE( makePrintable( arrConv ), makePrintable("\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r") ); - QByteArray empty; + TQByteArray empty; arrConv = KMail::Util::lf2crlf( empty ); - COMPARE( makePrintable( arrConv ), QString("") ); + COMPARE( makePrintable( arrConv ), TQString("") ); } void UtilTester::test_crlf2lf() { - QCString src = "\r\n\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r"; + TQCString src = "\r\n\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r"; int len = src.length(); COMPARE( src[len], '\0' ); int newLen = KMail::Util::crlf2lf( src.data(), len ); VERIFY( newLen <= len ); - QCString cstr( src.data(), newLen + 1 ); + TQCString cstr( src.data(), newLen + 1 ); COMPARE( makePrintable( cstr ), makePrintable("\n\nfoo\n\nbar\rblah\n\r\n\n\r") ); } @@ -78,40 +78,40 @@ void UtilTester::test_escapeFrom() void UtilTester::test_append() { - QCString test; - QCString str = "foo"; + TQCString test; + TQCString str = "foo"; COMPARE( (int)str.size(), 4 ); // trailing nul included - QByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str ); + TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str ); COMPARE( (int)s1.size(), 3 ); COMPARE( (int)str.size(), 3 ); // trailing nul got removed COMPARE( s1.data(), str.data() ); // yes, no detach COMPARE( s1[2], 'o' ); - QCString bar( "bar" ); - QByteArray s2 = KMail::Util::byteArrayFromQCStringNoDetach( bar ); + TQCString bar( "bar" ); + TQByteArray s2 = KMail::Util::byteArrayFromQCStringNoDetach( bar ); COMPARE( (int)s2.size(), 3 ); KMail::Util::append( s1, s2 ); COMPARE( (int)s1.size(), 6 ); KMail::Util::setFromByteArray( test, s1 ); - COMPARE( test, QCString( "foobar" ) ); + COMPARE( test, TQCString( "foobar" ) ); KMail::Util::append( s1, 0 ); // no-op COMPARE( (int)s1.size(), 6 ); KMail::Util::setFromByteArray( test, s1 ); - COMPARE( test, QCString( "foobar" ) ); + COMPARE( test, TQCString( "foobar" ) ); KMail::Util::append( s1, "blah" ); COMPARE( (int)s1.size(), 10 ); KMail::Util::setFromByteArray( test, s1 ); - COMPARE( test, QCString( "foobarblah" ) ); + COMPARE( test, TQCString( "foobarblah" ) ); - KMail::Util::append( s1, QCString( " str" ) ); + KMail::Util::append( s1, TQCString( " str" ) ); COMPARE( (int)s1.size(), 14 ); KMail::Util::setFromByteArray( test, s1 ); - COMPARE( test, QCString( "foobarblah str" ) ); + COMPARE( test, TQCString( "foobarblah str" ) ); - QByteArray empty; + TQByteArray empty; KMail::Util::append( empty, "a" ); COMPARE( (int)empty.size(), 1 ); COMPARE( empty[0], 'a' ); @@ -119,48 +119,48 @@ void UtilTester::test_append() void UtilTester::test_insert() { - QCString test; - QCString str = "foo"; + TQCString test; + TQCString str = "foo"; COMPARE( (int)str.size(), 4 ); // trailing nul included - QByteArray s1; + TQByteArray s1; KMail::Util::setFromQCString( s1, str ); KMail::Util::insert( s1, 1, "bar" ); COMPARE( (int)s1.size(), 6 ); - COMPARE( makePrintable(s1), QString( "fbaroo" ) ); + COMPARE( makePrintable(s1), TQString( "fbaroo" ) ); KMail::Util::insert( s1, 6, "END" ); COMPARE( (int)s1.size(), 9 ); - COMPARE( makePrintable(s1), QString( "fbarooEND" ) ); + COMPARE( makePrintable(s1), TQString( "fbarooEND" ) ); KMail::Util::insert( s1, 0, "BEGIN" ); COMPARE( (int)s1.size(), 14 ); - COMPARE( makePrintable(s1), QString( "BEGINfbarooEND" ) ); + COMPARE( makePrintable(s1), TQString( "BEGINfbarooEND" ) ); } -void UtilTester::test_DwStringConversions( const QCString& cstr ) +void UtilTester::test_DwStringConversions( const TQCString& cstr ) { // QCString->DwString->QCString COMPARE( (int)cstr.size(), 8 ); DwString dwstr = KMail::Util::dwString( cstr ); COMPARE( (int)dwstr.size(), 7 ); COMPARE( dwstr[6], 'r' ); - QCString cstr2 = KMail::Util::CString( dwstr ); + TQCString cstr2 = KMail::Util::CString( dwstr ); COMPARE( (int)cstr2.size(), 8 ); COMPARE( cstr2, cstr ); COMPARE( cstr2[6], 'r' ); // And also QCString->QByteArray - QByteArray arr; + TQByteArray arr; KMail::Util::setFromQCString( arr, cstr ); COMPARE( (int)arr.size(), 7 ); COMPARE( arr[6], 'r' ); - KMail::Util::setFromQCString( arr, QCString() ); + KMail::Util::setFromQCString( arr, TQCString() ); COMPARE( (int)arr.size(), 0 ); // DwString->QByteArray - QByteArray ba = KMail::Util::ByteArray( dwstr ); + TQByteArray ba = KMail::Util::ByteArray( dwstr ); COMPARE( (int)ba.size(), 7 ); COMPARE( ba[6], 'r' ); @@ -170,27 +170,27 @@ void UtilTester::test_DwStringConversions( const QCString& cstr ) void UtilTester::test_DwStringConversions() { - QCString cstr = "foo&bar"; + TQCString cstr = "foo&bar"; test_DwStringConversions( cstr ); // now embed a nul. Note that cstr="foo\0bar" wouldn't work. cstr[3] = '\0'; test_DwStringConversions( cstr ); - cstr = QCString(); + cstr = TQCString(); DwString dwstr = KMail::Util::dwString( cstr ); COMPARE( (int)dwstr.size(), 0 ); VERIFY( dwstr.empty() ); - dwstr = KMail::Util::dwString( QByteArray() ); + dwstr = KMail::Util::dwString( TQByteArray() ); COMPARE( (int)dwstr.size(), 0 ); VERIFY( dwstr.empty() ); } void UtilTester::test_QByteArrayQCString() { - QCString str = "foobar"; + TQCString str = "foobar"; COMPARE( (int)str.size(), 7 ); // trailing nul included - QByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str ); + TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str ); COMPARE( (int)str.size(), 6 ); // trailing nul got removed COMPARE( s1.data(), str.data() ); // yes, no detach COMPARE( s1[5], 'r' ); diff --git a/kmail/tests/utiltests.h b/kmail/tests/utiltests.h index 58de40901..2270cbcfd 100644 --- a/kmail/tests/utiltests.h +++ b/kmail/tests/utiltests.h @@ -24,7 +24,7 @@ public slots: void test_DwStringConversions(); void test_QByteArrayQCString(); private: - void test_DwStringConversions( const QCString& cstr ); + void test_DwStringConversions( const TQCString& cstr ); }; #endif diff --git a/kmail/textsource.cpp b/kmail/textsource.cpp index fdb82f7e0..ab31dc422 100644 --- a/kmail/textsource.cpp +++ b/kmail/textsource.cpp @@ -44,8 +44,8 @@ KMTextSource::~KMTextSource() { } -QCString KMTextSource::text(Q_UINT32 serialNumber) const { - QCString rc; +TQCString KMTextSource::text(Q_UINT32 serialNumber) const { + TQCString rc; KMFolder *folder = 0; int idx; KMMsgDict::instance()->getLocation(serialNumber, &folder, &idx); diff --git a/kmail/textsource.h b/kmail/textsource.h index 499af4b75..8251a09cc 100644 --- a/kmail/textsource.h +++ b/kmail/textsource.h @@ -40,7 +40,7 @@ public: KMTextSource(); ~KMTextSource(); - QCString text(Q_UINT32 serialNumber) const; + TQCString text(Q_UINT32 serialNumber) const; }; #endif diff --git a/kmail/transportmanager.cpp b/kmail/transportmanager.cpp index 7b9b26eed..e80d1cb27 100644 --- a/kmail/transportmanager.cpp +++ b/kmail/transportmanager.cpp @@ -25,13 +25,13 @@ namespace KMail { - QStringList TransportManager::transportNames() + TQStringList TransportManager::transportNames() { KConfigGroup general( KMKernel::config(), "General"); int numTransports = general.readNumEntry("transports", 0); - QStringList transportNames; + TQStringList transportNames; for ( int i = 1 ; i <= numTransports ; i++ ) { KMTransportInfo ti; ti.readConfig(i); @@ -44,7 +44,7 @@ namespace KMail { // more or less copied from AccountManager uint TransportManager::createId() { - QValueList<unsigned int> usedIds; + TQValueList<unsigned int> usedIds; KConfigGroup general( KMKernel::config(), "General"); int numTransports = general.readNumEntry( "transports", 0 ); diff --git a/kmail/transportmanager.h b/kmail/transportmanager.h index 22ab02f88..0799bce58 100644 --- a/kmail/transportmanager.h +++ b/kmail/transportmanager.h @@ -31,7 +31,7 @@ namespace KMail { virtual ~TransportManager() {}; /** Returns the list for transport names */ - static QStringList transportNames(); + static TQStringList transportNames(); /** Create a unique id for a transport info item */ static unsigned int createId(); diff --git a/kmail/undostack.cpp b/kmail/undostack.cpp index f1729f3a7..c7e80e8f2 100644 --- a/kmail/undostack.cpp +++ b/kmail/undostack.cpp @@ -36,7 +36,7 @@ namespace KMail { UndoStack::UndoStack(int size) - : QObject(0, "undostack"), mSize(size), mLastId(0), + : TQObject(0, "undostack"), mSize(size), mLastId(0), mCachedInfo(0) { mStack.setAutoDelete(true); @@ -63,7 +63,7 @@ int UndoStack::newUndoAction( KMFolder *srcFolder, KMFolder *destFolder ) void UndoStack::addMsgToAction( int undoId, ulong serNum ) { if ( !mCachedInfo || mCachedInfo->id != undoId ) { - QPtrListIterator<UndoInfo> itr( mStack ); + TQPtrListIterator<UndoInfo> itr( mStack ); while ( itr.current() ) { if ( itr.current()->id == undoId ) { mCachedInfo = itr.current(); @@ -87,7 +87,7 @@ void UndoStack::undo() { UndoInfo *info = mStack.take(0); emit undoStackChanged(); - QValueList<ulong>::iterator itr; + TQValueList<ulong>::iterator itr; KMFolderOpener openDestFolder(info->destFolder, "undodest"); for( itr = info->serNums.begin(); itr != info->serNums.end(); ++itr ) { serNum = *itr; diff --git a/kmail/undostack.h b/kmail/undostack.h index 78c993fb7..11a3a9898 100644 --- a/kmail/undostack.h +++ b/kmail/undostack.h @@ -22,9 +22,9 @@ #ifndef UNDOSTACK_H #define UNDOSTACK_H -#include <qptrlist.h> -#include <qstring.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqobject.h> class KMFolder; class KMMsgBase; @@ -36,7 +36,7 @@ class UndoInfo { public: int id; - QValueList<ulong> serNums; + TQValueList<ulong> serNums; KMFolder *srcFolder; KMFolder *destFolder; }; @@ -58,7 +58,7 @@ public: void msgDestroyed( KMMsgBase *msg); void folderDestroyed( KMFolder *folder); protected: - QPtrList<UndoInfo> mStack; + TQPtrList<UndoInfo> mStack; int mSize; int mLastId; UndoInfo *mCachedInfo; diff --git a/kmail/urlhandlermanager.cpp b/kmail/urlhandlermanager.cpp index cf5b92d62..100009faa 100644 --- a/kmail/urlhandlermanager.cpp +++ b/kmail/urlhandlermanager.cpp @@ -62,10 +62,10 @@ namespace { ~KMailProtocolURLHandler() {} bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL & url, const QPoint &, KMReaderWin * ) const { + bool handleContextMenuRequest( const KURL & url, const TQPoint &, KMReaderWin * ) const { return url.protocol() == "kmail"; } - QString statusBarMessage( const KURL &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL &, KMReaderWin * ) const; }; class ExpandCollapseQuoteURLManager : public KMail::URLHandler { @@ -74,10 +74,10 @@ namespace { ~ExpandCollapseQuoteURLManager() {} bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const { + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const { return false; } - QString statusBarMessage( const KURL &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL &, KMReaderWin * ) const; }; @@ -87,10 +87,10 @@ namespace { ~SMimeURLHandler() {} bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const { + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const { return false; } - QString statusBarMessage( const KURL &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL &, KMReaderWin * ) const; }; class MailToURLHandler : public KMail::URLHandler { @@ -99,10 +99,10 @@ namespace { ~MailToURLHandler() {} bool handleClick( const KURL &, KMReaderWin * ) const { return false; } - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const { + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const { return false; } - QString statusBarMessage( const KURL &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL &, KMReaderWin * ) const; }; class HtmlAnchorHandler : public KMail::URLHandler { @@ -111,10 +111,10 @@ namespace { ~HtmlAnchorHandler() {} bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const { + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const { return false; } - QString statusBarMessage( const KURL &, KMReaderWin * ) const { return QString::null; } + TQString statusBarMessage( const KURL &, KMReaderWin * ) const { return TQString::null; } }; class AttachmentURLHandler : public KMail::URLHandler { @@ -123,8 +123,8 @@ namespace { ~AttachmentURLHandler() {} bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const; - QString statusBarMessage( const KURL &, KMReaderWin * ) const; + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL &, KMReaderWin * ) const; }; class ShowAuditLogURLHandler : public KMail::URLHandler { @@ -133,8 +133,8 @@ namespace { ~ShowAuditLogURLHandler() {} bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const; - QString statusBarMessage( const KURL &, KMReaderWin * ) const; + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL &, KMReaderWin * ) const; }; class FallBackURLHandler : public KMail::URLHandler { @@ -143,8 +143,8 @@ namespace { ~FallBackURLHandler() {} bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const; - QString statusBarMessage( const KURL & url, KMReaderWin * ) const { + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL & url, KMReaderWin * ) const { return url.prettyURL(); } }; @@ -164,14 +164,14 @@ public: ~BodyPartURLHandlerManager(); bool handleClick( const KURL &, KMReaderWin * ) const; - bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const; - QString statusBarMessage( const KURL &, KMReaderWin * ) const; + bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const; + TQString statusBarMessage( const KURL &, KMReaderWin * ) const; void registerHandler( const Interface::BodyPartURLHandler * handler ); void unregisterHandler( const Interface::BodyPartURLHandler * handler ); private: - typedef QValueVector<const Interface::BodyPartURLHandler*> BodyPartHandlerList; + typedef TQValueVector<const Interface::BodyPartURLHandler*> BodyPartHandlerList; BodyPartHandlerList mHandlers; }; @@ -192,12 +192,12 @@ void KMail::URLHandlerManager::BodyPartURLHandlerManager::unregisterHandler( con mHandlers.erase( remove( mHandlers.begin(), mHandlers.end(), handler ), mHandlers.end() ); } -static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QString * path ) { +static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, TQString * path ) { assert( path ); if ( !w || url.protocol() != "x-kmail" ) return 0; - const QString urlPath = url.path(); + const TQString urlPath = url.path(); // urlPath format is: /bodypart/<random number>/<part id>/<path> @@ -205,7 +205,7 @@ static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QStr if ( !urlPath.startsWith( "/bodypart/" ) ) return 0; - const QStringList urlParts = QStringList::split( '/', urlPath.mid( 10 ), true ); + const TQStringList urlParts = TQStringList::split( '/', urlPath.mid( 10 ), true ); if ( urlParts.size() != 3 ) return 0; bool ok = false; @@ -217,7 +217,7 @@ static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QStr } bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleClick( const KURL & url, KMReaderWin * w ) const { - QString path; + TQString path; partNode * node = partNodeFromXKMailUrl( url, w, &path ); if ( !node ) return false; @@ -231,8 +231,8 @@ bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleClick( const KUR return false; } -bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const { - QString path; +bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const { + TQString path; partNode * node = partNodeFromXKMailUrl( url, w, &path ); if ( !node ) return false; @@ -244,19 +244,19 @@ bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuReque return false; } -QString KMail::URLHandlerManager::BodyPartURLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const { - QString path; +TQString KMail::URLHandlerManager::BodyPartURLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const { + TQString path; partNode * node = partNodeFromXKMailUrl( url, w, &path ); if ( !node ) - return QString::null; + return TQString::null; KMail::PartNodeBodyPart part( *node, w->overrideCodec() ); for ( BodyPartHandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it ) { - const QString msg = (*it)->statusBarMessage( &part, path ); + const TQString msg = (*it)->statusBarMessage( &part, path ); if ( !msg.isEmpty() ) return msg; } - return QString::null; + return TQString::null; } // @@ -311,20 +311,20 @@ bool KMail::URLHandlerManager::handleClick( const KURL & url, KMReaderWin * w ) return false; } -bool KMail::URLHandlerManager::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const { +bool KMail::URLHandlerManager::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const { for ( HandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it ) if ( (*it)->handleContextMenuRequest( url, p, w ) ) return true; return false; } -QString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const { +TQString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const { for ( HandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it ) { - const QString msg = (*it)->statusBarMessage( url, w ); + const TQString msg = (*it)->statusBarMessage( url, w ); if ( !msg.isEmpty() ) return msg; } - return QString::null; + return TQString::null; } @@ -348,7 +348,7 @@ QString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWi #include <kmessagebox.h> #include <khtml_part.h> -#include <qstring.h> +#include <tqstring.h> namespace { bool KMailProtocolURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const { @@ -415,7 +415,7 @@ namespace { return false; } - QString KMailProtocolURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { + TQString KMailProtocolURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { if ( url.protocol() == "kmail" ) { if ( url.path() == "showHTML" ) @@ -431,7 +431,7 @@ namespace { if ( url.path() == "hideSignatureDetails" ) return i18n("Hide signature details."); } - return QString::null ; + return TQString::null ; } } @@ -444,7 +444,7 @@ namespace { // kmail:levelquote/?-num -> expand all levels quote. if ( url.protocol() == "kmail" && url.path()=="levelquote" ) { - QString levelStr= url.query().mid( 1,url.query().length() ); + TQString levelStr= url.query().mid( 1,url.query().length() ); bool isNumber; int levelQuote= levelStr.toInt(&isNumber); if ( isNumber ) @@ -453,32 +453,32 @@ namespace { } return false; } - QString ExpandCollapseQuoteURLManager::statusBarMessage( + TQString ExpandCollapseQuoteURLManager::statusBarMessage( const KURL & url, KMReaderWin * ) const { if ( url.protocol() == "kmail" && url.path() == "levelquote" ) { - QString query= url.query(); + TQString query= url.query(); if ( query.length()>=2 ) if ( query[ 1 ] =='-' ) return i18n("Expand all quoted text."); else return i18n("Collapse quoted text."); } - return QString::null ; + return TQString::null ; } } // defined in kmreaderwin.cpp... -extern bool foundSMIMEData( const QString aUrl, QString & displayName, - QString & libName, QString & keyId ); +extern bool foundSMIMEData( const TQString aUrl, TQString & displayName, + TQString & libName, TQString & keyId ); namespace { bool SMimeURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const { if ( !url.hasRef() ) return false; - QString displayName, libName, keyId; + TQString displayName, libName, keyId; if ( !foundSMIMEData( url.path() + '#' + url.ref(), displayName, libName, keyId ) ) return false; KProcess cmp; @@ -490,10 +490,10 @@ namespace { return true; } - QString SMimeURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { - QString displayName, libName, keyId; + TQString SMimeURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { + TQString displayName, libName, keyId; if ( !foundSMIMEData( url.path() + '#' + url.ref(), displayName, libName, keyId ) ) - return QString::null; + return TQString::null; return i18n("Show certificate 0x%1").arg( keyId ); } } @@ -503,15 +503,15 @@ namespace { if ( url.hasHost() || url.path() != "/" || !url.hasRef() ) return false; if ( w && !w->htmlPart()->gotoAnchor( url.ref() ) ) - static_cast<QScrollView*>( w->htmlPart()->widget() )->ensureVisible( 0, 0 ); + static_cast<TQScrollView*>( w->htmlPart()->widget() )->ensureVisible( 0, 0 ); return true; } } namespace { - QString MailToURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { + TQString MailToURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { if ( url.protocol() != "mailto" ) - return QString::null; + return TQString::null; return KMMessage::decodeMailtoUrl( url.url() ); } } @@ -527,7 +527,7 @@ namespace { return true; } - bool AttachmentURLHandler::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const { + bool AttachmentURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const { if ( !w || !w->message() ) return false; const int id = KMReaderWin::msgPartFromUrl( url ); @@ -537,14 +537,14 @@ namespace { return true; } - QString AttachmentURLHandler::statusBarMessage( const KURL & url, KMReaderWin * w ) const { + TQString AttachmentURLHandler::statusBarMessage( const KURL & url, KMReaderWin * w ) const { if ( !w || !w->message() ) - return QString::null; + return TQString::null; const partNode * node = w->partNodeFromUrl( url ); if ( !node ) - return QString::null; + return TQString::null; const KMMessagePart & msgPart = node->msgPart(); - QString name = msgPart.fileName(); + TQString name = msgPart.fileName(); if ( name.isEmpty() ) name = msgPart.name(); if ( !name.isEmpty() ) @@ -554,29 +554,29 @@ namespace { } namespace { - static QString extractAuditLog( const KURL & url ) { + static TQString extractAuditLog( const KURL & url ) { if ( url.protocol() != "kmail" || url.path() != "showAuditLog" ) - return QString(); + return TQString(); assert( !url.queryItem( "log" ).isEmpty() ); return url.queryItem( "log" ); } bool ShowAuditLogURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const { - const QString auditLog = extractAuditLog( url ); + const TQString auditLog = extractAuditLog( url ); if ( auditLog.isEmpty() ) return false; Kleo::MessageBox::auditLog( w, auditLog ); return true; } - bool ShowAuditLogURLHandler::handleContextMenuRequest( const KURL & url, const QPoint &, KMReaderWin * w ) const { + bool ShowAuditLogURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint &, KMReaderWin * w ) const { // disable RMB for my own links: return !extractAuditLog( url ).isEmpty(); } - QString ShowAuditLogURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { + TQString ShowAuditLogURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const { if ( extractAuditLog( url ).isEmpty() ) - return QString(); + return TQString(); else return i18n("Show GnuPG Audit Log for this operation"); } @@ -589,7 +589,7 @@ namespace { return true; } - bool FallBackURLHandler::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const { + bool FallBackURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const { if ( w ) w->emitPopupMenu( url, p ); return true; diff --git a/kmail/urlhandlermanager.h b/kmail/urlhandlermanager.h index dce3646e4..734dfcabc 100644 --- a/kmail/urlhandlermanager.h +++ b/kmail/urlhandlermanager.h @@ -32,7 +32,7 @@ #ifndef __KMAIL_URLHANDLERMANAGER_H__ #define __KMAIL_URLHANDLERMANAGER_H__ -#include <qvaluevector.h> +#include <tqvaluevector.h> class KURL; @@ -72,11 +72,11 @@ namespace KMail { void unregisterHandler( const Interface::BodyPartURLHandler * handler ); bool handleClick( const KURL & url, KMReaderWin * w=0 ) const; - bool handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w=0 ) const; - QString statusBarMessage( const KURL & url, KMReaderWin * w=0 ) const; + bool handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w=0 ) const; + TQString statusBarMessage( const KURL & url, KMReaderWin * w=0 ) const; private: - typedef QValueVector<const URLHandler*> HandlerList; + typedef TQValueVector<const URLHandler*> HandlerList; HandlerList mHandlers; class BodyPartURLHandlerManager; BodyPartURLHandlerManager * mBodyPartURLHandlerManager; diff --git a/kmail/util.cpp b/kmail/util.cpp index 1c45d4456..5d7173d2c 100644 --- a/kmail/util.cpp +++ b/kmail/util.cpp @@ -38,7 +38,7 @@ #include "util.h" #include <stdlib.h> -#include <qcstring.h> +#include <tqcstring.h> #include <mimelib/string.h> size_t KMail::Util::crlf2lf( char* str, const size_t strLen ) @@ -71,12 +71,12 @@ size_t KMail::Util::crlf2lf( char* str, const size_t strLen ) return target - str; } -QCString KMail::Util::lf2crlf( const QCString & src ) +TQCString KMail::Util::lf2crlf( const TQCString & src ) { - QCString result( 1 + 2*src.size() ); // maximal possible length + TQCString result( 1 + 2*src.size() ); // maximal possible length - QCString::ConstIterator s = src.begin(); - QCString::Iterator d = result.begin(); + TQCString::ConstIterator s = src.begin(); + TQCString::Iterator d = result.begin(); // we use cPrev to make sure we insert '\r' only there where it is missing char cPrev = '?'; while ( *s ) { @@ -89,14 +89,14 @@ QCString KMail::Util::lf2crlf( const QCString & src ) return result; } -QByteArray KMail::Util::lf2crlf( const QByteArray & src ) +TQByteArray KMail::Util::lf2crlf( const TQByteArray & src ) { const char* s = src.data(); if ( !s ) - return QByteArray(); + return TQByteArray(); - QByteArray result( 2 * src.size() ); // maximal possible length - QByteArray::Iterator d = result.begin(); + TQByteArray result( 2 * src.size() ); // maximal possible length + TQByteArray::Iterator d = result.begin(); // we use cPrev to make sure we insert '\r' only there where it is missing char cPrev = '?'; const char* end = src.end(); @@ -110,68 +110,68 @@ QByteArray KMail::Util::lf2crlf( const QByteArray & src ) return result; } -QCString KMail::Util::CString( const DwString& str ) +TQCString KMail::Util::CString( const DwString& str ) { const int strLen = str.size(); - QCString cstr( strLen + 1 ); + TQCString cstr( strLen + 1 ); memcpy( cstr.data(), str.data(), strLen ); cstr[ strLen ] = 0; return cstr; } -QByteArray KMail::Util::ByteArray( const DwString& str ) +TQByteArray KMail::Util::ByteArray( const DwString& str ) { const int strLen = str.size(); - QByteArray arr( strLen ); + TQByteArray arr( strLen ); memcpy( arr.data(), str.data(), strLen ); return arr; } -DwString KMail::Util::dwString( const QCString& str ) +DwString KMail::Util::dwString( const TQCString& str ) { if ( !str.data() ) // DwString doesn't like char*=0 return DwString(); return DwString( str.data(), str.size() - 1 ); } -DwString KMail::Util::dwString( const QByteArray& str ) +DwString KMail::Util::dwString( const TQByteArray& str ) { if ( !str.data() ) // DwString doesn't like char*=0 return DwString(); return DwString( str.data(), str.size() ); } -void KMail::Util::append( QByteArray& that, const QByteArray& str ) +void KMail::Util::append( TQByteArray& that, const TQByteArray& str ) { that.detach(); uint len1 = that.size(); uint len2 = str.size(); - if ( that.resize( len1 + len2, QByteArray::SpeedOptim ) ) + if ( that.resize( len1 + len2, TQByteArray::SpeedOptim ) ) memcpy( that.data() + len1, str.data(), len2 ); } -void KMail::Util::append( QByteArray& that, const char* str ) +void KMail::Util::append( TQByteArray& that, const char* str ) { if ( !str ) return; // nothing to append that.detach(); uint len1 = that.size(); uint len2 = qstrlen(str); - if ( that.resize( len1 + len2, QByteArray::SpeedOptim ) ) + if ( that.resize( len1 + len2, TQByteArray::SpeedOptim ) ) memcpy( that.data() + len1, str, len2 ); } -void KMail::Util::append( QByteArray& that, const QCString& str ) +void KMail::Util::append( TQByteArray& that, const TQCString& str ) { that.detach(); uint len1 = that.size(); uint len2 = str.size() - 1; - if ( that.resize( len1 + len2, QByteArray::SpeedOptim ) ) + if ( that.resize( len1 + len2, TQByteArray::SpeedOptim ) ) memcpy( that.data() + len1, str.data(), len2 ); } -// Code taken from QCString::insert, but trailing nul removed -void KMail::Util::insert( QByteArray& that, uint index, const char* s ) +// Code taken from TQCString::insert, but trailing nul removed +void KMail::Util::insert( TQByteArray& that, uint index, const char* s ) { int len = qstrlen(s); if ( len == 0 ) @@ -180,13 +180,13 @@ void KMail::Util::insert( QByteArray& that, uint index, const char* s ) int nlen = olen + len; if ( index >= olen ) { // insert after end of string that.detach(); - if ( that.resize(nlen+index-olen, QByteArray::SpeedOptim ) ) { + if ( that.resize(nlen+index-olen, TQByteArray::SpeedOptim ) ) { memset( that.data()+olen, ' ', index-olen ); memcpy( that.data()+index, s, len ); } } else { that.detach(); - if ( that.resize(nlen, QByteArray::SpeedOptim ) ) { // normal insert + if ( that.resize(nlen, TQByteArray::SpeedOptim ) ) { // normal insert memmove( that.data()+index+len, that.data()+index, olen-index ); memcpy( that.data()+index, s, len ); } diff --git a/kmail/util.h b/kmail/util.h index 05eb9084b..e961bb526 100644 --- a/kmail/util.h +++ b/kmail/util.h @@ -40,8 +40,8 @@ #include <stdlib.h> -#include <qobject.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqcstring.h> #include <kio/netaccess.h> #include <kmessagebox.h> @@ -74,40 +74,40 @@ namespace Util { * @param src The source string to convert. * @return The result string. */ - QCString lf2crlf( const QCString & src ); + TQCString lf2crlf( const TQCString & src ); /** * Convert "\n" line endings to "\r\n". * @param src The source string to convert. NOT null-terminated. * @return The result string. NOT null-terminated. */ - QByteArray lf2crlf( const QByteArray & src ); + TQByteArray lf2crlf( const TQByteArray & src ); /** - * Construct a QCString from a DwString + * Construct a TQCString from a DwString */ - QCString CString( const DwString& str ); + TQCString CString( const DwString& str ); /** - * Construct a QByteArray from a DwString + * Construct a TQByteArray from a DwString */ - QByteArray ByteArray( const DwString& str ); + TQByteArray ByteArray( const DwString& str ); /** * Construct a DwString from a QCString */ - DwString dwString( const QCString& str ); + DwString dwString( const TQCString& str ); /** * Construct a DwString from a QByteArray */ - DwString dwString( const QByteArray& str ); + DwString dwString( const TQByteArray& str ); /** - * Fills a QByteArray from a QCString - removing the trailing null. + * Fills a TQByteArray from a TQCString - removing the trailing null. */ - void setFromQCString( QByteArray& arr, const QCString& cstr ); + void setFromQCString( TQByteArray& arr, const TQCString& cstr ); - inline void setFromQCString( QByteArray& arr, const QCString& cstr ) + inline void setFromQCString( TQByteArray& arr, const TQCString& cstr ) { if ( cstr.size() ) arr.duplicate( cstr.data(), cstr.size()-1 ); @@ -116,35 +116,35 @@ namespace Util { } /** - * Creates a QByteArray from a QCString without detaching (duplicating the data). - * Fast, but be careful, the QCString gets modified by this; this is only good for - * the case where the QCString is going to be thrown away afterwards anyway. + * Creates a TQByteArray from a TQCString without detaching (duplicating the data). + * Fast, but be careful, the TQCString gets modified by this; this is only good for + * the case where the TQCString is going to be thrown away afterwards anyway. */ - QByteArray byteArrayFromQCStringNoDetach( QCString& cstr ); - inline QByteArray byteArrayFromQCStringNoDetach( QCString& cstr ) + TQByteArray byteArrayFromQCStringNoDetach( TQCString& cstr ); + inline TQByteArray byteArrayFromQCStringNoDetach( TQCString& cstr ) { - QByteArray arr = cstr; + TQByteArray arr = cstr; if ( arr.size() ) arr.resize( arr.size() - 1 ); return arr; } /** - * Restore the QCString after byteArrayFromQCStringNoDetach modified it + * Restore the TQCString after byteArrayFromQCStringNoDetach modified it */ - void restoreQCString( QCString& str ); - inline void restoreQCString( QCString& str ) + void restoreQCString( TQCString& str ); + inline void restoreQCString( TQCString& str ) { if ( str.data() ) str.resize( str.size() + 1 ); } /** - * Fills a QCString from a QByteArray - adding the trailing null. + * Fills a TQCString from a TQByteArray - adding the trailing null. */ - void setFromByteArray( QCString& cstr, const QByteArray& arr ); + void setFromByteArray( TQCString& cstr, const TQByteArray& arr ); - inline void setFromByteArray( QCString& result, const QByteArray& arr ) + inline void setFromByteArray( TQCString& result, const TQByteArray& arr ) { const int len = arr.size(); result.resize( len + 1 /* trailing NUL */ ); @@ -155,19 +155,19 @@ namespace Util { /** * Append a bytearray to a bytearray. No trailing nuls anywhere. */ - void append( QByteArray& that, const QByteArray& str ); + void append( TQByteArray& that, const TQByteArray& str ); /** * Append a char* to a bytearray. Trailing nul not copied. */ - void append( QByteArray& that, const char* str ); + void append( TQByteArray& that, const char* str ); /** - * Append a QCString to a bytearray. Trailing nul not copied. + * Append a TQCString to a bytearray. Trailing nul not copied. */ - void append( QByteArray& that, const QCString& str ); + void append( TQByteArray& that, const TQCString& str ); - void insert( QByteArray& that, uint index, const char* s ); + void insert( TQByteArray& that, uint index, const char* s ); /** * A LaterDeleter is intended to be used with the RAII ( Resource @@ -179,7 +179,7 @@ namespace Util { class LaterDeleter { public: - LaterDeleter( QObject *o) + LaterDeleter( TQObject *o) :m_object( o ), m_disabled( false ) { } @@ -194,12 +194,12 @@ namespace Util { m_disabled = v; } protected: - QObject *m_object; + TQObject *m_object; bool m_disabled; }; // return true if we should proceed, false if we should abort - inline bool checkOverwrite( const KURL& url, QWidget* w ) + inline bool checkOverwrite( const KURL& url, TQWidget* w ) { if ( KIO::NetAccess::exists( url, false /*dest*/, w ) ) { if ( KMessageBox::Cancel == diff --git a/kmail/vacation.cpp b/kmail/vacation.cpp index af0c5e16b..d0cdedf85 100644 --- a/kmail/vacation.cpp +++ b/kmail/vacation.cpp @@ -43,7 +43,7 @@ using KMime::Types::AddrSpecList; #include <kmessagebox.h> #include <kdebug.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <cassert> #include <vector> @@ -86,24 +86,24 @@ namespace KSieveExt { #undef FOREACH #endif #define FOREACH for ( std::vector<KSieve::ScriptBuilder*>::const_iterator it = mBuilders.begin(), end = mBuilders.end() ; it != end ; ++it ) (*it)-> - void commandStart( const QString & identifier ) { FOREACH commandStart( identifier ); } + void commandStart( const TQString & identifier ) { FOREACH commandStart( identifier ); } void commandEnd() { FOREACH commandEnd(); } - void testStart( const QString & identifier ) { FOREACH testStart( identifier ); } + void testStart( const TQString & identifier ) { FOREACH testStart( identifier ); } void testEnd() { FOREACH testEnd(); } void testListStart() { FOREACH testListStart(); } void testListEnd() { FOREACH testListEnd(); } void blockStart() { FOREACH blockStart(); } void blockEnd() { FOREACH blockEnd(); } - void hashComment( const QString & comment ) { FOREACH hashComment( comment ); } - void bracketComment( const QString & comment ) { FOREACH bracketComment( comment ); } + void hashComment( const TQString & comment ) { FOREACH hashComment( comment ); } + void bracketComment( const TQString & comment ) { FOREACH bracketComment( comment ); } void lineFeed() { FOREACH lineFeed(); } void error( const KSieve::Error & e ) { FOREACH error( e ); } void finished() { FOREACH finished(); } - void taggedArgument( const QString & tag ) { FOREACH taggedArgument( tag ); } - void stringArgument( const QString & string, bool multiline, const QString & fixme ) { FOREACH stringArgument( string, multiline, fixme ); } + void taggedArgument( const TQString & tag ) { FOREACH taggedArgument( tag ); } + void stringArgument( const TQString & string, bool multiline, const TQString & fixme ) { FOREACH stringArgument( string, multiline, fixme ); } void numberArgument( unsigned long number, char quantifier ) { FOREACH numberArgument( number, quantifier ); } void stringListArgumentStart() { FOREACH stringListArgumentStart(); } - void stringListEntry( const QString & string, bool multiline, const QString & fixme) { FOREACH stringListEntry( string, multiline, fixme ); } + void stringListEntry( const TQString & string, bool multiline, const TQString & fixme) { FOREACH stringListEntry( string, multiline, fixme ); } void stringListArgumentEnd() { FOREACH stringListArgumentEnd(); } #undef FOREACH }; @@ -144,7 +144,7 @@ namespace { }; const std::vector<StateNode> mNodes; - std::map<QString,QString> mResults; + std::map<TQString,TQString> mResults; std::set<unsigned int> mRecursionGuard; unsigned int mState; int mNestingDepth; @@ -153,14 +153,14 @@ namespace { GenericInformationExtractor( const std::vector<StateNode> & nodes ) : KSieve::ScriptBuilder(), mNodes( nodes ), mState( 0 ), mNestingDepth( 0 ) {} - const std::map<QString,QString> & results() const { return mResults; } + const std::map<TQString,TQString> & results() const { return mResults; } private: - void process( BuilderMethod method, const QString & string=QString::null ) { + void process( BuilderMethod method, const TQString & string=TQString::null ) { doProcess( method, string ); mRecursionGuard.clear(); } - void doProcess( BuilderMethod method, const QString & string ) { + void doProcess( BuilderMethod method, const TQString & string ) { mRecursionGuard.insert( mState ); bool found = true; const StateNode & expected = mNodes[mState]; @@ -169,7 +169,7 @@ namespace { if ( expected.method != Any && method != expected.method ) found = false; if ( const char * str = expected.string ) - if ( string.lower() != QString::fromUtf8( str ).lower() ) + if ( string.lower() != TQString::fromUtf8( str ).lower() ) found = false; kdDebug(5006) << ( found ? "found: " : "not found: " ) << mState << " -> " @@ -183,16 +183,16 @@ namespace { doProcess( method, string ); } } - void commandStart( const QString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( CommandStart, identifier ); } + void commandStart( const TQString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( CommandStart, identifier ); } void commandEnd() { kdDebug(5006) << k_funcinfo << endl; process( CommandEnd ); } - void testStart( const QString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( TestStart, identifier ); } + void testStart( const TQString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( TestStart, identifier ); } void testEnd() { kdDebug(5006) << k_funcinfo << endl; process( TestEnd ); } void testListStart() { kdDebug(5006) << k_funcinfo << endl; process( TestListStart ); } void testListEnd() { kdDebug(5006) << k_funcinfo << endl; process( TestListEnd ); } void blockStart() { kdDebug(5006) << k_funcinfo << endl; process( BlockStart ); ++mNestingDepth; } void blockEnd() { kdDebug(5006) << k_funcinfo << endl; --mNestingDepth; process( BlockEnd ); } - void hashComment( const QString & ) { kdDebug(5006) << k_funcinfo << endl; } - void bracketComment( const QString & ) { kdDebug(5006) << k_funcinfo << endl; } + void hashComment( const TQString & ) { kdDebug(5006) << k_funcinfo << endl; } + void bracketComment( const TQString & ) { kdDebug(5006) << k_funcinfo << endl; } void lineFeed() { kdDebug(5006) << k_funcinfo << endl; } void error( const KSieve::Error & ) { kdDebug(5006) << k_funcinfo << endl; @@ -200,11 +200,11 @@ namespace { } void finished() { kdDebug(5006) << k_funcinfo << endl; } - void taggedArgument( const QString & tag ) { kdDebug(5006) << k_funcinfo << endl; process( TaggedArgument, tag ); } - void stringArgument( const QString & string, bool, const QString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringArgument, string ); } - void numberArgument( unsigned long number, char ) { kdDebug(5006) << k_funcinfo << endl; process( NumberArgument, QString::number( number ) ); } + void taggedArgument( const TQString & tag ) { kdDebug(5006) << k_funcinfo << endl; process( TaggedArgument, tag ); } + void stringArgument( const TQString & string, bool, const TQString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringArgument, string ); } + void numberArgument( unsigned long number, char ) { kdDebug(5006) << k_funcinfo << endl; process( NumberArgument, TQString::number( number ) ); } void stringListArgumentStart() { kdDebug(5006) << k_funcinfo << endl; process( StringListArgumentStart ); } - void stringListEntry( const QString & string, bool, const QString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringListEntry, string ); } + void stringListEntry( const TQString & string, bool, const TQString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringListEntry, string ); } void stringListArgumentEnd() { kdDebug(5006) << k_funcinfo << endl; process( StringListArgumentEnd ); } }; @@ -306,9 +306,9 @@ namespace { } - QString domainName() /*not const, since map::op[] isn't const*/ { + TQString domainName() /*not const, since map::op[] isn't const*/ { return mResults.count( "stop" ) && mResults.count( "from" ) - ? mResults["domainName"] : QString::null ; + ? mResults["domainName"] : TQString::null ; } }; @@ -330,11 +330,11 @@ namespace { virtual ~VacationDataExtractor() {} int notificationInterval() const { return mNotificationInterval; } - const QString & messageText() const { return mMessageText; } - const QStringList & aliases() const { return mAliases; } + const TQString & messageText() const { return mMessageText; } + const TQStringList & aliases() const { return mAliases; } private: - void commandStart( const QString & identifier ) { + void commandStart( const TQString & identifier ) { kdDebug( 5006 ) << "VacationDataExtractor::commandStart( \"" << identifier << "\" )" << endl; if ( identifier != "vacation" ) return; @@ -347,14 +347,14 @@ namespace { mContext = None; } - void testStart( const QString & ) {} + void testStart( const TQString & ) {} void testEnd() {} void testListStart() {} void testListEnd() {} void blockStart() {} void blockEnd() {} - void hashComment( const QString & ) {} - void bracketComment( const QString & ) {} + void hashComment( const TQString & ) {} + void bracketComment( const TQString & ) {} void lineFeed() {} void error( const KSieve::Error & e ) { kdDebug( 5006 ) << "VacationDataExtractor::error() ### " @@ -363,7 +363,7 @@ namespace { } void finished() {} - void taggedArgument( const QString & tag ) { + void taggedArgument( const TQString & tag ) { kdDebug( 5006 ) << "VacationDataExtractor::taggedArgument( \"" << tag << "\" )" << endl; if ( mContext != VacationCommand ) return; @@ -373,7 +373,7 @@ namespace { mContext = Addresses; } - void stringArgument( const QString & string, bool, const QString & ) { + void stringArgument( const TQString & string, bool, const TQString & ) { kdDebug( 5006 ) << "VacationDataExtractor::stringArgument( \"" << string << "\" )" << endl; if ( mContext == Addresses ) { mAliases.push_back( string ); @@ -396,7 +396,7 @@ namespace { } void stringListArgumentStart() {} - void stringListEntry( const QString & string, bool, const QString & ) { + void stringListEntry( const TQString & string, bool, const TQString & ) { kdDebug( 5006 ) << "VacationDataExtractor::stringListEntry( \"" << string << "\" )" << endl; if ( mContext != Addresses ) return; @@ -412,15 +412,15 @@ namespace { private: Context mContext; int mNotificationInterval; - QString mMessageText; - QStringList mAliases; + TQString mMessageText; + TQStringList mAliases; void reset() { kdDebug(5006) << "VacationDataExtractor::reset()" << endl; mContext = None; mNotificationInterval = 0; mAliases.clear(); - mMessageText = QString::null; + mMessageText = TQString::null; } }; @@ -428,16 +428,16 @@ namespace { namespace KMail { - Vacation::Vacation( QObject * parent, bool checkOnly, const char * name ) - : QObject( parent, name ), mSieveJob( 0 ), mDialog( 0 ), mWasActive( false ), mCheckOnly( checkOnly ) + Vacation::Vacation( TQObject * parent, bool checkOnly, const char * name ) + : TQObject( parent, name ), mSieveJob( 0 ), mDialog( 0 ), mWasActive( false ), mCheckOnly( checkOnly ) { mUrl = findURL(); kdDebug(5006) << "Vacation: found url \"" << mUrl.prettyURL() << "\"" << endl; if ( mUrl.isEmpty() ) // nothing to do... return; mSieveJob = SieveJob::get( mUrl, !checkOnly ); - connect( mSieveJob, SIGNAL(gotScript(KMail::SieveJob*,bool,const QString&,bool)), - SLOT(slotGetResult(KMail::SieveJob*,bool,const QString&,bool)) ); + connect( mSieveJob, TQT_SIGNAL(gotScript(KMail::SieveJob*,bool,const TQString&,bool)), + TQT_SLOT(slotGetResult(KMail::SieveJob*,bool,const TQString&,bool)) ); } Vacation::~Vacation() { @@ -446,44 +446,44 @@ namespace KMail { kdDebug(5006) << "~Vacation()" << endl; } - static inline QString dotstuff( QString s ) { + static inline TQString dotstuff( TQString s ) { if ( s.startsWith( "." ) ) return '.' + s.replace( "\n.", "\n.." ); else return s.replace( "\n.", "\n.." ); } - QString Vacation::composeScript( const QString & messageText, + TQString Vacation::composeScript( const TQString & messageText, int notificationInterval, const AddrSpecList & addrSpecs, - bool sendForSpam, const QString & domain ) + bool sendForSpam, const TQString & domain ) { - QString addressesArgument; - QStringList aliases; + TQString addressesArgument; + TQStringList aliases; if ( !addrSpecs.empty() ) { addressesArgument += ":addresses [ "; - QStringList sl; + TQStringList sl; for ( AddrSpecList::const_iterator it = addrSpecs.begin() ; it != addrSpecs.end() ; ++it ) { sl.push_back( '"' + (*it).asString().replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"' ); aliases.push_back( (*it).asString() ); } addressesArgument += sl.join( ", " ) + " ] "; } - QString script = QString::fromLatin1("require \"vacation\";\n\n" ); + TQString script = TQString::fromLatin1("require \"vacation\";\n\n" ); if ( !sendForSpam ) - script += QString::fromLatin1( "if header :contains \"X-Spam-Flag\" \"YES\"" + script += TQString::fromLatin1( "if header :contains \"X-Spam-Flag\" \"YES\"" " { keep; stop; }\n" ); // FIXME? if ( !domain.isEmpty() ) // FIXME - script += QString::fromLatin1( "if not address :domain :contains \"from\" \"%1\" { keep; stop; }\n" ).arg( domain ); + script += TQString::fromLatin1( "if not address :domain :contains \"from\" \"%1\" { keep; stop; }\n" ).arg( domain ); script += "vacation "; script += addressesArgument; if ( notificationInterval > 0 ) - script += QString::fromLatin1(":days %1 ").arg( notificationInterval ); - script += QString::fromLatin1("text:\n"); + script += TQString::fromLatin1(":days %1 ").arg( notificationInterval ); + script += TQString::fromLatin1("text:\n"); script += dotstuff( messageText.isEmpty() ? defaultMessageText() : messageText ); - script += QString::fromLatin1( "\n.\n;\n" ); + script += TQString::fromLatin1( "\n.\n;\n" ); return script; } @@ -522,9 +522,9 @@ namespace KMail { return KURL(); } - bool Vacation::parseScript( const QString & script, QString & messageText, - int & notificationInterval, QStringList & aliases, - bool & sendForSpam, QString & domainName ) { + bool Vacation::parseScript( const TQString & script, TQString & messageText, + int & notificationInterval, TQStringList & aliases, + bool & sendForSpam, TQString & domainName ) { if ( script.stripWhiteSpace().isEmpty() ) { messageText = defaultMessageText(); notificationInterval = defaultNotificationInterval(); @@ -537,7 +537,7 @@ namespace KMail { // The stripWhiteSpace() call below prevents parsing errors. The // slave somehow omits the last \n, which results in a lone \r at // the end, leading to a parse error. - const QCString scriptUTF8 = script.stripWhiteSpace().utf8(); + const TQCString scriptUTF8 = script.stripWhiteSpace().utf8(); kdDebug(5006) << "scriptUtf8 = \"" + scriptUTF8 + "\"" << endl; KSieve::Parser parser( scriptUTF8.begin(), scriptUTF8.begin() + scriptUTF8.length() ); @@ -558,7 +558,7 @@ namespace KMail { return true; } - QString Vacation::defaultMessageText() { + TQString Vacation::defaultMessageText() { return i18n("I am out of office till %1.\n" "\n" "In urgent cases, please contact Mrs. <vacation replacement>\n" @@ -569,15 +569,15 @@ namespace KMail { "\n" "Yours sincerely,\n" "-- <enter your name and email address here>\n") - .arg( KGlobal::locale()->formatDate( QDate::currentDate().addDays( 1 ) ) ); + .arg( KGlobal::locale()->formatDate( TQDate::currentDate().addDays( 1 ) ) ); } int Vacation::defaultNotificationInterval() { return 7; // days } - QStringList Vacation::defaultMailAliases() { - QStringList sl; + TQStringList Vacation::defaultMailAliases() { + TQStringList sl; for ( KPIM::IdentityManager::ConstIterator it = kmkernel->identityManager()->begin() ; it != kmkernel->identityManager()->end() ; ++it ) if ( !(*it).emailAddr().isEmpty() ) @@ -589,12 +589,12 @@ namespace KMail { return GlobalSettings::outOfOfficeReactToSpam(); } - QString Vacation::defaultDomainName() { + TQString Vacation::defaultDomainName() { return GlobalSettings::outOfOfficeDomain(); } void Vacation::slotGetResult( SieveJob * job, bool success, - const QString & script, bool active ) { + const TQString & script, bool active ) { kdDebug(5006) << "Vacation::slotGetResult( ??, " << success << ", ?, " << active << " )" << endl << "script:" << endl @@ -615,11 +615,11 @@ namespace KMail { if ( !mDialog && !mCheckOnly ) mDialog = new VacationDialog( i18n("Configure \"Out of Office\" Replies"), 0, 0, false ); - QString messageText = defaultMessageText(); + TQString messageText = defaultMessageText(); int notificationInterval = defaultNotificationInterval(); - QStringList aliases = defaultMailAliases(); + TQStringList aliases = defaultMailAliases(); bool sendForSpam = defaultSendForSpam(); - QString domainName = defaultDomainName(); + TQString domainName = defaultDomainName(); if ( !success ) active = false; // default to inactive if ( !mCheckOnly && ( !success || !parseScript( script, messageText, notificationInterval, aliases, sendForSpam, domainName ) ) ) @@ -639,9 +639,9 @@ namespace KMail { mDialog->setDomainName( domainName ); mDialog->enableDomainAndSendForSpam( !GlobalSettings::allowOutOfOfficeUploadButNoSettings() ); - connect( mDialog, SIGNAL(okClicked()), SLOT(slotDialogOk()) ); - connect( mDialog, SIGNAL(cancelClicked()), SLOT(slotDialogCancel()) ); - connect( mDialog, SIGNAL(defaultClicked()), SLOT(slotDialogDefaults()) ); + connect( mDialog, TQT_SIGNAL(okClicked()), TQT_SLOT(slotDialogOk()) ); + connect( mDialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotDialogCancel()) ); + connect( mDialog, TQT_SIGNAL(defaultClicked()), TQT_SLOT(slotDialogDefaults()) ); mDialog->show(); } @@ -671,7 +671,7 @@ namespace KMail { void Vacation::slotDialogOk() { kdDebug(5006) << "Vacation::slotDialogOk()" << endl; // compose a new script: - const QString script = composeScript( mDialog->messageText(), + const TQString script = composeScript( mDialog->messageText(), mDialog->notificationInterval(), mDialog->mailAliases(), mDialog->sendForSpam(), @@ -683,10 +683,10 @@ namespace KMail { // and commit the dialog's settings to the server: mSieveJob = SieveJob::put( mUrl, script, active, mWasActive ); - connect( mSieveJob, SIGNAL(gotScript(KMail::SieveJob*,bool,const QString&,bool)), + connect( mSieveJob, TQT_SIGNAL(gotScript(KMail::SieveJob*,bool,const TQString&,bool)), active - ? SLOT(slotPutActiveResult(KMail::SieveJob*,bool)) - : SLOT(slotPutInactiveResult(KMail::SieveJob*,bool)) ); + ? TQT_SLOT(slotPutActiveResult(KMail::SieveJob*,bool)) + : TQT_SLOT(slotPutInactiveResult(KMail::SieveJob*,bool)) ); // destroy the dialog: mDialog->delayedDestruct(); diff --git a/kmail/vacation.h b/kmail/vacation.h index 18a48d236..18f791337 100644 --- a/kmail/vacation.h +++ b/kmail/vacation.h @@ -15,7 +15,7 @@ #ifndef __KMAIL_VACATION_H__ #define __KMAIL_VACATION_H__ -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> @@ -29,34 +29,34 @@ namespace KMail { namespace KMime { namespace Types { struct AddrSpec; - typedef QValueList<AddrSpec> AddrSpecList; + typedef TQValueList<AddrSpec> AddrSpecList; } } namespace KMail { - class Vacation : public QObject { + class Vacation : public TQObject { Q_OBJECT public: - Vacation( QObject * parent=0, bool checkOnly = false, const char * name=0 ); + Vacation( TQObject * parent=0, bool checkOnly = false, const char * name=0 ); virtual ~Vacation(); bool isUsable() const { return !mUrl.isEmpty(); } - static QString defaultMessageText(); + static TQString defaultMessageText(); static int defaultNotificationInterval(); - static QStringList defaultMailAliases(); + static TQStringList defaultMailAliases(); static bool defaultSendForSpam(); - static QString defaultDomainName(); + static TQString defaultDomainName(); protected: - static QString composeScript( const QString & messageText, + static TQString composeScript( const TQString & messageText, int notificationInterval, const KMime::Types::AddrSpecList & aliases, - bool sendForSpam, const QString & excludeDomain ); - static bool parseScript( const QString & script, QString & messageText, - int & notificationInterval, QStringList & aliases, - bool & sendForSpam, QString & domainName ); + bool sendForSpam, const TQString & excludeDomain ); + static bool parseScript( const TQString & script, TQString & messageText, + int & notificationInterval, TQStringList & aliases, + bool & sendForSpam, TQString & domainName ); KURL findURL() const; void handlePutResult( KMail::SieveJob * job, bool success, bool ); @@ -69,7 +69,7 @@ namespace KMail { protected slots: void slotDialogDefaults(); void slotGetResult( KMail::SieveJob * job, bool success, - const QString & script, bool active ); + const TQString & script, bool active ); void slotDialogOk(); void slotDialogCancel(); void slotPutActiveResult( KMail::SieveJob *, bool ); diff --git a/kmail/vacationdialog.cpp b/kmail/vacationdialog.cpp index b05f3fbf2..a2dabe9b1 100644 --- a/kmail/vacationdialog.cpp +++ b/kmail/vacationdialog.cpp @@ -30,16 +30,16 @@ using KMime::HeaderParsing::parseAddressList; #include <kwin.h> #include <kapplication.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qvalidator.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqvalidator.h> namespace KMail { - VacationDialog::VacationDialog( const QString & caption, QWidget * parent, + VacationDialog::VacationDialog( const TQString & caption, TQWidget * parent, const char * name, bool modal ) : KDialogBase( Plain, caption, Ok|Cancel|Default, Ok, parent, name, modal ) { @@ -48,57 +48,57 @@ namespace KMail { static const int rows = 7; int row = -1; - QGridLayout * glay = new QGridLayout( plainPage(), rows, 2, 0, spacingHint() ); + TQGridLayout * glay = new TQGridLayout( plainPage(), rows, 2, 0, spacingHint() ); glay->setColStretch( 1, 1 ); // explanation label: ++row; - glay->addMultiCellWidget( new QLabel( i18n("Configure vacation " + glay->addMultiCellWidget( new TQLabel( i18n("Configure vacation " "notifications to be sent:"), plainPage() ), row, row, 0, 1 ); // Activate checkbox: ++row; - mActiveCheck = new QCheckBox( i18n("&Activate vacation notifications"), plainPage() ); + mActiveCheck = new TQCheckBox( i18n("&Activate vacation notifications"), plainPage() ); glay->addMultiCellWidget( mActiveCheck, row, row, 0, 1 ); // Message text edit: ++row; glay->setRowStretch( row, 1 ); - mTextEdit = new QTextEdit( plainPage(), "mTextEdit" ); - mTextEdit->setTextFormat( QTextEdit::PlainText ); + mTextEdit = new TQTextEdit( plainPage(), "mTextEdit" ); + mTextEdit->setTextFormat( TQTextEdit::PlainText ); glay->addMultiCellWidget( mTextEdit, row, row, 0, 1 ); // "Resent only after" spinbox and label: ++row; mIntervalSpin = new KIntSpinBox( 1, 356, 1, 7, 10, plainPage(), "mIntervalSpin" ); - connect(mIntervalSpin, SIGNAL( valueChanged( int )), SLOT( slotIntervalSpinChanged( int ) ) ); - glay->addWidget( new QLabel( mIntervalSpin, i18n("&Resend notification only after:"), plainPage() ), row, 0 ); + connect(mIntervalSpin, TQT_SIGNAL( valueChanged( int )), TQT_SLOT( slotIntervalSpinChanged( int ) ) ); + glay->addWidget( new TQLabel( mIntervalSpin, i18n("&Resend notification only after:"), plainPage() ), row, 0 ); glay->addWidget( mIntervalSpin, row, 1 ); // "Send responses for these addresses" lineedit and label: ++row; - mMailAliasesEdit = new QLineEdit( plainPage(), "mMailAliasesEdit" ); - glay->addWidget( new QLabel( mMailAliasesEdit, i18n("&Send responses for these addresses:"), plainPage() ), row, 0 ); + mMailAliasesEdit = new TQLineEdit( plainPage(), "mMailAliasesEdit" ); + glay->addWidget( new TQLabel( mMailAliasesEdit, i18n("&Send responses for these addresses:"), plainPage() ), row, 0 ); glay->addWidget( mMailAliasesEdit, row, 1 ); // "Send responses also to SPAM mail" checkbox: ++row; - mSpamCheck = new QCheckBox( i18n("Do not send vacation replies to spam messages"), plainPage(), "mSpamCheck" ); + mSpamCheck = new TQCheckBox( i18n("Do not send vacation replies to spam messages"), plainPage(), "mSpamCheck" ); mSpamCheck->setChecked( true ); glay->addMultiCellWidget( mSpamCheck, row, row, 0, 1 ); // domain checkbox and linedit: ++row; - mDomainCheck = new QCheckBox( i18n("Only react to mail coming from domain"), plainPage(), "mDomainCheck" ); + mDomainCheck = new TQCheckBox( i18n("Only react to mail coming from domain"), plainPage(), "mDomainCheck" ); mDomainCheck->setChecked( false ); - mDomainEdit = new QLineEdit( plainPage(), "mDomainEdit" ); + mDomainEdit = new TQLineEdit( plainPage(), "mDomainEdit" ); mDomainEdit->setEnabled( false ); - mDomainEdit->setValidator( new QRegExpValidator( QRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), mDomainEdit ) ); + mDomainEdit->setValidator( new TQRegExpValidator( TQRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), mDomainEdit ) ); glay->addWidget( mDomainCheck, row, 0 ); glay->addWidget( mDomainEdit, row, 1 ); - connect( mDomainCheck, SIGNAL(toggled(bool)), - mDomainEdit, SLOT(setEnabled(bool)) ); + connect( mDomainCheck, TQT_SIGNAL(toggled(bool)), + mDomainEdit, TQT_SLOT(setEnabled(bool)) ); Q_ASSERT( row == rows - 1 ); } @@ -115,11 +115,11 @@ namespace KMail { mActiveCheck->setChecked( activate ); } - QString VacationDialog::messageText() const { + TQString VacationDialog::messageText() const { return mTextEdit->text().stripWhiteSpace(); } - void VacationDialog::setMessageText( const QString & text ) { + void VacationDialog::setMessageText( const TQString & text ) { mTextEdit->setText( text ); const int height = ( mTextEdit->fontMetrics().lineSpacing() + 1 ) * 11; mTextEdit->setMinimumHeight( height ); @@ -134,7 +134,7 @@ namespace KMail { } AddrSpecList VacationDialog::mailAliases() const { - QCString text = mMailAliasesEdit->text().latin1(); // ### IMAA: !ok + TQCString text = mMailAliasesEdit->text().latin1(); // ### IMAA: !ok AddressList al; const char * s = text.begin(); parseAddressList( s, text.end(), al ); @@ -149,13 +149,13 @@ namespace KMail { } void VacationDialog::setMailAliases( const AddrSpecList & aliases ) { - QStringList sl; + TQStringList sl; for ( AddrSpecList::const_iterator it = aliases.begin() ; it != aliases.end() ; ++it ) sl.push_back( (*it).asString() ); mMailAliasesEdit->setText( sl.join(", ") ); } - void VacationDialog::setMailAliases( const QString & aliases ) { + void VacationDialog::setMailAliases( const TQString & aliases ) { mMailAliasesEdit->setText( aliases ); } @@ -163,11 +163,11 @@ namespace KMail { mIntervalSpin->setSuffix( i18n(" day", " days", value) ); } - QString VacationDialog::domainName() const { - return mDomainCheck->isChecked() ? mDomainEdit->text() : QString::null ; + TQString VacationDialog::domainName() const { + return mDomainCheck->isChecked() ? mDomainEdit->text() : TQString::null ; } - void VacationDialog::setDomainName( const QString & domain ) { + void VacationDialog::setDomainName( const TQString & domain ) { mDomainEdit->setText( domain ); if ( !domain.isEmpty() ) mDomainCheck->setChecked( true ); diff --git a/kmail/vacationdialog.h b/kmail/vacationdialog.h index f84ae6a76..7f98de74b 100644 --- a/kmail/vacationdialog.h +++ b/kmail/vacationdialog.h @@ -28,7 +28,7 @@ template <typename T> class QValueList; namespace KMime { namespace Types { struct AddrSpec; - typedef QValueList<AddrSpec> AddrSpecList; + typedef TQValueList<AddrSpec> AddrSpecList; } } @@ -37,7 +37,7 @@ namespace KMail { class VacationDialog : public KDialogBase { Q_OBJECT public: - VacationDialog( const QString & caption, QWidget * parent=0, + VacationDialog( const TQString & caption, TQWidget * parent=0, const char * name=0, bool modal=true ); virtual ~VacationDialog(); @@ -46,18 +46,18 @@ namespace KMail { bool activateVacation() const; virtual void setActivateVacation( bool activate ); - QString messageText() const; - virtual void setMessageText( const QString & text ); + TQString messageText() const; + virtual void setMessageText( const TQString & text ); int notificationInterval() const; virtual void setNotificationInterval( int days ); KMime::Types::AddrSpecList mailAliases() const; virtual void setMailAliases( const KMime::Types::AddrSpecList & aliases ); - virtual void setMailAliases( const QString & aliases ); + virtual void setMailAliases( const TQString & aliases ); - QString domainName() const; - virtual void setDomainName( const QString & domain ); + TQString domainName() const; + virtual void setDomainName( const TQString & domain ); bool sendForSpam() const; virtual void setSendForSpam( bool enable ); @@ -67,13 +67,13 @@ namespace KMail { void slotIntervalSpinChanged( int value ); protected: - QCheckBox * mActiveCheck; + TQCheckBox * mActiveCheck; KIntSpinBox * mIntervalSpin; - QLineEdit * mMailAliasesEdit; - QTextEdit * mTextEdit; - QCheckBox * mSpamCheck; - QCheckBox * mDomainCheck; - QLineEdit * mDomainEdit; + TQLineEdit * mMailAliasesEdit; + TQTextEdit * mTextEdit; + TQCheckBox * mSpamCheck; + TQCheckBox * mDomainCheck; + TQLineEdit * mDomainEdit; }; diff --git a/kmail/vcardviewer.cpp b/kmail/vcardviewer.cpp index 87bb2bad1..ff4a3b86e 100644 --- a/kmail/vcardviewer.cpp +++ b/kmail/vcardviewer.cpp @@ -35,15 +35,15 @@ using KABC::Addressee; #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> -KMail::VCardViewer::VCardViewer(QWidget *parent, const QString& vCard, const char* name) +KMail::VCardViewer::VCardViewer(TQWidget *parent, const TQString& vCard, const char* name) : KDialogBase( parent, name, false, i18n("VCard Viewer"), User1|User2|User3|Close, Close, true, i18n("&Import"), i18n("&Next Card"), i18n("&Previous Card") ) { mAddresseeView = new AddresseeView(this); mAddresseeView->enableLinks( 0 ); - mAddresseeView->setVScrollBarMode(QScrollView::Auto); + mAddresseeView->setVScrollBarMode(TQScrollView::Auto); setMainWidget(mAddresseeView); VCardConverter vcc; diff --git a/kmail/vcardviewer.h b/kmail/vcardviewer.h index 44d07c42c..69423ca65 100644 --- a/kmail/vcardviewer.h +++ b/kmail/vcardviewer.h @@ -23,7 +23,7 @@ #include <kdialogbase.h> #include <kabc/addressee.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class QString; @@ -37,7 +37,7 @@ namespace KMail { { Q_OBJECT public: - VCardViewer(QWidget *parent, const QString& vCard, const char* name); + VCardViewer(TQWidget *parent, const TQString& vCard, const char* name); virtual ~VCardViewer(); protected: @@ -49,7 +49,7 @@ namespace KMail { KPIM::AddresseeView * mAddresseeView; KABC::Addressee::List mAddresseeList; - QValueListIterator<KABC::Addressee> itAddresseeList; + TQValueListIterator<KABC::Addressee> itAddresseeList; }; } diff --git a/kmail/xfaceconfigurator.cpp b/kmail/xfaceconfigurator.cpp index ba91efaa4..f88a3cd74 100644 --- a/kmail/xfaceconfigurator.cpp +++ b/kmail/xfaceconfigurator.cpp @@ -52,15 +52,15 @@ using namespace KPIM; #include <kabc/addressee.h> using namespace KABC; -#include <qbitmap.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qwidgetstack.h> +#include <tqbitmap.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqwidgetstack.h> // #include <assert.h> @@ -70,122 +70,122 @@ using namespace KPIM; namespace KMail { - XFaceConfigurator::XFaceConfigurator( QWidget * parent, const char * name ) - : QWidget( parent, name ) + XFaceConfigurator::XFaceConfigurator( TQWidget * parent, const char * name ) + : TQWidget( parent, name ) { // tmp. vars: - QLabel * label; - QLabel * label1; + TQLabel * label; + TQLabel * label1; KActiveLabel * label2; - QWidget * page; - QVBoxLayout * vlay; - QHBoxLayout * hlay; - QVBoxLayout * page_vlay; - QPushButton * mFromFileBtn; - QPushButton * mFromAddrbkBtn; + TQWidget * page; + TQVBoxLayout * vlay; + TQHBoxLayout * hlay; + TQVBoxLayout * page_vlay; + TQPushButton * mFromFileBtn; + TQPushButton * mFromAddrbkBtn; - vlay = new QVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" ); - hlay = new QHBoxLayout( vlay ); + vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" ); + hlay = new TQHBoxLayout( vlay ); // "enable X-Face" checkbox: - mEnableCheck = new QCheckBox( i18n("&Send picture with every message"), this ); - QWhatsThis::add( mEnableCheck, + mEnableCheck = new TQCheckBox( i18n("&Send picture with every message"), this ); + TQWhatsThis::add( mEnableCheck, i18n( "Check this box if you want KMail to add a so-called X-Face header to messages " "written with this identity. An X-Face is a small (48x48 pixels) black and " "white image that some mail clients are able to display." ) ); hlay->addWidget( mEnableCheck, Qt::AlignLeft | Qt::AlignVCenter ); - mXFaceLabel = new QLabel( this ); - QWhatsThis::add(mXFaceLabel, + mXFaceLabel = new TQLabel( this ); + TQWhatsThis::add(mXFaceLabel, i18n( "This is a preview of the picture selected/entered below." ) ); mXFaceLabel->setFixedSize(48, 48); - mXFaceLabel->setFrameShape( QFrame::Box ); + mXFaceLabel->setFrameShape( TQFrame::Box ); hlay->addWidget( mXFaceLabel ); -// label1 = new QLabel( "X-Face:", this ); +// label1 = new TQLabel( "X-Face:", this ); // vlay->addWidget( label1 ); // "obtain X-Face from" combo and label: - hlay = new QHBoxLayout( vlay ); // inherits spacing - mSourceCombo = new QComboBox( false, this ); - QWhatsThis::add(mSourceCombo, + hlay = new TQHBoxLayout( vlay ); // inherits spacing + mSourceCombo = new TQComboBox( false, this ); + TQWhatsThis::add(mSourceCombo, i18n("Click on the widgets below to obtain help on the input methods.")); mSourceCombo->setEnabled( false ); // since !mEnableCheck->isChecked() - mSourceCombo->insertStringList( QStringList() + mSourceCombo->insertStringList( TQStringList() << i18n( "continuation of \"obtain picture from\"", "External Source" ) << i18n( "continuation of \"obtain picture from\"", "Input Field Below" ) ); - label = new QLabel( mSourceCombo, + label = new TQLabel( mSourceCombo, i18n("Obtain pic&ture from:"), this ); label->setEnabled( false ); // since !mEnableCheck->isChecked() hlay->addWidget( label ); hlay->addWidget( mSourceCombo, 1 ); // widget stack that is controlled by the source combo: - QWidgetStack * widgetStack = new QWidgetStack( this ); + TQWidgetStack * widgetStack = new TQWidgetStack( this ); widgetStack->setEnabled( false ); // since !mEnableCheck->isChecked() vlay->addWidget( widgetStack, 1 ); - connect( mSourceCombo, SIGNAL(highlighted(int)), - widgetStack, SLOT(raiseWidget(int)) ); - connect( mEnableCheck, SIGNAL(toggled(bool)), - mSourceCombo, SLOT(setEnabled(bool)) ); - connect( mEnableCheck, SIGNAL(toggled(bool)), - widgetStack, SLOT(setEnabled(bool)) ); - connect( mEnableCheck, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool)) ); + connect( mSourceCombo, TQT_SIGNAL(highlighted(int)), + widgetStack, TQT_SLOT(raiseWidget(int)) ); + connect( mEnableCheck, TQT_SIGNAL(toggled(bool)), + mSourceCombo, TQT_SLOT(setEnabled(bool)) ); + connect( mEnableCheck, TQT_SIGNAL(toggled(bool)), + widgetStack, TQT_SLOT(setEnabled(bool)) ); + connect( mEnableCheck, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool)) ); // The focus might be still in the widget that is disabled - connect( mEnableCheck, SIGNAL(clicked()), - mEnableCheck, SLOT(setFocus()) ); + connect( mEnableCheck, TQT_SIGNAL(clicked()), + mEnableCheck, TQT_SLOT(setFocus()) ); int pageno = 0; // page 0: create X-Face from image file or address book entry - page = new QWidget( widgetStack ); + page = new TQWidget( widgetStack ); widgetStack->addWidget( page, pageno ); // force sequential numbers (play safe) - page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() ); - hlay = new QHBoxLayout( page_vlay ); // inherits spacing - mFromFileBtn = new QPushButton( i18n("Select File..."), page ); - QWhatsThis::add( mFromFileBtn, + page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() ); + hlay = new TQHBoxLayout( page_vlay ); // inherits spacing + mFromFileBtn = new TQPushButton( i18n("Select File..."), page ); + TQWhatsThis::add( mFromFileBtn, i18n("Use this to select an image file to create the picture from. " "The image should be of high contrast and nearly quadratic shape. " "A light background helps improve the result." ) ); mFromFileBtn->setAutoDefault( false ); page_vlay->addWidget( mFromFileBtn, 1 ); - connect( mFromFileBtn, SIGNAL(released()), - this, SLOT(slotSelectFile()) ); - mFromAddrbkBtn = new QPushButton( i18n("Set From Address Book"), page ); - QWhatsThis::add( mFromAddrbkBtn, + connect( mFromFileBtn, TQT_SIGNAL(released()), + this, TQT_SLOT(slotSelectFile()) ); + mFromAddrbkBtn = new TQPushButton( i18n("Set From Address Book"), page ); + TQWhatsThis::add( mFromAddrbkBtn, i18n( "You can use a scaled-down version of the picture " "you have set in your address book entry." ) ); mFromAddrbkBtn->setAutoDefault( false ); page_vlay->addWidget( mFromAddrbkBtn, 1 ); - connect( mFromAddrbkBtn, SIGNAL(released()), - this, SLOT(slotSelectFromAddressbook()) ); - label1 = new QLabel( i18n("<qt>KMail can send a small (48x48 pixels), low-quality, " + connect( mFromAddrbkBtn, TQT_SIGNAL(released()), + this, TQT_SLOT(slotSelectFromAddressbook()) ); + label1 = new TQLabel( i18n("<qt>KMail can send a small (48x48 pixels), low-quality, " "monochrome picture with every message. " "For example, this could be a picture of you or a glyph. " "It is shown in the recipient's mail client (if supported)." ), page ); - label1->setAlignment( QLabel::WordBreak | QLabel::AlignVCenter ); + label1->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter ); page_vlay->addWidget( label1 ); widgetStack->raiseWidget( 0 ); // since mSourceCombo->currentItem() == 0 // page 1: input field for direct entering ++pageno; - page = new QWidget( widgetStack ); + page = new TQWidget( widgetStack ); widgetStack->addWidget( page, pageno ); - page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() ); - mTextEdit = new QTextEdit( page ); + page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() ); + mTextEdit = new TQTextEdit( page ); page_vlay->addWidget( mTextEdit ); - QWhatsThis::add( mTextEdit, i18n( "Use this field to enter an arbitrary X-Face string." ) ); + TQWhatsThis::add( mTextEdit, i18n( "Use this field to enter an arbitrary X-Face string." ) ); mTextEdit->setFont( KGlobalSettings::fixedFont() ); - mTextEdit->setWrapPolicy( QTextEdit::Anywhere ); + mTextEdit->setWrapPolicy( TQTextEdit::Anywhere ); mTextEdit->setTextFormat( Qt::PlainText ); label2 = new KActiveLabel( i18n("Examples are available at <a href=\"http://www.xs4all.nl/~ace/X-Faces/\">http://www.xs4all.nl/~ace/X-Faces/</a>."), page ); page_vlay->addWidget( label2 ); - connect(mTextEdit, SIGNAL(textChanged()), this, SLOT(slotUpdateXFace())); + connect(mTextEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotUpdateXFace())); } XFaceConfigurator::~XFaceConfigurator() { @@ -200,21 +200,21 @@ namespace KMail { mEnableCheck->setChecked( enable ); } - QString XFaceConfigurator::xface() const { + TQString XFaceConfigurator::xface() const { return mTextEdit->text(); } - void XFaceConfigurator::setXFace( const QString & text ) { + void XFaceConfigurator::setXFace( const TQString & text ) { mTextEdit->setText( text ); } void XFaceConfigurator::setXfaceFromFile( const KURL &url ) { - QString tmpFile; + TQString tmpFile; if( KIO::NetAccess::download( url, tmpFile, this ) ) { KXFace xf; - mTextEdit->setText( xf.fromImage( QImage( tmpFile ) ) ); + mTextEdit->setText( xf.fromImage( TQImage( tmpFile ) ) ); KIO::NetAccess::removeTempFile( tmpFile ); } else { KMessageBox::error(this, KIO::NetAccess::lastErrorString() ); @@ -223,9 +223,9 @@ namespace KMail { void XFaceConfigurator::slotSelectFile() { - QStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Reading); - QString filter = mimeTypes.join (" "); - KURL url = KFileDialog::getOpenURL( QString::null, filter, this, QString::null ); + TQStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Reading); + TQString filter = mimeTypes.join (" "); + KURL url = KFileDialog::getOpenURL( TQString::null, filter, this, TQString::null ); if ( !url.isEmpty() ) setXfaceFromFile( url ); } @@ -238,7 +238,7 @@ namespace KMail { { if ( me.photo().isIntern() ) { - QImage photo = me.photo().data(); + TQImage photo = me.photo().data(); if ( !photo.isNull() ) { KXFace xf; @@ -263,7 +263,7 @@ namespace KMail { void XFaceConfigurator::slotUpdateXFace() { - QString str = mTextEdit->text(); + TQString str = mTextEdit->text(); if ( !str.isEmpty() ) { if ( str.startsWith("x-face:", false) ) @@ -272,7 +272,7 @@ namespace KMail { mTextEdit->setText(str); } KXFace xf; - QPixmap p( 48, 48, true ); + TQPixmap p( 48, 48, true ); p.convertFromImage( xf.toImage(str) ); mXFaceLabel->setPixmap( p ); } diff --git a/kmail/xfaceconfigurator.h b/kmail/xfaceconfigurator.h index a08c2e545..2e243ddfb 100644 --- a/kmail/xfaceconfigurator.h +++ b/kmail/xfaceconfigurator.h @@ -17,8 +17,8 @@ #ifndef __KMAIL_XFACECONFIGURATOR_H__ #define __KMAIL_XFACECONFIGURATOR_H__ -#include <qwidget.h> -#include <qtextedit.h> +#include <tqwidget.h> +#include <tqtextedit.h> class KURL; @@ -29,24 +29,24 @@ class QComboBox; namespace KMail { - class XFaceConfigurator : public QWidget { + class XFaceConfigurator : public TQWidget { Q_OBJECT public: - XFaceConfigurator( QWidget * parent=0, const char * name=0 ); + XFaceConfigurator( TQWidget * parent=0, const char * name=0 ); virtual ~XFaceConfigurator(); bool isXFaceEnabled() const; void setXFaceEnabled( bool enable ); - QString xface() const; - void setXFace( const QString & text ); + TQString xface() const; + void setXFace( const TQString & text ); protected: - QCheckBox * mEnableCheck; - QTextEdit * mTextEdit; - QLabel * mXFaceLabel; - QComboBox * mSourceCombo; + TQCheckBox * mEnableCheck; + TQTextEdit * mTextEdit; + TQLabel * mXFaceLabel; + TQComboBox * mSourceCombo; private: |