0.7.1
This commit is contained in:
parent
2ba070ab59
commit
71a3d8a9d5
@ -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()));
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
Name: qgnomeplatform
|
||||
Version: 0.7.0
|
||||
Release: 3%{?dist}
|
||||
Version: 0.7.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Qt Platform Theme aimed to accommodate Gnome settings
|
||||
|
||||
License: LGPLv2+
|
||||
@ -9,7 +9,6 @@ URL: https://github.com/MartinBriza/QGnomePlatform
|
||||
Source0: https://github.com/MartinBriza/QGnomePlatform/archive/%{version}/QGnomePlatform-%{version}.tar.gz
|
||||
|
||||
# Upstream patches
|
||||
Patch0: qgnomeplatform-qxdgdesktopfiledialog-fixes.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig(gio-2.0)
|
||||
@ -57,6 +56,9 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
|
||||
%{_qt5_libdir}/qt5/plugins/wayland-decoration-client/libqgnomeplatformdecoration.so
|
||||
|
||||
%changelog
|
||||
* Thu Apr 08 2021 Jan Grulich <jgrulich@redhat.com> - 0.7.1-1
|
||||
- 0.7.1
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user