diff options
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/listitem.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp index e73caa7f..8f299e4f 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)); } } |