Replace QGuiApplication::activeWindow by focusWindow().
Fix deprecation warnings. Change-Id: I8d33aa8c035df6f5ef3fff6a402e980e43e03406 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
89b6e2d704
commit
e79d975be4
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -112,7 +112,7 @@ void QInputMethod::setInputItem(QObject *inputItem)
|
||||
*/
|
||||
QWindow *QInputMethod::inputWindow() const
|
||||
{
|
||||
return qApp->activeWindow();
|
||||
return qApp->focusWindow();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -91,7 +91,7 @@ namespace QTest
|
||||
QTEST_ASSERT(qApp);
|
||||
|
||||
if (!window)
|
||||
window = QGuiApplication::activeWindow();
|
||||
window = QGuiApplication::focusWindow();
|
||||
|
||||
QTEST_ASSERT(window);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user