Core: Remove unneeded ifdefs.

Replace compile-time checks for host OS by run-time checks.

Change-Id: I9f237389171586786c2609f81314bcb1bc17b01e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Christian Kandeler
2013-03-14 10:44:46 +01:00
parent d904557fb3
commit 17765de169
10 changed files with 89 additions and 108 deletions

View File

@@ -346,6 +346,8 @@
#include "mainwindow.h"
#include "documentmanager.h"
#include <utils/hostosinfo.h>
#include <QDir>
#include <QCoreApplication>
#include <QDebug>
@@ -483,15 +485,11 @@ QString ICore::userInterfaceLanguage()
return qApp->property("qtc_locale").toString();
}
#ifdef Q_OS_MAC
# define SHARE_PATH "/../Resources"
#else
# define SHARE_PATH "/../share/qtcreator"
#endif
QString ICore::resourcePath()
{
return QDir::cleanPath(QCoreApplication::applicationDirPath() + QLatin1String(SHARE_PATH));
const QString sharePath = QLatin1String(Utils::HostOsInfo::isMacHost()
? "/../Resources" : "/../share/qtcreator");
return QDir::cleanPath(QCoreApplication::applicationDirPath() + sharePath);
}
QString ICore::userResourcePath()