mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: send locale and language change events from KGlobalSettings
the signals come from the locale KCM however applications, libraries and widgets handling of such changes is mixed - some do it on QEvent::LocaleChange, some on QEvent::LanguageChange, some when the KGlobalSettings signal is send so sending the events will make sure that locale changes take effect immediatly (when and wherethe event is watched for ofcourse, KCalendarWidget does it for one) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a2e6cb8a18
commit
eebedd4c76
1 changed files with 10 additions and 2 deletions
|
@ -546,11 +546,19 @@ void KGlobalSettings::Private::_k_slotNotifyChange(int changeType, int arg)
|
|||
}
|
||||
} else {
|
||||
switch (category) {
|
||||
case SETTINGS_LOCALE:
|
||||
case SETTINGS_LOCALE: {
|
||||
KGlobal::locale()->reparseConfiguration();
|
||||
// KLocale is reponsible for both so event for locale and language change
|
||||
// is send
|
||||
QEvent localeevent(QEvent::LocaleChange);
|
||||
QApplication::sendEvent(qApp, &localeevent);
|
||||
QEvent languageevent(QEvent::LanguageChange);
|
||||
QApplication::sendEvent(qApp, &languageevent);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
emit q->settingsChanged(category);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue