##// END OF EJS Templates
add missing visualization thread call
perrinel -
r55:c67812913ba9
parent child
Show More
@@ -8,9 +8,12 Q_LOGGING_CATEGORY(LOG_SqpApplication, "SqpApplication")
8
8
9 class SqpApplication::SqpApplicationPrivate {
9 class SqpApplication::SqpApplicationPrivate {
10 public:
10 public:
11 SqpApplicationPrivate() : m_DataSourceController{std::make_unique<DataSourceController>()}
11 SqpApplicationPrivate()
12 : m_DataSourceController{std::make_unique<DataSourceController>()},
13 m_VisualizationController{std::make_unique<VisualizationController>()}
12 {
14 {
13 m_DataSourceController->moveToThread(&m_DataSourceControllerThread);
15 m_DataSourceController->moveToThread(&m_DataSourceControllerThread);
16 m_VisualizationController->moveToThread(&m_VisualizationControllerThread);
14 }
17 }
15
18
16 virtual ~SqpApplicationPrivate()
19 virtual ~SqpApplicationPrivate()
@@ -19,14 +22,14 public:
19 m_DataSourceControllerThread.quit();
22 m_DataSourceControllerThread.quit();
20 m_DataSourceControllerThread.wait();
23 m_DataSourceControllerThread.wait();
21
24
22 m_VisualizationThread.quit();
25 m_VisualizationControllerThread.quit();
23 m_VisualizationThread.wait();
26 m_VisualizationControllerThread.wait();
24 }
27 }
25
28
26 std::unique_ptr<DataSourceController> m_DataSourceController;
29 std::unique_ptr<DataSourceController> m_DataSourceController;
27 std::unique_ptr<VisualizationController> m_VisualizationController;
30 std::unique_ptr<VisualizationController> m_VisualizationController;
28 QThread m_DataSourceControllerThread;
31 QThread m_DataSourceControllerThread;
29 QThread m_VisualizationThread;
32 QThread m_VisualizationControllerThread;
30 };
33 };
31
34
32
35
@@ -40,14 +43,14 SqpApplication::SqpApplication(int &argc, char **argv)
40 connect(&impl->m_DataSourceControllerThread, &QThread::finished,
43 connect(&impl->m_DataSourceControllerThread, &QThread::finished,
41 impl->m_DataSourceController.get(), &DataSourceController::finalize);
44 impl->m_DataSourceController.get(), &DataSourceController::finalize);
42
45
43 connect(&impl->m_VisualizationThread, &QThread::started, impl->m_VisualizationController.get(),
46 connect(&impl->m_VisualizationControllerThread, &QThread::started,
44 &VisualizationController::initialize);
47 impl->m_VisualizationController.get(), &VisualizationController::initialize);
45 connect(&impl->m_VisualizationThread, &QThread::finished, impl->m_VisualizationController.get(),
48 connect(&impl->m_VisualizationControllerThread, &QThread::finished,
46 &VisualizationController::finalize);
49 impl->m_VisualizationController.get(), &VisualizationController::finalize);
47
50
48
51
49 impl->m_DataSourceControllerThread.start();
52 impl->m_DataSourceControllerThread.start();
50 impl->m_VisualizationThread.start();
53 impl->m_VisualizationControllerThread.start();
51 }
54 }
52
55
53 SqpApplication::~SqpApplication()
56 SqpApplication::~SqpApplication()
General Comments 8
Under Review
author

Auto status change to "Under Review"

Approved
author

Status change > Approved

Under Review
author

Pull request updated. Auto status change to "Under Review"

Changed commits:
  * 1 added
  * 0 removed

Changed files:
  * M core/CMakeLists.txt
Approved
author

Status change > Approved

You need to be logged in to leave comments. Login now