From 5cbfe51f81939d89f7deabc91abf7ed3d211f360 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 28 Jan 2018 07:22:26 -0600 Subject: [PATCH] QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream (fdo#101667,kde#382437) --- qt5-qtbase.spec | 13 ++++++++++++- qtbase-fdo101667.patch | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 qtbase-fdo101667.patch diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index b7638e9..7f1075b 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -51,7 +51,7 @@ BuildRequires: pkgconfig(libsystemd) Name: qt5-qtbase Summary: Qt5 - QtBase components Version: 5.10.0 -Release: 2%{?dist} +Release: 3%{?dist} # See LGPL_EXCEPTIONS.txt, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -93,6 +93,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 @@ -345,6 +352,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 %patch64 -p1 -b .firebird %if 0%{?fedora} > 27 @@ -975,6 +983,9 @@ fi %changelog +* Sun Jan 28 2018 Rex Dieter - 5.10.0-3 +- QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream (fdo#101667,kde#382437) + * Fri Jan 26 2018 Rex Dieter - 5.10.0-2 - re-enable gold linker (#1458003) - drop qt5_null_flag/qt5_deprecated_flag hacks (should be fixed upstream for awhile) diff --git a/qtbase-fdo101667.patch b/qtbase-fdo101667.patch new file mode 100644 index 0000000..69c6cc4 --- /dev/null +++ b/qtbase-fdo101667.patch @@ -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); + }