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