Skip to content

Commit 4ed3deb

Browse files
committed
refine setting of global locale at startup (necessary for macOS)
1 parent b0d5379 commit 4ed3deb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

QtPMbrowser/main.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ int main(int argc, char *argv[])
3939
if (use_C_locale) {
4040
QLocale::setDefault(QLocale::c());
4141
}
42-
else {
43-
std::locale::global(std::locale(QLocale::system().name().toUtf8())); // use system locale
44-
}
42+
QLocale loc;
43+
std::locale::global(std::locale(loc.name().toUtf8()));
4544
qDebug() << std::locale().name();
4645
}
4746
PMbrowserWindow w;

0 commit comments

Comments
 (0)