Remove unneeded #ifdefs.

Change-Id: I66241be77f61a53590b72560fc0afce50bda97d9
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
Christian Kandeler
2013-02-04 13:34:09 +01:00
parent 1d14e7e439
commit 45fd1c248f
3 changed files with 8 additions and 16 deletions

View File

@@ -30,6 +30,8 @@
#ifndef TOOLTIPREUSE_H #ifndef TOOLTIPREUSE_H
#define TOOLTIPREUSE_H #define TOOLTIPREUSE_H
#include <utils/hostosinfo.h>
#include <QPoint> #include <QPoint>
#include <QRect> #include <QRect>
#include <QWidget> #include <QWidget>
@@ -49,11 +51,9 @@ inline int screenNumber(const QPoint &pos, QWidget *w)
inline QRect screenGeometry(const QPoint &pos, QWidget *w) inline QRect screenGeometry(const QPoint &pos, QWidget *w)
{ {
#ifdef Q_OS_MAC if (Utils::HostOsInfo::isMacHost())
return QApplication::desktop()->availableGeometry(screenNumber(pos, w)); return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
#else
return QApplication::desktop()->screenGeometry(screenNumber(pos, w)); return QApplication::desktop()->screenGeometry(screenNumber(pos, w));
#endif
} }
} // namespace Internal } // namespace Internal

View File

@@ -33,6 +33,7 @@
#include "androidmanager.h" #include "androidmanager.h"
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/hostosinfo.h>
#include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h> #include <qt4projectmanager/qt4projectmanagerconstants.h>
@@ -96,14 +97,9 @@ QList<ProjectExplorer::Abi> AndroidQtVersion::detectQtAbis() const
void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const
{ {
QString ndk_host = QLatin1String( QString ndk_host = QLatin1String(
#if defined(Q_OS_LINUX) Utils::HostOsInfo::isLinuxHost() ? "linux-x86" :
"linux-x86" Utils::HostOsInfo::isWindowsHost() ? "windows" :
#elif defined(Q_OS_WIN) Utils::HostOsInfo::isMacHost() ? "darwin-x86" : "");
"windows"
#elif defined(Q_OS_MAC)
"darwin-x86"
#endif
);
// this env vars are used by qmake mkspecs to generate makefiles (check QTDIR/mkspecs/android-g++/qmake.conf for more info) // this env vars are used by qmake mkspecs to generate makefiles (check QTDIR/mkspecs/android-g++/qmake.conf for more info)
env.set(QLatin1String("ANDROID_NDK_HOST"), ndk_host); env.set(QLatin1String("ANDROID_NDK_HOST"), ndk_host);

View File

@@ -57,7 +57,6 @@ using namespace Utils;
namespace Core { namespace Core {
#ifndef Q_OS_MAC
// Show error with option to open settings. // Show error with option to open settings.
static void showGraphicalShellError(QWidget *parent, const QString &app, const QString &error) static void showGraphicalShellError(QWidget *parent, const QString &app, const QString &error)
{ {
@@ -75,7 +74,6 @@ static void showGraphicalShellError(QWidget *parent, const QString &app, const Q
if (mbox.clickedButton() == settingsButton) if (mbox.clickedButton() == settingsButton)
ICore::showOptionsDialog(Constants::SETTINGS_CATEGORY_CORE, Constants::SETTINGS_ID_ENVIRONMENT); ICore::showOptionsDialog(Constants::SETTINGS_CATEGORY_CORE, Constants::SETTINGS_ID_ENVIRONMENT);
} }
#endif
void FileUtils::showInGraphicalShell(QWidget *parent, const QString &pathIn) void FileUtils::showInGraphicalShell(QWidget *parent, const QString &pathIn)
{ {
@@ -106,7 +104,6 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const QString &pathIn)
<< QLatin1String("tell application \"Finder\" to activate"); << QLatin1String("tell application \"Finder\" to activate");
QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs);
} else { } else {
#ifndef Q_OS_MAC
// we cannot select a file here, because no file browser really supports it... // we cannot select a file here, because no file browser really supports it...
const QFileInfo fileInfo(pathIn); const QFileInfo fileInfo(pathIn);
const QString folder = fileInfo.isDir() ? fileInfo.absoluteFilePath() : fileInfo.filePath(); const QString folder = fileInfo.isDir() ? fileInfo.absoluteFilePath() : fileInfo.filePath();
@@ -118,7 +115,6 @@ void FileUtils::showInGraphicalShell(QWidget *parent, const QString &pathIn)
success = success && error.isEmpty(); success = success && error.isEmpty();
if (!success) if (!success)
showGraphicalShellError(parent, app, error); showGraphicalShellError(parent, app, error);
#endif
} }
} }