diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-10-11 15:57:46 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-10-13 22:30:08 +0200 |
commit | 947188b969d14dd37c1c8b00b0b9c572cdd6cfac (patch) | |
tree | c3a888057ddc620d5669703eec252bdb8aeeceee /tests/auto/widgets/kernel | |
parent | 0df7831d01b03910ae74a432c2a07a29d99fc315 (diff) |
Fix references to QGuiApplication::lastWindowClosed
The signal is emitted from QGuiApplication these days.
Pick-to: 6.2
Change-Id: I7423cd4808e8df86960f225fd6e4a12a1a4f11f3
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 4 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 8216cfbab0..e5ac69a00b 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -792,7 +792,7 @@ void tst_QApplication::quitOnLastWindowClosed() { int argc = 0; QApplication app(argc, nullptr); - QSignalSpy appSpy(&app, &QApplication::lastWindowClosed); + QSignalSpy appSpy(&app, &QGuiApplication::lastWindowClosed); // exec a dialog for 1 second, then show the window QuitOnLastWindowClosedWindow window; @@ -1335,7 +1335,7 @@ void tst_QApplication::testDeleteLater() #endif int argc = 0; QApplication app(argc, nullptr); - connect(&app, &QApplication::lastWindowClosed, &app, &QCoreApplication::quit); + connect(&app, &QGuiApplication::lastWindowClosed, &app, &QCoreApplication::quit); DeleteLaterWidget *wgt = new DeleteLaterWidget(&app); QTimer::singleShot(500, wgt, &DeleteLaterWidget::runTest); diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 3f73b2ff26..a7c3f86687 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -12225,7 +12225,7 @@ void tst_QWidget::deleteWindowInCloseEvent() */ void tst_QWidget::quitOnClose() { - QSignalSpy quitSpy(qApp, &QApplication::lastWindowClosed); + QSignalSpy quitSpy(qApp, &QGuiApplication::lastWindowClosed); std::unique_ptr<QWidget>widget(new QWidget); widget->show(); |