From 22c8997f1e6d9bca377124fa8a0a599c2e093166 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 6 Sep 2023 09:10:14 +0200 Subject: [PATCH] Set autoRequest to false and pass a pointer to the device-controller-plugin to the main window instead to the worker (thread). --- main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index 8b48f51..16db53b 100644 --- a/main.cpp +++ b/main.cpp @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) { #endif hwinf *hw = Update::loadDCPlugin(QDir(plugInDir), plugInName); - // hw->dc_autoRequest(false); + hw->dc_autoRequest(false); int machineNr = Utils::read1stLineOfFile("/etc/machine_nr"); int customerNr = Utils::read1stLineOfFile("/etc/cust_nr"); @@ -127,16 +127,15 @@ int main(int argc, char *argv[]) { QThread::currentThread()->setObjectName("main thread"); qInfo() << "Main thread" << QThread::currentThreadId(); - - Worker worker(hw, - customerNr, + Worker worker(customerNr, machineNr, zoneNr, branchName, + plugInName, workingDir, dryRun); - MainWindow mw(&worker); + MainWindow mw(hw, &worker); worker.setMainWindow(&mw); mw.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);