Removed generation of upodate-object. This will be donw inside
worker(-thread), and only when it is really needed, i.e. when there are json-files to be updated (or a deveice-controller).
This commit is contained in:
parent
8c50e6cf59
commit
3ccdcbae51
23
main.cpp
23
main.cpp
@ -169,35 +169,18 @@ int main(int argc, char *argv[]) {
|
|||||||
#error "Only tested under UNIX/LINUX"
|
#error "Only tested under UNIX/LINUX"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
hwinf *hw = Update::loadDCPlugin(QDir(plugInDir), plugInName);
|
|
||||||
hw->dc_autoRequest(true);
|
|
||||||
// hw->dc_openSerial(5, "115200", "ttymxc2", 1);
|
|
||||||
|
|
||||||
Worker worker(customerNr,
|
Worker worker(customerNr,
|
||||||
machineNr,
|
machineNr,
|
||||||
zoneNr,
|
zoneNr,
|
||||||
branchName,
|
branchName,
|
||||||
|
plugInDir,
|
||||||
plugInName,
|
plugInName,
|
||||||
workingDir,
|
workingDir,
|
||||||
|
noUpdatePsaHardware,
|
||||||
dryRun);
|
dryRun);
|
||||||
|
|
||||||
QString const customerNrStr(
|
|
||||||
QString("customer_") + QString::number(customerNr).rightJustified(3, '0'));
|
|
||||||
|
|
||||||
QScopedPointer<Update> update(
|
MainWindow mw(&worker);
|
||||||
new Update(hw,
|
|
||||||
&worker,
|
|
||||||
QDir::cleanPath(workingDir + QDir::separator() + customerNrStr),
|
|
||||||
customerNrStr,
|
|
||||||
branchName,
|
|
||||||
plugInName,
|
|
||||||
workingDir,
|
|
||||||
dryRun,
|
|
||||||
nullptr,
|
|
||||||
SERIAL_PORT,
|
|
||||||
"115200"));
|
|
||||||
|
|
||||||
MainWindow mw(hw, &worker, update.get());
|
|
||||||
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