summaryrefslogtreecommitdiff
path: root/qmake/include
Unidiff
Diffstat (limited to 'qmake/include') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/private/qdir_p.h2
-rw-r--r--qmake/include/private/qlocale_p.h128
-rw-r--r--qmake/include/private/qsettings_p.h30
-rw-r--r--qmake/include/qfiledefs_p.h64
-rw-r--r--qmake/include/qglobal.h165
-rw-r--r--qmake/include/qlocale.h491
-rw-r--r--qmake/include/qsettings.h156
-rw-r--r--qmake/include/qunicodetables_p.h263
-rw-r--r--qmake/include/quuid.h27
9 files changed, 1253 insertions, 73 deletions
diff --git a/qmake/include/private/qdir_p.h b/qmake/include/private/qdir_p.h
index a6c7c91..4d9dfc6 100644
--- a/qmake/include/private/qdir_p.h
+++ b/qmake/include/private/qdir_p.h
@@ -1,34 +1,34 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Definition of some private QDir functions. 4** Definition of some private QDir functions.
5** 5**
6** Created : 001106 6** Created : 001106
7** 7**
8** Copyright (C) 2000 Trolltech AS. All rights reserved. 8** Copyright (C) 2000 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the tools module of the Qt GUI Toolkit. 10** This file is part of the tools module of the Qt GUI Toolkit.
11** 11**
12** This file may be distributed under the terms of the Q Public License 12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software. 23** Agreement provided with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
diff --git a/qmake/include/private/qlocale_p.h b/qmake/include/private/qlocale_p.h
new file mode 100644
index 0000000..26c05c9
--- a/dev/null
+++ b/qmake/include/private/qlocale_p.h
@@ -0,0 +1,128 @@
1/****************************************************************************
2**
3**
4** Declaration of the QLocalePrivate class
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the widgets module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef QLOCALE_P_H
37#define QLOCALE_P_H
38
39//
40// W A R N I N G
41// -------------
42//
43// This file is not part of the Qt API. It exists for the convenience
44// of internal files. This header file may change from version to version
45// without notice, or even be removed.
46//
47// We mean it.
48//
49//
50
51#include <qstring.h>
52
53struct QLocalePrivate
54{
55public:
56 const QChar &decimal() const { return (QChar&)m_decimal; }
57 const QChar &group() const { return (QChar&)m_group; }
58 const QChar &list() const { return (QChar&)m_list; }
59 const QChar &percent() const { return (QChar&)m_percent; }
60 const QChar &zero() const { return (QChar&)m_zero; }
61 QChar plus() const { return QChar('+'); }
62 const QChar &minus() const { return (QChar&)m_minus; }
63 const QChar &exponential() const { return (QChar&)m_exponential; }
64 QString infinity() const;
65 QString nan() const;
66
67 Q_UINT32 languageId() const { return m_language_id; }
68 Q_UINT32 countryId() const { return m_country_id; }
69
70 bool isDigit(QChar d) const;
71
72 enum GroupSeparatorMode {
73 FailOnGroupSeparators,
74 ParseGroupSeparators
75 };
76
77 enum DoubleForm {
78 DFExponent = 0, // %e or %E
79 DFDecimal, // %f or %F
80 DFSignificantDigits, // %g or %G
81 _DFMax = DFSignificantDigits
82 };
83
84 enum Flags {
85 NoFlags = 0,
86
87 // These correspond to the options in a printf format string
88 Alternate = 0x01,
89 ZeroPadded = 0x02,
90 LeftAdjusted = 0x04,
91 BlankBeforePositive = 0x08,
92 AlwaysShowSign = 0x10,
93 ThousandsGroup = 0x20,
94 CapitalEorX = 0x40 // %x, %e, %f, %g vs. %X, %E, %F, %G
95 };
96
97 QString doubleToString(double d,
98 int precision = -1,
99 DoubleForm form = DFSignificantDigits,
100 int width = -1,
101 unsigned flags = NoFlags) const;
102 QString longLongToString(Q_LLONG l, int precision = -1,
103 int base = 10,
104 int width = -1,
105 unsigned flags = NoFlags) const;
106 QString unsLongLongToString(Q_ULLONG l, int precision = -1,
107 int base = 10,
108 int width = -1,
109 unsigned flags = NoFlags) const;
110 double stringToDouble(QString num, bool *ok, GroupSeparatorMode group_sep_mode) const;
111 Q_LLONG stringToLongLong(QString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const;
112 Q_ULLONG stringToUnsLongLong(QString num, int base, bool *ok, GroupSeparatorMode group_sep_mode) const;
113 bool removeGroupSeparators(QString &num_str) const;
114 bool numberToCLocale(QString &locale_num, GroupSeparatorMode group_sep_mode) const;
115
116 Q_UINT32 m_language_id, m_country_id;
117
118 Q_UINT16 m_decimal, m_group, m_list, m_percent,
119 m_zero, m_minus, m_exponential;
120
121 static const QString m_infinity;
122 static const QString m_nan;
123 static const QChar m_plus;
124
125 static const char *systemLocaleName();
126};
127
128#endif
diff --git a/qmake/include/private/qsettings_p.h b/qmake/include/private/qsettings_p.h
index 095291c..4b76f44 100644
--- a/qmake/include/private/qsettings_p.h
+++ b/qmake/include/private/qsettings_p.h
@@ -1,80 +1,91 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Definition of QSettings related classes 4** Definition of QSettings related classes
5** 5**
6** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 6** Created : 990124
7** 7**
8** This file is part of the tools module of the Qt GUI Toolkit. 8** Copyright (C) 1999-2002 Trolltech AS. All rights reserved.
9** 9**
10** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 10** This file is part of the kernel module of the Qt GUI Toolkit.
11** licenses for Windows may use this file in accordance with the Qt Commercial 11**
12** License Agreement provided with the Software. 12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
13** 20**
14** This file is not available for use under any other license without 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
15** express written permission from the copyright holder. 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
16** 24**
17** 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
18** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19** 27**
20** 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
21** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
22** 32**
23** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
24** not clear to you. 34** not clear to you.
25** 35**
26**********************************************************************/ 36**********************************************************************/
27 37
28#ifndef QSETTINGS_P_H 38#ifndef QSETTINGS_P_H
29#define QSETTINGS_P_H 39#define QSETTINGS_P_H
30 40
31// 41//
32// W A R N I N G 42// W A R N I N G
33// ------------- 43// -------------
34// 44//
35// This file is not part of the Qt API. It exists for the convenience 45// This file is not part of the Qt API. It exists for the convenience
36// of QSettings. This header file may change from version to 46// of QSettings. This header file may change from version to
37// version without notice, or even be removed. 47// version without notice, or even be removed.
38// 48//
39// We mean it. 49// We mean it.
40// 50//
41// 51//
42 52
43#ifndef QT_H 53#ifndef QT_H
44#include "qstringlist.h" 54#include "qstringlist.h"
45#include "qmap.h" 55#include "qmap.h"
46#include "qvaluestack.h" 56#include "qvaluestack.h"
47#endif // QT_H 57#endif // QT_H
48 58
59#ifndef QT_NO_SETTINGS
49class QSettingsSysPrivate; 60class QSettingsSysPrivate;
50 61
51// QSettingsGroup is a map of key/value pairs 62// QSettingsGroup is a map of key/value pairs
52class QSettingsGroup : public QMap<QString,QString> 63class QSettingsGroup : public QMap<QString,QString>
53{ 64{
54public: 65public:
55 QSettingsGroup(); 66 QSettingsGroup();
56 67
57 bool modified; 68 bool modified;
58}; 69};
59 70
60// QSettingsHeading is a map of heading/group pairs 71// QSettingsHeading is a map of heading/group pairs
61class QSettingsHeading : public QMap<QString,QSettingsGroup> 72class QSettingsHeading : public QMap<QString,QSettingsGroup>
62{ 73{
63public: 74public:
64 QSettingsHeading::Iterator git; 75 QSettingsHeading::Iterator git;
65 void read(const QString &); 76 void read(const QString &);
66 void parseLine(QTextStream &); 77 void parseLine(QTextStream &);
67}; 78};
68 79
69 80
70class QSettingsPrivate 81class QSettingsPrivate
71{ 82{
72public: 83public:
73 QSettingsPrivate( QSettings::Format format ); 84 QSettingsPrivate( QSettings::Format format );
74 ~QSettingsPrivate(); 85 ~QSettingsPrivate();
75 86
76 QSettingsGroup readGroup(); 87 QSettingsGroup readGroup();
77 void removeGroup(const QString &); 88 void removeGroup(const QString &);
78 void writeGroup(const QString &, const QString &); 89 void writeGroup(const QString &, const QString &);
79 QDateTime modificationTime(); 90 QDateTime modificationTime();
80 91
@@ -99,35 +110,36 @@ public:
99 // system specific setting database (ie. registry on Windows) 110 // system specific setting database (ie. registry on Windows)
100 111
101 QSettingsSysPrivate *sysd; 112 QSettingsSysPrivate *sysd;
102 voidsysInit(); 113 voidsysInit();
103 voidsysClear(); 114 voidsysClear();
104 115
105#if !defined(Q_NO_BOOL_TYPE) 116#if !defined(Q_NO_BOOL_TYPE)
106 boolsysWriteEntry( const QString &, bool ); 117 boolsysWriteEntry( const QString &, bool );
107#endif 118#endif
108 boolsysWriteEntry( const QString &, double ); 119 boolsysWriteEntry( const QString &, double );
109 boolsysWriteEntry( const QString &, int ); 120 boolsysWriteEntry( const QString &, int );
110 boolsysWriteEntry( const QString &, const QString & ); 121 boolsysWriteEntry( const QString &, const QString & );
111 boolsysWriteEntry( const QString &, const QStringList & ); 122 boolsysWriteEntry( const QString &, const QStringList & );
112 boolsysWriteEntry( const QString &, const QStringList &, const QChar& sep ); 123 boolsysWriteEntry( const QString &, const QStringList &, const QChar& sep );
113 124
114 QStringList sysEntryList(const QString &) const; 125 QStringList sysEntryList(const QString &) const;
115 QStringList sysSubkeyList(const QString &) const; 126 QStringList sysSubkeyList(const QString &) const;
116 127
117 QStringList sysReadListEntry( const QString &, bool * = 0 ) const; 128 QStringList sysReadListEntry( const QString &, bool * = 0 ) const;
118 QStringList sysReadListEntry( const QString &, const QChar& sep, bool * = 0 ) const; 129 QStringList sysReadListEntry( const QString &, const QChar& sep, bool * = 0 ) const;
119 QStringsysReadEntry( const QString &, const QString &def = QString::null, bool * = 0 ) const; 130 QStringsysReadEntry( const QString &, const QString &def = QString::null, bool * = 0 ) const;
120 int sysReadNumEntry( const QString &, int def = 0, bool * = 0 ) const; 131 int sysReadNumEntry( const QString &, int def = 0, bool * = 0 ) const;
121 doublesysReadDoubleEntry( const QString &, double def = 0, bool * = 0 ) const; 132 doublesysReadDoubleEntry( const QString &, double def = 0, bool * = 0 ) const;
122 boolsysReadBoolEntry( const QString &, bool def = 0, bool * = 0 ) const; 133 boolsysReadBoolEntry( const QString &, bool def = 0, bool * = 0 ) const;
123 134
124 boolsysRemoveEntry( const QString & ); 135 boolsysRemoveEntry( const QString & );
125 136
126 boolsysSync(); 137 boolsysSync();
127 138
128 voidsysInsertSearchPath( QSettings::System, const QString & ); 139 voidsysInsertSearchPath( QSettings::System, const QString & );
129 voidsysRemoveSearchPath( QSettings::System, const QString & ); 140 voidsysRemoveSearchPath( QSettings::System, const QString & );
130#endif 141#endif
131};
132 142
143};
144#endif //QT_NO_SETTINGS
133#endif // QSETTINGS_P_H 145#endif // QSETTINGS_P_H
diff --git a/qmake/include/qfiledefs_p.h b/qmake/include/qfiledefs_p.h
new file mode 100644
index 0000000..659aaec
--- a/dev/null
+++ b/qmake/include/qfiledefs_p.h
@@ -0,0 +1,64 @@
1/****************************************************************************
2**
3**
4** Common macros and system include files for QFile, QFileInfo and QDir.
5**
6** Created : 930812
7**
8** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
9**
10** This file is part of the tools module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
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.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#ifndef QFILEDEFS_P_H
39#define QFILEDEFS_P_H
40
41//
42// W A R N I N G
43// -------------
44//
45// This file is not part of the Qt API. It exists for the convenience
46// of qfileinfo*.cpp. This header file may change from version to version
47// without notice, or even be removed.
48//
49// We mean it.
50//
51//
52
53// Be sure to include qplatformdefs.h first!
54struct QFileInfoCache
55{
56#if defined(Q_WS_WIN)
57 QT_STATBUF st;
58#else
59 struct stat st;
60#endif
61};
62
63
64#endif
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h
index 94e5607..b7e919d 100644
--- a/qmake/include/qglobal.h
+++ b/qmake/include/qglobal.h
@@ -1,488 +1,513 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Global type declarations and definitions 4** Global type declarations and definitions
5** 5**
6** Created : 920529 6** Created : 920529
7** 7**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the tools module of the Qt GUI Toolkit. 10** This file is part of the tools module of the Qt GUI Toolkit.
11** 11**
12** This file may be distributed under the terms of the Q Public License 12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software. 23** Agreement provided with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37 37
38#ifndef QGLOBAL_H 38#ifndef QGLOBAL_H
39#define QGLOBAL_H 39#define QGLOBAL_H
40 40
41#define QT_VERSION_STR "3.1.2" 41#define QT_VERSION_STR "3.3.2"
42/* 42/*
43 QT_VERSION is (major << 16) + (minor << 8) + patch. 43 QT_VERSION is (major << 16) + (minor << 8) + patch.
44 */ 44 */
45#define QT_VERSION 0x030102 45#define QT_VERSION 0x030302
46 46
47/* 47/*
48 The operating system, must be one of: (Q_OS_x) 48 The operating system, must be one of: (Q_OS_x)
49 49
50 MACX- Mac OS X 50 MACX- Mac OS X
51 MAC9- Mac OS 9 51 MAC9- Mac OS 9
52 DARWIN - Darwin OS (Without Mac OS X)
52 MSDOS- MS-DOS and Windows 53 MSDOS- MS-DOS and Windows
53 OS2- OS/2 54 OS2- OS/2
54 OS2EMX- XFree86 on OS/2 (not PM) 55 OS2EMX- XFree86 on OS/2 (not PM)
55 WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) 56 WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP)
56 CYGWIN- Cygwin 57 CYGWIN- Cygwin
57 SOLARIS- Sun Solaris 58 SOLARIS- Sun Solaris
58 HPUX- HP-UX 59 HPUX- HP-UX
59 ULTRIX- DEC Ultrix 60 ULTRIX- DEC Ultrix
60 LINUX- Linux 61 LINUX- Linux
61 FREEBSD- FreeBSD 62 FREEBSD- FreeBSD
62 NETBSD- NetBSD 63 NETBSD- NetBSD
63 OPENBSD- OpenBSD 64 OPENBSD- OpenBSD
64 BSDI- BSD/OS 65 BSDI- BSD/OS
65 IRIX- SGI Irix 66 IRIX- SGI Irix
66 OSF- HP Tru64 UNIX 67 OSF- HP Tru64 UNIX
67 SCO- SCO OpenServer 5 68 SCO- SCO OpenServer 5
68 UNIXWARE- UnixWare 7, Open UNIX 8 69 UNIXWARE- UnixWare 7, Open UNIX 8
69 AIX- AIX 70 AIX- AIX
70 HURD- GNU Hurd 71 HURD- GNU Hurd
71 DGUX- DG/UX 72 DGUX- DG/UX
72 RELIANT- Reliant UNIX 73 RELIANT- Reliant UNIX
73 DYNIX- DYNIX/ptx 74 DYNIX- DYNIX/ptx
74 QNX- QNX 75 QNX- QNX
75 QNX6- QNX RTP 6.1 76 QNX6- QNX RTP 6.1
76 LYNX- LynxOS 77 LYNX- LynxOS
77 BSD4- Any BSD 4.4 system 78 BSD4- Any BSD 4.4 system
78 UNIX- Any UNIX BSD/SYSV system 79 UNIX- Any UNIX BSD/SYSV system
79*/ 80*/
80 81
81#if defined(__APPLE__) && defined(__GNUC__) 82#if defined(__DARWIN_X11__)
83# define Q_OS_DARWIN
84#elif defined(__APPLE__) && defined(__GNUC__)
82# define Q_OS_MACX 85# define Q_OS_MACX
83#elif defined(__MACOSX__) 86#elif defined(__MACOSX__)
84# define Q_OS_MACX 87# define Q_OS_MACX
85#elif defined(macintosh) 88#elif defined(macintosh)
86# define Q_OS_MAC9 89# define Q_OS_MAC9
87#elif defined(__CYGWIN__) 90#elif defined(__CYGWIN__)
88# define Q_OS_CYGWIN 91# define Q_OS_CYGWIN
89#elif defined(MSDOS) || defined(_MSDOS) 92#elif defined(MSDOS) || defined(_MSDOS)
90# define Q_OS_MSDOS 93# define Q_OS_MSDOS
91#elif defined(__OS2__) 94#elif defined(__OS2__)
92# if defined(__EMX__) 95# if defined(__EMX__)
93# define Q_OS_OS2EMX 96# define Q_OS_OS2EMX
94# else 97# else
95# define Q_OS_OS2 98# define Q_OS_OS2
96# endif 99# endif
97#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) 100#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
98# define Q_OS_WIN32 101# define Q_OS_WIN32
99# define Q_OS_WIN64 102# define Q_OS_WIN64
100#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) 103#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
101# define Q_OS_WIN32 104# define Q_OS_WIN32
102#elif defined(__MWERKS__) && defined(__INTEL__) 105#elif defined(__MWERKS__) && defined(__INTEL__)
103# define Q_OS_WIN32 106# define Q_OS_WIN32
104#elif defined(__sun) || defined(sun) 107#elif defined(__sun) || defined(sun)
105# define Q_OS_SOLARIS 108# define Q_OS_SOLARIS
106#elif defined(hpux) || defined(__hpux) 109#elif defined(hpux) || defined(__hpux)
107# define Q_OS_HPUX 110# define Q_OS_HPUX
108#elif defined(__ultrix) || defined(ultrix) 111#elif defined(__ultrix) || defined(ultrix)
109# define Q_OS_ULTRIX 112# define Q_OS_ULTRIX
110#elif defined(sinix) 113#elif defined(sinix)
111# define Q_OS_RELIANT 114# define Q_OS_RELIANT
112#elif defined(__linux__) || defined(__linux) 115#elif defined(__linux__) || defined(__linux)
113# define Q_OS_LINUX 116# define Q_OS_LINUX
114#elif defined(__FreeBSD__) 117#elif defined(__FreeBSD__) || defined(__DragonFly__)
115# define Q_OS_FREEBSD 118# define Q_OS_FREEBSD
116# define Q_OS_BSD4 119# define Q_OS_BSD4
117#elif defined(__NetBSD__) 120#elif defined(__NetBSD__)
118# define Q_OS_NETBSD 121# define Q_OS_NETBSD
119# define Q_OS_BSD4 122# define Q_OS_BSD4
120#elif defined(__OpenBSD__) 123#elif defined(__OpenBSD__)
121# define Q_OS_OPENBSD 124# define Q_OS_OPENBSD
122# define Q_OS_BSD4 125# define Q_OS_BSD4
123#elif defined(__bsdi__) 126#elif defined(__bsdi__)
124# define Q_OS_BSDI 127# define Q_OS_BSDI
125# define Q_OS_BSD4 128# define Q_OS_BSD4
126#elif defined(__sgi) 129#elif defined(__sgi)
127# define Q_OS_IRIX 130# define Q_OS_IRIX
128#elif defined(__osf__) 131#elif defined(__osf__)
129# define Q_OS_OSF 132# define Q_OS_OSF
130#elif defined(_AIX) 133#elif defined(_AIX)
131# define Q_OS_AIX 134# define Q_OS_AIX
132#elif defined(__Lynx__) 135#elif defined(__Lynx__)
133# define Q_OS_LYNX 136# define Q_OS_LYNX
134#elif defined(__GNU_HURD__) 137#elif defined(__GNU_HURD__)
135# define Q_OS_HURD 138# define Q_OS_HURD
136#elif defined(__DGUX__) 139#elif defined(__DGUX__)
137# define Q_OS_DGUX 140# define Q_OS_DGUX
138#elif defined(__QNXNTO__) 141#elif defined(__QNXNTO__)
139# define Q_OS_QNX6 142# define Q_OS_QNX6
140#elif defined(__QNX__) 143#elif defined(__QNX__)
141# define Q_OS_QNX 144# define Q_OS_QNX
142#elif defined(_SEQUENT_) 145#elif defined(_SEQUENT_)
143# define Q_OS_DYNIX 146# define Q_OS_DYNIX
144#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ 147#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
145# define Q_OS_SCO 148# define Q_OS_SCO
146#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ 149#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
147# define Q_OS_UNIXWARE 150# define Q_OS_UNIXWARE
148# define Q_OS_UNIXWARE7 151# define Q_OS_UNIXWARE7
149#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ 152#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
150# define Q_OS_UNIXWARE 153# define Q_OS_UNIXWARE
151# define Q_OS_UNIXWARE7 154# define Q_OS_UNIXWARE7
155#elif defined(__MAKEDEPEND__)
152#else 156#else
153# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" 157# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
154#endif 158#endif
155 159
160#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
161# define Q_OS_WIN
162#endif
163
156#if defined(Q_OS_MAC9) || defined(Q_OS_MACX) 164#if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
157/* This hack forces the generater to compile qmake not for maxosx native. It is 165# define Q_OS_MAC
158 * compiled for Linux and generates usual makefiles..
159 * Does anyone has a better solution for this ? (eilers)
160 */
161// # define Q_OS_MAC
162#define Q_OS_LINUX
163#warning "boeser Hack !! (se)"
164#undef Q_OS_MACX
165#endif 166#endif
166 167
167#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) 168#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
168# undef Q_OS_UNIX 169# undef Q_OS_UNIX
169#elif !defined(Q_OS_UNIX) 170#elif !defined(Q_OS_UNIX)
170# define Q_OS_UNIX 171# define Q_OS_UNIX
171#endif 172#endif
172 173
173 174
174/* 175/*
175 The compiler, must be one of: (Q_CC_x) 176 The compiler, must be one of: (Q_CC_x)
176 177
177 SYM- Symantec C++ for both PC and Macintosh 178 SYM- Symantec C++ for both PC and Macintosh
178 MPW- MPW C++ 179 MPW- MPW C++
179 MWERKS- Metrowerks CodeWarrior 180 MWERKS- Metrowerks CodeWarrior
180 MSVC- Microsoft Visual C/C++ 181 MSVC- Microsoft Visual C/C++, Intel C++ for Windows
181 BOR- Borland/Turbo C++ 182 BOR- Borland/Turbo C++
182 WAT- Watcom C++ 183 WAT- Watcom C++
183 GNU- GNU C++ 184 GNU- GNU C++
184 COMEAU- Comeau C++ 185 COMEAU- Comeau C++
185 EDG- Edison Design Group C++ 186 EDG- Edison Design Group C++
186 OC - CenterLine C++ 187 OC - CenterLine C++
187 SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ 188 SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++
188 MIPS- MIPSpro C++ 189 MIPS- MIPSpro C++
189 DEC- DEC C++ 190 DEC- DEC C++
190 HP - HPUX C++ 191 HP - HPUX C++
191 HPACC- HPUX ANSI C++ 192 HPACC- HPUX ANSI C++
192 USLC- SCO OUDK, UDK, and UnixWare 2.X C++ 193 USLC- SCO OUDK, UDK, and UnixWare 2.X C++
193 CDS- Reliant C++ 194 CDS- Reliant C++
194 KAI- KAI C++ 195 KAI- KAI C++
195 INTEL- Intel C++ 196 INTEL- Intel C++ for Linux, Intel C++ for Windows
196 HIGHC- MetaWare High C/C++ 197 HIGHC- MetaWare High C/C++
197 PGI- Portland Group C++ 198 PGI- Portland Group C++
198 GHS- Green Hills Optimizing C++ Compilers 199 GHS- Green Hills Optimizing C++ Compilers
199 200
200 Should be sorted most to least authoritative. 201 Should be sorted most to least authoritative.
201*/ 202*/
202 203
203/* Symantec C++ is now Digital Mars */ 204/* Symantec C++ is now Digital Mars */
204#if defined(__DMC__) || defined(__SC__) 205#if defined(__DMC__) || defined(__SC__)
205# define Q_CC_SYM 206# define Q_CC_SYM
206/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ 207/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */
207# if defined(__SC__) && __SC__ < 0x750 208# if defined(__SC__) && __SC__ < 0x750
208# define Q_NO_EXPLICIT_KEYWORD 209# define Q_NO_EXPLICIT_KEYWORD
209# endif 210# endif
210# define Q_NO_USING_KEYWORD 211# define Q_NO_USING_KEYWORD
211# if !defined(_CPPUNWIND) 212# if !defined(_CPPUNWIND)
212# define Q_NO_EXCEPTIONS 213# define Q_NO_EXCEPTIONS
213# endif 214# endif
214 215
215#elif defined(applec) 216#elif defined(applec)
216# define Q_CC_MPW 217# define Q_CC_MPW
217# define Q_NO_BOOL_TYPE 218# define Q_NO_BOOL_TYPE
218# define Q_NO_EXPLICIT_KEYWORD 219# define Q_NO_EXPLICIT_KEYWORD
219# define Q_NO_USING_KEYWORD 220# define Q_NO_USING_KEYWORD
220 221
221#elif defined(__MWERKS__) 222#elif defined(__MWERKS__)
222# define Q_CC_MWERKS 223# define Q_CC_MWERKS
223/* "explicit" recognized since 4.0d1 */ 224/* "explicit" recognized since 4.0d1 */
224# define QMAC_PASCAL pascal 225# define QMAC_PASCAL pascal
225# define Q_NO_USING_KEYWORD /* ### check "using" status */
226 226
227#elif defined(_MSC_VER) 227#elif defined(_MSC_VER)
228# define Q_CC_MSVC 228# define Q_CC_MSVC
229/* proper support of bool for _MSC_VER >= 1100 */ 229/* proper support of bool for _MSC_VER >= 1100 */
230# define Q_CANNOT_DELETE_CONSTANT 230# define Q_CANNOT_DELETE_CONSTANT
231# define Q_INLINE_TEMPLATES inline 231# define Q_INLINE_TEMPLATES inline
232/* Visual C++.Net issues for _MSC_VER >= 1300 */ 232/* Visual C++.Net issues for _MSC_VER >= 1300 */
233# if _MSC_VER >= 1300 233# if _MSC_VER >= 1300
234# define Q_CC_MSVC_NET 234# define Q_CC_MSVC_NET
235# if _MSC_VER < 1310 235# if _MSC_VER < 1310 || defined(Q_OS_WIN64)
236# define Q_TYPENAME 236# define Q_TYPENAME
237# endif 237# endif
238# endif 238# endif
239# define Q_NO_USING_KEYWORD /* ### check "using" status */ 239/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
240# if defined(__INTEL_COMPILER)
241# define Q_CC_INTEL
242# if !defined(__EXCEPTIONS)
243# define Q_NO_EXCEPTIONS
244# endif
245# else
246# define Q_NO_USING_KEYWORD /* ### check "using" status */
247# endif
240 248
241#elif defined(__BORLANDC__) || defined(__TURBOC__) 249#elif defined(__BORLANDC__) || defined(__TURBOC__)
242# define Q_CC_BOR 250# define Q_CC_BOR
243# if __BORLANDC__ < 0x502 251# if __BORLANDC__ < 0x502
244# define Q_NO_BOOL_TYPE 252# define Q_NO_BOOL_TYPE
245# define Q_NO_EXPLICIT_KEYWORD 253# define Q_NO_EXPLICIT_KEYWORD
246# endif 254# endif
247# define Q_NO_USING_KEYWORD /* ### check "using" status */ 255# define Q_NO_USING_KEYWORD /* ### check "using" status */
248 256
249#elif defined(__WATCOMC__) 257#elif defined(__WATCOMC__)
250# define Q_CC_WAT 258# define Q_CC_WAT
251# if defined(Q_OS_QNX4) 259# if defined(Q_OS_QNX4)
252/* compiler flags */ 260/* compiler flags */
253# define Q_TYPENAME 261# define Q_TYPENAME
254# define Q_NO_BOOL_TYPE 262# define Q_NO_BOOL_TYPE
255# define Q_CANNOT_DELETE_CONSTANT 263# define Q_CANNOT_DELETE_CONSTANT
256# define mutable 264# define mutable
257/* ??? */ 265/* ??? */
258# define Q_BROKEN_TEMPLATE_SPECIALIZATION 266# define Q_BROKEN_TEMPLATE_SPECIALIZATION
259/* no template classes in QVariant */ 267/* no template classes in QVariant */
260# define QT_NO_TEMPLATE_VARIANT 268# define QT_NO_TEMPLATE_VARIANT
261/* Wcc does not fill in functions needed by valuelists, maps, and 269/* Wcc does not fill in functions needed by valuelists, maps, and
262 valuestacks implicitly */ 270 valuestacks implicitly */
263# define Q_FULL_TEMPLATE_INSTANTIATION 271# define Q_FULL_TEMPLATE_INSTANTIATION
264/* can we just compare the structures? */ 272/* can we just compare the structures? */
265# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP 273# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP
266/* these are not useful to our customers */ 274/* these are not useful to our customers */
267# define QT_QWS_NO_SHM 275# define QT_QWS_NO_SHM
268# define QT_NO_QWS_MULTIPROCESS 276# define QT_NO_QWS_MULTIPROCESS
269# define QT_NO_SQL 277# define QT_NO_SQL
270# define QT_NO_QWS_CURSOR 278# define QT_NO_QWS_CURSOR
271# endif 279# endif
272 280
273#elif defined(__GNUC__) 281#elif defined(__GNUC__)
274# define Q_CC_GNU 282# define Q_CC_GNU
275# define Q_C_CALLBACKS 283# define Q_C_CALLBACKS
276# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 284# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
277# define Q_FULL_TEMPLATE_INSTANTIATION 285# define Q_FULL_TEMPLATE_INSTANTIATION
278# endif 286# endif
279/* GCC 2.95 knows "using" but does not support it correctly */ 287/* GCC 2.95 knows "using" but does not support it correctly */
280# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 288# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
281# define Q_NO_USING_KEYWORD 289# define Q_NO_USING_KEYWORD
282# endif 290# endif
283/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ 291/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */
284# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 292# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
285# define Q_WRONG_SB_CTYPE_MACROS 293# define Q_WRONG_SB_CTYPE_MACROS
286# endif 294# endif
295
296/* ARM gcc pads structs to 32 bits, even when they contain a single
297 char, or short. We tell gcc to pack QChars to 16 bits, to avoid
298 QString bloat. However, gcc 3.4 doesn't allow us to create references to
299 members of a packed struct. (Pointers are OK, because then you
300 supposedly know what you are doing.) */
287# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) 301# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
288# define Q_PACKED __attribute__ ((packed)) 302# define Q_PACKED __attribute__ ((packed))
303# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
304# define Q_NO_PACKED_REFERENCE
305# endif
289# endif 306# endif
290# if !defined(__EXCEPTIONS) 307# if !defined(__EXCEPTIONS)
291# define Q_NO_EXCEPTIONS 308# define Q_NO_EXCEPTIONS
292# endif 309# endif
293 310
294/* IBM compiler versions are a bit messy. There are actually two products: 311/* IBM compiler versions are a bit messy. There are actually two products:
295 the C product, and the C++ product. The C++ compiler is always packaged 312 the C product, and the C++ product. The C++ compiler is always packaged
296 with the latest version of the C compiler. Version numbers do not always 313 with the latest version of the C compiler. Version numbers do not always
297 match. This little table (I'm not sure it's accurate) should be helpful: 314 match. This little table (I'm not sure it's accurate) should be helpful:
298 315
299 C++ product C product 316 C++ product C product
300 317
301 C Set 3.1 C Compiler 3.0 318 C Set 3.1 C Compiler 3.0
302 ... ... 319 ... ...
303 C++ Compiler 3.6.6 C Compiler 4.3 320 C++ Compiler 3.6.6 C Compiler 4.3
304 ... ... 321 ... ...
305 Visual Age C++ 4.0 ... 322 Visual Age C++ 4.0 ...
306 ... ... 323 ... ...
307 Visual Age C++ 5.0 C Compiler 5.0 324 Visual Age C++ 5.0 C Compiler 5.0
325 ... ...
326 Visual Age C++ 6.0 C Compiler 6.0
308 327
309 Now: 328 Now:
310 __xlC__ is the version of the C compiler in hexadecimal notation 329 __xlC__ is the version of the C compiler in hexadecimal notation
311 is only an approximation of the C++ compiler version 330 is only an approximation of the C++ compiler version
312 __IBMCPP__ is the version of the C++ compiler in decimal notation 331 __IBMCPP__ is the version of the C++ compiler in decimal notation
313 but it is not defined on older compilers like C Set 3.1 */ 332 but it is not defined on older compilers like C Set 3.1 */
314#elif defined(__xlC__) 333#elif defined(__xlC__)
315# define Q_CC_XLC 334# define Q_CC_XLC
316# define Q_FULL_TEMPLATE_INSTANTIATION 335# define Q_FULL_TEMPLATE_INSTANTIATION
317# if __xlC__ < 0x400 336# if __xlC__ < 0x400
318# define Q_NO_BOOL_TYPE 337# define Q_NO_BOOL_TYPE
319# define Q_NO_EXPLICIT_KEYWORD 338# define Q_NO_EXPLICIT_KEYWORD
320# define Q_NO_USING_KEYWORD 339# define Q_NO_USING_KEYWORD
321# define Q_TYPENAME 340# define Q_TYPENAME
322# define Q_INLINE_TEMPLATES inline 341# define Q_INLINE_TEMPLATES inline
323# define Q_BROKEN_TEMPLATE_SPECIALIZATION 342# define Q_BROKEN_TEMPLATE_SPECIALIZATION
324# define Q_CANNOT_DELETE_CONSTANT 343# define Q_CANNOT_DELETE_CONSTANT
325# endif 344# endif
326 345
327/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed 346/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed
328 on DEC C++ V5.5-004. New versions do define __EDG__ - observed on 347 on DEC C++ V5.5-004. New versions do define __EDG__ - observed on
329 Compaq C++ V6.3-002. 348 Compaq C++ V6.3-002.
330 This compiler is different enough from other EDG compilers to handle 349 This compiler is different enough from other EDG compilers to handle
331 it separately anyway. */ 350 it separately anyway. */
332#elif defined(__DECCXX) 351#elif defined(__DECCXX) || defined(__DECC)
333# define Q_CC_DEC 352# define Q_CC_DEC
334/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older 353/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older
335 DEC C++ V5 compilers. */ 354 DEC C++ V5 compilers. */
336# if defined(__EDG__) 355# if defined(__EDG__)
337# define Q_CC_EDG 356# define Q_CC_EDG
338# endif 357# endif
339/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead 358/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead
340 - observed on Compaq C++ V6.3-002. 359 - observed on Compaq C++ V6.3-002.
341 In any case versions prior to Compaq C++ V6.0-005 do not have bool. */ 360 In any case versions prior to Compaq C++ V6.0-005 do not have bool. */
342# if !defined(_BOOL_EXISTS) 361# if !defined(_BOOL_EXISTS)
343# define Q_NO_BOOL_TYPE 362# define Q_NO_BOOL_TYPE
344# endif 363# endif
345/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */ 364/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */
346# define Q_NO_USING_KEYWORD 365# define Q_NO_USING_KEYWORD
347/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on 366/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on
348 DEC C++ V5.5-004. */ 367 DEC C++ V5.5-004. */
349# if __DECCXX_VER < 60060000 368# if __DECCXX_VER < 60060000
350# define Q_TYPENAME 369# define Q_TYPENAME
351# define Q_BROKEN_TEMPLATE_SPECIALIZATION 370# define Q_BROKEN_TEMPLATE_SPECIALIZATION
352# define Q_CANNOT_DELETE_CONSTANT 371# define Q_CANNOT_DELETE_CONSTANT
353# endif 372# endif
354/* avoid undefined symbol problems with out-of-line template members */ 373/* avoid undefined symbol problems with out-of-line template members */
355# define Q_INLINE_TEMPLATES inline 374# define Q_INLINE_TEMPLATES inline
356 375
357/* Compilers with EDG front end are similar. To detect them we test: 376/* Compilers with EDG front end are similar. To detect them we test:
358 __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b 377 __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b
359 __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ 378 __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */
360#elif defined(__EDG) || defined(__EDG__) 379#elif defined(__EDG) || defined(__EDG__)
361# define Q_CC_EDG 380# define Q_CC_EDG
362/* From the EDG documentation (does not seem to apply to Compaq C++): 381/* From the EDG documentation (does not seem to apply to Compaq C++):
363 _BOOL 382 _BOOL
364 Defined in C++ mode when bool is a keyword. The name of this 383 Defined in C++ mode when bool is a keyword. The name of this
365 predefined macro is specified by a configuration flag. _BOOL 384 predefined macro is specified by a configuration flag. _BOOL
366 is the default. 385 is the default.
367 __BOOL_DEFINED 386 __BOOL_DEFINED
368 Defined in Microsoft C++ mode when bool is a keyword. */ 387 Defined in Microsoft C++ mode when bool is a keyword. */
369# if !defined(_BOOL) && !defined(__BOOL_DEFINED) 388# if !defined(_BOOL) && !defined(__BOOL_DEFINED)
370# define Q_NO_BOOL_TYPE 389# define Q_NO_BOOL_TYPE
371# endif 390# endif
372 391
373/* The Portland Group compiler is based on EDG and does define __EDG__ */ 392/* The Comeau compiler is based on EDG and does define __EDG__ */
374# if defined(__COMO__) 393# if defined(__COMO__)
375# define Q_CC_COMEAU 394# define Q_CC_COMEAU
376# define Q_C_CALLBACKS 395# define Q_C_CALLBACKS
377 396
378/* Using the `using' keyword avoids KAI C++ warnings */ 397/* The `using' keyword was introduced to avoid KAI C++ warnings
398 but it's now causing KAI C++ errors instead. The standard is
399 unclear about the use of this keyword, and in practice every
400 compiler is using its own set of rules. Forget it. */
379# elif defined(__KCC) 401# elif defined(__KCC)
380# define Q_CC_KAI 402# define Q_CC_KAI
381# if !defined(_EXCEPTIONS) 403# if !defined(_EXCEPTIONS)
382# define Q_NO_EXCEPTIONS 404# define Q_NO_EXCEPTIONS
383# endif 405# endif
406# define Q_NO_USING_KEYWORD
384 407
385/* Using the `using' keyword avoids Intel C++ warnings */ 408/* Using the `using' keyword avoids Intel C++ for Linux warnings */
386# elif defined(__INTEL_COMPILER) 409# elif defined(__INTEL_COMPILER)
387# define Q_CC_INTEL 410# define Q_CC_INTEL
388# if !defined(__EXCEPTIONS) 411# if !defined(__EXCEPTIONS)
389# define Q_NO_EXCEPTIONS 412# define Q_NO_EXCEPTIONS
390# endif 413# endif
391 414
392/* The Portland Group compiler is based on EDG and does define __EDG__ */ 415/* The Portland Group compiler is based on EDG and does define __EDG__ */
393# elif defined(__PGI) 416# elif defined(__PGI)
394# define Q_CC_PGI 417# define Q_CC_PGI
395# if !defined(__EXCEPTIONS) 418# if !defined(__EXCEPTIONS)
396# define Q_NO_EXCEPTIONS 419# define Q_NO_EXCEPTIONS
397# endif 420# endif
398 421
399/* Never tested! */ 422/* Never tested! */
400# elif defined(__ghs) 423# elif defined(__ghs)
401# define Q_CC_GHS 424# define Q_CC_GHS
402 425
403/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ 426/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
404# elif defined(__USLC__) && defined(__SCO_VERSION__) 427# elif defined(__USLC__) && defined(__SCO_VERSION__)
405# define Q_CC_USLC 428# define Q_CC_USLC
406/* The latest UDK 7.1.1b does not need this, but previous versions do */ 429/* The latest UDK 7.1.1b does not need this, but previous versions do */
407# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010) 430# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
408# define Q_INLINE_TEMPLATES inline 431# define Q_INLINE_TEMPLATES inline
409# endif 432# endif
410# define Q_NO_USING_KEYWORD /* ### check "using" status */ 433# define Q_NO_USING_KEYWORD /* ### check "using" status */
411 434
412/* Never tested! */ 435/* Never tested! */
413# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) 436# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
414# define Q_CC_OC 437# define Q_CC_OC
415# define Q_NO_USING_KEYWORD 438# define Q_NO_USING_KEYWORD
416 439
417/* CDS++ defines __EDG__ although this is not documented in the Reliant 440/* CDS++ defines __EDG__ although this is not documented in the Reliant
418 documentation. It also follows conventions like _BOOL and this documented */ 441 documentation. It also follows conventions like _BOOL and this documented */
419# elif defined(sinix) 442# elif defined(sinix)
420# define Q_CC_CDS 443# define Q_CC_CDS
421# define Q_NO_USING_KEYWORD 444# define Q_NO_USING_KEYWORD
422# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */ 445# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
423# define Q_NO_EXCEPTIONS 446# define Q_NO_EXCEPTIONS
424# endif 447# endif
425 448
426/* The MIPSpro compiler in o32 mode is based on EDG but disables features 449/* The MIPSpro compiler in o32 mode is based on EDG but disables features
427 such as template specialization nevertheless */ 450 such as template specialization nevertheless */
428# elif defined(__sgi) 451# elif defined(__sgi)
429# define Q_CC_MIPS 452# define Q_CC_MIPS
430# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ 453# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
431# define Q_TYPENAME 454# define Q_TYPENAME
432# define Q_BROKEN_TEMPLATE_SPECIALIZATION 455# define Q_BROKEN_TEMPLATE_SPECIALIZATION
433# define Q_STRICT_INLINING_RULES
434# define Q_NO_EXPLICIT_KEYWORD 456# define Q_NO_EXPLICIT_KEYWORD
435# define Q_INLINE_TEMPLATES inline 457# define Q_INLINE_TEMPLATES inline
436# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ 458# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
437# define Q_TYPENAME 459# define Q_TYPENAME
438# define Q_BROKEN_TEMPLATE_SPECIALIZATION 460# define Q_BROKEN_TEMPLATE_SPECIALIZATION
439# endif 461# endif
440# define Q_NO_USING_KEYWORD /* ### check "using" status */ 462# define Q_NO_USING_KEYWORD /* ### check "using" status */
463# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
464# pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */
465# endif
441# endif 466# endif
442 467
443/* The older UnixWare 2.X compiler? */ 468/* The older UnixWare 2.X compiler? */
444#elif defined(__USLC__) 469#elif defined(__USLC__)
445# define Q_CC_USLC 470# define Q_CC_USLC
446# define Q_TYPENAME 471# define Q_TYPENAME
447# define Q_NO_BOOL_TYPE 472# define Q_NO_BOOL_TYPE
448# define Q_NO_EXPLICIT_KEYWORD 473# define Q_NO_EXPLICIT_KEYWORD
449# define Q_NO_USING_KEYWORD 474# define Q_NO_USING_KEYWORD
450# define Q_INLINE_TEMPLATES inline 475# define Q_INLINE_TEMPLATES inline
451 476
452/* Never tested! */ 477/* Never tested! */
453#elif defined(__HIGHC__) 478#elif defined(__HIGHC__)
454# define Q_CC_HIGHC 479# define Q_CC_HIGHC
455 480
456#elif defined(__SUNPRO_CC) 481#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
457# define Q_CC_SUN 482# define Q_CC_SUN
458/* 5.0 compiler or better 483/* 5.0 compiler or better
459 'bool' is enabled by default but can be disabled using -features=nobool 484 'bool' is enabled by default but can be disabled using -features=nobool
460 in which case _BOOL is not defined 485 in which case _BOOL is not defined
461 this is the default in 4.2 compatibility mode triggered by -compat=4 */ 486 this is the default in 4.2 compatibility mode triggered by -compat=4 */
462# if __SUNPRO_CC >= 0x500 487# if __SUNPRO_CC >= 0x500
463# if !defined(_BOOL) 488# if !defined(_BOOL)
464# define Q_NO_BOOL_TYPE 489# define Q_NO_BOOL_TYPE
465# endif 490# endif
466# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) 491# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
467# define Q_NO_USING_KEYWORD 492# define Q_NO_USING_KEYWORD
468# endif 493# endif
469# define Q_C_CALLBACKS 494# define Q_C_CALLBACKS
470/* 4.2 compiler or older */ 495/* 4.2 compiler or older */
471# else 496# else
472# define Q_NO_BOOL_TYPE 497# define Q_NO_BOOL_TYPE
473# define Q_NO_EXPLICIT_KEYWORD 498# define Q_NO_EXPLICIT_KEYWORD
474# define Q_NO_USING_KEYWORD 499# define Q_NO_USING_KEYWORD
475# endif 500# endif
476 501
477/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant 502/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
478 documentation but nevertheless uses EDG conventions like _BOOL */ 503 documentation but nevertheless uses EDG conventions like _BOOL */
479#elif defined(sinix) 504#elif defined(sinix)
480# define Q_CC_EDG 505# define Q_CC_EDG
481# define Q_CC_CDS 506# define Q_CC_CDS
482# if !defined(_BOOL) 507# if !defined(_BOOL)
483# define Q_NO_BOOL_TYPE 508# define Q_NO_BOOL_TYPE
484# endif 509# endif
485# define Q_BROKEN_TEMPLATE_SPECIALIZATION 510# define Q_BROKEN_TEMPLATE_SPECIALIZATION
486 511
487#elif defined(Q_OS_HPUX) 512#elif defined(Q_OS_HPUX)
488/* __HP_aCC was not defined in first aCC releases */ 513/* __HP_aCC was not defined in first aCC releases */
@@ -576,343 +601,358 @@
576#if defined(Q_CC_HP) 601#if defined(Q_CC_HP)
577// bool is an unsupported reserved keyword in later versions 602// bool is an unsupported reserved keyword in later versions
578#define bool int 603#define bool int
579#else 604#else
580typedef int bool; 605typedef int bool;
581#endif 606#endif
582#endif 607#endif
583 608
584typedef unsigned char uchar; 609typedef unsigned char uchar;
585typedef unsigned short ushort; 610typedef unsigned short ushort;
586 typedef unsigneduint; 611 typedef unsigneduint;
587typedef unsigned long ulong; 612typedef unsigned long ulong;
588 typedef char *pchar; 613 typedef char *pchar;
589 typedef uchar *puchar; 614 typedef uchar *puchar;
590typedef const char *pcchar; 615typedef const char *pcchar;
591 616
592 617
593// 618//
594// Constant bool values 619// Constant bool values
595// 620//
596 621
597#ifndef TRUE 622#ifndef TRUE
598const bool FALSE = 0; 623const bool FALSE = 0;
599const bool TRUE = !0; 624const bool TRUE = !0;
600#endif 625#endif
601#if defined(__WATCOMC__) 626#if defined(__WATCOMC__)
602# if defined(Q_OS_QNX4) 627# if defined(Q_OS_QNX4)
603const bool false = FALSE; 628const bool false = FALSE;
604const bool true = TRUE; 629const bool true = TRUE;
605# endif 630# endif
606#endif 631#endif
607 632
633//
634// Proper for-scoping
635// ### turn on in 4.0
636
637#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
638# define for if(0){}else for
639#endif
608 640
609// 641//
610// Use the "explicit" keyword on platforms that support it. 642// Use the "explicit" keyword on platforms that support it.
611// 643//
612 644
613#if !defined(Q_NO_EXPLICIT_KEYWORD) 645#if !defined(Q_NO_EXPLICIT_KEYWORD)
614# define Q_EXPLICIT explicit 646# define Q_EXPLICIT explicit
615#else 647#else
616# define Q_EXPLICIT 648# define Q_EXPLICIT
617#endif 649#endif
618 650
619 651
620// 652//
621// Workaround for static const members on MSVC++. 653// Workaround for static const members on MSVC++.
622// 654//
623 655
624#if defined(Q_CC_MSVC) 656#if defined(Q_CC_MSVC)
625# define QT_STATIC_CONST static 657# define QT_STATIC_CONST static
626# define QT_STATIC_CONST_IMPL 658# define QT_STATIC_CONST_IMPL
627#else 659#else
628# define QT_STATIC_CONST static const 660# define QT_STATIC_CONST static const
629# define QT_STATIC_CONST_IMPL const 661# define QT_STATIC_CONST_IMPL const
630#endif 662#endif
631 663
632 664
633// 665//
634// Utility macros and inline functions 666// Utility macros and inline functions
635// 667//
636 668
637 #define QMAX(a, b)((b) < (a) ? (a) : (b)) 669 #define QMAX(a, b)((b) < (a) ? (a) : (b))
638 #define QMIN(a, b)((a) < (b) ? (a) : (b)) 670 #define QMIN(a, b)((a) < (b) ? (a) : (b))
639 #define QABS(a)((a) >= 0 ? (a) : -(a)) 671 #define QABS(a)((a) >= 0 ? (a) : -(a))
640 672
641inline int qRound( double d ) 673inline int qRound( double d )
642{ 674{
643 return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1); 675 return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1);
644} 676}
645 677
646 678
647// 679//
648// Size-dependent types (architechture-dependent byte order) 680// Size-dependent types (architechture-dependent byte order)
649// 681//
650 682
651#if !defined(QT_CLEAN_NAMESPACE) 683#if !defined(QT_CLEAN_NAMESPACE)
652// source compatibility with Qt 1.x 684// source compatibility with Qt 1.x
653 typedef signed char INT8; // 8 bit signed 685 typedef signed char INT8; // 8 bit signed
654 typedef unsigned char UINT8; // 8 bit unsigned 686 typedef unsigned char UINT8; // 8 bit unsigned
655 typedef short INT16; // 16 bit signed 687 typedef short INT16; // 16 bit signed
656 typedef unsigned short UINT16; // 16 bit unsigned 688 typedef unsigned short UINT16; // 16 bit unsigned
657 typedef int INT32; // 32 bit signed 689 typedef int INT32; // 32 bit signed
658 typedef unsigned int UINT32; // 32 bit unsigned 690 typedef unsigned int UINT32; // 32 bit unsigned
659#endif 691#endif
660 692
661 typedef signed char Q_INT8; // 8 bit signed 693 typedef signed char Q_INT8; // 8 bit signed
662 typedef unsigned char Q_UINT8;// 8 bit unsigned 694 typedef unsigned char Q_UINT8;// 8 bit unsigned
663 typedef short Q_INT16;// 16 bit signed 695 typedef short Q_INT16;// 16 bit signed
664 typedef unsigned short Q_UINT16;// 16 bit unsigned 696 typedef unsigned short Q_UINT16;// 16 bit unsigned
665 typedef int Q_INT32;// 32 bit signed 697 typedef int Q_INT32;// 32 bit signed
666 typedef unsigned int Q_UINT32;// 32 bit unsigned 698 typedef unsigned int Q_UINT32;// 32 bit unsigned
667#if defined(Q_OS_WIN64) 699#if defined(Q_OS_WIN64)
668// LLP64 64-bit model on Windows
669 typedef __int64 Q_LONG; // word up to 64 bit signed 700 typedef __int64 Q_LONG; // word up to 64 bit signed
670 typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned 701 typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned
671#else 702#else
672// LP64 64-bit model on Linux 703 typedef long Q_LONG; // word up to 64 bit signed
673 typedef long Q_LONG; 704 typedef unsigned long Q_ULONG;// word up to 64 bit unsigned
674 typedef unsigned long Q_ULONG;
675#endif 705#endif
676 706#if defined(Q_OS_WIN) && !defined(Q_CC_GNU)
677#if !defined(QT_CLEAN_NAMESPACE) 707 # define Q_INT64_C(c) c ## i64// signed 64 bit constant
678// mininum size of 64 bits is not guaranteed 708 # define Q_UINT64_C(c) c ## ui64// unsigned 64 bit constant
679 #define Q_INT64 Q_LONG 709 typedef __int64 Q_INT64;// 64 bit signed
680 #define Q_UINT64 Q_ULONG 710 typedef unsigned __int64 Q_UINT64;// 64 bit unsigned
711#else
712 # define Q_INT64_C(c) c ## LL // signed 64 bit constant
713 # define Q_UINT64_C(c) c ## ULL// unsigned 64 bit constant
714 typedef long long Q_INT64;// 64 bit signed
715 typedef unsigned long long Q_UINT64;// 64 bit unsigned
681#endif 716#endif
717 typedef Q_INT64 Q_LLONG;// signed long long
718 typedef Q_UINT64 Q_ULLONG;// unsigned long long
682 719
683#if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT) 720#if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT)
684# define QT_LARGEFILE_SUPPORT 64 721# define QT_LARGEFILE_SUPPORT 64
685#endif 722#endif
686#if defined(QT_LARGEFILE_SUPPORT) 723#if defined(QT_LARGEFILE_SUPPORT)
687 typedef unsigned long long QtOffset; 724 typedef Q_ULLONG QtOffset;
688#else 725#else
689 typedef Q_ULONG QtOffset; 726 typedef Q_ULONG QtOffset;
690#endif 727#endif
691 728
692 729
693// 730//
694// Data stream functions is provided by many classes (defined in qdatastream.h) 731// Data stream functions is provided by many classes (defined in qdatastream.h)
695// 732//
696 733
697class QDataStream; 734class QDataStream;
698 735
699 736
700// 737//
701// Feature subsetting 738// Feature subsetting
702// 739//
703// Note that disabling some features will produce a libqt that is not 740// Note that disabling some features will produce a libqt that is not
704// compatible with other libqt builds. Such modifications are only 741// compatible with other libqt builds. Such modifications are only
705// supported on Qt/Embedded where reducing the library size is important 742// supported on Qt/Embedded where reducing the library size is important
706// and where the application-suite is often a fixed set. 743// and where the application-suite is often a fixed set.
707// 744//
708 745
709#if !defined(QT_MOC) 746#if !defined(QT_MOC)
710#if defined(QCONFIG_LOCAL) 747#if defined(QCONFIG_LOCAL)
711#include <qconfig-local.h> 748#include "qconfig-local.h"
712#elif defined(QCONFIG_MINIMAL) 749#elif defined(QCONFIG_MINIMAL)
713#include <qconfig-minimal.h> 750#include "qconfig-minimal.h"
714#elif defined(QCONFIG_SMALL) 751#elif defined(QCONFIG_SMALL)
715#include <qconfig-small.h> 752#include "qconfig-small.h"
716#elif defined(QCONFIG_MEDIUM) 753#elif defined(QCONFIG_MEDIUM)
717#include <qconfig-medium.h> 754#include "qconfig-medium.h"
718#elif defined(QCONFIG_LARGE) 755#elif defined(QCONFIG_LARGE)
719#include <qconfig-large.h> 756#include "qconfig-large.h"
720#else // everything... 757#else // everything...
721#include <qconfig.h> 758#include "qconfig.h"
722#endif 759#endif
723#endif 760#endif
724 761
725 762
726#ifndef QT_BUILD_KEY 763#ifndef QT_BUILD_KEY
727#define QT_BUILD_KEY "unspecified" 764#define QT_BUILD_KEY "unspecified"
728#endif 765#endif
729 766
730// prune to local config 767// prune to local config
731#include "qmodules.h" 768#include "qmodules.h"
769#ifndef QT_MODULE_DIALOGS
770# define QT_NO_DIALOG
771#endif
732#ifndef QT_MODULE_ICONVIEW 772#ifndef QT_MODULE_ICONVIEW
733# define QT_NO_ICONVIEW 773# define QT_NO_ICONVIEW
734#endif 774#endif
735#ifndef QT_MODULE_WORKSPACE 775#ifndef QT_MODULE_WORKSPACE
736# define QT_NO_WORKSPACE 776# define QT_NO_WORKSPACE
737#endif 777#endif
738#ifndef QT_MODULE_NETWORK 778#ifndef QT_MODULE_NETWORK
739#define QT_NO_NETWORK 779#define QT_NO_NETWORK
740#endif 780#endif
741#ifndef QT_MODULE_CANVAS 781#ifndef QT_MODULE_CANVAS
742# define QT_NO_CANVAS 782# define QT_NO_CANVAS
743#endif 783#endif
744#ifndef QT_MODULE_TABLE 784#ifndef QT_MODULE_TABLE
745#define QT_NO_TABLE 785#define QT_NO_TABLE
746#endif 786#endif
747#ifndef QT_MODULE_XML 787#ifndef QT_MODULE_XML
748# define QT_NO_XML 788# define QT_NO_XML
749#endif 789#endif
750#ifndef QT_MODULE_OPENGL 790#ifndef QT_MODULE_OPENGL
751# define QT_NO_OPENGL 791# define QT_NO_OPENGL
752#endif 792#endif
753#if !defined(QT_MODULE_SQL) 793#if !defined(QT_MODULE_SQL)
754# define QT_NO_SQL 794# define QT_NO_SQL
755#endif 795#endif
756 796
757#if defined(Q_WS_MAC9) 797#if defined(Q_WS_MAC9)
758//No need for menu merging 798//No need for menu merging
759# ifndef QMAC_QMENUBAR_NO_MERGE 799# ifndef QMAC_QMENUBAR_NO_MERGE
760# define QMAC_QMENUBAR_NO_MERGE 800# define QMAC_QMENUBAR_NO_MERGE
761# endif 801# endif
762//Mac9 does not use quartz 802//Mac9 does not use quartz
763# ifndef QMAC_NO_QUARTZ 803# ifndef QMAC_NO_QUARTZ
764# define QMAC_NO_QUARTZ 804# define QMAC_NO_QUARTZ
765# endif 805# endif
766# ifndef QMAC_QMENUBAR_NO_EVENT 806# ifndef QMAC_QMENUBAR_NO_EVENT
767# define QMAC_QMENUBAR_NO_EVENT 807# define QMAC_QMENUBAR_NO_EVENT
768# endif 808# endif
769#endif 809#endif
770#if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks 810#if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks
771# ifndef QMAC_NO_QUARTZ 811# ifndef QMAC_NO_QUARTZ
772# define QMAC_NO_QUARTZ 812# define QMAC_NO_QUARTZ
773# endif 813# endif
774# ifndef QMAC_QMENUBAR_NO_EVENT 814# ifndef QMAC_QMENUBAR_NO_EVENT
775# define QMAC_QMENUBAR_NO_EVENT 815# define QMAC_QMENUBAR_NO_EVENT
776# endif 816# endif
777#endif 817#endif
778 818
779#if !defined(Q_WS_QWS) && !defined(QT_NO_COP) 819#if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
780# define QT_NO_COP 820# define QT_NO_COP
781#endif 821#endif
782 822
783#ifndef QT_H 823#ifndef QT_H
784#include <qfeatures.h> 824#include "qfeatures.h"
785#endif // QT_H 825#endif /* QT_H */
786 826
787 827
788// 828//
789// Create Qt DLL if QT_DLL is defined (Windows only) 829// Create Qt DLL if QT_DLL is defined (Windows only)
790// or QT_SHARED is defined (Kylix only) 830// or QT_SHARED is defined (Kylix only)
791// 831//
792 832
793#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) 833#if defined(Q_OS_WIN)
794# if defined(QT_NODLL) 834# if defined(QT_NODLL)
795# undef QT_MAKEDLL 835# undef QT_MAKEDLL
796# undef QT_DLL 836# undef QT_DLL
797 # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ 837 # elif defined(QT_MAKEDLL)/* create a Qt DLL library */
798# if defined(QT_DLL) 838# if defined(QT_DLL)
799# undef QT_DLL 839# undef QT_DLL
800# endif 840# endif
801# define Q_EXPORT __declspec(dllexport) 841# define Q_EXPORT __declspec(dllexport)
802# define Q_TEMPLATEDLL 842# define Q_TEMPLATEDLL
803# define Q_TEMPLATE_EXTERN 843# define Q_TEMPLATE_EXTERN
804 # undef Q_DISABLE_COPY/* avoid unresolved externals */ 844 # undef Q_DISABLE_COPY/* avoid unresolved externals */
805 # elif defined(QT_DLL) /* use a Qt DLL library */ 845 # elif defined(QT_DLL) /* use a Qt DLL library */
806# define Q_EXPORT __declspec(dllimport) 846# define Q_EXPORT __declspec(dllimport)
807# define Q_TEMPLATEDLL 847# define Q_TEMPLATEDLL
808# ifndef Q_TEMPLATE_EXTERN 848# ifndef Q_TEMPLATE_EXTERN
809# if defined(Q_CC_MSVC_NET) 849# if defined(Q_CC_MSVC_NET)
810# define Q_TEMPLATE_EXTERN extern 850# define Q_TEMPLATE_EXTERN extern
811# else 851# else
812# define Q_TEMPLATE_EXTERN 852# define Q_TEMPLATE_EXTERN
813# endif 853# endif
814# endif 854# endif
815 # undef Q_DISABLE_COPY/* avoid unresolved externals */ 855 # undef Q_DISABLE_COPY/* avoid unresolved externals */
816# endif 856# endif
817#elif defined(Q_OS_LINUX) && defined(Q_CC_BOR) 857#elif defined(Q_OS_LINUX) && defined(Q_CC_BOR)
818 # if defined(QT_SHARED)/* create a Qt shared library */ 858 # if defined(QT_SHARED)/* create a Qt shared library */
819# define Q_EXPORT __declspec(dllexport) 859# define Q_EXPORT __declspec(dllexport)
820# define Q_TEMPLATEDLL 860# define Q_TEMPLATEDLL
821# define Q_TEMPLATE_EXTERN 861# define Q_TEMPLATE_EXTERN
822 # undef Q_DISABLE_COPY/* avoid unresolved externals */ 862 # undef Q_DISABLE_COPY/* avoid unresolved externals */
823# else 863# else
824# define Q_TEMPLATEDLL 864# define Q_TEMPLATEDLL
825# define Q_TEMPLATE_EXTERN 865# define Q_TEMPLATE_EXTERN
826 # undef Q_DISABLE_COPY /* avoid unresolved externals */ 866 # undef Q_DISABLE_COPY /* avoid unresolved externals */
827# endif 867# endif
828#else 868#else
829 # undef QT_MAKEDLL /* ignore these for other platforms */ 869 # undef QT_MAKEDLL /* ignore these for other platforms */
830# undef QT_DLL 870# undef QT_DLL
831#endif 871#endif
832 872
833#ifndef Q_EXPORT 873#ifndef Q_EXPORT
834# define Q_EXPORT 874# define Q_EXPORT
835#endif 875#endif
836 876
837 877
838// 878//
839// Some platform specific stuff 879// Some platform specific stuff
840// 880//
841 881
842#if defined(Q_WS_WIN) 882#if defined(Q_WS_WIN)
843extern Q_EXPORT bool qt_winunicode; 883extern Q_EXPORT bool qt_winunicode;
844#endif 884#endif
845 885
846 886
847// 887//
848// System information 888// System information
849// 889//
850 890
851Q_EXPORT const char *qVersion(); 891Q_EXPORT const char *qVersion();
852Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); 892Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
893Q_EXPORT bool qSharedBuild();
853#if defined(Q_OS_MAC) 894#if defined(Q_OS_MAC)
854int qMacVersion(); 895int qMacVersion();
855#elif defined(Q_WS_WIN) 896#elif defined(Q_WS_WIN)
856Q_EXPORT int qWinVersion(); 897Q_EXPORT int qWinVersion();
857#if defined(UNICODE) 898#if defined(UNICODE)
858#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } 899#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
859#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) 900#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
860#else 901#else
861#define QT_WA( uni, ansi ) ansi 902#define QT_WA( uni, ansi ) ansi
862#define QT_WA_INLINE( uni, ansi ) ansi 903#define QT_WA_INLINE( uni, ansi ) ansi
863#endif 904#endif
864#endif 905#endif
865 906
866#ifdef Q_OS_TEMP 907#ifdef Q_OS_TEMP
867#ifdef QT_WA 908#ifdef QT_WA
868#undef QT_WA 909#undef QT_WA
869#undef QT_WA_INLINE 910#undef QT_WA_INLINE
870#endif 911#endif
871#define QT_WA( uni, ansi ) uni 912#define QT_WA( uni, ansi ) uni
872#define QT_WA_INLINE( uni, ansi ) ( uni ) 913#define QT_WA_INLINE( uni, ansi ) ( uni )
873#endif 914#endif
874 915
875#ifndef Q_INLINE_TEMPLATES 916#ifndef Q_INLINE_TEMPLATES
876# define Q_INLINE_TEMPLATES 917# define Q_INLINE_TEMPLATES
877#endif 918#endif
878 919
879#ifndef Q_TYPENAME 920#ifndef Q_TYPENAME
880# define Q_TYPENAME typename 921# define Q_TYPENAME typename
881#endif 922#endif
882 923
883// 924//
884// Use to avoid "unused parameter" warnings 925// Use to avoid "unused parameter" warnings
885// 926//
886
887#define Q_UNUSED(x) (void)x; 927#define Q_UNUSED(x) (void)x;
888 928
889// 929//
890// Debugging and error handling 930// Debugging and error handling
891// 931//
892 932
893#if !defined(QT_NO_CHECK) 933#if !defined(QT_NO_CHECK)
894 # define QT_CHECK_STATE // check state of objects etc. 934 # define QT_CHECK_STATE // check state of objects etc.
895 # define QT_CHECK_RANGE // check range of indexes etc. 935 # define QT_CHECK_RANGE // check range of indexes etc.
896 # define QT_CHECK_NULL // check null pointers 936 # define QT_CHECK_NULL // check null pointers
897 # define QT_CHECK_MATH // check math functions 937 # define QT_CHECK_MATH // check math functions
898#endif 938#endif
899 939
900#if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG) 940#if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
901 # define QT_DEBUG // display debug messages 941 # define QT_DEBUG // display debug messages
902 # if !defined(QT_NO_COMPAT) // compatibility with Qt 2 942 # if !defined(QT_NO_COMPAT) // compatibility with Qt 2
903# if !defined(NO_DEBUG) && !defined(DEBUG) 943# if !defined(NO_DEBUG) && !defined(DEBUG)
904 # if !defined(Q_OS_MACX) // clash with MacOS X headers 944 # if !defined(Q_OS_MACX) // clash with MacOS X headers
905# define DEBUG 945# define DEBUG
906# endif 946# endif
907# endif 947# endif
908# endif 948# endif
909#endif 949#endif
910 950
911 951
912 Q_EXPORT void qDebug( const char *, ... )// print debug message 952 Q_EXPORT void qDebug( const char *, ... )// print debug message
913#if defined(Q_CC_GNU) && !defined(__INSURE__) 953#if defined(Q_CC_GNU) && !defined(__INSURE__)
914 __attribute__ ((format (printf, 1, 2))) 954 __attribute__ ((format (printf, 1, 2)))
915#endif 955#endif
916; 956;
917 957
918 Q_EXPORT void qWarning( const char *, ... )// print warning message 958 Q_EXPORT void qWarning( const char *, ... )// print warning message
@@ -986,87 +1026,90 @@ Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
986# define CHECK_PTR(x) Q_CHECK_PTR(x) 1026# define CHECK_PTR(x) Q_CHECK_PTR(x)
987# endif 1027# endif
988#endif // QT_NO_COMPAT 1028#endif // QT_NO_COMPAT
989 1029
990enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; 1030enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
991 1031
992typedef void (*QtMsgHandler)(QtMsgType, const char *); 1032typedef void (*QtMsgHandler)(QtMsgType, const char *);
993Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler ); 1033Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler );
994 1034
995 #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 1035 #if !defined(QT_NO_COMPAT) // compatibility with Qt 2
996typedef QtMsgHandler msg_handler; 1036typedef QtMsgHandler msg_handler;
997#endif // QT_NO_COMPAT 1037#endif // QT_NO_COMPAT
998 1038
999Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE ); 1039Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE );
1000 1040
1001Q_EXPORT void qObsolete( const char *obj, const char *oldfunc, 1041Q_EXPORT void qObsolete( const char *obj, const char *oldfunc,
1002 const char *newfunc ); 1042 const char *newfunc );
1003Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); 1043Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
1004Q_EXPORT void qObsolete( const char *message ); 1044Q_EXPORT void qObsolete( const char *message );
1005 1045
1006 1046
1007// 1047//
1008// Install paths from configure 1048// Install paths from configure
1009// 1049//
1010 1050
1011Q_EXPORT const char *qInstallPath(); 1051Q_EXPORT const char *qInstallPath();
1012Q_EXPORT const char *qInstallPathDocs(); 1052Q_EXPORT const char *qInstallPathDocs();
1013Q_EXPORT const char *qInstallPathHeaders(); 1053Q_EXPORT const char *qInstallPathHeaders();
1014Q_EXPORT const char *qInstallPathLibs(); 1054Q_EXPORT const char *qInstallPathLibs();
1015Q_EXPORT const char *qInstallPathBins(); 1055Q_EXPORT const char *qInstallPathBins();
1016Q_EXPORT const char *qInstallPathPlugins(); 1056Q_EXPORT const char *qInstallPathPlugins();
1017Q_EXPORT const char *qInstallPathData(); 1057Q_EXPORT const char *qInstallPathData();
1058Q_EXPORT const char *qInstallPathTranslations();
1059Q_EXPORT const char *qInstallPathSysconf();
1018 1060
1019#endif // __cplusplus 1061#endif /* __cplusplus */
1020 1062
1021// compilers which follow outdated template instantiation rules 1063/*
1022// require a class to have a comparison operator to exist when 1064 compilers which follow outdated template instantiation rules
1023// a QValueList of this type is instantiated. It's not actually 1065 require a class to have a comparison operator to exist when
1024// used in the list, though. Hence the dummy implementation. 1066 a QValueList of this type is instantiated. It's not actually
1025// Just in case other code relies on it we better trigger a warning 1067 used in the list, though. Hence the dummy implementation.
1026// mandating a real implementation. 1068 Just in case other code relies on it we better trigger a warning
1069 mandating a real implementation.
1070*/
1027#ifdef Q_FULL_TEMPLATE_INSTANTIATION 1071#ifdef Q_FULL_TEMPLATE_INSTANTIATION
1028# define Q_DUMMY_COMPARISON_OPERATOR(C) \ 1072# define Q_DUMMY_COMPARISON_OPERATOR(C) \
1029 bool operator==( const C& ) const { \ 1073 bool operator==( const C& ) const { \
1030 qWarning( #C"::operator==( const "#C"& ) got called." ); \ 1074 qWarning( #C"::operator==( const "#C"& ) got called." ); \
1031 return FALSE; \ 1075 return FALSE; \
1032 } 1076 }
1033#else 1077#else
1034# define Q_DUMMY_COMPARISON_OPERATOR(C) 1078# define Q_DUMMY_COMPARISON_OPERATOR(C)
1035#endif 1079#endif
1036 1080
1037#endif // QGLOBAL_H 1081#endif /* QGLOBAL_H */
1038 1082
1039// 1083/*
1040// Avoid some particularly useless warnings from some stupid compilers. 1084 Avoid some particularly useless warnings from some stupid compilers.
1041// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out 1085 To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
1042// the line "#define QT_NO_WARNINGS" 1086 the line "#define QT_NO_WARNINGS"
1043// 1087*/
1044 1088
1045#if !defined(QT_CC_WARNINGS) 1089#if !defined(QT_CC_WARNINGS)
1046# define QT_NO_WARNINGS 1090# define QT_NO_WARNINGS
1047#endif 1091#endif
1048#if defined(QT_NO_WARNINGS) 1092#if defined(QT_NO_WARNINGS)
1049# if defined(Q_CC_MSVC) 1093# if defined(Q_CC_MSVC)
1050# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data 1094# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
1051# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' 1095# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
1052# pragma warning(disable: 4514) // unreferenced inline/local function has been removed 1096# pragma warning(disable: 4514) // unreferenced inline/local function has been removed
1053# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning) 1097# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
1054# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' 1098# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
1055# pragma warning(disable: 4706) // assignment within conditional expression 1099# pragma warning(disable: 4706) // assignment within conditional expression
1056# pragma warning(disable: 4786) // truncating debug info after 255 characters 1100# pragma warning(disable: 4786) // truncating debug info after 255 characters
1057# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated 1101# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
1058# pragma warning(disable: 4355) // 'this' : used in base member initializer list 1102# pragma warning(disable: 4355) // 'this' : used in base member initializer list
1059# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation 1103# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
1060# pragma warning(disable: 4710) // function not inlined 1104# pragma warning(disable: 4710) // function not inlined
1061# elif defined(Q_CC_BOR) 1105# elif defined(Q_CC_BOR)
1062# pragma option -w-inl 1106# pragma option -w-inl
1063# pragma option -w-aus 1107# pragma option -w-aus
1064# pragma warn -inl 1108# pragma warn -inl
1065# pragma warn -pia 1109# pragma warn -pia
1066# pragma warn -ccc 1110# pragma warn -ccc
1067# pragma warn -rch 1111# pragma warn -rch
1068# pragma warn -sig 1112# pragma warn -sig
1069# elif defined(Q_CC_MWERKS)
1070# pragma warn_possunwant off
1071# endif 1113# endif
1072#endif 1114#endif
1115
diff --git a/qmake/include/qlocale.h b/qmake/include/qlocale.h
new file mode 100644
index 0000000..20ad03b
--- a/dev/null
+++ b/qmake/include/qlocale.h
@@ -0,0 +1,491 @@
1/****************************************************************************
2**
3**
4** Declaration of the QLocale class
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the tools module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef QLOCALE_H
37#define QLOCALE_H
38
39#include "qstring.h"
40
41struct QLocalePrivate;
42
43class Q_EXPORT QLocale
44{
45 friend class QString;
46
47public:
48 enum Language {
49 C = 1,
50 Abkhazian = 2,
51 Afan = 3,
52 Afar = 4,
53 Afrikaans = 5,
54 Albanian = 6,
55 Amharic = 7,
56 Arabic = 8,
57 Armenian = 9,
58 Assamese = 10,
59 Aymara = 11,
60 Azerbaijani = 12,
61 Bashkir = 13,
62 Basque = 14,
63 Bengali = 15,
64 Bhutani = 16,
65 Bihari = 17,
66 Bislama = 18,
67 Breton = 19,
68 Bulgarian = 20,
69 Burmese = 21,
70 Byelorussian = 22,
71 Cambodian = 23,
72 Catalan = 24,
73 Chinese = 25,
74 Corsican = 26,
75 Croatian = 27,
76 Czech = 28,
77 Danish = 29,
78 Dutch = 30,
79 English = 31,
80 Esperanto = 32,
81 Estonian = 33,
82 Faroese = 34,
83 FijiLanguage = 35,
84 Finnish = 36,
85 French = 37,
86 Frisian = 38,
87 Gaelic = 39,
88 Galician = 40,
89 Georgian = 41,
90 German = 42,
91 Greek = 43,
92 Greenlandic = 44,
93 Guarani = 45,
94 Gujarati = 46,
95 Hausa = 47,
96 Hebrew = 48,
97 Hindi = 49,
98 Hungarian = 50,
99 Icelandic = 51,
100 Indonesian = 52,
101 Interlingua = 53,
102 Interlingue = 54,
103 Inuktitut = 55,
104 Inupiak = 56,
105 Irish = 57,
106 Italian = 58,
107 Japanese = 59,
108 Javanese = 60,
109 Kannada = 61,
110 Kashmiri = 62,
111 Kazakh = 63,
112 Kinyarwanda = 64,
113 Kirghiz = 65,
114 Korean = 66,
115 Kurdish = 67,
116 Kurundi = 68,
117 Laothian = 69,
118 Latin = 70,
119 Latvian = 71,
120 Lingala = 72,
121 Lithuanian = 73,
122 Macedonian = 74,
123 Malagasy = 75,
124 Malay = 76,
125 Malayalam = 77,
126 Maltese = 78,
127 Maori = 79,
128 Marathi = 80,
129 Moldavian = 81,
130 Mongolian = 82,
131 NauruLanguage = 83,
132 Nepali = 84,
133 Norwegian = 85,
134 Occitan = 86,
135 Oriya = 87,
136 Pashto = 88,
137 Persian = 89,
138 Polish = 90,
139 Portuguese = 91,
140 Punjabi = 92,
141 Quechua = 93,
142 RhaetoRomance = 94,
143 Romanian = 95,
144 Russian = 96,
145 Samoan = 97,
146 Sangho = 98,
147 Sanskrit = 99,
148 Serbian = 100,
149 SerboCroatian = 101,
150 Sesotho = 102,
151 Setswana = 103,
152 Shona = 104,
153 Sindhi = 105,
154 Singhalese = 106,
155 Siswati = 107,
156 Slovak = 108,
157 Slovenian = 109,
158 Somali = 110,
159 Spanish = 111,
160 Sundanese = 112,
161 Swahili = 113,
162 Swedish = 114,
163 Tagalog = 115,
164 Tajik = 116,
165 Tamil = 117,
166 Tatar = 118,
167 Telugu = 119,
168 Thai = 120,
169 Tibetan = 121,
170 Tigrinya = 122,
171 TongaLanguage = 123,
172 Tsonga = 124,
173 Turkish = 125,
174 Turkmen = 126,
175 Twi = 127,
176 Uigur = 128,
177 Ukrainian = 129,
178 Urdu = 130,
179 Uzbek = 131,
180 Vietnamese = 132,
181 Volapuk = 133,
182 Welsh = 134,
183 Wolof = 135,
184 Xhosa = 136,
185 Yiddish = 137,
186 Yoruba = 138,
187 Zhuang = 139,
188 Zulu = 140,
189 LastLanguage = Zulu
190 };
191
192 enum Country {
193 AnyCountry = 0,
194 Afghanistan = 1,
195 Albania = 2,
196 Algeria = 3,
197 AmericanSamoa = 4,
198 Andorra = 5,
199 Angola = 6,
200 Anguilla = 7,
201 Antarctica = 8,
202 AntiguaAndBarbuda = 9,
203 Argentina = 10,
204 Armenia = 11,
205 Aruba = 12,
206 Australia = 13,
207 Austria = 14,
208 Azerbaijan = 15,
209 Bahamas = 16,
210 Bahrain = 17,
211 Bangladesh = 18,
212 Barbados = 19,
213 Belarus = 20,
214 Belgium = 21,
215 Belize = 22,
216 Benin = 23,
217 Bermuda = 24,
218 Bhutan = 25,
219 Bolivia = 26,
220 BosniaAndHerzegowina = 27,
221 Botswana = 28,
222 BouvetIsland = 29,
223 Brazil = 30,
224 BritishIndianOceanTerritory = 31,
225 BruneiDarussalam = 32,
226 Bulgaria = 33,
227 BurkinaFaso = 34,
228 Burundi = 35,
229 Cambodia = 36,
230 Cameroon = 37,
231 Canada = 38,
232 CapeVerde = 39,
233 CaymanIslands = 40,
234 CentralAfricanRepublic = 41,
235 Chad = 42,
236 Chile = 43,
237 China = 44,
238 ChristmasIsland = 45,
239 CocosIslands = 46,
240 Colombia = 47,
241 Comoros = 48,
242 DemocraticRepublicOfCongo = 49,
243 PeoplesRepublicOfCongo = 50,
244 CookIslands = 51,
245 CostaRica = 52,
246 IvoryCoast = 53,
247 Croatia = 54,
248 Cuba = 55,
249 Cyprus = 56,
250 CzechRepublic = 57,
251 Denmark = 58,
252 Djibouti = 59,
253 Dominica = 60,
254 DominicanRepublic = 61,
255 EastTimor = 62,
256 Ecuador = 63,
257 Egypt = 64,
258 ElSalvador = 65,
259 EquatorialGuinea = 66,
260 Eritrea = 67,
261 Estonia = 68,
262 Ethiopia = 69,
263 FalklandIslands = 70,
264 FaroeIslands = 71,
265 FijiCountry = 72,
266 Finland = 73,
267 France = 74,
268 MetropolitanFrance = 75,
269 FrenchGuiana = 76,
270 FrenchPolynesia = 77,
271 FrenchSouthernTerritories = 78,
272 Gabon = 79,
273 Gambia = 80,
274 Georgia = 81,
275 Germany = 82,
276 Ghana = 83,
277 Gibraltar = 84,
278 Greece = 85,
279 Greenland = 86,
280 Grenada = 87,
281 Guadeloupe = 88,
282 Guam = 89,
283 Guatemala = 90,
284 Guinea = 91,
285 GuineaBissau = 92,
286 Guyana = 93,
287 Haiti = 94,
288 HeardAndMcDonaldIslands = 95,
289 Honduras = 96,
290 HongKong = 97,
291 Hungary = 98,
292 Iceland = 99,
293 India = 100,
294 Indonesia = 101,
295 Iran = 102,
296 Iraq = 103,
297 Ireland = 104,
298 Israel = 105,
299 Italy = 106,
300 Jamaica = 107,
301 Japan = 108,
302 Jordan = 109,
303 Kazakhstan = 110,
304 Kenya = 111,
305 Kiribati = 112,
306 DemocraticRepublicOfKorea = 113,
307 RepublicOfKorea = 114,
308 Kuwait = 115,
309 Kyrgyzstan = 116,
310 Lao = 117,
311 Latvia = 118,
312 Lebanon = 119,
313 Lesotho = 120,
314 Liberia = 121,
315 LibyanArabJamahiriya = 122,
316 Liechtenstein = 123,
317 Lithuania = 124,
318 Luxembourg = 125,
319 Macau = 126,
320 Macedonia = 127,
321 Madagascar = 128,
322 Malawi = 129,
323 Malaysia = 130,
324 Maldives = 131,
325 Mali = 132,
326 Malta = 133,
327 MarshallIslands = 134,
328 Martinique = 135,
329 Mauritania = 136,
330 Mauritius = 137,
331 Mayotte = 138,
332 Mexico = 139,
333 Micronesia = 140,
334 Moldova = 141,
335 Monaco = 142,
336 Mongolia = 143,
337 Montserrat = 144,
338 Morocco = 145,
339 Mozambique = 146,
340 Myanmar = 147,
341 Namibia = 148,
342 NauruCountry = 149,
343 Nepal = 150,
344 Netherlands = 151,
345 NetherlandsAntilles = 152,
346 NewCaledonia = 153,
347 NewZealand = 154,
348 Nicaragua = 155,
349 Niger = 156,
350 Nigeria = 157,
351 Niue = 158,
352 NorfolkIsland = 159,
353 NorthernMarianaIslands = 160,
354 Norway = 161,
355 Oman = 162,
356 Pakistan = 163,
357 Palau = 164,
358 PalestinianTerritory = 165,
359 Panama = 166,
360 PapuaNewGuinea = 167,
361 Paraguay = 168,
362 Peru = 169,
363 Philippines = 170,
364 Pitcairn = 171,
365 Poland = 172,
366 Portugal = 173,
367 PuertoRico = 174,
368 Qatar = 175,
369 Reunion = 176,
370 Romania = 177,
371 RussianFederation = 178,
372 Rwanda = 179,
373 SaintKittsAndNevis = 180,
374 StLucia = 181,
375 StVincentAndTheGrenadines = 182,
376 Samoa = 183,
377 SanMarino = 184,
378 SaoTomeAndPrincipe = 185,
379 SaudiArabia = 186,
380 Senegal = 187,
381 Seychelles = 188,
382 SierraLeone = 189,
383 Singapore = 190,
384 Slovakia = 191,
385 Slovenia = 192,
386 SolomonIslands = 193,
387 Somalia = 194,
388 SouthAfrica = 195,
389 SouthGeorgiaAndTheSouthSandwichIslands = 196,
390 Spain = 197,
391 SriLanka = 198,
392 StHelena = 199,
393 StPierreAndMiquelon = 200,
394 Sudan = 201,
395 Suriname = 202,
396 SvalbardAndJanMayenIslands = 203,
397 Swaziland = 204,
398 Sweden = 205,
399 Switzerland = 206,
400 SyrianArabRepublic = 207,
401 Taiwan = 208,
402 Tajikistan = 209,
403 Tanzania = 210,
404 Thailand = 211,
405 Togo = 212,
406 Tokelau = 213,
407 TongaCountry = 214,
408 TrinidadAndTobago = 215,
409 Tunisia = 216,
410 Turkey = 217,
411 Turkmenistan = 218,
412 TurksAndCaicosIslands = 219,
413 Tuvalu = 220,
414 Uganda = 221,
415 Ukraine = 222,
416 UnitedArabEmirates = 223,
417 UnitedKingdom = 224,
418 UnitedStates = 225,
419 UnitedStatesMinorOutlyingIslands = 226,
420 Uruguay = 227,
421 Uzbekistan = 228,
422 Vanuatu = 229,
423 VaticanCityState = 230,
424 Venezuela = 231,
425 VietNam = 232,
426 BritishVirginIslands = 233,
427 USVirginIslands = 234,
428 WallisAndFutunaIslands = 235,
429 WesternSahara = 236,
430 Yemen = 237,
431 Yugoslavia = 238,
432 Zambia = 239,
433 Zimbabwe = 240,
434 LastCountry = Zimbabwe
435 };
436
437 QLocale();
438 QLocale(const QString &name);
439 QLocale(Language language, Country country = AnyCountry);
440 QLocale(const QLocale &other);
441
442 QLocale &operator=(const QLocale &other);
443
444 Language language() const;
445 Country country() const;
446 QString name() const;
447
448 short toShort(const QString &s, bool *ok = 0) const;
449 ushort toUShort(const QString &s, bool *ok = 0) const;
450 int toInt(const QString &s, bool *ok = 0) const;
451 uint toUInt(const QString &s, bool *ok = 0) const;
452 Q_LONG toLong(const QString &s, bool *ok = 0) const;
453 Q_ULONG toULong(const QString &s, bool *ok = 0) const;
454 Q_LLONG toLongLong(const QString &s, bool *ok = 0) const;
455 Q_ULLONG toULongLong(const QString &s, bool *ok = 0) const;
456 float toFloat(const QString &s, bool *ok = 0) const;
457 double toDouble(const QString &s, bool *ok = 0) const;
458
459 QString toString(short i) const
460 { return toString((Q_LLONG)i); }
461 QString toString(ushort i) const
462 { return toString((Q_ULLONG)i); }
463 QString toString(int i) const
464 { return toString((Q_LLONG)i); }
465 QString toString(uint i) const
466 { return toString((Q_ULLONG)i); }
467#if !defined(Q_OS_WIN64)
468 QString toString(Q_LONG i) const
469 { return toString((Q_LLONG)i); }
470 QString toString(Q_ULONG i) const
471 { return toString((Q_ULLONG)i); }
472#endif
473 QString toString(Q_LLONG i) const;
474 QString toString(Q_ULLONG i) const;
475 QString toString(float i, char f = 'g', int prec = 6) const
476 { return toString((double) i, f, prec); }
477 QString toString(double i, char f = 'g', int prec = 6) const;
478
479 static QString languageToString(Language language);
480 static QString countryToString(Country country);
481 static void setDefault(const QLocale &locale);
482
483 static QLocale c() { return QLocale(C); }
484 static QLocale system();
485
486private:
487 const QLocalePrivate *d;
488 static const QLocalePrivate *default_d;
489};
490
491#endif
diff --git a/qmake/include/qsettings.h b/qmake/include/qsettings.h
new file mode 100644
index 0000000..72f04eb
--- a/dev/null
+++ b/qmake/include/qsettings.h
@@ -0,0 +1,156 @@
1/****************************************************************************
2**
3**
4** Definition of QSettings class
5**
6** Created : 000626
7**
8** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
9**
10** This file is part of the tools module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
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.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#ifndef QSETTINGS_H
39#define QSETTINGS_H
40
41#ifndef QT_H
42#include "qdatetime.h"
43#include "qstringlist.h"
44#endif // QT_H
45
46#ifndef QT_NO_SETTINGS
47
48class QSettingsPrivate;
49
50
51class Q_EXPORT QSettings
52{
53public:
54 enum Format {
55 Native = 0,
56 Ini
57 };
58 enum System {
59 Unix = 0,
60 Windows,
61 Mac
62 };
63 enum Scope {
64 User,
65 Global
66 };
67
68 QSettings();
69 QSettings( Format format );
70
71 ~QSettings();
72
73#if !defined(Q_NO_BOOL_TYPE)
74 boolwriteEntry( const QString &, bool );
75#endif
76 boolwriteEntry( const QString &, double );
77 boolwriteEntry( const QString &, int );
78 boolwriteEntry( const QString &, const char * );
79 boolwriteEntry( const QString &, const QString & );
80 boolwriteEntry( const QString &, const QStringList & );
81 boolwriteEntry( const QString &, const QStringList &, const QChar& sep );
82
83 QStringList entryList(const QString &) const;
84 QStringList subkeyList(const QString &) const;
85
86 //### remove non const versions in 4.0
87 QStringList readListEntry( const QString &, bool * = 0 );
88 QStringList readListEntry( const QString &, const QChar& sep, bool * = 0 );
89 QStringreadEntry( const QString &, const QString &def = QString::null, bool * = 0 );
90 int readNumEntry( const QString &, int def = 0, bool * = 0 );
91 doublereadDoubleEntry( const QString &, double def = 0, bool * = 0 );
92 boolreadBoolEntry( const QString &, bool def = FALSE, bool * = 0 );
93
94 //### make those non-inlined in 4.0
95 QStringList readListEntry( const QString &key, bool *ok = 0 ) const
96 {
97 QSettings *that = (QSettings*)this;
98 return that->readListEntry( key, ok );
99 }
100 QStringList readListEntry( const QString &key, const QChar& sep, bool *ok = 0 ) const
101 {
102 QSettings *that = (QSettings*)this;
103 return that->readListEntry( key, sep, ok );
104 }
105 QStringreadEntry( const QString &key, const QString &def = QString::null,
106 bool *ok = 0 ) const
107 {
108 QSettings *that = (QSettings*)this;
109 return that->readEntry( key, def, ok );
110 }
111 int readNumEntry( const QString &key, int def = 0, bool *ok = 0 ) const
112 {
113 QSettings *that = (QSettings*)this;
114 return that->readNumEntry( key, def, ok );
115 }
116
117 doublereadDoubleEntry( const QString &key, double def = 0, bool *ok = 0 ) const
118 {
119 QSettings *that = (QSettings*)this;
120 return that->readDoubleEntry( key, def, ok );
121 }
122 boolreadBoolEntry( const QString &key, bool def = FALSE, bool *ok = 0 ) const
123 {
124 QSettings *that = (QSettings*)this;
125 return that->readBoolEntry( key, def, ok );
126 }
127
128 boolremoveEntry( const QString & );
129
130 void insertSearchPath( System, const QString & );
131 void removeSearchPath( System, const QString & );
132
133 void setPath( const QString &domain, const QString &product, Scope = Global );
134
135 void beginGroup( const QString &group );
136 void endGroup();
137 void resetGroup();
138 QString group() const;
139
140 bool sync();
141
142private:
143 QSettingsPrivate *d;
144
145#if defined(Q_DISABLE_COPY)
146 QSettings(const QSettings &);
147 QSettings &operator=(const QSettings &);
148#endif
149
150 QDateTime lastModificationTime( const QString & );
151
152 friend class QApplication;
153};
154
155#endif // QT_NO_SETTINGS
156#endif // QSETTINGS_H
diff --git a/qmake/include/qunicodetables_p.h b/qmake/include/qunicodetables_p.h
new file mode 100644
index 0000000..0e799e4
--- a/dev/null
+++ b/qmake/include/qunicodetables_p.h
@@ -0,0 +1,263 @@
1/****************************************************************************
2**
3**
4** ???
5**
6** Copyright (C) 2003 Trolltech AS. All rights reserved.
7**
8** This file is part of the widgets module of the Qt GUI Toolkit.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
20** licenses may use this file in accordance with the Qt Commercial License
21** Agreement provided with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef QUNICODETABLES_P_H
37#define QUNICODETABLES_P_H
38
39//
40// W A R N I N G
41// -------------
42//
43// This file is not part of the Qt API. It exists for the convenience
44// of internal files. This header file may change from version to version
45// without notice, or even be removed.
46//
47// We mean it.
48//
49//
50
51#ifndef QT_H
52#include "qstring.h"
53#endif // QT_H
54
55#ifdef QT_NO_UNICODETABLES
56# include <ctype.h>
57#endif
58
59class QUnicodeTables {
60public:
61 static const Q_UINT8 unicode_info[];
62#ifndef QT_NO_UNICODETABLES
63 static const Q_UINT16 decomposition_map[];
64 static const Q_UINT16 decomposition_info[];
65 static const Q_UINT16 ligature_map[];
66 static const Q_UINT16 ligature_info[];
67 static const Q_UINT8 direction_info[];
68 static const Q_UINT8 combining_info[];
69 static const Q_UINT16 case_info[];
70 static const Q_INT8 decimal_info[];
71 static const Q_UINT16 symmetricPairs[];
72 static const int symmetricPairsSize;
73 static const Q_UINT8 line_break_info[];
74#else
75 static const Q_UINT8 latin1_line_break_info[];
76#endif
77 static const unsigned char otherScripts[];
78 static const unsigned char indicScripts[];
79 static const unsigned char scriptTable[];
80 enum { SCRIPTS_INDIC = 0x7e };
81
82 // see http://www.unicode.org/reports/tr14/tr14-13.html
83 // we don't use the XX and AI properties and map them to AL instead.
84 enum LineBreakClass {
85 LineBreak_OP, LineBreak_CL, LineBreak_QU, LineBreak_GL, LineBreak_NS,
86 LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO,
87 LineBreak_NU, LineBreak_AL, LineBreak_ID, LineBreak_IN, LineBreak_HY,
88 LineBreak_BA, LineBreak_BB, LineBreak_B2, LineBreak_ZW, LineBreak_CM,
89 LineBreak_SA, LineBreak_BK, LineBreak_CR, LineBreak_LF, LineBreak_SG,
90 LineBreak_CB, LineBreak_SP
91 };
92};
93
94
95inline QChar::Category category( const QChar &c )
96{
97#ifdef QT_NO_UNICODETABLES
98 if ( c.unicode() > 0xff ) return QChar::Letter_Uppercase; //########
99 return (QChar::Category)QUnicodeTables::unicode_info[c.unicode()];
100#else
101 register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
102 uc += c.cell();
103 return (QChar::Category)QUnicodeTables::unicode_info[uc];
104#endif // QT_NO_UNICODETABLES
105}
106
107inline QChar lower( const QChar &c )
108{
109#ifndef QT_NO_UNICODETABLES
110 int row = c.row();
111 int cell = c.cell();
112 register int ci = QUnicodeTables::case_info[row];
113 register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
114 uc += c.cell();
115 if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Uppercase || !ci)
116 return c;
117 Q_UINT16 lower = QUnicodeTables::case_info[(ci<<8)+cell];
118 return lower ? QChar(lower) : c;
119#else
120 if ( c.row() )
121 return c;
122 return QChar( tolower((uchar) c.latin1()) );
123#endif
124}
125
126inline QChar upper( const QChar &c )
127{
128#ifndef QT_NO_UNICODETABLES
129 int row = c.row();
130 int cell = c.cell();
131 register int ci = QUnicodeTables::case_info[row];
132 register int uc = ((int)QUnicodeTables::unicode_info[c.row()]) << 8;
133 uc += c.cell();
134 if (QUnicodeTables::unicode_info[uc] != QChar::Letter_Lowercase || !ci)
135 return c;
136 Q_UINT16 upper = QUnicodeTables::case_info[(ci<<8)+cell];
137 return upper ? QChar(upper) : c;
138#else
139 if ( c.row() )
140 return c;
141 return QChar( toupper((uchar) c.latin1()) );
142#endif
143}
144
145inline QChar::Direction direction( const QChar &c )
146{
147#ifndef QT_NO_UNICODETABLES
148 register int pos = QUnicodeTables::direction_info[c.row()];
149 return (QChar::Direction) (QUnicodeTables::direction_info[(pos<<8)+c.cell()] & 0x1f);
150#else
151 Q_UNUSED(c);
152 return QChar::DirL;
153#endif
154}
155
156inline bool mirrored( const QChar &c )
157{
158#ifndef QT_NO_UNICODETABLES
159 register int pos = QUnicodeTables::direction_info[c.row()];
160 return QUnicodeTables::direction_info[(pos<<8)+c.cell()] > 128;
161#else
162 Q_UNUSED(c);
163 return FALSE;
164#endif
165}
166
167
168inline QChar mirroredChar( const QChar &ch )
169{
170#ifndef QT_NO_UNICODETABLES
171 if(!::mirrored( ch ))
172 return ch;
173
174 int i;
175 int c = ch.unicode();
176 for (i = 0; i < QUnicodeTables::symmetricPairsSize; i ++) {
177 if (QUnicodeTables::symmetricPairs[i] == c)
178 return QUnicodeTables::symmetricPairs[(i%2) ? (i-1) : (i+1)];
179 }
180#endif
181 return ch;
182}
183
184inline QChar::Joining joining( const QChar &ch )
185{
186#ifndef QT_NO_UNICODETABLES
187 register int pos = QUnicodeTables::direction_info[ch.row()];
188 return (QChar::Joining) ((QUnicodeTables::direction_info[(pos<<8)+ch.cell()] >> 5) &0x3);
189#else
190 Q_UNUSED(ch);
191 return QChar::OtherJoining;
192#endif
193}
194
195inline bool isMark( const QChar &ch )
196{
197 QChar::Category c = ::category( ch );
198 return c >= QChar::Mark_NonSpacing && c <= QChar::Mark_Enclosing;
199}
200
201inline unsigned char combiningClass( const QChar &ch )
202{
203#ifndef QT_NO_UNICODETABLES
204 const int pos = QUnicodeTables::combining_info[ch.row()];
205 return QUnicodeTables::combining_info[(pos<<8) + ch.cell()];
206#else
207 Q_UNUSED(ch);
208 return 0;
209#endif
210}
211
212inline bool isSpace( const QChar &ch )
213{
214 if( ch.unicode() >= 9 && ch.unicode() <=13 ) return TRUE;
215 QChar::Category c = ::category( ch );
216 return c >= QChar::Separator_Space && c <= QChar::Separator_Paragraph;
217}
218
219inline int lineBreakClass( const QChar &ch )
220{
221#ifdef QT_NO_UNICODETABLES
222 return ch.row() ? QUnicodeTables::LineBreak_AL
223 : QUnicodeTables::latin1_line_break_info[ch.cell()];
224#else
225 register int pos = ((int)QUnicodeTables::line_break_info[ch.row()] << 8) + ch.cell();
226 return QUnicodeTables::line_break_info[pos];
227#endif
228}
229
230inline int scriptForChar( ushort uc )
231{
232 unsigned char script = QUnicodeTables::scriptTable[(uc>>8)];
233 if ( script >= QUnicodeTables::SCRIPTS_INDIC ) {
234 if ( script == QUnicodeTables::SCRIPTS_INDIC ) {
235 script = QUnicodeTables::indicScripts[ (uc-0x0900)>>7 ];
236 } else {
237 // 0x80 + SCRIPTS_xx
238 unsigned char index = script-0x80;
239 unsigned char cell = uc &0xff;
240 while( QUnicodeTables::otherScripts[index++] < cell )
241 index++;
242 script = QUnicodeTables::otherScripts[index];
243 }
244 }
245 return script;
246}
247
248#ifdef Q_WS_X11
249 #define SCRIPT_FOR_CHAR( script, c ) \
250 do { \
251 unsigned short _uc = (c).unicode(); \
252 if ( _uc < 0x100 ) { \
253 script = QFont::Latin; \
254 } else { \
255 script = (QFont::Script)scriptForChar( _uc ); \
256 } \
257} while( FALSE )
258#else
259#define SCRIPT_FOR_CHAR( script, c ) \
260 script = (QFont::Script)scriptForChar( (c).unicode() )
261#endif
262
263#endif
diff --git a/qmake/include/quuid.h b/qmake/include/quuid.h
index 664c149..f5d8a86 100644
--- a/qmake/include/quuid.h
+++ b/qmake/include/quuid.h
@@ -1,168 +1,191 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
4** Definition of QUuid class 4** Definition of QUuid class
5** 5**
6** Created : 010523 6** Created : 010523
7** 7**
8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. 8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the tools module of the Qt GUI Toolkit. 10** This file is part of the tools module of the Qt GUI Toolkit.
11** 11**
12** This file may be distributed under the terms of the Q Public License 12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software. 23** Agreement provided with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37 37
38#ifndef QUUID_H 38#ifndef QUUID_H
39#define QUUID_H 39#define QUUID_H
40 40
41#ifndef QT_H 41#ifndef QT_H
42#include <qstring.h> 42#include "qstring.h"
43#endif // QT_H 43#endif // QT_H
44 44
45#include <string.h> 45#include <string.h>
46 46
47#if defined(Q_OS_WIN32) 47#if defined(Q_OS_WIN32)
48#ifndef GUID_DEFINED 48#ifndef GUID_DEFINED
49#define GUID_DEFINED 49#define GUID_DEFINED
50typedef struct _GUID 50typedef struct _GUID
51{ 51{
52 ulong Data1; 52 ulong Data1;
53 ushort Data2; 53 ushort Data2;
54 ushort Data3; 54 ushort Data3;
55 uchar Data4[ 8 ]; 55 uchar Data4[ 8 ];
56} GUID, *REFGUID, *LPGUID; 56} GUID, *REFGUID, *LPGUID;
57#endif 57#endif
58#endif 58#endif
59 59
60
60struct Q_EXPORT QUuid 61struct Q_EXPORT QUuid
61{ 62{
63 enum Variant {
64 VarUnknown=-1,
65 NCS = 0, // 0 - -
66 DCE = 2, // 1 0 -
67 Microsoft= 6, // 1 1 0
68 Reserved= 7 // 1 1 1
69 };
70
71 enum Version {
72 VerUnknown=-1,
73 Time = 1, // 0 0 0 1
74 EmbeddedPOSIX= 2, // 0 0 1 0
75 Name = 3, // 0 0 1 1
76 Random = 4 // 0 1 0 0
77 };
78
62 QUuid() 79 QUuid()
63 { 80 {
64 memset( this, 0, sizeof(QUuid) ); 81 memset( this, 0, sizeof(QUuid) );
65 } 82 }
66 QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) 83 QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
67 { 84 {
68 data1 = l; 85 data1 = l;
69 data2 = w1; 86 data2 = w1;
70 data3 = w2; 87 data3 = w2;
71 data4[0] = b1; 88 data4[0] = b1;
72 data4[1] = b2; 89 data4[1] = b2;
73 data4[2] = b3; 90 data4[2] = b3;
74 data4[3] = b4; 91 data4[3] = b4;
75 data4[4] = b5; 92 data4[4] = b5;
76 data4[5] = b6; 93 data4[5] = b6;
77 data4[6] = b7; 94 data4[6] = b7;
78 data4[7] = b8; 95 data4[7] = b8;
79 } 96 }
80 QUuid( const QUuid &uuid ) 97 QUuid( const QUuid &uuid )
81 { 98 {
82 memcpy( this, &uuid, sizeof(QUuid) ); 99 memcpy( this, &uuid, sizeof(QUuid) );
83 } 100 }
84#ifndef QT_NO_QUUID_STRING 101#ifndef QT_NO_QUUID_STRING
85 QUuid( const QString & ); 102 QUuid( const QString & );
86 QUuid( const char * ); 103 QUuid( const char * );
87 QString toString() const; 104 QString toString() const;
88 operator QString() const { return toString(); } 105 operator QString() const { return toString(); }
89#endif 106#endif
90 bool isNull() const; 107 bool isNull() const;
91 108
92 QUuid &operator=(const QUuid &orig ) 109 QUuid &operator=(const QUuid &orig )
93 { 110 {
94 memcpy( this, &orig, sizeof(QUuid) ); 111 memcpy( this, &orig, sizeof(QUuid) );
95 return *this; 112 return *this;
96 } 113 }
97 114
98 bool operator==(const QUuid &orig ) const 115 bool operator==(const QUuid &orig ) const
99 { 116 {
100 uint i; 117 uint i;
101 if ( data1 != orig.data1 || data2 != orig.data2 || 118 if ( data1 != orig.data1 || data2 != orig.data2 ||
102 data3 != orig.data3 ) 119 data3 != orig.data3 )
103 return FALSE; 120 return FALSE;
104 121
105 for( i = 0; i < 8; i++ ) 122 for( i = 0; i < 8; i++ )
106 if ( data4[i] != orig.data4[i] ) 123 if ( data4[i] != orig.data4[i] )
107 return FALSE; 124 return FALSE;
108 125
109 return TRUE; 126 return TRUE;
110 } 127 }
111 128
112 bool operator!=(const QUuid &orig ) const 129 bool operator!=(const QUuid &orig ) const
113 { 130 {
114 return !( *this == orig ); 131 return !( *this == orig );
115 } 132 }
116 133
134 bool operator<(const QUuid &other ) const;
135 bool operator>(const QUuid &other ) const;
136
117#if defined(Q_OS_WIN32) 137#if defined(Q_OS_WIN32)
118 // On Windows we have a type GUID that is used by the platform API, so we 138 // On Windows we have a type GUID that is used by the platform API, so we
119 // provide convenience operators to cast from and to this type. 139 // provide convenience operators to cast from and to this type.
120 QUuid( const GUID &guid ) 140 QUuid( const GUID &guid )
121 { 141 {
122 memcpy( this, &guid, sizeof(GUID) ); 142 memcpy( this, &guid, sizeof(GUID) );
123 } 143 }
124 144
125 QUuid &operator=(const GUID &orig ) 145 QUuid &operator=(const GUID &orig )
126 { 146 {
127 memcpy( this, &orig, sizeof(QUuid) ); 147 memcpy( this, &orig, sizeof(QUuid) );
128 return *this; 148 return *this;
129 } 149 }
130 150
131 operator GUID() const 151 operator GUID() const
132 { 152 {
133 GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } }; 153 GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } };
134 return guid; 154 return guid;
135 } 155 }
136 156
137 bool operator==( const GUID &guid ) const 157 bool operator==( const GUID &guid ) const
138 { 158 {
139 uint i; 159 uint i;
140 if ( data1 != guid.Data1 || data2 != guid.Data2 || 160 if ( data1 != guid.Data1 || data2 != guid.Data2 ||
141 data3 != guid.Data3 ) 161 data3 != guid.Data3 )
142 return FALSE; 162 return FALSE;
143 163
144 for( i = 0; i < 8; i++ ) 164 for( i = 0; i < 8; i++ )
145 if ( data4[i] != guid.Data4[i] ) 165 if ( data4[i] != guid.Data4[i] )
146 return FALSE; 166 return FALSE;
147 167
148 return TRUE; 168 return TRUE;
149 } 169 }
150 170
151 bool operator!=( const GUID &guid ) const 171 bool operator!=( const GUID &guid ) const
152 { 172 {
153 return !( *this == guid ); 173 return !( *this == guid );
154 } 174 }
155#endif 175#endif
176 static QUuid createUuid();
177 QUuid::Variant variant() const;
178 QUuid::Version version() const;
156 179
157 uint data1; 180 uint data1;
158 ushort data2; 181 ushort data2;
159 ushort data3; 182 ushort data3;
160 uchar data4[ 8 ]; 183 uchar data4[ 8 ];
161}; 184};
162 185
163#ifndef QT_NO_DATASTREAM 186#ifndef QT_NO_DATASTREAM
164Q_EXPORT QDataStream &operator<<( QDataStream &, const QUuid & ); 187Q_EXPORT QDataStream &operator<<( QDataStream &, const QUuid & );
165Q_EXPORT QDataStream &operator>>( QDataStream &, QUuid & ); 188Q_EXPORT QDataStream &operator>>( QDataStream &, QUuid & );
166#endif 189#endif
167 190
168#endif //QUUID_H 191#endif //QUUID_H