diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-04 15:06:13 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-05 09:26:17 +0000 |
commit | b0cd007335853f283c47ffb0f5611d14e6dbe84b (patch) | |
tree | 268b73568b35a5d88f5a4cb5f0a58966876a37a0 /tests/auto/corelib | |
parent | 9b3e8b32f2657948591f6bdffea9d48291b8a69b (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/corelib')
-rw-r--r-- | tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 3 | ||||
-rw-r--r-- | tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index eefe7bcecd..60e320c44d 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1917,7 +1917,8 @@ void tst_QFileInfo::owner() DWORD bufSize = 1024; if (GetUserNameW(usernameBuf, &bufSize)) { userName = QString::fromWCharArray(usernameBuf); - if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && IsUserAdmin()) { + if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::WindowsVista + && IsUserAdmin()) { // Special case : If the user is a member of Administrators group, all files // created by the current user are owned by the Administrators group. LPLOCALGROUP_USERS_INFO_0 pBuf = NULL; diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp index eeeb3bc6e2..8703b15dda 100644 --- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp +++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp @@ -496,7 +496,7 @@ void tst_QLockFile::noPermissionsWindows() QSKIP("This test is for desktop Windows only"); #endif #ifdef Q_OS_WIN - if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7) + if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows7) QSKIP("This test requires at least Windows 7"); #endif if (const int p = processProperties()) { |