Set autoRequest to false and pass a pointer to the device-controller-plugin

to the main window instead to the worker (thread).
This commit is contained in:
Gerhard Hoffmann 2023-09-06 09:10:14 +02:00
parent 9531a08b4a
commit 22c8997f1e

View File

@ -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);