From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/subscriptiondialog.cpp | 70 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'kmail/subscriptiondialog.cpp') 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 itemsToMove; - QListViewItem * myChild = oldItem->firstChild(); + TQPtrList itemsToMove; + TQListViewItem * myChild = oldItem->firstChild(); while (myChild) { itemsToMove.append(myChild); myChild = myChild->nextSibling(); } - QPtrListIterator it( itemsToMove ); - QListViewItem *cur; + TQPtrListIterator 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(account())->changeSubscription(true, @@ -396,7 +396,7 @@ void SubscriptionDialog::doSave() } // unsubscribe - QListViewItemIterator it2(unsubView); + TQListViewItemIterator it2(unsubView); for ( ; it2.current(); ++it2) { static_cast(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; -- cgit v1.2.1