From 85205e6368da2ee46cfe46b64f71a5c6beecab80 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 19 Jun 2012 17:37:01 +0200 Subject: Fix and improve save zoom feature, loading it on start This seems to work also with problem described in bug #295446 BUG: 277599 BUG: 296447 CCBUG: 295446 --- src/webpage.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/webpage.cpp b/src/webpage.cpp index efddba81..559d3eae 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -449,21 +449,22 @@ void WebPage::loadStarted() { _hasAdBlockedElements = false; rApp->adblockManager()->clearElementsLists(); -} - - -void WebPage::loadFinished(bool ok) -{ - Q_UNUSED(ok); // set zoom factor QString val; KSharedConfig::Ptr config = KGlobal::config(); KConfigGroup group(config, "Zoom"); val = group.readEntry(_loadingUrl.host(), QString("10")); - + int value = val.toInt(); - mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values + if (value != 10) + mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values +} + + +void WebPage::loadFinished(bool ok) +{ + Q_UNUSED(ok); // Provide site icon. Can this be moved to loadStarted?? rApp->iconManager()->provideIcon(mainFrame(), _loadingUrl); -- cgit v1.2.1