diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-20 01:52:06 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-20 01:52:06 +0200 |
commit | f44942581445d8eef4f67e30c737c2e7a5f1e2a9 (patch) | |
tree | 9e7c23b0f3d47e9648597dc553ee1daea2052a01 /src/previewimage.cpp | |
parent | Fixing homepage (user's not rekonq's) opening and behaviour (diff) | |
download | rekonq-f44942581445d8eef4f67e30c737c2e7a5f1e2a9.tar.xz |
Fixing loading preview
busywidget image provided by AdriĆ :)
with Pano's intercession.
Many thanks!
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r-- | src/previewimage.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp index d027bfd1..b78f9ae5 100644 --- a/src/previewimage.cpp +++ b/src/previewimage.cpp @@ -27,6 +27,7 @@ #include "previewimage.moc" #include <QFile> +#include <QMovie> #include <KUrl> #include <KStandardDirs> @@ -46,22 +47,28 @@ PreviewImage::PreviewImage(const QString &url, const QString &pos) } else { - QString path = KStandardDirs::locate("appdata", "pics/loading.mng"); - setPixmap( QPixmap(path) ); - ws = new WebSnap( url, pos ); connect(ws, SIGNAL(finished()), this, SLOT(setSiteImage())); + + QString path = KStandardDirs::locate("appdata", "pics/busywidget.gif"); + + QMovie *movie = new QMovie(path, QByteArray(), this); + movie->setSpeed(50); + setMovie(movie); + movie->start(); } } PreviewImage::~PreviewImage() { - kDebug() << "bye bye.."; } void PreviewImage::setSiteImage() { - kDebug() << "Done. works?"; + QMovie *m = movie(); + delete m; + setMovie(0); + setPixmap( ws->previewImage() ); } |