47 #define QT_VERSION_STR "4.8.6"
51 #define QT_VERSION 0x040806
55 #define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
57 #define QT_PACKAGEDATE_STR "2014-04-10"
59 #define QT_PACKAGE_TAG "68a911862e05400ced87971c43fb27fb5d5d8ebd"
61 #if !defined(QT_BUILD_MOC)
73 # define QT_PREPEND_NAMESPACE(name) ::name
74 # define QT_USE_NAMESPACE
75 # define QT_BEGIN_NAMESPACE
76 # define QT_END_NAMESPACE
77 # define QT_BEGIN_INCLUDE_NAMESPACE
78 # define QT_END_INCLUDE_NAMESPACE
79 # define QT_BEGIN_MOC_NAMESPACE
80 # define QT_END_MOC_NAMESPACE
81 # define QT_FORWARD_DECLARE_CLASS(name) class name;
82 # define QT_FORWARD_DECLARE_STRUCT(name) struct name;
83 # define QT_MANGLE_NAMESPACE(name) name
87 # define QT_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
88 # define QT_USE_NAMESPACE using namespace ::QT_NAMESPACE;
89 # define QT_BEGIN_NAMESPACE namespace QT_NAMESPACE {
90 # define QT_END_NAMESPACE }
91 # define QT_BEGIN_INCLUDE_NAMESPACE }
92 # define QT_END_INCLUDE_NAMESPACE namespace QT_NAMESPACE {
93 # define QT_BEGIN_MOC_NAMESPACE QT_USE_NAMESPACE
94 # define QT_END_MOC_NAMESPACE
95 # define QT_FORWARD_DECLARE_CLASS(name) \
96 QT_BEGIN_NAMESPACE class name; QT_END_NAMESPACE \
97 using QT_PREPEND_NAMESPACE(name);
99 # define QT_FORWARD_DECLARE_STRUCT(name) \
100 QT_BEGIN_NAMESPACE struct name; QT_END_NAMESPACE \
101 using QT_PREPEND_NAMESPACE(name);
103 # define QT_MANGLE_NAMESPACE0(x) x
104 # define QT_MANGLE_NAMESPACE1(a, b) a##_##b
105 # define QT_MANGLE_NAMESPACE2(a, b) QT_MANGLE_NAMESPACE1(a,b)
106 # define QT_MANGLE_NAMESPACE(name) QT_MANGLE_NAMESPACE2( \
107 QT_MANGLE_NAMESPACE0(name), QT_MANGLE_NAMESPACE0(QT_NAMESPACE))
109 namespace QT_NAMESPACE {}
111 # ifndef QT_BOOTSTRAPPED
112 # ifndef QT_NO_USING_NAMESPACE
127 # define QT_BEGIN_NAMESPACE
128 # define QT_END_NAMESPACE
129 # define QT_USE_NAMESPACE
130 # define QT_BEGIN_INCLUDE_NAMESPACE
131 # define QT_END_INCLUDE_NAMESPACE
135 #if defined(Q_OS_MAC) && !defined(Q_CC_INTEL)
136 #define QT_BEGIN_HEADER extern "C++" {
137 #define QT_END_HEADER }
138 #define QT_BEGIN_INCLUDE_HEADER }
139 #define QT_END_INCLUDE_HEADER extern "C++" {
141 #define QT_BEGIN_HEADER
142 #define QT_END_HEADER
143 #define QT_BEGIN_INCLUDE_HEADER
144 #define QT_END_INCLUDE_HEADER extern "C++"
181 #if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
185 # define Q_OS_DARWIN64
187 # define Q_OS_DARWIN32
189 #elif defined(__SYMBIAN32__) || defined(SYMBIAN)
190 # define Q_OS_SYMBIAN
191 # define Q_NO_POSIX_SIGNALS
192 # define QT_NO_GETIFADDRS
193 #elif defined(__CYGWIN__)
195 #elif defined(MSDOS) || defined(_MSDOS)
197 #elif defined(__OS2__)
198 # if defined(__EMX__)
203 #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
206 #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
207 # if defined(WINCE) || defined(_WIN32_WCE)
212 #elif defined(__MWERKS__) && defined(__INTEL__)
214 #elif defined(__sun) || defined(sun)
215 # define Q_OS_SOLARIS
216 #elif defined(hpux) || defined(__hpux)
218 #elif defined(__ultrix) || defined(ultrix)
221 # define Q_OS_RELIANT
222 #elif defined(__native_client__)
224 #elif defined(__linux__) || defined(__linux)
226 #elif defined(__FreeBSD__) || defined(__DragonFly__)
227 # define Q_OS_FREEBSD
229 #elif defined(__NetBSD__)
232 #elif defined(__OpenBSD__)
233 # define Q_OS_OPENBSD
235 #elif defined(__bsdi__)
240 #elif defined(__osf__)
244 #elif defined(__Lynx__)
246 #elif defined(__GNU__)
248 #elif defined(__DGUX__)
250 #elif defined(__QNXNTO__)
252 #elif defined(_SEQUENT_)
254 #elif defined(_SCO_DS)
256 #elif defined(__USLC__)
257 # define Q_OS_UNIXWARE
258 #elif defined(__svr4__) && defined(i386)
259 # define Q_OS_UNIXWARE
260 #elif defined(__INTEGRITY)
261 # define Q_OS_INTEGRITY
262 #elif defined(VXWORKS)
263 # define Q_OS_VXWORKS
264 #elif defined(__MAKEDEPEND__)
266 # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
269 #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) || defined(Q_OS_WINCE)
273 #if defined(Q_OS_DARWIN)
276 # if defined(Q_OS_DARWIN64)
278 # elif defined(Q_OS_DARWIN32)
283 #ifdef QT_AUTODETECT_COCOA
285 # define QT_MAC_USE_COCOA 1
286 # define QT_BUILD_KEY QT_BUILD_KEY_COCOA
288 # define QT_BUILD_KEY QT_BUILD_KEY_CARBON
292 #if defined(Q_WS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE) && !defined(QT_BOOTSTRAPPED)
293 #error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."
296 #if defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
298 #elif !defined(Q_OS_UNIX)
302 #if defined(Q_OS_DARWIN) && !defined(QT_LARGEFILE_SUPPORT)
303 # define QT_LARGEFILE_SUPPORT 64
307 # ifdef MAC_OS_X_VERSION_MIN_REQUIRED
308 # undef MAC_OS_X_VERSION_MIN_REQUIRED
310 # define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4
311 # include <AvailabilityMacros.h>
312 # if !defined(MAC_OS_X_VERSION_10_3)
313 # define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1
315 # if !defined(MAC_OS_X_VERSION_10_4)
316 # define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1
318 # if !defined(MAC_OS_X_VERSION_10_5)
319 # define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1
321 # if !defined(MAC_OS_X_VERSION_10_6)
322 # define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1
324 # if !defined(MAC_OS_X_VERSION_10_7)
325 # define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1
327 # if !defined(MAC_OS_X_VERSION_10_8)
328 # define MAC_OS_X_VERSION_10_8 MAC_OS_X_VERSION_10_7 + 1
330 # if !defined(MAC_OS_X_VERSION_10_9)
331 # define MAC_OS_X_VERSION_10_9 MAC_OS_X_VERSION_10_8 + 1
335 #ifdef __LSB_VERSION__
336 # if __LSB_VERSION__ < 40
337 # error "This version of the Linux Standard Base is unsupported"
340 # define QT_LINUXBASE
377 # define Q_OUTOFLINE_TEMPLATE inline
380 # define Q_CONSTRUCTOR_FUNCTION0(AFUNC) \
381 static const int AFUNC ## _init_variable_ = AFUNC();
382 # define Q_CONSTRUCTOR_FUNCTION(AFUNC) Q_CONSTRUCTOR_FUNCTION0(AFUNC)
383 # define Q_DESTRUCTOR_FUNCTION0(AFUNC) \
384 class AFUNC ## _dest_class_ { \
386 inline AFUNC ## _dest_class_() { } \
387 inline ~ AFUNC ## _dest_class_() { AFUNC(); } \
388 } AFUNC ## _dest_instance_;
389 # define Q_DESTRUCTOR_FUNCTION(AFUNC) Q_DESTRUCTOR_FUNCTION0(AFUNC)
394 #if defined(__DMC__) || defined(__SC__)
397 # if defined(__SC__) && __SC__ < 0x750
398 # define Q_NO_EXPLICIT_KEYWORD
400 # define Q_NO_USING_KEYWORD
402 #elif defined(__MWERKS__)
404 # if defined(__EMU_SYMBIAN_OS__)
405 # define Q_CC_NOKIAX86
409 #elif defined(_MSC_VER)
411 # define Q_CC_MSVC_NET
412 # define Q_CANNOT_DELETE_CONSTANT
413 # define Q_OUTOFLINE_TEMPLATE inline
414 # define Q_NO_TEMPLATE_FRIENDS
415 # define Q_ALIGNOF(type) __alignof(type)
416 # define Q_DECL_ALIGN(n) __declspec(align(n))
418 # if defined(__INTEL_COMPILER)
422 # if (defined(Q_CC_MSVC) && defined(_M_X64))
425 # undef QT_HAVE_3DNOW
428 #if defined(Q_CC_MSVC) && _MSC_VER >= 1600
429 # define Q_COMPILER_RVALUE_REFS
430 # define Q_COMPILER_AUTO_FUNCTION
431 # define Q_COMPILER_AUTO_TYPE
432 # define Q_COMPILER_LAMBDA
433 # define Q_COMPILER_DECLTYPE
439 #elif defined(__BORLANDC__) || defined(__TURBOC__)
441 # define Q_INLINE_TEMPLATE
442 # if __BORLANDC__ < 0x502
443 # define Q_NO_BOOL_TYPE
444 # define Q_NO_EXPLICIT_KEYWORD
446 # define Q_NO_USING_KEYWORD
448 #elif defined(__WATCOMC__)
452 #elif defined(__GCCE__)
454 # define QT_VISIBILITY_AVAILABLE
455 # if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
456 # define QT_HAVE_ARMV6
462 #elif defined(__ARMCC__) || defined(__CC_ARM)
464 # if __TARGET_ARCH_ARM >= 6
465 # define QT_HAVE_ARMV6
468 # define __is_empty(X) false
469 # define __is_pod(X) false
470 #elif defined(__GNUC__)
472 # define Q_C_CALLBACKS
473 # if defined(__MINGW32__)
476 # if defined(__INTEL_COMPILER)
480 # if defined(__clang__)
485 # define Q_NO_DEPRECATED_CONSTRUCTORS
487 # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
488 # define Q_FULL_TEMPLATE_INSTANTIATION
491 # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
492 # define Q_NO_USING_KEYWORD
493 # define QT_NO_STL_WCHAR
495 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
496 # define Q_ALIGNOF(type) __alignof__(type)
497 # define Q_TYPEOF(expr) __typeof__(expr)
498 # define Q_DECL_ALIGN(n) __attribute__((__aligned__(n)))
500 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
501 # define Q_LIKELY(expr) __builtin_expect(!!(expr), true)
502 # define Q_UNLIKELY(expr) __builtin_expect(!!(expr), false)
505 # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
506 # define Q_WRONG_SB_CTYPE_MACROS
509 # if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ <= 3)
510 # define Q_NO_TEMPLATE_FRIENDS
513 # if defined(Q_OS_DARWIN) && __GNUC__ == 3 && (__GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 3)
514 # define Q_BROKEN_DEBUG_STREAM
516 # if (defined(Q_CC_GNU) || defined(Q_CC_INTEL)) && !defined(QT_MOC_CPP)
517 # define Q_PACKED __attribute__ ((__packed__))
518 # define Q_NO_PACKED_REFERENCE
519 # ifndef __ARM_EABI__
520 # define QT_NO_ARM_EABI
523 # if defined(__GXX_EXPERIMENTAL_CXX0X__)
524 # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
526 # define Q_COMPILER_RVALUE_REFS
527 # define Q_COMPILER_DECLTYPE
529 # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
531 # define Q_COMPILER_VARIADIC_TEMPLATES
532 # define Q_COMPILER_AUTO_FUNCTION
533 # define Q_COMPILER_AUTO_TYPE
534 # define Q_COMPILER_EXTERN_TEMPLATES
535 # define Q_COMPILER_DEFAULT_DELETE_MEMBERS
536 # define Q_COMPILER_CLASS_ENUM
537 # define Q_COMPILER_INITIALIZER_LISTS
539 # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
541 # define Q_COMPILER_LAMBDA
542 # define Q_COMPILER_UNICODE_STRINGS
544 # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
546 # define Q_COMPILER_CONSTEXPR
573 #elif defined(__xlC__)
575 # define Q_FULL_TEMPLATE_INSTANTIATION
577 # define Q_NO_BOOL_TYPE
578 # define Q_NO_EXPLICIT_KEYWORD
579 # define Q_NO_USING_KEYWORD
581 # define Q_OUTOFLINE_TEMPLATE inline
582 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
583 # define Q_CANNOT_DELETE_CONSTANT
584 # elif __xlC__ >= 0x0600
585 # define Q_ALIGNOF(type) __alignof__(type)
586 # define Q_TYPEOF(expr) __typeof__(expr)
587 # define Q_DECL_ALIGN(n) __attribute__((__aligned__(n)))
588 # define Q_PACKED __attribute__((__packed__))
596 #elif defined(__DECCXX) || defined(__DECC)
600 # if defined(__EDG__)
606 # if !defined(_BOOL_EXISTS)
607 # define Q_NO_BOOL_TYPE
610 # define Q_NO_USING_KEYWORD
613 # if __DECCXX_VER < 60060000
615 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
616 # define Q_CANNOT_DELETE_CONSTANT
619 # define Q_OUTOFLINE_TEMPLATE inline
625 # if defined(__EDG__)
633 #elif !defined(Q_OS_HPUX) && (defined(__EDG) || defined(__EDG__))
642 # if !defined(_BOOL) && !defined(__BOOL_DEFINED)
643 # define Q_NO_BOOL_TYPE
647 # if defined(__COMO__)
649 # define Q_C_CALLBACKS
655 # elif defined(__KCC)
657 # define Q_NO_USING_KEYWORD
660 # elif defined(__INTEL_COMPILER)
664 # elif defined(__ghs)
667 # elif defined(__DCC__)
669 # undef Q_NO_BOOL_TYPE
670 # if !defined(__bool)
671 # define Q_NO_BOOL_TYPE
675 # elif defined(__USLC__) && defined(__SCO_VERSION__)
678 # if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
679 # define Q_OUTOFLINE_TEMPLATE inline
681 # define Q_NO_USING_KEYWORD
684 # elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
686 # define Q_NO_USING_KEYWORD
690 # elif defined(sinix)
692 # define Q_NO_USING_KEYWORD
695 # elif defined(__sgi)
697 # define Q_NO_USING_KEYWORD
698 # define Q_NO_TEMPLATE_FRIENDS
699 # if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
700 # define Q_OUTOFLINE_TEMPLATE inline
701 # pragma set woff 3624,3625,3649
707 #elif defined(_DIAB_TOOL)
711 #elif defined(__HIGHC__)
714 #elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
720 # if __SUNPRO_CC >= 0x500
721 # if __SUNPRO_CC < 0x590
722 # define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
725 # if __SUNPRO_CC >= 0x590
726 # define Q_ALIGNOF(type) __alignof__(type)
727 # define Q_TYPEOF(expr) __typeof__(expr)
728 # define Q_DECL_ALIGN(n) __attribute__((__aligned__(n)))
730 # if __SUNPRO_CC >= 0x550
731 # define Q_DECL_EXPORT __global
733 # if __SUNPRO_CC < 0x5a0
734 # define Q_NO_TEMPLATE_FRIENDS
737 # define Q_NO_BOOL_TYPE
739 # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
740 # define Q_NO_USING_KEYWORD
742 # define Q_C_CALLBACKS
745 # define Q_NO_BOOL_TYPE
746 # define Q_NO_EXPLICIT_KEYWORD
747 # define Q_NO_USING_KEYWORD
756 # define Q_NO_BOOL_TYPE
758 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
760 #elif defined(Q_OS_HPUX)
762 # if defined(__HP_aCC) || __cplusplus >= 199707L
763 # define Q_NO_TEMPLATE_FRIENDS
765 # if __HP_aCC-0 < 060000
766 # define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
767 # define Q_DECL_EXPORT __declspec(dllexport)
768 # define Q_DECL_IMPORT __declspec(dllimport)
770 # if __HP_aCC-0 >= 061200
771 # define Q_DECL_ALIGN(n) __attribute__((aligned(n)))
773 # if __HP_aCC-0 >= 062000
774 # define Q_DECL_EXPORT __attribute__((visibility("default")))
775 # define Q_DECL_HIDDEN __attribute__((visibility("hidden")))
776 # define Q_DECL_IMPORT Q_DECL_EXPORT
780 # define Q_NO_BOOL_TYPE
781 # define Q_FULL_TEMPLATE_INSTANTIATION
782 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
783 # define Q_NO_EXPLICIT_KEYWORD
785 # define Q_NO_USING_KEYWORD
787 #elif defined(__WINSCW__) && !defined(Q_CC_NOKIAX86)
788 # define Q_CC_NOKIAX86
791 # error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
796 # if __INTEL_COMPILER < 1200
797 # define Q_NO_TEMPLATE_FRIENDS
799 # if defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
800 # if __INTEL_COMPILER >= 1100
801 # define Q_COMPILER_RVALUE_REFS
802 # define Q_COMPILER_EXTERN_TEMPLATES
803 # define Q_COMPILER_DECLTYPE
804 # elif __INTEL_COMPILER >= 1200
805 # define Q_COMPILER_VARIADIC_TEMPLATES
806 # define Q_COMPILER_AUTO_TYPE
807 # define Q_COMPILER_DEFAULT_DELETE_MEMBERS
808 # define Q_COMPILER_CLASS_ENUM
809 # define Q_COMPILER_LAMBDA
816 # undef Q_NO_PACKED_REFERENCE
820 # define Q_LIKELY(x) (x)
823 # define Q_UNLIKELY(x) (x)
826 #ifndef Q_CONSTRUCTOR_FUNCTION
827 # define Q_CONSTRUCTOR_FUNCTION0(AFUNC) \
828 static const int AFUNC ## __init_variable__ = AFUNC();
829 # define Q_CONSTRUCTOR_FUNCTION(AFUNC) Q_CONSTRUCTOR_FUNCTION0(AFUNC)
832 #ifndef Q_DESTRUCTOR_FUNCTION
833 # define Q_DESTRUCTOR_FUNCTION0(AFUNC) \
834 class AFUNC ## __dest_class__ { \
836 inline AFUNC ## __dest_class__() { } \
837 inline ~ AFUNC ## __dest_class__() { AFUNC(); } \
838 } AFUNC ## __dest_instance__;
839 # define Q_DESTRUCTOR_FUNCTION(AFUNC) Q_DESTRUCTOR_FUNCTION0(AFUNC)
842 #ifndef Q_REQUIRED_RESULT
843 # if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
844 # define Q_REQUIRED_RESULT __attribute__ ((warn_unused_result))
846 # define Q_REQUIRED_RESULT
850 #ifndef Q_COMPILER_MANGLES_RETURN_TYPE
851 # if defined(Q_CC_MSVC)
852 # define Q_COMPILER_MANGLES_RETURN_TYPE
857 # if defined(Q_OS_QNX) || defined(Q_OS_BLACKBERRY)
859 # if defined(_YVALS) || defined(_LIBCPP_VER)
863 # ifdef Q_COMPILER_INITIALIZER_LISTS
864 # undef Q_COMPILER_INITIALIZER_LISTS
883 #if defined(Q_OS_MSDOS)
885 # error "Qt requires Win32 and does not work with Windows 3.x"
886 #elif defined(_WIN32_X11_)
888 #elif defined(Q_OS_WIN32)
890 # if defined(Q_OS_WIN64)
893 #elif defined(Q_OS_WINCE)
896 # if defined(Q_OS_WINCE_WM)
897 # define Q_WS_WINCE_WM
899 #elif defined(Q_OS_OS2)
901 # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
902 #elif defined(Q_OS_UNIX)
903 # if defined(Q_OS_MAC) && !defined(__USE_WS_X11__) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
906 # if defined(Q_OS_MAC64)
908 # elif defined(Q_OS_MAC32)
911 # elif defined(Q_OS_SYMBIAN)
912 # if !defined(QT_NO_S60)
915 # elif !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
920 #if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) || defined(Q_WS_WINCE)
939 #if defined(Q_OS_WIN) && !defined(Q_CC_GNU) && !defined(Q_CC_MWERKS)
940 # define Q_INT64_C(c) c ## i64
941 # define Q_UINT64_C(c) c ## ui64
943 typedef unsigned __int64
quint64;
945 # define Q_INT64_C(c) static_cast<long long>(c ## LL)
946 # define Q_UINT64_C(c) static_cast<unsigned long long>(c ## ULL)
954 #ifndef QT_POINTER_SIZE
955 # if defined(Q_OS_WIN64)
956 # define QT_POINTER_SIZE 8
957 # elif defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
958 # define QT_POINTER_SIZE 4
962 #define Q_INIT_RESOURCE_EXTERN(name) \
963 extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();
965 #define Q_INIT_RESOURCE(name) \
966 do { extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); \
967 QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); } while (0)
968 #define Q_CLEANUP_RESOURCE(name) \
969 do { extern int QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); \
970 QT_MANGLE_NAMESPACE(qCleanupResources_ ## name) (); } while (0)
972 #if defined(__cplusplus)
980 template <
int>
struct QIntegerForSize;
981 template <>
struct QIntegerForSize<1> {
typedef quint8 Unsigned;
typedef qint8 Signed; };
982 template <>
struct QIntegerForSize<2> {
typedef quint16 Unsigned;
typedef qint16 Signed; };
983 template <>
struct QIntegerForSize<4> {
typedef quint32 Unsigned;
typedef qint32 Signed; };
984 template <>
struct QIntegerForSize<8> {
typedef quint64 Unsigned;
typedef qint64 Signed; };
985 template <
class T>
struct QIntegerForSizeof: QIntegerForSize<sizeof(T)> { };
986 typedef QIntegerForSizeof<void*>::Unsigned quintptr;
987 typedef QIntegerForSizeof<void*>::Signed qptrdiff;
994 typedef unsigned char uchar;
995 typedef unsigned short ushort;
996 typedef unsigned int uint;
997 typedef unsigned long ulong;
1000 #if defined(Q_NO_BOOL_TYPE)
1001 #error "Compiler doesn't support the bool type"
1008 #ifndef QT_LINUXBASE
1019 # define FALSE false
1026 #ifndef QT_NO_KEYWORDS
1027 # if defined(Q_CC_MIPS) || (defined(Q_CC_HPACC) && defined(__ia64))
1028 # define for if(0){}else for
1036 #if defined(Q_CC_MSVC)
1037 # define QT_STATIC_CONST static
1038 # define QT_STATIC_CONST_IMPL
1040 # define QT_STATIC_CONST static const
1041 # define QT_STATIC_CONST_IMPL const
1047 #if defined(Q_MOC_RUN)
1048 # define Q_DECL_DEPRECATED Q_DECL_DEPRECATED
1049 #elif (defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))) || defined(Q_CC_RVCT)
1050 # define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
1051 #elif defined(Q_CC_MSVC)
1052 # define Q_DECL_DEPRECATED __declspec(deprecated)
1053 # if defined (Q_CC_INTEL)
1054 # define Q_DECL_VARIABLE_DEPRECATED
1058 # define Q_DECL_DEPRECATED
1060 #ifndef Q_DECL_VARIABLE_DEPRECATED
1061 # define Q_DECL_VARIABLE_DEPRECATED Q_DECL_DEPRECATED
1063 #ifndef Q_DECL_CONSTRUCTOR_DEPRECATED
1064 # if defined(Q_MOC_RUN)
1065 # define Q_DECL_CONSTRUCTOR_DEPRECATED Q_DECL_CONSTRUCTOR_DEPRECATED
1066 # elif defined(Q_NO_DEPRECATED_CONSTRUCTORS)
1067 # define Q_DECL_CONSTRUCTOR_DEPRECATED
1069 # define Q_DECL_CONSTRUCTOR_DEPRECATED Q_DECL_DEPRECATED
1073 #if defined(QT_NO_DEPRECATED)
1075 # undef QT3_SUPPORT_WARNINGS
1077 # undef QT_DEPRECATED
1078 # undef QT_DEPRECATED_VARIABLE
1079 # undef QT_DEPRECATED_CONSTRUCTOR
1080 #elif defined(QT_DEPRECATED_WARNINGS)
1083 # undef QT3_SUPPORT_WARNINGS
1084 # define QT3_SUPPORT_WARNINGS
1086 # undef QT_DEPRECATED
1087 # define QT_DEPRECATED Q_DECL_DEPRECATED
1088 # undef QT_DEPRECATED_VARIABLE
1089 # define QT_DEPRECATED_VARIABLE Q_DECL_VARIABLE_DEPRECATED
1090 # undef QT_DEPRECATED_CONSTRUCTOR
1091 # define QT_DEPRECATED_CONSTRUCTOR explicit Q_DECL_CONSTRUCTOR_DEPRECATED
1093 # undef QT_DEPRECATED
1094 # define QT_DEPRECATED
1095 # undef QT_DEPRECATED_VARIABLE
1096 # define QT_DEPRECATED_VARIABLE
1097 # undef QT_DEPRECATED_CONSTRUCTOR
1098 # define QT_DEPRECATED_CONSTRUCTOR
1101 #if defined(QT3_SUPPORT_WARNINGS)
1102 # if !defined(QT_COMPAT_WARNINGS)
1103 # define QT_COMPAT_WARNINGS
1106 # define QT3_SUPPORT Q_DECL_DEPRECATED
1107 # undef QT3_SUPPORT_VARIABLE
1108 # define QT3_SUPPORT_VARIABLE Q_DECL_VARIABLE_DEPRECATED
1109 # undef QT3_SUPPORT_CONSTRUCTOR
1110 # define QT3_SUPPORT_CONSTRUCTOR explicit Q_DECL_CONSTRUCTOR_DEPRECATED
1111 #elif defined(QT3_SUPPORT)
1112 # if !defined(QT_COMPAT)
1116 # define QT3_SUPPORT
1117 # undef QT3_SUPPORT_VARIABLE
1118 # define QT3_SUPPORT_VARIABLE
1119 # undef QT3_SUPPORT_CONSTRUCTOR
1120 # define QT3_SUPPORT_CONSTRUCTOR explicit
1124 #ifndef QT_MOC_COMPAT
1125 # if defined(QT3_SUPPORT)
1126 # define QT_MOC_COMPAT QT3_SUPPORT
1128 # define QT_MOC_COMPAT
1131 # undef QT_MOC_COMPAT
1132 # define QT_MOC_COMPAT
1135 #ifdef QT_ASCII_CAST_WARNINGS
1136 # define QT_ASCII_CAST_WARN Q_DECL_DEPRECATED
1137 # if defined(Q_CC_GNU) && __GNUC__ < 4
1139 # define QT_ASCII_CAST_WARN_CONSTRUCTOR
1141 # define QT_ASCII_CAST_WARN_CONSTRUCTOR Q_DECL_CONSTRUCTOR_DEPRECATED
1144 # define QT_ASCII_CAST_WARN
1145 # define QT_ASCII_CAST_WARN_CONSTRUCTOR
1148 #if defined(__i386__) || defined(_WIN32) || defined(_WIN32_WCE)
1149 # if defined(Q_CC_GNU)
1150 #if !defined(Q_CC_INTEL) && ((100*(__GNUC__ - 0) + 10*(__GNUC_MINOR__ - 0) + __GNUC_PATCHLEVEL__) >= 332)
1151 # define QT_FASTCALL __attribute__((regparm(3)))
1153 # define QT_FASTCALL
1155 # elif defined(Q_CC_MSVC)
1156 # define QT_FASTCALL __fastcall
1158 # define QT_FASTCALL
1161 # define QT_FASTCALL
1164 #ifdef Q_COMPILER_CONSTEXPR
1165 # define Q_DECL_CONSTEXPR constexpr
1167 # define Q_DECL_CONSTEXPR
1172 #if defined(Q_WS_WIN)
1173 # if defined(Q_CC_MINGW)
1174 # define QT_ENSURE_STACK_ALIGNED_FOR_SSE __attribute__ ((force_align_arg_pointer))
1176 # define QT_ENSURE_STACK_ALIGNED_FOR_SSE
1178 # define QT_WIN_CALLBACK CALLBACK QT_ENSURE_STACK_ALIGNED_FOR_SSE
1181 typedef int QNoImplicitBoolCast;
1183 #if defined(QT_ARCH_ARM) || defined(QT_ARCH_ARMV6) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_MIPS) && (defined(Q_WS_QWS) || defined(Q_WS_QPA) || defined(Q_OS_WINCE))) || defined(QT_ARCH_SH) || defined(QT_ARCH_SH4A)
1188 #if defined(QT_COORD_TYPE)
1189 typedef QT_COORD_TYPE qreal;
1190 #elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
1191 typedef float qreal;
1193 typedef double qreal;
1200 template <
typename T>
1201 Q_DECL_CONSTEXPR
inline T qAbs(
const T &
t) {
return t >= 0 ? t : -
t; }
1203 Q_DECL_CONSTEXPR
inline int qRound(qreal d)
1204 {
return d >= qreal(0.0) ?
int(d + qreal(0.5)) :
int(d -
int(d-1) + qreal(0.5)) +
int(d-1); }
1206 #if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
1207 Q_DECL_CONSTEXPR
inline qint64 qRound64(
double d)
1210 Q_DECL_CONSTEXPR
inline qint64 qRound64(qreal d)
1214 template <
typename T>
1215 Q_DECL_CONSTEXPR
inline const T &qMin(
const T &
a,
const T &
b) {
return (a < b) ? a :
b; }
1216 template <
typename T>
1217 Q_DECL_CONSTEXPR
inline const T &qMax(
const T &a,
const T &b) {
return (a < b) ? b :
a; }
1218 template <
typename T>
1219 Q_DECL_CONSTEXPR
inline const T &qBound(
const T &min,
const T &val,
const T &
max)
1220 {
return qMax(min, qMin(max, val)); }
1223 typedef qint8 Q_INT8;
1234 #if defined(Q_OS_WIN64)
1235 typedef __int64 Q_LONG;
1236 typedef unsigned __int64 Q_ULONG;
1238 typedef long Q_LONG;
1239 typedef unsigned long Q_ULONG;
1242 # define QABS(a) qAbs(a)
1243 # define QMAX(a, b) qMax((a), (b))
1244 # define QMIN(a, b) qMin((a), (b))
1253 #ifndef QT_BUILD_KEY
1254 #define QT_BUILD_KEY "unspecified"
1257 #if defined(Q_WS_MAC)
1258 # ifndef QMAC_QMENUBAR_NO_EVENT
1259 # define QMAC_QMENUBAR_NO_EVENT
1263 #if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
1267 #if defined(Q_OS_VXWORKS)
1268 # define QT_NO_CRASHHANDLER // no popen
1269 # define QT_NO_PROCESS // no exec*, no fork
1271 # define QT_NO_SHAREDMEMORY // only POSIX, no SysV and in the end...
1272 # define QT_NO_SYSTEMSEMAPHORE // not needed at all in a flat address space
1273 # define QT_NO_QWS_MULTIPROCESS // no processes
1278 #define QT_SUPPORTS(FEATURE) (!defined(QT_NO_##FEATURE))
1280 #if defined(Q_OS_LINUX) && defined(Q_CC_RVCT)
1281 # define Q_DECL_EXPORT __attribute__((visibility("default")))
1282 # define Q_DECL_IMPORT __attribute__((visibility("default")))
1283 # define Q_DECL_HIDDEN __attribute__((visibility("hidden")))
1286 #ifndef Q_DECL_EXPORT
1287 # if defined(Q_OS_WIN) || defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
1288 # define Q_DECL_EXPORT __declspec(dllexport)
1289 # elif defined(QT_VISIBILITY_AVAILABLE)
1290 # define Q_DECL_EXPORT __attribute__((visibility("default")))
1291 # define Q_DECL_HIDDEN __attribute__((visibility("hidden")))
1293 # ifndef Q_DECL_EXPORT
1294 # define Q_DECL_EXPORT
1297 #ifndef Q_DECL_IMPORT
1298 # if defined(Q_OS_WIN) || defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
1299 # define Q_DECL_IMPORT __declspec(dllimport)
1301 # define Q_DECL_IMPORT
1304 #ifndef Q_DECL_HIDDEN
1305 # define Q_DECL_HIDDEN
1313 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
1314 # if defined(QT_NODLL)
1317 # elif defined(QT_MAKEDLL)
1318 # if defined(QT_DLL)
1321 # if defined(QT_BUILD_CORE_LIB)
1322 # define Q_CORE_EXPORT Q_DECL_EXPORT
1324 # define Q_CORE_EXPORT Q_DECL_IMPORT
1326 # if defined(QT_BUILD_GUI_LIB)
1327 # define Q_GUI_EXPORT Q_DECL_EXPORT
1329 # define Q_GUI_EXPORT Q_DECL_IMPORT
1331 # if defined(QT_BUILD_SQL_LIB)
1332 # define Q_SQL_EXPORT Q_DECL_EXPORT
1334 # define Q_SQL_EXPORT Q_DECL_IMPORT
1336 # if defined(QT_BUILD_NETWORK_LIB)
1337 # define Q_NETWORK_EXPORT Q_DECL_EXPORT
1339 # define Q_NETWORK_EXPORT Q_DECL_IMPORT
1341 # if defined(QT_BUILD_SVG_LIB)
1342 # define Q_SVG_EXPORT Q_DECL_EXPORT
1344 # define Q_SVG_EXPORT Q_DECL_IMPORT
1346 # if defined(QT_BUILD_DECLARATIVE_LIB)
1347 # define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT
1349 # define Q_DECLARATIVE_EXPORT Q_DECL_IMPORT
1351 # if defined(QT_BUILD_OPENGL_LIB)
1352 # define Q_OPENGL_EXPORT Q_DECL_EXPORT
1354 # define Q_OPENGL_EXPORT Q_DECL_IMPORT
1356 # if defined(QT_BUILD_MULTIMEDIA_LIB)
1357 # define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
1359 # define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
1361 # if defined(QT_BUILD_OPENVG_LIB)
1362 # define Q_OPENVG_EXPORT Q_DECL_EXPORT
1364 # define Q_OPENVG_EXPORT Q_DECL_IMPORT
1366 # if defined(QT_BUILD_XML_LIB)
1367 # define Q_XML_EXPORT Q_DECL_EXPORT
1369 # define Q_XML_EXPORT Q_DECL_IMPORT
1371 # if defined(QT_BUILD_XMLPATTERNS_LIB)
1372 # define Q_XMLPATTERNS_EXPORT Q_DECL_EXPORT
1374 # define Q_XMLPATTERNS_EXPORT Q_DECL_IMPORT
1376 # if defined(QT_BUILD_SCRIPT_LIB)
1377 # define Q_SCRIPT_EXPORT Q_DECL_EXPORT
1379 # define Q_SCRIPT_EXPORT Q_DECL_IMPORT
1381 # if defined(QT_BUILD_SCRIPTTOOLS_LIB)
1382 # define Q_SCRIPTTOOLS_EXPORT Q_DECL_EXPORT
1384 # define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT
1386 # if defined(QT_BUILD_CANVAS_LIB)
1387 # define Q_CANVAS_EXPORT Q_DECL_EXPORT
1389 # define Q_CANVAS_EXPORT Q_DECL_IMPORT
1391 # if defined(QT_BUILD_COMPAT_LIB)
1392 # define Q_COMPAT_EXPORT Q_DECL_EXPORT
1394 # define Q_COMPAT_EXPORT Q_DECL_IMPORT
1396 # if defined(QT_BUILD_DBUS_LIB)
1397 # define Q_DBUS_EXPORT Q_DECL_EXPORT
1399 # define Q_DBUS_EXPORT Q_DECL_IMPORT
1401 # define Q_TEMPLATEDLL
1402 # elif defined(QT_DLL)
1403 # define Q_CORE_EXPORT Q_DECL_IMPORT
1404 # define Q_GUI_EXPORT Q_DECL_IMPORT
1405 # define Q_SQL_EXPORT Q_DECL_IMPORT
1406 # define Q_NETWORK_EXPORT Q_DECL_IMPORT
1407 # define Q_SVG_EXPORT Q_DECL_IMPORT
1408 # define Q_DECLARATIVE_EXPORT Q_DECL_IMPORT
1409 # define Q_CANVAS_EXPORT Q_DECL_IMPORT
1410 # define Q_OPENGL_EXPORT Q_DECL_IMPORT
1411 # define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
1412 # define Q_OPENVG_EXPORT Q_DECL_IMPORT
1413 # define Q_XML_EXPORT Q_DECL_IMPORT
1414 # define Q_XMLPATTERNS_EXPORT Q_DECL_IMPORT
1415 # define Q_SCRIPT_EXPORT Q_DECL_IMPORT
1416 # define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT
1417 # define Q_COMPAT_EXPORT Q_DECL_IMPORT
1418 # define Q_DBUS_EXPORT Q_DECL_IMPORT
1419 # define Q_TEMPLATEDLL
1421 # define Q_NO_DECLARED_NOT_DEFINED
1423 # if defined(Q_OS_LINUX) && defined(Q_CC_BOR)
1424 # define Q_TEMPLATEDLL
1425 # define Q_NO_DECLARED_NOT_DEFINED
1431 #if !defined(Q_CORE_EXPORT)
1432 # if defined(QT_SHARED)
1433 # define Q_CORE_EXPORT Q_DECL_EXPORT
1434 # define Q_GUI_EXPORT Q_DECL_EXPORT
1435 # define Q_SQL_EXPORT Q_DECL_EXPORT
1436 # define Q_NETWORK_EXPORT Q_DECL_EXPORT
1437 # define Q_SVG_EXPORT Q_DECL_EXPORT
1438 # define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT
1439 # define Q_OPENGL_EXPORT Q_DECL_EXPORT
1440 # define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
1441 # define Q_OPENVG_EXPORT Q_DECL_EXPORT
1442 # define Q_XML_EXPORT Q_DECL_EXPORT
1443 # define Q_XMLPATTERNS_EXPORT Q_DECL_EXPORT
1444 # define Q_SCRIPT_EXPORT Q_DECL_EXPORT
1445 # define Q_SCRIPTTOOLS_EXPORT Q_DECL_EXPORT
1446 # define Q_COMPAT_EXPORT Q_DECL_EXPORT
1447 # define Q_DBUS_EXPORT Q_DECL_EXPORT
1449 # define Q_CORE_EXPORT
1450 # define Q_GUI_EXPORT
1451 # define Q_SQL_EXPORT
1452 # define Q_NETWORK_EXPORT
1453 # define Q_SVG_EXPORT
1454 # define Q_DECLARATIVE_EXPORT
1455 # define Q_OPENGL_EXPORT
1456 # define Q_MULTIMEDIA_EXPORT
1457 # define Q_OPENVG_EXPORT
1458 # define Q_XML_EXPORT
1459 # define Q_XMLPATTERNS_EXPORT
1460 # define Q_SCRIPT_EXPORT
1461 # define Q_SCRIPTTOOLS_EXPORT
1462 # define Q_COMPAT_EXPORT
1463 # define Q_DBUS_EXPORT
1469 #if defined(Q_CC_MINGW)
1470 # if defined(QT_BUILD_CORE_LIB)
1471 # define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline
1473 # define Q_CORE_EXPORT_INLINE inline
1475 # if defined(QT_BUILD_GUI_LIB)
1476 # define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline
1478 # define Q_GUI_EXPORT_INLINE inline
1480 # if defined(QT_BUILD_COMPAT_LIB)
1481 # define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline
1483 # define Q_COMPAT_EXPORT_INLINE inline
1485 #elif defined(Q_CC_RVCT)
1489 # define Q_CORE_EXPORT_INLINE inline
1490 # define Q_GUI_EXPORT_INLINE inline
1491 # define Q_COMPAT_EXPORT_INLINE inline
1493 # define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline
1494 # define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline
1495 # define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline
1503 #if defined(QT_BUILD_INTERNAL) && (defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_MAKEDLL)
1504 # define Q_AUTOTEST_EXPORT Q_DECL_EXPORT
1505 #elif defined(QT_BUILD_INTERNAL) && (defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_DLL)
1506 # define Q_AUTOTEST_EXPORT Q_DECL_IMPORT
1507 #elif defined(QT_BUILD_INTERNAL) && !(defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && defined(QT_SHARED)
1508 # define Q_AUTOTEST_EXPORT Q_DECL_EXPORT
1510 # define Q_AUTOTEST_EXPORT
1513 inline void qt_noop(
void) {}
1523 #ifdef QT_BOOTSTRAPPED
1524 # define QT_NO_EXCEPTIONS
1526 #if !defined(QT_NO_EXCEPTIONS) && defined(Q_CC_GNU) && !defined (__EXCEPTIONS) && !defined(Q_MOC_RUN)
1527 # define QT_NO_EXCEPTIONS
1530 #ifdef QT_NO_EXCEPTIONS
1531 # define QT_TRY if (true)
1532 # define QT_CATCH(A) else
1533 # define QT_THROW(A) qt_noop()
1534 # define QT_RETHROW qt_noop()
1537 # define QT_CATCH(A) catch (A)
1538 # define QT_THROW(A) throw A
1539 # define QT_RETHROW throw
1547 class Q_CORE_EXPORT QSysInfo {
1550 WordSize = (
sizeof(
void *)<<3)
1553 #if defined(QT_BUILD_QMAKE)
1559 static const int ByteOrder;
1560 #elif defined(Q_BYTE_ORDER)
1566 , ByteOrder = <platform-dependent>
1567 # elif Q_BYTE_ORDER == Q_BIG_ENDIAN
1568 , ByteOrder = BigEndian
1569 # elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN
1570 , ByteOrder = LittleEndian
1572 # error "Undefined byte order"
1576 # error "Qt not configured correctly, please run configure"
1578 #if defined(Q_WS_WIN) || defined(Q_OS_CYGWIN)
1584 WV_DOS_based= 0x000f,
1592 WV_WINDOWS7 = 0x0090,
1593 WV_WINDOWS8 = 0x00a0,
1594 WV_WINDOWS8_1 = 0x00b0,
1595 WV_NT_based = 0x00f0,
1603 WV_6_1 = WV_WINDOWS7,
1604 WV_6_2 = WV_WINDOWS8,
1605 WV_6_3 = WV_WINDOWS8_1,
1611 WV_CE_based = 0x0f00
1613 static const WinVersion WindowsVersion;
1614 static WinVersion windowsVersion();
1619 MV_Unknown = 0x0000,
1635 MV_CHEETAH = MV_10_0,
1637 MV_JAGUAR = MV_10_2,
1638 MV_PANTHER = MV_10_3,
1640 MV_LEOPARD = MV_10_5,
1641 MV_SNOWLEOPARD = MV_10_6,
1643 MV_MOUNTAINLION = MV_10_8,
1644 MV_MAVERICKS = MV_10_9
1646 static const MacVersion MacintoshVersion;
1649 enum SymbianVersion {
1650 SV_Unknown = 1000000,
1664 static SymbianVersion symbianVersion();
1667 SV_S60_Unknown = SV_Unknown,
1668 SV_S60_3_1 = SV_9_2,
1669 SV_S60_3_2 = SV_9_3,
1670 SV_S60_5_0 = SV_9_4,
1671 SV_S60_5_1 = SV_SF_2,
1672 SV_S60_5_2 = SV_SF_3,
1673 SV_S60_5_3 = SV_API_5_3,
1674 SV_S60_5_4 = SV_API_5_4,
1675 SV_S60_5_5 = SV_API_5_5
1677 static S60Version s60Version();
1681 Q_CORE_EXPORT
const char *qVersion();
1682 Q_CORE_EXPORT
bool qSharedBuild();
1684 #if defined(Q_OS_MAC)
1685 inline int qMacVersion() {
return QSysInfo::MacintoshVersion; }
1689 inline QT3_SUPPORT
bool qSysInfo(
int *wordSize,
bool *bigEndian)
1691 *wordSize = QSysInfo::WordSize;
1692 *bigEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian);
1697 #if defined(Q_WS_WIN) || defined(Q_OS_CYGWIN)
1698 #if defined(QT3_SUPPORT)
1699 inline QT3_SUPPORT
bool qt_winUnicode() {
return true; }
1700 inline QT3_SUPPORT
int qWinVersion() {
return QSysInfo::WindowsVersion; }
1704 #define QT_WA(unicode, ansi) unicode
1705 #define QT_WA_INLINE(unicode, ansi) (unicode)
1709 #ifndef Q_OUTOFLINE_TEMPLATE
1710 # define Q_OUTOFLINE_TEMPLATE
1712 #ifndef Q_INLINE_TEMPLATE
1713 # define Q_INLINE_TEMPLATE inline
1717 # define Q_TYPENAME typename
1724 #if defined(Q_CC_INTEL) && !defined(Q_OS_WIN) || defined(Q_CC_RVCT)
1725 template <
typename T>
1726 inline void qUnused(T &
x) { (
void)x; }
1727 # define Q_UNUSED(x) qUnused(x);
1729 # define Q_UNUSED(x) (void)x;
1741 #if defined(Q_OS_SYMBIAN) && defined(NDEBUG) && !defined(QT_NO_DEBUG)
1742 # define QT_NO_DEBUG
1745 #if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
1750 # define qPrintable(string) QString(string).toLocal8Bit().constData()
1753 Q_CORE_EXPORT
void qDebug(
const char *, ...)
1754 #if defined(Q_CC_GNU) && !defined(__INSURE__)
1755 __attribute__ ((
format (printf, 1, 2)))
1759 Q_CORE_EXPORT
void qWarning(
const char *, ...)
1760 #if defined(Q_CC_GNU) && !defined(__INSURE__)
1761 __attribute__ ((
format (printf, 1, 2)))
1766 Q_CORE_EXPORT
QString qt_error_string(
int errorCode = -1);
1767 Q_CORE_EXPORT
void qCritical(
const char *, ...)
1768 #if defined(Q_CC_GNU) && !defined(__INSURE__)
1769 __attribute__ ((
format (printf, 1, 2)))
1772 Q_CORE_EXPORT
void qFatal(
const char *, ...)
1773 #if defined(Q_CC_GNU) && !defined(__INSURE__)
1774 __attribute__ ((
format (printf, 1, 2)))
1779 Q_CORE_EXPORT QT3_SUPPORT
void qSystemWarning(
const char *msg,
int code = -1);
1781 Q_CORE_EXPORT
void qErrnoWarning(
int code,
const char *msg, ...);
1782 Q_CORE_EXPORT
void qErrnoWarning(
const char *msg, ...);
1784 #if (defined(QT_NO_DEBUG_OUTPUT) || defined(QT_NO_TEXTSTREAM)) && !defined(QT_NO_DEBUG_STREAM)
1785 #define QT_NO_DEBUG_STREAM
1795 #ifndef QT_NO_DEBUG_STREAM
1797 #ifndef QT_NO_WARNING_OUTPUT
1805 #ifdef QT_NO_WARNING_OUTPUT
1809 #define QT_NO_QDEBUG_MACRO while (false) qDebug
1810 #ifdef QT_NO_DEBUG_OUTPUT
1811 # define qDebug QT_NO_QDEBUG_MACRO
1813 #define QT_NO_QWARNING_MACRO while (false) qWarning
1814 #ifdef QT_NO_WARNING_OUTPUT
1815 # define qWarning QT_NO_QWARNING_MACRO
1819 Q_CORE_EXPORT
void qt_assert(
const char *assertion,
const char *file,
int line);
1821 #if !defined(Q_ASSERT)
1822 # ifndef QT_NO_DEBUG
1823 # define Q_ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop())
1825 # define Q_ASSERT(cond) qt_noop()
1829 #if defined(QT_NO_DEBUG) && !defined(QT_PAINT_DEBUG)
1830 #define QT_NO_PAINT_DEBUG
1833 Q_CORE_EXPORT
void qt_assert_x(
const char *where,
const char *what,
const char *file,
int line);
1835 #if !defined(Q_ASSERT_X)
1836 # ifndef QT_NO_DEBUG
1837 # define Q_ASSERT_X(cond, where, what) ((!(cond)) ? qt_assert_x(where, what,__FILE__,__LINE__) : qt_noop())
1839 # define Q_ASSERT_X(cond, where, what) qt_noop()
1843 Q_CORE_EXPORT
void qt_check_pointer(
const char *,
int);
1844 Q_CORE_EXPORT
void qBadAlloc();
1846 #ifdef QT_NO_EXCEPTIONS
1847 # if defined(QT_NO_DEBUG)
1848 # define Q_CHECK_PTR(p) qt_noop()
1850 # define Q_CHECK_PTR(p) do {if(!(p))qt_check_pointer(__FILE__,__LINE__);} while (0)
1853 # define Q_CHECK_PTR(p) do { if (!(p)) qBadAlloc(); } while (0)
1856 template <
typename T>
1857 inline T *q_check_ptr(T *
p) { Q_CHECK_PTR(p);
return p; }
1859 #if (defined(Q_CC_GNU) && !defined(Q_OS_SOLARIS)) || defined(Q_CC_HPACC) || defined(Q_CC_DIAB)
1860 # define Q_FUNC_INFO __PRETTY_FUNCTION__
1861 #elif defined(_MSC_VER)
1862 # define Q_FUNC_INFO __FUNCSIG__
1864 # if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN) || defined(Q_OS_INTEGRITY)
1865 # define Q_FUNC_INFO __FILE__ "(line number unavailable)"
1869 # define QT_STRINGIFY2(x) #x
1870 # define QT_STRINGIFY(x) QT_STRINGIFY2(x)
1871 # define Q_FUNC_INFO __FILE__ ":" QT_STRINGIFY(__LINE__)
1875 # if !defined(Q_CC_MIPS) && !defined(Q_CC_RVCT) && !defined(Q_CC_NOKIAX86)
1876 # undef QT_STRINGIFY2
1877 # undef QT_STRINGIFY
1881 enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg };
1883 Q_CORE_EXPORT
void qt_message_output(QtMsgType,
const char *buf);
1885 typedef void (*QtMsgHandler)(QtMsgType,
const char *);
1886 Q_CORE_EXPORT QtMsgHandler qInstallMsgHandler(QtMsgHandler);
1889 inline QT3_SUPPORT
void qSuppressObsoleteWarnings(
bool =
true) {}
1890 inline QT3_SUPPORT
void qObsolete(
const char *,
const char * = 0,
const char * = 0) {}
1893 #if defined(QT_NO_THREAD)
1895 template <
typename T>
1900 inline QGlobalStatic(T *
p) : pointer(p) { }
1901 inline ~QGlobalStatic() { pointer = 0; }
1904 #define Q_GLOBAL_STATIC(TYPE, NAME) \
1905 static TYPE *NAME() \
1907 static TYPE thisVariable; \
1908 static QGlobalStatic<TYPE > thisGlobalStatic(&thisVariable); \
1909 return thisGlobalStatic.pointer; \
1912 #define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS) \
1913 static TYPE *NAME() \
1915 static TYPE thisVariable ARGS; \
1916 static QGlobalStatic<TYPE > thisGlobalStatic(&thisVariable); \
1917 return thisGlobalStatic.pointer; \
1920 #define Q_GLOBAL_STATIC_WITH_INITIALIZER(TYPE, NAME, INITIALIZER) \
1921 static TYPE *NAME() \
1923 static TYPE thisVariable; \
1924 static QGlobalStatic<TYPE > thisGlobalStatic(0); \
1925 if (!thisGlobalStatic.pointer) { \
1926 TYPE *x = thisGlobalStatic.pointer = &thisVariable; \
1929 return thisGlobalStatic.pointer; \
1938 template <
typename T>
1947 template <
typename T>
1948 class QGlobalStaticDeleter
1951 QGlobalStatic<T> &globalStatic;
1952 QGlobalStaticDeleter(QGlobalStatic<T> &_globalStatic)
1953 : globalStatic(_globalStatic)
1956 inline ~QGlobalStaticDeleter()
1958 delete globalStatic.pointer;
1959 globalStatic.pointer = 0;
1960 globalStatic.destroyed =
true;
1964 #define Q_GLOBAL_STATIC_INIT(TYPE, NAME) \
1965 static QGlobalStatic<TYPE > this_ ## NAME \
1966 = { Q_BASIC_ATOMIC_INITIALIZER(0), false }
1968 #define Q_GLOBAL_STATIC(TYPE, NAME) \
1969 static TYPE *NAME() \
1971 Q_GLOBAL_STATIC_INIT(TYPE, _StaticVar_); \
1972 if (!this__StaticVar_.pointer && !this__StaticVar_.destroyed) { \
1973 TYPE *x = new TYPE; \
1974 if (!this__StaticVar_.pointer.testAndSetOrdered(0, x)) \
1977 static QGlobalStaticDeleter<TYPE > cleanup(this__StaticVar_); \
1979 return this__StaticVar_.pointer; \
1982 #define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS) \
1983 static TYPE *NAME() \
1985 Q_GLOBAL_STATIC_INIT(TYPE, _StaticVar_); \
1986 if (!this__StaticVar_.pointer && !this__StaticVar_.destroyed) { \
1987 TYPE *x = new TYPE ARGS; \
1988 if (!this__StaticVar_.pointer.testAndSetOrdered(0, x)) \
1991 static QGlobalStaticDeleter<TYPE > cleanup(this__StaticVar_); \
1993 return this__StaticVar_.pointer; \
1996 #define Q_GLOBAL_STATIC_WITH_INITIALIZER(TYPE, NAME, INITIALIZER) \
1997 static TYPE *NAME() \
1999 Q_GLOBAL_STATIC_INIT(TYPE, _StaticVar_); \
2000 if (!this__StaticVar_.pointer && !this__StaticVar_.destroyed) { \
2001 QScopedPointer<TYPE > x(new TYPE); \
2003 if (this__StaticVar_.pointer.testAndSetOrdered(0, x.data())) { \
2004 static QGlobalStaticDeleter<TYPE > cleanup(this__StaticVar_); \
2008 return this__StaticVar_.pointer; \
2018 inline explicit QBool(
bool B) : b(B) {}
2019 inline operator const void *()
const
2020 {
return b ?
static_cast<const void *
>(
this) : static_cast<const void *>(0); }
2023 inline bool operator==(QBool b1,
bool b2) {
return !b1 == !b2; }
2024 inline bool operator==(
bool b1, QBool b2) {
return !b1 == !b2; }
2025 inline bool operator==(QBool b1, QBool b2) {
return !b1 == !b2; }
2026 inline bool operator!=(QBool b1,
bool b2) {
return !b1 != !b2; }
2027 inline bool operator!=(
bool b1, QBool b2) {
return !b1 != !b2; }
2028 inline bool operator!=(QBool b1, QBool b2) {
return !b1 != !b2; }
2030 Q_DECL_CONSTEXPR
static inline bool qFuzzyCompare(
double p1,
double p2)
2032 return (qAbs(p1 - p2) <= 0.000000000001 * qMin(qAbs(p1), qAbs(p2)));
2035 Q_DECL_CONSTEXPR
static inline bool qFuzzyCompare(
float p1,
float p2)
2037 return (qAbs(p1 - p2) <= 0.00001
f * qMin(qAbs(p1), qAbs(p2)));
2043 Q_DECL_CONSTEXPR
static inline bool qFuzzyIsNull(
double d)
2045 return qAbs(d) <= 0.000000000001;
2051 Q_DECL_CONSTEXPR
static inline bool qFuzzyIsNull(
float f)
2053 return qAbs(f) <= 0.00001f;
2061 static inline bool qIsNull(
double d)
2077 static inline bool qIsNull(
float f)
2097 #ifdef Q_FULL_TEMPLATE_INSTANTIATION
2098 # define Q_DUMMY_COMPARISON_OPERATOR(C) \
2099 bool operator==(const C&) const { \
2100 qWarning(#C"::operator==(const "#C"&) was called"); \
2104 # define Q_DUMMY_COMPARISON_OPERATOR(C)
2117 template <
typename T>
inline bool qIsDetached(T &) {
return true; }
2119 template <
typename T>
2127 isLarge = (
sizeof(T)>
sizeof(
void*)),
2132 template <
typename T>
2155 Q_PRIMITIVE_TYPE = 0x1,
2157 Q_MOVABLE_TYPE = 0x2,
2161 #define Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS) \
2162 class QTypeInfo<TYPE > \
2166 isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0), \
2167 isStatic = (((FLAGS) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), \
2168 isLarge = (sizeof(TYPE)>sizeof(void*)), \
2169 isPointer = false, \
2170 isDummy = (((FLAGS) & Q_DUMMY_TYPE) != 0) \
2172 static inline const char *name() { return #TYPE; } \
2175 #define Q_DECLARE_TYPEINFO(TYPE, FLAGS) \
2177 Q_DECLARE_TYPEINFO_BODY(TYPE, FLAGS)
2180 template <
typename T>
2181 inline void qSwap(T &value1, T &value2)
2189 swap(value1, value2);
2203 #define Q_DECLARE_SHARED_STL(TYPE)
2205 #define Q_DECLARE_SHARED_STL(TYPE) \
2208 template<> inline void swap<QT_PREPEND_NAMESPACE(TYPE)>(QT_PREPEND_NAMESPACE(TYPE) &value1, QT_PREPEND_NAMESPACE(TYPE) &value2) \
2209 { swap(value1.data_ptr(), value2.data_ptr()); } \
2214 #define Q_DECLARE_SHARED(TYPE) \
2215 template <> inline bool qIsDetached<TYPE>(TYPE &t) { return t.isDetached(); } \
2216 template <> inline void qSwap<TYPE>(TYPE &value1, TYPE &value2) \
2217 { qSwap(value1.data_ptr(), value2.data_ptr()); } \
2218 Q_DECLARE_SHARED_STL(TYPE)
2245 Q_CORE_EXPORT
void *qMalloc(
size_t size);
2246 Q_CORE_EXPORT
void qFree(
void *ptr);
2247 Q_CORE_EXPORT
void *qRealloc(
void *ptr,
size_t size);
2248 Q_CORE_EXPORT
void *qMallocAligned(
size_t size,
size_t alignment);
2249 Q_CORE_EXPORT
void *qReallocAligned(
void *ptr,
size_t size,
size_t oldsize,
size_t alignment);
2250 Q_CORE_EXPORT
void qFreeAligned(
void *ptr);
2251 Q_CORE_EXPORT
void *qMemCopy(
void *dest,
const void *
src,
size_t n);
2252 Q_CORE_EXPORT
void *qMemSet(
void *dest,
int c,
size_t n);
2260 #if !defined(QT_CC_WARNINGS)
2261 # define QT_NO_WARNINGS
2263 #if defined(QT_NO_WARNINGS)
2264 # if defined(Q_CC_MSVC)
2265 # pragma warning(disable: 4251)
2266 # pragma warning(disable: 4244)
2267 # pragma warning(disable: 4275)
2268 # pragma warning(disable: 4514)
2269 # pragma warning(disable: 4800)
2270 # pragma warning(disable: 4097)
2271 # pragma warning(disable: 4706)
2272 # pragma warning(disable: 4786)
2273 # pragma warning(disable: 4660)
2274 # pragma warning(disable: 4355)
2275 # pragma warning(disable: 4231)
2276 # pragma warning(disable: 4710)
2277 # pragma warning(disable: 4530)
2278 # elif defined(Q_CC_BOR)
2279 # pragma option -w-inl
2280 # pragma option -w-aus
2289 class Q_CORE_EXPORT QFlag
2293 inline QFlag(
int i);
2294 inline operator int()
const {
return i; }
2297 inline QFlag::QFlag(
int ai) : i(ai) {}
2299 class Q_CORE_EXPORT QIncompatibleFlag
2303 inline explicit QIncompatibleFlag(
int i);
2304 inline operator int()
const {
return i; }
2307 inline QIncompatibleFlag::QIncompatibleFlag(
int ai) : i(ai) {}
2310 #ifndef Q_NO_TYPESAFE_FLAGS
2312 template<
typename Enum>
2315 typedef void **Zero;
2318 typedef Enum enum_type;
2319 Q_DECL_CONSTEXPR
inline QFlags(
const QFlags &
f) : i(f.i) {}
2320 Q_DECL_CONSTEXPR
inline QFlags(Enum
f) : i(f) {}
2321 Q_DECL_CONSTEXPR
inline QFlags(Zero = 0) : i(0) {}
2322 inline QFlags(QFlag
f) : i(f) {}
2324 inline QFlags &operator=(
const QFlags &
f) { i = f.i;
return *
this; }
2325 inline QFlags &operator&=(
int mask) { i &=
mask;
return *
this; }
2326 inline QFlags &operator&=(uint
mask) { i &=
mask;
return *
this; }
2327 inline QFlags &operator|=(QFlags
f) { i |= f.i;
return *
this; }
2328 inline QFlags &operator|=(Enum
f) { i |=
f;
return *
this; }
2329 inline QFlags &operator^=(QFlags
f) { i ^= f.i;
return *
this; }
2330 inline QFlags &operator^=(Enum
f) { i ^=
f;
return *
this; }
2332 Q_DECL_CONSTEXPR
inline operator int()
const {
return i; }
2334 Q_DECL_CONSTEXPR
inline QFlags
operator|(QFlags
f)
const {
return QFlags(Enum(i | f.i)); }
2335 Q_DECL_CONSTEXPR
inline QFlags
operator|(Enum f)
const {
return QFlags(Enum(i | f)); }
2336 Q_DECL_CONSTEXPR
inline QFlags
operator^(QFlags f)
const {
return QFlags(Enum(i ^ f.i)); }
2337 Q_DECL_CONSTEXPR
inline QFlags
operator^(Enum f)
const {
return QFlags(Enum(i ^ f)); }
2338 Q_DECL_CONSTEXPR
inline QFlags
operator&(
int mask)
const {
return QFlags(Enum(i & mask)); }
2339 Q_DECL_CONSTEXPR
inline QFlags
operator&(uint mask)
const {
return QFlags(Enum(i & mask)); }
2340 Q_DECL_CONSTEXPR
inline QFlags
operator&(Enum f)
const {
return QFlags(Enum(i & f)); }
2341 Q_DECL_CONSTEXPR
inline QFlags operator~()
const {
return QFlags(Enum(~i)); }
2343 Q_DECL_CONSTEXPR
inline bool operator!()
const {
return !i; }
2345 inline bool testFlag(Enum f)
const {
return (i & f) == f && (f != 0 || i ==
int(f) ); }
2348 #define Q_DECLARE_FLAGS(Flags, Enum)\
2349 typedef QFlags<Enum> Flags;
2351 #define Q_DECLARE_INCOMPATIBLE_FLAGS(Flags) \
2352 inline QIncompatibleFlag operator|(Flags::enum_type f1, int f2) \
2353 { return QIncompatibleFlag(int(f1) | f2); }
2355 #define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags) \
2356 Q_DECL_CONSTEXPR inline QFlags<Flags::enum_type> operator|(Flags::enum_type f1, Flags::enum_type f2) \
2357 { return QFlags<Flags::enum_type>(f1) | f2; } \
2358 Q_DECL_CONSTEXPR inline QFlags<Flags::enum_type> operator|(Flags::enum_type f1, QFlags<Flags::enum_type> f2) \
2359 { return f2 | f1; } Q_DECLARE_INCOMPATIBLE_FLAGS(Flags)
2364 #define Q_DECLARE_FLAGS(Flags, Enum)\
2366 #define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
2370 #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT)
2372 template <
typename T>
2373 class QForeachContainer {
2375 inline QForeachContainer(
const T&
t) :
c(t), brk(0), i(
c.begin()), e(
c.
end()) { }
2378 typename T::const_iterator i, e;
2381 #define Q_FOREACH(variable, container) \
2382 for (QForeachContainer<__typeof__(container)> _container_(container); \
2383 !_container_.brk && _container_.i != _container_.e; \
2384 __extension__ ({ ++_container_.brk; ++_container_.i; })) \
2385 for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;}))
2389 struct QForeachContainerBase {};
2391 template <
typename T>
2392 class QForeachContainer :
public QForeachContainerBase {
2394 inline QForeachContainer(
const T&
t):
c(t), brk(0), i(
c.begin()), e(
c.
end()){};
2397 mutable typename T::const_iterator i, e;
2398 inline bool condition()
const {
return (!brk++ && i != e); }
2401 template <
typename T>
inline T *qForeachPointer(
const T &) {
return 0; }
2403 template <
typename T>
inline QForeachContainer<T> qForeachContainerNew(
const T&
t)
2404 {
return QForeachContainer<T>(
t); }
2406 template <
typename T>
2407 inline const QForeachContainer<T> *qForeachContainer(
const QForeachContainerBase *base,
const T *)
2408 {
return static_cast<const QForeachContainer<T> *
>(base); }
2410 #if defined(Q_CC_MIPS)
2414 # define Q_FOREACH(variable,container) \
2416 for (const QForeachContainerBase &_container_ = qForeachContainerNew(container); \
2417 qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->condition(); \
2418 ++qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->i) \
2419 for (variable = *qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->i; \
2420 qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk; \
2421 --qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk)
2423 #elif defined(Q_CC_DIAB)
2425 # define Q_FOREACH(variable,container) \
2427 for (const QForeachContainerBase &_container_ = qForeachContainerNew(container); \
2428 qForeachContainer(&_container_, (__typeof__(container) *) 0)->condition(); \
2429 ++qForeachContainer(&_container_, (__typeof__(container) *) 0)->i) \
2430 for (variable = *qForeachContainer(&_container_, (__typeof__(container) *) 0)->i; \
2431 qForeachContainer(&_container_, (__typeof__(container) *) 0)->brk; \
2432 --qForeachContainer(&_container_, (__typeof__(container) *) 0)->brk)
2435 # define Q_FOREACH(variable, container) \
2436 for (const QForeachContainerBase &_container_ = qForeachContainerNew(container); \
2437 qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->condition(); \
2438 ++qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->i) \
2439 for (variable = *qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->i; \
2440 qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk; \
2441 --qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk)
2442 #endif // MSVC6 || MIPSpro
2446 #define Q_FOREVER for(;;)
2447 #ifndef QT_NO_KEYWORDS
2449 # define foreach Q_FOREACH
2452 # define forever Q_FOREVER
2458 #if defined(QT_NO_DEBUG) && defined(Q_CC_GNU)
2459 # define qMemCopy __builtin_memcpy
2460 # define qMemSet __builtin_memset
2464 template <
typename T>
static inline T *qGetPtrHelper(T *ptr) {
return ptr; }
2465 template <
typename Wrapper>
static inline typename Wrapper::pointer qGetPtrHelper(
const Wrapper &
p) {
return p.data(); }
2467 #define Q_DECLARE_PRIVATE(Class) \
2468 inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(qGetPtrHelper(d_ptr)); } \
2469 inline const Class##Private* d_func() const { return reinterpret_cast<const Class##Private *>(qGetPtrHelper(d_ptr)); } \
2470 friend class Class##Private;
2472 #define Q_DECLARE_PRIVATE_D(Dptr, Class) \
2473 inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(Dptr); } \
2474 inline const Class##Private* d_func() const { return reinterpret_cast<const Class##Private *>(Dptr); } \
2475 friend class Class##Private;
2477 #define Q_DECLARE_PUBLIC(Class) \
2478 inline Class* q_func() { return static_cast<Class *>(q_ptr); } \
2479 inline const Class* q_func() const { return static_cast<const Class *>(q_ptr); } \
2482 #define Q_D(Class) Class##Private * const d = d_func()
2483 #define Q_Q(Class) Class * const q = q_func()
2485 #define QT_TR_NOOP(x) (x)
2486 #define QT_TR_NOOP_UTF8(x) (x)
2487 #define QT_TRANSLATE_NOOP(scope, x) (x)
2488 #define QT_TRANSLATE_NOOP_UTF8(scope, x) (x)
2489 #define QT_TRANSLATE_NOOP3(scope, x, comment) {x, comment}
2490 #define QT_TRANSLATE_NOOP3_UTF8(scope, x, comment) {x, comment}
2492 #ifndef QT_NO_TRANSLATION // ### This should enclose the NOOPs above
2497 Q_CORE_EXPORT
QString qtTrId(
const char *
id,
int n = -1);
2499 #define QT_TRID_NOOP(id) id
2501 #endif // QT_NO_TRANSLATION
2503 #define QDOC_PROPERTY(text)
2510 #ifdef QT_NO_DYNAMIC_CAST
2511 # define dynamic_cast QT_PREPEND_NAMESPACE(qt_dynamic_cast_check)
2513 template<
typename T,
typename X>
2514 T qt_dynamic_cast_check(X, T* = 0)
2515 {
return T::dynamic_cast_will_always_fail_because_rtti_is_disabled; }
2523 #define Q_DISABLE_COPY(Class) \
2524 Class(const Class &); \
2525 Class &operator=(const Class &);
2528 Q_CORE_EXPORT
QByteArray qgetenv(
const char *varName);
2529 Q_CORE_EXPORT
bool qputenv(
const char *varName,
const QByteArray&
value);
2531 inline int qIntCast(
double f) {
return int(f); }
2532 inline int qIntCast(
float f) {
return int(f); }
2537 Q_CORE_EXPORT
void qsrand(uint seed);
2538 Q_CORE_EXPORT
int qrand();
2544 #ifndef QT_PRODUCT_LICENSEE
2545 # define QT_PRODUCT_LICENSEE QLibraryInfo::licensee()
2547 #ifndef QT_PRODUCT_LICENSE
2548 # define QT_PRODUCT_LICENSE QLibraryInfo::licensedProducts()
2550 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPath();
2551 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathDocs();
2552 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathHeaders();
2553 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathLibs();
2554 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathBins();
2555 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathPlugins();
2556 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathData();
2557 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathTranslations();
2558 QT3_SUPPORT Q_CORE_EXPORT
const char *qInstallPathSysconf();
2561 #if defined(Q_OS_SYMBIAN)
2563 #ifdef SYMBIAN_BUILD_GCE
2564 #define Q_SYMBIAN_SUPPORTS_SURFACES
2566 #define Q_SYMBIAN_FIXED_POINTER_CURSORS
2567 #define Q_SYMBIAN_HAS_EXTENDED_BITMAP_TYPE
2568 #define Q_SYMBIAN_WINDOW_SIZE_CACHE
2569 #define QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
2572 #ifdef SYMBIAN_GRAPHICS_EGL_SGIMAGELITE
2573 # define QT_SYMBIAN_SUPPORTS_SGIMAGE
2576 #ifdef SYMBIAN_GRAPHICS_SET_SURFACE_TRANSPARENCY_AVAILABLE
2577 # define Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
2580 #ifdef SYMBIAN_GRAPHICS_TRANSITION_EFFECTS_SIGNALING_AVAILABLE
2581 # define Q_SYMBIAN_TRANSITION_EFFECTS
2585 #ifdef SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS
2586 #define Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS
2589 #ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
2590 #define Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION
2594 #define Q_NO_DATA_RELOCATION
2597 #ifdef Q_CC_NOKIAX86
2598 #ifndef QT_NO_CONCURRENT
2599 #define QT_NO_CONCURRENT
2601 #ifndef QT_NO_QFUTURE
2602 #define QT_NO_QFUTURE
2609 namespace std {
class exception; }
2612 Q_CORE_EXPORT
void qt_symbian_throwIfError(
int error);
2613 Q_CORE_EXPORT
void qt_symbian_exception2LeaveL(
const std::exception& ex);
2614 Q_CORE_EXPORT
int qt_symbian_exception2Error(
const std::exception& ex);
2616 #define QT_TRAP_THROWING(_f) \
2619 TRAP(____error, _f); \
2620 qt_symbian_throwIfError(____error); \
2623 #define QT_TRYCATCH_ERROR(_err, _f) \
2628 } catch (const std::exception &____ex) { \
2629 _err = qt_symbian_exception2Error(____ex); \
2633 #define QT_TRYCATCH_LEAVING(_f) \
2636 QT_TRYCATCH_ERROR(____err, _f) \
2637 User::LeaveIfError(____err); \
2648 #define QT_MODULE_CORE 0x00001
2649 #define QT_MODULE_GUI 0x00002
2650 #define QT_MODULE_NETWORK 0x00004
2651 #define QT_MODULE_OPENGL 0x00008
2652 #define QT_MODULE_SQL 0x00010
2653 #define QT_MODULE_XML 0x00020
2654 #define QT_MODULE_QT3SUPPORTLIGHT 0x00040
2655 #define QT_MODULE_QT3SUPPORT 0x00080
2656 #define QT_MODULE_SVG 0x00100
2657 #define QT_MODULE_ACTIVEQT 0x00200
2658 #define QT_MODULE_GRAPHICSVIEW 0x00400
2659 #define QT_MODULE_SCRIPT 0x00800
2660 #define QT_MODULE_XMLPATTERNS 0x01000
2661 #define QT_MODULE_HELP 0x02000
2662 #define QT_MODULE_TEST 0x04000
2663 #define QT_MODULE_DBUS 0x08000
2664 #define QT_MODULE_SCRIPTTOOLS 0x10000
2665 #define QT_MODULE_OPENVG 0x20000
2666 #define QT_MODULE_MULTIMEDIA 0x40000
2667 #define QT_MODULE_DECLARATIVE 0x80000
2670 #define QT_EDITION_CONSOLE (QT_MODULE_CORE \
2671 | QT_MODULE_NETWORK \
2673 | QT_MODULE_SCRIPT \
2674 | QT_MODULE_MULTIMEDIA \
2676 | QT_MODULE_XMLPATTERNS \
2679 #define QT_EDITION_DESKTOPLIGHT (QT_MODULE_CORE \
2681 | QT_MODULE_QT3SUPPORTLIGHT \
2684 #define QT_EDITION_OPENSOURCE (QT_MODULE_CORE \
2686 | QT_MODULE_NETWORK \
2687 | QT_MODULE_OPENGL \
2688 | QT_MODULE_OPENVG \
2690 | QT_MODULE_MULTIMEDIA \
2692 | QT_MODULE_XMLPATTERNS \
2693 | QT_MODULE_SCRIPT \
2694 | QT_MODULE_SCRIPTTOOLS \
2695 | QT_MODULE_QT3SUPPORTLIGHT \
2696 | QT_MODULE_QT3SUPPORT \
2698 | QT_MODULE_DECLARATIVE \
2699 | QT_MODULE_GRAPHICSVIEW \
2703 | QT_MODULE_ACTIVEQT)
2704 #define QT_EDITION_DESKTOP (QT_EDITION_OPENSOURCE)
2705 #define QT_EDITION_UNIVERSAL QT_EDITION_DESKTOP
2706 #define QT_EDITION_ACADEMIC QT_EDITION_DESKTOP
2707 #define QT_EDITION_EDUCATIONAL QT_EDITION_DESKTOP
2708 #define QT_EDITION_EVALUATION QT_EDITION_DESKTOP
2712 # ifdef QT_BUILD_QMAKE
2713 # define QT_EDITION QT_EDITION_DESKTOP
2715 # error "Qt not configured correctly, please run configure"
2719 #define QT_LICENSED_MODULE(x) \
2720 enum QtValidLicenseFor##x##Module { Licensed##x = true };
2725 #if (QT_EDITION & QT_MODULE_CORE)
2726 QT_LICENSED_MODULE(Core)
2728 #if (QT_EDITION & QT_MODULE_GUI)
2729 QT_LICENSED_MODULE(Gui)
2731 #if (QT_EDITION & QT_MODULE_NETWORK)
2732 QT_LICENSED_MODULE(Network)
2734 #if (QT_EDITION & QT_MODULE_OPENGL)
2735 QT_LICENSED_MODULE(OpenGL)
2737 #if (QT_EDITION & QT_MODULE_OPENVG)
2738 QT_LICENSED_MODULE(OpenVG)
2740 #if (QT_EDITION & QT_MODULE_SQL)
2741 QT_LICENSED_MODULE(Sql)
2743 #if (QT_EDITION & QT_MODULE_MULTIMEDIA)
2744 QT_LICENSED_MODULE(Multimedia)
2746 #if (QT_EDITION & QT_MODULE_XML)
2747 QT_LICENSED_MODULE(Xml)
2749 #if (QT_EDITION & QT_MODULE_XMLPATTERNS)
2750 QT_LICENSED_MODULE(XmlPatterns)
2752 #if (QT_EDITION & QT_MODULE_HELP)
2753 QT_LICENSED_MODULE(Help)
2755 #if (QT_EDITION & QT_MODULE_SCRIPT) || defined(QT_BUILD_QMAKE)
2756 QT_LICENSED_MODULE(Script)
2758 #if (QT_EDITION & QT_MODULE_SCRIPTTOOLS)
2759 QT_LICENSED_MODULE(ScriptTools)
2761 #if (QT_EDITION & QT_MODULE_QT3SUPPORTLIGHT)
2762 QT_LICENSED_MODULE(Qt3SupportLight)
2764 #if (QT_EDITION & QT_MODULE_QT3SUPPORT)
2765 QT_LICENSED_MODULE(Qt3Support)
2767 #if (QT_EDITION & QT_MODULE_SVG)
2768 QT_LICENSED_MODULE(Svg)
2770 #if (QT_EDITION & QT_MODULE_DECLARATIVE)
2771 QT_LICENSED_MODULE(Declarative)
2773 #if (QT_EDITION & QT_MODULE_ACTIVEQT)
2774 QT_LICENSED_MODULE(ActiveQt)
2776 #if (QT_EDITION & QT_MODULE_TEST)
2777 QT_LICENSED_MODULE(Test)
2779 #if (QT_EDITION & QT_MODULE_DBUS)
2780 QT_LICENSED_MODULE(DBus)
2783 #define QT_MODULE(x) \
2784 typedef QtValidLicenseFor##x##Module Qt##x##Module;
2786 #ifdef QT_NO_CONCURRENT
2787 # define QT_NO_QFUTURE
2792 #if defined(Q_CC_GNU) && (__GNUC__ < 4)
2793 # define QT_NO_CONCURRENT_MAP
2794 # define QT_NO_CONCURRENT_FILTER
2797 #if defined (__ELF__)
2798 # if defined (Q_OS_LINUX) || defined (Q_OS_SOLARIS) || defined (Q_OS_FREEBSD) || defined (Q_OS_OPENBSD) || defined (Q_OS_IRIX)
2803 #if !(defined(Q_WS_WIN) && !defined(Q_WS_WINCE)) \
2804 && !(defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)) \
2805 && !(defined(Q_WS_X11) && !defined(QT_NO_FREETYPE)) \
2806 && !(defined(Q_WS_QPA))
2807 # define QT_NO_RAWFONT
2812 template <
bool B,
typename T =
void>
struct QEnableIf;
2813 template <
typename T>
struct QEnableIf<true, T> {
typedef T Type; };
unsigned int(APIENTRYP PFNGLXGETAGPOFFSETMESAPROC)(const void *pointer)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
#define QT_END_INCLUDE_NAMESPACE
Q_INLINE_TEMPLATE void swap(QT_PREPEND_NAMESPACE(QScopedPointer)< T, Cleanup > &p1, QT_PREPEND_NAMESPACE(QScopedPointer)< T, Cleanup > &p2)
unsigned long long quint64
Q_CORE_EXPORT_INLINE QDebug qWarning()
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
Q_CORE_EXPORT QBitArray operator^(const QBitArray &, const QBitArray &)
Q_CORE_EXPORT QBitArray operator&(const QBitArray &, const QBitArray &)
#define QT_BEGIN_NAMESPACE
GLenum GLsizei GLenum format
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
QT_BEGIN_HEADER QT_BEGIN_NAMESPACE typedef signed char qint8
bool operator!=(const QByteArray &a1, const QByteArray &a2)
GLsizei const GLfloat * value
Q_CORE_EXPORT_INLINE QDebug qDebug()
bool qFuzzyCompare(const QMatrix &m1, const QMatrix &m2)
GLubyte GLubyte GLubyte a
#define QT_BEGIN_INCLUDE_NAMESPACE
Q_CORE_EXPORT QBitArray operator|(const QBitArray &, const QBitArray &)
Q_CORE_EXPORT_INLINE QDebug qCritical()
Q_DECLARE_TYPEINFO(QModelIndex, Q_MOVABLE_TYPE)
GLsizei const GLvoid * pointer