diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-02-23 17:13:09 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-02-25 14:06:27 +0000 |
commit | 7bbde34ee012bbe90c4ce76736c6f71b16e64215 (patch) | |
tree | 964071b52f26b84ec1139db544d959adaafdf0a1 /src/widgets/widgets | |
parent | e4e8a8ac77e3d09246412f1bf68324cfe90d00e2 (diff) |
Fix invocations of static methods of QGuiApplication/QApplication.
Change-Id: I99ba58763f6063fa2a6f511adbea0163cce7ea32
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qlineedit_p.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index cc4d2f7701..ab4c7bfff6 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2646,7 +2646,7 @@ void QComboBox::showPopup() } if (qApp) { - qApp->inputMethod()->reset(); + QGuiApplication::inputMethod()->reset(); } QScrollBar *sb = view()->horizontalScrollBar(); diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index b7d2ab4059..6a41c3791f 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -250,7 +250,7 @@ void QLineEditPrivate::resetInputMethod() { Q_Q(QLineEdit); if (q->hasFocus() && qApp) { - qApp->inputMethod()->reset(); + QGuiApplication::inputMethod()->reset(); } } @@ -270,7 +270,7 @@ bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e ) if (mousePos >= 0) { if (e->type() == QEvent::MouseButtonRelease) - qApp->inputMethod()->invokeAction(QInputMethod::Click, mousePos); + QGuiApplication::inputMethod()->invokeAction(QInputMethod::Click, mousePos); return true; } diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index 4cf7e1812e..f259f7e3a4 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -183,7 +183,7 @@ void QWidgetLineControl::commitPreedit() if (!composeMode()) return; - qApp->inputMethod()->commit(); + QGuiApplication::inputMethod()->commit(); if (!composeMode()) return; diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index f181222655..039453f0d5 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -230,7 +230,7 @@ public: { #ifndef QT_NO_IM if (composeMode()) - qApp->inputMethod()->reset(); + QGuiApplication::inputMethod()->reset(); #endif internalSetText(txt, -1, false); } @@ -328,7 +328,7 @@ public: Qt::LayoutDirection layoutDirection() const { if (m_layoutDirection == Qt::LayoutDirectionAuto) { if (m_text.isEmpty()) - return qApp->inputMethod()->inputDirection(); + return QGuiApplication::inputMethod()->inputDirection(); return m_text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight; } return m_layoutDirection; diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 39e0aa5b7a..b0325893a4 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -1739,7 +1739,7 @@ void QWidgetTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button _q_updateCurrentCharFormatAndSelection(); #ifndef QT_NO_IM if (contextWidget) - qApp->inputMethod()->update(Qt::ImQueryInput); + QGuiApplication::inputMethod()->update(Qt::ImQueryInput); #endif //QT_NO_IM } else { //emit q->visibilityRequest(QRectF(mousePos, QSizeF(1, 1))); @@ -1887,7 +1887,7 @@ bool QWidgetTextControlPrivate::sendMouseEventToInputContext( if (cursorPos >= 0) { if (eventType == QEvent::MouseButtonRelease) - qApp->inputMethod()->invokeAction(QInputMethod::Click, cursorPos); + QGuiApplication::inputMethod()->invokeAction(QInputMethod::Click, cursorPos); e->setAccepted(true); return true; @@ -2867,7 +2867,7 @@ void QWidgetTextControlPrivate::commitPreedit() if (!isPreediting()) return; - qApp->inputMethod()->commit(); + QGuiApplication::inputMethod()->commit(); if (!isPreediting()) return; |