Designer: Compilation with Qt 5.

Test the new Qt Designer integration interfaces.

Change-Id: I8364167d5be3e7c361b192318b0bba7fb70d0f2f
Reviewed-on: http://codereview.qt.nokia.com/9
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Friedemann Kleint
2011-05-19 11:30:38 +02:00
committed by Kai Koehne
parent 0d3d38ecc1
commit b0d093b0d7
13 changed files with 203 additions and 42 deletions

View File

@@ -41,7 +41,9 @@
#include <QtDesigner/QDesignerFormWindowInterface>
#include <QtDesigner/QDesignerFormWindowManagerInterface>
#include <QtDesigner/QDesignerFormEditorInterface>
#include "qt_private/qsimpleresource_p.h"
#if QT_VERSION < 0x050000
# include "qt_private/qsimpleresource_p.h"
#endif
#include <QtGui/QMessageBox>
#include <QtGui/QMainWindow>
@@ -83,10 +85,13 @@ bool FormWindowFile::save(QString *errorString, const QString &name, bool autoSa
const QString oldFormName = m_formWindow->fileName();
if (!autoSave)
m_formWindow->setFileName(fi.absoluteFilePath());
#if QT_VERSION >= 0x050000
const bool writeOK = writeFile(actualName, errorString);
#else
const bool warningsEnabled = qdesigner_internal::QSimpleResource::setWarningsEnabled(false);
const bool writeOK = writeFile(actualName, errorString);
qdesigner_internal::QSimpleResource::setWarningsEnabled(warningsEnabled);
#endif
m_shouldAutoSave = false;
if (autoSave)
return writeOK;