QbsProjectManager: Use IDE_LIBRARY_BASENAME to locate qbs' plugins.

This is a better try than hardcoding "lib" and likely to be correct in
real-world scenarios.

Change-Id: I380989b2d2c8389718bde941e081755f41be7f0c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
Christian Kandeler
2016-05-03 16:01:38 +02:00
parent 35b12964ee
commit c8d0ba8651

View File

@@ -206,8 +206,12 @@ QString QbsProjectParser::libExecDirectory() const
QString QbsProjectParser::pluginsBaseDirectory() const QString QbsProjectParser::pluginsBaseDirectory() const
{ {
const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR); const QString qbsInstallDir = QLatin1String(QBS_INSTALL_DIR);
// Note: We assume here that Qt Creator and qbs use the same name for their library dir.
const QString qbsLibDirName = QLatin1String(IDE_LIBRARY_BASENAME);
if (!qbsInstallDir.isEmpty()) if (!qbsInstallDir.isEmpty())
return qbsInstallDir + QLatin1String("/lib/"); return qbsInstallDir + QLatin1Char('/') + qbsLibDirName;
if (HostOsInfo::isMacHost()) if (HostOsInfo::isMacHost())
return QDir::cleanPath(QCoreApplication::applicationDirPath() return QDir::cleanPath(QCoreApplication::applicationDirPath()
+ QLatin1String("/../PlugIns")); + QLatin1String("/../PlugIns"));