From: Tasuku Suzuki Date: Mon, 30 Dec 2013 18:06:02 +0000 (+0900) Subject: Make qtdeclarative compile with QT_NO_TRANSLATION X-Git-Tag: accepted/tizen/ivi/20140115.202802~3^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aae772e7c3820fe3559dafcaa958711d89a78827;p=platform%2Fupstream%2Fqtdeclarative.git Make qtdeclarative compile with QT_NO_TRANSLATION Change-Id: I73efc8c568e2368bc804eacab9e8f9cced8a030b Reviewed-by: Alan Alpert Reviewed-by: Oswald Buddenhagen --- diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp index b4ace17..2089494 100644 --- a/src/qml/qml/qqmlapplicationengine.cpp +++ b/src/qml/qml/qqmlapplicationengine.cpp @@ -60,7 +60,7 @@ QQmlApplicationEnginePrivate::~QQmlApplicationEnginePrivate() void QQmlApplicationEnginePrivate::cleanUp() { qDeleteAll(objects); -#ifndef QT_NO_TRANSLATIONS +#ifndef QT_NO_TRANSLATION qDeleteAll(translators); #endif } @@ -71,7 +71,7 @@ void QQmlApplicationEnginePrivate::init() q->connect(&statusMapper, SIGNAL(mapped(QObject*)), q, SLOT(_q_finishLoad(QObject*))); q->connect(q, SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit())); -#ifndef QT_NO_TRANSLATIONS +#ifndef QT_NO_TRANSLATION QTranslator* qtTranslator = new QTranslator; if (qtTranslator->load(QLatin1String("qt_") + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) QCoreApplication::installTranslator(qtTranslator); @@ -83,7 +83,7 @@ void QQmlApplicationEnginePrivate::init() void QQmlApplicationEnginePrivate::loadTranslations(const QUrl &rootFile) { -#ifndef QT_NO_TRANSLATIONS +#ifndef QT_NO_TRANSLATION if (rootFile.scheme() != QLatin1String("file") && rootFile.scheme() != QLatin1String("qrc")) return; @@ -96,6 +96,8 @@ void QQmlApplicationEnginePrivate::loadTranslations(const QUrl &rootFile) } else { delete translator; } +#else + Q_UNUSED(rootFile) #endif }