From 1c93fca14d9ce37499bcfdf994c660186a0b6f17 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 14 Apr 2011 20:16:30 +0000 Subject: Enable kdepim compilation under Qt4 This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/kmheaders.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'kmail/kmheaders.cpp') diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp index f20ceb99..fc282fec 100644 --- a/kmail/kmheaders.cpp +++ b/kmail/kmheaders.cpp @@ -144,7 +144,7 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, TQWidget *tqparent, connect(mPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotToggleColumn(int))); setShowSortIndicator(true); - setFocusPolicy( WheelFocus ); + setFocusPolicy( Qt::WheelFocus ); if (!pixmapsLoaded) { @@ -236,7 +236,7 @@ KMHeaders::~KMHeaders () bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e ) { if ( e->type() == TQEvent::MouseButtonPress && - static_cast(e)->button() == RightButton && + TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton && o->isA(TQHEADER_OBJECT_NAME_STRING) ) { // if we currently only show one of either sender/receiver column @@ -249,7 +249,7 @@ bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e ) else mPopup->changeItem(KPaintInfo::COL_RECEIVER, i18n("Receiver")); - mPopup->popup( static_cast(e)->globalPos() ); + mPopup->popup( TQT_TQMOUSEEVENT(e)->globalPos() ); return true; } return KListView::eventFilter(o, e); @@ -429,10 +429,10 @@ void KMHeaders::readColorConfig (void) KConfig* config = KMKernel::config(); // Custom/System colors KConfigGroupSaver saver(config, "Reader"); - TQColor c1=TQColor(kapp->palette().active().text()); + TQColor c1=TQColor(kapp->tqpalette().active().text()); TQColor c2=TQColor("red"); TQColor c3=TQColor("blue"); - TQColor c4=TQColor(kapp->palette().active().base()); + TQColor c4=TQColor(kapp->tqpalette().active().base()); TQColor c5=TQColor(0,0x7F,0); TQColor c6=TQColor(0,0x98,0); TQColor c7=KGlobalSettings::alternateBackgroundColor(); @@ -1163,11 +1163,11 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) } if ((!tqparent || sci->isImperfectlyThreaded()) - && !mImperfectlyThreadedList.containsRef(item)) + && !mImperfectlyThreadedList.tqcontainsRef(item)) mImperfectlyThreadedList.append(item); if (tqparent && !sci->isImperfectlyThreaded() - && mImperfectlyThreadedList.containsRef(item)) + && mImperfectlyThreadedList.tqcontainsRef(item)) mImperfectlyThreadedList.removeRef(item); } } @@ -1178,7 +1178,7 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) mImperfectlyThreadedList.removeRef( removedItem ); #ifdef DEBUG // This should never happen, in this case the folders are inconsistent. - while ( mImperfectlyThreadedList.findRef( removedItem ) != -1 ) { + while ( mImperfectlyThreadedList.tqfindRef( removedItem ) != -1 ) { mImperfectlyThreadedList.remove(); kdDebug(5006) << "Remove doubled item from mImperfectlyThreadedList: " << removedItem << endl; } @@ -1371,10 +1371,10 @@ 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().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1; + if( tqstyle().isA("KeramikStyle") ) + frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1; else - frameWidth = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ); + frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ); if ( frameWidth < 0 ) frameWidth = 0; if ( frameWidth != lineWidth() ) @@ -1399,10 +1399,10 @@ void KMHeaders::setFolderInfotqStatus () else str = unread ? i18n( "1 unread", "%n unread", unread ) : i18n( "0 unread" ); const int count = mFolder->count(); - str = count ? i18n( "1 message, %1.", "%n messages, %1.", count ).arg( str ) + str = count ? i18n( "1 message, %1.", "%n messages, %1.", count ).tqarg( str ) : i18n( "0 messages" ); // no need for "0 unread" to be added here if ( mFolder->isReadOnly() ) - str = i18n("%1 = n messages, m unread.", "%1 Folder is read-only.").arg( str ); + str = i18n("%1 = n messages, m unread.", "%1 Folder is read-only.").tqarg( str ); BroadcastqStatus::instance()->seStatusMsg(str); } @@ -1451,7 +1451,7 @@ void KMHeaders::applyFiltersOnMsg() if ( msgCountToFilter - msgCount < 10 || !( msgCount % 20 ) || msgCount <= 10 ) { progressItem->updateProgress(); TQString statusMsg = i18n("Filtering message %1 of %2"); - statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter ); + statusMsg = statusMsg.tqarg( msgCount ).tqarg( msgCountToFilter ); KPIM::BroadcastqStatus::instance()->seStatusMsg( statusMsg ); KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 ); } @@ -2333,12 +2333,12 @@ void KMHeaders::contentsMousePressEvent(TQMouseEvent* e) if ( e->state() & ControlButton ) setSelected( lvi, !wasSelected ); - if ((e->button() == LeftButton) ) + if ((e->button() == Qt::LeftButton) ) mMousePressed = true; } // check if we are on a status column and toggle it - if ( lvi && e->button() == LeftButton && !( e->state() & (ShiftButton | ControlButton | AltButton | MetaButton) ) ) { + if ( lvi && e->button() == Qt::LeftButton && !( e->state() & (ShiftButton | ControlButton | AltButton | MetaButton) ) ) { bool flagsToggleable = GlobalSettings::self()->allowLocalFlags() || !(mFolder ? mFolder->isReadOnly() : true); int section = header()->sectionAt( e->pos().x() ); HeaderItem *item = static_cast( lvi ); @@ -2366,7 +2366,7 @@ void KMHeaders::contentsMousePressEvent(TQMouseEvent* e) //----------------------------------------------------------------------------- void KMHeaders::contentsMouseReleaseEvent(TQMouseEvent* e) { - if (e->button() != RightButton) + if (e->button() != Qt::RightButton) KListView::contentsMouseReleaseEvent(e); mMousePressed = false; @@ -2465,7 +2465,7 @@ void KMHeaders::slotRMB() menu->insertSeparator(); TQPopupMenu *msgCopyMenu = new TQPopupMenu(menu); - mOwner->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this, + mOwner->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, TQT_TQOBJECT(this), &mMenuToFolder, msgCopyMenu ); menu->insertItem(i18n("&Copy To"), msgCopyMenu); @@ -2474,7 +2474,7 @@ void KMHeaders::slotRMB() menu->setItemEnabled( id, false ); } else { TQPopupMenu *msgMoveMenu = new TQPopupMenu(menu); - mOwner->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage, this, + mOwner->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage, TQT_TQOBJECT(this), &mMenuToFolder, msgMoveMenu ); menu->insertItem(i18n("&Move To"), msgMoveMenu); } @@ -2815,7 +2815,7 @@ bool KMHeaders::writeSortOrder() unlink(TQFile::encodeName(sortFile)); kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on tqdevice?)" << endl; kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl; - kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").arg( sortFile )); + kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").tqarg( sortFile )); } fclose(sortStream); ::rename(TQFile::encodeName(tempName), TQFile::encodeName(sortFile)); @@ -2855,7 +2855,7 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi) unlink(TQFile::encodeName(sortFile)); kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on tqdevice?)" << endl; kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl; - kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").arg( sortFile )); + kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").tqarg( sortFile )); } fclose(sortStream); } else { @@ -3557,7 +3557,7 @@ void KMHeaders::cutMessages() void KMHeaders::pasteMessages() { - new MessageCopyHelper( mCopiedMessages, folder(), mMoveMessages, this ); + new MessageCopyHelper( mCopiedMessages, folder(), mMoveMessages, TQT_TQOBJECT(this) ); if ( mMoveMessages ) { mCopiedMessages.clear(); updateActions(); -- cgit v1.2.3