summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-07-04 15:06:13 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-07-05 09:26:17 +0000
commitb0cd007335853f283c47ffb0f5611d14e6dbe84b (patch)
tree268b73568b35a5d88f5a4cb5f0a58966876a37a0 /tests/auto/widgets/styles
parent9b3e8b32f2657948591f6bdffea9d48291b8a69b (diff)
Remove usages of QSysInfo's deprecated APIs
- Replaced QOperatingSystemVersion::WindowsVersion, QSysInfo::windowsVersion(), QSysInfo::macVersion(), QSysInfo::MacintoshVersion with QOperatingSystemVersion::current(). - Added QOperatingSystemVersion::WindowsVista for convenience, as it is used in lots of places. Change-Id: If9c4ac496005b2e70b5c70be160747afa74b98c1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index a552c91928..68e672e16d 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -353,7 +353,10 @@ void tst_QStyle::testWindowsVistaStyle()
QStyle *vistastyle = QStyleFactory::create("WindowsVista");
QVERIFY(testAllFunctions(vistastyle));
- if (QSysInfo::WindowsVersion == QSysInfo::WV_VISTA)
+ if (QOperatingSystemVersion::current().majorVersion()
+ == QOperatingSystemVersion::WindowsVista.majorVersion()
+ && QOperatingSystemVersion::current().minorVersion()
+ == QOperatingSystemVersion::WindowsVista.minorVersion())
testPainting(vistastyle, "vista");
delete vistastyle;
}