diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-05-10 11:43:14 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-05-13 06:46:54 +0000 |
commit | cb1043ae16d6c72417b13bbfc65f26edf76a6290 (patch) | |
tree | 05b3fef4d22d5519265f6c7e46962e92ddbd2187 | |
parent | cb5e9e9479c2cf7e62965c6fc467bd742026e455 (diff) |
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>
-rw-r--r-- | src/app/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index 27412c3d06..17e2d3bf29 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -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; } |