forked from qt-creator/qt-creator
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: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user