Commit ac74bc07 authored by David Faure's avatar David Faure
Browse files

Add support for options.add("c").add("content", ....)

parent db0ec2d6
......@@ -81,7 +81,7 @@ foreach my $file (@ARGV) {
$_ = "";
} else {
if (defined $port_kapplicationAndK4AboutData) {
$_ .= " QApplication app(argc, argv);\n";
$_ .= " QApplication app(argc, argv); // TODO: move this to before the KAboutData initialization\n";
$_ .= " KAboutData::setApplicationData(aboutData);\n";
}
$_ .= " parser.addVersionOption();\n";
......@@ -169,12 +169,13 @@ foreach my $file (@ARGV) {
}
}
$QCommandLineParserAdded = 1;
} elsif (defined $opt && /(.*)$opt.add\s*\(\s*"([^\"]*)"\s*\)/) { # short option
} elsif (defined $opt && s/(.*)$opt\.add\s*\(\s*"([^\"]*)"\s*\)/$1$opt/) { # short option
$_ = "";
$short = "QLatin1String(\"$2\") << ";
$_ = "" if (!/\.add/);
warn "$file: Be sure that option is added \'$2\'\n";
} elsif (defined $opt && /(.*)$opt.add\s*\(\s*"([^\"]*)"\s*,\s*k(i18nc?)\((.*)\)\s*(?:,\s*([^\)]*))?\)/) {
}
if (defined $opt && /(.*)$opt.add\s*\(\s*"([^\"]*)"\s*,\s*k(i18nc?)\((.*)\)\s*(?:,\s*([^\)]*))?\)/) {
my $prefix = $1; # e.g. indent
my $name = $2;
my $i18n = $3;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment