Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kdenlive for openSUSE:Factory 
checked in at 2023-05-01 18:51:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdenlive (Old)
 and      /work/SRC/openSUSE:Factory/.kdenlive.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdenlive"

Mon May  1 18:51:24 2023 rev:116 rq:1083836 version:23.04.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdenlive/kdenlive.changes        2023-04-23 
22:48:22.007017656 +0200
+++ /work/SRC/openSUSE:Factory/.kdenlive.new.1533/kdenlive.changes      
2023-05-01 18:51:27.689455039 +0200
@@ -1,0 +2,6 @@
+Mon May  1 07:31:41 UTC 2023 - Christophe Marin <[email protected]>
+
+- Add upstream fix for kde#468962:
+  * 0001-Fix-project-corruption-on-opening-add-test-to-preven.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-project-corruption-on-opening-add-test-to-preven.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kdenlive.spec ++++++
--- /var/tmp/diff_new_pack.K38HQL/_old  2023-05-01 18:51:28.269458483 +0200
+++ /var/tmp/diff_new_pack.K38HQL/_new  2023-05-01 18:51:28.277458530 +0200
@@ -29,6 +29,8 @@
 Source1:        
https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
 Source2:        applications.keyring
 %endif
+# PATCH-FIX-UPSTREAM
+Patch0:         0001-Fix-project-corruption-on-opening-add-test-to-preven.patch
 BuildRequires:  desktop-file-utils
 BuildRequires:  extra-cmake-modules
 BuildRequires:  fdupes

++++++ 0001-Fix-project-corruption-on-opening-add-test-to-preven.patch ++++++
>From 364e23f6d1ba104e40623297b82a0ee873942925 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Mardelle <[email protected]>
Date: Sat, 29 Apr 2023 07:05:04 +0200
Subject: [PATCH] Fix project corruption on opening, add test to prevent from
 happening again CCBUG: 468962

 (test files stripped from patch for the package)
---
 src/mltcontroller/clipcontroller.cpp         |    1 -
 src/project/projectmanager.cpp               |   11 +-
 src/project/projectmanager.h                 |    2 +-
 src/timeline2/model/builders/meltBuilder.cpp |    5 +-

diff --git a/src/mltcontroller/clipcontroller.cpp 
b/src/mltcontroller/clipcontroller.cpp
index 73fb15ae1..669748573 100644
--- a/src/mltcontroller/clipcontroller.cpp
+++ b/src/mltcontroller/clipcontroller.cpp
@@ -731,7 +731,6 @@ bool ClipController::hasAudio() const
 void ClipController::checkAudioVideo()
 {
     QReadLocker lock(&m_producerLock);
-    qDebug() << "------------\nCHECKING AUDIO/VIDEO FOR CLIP: " << m_clipType 
<< "\n------------------------";
     if (m_masterProducer->get_int("_placeholder") == 1 || 
m_masterProducer->get_int("_missingsource") == 1) {
         // This is a placeholder file, try to guess from its properties
         QString orig_service = m_masterProducer->get("kdenlive:orig_service");
diff --git a/src/project/projectmanager.cpp b/src/project/projectmanager.cpp
index 3ab00f022..791910867 100644
--- a/src/project/projectmanager.cpp
+++ b/src/project/projectmanager.cpp
@@ -307,10 +307,19 @@ void ProjectManager::activateDocument(const QUuid &uuid)
 void ProjectManager::testSetActiveDocument(KdenliveDoc *doc, 
std::shared_ptr<TimelineItemModel> timeline)
 {
     m_project = doc;
+    if (timeline == nullptr) {
+        // New nested document format, build timeline model now
+        const QUuid uuid = m_project->uuid();
+        timeline = TimelineItemModel::construct(uuid, 
pCore->getProjectProfile(), m_project->commandStack());
+        std::shared_ptr<Mlt::Tractor> tc = 
pCore->projectItemModel()->getExtraTimeline(uuid.toString());
+        if (!constructTimelineFromTractor(timeline, nullptr, *tc.get(), 
m_progressDialog, m_project->modifiedDecimalPoint(), QString(), QString())) {
+            qDebug() << "===== LOADING PROJECT INTERNAL ERROR";
+        }
+    }
     m_project->addTimeline(doc->uuid(), timeline);
     m_activeTimelineModel = timeline;
-    m_project->loadSequenceGroupsAndGuides(doc->uuid());
     m_project->activeUuid = doc->uuid();
+    m_project->loadSequenceGroupsAndGuides(doc->uuid());
 }
 
 std::shared_ptr<TimelineItemModel> ProjectManager::getTimeline()
diff --git a/src/project/projectmanager.h b/src/project/projectmanager.h
index ad8082746..2e6c6d823 100644
--- a/src/project/projectmanager.h
+++ b/src/project/projectmanager.h
@@ -95,7 +95,7 @@ public:
     void addAudioTracks(int tracksCount);
     /** @brief This method is only there for tests, do not use in real app.
      */
-    void testSetActiveDocument(KdenliveDoc *doc, 
std::shared_ptr<TimelineItemModel> timeline);
+    void testSetActiveDocument(KdenliveDoc *doc, 
std::shared_ptr<TimelineItemModel> timeline = nullptr);
     /** @brief This method is only there for tests, do not use in real app.
      */
     bool testSaveFileAs(const QString &outputFileName);
diff --git a/src/timeline2/model/builders/meltBuilder.cpp 
b/src/timeline2/model/builders/meltBuilder.cpp
index e08a36fe0..188b9f281 100644
--- a/src/timeline2/model/builders/meltBuilder.cpp
+++ b/src/timeline2/model/builders/meltBuilder.cpp
@@ -47,7 +47,6 @@ bool loadProjectBin(const std::shared_ptr<ProjectItemModel> 
&projectModel, Mlt::
     int zoomLevel = -1;
     binIdCorresp.clear();
     projectModel->loadBinPlaylist(&tractor, binIdCorresp, expandedFolders, 
zoomLevel, progressDialog);
-
     QStringList foldersToExpand;
     // Find updated ids for expanded folders
     for (const QString &folderId : expandedFolders) {
@@ -75,6 +74,7 @@ bool constructTimelineFromTractor(const 
std::shared_ptr<TimelineItemModel> &time
 
     QStringList expandedFolders;
     if (projectModel) {
+        // This is an old format project file
         int zoomLevel = -1;
         if (timeline->uuid() == pCore->currentTimelineId()) {
             binIdCorresp.clear();
@@ -82,7 +82,6 @@ bool constructTimelineFromTractor(const 
std::shared_ptr<TimelineItemModel> &time
         } else {
             projectModel->loadTractorPlaylist(tractor, binIdCorresp);
         }
-
         QStringList foldersToExpand;
         // Find updated ids for expanded folders
         for (const QString &folderId : expandedFolders) {
@@ -95,7 +94,7 @@ bool constructTimelineFromTractor(const 
std::shared_ptr<TimelineItemModel> &time
             pCore->bin()->loadBinProperties(foldersToExpand, zoomLevel);
         }
     } else {
-        binIdCorresp.clear();
+        // loading an extra timeline
     }
 
     QSet<QString> reserved_names{QLatin1String("playlistmain"), 
QLatin1String("timeline_preview"), QLatin1String("timeline_overlay"),

Reply via email to