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();