summaryrefslogtreecommitdiff
path: root/qmake/include/qglobal.h
Unidiff
Diffstat (limited to 'qmake/include/qglobal.h') (more/less context) (show whitespace changes)
-rw-r--r--qmake/include/qglobal.h83
1 files changed, 71 insertions, 12 deletions
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h
index 13cff64..d212bff 100644
--- a/qmake/include/qglobal.h
+++ b/qmake/include/qglobal.h
@@ -17,53 +17,53 @@
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.0-b2" 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 0x030100 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
@@ -120,54 +120,54 @@
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 */ 144#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
145# define Q_OS_SCO 145# define Q_OS_SCO
146#elif defined(__UNIXWARE__) /* UnixWare 7 + GCC, Open UNIX 8 + GCC */ 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(__USLC__) /* UnixWare 7 + UDK, Open UNIX 8 + OUDK */ 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# define Q_OS_MAC
158#endif 158#endif
159 159
160#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) 160#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 161# undef Q_OS_UNIX
162#elif !defined(Q_OS_UNIX) 162#elif !defined(Q_OS_UNIX)
163# define Q_OS_UNIX 163# define Q_OS_UNIX
164#endif 164#endif
165 165
166 166
167/* 167/*
168 The compiler, must be one of: (Q_CC_x) 168 The compiler, must be one of: (Q_CC_x)
169 169
170 SYM- Symantec C++ for both PC and Macintosh 170 SYM- Symantec C++ for both PC and Macintosh
171 MPW- MPW C++ 171 MPW- MPW C++
172 MWERKS- Metrowerks CodeWarrior 172 MWERKS- Metrowerks CodeWarrior
173 MSVC- Microsoft Visual C/C++ 173 MSVC- Microsoft Visual C/C++
@@ -204,94 +204,100 @@
204# if !defined(_CPPUNWIND) 204# if !defined(_CPPUNWIND)
205# define Q_NO_EXCEPTIONS 205# define Q_NO_EXCEPTIONS
206# endif 206# endif
207 207
208#elif defined(applec) 208#elif defined(applec)
209# define Q_CC_MPW 209# define Q_CC_MPW
210# define Q_NO_BOOL_TYPE 210# define Q_NO_BOOL_TYPE
211# define Q_NO_EXPLICIT_KEYWORD 211# define Q_NO_EXPLICIT_KEYWORD
212# define Q_NO_USING_KEYWORD 212# define Q_NO_USING_KEYWORD
213 213
214#elif defined(__MWERKS__) 214#elif defined(__MWERKS__)
215# define Q_CC_MWERKS 215# define Q_CC_MWERKS
216/* "explicit" recognized since 4.0d1 */ 216/* "explicit" recognized since 4.0d1 */
217# define QMAC_PASCAL pascal 217# define QMAC_PASCAL pascal
218# define Q_NO_USING_KEYWORD /* ### check "using" status */ 218# define Q_NO_USING_KEYWORD /* ### check "using" status */
219 219
220#elif defined(_MSC_VER) 220#elif defined(_MSC_VER)
221# define Q_CC_MSVC 221# define Q_CC_MSVC
222/* proper support of bool for _MSC_VER >= 1100 */ 222/* proper support of bool for _MSC_VER >= 1100 */
223# define Q_CANNOT_DELETE_CONSTANT 223# define Q_CANNOT_DELETE_CONSTANT
224# define Q_INLINE_TEMPLATES inline 224# define Q_INLINE_TEMPLATES inline
225/* Visual C++.Net issues for _MSC_VER >= 1300 */ 225/* Visual C++.Net issues for _MSC_VER >= 1300 */
226# if _MSC_VER >= 1300 226# if _MSC_VER >= 1300
227# define Q_CC_MSVC_NET 227# define Q_CC_MSVC_NET
228# if _MSC_VER < 1310
228# define Q_TYPENAME 229# define Q_TYPENAME
229# endif 230# endif
231# endif
230# define Q_NO_USING_KEYWORD /* ### check "using" status */ 232# define Q_NO_USING_KEYWORD /* ### check "using" status */
231 233
232#elif defined(__BORLANDC__) || defined(__TURBOC__) 234#elif defined(__BORLANDC__) || defined(__TURBOC__)
233# define Q_CC_BOR 235# define Q_CC_BOR
234# if __BORLANDC__ < 0x502 236# if __BORLANDC__ < 0x502
235# define Q_NO_BOOL_TYPE 237# define Q_NO_BOOL_TYPE
236# define Q_NO_EXPLICIT_KEYWORD 238# define Q_NO_EXPLICIT_KEYWORD
237# endif 239# endif
238# define Q_NO_USING_KEYWORD /* ### check "using" status */ 240# define Q_NO_USING_KEYWORD /* ### check "using" status */
239 241
240#elif defined(__WATCOMC__) 242#elif defined(__WATCOMC__)
241# define Q_CC_WAT 243# define Q_CC_WAT
242# if defined(Q_OS_QNX4) 244# if defined(Q_OS_QNX4)
243/* compiler flags */ 245/* compiler flags */
244# define Q_TYPENAME 246# define Q_TYPENAME
245# define Q_NO_BOOL_TYPE 247# define Q_NO_BOOL_TYPE
246# define Q_CANNOT_DELETE_CONSTANT 248# define Q_CANNOT_DELETE_CONSTANT
247# define mutable 249# define mutable
248/* ??? */ 250/* ??? */
249# define Q_BROKEN_TEMPLATE_SPECIALIZATION 251# define Q_BROKEN_TEMPLATE_SPECIALIZATION
250/* no template classes in QVariant */ 252/* no template classes in QVariant */
251# define QT_NO_TEMPLATE_VARIANT 253# define QT_NO_TEMPLATE_VARIANT
252/* Wcc does not fill in functions needed by valuelists, maps, and 254/* Wcc does not fill in functions needed by valuelists, maps, and
253 valuestacks implicitly */ 255 valuestacks implicitly */
254# define Q_FULL_TEMPLATE_INSTANTIATION 256# define Q_FULL_TEMPLATE_INSTANTIATION
255/* can we just compare the structures? */ 257/* can we just compare the structures? */
256# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP 258# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP
257/* these are not useful to our customers */ 259/* these are not useful to our customers */
258# define QT_QWS_NO_SHM 260# define QT_QWS_NO_SHM
259# define QT_NO_QWS_MULTIPROCESS 261# define QT_NO_QWS_MULTIPROCESS
260# define QT_NO_SQL 262# define QT_NO_SQL
261# define QT_NO_QWS_CURSOR 263# define QT_NO_QWS_CURSOR
262# endif 264# endif
263 265
264#elif defined(__GNUC__) 266#elif defined(__GNUC__)
265# define Q_CC_GNU 267# define Q_CC_GNU
266# define Q_C_CALLBACKS 268# define Q_C_CALLBACKS
267# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 269# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
268# define Q_FULL_TEMPLATE_INSTANTIATION 270# define Q_FULL_TEMPLATE_INSTANTIATION
269# endif 271# endif
270/* GCC 2.95 knows "using" but does not support it correctly */ 272/* GCC 2.95 knows "using" but does not support it correctly */
271# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 273# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
272# define Q_NO_USING_KEYWORD 274# define Q_NO_USING_KEYWORD
273# endif 275# endif
276/* 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
278# define Q_WRONG_SB_CTYPE_MACROS
279# endif
274# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) 280# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
275# define Q_PACKED __attribute__ ((packed)) 281# define Q_PACKED __attribute__ ((packed))
276# endif 282# endif
277# if !defined(__EXCEPTIONS) 283# if !defined(__EXCEPTIONS)
278# define Q_NO_EXCEPTIONS 284# define Q_NO_EXCEPTIONS
279# endif 285# endif
280 286
281/* IBM compiler versions are a bit messy. There are actually two products: 287/* IBM compiler versions are a bit messy. There are actually two products:
282 the C product, and the C++ product. The C++ compiler is always packaged 288 the C product, and the C++ product. The C++ compiler is always packaged
283 with the latest version of the C compiler. Version numbers do not always 289 with the latest version of the C compiler. Version numbers do not always
284 match. This little table (I'm not sure it's accurate) should be helpful: 290 match. This little table (I'm not sure it's accurate) should be helpful:
285 291
286 C++ product C product 292 C++ product C product
287 293
288 C Set 3.1 C Compiler 3.0 294 C Set 3.1 C Compiler 3.0
289 ... ... 295 ... ...
290 C++ Compiler 3.6.6 C Compiler 4.3 296 C++ Compiler 3.6.6 C Compiler 4.3
291 ... ... 297 ... ...
292 Visual Age C++ 4.0 ... 298 Visual Age C++ 4.0 ...
293 ... ... 299 ... ...
294 Visual Age C++ 5.0 C Compiler 5.0 300 Visual Age C++ 5.0 C Compiler 5.0
295 301
296 Now: 302 Now:
297 __xlC__ is the version of the C compiler in hexadecimal notation 303 __xlC__ is the version of the C compiler in hexadecimal notation
@@ -369,112 +375,129 @@
369# define Q_NO_EXCEPTIONS 375# define Q_NO_EXCEPTIONS
370# endif 376# endif
371 377
372/* Using the `using' keyword avoids Intel C++ warnings */ 378/* Using the `using' keyword avoids Intel C++ warnings */
373# elif defined(__INTEL_COMPILER) 379# elif defined(__INTEL_COMPILER)
374# define Q_CC_INTEL 380# define Q_CC_INTEL
375# if !defined(__EXCEPTIONS) 381# if !defined(__EXCEPTIONS)
376# define Q_NO_EXCEPTIONS 382# define Q_NO_EXCEPTIONS
377# endif 383# endif
378 384
379/* The Portland Group compiler is based on EDG and does define __EDG__ */ 385/* The Portland Group compiler is based on EDG and does define __EDG__ */
380# elif defined(__PGI) 386# elif defined(__PGI)
381# define Q_CC_PGI 387# define Q_CC_PGI
382# if !defined(__EXCEPTIONS) 388# if !defined(__EXCEPTIONS)
383# define Q_NO_EXCEPTIONS 389# define Q_NO_EXCEPTIONS
384# endif 390# endif
385 391
386/* Never tested! */ 392/* Never tested! */
387# elif defined(__ghs) 393# elif defined(__ghs)
388# define Q_CC_GHS 394# define Q_CC_GHS
389 395
390/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ 396/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
391# elif defined(__USLC__) && defined(__SCO_VERSION__) 397# elif defined(__USLC__) && defined(__SCO_VERSION__)
392# define Q_CC_USLC 398# define Q_CC_USLC
399/* The latest UDK 7.1.1b does not need this, but previous versions do */
400# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
401# define Q_INLINE_TEMPLATES inline
402# endif
393# define Q_NO_USING_KEYWORD /* ### check "using" status */ 403# define Q_NO_USING_KEYWORD /* ### check "using" status */
394 404
395/* Never tested! */ 405/* Never tested! */
396# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) 406# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
397# define Q_CC_OC 407# define Q_CC_OC
398# define Q_NO_USING_KEYWORD 408# define Q_NO_USING_KEYWORD
399 409
400/* CDS++ is not documented to define __EDG__ or __EDG in the Reliant 410/* CDS++ defines __EDG__ although this is not documented in the Reliant
401 documentation but we suppose it does, in any case it does follow 411 documentation. It also follows conventions like _BOOL and this documented */
402 conventions like _BOOL */
403# elif defined(sinix) 412# elif defined(sinix)
404# define Q_CC_CDS 413# define Q_CC_CDS
405# define Q_NO_USING_KEYWORD 414# define Q_NO_USING_KEYWORD
406# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */ 415# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
407# define Q_NO_EXCEPTIONS 416# define Q_NO_EXCEPTIONS
408# endif 417# endif
409 418
410/* The MIPSpro compiler in o32 mode is based on EDG but disables features 419/* The MIPSpro compiler in o32 mode is based on EDG but disables features
411 such as template specialization nevertheless */ 420 such as template specialization nevertheless */
412# elif defined(__sgi) 421# elif defined(__sgi)
413# define Q_CC_MIPS 422# define Q_CC_MIPS
414# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ 423# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
415# define Q_TYPENAME 424# define Q_TYPENAME
416# define Q_BROKEN_TEMPLATE_SPECIALIZATION 425# define Q_BROKEN_TEMPLATE_SPECIALIZATION
417# define Q_STRICT_INLINING_RULES 426# define Q_STRICT_INLINING_RULES
427# define Q_NO_EXPLICIT_KEYWORD
428# define Q_INLINE_TEMPLATES inline
418# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ 429# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
419# define Q_TYPENAME 430# define Q_TYPENAME
420# define Q_BROKEN_TEMPLATE_SPECIALIZATION 431# define Q_BROKEN_TEMPLATE_SPECIALIZATION
421# endif 432# endif
422# define Q_NO_USING_KEYWORD /* ### check "using" status */ 433# define Q_NO_USING_KEYWORD /* ### check "using" status */
423# endif 434# endif
424 435
425/* The older UnixWare 2.X compiler? */ 436/* The older UnixWare 2.X compiler? */
426#elif defined(__USLC__) && !defined(__SCO_VERSION__) 437#elif defined(__USLC__)
427# define Q_CC_USLC 438# define Q_CC_USLC
439# define Q_TYPENAME
428# define Q_NO_BOOL_TYPE 440# define Q_NO_BOOL_TYPE
429# define Q_NO_EXPLICIT_KEYWORD 441# define Q_NO_EXPLICIT_KEYWORD
430# define Q_NO_USING_KEYWORD 442# define Q_NO_USING_KEYWORD
443# define Q_INLINE_TEMPLATES inline
431 444
432/* Never tested! */ 445/* Never tested! */
433#elif defined(__HIGHC__) 446#elif defined(__HIGHC__)
434# define Q_CC_HIGHC 447# define Q_CC_HIGHC
435 448
436#elif defined(__SUNPRO_CC) 449#elif defined(__SUNPRO_CC)
437# define Q_CC_SUN 450# define Q_CC_SUN
438/* 5.0 compiler or better 451/* 5.0 compiler or better
439 'bool' is enabled by default but can be disabled using -features=nobool 452 'bool' is enabled by default but can be disabled using -features=nobool
440 in which case _BOOL is not defined 453 in which case _BOOL is not defined
441 this is the default in 4.2 compatibility mode triggered by -compat=4 */ 454 this is the default in 4.2 compatibility mode triggered by -compat=4 */
442# if __SUNPRO_CC >= 0x500 455# if __SUNPRO_CC >= 0x500
443# if !defined(_BOOL) 456# if !defined(_BOOL)
444# define Q_NO_BOOL_TYPE 457# define Q_NO_BOOL_TYPE
445# endif 458# endif
446# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) 459# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
447# define Q_NO_USING_KEYWORD 460# define Q_NO_USING_KEYWORD
448# endif 461# endif
449# define Q_C_CALLBACKS 462# define Q_C_CALLBACKS
450/* 4.2 compiler or older */ 463/* 4.2 compiler or older */
451# else 464# else
452# define Q_NO_BOOL_TYPE 465# define Q_NO_BOOL_TYPE
453# define Q_NO_EXPLICIT_KEYWORD 466# define Q_NO_EXPLICIT_KEYWORD
454# define Q_NO_USING_KEYWORD 467# define Q_NO_USING_KEYWORD
455# endif 468# endif
456 469
470/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
471 documentation but nevertheless uses EDG conventions like _BOOL */
472#elif defined(sinix)
473# define Q_CC_EDG
474# define Q_CC_CDS
475# if !defined(_BOOL)
476# define Q_NO_BOOL_TYPE
477# endif
478# define Q_BROKEN_TEMPLATE_SPECIALIZATION
479
457#elif defined(Q_OS_HPUX) 480#elif defined(Q_OS_HPUX)
458/* __HP_aCC was not defined in first aCC releases */ 481/* __HP_aCC was not defined in first aCC releases */
459# if defined(__HP_aCC) || __cplusplus >= 199707L 482# if defined(__HP_aCC) || __cplusplus >= 199707L
460# define Q_CC_HPACC 483# define Q_CC_HPACC
461# else 484# else
462# define Q_CC_HP 485# define Q_CC_HP
463# define Q_NO_BOOL_TYPE 486# define Q_NO_BOOL_TYPE
464# define Q_FULL_TEMPLATE_INSTANTIATION 487# define Q_FULL_TEMPLATE_INSTANTIATION
465# define Q_BROKEN_TEMPLATE_SPECIALIZATION 488# define Q_BROKEN_TEMPLATE_SPECIALIZATION
466# define Q_NO_EXPLICIT_KEYWORD 489# define Q_NO_EXPLICIT_KEYWORD
467# endif 490# endif
468# define Q_NO_USING_KEYWORD /* ### check "using" status */ 491# define Q_NO_USING_KEYWORD /* ### check "using" status */
469 492
470#else 493#else
471# error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" 494# error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
472#endif 495#endif
473 496
474#ifndef Q_PACKED 497#ifndef Q_PACKED
475# define Q_PACKED 498# define Q_PACKED
476#endif 499#endif
477 500
478 501
479/* 502/*
480 The window system, must be one of: (Q_WS_x) 503 The window system, must be one of: (Q_WS_x)
@@ -485,48 +508,49 @@
485 WIN32- Windows 508 WIN32- Windows
486 X11- X Window System 509 X11- X Window System
487 PM - unsupported 510 PM - unsupported
488 WIN16- unsupported 511 WIN16- unsupported
489*/ 512*/
490 513
491#if defined(Q_OS_MAC9) 514#if defined(Q_OS_MAC9)
492# define Q_WS_MAC9 515# define Q_WS_MAC9
493#elif defined(Q_OS_MSDOS) 516#elif defined(Q_OS_MSDOS)
494# define Q_WS_WIN16 517# define Q_WS_WIN16
495# error "Qt requires Win32 and does not work with Windows 3.x" 518# error "Qt requires Win32 and does not work with Windows 3.x"
496#elif defined(_WIN32_X11_) 519#elif defined(_WIN32_X11_)
497# define Q_WS_X11 520# define Q_WS_X11
498#elif defined(Q_OS_WIN32) 521#elif defined(Q_OS_WIN32)
499# define Q_WS_WIN32 522# define Q_WS_WIN32
500# if defined(Q_OS_WIN64) 523# if defined(Q_OS_WIN64)
501# define Q_WS_WIN64 524# define Q_WS_WIN64
502# endif 525# endif
503#elif defined(Q_OS_OS2) 526#elif defined(Q_OS_OS2)
504# define Q_WS_PM 527# define Q_WS_PM
505# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" 528# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
506#elif defined(Q_OS_UNIX) 529#elif defined(Q_OS_UNIX)
507# if defined(QWS) 530# if defined(QWS)
508# define Q_WS_QWS 531# define Q_WS_QWS
532# define QT_NO_QWS_IM
509# elif defined(Q_OS_MACX) 533# elif defined(Q_OS_MACX)
510# define Q_WS_MACX 534# define Q_WS_MACX
511# else 535# else
512# define Q_WS_X11 536# define Q_WS_X11
513# endif 537# endif
514#endif 538#endif
515#if defined(Q_OS_MAC) && !defined(QMAC_PASCAL) 539#if defined(Q_OS_MAC) && !defined(QMAC_PASCAL)
516# define QMAC_PASCAL 540# define QMAC_PASCAL
517#endif 541#endif
518 542
519#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) 543#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)
520# define Q_WS_WIN 544# define Q_WS_WIN
521#endif 545#endif
522 546
523#if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11) 547#if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11)
524# define Q_WS_MAC 548# define Q_WS_MAC
525#endif 549#endif
526 550
527 551
528/* 552/*
529 Some classes do not permit copies to be made of an object. 553 Some classes do not permit copies to be made of an object.
530 These classes contains a private copy constructor and operator= 554 These classes contains a private copy constructor and operator=
531 to disable copying (the compiler gives an error message). 555 to disable copying (the compiler gives an error message).
532 Undefine Q_DISABLE_COPY to turn off this checking. 556 Undefine Q_DISABLE_COPY to turn off this checking.
@@ -724,107 +748,125 @@ class QDataStream;
724#endif 748#endif
725 749
726#if defined(Q_WS_MAC9) 750#if defined(Q_WS_MAC9)
727//No need for menu merging 751//No need for menu merging
728# ifndef QMAC_QMENUBAR_NO_MERGE 752# ifndef QMAC_QMENUBAR_NO_MERGE
729# define QMAC_QMENUBAR_NO_MERGE 753# define QMAC_QMENUBAR_NO_MERGE
730# endif 754# endif
731//Mac9 does not use quartz 755//Mac9 does not use quartz
732# ifndef QMAC_NO_QUARTZ 756# ifndef QMAC_NO_QUARTZ
733# define QMAC_NO_QUARTZ 757# define QMAC_NO_QUARTZ
734# endif 758# endif
735# ifndef QMAC_QMENUBAR_NO_EVENT 759# ifndef QMAC_QMENUBAR_NO_EVENT
736# define QMAC_QMENUBAR_NO_EVENT 760# define QMAC_QMENUBAR_NO_EVENT
737# endif 761# endif
738#endif 762#endif
739#if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks 763#if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks
740# ifndef QMAC_NO_QUARTZ 764# ifndef QMAC_NO_QUARTZ
741# define QMAC_NO_QUARTZ 765# define QMAC_NO_QUARTZ
742# endif 766# endif
743# ifndef QMAC_QMENUBAR_NO_EVENT 767# ifndef QMAC_QMENUBAR_NO_EVENT
744# define QMAC_QMENUBAR_NO_EVENT 768# define QMAC_QMENUBAR_NO_EVENT
745# endif 769# endif
746#endif 770#endif
747 771
772#if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
773# define QT_NO_COP
774#endif
775
748#ifndef QT_H 776#ifndef QT_H
749#include <qfeatures.h> 777#include <qfeatures.h>
750#endif // QT_H 778#endif // QT_H
751 779
752 780
753// 781//
754// Create Qt DLL if QT_DLL is defined (Windows only) 782// Create Qt DLL if QT_DLL is defined (Windows only)
783// or QT_SHARED is defined (Kylix only)
755// 784//
756 785
757#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) 786#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
758# if defined(QT_NODLL) 787# if defined(QT_NODLL)
759# undef QT_MAKEDLL 788# undef QT_MAKEDLL
760# undef QT_DLL 789# undef QT_DLL
761 # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ 790 # elif defined(QT_MAKEDLL)/* create a Qt DLL library */
762# if defined(QT_DLL) 791# if defined(QT_DLL)
763# undef QT_DLL 792# undef QT_DLL
764# endif 793# endif
765# define Q_EXPORT __declspec(dllexport) 794# define Q_EXPORT __declspec(dllexport)
766# define Q_TEMPLATEDLL 795# define Q_TEMPLATEDLL
767# define Q_TEMPLATE_EXTERN 796# define Q_TEMPLATE_EXTERN
768 # undef Q_DISABLE_COPY/* avoid unresolved externals */ 797 # undef Q_DISABLE_COPY/* avoid unresolved externals */
769 # elif defined(QT_DLL) /* use a Qt DLL library */ 798 # elif defined(QT_DLL) /* use a Qt DLL library */
770# define Q_EXPORT __declspec(dllimport) 799# define Q_EXPORT __declspec(dllimport)
771# define Q_TEMPLATEDLL 800# define Q_TEMPLATEDLL
772# ifndef Q_TEMPLATE_EXTERN 801# ifndef Q_TEMPLATE_EXTERN
773# if defined(Q_CC_MSVC) 802# if defined(Q_CC_MSVC_NET)
774# define Q_TEMPLATE_EXTERN /*extern*/ //### too many warnings, even though disabled 803# define Q_TEMPLATE_EXTERN extern
775# else 804# else
776# define Q_TEMPLATE_EXTERN 805# define Q_TEMPLATE_EXTERN
777# endif 806# endif
778# endif 807# endif
779# undef Q_DISABLE_COPY /* avoid unresolved externals */ 808# undef Q_DISABLE_COPY /* avoid unresolved externals */
780# endif 809# endif
810#elif defined(Q_OS_LINUX) && defined(Q_CC_BOR)
811 # if defined(QT_SHARED)/* create a Qt shared library */
812# define Q_EXPORT __declspec(dllexport)
813# define Q_TEMPLATEDLL
814# define Q_TEMPLATE_EXTERN
815 # undef Q_DISABLE_COPY/* avoid unresolved externals */
816# else
817# define Q_TEMPLATEDLL
818# define Q_TEMPLATE_EXTERN
819 # undef Q_DISABLE_COPY /* avoid unresolved externals */
820# endif
781#else 821#else
782 # undef QT_MAKEDLL /* ignore these for other platforms */ 822 # undef QT_MAKEDLL /* ignore these for other platforms */
783# undef QT_DLL 823# undef QT_DLL
784#endif 824#endif
785 825
786#ifndef Q_EXPORT 826#ifndef Q_EXPORT
787# define Q_EXPORT 827# define Q_EXPORT
788#endif 828#endif
789 829
790 830
791// 831//
792// Some platform specific stuff 832// Some platform specific stuff
793// 833//
794 834
795#if defined(Q_WS_WIN) 835#if defined(Q_WS_WIN)
796extern Q_EXPORT bool qt_winunicode; 836extern Q_EXPORT bool qt_winunicode;
797#endif 837#endif
798 838
799 839
800// 840//
801// System information 841// System information
802// 842//
803 843
804Q_EXPORT const char *qVersion(); 844Q_EXPORT const char *qVersion();
805Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); 845Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
806#if defined(Q_WS_WIN) 846#if defined(Q_OS_MAC)
847int qMacVersion();
848#elif defined(Q_WS_WIN)
807Q_EXPORT int qWinVersion(); 849Q_EXPORT int qWinVersion();
808#if defined(UNICODE) 850#if defined(UNICODE)
809#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } 851#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
810#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) 852#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
811#else 853#else
812#define QT_WA( uni, ansi ) ansi 854#define QT_WA( uni, ansi ) ansi
813#define QT_WA_INLINE( uni, ansi ) ansi 855#define QT_WA_INLINE( uni, ansi ) ansi
814#endif 856#endif
815#endif 857#endif
816 858
817#ifdef Q_OS_TEMP 859#ifdef Q_OS_TEMP
818#ifdef QT_WA 860#ifdef QT_WA
819#undef QT_WA 861#undef QT_WA
820#undef QT_WA_INLINE 862#undef QT_WA_INLINE
821#endif 863#endif
822#define QT_WA( uni, ansi ) uni 864#define QT_WA( uni, ansi ) uni
823#define QT_WA_INLINE( uni, ansi ) ( uni ) 865#define QT_WA_INLINE( uni, ansi ) ( uni )
824#endif 866#endif
825 867
826#ifndef Q_INLINE_TEMPLATES 868#ifndef Q_INLINE_TEMPLATES
827# define Q_INLINE_TEMPLATES 869# define Q_INLINE_TEMPLATES
828#endif 870#endif
829 871
830#ifndef Q_TYPENAME 872#ifndef Q_TYPENAME
@@ -948,59 +990,76 @@ typedef QtMsgHandler msg_handler;
948#endif // QT_NO_COMPAT 990#endif // QT_NO_COMPAT
949 991
950Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE ); 992Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE );
951 993
952Q_EXPORT void qObsolete( const char *obj, const char *oldfunc, 994Q_EXPORT void qObsolete( const char *obj, const char *oldfunc,
953 const char *newfunc ); 995 const char *newfunc );
954Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); 996Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
955Q_EXPORT void qObsolete( const char *message ); 997Q_EXPORT void qObsolete( const char *message );
956 998
957 999
958// 1000//
959// Install paths from configure 1001// Install paths from configure
960// 1002//
961 1003
962Q_EXPORT const char *qInstallPath(); 1004Q_EXPORT const char *qInstallPath();
963Q_EXPORT const char *qInstallPathDocs(); 1005Q_EXPORT const char *qInstallPathDocs();
964Q_EXPORT const char *qInstallPathHeaders(); 1006Q_EXPORT const char *qInstallPathHeaders();
965Q_EXPORT const char *qInstallPathLibs(); 1007Q_EXPORT const char *qInstallPathLibs();
966Q_EXPORT const char *qInstallPathBins(); 1008Q_EXPORT const char *qInstallPathBins();
967Q_EXPORT const char *qInstallPathPlugins(); 1009Q_EXPORT const char *qInstallPathPlugins();
968Q_EXPORT const char *qInstallPathData(); 1010Q_EXPORT const char *qInstallPathData();
969 1011
970#endif // __cplusplus 1012#endif // __cplusplus
971 1013
1014// compilers which follow outdated template instantiation rules
1015// require a class to have a comparison operator to exist when
1016// a QValueList of this type is instantiated. It's not actually
1017// used in the list, though. Hence the dummy implementation.
1018// Just in case other code relies on it we better trigger a warning
1019// mandating a real implementation.
1020#ifdef Q_FULL_TEMPLATE_INSTANTIATION
1021# define Q_DUMMY_COMPARISON_OPERATOR(C) \
1022 bool operator==( const C& ) const { \
1023 qWarning( #C"::operator==( const "#C"& ) got called." ); \
1024 return FALSE; \
1025 }
1026#else
1027# define Q_DUMMY_COMPARISON_OPERATOR(C)
1028#endif
1029
972#endif // QGLOBAL_H 1030#endif // QGLOBAL_H
973 1031
974// 1032//
975// Avoid some particularly useless warnings from some stupid compilers. 1033// Avoid some particularly useless warnings from some stupid compilers.
976// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out 1034// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
977// the line "#define QT_NO_WARNINGS" 1035// the line "#define QT_NO_WARNINGS"
978// 1036//
979 1037
980#if !defined(QT_CC_WARNINGS) 1038#if !defined(QT_CC_WARNINGS)
981# define QT_NO_WARNINGS 1039# define QT_NO_WARNINGS
982#endif 1040#endif
983#if defined(QT_NO_WARNINGS) 1041#if defined(QT_NO_WARNINGS)
984# if defined(Q_CC_MSVC) 1042# if defined(Q_CC_MSVC)
985# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data 1043# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
986# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' 1044# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
987# pragma warning(disable: 4514) // unreferenced inline/local function has been removed 1045# pragma warning(disable: 4514) // unreferenced inline/local function has been removed
988# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning) 1046# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
989# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' 1047# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
990# pragma warning(disable: 4706) // assignment within conditional expression 1048# pragma warning(disable: 4706) // assignment within conditional expression
991# pragma warning(disable: 4786) // truncating debug info after 255 characters 1049# pragma warning(disable: 4786) // truncating debug info after 255 characters
992# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated 1050# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
993# pragma warning(disable: 4355) // 'this' : used in base member initializer list 1051# pragma warning(disable: 4355) // 'this' : used in base member initializer list
994# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation 1052# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
1053# pragma warning(disable: 4710) // function not inlined
995# elif defined(Q_CC_BOR) 1054# elif defined(Q_CC_BOR)
996# pragma option -w-inl 1055# pragma option -w-inl
997# pragma option -w-aus 1056# pragma option -w-aus
998# pragma warn -inl 1057# pragma warn -inl
999# pragma warn -pia 1058# pragma warn -pia
1000# pragma warn -ccc 1059# pragma warn -ccc
1001# pragma warn -rch 1060# pragma warn -rch
1002# pragma warn -sig 1061# pragma warn -sig
1003# elif defined(Q_CC_MWERKS) 1062# elif defined(Q_CC_MWERKS)
1004# pragma warn_possunwant off 1063# pragma warn_possunwant off
1005# endif 1064# endif
1006#endif 1065#endif