Even more Symbian improvements. Work around softkey visibility bug.
[dorian] / model / book.cpp
index e15ac5a..ca6f912 100644 (file)
@@ -53,7 +53,7 @@ bool Book::open()
     if (!parse()) {
         return false;
     }
-    dateOpened = QDateTime::currentDateTimeUtc();
+    dateOpened = QDateTime::currentDateTime().toUTC();
     save();
     emit opened(path());
     return true;
@@ -82,7 +82,7 @@ void Book::peek()
 
 void Book::close()
 {
-    TRACE;
+    Trace t("Book::close");
     content.clear();
     parts.clear();
     QDir::setCurrent(QDir::rootPath());
@@ -336,13 +336,18 @@ void Book::save()
     BookDb::instance()->save(path(), data);
 }
 
-void Book::setLastBookmark(int part, qreal position)
+void Book::setLastBookmark(int part, qreal position, bool fast)
 {
     TRACE;
-    load();
+    qDebug() << "Part" << part << "position" << position << "fast?" << fast;
+    if (!fast) {
+        load();
+    }
     mLastBookmark.part = part;
     mLastBookmark.pos = position;
-    save();
+    if (!fast) {
+        save();
+    }
 }
 
 Book::Bookmark Book::lastBookmark()