summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Common/Code/_Win32/Preferences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Common/Code/_Win32/Preferences.cpp')
-rw-r--r--src/Authoring/Common/Code/_Win32/Preferences.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Authoring/Common/Code/_Win32/Preferences.cpp b/src/Authoring/Common/Code/_Win32/Preferences.cpp
index 2dc0159f..0adb1268 100644
--- a/src/Authoring/Common/Code/_Win32/Preferences.cpp
+++ b/src/Authoring/Common/Code/_Win32/Preferences.cpp
@@ -27,6 +27,7 @@
****************************************************************************/
#include "Preferences.h"
+#include "StudioUtils.h"
#include <QtCore/qdir.h>
#include <QtCore/qsavefile.h>
@@ -42,9 +43,8 @@ void CPreferences::save()
{
if (!m_PreferencesFile.isEmpty() && !m_domDoc.isNull()) {
QSaveFile file(m_PreferencesFile);
- file.open(QIODevice::WriteOnly);
- if (file.write(m_domDoc.toByteArray(4)) != -1)
- file.commit();
+ if (StudioUtils::openTextSave(file))
+ StudioUtils::commitDomDocumentSave(file, m_domDoc);
}
}