diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-06-29 18:58:15 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-06-29 18:58:15 -0400 |
| commit | 813ab32a2d16106f2799fba4e85c768a5b1c4850 (patch) | |
| tree | 382af986c9a776e84447ddd06cf20e43f0ce42c2 /src/shared/util.cpp | |
| parent | fb6512b72ebf86d5273744774388deb14c8a21ae (diff) | |
added a warning when running in compatibility mode
Diffstat (limited to 'src/shared/util.cpp')
| -rw-r--r-- | src/shared/util.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/shared/util.cpp b/src/shared/util.cpp index 9337ebf6..33094eff 100644 --- a/src/shared/util.cpp +++ b/src/shared/util.cpp @@ -653,6 +653,18 @@ WindowsVersion::WindowsVersion() : getElevated();
}
+bool WindowsVersion::compatibilityMode() const
+{
+ if (m_realMajor == 0 && m_realMinor == 0 && m_realBuild == 0) {
+ return false;
+ }
+
+ return
+ m_realMajor != m_major ||
+ m_realMinor != m_minor ||
+ m_realBuild != m_build;
+}
+
QString WindowsVersion::toString() const
{
QStringList sl;
@@ -665,7 +677,7 @@ QString WindowsVersion::toString() const sl.push_back("version: " + version);
- if (m_realMajor != m_major || m_realMinor != m_minor || m_realBuild != m_build) {
+ if (compatibilityMode()) {
sl.push_back("real version: " + realVersion);
}
|
