[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdenlive/Applications/16.12] src/doc: Make sure the document has a valid id on opening
From:       Jean-Baptiste Mardelle <jb () kdenlive ! org>
Date:       2016-12-04 20:37:28
Message-ID: E1cDdXM-0001ve-4J () code ! kde ! org
[Download RAW message or body]

Git commit 12d1eb7ca5bd24ad88115c5cb6321f6a86cbe3d2 by Jean-Baptiste Mardelle.
Committed on 04/12/2016 at 20:35.
Pushed by mardelle into branch 'Applications/16.12'.

Make sure the document has a valid id on opening

M  +6    -0    src/doc/documentchecker.cpp

https://commits.kde.org/kdenlive/12d1eb7ca5bd24ad88115c5cb6321f6a86cbe3d2

diff --git a/src/doc/documentchecker.cpp b/src/doc/documentchecker.cpp
index 0900085..b4602b2 100644
--- a/src/doc/documentchecker.cpp
+++ b/src/doc/documentchecker.cpp
@@ -87,6 +87,12 @@ bool DocumentChecker::hasErrorInClips()
     for (int i = 0; i < playlists.count(); ++i) {
         if (playlists.at(i).toElement().attribute(QStringLiteral("id")) == \
                QStringLiteral("main bin")) {
             QString documentid = EffectsList::property(playlists.at(i).toElement(), \
QStringLiteral("kdenlive:docproperties.documentid")); +            if \
(documentid.isEmpty()) { +                // invalid document id, recreate one
+                documentid = QString::number(QDateTime::currentMSecsSinceEpoch());
+                //TODO: Warn on invalid doc id
+                EffectsList::setProperty(playlists.at(i).toElement(), \
QStringLiteral("kdenlive:docproperties.documentid"), documentid); +            }
             storageFolder = EffectsList::property(playlists.at(i).toElement(), \
                QStringLiteral("kdenlive:docproperties.storagefolder"));
             if (!storageFolder.isEmpty() && \
!!storageFolder.startsWith(QStringLiteral("/"))) {  storageFolder.prepend(root);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic