author | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
commit | d34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff) | |
tree | b57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /qmake/include | |
parent | ce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff) | |
download | opie-d34dc773591a2d467c68875a68a671d6a809f861.zip opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2 |
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms
should work.
Please see $OPIEDIR/development/macosx for details
-rw-r--r-- | qmake/include/qglobal.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h index d212bff..94e5607 100644 --- a/qmake/include/qglobal.h +++ b/qmake/include/qglobal.h | |||
@@ -1,1065 +1,1072 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Global type declarations and definitions | 4 | ** Global type declarations and definitions |
5 | ** | 5 | ** |
6 | ** Created : 920529 | 6 | ** Created : 920529 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QGLOBAL_H | 38 | #ifndef QGLOBAL_H |
39 | #define QGLOBAL_H | 39 | #define QGLOBAL_H |
40 | 40 | ||
41 | #define QT_VERSION_STR "3.1.2" | 41 | #define QT_VERSION_STR "3.1.2" |
42 | /* | 42 | /* |
43 | QT_VERSION is (major << 16) + (minor << 8) + patch. | 43 | QT_VERSION is (major << 16) + (minor << 8) + patch. |
44 | */ | 44 | */ |
45 | #define QT_VERSION 0x030102 | 45 | #define QT_VERSION 0x030102 |
46 | 46 | ||
47 | /* | 47 | /* |
48 | The operating system, must be one of: (Q_OS_x) | 48 | The operating system, must be one of: (Q_OS_x) |
49 | 49 | ||
50 | MACX- Mac OS X | 50 | MACX- Mac OS X |
51 | MAC9- Mac OS 9 | 51 | MAC9- Mac OS 9 |
52 | MSDOS- MS-DOS and Windows | 52 | MSDOS- MS-DOS and Windows |
53 | OS2- OS/2 | 53 | OS2- OS/2 |
54 | OS2EMX- XFree86 on OS/2 (not PM) | 54 | OS2EMX- XFree86 on OS/2 (not PM) |
55 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) | 55 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) |
56 | CYGWIN- Cygwin | 56 | CYGWIN- Cygwin |
57 | SOLARIS- Sun Solaris | 57 | SOLARIS- Sun Solaris |
58 | HPUX- HP-UX | 58 | HPUX- HP-UX |
59 | ULTRIX- DEC Ultrix | 59 | ULTRIX- DEC Ultrix |
60 | LINUX- Linux | 60 | LINUX- Linux |
61 | FREEBSD- FreeBSD | 61 | FREEBSD- FreeBSD |
62 | NETBSD- NetBSD | 62 | NETBSD- NetBSD |
63 | OPENBSD- OpenBSD | 63 | OPENBSD- OpenBSD |
64 | BSDI- BSD/OS | 64 | BSDI- BSD/OS |
65 | IRIX- SGI Irix | 65 | IRIX- SGI Irix |
66 | OSF- HP Tru64 UNIX | 66 | OSF- HP Tru64 UNIX |
67 | SCO- SCO OpenServer 5 | 67 | SCO- SCO OpenServer 5 |
68 | UNIXWARE- UnixWare 7, Open UNIX 8 | 68 | UNIXWARE- UnixWare 7, Open UNIX 8 |
69 | AIX- AIX | 69 | AIX- AIX |
70 | HURD- GNU Hurd | 70 | HURD- GNU Hurd |
71 | DGUX- DG/UX | 71 | DGUX- DG/UX |
72 | RELIANT- Reliant UNIX | 72 | RELIANT- Reliant UNIX |
73 | DYNIX- DYNIX/ptx | 73 | DYNIX- DYNIX/ptx |
74 | QNX- QNX | 74 | QNX- QNX |
75 | QNX6- QNX RTP 6.1 | 75 | QNX6- QNX RTP 6.1 |
76 | LYNX- LynxOS | 76 | LYNX- LynxOS |
77 | BSD4- Any BSD 4.4 system | 77 | BSD4- Any BSD 4.4 system |
78 | UNIX- Any UNIX BSD/SYSV system | 78 | UNIX- Any UNIX BSD/SYSV system |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #if defined(__APPLE__) && defined(__GNUC__) | 81 | #if defined(__APPLE__) && defined(__GNUC__) |
82 | # define Q_OS_MACX | 82 | # define Q_OS_MACX |
83 | #elif defined(__MACOSX__) | 83 | #elif defined(__MACOSX__) |
84 | # define Q_OS_MACX | 84 | # define Q_OS_MACX |
85 | #elif defined(macintosh) | 85 | #elif defined(macintosh) |
86 | # define Q_OS_MAC9 | 86 | # define Q_OS_MAC9 |
87 | #elif defined(__CYGWIN__) | 87 | #elif defined(__CYGWIN__) |
88 | # define Q_OS_CYGWIN | 88 | # define Q_OS_CYGWIN |
89 | #elif defined(MSDOS) || defined(_MSDOS) | 89 | #elif defined(MSDOS) || defined(_MSDOS) |
90 | # define Q_OS_MSDOS | 90 | # define Q_OS_MSDOS |
91 | #elif defined(__OS2__) | 91 | #elif defined(__OS2__) |
92 | # if defined(__EMX__) | 92 | # if defined(__EMX__) |
93 | # define Q_OS_OS2EMX | 93 | # define Q_OS_OS2EMX |
94 | # else | 94 | # else |
95 | # define Q_OS_OS2 | 95 | # define Q_OS_OS2 |
96 | # endif | 96 | # endif |
97 | #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) | 97 | #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) |
98 | # define Q_OS_WIN32 | 98 | # define Q_OS_WIN32 |
99 | # define Q_OS_WIN64 | 99 | # define Q_OS_WIN64 |
100 | #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) | 100 | #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) |
101 | # define Q_OS_WIN32 | 101 | # define Q_OS_WIN32 |
102 | #elif defined(__MWERKS__) && defined(__INTEL__) | 102 | #elif defined(__MWERKS__) && defined(__INTEL__) |
103 | # define Q_OS_WIN32 | 103 | # define Q_OS_WIN32 |
104 | #elif defined(__sun) || defined(sun) | 104 | #elif defined(__sun) || defined(sun) |
105 | # define Q_OS_SOLARIS | 105 | # define Q_OS_SOLARIS |
106 | #elif defined(hpux) || defined(__hpux) | 106 | #elif defined(hpux) || defined(__hpux) |
107 | # define Q_OS_HPUX | 107 | # define Q_OS_HPUX |
108 | #elif defined(__ultrix) || defined(ultrix) | 108 | #elif defined(__ultrix) || defined(ultrix) |
109 | # define Q_OS_ULTRIX | 109 | # define Q_OS_ULTRIX |
110 | #elif defined(sinix) | 110 | #elif defined(sinix) |
111 | # define Q_OS_RELIANT | 111 | # define Q_OS_RELIANT |
112 | #elif defined(__linux__) || defined(__linux) | 112 | #elif defined(__linux__) || defined(__linux) |
113 | # define Q_OS_LINUX | 113 | # define Q_OS_LINUX |
114 | #elif defined(__FreeBSD__) | 114 | #elif defined(__FreeBSD__) |
115 | # define Q_OS_FREEBSD | 115 | # define Q_OS_FREEBSD |
116 | # define Q_OS_BSD4 | 116 | # define Q_OS_BSD4 |
117 | #elif defined(__NetBSD__) | 117 | #elif defined(__NetBSD__) |
118 | # define Q_OS_NETBSD | 118 | # define Q_OS_NETBSD |
119 | # define Q_OS_BSD4 | 119 | # define Q_OS_BSD4 |
120 | #elif defined(__OpenBSD__) | 120 | #elif defined(__OpenBSD__) |
121 | # define Q_OS_OPENBSD | 121 | # define Q_OS_OPENBSD |
122 | # define Q_OS_BSD4 | 122 | # define Q_OS_BSD4 |
123 | #elif defined(__bsdi__) | 123 | #elif defined(__bsdi__) |
124 | # define Q_OS_BSDI | 124 | # define Q_OS_BSDI |
125 | # define Q_OS_BSD4 | 125 | # define Q_OS_BSD4 |
126 | #elif defined(__sgi) | 126 | #elif defined(__sgi) |
127 | # define Q_OS_IRIX | 127 | # define Q_OS_IRIX |
128 | #elif defined(__osf__) | 128 | #elif defined(__osf__) |
129 | # define Q_OS_OSF | 129 | # define Q_OS_OSF |
130 | #elif defined(_AIX) | 130 | #elif defined(_AIX) |
131 | # define Q_OS_AIX | 131 | # define Q_OS_AIX |
132 | #elif defined(__Lynx__) | 132 | #elif defined(__Lynx__) |
133 | # define Q_OS_LYNX | 133 | # define Q_OS_LYNX |
134 | #elif defined(__GNU_HURD__) | 134 | #elif defined(__GNU_HURD__) |
135 | # define Q_OS_HURD | 135 | # define Q_OS_HURD |
136 | #elif defined(__DGUX__) | 136 | #elif defined(__DGUX__) |
137 | # define Q_OS_DGUX | 137 | # define Q_OS_DGUX |
138 | #elif defined(__QNXNTO__) | 138 | #elif defined(__QNXNTO__) |
139 | # define Q_OS_QNX6 | 139 | # define Q_OS_QNX6 |
140 | #elif defined(__QNX__) | 140 | #elif defined(__QNX__) |
141 | # define Q_OS_QNX | 141 | # define Q_OS_QNX |
142 | #elif defined(_SEQUENT_) | 142 | #elif defined(_SEQUENT_) |
143 | # define Q_OS_DYNIX | 143 | # define Q_OS_DYNIX |
144 | #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ | 144 | #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ |
145 | # define Q_OS_SCO | 145 | # define Q_OS_SCO |
146 | #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ | 146 | #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ |
147 | # define Q_OS_UNIXWARE | 147 | # define Q_OS_UNIXWARE |
148 | # define Q_OS_UNIXWARE7 | 148 | # define Q_OS_UNIXWARE7 |
149 | #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ | 149 | #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ |
150 | # define Q_OS_UNIXWARE | 150 | # define Q_OS_UNIXWARE |
151 | # define Q_OS_UNIXWARE7 | 151 | # define Q_OS_UNIXWARE7 |
152 | #else | 152 | #else |
153 | # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" | 153 | # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) | 156 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) |
157 | # define Q_OS_MAC | 157 | /* This hack forces the generater to compile qmake not for maxosx native. It is |
158 | * compiled for Linux and generates usual makefiles.. | ||
159 | * Does anyone has a better solution for this ? (eilers) | ||
160 | */ | ||
161 | // # define Q_OS_MAC | ||
162 | #define Q_OS_LINUX | ||
163 | #warning "boeser Hack !! (se)" | ||
164 | #undef Q_OS_MACX | ||
158 | #endif | 165 | #endif |
159 | 166 | ||
160 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | 167 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) |
161 | # undef Q_OS_UNIX | 168 | # undef Q_OS_UNIX |
162 | #elif !defined(Q_OS_UNIX) | 169 | #elif !defined(Q_OS_UNIX) |
163 | # define Q_OS_UNIX | 170 | # define Q_OS_UNIX |
164 | #endif | 171 | #endif |
165 | 172 | ||
166 | 173 | ||
167 | /* | 174 | /* |
168 | The compiler, must be one of: (Q_CC_x) | 175 | The compiler, must be one of: (Q_CC_x) |
169 | 176 | ||
170 | SYM- Symantec C++ for both PC and Macintosh | 177 | SYM- Symantec C++ for both PC and Macintosh |
171 | MPW- MPW C++ | 178 | MPW- MPW C++ |
172 | MWERKS- Metrowerks CodeWarrior | 179 | MWERKS- Metrowerks CodeWarrior |
173 | MSVC- Microsoft Visual C/C++ | 180 | MSVC- Microsoft Visual C/C++ |
174 | BOR- Borland/Turbo C++ | 181 | BOR- Borland/Turbo C++ |
175 | WAT- Watcom C++ | 182 | WAT- Watcom C++ |
176 | GNU- GNU C++ | 183 | GNU- GNU C++ |
177 | COMEAU- Comeau C++ | 184 | COMEAU- Comeau C++ |
178 | EDG- Edison Design Group C++ | 185 | EDG- Edison Design Group C++ |
179 | OC - CenterLine C++ | 186 | OC - CenterLine C++ |
180 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ | 187 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ |
181 | MIPS- MIPSpro C++ | 188 | MIPS- MIPSpro C++ |
182 | DEC- DEC C++ | 189 | DEC- DEC C++ |
183 | HP - HPUX C++ | 190 | HP - HPUX C++ |
184 | HPACC- HPUX ANSI C++ | 191 | HPACC- HPUX ANSI C++ |
185 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ | 192 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ |
186 | CDS- Reliant C++ | 193 | CDS- Reliant C++ |
187 | KAI- KAI C++ | 194 | KAI- KAI C++ |
188 | INTEL- Intel C++ | 195 | INTEL- Intel C++ |
189 | HIGHC- MetaWare High C/C++ | 196 | HIGHC- MetaWare High C/C++ |
190 | PGI- Portland Group C++ | 197 | PGI- Portland Group C++ |
191 | GHS- Green Hills Optimizing C++ Compilers | 198 | GHS- Green Hills Optimizing C++ Compilers |
192 | 199 | ||
193 | Should be sorted most to least authoritative. | 200 | Should be sorted most to least authoritative. |
194 | */ | 201 | */ |
195 | 202 | ||
196 | /* Symantec C++ is now Digital Mars */ | 203 | /* Symantec C++ is now Digital Mars */ |
197 | #if defined(__DMC__) || defined(__SC__) | 204 | #if defined(__DMC__) || defined(__SC__) |
198 | # define Q_CC_SYM | 205 | # define Q_CC_SYM |
199 | /* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ | 206 | /* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ |
200 | # if defined(__SC__) && __SC__ < 0x750 | 207 | # if defined(__SC__) && __SC__ < 0x750 |
201 | # define Q_NO_EXPLICIT_KEYWORD | 208 | # define Q_NO_EXPLICIT_KEYWORD |
202 | # endif | 209 | # endif |
203 | # define Q_NO_USING_KEYWORD | 210 | # define Q_NO_USING_KEYWORD |
204 | # if !defined(_CPPUNWIND) | 211 | # if !defined(_CPPUNWIND) |
205 | # define Q_NO_EXCEPTIONS | 212 | # define Q_NO_EXCEPTIONS |
206 | # endif | 213 | # endif |
207 | 214 | ||
208 | #elif defined(applec) | 215 | #elif defined(applec) |
209 | # define Q_CC_MPW | 216 | # define Q_CC_MPW |
210 | # define Q_NO_BOOL_TYPE | 217 | # define Q_NO_BOOL_TYPE |
211 | # define Q_NO_EXPLICIT_KEYWORD | 218 | # define Q_NO_EXPLICIT_KEYWORD |
212 | # define Q_NO_USING_KEYWORD | 219 | # define Q_NO_USING_KEYWORD |
213 | 220 | ||
214 | #elif defined(__MWERKS__) | 221 | #elif defined(__MWERKS__) |
215 | # define Q_CC_MWERKS | 222 | # define Q_CC_MWERKS |
216 | /* "explicit" recognized since 4.0d1 */ | 223 | /* "explicit" recognized since 4.0d1 */ |
217 | # define QMAC_PASCAL pascal | 224 | # define QMAC_PASCAL pascal |
218 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 225 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
219 | 226 | ||
220 | #elif defined(_MSC_VER) | 227 | #elif defined(_MSC_VER) |
221 | # define Q_CC_MSVC | 228 | # define Q_CC_MSVC |
222 | /* proper support of bool for _MSC_VER >= 1100 */ | 229 | /* proper support of bool for _MSC_VER >= 1100 */ |
223 | # define Q_CANNOT_DELETE_CONSTANT | 230 | # define Q_CANNOT_DELETE_CONSTANT |
224 | # define Q_INLINE_TEMPLATES inline | 231 | # define Q_INLINE_TEMPLATES inline |
225 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ | 232 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ |
226 | # if _MSC_VER >= 1300 | 233 | # if _MSC_VER >= 1300 |
227 | # define Q_CC_MSVC_NET | 234 | # define Q_CC_MSVC_NET |
228 | # if _MSC_VER < 1310 | 235 | # if _MSC_VER < 1310 |
229 | # define Q_TYPENAME | 236 | # define Q_TYPENAME |
230 | # endif | 237 | # endif |
231 | # endif | 238 | # endif |
232 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 239 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
233 | 240 | ||
234 | #elif defined(__BORLANDC__) || defined(__TURBOC__) | 241 | #elif defined(__BORLANDC__) || defined(__TURBOC__) |
235 | # define Q_CC_BOR | 242 | # define Q_CC_BOR |
236 | # if __BORLANDC__ < 0x502 | 243 | # if __BORLANDC__ < 0x502 |
237 | # define Q_NO_BOOL_TYPE | 244 | # define Q_NO_BOOL_TYPE |
238 | # define Q_NO_EXPLICIT_KEYWORD | 245 | # define Q_NO_EXPLICIT_KEYWORD |
239 | # endif | 246 | # endif |
240 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 247 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
241 | 248 | ||
242 | #elif defined(__WATCOMC__) | 249 | #elif defined(__WATCOMC__) |
243 | # define Q_CC_WAT | 250 | # define Q_CC_WAT |
244 | # if defined(Q_OS_QNX4) | 251 | # if defined(Q_OS_QNX4) |
245 | /* compiler flags */ | 252 | /* compiler flags */ |
246 | # define Q_TYPENAME | 253 | # define Q_TYPENAME |
247 | # define Q_NO_BOOL_TYPE | 254 | # define Q_NO_BOOL_TYPE |
248 | # define Q_CANNOT_DELETE_CONSTANT | 255 | # define Q_CANNOT_DELETE_CONSTANT |
249 | # define mutable | 256 | # define mutable |
250 | /* ??? */ | 257 | /* ??? */ |
251 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 258 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
252 | /* no template classes in QVariant */ | 259 | /* no template classes in QVariant */ |
253 | # define QT_NO_TEMPLATE_VARIANT | 260 | # define QT_NO_TEMPLATE_VARIANT |
254 | /* Wcc does not fill in functions needed by valuelists, maps, and | 261 | /* Wcc does not fill in functions needed by valuelists, maps, and |
255 | valuestacks implicitly */ | 262 | valuestacks implicitly */ |
256 | # define Q_FULL_TEMPLATE_INSTANTIATION | 263 | # define Q_FULL_TEMPLATE_INSTANTIATION |
257 | /* can we just compare the structures? */ | 264 | /* can we just compare the structures? */ |
258 | # define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP | 265 | # define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP |
259 | /* these are not useful to our customers */ | 266 | /* these are not useful to our customers */ |
260 | # define QT_QWS_NO_SHM | 267 | # define QT_QWS_NO_SHM |
261 | # define QT_NO_QWS_MULTIPROCESS | 268 | # define QT_NO_QWS_MULTIPROCESS |
262 | # define QT_NO_SQL | 269 | # define QT_NO_SQL |
263 | # define QT_NO_QWS_CURSOR | 270 | # define QT_NO_QWS_CURSOR |
264 | # endif | 271 | # endif |
265 | 272 | ||
266 | #elif defined(__GNUC__) | 273 | #elif defined(__GNUC__) |
267 | # define Q_CC_GNU | 274 | # define Q_CC_GNU |
268 | # define Q_C_CALLBACKS | 275 | # define Q_C_CALLBACKS |
269 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 | 276 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 |
270 | # define Q_FULL_TEMPLATE_INSTANTIATION | 277 | # define Q_FULL_TEMPLATE_INSTANTIATION |
271 | # endif | 278 | # endif |
272 | /* GCC 2.95 knows "using" but does not support it correctly */ | 279 | /* GCC 2.95 knows "using" but does not support it correctly */ |
273 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 | 280 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 |
274 | # define Q_NO_USING_KEYWORD | 281 | # define Q_NO_USING_KEYWORD |
275 | # endif | 282 | # endif |
276 | /* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ | 283 | /* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ |
277 | # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 | 284 | # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 |
278 | # define Q_WRONG_SB_CTYPE_MACROS | 285 | # define Q_WRONG_SB_CTYPE_MACROS |
279 | # endif | 286 | # endif |
280 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) | 287 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) |
281 | # define Q_PACKED __attribute__ ((packed)) | 288 | # define Q_PACKED __attribute__ ((packed)) |
282 | # endif | 289 | # endif |
283 | # if !defined(__EXCEPTIONS) | 290 | # if !defined(__EXCEPTIONS) |
284 | # define Q_NO_EXCEPTIONS | 291 | # define Q_NO_EXCEPTIONS |
285 | # endif | 292 | # endif |
286 | 293 | ||
287 | /* IBM compiler versions are a bit messy. There are actually two products: | 294 | /* IBM compiler versions are a bit messy. There are actually two products: |
288 | the C product, and the C++ product. The C++ compiler is always packaged | 295 | the C product, and the C++ product. The C++ compiler is always packaged |
289 | with the latest version of the C compiler. Version numbers do not always | 296 | with the latest version of the C compiler. Version numbers do not always |
290 | match. This little table (I'm not sure it's accurate) should be helpful: | 297 | match. This little table (I'm not sure it's accurate) should be helpful: |
291 | 298 | ||
292 | C++ product C product | 299 | C++ product C product |
293 | 300 | ||
294 | C Set 3.1 C Compiler 3.0 | 301 | C Set 3.1 C Compiler 3.0 |
295 | ... ... | 302 | ... ... |
296 | C++ Compiler 3.6.6 C Compiler 4.3 | 303 | C++ Compiler 3.6.6 C Compiler 4.3 |
297 | ... ... | 304 | ... ... |
298 | Visual Age C++ 4.0 ... | 305 | Visual Age C++ 4.0 ... |
299 | ... ... | 306 | ... ... |
300 | Visual Age C++ 5.0 C Compiler 5.0 | 307 | Visual Age C++ 5.0 C Compiler 5.0 |
301 | 308 | ||
302 | Now: | 309 | Now: |
303 | __xlC__ is the version of the C compiler in hexadecimal notation | 310 | __xlC__ is the version of the C compiler in hexadecimal notation |
304 | is only an approximation of the C++ compiler version | 311 | is only an approximation of the C++ compiler version |
305 | __IBMCPP__ is the version of the C++ compiler in decimal notation | 312 | __IBMCPP__ is the version of the C++ compiler in decimal notation |
306 | but it is not defined on older compilers like C Set 3.1 */ | 313 | but it is not defined on older compilers like C Set 3.1 */ |
307 | #elif defined(__xlC__) | 314 | #elif defined(__xlC__) |
308 | # define Q_CC_XLC | 315 | # define Q_CC_XLC |
309 | # define Q_FULL_TEMPLATE_INSTANTIATION | 316 | # define Q_FULL_TEMPLATE_INSTANTIATION |
310 | # if __xlC__ < 0x400 | 317 | # if __xlC__ < 0x400 |
311 | # define Q_NO_BOOL_TYPE | 318 | # define Q_NO_BOOL_TYPE |
312 | # define Q_NO_EXPLICIT_KEYWORD | 319 | # define Q_NO_EXPLICIT_KEYWORD |
313 | # define Q_NO_USING_KEYWORD | 320 | # define Q_NO_USING_KEYWORD |
314 | # define Q_TYPENAME | 321 | # define Q_TYPENAME |
315 | # define Q_INLINE_TEMPLATES inline | 322 | # define Q_INLINE_TEMPLATES inline |
316 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 323 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
317 | # define Q_CANNOT_DELETE_CONSTANT | 324 | # define Q_CANNOT_DELETE_CONSTANT |
318 | # endif | 325 | # endif |
319 | 326 | ||
320 | /* Older versions of DEC C++ do not define __EDG__ or __EDG - observed | 327 | /* Older versions of DEC C++ do not define __EDG__ or __EDG - observed |
321 | on DEC C++ V5.5-004. New versions do define __EDG__ - observed on | 328 | on DEC C++ V5.5-004. New versions do define __EDG__ - observed on |
322 | Compaq C++ V6.3-002. | 329 | Compaq C++ V6.3-002. |
323 | This compiler is different enough from other EDG compilers to handle | 330 | This compiler is different enough from other EDG compilers to handle |
324 | it separately anyway. */ | 331 | it separately anyway. */ |
325 | #elif defined(__DECCXX) | 332 | #elif defined(__DECCXX) |
326 | # define Q_CC_DEC | 333 | # define Q_CC_DEC |
327 | /* Compaq C++ V6 compilers are EDG-based but I'm not sure about older | 334 | /* Compaq C++ V6 compilers are EDG-based but I'm not sure about older |
328 | DEC C++ V5 compilers. */ | 335 | DEC C++ V5 compilers. */ |
329 | # if defined(__EDG__) | 336 | # if defined(__EDG__) |
330 | # define Q_CC_EDG | 337 | # define Q_CC_EDG |
331 | # endif | 338 | # endif |
332 | /* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead | 339 | /* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead |
333 | - observed on Compaq C++ V6.3-002. | 340 | - observed on Compaq C++ V6.3-002. |
334 | In any case versions prior to Compaq C++ V6.0-005 do not have bool. */ | 341 | In any case versions prior to Compaq C++ V6.0-005 do not have bool. */ |
335 | # if !defined(_BOOL_EXISTS) | 342 | # if !defined(_BOOL_EXISTS) |
336 | # define Q_NO_BOOL_TYPE | 343 | # define Q_NO_BOOL_TYPE |
337 | # endif | 344 | # endif |
338 | /* Spurious (?) error messages observed on Compaq C++ V6.5-014. */ | 345 | /* Spurious (?) error messages observed on Compaq C++ V6.5-014. */ |
339 | # define Q_NO_USING_KEYWORD | 346 | # define Q_NO_USING_KEYWORD |
340 | /* Apply to all versions prior to Compaq C++ V6.0-000 - observed on | 347 | /* Apply to all versions prior to Compaq C++ V6.0-000 - observed on |
341 | DEC C++ V5.5-004. */ | 348 | DEC C++ V5.5-004. */ |
342 | # if __DECCXX_VER < 60060000 | 349 | # if __DECCXX_VER < 60060000 |
343 | # define Q_TYPENAME | 350 | # define Q_TYPENAME |
344 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 351 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
345 | # define Q_CANNOT_DELETE_CONSTANT | 352 | # define Q_CANNOT_DELETE_CONSTANT |
346 | # endif | 353 | # endif |
347 | /* avoid undefined symbol problems with out-of-line template members */ | 354 | /* avoid undefined symbol problems with out-of-line template members */ |
348 | # define Q_INLINE_TEMPLATES inline | 355 | # define Q_INLINE_TEMPLATES inline |
349 | 356 | ||
350 | /* Compilers with EDG front end are similar. To detect them we test: | 357 | /* Compilers with EDG front end are similar. To detect them we test: |
351 | __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b | 358 | __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b |
352 | __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ | 359 | __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ |
353 | #elif defined(__EDG) || defined(__EDG__) | 360 | #elif defined(__EDG) || defined(__EDG__) |
354 | # define Q_CC_EDG | 361 | # define Q_CC_EDG |
355 | /* From the EDG documentation (does not seem to apply to Compaq C++): | 362 | /* From the EDG documentation (does not seem to apply to Compaq C++): |
356 | _BOOL | 363 | _BOOL |
357 | Defined in C++ mode when bool is a keyword. The name of this | 364 | Defined in C++ mode when bool is a keyword. The name of this |
358 | predefined macro is specified by a configuration flag. _BOOL | 365 | predefined macro is specified by a configuration flag. _BOOL |
359 | is the default. | 366 | is the default. |
360 | __BOOL_DEFINED | 367 | __BOOL_DEFINED |
361 | Defined in Microsoft C++ mode when bool is a keyword. */ | 368 | Defined in Microsoft C++ mode when bool is a keyword. */ |
362 | # if !defined(_BOOL) && !defined(__BOOL_DEFINED) | 369 | # if !defined(_BOOL) && !defined(__BOOL_DEFINED) |
363 | # define Q_NO_BOOL_TYPE | 370 | # define Q_NO_BOOL_TYPE |
364 | # endif | 371 | # endif |
365 | 372 | ||
366 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ | 373 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ |
367 | # if defined(__COMO__) | 374 | # if defined(__COMO__) |
368 | # define Q_CC_COMEAU | 375 | # define Q_CC_COMEAU |
369 | # define Q_C_CALLBACKS | 376 | # define Q_C_CALLBACKS |
370 | 377 | ||
371 | /* Using the `using' keyword avoids KAI C++ warnings */ | 378 | /* Using the `using' keyword avoids KAI C++ warnings */ |
372 | # elif defined(__KCC) | 379 | # elif defined(__KCC) |
373 | # define Q_CC_KAI | 380 | # define Q_CC_KAI |
374 | # if !defined(_EXCEPTIONS) | 381 | # if !defined(_EXCEPTIONS) |
375 | # define Q_NO_EXCEPTIONS | 382 | # define Q_NO_EXCEPTIONS |
376 | # endif | 383 | # endif |
377 | 384 | ||
378 | /* Using the `using' keyword avoids Intel C++ warnings */ | 385 | /* Using the `using' keyword avoids Intel C++ warnings */ |
379 | # elif defined(__INTEL_COMPILER) | 386 | # elif defined(__INTEL_COMPILER) |
380 | # define Q_CC_INTEL | 387 | # define Q_CC_INTEL |
381 | # if !defined(__EXCEPTIONS) | 388 | # if !defined(__EXCEPTIONS) |
382 | # define Q_NO_EXCEPTIONS | 389 | # define Q_NO_EXCEPTIONS |
383 | # endif | 390 | # endif |
384 | 391 | ||
385 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ | 392 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ |
386 | # elif defined(__PGI) | 393 | # elif defined(__PGI) |
387 | # define Q_CC_PGI | 394 | # define Q_CC_PGI |
388 | # if !defined(__EXCEPTIONS) | 395 | # if !defined(__EXCEPTIONS) |
389 | # define Q_NO_EXCEPTIONS | 396 | # define Q_NO_EXCEPTIONS |
390 | # endif | 397 | # endif |
391 | 398 | ||
392 | /* Never tested! */ | 399 | /* Never tested! */ |
393 | # elif defined(__ghs) | 400 | # elif defined(__ghs) |
394 | # define Q_CC_GHS | 401 | # define Q_CC_GHS |
395 | 402 | ||
396 | /* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ | 403 | /* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ |
397 | # elif defined(__USLC__) && defined(__SCO_VERSION__) | 404 | # elif defined(__USLC__) && defined(__SCO_VERSION__) |
398 | # define Q_CC_USLC | 405 | # define Q_CC_USLC |
399 | /* The latest UDK 7.1.1b does not need this, but previous versions do */ | 406 | /* The latest UDK 7.1.1b does not need this, but previous versions do */ |
400 | # if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010) | 407 | # if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010) |
401 | # define Q_INLINE_TEMPLATES inline | 408 | # define Q_INLINE_TEMPLATES inline |
402 | # endif | 409 | # endif |
403 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 410 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
404 | 411 | ||
405 | /* Never tested! */ | 412 | /* Never tested! */ |
406 | # elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) | 413 | # elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) |
407 | # define Q_CC_OC | 414 | # define Q_CC_OC |
408 | # define Q_NO_USING_KEYWORD | 415 | # define Q_NO_USING_KEYWORD |
409 | 416 | ||
410 | /* CDS++ defines __EDG__ although this is not documented in the Reliant | 417 | /* CDS++ defines __EDG__ although this is not documented in the Reliant |
411 | documentation. It also follows conventions like _BOOL and this documented */ | 418 | documentation. It also follows conventions like _BOOL and this documented */ |
412 | # elif defined(sinix) | 419 | # elif defined(sinix) |
413 | # define Q_CC_CDS | 420 | # define Q_CC_CDS |
414 | # define Q_NO_USING_KEYWORD | 421 | # define Q_NO_USING_KEYWORD |
415 | # if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */ | 422 | # if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */ |
416 | # define Q_NO_EXCEPTIONS | 423 | # define Q_NO_EXCEPTIONS |
417 | # endif | 424 | # endif |
418 | 425 | ||
419 | /* The MIPSpro compiler in o32 mode is based on EDG but disables features | 426 | /* The MIPSpro compiler in o32 mode is based on EDG but disables features |
420 | such as template specialization nevertheless */ | 427 | such as template specialization nevertheless */ |
421 | # elif defined(__sgi) | 428 | # elif defined(__sgi) |
422 | # define Q_CC_MIPS | 429 | # define Q_CC_MIPS |
423 | # if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ | 430 | # if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ |
424 | # define Q_TYPENAME | 431 | # define Q_TYPENAME |
425 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 432 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
426 | # define Q_STRICT_INLINING_RULES | 433 | # define Q_STRICT_INLINING_RULES |
427 | # define Q_NO_EXPLICIT_KEYWORD | 434 | # define Q_NO_EXPLICIT_KEYWORD |
428 | # define Q_INLINE_TEMPLATES inline | 435 | # define Q_INLINE_TEMPLATES inline |
429 | # elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ | 436 | # elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ |
430 | # define Q_TYPENAME | 437 | # define Q_TYPENAME |
431 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 438 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
432 | # endif | 439 | # endif |
433 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 440 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
434 | # endif | 441 | # endif |
435 | 442 | ||
436 | /* The older UnixWare 2.X compiler? */ | 443 | /* The older UnixWare 2.X compiler? */ |
437 | #elif defined(__USLC__) | 444 | #elif defined(__USLC__) |
438 | # define Q_CC_USLC | 445 | # define Q_CC_USLC |
439 | # define Q_TYPENAME | 446 | # define Q_TYPENAME |
440 | # define Q_NO_BOOL_TYPE | 447 | # define Q_NO_BOOL_TYPE |
441 | # define Q_NO_EXPLICIT_KEYWORD | 448 | # define Q_NO_EXPLICIT_KEYWORD |
442 | # define Q_NO_USING_KEYWORD | 449 | # define Q_NO_USING_KEYWORD |
443 | # define Q_INLINE_TEMPLATES inline | 450 | # define Q_INLINE_TEMPLATES inline |
444 | 451 | ||
445 | /* Never tested! */ | 452 | /* Never tested! */ |
446 | #elif defined(__HIGHC__) | 453 | #elif defined(__HIGHC__) |
447 | # define Q_CC_HIGHC | 454 | # define Q_CC_HIGHC |
448 | 455 | ||
449 | #elif defined(__SUNPRO_CC) | 456 | #elif defined(__SUNPRO_CC) |
450 | # define Q_CC_SUN | 457 | # define Q_CC_SUN |
451 | /* 5.0 compiler or better | 458 | /* 5.0 compiler or better |
452 | 'bool' is enabled by default but can be disabled using -features=nobool | 459 | 'bool' is enabled by default but can be disabled using -features=nobool |
453 | in which case _BOOL is not defined | 460 | in which case _BOOL is not defined |
454 | this is the default in 4.2 compatibility mode triggered by -compat=4 */ | 461 | this is the default in 4.2 compatibility mode triggered by -compat=4 */ |
455 | # if __SUNPRO_CC >= 0x500 | 462 | # if __SUNPRO_CC >= 0x500 |
456 | # if !defined(_BOOL) | 463 | # if !defined(_BOOL) |
457 | # define Q_NO_BOOL_TYPE | 464 | # define Q_NO_BOOL_TYPE |
458 | # endif | 465 | # endif |
459 | # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) | 466 | # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) |
460 | # define Q_NO_USING_KEYWORD | 467 | # define Q_NO_USING_KEYWORD |
461 | # endif | 468 | # endif |
462 | # define Q_C_CALLBACKS | 469 | # define Q_C_CALLBACKS |
463 | /* 4.2 compiler or older */ | 470 | /* 4.2 compiler or older */ |
464 | # else | 471 | # else |
465 | # define Q_NO_BOOL_TYPE | 472 | # define Q_NO_BOOL_TYPE |
466 | # define Q_NO_EXPLICIT_KEYWORD | 473 | # define Q_NO_EXPLICIT_KEYWORD |
467 | # define Q_NO_USING_KEYWORD | 474 | # define Q_NO_USING_KEYWORD |
468 | # endif | 475 | # endif |
469 | 476 | ||
470 | /* CDS++ does not seem to define __EDG__ or __EDG according to Reliant | 477 | /* CDS++ does not seem to define __EDG__ or __EDG according to Reliant |
471 | documentation but nevertheless uses EDG conventions like _BOOL */ | 478 | documentation but nevertheless uses EDG conventions like _BOOL */ |
472 | #elif defined(sinix) | 479 | #elif defined(sinix) |
473 | # define Q_CC_EDG | 480 | # define Q_CC_EDG |
474 | # define Q_CC_CDS | 481 | # define Q_CC_CDS |
475 | # if !defined(_BOOL) | 482 | # if !defined(_BOOL) |
476 | # define Q_NO_BOOL_TYPE | 483 | # define Q_NO_BOOL_TYPE |
477 | # endif | 484 | # endif |
478 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 485 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
479 | 486 | ||
480 | #elif defined(Q_OS_HPUX) | 487 | #elif defined(Q_OS_HPUX) |
481 | /* __HP_aCC was not defined in first aCC releases */ | 488 | /* __HP_aCC was not defined in first aCC releases */ |
482 | # if defined(__HP_aCC) || __cplusplus >= 199707L | 489 | # if defined(__HP_aCC) || __cplusplus >= 199707L |
483 | # define Q_CC_HPACC | 490 | # define Q_CC_HPACC |
484 | # else | 491 | # else |
485 | # define Q_CC_HP | 492 | # define Q_CC_HP |
486 | # define Q_NO_BOOL_TYPE | 493 | # define Q_NO_BOOL_TYPE |
487 | # define Q_FULL_TEMPLATE_INSTANTIATION | 494 | # define Q_FULL_TEMPLATE_INSTANTIATION |
488 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 495 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
489 | # define Q_NO_EXPLICIT_KEYWORD | 496 | # define Q_NO_EXPLICIT_KEYWORD |
490 | # endif | 497 | # endif |
491 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 498 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
492 | 499 | ||
493 | #else | 500 | #else |
494 | # error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" | 501 | # error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" |
495 | #endif | 502 | #endif |
496 | 503 | ||
497 | #ifndef Q_PACKED | 504 | #ifndef Q_PACKED |
498 | # define Q_PACKED | 505 | # define Q_PACKED |
499 | #endif | 506 | #endif |
500 | 507 | ||
501 | 508 | ||
502 | /* | 509 | /* |
503 | The window system, must be one of: (Q_WS_x) | 510 | The window system, must be one of: (Q_WS_x) |
504 | 511 | ||
505 | MACX- Mac OS X | 512 | MACX- Mac OS X |
506 | MAC9- Mac OS 9 | 513 | MAC9- Mac OS 9 |
507 | QWS- Qt/Embedded | 514 | QWS- Qt/Embedded |
508 | WIN32- Windows | 515 | WIN32- Windows |
509 | X11- X Window System | 516 | X11- X Window System |
510 | PM - unsupported | 517 | PM - unsupported |
511 | WIN16- unsupported | 518 | WIN16- unsupported |
512 | */ | 519 | */ |
513 | 520 | ||
514 | #if defined(Q_OS_MAC9) | 521 | #if defined(Q_OS_MAC9) |
515 | # define Q_WS_MAC9 | 522 | # define Q_WS_MAC9 |
516 | #elif defined(Q_OS_MSDOS) | 523 | #elif defined(Q_OS_MSDOS) |
517 | # define Q_WS_WIN16 | 524 | # define Q_WS_WIN16 |
518 | # error "Qt requires Win32 and does not work with Windows 3.x" | 525 | # error "Qt requires Win32 and does not work with Windows 3.x" |
519 | #elif defined(_WIN32_X11_) | 526 | #elif defined(_WIN32_X11_) |
520 | # define Q_WS_X11 | 527 | # define Q_WS_X11 |
521 | #elif defined(Q_OS_WIN32) | 528 | #elif defined(Q_OS_WIN32) |
522 | # define Q_WS_WIN32 | 529 | # define Q_WS_WIN32 |
523 | # if defined(Q_OS_WIN64) | 530 | # if defined(Q_OS_WIN64) |
524 | # define Q_WS_WIN64 | 531 | # define Q_WS_WIN64 |
525 | # endif | 532 | # endif |
526 | #elif defined(Q_OS_OS2) | 533 | #elif defined(Q_OS_OS2) |
527 | # define Q_WS_PM | 534 | # define Q_WS_PM |
528 | # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" | 535 | # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" |
529 | #elif defined(Q_OS_UNIX) | 536 | #elif defined(Q_OS_UNIX) |
530 | # if defined(QWS) | 537 | # if defined(QWS) |
531 | # define Q_WS_QWS | 538 | # define Q_WS_QWS |
532 | # define QT_NO_QWS_IM | 539 | # define QT_NO_QWS_IM |
533 | # elif defined(Q_OS_MACX) | 540 | # elif defined(Q_OS_MACX) |
534 | # define Q_WS_MACX | 541 | # define Q_WS_MACX |
535 | # else | 542 | # else |
536 | # define Q_WS_X11 | 543 | # define Q_WS_X11 |
537 | # endif | 544 | # endif |
538 | #endif | 545 | #endif |
539 | #if defined(Q_OS_MAC) && !defined(QMAC_PASCAL) | 546 | #if defined(Q_OS_MAC) && !defined(QMAC_PASCAL) |
540 | # define QMAC_PASCAL | 547 | # define QMAC_PASCAL |
541 | #endif | 548 | #endif |
542 | 549 | ||
543 | #if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) | 550 | #if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) |
544 | # define Q_WS_WIN | 551 | # define Q_WS_WIN |
545 | #endif | 552 | #endif |
546 | 553 | ||
547 | #if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11) | 554 | #if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11) |
548 | # define Q_WS_MAC | 555 | # define Q_WS_MAC |
549 | #endif | 556 | #endif |
550 | 557 | ||
551 | 558 | ||
552 | /* | 559 | /* |
553 | Some classes do not permit copies to be made of an object. | 560 | Some classes do not permit copies to be made of an object. |
554 | These classes contains a private copy constructor and operator= | 561 | These classes contains a private copy constructor and operator= |
555 | to disable copying (the compiler gives an error message). | 562 | to disable copying (the compiler gives an error message). |
556 | Undefine Q_DISABLE_COPY to turn off this checking. | 563 | Undefine Q_DISABLE_COPY to turn off this checking. |
557 | */ | 564 | */ |
558 | 565 | ||
559 | #define Q_DISABLE_COPY | 566 | #define Q_DISABLE_COPY |
560 | 567 | ||
561 | #if defined(__cplusplus) | 568 | #if defined(__cplusplus) |
562 | 569 | ||
563 | 570 | ||
564 | // | 571 | // |
565 | // Useful type definitions for Qt | 572 | // Useful type definitions for Qt |
566 | // | 573 | // |
567 | 574 | ||
568 | #if defined(Q_NO_BOOL_TYPE) | 575 | #if defined(Q_NO_BOOL_TYPE) |
569 | #if defined(Q_CC_HP) | 576 | #if defined(Q_CC_HP) |
570 | // bool is an unsupported reserved keyword in later versions | 577 | // bool is an unsupported reserved keyword in later versions |
571 | #define bool int | 578 | #define bool int |
572 | #else | 579 | #else |
573 | typedef int bool; | 580 | typedef int bool; |
574 | #endif | 581 | #endif |
575 | #endif | 582 | #endif |
576 | 583 | ||
577 | typedef unsigned char uchar; | 584 | typedef unsigned char uchar; |
578 | typedef unsigned short ushort; | 585 | typedef unsigned short ushort; |
579 | typedef unsigneduint; | 586 | typedef unsigneduint; |
580 | typedef unsigned long ulong; | 587 | typedef unsigned long ulong; |
581 | typedef char *pchar; | 588 | typedef char *pchar; |
582 | typedef uchar *puchar; | 589 | typedef uchar *puchar; |
583 | typedef const char *pcchar; | 590 | typedef const char *pcchar; |
584 | 591 | ||
585 | 592 | ||
586 | // | 593 | // |
587 | // Constant bool values | 594 | // Constant bool values |
588 | // | 595 | // |
589 | 596 | ||
590 | #ifndef TRUE | 597 | #ifndef TRUE |
591 | const bool FALSE = 0; | 598 | const bool FALSE = 0; |
592 | const bool TRUE = !0; | 599 | const bool TRUE = !0; |
593 | #endif | 600 | #endif |
594 | #if defined(__WATCOMC__) | 601 | #if defined(__WATCOMC__) |
595 | # if defined(Q_OS_QNX4) | 602 | # if defined(Q_OS_QNX4) |
596 | const bool false = FALSE; | 603 | const bool false = FALSE; |
597 | const bool true = TRUE; | 604 | const bool true = TRUE; |
598 | # endif | 605 | # endif |
599 | #endif | 606 | #endif |
600 | 607 | ||
601 | 608 | ||
602 | // | 609 | // |
603 | // Use the "explicit" keyword on platforms that support it. | 610 | // Use the "explicit" keyword on platforms that support it. |
604 | // | 611 | // |
605 | 612 | ||
606 | #if !defined(Q_NO_EXPLICIT_KEYWORD) | 613 | #if !defined(Q_NO_EXPLICIT_KEYWORD) |
607 | # define Q_EXPLICIT explicit | 614 | # define Q_EXPLICIT explicit |
608 | #else | 615 | #else |
609 | # define Q_EXPLICIT | 616 | # define Q_EXPLICIT |
610 | #endif | 617 | #endif |
611 | 618 | ||
612 | 619 | ||
613 | // | 620 | // |
614 | // Workaround for static const members on MSVC++. | 621 | // Workaround for static const members on MSVC++. |
615 | // | 622 | // |
616 | 623 | ||
617 | #if defined(Q_CC_MSVC) | 624 | #if defined(Q_CC_MSVC) |
618 | # define QT_STATIC_CONST static | 625 | # define QT_STATIC_CONST static |
619 | # define QT_STATIC_CONST_IMPL | 626 | # define QT_STATIC_CONST_IMPL |
620 | #else | 627 | #else |
621 | # define QT_STATIC_CONST static const | 628 | # define QT_STATIC_CONST static const |
622 | # define QT_STATIC_CONST_IMPL const | 629 | # define QT_STATIC_CONST_IMPL const |
623 | #endif | 630 | #endif |
624 | 631 | ||
625 | 632 | ||
626 | // | 633 | // |
627 | // Utility macros and inline functions | 634 | // Utility macros and inline functions |
628 | // | 635 | // |
629 | 636 | ||
630 | #define QMAX(a, b)((b) < (a) ? (a) : (b)) | 637 | #define QMAX(a, b)((b) < (a) ? (a) : (b)) |
631 | #define QMIN(a, b)((a) < (b) ? (a) : (b)) | 638 | #define QMIN(a, b)((a) < (b) ? (a) : (b)) |
632 | #define QABS(a)((a) >= 0 ? (a) : -(a)) | 639 | #define QABS(a)((a) >= 0 ? (a) : -(a)) |
633 | 640 | ||
634 | inline int qRound( double d ) | 641 | inline int qRound( double d ) |
635 | { | 642 | { |
636 | return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1); | 643 | return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1); |
637 | } | 644 | } |
638 | 645 | ||
639 | 646 | ||
640 | // | 647 | // |
641 | // Size-dependent types (architechture-dependent byte order) | 648 | // Size-dependent types (architechture-dependent byte order) |
642 | // | 649 | // |
643 | 650 | ||
644 | #if !defined(QT_CLEAN_NAMESPACE) | 651 | #if !defined(QT_CLEAN_NAMESPACE) |
645 | // source compatibility with Qt 1.x | 652 | // source compatibility with Qt 1.x |
646 | typedef signed char INT8; // 8 bit signed | 653 | typedef signed char INT8; // 8 bit signed |
647 | typedef unsigned char UINT8; // 8 bit unsigned | 654 | typedef unsigned char UINT8; // 8 bit unsigned |
648 | typedef short INT16; // 16 bit signed | 655 | typedef short INT16; // 16 bit signed |
649 | typedef unsigned short UINT16; // 16 bit unsigned | 656 | typedef unsigned short UINT16; // 16 bit unsigned |
650 | typedef int INT32; // 32 bit signed | 657 | typedef int INT32; // 32 bit signed |
651 | typedef unsigned int UINT32; // 32 bit unsigned | 658 | typedef unsigned int UINT32; // 32 bit unsigned |
652 | #endif | 659 | #endif |
653 | 660 | ||
654 | typedef signed char Q_INT8; // 8 bit signed | 661 | typedef signed char Q_INT8; // 8 bit signed |
655 | typedef unsigned char Q_UINT8;// 8 bit unsigned | 662 | typedef unsigned char Q_UINT8;// 8 bit unsigned |
656 | typedef short Q_INT16;// 16 bit signed | 663 | typedef short Q_INT16;// 16 bit signed |
657 | typedef unsigned short Q_UINT16;// 16 bit unsigned | 664 | typedef unsigned short Q_UINT16;// 16 bit unsigned |
658 | typedef int Q_INT32;// 32 bit signed | 665 | typedef int Q_INT32;// 32 bit signed |
659 | typedef unsigned int Q_UINT32;// 32 bit unsigned | 666 | typedef unsigned int Q_UINT32;// 32 bit unsigned |
660 | #if defined(Q_OS_WIN64) | 667 | #if defined(Q_OS_WIN64) |
661 | // LLP64 64-bit model on Windows | 668 | // LLP64 64-bit model on Windows |
662 | typedef __int64 Q_LONG; // word up to 64 bit signed | 669 | typedef __int64 Q_LONG; // word up to 64 bit signed |
663 | typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned | 670 | typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned |
664 | #else | 671 | #else |
665 | // LP64 64-bit model on Linux | 672 | // LP64 64-bit model on Linux |
666 | typedef long Q_LONG; | 673 | typedef long Q_LONG; |
667 | typedef unsigned long Q_ULONG; | 674 | typedef unsigned long Q_ULONG; |
668 | #endif | 675 | #endif |
669 | 676 | ||
670 | #if !defined(QT_CLEAN_NAMESPACE) | 677 | #if !defined(QT_CLEAN_NAMESPACE) |
671 | // mininum size of 64 bits is not guaranteed | 678 | // mininum size of 64 bits is not guaranteed |
672 | #define Q_INT64 Q_LONG | 679 | #define Q_INT64 Q_LONG |
673 | #define Q_UINT64 Q_ULONG | 680 | #define Q_UINT64 Q_ULONG |
674 | #endif | 681 | #endif |
675 | 682 | ||
676 | #if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT) | 683 | #if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT) |
677 | # define QT_LARGEFILE_SUPPORT 64 | 684 | # define QT_LARGEFILE_SUPPORT 64 |
678 | #endif | 685 | #endif |
679 | #if defined(QT_LARGEFILE_SUPPORT) | 686 | #if defined(QT_LARGEFILE_SUPPORT) |
680 | typedef unsigned long long QtOffset; | 687 | typedef unsigned long long QtOffset; |
681 | #else | 688 | #else |
682 | typedef Q_ULONG QtOffset; | 689 | typedef Q_ULONG QtOffset; |
683 | #endif | 690 | #endif |
684 | 691 | ||
685 | 692 | ||
686 | // | 693 | // |
687 | // Data stream functions is provided by many classes (defined in qdatastream.h) | 694 | // Data stream functions is provided by many classes (defined in qdatastream.h) |
688 | // | 695 | // |
689 | 696 | ||
690 | class QDataStream; | 697 | class QDataStream; |
691 | 698 | ||
692 | 699 | ||
693 | // | 700 | // |
694 | // Feature subsetting | 701 | // Feature subsetting |
695 | // | 702 | // |
696 | // Note that disabling some features will produce a libqt that is not | 703 | // Note that disabling some features will produce a libqt that is not |
697 | // compatible with other libqt builds. Such modifications are only | 704 | // compatible with other libqt builds. Such modifications are only |
698 | // supported on Qt/Embedded where reducing the library size is important | 705 | // supported on Qt/Embedded where reducing the library size is important |
699 | // and where the application-suite is often a fixed set. | 706 | // and where the application-suite is often a fixed set. |
700 | // | 707 | // |
701 | 708 | ||
702 | #if !defined(QT_MOC) | 709 | #if !defined(QT_MOC) |
703 | #if defined(QCONFIG_LOCAL) | 710 | #if defined(QCONFIG_LOCAL) |
704 | #include <qconfig-local.h> | 711 | #include <qconfig-local.h> |
705 | #elif defined(QCONFIG_MINIMAL) | 712 | #elif defined(QCONFIG_MINIMAL) |
706 | #include <qconfig-minimal.h> | 713 | #include <qconfig-minimal.h> |
707 | #elif defined(QCONFIG_SMALL) | 714 | #elif defined(QCONFIG_SMALL) |
708 | #include <qconfig-small.h> | 715 | #include <qconfig-small.h> |
709 | #elif defined(QCONFIG_MEDIUM) | 716 | #elif defined(QCONFIG_MEDIUM) |
710 | #include <qconfig-medium.h> | 717 | #include <qconfig-medium.h> |
711 | #elif defined(QCONFIG_LARGE) | 718 | #elif defined(QCONFIG_LARGE) |
712 | #include <qconfig-large.h> | 719 | #include <qconfig-large.h> |
713 | #else // everything... | 720 | #else // everything... |
714 | #include <qconfig.h> | 721 | #include <qconfig.h> |
715 | #endif | 722 | #endif |
716 | #endif | 723 | #endif |
717 | 724 | ||
718 | 725 | ||
719 | #ifndef QT_BUILD_KEY | 726 | #ifndef QT_BUILD_KEY |
720 | #define QT_BUILD_KEY "unspecified" | 727 | #define QT_BUILD_KEY "unspecified" |
721 | #endif | 728 | #endif |
722 | 729 | ||
723 | // prune to local config | 730 | // prune to local config |
724 | #include "qmodules.h" | 731 | #include "qmodules.h" |
725 | #ifndef QT_MODULE_ICONVIEW | 732 | #ifndef QT_MODULE_ICONVIEW |
726 | # define QT_NO_ICONVIEW | 733 | # define QT_NO_ICONVIEW |
727 | #endif | 734 | #endif |
728 | #ifndef QT_MODULE_WORKSPACE | 735 | #ifndef QT_MODULE_WORKSPACE |
729 | # define QT_NO_WORKSPACE | 736 | # define QT_NO_WORKSPACE |
730 | #endif | 737 | #endif |
731 | #ifndef QT_MODULE_NETWORK | 738 | #ifndef QT_MODULE_NETWORK |
732 | #define QT_NO_NETWORK | 739 | #define QT_NO_NETWORK |
733 | #endif | 740 | #endif |
734 | #ifndef QT_MODULE_CANVAS | 741 | #ifndef QT_MODULE_CANVAS |
735 | # define QT_NO_CANVAS | 742 | # define QT_NO_CANVAS |
736 | #endif | 743 | #endif |
737 | #ifndef QT_MODULE_TABLE | 744 | #ifndef QT_MODULE_TABLE |
738 | #define QT_NO_TABLE | 745 | #define QT_NO_TABLE |
739 | #endif | 746 | #endif |
740 | #ifndef QT_MODULE_XML | 747 | #ifndef QT_MODULE_XML |
741 | # define QT_NO_XML | 748 | # define QT_NO_XML |
742 | #endif | 749 | #endif |
743 | #ifndef QT_MODULE_OPENGL | 750 | #ifndef QT_MODULE_OPENGL |
744 | # define QT_NO_OPENGL | 751 | # define QT_NO_OPENGL |
745 | #endif | 752 | #endif |
746 | #if !defined(QT_MODULE_SQL) | 753 | #if !defined(QT_MODULE_SQL) |
747 | # define QT_NO_SQL | 754 | # define QT_NO_SQL |
748 | #endif | 755 | #endif |
749 | 756 | ||
750 | #if defined(Q_WS_MAC9) | 757 | #if defined(Q_WS_MAC9) |
751 | //No need for menu merging | 758 | //No need for menu merging |
752 | # ifndef QMAC_QMENUBAR_NO_MERGE | 759 | # ifndef QMAC_QMENUBAR_NO_MERGE |
753 | # define QMAC_QMENUBAR_NO_MERGE | 760 | # define QMAC_QMENUBAR_NO_MERGE |
754 | # endif | 761 | # endif |
755 | //Mac9 does not use quartz | 762 | //Mac9 does not use quartz |
756 | # ifndef QMAC_NO_QUARTZ | 763 | # ifndef QMAC_NO_QUARTZ |
757 | # define QMAC_NO_QUARTZ | 764 | # define QMAC_NO_QUARTZ |
758 | # endif | 765 | # endif |
759 | # ifndef QMAC_QMENUBAR_NO_EVENT | 766 | # ifndef QMAC_QMENUBAR_NO_EVENT |
760 | # define QMAC_QMENUBAR_NO_EVENT | 767 | # define QMAC_QMENUBAR_NO_EVENT |
761 | # endif | 768 | # endif |
762 | #endif | 769 | #endif |
763 | #if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks | 770 | #if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks |
764 | # ifndef QMAC_NO_QUARTZ | 771 | # ifndef QMAC_NO_QUARTZ |
765 | # define QMAC_NO_QUARTZ | 772 | # define QMAC_NO_QUARTZ |
766 | # endif | 773 | # endif |
767 | # ifndef QMAC_QMENUBAR_NO_EVENT | 774 | # ifndef QMAC_QMENUBAR_NO_EVENT |
768 | # define QMAC_QMENUBAR_NO_EVENT | 775 | # define QMAC_QMENUBAR_NO_EVENT |
769 | # endif | 776 | # endif |
770 | #endif | 777 | #endif |
771 | 778 | ||
772 | #if !defined(Q_WS_QWS) && !defined(QT_NO_COP) | 779 | #if !defined(Q_WS_QWS) && !defined(QT_NO_COP) |
773 | # define QT_NO_COP | 780 | # define QT_NO_COP |
774 | #endif | 781 | #endif |
775 | 782 | ||
776 | #ifndef QT_H | 783 | #ifndef QT_H |
777 | #include <qfeatures.h> | 784 | #include <qfeatures.h> |
778 | #endif // QT_H | 785 | #endif // QT_H |
779 | 786 | ||
780 | 787 | ||
781 | // | 788 | // |
782 | // Create Qt DLL if QT_DLL is defined (Windows only) | 789 | // Create Qt DLL if QT_DLL is defined (Windows only) |
783 | // or QT_SHARED is defined (Kylix only) | 790 | // or QT_SHARED is defined (Kylix only) |
784 | // | 791 | // |
785 | 792 | ||
786 | #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | 793 | #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) |
787 | # if defined(QT_NODLL) | 794 | # if defined(QT_NODLL) |
788 | # undef QT_MAKEDLL | 795 | # undef QT_MAKEDLL |
789 | # undef QT_DLL | 796 | # undef QT_DLL |
790 | # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ | 797 | # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ |
791 | # if defined(QT_DLL) | 798 | # if defined(QT_DLL) |
792 | # undef QT_DLL | 799 | # undef QT_DLL |
793 | # endif | 800 | # endif |
794 | # define Q_EXPORT __declspec(dllexport) | 801 | # define Q_EXPORT __declspec(dllexport) |
795 | # define Q_TEMPLATEDLL | 802 | # define Q_TEMPLATEDLL |
796 | # define Q_TEMPLATE_EXTERN | 803 | # define Q_TEMPLATE_EXTERN |
797 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ | 804 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ |
798 | # elif defined(QT_DLL) /* use a Qt DLL library */ | 805 | # elif defined(QT_DLL) /* use a Qt DLL library */ |
799 | # define Q_EXPORT __declspec(dllimport) | 806 | # define Q_EXPORT __declspec(dllimport) |
800 | # define Q_TEMPLATEDLL | 807 | # define Q_TEMPLATEDLL |
801 | # ifndef Q_TEMPLATE_EXTERN | 808 | # ifndef Q_TEMPLATE_EXTERN |
802 | # if defined(Q_CC_MSVC_NET) | 809 | # if defined(Q_CC_MSVC_NET) |
803 | # define Q_TEMPLATE_EXTERN extern | 810 | # define Q_TEMPLATE_EXTERN extern |
804 | # else | 811 | # else |
805 | # define Q_TEMPLATE_EXTERN | 812 | # define Q_TEMPLATE_EXTERN |
806 | # endif | 813 | # endif |
807 | # endif | 814 | # endif |
808 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ | 815 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ |
809 | # endif | 816 | # endif |
810 | #elif defined(Q_OS_LINUX) && defined(Q_CC_BOR) | 817 | #elif defined(Q_OS_LINUX) && defined(Q_CC_BOR) |
811 | # if defined(QT_SHARED)/* create a Qt shared library */ | 818 | # if defined(QT_SHARED)/* create a Qt shared library */ |
812 | # define Q_EXPORT __declspec(dllexport) | 819 | # define Q_EXPORT __declspec(dllexport) |
813 | # define Q_TEMPLATEDLL | 820 | # define Q_TEMPLATEDLL |
814 | # define Q_TEMPLATE_EXTERN | 821 | # define Q_TEMPLATE_EXTERN |
815 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ | 822 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ |
816 | # else | 823 | # else |
817 | # define Q_TEMPLATEDLL | 824 | # define Q_TEMPLATEDLL |
818 | # define Q_TEMPLATE_EXTERN | 825 | # define Q_TEMPLATE_EXTERN |
819 | # undef Q_DISABLE_COPY /* avoid unresolved externals */ | 826 | # undef Q_DISABLE_COPY /* avoid unresolved externals */ |
820 | # endif | 827 | # endif |
821 | #else | 828 | #else |
822 | # undef QT_MAKEDLL /* ignore these for other platforms */ | 829 | # undef QT_MAKEDLL /* ignore these for other platforms */ |
823 | # undef QT_DLL | 830 | # undef QT_DLL |
824 | #endif | 831 | #endif |
825 | 832 | ||
826 | #ifndef Q_EXPORT | 833 | #ifndef Q_EXPORT |
827 | # define Q_EXPORT | 834 | # define Q_EXPORT |
828 | #endif | 835 | #endif |
829 | 836 | ||
830 | 837 | ||
831 | // | 838 | // |
832 | // Some platform specific stuff | 839 | // Some platform specific stuff |
833 | // | 840 | // |
834 | 841 | ||
835 | #if defined(Q_WS_WIN) | 842 | #if defined(Q_WS_WIN) |
836 | extern Q_EXPORT bool qt_winunicode; | 843 | extern Q_EXPORT bool qt_winunicode; |
837 | #endif | 844 | #endif |
838 | 845 | ||
839 | 846 | ||
840 | // | 847 | // |
841 | // System information | 848 | // System information |
842 | // | 849 | // |
843 | 850 | ||
844 | Q_EXPORT const char *qVersion(); | 851 | Q_EXPORT const char *qVersion(); |
845 | Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); | 852 | Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); |
846 | #if defined(Q_OS_MAC) | 853 | #if defined(Q_OS_MAC) |
847 | int qMacVersion(); | 854 | int qMacVersion(); |
848 | #elif defined(Q_WS_WIN) | 855 | #elif defined(Q_WS_WIN) |
849 | Q_EXPORT int qWinVersion(); | 856 | Q_EXPORT int qWinVersion(); |
850 | #if defined(UNICODE) | 857 | #if defined(UNICODE) |
851 | #define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } | 858 | #define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } |
852 | #define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) | 859 | #define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) |
853 | #else | 860 | #else |
854 | #define QT_WA( uni, ansi ) ansi | 861 | #define QT_WA( uni, ansi ) ansi |
855 | #define QT_WA_INLINE( uni, ansi ) ansi | 862 | #define QT_WA_INLINE( uni, ansi ) ansi |
856 | #endif | 863 | #endif |
857 | #endif | 864 | #endif |
858 | 865 | ||
859 | #ifdef Q_OS_TEMP | 866 | #ifdef Q_OS_TEMP |
860 | #ifdef QT_WA | 867 | #ifdef QT_WA |
861 | #undef QT_WA | 868 | #undef QT_WA |
862 | #undef QT_WA_INLINE | 869 | #undef QT_WA_INLINE |
863 | #endif | 870 | #endif |
864 | #define QT_WA( uni, ansi ) uni | 871 | #define QT_WA( uni, ansi ) uni |
865 | #define QT_WA_INLINE( uni, ansi ) ( uni ) | 872 | #define QT_WA_INLINE( uni, ansi ) ( uni ) |
866 | #endif | 873 | #endif |
867 | 874 | ||
868 | #ifndef Q_INLINE_TEMPLATES | 875 | #ifndef Q_INLINE_TEMPLATES |
869 | # define Q_INLINE_TEMPLATES | 876 | # define Q_INLINE_TEMPLATES |
870 | #endif | 877 | #endif |
871 | 878 | ||
872 | #ifndef Q_TYPENAME | 879 | #ifndef Q_TYPENAME |
873 | # define Q_TYPENAME typename | 880 | # define Q_TYPENAME typename |
874 | #endif | 881 | #endif |
875 | 882 | ||
876 | // | 883 | // |
877 | // Use to avoid "unused parameter" warnings | 884 | // Use to avoid "unused parameter" warnings |
878 | // | 885 | // |
879 | 886 | ||
880 | #define Q_UNUSED(x) (void)x; | 887 | #define Q_UNUSED(x) (void)x; |
881 | 888 | ||
882 | // | 889 | // |
883 | // Debugging and error handling | 890 | // Debugging and error handling |
884 | // | 891 | // |
885 | 892 | ||
886 | #if !defined(QT_NO_CHECK) | 893 | #if !defined(QT_NO_CHECK) |
887 | # define QT_CHECK_STATE // check state of objects etc. | 894 | # define QT_CHECK_STATE // check state of objects etc. |
888 | # define QT_CHECK_RANGE // check range of indexes etc. | 895 | # define QT_CHECK_RANGE // check range of indexes etc. |
889 | # define QT_CHECK_NULL // check null pointers | 896 | # define QT_CHECK_NULL // check null pointers |
890 | # define QT_CHECK_MATH // check math functions | 897 | # define QT_CHECK_MATH // check math functions |
891 | #endif | 898 | #endif |
892 | 899 | ||
893 | #if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG) | 900 | #if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG) |
894 | # define QT_DEBUG // display debug messages | 901 | # define QT_DEBUG // display debug messages |
895 | # if !defined(QT_NO_COMPAT) // compatibility with Qt 2 | 902 | # if !defined(QT_NO_COMPAT) // compatibility with Qt 2 |
896 | # if !defined(NO_DEBUG) && !defined(DEBUG) | 903 | # if !defined(NO_DEBUG) && !defined(DEBUG) |
897 | # if !defined(Q_OS_MACX) // clash with MacOS X headers | 904 | # if !defined(Q_OS_MACX) // clash with MacOS X headers |
898 | # define DEBUG | 905 | # define DEBUG |
899 | # endif | 906 | # endif |
900 | # endif | 907 | # endif |
901 | # endif | 908 | # endif |
902 | #endif | 909 | #endif |
903 | 910 | ||
904 | 911 | ||
905 | Q_EXPORT void qDebug( const char *, ... )// print debug message | 912 | Q_EXPORT void qDebug( const char *, ... )// print debug message |
906 | #if defined(Q_CC_GNU) && !defined(__INSURE__) | 913 | #if defined(Q_CC_GNU) && !defined(__INSURE__) |
907 | __attribute__ ((format (printf, 1, 2))) | 914 | __attribute__ ((format (printf, 1, 2))) |
908 | #endif | 915 | #endif |
909 | ; | 916 | ; |
910 | 917 | ||
911 | Q_EXPORT void qWarning( const char *, ... )// print warning message | 918 | Q_EXPORT void qWarning( const char *, ... )// print warning message |
912 | #if defined(Q_CC_GNU) && !defined(__INSURE__) | 919 | #if defined(Q_CC_GNU) && !defined(__INSURE__) |
913 | __attribute__ ((format (printf, 1, 2))) | 920 | __attribute__ ((format (printf, 1, 2))) |
914 | #endif | 921 | #endif |
915 | ; | 922 | ; |
916 | 923 | ||
917 | Q_EXPORT void qFatal( const char *, ... )// print fatal message and exit | 924 | Q_EXPORT void qFatal( const char *, ... )// print fatal message and exit |
918 | #if defined(Q_CC_GNU) | 925 | #if defined(Q_CC_GNU) |
919 | __attribute__ ((format (printf, 1, 2))) | 926 | __attribute__ ((format (printf, 1, 2))) |
920 | #endif | 927 | #endif |
921 | ; | 928 | ; |
922 | 929 | ||
923 | Q_EXPORT void qSystemWarning( const char *, int code = -1 ); | 930 | Q_EXPORT void qSystemWarning( const char *, int code = -1 ); |
924 | 931 | ||
925 | #if !defined(QT_CLEAN_NAMESPACE) // compatibility with Qt 1 | 932 | #if !defined(QT_CLEAN_NAMESPACE) // compatibility with Qt 1 |
926 | 933 | ||
927 | Q_EXPORT void debug( const char *, ... )// print debug message | 934 | Q_EXPORT void debug( const char *, ... )// print debug message |
928 | #if defined(Q_CC_GNU) && !defined(__INSURE__) | 935 | #if defined(Q_CC_GNU) && !defined(__INSURE__) |
929 | __attribute__ ((format (printf, 1, 2))) | 936 | __attribute__ ((format (printf, 1, 2))) |
930 | #endif | 937 | #endif |
931 | ; | 938 | ; |
932 | 939 | ||
933 | Q_EXPORT void warning( const char *, ... )// print warning message | 940 | Q_EXPORT void warning( const char *, ... )// print warning message |
934 | #if defined(Q_CC_GNU) && !defined(__INSURE__) | 941 | #if defined(Q_CC_GNU) && !defined(__INSURE__) |
935 | __attribute__ ((format (printf, 1, 2))) | 942 | __attribute__ ((format (printf, 1, 2))) |
936 | #endif | 943 | #endif |
937 | ; | 944 | ; |
938 | 945 | ||
939 | Q_EXPORT void fatal( const char *, ... )// print fatal message and exit | 946 | Q_EXPORT void fatal( const char *, ... )// print fatal message and exit |
940 | #if defined(Q_CC_GNU) && !defined(__INSURE__) | 947 | #if defined(Q_CC_GNU) && !defined(__INSURE__) |
941 | __attribute__ ((format (printf, 1, 2))) | 948 | __attribute__ ((format (printf, 1, 2))) |
942 | #endif | 949 | #endif |
943 | ; | 950 | ; |
944 | 951 | ||
945 | #endif // QT_CLEAN_NAMESPACE | 952 | #endif // QT_CLEAN_NAMESPACE |
946 | 953 | ||
947 | 954 | ||
948 | #if !defined(Q_ASSERT) | 955 | #if !defined(Q_ASSERT) |
949 | # if defined(QT_CHECK_STATE) | 956 | # if defined(QT_CHECK_STATE) |
950 | # if defined(QT_FATAL_ASSERT) | 957 | # if defined(QT_FATAL_ASSERT) |
951 | # define Q_ASSERT(x) ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) | 958 | # define Q_ASSERT(x) ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) |
952 | # else | 959 | # else |
953 | # define Q_ASSERT(x) ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) | 960 | # define Q_ASSERT(x) ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__)) |
954 | # endif | 961 | # endif |
955 | # else | 962 | # else |
956 | # define Q_ASSERT(x) | 963 | # define Q_ASSERT(x) |
957 | # endif | 964 | # endif |
958 | #endif | 965 | #endif |
959 | 966 | ||
960 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 | 967 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 |
961 | # if !defined(ASSERT) | 968 | # if !defined(ASSERT) |
962 | # if !defined(Q_OS_TEMP) | 969 | # if !defined(Q_OS_TEMP) |
963 | # define ASSERT(x) Q_ASSERT(x) | 970 | # define ASSERT(x) Q_ASSERT(x) |
964 | # endif | 971 | # endif |
965 | # endif | 972 | # endif |
966 | #endif // QT_NO_COMPAT | 973 | #endif // QT_NO_COMPAT |
967 | 974 | ||
968 | 975 | ||
969 | Q_EXPORT bool qt_check_pointer( bool c, const char *, int ); | 976 | Q_EXPORT bool qt_check_pointer( bool c, const char *, int ); |
970 | 977 | ||
971 | #if defined(QT_CHECK_NULL) | 978 | #if defined(QT_CHECK_NULL) |
972 | # define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__)) | 979 | # define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__)) |
973 | #else | 980 | #else |
974 | # define Q_CHECK_PTR(p) | 981 | # define Q_CHECK_PTR(p) |
975 | #endif | 982 | #endif |
976 | 983 | ||
977 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 | 984 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 |
978 | # if !defined(CHECK_PTR) | 985 | # if !defined(CHECK_PTR) |
979 | # define CHECK_PTR(x) Q_CHECK_PTR(x) | 986 | # define CHECK_PTR(x) Q_CHECK_PTR(x) |
980 | # endif | 987 | # endif |
981 | #endif // QT_NO_COMPAT | 988 | #endif // QT_NO_COMPAT |
982 | 989 | ||
983 | enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; | 990 | enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; |
984 | 991 | ||
985 | typedef void (*QtMsgHandler)(QtMsgType, const char *); | 992 | typedef void (*QtMsgHandler)(QtMsgType, const char *); |
986 | Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler ); | 993 | Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler ); |
987 | 994 | ||
988 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 | 995 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 |
989 | typedef QtMsgHandler msg_handler; | 996 | typedef QtMsgHandler msg_handler; |
990 | #endif // QT_NO_COMPAT | 997 | #endif // QT_NO_COMPAT |
991 | 998 | ||
992 | Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE ); | 999 | Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE ); |
993 | 1000 | ||
994 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc, | 1001 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc, |
995 | const char *newfunc ); | 1002 | const char *newfunc ); |
996 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); | 1003 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); |
997 | Q_EXPORT void qObsolete( const char *message ); | 1004 | Q_EXPORT void qObsolete( const char *message ); |
998 | 1005 | ||
999 | 1006 | ||
1000 | // | 1007 | // |
1001 | // Install paths from configure | 1008 | // Install paths from configure |
1002 | // | 1009 | // |
1003 | 1010 | ||
1004 | Q_EXPORT const char *qInstallPath(); | 1011 | Q_EXPORT const char *qInstallPath(); |
1005 | Q_EXPORT const char *qInstallPathDocs(); | 1012 | Q_EXPORT const char *qInstallPathDocs(); |
1006 | Q_EXPORT const char *qInstallPathHeaders(); | 1013 | Q_EXPORT const char *qInstallPathHeaders(); |
1007 | Q_EXPORT const char *qInstallPathLibs(); | 1014 | Q_EXPORT const char *qInstallPathLibs(); |
1008 | Q_EXPORT const char *qInstallPathBins(); | 1015 | Q_EXPORT const char *qInstallPathBins(); |
1009 | Q_EXPORT const char *qInstallPathPlugins(); | 1016 | Q_EXPORT const char *qInstallPathPlugins(); |
1010 | Q_EXPORT const char *qInstallPathData(); | 1017 | Q_EXPORT const char *qInstallPathData(); |
1011 | 1018 | ||
1012 | #endif // __cplusplus | 1019 | #endif // __cplusplus |
1013 | 1020 | ||
1014 | // compilers which follow outdated template instantiation rules | 1021 | // compilers which follow outdated template instantiation rules |
1015 | // require a class to have a comparison operator to exist when | 1022 | // require a class to have a comparison operator to exist when |
1016 | // a QValueList of this type is instantiated. It's not actually | 1023 | // a QValueList of this type is instantiated. It's not actually |
1017 | // used in the list, though. Hence the dummy implementation. | 1024 | // used in the list, though. Hence the dummy implementation. |
1018 | // Just in case other code relies on it we better trigger a warning | 1025 | // Just in case other code relies on it we better trigger a warning |
1019 | // mandating a real implementation. | 1026 | // mandating a real implementation. |
1020 | #ifdef Q_FULL_TEMPLATE_INSTANTIATION | 1027 | #ifdef Q_FULL_TEMPLATE_INSTANTIATION |
1021 | # define Q_DUMMY_COMPARISON_OPERATOR(C) \ | 1028 | # define Q_DUMMY_COMPARISON_OPERATOR(C) \ |
1022 | bool operator==( const C& ) const { \ | 1029 | bool operator==( const C& ) const { \ |
1023 | qWarning( #C"::operator==( const "#C"& ) got called." ); \ | 1030 | qWarning( #C"::operator==( const "#C"& ) got called." ); \ |
1024 | return FALSE; \ | 1031 | return FALSE; \ |
1025 | } | 1032 | } |
1026 | #else | 1033 | #else |
1027 | # define Q_DUMMY_COMPARISON_OPERATOR(C) | 1034 | # define Q_DUMMY_COMPARISON_OPERATOR(C) |
1028 | #endif | 1035 | #endif |
1029 | 1036 | ||
1030 | #endif // QGLOBAL_H | 1037 | #endif // QGLOBAL_H |
1031 | 1038 | ||
1032 | // | 1039 | // |
1033 | // Avoid some particularly useless warnings from some stupid compilers. | 1040 | // Avoid some particularly useless warnings from some stupid compilers. |
1034 | // To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out | 1041 | // To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out |
1035 | // the line "#define QT_NO_WARNINGS" | 1042 | // the line "#define QT_NO_WARNINGS" |
1036 | // | 1043 | // |
1037 | 1044 | ||
1038 | #if !defined(QT_CC_WARNINGS) | 1045 | #if !defined(QT_CC_WARNINGS) |
1039 | # define QT_NO_WARNINGS | 1046 | # define QT_NO_WARNINGS |
1040 | #endif | 1047 | #endif |
1041 | #if defined(QT_NO_WARNINGS) | 1048 | #if defined(QT_NO_WARNINGS) |
1042 | # if defined(Q_CC_MSVC) | 1049 | # if defined(Q_CC_MSVC) |
1043 | # pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data | 1050 | # pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data |
1044 | # pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' | 1051 | # pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' |
1045 | # pragma warning(disable: 4514) // unreferenced inline/local function has been removed | 1052 | # pragma warning(disable: 4514) // unreferenced inline/local function has been removed |
1046 | # pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning) | 1053 | # pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning) |
1047 | # pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' | 1054 | # pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' |
1048 | # pragma warning(disable: 4706) // assignment within conditional expression | 1055 | # pragma warning(disable: 4706) // assignment within conditional expression |
1049 | # pragma warning(disable: 4786) // truncating debug info after 255 characters | 1056 | # pragma warning(disable: 4786) // truncating debug info after 255 characters |
1050 | # pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated | 1057 | # pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated |
1051 | # pragma warning(disable: 4355) // 'this' : used in base member initializer list | 1058 | # pragma warning(disable: 4355) // 'this' : used in base member initializer list |
1052 | # pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation | 1059 | # pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation |
1053 | # pragma warning(disable: 4710) // function not inlined | 1060 | # pragma warning(disable: 4710) // function not inlined |
1054 | # elif defined(Q_CC_BOR) | 1061 | # elif defined(Q_CC_BOR) |
1055 | # pragma option -w-inl | 1062 | # pragma option -w-inl |
1056 | # pragma option -w-aus | 1063 | # pragma option -w-aus |
1057 | # pragma warn -inl | 1064 | # pragma warn -inl |
1058 | # pragma warn -pia | 1065 | # pragma warn -pia |
1059 | # pragma warn -ccc | 1066 | # pragma warn -ccc |
1060 | # pragma warn -rch | 1067 | # pragma warn -rch |
1061 | # pragma warn -sig | 1068 | # pragma warn -sig |
1062 | # elif defined(Q_CC_MWERKS) | 1069 | # elif defined(Q_CC_MWERKS) |
1063 | # pragma warn_possunwant off | 1070 | # pragma warn_possunwant off |
1064 | # endif | 1071 | # endif |
1065 | #endif | 1072 | #endif |