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

@ -230,7 +230,7 @@ bool Config::GameSettings::isOrderedLine(const QString& line)
bool Config::GameSettings::writeFileWithComments(QFile& file)
{
QTextStream stream(&file);
ensureUtf8Encoding(stream);
Misc::ensureUtf8Encoding(stream);
// slurp
std::vector<QString> fileCopy;