829fd7a70f
- Add more fixes: * 0001-Avoid-crashing-before-priting-debug-output-when-sett.patch (kde#468985) * 0001-Remove-dangling-reference.patch * 0001-Allow-running-mysql_upgrade-when-starting-Akonadi.patch (kde#402680) - Add upstream changes: * 0001-Fix-wrong-for-clause-in-Akonadi-Session.patch (kde#458315) * 0002-Remove-dead-code-from-FavoriteCollectionsModel.patch * 0003-Fix-a-bug-in-for-clause-in-EntityTreeModel.patch * 0001-Fix-crash-on-server-shutdown.patch (kde#450217, kde#462692) OBS-URL: https://build.opensuse.org/request/show/1083554 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/akonadi-server?expand=0&rev=340
54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
From 0ab418bacdaf8322771e41452a87d062a2449869 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pale=C4=8Dek?= <jpalecek@web.de>
|
|
Date: Thu, 20 Apr 2023 16:17:12 +0200
|
|
Subject: [PATCH 1/3] Fix wrong for clause in Akonadi::Session
|
|
|
|
BUG: 468343
|
|
BUG: 465245
|
|
BUG: 464275
|
|
BUG: 462213
|
|
BUG: 462169
|
|
BUG: 461131
|
|
BUG: 460653
|
|
BUG: 460586
|
|
BUG: 458497
|
|
BUG: 458315
|
|
(cherry picked from commit eca4fdbdf328883ae564b568c9ba13697cc90c4a)
|
|
---
|
|
src/core/session.cpp | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/core/session.cpp b/src/core/session.cpp
|
|
index 227dda367..46106b923 100644
|
|
--- a/src/core/session.cpp
|
|
+++ b/src/core/session.cpp
|
|
@@ -293,7 +293,8 @@ void SessionPrivate::serverStateChanged(ServerManager::State state)
|
|
} else if (!connected && state == ServerManager::Broken) {
|
|
// If the server is broken, cancel all pending jobs, otherwise they will be
|
|
// blocked forever and applications waiting for them to finish would be stuck
|
|
- for (Job *job : std::as_const(queue)) {
|
|
+ auto q = queue;
|
|
+ for (Job *job : q) {
|
|
job->setError(Job::ConnectionFailed);
|
|
job->kill(KJob::EmitResult);
|
|
}
|
|
@@ -435,11 +436,13 @@ void Session::clear()
|
|
|
|
void SessionPrivate::clear(bool forceReconnect)
|
|
{
|
|
- for (Job *job : std::as_const(queue)) {
|
|
+ auto q = queue;
|
|
+ for (Job *job : q) {
|
|
job->kill(KJob::EmitResult); // safe, not started yet
|
|
}
|
|
queue.clear();
|
|
- for (Job *job : std::as_const(pipeline)) {
|
|
+ auto p = pipeline;
|
|
+ for (Job *job : p) {
|
|
job->d_ptr->mStarted = false; // avoid killing/reconnect loops
|
|
job->kill(KJob::EmitResult);
|
|
}
|
|
--
|
|
2.40.0
|
|
|