QCocoaInputContext: Don't emit locale update on startup
We're just resolving the initial locale, via the call site in the constructor. Change-Id: I186f4c491c013cce265a855963a8624ce5c6da97 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>bb10
parent
500be123f4
commit
fa54471050
|
|
@ -150,11 +150,18 @@ void QCocoaInputContext::updateLocale()
|
|||
|
||||
QString language = QString::fromNSString(languages.firstObject);
|
||||
QLocale locale(language);
|
||||
if (m_locale != locale) {
|
||||
|
||||
bool localeUpdated = m_locale != locale;
|
||||
static bool firstUpdate = true;
|
||||
|
||||
m_locale = locale;
|
||||
|
||||
if (localeUpdated && !firstUpdate) {
|
||||
qCDebug(lcQpaInputMethods) << "Reporting new locale" << locale;
|
||||
m_locale = locale;
|
||||
emitLocaleChanged();
|
||||
}
|
||||
|
||||
firstUpdate = false;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Reference in New Issue