Remove direct member m_hw, a pointer to the device-controller-plugin.

The worker shall not load the plugin, otherwise it would block itself inside
an QT slot.
This commit is contained in:
2023-09-06 09:04:43 +02:00
parent cef05b7511
commit c065b57f0c
2 changed files with 53 additions and 16 deletions

View File

@@ -74,16 +74,20 @@ class hwinf;
class Worker : public QObject {
Q_OBJECT
hwinf *m_hw;
WorkerThread m_workerThread;
int const m_customerNr;
QString const m_customerNrStr;
int const m_machineNr;
int const m_zoneNr;
QString const m_pluginName;
QString const m_workingDirectory;
QString const m_branchName;
QString const m_customerRepositoryPath;
QString const m_customerRepository;
bool const m_dryRun;
QObject *m_parent;
QString const m_serialInterface;
QString const m_baudrate;
Update *m_update;
IsmasClient m_ismasClient;
GitClient m_gc;
@@ -130,11 +134,11 @@ public:
static const QString UPDATE_STEP_FAIL;
static const QString UPDATE_STEP_SUCCESS;
explicit Worker(hwinf *hw,
int customerNr, // 281
explicit Worker(int customerNr, // 281
int machineNr,
int zoneNr,
QString branchName,
QString pluginName,
QString workingDir = ".",
bool dryRun = false,
QObject *parent = nullptr,
@@ -143,6 +147,8 @@ public:
~Worker();
void setMainWindow(MainWindow *mainWindow) { m_mainWindow = mainWindow; }
hwinf *getPlugin();
hwinf const *getPlugin() const;
void setProgress(int progress);
void startProgressLoop();
void stopProgressLoop();