diff options
author | Harshit Maurya <hmaurya999@gmail.com> | 2020-05-14 04:49:49 +0530 |
---|---|---|
committer | Harshit Maurya <hmaurya999@gmail.com> | 2020-05-16 02:17:43 +0530 |
commit | e1f13291d29f70d12668972eca82bd7a27680603 (patch) | |
tree | 92b677cddf63b4b9d372f322a89d341e780bad0d | |
parent | 58c88a68095fde74e0b1f47b8c1ea894b62462a2 (diff) |
use functor syntax for connect calls
-rw-r--r-- | src/widget/woverview.cpp | 15 | ||||
-rw-r--r-- | src/widget/wwaveformviewer.cpp | 6 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/widget/woverview.cpp b/src/widget/woverview.cpp index d84b5e2020..b47f4740ea 100644 --- a/src/widget/woverview.cpp +++ b/src/widget/woverview.cpp @@ -307,8 +307,10 @@ void WOverview::slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack) //qDebug() << this << "WOverview::slotLoadingTrack" << pNewTrack.get() << pOldTrack.get(); DEBUG_ASSERT(m_pCurrentTrack == pOldTrack); if (m_pCurrentTrack != nullptr) { - disconnect(m_pCurrentTrack.get(), SIGNAL(waveformSummaryUpdated()), - this, SLOT(slotWaveformSummaryUpdated())); + disconnect(m_pCurrentTrack.get(), + &Track::waveformSummaryUpdated, + this, + &WOverview::slotWaveformSummaryUpdated); } m_waveformSourceImage = QImage(); @@ -323,11 +325,12 @@ void WOverview::slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack) m_pCurrentTrack = pNewTrack; m_pWaveform = pNewTrack->getWaveformSummary(); - connect(pNewTrack.get(), SIGNAL(waveformSummaryUpdated()), - this, SLOT(slotWaveformSummaryUpdated())); + connect(pNewTrack.get(), + &Track::waveformSummaryUpdated, + this, + &WOverview::slotWaveformSummaryUpdated); slotWaveformSummaryUpdated(); - connect(pNewTrack.get(), SIGNAL(cuesUpdated()), - this, SLOT(receiveCuesUpdated())); + connect(pNewTrack.get(), &Track::cuesUpdated, this, &WOverview::receiveCuesUpdated); } else { m_pCurrentTrack.reset(); m_pWaveform.clear(); diff --git a/src/widget/wwaveformviewer.cpp b/src/widget/wwaveformviewer.cpp index 5b167a4b37..966a1a2805 100644 --- a/src/widget/wwaveformviewer.cpp +++ b/src/widget/wwaveformviewer.cpp @@ -246,14 +246,12 @@ void WWaveformViewer::setPlayMarkerPosition(double position) { void WWaveformViewer::setWaveformWidget(WaveformWidgetAbstract* waveformWidget) { if (m_waveformWidget) { QWidget* pWidget = m_waveformWidget->getWidget(); - disconnect(pWidget, SIGNAL(destroyed()), - this, SLOT(slotWidgetDead())); + disconnect(pWidget, &QWidget::destroyed, this, &WWaveformViewer::slotWidgetDead); } m_waveformWidget = waveformWidget; if (m_waveformWidget) { QWidget* pWidget = m_waveformWidget->getWidget(); - connect(pWidget, SIGNAL(destroyed()), - this, SLOT(slotWidgetDead())); + connect(pWidget, &QWidget::destroyed, this, &WWaveformViewer::slotWidgetDead); m_waveformWidget->getWidget()->setMouseTracking(true); } } |