Commit 09092138 authored by Eike Ziller's avatar Eike Ziller

Fix crash when loading ui file that uses resource files

Crash introduced with recent refactoring

Use the IDocument::filePathChanged signal (instead of changed() which
also fires when modification flag changes) to detect that a ui file
might be in a different project or no project now, and available
resource files changed.

Task-number: QTCREATORBUG-9813
Change-Id: I9b9e26be916ffe7bbf3ab49d934d0e4c111e48df
Reviewed-by: default avatarFriedemann Kleint <>
parent 4ba6faec
......@@ -38,7 +38,7 @@ We need to update resources of the opened form in following cases:
- the opened form is being saved as... with new name, what causes the editor
for the form points to a new file which is not in the project (we connect
changed() to updateResources() slot)
filePathChanged(QString,QString) to updateResources() slot)
Changes to qrc file contents are not needed to be handled here, since
designer's internal file watcher updates the changes to qrc files silently.
......@@ -715,7 +715,7 @@ EditorData FormEditorW::createEditor(QWidget *parent)
data.formWindowEditor = xmlEditor->designerEditor();
connect(data.widgetHost, SIGNAL(formWindowSizeChanged(int,int)),
xmlEditor, SIGNAL(changed()));
connect(data.formWindowEditor->document(), SIGNAL(changed()),
connect(data.formWindowEditor->document(), SIGNAL(filePathChanged(QString,QString)),
resourceHandler, SLOT(updateResources()));
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