Code clean and class constructor refactor.

This commit is contained in:
Krad
2022-05-24 10:36:12 +08:00
parent 23f0d40694
commit e473acae30
2 changed files with 5 additions and 2 deletions

View File

@@ -7,7 +7,6 @@
#include <QVariant> #include <QVariant>
#include <QTimerEvent> #include <QTimerEvent>
#include <QDate> #include <QDate>
#include <QDateTime>
#include <qdebug.h> #include <qdebug.h>
#include "appvals/AppGlobalValues.h" #include "appvals/AppGlobalValues.h"
#include "json/ScanJson.h" #include "json/ScanJson.h"

View File

@@ -15,6 +15,10 @@ public:
static DeviceManager manager; static DeviceManager manager;
return &manager; return &manager;
} }
DeviceManager() = default;
~DeviceManager() override = default ;
DeviceManager(const DeviceManager&) = delete;
DeviceManager operator=(const DeviceManager&) = delete;
/** /**
* init device, include Shimlib and it's error call back, * init device, include Shimlib and it's error call back,
* deviceInfTimer to get temperature of water, and the * deviceInfTimer to get temperature of water, and the
@@ -94,7 +98,7 @@ private:
bool previewing = false; bool previewing = false;
volatile bool endLoop = false; volatile bool endLoop = false;
bool errorOccurred = false; bool errorOccurred = false;
QThread* previewDataCaller; QThread* previewDataCaller = nullptr;
}; };