summaryrefslogtreecommitdiff
path: root/qt/qt-2.3.8.patch/qte238-allowoverride.patch
Unidiff
Diffstat (limited to 'qt/qt-2.3.8.patch/qte238-allowoverride.patch') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qt-2.3.8.patch/qte238-allowoverride.patch231
1 files changed, 231 insertions, 0 deletions
diff --git a/qt/qt-2.3.8.patch/qte238-allowoverride.patch b/qt/qt-2.3.8.patch/qte238-allowoverride.patch
new file mode 100644
index 0000000..8a63710
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-allowoverride.patch
@@ -0,0 +1,231 @@
1Qt2.3.5 -> Qt2.3.6 changed the meaning of point sizes they used
2to be multiplied with 10, some apps get confused by that and
3in Opie we allow to work around for specefic application
4
5Courtsey to Robert 'sandman' Griebl
6
7
8
9
10
11
12
13
14diff -ur qt-2.3.8-old/src/kernel/qapplication.cpp qt-2.3.8/src/kernel/qapplication.cpp
15 --- qt-2.3.8-old/src/kernel/qapplication.cpp2004-07-22 01:07:46.000000000 +0200
16 +++ qt-2.3.8/src/kernel/qapplication.cpp2004-07-23 19:08:46.000000000 +0200
17@@ -35,6 +35,8 @@
18 **
19 **********************************************************************/
20
21 +#define QT_WEAK_SYMBOL__attribute__(( weak ))
22+
23 #include "qobjectlist.h"
24 #include "qobjectdict.h"
25 #include "qapplication.h"
26@@ -936,11 +938,16 @@
27 #ifndef QT_NO_STYLE
28 void QApplication::setStyle( QStyle *style )
29 {
30 +setStyle_NonWeak ( style );
31+}
32+
33+void QApplication::setStyle_NonWeak( QStyle *style )
34+{
35 QStyle* old = app_style;
36- app_style = style;
37
38 if ( startingUp() ) {
39 delete old;
40 +app_style = style;
41 return;
42 }
43
44@@ -961,6 +968,8 @@
45 old->unPolish( qApp );
46 }
47
48+ app_style = style;
49+
50 // take care of possible palette requirements of certain gui
51 // styles. Do it before polishing the application since the style
52 // might call QApplication::setStyle() itself
53@@ -1187,13 +1196,30 @@
54 \sa QWidget::setPalette(), palette(), QStyle::polish()
55 */
56
57-void QApplication::setPalette( const QPalette &palette, bool informWidgets,
58+void QApplication::setPalette ( const QPalette &palette, bool informWidgets,
59 + const char* className )
60+{
61 +setPalette_NonWeak ( palette, informWidgets, className );
62+}
63+
64+void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets,
65 const char* className )
66 {
67 QPalette pal = palette;
68 #ifndef QT_NO_STYLE
69- if ( !startingUp() )
70+ if ( !startingUp() ) {
71 qApp->style().polish( pal );// NB: non-const reference
72 +if ( className ) {
73 + // if we just polished a class specific palette (this normally
74 + // only called by qt_fix_tooltips - see below), we better re-
75 + // polish the global palette. Some styles like liquid can get
76 + // confused, because they can not detect if the polished palette
77 + // is the global one or only a class specific one.
78 + // (liquid uses this palette to calculate blending pixmaps)
79 + QPalette p = qApp-> palette ( );
80 + qApp->style().polish ( p );
81 +}
82+ }
83 #endif
84 bool all = FALSE;
85 if ( !className ) {
86@@ -1278,6 +1304,12 @@
87 void QApplication::setFont( const QFont &font, bool informWidgets,
88 const char* className )
89 {
90 +setFont_NonWeak ( font, informWidgets, className );
91+}
92+
93+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets,
94 + const char* className )
95+{
96 bool all = FALSE;
97 if ( !className ) {
98 if ( !app_font ) {
99Nur in qt-2.3.8/src/kernel/: qapplication.cpp.orig.
100diff -ur qt-2.3.8-old/src/kernel/qapplication.h qt-2.3.8/src/kernel/qapplication.h
101 --- qt-2.3.8-old/src/kernel/qapplication.h2004-07-22 01:07:45.000000000 +0200
102 +++ qt-2.3.8/src/kernel/qapplication.h2004-07-23 19:08:46.000000000 +0200
103@@ -61,6 +61,10 @@
104 class QSemaphore;
105 #endif
106
107+#if !defined( QT_WEAK_SYMBOL )
108+#define QT_WEAK_SYMBOL
109+#endif
110+
111 // REMOVE IN 3.0 (just here for moc source compatibility)
112 #define QNonBaseApplication QApplication
113
114@@ -85,7 +89,10 @@
115
116 #ifndef QT_NO_STYLE
117 static QStyle &style();
118 - static void setStyle( QStyle* );
119 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
120+private:
121 +static void setStyle_NonWeak( QStyle* );
122+public:
123 #endif
124 #if 1/* OBSOLETE */
125 enum ColorMode { NormalColors, CustomColors };
126@@ -106,11 +113,19 @@
127 #ifndef QT_NO_PALETTE
128 static QPalette palette( const QWidget* = 0 );
129 static void setPalette( const QPalette &, bool informWidgets=FALSE,
130 + const char* className = 0 ) QT_WEAK_SYMBOL;
131+private:
132 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
133 const char* className = 0 );
134+public:
135 #endif
136 static QFont font( const QWidget* = 0 );
137 static void setFont( const QFont &, bool informWidgets=FALSE,
138 + const char* className = 0 ) QT_WEAK_SYMBOL;
139+private:
140 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
141 const char* className = 0 );
142 +public:
143 static QFontMetrics fontMetrics();
144
145 QWidget *mainWidget() const;
146@@ -207,7 +222,10 @@
147 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
148 #ifndef QT_NO_QWS_MANAGER
149 static QWSDecoration &qwsDecoration();
150- static void qwsSetDecoration( QWSDecoration *);
151+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
152+private:
153+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
154+public:
155 #endif
156 #endif
157
158diff -ur qt-2.3.8-old/src/kernel/qapplication_qws.cpp qt-2.3.8/src/kernel/qapplication_qws.cpp
159 --- qt-2.3.8-old/src/kernel/qapplication_qws.cpp2004-07-22 01:07:45.000000000 +0200
160 +++ qt-2.3.8/src/kernel/qapplication_qws.cpp2004-07-23 19:08:46.000000000 +0200
161@@ -2896,6 +2896,11 @@
162 */
163 void QApplication::qwsSetDecoration( QWSDecoration *d )
164 {
165 +qwsSetDecoration_NonWeak ( d );
166+}
167+
168+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d )
169+{
170 if ( d ) {
171 delete qws_decoration;
172 qws_decoration = d;
173Nur in qt-2.3.8/src/kernel/: qapplication_qws.cpp.orig.
174diff -ur qt-2.3.8-old/src/kernel/qfontdatabase.cpp qt-2.3.8/src/kernel/qfontdatabase.cpp
175 --- qt-2.3.8-old/src/kernel/qfontdatabase.cpp2004-07-22 01:07:45.000000000 +0200
176 +++ qt-2.3.8/src/kernel/qfontdatabase.cpp2004-07-23 19:08:46.000000000 +0200
177@@ -35,6 +35,8 @@
178 **
179 **********************************************************************/
180
181+#define QT_WEAK_SYMBOL __attribute__(( weak ))
182+
183 #include "qfontdatabase.h"
184
185 #ifndef QT_NO_FONTDATABASE
186@@ -2424,6 +2426,13 @@
187 const QString &style,
188 const QString &charSet )
189 {
190 +return pointSizes_NonWeak ( family, style, charSet );
191+}
192+
193+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family,
194+ const QString &style,
195+ const QString &charSet )
196+{
197 QString cs( charSet );
198 if ( charSet.isEmpty() ) {
199 QStringList lst = charSets( family );
200diff -ur qt-2.3.8-old/src/kernel/qfontdatabase.h qt-2.3.8/src/kernel/qfontdatabase.h
201 --- qt-2.3.8-old/src/kernel/qfontdatabase.h2004-07-22 01:07:45.000000000 +0200
202 +++ qt-2.3.8/src/kernel/qfontdatabase.h2004-07-23 19:08:46.000000000 +0200
203@@ -59,6 +59,10 @@
204 class QDiskFont;
205 #endif
206
207+#if !defined( QT_WEAK_SYMBOL )
208+#define QT_WEAK_SYMBOL
209+#endif
210+
211 class QFontDatabasePrivate;
212
213 class Q_EXPORT QFontDatabase
214@@ -67,9 +71,16 @@
215 QFontDatabase();
216
217 QStringList families( bool onlyForLocale = TRUE ) const;
218+
219+
220 QValueList<int> pointSizes( const QString &family,
221 const QString &style = QString::null,
222 - const QString &charSet = QString::null );
223 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
224+private:
225+ QValueList<int> pointSizes_NonWeak( const QString &family,
226 + const QString &style,
227 + const QString &charSet );
228+public:
229 QStringList styles( const QString &family,
230 const QString &charSet = QString::null ) const;
231 QStringList charSets( const QString &familyName,