Skip to content
Snippets Groups Projects
Commit a08b1ef8 authored by hjk's avatar hjk Committed by Daniel Teske
Browse files

Compile fix for HostInfo on Linux


Change-Id: I77924e1025baef92ebcff42ce683dbf9d8feb162
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 4ec62609
No related branches found
No related tags found
No related merge requests found
......@@ -31,11 +31,13 @@
#ifdef Q_OS_WIN
#include <windows.h>
#endif
using namespace Utils;
HostOsInfo::HostArchitecture HostOsInfo::hostArchitecture()
{
#ifdef Q_OS_WIN
SYSTEM_INFO info;
GetNativeSystemInfo(&info);
switch (info.wProcessorArchitecture) {
......@@ -50,5 +52,7 @@ HostOsInfo::HostArchitecture HostOsInfo::hostArchitecture()
default:
return HostOsInfo::HostArchitectureOther;
}
}
#else
return HostOsInfo::HostArchitectureUnknown;
#endif
}
......@@ -49,11 +49,9 @@ public:
enum HostOs { HostOsWindows, HostOsLinux, HostOsMac, HostOsOtherUnix, HostOsOther };
static inline HostOs hostOs();
#ifdef Q_OS_WIN
enum HostArchitecture { HostArchitectureX86, HostArchitectureAMD64, HostArchitectureItanium,
HostArchitectureArm, HostArchitectureOther };
HostArchitectureArm, HostArchitectureUnknown };
static HostArchitecture hostArchitecture();
#endif
static bool isWindowsHost() { return hostOs() == HostOsWindows; }
static bool isLinuxHost() { return hostOs() == HostOsLinux; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment