diff --git a/tools/settingsgenerator/cppsettingsgenerator.cpp b/tools/settingsgenerator/cppsettingsgenerator.cpp index c9a2e83..d69ce91 100644 --- a/tools/settingsgenerator/cppsettingsgenerator.cpp +++ b/tools/settingsgenerator/cppsettingsgenerator.cpp @@ -23,11 +23,13 @@ void CppSettingsGenerator::process(const QString &inPath) if(!_hdrFile.open(QIODevice::WriteOnly | QIODevice::Text)) throw FileException{_hdrFile}; writeHeader(settings); + _hdr.flush(); _hdrFile.close(); if(!_srcFile.open(QIODevice::WriteOnly | QIODevice::Text)) throw FileException{_srcFile}; writeSource(settings); + _src.flush(); _srcFile.close(); } diff --git a/tools/settingsgenerator/cppsettingsgenerator.h b/tools/settingsgenerator/cppsettingsgenerator.h index fb3c3ba..e4c50d7 100644 --- a/tools/settingsgenerator/cppsettingsgenerator.h +++ b/tools/settingsgenerator/cppsettingsgenerator.h @@ -2,6 +2,7 @@ #define CPPSETTINGSGENERATOR_H #include "settingsgeneratorimpl.h" +#include class CppSettingsGenerator : public SettingsGeneratorImpl { diff --git a/tools/settingsgenerator/qmlsettingsgenerator.cpp b/tools/settingsgenerator/qmlsettingsgenerator.cpp index b336054..9dbb70a 100644 --- a/tools/settingsgenerator/qmlsettingsgenerator.cpp +++ b/tools/settingsgenerator/qmlsettingsgenerator.cpp @@ -24,11 +24,13 @@ void QmlSettingsGenerator::process(const QString &inPath) if(!_hdrFile.open(QIODevice::WriteOnly | QIODevice::Text)) throw FileException{_hdrFile}; auto typeNum = writeHeader(settings, QFileInfo{inPath}.completeBaseName() + QStringLiteral(".h")); + _hdr.flush(); _hdrFile.close(); if(!_srcFile.open(QIODevice::WriteOnly | QIODevice::Text)) throw FileException{_srcFile}; writeSource(settings, typeNum); + _src.flush(); _srcFile.close(); } diff --git a/tools/settingsgenerator/qmlsettingsgenerator.h b/tools/settingsgenerator/qmlsettingsgenerator.h index 72e17fc..9dce990 100644 --- a/tools/settingsgenerator/qmlsettingsgenerator.h +++ b/tools/settingsgenerator/qmlsettingsgenerator.h @@ -4,6 +4,7 @@ #include "settingsgeneratorimpl.h" #include #include +#include class QmlSettingsGenerator : public SettingsGeneratorImpl { diff --git a/tools/settingsgenerator/settingsgeneratorimpl.h b/tools/settingsgenerator/settingsgeneratorimpl.h index de07d2c..a9655f4 100644 --- a/tools/settingsgenerator/settingsgeneratorimpl.h +++ b/tools/settingsgenerator/settingsgeneratorimpl.h @@ -2,7 +2,6 @@ #define SETTINGSGENERATOR_H #include -#include #include "qsettingsgenerator.h" #include "settingsconfigimpl_p.h" diff --git a/tools/settingsgenerator/settingstranslator.cpp b/tools/settingsgenerator/settingstranslator.cpp index 25e37ab..150c4c6 100644 --- a/tools/settingsgenerator/settingstranslator.cpp +++ b/tools/settingsgenerator/settingstranslator.cpp @@ -51,6 +51,7 @@ void SettingsTranslator::writeTranslations(const SettingsConfigType &settings, c _src << "}\n\n" << "}\n"; + _src.flush(); _srcFile.close(); }