summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;