summaryrefslogtreecommitdiff
path: root/debian/patches/0233-fix-q3textbrowser-image.diff
blob: 70e9bae93db38456ff416402ff09de0fb440d4ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
qt-bugs@ issue : N217218
Trolltech task ID : 217145 (Status: closed; Version fix: 4.4.2)
applied: yes
author: TT :) (bug reported by Laurent Montel montel@kde.org and patch provides by TT

In qt4.4.x there is a regression in Q3TextBrowser it can load an image.

--- a/src/qt3support/other/q3mimefactory.cpp	2008-06-25 14:30:02 -0000
+++ b/src/qt3support/other/q3mimefactory.cpp	2008-06-25 14:30:02 -0000

@@ -152,9 +152,8 @@
         QByteArray mimetype("application/octet-stream");
         if (extensions.contains(e))
             mimetype = extensions[e].latin1();
-        QByteArray imgfmt = QImageReader::imageFormat(abs_name);
-        if (!imgfmt.isEmpty())
-            mimetype = "image/" + imgfmt.toLower();
+        if (!QImageReader::imageFormat(abs_name).isEmpty())
+            mimetype = "application/x-qt-image";
 
         QFile f(abs_name);
         if (f.open(QIODevice::ReadOnly) && f.size()) {