forked from qt-creator/qt-creator
Load user-plugins from earlier patch releases
Qt Creator X.Y.Z is binary compatible with X.Y.(Z-1) so load plugins from these user plugin directories too. Change-Id: Ibed7f54e84864337a69a4745fb1ecd2f78907486 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -234,8 +234,12 @@ static inline QStringList getPluginPaths()
|
||||
Core::Constants::IDE_DISPLAY_NAME :
|
||||
Core::Constants::IDE_ID);
|
||||
pluginPath += QLatin1String("/plugins/");
|
||||
pluginPath += QLatin1String(Core::Constants::IDE_VERSION_LONG);
|
||||
rc.push_back(pluginPath);
|
||||
// Qt Creator X.Y.Z can load plugins from X.Y.(Z-1) etc, so add current and previous
|
||||
// patch versions
|
||||
const QString minorVersion = QString::number(IDE_VERSION_MAJOR) + '.'
|
||||
+ QString::number(IDE_VERSION_MINOR) + '.';
|
||||
for (int patchVersion = IDE_VERSION_RELEASE; patchVersion >= 0; --patchVersion)
|
||||
rc.push_back(pluginPath + minorVersion + QString::number(patchVersion));
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user