don't return false from removeTranslator() just because of shutting down
the condition is supposed to suppress the event emission, not to trash the return value. Change-Id: I3e327ceedb909ac29ba975c49b0f039b50eb4ee1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
90387bb446
commit
faa3759120
@ -1630,9 +1630,11 @@ bool QCoreApplication::removeTranslator(QTranslator *translationFile)
|
||||
if (!QCoreApplicationPrivate::checkInstance("removeTranslator"))
|
||||
return false;
|
||||
QCoreApplicationPrivate *d = self->d_func();
|
||||
if (d->translators.removeAll(translationFile) && !self->closingDown()) {
|
||||
QEvent ev(QEvent::LanguageChange);
|
||||
QCoreApplication::sendEvent(self, &ev);
|
||||
if (d->translators.removeAll(translationFile)) {
|
||||
if (!self->closingDown()) {
|
||||
QEvent ev(QEvent::LanguageChange);
|
||||
QCoreApplication::sendEvent(self, &ev);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user