More Symbian fixes.
authorAkos Polster <akos@pipacs.com>
Sat, 25 Sep 2010 23:50:22 +0000 (01:50 +0200)
committerAkos Polster <akos@pipacs.com>
Sat, 25 Sep 2010 23:50:22 +0000 (01:50 +0200)
bookview.cpp
widgets/dyalog.cpp

index 66cf03f..3803cee 100644 (file)
@@ -250,7 +250,7 @@ void BookView::paintEvent(QPaintEvent *e)
             continue;
         }
         int height = contentsHeight;
-        int bookmarkPos = (qreal)height * (qreal)b.pos;
+        int bookmarkPos = (int)((qreal)height * (qreal)b.pos);
         painter.drawPixmap(2, bookmarkPos - scrollPos.y(), bookmarkPixmap);
     }
 }
@@ -367,7 +367,7 @@ void BookView::enterEvent(QEvent *e)
 
 void BookView::goToPosition(qreal position)
 {
-    int scrollPos = (qreal)contentsHeight * position;
+    int scrollPos = (int)((qreal)contentsHeight * position);
     page()->mainFrame()->setScrollPosition(QPoint(0, scrollPos));
     // FIXME: update();
     qDebug() << "BookView::goToPosition: To" << scrollPos << "("
index 06db690..98dae5a 100644 (file)
@@ -45,11 +45,9 @@ Dyalog::Dyalog(QWidget *parent, bool showButtons):
 
 #ifdef Q_OS_SYMBIAN
     QAction *closeAction = new QAction(tr("Close"), this);
-    closeAction->setSoftKeyRole(QAction::CancelSoftKey);
+    closeAction->setSoftKeyRole(QAction::NegativeSoftKey);
     connect(closeAction, SIGNAL(triggered()), this, SLOT(reject()));
-    QList<QAction *> softKeys;
-    softKeys.append(closeAction);
-    setSoftKeys(softKeys);
+    addAction(closeAction);
 #endif // Q_OS_SYMBIAN
 }