From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: 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 --- kmail/treebase.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'kmail/treebase.cpp') diff --git a/kmail/treebase.cpp b/kmail/treebase.cpp index 74afe85ba..a2a823370 100644 --- a/kmail/treebase.cpp +++ b/kmail/treebase.cpp @@ -27,9 +27,9 @@ using namespace KMail; -TreeBase::TreeBase( TQWidget *parent, KMFolderTree *folderTree, +TreeBase::TreeBase( TQWidget *tqparent, KMFolderTree *folderTree, const TQString &preSelection, bool mustBeReadWrite ) - : KListView( parent ), mFolderTree( folderTree ) + : KListView( tqparent ), mFolderTree( folderTree ) { Q_UNUSED( preSelection ); Q_UNUSED( mustBeReadWrite ); @@ -116,13 +116,13 @@ void TreeBase::recolorRows() TQListViewItem * item = it.current() ; if ( item->isVisible() ) { bool visible = true; - TQListViewItem * parent = item->parent(); - while ( parent ) { - if (!parent->isOpen()) { + TQListViewItem * tqparent = item->tqparent(); + while ( tqparent ) { + if (!tqparent->isOpen()) { visible = false; break; } - parent = parent->parent(); + tqparent = tqparent->tqparent(); } if ( visible ) { @@ -174,7 +174,7 @@ void TreeBase::reload( bool mustBeReadWrite, bool showOutbox, bool showImapFolde } else { if ( depth > lastDepth ) { - // next lower level - parent node will get opened + // next lower level - tqparent node will get opened item = createItem( lastItem ); lastItem->setOpen( true ); } @@ -183,15 +183,15 @@ void TreeBase::reload( bool mustBeReadWrite, bool showOutbox, bool showImapFolde path = path.section( '/', 0, -2 - (lastDepth-depth) ); if ( depth == lastDepth ) // same level - behind previous item - item = createItem( lastItem->parent(), lastItem ); + item = createItem( lastItem->tqparent(), lastItem ); else if ( depth < lastDepth ) { // above previous level - might be more than one level difference // but highest possibility is top level - while ( ( depth <= --lastDepth ) && lastItem->parent() ) { - lastItem = static_cast( lastItem->parent() ); + while ( ( depth <= --lastDepth ) && lastItem->tqparent() ) { + lastItem = static_cast( lastItem->tqparent() ); } - if ( lastItem->parent() ) - item = createItem( lastItem->parent(), lastItem ); + if ( lastItem->tqparent() ) + item = createItem( lastItem->tqparent(), lastItem ); else { // chain somehow broken - what does cause this ??? kdDebug( 5006 ) << "You shouldn't get here: depth=" << depth -- cgit v1.2.1