Skip to content

Commit

Permalink
Remvoe destroyedTrack signal
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Feb 3, 2025
1 parent cd7041e commit a53fd94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 0 additions & 2 deletions include/Track.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class LMMS_EXPORT Track : public Model, public JournallingObject
} ;

Track(Type type);
~Track() override;

Track * clone();

Expand Down Expand Up @@ -223,7 +222,6 @@ public slots:


signals:
void destroyedTrack();
void nameChanged();
void clipAdded( lmms::Clip * );
void colorChanged();
Expand Down
14 changes: 1 addition & 13 deletions src/core/Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,11 @@ Track::Track(Type type) :
m_trackContainer(nullptr), /*!< The track container object */
m_type( type ), /*!< The track type */
m_name(), /*!< The track's name */
m_height(-1),
m_mutedModel( false, this, tr( "Mute" ) ), /*!< For controlling track muting */
m_soloModel( false, this, tr( "Solo" ) ), /*!< For controlling track soloing */
m_clips() /*!< The clips (segments) */
{
m_height = -1;
}




/*! \brief Destroy this track
*
* Delete the clips and remove this track from the track container.
*/
Track::~Track()
{
emit destroyedTrack();
}

/*! \brief Clone a track from this track
Expand Down
4 changes: 2 additions & 2 deletions src/gui/tracks/TrackView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ TrackView::TrackView( Track * track, TrackContainerView * tcv ) :
setAcceptDrops( true );
setAttribute( Qt::WA_DeleteOnClose, true );

connect(m_track, &QObject::destroyed, this, &TrackView::close);

connect( m_track, SIGNAL(destroyedTrack()), this, SLOT(close()));
connect( m_track,
SIGNAL(clipAdded(lmms::Clip*)),
this, SLOT(createClipView(lmms::Clip*)),
Expand Down Expand Up @@ -195,7 +195,7 @@ void TrackView::modelChanged()
{
m_track = castModel<Track>();
Q_ASSERT( m_track != nullptr );
connect( m_track, SIGNAL(destroyedTrack()), this, SLOT(close()));
connect(m_track, &QObject::destroyed, this, &TrackView::close);
m_trackOperationsWidget.m_muteBtn->setModel( &m_track->m_mutedModel );
m_trackOperationsWidget.m_soloBtn->setModel( &m_track->m_soloModel );
ModelView::modelChanged();
Expand Down

0 comments on commit a53fd94

Please sign in to comment.