From 41dfd254c3a972fd77389713d0e370b98247a12d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 7 Feb 2013 10:39:22 +0100 Subject: qdoc: Fix translation contexts. Put all translations into the namespace QDoc and fix warnings about invalid tr()-usage by removing the free tr()-function from tr.h. Provide QCoreApplication::translate() for bootstrap builds. Change-Id: I2b6931188346f290e80e14b84adff8892d8a860f Reviewed-by: Martin Smith Reviewed-by: Oswald Buddenhagen --- src/tools/qdoc/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/tools/qdoc/main.cpp') diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 2625782cfbf..348023b7501 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -110,7 +110,7 @@ static QString documentationPath; */ static void printHelp() { - Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n" + Location::information(QCoreApplication::translate("QDoc", "Usage: qdoc [options] file1.qdocconf ...\n" "Options:\n" " -D " "Define as a macro while parsing sources\n" @@ -149,7 +149,7 @@ static void printHelp() */ static void printVersion() { - QString s = tr("qdoc version %1").arg(QT_VERSION_STR); + QString s = QCoreApplication::translate("QDoc", "qdoc version %1").arg(QT_VERSION_STR); Location::information(s); } @@ -250,7 +250,7 @@ static void processQdocconfFile(const QString &fileName) All the other classes are initialized with the config. Here we initialize the configuration with some default values. */ - Config config(tr("qdoc")); + Config config(QCoreApplication::translate("QDoc", "qdoc")); int i = 0; while (defaults[i].key) { config.setStringList(defaults[i].key, QStringList() << defaults[i].value); @@ -325,7 +325,7 @@ static void processQdocconfFile(const QString &fileName) while (fn != fileNames.constEnd()) { QTranslator *translator = new QTranslator(0); if (!translator->load(*fn)) - config.lastLocation().error(tr("Cannot load translator '%1'").arg(*fn)); + config.lastLocation().error(QCoreApplication::translate("QDoc", "Cannot load translator '%1'").arg(*fn)); QCoreApplication::instance()->installTranslator(translator); translators.append(translator); ++fn; @@ -489,7 +489,7 @@ static void processQdocconfFile(const QString &fileName) while (of != outputFormats.constEnd()) { Generator* generator = Generator::generatorForFormat(*of); if (generator == 0) - outputFormatsLocation.fatal(tr("Unknown output format '%1'").arg(*of)); + outputFormatsLocation.fatal(QCoreApplication::translate("QDoc", "Unknown output format '%1'").arg(*of)); generator->generateTree(); ++of; } -- cgit v1.2.3 From d757d023fe5d2750ba03108ff2c5c117724a16a3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 7 Feb 2013 16:19:13 +0100 Subject: Fix spelling error found by bot. Change-Id: I7e9a00e014368450b6dcb8172f7888bb744d6555 Reviewed-by: Oswald Buddenhagen --- src/tools/qdoc/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/qdoc/main.cpp') diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 348023b7501..50632f1da46 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -115,7 +115,7 @@ static void printHelp() " -D " "Define as a macro while parsing sources\n" " -depends " - "Specify dependant modules\n" + "Specify dependent modules\n" " -help " "Display this information and exit\n" " -highlighting " -- cgit v1.2.3