forked from qt-creator/qt-creator
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: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Marco Bubke <marco.bubke@nokia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user