Move connections to the ::setupConnecctions method
What's the reason of having a ::setupConnections if there's connections for the GUI outside of it?
This commit is contained in:
parent
1c5d0f5b4a
commit
ae088e1ace
|
@ -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<const QString&>(&PartitionManagerWidget::setSelectedDevice));
|
||||
connect(&listDevices(), &ListDevices::deviceDoubleClicked, this, &MainWindow::onPropertiesDevice);
|
||||
connect(&listDevices(), &ListDevices::selectionChanged,
|
||||
&pmWidget(), qOverload<const QString&>(&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()
|
||||
|
|
Loading…
Reference in New Issue