diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2024-03-04 19:22:00 +0100 |
---|---|---|
committer | Petr Vaněk <arkamar@gentoo.org> | 2024-03-05 10:17:07 +0100 |
commit | f89039e34565b3ea6170d8abe8f0439d93f6307e (patch) | |
tree | 5be8698ece1ab460423562daaa744dddea6c63ad /kde-frameworks | |
parent | kde-frameworks/breeze-icons: remove unused patch(es) (diff) | |
download | gentoo-f89039e34565b3ea6170d8abe8f0439d93f6307e.tar.gz gentoo-f89039e34565b3ea6170d8abe8f0439d93f6307e.tar.bz2 gentoo-f89039e34565b3ea6170d8abe8f0439d93f6307e.zip |
kde-frameworks/kio: remove unused patch(es)
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r-- | kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch | 41 | ||||
-rw-r--r-- | kde-frameworks/kio/files/kio-5.113.0-fix-crash-while-copying.patch | 184 |
2 files changed, 0 insertions, 225 deletions
diff --git a/kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch b/kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch deleted file mode 100644 index 3688fa4af276..000000000000 --- a/kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch +++ /dev/null @@ -1,41 +0,0 @@ -From ebad60218b9d9e6901ae48c3dec9b90da963809c Mon Sep 17 00:00:00 2001 -From: Harald Sitter <sitter@kde.org> -Date: Wed, 13 Dec 2023 07:44:01 +0100 -Subject: [PATCH] kpropertiesdialog: don't trip over malformed Exec - -when the user incorrectly put env vars into the Program field the -resulting desktop file will be somewhat malformed and literally contain - -> Exec='FOO=1 Bar' - -this then needs careful handling when parsing so we don't accidentally -drain the execline list. when this scenario appears we'll need to assume -the last item in the list is the program as we can't really tell if it -is a program that looks like an env var or an env var without program - -BUG: 465290 -(cherry picked from commit 78d4364677fbe658c6e05d19bb158f895403ccc9) ---- - src/widgets/kpropertiesdialog.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/widgets/kpropertiesdialog.cpp b/src/widgets/kpropertiesdialog.cpp -index 93ec0759cf..25061825af 100644 ---- a/src/widgets/kpropertiesdialog.cpp -+++ b/src/widgets/kpropertiesdialog.cpp -@@ -3379,6 +3379,12 @@ KDesktopPropsPlugin::KDesktopPropsPlugin(KPropertiesDialog *_props) - execLine.pop_front(); - } - for (auto env : execLine) { -+ if (execLine.length() <= 1) { -+ // Don't empty out the list. If the last element contains an equal sign we have to treat it as part of the -+ // program name lest we have no program -+ // https://bugs.kde.org/show_bug.cgi?id=465290 -+ break; -+ } - if (!env.contains(QLatin1String("="))) { - break; - } --- -GitLab - diff --git a/kde-frameworks/kio/files/kio-5.113.0-fix-crash-while-copying.patch b/kde-frameworks/kio/files/kio-5.113.0-fix-crash-while-copying.patch deleted file mode 100644 index 845e6bc64339..000000000000 --- a/kde-frameworks/kio/files/kio-5.113.0-fix-crash-while-copying.patch +++ /dev/null @@ -1,184 +0,0 @@ -From 6bea074739d5a75920d5540bc266549df5642511 Mon Sep 17 00:00:00 2001 -From: Akseli Lahtinen <akselmo@akselmo.dev> -Date: Fri, 1 Dec 2023 11:27:26 +0000 -Subject: [PATCH] WidgetsAskUserActionHandler: Use QPointer to check the - validity of parent widgets - -If Dolphin is closed during the copying process, -and the overwrite/skip dialog appears, -this crashes the copying process since the -parent shows to faulty location. - -Use QPointer to check that the parent widgets are still -valid. If not, we just use nullptr, and the dialogs -will still open. - -This also cleans some repetition in code. - -BUG:448532 -(cherry picked from commit bdef648edd54e146c30e881d8eb95990a59c5bbc) ---- - src/widgets/widgetsaskuseractionhandler.cpp | 90 +++++++++------------ - 1 file changed, 39 insertions(+), 51 deletions(-) - -diff --git a/src/widgets/widgetsaskuseractionhandler.cpp b/src/widgets/widgetsaskuseractionhandler.cpp -index fe2975d0ce..9cbaaec99f 100644 ---- a/src/widgets/widgetsaskuseractionhandler.cpp -+++ b/src/widgets/widgetsaskuseractionhandler.cpp -@@ -22,6 +22,7 @@ - - #include <QApplication> - #include <QDialogButtonBox> -+#include <QPointer> - #include <QRegularExpression> - #include <QUrl> - -@@ -40,7 +41,10 @@ - void savePersistentUserReply(KIO::AskUserActionInterface::MessageDialogType type, KConfigGroup &cg, const QString &dontAskAgainName, int result); - - WidgetsAskUserActionHandler *const q; -- QWidget *m_parentWidget = nullptr; -+ QPointer<QWidget> m_parentWidget = nullptr; -+ -+ QWidget *getParentWidget(KJob *job); -+ QWidget *getParentWidget(QWidget *widget); - }; - - bool KIO::WidgetsAskUserActionHandlerPrivate::gotPersistentUserReply(KIO::AskUserActionInterface::MessageDialogType type, -@@ -106,6 +110,36 @@ - } - } - -+QWidget *KIO::WidgetsAskUserActionHandlerPrivate::getParentWidget(KJob *job) -+{ -+ // This needs to be in qpointer, otherwise copying process -+ // will crash if done in background and dolphin is closed -+ QPointer<QWidget> parentWidget = nullptr; -+ -+ if (job) { -+ parentWidget = KJobWidgets::window(job); -+ } -+ -+ return getParentWidget(parentWidget); -+} -+ -+QWidget *KIO::WidgetsAskUserActionHandlerPrivate::getParentWidget(QWidget *widget) -+{ -+ // This needs to be in qpointer, otherwise copying process -+ // will crash if done in background and dolphin is closed -+ QPointer<QWidget> parentWidget = widget; -+ -+ if (!parentWidget) { -+ parentWidget = this->m_parentWidget; -+ } -+ -+ if (!parentWidget) { -+ parentWidget = qApp->activeWindow(); -+ } -+ -+ return parentWidget; -+} -+ - KIO::WidgetsAskUserActionHandler::WidgetsAskUserActionHandler(QObject *parent) - : KIO::AskUserActionInterface(parent) - , d(new WidgetsAskUserActionHandlerPrivate(this)) -@@ -128,22 +162,8 @@ - const QDateTime &mtimeSrc, - const QDateTime &mtimeDest) - { -- QWidget *parentWidget = nullptr; -- -- if (job) { -- parentWidget = KJobWidgets::window(job); -- } -- -- if (!parentWidget) { -- parentWidget = d->m_parentWidget; -- } -- -- if (!parentWidget) { -- parentWidget = qApp->activeWindow(); -- } -- - QMetaObject::invokeMethod(qGuiApp, [=] { -- auto *dlg = new KIO::RenameDialog(parentWidget, title, src, dest, options, sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest); -+ auto *dlg = new KIO::RenameDialog(d->getParentWidget(job), title, src, dest, options, sizeSrc, sizeDest, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest); - - dlg->setAttribute(Qt::WA_DeleteOnClose); - dlg->setWindowModality(Qt::WindowModal); -@@ -161,22 +181,8 @@ - - void KIO::WidgetsAskUserActionHandler::askUserSkip(KJob *job, KIO::SkipDialog_Options options, const QString &errorText) - { -- QWidget *parentWidget = nullptr; -- -- if (job) { -- parentWidget = KJobWidgets::window(job); -- } -- -- if (!parentWidget) { -- parentWidget = d->m_parentWidget; -- } -- -- if (!parentWidget) { -- parentWidget = qApp->activeWindow(); -- } -- - QMetaObject::invokeMethod(qGuiApp, [=] { -- auto *dlg = new KIO::SkipDialog(parentWidget, options, errorText); -+ auto *dlg = new KIO::SkipDialog(d->getParentWidget(job), options, errorText); - dlg->setAttribute(Qt::WA_DeleteOnClose); - dlg->setWindowModality(Qt::WindowModal); - -@@ -373,16 +379,6 @@ - return; - } - -- QWidget *parentWidget = parent; -- -- if (!parentWidget) { -- parentWidget = d->m_parentWidget; -- } -- -- if (!parentWidget) { -- parentWidget = qApp->activeWindow(); -- } -- - const KGuiItem primaryActionButton(primaryActionText, primaryActionIconName); - const KGuiItem secondaryActionButton(secondaryActionText, secondaryActionIconName); - -@@ -412,7 +408,7 @@ - hasCancelButton = true; - break; - case AskUserActionInterface::SSLMessageBox: -- d->sslMessageBox(text, metaData, parentWidget); -+ d->sslMessageBox(text, metaData, d->getParentWidget(parent)); - return; - case AskUserActionInterface::Information: - dlgType = KMessageDialog::Information; -@@ -442,7 +438,7 @@ - - QMetaObject::invokeMethod(qGuiApp, [=]() { - auto cancelButton = hasCancelButton ? KStandardGuiItem::cancel() : KGuiItem(); -- auto *dialog = new KMessageDialog(dlgType, text, parentWidget); -+ auto *dialog = new KMessageDialog(dlgType, text, d->getParentWidget(parent)); - - dialog->setAttribute(Qt::WA_DeleteOnClose); - dialog->setCaption(title); -@@ -492,15 +488,7 @@ - - void KIO::WidgetsAskUserActionHandlerPrivate::sslMessageBox(const QString &text, const KIO::MetaData &metaData, QWidget *parent) - { -- QWidget *parentWidget = parent; -- -- if (!parentWidget) { -- parentWidget = m_parentWidget; -- } -- -- if (!parentWidget) { -- parentWidget = qApp->activeWindow(); -- } -+ QWidget *parentWidget = getParentWidget(parent); - - const QStringList sslList = metaData.value(QStringLiteral("ssl_peer_chain")).split(QLatin1Char('\x01'), Qt::SkipEmptyParts); - |