diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-30 12:14:28 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-30 12:14:28 +0200 |
commit | 3c427654281e06e745ba5c4f62781469be991ac6 (patch) | |
tree | a197815e872d7ecd1ff908f0213a1e12edb6f3c6 /src/previewimage.cpp | |
parent | Turned "Add bookmark" action to KDE one and implemented an "add to preferred" (diff) | |
download | rekonq-3c427654281e06e745ba5c4f62781469be991ac6.tar.xz |
Cleaning thumbs cache
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r-- | src/previewimage.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp index 9cd1fdaa..af6e4361 100644 --- a/src/previewimage.cpp +++ b/src/previewimage.cpp @@ -90,5 +90,14 @@ void PreviewImage::mousePressEvent(QMouseEvent *event) QString PreviewImage::guessNameFromUrl(QString url) { - return QUrl(url).toString( QUrl::RemoveScheme | QUrl::RemoveUserInfo | QUrl::StripTrailingSlash ); + QString name = QUrl(url).toString( QUrl::RemoveScheme | QUrl::RemoveUserInfo | QUrl::StripTrailingSlash ); + + // TODO learn Regular Expressions :) + name.remove('/'); + name.remove('&'); + name.remove('.'); + name.remove('-'); + name.remove('_'); + + return name; } |