diff options
author | Thomas Hartmann <[email protected]> | 2017-05-22 15:47:48 +0200 |
---|---|---|
committer | Thomas Hartmann <[email protected]> | 2017-05-22 15:22:11 +0000 |
commit | 7482d8a15239ee1cb289953f7d8ce167583b6261 (patch) | |
tree | 45e59348f3741c37c0db71e4d2be5a797b381a26 | |
parent | 2ec987ff49ec7aec273917a12ea7c1057da6974b (diff) |
QmlDesigner: Fix resolving of sourcev4.3.0
Using the QUrl:resolve() does not work with Qt 5.9.
Since the file url is a local file and not directory this was
weird usage of QUrl anyway.
Change-Id: I2d709bc40a404b61ea3c3edbbfd1727a6ee2111c
Reviewed-by: Tim Jenssen <[email protected]>
-rw-r--r-- | src/plugins/qmldesigner/documentmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/documentmanager.cpp b/src/plugins/qmldesigner/documentmanager.cpp index abf45bfbb15..9ac604760b3 100644 --- a/src/plugins/qmldesigner/documentmanager.cpp +++ b/src/plugins/qmldesigner/documentmanager.cpp @@ -148,9 +148,9 @@ static void openSourcePropertyOfLoader(const ModelNode &modelNode) QmlDesignerPlugin::instance()->viewManager().nextFileIsCalledInternally(); QString componentFileName = modelNode.variantProperty("source").value().toString(); - QString componentFilePath = modelNode.model()->fileUrl().resolved(QUrl::fromLocalFile(componentFileName)).toLocalFile(); - Core::EditorManager::openEditor(componentFilePath, Core::Id(), Core::EditorManager::DoNotMakeVisible); + QFileInfo fileInfo(modelNode.model()->fileUrl().toLocalFile()); + Core::EditorManager::openEditor(fileInfo.absolutePath() + "/" + componentFileName, Core::Id(), Core::EditorManager::DoNotMakeVisible); } |