summaryrefslogtreecommitdiff
path: root/x11-themes/QGnomePlatform/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
commit908778078736bd36f7a60a2d576d415cb8e000fa (patch)
treec6a4796c48b608c14dc7e9674cdbd38f905e3c15 /x11-themes/QGnomePlatform/files
parent185fa19bbf68a4d4dca534d2b46729207a177f16 (diff)
gentoo resync : 22.05.2021
Diffstat (limited to 'x11-themes/QGnomePlatform/files')
-rw-r--r--x11-themes/QGnomePlatform/files/QGnomePlatform-0.7.0-qxdgdesktopfiledialog-fixes.patch63
1 files changed, 0 insertions, 63 deletions
diff --git a/x11-themes/QGnomePlatform/files/QGnomePlatform-0.7.0-qxdgdesktopfiledialog-fixes.patch b/x11-themes/QGnomePlatform/files/QGnomePlatform-0.7.0-qxdgdesktopfiledialog-fixes.patch
deleted file mode 100644
index db43a69d0b17..000000000000
--- a/x11-themes/QGnomePlatform/files/QGnomePlatform-0.7.0-qxdgdesktopfiledialog-fixes.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From e244e003b68f660dbb0795d18ad70e8a11689712 Mon Sep 17 00:00:00 2001
-From: Jan Grulich <jgrulich@redhat.com>
-Date: Mon, 4 Jan 2021 11:43:36 +0100
-Subject: QXdgDesktopPortalFileDialog: backport upstream fixes
-
-
-diff --git a/common/qxdgdesktopportalfiledialog.cpp b/common/qxdgdesktopportalfiledialog.cpp
-index 7502a6e..c4dc2da 100644
---- a/common/qxdgdesktopportalfiledialog.cpp
-+++ b/common/qxdgdesktopportalfiledialog.cpp
-@@ -210,7 +210,7 @@ void QXdgDesktopPortalFileDialog::openPortal()
- qDBusRegisterMetaType<FilterList>();
-
- FilterList filterList;
-- Filter* selectedFilter = nullptr;
-+ auto selectedFilterIndex = filterList.size() - 1;
-
- d->userVisibleToNameFilter.clear();
-
-@@ -236,7 +236,7 @@ void QXdgDesktopPortalFileDialog::openPortal()
- filterList << filter;
-
- if (!d->selectedMimeTypeFilter.isEmpty() && d->selectedMimeTypeFilter == mimeTypefilter)
-- selectedFilter = &filterList.last();
-+ selectedFilterIndex = filterList.size() - 1;
- }
- } else if (!d->nameFilters.isEmpty()) {
- for (const QString &nameFilter : d->nameFilters) {
-@@ -246,7 +246,12 @@ void QXdgDesktopPortalFileDialog::openPortal()
- QRegularExpressionMatch match = regexp.match(nameFilter);
- if (match.hasMatch()) {
- QString userVisibleName = match.captured(1);
-- QStringList filterStrings = match.captured(2).split(QLatin1Char(' '), QString::SkipEmptyParts);
-+ QStringList filterStrings = match.captured(2).split(QLatin1Char(' '), Qt::SkipEmptyParts);
-+
-+ if (filterStrings.isEmpty()) {
-+ qWarning() << "Filter " << userVisibleName << " is empty and will be ignored.";
-+ continue;
-+ }
-
- FilterConditionList filterConditions;
- for (const QString &filterString : filterStrings) {
-@@ -265,7 +270,7 @@ void QXdgDesktopPortalFileDialog::openPortal()
- d->userVisibleToNameFilter.insert(userVisibleName, nameFilter);
-
- if (!d->selectedNameFilter.isEmpty() && d->selectedNameFilter == nameFilter)
-- selectedFilter = &filterList.last();
-+ selectedFilterIndex = filterList.size() - 1;
- }
- }
- }
-@@ -273,9 +278,8 @@ void QXdgDesktopPortalFileDialog::openPortal()
- if (!filterList.isEmpty())
- options.insert(QLatin1String("filters"), QVariant::fromValue(filterList));
-
-- if (selectedFilter) {
-- options.insert(QLatin1String("current_filter"), QVariant::fromValue(*selectedFilter));
-- }
-+ if (selectedFilterIndex != -1)
-+ options.insert(QLatin1String("current_filter"), QVariant::fromValue(filterList[selectedFilterIndex]));
-
- options.insert(QLatin1String("handle_token"), QStringLiteral("qt%1").arg(QRandomGenerator::global()->generate()));
-