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:
parent
c4fb3cd55d
commit
4963bf3d44
1 changed files with 4 additions and 4 deletions
8
main.cpp
8
main.cpp
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue