QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream (fdo#101667,kde#382437)

This commit is contained in:
Rex Dieter 2018-01-28 07:22:26 -06:00
parent ef0f887e51
commit 51f0f46cf3
2 changed files with 24 additions and 1 deletions

View File

@ -55,7 +55,7 @@ BuildRequires: pkgconfig(libsystemd)
Name: qt5-qtbase
Summary: Qt5 - QtBase components
Version: 5.9.4
Release: 1%{?dist}
Release: 2%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -97,6 +97,13 @@ Patch51: qtbase-hidpi_scale_at_192.patch
# 2. Workaround sysmacros.h (pre)defining major/minor a breaking stuff
Patch52: qtbase-opensource-src-5.7.1-moc_macros.patch
# QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream
# This leads to an automatically appended .bin when saving a file.
# https://bugs.freedesktop.org/show_bug.cgi?id=101667
# https://bugs.kde.org/382437
# Fixed upstream in shared-mime-info 1.10
Patch53: qtbase-fdo101667.patch
# drop -O3 and make -O2 by default
Patch61: qt5-qtbase-cxxflag.patch
@ -350,6 +357,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
%patch50 -p1 -b .QT_VERSION_CHECK
%patch51 -p1 -b .hidpi_scale_at_192
%patch52 -p1 -b .moc_macros
%patch53 -p1 -b .fdo101667
%patch61 -p1 -b .qt5-qtbase-cxxflag
%if 0%{?openssl11}
%patch63 -p1 -b .openssl11
@ -977,6 +985,9 @@ fi
%changelog
* Sun Jan 28 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.9.4-2
- QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream (fdo#101667,kde#382437)
* Tue Jan 23 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.9.4-1
- 5.9.4

12
qtbase-fdo101667.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp.fdo101667 qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp
--- qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp.fdo101667 2018-01-16 00:53:43.000000000 -0600
+++ qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp 2018-01-28 07:18:09.502534397 -0600
@@ -418,6 +418,8 @@ QStringList QMimeType::suffixes() const
*/
QString QMimeType::preferredSuffix() const
{
+ if (isDefault()) // workaround for unwanted *.bin suffix for octet-stream, https://bugs.freedesktop.org/show_bug.cgi?id=101667, fixed upstream in 1.10
+ return QString();
const QStringList suffixList = suffixes();
return suffixList.isEmpty() ? QString() : suffixList.at(0);
}