Made uic-codecompletion use the new quiet-save API of Qt Designer.

This commit is contained in:
Friedemann Kleint
2009-05-13 15:10:09 +02:00
parent 5150089738
commit 135000c395
4 changed files with 18 additions and 5 deletions

View File

@@ -38,6 +38,8 @@
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/nodesvisitor.h>
#include <utils/qtcassert.h>
#include <QtDesigner/QDesignerFormWindowInterface>
#include <QtDesigner/QDesignerFormEditorInterface>
#include <QtDesigner/QDesignerFormWindowManagerInterface>
@@ -359,7 +361,14 @@ QString FormWindowEditor::contextHelpId() const
QString FormWindowEditor::contents() const
{
if (m_host && m_host->formWindow())
return m_host->formWindow()->contents();
if (!m_formWindow)
return QString::null;
#if QT_VERSION > 0x040501
// Quiet save as of Qt 4.5.2
qdesigner_internal::FormWindowBase *fwb = qobject_cast<qdesigner_internal::FormWindowBase *>(m_formWindow);
QTC_ASSERT(fwb, return QString::null);
return fwb->fileContents();
#else
return m_formWindow->contents();
#endif
}

View File

@@ -78,6 +78,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

View File

@@ -74,6 +74,7 @@ Q_SIGNALS:
public Q_SLOTS:
virtual void closeAllPreviews() = 0;
void aboutPlugins();
private:
void *m_unused;

View File

@@ -55,8 +55,8 @@ syncHeader()
TARGET=qt_private/$HDR
# Exchange license header
head -n 32 formwindowfile.h > $TARGET || exit 1
tail -n +11 $QTHDR >> $TARGET || exit 1
head -n 28 formwindowfile.h > $TARGET || exit 1
tail -n +41 $QTHDR >> $TARGET || exit 1
}
for H in $REQUIRED_HEADERS