diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-07-17 19:04:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-07-17 19:04:28 +0100 |
commit | 514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (patch) | |
tree | 555c194dbeb0fb2ac4ad3cde7c0f6a80fd330ce2 /kde-frameworks/kio/files | |
parent | 4df3bf9762850b34cd1ead5c80374d1a0fc3362e (diff) |
gentoo resync : 17.07.2021
Diffstat (limited to 'kde-frameworks/kio/files')
-rw-r--r-- | kde-frameworks/kio/files/kio-5.84.0-cxx17-std-mem_fn.patch | 31 | ||||
-rw-r--r-- | kde-frameworks/kio/files/kio-5.84.0-fix-open-url-w-binary.patch | 53 |
2 files changed, 84 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.84.0-cxx17-std-mem_fn.patch b/kde-frameworks/kio/files/kio-5.84.0-cxx17-std-mem_fn.patch new file mode 100644 index 000000000000..26383b788a01 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.84.0-cxx17-std-mem_fn.patch @@ -0,0 +1,31 @@ +From 36f1814b184f4d5ac628fca5db5f6cc1440b4db7 Mon Sep 17 00:00:00 2001 +From: Jan Paul Batrina <jpmbatrina01@gmail.com> +Date: Mon, 12 Jul 2021 22:06:19 +0800 +Subject: [PATCH] Use std::mem_fn instead of the deprecated/removed + std::mem_fun + +std::mem_fun was deprecated in C++11 and removed from +the standard in C++17. + +BUG: 439780 +NO_CHANGELOG +--- + src/widgets/kpropertiesdialog.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/widgets/kpropertiesdialog.cpp b/src/widgets/kpropertiesdialog.cpp +index 3f61e8ea3..1ed8bc7d8 100644 +--- a/src/widgets/kpropertiesdialog.cpp ++++ b/src/widgets/kpropertiesdialog.cpp +@@ -2273,7 +2273,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() + d->fileSystemSupportsACLs = fileSystemSupportsACL(path); + } + if (d->fileSystemSupportsACLs) { +- std::for_each(theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun(&QWidget::hide)); ++ std::for_each(theNotSpecials.begin(), theNotSpecials.end(), std::mem_fn(&QWidget::hide)); + extendedACLs = new KACLEditWidget(&dlg); + extendedACLs->setEnabled(d->canChangePermissions); + vbox->addWidget(extendedACLs); +-- +GitLab + diff --git a/kde-frameworks/kio/files/kio-5.84.0-fix-open-url-w-binary.patch b/kde-frameworks/kio/files/kio-5.84.0-fix-open-url-w-binary.patch new file mode 100644 index 000000000000..cdccada57d97 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.84.0-fix-open-url-w-binary.patch @@ -0,0 +1,53 @@ +From 8ad6921524c92a0cf1b58336b3ce29e159e83b7d Mon Sep 17 00:00:00 2001 +From: David Edmundson <kde@davidedmundson.co.uk> +Date: Wed, 14 Jul 2021 17:06:59 +0100 +Subject: [PATCH] Fix selecting binaries from component chooser KCM + +In the kcmshell for a component chooser we use the open with dialog to +select services for various scheme handlers. + +If you select a binary instead of a .desktop file a temporary .desktop +file is created in ~/.local/share/applications + +This is in the format +Exec=someBinary +MimeType=x-scheme-handler/http + +When we then use this application for launching KIO::DesktopExecParser +then (sort of correctly) determines that that the chosen service cannot +handle the http scheme because even though it is a scheme handler it +does not have a "%u" in the exec line. + +This leads to us potentially loading websites via kioclient or kio-fuse. + +Testing done: + - kcmshell5 component chooser + - web browser -> other -> type "/usr/bin/firefox" + - kde-open5 http://kde.org + - Previously this gave a local URL, now it is correct +--- + src/widgets/kopenwithdialog.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/widgets/kopenwithdialog.cpp b/src/widgets/kopenwithdialog.cpp +index 1831878ca..31295044d 100644 +--- a/src/widgets/kopenwithdialog.cpp ++++ b/src/widgets/kopenwithdialog.cpp +@@ -1088,6 +1088,14 @@ bool KOpenWithDialogPrivate::checkAccept() + KConfigGroup cg = desktopFile.desktopGroup(); + cg.writeEntry("Type", "Application"); + cg.writeEntry("Name", initialServiceName); ++ ++ // if we select a binary for a scheme handler, then it's safe to assume it can handle URLs ++ if (qMimeType.startsWith(QLatin1String("x-scheme-handler/"))) { ++ if (!typedExec.contains(QLatin1String("%u"), Qt::CaseInsensitive) && !typedExec.contains(QLatin1String("%f"), Qt::CaseInsensitive)) { ++ fullExec += QStringLiteral(" %u"); ++ } ++ } ++ + cg.writeEntry("Exec", fullExec); + cg.writeEntry("NoDisplay", true); // don't make it appear in the K menu + if (terminal->isChecked()) { +-- +GitLab + |