]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/qte/qte-2.3.10/qt-visibility.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / qte / qte-2.3.10 / qt-visibility.patch
1
2 #
3 # Patch managed by http://www.holgerschurig.de/patcher.html
4 #
5
6 --- qt-2.3.9-snapshot-20050114/configure~qt-visibility
7 +++ qt-2.3.9-snapshot-20050114/configure
8 @@ -409,6 +409,9 @@
9     -tslib)
10         TSLIB=yes
11         ;;
12 +   -visibility-hidden)
13 +       VISIBILITY=YES
14 +       ;;
15     -no-g++-exceptions)
16         GPLUSPLUS_EXCEPTIONS=no
17         ;;
18 @@ -1296,6 +1299,9 @@
19      -tslib ............. Enable TSlib (touchscreen library) mouse handler.
20                           See http://arm.linux.org.uk                         
21  
22 +    -visibility-hidden . Use -fvisibility=hidden as default. This requires GCC 4.0
23 +                         or a special patched GCC to support the visibility attribute
24 +
25      -no-g++-exceptions . Disable exceptions on platforms using the GNU C++
26                          compiler by using the -fno-exceptions flag.
27  
28 @@ -1364,6 +1370,10 @@
29     QT_CXX="${QT_CXX} -DQT_QWS_TSLIB"
30     QT_LIBS="${QT_LIBS} -lts"
31  fi
32 +if [ "x$VISIBILITY=" = "xyes" ]
33 +then
34 +   QT_CXX="${QT_CXX} -DGCC_SUPPORTS_VISIBILITY -fvisibility=hidden"
35 +fi
36  if [ "x$THREAD" = "xyes" ]
37  then
38     cat >src-mt.mk <<EOF
39 --- qt-2.3.9-snapshot-20050114/src/tools/qglobal.h~qt-visibility
40 +++ qt-2.3.9-snapshot-20050114/src/tools/qglobal.h
41 @@ -503,6 +503,12 @@
42  #undef QT_DLL
43  #endif
44  
45 +#ifdef GCC_SUPPORTS_VISIBILITY
46 +#ifndef Q_EXPORT
47 +       #define Q_EXPORT __attribute__((visibility("default")))
48 +#endif
49 +#endif
50 +
51  #ifndef Q_EXPORT
52  #define Q_EXPORT
53  #endif
54 --- qt-2.3.9-snapshot-20050114/src/widgets/qscrollview.cpp~qt-visibility
55 +++ qt-2.3.9-snapshot-20050114/src/widgets/qscrollview.cpp
56 @@ -696,7 +696,7 @@
57    The surrounding environment (or application, if there is no
58    environment, may set this. Requires Qt >= 2.3.8.
59  */
60 -bool qt_left_hand_scrollbars = FALSE;
61 +bool Q_EXPORT qt_left_hand_scrollbars = FALSE;
62  
63  /*!
64    Updates scrollbars - all possibilities considered.  You should never
65 --- qt-2.3.9-snapshot-20050114/src/Makefile.in~qt-visibility
66 +++ qt-2.3.9-snapshot-20050114/src/Makefile.in
67 @@ -641,7 +641,7 @@
68                 network/qsocket.h \
69                 network/qsocketdevice.h
70         echo '#include "kernel/qt.h"' >allmoc.cpp
71 -       $(CXX) -E -DQT_MOC_CPP $(CXXFLAGS) $(INCPATH) >allmoc.h allmoc.cpp
72 +       $(CXX) -E -DQT_MOC_CPP -DQ_EXPORT="" $(CXXFLAGS) $(INCPATH) >allmoc.h allmoc.cpp
73         $(MOC) -o allmoc.cpp allmoc.h
74         perl -pi -e 's{"allmoc.h"}{"kernel/qt.h"}' allmoc.cpp
75         rm allmoc.h
76 --- qt-2.3.9-snapshot-20050114/src/kernel/qcopchannel_qws.h~qt-visibility
77 +++ qt-2.3.9-snapshot-20050114/src/kernel/qcopchannel_qws.h
78 @@ -42,7 +42,7 @@
79  class QCopChannelPrivate;
80  class QWSClient;
81  
82 -class QCopChannel : public QObject
83 +class Q_EXPORT QCopChannel : public QObject
84  {
85      Q_OBJECT
86  public:
87 --- qt-2.3.9-snapshot-20050114/src/kernel/qfontmanager_qws.cpp~qt-visibility
88 +++ qt-2.3.9-snapshot-20050114/src/kernel/qfontmanager_qws.cpp
89 @@ -68,7 +68,7 @@
90      return r;
91  }
92  
93 -QFontManager * qt_fontmanager=0;
94 +QFontManager Q_EXPORT *qt_fontmanager=0;
95  
96  /*!
97    \class QFontManager qfontmanager_qws.h
98 --- qt-2.3.9-snapshot-20050114/src/kernel/qgfx_qws.cpp~qt-visibility
99 +++ qt-2.3.9-snapshot-20050114/src/kernel/qgfx_qws.cpp
100 @@ -38,10 +38,10 @@
101  #include <stdlib.h>
102  
103  #ifndef QT_NO_QWS_CURSOR
104 -bool qt_sw_cursor=false;
105 -QScreenCursor * qt_screencursor=0;
106 +bool Q_EXPORT qt_sw_cursor=false;
107 +QScreenCursor Q_EXPORT * qt_screencursor=0;
108  #endif
109 -QScreen * qt_screen=0;
110 +QScreen Q_EXPORT * qt_screen=0;
111  
112  extern bool qws_screen_is_interlaced; //### hack, from qapplication_qws.cpp
113  
114 --- qt-2.3.9-snapshot-20050114/src/kernel/qwindowsystem_qws.cpp~qt-visibility
115 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwindowsystem_qws.cpp
116 @@ -89,7 +89,7 @@
117  
118  extern void qt_setMaxWindowRect(const QRect& r);
119  
120 -QWSServer *qwsServer=0;
121 +QWSServer Q_EXPORT *qwsServer=0;
122  
123  #define MOUSE 0
124  #define KEY 1
125 --- qt-2.3.9-snapshot-20050114/src/kernel/qwsdecoration_qws.h~qt-visibility
126 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwsdecoration_qws.h
127 @@ -41,7 +41,7 @@
128  /*
129   Implements decoration styles
130  */
131 -class QWSDecoration
132 +class Q_EXPORT QWSDecoration
133  {
134  public:
135      QWSDecoration() {}
136 --- qt-2.3.9-snapshot-20050114/src/kernel/qwindowsystem_qws.h~qt-visibility
137 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwindowsystem_qws.h
138 @@ -67,7 +67,7 @@
139  
140  struct QWSWindowData;
141  
142 -class QWSScreenSaver
143 +class Q_EXPORT QWSScreenSaver
144  {
145  public:
146      virtual ~QWSScreenSaver();
147 @@ -75,7 +75,7 @@
148      virtual bool save(int level)=0;
149  };
150  
151 -class QWSWindow
152 +class Q_EXPORT QWSWindow
153  {
154      friend class QWSServer;
155  public:
156 @@ -169,9 +169,9 @@
157  struct QWSCommandStruct;
158  
159  #ifndef QT_NO_QWS_MULTIPROCESS
160 -class QWSServer : public QWSServerSocket
161 +class Q_EXPORT QWSServer : public QWSServerSocket
162  #else
163 -class QWSServer : public QObject
164 +class Q_EXPORT QWSServer : public QObject
165  #endif
166  {
167      friend class QCopChannel;
168 @@ -501,7 +501,7 @@
169  
170  
171  #ifndef QT_NO_QWS_IM
172 -class QWSInputMethod : public QObject
173 +class Q_EXPORT QWSInputMethod : public QObject
174  {
175  public:
176      QWSInputMethod();
177 @@ -525,7 +525,7 @@
178  #endif
179  
180  #ifndef QT_NO_QWS_FSIM
181 -class QWSGestureMethod : public QObject
182 +class Q_EXPORT QWSGestureMethod : public QObject
183  {
184  public:
185      QWSGestureMethod();
186 @@ -573,7 +573,7 @@
187  
188  typedef QMap<int, QWSCursor*> QWSCursorMap;
189  
190 -class QWSClient : public QObject
191 +class Q_EXPORT QWSClient : public QObject
192  {
193      Q_OBJECT
194  public:
195 --- qt-2.3.9-snapshot-20050114/src/kernel/qwsdefaultdecoration_qws.h~qt-visibility
196 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwsdefaultdecoration_qws.h
197 @@ -44,7 +44,7 @@
198  
199  
200  
201 -class QWSDefaultDecoration : public QWSDecoration
202 +class Q_EXPORT QWSDefaultDecoration : public QWSDecoration
203  {
204  public:
205      QWSDefaultDecoration();
206 --- qt-2.3.9-snapshot-20050114/src/kernel/qwscommand_qws.h~qt-visibility
207 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwscommand_qws.h
208 @@ -47,8 +47,8 @@
209   *
210   *********************************************************************/
211  #ifndef QT_NO_QWS_MULTIPROCESS
212 -void qws_write_command( QWSSocket *socket, int type, char *simpleData, int simpleLen, char *rawData, int rawLen );
213 -bool qws_read_command( QWSSocket *socket, char *&simpleData, int &simpleLen, char *&rawData, int &rawLen, int &bytesRead );
214 +void Q_EXPORT qws_write_command( QWSSocket *socket, int type, char *simpleData, int simpleLen, char *rawData, int rawLen );
215 +bool Q_EXPORT qws_read_command( QWSSocket *socket, char *&simpleData, int &simpleLen, char *&rawData, int &rawLen, int &bytesRead );
216  #endif
217  /*********************************************************************
218   *
219 @@ -57,7 +57,7 @@
220   *********************************************************************/
221  
222  
223 -struct QWSProtocolItem
224 +struct Q_EXPORT QWSProtocolItem
225  {
226      // ctor - dtor
227      QWSProtocolItem( int t, int len, char *ptr ) : type( t ),
228 --- qt-2.3.9-snapshot-20050114/src/kernel/qfont_qws.cpp~qt-visibility
229 +++ qt-2.3.9-snapshot-20050114/src/kernel/qfont_qws.cpp
230 @@ -152,7 +152,7 @@
231  static QFontCache    *fontCache             = 0;       // cache of loaded fonts
232  static QFontDict     *fontDict      = 0;       // dict of all loaded fonts
233  
234 -void qws_clearLoadedFonts()
235 +void Q_EXPORT qws_clearLoadedFonts()
236  {
237      QFontDictIt it( *fontDict );
238      while ( it.current() ) {
239 --- qt-2.3.9-snapshot-20050114/src/kernel/qwscursor_qws.h~qt-visibility
240 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwscursor_qws.h
241 @@ -37,7 +37,7 @@
242  #include <qimage.h>
243  #endif // QT_H
244  
245 -class QWSCursor : public Qt
246 +class Q_EXPORT QWSCursor : public Qt
247  {
248  public:
249      QWSCursor() {}
250 --- qt-2.3.9-snapshot-20050114/src/kernel/qwsevent_qws.h~qt-visibility
251 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwsevent_qws.h
252 @@ -40,7 +40,7 @@
253  
254  struct QWSMouseEvent;
255  
256 -struct QWSEvent : QWSProtocolItem {
257 +struct Q_EXPORT QWSEvent : QWSProtocolItem {
258  
259      QWSEvent( int t, int len, char *ptr ) : QWSProtocolItem(t,len,ptr) {}
260  
261 @@ -71,7 +71,7 @@
262  
263  //All events must start with windowID
264  
265 -struct QWSConnectedEvent : QWSEvent {
266 +struct Q_EXPORT QWSConnectedEvent : QWSEvent {
267      QWSConnectedEvent()
268         : QWSEvent( QWSEvent::Connected, sizeof( simpleData ),
269                 (char*)&simpleData ) {}
270 @@ -90,7 +90,7 @@
271      char *display;
272  };
273  
274 -struct QWSMaxWindowRectEvent : QWSEvent {
275 +struct Q_EXPORT QWSMaxWindowRectEvent : QWSEvent {
276      QWSMaxWindowRectEvent()
277         : QWSEvent( MaxWindowRect, sizeof( simpleData ), (char*)&simpleData ) { }
278      struct SimpleData {
279 @@ -99,7 +99,7 @@
280      } simpleData;
281  };
282  
283 -struct QWSMouseEvent : QWSEvent {
284 +struct Q_EXPORT QWSMouseEvent : QWSEvent {
285      QWSMouseEvent()
286         : QWSEvent( QWSEvent::Mouse, sizeof( simpleData ),
287                 (char*)&simpleData ) {}
288 @@ -110,7 +110,7 @@
289      } simpleData;
290  };
291  
292 -struct QWSFocusEvent : QWSEvent {
293 +struct Q_EXPORT QWSFocusEvent : QWSEvent {
294      QWSFocusEvent()
295         : QWSEvent( QWSEvent::Focus, sizeof( simpleData ), (char*)&simpleData )
296         { memset((char*)&simpleData,0,sizeof(simpleData)); }
297 @@ -120,7 +120,7 @@
298      } simpleData;
299  };
300  
301 -struct QWSKeyEvent: QWSEvent {
302 +struct Q_EXPORT QWSKeyEvent: QWSEvent {
303      QWSKeyEvent()
304         : QWSEvent( QWSEvent::Key, sizeof( simpleData ),
305               (char*)&simpleData )
306 @@ -136,7 +136,7 @@
307  };
308  
309  
310 -struct QWSCreationEvent : QWSEvent {
311 +struct Q_EXPORT QWSCreationEvent : QWSEvent {
312      QWSCreationEvent()
313         : QWSEvent( QWSEvent::Creation, sizeof( simpleData ),
314               (char*)&simpleData ) {}
315 @@ -146,7 +146,7 @@
316  };
317  
318  #ifndef QT_NO_QWS_PROPERTIES
319 -struct QWSPropertyNotifyEvent : QWSEvent {
320 +struct Q_EXPORT QWSPropertyNotifyEvent : QWSEvent {
321      QWSPropertyNotifyEvent()
322         : QWSEvent( QWSEvent::PropertyNotify, sizeof( simpleData ),
323               (char*)&simpleData ) {}
324 @@ -162,7 +162,7 @@
325  };
326  #endif
327  
328 -struct QWSSelectionClearEvent : QWSEvent {
329 +struct Q_EXPORT QWSSelectionClearEvent : QWSEvent {
330      QWSSelectionClearEvent()
331         : QWSEvent( QWSEvent::SelectionClear, sizeof( simpleData ),
332               (char*)&simpleData ) {}
333 @@ -171,7 +171,7 @@
334      } simpleData;
335  };
336  
337 -struct QWSSelectionRequestEvent : QWSEvent {
338 +struct Q_EXPORT QWSSelectionRequestEvent : QWSEvent {
339      QWSSelectionRequestEvent()
340         : QWSEvent( QWSEvent::SelectionRequest, sizeof( simpleData ),
341               (char*)&simpleData ) {}
342 @@ -184,7 +184,7 @@
343      } simpleData;
344  };
345  
346 -struct QWSSelectionNotifyEvent : QWSEvent {
347 +struct Q_EXPORT QWSSelectionNotifyEvent : QWSEvent {
348      QWSSelectionNotifyEvent()
349         : QWSEvent( QWSEvent::SelectionNotify, sizeof( simpleData ),
350               (char*)&simpleData ) {}
351 @@ -198,7 +198,7 @@
352  
353  //complex events:
354  
355 -struct QWSRegionModifiedEvent : QWSEvent {
356 +struct Q_EXPORT QWSRegionModifiedEvent : QWSEvent {
357      QWSRegionModifiedEvent()
358         : QWSEvent( QWSEvent::RegionModified, sizeof( simpleData ),
359                 (char*)&simpleData )
360 @@ -218,7 +218,7 @@
361      QRect *rectangles;
362  };
363  #ifndef QT_NO_QWS_PROPERTIES
364 -struct QWSPropertyReplyEvent : QWSEvent {
365 +struct Q_EXPORT QWSPropertyReplyEvent : QWSEvent {
366      QWSPropertyReplyEvent()
367         : QWSEvent( QWSEvent::PropertyReply, sizeof( simpleData ),
368                 (char*)&simpleData ) {}
369 @@ -238,7 +238,7 @@
370  #endif //QT_NO_QWS_PROPERTIES
371  
372  #ifndef QT_NO_COP
373 -struct QWSQCopMessageEvent : QWSEvent {
374 +struct Q_EXPORT QWSQCopMessageEvent : QWSEvent {
375      QWSQCopMessageEvent()
376         : QWSEvent( QWSEvent::QCopMessage, sizeof( simpleData ),
377                 (char*)&simpleData )
378 @@ -268,7 +268,7 @@
379  
380  #endif
381  
382 -struct QWSWindowOperationEvent : QWSEvent {
383 +struct Q_EXPORT QWSWindowOperationEvent : QWSEvent {
384      QWSWindowOperationEvent()
385         : QWSEvent( WindowOperation, sizeof( simpleData ), (char*)&simpleData ) { }
386  
387 @@ -280,7 +280,7 @@
388  };
389  
390  #ifndef QT_NO_QWS_IM
391 -struct QWSIMEvent : QWSEvent {
392 +struct Q_EXPORT QWSIMEvent : QWSEvent {
393      QWSIMEvent()
394         : QWSEvent( IMEvent, sizeof( simpleData ), (char*)&simpleData ) { }
395  
396 --- qt-2.3.9-snapshot-20050114/src/kernel/qwsmanager_qws.h~qt-visibility
397 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwsmanager_qws.h
398 @@ -48,7 +48,7 @@
399  class QWSButton;
400  class QWSManager;
401  
402 -class QWSManager : public QObject
403 +class Q_EXPORT QWSManager : public QObject
404  {
405      Q_OBJECT
406  
407 --- qt-2.3.9-snapshot-20050114/src/kernel/qwsmouse_qws.h~qt-visibility
408 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwsmouse_qws.h
409 @@ -38,7 +38,7 @@
410  #include <qpointarray.h>
411  #endif // QT_H
412  
413 -class QWSPointerCalibrationData
414 +class Q_EXPORT QWSPointerCalibrationData
415  {
416  public:
417      enum Location { TopLeft = 0, BottomLeft = 1, BottomRight = 2, TopRight = 3,
418 @@ -47,7 +47,7 @@
419      QPoint screenPoints[5];
420  };
421  
422 -class QWSMouseHandler : public QObject {
423 +class Q_EXPORT QWSMouseHandler : public QObject {
424      Q_OBJECT
425  public:
426      QWSMouseHandler();
427 --- qt-2.3.9-snapshot-20050114/src/kernel/qwsproperty_qws.h~qt-visibility
428 +++ qt-2.3.9-snapshot-20050114/src/kernel/qwsproperty_qws.h
429 @@ -47,7 +47,7 @@
430  
431  class QWSPropertyManagerData;
432  
433 -class QWSPropertyManager
434 +class Q_EXPORT QWSPropertyManager
435  {
436  public:
437      enum Mode {
438 --- qt-2.3.9-snapshot-20050114/src/kernel/qlayoutengine.cpp~qt-visibility
439 +++ qt-2.3.9-snapshot-20050114/src/kernel/qlayoutengine.cpp
440 @@ -70,7 +70,7 @@
441    pos and space give the interval (relative to parentWidget topLeft.)
442  */
443  
444 -void qGeomCalc( QArray<QLayoutStruct> &chain, int start, int count, int pos,
445 +void Q_EXPORT qGeomCalc( QArray<QLayoutStruct> &chain, int start, int count, int pos,
446                       int space, int spacer )
447  {
448      typedef int fixed;
449 --- qt-2.3.9-snapshot-20050114/src/kernel/qfontmanager_qws.h~qt-visibility
450 +++ qt-2.3.9-snapshot-20050114/src/kernel/qfontmanager_qws.h
451 @@ -84,7 +84,7 @@
452  // e.g. Truetype Times, 10 point. There's only one of these though;
453  // we want to share generated glyphs
454  
455 -class QRenderedFont {
456 +class Q_EXPORT QRenderedFont {
457  
458  public:
459