diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-04-21 20:43:33 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-08-27 20:22:29 +0200 |
commit | 2436e259ced39657f22176537603da44ff4e2512 (patch) | |
tree | 001b836ef64a242bf12693d0a384e2f5da244862 /tests/auto/widgets/graphicsview/qgraphicssceneindex | |
parent | accc833e556ba54038d1cc7e261a936492145240 (diff) | |
download | qtbase-2436e259ced39657f22176537603da44ff4e2512.tar.gz |
Deprecate QApplication::setActiveWindow() and mark as internal
The function is used the internal window activation machinery and
should not be called by user code.
Many tests still use this function, and should be ported over to
QWidget::activateWindow(). For now they are using the private
helper in QApplicationPrivate, so that we can progress with the
public API deprecation.
Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicssceneindex')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp index 4cad9906bb..c0536419b7 100644 --- a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp @@ -8,6 +8,7 @@ #include <private/qgraphicsscenebsptreeindex_p.h> #include <private/qgraphicssceneindex_p.h> #include <private/qgraphicsscenelinearindex_p.h> +#include <QtWidgets/private/qapplication_p.h> class tst_QGraphicsSceneIndex : public QObject { @@ -290,7 +291,7 @@ void tst_QGraphicsSceneIndex::removeItems() QGraphicsView view(&scene); view.resize(600, 600); view.show(); - QApplication::setActiveWindow(&view); + QApplicationPrivate::setActiveWindow(&view); QVERIFY(QTest::qWaitForWindowActive(&view)); scene.removeItem(widgetChild1); @@ -322,7 +323,7 @@ void tst_QGraphicsSceneIndex::clear() QGraphicsView view(&scene); view.show(); - qApp->setActiveWindow(&view); + QApplicationPrivate::setActiveWindow(&view); QVERIFY(QTest::qWaitForWindowActive(&view)); scene.clear(); |