Commit d53f5958 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.instances: clean import paths from .1.0

Plugin directories might contain the version number,
but they do not have to.

We try to map .1.0 to "" for components delivered with Creator.

Change-Id: Ie785cf29d4dd64a504501d2be501fd6aa733973b
Reviewed-on: http://codereview.qt.nokia.com/1659


Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarMarco Bubke <marco.bubke@nokia.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent 9c5c8059
......@@ -784,6 +784,14 @@ static inline QString fixComponentPathForIncompatibleQt(const QString &component
fixedComponentPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
if (QFileInfo(fixedComponentPath).exists())
return fixedComponentPath;
QString fixedPath = QFileInfo(fixedComponentPath).path();
if (fixedPath.endsWith(QLatin1String(".1.0"))) {
//plugin directories might contain the version number
fixedPath.chop(4);
fixedPath += QLatin1Char('/') + QFileInfo(componentPath).fileName();
if (QFileInfo(fixedPath).exists())
return fixedPath;
}
}
return result;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment