changeset 286:b3b2e092bd61

Avoid deprecated API
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 07 Jan 2020 11:20:47 +0000
parents b66077ee37a3
children 09753ad777db
files vamp-client/qt/ProcessQtTransport.h
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/vamp-client/qt/ProcessQtTransport.h	Wed Jan 16 14:26:27 2019 +0000
+++ b/vamp-client/qt/ProcessQtTransport.h	Tue Jan 07 11:20:47 2020 +0000
@@ -42,7 +42,7 @@
 #include <QProcess>
 #include <QString>
 #include <QMutex>
-#include <QTime>
+#include <QElapsedTimer>
 
 #include <iostream>
 
@@ -155,14 +155,14 @@
         std::vector<char> buffer;
         bool complete = false;
 
-        QTime t;
+        QElapsedTimer t;
         t.start();
 
         // We don't like to timeout at all while waiting for a
         // response -- we'd like to wait as long as the server
         // continues running.
         //
-        int beforeResponseTimeout = 0; // ms, 0 = no timeout
+        qint64 beforeResponseTimeout = 0; // ms, 0 = no timeout
 
         // But if the call is marked as fast (i.e. just retrieving
         // info rather than calculating something) we will time out
@@ -176,12 +176,12 @@
         // finished doing any real work. In each case the timeout is
         // measured since data was last read.
         //
-        int duringResponseTimeout = 5000; // ms, 0 = no timeout
+        qint64 duringResponseTimeout = 5000; // ms, 0 = no timeout
         
         while (!complete) {
 
             bool responseStarted = !buffer.empty(); // already have something
-            int ms = t.elapsed(); // time since start or since last read
+            qint64 ms = t.elapsed(); // time since start or since last read
             
             qint64 byteCount = m_process->bytesAvailable();