call qt_initLocale() from QCoreApplication::init()

with QSystemLocale gone (5a8895be60) it was
no longer called at all

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-03-16 20:45:41 +02:00
parent 7a60a4a6ff
commit 61e052461c

View file

@ -38,6 +38,7 @@
#include "qelapsedtimer.h"
#include "qscopedpointer.h"
#include "qlibraryinfo.h"
#include "qlocale_tools_p.h"
#include "qthread_p.h"
#include "qprocess_p.h"
#include "qfactoryloader_p.h"
@ -318,6 +319,10 @@ void QCoreApplication::init()
Q_ASSERT_X(!self, "QCoreApplication", "there should be only one application object");
QCoreApplication::self = this;
// if there is no application instance then the locale-aware comparison
// will use fallback method (see QString::localeAwareCompare_helper())
qt_initLocale(qGetLang());
// use the event dispatcher created by the app programmer (if any),
// otherwise we create one
if (!d->threadData->eventDispatcher)