summaryrefslogtreecommitdiff
path: root/src/previewimage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-30 12:14:28 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-30 12:14:28 +0200
commit3c427654281e06e745ba5c4f62781469be991ac6 (patch)
treea197815e872d7ecd1ff908f0213a1e12edb6f3c6 /src/previewimage.cpp
parentTurned "Add bookmark" action to KDE one and implemented an "add to preferred" (diff)
downloadrekonq-3c427654281e06e745ba5c4f62781469be991ac6.tar.xz
Cleaning thumbs cache
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r--src/previewimage.cpp11
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;
}