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

improvements while porting fsview

parent 183879ee
......@@ -33,7 +33,7 @@ foreach my $file (@ARGV) {
my $needQCommandLineOption;
functionUtilkde::substInFile {
if (defined $port_kapplicationAndK4AboutData) {
if (/KApplication app/) {
if (/KApplication a/) {
$_ ="";
$needRemoveKApplication = 1;
}
......@@ -69,8 +69,8 @@ foreach my $file (@ARGV) {
}
s/K4AboutData::License_/KAboutLicense::/;
s/K4AboutData/KAboutData/g;
s/KAboutData::License_/KAboutLicense::/;
}
if (/KCmdLineOptions (\w*)/) {
$opt = $1;
......@@ -172,7 +172,7 @@ foreach my $file (@ARGV) {
} elsif (defined $opt && /(.*)$opt.add\s*\(\s*"([^\"]*)"\s*\)/) { # short option
$_ = "";
$short = "QLatin1String(\"$2\") <<";
$short = "QLatin1String(\"$2\") << ";
warn "$file: Be sure that option is added \'$2\'\n";
} elsif (defined $opt && /(.*)$opt.add\s*\(\s*"([^\"]*)"\s*,\s*k(i18nc?)\((.*)\)\s*(?:,\s*([^\)]*))?\)/) {
my $prefix = $1; # e.g. indent
......@@ -195,7 +195,7 @@ foreach my $file (@ARGV) {
$negatedOptions{$name} = 1;
}
my $translate = defined $use_tr ? "QCoreApplication::translate($context, $description)" : "$i18n($description)";
$_ = "${prefix}parser.addOption(QCommandLineOption(QStringList() << $short QLatin1String(\"$name\"), $translate$trail));\n";
$_ = "${prefix}parser.addOption(QCommandLineOption(QStringList() << ${short}QLatin1String(\"$name\"), $translate$trail));\n";
$needQCommandLineOption = 1;
$short = "";
} elsif (/KCmdLineArgs\s*\*\s*(\w*)\s*=\s*KCmdLineArgs::parsedArgs\(\s*\)/) {
......
......@@ -191,6 +191,9 @@ foreach my $file (@ARGV) {
if (`grep QStandardPaths $file | grep -v '#include'`) {
functionUtilkde::addIncludeInFile($file, "QStandardPaths");
}
if (`grep KSharedConfig $file | grep -v '#include'`) {
functionUtilkde::addIncludeInFile($file, "KSharedConfig");
}
}
functionUtilkde::diffFile( "@ARGV" );
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