diff options
author | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2013-07-02 09:46:17 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2013-07-02 12:04:15 +0200 |
commit | 69a00cbabecd6692a07d688db3fd52d540a0aa84 (patch) | |
tree | dc5dd7bad7aab4763c198d99708477e6a2362ce5 /src | |
parent | a8a49c985160f5de24922384bc7217cab8ba2348 (diff) | |
download | qt-creator-69a00cbabecd6692a07d688db3fd52d540a0aa84.tar.gz |
QmlDesigner.PropertyEditor: extend lookup rules for extensions
If specifics for pane .qml files are located inside the plugin
in the designer sudirectory, we still required the path to be fully
qualified.
e.g. myComponnents/designer/myComponent/MySpecifics.qml
This is unconvinient and also a behaivour change for pure directory imports.
Pure directory imports were not fully qualified until recently.
With this patch we also allow:
myComponnents/designer/MySpecifics.qml
Change-Id: I9a61016f425caf5d7d15140554c72f4a69a6687a
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index f4a12681a4..3b3281fcad 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -1096,15 +1096,21 @@ QString PropertyEditor::locateQmlFile(const NodeMetaInfo &info, const QString &r const QString relativePathWithVersion = relativePathWithoutEnding + versionString + QLatin1String(".qml"); //Check for qml files with versions first + const QString withoutDirWithVersion = relativePathWithVersion.split(QLatin1String("/")).last(); if (importDir.exists(relativePathWithVersion)) return importDir.absoluteFilePath(relativePathWithVersion); + if (importDir.exists(withoutDirWithVersion)) //Since we are in a subfolder of the import we do not require the directory + return importDir.absoluteFilePath(withoutDirWithVersion); if (fileSystemDir.exists(relativePathWithVersion)) return fileSystemDir.absoluteFilePath(relativePathWithVersion); if (resourcesDir.exists(relativePathWithVersion)) return resourcesDir.absoluteFilePath(relativePathWithVersion); + const QString withoutDir = relativePath.split(QLatin1String("/")).last(); if (importDir.exists(relativePath)) return importDir.absoluteFilePath(relativePath); + if (importDir.exists(withoutDir)) //Since we are in a subfolder of the import we do not require the directory + return importDir.absoluteFilePath(withoutDir); if (fileSystemDir.exists(relativePath)) return fileSystemDir.absoluteFilePath(relativePath); if (resourcesDir.exists(relativePath)) |