Commit 69a00cba authored by Thomas Hartmann's avatar Thomas Hartmann

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: default avatarMarco Bubke <marco.bubke@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent a8a49c98
...@@ -1096,15 +1096,21 @@ QString PropertyEditor::locateQmlFile(const NodeMetaInfo &info, const QString &r ...@@ -1096,15 +1096,21 @@ QString PropertyEditor::locateQmlFile(const NodeMetaInfo &info, const QString &r
const QString relativePathWithVersion = relativePathWithoutEnding + versionString + QLatin1String(".qml"); const QString relativePathWithVersion = relativePathWithoutEnding + versionString + QLatin1String(".qml");
//Check for qml files with versions first //Check for qml files with versions first
const QString withoutDirWithVersion = relativePathWithVersion.split(QLatin1String("/")).last();
if (importDir.exists(relativePathWithVersion)) if (importDir.exists(relativePathWithVersion))
return importDir.absoluteFilePath(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)) if (fileSystemDir.exists(relativePathWithVersion))
return fileSystemDir.absoluteFilePath(relativePathWithVersion); return fileSystemDir.absoluteFilePath(relativePathWithVersion);
if (resourcesDir.exists(relativePathWithVersion)) if (resourcesDir.exists(relativePathWithVersion))
return resourcesDir.absoluteFilePath(relativePathWithVersion); return resourcesDir.absoluteFilePath(relativePathWithVersion);
const QString withoutDir = relativePath.split(QLatin1String("/")).last();
if (importDir.exists(relativePath)) if (importDir.exists(relativePath))
return importDir.absoluteFilePath(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)) if (fileSystemDir.exists(relativePath))
return fileSystemDir.absoluteFilePath(relativePath); return fileSystemDir.absoluteFilePath(relativePath);
if (resourcesDir.exists(relativePath)) if (resourcesDir.exists(relativePath))
......
Markdown is supported
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