diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-06 13:04:47 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-06 20:12:27 +0200 |
commit | ef25620ac1acbe7a723b6b213d7d50468a748119 (patch) | |
tree | abdff2aed36655dfb0305d232b0ac48f8ad67391 /tests/auto/widgets/styles | |
parent | 669add92d9adc15ecfa0b2d62dd90ea9066d401e (diff) | |
parent | 6feec9da93032d11a768802ac2187d9d4153b1ec (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
mkspecs/features/mac/default_pre.prf
mkspecs/features/qpa/genericunixfontdatabase.prf
mkspecs/features/uikit/default_post.prf
mkspecs/features/uikit/resolve_config.prf
mkspecs/macx-ios-clang/features/default_post.prf
mkspecs/macx-ios-clang/features/resolve_config.prf
src/corelib/io/qiodevice.cpp
Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r-- | tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index b95a17bd4e..d8c70a0cc1 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -488,12 +488,12 @@ void tst_QStyleSheetStyle::widgetStyle() window1->setStyleSheet(""); // remove stylesheet QCOMPARE(window1->style(), qApp->style()); // is this cool or what QCOMPARE(widget1->style(), qApp->style()); // annoying child follows... - QStyle *wndStyle = QStyleFactory::create("Windows"); - window1->setStyle(wndStyle); + QScopedPointer<QStyle> wndStyle(QStyleFactory::create("Windows")); + window1->setStyle(wndStyle.data()); QCOMPARE(window1->style()->metaObject()->className(), "QStyleSheetStyle"); // auto wraps it QCOMPARE(widget1->style(), window1->style()); // and auto propagates to child qApp->setStyleSheet(""); // remove the app stylesheet - QCOMPARE(window1->style(), wndStyle); // auto dewrap + QCOMPARE(window1->style(), wndStyle.data()); // auto dewrap QCOMPARE(widget1->style(), qApp->style()); // and child state is restored window1->setStyle(0); // let sanity prevail qApp->setStyle(0); |