summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.cpp1
-rw-r--r--tools/designer/src/designer/qdesigner_formwindow.cpp1
-rw-r--r--tools/designer/src/designer/qdesigner_workbench.cpp4
3 files changed, 5 insertions, 1 deletions
diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
index 0426b8c..714a556 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -2278,6 +2278,7 @@ void QDesignerResource::createResources(DomResources *resources)
path = core()->dialogGui()->getOpenFileName(dialogParent, fileDialogTitle, fi.absolutePath(), fileDialogPattern);
if (path.isEmpty())
break;
+ m_formWindow->setProperty("_q_resourcepathchanged", QVariant(true));
} else {
break;
}
diff --git a/tools/designer/src/designer/qdesigner_formwindow.cpp b/tools/designer/src/designer/qdesigner_formwindow.cpp
index 1fbdcec..4770d2a 100644
--- a/tools/designer/src/designer/qdesigner_formwindow.cpp
+++ b/tools/designer/src/designer/qdesigner_formwindow.cpp
@@ -159,6 +159,7 @@ void QDesignerFormWindow::firstShow()
if (m_editor) {
connect(m_editor, SIGNAL(fileNameChanged(QString)), this, SLOT(updateWindowTitle(QString)));
updateWindowTitle(m_editor->fileName());
+ updateChanged();
}
}
show();
diff --git a/tools/designer/src/designer/qdesigner_workbench.cpp b/tools/designer/src/designer/qdesigner_workbench.cpp
index 836feb7..840667a 100644
--- a/tools/designer/src/designer/qdesigner_workbench.cpp
+++ b/tools/designer/src/designer/qdesigner_workbench.cpp
@@ -966,7 +966,9 @@ QDesignerFormWindow * QDesignerWorkbench::loadForm(const QString &fileName,
return 0;
}
*uic3Converted = editor->fileName().isEmpty();
- editor->setDirty(false);
+ // Did user specify another (missing) resource path -> set dirty.
+ const bool dirty = editor->property("_q_resourcepathchanged").toBool();
+ editor->setDirty(dirty);
resizeForm(formWindow, editor->mainContainer());
formWindowManager->setActiveFormWindow(editor);
return formWindow;