summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authorDan Cape <dcape@qnx.com>2015-10-06 14:00:15 -0400
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-10-19 11:01:07 +0000
commite56938b4bb244dfccdb78aed66c842d65fe64c14 (patch)
tree499cc82888e02da9261e5a86f62716001ba6e8df /src/widgets/widgets/qlineedit.cpp
parent9636d8bee055e03417d97a9f4f58d7074a753737 (diff)
QLineEdit: Unable to drag selected text when aligned right or center
Created local inSelection function to modify the x value (similar to xToPos()) before sending it to the control. Ran the QLineEdit test and manually tested with AlignLeft, AlignRight and AlignCenter. Change-Id: I088430580dc87f3cfff90c4cd9ff90e6ab215f57 Task-number: QTBUG-48495 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qlineedit.cpp')
-rw-r--r--src/widgets/widgets/qlineedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 32502fca09..6b32665065 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -1488,7 +1488,7 @@ void QLineEdit::mousePressEvent(QMouseEvent* e)
int cursor = d->xToPos(e->pos().x());
#ifndef QT_NO_DRAGANDDROP
if (!mark && d->dragEnabled && d->control->echoMode() == Normal &&
- e->button() == Qt::LeftButton && d->control->inSelection(e->pos().x())) {
+ e->button() == Qt::LeftButton && d->inSelection(e->pos().x())) {
if (!d->dndTimer.isActive())
d->dndTimer.start(QApplication::startDragTime(), this);
} else