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:
Eike Ziller
2019-05-10 11:43:14 +02:00
parent cb5e9e9479
commit cb1043ae16

View File

@@ -234,8 +234,12 @@ static inline QStringList getPluginPaths()
Core::Constants::IDE_DISPLAY_NAME : Core::Constants::IDE_DISPLAY_NAME :
Core::Constants::IDE_ID); Core::Constants::IDE_ID);
pluginPath += QLatin1String("/plugins/"); pluginPath += QLatin1String("/plugins/");
pluginPath += QLatin1String(Core::Constants::IDE_VERSION_LONG); // Qt Creator X.Y.Z can load plugins from X.Y.(Z-1) etc, so add current and previous
rc.push_back(pluginPath); // 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; return rc;
} }