📄 qglobal.h
字号:
/******************************************************************************** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.**** This file is part of the QtCore module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file. Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://trolltech.com/products/qt/licenses/licensing/opensource/**** If you are unsure which license is appropriate for your use, please** review the following information:** http://trolltech.com/products/qt/licenses/licensing/licensingoverview** or contact the sales department at sales@trolltech.com.**** In addition, as a special exception, Trolltech gives you certain** additional rights. These rights are described in the Trolltech GPL** Exception version 1.0, which can be found at** http://www.trolltech.com/products/qt/gplexception/ and in the file** GPL_EXCEPTION.txt in this package.**** In addition, as a special exception, Trolltech, as the sole copyright** holder for Qt Designer, grants users of the Qt/Eclipse Integration** plug-in the right for the Qt/Eclipse Integration to link to** functionality provided by Qt Designer and its related libraries.**** Trolltech reserves all rights not expressly granted herein.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#ifndef QGLOBAL_H#define QGLOBAL_H#include <stddef.h>#define QT_VERSION_STR "4.3.3"/* QT_VERSION is (major << 16) + (minor << 8) + patch.*/#define QT_VERSION 0x040303/* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 3, 0))*/#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))#define QT_PACKAGEDATE_STR "2007-12-04"#if !defined(QT_BUILD_MOC)#include <QtCore/qconfig.h>#endif/* The operating system, must be one of: (Q_OS_x) DARWIN - Darwin OS (synonym for Q_OS_MAC) MSDOS - MS-DOS and Windows OS2 - OS/2 OS2EMX - XFree86 on OS/2 (not PM) WIN32 - Win32 (Windows 95/98/ME and Windows NT/2000/XP) CYGWIN - Cygwin SOLARIS - Sun Solaris HPUX - HP-UX ULTRIX - DEC Ultrix LINUX - Linux FREEBSD - FreeBSD NETBSD - NetBSD OPENBSD - OpenBSD BSDI - BSD/OS IRIX - SGI Irix OSF - HP Tru64 UNIX SCO - SCO OpenServer 5 UNIXWARE - UnixWare 7, Open UNIX 8 AIX - AIX HURD - GNU Hurd DGUX - DG/UX RELIANT - Reliant UNIX DYNIX - DYNIX/ptx QNX - QNX QNX6 - QNX RTP 6.1 LYNX - LynxOS BSD4 - Any BSD 4.4 system UNIX - Any UNIX BSD/SYSV system*/#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))# define Q_OS_DARWIN# define Q_OS_BSD4# ifdef __LP64__# define Q_OS_DARWIN64# else# define Q_OS_DARWIN32# endif#elif defined(__CYGWIN__)# define Q_OS_CYGWIN#elif defined(MSDOS) || defined(_MSDOS)# define Q_OS_MSDOS#elif defined(__OS2__)# if defined(__EMX__)# define Q_OS_OS2EMX# else# define Q_OS_OS2# endif#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))# define Q_OS_WIN32# define Q_OS_WIN64#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))# define Q_OS_WIN32#elif defined(__MWERKS__) && defined(__INTEL__)# define Q_OS_WIN32#elif defined(__sun) || defined(sun)# define Q_OS_SOLARIS#elif defined(hpux) || defined(__hpux)# define Q_OS_HPUX#elif defined(__ultrix) || defined(ultrix)# define Q_OS_ULTRIX#elif defined(sinix)# define Q_OS_RELIANT#elif defined(__linux__) || defined(__linux)# define Q_OS_LINUX#elif defined(__FreeBSD__) || defined(__DragonFly__)# define Q_OS_FREEBSD# define Q_OS_BSD4#elif defined(__NetBSD__)# define Q_OS_NETBSD# define Q_OS_BSD4#elif defined(__OpenBSD__)# define Q_OS_OPENBSD# define Q_OS_BSD4#elif defined(__bsdi__)# define Q_OS_BSDI# define Q_OS_BSD4#elif defined(__sgi)# define Q_OS_IRIX#elif defined(__osf__)# define Q_OS_OSF#elif defined(_AIX)# define Q_OS_AIX#elif defined(__Lynx__)# define Q_OS_LYNX#elif defined(__GNU__)# define Q_OS_HURD#elif defined(__DGUX__)# define Q_OS_DGUX#elif defined(__QNXNTO__)# define Q_OS_QNX6#elif defined(__QNX__)# define Q_OS_QNX#elif defined(_SEQUENT_)# define Q_OS_DYNIX#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */# define Q_OS_SCO#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */# define Q_OS_UNIXWARE#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */# define Q_OS_UNIXWARE#elif defined(__INTEGRITY)# define Q_OS_INTEGRITY#elif defined(__MAKEDEPEND__)#else# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"#endif#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)# define Q_OS_WIN#endif#if defined(Q_OS_DARWIN)# define Q_OS_MAC /* Q_OS_MAC is mostly for compatibility, but also more clear */# define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/# if defined(Q_OS_DARWIN64)# define Q_OS_MAC64# elif defined(Q_OS_DARWIN32)# define Q_OS_MAC32# endif#endif#if defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)# undef Q_OS_UNIX#elif !defined(Q_OS_UNIX)# define Q_OS_UNIX#endif#if defined(Q_OS_DARWIN) && !defined(QT_LARGEFILE_SUPPORT)# define QT_LARGEFILE_SUPPORT 64#endif/* The compiler, must be one of: (Q_CC_x) SYM - Digital Mars C/C++ (used to be Symantec C++) MWERKS - Metrowerks CodeWarrior MSVC - Microsoft Visual C/C++, Intel C++ for Windows BOR - Borland/Turbo C++ WAT - Watcom C++ GNU - GNU C++ COMEAU - Comeau C++ EDG - Edison Design Group C++ OC - CenterLine C++ SUN - Forte Developer, or Sun Studio C++ MIPS - MIPSpro C++ DEC - DEC C++ HPACC - HP aC++ USLC - SCO OUDK and UDK CDS - Reliant C++ KAI - KAI C++ INTEL - Intel C++ for Linux, Intel C++ for Windows HIGHC - MetaWare High C/C++ PGI - Portland Group C++ GHS - Green Hills Optimizing C++ Compilers Should be sorted most to least authoritative.*/#if defined(__ghs)# define Q_OUTOFLINE_TEMPLATE inline#endif/* Symantec C++ is now Digital Mars */#if defined(__DMC__) || defined(__SC__)# define Q_CC_SYM/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */# if defined(__SC__) && __SC__ < 0x750# define Q_NO_EXPLICIT_KEYWORD# endif# define Q_NO_USING_KEYWORD#elif defined(__MWERKS__)# define Q_CC_MWERKS/* "explicit" recognized since 4.0d1 */#elif defined(_MSC_VER)# define Q_CC_MSVC/* proper support of bool for _MSC_VER >= 1100 */# define Q_CANNOT_DELETE_CONSTANT# define Q_OUTOFLINE_TEMPLATE inline# define QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION/* Visual C++.Net issues for _MSC_VER >= 1300 */# if _MSC_VER >= 1300# define Q_CC_MSVC_NET# if _MSC_VER < 1310 || (defined(Q_OS_WIN64) && defined(_M_IA64))# define Q_TYPENAME# else# undef QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION# endif# else# define Q_NO_USING_KEYWORD# define QT_NO_MEMBER_TEMPLATES# endif# if _MSC_VER < 1310# define QT_NO_QOBJECT_CHECK# endif/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */# if defined(__INTEL_COMPILER)# define Q_CC_INTEL# endif/* x64 does not support mmx intrinsics on windows */# if (defined(Q_OS_WIN64) && defined(_M_X64))# undef QT_HAVE_SSE# undef QT_HAVE_SSE2# undef QT_HAVE_MMX# undef QT_HAVE_3DNOW# endif#elif defined(__BORLANDC__) || defined(__TURBOC__)# define Q_CC_BOR# define Q_INLINE_TEMPLATE# if __BORLANDC__ < 0x502# define Q_NO_BOOL_TYPE# define Q_NO_EXPLICIT_KEYWORD# endif# define Q_NO_USING_KEYWORD#elif defined(__WATCOMC__)# define Q_CC_WAT# if defined(Q_OS_QNX4)/* compiler flags */# define Q_TYPENAME# define Q_NO_BOOL_TYPE# define Q_CANNOT_DELETE_CONSTANT# define mutable/* ??? */# define Q_BROKEN_TEMPLATE_SPECIALIZATION/* no template classes in QVariant */# define QT_NO_TEMPLATE_VARIANT/* Wcc does not fill in functions needed by valuelists, maps, and valuestacks implicitly */# define Q_FULL_TEMPLATE_INSTANTIATION/* can we just compare the structures? */# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP/* these are not useful to our customers */# define QT_NO_QWS_MULTIPROCESS# define QT_NO_QWS_CURSOR# endif#elif defined(__GNUC__)# define Q_CC_GNU# define Q_C_CALLBACKS# if defined(__MINGW32__)# define Q_CC_MINGW# endif# if defined(__INTEL_COMPILER)/* Intel C++ also masquerades as GCC 3.2.0 */# define Q_CC_INTEL# endif# ifdef __APPLE__# define Q_NO_DEPRECATED_CONSTRUCTORS# endif# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7# define Q_FULL_TEMPLATE_INSTANTIATION# endif/* GCC 2.95 knows "using" but does not support it correctly */# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95# define Q_NO_USING_KEYWORD# define QT_NO_STL_WCHAR# endif/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1# define Q_WRONG_SB_CTYPE_MACROS# endif/* Apple's GCC 3.1 chokes on our streaming qDebug() */# if defined(Q_OS_DARWIN) && __GNUC__ == 3 && (__GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 3)# define Q_BROKEN_DEBUG_STREAM# endif# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)# define Q_PACKED __attribute__ ((__packed__))# define Q_NO_PACKED_REFERENCE# endif/* IBM compiler versions are a bit messy. There are actually two products: the C product, and the C++ product. The C++ compiler is always packaged with the latest version of the C compiler. Version numbers do not always match. This little table (I'm not sure it's accurate) should be helpful: C++ product C product C Set 3.1 C Compiler 3.0 ... ... C++ Compiler 3.6.6 C Compiler 4.3 ... ... Visual Age C++ 4.0 ... ... ... Visual Age C++ 5.0 C Compiler 5.0 ... ... Visual Age C++ 6.0 C Compiler 6.0 Now: __xlC__ is the version of the C compiler in hexadecimal notation is only an approximation of the C++ compiler version __IBMCPP__ is the version of the C++ compiler in decimal notation but it is not defined on older compilers like C Set 3.1 */#elif defined(__xlC__)# define Q_CC_XLC# define Q_FULL_TEMPLATE_INSTANTIATION# if __xlC__ < 0x400# define Q_NO_BOOL_TYPE# define Q_NO_EXPLICIT_KEYWORD# define Q_NO_USING_KEYWORD# define Q_TYPENAME# define Q_OUTOFLINE_TEMPLATE inline# define Q_BROKEN_TEMPLATE_SPECIALIZATION# define Q_CANNOT_DELETE_CONSTANT# endif/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed on DEC C++ V5.5-004. New versions do define __EDG__ - observed on Compaq C++ V6.3-002. This compiler is different enough from other EDG compilers to handle it separately anyway. */#elif defined(__DECCXX) || defined(__DECC)# define Q_CC_DEC/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older DEC C++ V5 compilers. */# if defined(__EDG__)# define Q_CC_EDG# endif/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead - observed on Compaq C++ V6.3-002. In any case versions prior to Compaq C++ V6.0-005 do not have bool. */# if !defined(_BOOL_EXISTS)# define Q_NO_BOOL_TYPE# endif/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */# define Q_NO_USING_KEYWORD/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on DEC C++ V5.5-004. */# if __DECCXX_VER < 60060000# define Q_TYPENAME# define Q_BROKEN_TEMPLATE_SPECIALIZATION# define Q_CANNOT_DELETE_CONSTANT# endif/* avoid undefined symbol problems with out-of-line template members */# define Q_OUTOFLINE_TEMPLATE inline/* The Portland Group C++ compiler is based on EDG and does define __EDG__ but the C compiler does not */#elif defined(__PGI)# define Q_CC_PGI# if defined(__EDG__)# define Q_CC_EDG# endif/* Compilers with EDG front end are similar. To detect them we test: __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 and PGI C++ 5.2-4 */#elif defined(__EDG) || defined(__EDG__)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -