Move ensureUtf8Encoding to named namespace

To follow https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#sf21-dont-use-an-unnamed-anonymous-namespace-in-a-header

Add QtGlobal include to define QT_VERSION and QT_VERSION_CHECK macroses before
they're used.
This commit is contained in:
elsid 2023-01-12 22:29:48 +01:00
parent ee980721b8
commit dd89403df0
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
4 changed files with 15 additions and 13 deletions

View file

@ -308,7 +308,7 @@ bool Launcher::MainDialog::setupLauncherSettings()
return false;
}
QTextStream stream(&file);
ensureUtf8Encoding(stream);
Misc::ensureUtf8Encoding(stream);
mLauncherSettings.readFile(stream);
}
@ -344,7 +344,7 @@ bool Launcher::MainDialog::setupGameSettings()
return {};
}
QTextStream stream(&file);
ensureUtf8Encoding(stream);
Misc::ensureUtf8Encoding(stream);
(mGameSettings.*reader)(stream, ignoreContent);
file.close();
@ -544,7 +544,7 @@ bool Launcher::MainDialog::writeSettings()
QTextStream stream(&file);
stream.setDevice(&file);
ensureUtf8Encoding(stream);
Misc::ensureUtf8Encoding(stream);
mLauncherSettings.writeFile(stream);
file.close();