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 --- kitchensync/src/kwidgetlist.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'kitchensync/src/kwidgetlist.cpp') diff --git a/kitchensync/src/kwidgetlist.cpp b/kitchensync/src/kwidgetlist.cpp index 3869bc1dd..011b4c73b 100644 --- a/kitchensync/src/kwidgetlist.cpp +++ b/kitchensync/src/kwidgetlist.cpp @@ -46,7 +46,7 @@ KWidgetList::KWidgetList( TQWidget *tqparent, const char *name ) addChild( d->mBox ); setResizePolicy( AutoOneFit ); - setFocusPolicy( TQWidget::StrongFocus ); + setFocusPolicy( Qt::StrongFocus ); viewport()->setFocus(); } @@ -169,7 +169,7 @@ KWidgetListItem *KWidgetList::item( int index ) const int KWidgetList::index( KWidgetListItem *item ) const { - return d->mItems.findIndex( item ); + return d->mItems.tqfindIndex( item ); } void KWidgetList::clear() @@ -191,11 +191,11 @@ void KWidgetList::setFocus() bool KWidgetList::eventFilter( TQObject *object, TQEvent *event ) { if ( event->type() == TQEvent::MouseButtonPress ) { - TQMouseEvent *mouseEvent = static_cast( event ); - if ( mouseEvent->button() & LeftButton ) { + TQMouseEvent *mouseEvent = TQT_TQMOUSEEVENT( event ); + if ( mouseEvent->button() & Qt::LeftButton ) { TQValueList::Iterator it; for ( it = d->mItems.begin(); it != d->mItems.end(); ++it ) { - if ( *it == object ) { + if ( TQT_BASE_OBJECT(*it) == TQT_BASE_OBJECT(object) ) { if ( d->mItems.count() != 1 ) { setSelected( *it ); emit selectionChanged( *it ); @@ -207,7 +207,7 @@ bool KWidgetList::eventFilter( TQObject *object, TQEvent *event ) } else if ( event->type() == TQEvent::MouseButtonDblClick ) { TQValueList::Iterator it; for ( it = d->mItems.begin(); it != d->mItems.end(); ++it ) { - if ( *it == object ) { + if ( TQT_BASE_OBJECT(*it) == TQT_BASE_OBJECT(object) ) { if ( d->mItems.count() != 1 ) { setSelected( *it ); emit doubleClicked( *it ); @@ -216,7 +216,7 @@ bool KWidgetList::eventFilter( TQObject *object, TQEvent *event ) } } } else if ( event->type() == TQEvent::KeyPress ) { - TQKeyEvent *keyEvent = static_cast( event ); + TQKeyEvent *keyEvent = TQT_TQKEYEVENT( event ); if ( keyEvent->key() == TQt::Key_Up ) { if ( d->mSelectedItem == 0 ) { if ( !d->mItems.isEmpty() ) { @@ -264,7 +264,7 @@ KWidgetListItem::KWidgetListItem( KWidgetList *tqparent, const char *name ) mSelectionForegroundColor = KGlobalSettings::highlightedTextColor(); mSelectionBackgroundColor = KGlobalSettings::highlightColor(); - setFocusPolicy( TQWidget::StrongFocus ); + setFocusPolicy( Qt::StrongFocus ); } KWidgetListItem::~KWidgetListItem() -- cgit v1.2.1