- QDomNode markers = m_document.elementsByTagName("markers").at(0);
- if (!markers.isNull()) {
- QDomNodeList markerslist = markers.childNodes();
- int maxchild = markerslist.count();
- for (int k = 0; k < maxchild; k++) {
- e = markerslist.at(k).toElement();
- if (e.tagName() == "marker") {
- m_clipManager->getClipById(e.attribute("id"))->addSnapMarker(GenTime(e.attribute("time").toDouble()), e.attribute("comment"));
+
+ for (int i = 0; i < infomax && !m_abortLoading; i++) {
+ e = infoproducers.item(i).cloneNode().toElement();
+ if (m_documentLoadingStep > 0) {
+ m_documentLoadingProgress += m_documentLoadingStep;
+ parent->slotGotProgressInfo(QString(), (int) m_documentLoadingProgress);
+ //qApp->processEvents();
+ }
+ QString prodId = e.attribute("id");
+ if (!e.isNull() && prodId != "black" && !prodId.startsWith("slowmotion") && !m_abortLoading) {
+ e.setTagName("producer");
+ // Get MLT's original producer properties
+
+ for (int j = 0; j < max; j++) {
+ QDomElement o = producers.item(j).cloneNode().toElement();
+ QString origId = o.attribute("id").section('_', 0, 0);
+ if (origId == prodId) {
+ orig = o;
+ break;
+ }
+ }
+ addClipInfo(e, orig, prodId);
+ kDebug() << "// NLIVE PROD: " << prodId;
+ }
+ }
+ if (m_abortLoading) {
+ //parent->slotGotProgressInfo(i18n("File %1 is not a Kdenlive project file."), 100);
+ emit resetProjectList();
+ m_startPos = 0;
+ m_url = KUrl();
+ m_tracksList.clear();
+ kWarning() << "Aborted loading of: " << url.path();
+ m_document = createEmptyDocument(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks());
+ setProfilePath(KdenliveSettings::default_profile());
+ m_clipManager->clear();
+ } else {
+ QDomNode markers = m_document.elementsByTagName("markers").at(0);
+ if (!markers.isNull()) {
+ QDomNodeList markerslist = markers.childNodes();
+ int maxchild = markerslist.count();
+ for (int k = 0; k < maxchild; k++) {
+ e = markerslist.at(k).toElement();
+ if (e.tagName() == "marker") {
+ m_clipManager->getClipById(e.attribute("id"))->addSnapMarker(GenTime(e.attribute("time").toDouble()), e.attribute("comment"));
+ }
+ }
+ westley.removeChild(markers);