summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-11-01 17:50:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 18:07:35 +0100
commitfaa37591206268c98dda2b22d7bfaa7992bd1c4b (patch)
treeaadbc817707f83152e51ff208288b0a93609e037 /src/corelib/kernel
parent90387bb4461f46b8c725c55066247fba5fbd152f (diff)
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>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 2575f0b6aa..cb744a67a6 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -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;