Use a proper libexec path for Unix builds.

Change-Id: I036c806af47f07e60408a90d3a4e181a6773f866
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Christian Kandeler
2015-07-03 15:39:49 +02:00
parent bc6b81fb50
commit 6d5a5aff94
9 changed files with 31 additions and 12 deletions

View File

@@ -432,9 +432,21 @@ QString ICore::documentationPath()
*/
QString ICore::libexecPath()
{
const QString libexecPath = QLatin1String(Utils::HostOsInfo::isMacHost()
? "/../Resources" : "");
return QDir::cleanPath(QCoreApplication::applicationDirPath() + libexecPath);
QString path;
switch (Utils::HostOsInfo::hostOs()) {
case Utils::OsTypeWindows:
path = QCoreApplication::applicationDirPath();
break;
case Utils::OsTypeMac:
path = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources");
break;
case Utils::OsTypeLinux:
case Utils::OsTypeOtherUnix:
case Utils::OsTypeOther:
path = QCoreApplication::applicationDirPath() + QLatin1String("/../libexec/qtcreator");
break;
}
return QDir::cleanPath(path);
}
static QString compilerString()