Commit 9022c329 authored by luyikei's avatar luyikei

SequenceWorkflow: Use unique_ptr for m_multitrack

parent 1b9b2e13
...@@ -60,7 +60,6 @@ SequenceWorkflow::SequenceWorkflow( size_t trackCount ) ...@@ -60,7 +60,6 @@ SequenceWorkflow::SequenceWorkflow( size_t trackCount )
SequenceWorkflow::~SequenceWorkflow() SequenceWorkflow::~SequenceWorkflow()
{ {
delete m_multitrack;
clear(); clear();
} }
...@@ -277,7 +276,7 @@ SequenceWorkflow::loadFromVariant( const QVariant& variant ) ...@@ -277,7 +276,7 @@ SequenceWorkflow::loadFromVariant( const QVariant& variant )
EffectHelper::loadFromVariant( m["filters"], clip->input() ); EffectHelper::loadFromVariant( m["filters"], clip->input() );
} }
EffectHelper::loadFromVariant( variant.toMap()["filters"], m_multitrack ); EffectHelper::loadFromVariant( variant.toMap()["filters"], m_multitrack.get() );
} }
void void
...@@ -317,7 +316,7 @@ SequenceWorkflow::position( const QUuid& uuid ) ...@@ -317,7 +316,7 @@ SequenceWorkflow::position( const QUuid& uuid )
Backend::IInput* Backend::IInput*
SequenceWorkflow::input() SequenceWorkflow::input()
{ {
return m_multitrack; return m_multitrack.get();
} }
Backend::IInput* Backend::IInput*
......
...@@ -119,9 +119,9 @@ class SequenceWorkflow : public QObject ...@@ -119,9 +119,9 @@ class SequenceWorkflow : public QObject
QMap<QUuid, QSharedPointer<ClipInstance>> m_clips; QMap<QUuid, QSharedPointer<ClipInstance>> m_clips;
Backend::IMultiTrack* m_multitrack;
QList<QSharedPointer<Track>> m_tracks[Workflow::NbTrackType]; QList<QSharedPointer<Track>> m_tracks[Workflow::NbTrackType];
QList<std::shared_ptr<Backend::IMultiTrack>> m_multiTracks; QList<std::shared_ptr<Backend::IMultiTrack>> m_multiTracks;
std::unique_ptr<Backend::IMultiTrack> m_multitrack;
const size_t m_trackCount; const size_t m_trackCount;
signals: signals:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment