Skip to content
Snippets Groups Projects
Commit 7482d8a1 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: Fix resolving of source


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: default avatarTim Jenssen <tim.jenssen@qt.io>
parent 2ec987ff
No related branches found
Tags v4.3.0
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment