summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-08 09:05:09 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-08 09:05:09 (GMT)
commitb1c908af60a60cf14d68914e1075f8cf6add760b (patch)
tree6043a253a78cca6bad0b70553738db82258f6fea /tools/designer
parent0766bf2fa4a89e629bbdad185e4919fd49c033a1 (diff)
parentca622c6919248a9b15550d3116d3b094f88dd1fa (diff)
downloadQt-b1c908af60a60cf14d68914e1075f8cf6add760b.zip
Qt-b1c908af60a60cf14d68914e1075f8cf6add760b.tar.gz
Qt-b1c908af60a60cf14d68914e1075f8cf6add760b.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-tools-staging: Designer: Set dirty correctly in case resource paths were changed.
Diffstat (limited to 'tools/designer')
-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;