Speed up paging through the book. Clean up code for saving/restoring
[dorian] / bookview.cpp
index 503b40e..30a1499 100644 (file)
@@ -406,27 +406,6 @@ void BookView::addJavaScriptObjects()
     page()->mainFrame()->addToJavaScriptWindowObject("bv", this);
 }
 
-#ifdef Q_WS_MAEMO_5
-
-void BookView::leaveEvent(QEvent *e)
-{
-    TRACE;
-    // Save current position, to be restored later
-    setLastBookmark();
-    QWebView::leaveEvent(e);
-}
-
-void BookView::resizeEvent(QEvent *e)
-{
-    TRACE;
-    // Restore position saved at Leave event. This seems to be required,
-    // after temporarily switching from portrait to landscape and back
-    restoreLastBookmark();
-    QWebView::enterEvent(e);
-}
-
-#endif // Q_WS_MAEMO_5
-
 void BookView::goToPosition(qreal position)
 {
     int contentsHeight = page()->mainFrame()->contentsSize().height();
@@ -489,7 +468,7 @@ void BookView::goNextPage()
     if (pos == frame->scrollPosition().y()) {
         goNext();
     } else {
-        setLastBookmark();
+        // setLastBookmark();
         showProgress();
     }
 }