summaryrefslogtreecommitdiff
path: root/qt
authorsandman <sandman>2002-12-07 19:44:12 (UTC)
committer sandman <sandman>2002-12-07 19:44:12 (UTC)
commit600bd3f45862be08303398348cf1254dbcb4c27b (patch) (unidiff)
treeca38e7248aebe1219cbdaa7264a0fbf034e6430d /qt
parentf540fc3e9f1db3b37c0c70f445d74e586279c3a1 (diff)
downloadopie-600bd3f45862be08303398348cf1254dbcb4c27b.zip
opie-600bd3f45862be08303398348cf1254dbcb4c27b.tar.gz
opie-600bd3f45862be08303398348cf1254dbcb4c27b.tar.bz2
Patch for Qt/E to get rid of libpreload .. we mark the functions, that we
would have to preload as WEAK and provide non-weak versions in libqpe. We have to make sure that the original implementation is still reachable (private: *_NonWeak) by the overrides in libqpe
Diffstat (limited to 'qt') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qte234-for-opie091-override.patch178
1 files changed, 178 insertions, 0 deletions
diff --git a/qt/qte234-for-opie091-override.patch b/qt/qte234-for-opie091-override.patch
new file mode 100644
index 0000000..ebec3f3
--- a/dev/null
+++ b/qt/qte234-for-opie091-override.patch
@@ -0,0 +1,178 @@
1 --- ./src/kernel/qapplication.cpp.orig22002-12-07 17:38:53.000000000 +0100
2 +++ ./src/kernel/qapplication.cpp2002-12-07 18:21:21.000000000 +0100
3@@ -35,6 +35,8 @@
4 **
5 **********************************************************************/
6
7 +#define QT_WEAK_SYMBOL__attribute__(( weak ))
8+
9 #include "qobjectlist.h"
10 #include "qobjectdict.h"
11 #include "qapplication.h"
12@@ -933,6 +935,11 @@
13 #ifndef QT_NO_STYLE
14 void QApplication::setStyle( QStyle *style )
15 {
16 +setStyle_NonWeak ( style );
17+}
18+
19+void QApplication::setStyle_NonWeak( QStyle *style )
20+{
21 QStyle* old = app_style;
22
23 if ( startingUp() ) {
24@@ -1186,7 +1193,13 @@
25 \sa QWidget::setPalette(), palette(), QStyle::polish()
26 */
27
28-void QApplication::setPalette( const QPalette &palette, bool informWidgets,
29+void QApplication::setPalette ( const QPalette &palette, bool informWidgets,
30 + const char* className )
31+{
32 +setPalette_NonWeak ( palette, informWidgets, className );
33+}
34+
35+void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets,
36 const char* className )
37 {
38 QPalette pal = palette;
39@@ -1288,6 +1301,12 @@
40 void QApplication::setFont( const QFont &font, bool informWidgets,
41 const char* className )
42 {
43 +setFont_NonWeak ( font, informWidgets, className );
44+}
45+
46+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets,
47 + const char* className )
48+{
49 bool all = FALSE;
50 if ( !className ) {
51 if ( !app_font ) {
52 --- ./src/kernel/qapplication_qws.cpp.orig22002-12-07 17:41:46.000000000 +0100
53 +++ ./src/kernel/qapplication_qws.cpp2002-12-07 17:42:26.000000000 +0100
54@@ -2641,6 +2641,11 @@
55 */
56 void QApplication::qwsSetDecoration( QWSDecoration *d )
57 {
58 +qwsSetDecoration_NonWeak ( d );
59+}
60+
61+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d )
62+{
63 if ( d ) {
64 delete qws_decoration;
65 qws_decoration = d;
66 --- ./src/kernel/qapplication.h.orig22002-12-07 17:42:38.000000000 +0100
67 +++ ./src/kernel/qapplication.h2002-12-07 18:22:38.000000000 +0100
68@@ -61,6 +61,10 @@
69 class QSemaphore;
70 #endif
71
72+#if !defined( QT_WEAK_SYMBOL )
73+#define QT_WEAK_SYMBOL
74+#endif
75+
76 // REMOVE IN 3.0 (just here for moc source compatibility)
77 #define QNonBaseApplication QApplication
78
79@@ -85,7 +89,10 @@
80
81 #ifndef QT_NO_STYLE
82 static QStyle &style();
83 - static void setStyle( QStyle* );
84 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
85+private:
86 +static void setStyle_NonWeak( QStyle* );
87+public:
88 #endif
89 #if 1/* OBSOLETE */
90 enum ColorMode { NormalColors, CustomColors };
91@@ -106,11 +113,19 @@
92 #ifndef QT_NO_PALETTE
93 static QPalette palette( const QWidget* = 0 );
94 static void setPalette( const QPalette &, bool informWidgets=FALSE,
95 + const char* className = 0 ) QT_WEAK_SYMBOL;
96+private:
97 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
98 const char* className = 0 );
99+public:
100 #endif
101 static QFont font( const QWidget* = 0 );
102 static void setFont( const QFont &, bool informWidgets=FALSE,
103 + const char* className = 0 ) QT_WEAK_SYMBOL;
104+private:
105 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
106 const char* className = 0 );
107 +public:
108 static QFontMetrics fontMetrics();
109
110 QWidget *mainWidget() const;
111@@ -207,7 +222,10 @@
112 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
113 #ifndef QT_NO_QWS_MANAGER
114 static QWSDecoration &qwsDecoration();
115- static void qwsSetDecoration( QWSDecoration *);
116+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
117+private:
118+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
119+public:
120 #endif
121 #endif
122
123 --- ./src/kernel/qfontdatabase.h.orig22002-12-07 17:46:20.000000000 +0100
124 +++ ./src/kernel/qfontdatabase.h2002-12-07 18:23:22.000000000 +0100
125@@ -59,6 +59,10 @@
126 class QDiskFont;
127 #endif
128
129+#if !defined( QT_WEAK_SYMBOL )
130+#define QT_WEAK_SYMBOL
131+#endif
132+
133 class QFontDatabasePrivate;
134
135 class Q_EXPORT QFontDatabase
136@@ -67,9 +71,16 @@
137 QFontDatabase();
138
139 QStringList families( bool onlyForLocale = TRUE ) const;
140+
141+
142 QValueList<int> pointSizes( const QString &family,
143 const QString &style = QString::null,
144 - const QString &charSet = QString::null );
145 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
146+private:
147+ QValueList<int> pointSizes_NonWeak( const QString &family,
148 + const QString &style,
149 + const QString &charSet );
150+public:
151 QStringList styles( const QString &family,
152 const QString &charSet = QString::null ) const;
153 QStringList charSets( const QString &familyName,
154 --- ./src/kernel/qfontdatabase.cpp.orig22002-12-07 17:46:24.000000000 +0100
155 +++ ./src/kernel/qfontdatabase.cpp2002-12-07 18:22:53.000000000 +0100
156@@ -35,6 +35,8 @@
157 **
158 **********************************************************************/
159
160+#define QT_WEAK_SYMBOL __attribute__(( weak ))
161+
162 #include "qfontdatabase.h"
163
164 #ifndef QT_NO_FONTDATABASE
165@@ -2424,6 +2426,13 @@
166 const QString &style,
167 const QString &charSet )
168 {
169 +return pointSizes_NonWeak ( family, style, charSet );
170+}
171+
172+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family,
173+ const QString &style,
174+ const QString &charSet )
175+{
176 QString cs( charSet );
177 if ( charSet.isEmpty() ) {
178 QStringList lst = charSets( family );