Commit MetaInfo
Log Message
Small improvement to operating system detection.
Change Summary
Incremental Difference
| | @@ -313,8 +313,18 @@ QApplication *MUtils::Startup::create_qt(int &argc, char **argv, const QString & | 313 | 313 | qDebug("Compiled with Qt v%s\n", QT_VERSION_STR); | 314 | 314 | #endif | 315 | 315 | | 316 | | - //Check the Windows version | | 316 | + //Detect the operating system version | 317 | 317 | const MUtils::OS::Version::os_version_t &osVersion = MUtils::OS::os_version(); | | 318 | + if (const char *const friendlyName = MUtils::OS::os_friendly_name(osVersion)) | | 319 | + { | | 320 | + qDebug("Running on %s (NT v%u.%u.%u-sp%u).\n", friendlyName, osVersion.versionMajor, osVersion.versionMinor, osVersion.versionBuild, osVersion.versionSPack); | | 321 | + } | | 322 | + else | | 323 | + { | | 324 | + qWarning("Running on an unknown WindowsNT-based system (v%u.%u.%u-sp%u).\n", osVersion.versionMajor, osVersion.versionMinor, osVersion.versionBuild, osVersion.versionSPack); | | 325 | + } | | 326 | + | | 327 | + //Check whether we are running on a supported Windows version | 318 | 328 | if (xpSupport) | 319 | 329 | { | 320 | 330 | if (!REQUIRE_OS(WINDOWS_WINXP, 3)) |
| | @@ -338,18 +348,6 @@ QApplication *MUtils::Startup::create_qt(int &argc, char **argv, const QString & | 338 | 348 | qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Windows 8.1 or later.").arg(executableName))); | 339 | 349 | } | 340 | 350 | | 341 | | - //Check whether we are running on a supported Windows version | 342 | | - if(const char *const friendlyName = MUtils::OS::os_friendly_name(osVersion)) | 343 | | - { | 344 | | - qDebug("Running on %s (NT v%u.%u.%u-sp%u).\n", friendlyName, osVersion.versionMajor, osVersion.versionMinor, osVersion.versionBuild, osVersion.versionSPack); | 345 | | - } | 346 | | - else | 347 | | - { | 348 | | - const QString message = QString().sprintf("Running on an unknown WindowsNT-based system (NT v%u.%u.%u-sp%u).", osVersion.versionMajor, osVersion.versionMinor, osVersion.versionBuild, osVersion.versionSPack); | 349 | | - qWarning("%s\n", MUTILS_UTF8(message)); | 350 | | - MUtils::OS::system_message_wrn(MUTILS_WCHR(executableName), MUTILS_WCHR(message)); | 351 | | - } | 352 | | - | 353 | 351 | //Check for compat mode | 354 | 352 | if(osVersion.overrideFlag && (osVersion <= MUtils::OS::Version::WINDOWS_WN100)) | 355 | 353 | { |
Show on old repository browser
|