summaryrefslogtreecommitdiff
path: root/src/linguist/lupdate/main.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-03-21 13:16:05 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2022-04-20 10:45:10 +0200
commit2ee67a6709b9f829c5ec36b8f3e69d415f696cec (patch)
tree85844a2bb8d091dbbce5309680f0809f16ef48ed /src/linguist/lupdate/main.cpp
parent7b2aade5ca4798e180aca7daf9033351b37653e5 (diff)
downloadqttools-2ee67a6709b9f829c5ec36b8f3e69d415f696cec.tar.gz
Replace uses of deprecated _qs with _s
Task-number: QTBUG-101408 Change-Id: If6f25418bf3af66ad9bde2dba8bf529b8d202f83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/linguist/lupdate/main.cpp')
-rw-r--r--src/linguist/lupdate/main.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/linguist/lupdate/main.cpp b/src/linguist/lupdate/main.cpp
index c28c19a2e..1ab525c79 100644
--- a/src/linguist/lupdate/main.cpp
+++ b/src/linguist/lupdate/main.cpp
@@ -49,6 +49,8 @@
#include <iostream>
+using namespace Qt::StringLiterals;
+
bool useClangToParseCpp = false;
QString commandLineCompilationDatabaseDir; // for the path to the json file passed as a command line argument.
// Has priority over what is in the .pro file and passed to the project.
@@ -757,11 +759,11 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-project")) {
++i;
if (i == argc) {
- printErr(u"The option -project requires a parameter.\n"_qs);
+ printErr(u"The option -project requires a parameter.\n"_s);
return 1;
}
if (!projectDescriptionFile.isEmpty()) {
- printErr(u"The option -project must appear only once.\n"_qs);
+ printErr(u"The option -project must appear only once.\n"_s);
return 1;
}
projectDescriptionFile = args[i];
@@ -770,7 +772,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-target-language")) {
++i;
if (i == argc) {
- printErr(u"The option -target-language requires a parameter.\n"_qs);
+ printErr(u"The option -target-language requires a parameter.\n"_s);
return 1;
}
targetLanguage = args[i];
@@ -778,7 +780,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-source-language")) {
++i;
if (i == argc) {
- printErr(u"The option -source-language requires a parameter.\n"_qs);
+ printErr(u"The option -source-language requires a parameter.\n"_s);
return 1;
}
sourceLanguage = args[i];
@@ -786,7 +788,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-disable-heuristic")) {
++i;
if (i == argc) {
- printErr(u"The option -disable-heuristic requires a parameter.\n"_qs);
+ printErr(u"The option -disable-heuristic requires a parameter.\n"_s);
return 1;
}
arg = args[i];
@@ -797,14 +799,14 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("number")) {
options &= ~HeuristicNumber;
} else {
- printErr(u"Invalid heuristic name passed to -disable-heuristic.\n"_qs);
+ printErr(u"Invalid heuristic name passed to -disable-heuristic.\n"_s);
return 1;
}
continue;
} else if (arg == QLatin1String("-locations")) {
++i;
if (i == argc) {
- printErr(u"The option -locations requires a parameter.\n"_qs);
+ printErr(u"The option -locations requires a parameter.\n"_s);
return 1;
}
if (args[i] == QLatin1String("none")) {
@@ -814,7 +816,7 @@ int main(int argc, char **argv)
} else if (args[i] == QLatin1String("absolute")) {
options |= AbsoluteLocations;
} else {
- printErr(u"Invalid parameter passed to -locations.\n"_qs);
+ printErr(u"Invalid parameter passed to -locations.\n"_s);
return 1;
}
continue;
@@ -848,7 +850,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-extensions")) {
++i;
if (i == argc) {
- printErr(u"The -extensions option should be followed by an extension list.\n"_qs);
+ printErr(u"The -extensions option should be followed by an extension list.\n"_s);
return 1;
}
extensions = args[i];
@@ -856,7 +858,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-tr-function-alias")) {
++i;
if (i == argc) {
- printErr(u"The -tr-function-alias option should be followed by a list of function=alias mappings.\n"_qs);
+ printErr(u"The -tr-function-alias option should be followed by a list of function=alias mappings.\n"_s);
return 1;
}
if (!handleTrFunctionAliases(args[i]))
@@ -865,7 +867,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-pro")) {
++i;
if (i == argc) {
- printErr(u"The -pro option should be followed by a filename of .pro file.\n"_qs);
+ printErr(u"The -pro option should be followed by a filename of .pro file.\n"_s);
return 1;
}
QString file = QDir::cleanPath(QFileInfo(args[i]).absoluteFilePath());
@@ -875,7 +877,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-pro-out")) {
++i;
if (i == argc) {
- printErr(u"The -pro-out option should be followed by a directory name.\n"_qs);
+ printErr(u"The -pro-out option should be followed by a directory name.\n"_s);
return 1;
}
outDir = QDir::cleanPath(QFileInfo(args[i]).absoluteFilePath());
@@ -884,7 +886,7 @@ int main(int argc, char **argv)
if (arg.length() == 2) {
++i;
if (i == argc) {
- printErr(u"The -I option should be followed by a path.\n"_qs);
+ printErr(u"The -I option should be followed by a path.\n"_s);
return 1;
}
includePath += args[i];
@@ -930,7 +932,7 @@ int main(int argc, char **argv)
if (lineContent.startsWith(QLatin1String("-I"))) {
if (lineContent.length() == 2) {
- printErr(u"The -I option should be followed by a path.\n"_qs);
+ printErr(u"The -I option should be followed by a path.\n"_s);
return 1;
}
includePath += lineContent.mid(2);
@@ -1038,11 +1040,11 @@ int main(int argc, char **argv)
if (!targetLanguage.isEmpty() && tsFileNames.count() != 1)
printErr(u"lupdate warning: -target-language usually only"
- " makes sense with exactly one TS file.\n"_qs);
+ " makes sense with exactly one TS file.\n"_s);
QString errorString;
if (!proFiles.isEmpty()) {
- runInternalQtTool(u"lupdate-pro"_qs, app.arguments().mid(1));
+ runInternalQtTool(u"lupdate-pro"_s, app.arguments().mid(1));
return 0;
}
@@ -1065,7 +1067,7 @@ int main(int argc, char **argv)
if (projectDescription.empty()) {
if (tsFileNames.isEmpty())
printErr(u"lupdate warning:"
- " no TS files specified. Only diagnostics will be produced.\n"_qs);
+ " no TS files specified. Only diagnostics will be produced.\n"_s);
Translator fetchedTor;
ConversionData cd;