summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generators/qtdoc/main.cpp2
-rw-r--r--main.cpp13
2 files changed, 10 insertions, 5 deletions
diff --git a/generators/qtdoc/main.cpp b/generators/qtdoc/main.cpp
index 76d695bf..21fab147 100644
--- a/generators/qtdoc/main.cpp
+++ b/generators/qtdoc/main.cpp
@@ -26,7 +26,7 @@
int main(int argc, char *argv[])
{
QStringList args;
- args.append("--generatorSet=qtdoc");
+ args.append("--generator-set=qtdoc");
for (int i = 1; i < argc; i++)
args.append(argv[i]);
return QProcess::execute("generatorrunner", args);
diff --git a/main.cpp b/main.cpp
index dfa79e8e..88e4eabd 100644
--- a/main.cpp
+++ b/main.cpp
@@ -87,9 +87,9 @@ void printUsage(const GeneratorList& generators)
generalOptions.insert("include-paths=<path>[" PATH_SPLITTER "<path>" PATH_SPLITTER "...]", "Include paths used by the C++ parser");
generalOptions.insert("typesystem-paths=<path>[" PATH_SPLITTER "<path>" PATH_SPLITTER "...]", "Paths used when searching for typesystems");
generalOptions.insert("documentation-only", "Do not generates any code, just the documentation");
- generalOptions.insert("license-file=[licensefile]", "File used for copyright headers of generated files");
+ generalOptions.insert("license-file=[license-file]", "File used for copyright headers of generated files");
generalOptions.insert("version", "Output version information and exit");
- generalOptions.insert("generatorSet", "generatorSet to be used. e.g. qtdoc");
+ generalOptions.insert("generator-set", "generator-set to be used. e.g. qtdoc");
generalOptions.insert("api-version", "Specify the supported api version used to generate the bindings");
printOptions(s, generalOptions);
@@ -118,7 +118,12 @@ int main(int argc, char *argv[])
}
// Try to load a generator
- QString generatorSet = args.value("generatorSet");
+ QString generatorSet = args.value("generator-set");
+
+ // Also check "generatorSet" command line argument for backward compatibility.
+ if (generatorSet.isEmpty())
+ generatorSet = args.value("generatorSet");
+
if (!generatorSet.isEmpty()) {
QFileInfo generatorFile(generatorSet);
@@ -134,7 +139,7 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
} else if (!args.contains("help")) {
- std::cerr << argv[0] << ": You need to specify a generator with --generatorSet=GENERATOR_NAME" << std::endl;
+ std::cerr << argv[0] << ": You need to specify a generator with --generator-set=GENERATOR_NAME" << std::endl;
return EXIT_FAILURE;
}