forked from qt-creator/qt-creator
Take compatibility version into account for user plugins
When loading user-local plugins, do not load plugins for all patch versions starting from .0 unconditionally. Take the compatibility version into account. That fixes that prereleases x.y.82 etc should not try loading plugins for any actual x.y.z release. Change-Id: Ide0931bbdef4f48e08dcc3213f7c193c8889fb0f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -237,7 +237,10 @@ static inline QStringList getPluginPaths()
|
||||
// patch versions
|
||||
const QString minorVersion = QString::number(IDE_VERSION_MAJOR) + '.'
|
||||
+ QString::number(IDE_VERSION_MINOR) + '.';
|
||||
for (int patchVersion = IDE_VERSION_RELEASE; patchVersion >= 0; --patchVersion)
|
||||
const int minPatchVersion
|
||||
= qMin(IDE_VERSION_RELEASE,
|
||||
QVersionNumber::fromString(Core::Constants::IDE_VERSION_COMPAT).microVersion());
|
||||
for (int patchVersion = IDE_VERSION_RELEASE; patchVersion >= minPatchVersion; --patchVersion)
|
||||
rc.push_back(pluginPath + minorVersion + QString::number(patchVersion));
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user