ProjectExplorer: Replace macro usages with HostOsInfo

Change-Id: I8d4975635f0a4a181ff1ea0950bb58819aae1546
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2016-09-10 22:58:37 +03:00
committed by Orgad Shaneh
parent 920ff1062d
commit 4b8564cb42

View File

@@ -89,11 +89,9 @@
#include "waitforstopdialog.h" #include "waitforstopdialog.h"
#include "projectexplorericons.h" #include "projectexplorericons.h"
#ifdef Q_OS_WIN #include "windebuginterface.h"
# include "windebuginterface.h" #include "msvctoolchain.h"
# include "msvctoolchain.h" #include "wincetoolchain.h"
# include "wincetoolchain.h"
#endif
#include "projecttree.h" #include "projecttree.h"
#include "projectwelcomepage.h" #include "projectwelcomepage.h"
@@ -432,17 +430,15 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
#endif #endif
// Add ToolChainFactories: // Add ToolChainFactories:
#ifdef Q_OS_WIN if (Utils::HostOsInfo::isWindowsHost()) {
addAutoReleasedObject(new WinDebugInterface); addAutoReleasedObject(new WinDebugInterface);
addAutoReleasedObject(new MsvcToolChainFactory); addAutoReleasedObject(new MsvcToolChainFactory);
addAutoReleasedObject(new WinCEToolChainFactory); addAutoReleasedObject(new WinCEToolChainFactory);
#else } else {
addAutoReleasedObject(new LinuxIccToolChainFactory); addAutoReleasedObject(new LinuxIccToolChainFactory);
#endif }
#ifndef Q_OS_MAC if (!Utils::HostOsInfo::isMacHost())
addAutoReleasedObject(new MingwToolChainFactory); // Mingw offers cross-compiling to windows addAutoReleasedObject(new MingwToolChainFactory); // Mingw offers cross-compiling to windows
#endif
addAutoReleasedObject(new GccToolChainFactory); addAutoReleasedObject(new GccToolChainFactory);
addAutoReleasedObject(new ClangToolChainFactory); addAutoReleasedObject(new ClangToolChainFactory);
addAutoReleasedObject(new CustomToolChainFactory); addAutoReleasedObject(new CustomToolChainFactory);
@@ -719,9 +715,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
// open action // open action
dd->m_loadAction = new QAction(tr("Load Project..."), this); dd->m_loadAction = new QAction(tr("Load Project..."), this);
cmd = ActionManager::registerAction(dd->m_loadAction, Constants::LOAD); cmd = ActionManager::registerAction(dd->m_loadAction, Constants::LOAD);
#ifndef Q_OS_MAC if (!Utils::HostOsInfo::isMacHost())
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+O"))); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+O")));
#endif
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES); msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
// Default open action // Default open action