summaryrefslogtreecommitdiff
path: root/packages/qte/qte-2.3.9-snapshot/qt-visibility.patch
blob: 449b5ae9ca75ffd0a6c95f713294ed3c8c057c84 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- qt-2.3.9-snapshot-20041212/configure~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/configure
@@ -409,6 +409,9 @@
    -tslib)
 	TSLIB=YES
 	;;
+   -visibility-hidden)
+   	VISIBILITY=YES
+	;;
    -no-g++-exceptions)
 	GPLUSPLUS_EXCEPTIONS=no
 	;;
@@ -1296,6 +1299,9 @@
     -tslib ............. Use the TSLib (touchscreen access library) mouse handler
                          by default, instead of the normal device default.
 
+    -visibility-hidden . Use -fvisibility=hidden as default. This requires GCC 4.0
+                         or a special patched GCC to support the visibility attribute
+
     -no-g++-exceptions . Disable exceptions on platforms using the GNU C++
 			 compiler by using the -fno-exceptions flag.
 
@@ -1366,6 +1372,11 @@
    QT_LIBS="${QT_LIBS} -lts"
 fi
 
+if [ "x$VISIBILITY=" = "xyes" ]
+then
+   QT_CXX="${QT_CXX} -DGCC_SUPPORTS_VISIBILITY -fvisibility=hidden"
+fi
+
 if [ "x$THREAD" = "xyes" ]
 then
    cat >src-mt.mk <<EOF
--- qt-2.3.9-snapshot-20041212/src/tools/qglobal.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/tools/qglobal.h
@@ -504,6 +504,12 @@
 #undef QT_DLL
 #endif
 
+#ifdef GCC_SUPPORTS_VISIBILITY
+#ifndef Q_EXPORT
+	#define Q_EXPORT __attribute__((visibility("default")))
+#endif
+#endif
+
 #ifndef Q_EXPORT
 #define Q_EXPORT
 #endif
--- qt-2.3.9-snapshot-20041212/src/widgets/qscrollview.cpp~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/widgets/qscrollview.cpp
@@ -696,7 +696,7 @@
   The surrounding environment (or application, if there is no
   environment, may set this. Requires Qt >= 2.3.8.
 */
-bool qt_left_hand_scrollbars = FALSE;
+bool Q_EXPORT qt_left_hand_scrollbars = FALSE;
 
 /*!
   Updates scrollbars - all possibilities considered.  You should never
--- qt-2.3.9-snapshot-20041212/src/Makefile.in~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/Makefile.in
@@ -641,7 +641,7 @@
 		network/qsocket.h \
 		network/qsocketdevice.h
 	echo '#include "kernel/qt.h"' >allmoc.cpp
-	$(CXX) -E -DQT_MOC_CPP $(CXXFLAGS) $(INCPATH) >allmoc.h allmoc.cpp
+	$(CXX) -E -DQT_MOC_CPP -DQ_EXPORT="" $(CXXFLAGS) $(INCPATH) >allmoc.h allmoc.cpp
 	$(MOC) -o allmoc.cpp allmoc.h
 	perl -pi -e 's{"allmoc.h"}{"kernel/qt.h"}' allmoc.cpp
 	rm allmoc.h
--- qt-2.3.9-snapshot-20041212/src/kernel/qcopchannel_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qcopchannel_qws.h
@@ -42,7 +42,7 @@
 class QCopChannelPrivate;
 class QWSClient;
 
-class QCopChannel : public QObject
+class Q_EXPORT QCopChannel : public QObject
 {
     Q_OBJECT
 public:
--- qt-2.3.9-snapshot-20041212/src/kernel/qfontmanager_qws.cpp~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qfontmanager_qws.cpp
@@ -68,7 +68,7 @@
     return r;
 }
 
-QFontManager * qt_fontmanager=0;
+QFontManager Q_EXPORT *qt_fontmanager=0;
 
 /*!
   \class QFontManager qfontmanager_qws.h
--- qt-2.3.9-snapshot-20041212/src/kernel/qgfx_qws.cpp~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qgfx_qws.cpp
@@ -38,10 +38,10 @@
 #include <stdlib.h>
 
 #ifndef QT_NO_QWS_CURSOR
-bool qt_sw_cursor=false;
-QScreenCursor * qt_screencursor=0;
+bool Q_EXPORT qt_sw_cursor=false;
+QScreenCursor Q_EXPORT * qt_screencursor=0;
 #endif
-QScreen * qt_screen=0;
+QScreen Q_EXPORT * qt_screen=0;
 
 extern bool qws_screen_is_interlaced; //### hack, from qapplication_qws.cpp
 
--- qt-2.3.9-snapshot-20041212/src/kernel/qwindowsystem_qws.cpp~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwindowsystem_qws.cpp
@@ -89,7 +89,7 @@
 
 extern void qt_setMaxWindowRect(const QRect& r);
 
-QWSServer *qwsServer=0;
+QWSServer Q_EXPORT *qwsServer=0;
 
 #define MOUSE 0
 #define KEY 1
--- qt-2.3.9-snapshot-20041212/src/kernel/qwsdecoration_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwsdecoration_qws.h
@@ -41,7 +41,7 @@
 /*
  Implements decoration styles
 */
-class QWSDecoration
+class Q_EXPORT QWSDecoration
 {
 public:
     QWSDecoration() {}
--- qt-2.3.9-snapshot-20041212/src/kernel/qwindowsystem_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwindowsystem_qws.h
@@ -67,7 +67,7 @@
 
 struct QWSWindowData;
 
-class QWSScreenSaver
+class Q_EXPORT QWSScreenSaver
 {
 public:
     virtual ~QWSScreenSaver();
@@ -75,7 +75,7 @@
     virtual bool save(int level)=0;
 };
 
-class QWSWindow
+class Q_EXPORT QWSWindow
 {
     friend class QWSServer;
 public:
@@ -169,9 +169,9 @@
 struct QWSCommandStruct;
 
 #ifndef QT_NO_QWS_MULTIPROCESS
-class QWSServer : public QWSServerSocket
+class Q_EXPORT QWSServer : public QWSServerSocket
 #else
-class QWSServer : public QObject
+class Q_EXPORT QWSServer : public QObject
 #endif
 {
     friend class QCopChannel;
@@ -501,7 +501,7 @@
 
 
 #ifndef QT_NO_QWS_IM
-class QWSInputMethod : public QObject
+class Q_EXPORT QWSInputMethod : public QObject
 {
 public:
     QWSInputMethod();
@@ -525,7 +525,7 @@
 #endif
 
 #ifndef QT_NO_QWS_FSIM
-class QWSGestureMethod : public QObject
+class Q_EXPORT QWSGestureMethod : public QObject
 {
 public:
     QWSGestureMethod();
@@ -573,7 +573,7 @@
 
 typedef QMap<int, QWSCursor*> QWSCursorMap;
 
-class QWSClient : public QObject
+class Q_EXPORT QWSClient : public QObject
 {
     Q_OBJECT
 public:
--- qt-2.3.9-snapshot-20041212/src/kernel/qwsdefaultdecoration_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwsdefaultdecoration_qws.h
@@ -44,7 +44,7 @@
 
 
 
-class QWSDefaultDecoration : public QWSDecoration
+class Q_EXPORT QWSDefaultDecoration : public QWSDecoration
 {
 public:
     QWSDefaultDecoration();
--- qt-2.3.9-snapshot-20041212/src/kernel/qwscommand_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwscommand_qws.h
@@ -47,8 +47,8 @@
  *
  *********************************************************************/
 #ifndef QT_NO_QWS_MULTIPROCESS
-void qws_write_command( QWSSocket *socket, int type, char *simpleData, int simpleLen, char *rawData, int rawLen );
-bool qws_read_command( QWSSocket *socket, char *&simpleData, int &simpleLen, char *&rawData, int &rawLen, int &bytesRead );
+void Q_EXPORT qws_write_command( QWSSocket *socket, int type, char *simpleData, int simpleLen, char *rawData, int rawLen );
+bool Q_EXPORT qws_read_command( QWSSocket *socket, char *&simpleData, int &simpleLen, char *&rawData, int &rawLen, int &bytesRead );
 #endif
 /*********************************************************************
  *
@@ -57,7 +57,7 @@
  *********************************************************************/
 
 
-struct QWSProtocolItem
+struct Q_EXPORT QWSProtocolItem
 {
     // ctor - dtor
     QWSProtocolItem( int t, int len, char *ptr ) : type( t ),
--- qt-2.3.9-snapshot-20041212/src/kernel/qfont_qws.cpp~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qfont_qws.cpp
@@ -152,7 +152,7 @@
 static QFontCache    *fontCache	     = 0;	// cache of loaded fonts
 static QFontDict     *fontDict	     = 0;	// dict of all loaded fonts
 
-void qws_clearLoadedFonts()
+void Q_EXPORT qws_clearLoadedFonts()
 {
     QFontDictIt it( *fontDict );
     while ( it.current() ) {
--- qt-2.3.9-snapshot-20041212/src/kernel/qwscursor_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwscursor_qws.h
@@ -37,7 +37,7 @@
 #include <qimage.h>
 #endif // QT_H
 
-class QWSCursor : public Qt
+class Q_EXPORT QWSCursor : public Qt
 {
 public:
     QWSCursor() {}
--- qt-2.3.9-snapshot-20041212/src/kernel/qwsevent_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwsevent_qws.h
@@ -40,7 +40,7 @@
 
 struct QWSMouseEvent;
 
-struct QWSEvent : QWSProtocolItem {
+struct Q_EXPORT QWSEvent : QWSProtocolItem {
 
     QWSEvent( int t, int len, char *ptr ) : QWSProtocolItem(t,len,ptr) {}
 
@@ -71,7 +71,7 @@
 
 //All events must start with windowID
 
-struct QWSConnectedEvent : QWSEvent {
+struct Q_EXPORT QWSConnectedEvent : QWSEvent {
     QWSConnectedEvent()
 	: QWSEvent( QWSEvent::Connected, sizeof( simpleData ),
 		(char*)&simpleData ) {}
@@ -90,7 +90,7 @@
     char *display;
 };
 
-struct QWSMaxWindowRectEvent : QWSEvent {
+struct Q_EXPORT QWSMaxWindowRectEvent : QWSEvent {
     QWSMaxWindowRectEvent()
 	: QWSEvent( MaxWindowRect, sizeof( simpleData ), (char*)&simpleData ) { }
     struct SimpleData {
@@ -99,7 +99,7 @@
     } simpleData;
 };
 
-struct QWSMouseEvent : QWSEvent {
+struct Q_EXPORT QWSMouseEvent : QWSEvent {
     QWSMouseEvent()
 	: QWSEvent( QWSEvent::Mouse, sizeof( simpleData ),
 		(char*)&simpleData ) {}
@@ -110,7 +110,7 @@
     } simpleData;
 };
 
-struct QWSFocusEvent : QWSEvent {
+struct Q_EXPORT QWSFocusEvent : QWSEvent {
     QWSFocusEvent()
 	: QWSEvent( QWSEvent::Focus, sizeof( simpleData ), (char*)&simpleData )
 	{ memset((char*)&simpleData,0,sizeof(simpleData)); }
@@ -120,7 +120,7 @@
     } simpleData;
 };
 
-struct QWSKeyEvent: QWSEvent {
+struct Q_EXPORT QWSKeyEvent: QWSEvent {
     QWSKeyEvent()
 	: QWSEvent( QWSEvent::Key, sizeof( simpleData ),
 	      (char*)&simpleData )
@@ -136,7 +136,7 @@
 };
 
 
-struct QWSCreationEvent : QWSEvent {
+struct Q_EXPORT QWSCreationEvent : QWSEvent {
     QWSCreationEvent()
 	: QWSEvent( QWSEvent::Creation, sizeof( simpleData ),
 	      (char*)&simpleData ) {}
@@ -146,7 +146,7 @@
 };
 
 #ifndef QT_NO_QWS_PROPERTIES
-struct QWSPropertyNotifyEvent : QWSEvent {
+struct Q_EXPORT QWSPropertyNotifyEvent : QWSEvent {
     QWSPropertyNotifyEvent()
 	: QWSEvent( QWSEvent::PropertyNotify, sizeof( simpleData ),
 	      (char*)&simpleData ) {}
@@ -162,7 +162,7 @@
 };
 #endif
 
-struct QWSSelectionClearEvent : QWSEvent {
+struct Q_EXPORT QWSSelectionClearEvent : QWSEvent {
     QWSSelectionClearEvent()
 	: QWSEvent( QWSEvent::SelectionClear, sizeof( simpleData ),
 	      (char*)&simpleData ) {}
@@ -171,7 +171,7 @@
     } simpleData;
 };
 
-struct QWSSelectionRequestEvent : QWSEvent {
+struct Q_EXPORT QWSSelectionRequestEvent : QWSEvent {
     QWSSelectionRequestEvent()
 	: QWSEvent( QWSEvent::SelectionRequest, sizeof( simpleData ),
 	      (char*)&simpleData ) {}
@@ -184,7 +184,7 @@
     } simpleData;
 };
 
-struct QWSSelectionNotifyEvent : QWSEvent {
+struct Q_EXPORT QWSSelectionNotifyEvent : QWSEvent {
     QWSSelectionNotifyEvent()
 	: QWSEvent( QWSEvent::SelectionNotify, sizeof( simpleData ),
 	      (char*)&simpleData ) {}
@@ -198,7 +198,7 @@
 
 //complex events:
 
-struct QWSRegionModifiedEvent : QWSEvent {
+struct Q_EXPORT QWSRegionModifiedEvent : QWSEvent {
     QWSRegionModifiedEvent()
 	: QWSEvent( QWSEvent::RegionModified, sizeof( simpleData ),
 		(char*)&simpleData )
@@ -218,7 +218,7 @@
     QRect *rectangles;
 };
 #ifndef QT_NO_QWS_PROPERTIES
-struct QWSPropertyReplyEvent : QWSEvent {
+struct Q_EXPORT QWSPropertyReplyEvent : QWSEvent {
     QWSPropertyReplyEvent()
 	: QWSEvent( QWSEvent::PropertyReply, sizeof( simpleData ),
 		(char*)&simpleData ) {}
@@ -238,7 +238,7 @@
 #endif //QT_NO_QWS_PROPERTIES
 
 #ifndef QT_NO_COP
-struct QWSQCopMessageEvent : QWSEvent {
+struct Q_EXPORT QWSQCopMessageEvent : QWSEvent {
     QWSQCopMessageEvent()
 	: QWSEvent( QWSEvent::QCopMessage, sizeof( simpleData ),
 		(char*)&simpleData )
@@ -268,7 +268,7 @@
 
 #endif
 
-struct QWSWindowOperationEvent : QWSEvent {
+struct Q_EXPORT QWSWindowOperationEvent : QWSEvent {
     QWSWindowOperationEvent()
 	: QWSEvent( WindowOperation, sizeof( simpleData ), (char*)&simpleData ) { }
 
@@ -280,7 +280,7 @@
 };
 
 #ifndef QT_NO_QWS_IM
-struct QWSIMEvent : QWSEvent {
+struct Q_EXPORT QWSIMEvent : QWSEvent {
     QWSIMEvent()
 	: QWSEvent( IMEvent, sizeof( simpleData ), (char*)&simpleData ) { }
 
--- qt-2.3.9-snapshot-20041212/src/kernel/qwsmanager_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwsmanager_qws.h
@@ -48,7 +48,7 @@
 class QWSButton;
 class QWSManager;
 
-class QWSManager : public QObject
+class Q_EXPORT QWSManager : public QObject
 {
     Q_OBJECT
 
--- qt-2.3.9-snapshot-20041212/src/kernel/qwsmouse_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwsmouse_qws.h
@@ -38,7 +38,7 @@
 #include <qpointarray.h>
 #endif // QT_H
 
-class QWSPointerCalibrationData
+class Q_EXPORT QWSPointerCalibrationData
 {
 public:
     enum Location { TopLeft = 0, BottomLeft = 1, BottomRight = 2, TopRight = 3,
@@ -47,7 +47,7 @@
     QPoint screenPoints[5];
 };
 
-class QWSMouseHandler : public QObject {
+class Q_EXPORT QWSMouseHandler : public QObject {
     Q_OBJECT
 public:
     QWSMouseHandler();
--- qt-2.3.9-snapshot-20041212/src/kernel/qwsproperty_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qwsproperty_qws.h
@@ -47,7 +47,7 @@
 
 class QWSPropertyManagerData;
 
-class QWSPropertyManager
+class Q_EXPORT QWSPropertyManager
 {
 public:
     enum Mode {
--- qt-2.3.9-snapshot-20041212/src/kernel/qlayoutengine.cpp~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041212/src/kernel/qlayoutengine.cpp
@@ -70,7 +70,7 @@
   pos and space give the interval (relative to parentWidget topLeft.)
 */
 
-void qGeomCalc( QArray<QLayoutStruct> &chain, int start, int count, int pos,
+void Q_EXPORT qGeomCalc( QArray<QLayoutStruct> &chain, int start, int count, int pos,
 		      int space, int spacer )
 {
     typedef int fixed;
--- qt-2.3.9-snapshot-20041229/src/kernel/qfontmanager_qws.h~qt-visibility.patch
+++ qt-2.3.9-snapshot-20041229/src/kernel/qfontmanager_qws.h
@@ -84,7 +84,7 @@
 // e.g. Truetype Times, 10 point. There's only one of these though;
 // we want to share generated glyphs
 
-class QRenderedFont {
+class Q_EXPORT QRenderedFont {
 
 public: