Don't output a warning that can trigger before Qt has fully initialized

If a warning is outputted before Qt has had a chance to initialize the
logging rules then it will cause it to hang as it will be stuck trying
to initialize but can't continue because it needs to output the warning
which triggered during that initialization. Therefore the warning should
not be outputted to avoid this from happening.

Change-Id: I202752c377bf69def2f7fb76be71b78d00ad3fd5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Andy Shaw 2020-04-30 09:39:16 +02:00
parent 042b118caf
commit 1eeabc6652

View File

@ -763,8 +763,6 @@ static void updateSystemPrivate()
const ushort group = res.toString().at(0).unicode(); const ushort group = res.toString().at(0).unicode();
if (group != globalLocaleData.m_decimal) if (group != globalLocaleData.m_decimal)
globalLocaleData.m_group = group; globalLocaleData.m_group = group;
else if (group == globalLocaleData.m_group)
qWarning("System-supplied decimal and grouping character are both 0x%hx", group);
} }
res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant()); res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant());