Commit dd21ecfe authored by Daniel Teske's avatar Daniel Teske
Browse files

PersistentSettingsWriter: Ensure that the directory exists



Task-number: QTCREATORBUG-7600

Change-Id: I5dc5ab24baff8fa14acd4d58dcb554e8531a150c
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 096c4db8
......@@ -38,6 +38,7 @@
#include <QDebug>
#include <QFile>
#include <QDir>
#include <QVariant>
#include <QStack>
#include <QXmlStreamAttributes>
......@@ -385,6 +386,8 @@ void PersistentSettingsWriter::saveValue(const QString &variable, const QVariant
bool PersistentSettingsWriter::save(const QString &fileName, const QString &docType,
QWidget *parent) const
{
QDir tmp;
tmp.mkpath(QFileInfo(fileName).path());
Utils::FileSaver saver(fileName, QIODevice::Text);
if (!saver.hasError()) {
const Context ctx;
......
Supports Markdown
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