Commit 72e3605a authored by Daniel Teske's avatar Daniel Teske
Browse files

Add architecture information to Utils::HostOsInfo

Change-Id: I2e8ec214ba4ea4567e1eeb5d2f3bd1a59000bc48
Reviewed-by: default avatarOswald Buddenhagen <>
Reviewed-by: default avatarDaniel Teske <>
parent c212e081
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact:
** This file is part of Qt Creator.
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see For further information
** use the contact form at
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met:
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#include "hostosinfo.h"
#ifdef Q_OS_WIN
#include <windows.h>
using namespace Utils;
HostOsInfo::HostArchitecture HostOsInfo::hostArchitecture()
switch (info.wProcessorArchitecture) {
return HostOsInfo::HostArchitectureAMD64;
return HostOsInfo::HostArchitectureX86;
return HostOsInfo::HostArchitectureItanium;
return HostOsInfo::HostArchitectureArm;
return HostOsInfo::HostArchitectureOther;
......@@ -47,9 +47,14 @@ class QTCREATOR_UTILS_EXPORT HostOsInfo
// Add more as needed.
enum HostOs { HostOsWindows, HostOsLinux, HostOsMac, HostOsOtherUnix, HostOsOther };
static inline HostOs hostOs();
#ifdef Q_OS_WIN
enum HostArchitecture { HostArchitectureX86, HostArchitectureAMD64, HostArchitectureItanium,
HostArchitectureArm, HostArchitectureOther };
static HostArchitecture hostArchitecture();
static bool isWindowsHost() { return hostOs() == HostOsWindows; }
static bool isLinuxHost() { return hostOs() == HostOsLinux; }
static bool isMacHost() { return hostOs() == HostOsMac; }
......@@ -80,6 +80,7 @@ SOURCES += $$PWD/environment.cpp \
$$PWD/bracematcher.cpp \
$$PWD/proxyaction.cpp \
$$PWD/elidinglabel.cpp \
$$PWD/hostosinfo.cpp \
$$PWD/tooltip/tooltip.cpp \
$$PWD/tooltip/tips.cpp \
$$PWD/tooltip/tipcontents.cpp \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment