[vlmc-devel] MainWorkflow: Don't use Toggleable

Yikai Lu git at videolan.org
Thu Jun 30 08:35:09 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jun 30 14:41:39 2016 +0900| [a697cab1765ce8415f5bee635381aad9ea9d7d4a] | committer: Yikai Lu

MainWorkflow: Don't use Toggleable

> https://code.videolan.org/videolan/vlmc/commit/a697cab1765ce8415f5bee635381aad9ea9d7d4a
---

 src/Workflow/MainWorkflow.cpp | 9 +--------
 src/Workflow/MainWorkflow.h   | 2 +-
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index efa3800..010d798 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -57,11 +57,7 @@ MainWorkflow::MainWorkflow( Settings* projectSettings, int trackCount ) :
     connect( m_renderer->eventWatcher(), &RendererEventWatcher::endReached, this, &MainWorkflow::mainWorkflowEndReached );
 
     for ( int i = 0; i < trackCount; ++i )
-    {
-        Toggleable<TrackWorkflow*> track;
-        m_tracks << track;
-        m_tracks[i].setPtr( new TrackWorkflow( i, m_multitrack ) );
-    }
+        m_tracks << new TrackWorkflow( i, m_multitrack );
 
     m_settings->createVar( SettingValue::List, "tracks", QVariantList(), "", "", SettingValue::Nothing );
     connect( m_settings, &Settings::postLoad, this, &MainWorkflow::postLoad, Qt::DirectConnection );
@@ -73,7 +69,6 @@ MainWorkflow::~MainWorkflow()
 {
     for ( auto track : m_tracks )
         delete track;
-    m_tracks.clear();
     delete m_multitrack;
     delete m_renderer;
     delete m_settings;
@@ -90,7 +85,6 @@ void
 MainWorkflow::muteTrack( unsigned int trackId, Workflow::TrackType trackType )
 {
     Q_ASSERT( trackId < m_trackCount );
-    m_tracks[trackId].deactivate();
     m_tracks[trackId]->mute( true, trackType );
 }
 
@@ -98,7 +92,6 @@ void
 MainWorkflow::unmuteTrack( unsigned int trackId, Workflow::TrackType trackType )
 {
     Q_ASSERT( trackId < m_trackCount );
-    m_tracks[trackId].activate();
     m_tracks[trackId]->mute( false, trackType );
 }
 
diff --git a/src/Workflow/MainWorkflow.h b/src/Workflow/MainWorkflow.h
index 5a9129b..7ee7c51 100644
--- a/src/Workflow/MainWorkflow.h
+++ b/src/Workflow/MainWorkflow.h
@@ -160,7 +160,7 @@ class   MainWorkflow : public QObject
         void                    postLoad();
 
     private:
-        QList<Toggleable<TrackWorkflow*>>     m_tracks;
+        QList<TrackWorkflow*>           m_tracks;
         const quint32                   m_trackCount;
 
         Settings*                       m_settings;



More information about the Vlmc-devel mailing list