diff -r 16784291982f -r ac70c7af6a9b src/relpipe-out-chart.cpp --- a/src/relpipe-out-chart.cpp Sun Sep 30 01:40:29 2018 +0200 +++ b/src/relpipe-out-chart.cpp Sun Sep 30 18:34:34 2018 +0200 @@ -43,15 +43,9 @@ QApplication app(argc, argv); std::shared_ptr reader(Factory::create(std::cin)); - - int resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR; RelpipeChartMainWindow window; - - // TODO: remove; just demo - QObject::connect(&window, &RelpipeChartMainWindow::signal123, &window, &RelpipeChartMainWindow::slot123); - window.show(); QtRelationalReaderStringHadler handler(&app, &window); @@ -62,10 +56,13 @@ t.start(); // --- - // window.signal123(); + int qtResultCode = app.exec(); - app.exec(); - //return app.exec(); + if (qtResultCode == 0) { + resultCode = CLI::EXIT_CODE_SUCCESS; + } else { + // TODO: report and log Qt errors if any + } if (t.isRunning()) { std::wcerr << L"Background RelationalReader thread is still running → terminate()" << std::endl;