-rw-r--r-- | microkde/ktextedit.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/microkde/ktextedit.cpp b/microkde/ktextedit.cpp index 4dd6875..d74706b 100644 --- a/microkde/ktextedit.cpp +++ b/microkde/ktextedit.cpp @@ -2,10 +2,12 @@ #include <ktextedit.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> +//Added by qt3to4: +#include <QMouseEvent> #endif -KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent ) +KTextEdit::KTextEdit ( QWidget *parent ) : Q3MultiLineEdit( parent ) { mAllowPopupMenu = false; mMouseDown = false; @@ -17,14 +19,14 @@ KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent ) void KTextEdit::mousePressEvent(QMouseEvent *e) { - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { mAllowPopupMenu = true; mYMousePos = mapToGlobal( (e->pos())).y(); mXMousePos = mapToGlobal( (e->pos())).x(); } - if ( e->button() == RightButton && !mAllowPopupMenu ) + if ( e->button() == Qt::RightButton && !mAllowPopupMenu ) return; - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { if ( hasMarkedText () ) mIgnoreMark = !mIgnoreMark; if ( mIgnoreMark && hasMarkedText () ) { @@ -32,12 +34,12 @@ void KTextEdit::mousePressEvent(QMouseEvent *e) return ; } } - QMultiLineEdit::mousePressEvent( e ); + Q3MultiLineEdit::mousePressEvent( e ); } void KTextEdit::mouseReleaseEvent(QMouseEvent *e) { - QMultiLineEdit::mouseReleaseEvent(e); + Q3MultiLineEdit::mouseReleaseEvent(e); } void KTextEdit::mouseMoveEvent(QMouseEvent *e) @@ -48,6 +50,6 @@ void KTextEdit::mouseMoveEvent(QMouseEvent *e) if ( diff2 < 0 ) diff2 = -diff2; if ( diff+ diff2 > 20 ) mAllowPopupMenu = false; - QMultiLineEdit::mouseMoveEvent(e); + Q3MultiLineEdit::mouseMoveEvent(e); } |