From kde-commits Mon Apr 30 22:26:41 2018 From: Nicolas Carion Date: Mon, 30 Apr 2018 22:26:41 +0000 To: kde-commits Subject: [kdenlive/refactoring_timeline] src: better enum to be used from qml Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=152512721600601 Git commit 72198cb6adba963619127a1c766e59fc3615b426 by Nicolas Carion. Committed on 30/04/2018 at 22:27. Pushed by alcinos into branch 'refactoring_timeline'. better enum to be used from qml M +2 -2 src/bin/projectclip.cpp M +3 -2 src/bin/projectclip.h M +2 -2 src/definitions.cpp M +7 -4 src/definitions.h M +7 -0 src/main.cpp M +1 -1 src/mltcontroller/clipcontroller.cpp M +1 -1 src/mltcontroller/clipcontroller.h M +2 -2 src/timeline2/model/builders/meltBuilder.cpp M +10 -10 src/timeline2/model/clipmodel.cpp M +8 -7 src/timeline2/model/clipmodel.hpp M +8 -8 src/timeline2/model/timelinefunctions.cpp M +3 -3 src/timeline2/model/timelinefunctions.hpp M +4 -1 src/timeline2/model/timelinemodel.cpp M +1 -1 src/timeline2/model/timelinemodel.hpp M +9 -15 src/timeline2/view/qml/ClipMenu.qml M +1 -1 src/timeline2/view/timelinecontroller.cpp M +1 -1 src/timeline2/view/timelinecontroller.h https://commits.kde.org/kdenlive/72198cb6adba963619127a1c766e59fc3615b426 diff --git a/src/bin/projectclip.cpp b/src/bin/projectclip.cpp index b67acbb1d..4d3104812 100644 --- a/src/bin/projectclip.cpp +++ b/src/bin/projectclip.cpp @@ -427,7 +427,7 @@ void ProjectClip::createVideoMasterProducer() m_videoProducer->set("set.test_image", 0); } } -std::shared_ptr ProjectClip::getTimelineProducer(int clipId= , PlaylistState state, double speed) +std::shared_ptr ProjectClip::getTimelineProducer(int clipId= , PlaylistState::ClipState state, double speed) { if (qFuzzyCompare(speed, 1.0)) { // we are requesting a normal speed producer @@ -476,7 +476,7 @@ std::shared_ptr ProjectClip::getTimeline= Producer(int clipId, Play } = std::pair, bool> ProjectClip::giveMasterAnd= GetTimelineProducer(int clipId, std::shared_ptr master, - = PlaylistState state) + = PlaylistState::ClipState state) { int in =3D master->get_in(); int out =3D master->get_out(); diff --git a/src/bin/projectclip.h b/src/bin/projectclip.h index a46b438f5..65141dae3 100644 --- a/src/bin/projectclip.h +++ b/src/bin/projectclip.h @@ -198,7 +198,7 @@ public: /** @brief This function returns a cut to the master producer associat= ed to the timeline clip with given ID. Each clip must have a different master producer (see comment of th= e class) */ - std::shared_ptr getTimelineProducer(int clipId, Playlis= tState st, double speed =3D 1.0); + std::shared_ptr getTimelineProducer(int clipId, Playlis= tState::ClipState st, double speed =3D 1.0); = /* @brief This function should only be used at loading. It takes a pro= ducer that was read from mlt, and checks whether the master producer is alr= eady in use. If yes, then we must create a new one, because of the mixing b= ug. In any case, we return a cut of the master that can be used in the time= line The @@ -206,7 +206,8 @@ public: - if true, then the returned cut still possibly has effect on i= t. You need to rebuild the effectStack based on this - if false, the the returned cut don't have effects anymore (it= 's a fresh one), so you need to reload effects from the old producer */ - std::pair, bool> giveMasterAndGetTimeli= neProducer(int clipId, std::shared_ptr master, PlaylistState= state); + std::pair, bool> giveMasterAndGetTimeli= neProducer(int clipId, std::shared_ptr master, + = PlaylistState::ClipState state); = std::shared_ptr cloneProducer(Mlt::Profile *destProfile= =3D nullptr); void updateTimelineClips(QVector roles); diff --git a/src/definitions.cpp b/src/definitions.cpp index bf55e8768..960636d89 100644 --- a/src/definitions.cpp +++ b/src/definitions.cpp @@ -159,11 +159,11 @@ GroupType groupTypeFromStr(const QString &s) return GroupType::Normal; } = -std::pair stateToBool(PlaylistState state) +std::pair stateToBool(PlaylistState::ClipState state) { return {state =3D=3D PlaylistState::VideoOnly, state =3D=3D PlaylistSt= ate::AudioOnly}; } -PlaylistState stateFromBool(std::pair av) +PlaylistState::ClipState stateFromBool(std::pair av) { assert(!av.first || !av.second); if (av.first) { diff --git a/src/definitions.h b/src/definitions.h index 7158b1c20..d15861683 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -77,12 +77,15 @@ enum OperationType { ZoomTimeline }; = -enum class PlaylistState { VideoOnly =3D 1, AudioOnly =3D 2, Disabled =3D = 3 }; -Q_DECLARE_METATYPE(PlaylistState) +namespace PlaylistState { +Q_NAMESPACE +enum ClipState { VideoOnly =3D 1, AudioOnly =3D 2, Disabled =3D 3 }; +Q_ENUM_NS(ClipState) +} // namespace PlaylistState = // returns a pair corresponding to (video, audio) -std::pair stateToBool(PlaylistState state); -PlaylistState stateFromBool(std::pair av); +std::pair stateToBool(PlaylistState::ClipState state); +PlaylistState::ClipState stateFromBool(std::pair av); = namespace TimelineMode { enum EditMode { NormalEdit =3D 0, OverwriteEdit =3D 1, InsertEdit =3D 2 }; diff --git a/src/main.cpp b/src/main.cpp index 8aaaf9fdf..5a54a024b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,6 +31,7 @@ #include #include = +#include "definitions.h" #include "kdenlive_debug.h" #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include //new #include = @@ -139,6 +141,11 @@ int main(int argc, char *argv[]) = KCrash::initialize(); = + qmlRegisterUncreatableMetaObject(PlaylistState::staticMetaObject, // s= tatic meta object + "com.enums", // i= mport statement + 1, 0, // m= ajor and minor version of the import + "ClipState", // n= ame in QML + "Error: only enums"); QString mltPath =3D parser.value(QStringLiteral("mlt-path")); QUrl url; if (parser.positionalArguments().count() !=3D 0) { diff --git a/src/mltcontroller/clipcontroller.cpp b/src/mltcontroller/clipc= ontroller.cpp index 7f7a83992..9ce2d4216 100644 --- a/src/mltcontroller/clipcontroller.cpp +++ b/src/mltcontroller/clipcontroller.cpp @@ -547,7 +547,7 @@ bool ClipController::hasVideo() const { return m_hasVideo; } -PlaylistState ClipController::defaultState() const +PlaylistState::ClipState ClipController::defaultState() const { if (hasVideo()) { return PlaylistState::VideoOnly; diff --git a/src/mltcontroller/clipcontroller.h b/src/mltcontroller/clipcon= troller.h index 1fde5ade5..ea87f73a8 100644 --- a/src/mltcontroller/clipcontroller.h +++ b/src/mltcontroller/clipcontroller.h @@ -171,7 +171,7 @@ public: /** @brief Returns true if the clip contains at least one video stream= */ bool hasVideo() const; /** @brief Returns the default state a clip should be in. If the clips= contains both video and audio, this defaults to video */ - PlaylistState defaultState() const; + PlaylistState::ClipState defaultState() const; /** @brief Returns info about clip audio */ const std::unique_ptr &audioInfo() const; /** @brief Returns true if audio thumbnails for this clip are cached */ diff --git a/src/timeline2/model/builders/meltBuilder.cpp b/src/timeline2/m= odel/builders/meltBuilder.cpp index 17963f5bb..27f264d8f 100644 --- a/src/timeline2/model/builders/meltBuilder.cpp +++ b/src/timeline2/model/builders/meltBuilder.cpp @@ -192,7 +192,7 @@ bool constructTrackFromMelt(const std::shared_ptr &timeline, namespace { = // This function tries to recover the state of the producer (audio or vide= o or both) -PlaylistState inferState(std::shared_ptr prod) +PlaylistState::ClipState inferState(std::shared_ptr prod) { auto getProperty =3D [prod](const QString &name) { if (prod->parent().is_valid()) { @@ -250,7 +250,7 @@ bool constructTrackFromMelt(const std::shared_ptr &timeline, } bool ok =3D false; if (pCore->bin()->getBinClip(binId)) { - PlaylistState st =3D inferState(clip); + PlaylistState::ClipState st =3D inferState(clip); int cid =3D ClipModel::construct(timeline, binId, clip, st= ); ok =3D timeline->requestClipMove(cid, tid, position, true,= false, undo, redo); } else { diff --git a/src/timeline2/model/clipmodel.cpp b/src/timeline2/model/clipmo= del.cpp index 98f2056da..a39f6f49a 100644 --- a/src/timeline2/model/clipmodel.cpp +++ b/src/timeline2/model/clipmodel.cpp @@ -35,8 +35,8 @@ #include "gentime.h" #include = -ClipModel::ClipModel(std::shared_ptr parent, std::shared_pt= r prod, const QString &binClipId, int id, PlaylistState stat= e, - double speed) +ClipModel::ClipModel(std::shared_ptr parent, std::shared_pt= r prod, const QString &binClipId, int id, + PlaylistState::ClipState state, double speed) : MoveableItem(parent, id) , m_producer(std::move(prod)) , m_effectStack(EffectStackModel::construct(m_producer, {ObjectType::T= imelineClip, m_id}, parent->m_undoStack)) @@ -55,7 +55,7 @@ ClipModel::ClipModel(std::shared_ptr paren= t, std::shared_ptr &parent, con= st QString &binClipId, int id, PlaylistState state) +int ClipModel::construct(const std::shared_ptr &parent, con= st QString &binClipId, int id, PlaylistState::ClipState state) { id =3D (id =3D=3D -1 ? TimelineModel::getNextId() : id); std::shared_ptr binClip =3D pCore->projectItemModel()->ge= tClipByBinID(binClipId); @@ -74,7 +74,8 @@ int ClipModel::construct(const std::shared_ptr &parent, const QSt return id; } = -int ClipModel::construct(const std::shared_ptr &parent, con= st QString &binClipId, std::shared_ptr producer, PlaylistSta= te state) +int ClipModel::construct(const std::shared_ptr &parent, con= st QString &binClipId, std::shared_ptr producer, + PlaylistState::ClipState state) { = // we hand the producer to the bin clip, and in return we get a cut to= a good master producer @@ -320,7 +321,7 @@ bool ClipModel::isAudioOnly() const return m_currentState =3D=3D PlaylistState::AudioOnly; } = -void ClipModel::refreshProducerFromBin(PlaylistState state) +void ClipModel::refreshProducerFromBin(PlaylistState::ClipState state) { QWriteLocker locker(&m_lock); if (getProperty("mlt_service") =3D=3D QLatin1String("timewarp")) { @@ -474,16 +475,15 @@ void ClipModel::setShowKeyframes(bool show) service()->set("kdenlive:hide_keyframes", (int)!show); } = -bool ClipModel::setClipState(PlaylistState state) +bool ClipModel::setClipState(PlaylistState::ClipState state) { QWriteLocker locker(&m_lock); - std::pair VidAud =3D stateToBool(state); - m_producer->parent().set("set.test_image", int(VidAud.first ? 0 : 1)); - m_producer->parent().set("set.test_audio", int(VidAud.second ? 0 : 1)); + refreshProducerFromBin(state); + m_currentState =3D state; return true; } = -PlaylistState ClipModel::clipState() const +PlaylistState::ClipState ClipModel::clipState() const { READ_LOCK(); return m_currentState; diff --git a/src/timeline2/model/clipmodel.hpp b/src/timeline2/model/clipmo= del.hpp index b7781cdf2..efbb3825b 100644 --- a/src/timeline2/model/clipmodel.hpp +++ b/src/timeline2/model/clipmodel.hpp @@ -47,7 +47,7 @@ class ClipModel : public MoveableItem = protected: /* This constructor is not meant to be called, call the static constru= ct instead */ - ClipModel(std::shared_ptr parent, std::shared_ptr prod, const QString &binClipId, int id, PlaylistState state, + ClipModel(std::shared_ptr parent, std::shared_ptr prod, const QString &binClipId, int id, PlaylistState::ClipState = state, double speed =3D 1.); = public: @@ -58,14 +58,15 @@ public: @param binClip is the id of the bin clip associated @param id Requested id of the clip. Automatic if -1 */ - static int construct(const std::shared_ptr &parent, con= st QString &binClipId, int id, PlaylistState state); + static int construct(const std::shared_ptr &parent, con= st QString &binClipId, int id, PlaylistState::ClipState state); = /* @brief Creates a clip, which references itself to the parent timeli= ne Returns the (unique) id of the created clip This variants assumes a producer is already known, which should typica= lly happen only at loading time. Note that there is no guarantee that this producer is actually going t= o be used. It might be discarded. */ - static int construct(const std::shared_ptr &parent, con= st QString &binClipId, std::shared_ptr producer, PlaylistSta= te state); + static int construct(const std::shared_ptr &parent, con= st QString &binClipId, std::shared_ptr producer, + PlaylistState::ClipState state); = /* @brief returns a property of the clip, or from it's parent if it's = a cut */ @@ -77,9 +78,9 @@ public: Q_INVOKABLE void setShowKeyframes(bool show); = /** @brief Returns the timeline clip status (video / audio only) */ - PlaylistState clipState() const; + PlaylistState::ClipState clipState() const; /** @brief Sets the timeline clip status (video / audio only) */ - bool setClipState(PlaylistState state); + bool setClipState(PlaylistState::ClipState state); = /* @brief returns the length of the item on the timeline */ @@ -136,7 +137,7 @@ protected: void setTimelineEffectsEnabled(bool enabled); = /* @brief This functions should be called when the producer of the bin= Clip changes, to allow refresh */ - void refreshProducerFromBin(PlaylistState state); + void refreshProducerFromBin(PlaylistState::ClipState state); void refreshProducerFromBin(); /* @brief This functions replaces the current producer with a slowmoti= on one */ bool useTimewarpProducer(double speed, int extraSpace, Fun &undo, Fun = &redo); @@ -160,7 +161,7 @@ protected: = bool forceThumbReload; // Used to trigger a forced thumb reload, when = producer changes = - PlaylistState m_currentState; + PlaylistState::ClipState m_currentState; = double m_speed =3D -1; // Speed of the clip }; diff --git a/src/timeline2/model/timelinefunctions.cpp b/src/timeline2/mode= l/timelinefunctions.cpp index 2ba24fc94..1ce8be586 100644 --- a/src/timeline2/model/timelinefunctions.cpp +++ b/src/timeline2/model/timelinefunctions.cpp @@ -31,7 +31,7 @@ along with this program. If not, see . #include #include = -bool TimelineFunctions::copyClip(std::shared_ptr timeli= ne, int clipId, int &newId, PlaylistState state, Fun &undo, Fun &redo) +bool TimelineFunctions::copyClip(std::shared_ptr timeli= ne, int clipId, int &newId, PlaylistState::ClipState state, Fun &undo, Fun = &redo) { // Special case: slowmotion clips double clipSpeed =3D timeline->m_allClips[clipId]->getSpeed(); @@ -94,7 +94,7 @@ bool TimelineFunctions::processClipCut(std::shared_ptr timeli if (start > position || (start + duration) < position) { return false; } - PlaylistState state =3D timeline->m_allClips[clipId]->clipState(); + PlaylistState::ClipState state =3D timeline->m_allClips[clipId]->clipS= tate(); bool res =3D copyClip(timeline, clipId, newId, state, undo, redo); res =3D res && timeline->requestItemResize(clipId, position - start, t= rue, true, undo, redo); int newDuration =3D timeline->getClipPlaytime(clipId); @@ -344,7 +344,7 @@ bool TimelineFunctions::requestItemCopy(std::shared_ptr= timel for (int id : allIds) { int newId =3D -1; if (timeline->isClip(id)) { - PlaylistState state =3D timeline->m_allClips[id]->clipState(); + PlaylistState::ClipState state =3D timeline->m_allClips[id]->c= lipState(); res =3D copyClip(timeline, id, newId, state, undo, redo); res =3D res && (newId !=3D -1); } @@ -396,9 +396,9 @@ void TimelineFunctions::showCompositionKeyframes(std::s= hared_ptrdataChanged(modelIndex, modelIndex, {TimelineModel::Keyframe= sRole}); } = -bool TimelineFunctions::changeClipState(std::shared_ptr= timeline, int clipId, PlaylistState status) +bool TimelineFunctions::changeClipState(std::shared_ptr= timeline, int clipId, PlaylistState::ClipState status) { - PlaylistState oldState =3D timeline->m_allClips[clipId]->clipState(); + PlaylistState::ClipState oldState =3D timeline->m_allClips[clipId]->cl= ipState(); if (oldState =3D=3D status) { return true; } @@ -411,9 +411,9 @@ bool TimelineFunctions::changeClipState(std::shared_ptr= timel return result; } = -bool TimelineFunctions::changeClipState(std::shared_ptr= timeline, int clipId, PlaylistState status, Fun &undo, Fun &redo) +bool TimelineFunctions::changeClipState(std::shared_ptr= timeline, int clipId, PlaylistState::ClipState status, Fun &undo, Fun &red= o) { - PlaylistState oldState =3D timeline->m_allClips[clipId]->clipState(); + PlaylistState::ClipState oldState =3D timeline->m_allClips[clipId]->cl= ipState(); if (oldState =3D=3D status) { return true; } @@ -447,7 +447,7 @@ bool TimelineFunctions::changeClipState(std::shared_ptr= timel } return res; }; - bool result =3D reverse(); + bool result =3D operation(); if (result) { UPDATE_UNDO_REDO_NOLOCK(operation, reverse, undo, redo); } diff --git a/src/timeline2/model/timelinefunctions.hpp b/src/timeline2/mode= l/timelinefunctions.hpp index 5efd9723b..21fe11bd5 100644 --- a/src/timeline2/model/timelinefunctions.hpp +++ b/src/timeline2/model/timelinefunctions.hpp @@ -50,7 +50,7 @@ struct TimelineFunctions static bool processClipCut(std::shared_ptr timeline= , int clipId, int position, int &newId, Fun &undo, Fun &redo); = /* @brief Makes a perfect copy of a given clip, but do not insert it */ - static bool copyClip(std::shared_ptr timeline, int = clipId, int &newId, PlaylistState state, Fun &undo, Fun &redo); + static bool copyClip(std::shared_ptr timeline, int = clipId, int &newId, PlaylistState::ClipState state, Fun &undo, Fun &redo); = /* @brief Request the addition of multiple clips to the timeline * If the addition of any of the clips fails, the entire operation is = undone. @@ -80,10 +80,10 @@ struct TimelineFunctions * @param status: target status of the clip This function creates an undo object and returns true on success */ - static bool changeClipState(std::shared_ptr timelin= e, int clipId, PlaylistState status); + static bool changeClipState(std::shared_ptr timelin= e, int clipId, PlaylistState::ClipState status); /* @brief Same function as above, but accumulates for undo/redo */ - static bool changeClipState(std::shared_ptr timelin= e, int clipId, PlaylistState status, Fun &undo, Fun &redo); + static bool changeClipState(std::shared_ptr timelin= e, int clipId, PlaylistState::ClipState status, Fun &undo, Fun &redo); = static bool requestSplitAudio(std::shared_ptr timel= ine, int clipId, int audioTarget); static void setCompositionATrack(std::shared_ptr ti= meline, int cid, int aTrack); diff --git a/src/timeline2/model/timelinemodel.cpp b/src/timeline2/model/ti= melinemodel.cpp index 833b6628f..de4761631 100644 --- a/src/timeline2/model/timelinemodel.cpp +++ b/src/timeline2/model/timelinemodel.cpp @@ -553,8 +553,9 @@ bool TimelineModel::requestClipInsertion(const QString = &binClipId, int trackId, return result; } = -bool TimelineModel::requestClipCreation(const QString &binClipId, int &id,= PlaylistState state, Fun &undo, Fun &redo) +bool TimelineModel::requestClipCreation(const QString &binClipId, int &id,= PlaylistState::ClipState state, Fun &undo, Fun &redo) { + qDebug() << "requestClipCreation " << binClipId; int clipId =3D TimelineModel::getNextId(); id =3D clipId; Fun local_undo =3D deregisterClip_lambda(clipId); @@ -595,6 +596,8 @@ bool TimelineModel::requestClipInsertion(const QString = &binClipId, int trackId, { std::function local_undo =3D []() { return true; }; std::function local_redo =3D []() { return true; }; + qDebug() << "requestClipInsertion " << binClipId << " " + << " " << trackId << " " << position; bool res =3D false; if (getTrackById_const(trackId)->isLocked()) { return false; diff --git a/src/timeline2/model/timelinemodel.hpp b/src/timeline2/model/ti= melinemodel.hpp index b7c0bb5fb..50c8bf5c1 100644 --- a/src/timeline2/model/timelinemodel.hpp +++ b/src/timeline2/model/timelinemodel.hpp @@ -317,7 +317,7 @@ public: @param id: return parameter for the id of the newly created clip. @param state: The desired clip state (original, audio/video only). */ - bool requestClipCreation(const QString &binClipId, int &id, PlaylistSt= ate state, Fun &undo, Fun &redo); + bool requestClipCreation(const QString &binClipId, int &id, PlaylistSt= ate::ClipState state, Fun &undo, Fun &redo); = /* @brief Deletes the given clip or composition from the timeline This action is undoable Returns true on success. If it fails, nothing is diff --git a/src/timeline2/view/qml/ClipMenu.qml b/src/timeline2/view/qml/C= lipMenu.qml index a76fcb1a8..acaca0994 100644 --- a/src/timeline2/view/qml/ClipMenu.qml +++ b/src/timeline2/view/qml/ClipMenu.qml @@ -1,5 +1,6 @@ import QtQuick 2.6 import QtQuick.Controls 1.4 as OLD +import com.enums 1.0 = OLD.Menu { id: clipMenu @@ -50,7 +51,7 @@ OLD.Menu { OLD.MenuItem { text: i18n('Split Audio') onTriggered: timeline.splitAudio(clipId) - visible: clipStatus =3D=3D 0 + visible: clipStatus =3D=3D ClipState.VideoOnly } OLD.MenuItem { text: i18n('Remove') @@ -80,37 +81,30 @@ OLD.Menu { onTriggered: timeline.triggerAction('cut_timeline_clip') } OLD.Menu { - title: i18n('Clip Type...') + title: i18n('Clip Tape...') OLD.ExclusiveGroup { id: radioInputGroup } - OLD.MenuItem { - text: i18n('Original') - checkable: true - checked: clipStatus =3D=3D 0 - exclusiveGroup: radioInputGroup - onTriggered: timeline.setClipStatus(clipId, 0) - } OLD.MenuItem { text: i18n('Video Only') checkable: true - checked: clipStatus =3D=3D 1 + checked: clipStatus =3D=3D ClipState.VideoOnly exclusiveGroup: radioInputGroup - onTriggered: timeline.setClipStatus(clipId, 1) + onTriggered: timeline.setClipStatus(clipId, ClipState.Vide= oOnly) } OLD.MenuItem { text: i18n('Audio Only') checkable: true - checked: clipStatus =3D=3D 2 + checked: clipStatus =3D=3D ClipState.AudioOnly exclusiveGroup: radioInputGroup - onTriggered: timeline.setClipStatus(clipId, 2) + onTriggered: timeline.setClipStatus(clipId, ClipState.Audi= oOnly) } OLD.MenuItem { text: i18n('Disabled') checkable: true - checked: clipStatus =3D=3D 3 + checked: clipStatus =3D=3D ClipState.Disabled exclusiveGroup: radioInputGroup - onTriggered: timeline.setClipStatus(clipId, 3) + onTriggered: timeline.setClipStatus(clipId, ClipState.Disa= bled) } } } diff --git a/src/timeline2/view/timelinecontroller.cpp b/src/timeline2/view= /timelinecontroller.cpp index d8886e84d..a27e3f789 100644 --- a/src/timeline2/view/timelinecontroller.cpp +++ b/src/timeline2/view/timelinecontroller.cpp @@ -1464,7 +1464,7 @@ void TimelineController::showCompositionKeyframes(int= clipId, bool value) TimelineFunctions::showCompositionKeyframes(m_model, clipId, value); } = -void TimelineController::setClipStatus(int clipId, PlaylistState status) +void TimelineController::setClipStatus(int clipId, PlaylistState::ClipStat= e status) { TimelineFunctions::changeClipState(m_model, clipId, status); } diff --git a/src/timeline2/view/timelinecontroller.h b/src/timeline2/view/t= imelinecontroller.h index c66e0e81d..96e2dbe9e 100644 --- a/src/timeline2/view/timelinecontroller.h +++ b/src/timeline2/view/timelinecontroller.h @@ -252,7 +252,7 @@ public: Q_INVOKABLE void removeSpace(int trackId =3D -1, int frame =3D -1, boo= l affectAllTracks =3D false); /* @brief Change a clip status (normal / audio only / video only) */ - Q_INVOKABLE void setClipStatus(int clipId, PlaylistState status); + Q_INVOKABLE void setClipStatus(int clipId, PlaylistState::ClipState st= atus); = Q_INVOKABLE void requestClipCut(int clipId, int position); =