diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 2ba1e0c..90c18da 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -99,9 +99,6 @@ MainWindow::MainWindow(QWidget* parent) : setupObjectNames(); setupUi(this); - connect(&m_ListDevices->listDevices(), &QListWidget::customContextMenuRequested, this, &MainWindow::listDevicesContextMenuRequested); - connect(&m_TreeLog->treeLog(), &QTreeWidget::customContextMenuRequested, this, &MainWindow::treeLogContextMenuRequested); - connect(&m_ListOperations->listOperations(), &QListWidget::customContextMenuRequested, this, &MainWindow::listOperationsContextMenuRequested); init(); } @@ -118,8 +115,6 @@ void MainWindow::init() { treeLog().init(); - connect(GlobalLog::instance(), &GlobalLog::newMessage, &treeLog(), &TreeLog::onNewLogMessage); - setupActions(); setupStatusBar(); setupConnections(); @@ -449,8 +444,21 @@ void MainWindow::setupActions() void MainWindow::setupConnections() { - connect(&listDevices(), &ListDevices::selectionChanged, &pmWidget(), qOverload(&PartitionManagerWidget::setSelectedDevice)); - connect(&listDevices(), &ListDevices::deviceDoubleClicked, this, &MainWindow::onPropertiesDevice); + connect(&listDevices(), &ListDevices::selectionChanged, + &pmWidget(), qOverload(&PartitionManagerWidget::setSelectedDevice)); + + connect(&listDevices(), &ListDevices::deviceDoubleClicked, + this, &MainWindow::onPropertiesDevice); + + connect(&m_ListDevices->listDevices(), &QListWidget::customContextMenuRequested, + this, &MainWindow::listDevicesContextMenuRequested); + connect(&m_TreeLog->treeLog(), &QTreeWidget::customContextMenuRequested, + this, &MainWindow::treeLogContextMenuRequested); + connect(&m_ListOperations->listOperations(), &QListWidget::customContextMenuRequested, + this, &MainWindow::listOperationsContextMenuRequested); + + connect(GlobalLog::instance(), &GlobalLog::newMessage, + &treeLog(), &TreeLog::onNewLogMessage); } void MainWindow::setupStatusBar()