]> git.sesse.net Git - kdenlive/commitdiff
Speed up project loading. I reduced the times a producer DOM node gets cloned while...
authorTill Theato <root@ttill.de>
Sat, 2 Oct 2010 17:13:21 +0000 (17:13 +0000)
committerTill Theato <root@ttill.de>
Sat, 2 Oct 2010 17:13:21 +0000 (17:13 +0000)
svn path=/trunk/kdenlive/; revision=4964

src/kdenlivedoc.cpp

index f9a90afa35bf21ba589097d3713390d4c7bc4fd3..36e3188a6c00aeec5ce5d0d15b1dc103f819658f 100644 (file)
@@ -168,10 +168,10 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
                                     // Get MLT's original producer properties
                                     QDomElement orig;
                                     for (int j = 0; j < max; j++) {
-                                        QDomElement o = producers.item(j).cloneNode().toElement();
-                                        QString origId = o.attribute("id").section('_', 0, 0);
+                                        QDomNode o = producers.item(j);
+                                        QString origId = o.attributes().namedItem("id").nodeValue().section('_', 0, 0);
                                         if (origId == prodId) {
-                                            orig = o;
+                                            orig = o.cloneNode().toElement();
                                             break;
                                         }
                                     }