summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2016-08-05 22:00:22 (GMT)
committerDavid Faure <faure@kde.org>2016-08-05 22:00:22 (GMT)
commit91bf543ed25a4ec433417cfbb08b4257e8b4fab6 (patch)
treed9d7e75ecc16a99cb6fff8e4001dc528f501dda6
parent722b12490d0c14eab6629042a4b117f967e80dda (diff)
fix parsing of options.add("yes-label <text>" (the '-' broke it)
-rwxr-xr-xkf5/convert-kcmdlineargs.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/kf5/convert-kcmdlineargs.pl b/kf5/convert-kcmdlineargs.pl
index fa251bb..9daff90 100755
--- a/kf5/convert-kcmdlineargs.pl
+++ b/kf5/convert-kcmdlineargs.pl
@@ -182,7 +182,7 @@ foreach my $file (@ARGV) {
my $description = $4;
my $defaultValue = $5;
my $trail = "";
- if ($name =~ /(\w*) <(.*)>/) { # "stylesheet <xsl>"
+ if ($name =~ /([\w-_]*) <(.*)>/) { # "stylesheet <xsl>"
$name = $1;
$trail = ", QLatin1String(\"$2\")";
}
@@ -217,7 +217,7 @@ foreach my $file (@ARGV) {
s/${args}\->usage\s*\(\)/parser.showHelp()/;
s/${args}\->clear\s*\(\);//;
s/KCmdLineArgs::usage\s*\(\)/parser.showHelp()/;
- if (/arguments?\(\"(\w*)/ || /isSet\(\"(\w*)/) {
+ if (/arguments?\(\"([\w-_]*)/ || /isSet\(\"([\w-_]*)/) {
my $optionName = $1;
if (defined $negatedOptions{"no$optionName"}) {
s/$/\/\/ TODO: negate check (and ensure nobody passes the no-op --$optionName argument)/;