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:
parent
9531a08b4a
commit
22c8997f1e
9
main.cpp
9
main.cpp
@ -116,7 +116,7 @@ int main(int argc, char *argv[]) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
hwinf *hw = Update::loadDCPlugin(QDir(plugInDir), plugInName);
|
hwinf *hw = Update::loadDCPlugin(QDir(plugInDir), plugInName);
|
||||||
// hw->dc_autoRequest(false);
|
hw->dc_autoRequest(false);
|
||||||
|
|
||||||
int machineNr = Utils::read1stLineOfFile("/etc/machine_nr");
|
int machineNr = Utils::read1stLineOfFile("/etc/machine_nr");
|
||||||
int customerNr = Utils::read1stLineOfFile("/etc/cust_nr");
|
int customerNr = Utils::read1stLineOfFile("/etc/cust_nr");
|
||||||
@ -127,16 +127,15 @@ int main(int argc, char *argv[]) {
|
|||||||
QThread::currentThread()->setObjectName("main thread");
|
QThread::currentThread()->setObjectName("main thread");
|
||||||
qInfo() << "Main thread" << QThread::currentThreadId();
|
qInfo() << "Main thread" << QThread::currentThreadId();
|
||||||
|
|
||||||
|
Worker worker(customerNr,
|
||||||
Worker worker(hw,
|
|
||||||
customerNr,
|
|
||||||
machineNr,
|
machineNr,
|
||||||
zoneNr,
|
zoneNr,
|
||||||
branchName,
|
branchName,
|
||||||
|
plugInName,
|
||||||
workingDir,
|
workingDir,
|
||||||
dryRun);
|
dryRun);
|
||||||
|
|
||||||
MainWindow mw(&worker);
|
MainWindow mw(hw, &worker);
|
||||||
worker.setMainWindow(&mw);
|
worker.setMainWindow(&mw);
|
||||||
|
|
||||||
mw.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
|
mw.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
|
||||||
|
Loading…
Reference in New Issue
Block a user