From 3032b04e8ce13065cd074d7732506e5924580399 Mon Sep 17 00:00:00 2001 From: regulus79 <117475203+regulus79@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:00:30 -0500 Subject: [PATCH] Cleaning up again --- include/Song.h | 4 ++-- include/Timeline.h | 2 +- src/gui/editors/PianoRoll.cpp | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/Song.h b/include/Song.h index 85acd09617f..e5c877ba821 100644 --- a/include/Song.h +++ b/include/Song.h @@ -228,11 +228,11 @@ class LMMS_EXPORT Song : public TrackContainer return m_playMode; } - inline const PlayPos getPlayPos( PlayMode pm ) const + inline const PlayPos & getPlayPos( PlayMode pm ) const { return getTimeline(pm).getPlayPos(); } - inline const PlayPos getPlayPos() const + inline const PlayPos & getPlayPos() const { return getPlayPos(m_playMode); } diff --git a/include/Timeline.h b/include/Timeline.h index d92cf6b7ef8..e96e774a4bf 100644 --- a/include/Timeline.h +++ b/include/Timeline.h @@ -47,7 +47,7 @@ class Timeline : public QObject, public JournallingObject { return m_pos; } - inline void setPlayPos(PlayPos pos) const + inline void setPlayPos(PlayPos pos) { m_pos = pos; emit positionChanged(m_pos); diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index c5507c52bf0..4f66d96fa12 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -282,8 +282,7 @@ PianoRoll::PianoRoll() : m_currentPosition, Song::PlayMode::MidiClip, this ); connect(this, &PianoRoll::positionChanged, m_timeLine->timeline(), &Timeline::updatePosition); - connect(m_timeLine->timeline(), SIGNAL(positionChanged( const lmms::TimePos&)), - this, SLOT(updatePosition(const lmms::TimePos&))); + connect(m_timeLine->timeline(), &Timeline::positionChanged, this, &PianoRoll::updatePosition); // white position line follows timeline marker m_positionLine = new PositionLine(this); @@ -4540,7 +4539,7 @@ void PianoRoll::updatePositionAccompany( const TimePos & t ) } if( (int) pos > 0 ) { - s->getTimeline( Song::PlayMode::MidiClip ).setTicks( pos ); + s->getTimeline(Song::PlayMode::MidiClip).setTicks(pos); autoScroll( pos ); } }