diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2010-08-24 14:53:49 +0200 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2010-08-25 11:03:31 +0200 |
commit | 2ced28f5484c547c121da38714ca8702c1362087 (patch) | |
tree | 1169ddaef11941f6bb8c22832578b73073845feb /src | |
parent | Awesome bar: support for multiple word search. (diff) | |
download | rekonq-2ced28f5484c547c121da38714ca8702c1362087.tar.xz |
Name cleanup in WebSnap::imagePathFromUrl with QRegExp.
One less TODO to worry about.
Diffstat (limited to 'src')
-rw-r--r-- | src/websnap.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp index 1405fb6e..afa08c64 100644 --- a/src/websnap.cpp +++ b/src/websnap.cpp @@ -185,18 +185,7 @@ QString WebSnap::imagePathFromUrl(const KUrl &url) { QUrl temp = QUrl(url.url()); QString name = temp.toString(QUrl::RemoveScheme | QUrl::RemoveUserInfo | QUrl::StripTrailingSlash); - - // TODO learn Regular Expressions :) - // and implement something better here.. - name.remove('/'); - name.remove('&'); - name.remove('.'); - name.remove('-'); - name.remove('_'); - name.remove('?'); - name.remove('='); - name.remove('+'); - + name.remove(QRegExp(QL1S("[&+=_?./-]"))); return KStandardDirs::locateLocal("cache", QString("thumbs/") + name + ".png", true); } |