src/relpipe-out-chart.cpp
branchv_0
changeset 19 ac70c7af6a9b
parent 18 16784291982f
child 20 b13e7ed9eea3
--- 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<RelationalReader> 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;