diff options
author | Saturneric <[email protected]> | 2022-02-02 06:47:24 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-02-02 06:47:24 +0000 |
commit | 3780c1baab8562e15eade1c1be25ccebd0e70814 (patch) | |
tree | 0f7984b0725830cad6492bd91a4d6adaf58601c2 /src/ui/widgets/InfoBoardWidget.cpp | |
parent | <doc>(project): Separate user manual from development documentation. (diff) | |
download | GpgFrontend-3780c1baab8562e15eade1c1be25ccebd0e70814.tar.gz GpgFrontend-3780c1baab8562e15eade1c1be25ccebd0e70814.zip |
<refactor, fix>(ui): Repair and tidy the signal and slot docking
1. Use more modern ways.
2. Repair partial docking.
Diffstat (limited to 'src/ui/widgets/InfoBoardWidget.cpp')
-rw-r--r-- | src/ui/widgets/InfoBoardWidget.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/widgets/InfoBoardWidget.cpp b/src/ui/widgets/InfoBoardWidget.cpp index 3d5db85c..bedcdf49 100644 --- a/src/ui/widgets/InfoBoardWidget.cpp +++ b/src/ui/widgets/InfoBoardWidget.cpp @@ -99,16 +99,18 @@ void InfoBoardWidget::SlotRefresh(const QString& text, InfoBoardStatus status) { void InfoBoardWidget::AssociateTextEdit(QTextEdit* edit) { if (m_text_page_ != nullptr) - disconnect(m_text_page_, SIGNAL(textChanged()), this, SLOT(SlotReset())); + disconnect(m_text_page_, &QTextEdit::textChanged, this, + &InfoBoardWidget::SlotReset); this->m_text_page_ = edit; - connect(edit, SIGNAL(textChanged()), this, SLOT(SlotReset())); + connect(edit, &QTextEdit::textChanged, this, &InfoBoardWidget::SlotReset); } void InfoBoardWidget::AssociateTabWidget(QTabWidget* tab) { m_text_page_ = nullptr; m_tab_widget_ = tab; - connect(tab, SIGNAL(tabBarClicked(int)), this, SLOT(SlotReset())); - connect(tab, SIGNAL(tabCloseRequested(int)), this, SLOT(SlotReset())); + connect(tab, &QTabWidget::tabBarClicked, this, &InfoBoardWidget::SlotReset); + connect(tab, &QTabWidget::tabCloseRequested, this, + &InfoBoardWidget::SlotReset); // reset this->SlotReset(); } |