Design mode: Suppress warning about top level spacers.

This commit is contained in:
Friedemann Kleint
2010-03-08 14:10:31 +01:00
parent 845948cdee
commit c5d6c139c1

View File

@@ -37,6 +37,7 @@
#include "formwindoweditor.h"
#include "formeditorw.h"
#include "designerconstants.h"
#include "qt_private/formwindowbase_p.h"
#include <QtCore/QStringList>
@@ -130,12 +131,12 @@ void FormEditorStack::formChanged()
TextEditor::BaseTextDocument *doc = qobject_cast<TextEditor::BaseTextDocument*>(activeEditor->xmlEditor->file());
Q_ASSERT(doc);
if (doc) {
doc->document()->setPlainText(activeEditor->formEditor->contents());
// Save quietly (without spacer's warning).
if (const qdesigner_internal::FormWindowBase *fwb = qobject_cast<const qdesigner_internal::FormWindowBase *>(activeEditor->formEditor))
doc->document()->setPlainText(fwb->fileContents());
}
}
}
} // Internal
} // Designer