• R/O
  • HTTP
  • SSH
  • HTTPS

MUtilities: Commit

MUtilities development repository


Commit MetaInfo

Revision6b44e7183cc0211dab8da0984e0ca8116f1f2306 (tree)
Time2021-12-24 05:31:43
AuthorLoRd_MuldeR <mulder2@gmx....>
CommiterLoRd_MuldeR

Log Message

Small code refactoring.

Change Summary

Incremental Difference

--- a/src/Startup.cpp
+++ b/src/Startup.cpp
@@ -330,14 +330,6 @@ QApplication *MUtils::Startup::create_qt(int &argc, char **argv, const QString &
330330 {
331331 qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Windows XP or later.").arg(executableName)));
332332 }
333- else if (!CHECK_SPACK(WINDOWS_WINXP, WINDOWS_XPX64, 3))
334- {
335- qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Service Pack 3 for Windows XP.").arg(executableName)));
336- }
337- else if (!CHECK_SPACK(WINDOWS_XPX64, WINDOWS_VISTA, 2))
338- {
339- qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Service Pack 2 for Windows XP x64-Edition.").arg(executableName)));
340- }
341333 }
342334 else
343335 {
@@ -345,11 +337,23 @@ QApplication *MUtils::Startup::create_qt(int &argc, char **argv, const QString &
345337 {
346338 qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Windows Vista or later.").arg(executableName)));
347339 }
348- else if (!CHECK_SPACK(WINDOWS_VISTA, WINDOWS_WIN70, 2))
349- {
350- qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Service Pack 2 for Windows Vista.").arg(executableName)));
351- }
352340 }
341+
342+ //Check for required service packs
343+ if (!CHECK_SPACK(WINDOWS_WINXP, WINDOWS_XPX64, 3))
344+ {
345+ qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Service Pack 3 for Windows XP.").arg(executableName)));
346+ }
347+ if (!CHECK_SPACK(WINDOWS_XPX64, WINDOWS_VISTA, 2))
348+ {
349+ qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Service Pack 2 for Windows XP x64-Edition.").arg(executableName)));
350+ }
351+ if (!CHECK_SPACK(WINDOWS_VISTA, WINDOWS_WIN70, 2))
352+ {
353+ qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Service Pack 2 for Windows Vista.").arg(executableName)));
354+ }
355+
356+ //Check for Windows 8.0
353357 if ((osVersion >= MUtils::OS::Version::WINDOWS_WIN80) && (osVersion < MUtils::OS::Version::WINDOWS_WIN81))
354358 {
355359 qFatal("%s", MUTILS_L1STR(QApplication::tr("Executable '%1' requires Windows 8.1 or later.").arg(executableName)));
Show on old repository browser