SVN commit 1032187 by mlaurent: Clean up it M +0 -40 kmreaderwin.cpp M +0 -5 kmreaderwin.h --- branches/work/akonadi-ports/kdepim/kmail/kmreaderwin.cpp #1032186:1032187 @@ -172,7 +172,6 @@ mOpenAddrBookAction( 0 ), mUrlSaveAsAction( 0 ), mAddBookmarksAction( 0 ), - mCanStartDrag( false ), mShowFullToAddressList( false ), mShowFullCcAddressList( false ) { @@ -1508,46 +1507,7 @@ slotHandleAttachment( KMHandleAttachmentCommand::Save ); // save } #endif -//----------------------------------------------------------------------------- -bool KMReaderWin::eventFilter( QObject *, QEvent *e ) -{ - if ( e->type() == QEvent::MouseButtonPress ) { - QMouseEvent* me = static_cast(e); - if ( me->button() == Qt::LeftButton && ( me->modifiers() & Qt::ShiftModifier ) ) { - // special processing for shift+click - URLHandlerManager::instance()->handleShiftClick( mHoveredUrl, this ); - return true; - } - if ( me->button() == Qt::LeftButton ) { - mCanStartDrag = URLHandlerManager::instance()->willHandleDrag( mHoveredUrl, this ); - mLastClickPosition = me->pos(); - } - } - - if ( e->type() == QEvent::MouseButtonRelease ) { - mCanStartDrag = false; - } - - if ( e->type() == QEvent::MouseMove ) { - QMouseEvent* me = static_cast( e ); - - if ( ( mLastClickPosition - me->pos() ).manhattanLength() > KGlobalSettings::dndEventDelay() ) { - if ( mCanStartDrag && !mHoveredUrl.isEmpty() && mHoveredUrl.protocol() == "attachment" ) { - mCanStartDrag = false; - URLHandlerManager::instance()->handleDrag( mHoveredUrl, this ); -#ifndef USE_AKONADI_VIEWER - slotUrlOn( QString() ); -#endif - return true; - } - } - } - - // standard event processing - return false; -} - void KMReaderWin::fillCommandInfo( partNode *node, KMMessage **msg, int *nodeId ) { Q_ASSERT( msg && nodeId ); --- branches/work/akonadi-ports/kdepim/kmail/kmreaderwin.h #1032186:1032187 @@ -435,8 +435,6 @@ /** Cleanup the attachment temp files */ virtual void removeTempFiles(); - /** Event filter */ - bool eventFilter( QObject *obj, QEvent *ev ); KUrl urlClicked() const; private: @@ -462,9 +460,6 @@ KAction *mMailToComposeAction, *mMailToReplyAction, *mMailToForwardAction, *mAddAddrBookAction, *mOpenAddrBookAction, *mUrlSaveAsAction, *mAddBookmarksAction, *mSelectAllAction; - KUrl mHoveredUrl; - QPoint mLastClickPosition; - bool mCanStartDrag; MessageViewer::Viewer *mViewer;