summaryrefslogtreecommitdiff
path: root/src/urlbar/listitem.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-22 01:42:58 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-22 01:42:58 +0200
commit1d2e4946e7650466a21acc6d2abb19740a63d431 (patch)
tree411406e7a02e77492a215904316b64f3fa55b73a /src/urlbar/listitem.cpp
parentFix embed kpart bahevior. Try embedding just when there is a ReadOnlyPart (diff)
downloadrekonq-1d2e4946e7650466a21acc6d2abb19740a63d431.tar.xz
Fix, improve and clean WebSnap API.
This led me to a little polish in the classes using the WebSnap facilities and to change the mechanism the NewTabPage retrieves images from the "cache"
Diffstat (limited to 'src/urlbar/listitem.cpp')
-rw-r--r--src/urlbar/listitem.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index a182c1a2..987d070f 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -242,12 +242,11 @@ PreviewLabel::PreviewLabel(const QString &url, int width, int height, QWidget *p
setFixedSize(width, height);
setFrameStyle(QFrame::StyledPanel | QFrame::Raised);
- KUrl u = WebSnap::fileForUrl( QUrl(url) );
- QString path = u.pathOrUrl();
- if(QFile::exists(path))
+ KUrl u = KUrl(url);
+ if( WebSnap::existsImage( KUrl(u) ) )
{
QPixmap preview;
- preview.load(path);
+ preview.load( WebSnap::imagePathFromUrl(u) );
setPixmap(preview.scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
}
}