]> git.sesse.net Git - kdenlive/blobdiff - src/docclipbase.cpp
Start caching of project tree thumbnails for faster project opening
[kdenlive] / src / docclipbase.cpp
index bc8c4d193b8a57fdc8b3291d86840c6a51882691..c5c64e2eeaebad58b75ecd7cb293b61cb2278691 100644 (file)
@@ -548,6 +548,14 @@ void DocClipBase::getFileHash(const QString &url) {
     }
 }
 
+QString DocClipBase::getClipHash() const {
+    QString hash;
+    if (m_clipType == SLIDESHOW) hash = QCryptographicHash::hash(m_properties.value("resource").toAscii().data(), QCryptographicHash::Md5);
+    else if (m_clipType == COLOR) hash = QCryptographicHash::hash(m_properties.value("colour").toAscii().data(), QCryptographicHash::Md5);
+    else hash = m_properties.value("file_hash");
+    return hash;
+}
+
 void DocClipBase::setProperty(const QString &key, const QString &value) {
     m_properties.insert(key, value);
     if (key == "resource") {