Replace QGuiApplication::activeWindow by focusWindow().

Fix deprecation warnings.

Change-Id: I8d33aa8c035df6f5ef3fff6a402e980e43e03406
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-04-26 09:33:16 +02:00 committed by Qt by Nokia
parent 89b6e2d704
commit e79d975be4
4 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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) {

View File

@ -112,7 +112,7 @@ void QInputMethod::setInputItem(QObject *inputItem)
*/
QWindow *QInputMethod::inputWindow() const
{
return qApp->activeWindow();
return qApp->focusWindow();
}
/*!

View File

@ -91,7 +91,7 @@ namespace QTest
QTEST_ASSERT(qApp);
if (!window)
window = QGuiApplication::activeWindow();
window = QGuiApplication::focusWindow();
QTEST_ASSERT(window);