From: Till Theato Date: Sat, 2 Oct 2010 17:13:21 +0000 (+0000) Subject: Speed up project loading. I reduced the times a producer DOM node gets cloned while... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7a283ca568878d26906d18cbd8757f7b0aa8c9c5;p=kdenlive Speed up project loading. I reduced the times a producer DOM node gets cloned while trying to find the original producer properties to use for loading a clip. svn path=/trunk/kdenlive/; revision=4964 --- diff --git a/src/kdenlivedoc.cpp b/src/kdenlivedoc.cpp index f9a90afa..36e3188a 100644 --- a/src/kdenlivedoc.cpp +++ b/src/kdenlivedoc.cpp @@ -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; } }