diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmail/subscriptiondialog.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/subscriptiondialog.cpp')
-rw-r--r-- | kmail/subscriptiondialog.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kmail/subscriptiondialog.cpp b/kmail/subscriptiondialog.cpp index bb9c5c6c9..346cfa8c8 100644 --- a/kmail/subscriptiondialog.cpp +++ b/kmail/subscriptiondialog.cpp @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -45,9 +45,9 @@ namespace KMail { -SubscriptionDialogBase::SubscriptionDialogBase( TQWidget *parent, const TQString &caption, +SubscriptionDialogBase::SubscriptionDialogBase( TQWidget *tqparent, const TQString &caption, KAccount *acct, TQString startPath ) - : KSubscription( parent, caption, acct, User1, TQString::null, false ), + : KSubscription( tqparent, caption, acct, User1, TQString(), false ), mStartPath( startPath ), mSubscribed( false ), mForceSubscriptionEnable( false) { // hide unneeded checkboxes @@ -100,7 +100,7 @@ void SubscriptionDialogBase::moveChildrenToNewParent( GroupItem *oldItem, GroupI { oldItem->takeItem(cur); item->insertItem(cur); - if ( cur->isSelected() ) // we have new parents so open them + if ( cur->isSelected() ) // we have new tqparents so open them folderTree()->ensureItemVisible( cur ); ++it; } @@ -111,19 +111,19 @@ void SubscriptionDialogBase::moveChildrenToNewParent( GroupItem *oldItem, GroupI void SubscriptionDialogBase::createListViewItem( int i ) { GroupItem *item = 0; - GroupItem *parent = 0; + GroupItem *tqparent = 0; - // get the parent + // get the tqparent GroupItem *oldItem = 0; - TQString parentPath; - findParentItem( mFolderNames[i], mFolderPaths[i], parentPath, &parent, &oldItem ); + TQString tqparentPath; + findParentItem( mFolderNames[i], mFolderPaths[i], tqparentPath, &tqparent, &oldItem ); - if (!parent && parentPath != "/") + if (!tqparent && tqparentPath != "/") { - // the parent is not available and it's no root-item + // the tqparent 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 - TQStringList folders = TQStringList::split(mDelimiter, parentPath); + // so we create each tqparent in advance + TQStringList folders = TQStringList::split(mDelimiter, tqparentPath); uint i = 0; for ( TQStringList::Iterator it = folders.begin(); it != folders.end(); ++it ) { @@ -154,17 +154,17 @@ void SubscriptionDialogBase::createListViewItem( int i ) // as these items are "dummies" we create them non-checkable if (!item) { - if (parent) - item = new GroupItem(parent, info, this, false); + if (tqparent) + item = new GroupItem(tqparent, info, this, false); else item = new GroupItem(folderTree(), info, this, false); mItemDict.insert(info.path, item); } - parent = item; + tqparent = item; ++i; } // folders - } // parent + } // tqparent KGroupInfo info(mFolderNames[i]); if (mFolderNames[i].upper() == "INBOX" && @@ -175,8 +175,8 @@ void SubscriptionDialogBase::createListViewItem( int i ) // only checkable when the folder is selectable bool checkable = ( mFolderMimeTypes[i] == "inode/directory" ) ? false : true; // create a new item - if (parent) - item = new GroupItem(parent, info, this, checkable); + if (tqparent) + item = new GroupItem(tqparent, info, this, checkable); else item = new GroupItem(folderTree(), info, this, checkable); @@ -198,18 +198,18 @@ void SubscriptionDialogBase::createListViewItem( int i ) //------------------------------------------------------------------------------ -void SubscriptionDialogBase::findParentItem( TQString &name, TQString &path, TQString &parentPath, - GroupItem **parent, GroupItem **oldItem ) +void SubscriptionDialogBase::findParentItem( TQString &name, TQString &path, TQString &tqparentPath, + GroupItem **tqparent, GroupItem **oldItem ) { - // remove the name (and the separator) from the path to get the parent path + // remove the name (and the separator) from the path to get the tqparent path int start = path.length() - (name.length()+2); int length = name.length()+1; if (start < 0) start = 0; - parentPath = path; - parentPath.remove(start, length); + tqparentPath = path; + tqparentPath.remove(start, length); - // find the parent by it's path - *parent = mItemDict[parentPath]; + // find the tqparent by it's path + *tqparent = mItemDict[tqparentPath]; // check if the item already exists *oldItem = mItemDict[path]; @@ -303,9 +303,9 @@ void SubscriptionDialogBase::loadingComplete() // implementation for server side subscription //------------------------------------------------------------------------------ -SubscriptionDialog::SubscriptionDialog( TQWidget *parent, const TQString &caption, +SubscriptionDialog::SubscriptionDialog( TQWidget *tqparent, const TQString &caption, KAccount *acct, TQString startPath ) - : SubscriptionDialogBase( parent, caption, acct, startPath ) + : SubscriptionDialogBase( tqparent, caption, acct, startPath ) { } |