aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2011-07-14 12:35:00 +0200
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2011-07-14 14:35:39 +0200
commitd53f5958794b9808b66a0c65b8dd3f7c17a93a8a (patch)
tree6bb199d8e338389c1a75df50e7509a00c4ea092c /share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp
parent9c5c80599874b69f76d218b887781ac8b990f6ab (diff)
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>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp')
-rw-r--r--share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp
index 2d6fda7eac..fe10d9555f 100644
--- a/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp
+++ b/share/qtcreator/qml/qmlpuppet/instances/objectnodeinstance.cpp
@@ -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;