Drop Application::setupTranslator()
KI18n already does the same for us in its Q_COREAPP_STARTUP_FUNCTION hook and setupTranslator() produces a compiler warning.
This commit is contained in:
parent
8eaebe5b7d
commit
b9daa38da1
4 changed files with 2 additions and 15 deletions
13
src/main.cpp
13
src/main.cpp
|
@ -43,12 +43,9 @@
|
|||
#include <KLocalizedString>
|
||||
// Qt
|
||||
#include <QCommandLineParser>
|
||||
#include <QLibraryInfo>
|
||||
#include <QQuickWindow>
|
||||
#include <QStandardPaths>
|
||||
#include <QTranslator>
|
||||
#include <qplatformdefs.h>
|
||||
#include <private/qtx11extras_p.h>
|
||||
#include <qplatformdefs.h>
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
|
@ -210,14 +207,6 @@ void Application::processCommandLine(QCommandLineParser *parser)
|
|||
Application::setCrashCount(parser->value(s_crashesOption).toInt());
|
||||
}
|
||||
|
||||
void Application::setupTranslator()
|
||||
{
|
||||
QTranslator *qtTranslator = new QTranslator(qApp);
|
||||
qtTranslator->load("qt_" + QLocale::system().name(),
|
||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
installTranslator(qtTranslator);
|
||||
}
|
||||
|
||||
void Application::setupMalloc()
|
||||
{
|
||||
#ifdef M_TRIM_THRESHOLD
|
||||
|
|
|
@ -124,7 +124,6 @@ public:
|
|||
void setOperationMode(OperationMode mode);
|
||||
bool shouldUseWaylandForCompositing() const;
|
||||
|
||||
void setupTranslator();
|
||||
void setupCommandLine(QCommandLineParser *parser);
|
||||
void processCommandLine(QCommandLineParser *parser);
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ int main(int argc, char *argv[])
|
|||
qunsetenv("QT_DEVICE_PIXEL_RATIO");
|
||||
qputenv("QSG_RENDER_LOOP", "basic");
|
||||
KWin::ApplicationWayland a(argc, argv);
|
||||
a.setupTranslator();
|
||||
|
||||
// reset QT_QPA_PLATFORM so we don't propagate it to our children (e.g. apps launched from the overview effect)
|
||||
qunsetenv("QT_QPA_PLATFORM");
|
||||
|
||||
|
|
|
@ -396,7 +396,6 @@ int main(int argc, char *argv[])
|
|||
QSurfaceFormat::setDefaultFormat(format);
|
||||
|
||||
KWin::ApplicationX11 a(argc, argv);
|
||||
a.setupTranslator();
|
||||
|
||||
// reset QT_QPA_PLATFORM so we don't propagate it to our children (e.g. apps launched from the overview effect)
|
||||
qunsetenv("QT_QPA_PLATFORM");
|
||||
|
|
Loading…
Reference in a new issue