forked from qt-creator/qt-creator
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:
@@ -30,6 +30,8 @@
|
||||
#ifndef TOOLTIPREUSE_H
|
||||
#define TOOLTIPREUSE_H
|
||||
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QWidget>
|
||||
@@ -49,11 +51,9 @@ inline int screenNumber(const QPoint &pos, QWidget *w)
|
||||
|
||||
inline QRect screenGeometry(const QPoint &pos, QWidget *w)
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
|
||||
#else
|
||||
if (Utils::HostOsInfo::isMacHost())
|
||||
return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
|
||||
return QApplication::desktop()->screenGeometry(screenNumber(pos, w));
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "androidmanager.h"
|
||||
|
||||
#include <utils/environment.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <qt4projectmanager/qt4project.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
|
||||
{
|
||||
QString ndk_host = QLatin1String(
|
||||
#if defined(Q_OS_LINUX)
|
||||
"linux-x86"
|
||||
#elif defined(Q_OS_WIN)
|
||||
"windows"
|
||||
#elif defined(Q_OS_MAC)
|
||||
"darwin-x86"
|
||||
#endif
|
||||
);
|
||||
Utils::HostOsInfo::isLinuxHost() ? "linux-x86" :
|
||||
Utils::HostOsInfo::isWindowsHost() ? "windows" :
|
||||
Utils::HostOsInfo::isMacHost() ? "darwin-x86" : "");
|
||||
|
||||
// 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);
|
||||
|
||||
@@ -57,7 +57,6 @@ using namespace Utils;
|
||||
|
||||
namespace Core {
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
// Show error with option to open settings.
|
||||
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)
|
||||
ICore::showOptionsDialog(Constants::SETTINGS_CATEGORY_CORE, Constants::SETTINGS_ID_ENVIRONMENT);
|
||||
}
|
||||
#endif
|
||||
|
||||
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");
|
||||
QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs);
|
||||
} else {
|
||||
#ifndef Q_OS_MAC
|
||||
// we cannot select a file here, because no file browser really supports it...
|
||||
const QFileInfo fileInfo(pathIn);
|
||||
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();
|
||||
if (!success)
|
||||
showGraphicalShellError(parent, app, error);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user