Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kmail for openSUSE:Factory checked in at 2024-07-11 20:29:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kmail (Old) and /work/SRC/openSUSE:Factory/.kmail.new.17339 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kmail" Thu Jul 11 20:29:29 2024 rev:99 rq:1186662 version:24.05.2 Changes: -------- --- /work/SRC/openSUSE:Factory/kmail/kmail.changes 2024-07-05 19:51:54.199975096 +0200 +++ /work/SRC/openSUSE:Factory/.kmail.new.17339/kmail.changes 2024-07-11 20:29:50.617519073 +0200 @@ -1,0 +2,6 @@ +Wed Jul 10 11:32:30 UTC 2024 - Fabian Vogt <fab...@ritter-vogt.de> + +- Add patch to fix crash on opening mails for editing (kde#486283): + * 0001-Fix-crash-due-to-deleteLater-nested-event-loop.patch + +------------------------------------------------------------------- New: ---- 0001-Fix-crash-due-to-deleteLater-nested-event-loop.patch BETA DEBUG BEGIN: New:- Add patch to fix crash on opening mails for editing (kde#486283): * 0001-Fix-crash-due-to-deleteLater-nested-event-loop.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kmail.spec ++++++ --- /var/tmp/diff_new_pack.O7Wjlf/_old 2024-07-11 20:29:51.777561942 +0200 +++ /var/tmp/diff_new_pack.O7Wjlf/_new 2024-07-11 20:29:51.777561942 +0200 @@ -32,6 +32,8 @@ Source1: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig Source2: applications.keyring %endif +# PATCH-FIX-UPSTREAM https://invent.kde.org/pim/kmail/-/merge_requests/137 +Patch1: 0001-Fix-crash-due-to-deleteLater-nested-event-loop.patch BuildRequires: kf6-extra-cmake-modules >= %{kf6_version} BuildRequires: libgpgmepp-devel BuildRequires: cmake(KF6Bookmarks) >= %{kf6_version} @@ -96,10 +98,10 @@ BuildRequires: cmake(Qt6Test) >= %{qt6_version} BuildRequires: cmake(Qt6WebEngineWidgets) >= %{qt6_version} BuildRequires: cmake(Qt6Widgets) >= %{qt6_version} -Requires: kmail-application-icons Requires: kdepim-addons Requires: kdepim-runtime Requires: kmail-account-wizard +Requires: kmail-application-icons Requires: ktextaddons Recommends: akonadi-import-wizard Recommends: akonadi-search ++++++ 0001-Fix-crash-due-to-deleteLater-nested-event-loop.patch ++++++ >From f4ad9fb23b0f2154b98a24d74c355652102f5532 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <fab...@ritter-vogt.de> Date: Wed, 10 Jul 2024 10:43:00 +0200 Subject: [PATCH] Fix crash due to deleteLater() + nested event loop KMEditItemCommand::execute creates a connection that does deleteLater(), but also calls KMComposerWin::setMessage which creates a nested QEventLoop in Kleo::KeyCache::Private::ensureCachePopulated. This nested event loop thus deletes KMEditItemCommand within KMEditItemCommand::execute, causing a crash. Fix this by creating the connection for deleteLater as late as possible and also call setDeletesItself(true) for good measure. BUG: 486283 (cherry picked from commit be1e18f93c6b601389e92eeb87d32e801e77a52f) --- src/kmcommands.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/kmcommands.cpp b/src/kmcommands.cpp index 976128fd2..9651ed3dc 100644 --- a/src/kmcommands.cpp +++ b/src/kmcommands.cpp @@ -592,11 +592,6 @@ KMCommand::Result KMEditItemCommand::execute() return Failed; } - if (mDeleteFromSource) { - setDeletesItself(true); - auto job = new Akonadi::ItemDeleteJob(item); - connect(job, &KIO::Job::result, this, &KMEditItemCommand::slotDeleteItem); - } KMail::Composer *win = KMail::makeComposer(); bool lastEncrypt = false; bool lastSign = false; @@ -623,8 +618,14 @@ KMCommand::Result KMEditItemCommand::execute() win->setFcc(QString::number(sentAttribute->moveToCollection().id())); } win->show(); + if (mDeleteFromSource) { win->setModified(true); + + setDeletesItself(true); + setEmitsCompletedItself(true); + auto job = new Akonadi::ItemDeleteJob(item); + connect(job, &KIO::Job::result, this, &KMEditItemCommand::slotDeleteItem); } return OK; -- 2.45.2