From 307fb7a28d2e527c67387464f749ece7a2474c7d Mon Sep 17 00:00:00 2001 From: David Graeff Date: Mon, 11 Dec 2017 23:22:50 +0100 Subject: [PATCH] Make the build compatible to Qt < 5.4 again --- openhantek/src/hantek/hantekdsocontrol.cpp | 7 +++++-- openhantek/src/hantek/hantekdsocontrol.h | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openhantek/src/hantek/hantekdsocontrol.cpp b/openhantek/src/hantek/hantekdsocontrol.cpp index 8dd6305..7ec4ed0 100644 --- a/openhantek/src/hantek/hantekdsocontrol.cpp +++ b/openhantek/src/hantek/hantekdsocontrol.cpp @@ -1825,7 +1825,6 @@ int Control::stringCommand(QString command) { } #endif -/// \brief Called periodically in the control thread by a timer-> void HantekDsoControl::run() { int errorCode = 0; @@ -2098,5 +2097,9 @@ void HantekDsoControl::run() { } this->updateInterval(); - QTimer::singleShot(cycleTime, this, &HantekDsoControl::run); + #if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)) + QTimer::singleShot(cycleTime, this, &HantekDsoControl::run); + #else + QTimer::singleShot(cycleTime, this, SLOT(run())); + #endif } diff --git a/openhantek/src/hantek/hantekdsocontrol.h b/openhantek/src/hantek/hantekdsocontrol.h index 7e1c85a..238ae23 100644 --- a/openhantek/src/hantek/hantekdsocontrol.h +++ b/openhantek/src/hantek/hantekdsocontrol.h @@ -32,6 +32,9 @@ public: */ HantekDsoControl(USBDevice* device); ~HantekDsoControl(); + + /// Call this to start the processing. This method will call itself periodically from there on. + /// It is wise to move this class object to an own thread and call run from there. void run(); unsigned int getChannelCount(); -- libgit2 0.21.4