diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-17 16:48:51 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-24 17:40:17 +0200 |
commit | cc54685b8d0610a682983418bd771e4d6f5f338b (patch) | |
tree | 7eebd52afff683ef28e736e22cd78a6bd9b98100 /tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | |
parent | 5d32552cf40d8ec15ed313f71559444c8765efd2 (diff) |
Remove deprecated ApplicationAttribute enum values
In the declaration, leave them in as comments so that the gaps in the
numbering of the values doesn't create confusion.
Change-Id: I92ff299416896c471e7c7d80b988cd4642b6b756
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 59ea12ce70..245e107170 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -1843,25 +1843,24 @@ void tst_QApplication::setAttribute() { int argc = 1; QApplication app(argc, &argv0); - QVERIFY(!QApplication::testAttribute(Qt::AA_ImmediateWidgetCreation)); + QVERIFY(!QApplication::testAttribute(Qt::AA_NativeWindows)); QWidget *w = new QWidget; - QVERIFY(!w->testAttribute(Qt::WA_WState_Created)); + w->show(); // trigger creation; + QVERIFY(!w->testAttribute(Qt::WA_NativeWindow)); delete w; - QApplication::setAttribute(Qt::AA_ImmediateWidgetCreation); - QVERIFY(QApplication::testAttribute(Qt::AA_ImmediateWidgetCreation)); + QApplication::setAttribute(Qt::AA_NativeWindows); + QVERIFY(QApplication::testAttribute(Qt::AA_NativeWindows)); w = new QWidget; - QVERIFY(w->testAttribute(Qt::WA_WState_Created)); - QWidget *w2 = new QWidget(w); - w2->setParent(nullptr); - QVERIFY(w2->testAttribute(Qt::WA_WState_Created)); + w->show(); // trigger creation + QVERIFY(w->testAttribute(Qt::WA_NativeWindow)); delete w; - delete w2; - QApplication::setAttribute(Qt::AA_ImmediateWidgetCreation, false); - QVERIFY(!QApplication::testAttribute(Qt::AA_ImmediateWidgetCreation)); + QApplication::setAttribute(Qt::AA_NativeWindows, false); + QVERIFY(!QApplication::testAttribute(Qt::AA_NativeWindows)); w = new QWidget; - QVERIFY(!w->testAttribute(Qt::WA_WState_Created)); + w->show(); // trigger creation; + QVERIFY(!w->testAttribute(Qt::WA_NativeWindow)); delete w; } |