Fix compile with -DQT_NO_TRANSLATION
Change-Id: Ia6929f871485476e8b5bb14e7bf8117d0c562841 Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
6a98976791
commit
328df640f3
@ -24,3 +24,4 @@ contains(QT_BUILD_PARTS, tools):!contains(QT_CONFIG, no-gui):!contains(QT_CONFIG
|
||||
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, no-widgets):SUBDIRS += opengl
|
||||
contains(QT_CONFIG, dbus): SUBDIRS += dbus
|
||||
contains(QT_CONFIG, concurrent): SUBDIRS += qtconcurrent
|
||||
contains(DEFINES, QT_NO_TRANSLATION): SUBDIRS -= linguist
|
||||
|
@ -51,11 +51,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
#ifndef QT_NO_TRANSLATION
|
||||
QString translatorFileName = QLatin1String("qt_");
|
||||
translatorFileName += QLocale::system().name();
|
||||
QTranslator *translator = new QTranslator(&app);
|
||||
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
app.installTranslator(translator);
|
||||
#endif
|
||||
|
||||
ClassWizard wizard;
|
||||
wizard.show();
|
||||
|
@ -51,11 +51,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
#ifndef QT_NO_TRANSLATION
|
||||
QString translatorFileName = QLatin1String("qt_");
|
||||
translatorFileName += QLocale::system().name();
|
||||
QTranslator *translator = new QTranslator(&app);
|
||||
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
app.installTranslator(translator);
|
||||
#endif
|
||||
|
||||
LicenseWizard wizard;
|
||||
wizard.show();
|
||||
|
@ -49,11 +49,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
#ifndef QT_NO_TRANSLATION
|
||||
QString translatorFileName = QLatin1String("qt_");
|
||||
translatorFileName += QLocale::system().name();
|
||||
QTranslator *translator = new QTranslator(&app);
|
||||
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
app.installTranslator(translator);
|
||||
#endif
|
||||
|
||||
Dialog dialog;
|
||||
dialog.show();
|
||||
|
@ -115,12 +115,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
#ifndef QT_NO_TRANSLATION
|
||||
QString translatorFileName = QLatin1String("qt_");
|
||||
translatorFileName += QLocale::system().name();
|
||||
QTranslator *translator = new QTranslator(&app);
|
||||
if (translator->load(translatorFileName, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
app.installTranslator(translator);
|
||||
|
||||
#endif
|
||||
|
||||
QWizard wizard;
|
||||
wizard.addPage(createIntroPage());
|
||||
|
@ -14,6 +14,8 @@ SUBDIRS = \
|
||||
undo \
|
||||
undoframework
|
||||
|
||||
contains(DEFINES, QT_NO_TRANSLATION): SUBDIRS -= i18n
|
||||
|
||||
plugandpaint.depends = plugandpaintplugins
|
||||
|
||||
# install
|
||||
|
Loading…
Reference in New Issue
Block a user