Commit 1918643e authored by Nicolas Carion's avatar Nicolas Carion

[Timeline2][Model] Ensure that non callable constructor is protected

parent 231c0617
......@@ -35,7 +35,7 @@ ClipModel::ClipModel(std::weak_ptr<TimelineModel> parent, std::weak_ptr<Mlt::Pro
int ClipModel::construct(std::weak_ptr<TimelineModel> parent, std::shared_ptr<Mlt::Producer> prod)
std::shared_ptr<ClipModel> clip = std::make_shared<ClipModel>(parent, prod);
std::shared_ptr<ClipModel> clip(new ClipModel(parent, prod));
int id = clip->m_id;
if (auto ptr = parent.lock()) {
......@@ -36,10 +36,12 @@ class ClipModel : public QObject
ClipModel() = delete;
/* This constructor is not meant to be called, call the static construct instead */
ClipModel(std::weak_ptr<TimelineModel> parent, std::weak_ptr<Mlt::Producer> prod);
/* @brief Creates a clip, which references itself to the parent timeline
Returns the (unique) id of the created clip
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