summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-05-13 12:53:24 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-05-13 12:53:24 (GMT)
commitbb000e03fc1e876eb6ee0d02de15a0bc9a6ea1b8 (patch)
tree0ba616322ada02821405029598c8689e27bf5483 /tools
parenta18ebd2a70e83863bc9a8cc64a65791a6d879f02 (diff)
downloadQt-bb000e03fc1e876eb6ee0d02de15a0bc9a6ea1b8.zip
Qt-bb000e03fc1e876eb6ee0d02de15a0bc9a6ea1b8.tar.gz
Qt-bb000e03fc1e876eb6ee0d02de15a0bc9a6ea1b8.tar.bz2
Added API for quietly saving a form.
Task-number: 163220 Added to FormWindowBase. Required among other things for Qt Creator code completion for uic-generated-headers. Acked-by: dt <qtc-committer@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/lib/shared/formwindowbase.cpp10
-rw-r--r--tools/designer/src/lib/shared/formwindowbase_p.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp
index 3e7e17b..b569b51 100644
--- a/tools/designer/src/lib/shared/formwindowbase.cpp
+++ b/tools/designer/src/lib/shared/formwindowbase.cpp
@@ -55,7 +55,7 @@ TRANSLATOR qdesigner_internal::FormWindowBase
#include "deviceprofile_p.h"
#include "qdesigner_utils_p.h"
-#include <abstractformbuilder.h>
+#include "qsimpleresource_p.h"
#include <QtDesigner/QDesignerFormEditorInterface>
#include <QtDesigner/QDesignerContainerExtension>
@@ -482,6 +482,14 @@ void FormWindowBase::setupDefaultAction(QDesignerFormWindowInterface *fw)
QObject::connect(fw, SIGNAL(activated(QWidget*)), fw, SLOT(triggerDefaultAction(QWidget*)));
}
+QString FormWindowBase::fileContents() const
+{
+ const bool oldValue = QSimpleResource::setWarningsEnabled(false);
+ const QString rc = contents();
+ QSimpleResource::setWarningsEnabled(oldValue);
+ return rc;
+}
+
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/tools/designer/src/lib/shared/formwindowbase_p.h b/tools/designer/src/lib/shared/formwindowbase_p.h
index 68e977e..0891f6e 100644
--- a/tools/designer/src/lib/shared/formwindowbase_p.h
+++ b/tools/designer/src/lib/shared/formwindowbase_p.h
@@ -90,6 +90,9 @@ public:
QVariantMap formData();
void setFormData(const QVariantMap &vm);
+ // Return contents without warnings. Should be 'contents(bool quiet)'
+ QString fileContents() const;
+
// Return the widget containing the form. This is used to
// apply embedded design settings to that are inherited (for example font).
// These are meant to be applied to the form only and not to the other editors