Revert "do not use QThread::create"

This reverts commit 98c3131017.
This commit is contained in:
WarmUpTill
2020-06-06 18:51:26 +02:00
committed by Myned
parent 8fd263f44a
commit 4b86849356
2 changed files with 2 additions and 14 deletions

View File

@@ -253,14 +253,11 @@ struct TimeSwitch {
typedef enum { NO_SWITCH = 0, SWITCH = 1, RANDOM_SWITCH = 2 } NoMatch;
class SwitcherThread;
/********************************************************************************
* SwitcherData
********************************************************************************/
struct SwitcherData {
SwitcherThread *th;
QThread* th = nullptr;
condition_variable cv;
mutex m;
bool transitionActive = false;
@@ -485,10 +482,3 @@ struct SwitcherData {
}
inline ~SwitcherData() { Stop(); }
};
extern SwitcherData *switcher;
class SwitcherThread : public QThread {
public:
explicit SwitcherThread(){};
void run() { switcher->Thread(); };
};