summaryrefslogtreecommitdiff
path: root/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff
blob: 338478b6dd9db8ef9496a63bf303f74a2bf754db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
qt-bugs@ issue : 197621
Trolltech task ID : 197836
bugs.kde.org number : none
applied: no
author: Montel Laurent <montel@kde.org>

This patch fixes crashs in q3stylesheet (it was possible to
use a qfont size < 1)
Bug reported to TT with this patch. 

--- a/src/qt3support/text/q3stylesheet.cpp
+++ b/src/qt3support/text/q3stylesheet.cpp
@@ -1463,9 +1463,9 @@
         s = baseSize;
     }
     if (pixel)
-        font.setPixelSize(s);
+        font.setPixelSize(qMax(1,s));
     else
-        font.setPointSize(s);
+        font.setPointSize(qMax(1,s));
 }
 
 QT_END_NAMESPACE