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/graphicsview | |
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/graphicsview')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitem.cpp | 8 | ||||
-rw-r--r-- | src/widgets/graphicsview/qgraphicsscene.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index b3c7fb3e82..533564c1dc 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -7390,7 +7390,7 @@ void QGraphicsItem::setInputMethodHints(Qt::InputMethodHints hints) QWidget *fw = QApplication::focusWidget(); if (!fw) return; - qApp->inputMethod()->update(Qt::ImHints); + QGuiApplication::inputMethod()->update(Qt::ImHints); } /*! @@ -7408,7 +7408,7 @@ void QGraphicsItem::updateMicroFocus() for (int i = 0 ; i < scene()->views().count() ; ++i) { if (scene()->views().at(i) == fw) { if (qApp) - qApp->inputMethod()->update(Qt::ImQueryAll); + QGuiApplication::inputMethod()->update(Qt::ImQueryAll); break; } } @@ -10141,9 +10141,9 @@ bool QGraphicsTextItem::sceneEvent(QEvent *event) // Reset the focus widget's input context, regardless // of how this item gained or lost focus. if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) { - qApp->inputMethod()->reset(); + QGuiApplication::inputMethod()->reset(); } else { - qApp->inputMethod()->update(Qt::ImQueryInput); + QGuiApplication::inputMethod()->update(Qt::ImQueryInput); } break; case QEvent::ShortcutOverride: diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index 0230b68315..ad58aeb488 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -847,7 +847,7 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, // the views, but if we are changing focus, we have to // do it ourselves. if (qApp) - qApp->inputMethod()->commit(); + QGuiApplication::inputMethod()->commit(); } #endif //QT_NO_IM |