summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-06-12 18:36:19 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-06-12 18:36:25 +0200
commit0f93eff78f1396f4d55e08b1bffaf7ce557b364f (patch)
tree4f5f283d427da18330095a77b616dbea8cf65907
parent2bb9fcf369967a9cea4a45d638350268cbb373d7 (diff)
downloadqtscript-0f93eff78f1396f4d55e08b1bffaf7ce557b364f.tar.gz
Convert uses of QTime as a timer to QElapsedTimer
Change-Id: I19b6f439aa475c32cfe90e67adba93127e476d6e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent.cpp2
-rw-r--r--src/scripttools/debugging/qscriptdebuggeragent_p_p.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggeragent.cpp b/src/scripttools/debugging/qscriptdebuggeragent.cpp
index 5642dfe..7e25304 100644
--- a/src/scripttools/debugging/qscriptdebuggeragent.cpp
+++ b/src/scripttools/debugging/qscriptdebuggeragent.cpp
@@ -559,7 +559,7 @@ void QScriptDebuggerAgent::positionChange(qint64 scriptId,
if (engine()->processEventsInterval() == -1) {
// see if it's time to call processEvents()
if ((++d->statementCounter % 25000) == 0) {
- if (!d->processEventsTimer.isNull()) {
+ if (d->processEventsTimer.isValid()) {
if (d->processEventsTimer.elapsed() > 30) {
QCoreApplication::processEvents();
d->processEventsTimer.restart();
diff --git a/src/scripttools/debugging/qscriptdebuggeragent_p_p.h b/src/scripttools/debugging/qscriptdebuggeragent_p_p.h
index 2e8be3a..1474032 100644
--- a/src/scripttools/debugging/qscriptdebuggeragent_p_p.h
+++ b/src/scripttools/debugging/qscriptdebuggeragent_p_p.h
@@ -52,7 +52,7 @@
//
#include <QtScript/qscriptvalue.h>
-#include <QtCore/qdatetime.h>
+#include <QtCore/qelapsedtimer.h>
#include <QtCore/qhash.h>
#include <QtCore/qmap.h>
#include <QtCore/qlist.h>
@@ -113,7 +113,7 @@ public:
QList<qint64> checkpointContextIdStack;
qint64 nextContextId;
- QTime processEventsTimer;
+ QElapsedTimer processEventsTimer;
int statementCounter;
QScriptDebuggerBackendPrivate *backend;