Commit 7129cb0b authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Add support for contents() to designer documents

Change-Id: Ie8c65c7a692d752bac3b6427f66116282b486576
Reviewed-by: default avatarEike Ziller <>
parent 5182f2ff
......@@ -141,6 +141,11 @@ bool FormWindowFile::save(QString *errorString, const QString &name, bool autoSa
return true;
QByteArray FormWindowFile::contents() const
return formWindowContents().toUtf8();
bool FormWindowFile::setContents(const QByteArray &contents)
if (Designer::Constants::Internal::debug)
......@@ -184,6 +189,8 @@ void FormWindowFile::setFilePath(const FileName &newName)
void FormWindowFile::updateIsModified()
bool value = m_formWindow && m_formWindow->isDirty();
if (value)
emit contentsChanged();
if (value == m_isModified)
m_isModified = value;
......@@ -56,6 +56,7 @@ public:
OpenResult open(QString *errorString, const QString &fileName,
const QString &realFileName) override;
bool save(QString *errorString, const QString &fileName, bool autoSave) override;
QByteArray contents() const override;
bool setContents(const QByteArray &contents) override;
bool shouldAutoSave() const override;
bool isModified() const override;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment