You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
285 B

2 years ago
2 years ago
  1. #include "zqthread.hpp"
  2. using namespace iflytop;
  3. using namespace std;
  4. ZQThread::ZQThread(const char* name, function<void()> cb) {
  5. name_ = QString(name);
  6. cb_ = cb;
  7. }
  8. void ZQThread::run() {
  9. if (cb_) cb_();
  10. }
  11. void ZQThread::quit() {
  12. tryexitflag_ = true;
  13. QThread::quit();
  14. }