summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-09-16 01:13:21 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-09-16 01:13:21 (GMT)
commita4571547a38d68d6778bf0ebfa4dc26cc3d865a3 (patch)
tree47b86720acd0b786e4c78409ded0e2053ec4a6eb /src/gui/widgets/qlineedit.cpp
parentdd6cf1a26fdf371a2cd394bd282b6190458e961a (diff)
parentc878fde1d0ddd54c8dff485e7c7146b3d8962fb9 (diff)
downloadQt-a4571547a38d68d6778bf0ebfa4dc26cc3d865a3.zip
Qt-a4571547a38d68d6778bf0ebfa4dc26cc3d865a3.tar.gz
Qt-a4571547a38d68d6778bf0ebfa4dc26cc3d865a3.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/widgets/qlineedit.cpp')
-rw-r--r--src/gui/widgets/qlineedit.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 37e57cf..629e839 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1434,7 +1434,6 @@ void QLineEdit::mousePressEvent(QMouseEvent* e)
#ifndef QT_NO_DRAGANDDROP
if (!mark && d->dragEnabled && d->control->echoMode() == Normal &&
e->button() == Qt::LeftButton && d->control->inSelection(e->pos().x())) {
- d->control->moveCursor(cursor);
d->dndPos = e->pos();
if (!d->dndTimer.isActive())
d->dndTimer.start(QApplication::startDragTime(), this);
@@ -1851,8 +1850,12 @@ void QLineEdit::paintEvent(QPaintEvent *)
#ifdef QT_KEYPAD_NAVIGATION
if (!QApplication::keypadNavigationEnabled() || hasEditFocus())
#endif
- if (d->control->hasSelectedText() || (d->cursorVisible && !d->control->inputMask().isEmpty() && !d->control->isReadOnly()))
+ if (d->control->hasSelectedText() || (d->cursorVisible && !d->control->inputMask().isEmpty() && !d->control->isReadOnly())){
flags |= QLineControl::DrawSelections;
+ // Palette only used for selections/mask and may not be in sync
+ if(d->control->palette() != pal)
+ d->control->setPalette(pal);
+ }
// Asian users see an IM selection text as cursor on candidate
// selection phase of input method, so the ordinary cursor should be