summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2016-04-30 12:16:52 +0200
committerDavid Faure <[email protected]>2016-04-30 12:16:52 +0200
commitc1bc28d97a43edaeb48f0113e513d043e8fcc6d8 (patch)
tree82ec95d7cdb113f2139de6099ffe7ad2e8661752
parent5630a8e5f2b64c3e63f11a1e21684c98edf39828 (diff)
Add suppport for url.url(KUrl::RemoveTrailingSlash)
-rwxr-xr-xkf5/convert-kurl.pl14
1 files changed, 8 insertions, 6 deletions
diff --git a/kf5/convert-kurl.pl b/kf5/convert-kurl.pl
index a462767..026fb34 100755
--- a/kf5/convert-kurl.pl
+++ b/kf5/convert-kurl.pl
@@ -134,15 +134,17 @@ foreach my $file (@ARGV) {
my $url = $1;
s/$url\.directory\(\)/$url\.adjusted(QUrl::RemoveFilename|QUrl::StripTrailingSlash).path()/g;
}
+ # url.url(KUrl::RemoveTrailingSlash)
+ if (/\.url\([KQ]Url::RemoveTrailingSlash\)/) {
+ s/\.url\([KQ]Url::RemoveTrailingSlash\)/\.adjusted(QUrl::StripTrailingSlash).toString()/g;
+ }
# url.path(KUrl::RemoveTrailingSlash)
- if (/(\w+)\.path\(KUrl::RemoveTrailingSlash\)/ && defined $urls{$1}) {
- my $url = $1;
- s/$url\.path\(KUrl::RemoveTrailingSlash\)/$url\.adjusted(QUrl::StripTrailingSlash).path()/g;
+ if (/\.path\(KUrl::RemoveTrailingSlash\)/) {
+ s/\.path\(KUrl::RemoveTrailingSlash\)/\.adjusted(QUrl::StripTrailingSlash).path()/g;
}
# url.toLocalFile(KUrl::RemoveTrailingSlash)
- if (/(\w+)\.toLocalFile\(KUrl::RemoveTrailingSlash\)/ && defined $urls{$1}) {
- my $url = $1;
- s/$url\.toLocalFile\(KUrl::RemoveTrailingSlash\)/$url\.adjusted(QUrl::StripTrailingSlash).toLocalFile()/g;
+ if (/\.toLocalFile\(KUrl::RemoveTrailingSlash\)/) {
+ s/\.toLocalFile\(KUrl::RemoveTrailingSlash\)/\.adjusted(QUrl::StripTrailingSlash).toLocalFile()/g;
}
# url.adjustPath(KUrl::RemoveTrailingSlash)
if (/(\w+)\.adjustPath\(KUrl::RemoveTrailingSlash\)/ && defined $urls{$1}) {