summaryrefslogtreecommitdiff
path: root/qmake/include/qglobal.h
Side-by-side diff
Diffstat (limited to 'qmake/include/qglobal.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/qglobal.h87
1 files changed, 73 insertions, 14 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
@@ -35,17 +35,17 @@
**
**********************************************************************/
#ifndef QGLOBAL_H
#define QGLOBAL_H
-#define QT_VERSION_STR "3.1.0-b2"
+#define QT_VERSION_STR "3.1.2"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x030100
+#define QT_VERSION 0x030102
/*
The operating system, must be one of: (Q_OS_x)
MACX - Mac OS X
MAC9 - Mac OS 9
@@ -138,18 +138,18 @@
#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 */
+#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
# define Q_OS_SCO
-#elif defined(__UNIXWARE__) /* UnixWare 7 + GCC, Open UNIX 8 + GCC */
+#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
# define Q_OS_UNIXWARE
# define Q_OS_UNIXWARE7
-#elif defined(__USLC__) /* UnixWare 7 + UDK, Open UNIX 8 + OUDK */
+#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
# define Q_OS_UNIXWARE
# define Q_OS_UNIXWARE7
#else
# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
#endif
@@ -222,13 +222,15 @@
/* proper support of bool for _MSC_VER >= 1100 */
# define Q_CANNOT_DELETE_CONSTANT
# define Q_INLINE_TEMPLATES inline
/* Visual C++.Net issues for _MSC_VER >= 1300 */
# if _MSC_VER >= 1300
# define Q_CC_MSVC_NET
-# define Q_TYPENAME
+# if _MSC_VER < 1310
+# define Q_TYPENAME
+# endif
# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
#elif defined(__BORLANDC__) || defined(__TURBOC__)
# define Q_CC_BOR
# if __BORLANDC__ < 0x502
@@ -268,12 +270,16 @@
# 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
# 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
# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
# define Q_PACKED __attribute__ ((packed))
# endif
# if !defined(__EXCEPTIONS)
# define Q_NO_EXCEPTIONS
# endif
@@ -387,22 +393,25 @@
# elif defined(__ghs)
# define Q_CC_GHS
/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
# elif defined(__USLC__) && defined(__SCO_VERSION__)
# define Q_CC_USLC
+/* The latest UDK 7.1.1b does not need this, but previous versions do */
+# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
+# define Q_INLINE_TEMPLATES inline
+# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
/* Never tested! */
# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
# define Q_CC_OC
# define Q_NO_USING_KEYWORD
-/* CDS++ is not documented to define __EDG__ or __EDG in the Reliant
- documentation but we suppose it does, in any case it does follow
- conventions like _BOOL */
+/* CDS++ defines __EDG__ although this is not documented in the Reliant
+ documentation. It also follows conventions like _BOOL and this documented */
# elif defined(sinix)
# define Q_CC_CDS
# define Q_NO_USING_KEYWORD
# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
# define Q_NO_EXCEPTIONS
# endif
@@ -412,25 +421,29 @@
# elif defined(__sgi)
# define Q_CC_MIPS
# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
# define Q_TYPENAME
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
# define Q_STRICT_INLINING_RULES
+# define Q_NO_EXPLICIT_KEYWORD
+# define Q_INLINE_TEMPLATES inline
# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
# define Q_TYPENAME
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
# endif
/* The older UnixWare 2.X compiler? */
-#elif defined(__USLC__) && !defined(__SCO_VERSION__)
+#elif defined(__USLC__)
# define Q_CC_USLC
+# define Q_TYPENAME
# define Q_NO_BOOL_TYPE
# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
+# define Q_INLINE_TEMPLATES inline
/* Never tested! */
#elif defined(__HIGHC__)
# define Q_CC_HIGHC
#elif defined(__SUNPRO_CC)
@@ -451,12 +464,22 @@
# else
# define Q_NO_BOOL_TYPE
# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
# endif
+/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
+ documentation but nevertheless uses EDG conventions like _BOOL */
+#elif defined(sinix)
+# define Q_CC_EDG
+# define Q_CC_CDS
+# if !defined(_BOOL)
+# define Q_NO_BOOL_TYPE
+# endif
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+
#elif defined(Q_OS_HPUX)
/* __HP_aCC was not defined in first aCC releases */
# if defined(__HP_aCC) || __cplusplus >= 199707L
# define Q_CC_HPACC
# else
# define Q_CC_HP
@@ -503,12 +526,13 @@
#elif defined(Q_OS_OS2)
# define Q_WS_PM
# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
#elif defined(Q_OS_UNIX)
# if defined(QWS)
# define Q_WS_QWS
+# define QT_NO_QWS_IM
# elif defined(Q_OS_MACX)
# define Q_WS_MACX
# else
# define Q_WS_X11
# endif
#endif
@@ -742,19 +766,24 @@ class QDataStream;
# endif
# ifndef QMAC_QMENUBAR_NO_EVENT
# define QMAC_QMENUBAR_NO_EVENT
# endif
#endif
+#if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
+# define QT_NO_COP
+#endif
+
#ifndef QT_H
#include <qfeatures.h>
#endif // QT_H
//
// Create Qt DLL if QT_DLL is defined (Windows only)
+// or QT_SHARED is defined (Kylix only)
//
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
# if defined(QT_NODLL)
# undef QT_MAKEDLL
# undef QT_DLL
@@ -767,19 +796,30 @@ class QDataStream;
# define Q_TEMPLATE_EXTERN
# undef Q_DISABLE_COPY /* avoid unresolved externals */
# elif defined(QT_DLL) /* use a Qt DLL library */
# define Q_EXPORT __declspec(dllimport)
# define Q_TEMPLATEDLL
# ifndef Q_TEMPLATE_EXTERN
-# if defined(Q_CC_MSVC)
-# define Q_TEMPLATE_EXTERN /*extern*/ //### too many warnings, even though disabled
+# if defined(Q_CC_MSVC_NET)
+# define Q_TEMPLATE_EXTERN extern
# else
# define Q_TEMPLATE_EXTERN
# endif
# endif
-# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# endif
+#elif defined(Q_OS_LINUX) && defined(Q_CC_BOR)
+# if defined(QT_SHARED) /* create a Qt shared library */
+# define Q_EXPORT __declspec(dllexport)
+# define Q_TEMPLATEDLL
+# define Q_TEMPLATE_EXTERN
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# else
+# define Q_TEMPLATEDLL
+# define Q_TEMPLATE_EXTERN
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
# endif
#else
# undef QT_MAKEDLL /* ignore these for other platforms */
# undef QT_DLL
#endif
@@ -800,13 +840,15 @@ extern Q_EXPORT bool qt_winunicode;
//
// System information
//
Q_EXPORT const char *qVersion();
Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_MAC)
+int qMacVersion();
+#elif defined(Q_WS_WIN)
Q_EXPORT int qWinVersion();
#if defined(UNICODE)
#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
#else
#define QT_WA( uni, ansi ) ansi
@@ -966,12 +1008,28 @@ Q_EXPORT const char *qInstallPathLibs();
Q_EXPORT const char *qInstallPathBins();
Q_EXPORT const char *qInstallPathPlugins();
Q_EXPORT const char *qInstallPathData();
#endif // __cplusplus
+// compilers which follow outdated template instantiation rules
+// require a class to have a comparison operator to exist when
+// a QValueList of this type is instantiated. It's not actually
+// used in the list, though. Hence the dummy implementation.
+// Just in case other code relies on it we better trigger a warning
+// mandating a real implementation.
+#ifdef Q_FULL_TEMPLATE_INSTANTIATION
+# define Q_DUMMY_COMPARISON_OPERATOR(C) \
+ bool operator==( const C& ) const { \
+ qWarning( #C"::operator==( const "#C"& ) got called." ); \
+ return FALSE; \
+ }
+#else
+# define Q_DUMMY_COMPARISON_OPERATOR(C)
+#endif
+
#endif // QGLOBAL_H
//
// Avoid some particularly useless warnings from some stupid compilers.
// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
// the line "#define QT_NO_WARNINGS"
@@ -989,12 +1047,13 @@ Q_EXPORT const char *qInstallPathData();
# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
# pragma warning(disable: 4706) // assignment within conditional expression
# pragma warning(disable: 4786) // truncating debug info after 255 characters
# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
+# pragma warning(disable: 4710) // function not inlined
# elif defined(Q_CC_BOR)
# pragma option -w-inl
# pragma option -w-aus
# pragma warn -inl
# pragma warn -pia
# pragma warn -ccc