public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/
@ 2017-12-03 12:34 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2017-12-03 12:34 UTC (permalink / raw
  To: gentoo-commits

commit:     5a107eef27605e919f62c306d1f1755fc81ab304
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  3 12:24:34 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Dec  3 12:34:25 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a107eef

kde-frameworks/kio: Fix build with Qt-5.7.1

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 kde-frameworks/kio/files/kio-5.40.0-mkpath-qt-5.9.3.patch | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kde-frameworks/kio/files/kio-5.40.0-mkpath-qt-5.9.3.patch b/kde-frameworks/kio/files/kio-5.40.0-mkpath-qt-5.9.3.patch
index d9cf7402741..503a8c77378 100644
--- a/kde-frameworks/kio/files/kio-5.40.0-mkpath-qt-5.9.3.patch
+++ b/kde-frameworks/kio/files/kio-5.40.0-mkpath-qt-5.9.3.patch
@@ -21,6 +21,8 @@ Reviewers: #frameworks, dfaure
 Tags: #frameworks
 
 Differential Revision: https://phabricator.kde.org/D8836
+
+* asturm: Fix build with Qt-5.7.1
 ---
  src/core/mkpathjob.cpp | 17 ++++++++++++++---
  1 file changed, 14 insertions(+), 3 deletions(-)
@@ -37,7 +39,7 @@ index bff46ca..a177805 100644
 -                m_url.setPath(m_url.path() + '/' + m_pathComponents.at(i));
 +            const QString pathComponent = m_pathComponents.at(i);
 +            if (pathComponent == basePathComponents.at(i)) {
-+                if (m_url.path() == QLatin1Char('/')) {
++                if (m_url.path() == QLatin1String("/")) {
 +                    m_url.setPath(m_url.path() + pathComponent);
 +                } else {
 +                    m_url.setPath(m_url.path() + '/' + pathComponent);
@@ -52,7 +54,7 @@ index bff46ca..a177805 100644
 -                QString testDir = m_url.toLocalFile() + '/' + m_pathComponents.at(i);
 +                const QString localFile = m_url.toLocalFile();
 +                QString testDir;
-+                if (localFile == QLatin1Char('/')) {
++                if (localFile == QLatin1String("/")) {
 +                    testDir = localFile + m_pathComponents.at(i);
 +                } else {
 +                    testDir = localFile + '/' + m_pathComponents.at(i);


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/
@ 2019-02-09  9:52 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2019-02-09  9:52 UTC (permalink / raw
  To: gentoo-commits

commit:     f1b70227b021d0f56aeb6b477dffafe00baaa588
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Fri Feb  8 16:00:49 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Feb  9 09:52:00 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1b70227

kde-frameworks/kio: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-frameworks/kio/files/kio-5.52.0-sendfile.patch | 109 ---------------------
 1 file changed, 109 deletions(-)

diff --git a/kde-frameworks/kio/files/kio-5.52.0-sendfile.patch b/kde-frameworks/kio/files/kio-5.52.0-sendfile.patch
deleted file mode 100644
index d02b8f50b19..00000000000
--- a/kde-frameworks/kio/files/kio-5.52.0-sendfile.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 31980ecd1cacac9bd75ce35e3048946e1c27e1a0 Mon Sep 17 00:00:00 2001
-From: David Edmundson <kde@davidedmundson.co.uk>
-Date: Wed, 21 Nov 2018 15:30:48 +0000
-Subject: Restore sendfile support
-
-Summary:
-Somehow in the kdelibs -> framework port the cmake checks for
-HAVE_SENDFILE got lost.
-
-That re-enables a massive optimisation in the file kioslave that has all the code existing and used in kdelibs4 that we're currently missing.
-
-Test Plan:
-Put a compilation fail inside the #ifdef, before it wasn't triggered, now it is.
-
-Ran unit tests
-Moved a file in dolphin
-
-Reviewers: dfaure
-
-Reviewed By: dfaure
-
-Subscribers: ngraham, apol, kde-frameworks-devel
-
-Tags: #frameworks
-
-Differential Revision: https://phabricator.kde.org/D17048
----
- src/ioslaves/file/ConfigureChecks.cmake        | 1 +
- src/ioslaves/file/config-kioslave-file.h.cmake | 2 ++
- src/ioslaves/file/file_unix.cpp                | 2 +-
- 3 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/ioslaves/file/ConfigureChecks.cmake b/src/ioslaves/file/ConfigureChecks.cmake
-index 5a83d1b..39fcd6f 100644
---- a/src/ioslaves/file/ConfigureChecks.cmake
-+++ b/src/ioslaves/file/ConfigureChecks.cmake
-@@ -7,6 +7,7 @@ include(CheckStructHasMember)
- check_include_files(sys/time.h    HAVE_SYS_TIME_H)
- check_include_files(string.h      HAVE_STRING_H)
- check_include_files(limits.h      HAVE_LIMITS_H)
-+check_function_exists(sendfile    HAVE_SENDFILE)
- 
- check_function_exists(posix_fadvise    HAVE_FADVISE)                  # kioslave
- 
-diff --git a/src/ioslaves/file/config-kioslave-file.h.cmake b/src/ioslaves/file/config-kioslave-file.h.cmake
-index e47fdb2..3df7ebd 100644
---- a/src/ioslaves/file/config-kioslave-file.h.cmake
-+++ b/src/ioslaves/file/config-kioslave-file.h.cmake
-@@ -13,3 +13,5 @@
- /* Defined if system has extended file attributes support. */
- #cmakedefine01 HAVE_SYS_XATTR_H
- 
-+/* Defined if system has the sendfile function. */
-+#cmakedefine01 HAVE_SENDFILE
-diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
-index 817cce8..34422e5 100644
---- a/src/ioslaves/file/file_unix.cpp
-+++ b/src/ioslaves/file/file_unix.cpp
-@@ -49,7 +49,7 @@
- #include "fdreceiver.h"
- 
- //sendfile has different semantics in different platforms
--#if defined HAVE_SENDFILE && defined Q_OS_LINUX
-+#if HAVE_SENDFILE && defined Q_OS_LINUX
- #define USE_SENDFILE 1
- #endif
- 
--- 
-cgit v0.11.2
-From 8f926e4596221b11e62c7ac80bb5864d3d8cf4f6 Mon Sep 17 00:00:00 2001
-From: David Edmundson <kde@davidedmundson.co.uk>
-Date: Wed, 21 Nov 2018 15:30:53 +0000
-Subject: Use correct variable type for returned value from read/sendfile
-
-Summary:
-n stores the read/transferred bytes. This returns a ssize_t.
-We were casting to an int, which theoretically is a loss of data.
-
-In practice it isn't an issue as we only read a max of MAX_IPC_SIZE at a
-time, which would fit in an int.
-
-Reviewers: apol
-
-Reviewed By: apol
-
-Subscribers: kde-frameworks-devel
-
-Tags: #frameworks
-
-Differential Revision: https://phabricator.kde.org/D17051
----
- src/ioslaves/file/file_unix.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
-index 34422e5..7ed0ae8 100644
---- a/src/ioslaves/file/file_unix.cpp
-+++ b/src/ioslaves/file/file_unix.cpp
-@@ -251,7 +251,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl,
- 
-     KIO::filesize_t processed_size = 0;
-     char buffer[ MAX_IPC_SIZE ];
--    int n;
-+    ssize_t n = 0;
- #ifdef USE_SENDFILE
-     bool use_sendfile = buff_src.st_size < 0x7FFFFFFF;
- #endif
--- 
-cgit v0.11.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/
@ 2022-07-19 15:42 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2022-07-19 15:42 UTC (permalink / raw
  To: gentoo-commits

commit:     34ae246216b53543b8bf7ca1e8255275f00736e1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 19 15:41:37 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jul 19 15:41:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34ae2462

kde-frameworks/kio/files: Drop obsolete patches

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-filewidgets-update-filename-after-rename.patch | 76 ----------------------
 .../kio-5.95.0-fix-recent-files-in-gtk-apps.patch  | 25 -------
 2 files changed, 101 deletions(-)

diff --git a/kde-frameworks/kio/files/kio-5.95.0-filewidgets-update-filename-after-rename.patch b/kde-frameworks/kio/files/kio-5.95.0-filewidgets-update-filename-after-rename.patch
deleted file mode 100644
index 5cf7b9f2fb45..000000000000
--- a/kde-frameworks/kio/files/kio-5.95.0-filewidgets-update-filename-after-rename.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 6d47b5869d4b328614e5e95e97ef66d97009295e Mon Sep 17 00:00:00 2001
-From: Fushan Wen <qydwhotmail@gmail.com>
-Date: Wed, 15 Jun 2022 22:03:27 +0800
-Subject: [PATCH] filewidgets: update location text after selected files are
- renamed
-
-Before this commit, the location text is not updated after the selected
-files are renamed.
-
-BUG: 455327
----
- src/filewidgets/kdiroperator.cpp | 3 ++-
- src/filewidgets/kdiroperator.h   | 9 +++++++++
- src/filewidgets/kfilewidget.cpp  | 4 ++++
- 3 files changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/src/filewidgets/kdiroperator.cpp b/src/filewidgets/kdiroperator.cpp
-index c7a1c9350..adacfda60 100644
---- a/src/filewidgets/kdiroperator.cpp
-+++ b/src/filewidgets/kdiroperator.cpp
-@@ -889,8 +889,9 @@ void KDirOperator::renameSelected()
-     }
- 
-     KIO::RenameFileDialog *dialog = new KIO::RenameFileDialog(items, this);
--    connect(dialog, &KIO::RenameFileDialog::renamingFinished, this, [this]() {
-+    connect(dialog, &KIO::RenameFileDialog::renamingFinished, this, [this](const QList<QUrl> &urls) {
-         d->assureVisibleSelection();
-+        Q_EMIT renamingFinished(urls);
-     });
- 
-     dialog->open();
-diff --git a/src/filewidgets/kdiroperator.h b/src/filewidgets/kdiroperator.h
-index cb9668fb7..a15e90765 100644
---- a/src/filewidgets/kdiroperator.h
-+++ b/src/filewidgets/kdiroperator.h
-@@ -824,6 +824,7 @@ public Q_SLOTS:
-     /**
-      * Initiates a rename operation on the currently selected files/directories,
-      * prompting the user to choose a new name(s) for the currently selected items
-+     * @see renamingFinished
-      * @since 5.67
-      */
-     void renameSelected();
-@@ -991,6 +992,14 @@ Q_SIGNALS:
-      */
-     void keyEnterReturnPressed();
- 
-+    /**
-+     * Emitted when renaming selected files has finished.
-+     *
-+     * @param urls URL list of the renamed files
-+     * @since 5.96
-+     */
-+    void renamingFinished(const QList<QUrl> &urls);
-+
- private:
-     friend class KDirOperatorPrivate;
-     std::unique_ptr<KDirOperatorPrivate> d;
-diff --git a/src/filewidgets/kfilewidget.cpp b/src/filewidgets/kfilewidget.cpp
-index 943c0cd93..d0825dfaa 100644
---- a/src/filewidgets/kfilewidget.cpp
-+++ b/src/filewidgets/kfilewidget.cpp
-@@ -1185,6 +1185,10 @@ void KFileWidgetPrivate::initDirOpWidgets()
-     q->connect(m_ops, &KDirOperator::keyEnterReturnPressed, q, [this]() {
-         slotViewKeyEnterReturnPressed();
-     });
-+    q->connect(m_ops, &KDirOperator::renamingFinished, q, [this](const QList<QUrl> &urls) {
-+        // Update file names in location text field after renaming selected files
-+        q->setSelectedUrls(urls);
-+    });
- 
-     m_ops->dirLister()->setAutoErrorHandlingEnabled(false);
-     q->connect(m_ops->dirLister(), &KDirLister::jobError, q, [this](KIO::Job *job) {
--- 
-GitLab
-

diff --git a/kde-frameworks/kio/files/kio-5.95.0-fix-recent-files-in-gtk-apps.patch b/kde-frameworks/kio/files/kio-5.95.0-fix-recent-files-in-gtk-apps.patch
deleted file mode 100644
index 524fdc871fc8..000000000000
--- a/kde-frameworks/kio/files/kio-5.95.0-fix-recent-files-in-gtk-apps.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 0dd0e96c10f634974c63f85c2068e44019c27591 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?M=C3=A9ven=20Car?= <meven@kdemail.net>
-Date: Wed, 29 Jun 2022 10:14:50 +0200
-Subject: [PATCH] KRecentDocuments: Improve indentation in recentlyused.xbel
-
-BUG: 456046
----
- src/core/krecentdocument.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/core/krecentdocument.cpp b/src/core/krecentdocument.cpp
-index 23fcbbd09..87d276b06 100644
---- a/src/core/krecentdocument.cpp
-+++ b/src/core/krecentdocument.cpp
-@@ -270,6 +270,7 @@ static bool addToXbel(const QUrl &url, const QString &desktopEntryName, KRecentD
- 
-     if (!foundExisting) {
-         // must create new bookmark tag
-+        output.writeCharacters(QStringLiteral("  "));
-         output.writeStartElement(bookmarkTag);
- 
-         output.writeAttribute(hrefAttribute, newUrl);
--- 
-GitLab
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/
@ 2023-12-24 23:01 Conrad Kostecki
  0 siblings, 0 replies; 5+ messages in thread
From: Conrad Kostecki @ 2023-12-24 23:01 UTC (permalink / raw
  To: gentoo-commits

commit:     495090c937243531fafd2659693c5891e62333ce
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Dec  1 15:10:24 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 22:59:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=495090c9

kde-frameworks/kio: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 kde-frameworks/kio/files/kio-5.110.0-crash.patch | 28 ------------------------
 1 file changed, 28 deletions(-)

diff --git a/kde-frameworks/kio/files/kio-5.110.0-crash.patch b/kde-frameworks/kio/files/kio-5.110.0-crash.patch
deleted file mode 100644
index dcda1cfe06f5..000000000000
--- a/kde-frameworks/kio/files/kio-5.110.0-crash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 48322f44323a1fc09305d66d9093fe6c3780709e Mon Sep 17 00:00:00 2001
-From: Kevin Ottens <kevin.ottens@enioka.com>
-Date: Fri, 15 Sep 2023 09:45:58 +0200
-Subject: [PATCH] Don't crash if KMountPoint gives nothing back while checking
- for CIFS
-
-BUG: 474451
----
- src/ioslaves/file/file_unix.cpp | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
-index 87c47e7e74..c0bc64354d 100644
---- a/src/ioslaves/file/file_unix.cpp
-+++ b/src/ioslaves/file/file_unix.cpp
-@@ -328,6 +328,9 @@ inline static time_t stat_mtime(const QT_STATBUF &buf)
- static bool isOnCifsMount(const QString &filePath)
- {
-     const auto mount = KMountPoint::currentMountPoints().findByPath(filePath);
-+    if (!mount) {
-+        return false;
-+    }
-     return mount->mountType() == QStringLiteral("cifs") || mount->mountType() == QStringLiteral("smb3");
- }
- 
--- 
-GitLab
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/
@ 2024-03-05  9:18 Petr Vaněk
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Vaněk @ 2024-03-05  9:18 UTC (permalink / raw
  To: gentoo-commits

commit:     f89039e34565b3ea6170d8abe8f0439d93f6307e
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Mar  4 18:22:00 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Tue Mar  5 09:17:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f89039e3

kde-frameworks/kio: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 .../kio-5.113.0-fix-crash-malformed-exec.patch     |  41 -----
 .../kio-5.113.0-fix-crash-while-copying.patch      | 184 ---------------------
 2 files changed, 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);
- 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-05  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05  9:18 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/ Petr Vaněk
  -- strict thread matches above, loose matches on Subject: below --
2023-12-24 23:01 Conrad Kostecki
2022-07-19 15:42 Andreas Sturmlechner
2019-02-09  9:52 Andreas Sturmlechner
2017-12-03 12:34 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox