Commit 307fb7a28d2e527c67387464f749ece7a2474c7d
1 parent
6564aec4
Make the build compatible to Qt < 5.4 again
Signed-off-by: David Graeff <david.graeff@web.de>
Showing
2 changed files
with
8 additions
and
2 deletions
openhantek/src/hantek/hantekdsocontrol.cpp
| @@ -1825,7 +1825,6 @@ int Control::stringCommand(QString command) { | @@ -1825,7 +1825,6 @@ int Control::stringCommand(QString command) { | ||
| 1825 | } | 1825 | } |
| 1826 | #endif | 1826 | #endif |
| 1827 | 1827 | ||
| 1828 | -/// \brief Called periodically in the control thread by a timer-> | ||
| 1829 | void HantekDsoControl::run() { | 1828 | void HantekDsoControl::run() { |
| 1830 | int errorCode = 0; | 1829 | int errorCode = 0; |
| 1831 | 1830 | ||
| @@ -2098,5 +2097,9 @@ void HantekDsoControl::run() { | @@ -2098,5 +2097,9 @@ void HantekDsoControl::run() { | ||
| 2098 | } | 2097 | } |
| 2099 | 2098 | ||
| 2100 | this->updateInterval(); | 2099 | this->updateInterval(); |
| 2101 | - QTimer::singleShot(cycleTime, this, &HantekDsoControl::run); | 2100 | + #if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)) |
| 2101 | + QTimer::singleShot(cycleTime, this, &HantekDsoControl::run); | ||
| 2102 | + #else | ||
| 2103 | + QTimer::singleShot(cycleTime, this, SLOT(run())); | ||
| 2104 | + #endif | ||
| 2102 | } | 2105 | } |
openhantek/src/hantek/hantekdsocontrol.h
| @@ -32,6 +32,9 @@ public: | @@ -32,6 +32,9 @@ public: | ||
| 32 | */ | 32 | */ |
| 33 | HantekDsoControl(USBDevice* device); | 33 | HantekDsoControl(USBDevice* device); |
| 34 | ~HantekDsoControl(); | 34 | ~HantekDsoControl(); |
| 35 | + | ||
| 36 | + /// Call this to start the processing. This method will call itself periodically from there on. | ||
| 37 | + /// It is wise to move this class object to an own thread and call run from there. | ||
| 35 | void run(); | 38 | void run(); |
| 36 | 39 | ||
| 37 | unsigned int getChannelCount(); | 40 | unsigned int getChannelCount(); |