From 93a93e9a3b53c1a73142a305ea1f8136846942ee Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 22 Dec 2021 14:08:05 +0000 Subject: gentoo resync : 22.12.2021 --- ...bksysguard-5.22.5-no-detailed-mem-message.patch | 28 -------- .../files/libksysguard-5.23.4-fix-segfault.patch | 76 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 28 deletions(-) delete mode 100644 kde-plasma/libksysguard/files/libksysguard-5.22.5-no-detailed-mem-message.patch create mode 100644 kde-plasma/libksysguard/files/libksysguard-5.23.4-fix-segfault.patch (limited to 'kde-plasma/libksysguard/files') diff --git a/kde-plasma/libksysguard/files/libksysguard-5.22.5-no-detailed-mem-message.patch b/kde-plasma/libksysguard/files/libksysguard-5.22.5-no-detailed-mem-message.patch deleted file mode 100644 index 352cad76b765..000000000000 --- a/kde-plasma/libksysguard/files/libksysguard-5.22.5-no-detailed-mem-message.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a81b823c8e169ee5a4212070a9cc77dad27aa7b6 Mon Sep 17 00:00:00 2001 -From: Andreas Sturmlechner -Date: Tue, 7 Sep 2021 16:08:30 +0200 -Subject: [PATCH] Gentooify message about QtWebEngineWidgets - -Translations can not be provided for this. - -Signed-off-by: Andreas Sturmlechner ---- - processui/scripting.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/processui/scripting.cpp b/processui/scripting.cpp -index 2e95624..c69a123 100644 ---- a/processui/scripting.cpp -+++ b/processui/scripting.cpp -@@ -243,7 +243,7 @@ new QWebChannel(window.qt.webChannelTransport, function(channel) { - mScriptingHtmlDialog->webView()->load(fileName); - #else - QMessageBox::critical(this, i18n("QtWebEngineWidgets not available"), -- i18n("KSysGuard library was compiled without QtWebEngineWidgets, please contact your distribution.")); -+ QStringLiteral("kde-plasma/libksysguard was built without USE \"webengine\" by user choice, detailed memory information not available.")); - #endif - } - #if WEBENGINE_SCRIPTING_ENABLED --- -2.33.0 - diff --git a/kde-plasma/libksysguard/files/libksysguard-5.23.4-fix-segfault.patch b/kde-plasma/libksysguard/files/libksysguard-5.23.4-fix-segfault.patch new file mode 100644 index 000000000000..f37fbf60bf81 --- /dev/null +++ b/kde-plasma/libksysguard/files/libksysguard-5.23.4-fix-segfault.patch @@ -0,0 +1,76 @@ +From 311faef0ef0e5f60eebed2a5a00c43f5cb60aab1 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Tue, 7 Dec 2021 22:23:17 +0100 +Subject: [PATCH] Handle process parent changes in ProcessDataModel + +When the PPID of a process changes, it moves around in the model, changing the +layout. This needs to be announced properly, otherwise users of the model get +confused, leading to weird behaviour and crashes. + +The added code is pretty much a direct copy from ProcessModel. + +BUG: 446534 + + +(cherry picked from commit a0d70929a1b5e38bd8bf61e1895321124acf03a7) +--- + processcore/process_data_model.cpp | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/processcore/process_data_model.cpp b/processcore/process_data_model.cpp +index 172ce7f..f776372 100644 +--- a/processcore/process_data_model.cpp ++++ b/processcore/process_data_model.cpp +@@ -24,6 +24,8 @@ public: + Private(ProcessDataModel *q); + void beginInsertRow(KSysGuard::Process *parent); + void endInsertRow(); ++ void beginMoveProcess(KSysGuard::Process *process, KSysGuard::Process *new_parent); ++ void endMoveProcess(); + void beginRemoveRow(KSysGuard::Process *process); + void endRemoveRow(); + +@@ -65,6 +67,12 @@ ProcessDataModel::Private::Private(ProcessDataModel *_q) + connect(m_processes.get(), &KSysGuard::Processes::endAddProcess, q, [this]() { + endInsertRow(); + }); ++ connect(m_processes.get(), &KSysGuard::Processes::beginMoveProcess, q, [this](KSysGuard::Process *process, KSysGuard::Process *new_parent) { ++ beginMoveProcess(process, new_parent); ++ }); ++ connect(m_processes.get(), &KSysGuard::Processes::endMoveProcess, q, [this]() { ++ endMoveProcess(); ++ }); + connect(m_processes.get(), &KSysGuard::Processes::beginRemoveProcess, q, [this](KSysGuard::Process *process) { + beginRemoveRow(process); + }); +@@ -335,6 +343,27 @@ void ProcessDataModel::Private::endRemoveRow() + q->endRemoveRows(); + } + ++void ProcessDataModel::Private::beginMoveProcess(KSysGuard::Process *process, KSysGuard::Process *new_parent) ++{ ++ if (m_flatList) ++ return; // We don't need to move processes when in simple mode ++ ++ int current_row = process->parent()->children().indexOf(process); ++ Q_ASSERT(current_row != -1); ++ int new_row = new_parent->children().count(); ++ QModelIndex sourceParent = getQModelIndex(process->parent(), 0); ++ QModelIndex destinationParent = getQModelIndex(new_parent, 0); ++ q->beginMoveRows(sourceParent, current_row, current_row, destinationParent, new_row); ++} ++ ++void ProcessDataModel::Private::endMoveProcess() ++{ ++ if (m_flatList) ++ return; // We don't need to move processes when in simple mode ++ ++ q->endMoveRows(); ++} ++ + void ProcessDataModel::Private::update() + { + Processes::UpdateFlags flags; +-- +GitLab + -- cgit v1.2.3