X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdocclipbase.cpp;h=b2b26de81dc6c4e785cd650d7769b525ba1357eb;hb=ff83737cdf5e888500934231a2de90c9b383218c;hp=a020e77ed9d968a850aa79a732b897909c7a62ba;hpb=49f7333d134830d440ff45c173d7636d4dafa196;p=kdenlive diff --git a/src/docclipbase.cpp b/src/docclipbase.cpp index a020e77e..b2b26de8 100644 --- a/src/docclipbase.cpp +++ b/src/docclipbase.cpp @@ -28,7 +28,6 @@ DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QStrin m_id(id), m_description(QString()), m_refcount(0), m_audioThumbCreated(false), m_duration(GenTime()), m_thumbProd(NULL), m_audioTimer(NULL), m_properties(QMap ()), audioFrameChache(QMap > ()), m_baseTrackProducers(QList ()), m_snapMarkers(QList < CommentedTime > ()) { int type = xml.attribute("type").toInt(); m_clipType = (CLIPTYPE) type; - m_name = xml.attribute("name"); QDomNamedNodeMap attributes = xml.attributes(); for (unsigned int i = 0; i < attributes.count(); i++) { @@ -44,7 +43,7 @@ DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QStrin out = xml.attribute("duration").toInt(); if (out != 0) setDuration(GenTime(out, KdenliveSettings::project_fps())); } - if (m_name.isEmpty()) m_name = url.fileName(); + if (!m_properties.contains("name")) m_properties.insert("name", url.fileName()); //if (!url.isEmpty() && QFile::exists(url.path())) { @@ -70,8 +69,8 @@ DocClipBase::~DocClipBase() { delete m_thumbProd; } if (m_audioTimer) { - m_audioTimer->stop(); - delete m_audioTimer; + m_audioTimer->stop(); + delete m_audioTimer; } qDeleteAll(m_baseTrackProducers); m_baseTrackProducers.clear(); @@ -107,13 +106,9 @@ bool DocClipBase::audioThumbCreated() const { return m_audioThumbCreated; } -void DocClipBase::setName(const QString name) { - m_name = name; -} - const QString & DocClipBase::name() const { - return m_name; + return m_properties.value("name"); } const QString &DocClipBase::getId() const {