QmlDesigner: fix for QTime

We have to call start() for QTime.
Calling elapsed() without calling start before
was never defined.

Change-Id: I229b3cbb30a2b3e5e98fdb05736ee0f37ae42c38
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Thomas Hartmann
2012-10-01 11:29:14 +02:00
parent 8eabfcbbd7
commit b5f6361dec

View File

@@ -270,9 +270,16 @@ void FormEditorScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
}
static QTime staticTimer()
{
QTime timer;
timer.start();
return timer;
}
void FormEditorScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
static QTime time;
static QTime time = staticTimer();
if (time.elapsed() > 30) {
time.restart();