1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/launcher/settings/gamesettings.cpp

35 lines
641 B
C++

#include <QTextStream>
#include <QString>
#include <QRegExp>
#include <QMap>
#include <QDebug>
#include "gamesettings.hpp"
GameSettings::GameSettings()
{
}
GameSettings::~GameSettings()
{
}
bool GameSettings::writeFile(QTextStream &stream)
{
QMap<QString, QString> settings = SettingsBase::getSettings();
QMapIterator<QString, QString> i(settings);
while (i.hasNext()) {
i.next();
// Quote values with spaces
if (i.value().contains(" ")) {
stream << i.key() << "=\"" << i.value() << "\"\n";
} else {
stream << i.key() << "=" << i.value() << "\n";
}
}
}