From 3ccdcbae51cf03165efea10b5fdf76e39b8096c2 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Mon, 6 Nov 2023 16:20:27 +0100 Subject: [PATCH] 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). --- main.cpp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/main.cpp b/main.cpp index b924641..b1d5626 100644 --- a/main.cpp +++ b/main.cpp @@ -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( - 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);