forked from qt-creator/qt-creator
		
	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:
		| @@ -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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user