summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2010-09-14 23:02:10 +0200
committerPierre Rossi <pierre.rossi@nokia.com>2010-09-15 18:40:33 +0200
commitaad3dfe4b42bd0f909755710d4fa2ac02ce59a0f (patch)
treeabbdaee0ca283e634f4f20c8f4c212b3885fba5b /src/newtabpage.cpp
parentUpgraded download i18n script to automagically grab translation strings (diff)
downloadrekonq-aad3dfe4b42bd0f909755710d4fa2ac02ce59a0f.tar.xz
Websnaps: change the image path to use base64.
This should solve the problems caused by special characters for good. A few other improvements: - do not call updateImage as many times as there are favorites. - removed an unused variable. - trade #defines for static const ints - take advantage of the already loaded page to refresh the snapshot.
Diffstat (limited to 'src/newtabpage.cpp')
-rw-r--r--src/newtabpage.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index e579e7b9..f5c9c186 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -238,7 +238,7 @@ QWebElement NewTabPage::loadingPreview(int index, const KUrl &url)
// 2) to "auto-destroy" snaps on tab closing :)
QWebFrame *frame = qobject_cast<QWebFrame *>(parent());
WebSnap *snap = new WebSnap(url, frame);
- connect(snap, SIGNAL(snapDone(bool)), frame->page(), SLOT(updateImage(bool)));
+ connect(snap, SIGNAL(snapDone(bool)), frame->page(), SLOT(updateImage(bool)), Qt::UniqueConnection);
return prev;
}
@@ -247,7 +247,6 @@ QWebElement NewTabPage::validPreview(int index, const KUrl &url, const QString &
{
QWebElement prev = markup(".thumbnail");
QString previewPath = QL1S("file://") + WebSnap::imagePathFromUrl(url);
- QString iString = QVariant(index).toString();
prev.findFirst(".preview img").setAttribute("src" , previewPath);
prev.findFirst("a").setAttribute("href", url.toMimeDataString()); // NOTE ?
@@ -256,7 +255,6 @@ QWebElement NewTabPage::validPreview(int index, const KUrl &url, const QString &
setupPreview(prev, index);
showControls(prev);
-
return prev;
}