From: Friedemann Kleint Date: Thu, 26 Apr 2012 07:33:16 +0000 (+0200) Subject: Replace QGuiApplication::activeWindow by focusWindow(). X-Git-Tag: 071012110112~1351 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e79d975be4976b824a5c29ef005162f0e72f4f67;p=profile%2Fivi%2Fqtbase.git Replace QGuiApplication::activeWindow by focusWindow(). Fix deprecation warnings. Change-Id: I8d33aa8c035df6f5ef3fff6a402e980e43e03406 Reviewed-by: Friedemann Kleint --- diff --git a/src/gui/accessible/qaccessibleobject.cpp b/src/gui/accessible/qaccessibleobject.cpp index db4ee24..22c8ba5 100644 --- a/src/gui/accessible/qaccessibleobject.cpp +++ b/src/gui/accessible/qaccessibleobject.cpp @@ -243,7 +243,7 @@ QAccessibleInterface *QAccessibleApplication::child(int index) const /*! \reimp */ QAccessibleInterface *QAccessibleApplication::focusChild() const { - if (QWindow *window = QGuiApplication::activeWindow()) + if (QWindow *window = QGuiApplication::focusWindow()) return window->accessibleRoot(); return 0; } diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index fac466b..91c2a9d 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1248,7 +1248,7 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE QWindow *window = e->window.data(); modifier_buttons = e->modifiers; if (e->nullWindow) - window = QGuiApplication::activeWindow(); + window = QGuiApplication::focusWindow(); if (!window) return; if (window->d_func()->blockedByModalWindow) { diff --git a/src/gui/kernel/qinputmethod.cpp b/src/gui/kernel/qinputmethod.cpp index c443a47..1144c79 100644 --- a/src/gui/kernel/qinputmethod.cpp +++ b/src/gui/kernel/qinputmethod.cpp @@ -112,7 +112,7 @@ void QInputMethod::setInputItem(QObject *inputItem) */ QWindow *QInputMethod::inputWindow() const { - return qApp->activeWindow(); + return qApp->focusWindow(); } /*! diff --git a/src/testlib/qtestkeyboard.h b/src/testlib/qtestkeyboard.h index 5625bd6..2e43e86 100644 --- a/src/testlib/qtestkeyboard.h +++ b/src/testlib/qtestkeyboard.h @@ -91,7 +91,7 @@ namespace QTest QTEST_ASSERT(qApp); if (!window) - window = QGuiApplication::activeWindow(); + window = QGuiApplication::focusWindow(); QTEST_ASSERT(window);