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:
Gerhard Hoffmann 2023-11-06 16:20:27 +01:00
parent 8c50e6cf59
commit 3ccdcbae51

View File

@ -169,35 +169,18 @@ int main(int argc, char *argv[]) {
#error "Only tested under UNIX/LINUX"
#endif
hwinf *hw = Update::loadDCPlugin(QDir(plugInDir), plugInName);
hw->dc_autoRequest(true);
// hw->dc_openSerial(5, "115200", "ttymxc2", 1);
Worker worker(customerNr,
machineNr,
zoneNr,
branchName,
plugInDir,
plugInName,
workingDir,
noUpdatePsaHardware,
dryRun);
QString const customerNrStr(
QString("customer_") + QString::number(customerNr).rightJustified(3, '0'));
QScopedPointer<Update> update(
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());
MainWindow mw(&worker);
worker.setMainWindow(&mw);
mw.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);