summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2018-01-28 10:53:02 +0100
committerDavid Faure <david.faure@kdab.com>2018-01-28 19:13:28 +0000
commit2b7de16fbe399daa00986f2d32d05cfe51966b66 (patch)
treefce00a4cef665f832b278822a565fbbf446450fe /src/corelib/mimetypes
parent08559d2b77c5a65a656c4de19c551fd2b291952c (diff)
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 Change-Id: I125a0bc72c91a082706bf2bf149adcf63ff1ec6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/mimetypes')
-rw-r--r--src/corelib/mimetypes/qmimetype.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp
index 8f6237c1cb..d7590ecf1f 100644
--- a/src/corelib/mimetypes/qmimetype.cpp
+++ b/src/corelib/mimetypes/qmimetype.cpp
@@ -466,6 +466,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);
}