summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-07 14:28:57 (GMT)
committeraxis <qt-info@nokia.com>2009-05-04 13:24:07 (GMT)
commit0bc0c1c9b09cda459dbfdc16cb4089297160ce85 (patch)
tree9b619fc14285c3fd1b7dd7598c7f4b4301cc7f33 /src/gui/widgets/qlineedit.cpp
parent8d08c42c6a5478e8890d59f58483f4eff3d286ca (diff)
downloadQt-0bc0c1c9b09cda459dbfdc16cb4089297160ce85.zip
Qt-0bc0c1c9b09cda459dbfdc16cb4089297160ce85.tar.gz
Qt-0bc0c1c9b09cda459dbfdc16cb4089297160ce85.tar.bz2
Implemented RequestSoftwareInputPanel events in QLineEdit.
AutoTest: Included RevBy: denis
Diffstat (limited to 'src/gui/widgets/qlineedit.cpp')
-rw-r--r--src/gui/widgets/qlineedit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 8b553f9..d03cd3e 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1768,6 +1768,13 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e)
}
}
#endif
+
+ if (e->button() == Qt::LeftButton && (!d->clickCausedFocus
+ || QApplication::autoSipOnMouseFocus())) {
+ QEvent event(QEvent::RequestSoftwareInputPanel);
+ QApplication::sendEvent(this, &event);
+ }
+ d->clickCausedFocus = 0;
}
/*! \reimp
@@ -2350,6 +2357,8 @@ void QLineEdit::focusInEvent(QFocusEvent *e)
d->moveCursor(d->nextMaskBlank(0));
else if (!d->hasSelectedText())
selectAll();
+ } else if (e->reason() == Qt::MouseFocusReason) {
+ d->clickCausedFocus = 1;
}
#ifdef QT_KEYPAD_NAVIGATION
if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && e->reason() == Qt::PopupFocusReason))