summaryrefslogtreecommitdiff
path: root/qt/qt-2.3.7.patch/qte237-allowoverride.patch
Unidiff
Diffstat (limited to 'qt/qt-2.3.7.patch/qte237-allowoverride.patch') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qt-2.3.7.patch/qte237-allowoverride.patch229
1 files changed, 0 insertions, 229 deletions
diff --git a/qt/qt-2.3.7.patch/qte237-allowoverride.patch b/qt/qt-2.3.7.patch/qte237-allowoverride.patch
deleted file mode 100644
index e0629f6..0000000
--- a/qt/qt-2.3.7.patch/qte237-allowoverride.patch
+++ b/dev/null
@@ -1,229 +0,0 @@
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.7-old/src/kernel/qapplication.cpp qt-2.3.7/src/kernel/qapplication.cpp
15 --- qt-2.3.7-old/src/kernel/qapplication.cpp2004-07-23 15:22:56.000000000 +0200
16 +++ qt-2.3.7/src/kernel/qapplication.cpp2004-07-23 15:25:42.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@@ -933,11 +935,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@@ -958,6 +965,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@@ -1184,13 +1193,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@@ -1275,6 +1301,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 ) {
99diff -ur qt-2.3.7-old/src/kernel/qapplication.h qt-2.3.7/src/kernel/qapplication.h
100 --- qt-2.3.7-old/src/kernel/qapplication.h2004-07-23 15:22:56.000000000 +0200
101 +++ qt-2.3.7/src/kernel/qapplication.h2004-07-23 15:25:42.000000000 +0200
102@@ -61,6 +61,10 @@
103 class QSemaphore;
104 #endif
105
106+#if !defined( QT_WEAK_SYMBOL )
107+#define QT_WEAK_SYMBOL
108+#endif
109+
110 // REMOVE IN 3.0 (just here for moc source compatibility)
111 #define QNonBaseApplication QApplication
112
113@@ -85,7 +89,10 @@
114
115 #ifndef QT_NO_STYLE
116 static QStyle &style();
117 - static void setStyle( QStyle* );
118 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
119+private:
120 +static void setStyle_NonWeak( QStyle* );
121+public:
122 #endif
123 #if 1/* OBSOLETE */
124 enum ColorMode { NormalColors, CustomColors };
125@@ -106,11 +113,19 @@
126 #ifndef QT_NO_PALETTE
127 static QPalette palette( const QWidget* = 0 );
128 static void setPalette( const QPalette &, bool informWidgets=FALSE,
129 + const char* className = 0 ) QT_WEAK_SYMBOL;
130+private:
131 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
132 const char* className = 0 );
133+public:
134 #endif
135 static QFont font( const QWidget* = 0 );
136 static void setFont( const QFont &, bool informWidgets=FALSE,
137 + const char* className = 0 ) QT_WEAK_SYMBOL;
138+private:
139 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
140 const char* className = 0 );
141 +public:
142 static QFontMetrics fontMetrics();
143
144 QWidget *mainWidget() const;
145@@ -207,7 +222,10 @@
146 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
147 #ifndef QT_NO_QWS_MANAGER
148 static QWSDecoration &qwsDecoration();
149- static void qwsSetDecoration( QWSDecoration *);
150+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
151+private:
152+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
153+public:
154 #endif
155 #endif
156
157diff -ur qt-2.3.7-old/src/kernel/qapplication_qws.cpp qt-2.3.7/src/kernel/qapplication_qws.cpp
158 --- qt-2.3.7-old/src/kernel/qapplication_qws.cpp2004-07-23 15:22:56.000000000 +0200
159 +++ qt-2.3.7/src/kernel/qapplication_qws.cpp2004-07-23 15:25:42.000000000 +0200
160@@ -2804,6 +2804,11 @@
161 */
162 void QApplication::qwsSetDecoration( QWSDecoration *d )
163 {
164 +qwsSetDecoration_NonWeak ( d );
165+}
166+
167+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d )
168+{
169 if ( d ) {
170 delete qws_decoration;
171 qws_decoration = d;
172diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.cpp qt-2.3.7/src/kernel/qfontdatabase.cpp
173 --- qt-2.3.7-old/src/kernel/qfontdatabase.cpp2004-07-23 15:22:56.000000000 +0200
174 +++ qt-2.3.7/src/kernel/qfontdatabase.cpp2004-07-23 15:25:42.000000000 +0200
175@@ -35,6 +35,8 @@
176 **
177 **********************************************************************/
178
179+#define QT_WEAK_SYMBOL __attribute__(( weak ))
180+
181 #include "qfontdatabase.h"
182
183 #ifndef QT_NO_FONTDATABASE
184@@ -2424,6 +2426,13 @@
185 const QString &style,
186 const QString &charSet )
187 {
188 +return pointSizes_NonWeak ( family, style, charSet );
189+}
190+
191+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family,
192+ const QString &style,
193+ const QString &charSet )
194+{
195 QString cs( charSet );
196 if ( charSet.isEmpty() ) {
197 QStringList lst = charSets( family );
198diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.h qt-2.3.7/src/kernel/qfontdatabase.h
199 --- qt-2.3.7-old/src/kernel/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200
200 +++ qt-2.3.7/src/kernel/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200
201@@ -59,6 +59,10 @@
202 class QDiskFont;
203 #endif
204
205+#if !defined( QT_WEAK_SYMBOL )
206+#define QT_WEAK_SYMBOL
207+#endif
208+
209 class QFontDatabasePrivate;
210
211 class Q_EXPORT QFontDatabase
212@@ -67,9 +71,16 @@
213 QFontDatabase();
214
215 QStringList families( bool onlyForLocale = TRUE ) const;
216+
217+
218 QValueList<int> pointSizes( const QString &family,
219 const QString &style = QString::null,
220 - const QString &charSet = QString::null );
221 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
222+private:
223+ QValueList<int> pointSizes_NonWeak( const QString &family,
224 + const QString &style,
225 + const QString &charSet );
226+public:
227 QStringList styles( const QString &family,
228 const QString &charSet = QString::null ) const;
229 QStringList charSets( const QString &familyName,