summaryrefslogtreecommitdiff
path: root/src/plugins/resourceeditor/resourceeditorw.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-03-30 13:45:16 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-04-18 14:10:13 +0200
commitf1f9904d3578fd6790f0598e58cf6e2b5628eb50 (patch)
treefb6acc20015abb95462801c2a640db9b34fa24f1 /src/plugins/resourceeditor/resourceeditorw.cpp
parent469199e7a549086059ce1d7a6600ea3fdd317c80 (diff)
downloadqt-creator-f1f9904d3578fd6790f0598e58cf6e2b5628eb50.tar.gz
add errorString output argument to IFile::save()
this centralizes error reporting (in fact, in most cases it adds any in the first place). Task-number: QTCREATORBUG-1619
Diffstat (limited to 'src/plugins/resourceeditor/resourceeditorw.cpp')
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp
index a74735636c..65f1f12121 100644
--- a/src/plugins/resourceeditor/resourceeditorw.cpp
+++ b/src/plugins/resourceeditor/resourceeditorw.cpp
@@ -138,7 +138,7 @@ bool ResourceEditorW::open(const QString &fileName /* = QString() */)
return true;
}
-bool ResourceEditorFile::save(const QString &name /* = QString() */)
+bool ResourceEditorFile::save(QString *errorString, const QString &name /* = QString() */)
{
if (debugResourceEditorW)
qDebug(">ResourceEditorW::save: %s", qPrintable(name));
@@ -150,6 +150,7 @@ bool ResourceEditorFile::save(const QString &name /* = QString() */)
m_parent->m_resourceEditor->setFileName(actualName);
if (!m_parent->m_resourceEditor->save()) {
+ *errorString = m_parent->m_resourceEditor->errorMessage();
m_parent->m_resourceEditor->setFileName(oldFileName);
return false;
}