diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qlineedit.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/qplaintextedit.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/qtextedit.cpp | 6 |
3 files changed, 3 insertions, 15 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index cd9666d..5dabd98 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1494,11 +1494,7 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e) } #endif - if (e->button() == Qt::LeftButton && qApp->autoSipEnabled() - && (!d->clickCausedFocus || qApp->autoSipOnMouseFocus())) { - QEvent event(QEvent::RequestSoftwareInputPanel); - QApplication::sendEvent(this, &event); - } + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index 7d9d2b5..7f71d1e 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -1932,11 +1932,7 @@ void QPlainTextEdit::mouseReleaseEvent(QMouseEvent *e) d->ensureCursorVisible(); } - if (e->button() == Qt::LeftButton && qApp->autoSipEnabled() - && (!d->clickCausedFocus || qApp->autoSipOnMouseFocus())) { - QEvent event(QEvent::RequestSoftwareInputPanel); - QApplication::sendEvent(this, &event); - } + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 57f43c6..d6c74d8 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -1569,11 +1569,7 @@ void QTextEdit::mouseReleaseEvent(QMouseEvent *e) d->autoScrollTimer.stop(); ensureCursorVisible(); } - if (e->button() == Qt::LeftButton && qApp->autoSipEnabled() - && (!d->clickCausedFocus || qApp->autoSipOnMouseFocus())) { - QEvent event(QEvent::RequestSoftwareInputPanel); - QApplication::sendEvent(this, &event); - } + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } |