forked from qt-creator/qt-creator
Compile fix for HostInfo on Linux
Change-Id: I77924e1025baef92ebcff42ce683dbf9d8feb162 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -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; }
|
||||
|
Reference in New Issue
Block a user