Fix QTranslator installation for Qt translations

The translator instance was uninstalled right away after installation
because it was destroyed when returning from the function.

REVIEW: 121977
This commit is contained in:
Lasse Liehu 2015-01-12 21:10:38 +02:00
parent c4fb3cd55d
commit 4963bf3d44

View file

@ -312,10 +312,10 @@ void Application::registerDBusService()
void Application::setupTranslator()
{
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
installTranslator(&qtTranslator);
QTranslator *qtTranslator = new QTranslator(qApp);
qtTranslator->load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
installTranslator(qtTranslator);
}
void Application::setupMalloc()