diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-07-14 04:17:28 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-07-14 04:17:28 (GMT) |
commit | 291703873d208fec1eba1a039a79a61543745b35 (patch) | |
tree | 88e2b4a4a3cbe3463cb9b4f68609cdaf1e0ded51 | |
parent | f6e0f0d549de292f0bbab98a67b035a8327175bf (diff) | |
download | Qt-291703873d208fec1eba1a039a79a61543745b35.zip Qt-291703873d208fec1eba1a039a79a61543745b35.tar.gz Qt-291703873d208fec1eba1a039a79a61543745b35.tar.bz2 |
Cleanup some incorrect changes to QLineEdit
-rw-r--r-- | src/gui/widgets/qlineedit.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 92dcfc4..9252888 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1382,8 +1382,6 @@ bool QLineEdit::event(QEvent * e) QTimer::singleShot(0, this, SLOT(_q_handleWindowActivate())); }else if(e->type() == QEvent::ShortcutOverride){ d->control->processEvent(e); - }else if(e->type() == QEvent::LayoutDirectionChange){ - d->control->setLayoutDirection((layoutDirection())); } #ifdef QT_KEYPAD_NAVIGATION @@ -1462,7 +1460,9 @@ void QLineEdit::mouseMoveEvent(QMouseEvent * e) d->drag(); } else #endif + { d->control->moveCursor(d->xToPos(e->pos().x()), true); + } } } @@ -1473,16 +1473,15 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e) Q_D(QLineEdit); if (d->sendMouseEventToInputContext(e)) return; - - if (e->buttons() & Qt::LeftButton) { #ifndef QT_NO_DRAGANDDROP + if (e->button() == Qt::LeftButton) { if (d->dndTimer.isActive()) { - if ((d->dndPos - e->pos()).manhattanLength() > QApplication::startDragDistance()) - d->drag(); - } else -#endif - d->control->moveCursor(d->xToPos(e->pos().x()), true); + d->dndTimer.stop(); + deselect(); + return; + } } +#endif #ifndef QT_NO_CLIPBOARD if (QApplication::clipboard()->supportsSelection()) { if (e->button() == Qt::LeftButton) { |