summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tqt3/parseFontName.diff
blob: 0c612e9be9e0b1fbb76e3621c79a630e559f9ced (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: src/kernel/qfontdatabase.cpp
===================================================================
--- src/kernel/qfontdatabase.cpp.orig
+++ src/kernel/qfontdatabase.cpp
@@ -2476,11 +2476,14 @@ void TQFontDatabase::parseFontName(const
 	int i = name.find('[');
 	int li = name.findRev(']');
 
-	if (i < li) {
+	if (i > 0 && i + 1 < li) {
 	    foundry = name.mid(i + 1, li - i - 1);
 	    if (name[i - 1] == ' ')
 		i--;
 	    family = name.left(i);
+	} else {
+	    foundry = TQString::null;
+	    family = name;
 	}
     } else {
 	foundry = TQString::null;