summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-06-10 09:37:53 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2009-06-10 09:41:42 (GMT)
commit7886888d3e873500dd1ea7d3f450f7d7f87c0ea6 (patch)
treed107dcbdfd6d41707f10ea9fff6593cee9056f9a
parentc0becf8cb47312ec14a2b28e2a76a1d87a8e183e (diff)
downloadQt-7886888d3e873500dd1ea7d3f450f7d7f87c0ea6.zip
Qt-7886888d3e873500dd1ea7d3f450f7d7f87c0ea6.tar.gz
Qt-7886888d3e873500dd1ea7d3f450f7d7f87c0ea6.tar.bz2
BT: QtDemo works far to sluggish on mac
Basically we need to revert more of Oliviers change. The reason is that we just cannot run the demo on mac without timer based updates (as opposed to graphics view itself tries to figure out when to update). The reason is that the demo uses QItemAnimations extensivelly, which again uses QTimelines, wich again uses separate timers. And on mac, because of coalesced updated, each item animation will result in an individual redrawing of the scene. Task-number: 255751 Reviewed-by: Olivier
-rw-r--r--demos/qtdemo/mainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 8055fec..bfffba5 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -190,6 +190,7 @@ void MainWindow::switchTimerOnOff(bool on)
if (on && !Colors::noTimerUpdate){
this->useTimer = true;
+ this->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
this->fpsTime = QTime::currentTime();
this->updateTimer.start(int(1000 / Colors::fps));
}
@@ -261,6 +262,7 @@ void MainWindow::tick()
if (MenuManager::instance()->ticker)
MenuManager::instance()->ticker->tick();
+ this->viewport()->update();
if (this->useTimer)
this->updateTimer.start(int(1000 / Colors::fps));
}