From: Andreas Sturmlechner Date: Wed, 11 Mar 2020 22:52:22 +0000 (+0100) Subject: kde-apps/kdenlive: Fix crashes on close X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=54e03c65a4e2eb913ed0dab2fbf57935bc69a013;p=gentoo.git kde-apps/kdenlive: Fix crashes on close Upstream commits: 78f8880a3d9c1e37548b5146d9f61f05ab7032ea a6bff2f99e3cf3d7adb0ef2aa61f35c746357e16 See also: https://invent.kde.org/kde/kdenlive/issues/571 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=418506 Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: Andreas Sturmlechner --- diff --git a/kde-apps/kdenlive/files/kdenlive-19.12.3-qt-5.14-crash-on-close-1.patch b/kde-apps/kdenlive/files/kdenlive-19.12.3-qt-5.14-crash-on-close-1.patch new file mode 100644 index 000000000000..421452dc6488 --- /dev/null +++ b/kde-apps/kdenlive/files/kdenlive-19.12.3-qt-5.14-crash-on-close-1.patch @@ -0,0 +1,69 @@ +From 78f8880a3d9c1e37548b5146d9f61f05ab7032ea Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Mardelle +Date: Fri, 31 Jan 2020 13:26:25 +0100 +Subject: Fix crash on exit + +--- + src/effects/effectlist/view/effectlistwidget.cpp | 1 - + src/timeline2/view/timelinetabs.cpp | 6 ++++++ + src/timeline2/view/timelinetabs.hpp | 2 +- + src/transitions/transitionlist/view/transitionlistwidget.cpp | 1 - + 4 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/effects/effectlist/view/effectlistwidget.cpp b/src/effects/effectlist/view/effectlistwidget.cpp +index c734e15..66b9a94 100644 +--- a/src/effects/effectlist/view/effectlistwidget.cpp ++++ b/src/effects/effectlist/view/effectlistwidget.cpp +@@ -60,7 +60,6 @@ void EffectListWidget::updateFavorite(const QModelIndex &index) + + EffectListWidget::~EffectListWidget() + { +- delete m_proxy; + qDebug() << " - - -Deleting effect list widget"; + } + +diff --git a/src/timeline2/view/timelinetabs.cpp b/src/timeline2/view/timelinetabs.cpp +index 74bb10b..9a72729 100644 +--- a/src/timeline2/view/timelinetabs.cpp ++++ b/src/timeline2/view/timelinetabs.cpp +@@ -57,6 +57,12 @@ TimelineTabs::TimelineTabs(QWidget *parent) + connect(pCore->monitorManager()->projectMonitor(), &Monitor::addEffect, m_mainTimeline->controller(), &TimelineController::addEffectToCurrentClip); + } + ++TimelineTabs::~TimelineTabs() ++{ ++ // clear source ++ m_mainTimeline->setSource(QUrl()); ++} ++ + TimelineWidget *TimelineTabs::getMainTimeline() const + { + return m_mainTimeline; +diff --git a/src/timeline2/view/timelinetabs.hpp b/src/timeline2/view/timelinetabs.hpp +index aba3e23..977af13 100644 +--- a/src/timeline2/view/timelinetabs.hpp ++++ b/src/timeline2/view/timelinetabs.hpp +@@ -49,7 +49,7 @@ class TimelineTabs : public QTabWidget + public: + /* Construct the tabs as well as the widget for the main timeline */ + TimelineTabs(QWidget *parent); +- ++ virtual ~TimelineTabs(); + /* @brief Returns a pointer to the main timeline */ + TimelineWidget *getMainTimeline() const; + +diff --git a/src/transitions/transitionlist/view/transitionlistwidget.cpp b/src/transitions/transitionlist/view/transitionlistwidget.cpp +index 309de55..afd122f 100644 +--- a/src/transitions/transitionlist/view/transitionlistwidget.cpp ++++ b/src/transitions/transitionlist/view/transitionlistwidget.cpp +@@ -53,7 +53,6 @@ TransitionListWidget::TransitionListWidget(QWidget *parent) + + TransitionListWidget::~TransitionListWidget() + { +- delete m_proxy; + qDebug() << " - - -Deleting transition list widget"; + } + +-- +cgit v1.1 + diff --git a/kde-apps/kdenlive/files/kdenlive-19.12.3-qt-5.14-crash-on-close-2.patch b/kde-apps/kdenlive/files/kdenlive-19.12.3-qt-5.14-crash-on-close-2.patch new file mode 100644 index 000000000000..3af886f68ddb --- /dev/null +++ b/kde-apps/kdenlive/files/kdenlive-19.12.3-qt-5.14-crash-on-close-2.patch @@ -0,0 +1,62 @@ +From 936307aceca3619f2b1d1e2f12d21ee4e8608cd6 Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Mardelle +Date: Thu, 5 Mar 2020 08:13:14 +0100 +Subject: [PATCH] Fix crash on close. Fixes #571 + +--- + src/core.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/core.cpp b/src/core.cpp +index 7c590a3f2..a48e1602f 100644 +--- a/src/core.cpp ++++ b/src/core.cpp +@@ -120,11 +120,11 @@ void Core::build(bool isAppImage, const QString &MltPath) + + void Core::initGUI(const QUrl &Url, const QString &clipsToLoad) + { +- m_guiConstructed = true; + m_profile = KdenliveSettings::default_profile(); + m_currentProfile = m_profile; + profileChanged(); + m_mainWindow = new MainWindow(); ++ m_guiConstructed = true; + connect(this, &Core::showConfigDialog, m_mainWindow, &MainWindow::slotPreferences); + + // load default profile and ask user to select one if not found. +@@ -658,13 +658,13 @@ std::shared_ptr Core::projectItemModel() + + void Core::invalidateRange(QSize range) + { +- if (!m_mainWindow || m_mainWindow->getCurrentTimeline()->loading) return; ++ if (!m_guiConstructed || m_mainWindow->getCurrentTimeline()->loading) return; + m_mainWindow->getCurrentTimeline()->controller()->invalidateZone(range.width(), range.height()); + } + + void Core::invalidateItem(ObjectId itemId) + { +- if (!m_mainWindow || !m_mainWindow->getCurrentTimeline() || m_mainWindow->getCurrentTimeline()->loading) return; ++ if (!m_guiConstructed || !m_mainWindow->getCurrentTimeline() || m_mainWindow->getCurrentTimeline()->loading) return; + switch (itemId.first) { + case ObjectType::TimelineClip: + case ObjectType::TimelineComposition: +@@ -692,14 +692,14 @@ double Core::getClipSpeed(int id) const + + void Core::updateItemKeyframes(ObjectId id) + { +- if (id.first == ObjectType::TimelineClip && m_mainWindow) { ++ if (id.first == ObjectType::TimelineClip && m_guiConstructed) { + m_mainWindow->getCurrentTimeline()->controller()->updateClip(id.second, {TimelineModel::KeyframesRole}); + } + } + + void Core::updateItemModel(ObjectId id, const QString &service) + { +- if (m_mainWindow && id.first == ObjectType::TimelineClip && !m_mainWindow->getCurrentTimeline()->loading && service.startsWith(QLatin1String("fade"))) { ++ if (m_guiConstructed && id.first == ObjectType::TimelineClip && !m_mainWindow->getCurrentTimeline()->loading && service.startsWith(QLatin1String("fade"))) { + bool startFade = service == QLatin1String("fadein") || service == QLatin1String("fade_from_black"); + m_mainWindow->getCurrentTimeline()->controller()->updateClip(id.second, {startFade ? TimelineModel::FadeInRole : TimelineModel::FadeOutRole}); + } +-- +2.25.1 + diff --git a/kde-apps/kdenlive/kdenlive-19.12.3-r1.ebuild b/kde-apps/kdenlive/kdenlive-19.12.3-r1.ebuild new file mode 100644 index 000000000000..3987e6939ccb --- /dev/null +++ b/kde-apps/kdenlive/kdenlive-19.12.3-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ECM_HANDBOOK="optional" +ECM_TEST="true" +KFMIN=5.63.0 +QTMIN=5.12.3 +VIRTUALX_REQUIRED="test" +inherit ecm kde.org + +DESCRIPTION="Non-linear video editing suite by KDE" +HOMEPAGE="https://kdenlive.org/en/" + +LICENSE="GPL-2" +SLOT="5" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="freesound gles2 semantic-desktop share v4l" + +BDEPEND=" + sys-devel/gettext +" +DEPEND=" + dev-cpp/rttr + >=dev-qt/qtconcurrent-${QTMIN}:5 + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5[gles2=] + >=dev-qt/qtmultimedia-${QTMIN}:5 + >=dev-qt/qtnetwork-${QTMIN}:5 + >=dev-qt/qtsvg-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=dev-qt/qtxml-${QTMIN}:5 + >=kde-frameworks/karchive-${KFMIN}:5 + >=kde-frameworks/kbookmarks-${KFMIN}:5 + >=kde-frameworks/kcompletion-${KFMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kcrash-${KFMIN}:5 + >=kde-frameworks/kdbusaddons-${KFMIN}:5 + >=kde-frameworks/kdeclarative-${KFMIN}:5 + >=kde-frameworks/kguiaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kiconthemes-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/kitemviews-${KFMIN}:5 + >=kde-frameworks/kjobwidgets-${KFMIN}:5 + >=kde-frameworks/knewstuff-${KFMIN}:5 + >=kde-frameworks/knotifications-${KFMIN}:5 + >=kde-frameworks/knotifyconfig-${KFMIN}:5 + >=kde-frameworks/kservice-${KFMIN}:5 + >=kde-frameworks/ktextwidgets-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 + >=kde-frameworks/solid-${KFMIN}:5 + >=media-libs/mlt-6.18.0[ffmpeg,frei0r,kdenlive,melt,qt5,sdl,xml] + freesound? ( >=dev-qt/qtwebkit-5.212.0_pre20180120:5 ) + semantic-desktop? ( >=kde-frameworks/kfilemetadata-${KFMIN}:5 ) + share? ( >=kde-frameworks/purpose-${KFMIN}:5 ) + v4l? ( media-libs/libv4l ) +" +RDEPEND="${DEPEND} + >=dev-qt/qtquickcontrols-${QTMIN}:5 + virtual/ffmpeg[encode,sdl,X] +" + +RESTRICT+=" test" # segfaults, bug 684132 + +PATCHES=( "${FILESDIR}"/${P}-qt-5.14-crash-on-close-{1,2}.patch ) # 20.04 branch + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package freesound Qt5WebKitWidgets) + $(cmake_use_find_package semantic-desktop KF5FileMetaData) + $(cmake_use_find_package share KF5Purpose) + $(cmake_use_find_package v4l LibV4L2) + ) + + ecm_src_configure +} + +pkg_postinst() { + ecm_pkg_postinst + + # Gentoo bug 603168 + if ! has_version "media-libs/mlt[fftw]" ; then + elog "For 'Crop and Transform/Rotate and Shear' effect, please build media-libs/mlt with USE=fftw enabled." + fi +}