Commit b5f6361d authored by Thomas Hartmann's avatar Thomas Hartmann

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: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 8eabfcbb
...@@ -270,9 +270,16 @@ void FormEditorScene::mousePressEvent(QGraphicsSceneMouseEvent *event) ...@@ -270,9 +270,16 @@ void FormEditorScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
} }
} }
static QTime staticTimer()
{
QTime timer;
timer.start();
return timer;
}
void FormEditorScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event) void FormEditorScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{ {
static QTime time; static QTime time = staticTimer();
if (time.elapsed() > 30) { if (time.elapsed() > 30) {
time.restart(); time.restart();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment