summaryrefslogtreecommitdiff
path: root/qmake/include
authorkergoth <kergoth>2002-11-01 00:10:42 (UTC)
committer kergoth <kergoth>2002-11-01 00:10:42 (UTC)
commit5042e3cf0d3514552769e441f5aad590c8eaf967 (patch) (side-by-side diff)
tree4a5ea45f3519d981a172ab5275bf38c6fa778dec /qmake/include
parent108c1c753e74e989cc13923086996791428c9af4 (diff)
downloadopie-5042e3cf0d3514552769e441f5aad590c8eaf967.zip
opie-5042e3cf0d3514552769e441f5aad590c8eaf967.tar.gz
opie-5042e3cf0d3514552769e441f5aad590c8eaf967.tar.bz2
Adding qmake in preperation for new build system
Diffstat (limited to 'qmake/include') (more/less context) (show whitespace changes)
-rw-r--r--qmake/include/private/qapplication_p.h87
-rw-r--r--qmake/include/private/qcolor_p.h63
-rw-r--r--qmake/include/private/qcom_p.h337
-rw-r--r--qmake/include/private/qcomlibrary_p.h79
-rw-r--r--qmake/include/private/qcomplextext_p.h123
-rw-r--r--qmake/include/private/qcomponentfactory_p.h73
-rw-r--r--qmake/include/private/qcriticalsection_p.h80
-rw-r--r--qmake/include/private/qdir_p.h78
-rw-r--r--qmake/include/private/qeffects_p.h78
-rw-r--r--qmake/include/private/qeventloop_p.h74
-rw-r--r--qmake/include/private/qfiledefs_p.h64
-rw-r--r--qmake/include/private/qfontcodecs_p.h368
-rw-r--r--qmake/include/private/qfontdata_p.h479
-rw-r--r--qmake/include/private/qgfxdriverinterface_p.h56
-rw-r--r--qmake/include/private/qgpluginmanager_p.h107
-rw-r--r--qmake/include/private/qimageformatinterface_p.h75
-rw-r--r--qmake/include/private/qinputcontext_p.h121
-rw-r--r--qmake/include/private/qinternal_p.h157
-rw-r--r--qmake/include/private/qkbddriverinterface_p.h56
-rw-r--r--qmake/include/private/qlayoutengine_p.h128
-rw-r--r--qmake/include/private/qlibrary_p.h84
-rw-r--r--qmake/include/private/qmousedriverinterface_p.h56
-rw-r--r--qmake/include/private/qmutex_p.h70
-rw-r--r--qmake/include/private/qmutexpool_p.h39
-rw-r--r--qmake/include/private/qpainter_p.h63
-rw-r--r--qmake/include/private/qpluginmanager_p.h73
-rw-r--r--qmake/include/private/qpsprinter_p.h89
-rw-r--r--qmake/include/private/qrichtext_p.h2133
-rw-r--r--qmake/include/private/qsettings_p.h133
-rw-r--r--qmake/include/private/qsharedmemory_p.h84
-rw-r--r--qmake/include/private/qsqldriverinterface_p.h69
-rw-r--r--qmake/include/private/qsqlextension_p.h101
-rw-r--r--qmake/include/private/qsqlmanager_p.h159
-rw-r--r--qmake/include/private/qstyleinterface_p.h61
-rw-r--r--qmake/include/private/qsvgdevice_p.h134
-rw-r--r--qmake/include/private/qtextcodecinterface_p.h79
-rw-r--r--qmake/include/private/qtitlebar_p.h136
-rw-r--r--qmake/include/private/qucom_p.h499
-rw-r--r--qmake/include/private/qucomextra_p.h93
-rw-r--r--qmake/include/private/qwidget_p.h61
-rw-r--r--qmake/include/private/qwidgetinterface_p.h111
-rw-r--r--qmake/include/private/qwidgetresizehandler_p.h113
-rw-r--r--qmake/include/qasciidict.h118
-rw-r--r--qmake/include/qbitarray.h166
-rw-r--r--qmake/include/qbuffer.h100
-rw-r--r--qmake/include/qcache.h118
-rw-r--r--qmake/include/qcleanuphandler.h127
-rw-r--r--qmake/include/qcstring.h391
-rw-r--r--qmake/include/qdatastream.h173
-rw-r--r--qmake/include/qdatetime.h250
-rw-r--r--qmake/include/qdict.h118
-rw-r--r--qmake/include/qdir.h241
-rw-r--r--qmake/include/qfeatures.h959
-rw-r--r--qmake/include/qfile.h124
-rw-r--r--qmake/include/qfileinfo.h150
-rw-r--r--qmake/include/qgarray.h121
-rw-r--r--qmake/include/qgcache.h128
-rw-r--r--qmake/include/qgdict.h222
-rw-r--r--qmake/include/qglist.h252
-rw-r--r--qmake/include/qglobal.h1006
-rw-r--r--qmake/include/qgvector.h121
-rw-r--r--qmake/include/qintdict.h114
-rw-r--r--qmake/include/qiodevice.h161
-rw-r--r--qmake/include/qmap.h883
-rw-r--r--qmake/include/qmemarray.h122
-rw-r--r--qmake/include/qnamespace.h843
-rw-r--r--qmake/include/qpair.h96
-rw-r--r--qmake/include/qptrcollection.h76
-rw-r--r--qmake/include/qptrlist.h160
-rw-r--r--qmake/include/qptrvector.h113
-rw-r--r--qmake/include/qregexp.h115
-rw-r--r--qmake/include/qshared.h55
-rw-r--r--qmake/include/qstring.h950
-rw-r--r--qmake/include/qstringlist.h86
-rw-r--r--qmake/include/qstrlist.h112
-rw-r--r--qmake/include/qtextcodec.h114
-rw-r--r--qmake/include/qtextstream.h335
-rw-r--r--qmake/include/qtl.h321
-rw-r--r--qmake/include/quuid.h168
-rw-r--r--qmake/include/qvaluelist.h665
-rw-r--r--qmake/include/qvaluestack.h64
81 files changed, 17561 insertions, 0 deletions
diff --git a/qmake/include/private/qapplication_p.h b/qmake/include/private/qapplication_p.h
new file mode 100644
index 0000000..6fab6b3
--- a/dev/null
+++ b/qmake/include/private/qapplication_p.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of some Qt private functions.
+**
+** Created : 000228
+**
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QAPPLICATION_P_H
+#define QAPPLICATION_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qapplication_*.cpp, qwidget*.cpp, qcolor_x11.cpp, qfiledialog.cpp
+// and many other. This header file may change from version to version
+// without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#endif // QT_H
+
+class QWidget;
+class QObject;
+class QClipboard;
+class QKeyEvent;
+class QMouseEvent;
+class QWheelEvent;
+
+extern Q_EXPORT bool qt_modal_state();
+extern Q_EXPORT void qt_enter_modal( QWidget* );
+extern Q_EXPORT void qt_leave_modal( QWidget* );
+
+extern bool qt_is_gui_used;
+#ifndef QT_NO_CLIPBOARD
+extern QClipboard *qt_clipboard;
+#endif
+
+#if defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN)
+extern Qt::WindowsVersion qt_winver;
+#endif
+
+#if defined (Q_WS_X11)
+extern int qt_ncols_option;
+#endif
+
+
+extern void qt_dispatchEnterLeave( QWidget*, QWidget* );
+
+
+
+#endif
diff --git a/qmake/include/private/qcolor_p.h b/qmake/include/private/qcolor_p.h
new file mode 100644
index 0000000..942a803
--- a/dev/null
+++ b/qmake/include/private/qcolor_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+** $Id$
+**
+** Named color support for non-X platforms.
+** The color names have been borrowed from X.
+**
+** Created : 000228
+**
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCOLOR_P_H
+#define QCOLOR_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qmenudata.cpp, qmenubar.cpp, qmenubar.cpp, qpopupmenu.cpp,
+// qmotifstyle.cpp and qwindowssstyle.cpp. This header file may change
+// from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#endif // QT_H
+
+extern uint qt_get_rgb_val( const char *name );
+extern bool qt_get_named_rgb( const char *, QRgb* );
+extern void qt_reset_color_avail();
+
+#endif
diff --git a/qmake/include/private/qcom_p.h b/qmake/include/private/qcom_p.h
new file mode 100644
index 0000000..6e7e1c8
--- a/dev/null
+++ b/qmake/include/private/qcom_p.h
@@ -0,0 +1,337 @@
+/****************************************************************************
+** $Id$
+**
+** ...
+**
+** Copyright (C) 2001-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCOM_H
+#define QCOM_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qstringlist.h"
+#include "quuid.h"
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+class QObject;
+struct QUInterfaceDescription;
+struct QUObject;
+
+#define QRESULT unsigned long
+#define QS_OK (QRESULT)0x00000000
+#define QS_FALSE (QRESULT)0x00000001
+
+#define QE_NOTIMPL (QRESULT)0x80000001
+#define QE_OUTOFMEMORY (QRESULT)0x80000002
+#define QE_INVALIDARG (QRESULT)0x80000003
+#define QE_NOINTERFACE (QRESULT)0x80000004
+#define QE_NOCOMPONENT (QRESULT)0x80000005
+
+
+// {1D8518CD-E8F5-4366-99E8-879FD7E482DE}
+#ifndef IID_QUnknown
+#define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde)
+#endif
+
+struct Q_EXPORT QUnknownInterface
+{
+ virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0;
+ virtual ulong addRef() = 0;
+ virtual ulong release() = 0;
+};
+
+// {FBAC965E-A441-413F-935E-CDF582573FAB}
+#ifndef IID_QDispatch
+#define IID_QDispatch QUuid( 0xfbac965e, 0xa441, 0x413f, 0x93, 0x5e, 0xcd, 0xf5, 0x82, 0x57, 0x3f, 0xab)
+#endif
+
+// the dispatch interface that inherits the unknown interface.. It is
+// used to explore interfaces during runtime and to do dynamic calls.
+struct Q_EXPORT QDispatchInterface : public QUnknownInterface
+{
+ // returns the interface description of this dispatch interface.
+ virtual const QUInterfaceDescription* interfaceDescription() const = 0;
+
+ // returns the event description of this dispatch interface.
+ virtual const QUInterfaceDescription* eventsDescription() const = 0;
+
+ // invokes method id with parameters V*. Returns some sort of
+ // exception code.
+ virtual QRESULT invoke( int id, QUObject* o ) = 0;
+
+ // installs listener as event listener
+ virtual void installListener( QDispatchInterface* listener ) = 0;
+
+ // remove listener as event listener
+ virtual void removeListener( QDispatchInterface* listener ) = 0;
+};
+
+template <class T>
+class QInterfacePtr
+{
+public:
+ QInterfacePtr():iface(0){}
+
+ QInterfacePtr( T* i) {
+ if ( (iface = i) )
+ iface->addRef();
+ }
+
+ QInterfacePtr(const QInterfacePtr<T> &p) {
+ if ( (iface = p.iface) )
+ iface->addRef();
+ }
+
+ ~QInterfacePtr() {
+ if ( iface )
+ iface->release();
+ }
+
+ QInterfacePtr<T> &operator=(const QInterfacePtr<T> &p) {
+ if ( iface != p.iface ) {
+ if ( iface )
+ iface->release();
+ if ( (iface = p.iface) )
+ iface->addRef();
+ }
+ return *this;
+ }
+
+ QInterfacePtr<T> &operator=(T* i) {
+ if (iface != i ) {
+ if ( iface )
+ iface->release();
+ if ( (iface = i) )
+ iface->addRef();
+ }
+ return *this;
+ }
+
+ bool operator==( const QInterfacePtr<T> &p ) const { return iface == p.iface; }
+
+ bool operator!= ( const QInterfacePtr<T>& p ) const { return !( *this == p ); }
+
+ bool isNull() const { return !iface; }
+
+ T* operator->() const { return iface; }
+
+ T& operator*() const { return *iface; }
+
+ operator T*() const { return iface; }
+
+ QUnknownInterface** operator &() const {
+ if( iface )
+ iface->release();
+ return (QUnknownInterface**)&iface;
+ }
+
+ T** operator &() {
+ if ( iface )
+ iface->release();
+ return &iface;
+ }
+
+private:
+ T* iface;
+};
+
+// {10A1501B-4C5F-4914-95DD-C400486CF900}
+#ifndef IID_QObject
+#define IID_QObject QUuid( 0x10a1501b, 0x4c5f, 0x4914, 0x95, 0xdd, 0xc4, 0x00, 0x48, 0x6c, 0xf9, 0x00)
+#endif
+
+struct Q_EXPORT QObjectInterface
+{
+ virtual QObject* qObject() = 0;
+};
+
+// {5F3968A5-F451-45b1-96FB-061AD98F926E}
+#ifndef IID_QComponentInformation
+#define IID_QComponentInformation QUuid(0x5f3968a5, 0xf451, 0x45b1, 0x96, 0xfb, 0x6, 0x1a, 0xd9, 0x8f, 0x92, 0x6e)
+#endif
+
+struct Q_EXPORT QComponentInformationInterface : public QUnknownInterface
+{
+ virtual QString name() const = 0;
+ virtual QString description() const = 0;
+ virtual QString author() const = 0;
+ virtual QString version() const = 0;
+};
+
+// {6CAA771B-17BB-4988-9E78-BA5CDDAAC31E}
+#ifndef IID_QComponentFactory
+#define IID_QComponentFactory QUuid( 0x6caa771b, 0x17bb, 0x4988, 0x9e, 0x78, 0xba, 0x5c, 0xdd, 0xaa, 0xc3, 0x1e)
+#endif
+
+struct Q_EXPORT QComponentFactoryInterface : public QUnknownInterface
+{
+ virtual QRESULT createInstance( const QUuid &cid, const QUuid &iid, QUnknownInterface** instance, QUnknownInterface *outer ) = 0;
+};
+
+// {D16111D4-E1E7-4C47-8599-24483DAE2E07}
+#ifndef IID_QLibrary
+#define IID_QLibrary QUuid( 0xd16111d4, 0xe1e7, 0x4c47, 0x85, 0x99, 0x24, 0x48, 0x3d, 0xae, 0x2e, 0x07)
+#endif
+
+struct Q_EXPORT QLibraryInterface : public QUnknownInterface
+{
+ virtual bool init() = 0;
+ virtual void cleanup() = 0;
+ virtual bool canUnload() const = 0;
+};
+
+// {3F8FDC44-3015-4f3e-B6D6-E4AAAABDEAAD}
+#ifndef IID_QFeatureList
+#define IID_QFeatureList QUuid(0x3f8fdc44, 0x3015, 0x4f3e, 0xb6, 0xd6, 0xe4, 0xaa, 0xaa, 0xbd, 0xea, 0xad)
+#endif
+
+struct Q_EXPORT QFeatureListInterface : public QUnknownInterface
+{
+ virtual QStringList featureList() const = 0;
+};
+
+// {B5FEB5DE-E0CD-4E37-B0EB-8A812499A0C1}
+#ifndef IID_QComponentRegistration
+#define IID_QComponentRegistration QUuid( 0xb5feb5de, 0xe0cd, 0x4e37, 0xb0, 0xeb, 0x8a, 0x81, 0x24, 0x99, 0xa0, 0xc1)
+#endif
+
+struct Q_EXPORT QComponentRegistrationInterface : public QUnknownInterface
+{
+ virtual bool registerComponents( const QString &filepath ) const = 0;
+ virtual bool unregisterComponents() const = 0;
+};
+
+// internal class that wraps an initialized ulong
+struct Q_EXPORT QtULong
+{
+ QtULong() : ref( 0 ) { }
+ operator unsigned long () const { return ref; }
+ unsigned long& operator++() { return ++ref; }
+ unsigned long operator++( int ) { return ref++; }
+ unsigned long& operator--() { return --ref; }
+ unsigned long operator--( int ) { return ref--; }
+
+ unsigned long ref;
+};
+// default implementation of ref counting. A variable "ulong ref" has to be a member
+
+
+#define Q_REFCOUNT \
+private: \
+ QtULong qtrefcount; \
+public: \
+ ulong addRef() {return qtrefcount++;} \
+ ulong release() {if(!--qtrefcount){delete this;return 0;}return qtrefcount;}
+
+#ifndef Q_EXPORT_COMPONENT
+#if defined(QT_THREAD_SUPPORT)
+#define QT_THREADED_BUILD 1
+#define Q_UCM_FLAGS_STRING "11"
+#else
+#define QT_THREADED_BUILD 0
+#define Q_UCM_FLAGS_STRING "01"
+#endif
+
+#ifndef Q_EXTERN_C
+#ifdef __cplusplus
+#define Q_EXTERN_C extern "C"
+#else
+#define Q_EXTERN_C extern
+#endif
+#endif
+
+// this is duplicated at Q_PLUGIN_VERIFICATION_DATA in qgplugin.h
+// NOTE: if you change pattern, you MUST change the pattern in
+// qcomlibrary.cpp as well. changing the pattern will break all
+// backwards compatibility as well (no old plugins will be loaded).
+#ifndef Q_UCM_VERIFICATION_DATA
+# define Q_UCM_VERIFICATION_DATA \
+ static const char *qt_ucm_verification_data = \
+ "pattern=""QT_UCM_VERIFICATION_DATA""\n" \
+ "version="QT_VERSION_STR"\n" \
+ "flags="Q_UCM_FLAGS_STRING"\n" \
+ "buildkey="QT_BUILD_KEY"\0";
+#endif // Q_UCM_VERIFICATION_DATA
+
+// This macro expands to the default implementation of ucm_instantiate.
+#ifndef Q_CREATE_INSTANCE
+# define Q_CREATE_INSTANCE( IMPLEMENTATION ) \
+ IMPLEMENTATION *i = new IMPLEMENTATION; \
+ QUnknownInterface* iface = 0; \
+ i->queryInterface( IID_QUnknown, &iface ); \
+ return iface;
+#endif // Q_CREATE_INSTANCE
+
+# ifdef Q_WS_WIN
+# ifdef Q_CC_BOR
+# define Q_EXPORT_COMPONENT() \
+ Q_UCM_VERIFICATION_DATA \
+ Q_EXTERN_C __declspec(dllexport) \
+ const char * __stdcall qt_ucm_query_verification_data() \
+ { return qt_ucm_verification_data; } \
+ Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \
+ __stdcall ucm_instantiate()
+# else
+# define Q_EXPORT_COMPONENT() \
+ Q_UCM_VERIFICATION_DATA \
+ Q_EXTERN_C __declspec(dllexport) \
+ const char *qt_ucm_query_verification_data() \
+ { return qt_ucm_verification_data; } \
+ Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate()
+# endif
+# else
+# define Q_EXPORT_COMPONENT() \
+ Q_UCM_VERIFICATION_DATA \
+ Q_EXTERN_C \
+ const char *qt_ucm_query_verification_data() \
+ { return qt_ucm_verification_data; } \
+ Q_EXTERN_C QUnknownInterface* ucm_instantiate()
+# endif
+# define Q_EXPORT_INTERFACE() Q_EXPORT_COMPONENT()
+#endif
+
+#endif //QT_NO_COMPONENT
+
+#endif //QCOM_H
diff --git a/qmake/include/private/qcomlibrary_p.h b/qmake/include/private/qcomlibrary_p.h
new file mode 100644
index 0000000..f52f679
--- a/dev/null
+++ b/qmake/include/private/qcomlibrary_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QComLibrary class
+**
+** Copyright (C) 2001-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QUCOMLIBRARY_H
+#define QUCOMLIBRARY_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qcom_p.h"
+#include "qlibrary.h"
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+class Q_EXPORT QComLibrary : public QLibrary
+{
+public:
+ QComLibrary( const QString &filename );
+ ~QComLibrary();
+
+ bool unload();
+ QRESULT queryInterface( const QUuid &iid, QUnknownInterface **iface );
+ uint qtVersion();
+
+private:
+ void createInstanceInternal();
+
+ QUnknownInterface *entry;
+ QLibraryInterface *libiface;
+ uint qt_version;
+
+};
+
+#endif //QT_NO_COMPONENT
+
+#endif // QUCOMLIBRARY_H
diff --git a/qmake/include/private/qcomplextext_p.h b/qmake/include/private/qcomplextext_p.h
new file mode 100644
index 0000000..2132522
--- a/dev/null
+++ b/qmake/include/private/qcomplextext_p.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+** $Id$
+**
+** Internal header file.
+**
+** Created :
+**
+** Copyright (C) 2001 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCOMPLEXTEXT_H
+#define QCOMPLEXTEXT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of Qt Remote Control. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include <qstring.h>
+#include <qpointarray.h>
+#include <qfont.h>
+#include <qpainter.h>
+#include <qptrlist.h>
+#include <qshared.h>
+#endif // QT_H
+
+#ifndef QT_NO_COMPLEXTEXT
+
+// bidi helper classes. Internal to Qt
+struct Q_EXPORT QBidiStatus {
+ QBidiStatus() {
+ eor = QChar::DirON;
+ lastStrong = QChar::DirON;
+ last = QChar:: DirON;
+ }
+ QChar::Direction eor;
+ QChar::Direction lastStrong;
+ QChar::Direction last;
+};
+
+struct Q_EXPORT QBidiContext : public QShared {
+ // ### ref and deref parent?
+ QBidiContext( uchar level, QChar::Direction embedding, QBidiContext *parent = 0, bool override = FALSE );
+ ~QBidiContext();
+
+ unsigned char level;
+ bool override : 1;
+ QChar::Direction dir : 5;
+
+ QBidiContext *parent;
+};
+
+struct Q_EXPORT QBidiControl {
+ QBidiControl() { context = 0; }
+ QBidiControl( QBidiContext *c, QBidiStatus s)
+ { context = c; if( context ) context->ref(); status = s; }
+ ~QBidiControl() { if ( context && context->deref() ) delete context; }
+ void setContext( QBidiContext *c ) { if ( context == c ) return; if ( context && context->deref() ) delete context; context = c; context->ref(); }
+ QBidiContext *context;
+ QBidiStatus status;
+};
+
+struct Q_EXPORT QTextRun {
+ QTextRun(int _start, int _stop, QBidiContext *context, QChar::Direction dir);
+
+ int start;
+ int stop;
+ // explicit + implicit levels here
+ uchar level;
+};
+
+class Q_EXPORT QComplexText {
+public:
+ static QString shapedString( const QString &str, int from = 0, int len = -1, QPainter::TextDirection dir = QPainter::Auto, const QFontMetrics *fm = 0);
+ static QChar shapedCharacter(const QString &str, int pos, const QFontMetrics *fm = 0);
+
+ // positions non spacing marks relative to the base character at position pos.
+ static QPointArray positionMarks( QFontPrivate *f, const QString &str, int pos, QRect *boundingRect = 0 );
+
+ static QPtrList<QTextRun> *bidiReorderLine( QBidiControl *control, const QString &str, int start, int len,
+ QChar::Direction basicDir = QChar::DirON );
+ static QString bidiReorderString( const QString &str, QChar::Direction basicDir = QChar::DirON );
+};
+
+
+#endif //QT_NO_COMPLEXTEXT
+
+#endif
diff --git a/qmake/include/private/qcomponentfactory_p.h b/qmake/include/private/qcomponentfactory_p.h
new file mode 100644
index 0000000..1ac973f
--- a/dev/null
+++ b/qmake/include/private/qcomponentfactory_p.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of the QComponentFactory class
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCOMPONENTFACTORY_H
+#define QCOMPONENTFACTORY_H
+
+#ifndef QT_H
+#include "qcom_p.h"
+#endif // QT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_NO_COMPONENT
+
+class Q_EXPORT QComponentFactory
+{
+public:
+ static QRESULT createInstance( const QString &cid, const QUuid &iid, QUnknownInterface** instance, QUnknownInterface *outer = 0 );
+ static QRESULT registerServer( const QString &filename );
+ static QRESULT unregisterServer( const QString &filename );
+
+ static bool registerComponent( const QUuid &cid, const QString &filename, const QString &name = QString::null,
+ int version = 0, const QString &description = QString::null );
+ static bool unregisterComponent( const QUuid &cid );
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // QCOMPONENTFACTORY_H
diff --git a/qmake/include/private/qcriticalsection_p.h b/qmake/include/private/qcriticalsection_p.h
new file mode 100644
index 0000000..7d9feca
--- a/dev/null
+++ b/qmake/include/private/qcriticalsection_p.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QCriticalSection class
+**
+** Copyright (C) 2001-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCRITICALSECTION_H
+#define QCRITICALSECTION_H
+
+#ifndef QT_H
+#endif // QT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of Qt Remote Control. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#if defined(QT_THREAD_SUPPORT)
+
+#if defined(Q_WS_WIN)
+
+/*
+ QCriticalSection
+*/
+
+class QCriticalSectionPrivate;
+
+class QCriticalSection
+{
+public:
+ QCriticalSection();
+ ~QCriticalSection();
+ void enter();
+ void leave();
+
+private:
+ QCriticalSectionPrivate *d;
+};
+
+#endif
+
+#endif
+
+#endif
diff --git a/qmake/include/private/qdir_p.h b/qmake/include/private/qdir_p.h
new file mode 100644
index 0000000..35dba28
--- a/dev/null
+++ b/qmake/include/private/qdir_p.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of some private QDir functions.
+**
+** Created : 2000.11.06
+**
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDIR_P_H
+#define QDIR_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qdir.cpp and qdir_*.cpp.
+// This header file may change from version to version without notice,
+// or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#endif // QT_H
+
+extern QStringList qt_makeFilterList( const QString & );
+
+
+extern int qt_cmp_si_sortSpec;
+
+#if defined(Q_C_CALLBACKS)
+extern "C" {
+#endif
+
+#ifdef Q_OS_TEMP
+extern int __cdecl qt_cmp_si( const void *, const void * );
+#else
+extern int qt_cmp_si( const void *, const void * );
+#endif
+
+#if defined(Q_C_CALLBACKS)
+}
+#endif
+
+
+#endif // QDIR_P_H
diff --git a/qmake/include/private/qeffects_p.h b/qmake/include/private/qeffects_p.h
new file mode 100644
index 0000000..4178b6f
--- a/dev/null
+++ b/qmake/include/private/qeffects_p.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QEffects functions
+**
+** Created : 2000.06.21
+**
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the widgets module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QEFFECTS_P_H
+#define QEFFECTS_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qeffects.cpp, qcombobox.cpp, qpopupmenu.cpp and qtooltip.cpp.
+// This header file may change from version to version without notice,
+// or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qnamespace.h"
+#endif // QT_H
+
+#ifndef QT_NO_EFFECTS
+class QWidget;
+
+struct QEffects
+{
+ enum Direction {
+ LeftScroll = 0x0001,
+ RightScroll = 0x0002,
+ UpScroll = 0x0004,
+ DownScroll = 0x0008
+ };
+
+ typedef uint DirFlags;
+};
+
+extern void Q_EXPORT qScrollEffect( QWidget*, QEffects::DirFlags dir = QEffects::DownScroll, int time = -1 );
+extern void Q_EXPORT qFadeEffect( QWidget*, int time = -1 );
+#endif // QT_NO_EFFECTS
+
+#endif // QEFFECTS_P_H
diff --git a/qmake/include/private/qeventloop_p.h b/qmake/include/private/qeventloop_p.h
new file mode 100644
index 0000000..b64d0df
--- a/dev/null
+++ b/qmake/include/private/qeventloop_p.h
@@ -0,0 +1,74 @@
+#ifndef QEVENTLOOP_P_H
+#define QEVENTLOOP_P_H
+
+#include "qplatformdefs.h"
+#include "qwindowdefs.h"
+
+class QSocketNotifier;
+
+#if defined(Q_OS_UNIX)
+#include <qptrlist.h>
+
+struct QSockNot
+{
+ QSocketNotifier *obj;
+ int fd;
+ fd_set *queue;
+};
+
+class QSockNotType
+{
+public:
+ QSockNotType();
+ ~QSockNotType();
+
+ QPtrList<QSockNot> *list;
+ fd_set select_fds;
+ fd_set enabled_fds;
+ fd_set pending_fds;
+
+};
+#endif // Q_OS_UNIX
+
+
+class QEventLoopPrivate
+{
+public:
+ QEventLoopPrivate()
+ {
+ reset();
+ }
+
+ void reset() {
+ looplevel = 0;
+ quitcode = 0;
+ quitnow = FALSE;
+ exitloop = FALSE;
+ }
+
+ int looplevel;
+ int quitcode;
+ bool quitnow;
+ bool exitloop;
+
+#if defined(Q_WS_MAC)
+ EventLoopTimerRef select_timer;
+#endif
+
+#if defined(Q_WS_X11)
+ int xfd;
+#endif // Q_WS_X11
+
+#if defined(Q_OS_UNIX)
+ int thread_pipe[2];
+
+ // pending socket notifiers list
+ QPtrList<QSockNot> sn_pending_list;
+ // highest fd for all socket notifiers
+ int sn_highest;
+ // 3 socket notifier types - read, write and exception
+ QSockNotType sn_vec[3];
+#endif
+};
+
+#endif // QEVENTLOOP_P_H
diff --git a/qmake/include/private/qfiledefs_p.h b/qmake/include/private/qfiledefs_p.h
new file mode 100644
index 0000000..627717f
--- a/dev/null
+++ b/qmake/include/private/qfiledefs_p.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+** $Id$
+**
+** Common macros and system include files for QFile, QFileInfo and QDir.
+**
+** Created : 930812
+**
+** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QFILEDEFS_P_H
+#define QFILEDEFS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qfileinfo*.cpp. This header file may change from version to version
+// without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+// Be sure to include qplatformdefs.h first!
+struct QFileInfoCache
+{
+#if defined(Q_WS_WIN)
+ QT_STATBUF st;
+#else
+ struct stat st;
+#endif
+};
+
+
+#endif
diff --git a/qmake/include/private/qfontcodecs_p.h b/qmake/include/private/qfontcodecs_p.h
new file mode 100644
index 0000000..8222f98
--- a/dev/null
+++ b/qmake/include/private/qfontcodecs_p.h
@@ -0,0 +1,368 @@
+/****************************************************************************
+** $Id$
+**
+** Font utilities for X11
+**
+** Created : 20001101
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QFONTCODECS_P_H
+#define QFONTCODECS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qfontencodings_x11.cpp and qfont_x11.cpp. This header file may
+// change from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include <qglobal.h>
+#include <qtextcodec.h>
+#endif // QT_H
+
+
+#ifndef QT_NO_CODECS
+#ifndef QT_NO_BIG_CODECS
+
+
+class QJpUnicodeConv;
+
+
+class QFontJis0201Codec : public QTextCodec
+{
+public:
+ QFontJis0201Codec();
+
+ const char *name() const;
+
+ int mibEnum() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::fromUnicode;
+#endif
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+ int heuristicNameMatch(const char* hint) const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::canEncode;
+#endif
+ bool canEncode( QChar ) const;
+};
+
+
+class QFontJis0208Codec : public QTextCodec
+{
+public:
+ QFontJis0208Codec();
+ ~QFontJis0208Codec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::fromUnicode;
+#endif
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+ int heuristicNameMatch(const char* hint) const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::canEncode;
+#endif
+ bool canEncode( QChar ) const;
+
+private:
+ QJpUnicodeConv *convJP;
+};
+
+
+
+
+class QFontKsc5601Codec : public QTextCodec
+{
+public:
+ QFontKsc5601Codec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::fromUnicode;
+#endif
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::canEncode;
+#endif
+ bool canEncode( QChar ) const;
+};
+
+
+
+
+class QFontGb2312Codec : public QTextCodec
+{
+public:
+ QFontGb2312Codec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+ bool canEncode( QChar ) const;
+};
+
+
+
+
+class QFontGbkCodec : public QTextCodec
+{
+public:
+ QFontGbkCodec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+ int heuristicNameMatch(const char* hint) const;
+ bool canEncode( QChar ) const;
+};
+
+
+
+
+class QFontGb18030_0Codec : public QTextCodec
+{
+public:
+ QFontGb18030_0Codec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::fromUnicode;
+#endif
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::canEncode;
+#endif
+ bool canEncode( QChar ) const;
+};
+
+
+
+
+class QFontBig5Codec : public QTextCodec
+{
+public:
+ QFontBig5Codec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::fromUnicode;
+#endif
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::canEncode;
+#endif
+ int heuristicNameMatch(const char* hint) const;
+ bool canEncode( QChar ) const;
+};
+
+
+
+class QFontBig5hkscsCodec : public QTextCodec
+{
+public:
+ QFontBig5hkscsCodec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+ int heuristicNameMatch(const char* hint) const;
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::canEncode;
+#endif
+ bool canEncode( QChar ) const;
+};
+
+
+
+
+// ------------------------------------------------------------------
+// the shaping codec for iso8859-6.8x fonts (see www.langbox.com)
+
+class QFontArabic68Codec : public QTextCodec
+{
+public:
+ QFontArabic68Codec();
+
+ // Return the official name for the encoding.
+ const char* name() const ;
+
+ // Return the MIB enum for the encoding if it is listed in the
+ // IANA character-sets encoding file.
+ int mibEnum() const ;
+
+ // Converts len characters from chars to Unicode.
+ QString toUnicode(const char* chars, int len) const ;
+
+ // Converts lenInOut characters (of type QChar) from the start of
+ // the string uc, returning a QCString result, and also returning
+ // the length of the result in lenInOut.
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+ QByteArray fromUnicode( const QString &str, int from, int len ) const;
+ unsigned short characterFromUnicode(const QString &str, int pos) const;
+};
+
+
+class QFontLaoCodec : public QTextCodec
+{
+public:
+ QFontLaoCodec();
+
+ const char *name() const;
+
+ int mibEnum() const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::fromUnicode;
+#endif
+ QCString fromUnicode(const QString& uc, int& lenInOut ) const;
+
+ int heuristicContentMatch(const char *, int) const;
+
+#if !defined(Q_NO_USING_KEYWORD)
+ using QTextCodec::canEncode;
+#endif
+ bool canEncode( QChar ) const;
+};
+
+#endif // QT_NO_BIG_CODECS
+#endif // QT_NO_CODECS
+
+#endif // QFONTCODECS_P_H
diff --git a/qmake/include/private/qfontdata_p.h b/qmake/include/private/qfontdata_p.h
new file mode 100644
index 0000000..917d14f
--- a/dev/null
+++ b/qmake/include/private/qfontdata_p.h
@@ -0,0 +1,479 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of internal QFontData struct
+**
+** Created : 941229
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QFONTDATA_P_H
+#define QFONTDATA_P_H
+
+#ifndef QT_H
+#include <qcache.h>
+#include <qobject.h>
+#include <qpaintdevice.h>
+#endif // QT_H
+#include <limits.h>
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of internal files. This header file may change from version to version
+// without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+class QPaintDevice;
+
+#ifdef Q_WS_WIN
+#include <qt_windows.h>
+#endif
+
+#ifdef Q_WS_X11
+#include <qt_x11.h>
+
+class QCharStruct;
+#endif
+
+// font description
+struct QFontDef {
+ QFontDef()
+ : pixelSize(0), pointSize(0), lbearing(SHRT_MIN), rbearing(SHRT_MIN),
+ styleStrategy(QFont::PreferDefault), styleHint(QFont::AnyStyle),
+ weight(0), italic(FALSE), underline(FALSE), strikeOut(FALSE),
+ fixedPitch(FALSE), hintSetByUser(FALSE), rawMode(FALSE), dirty(TRUE)
+ { ; }
+
+ QString family;
+ QString addStyle;
+
+ int pixelSize;
+ int pointSize;
+ short lbearing;
+ short rbearing;
+
+ ushort styleStrategy;
+ uchar styleHint;
+ uchar weight;
+
+ bool italic;
+ bool underline;
+ bool strikeOut;
+ bool fixedPitch;
+ bool hintSetByUser;
+ bool rawMode;
+
+ bool dirty;
+};
+
+
+class QTextCodec;
+
+#ifdef Q_WS_X11
+
+// this is a shared wrapper for XFontStruct (to prevent a font being freed by
+// the cache while it's being used)
+class QFontStruct : public QShared
+{
+public:
+ QFontStruct(Qt::HANDLE h, Qt::HANDLE xfth, Qt::HANDLE xftp,
+ QCString n, QTextCodec *c, int a) :
+ QShared(), handle(h), xfthandle(xfth), xftpattern(xftp),
+ name(n), codec(c), cache_cost(a), scale( 1. )
+ { ; }
+
+ ~QFontStruct();
+
+ Qt::HANDLE handle, xfthandle, xftpattern;
+ QCString name;
+ QTextCodec *codec;
+ int cache_cost;
+ float scale; // needed for printing, to correctly scale font metrics for bitmap fonts
+};
+
+enum { widthCacheSize = 0x500 };
+
+class QFontX11Data // used as a QFontPrivate member
+{
+public:
+ // X fontstruct handles for each character set
+ QFontStruct *fontstruct[QFont::LastPrivateScript];
+
+ uchar widthCache[widthCacheSize];
+
+ QFontX11Data();
+ ~QFontX11Data();
+};
+
+#endif // Q_WS_X11
+
+
+#ifdef Q_WS_WIN
+
+class QFontStruct : public QShared
+{
+public:
+ QFontStruct( const QString &key );
+ ~QFontStruct() { reset(); }
+ bool dirty() const { return hfont == 0; }
+ HDC dc() const;
+ HFONT font() const { return hfont; }
+ const TEXTMETRICA *textMetricA() const { return &tm.a; }
+ const TEXTMETRICW *textMetricW() const { return &tm.w; }
+ QString key() const { return k; }
+ void reset();
+
+ QString k;
+ HDC hdc;
+ HFONT hfont;
+ uint stockFont:1;
+ uint paintDevice:1;
+ union {
+ TEXTMETRICW w;
+ TEXTMETRICA a;
+ } tm;
+ int lw;
+ int cache_cost;
+// friend void QFont::initFontInfo() const;
+};
+
+#endif // Q_WS_WIN
+
+#if defined( Q_WS_MAC )
+
+#if defined( Q_WS_MACX )
+# define QMAC_FONT_ATSUI
+#endif
+#include "qt_mac.h"
+class QMacFontInfo;
+
+class QFontStruct : public QShared
+{
+public:
+ inline QFontStruct() : QShared(), info(NULL), fnum(-1), cache_cost(0), internal_fi(NULL) { }
+#if defined( QMAC_FONT_ATSUI ) && 0
+ ATSFontMetrics *info;
+ int maxWidth() const { return (int)info->maxAdvanceWidth; }
+#else
+ FontInfo *info;
+ int maxWidth() const { return info->widMax; }
+#endif
+ int ascent() const { return (int)info->ascent; }
+ int descent() const { return (int)info->descent; }
+ int leading() const { return (int)info->leading; }
+ int minLeftBearing() const { return 0; }
+ int minRightBearing() const { return 0; }
+
+ short fnum;
+ int psize, cache_cost;
+ QMacFontInfo *internal_fi;
+};
+
+#endif
+
+#ifdef Q_WS_QWS
+class QFontStruct;
+class QGfx;
+#endif
+
+typedef QCacheIterator<QFontStruct> QFontCacheIterator;
+class QFontCache : public QObject, public QCache<QFontStruct>
+{
+public:
+ QFontCache();
+ ~QFontCache();
+
+ bool insert(const QString &, const QFontStruct *, int c);
+#ifndef Q_WS_MAC
+ void deleteItem(Item d);
+#endif
+ void timerEvent(QTimerEvent *);
+
+
+protected:
+
+
+private:
+ int timer_id;
+ bool fast;
+};
+
+
+// QFontPrivate - holds all data on which a font operates
+class QFontPrivate : public QShared
+{
+public:
+ static QFontCache *fontCache;
+
+
+public:
+
+ QFontPrivate();
+ QFontPrivate(const QFontPrivate &fp);
+ QFontPrivate( const QFontPrivate &fp, QPaintDevice *pd );
+ ~QFontPrivate();
+
+ // requested font
+ QFontDef request;
+ // actual font
+ QFontDef actual;
+
+ bool exactMatch;
+ int lineWidth;
+
+ // common functions
+ QString defaultFamily() const;
+ QString lastResortFamily() const;
+ QString lastResortFont() const;
+ QString key() const;
+
+ static int getFontWeight(const QCString &, bool = FALSE);
+ QRect boundingRect( const QChar &ch );
+
+ struct TextRun {
+ TextRun()
+ {
+ xoff = 0;
+ yoff = 0;
+ x2off = 0;
+ script = QFont::NoScript;
+ string = 0;
+ length = 0;
+ next = 0;
+ }
+
+ ~TextRun()
+ {
+ if ( next )
+ delete next;
+ }
+
+ void setParams( int x, int y, int x2, const QChar *s, int len,
+ QFont::Script sc = QFont::NoScript ) {
+ xoff = x;
+ yoff = y;
+ x2off = x2;
+ string = s;
+ length = len;
+ script = sc;
+ }
+ int xoff;
+ int yoff;
+ int x2off;
+ QFont::Script script;
+ const QChar *string;
+ int length;
+ TextRun *next;
+#ifdef Q_WS_X11
+ QByteArray mapped;
+#endif
+ };
+
+ // some replacement functions for native calls. This is needed, because shaping and
+ // non spacing marks can change the extents of a string to draw. At the same time
+ // drawing needs to take care to correctly position non spacing marks.
+ int textWidth( const QString &str, int pos, int len );
+
+ // returns the script a certain character is in. Needed to separate the string
+ // into runs of different scripts as required for X11 and opentype.
+ QFont::Script scriptForChar(const QChar &c);
+
+#ifdef Q_WS_X11
+ QFont::Script hanHack( const QChar & c );
+ static char **getXFontNames(const char *, int *);
+ static bool fontExists(const QString &);
+ static bool parseXFontName(char *, char **);
+ static QCString fixXLFD( const QCString & );
+ static bool fillFontDef(XFontStruct *, QFontDef *, int);
+ static bool fillFontDef(const QCString &, QFontDef *, int);
+
+ static inline bool isZero(char *x)
+ {
+ return (x[0] == '0' && x[1] == 0);
+ }
+
+ static inline bool isScalable( char **tokens )
+ {
+ return (isZero(tokens[PixelSize]) &&
+ isZero(tokens[PointSize]) &&
+ isZero(tokens[AverageWidth]));
+ }
+
+ static inline bool isSmoothlyScalable( char **tokens )
+ {
+ return (isZero(tokens[ResolutionX]) && isZero(tokens[ResolutionY]));
+ }
+
+ static inline bool isFixedPitch( char **tokens )
+ {
+ return (tokens[Spacing][0] == 'm' ||
+ tokens[Spacing][0] == 'c' ||
+ tokens[Spacing][0] == 'M' ||
+ tokens[Spacing][0] == 'C');
+ }
+
+ // XLFD fields
+ enum FontFieldNames {
+ Foundry,
+ Family,
+ Weight,
+ Slant,
+ Width,
+ AddStyle,
+ PixelSize,
+ PointSize,
+ ResolutionX,
+ ResolutionY,
+ Spacing,
+ AverageWidth,
+ CharsetRegistry,
+ CharsetEncoding,
+ NFontFields
+ };
+
+#ifndef QT_NO_XFTFREETYPE
+ XftPattern *findXftFont(const QChar &, bool *, double *scale) const;
+ XftPattern *bestXftPattern(const QString &, const QString &, const QChar &, double *scale) const;
+#endif // QT_NO_XFTFREETYPE
+ QCString findFont(QFont::Script, bool *, double *) const;
+ QCString bestFamilyMember(QFont::Script, const QString &, const QString &,
+ const QString &, int *, double *) const;
+ QCString bestMatch(const char *, int *, QFont::Script, double *) const;
+ int fontMatchScore(const char *, QCString &, float *, int *, bool *,
+ bool *, QFont::Script, double *) const;
+ void initFontInfo(QFont::Script, double scale);
+ void load(QFont::Script = QFont::NoScript, bool = TRUE);
+ bool loadUnicode(QFont::Script, const QChar &);
+ void computeLineWidth();
+
+ int textWidth( const QString &str, int pos, int len, TextRun *cache );
+ void textExtents( const QString &str, int pos, int len, QCharStruct *overall );
+ void drawText( Display *dpy, int screen, Qt::HANDLE hd, Qt::HANDLE rendhd,
+ GC gc, const QColor &pen, Qt::BGMode, const QColor &bgcolor,
+ int x, int y, const TextRun *cache, int pdWidth );
+ bool inFont( const QChar &ch );
+
+ QFontX11Data x11data;
+ static QFont::Script defaultScript;
+ int x11Screen;
+#endif // Q_WS_X11
+
+ QPaintDevice *paintdevice;
+
+#ifdef Q_WS_WIN
+ void load();
+ void initFontInfo();
+ HFONT create( bool *stockFont, HDC hdc = 0, bool compatMode = FALSE );
+ QFontStruct *fin;
+
+ void buildCache( HDC hdc, const QString &str, int pos, int len, TextRun *cache );
+ void drawText( HDC hdc, int x, int y, TextRun *cache );
+#endif // Q_WS_WIN
+
+#ifdef Q_WS_QWS
+ void load();
+ QFontStruct *fin;
+ int textWidth( const QString &str, int pos, int len, TextRun *cache );
+ void drawText( QGfx *gfx, int x, int y, const TextRun *cache );
+#endif
+
+#if defined( Q_WS_MAC )
+ void macSetFont(QPaintDevice *);
+ void drawText(int x, int y, QString s, int len, QPaintDevice *dev, const QRegion *rgn);
+ void computeLineWidth();
+ void load();
+ QFontStruct *fin;
+#endif
+
+};
+
+inline QFontPrivate::QFontPrivate()
+ : QShared(), exactMatch(FALSE), lineWidth(1)
+{
+
+#if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC)
+ fin = 0;
+#endif // Q_WS_WIN || Q_WS_QWS
+#if defined(Q_WS_X11)
+ x11Screen = QPaintDevice::x11AppScreen();
+#endif // Q_WS_X11
+ paintdevice = 0;
+}
+
+inline QFontPrivate::QFontPrivate(const QFontPrivate &fp)
+ : QShared(), request(fp.request), actual(fp.actual),
+exactMatch(fp.exactMatch), lineWidth(1)
+{
+ Q_ASSERT(!fp.paintdevice);
+#if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC)
+ fin = 0;
+#endif // Q_WS_WIN || Q_WS_QWS
+#if defined(Q_WS_X11)
+ x11Screen = fp.x11Screen;
+#endif // Q_WS_X11
+ paintdevice = 0;
+}
+
+inline QFontPrivate::QFontPrivate( const QFontPrivate &fp, QPaintDevice *pd )
+ : QShared(), request(fp.request), actual(fp.actual),
+exactMatch(fp.exactMatch), lineWidth(1)
+{
+
+#if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC)
+ fin = 0;
+#endif // Q_WS_WIN || Q_WS_QWS
+#if defined(Q_WS_X11)
+ x11Screen = pd->x11Screen();
+#endif // Q_WS_X11
+ paintdevice = pd;
+}
+
+#ifndef Q_WS_QWS
+inline QFontPrivate::~QFontPrivate()
+{
+#if defined(Q_WS_WIN)
+ if( fin )
+ fin->deref();
+#endif
+#if defined(Q_WS_MAC)
+ if( fin && fin->deref() )
+ delete fin;
+#endif
+}
+#endif
+
+#endif // QFONTDATA_P_H
diff --git a/qmake/include/private/qgfxdriverinterface_p.h b/qmake/include/private/qgfxdriverinterface_p.h
new file mode 100644
index 0000000..1782ed4
--- a/dev/null
+++ b/qmake/include/private/qgfxdriverinterface_p.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of Qt/Embedded Graphics Driver Interface
+**
+** Created : 20020211
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses for Qt/Embedded may use this file in accordance with the
+** Qt Embedded Commercial License Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGFXDRIVERINTERFACE_H
+#define QGFXDRIVERINTERFACE_H
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+// {449EC6C6-DF3E-43E3-9E57-354A3D05AB34}
+#ifndef IID_QGfxDriver
+#define IID_QGfxDriver QUuid( 0x449ec6c6, 0xdf3e, 0x43e3, 0x9e, 0x57, 0x35, 0x4a, 0x3d, 0x05, 0xab, 0x34)
+#endif
+
+class QScreen;
+
+struct Q_EXPORT QGfxDriverInterface : public QFeatureListInterface
+{
+ virtual QScreen* create( const QString& driver, int displayId ) = 0;
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // QGFXDRIVERINTERFACE_H
diff --git a/qmake/include/private/qgpluginmanager_p.h b/qmake/include/private/qgpluginmanager_p.h
new file mode 100644
index 0000000..e0c0e78
--- a/dev/null
+++ b/qmake/include/private/qgpluginmanager_p.h
@@ -0,0 +1,107 @@
+/**********************************************************************
+** $Id$
+**
+** Definition of QGPluginManager class
+**
+** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGPLUGINMANAGER_H
+#define QGPLUGINMANAGER_H
+
+#ifndef QT_H
+#include "qdict.h"
+#include "qlibrary.h"
+#include "quuid.h"
+#include "qstringlist.h"
+#include "qcom_p.h"
+#endif // QT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_NO_COMPONENT
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QLibrary>;
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT QGPluginManager
+{
+public:
+ QGPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE );
+ ~QGPluginManager();
+
+ void addLibraryPath( const QString& path );
+ const QLibrary* library( const QString& feature ) const;
+ QStringList featureList() const;
+
+ bool autoUnload() const;
+ void setAutoUnload( bool );
+
+protected:
+ bool enabled() const;
+ bool addLibrary( QLibrary* plugin );
+
+ QRESULT queryUnknownInterface(const QString& feature, QUnknownInterface** iface) const;
+
+ QUuid interfaceId;
+ QDict<QLibrary> plugDict; // Dict to match feature with library
+ QDict<QLibrary> libDict; // Dict to match library file with library
+ QStringList libList;
+
+ uint casesens : 1;
+ uint autounload : 1;
+};
+
+inline void QGPluginManager::setAutoUnload( bool unload )
+{
+ autounload = unload;
+}
+
+inline bool QGPluginManager::autoUnload() const
+{
+ return autounload;
+}
+
+#endif
+
+#endif //QGPLUGINMANAGER_H
diff --git a/qmake/include/private/qimageformatinterface_p.h b/qmake/include/private/qimageformatinterface_p.h
new file mode 100644
index 0000000..5f7601c
--- a/dev/null
+++ b/qmake/include/private/qimageformatinterface_p.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of ???
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QIMAGEFORMATINTERFACE_H
+#define QIMAGEFORMATINTERFACE_H
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#endif // QT_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of internal files. This header file may change from version to version
+// without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_NO_COMPONENT
+
+// {04903F05-54B1-4726-A849-FB5CB097CA87}
+#ifndef IID_QImageFormat
+#define IID_QImageFormat QUuid( 0x04903f05, 0x54b1, 0x4726, 0xa8, 0x49, 0xfb, 0x5c, 0xb0, 0x97, 0xca, 0x87 )
+#endif
+
+class QImage;
+
+struct Q_EXPORT QImageFormatInterface : public QFeatureListInterface
+{
+ virtual QRESULT loadImage( const QString &format, const QString &filename, QImage * ) = 0;
+ virtual QRESULT saveImage( const QString &format, const QString &filename, const QImage & ) = 0;
+
+ virtual QRESULT installIOHandler( const QString & ) = 0;
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // QIMAGEFORMATINTERFACE_H
diff --git a/qmake/include/private/qinputcontext_p.h b/qmake/include/private/qinputcontext_p.h
new file mode 100644
index 0000000..9ac0d2b
--- a/dev/null
+++ b/qmake/include/private/qinputcontext_p.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of ???
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QINPUTCONTEXT_P_H
+#define QINPUTCONTEXT_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of internal files. This header file may change from version to version
+// without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#include <qglobal.h>
+
+class QKeyEvent;
+class QWidget;
+class QFont;
+class QString;
+
+
+#ifdef Q_WS_X11
+#include "qarray.h"
+#include "qwindowdefs.h"
+#include "qt_x11.h"
+#endif
+
+#ifdef Q_WS_WIN
+#include <qt_windows.h>
+#endif
+
+#ifdef Q_WS_QWS
+class QWSIMEvent;
+#endif
+
+class QInputContext
+{
+public:
+#ifdef Q_WS_X11
+ QInputContext(QWidget *); // should be a toplevel widget
+ ~QInputContext();
+
+ void setFocus();
+ void setComposePosition(int, int);
+ void setComposeArea(int, int, int, int);
+ void reset();
+
+ int lookupString(XKeyEvent *, QCString &, KeySym *, Status *) const;
+ void setXFontSet(const QFont &);
+
+ void *ic;
+ QString text, lastcompose;
+ QWidget *focusWidget;
+ bool composing;
+ QFont font;
+ XFontSet fontset;
+ QMemArray<bool> selectedChars;
+#endif // Q_WS_X11
+
+#ifdef Q_WS_QWS
+ static void translateIMEvent( QWSIMEvent *, QWidget * );
+ static void reset();
+private:
+ static QWidget* focusWidget;
+ static QString* composition;
+#endif //Q_WS_QWS
+
+#ifdef Q_WS_WIN
+ static void init();
+ static void shutdown();
+
+ static void TranslateMessage( const MSG *msg);
+ static LRESULT DefWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
+
+ static void setFont( const QWidget *w, const QFont & );
+ static void setFocusHint( int x, int y, int w, int h, const QWidget *widget );
+ static bool startComposition();
+ static bool endComposition( QWidget *fw = 0 );
+ static bool composition( LPARAM lparam );
+#endif
+};
+
+#endif // QINPUTCONTEXT_P_H
diff --git a/qmake/include/private/qinternal_p.h b/qmake/include/private/qinternal_p.h
new file mode 100644
index 0000000..ae38695
--- a/dev/null
+++ b/qmake/include/private/qinternal_p.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of some shared interal classes
+**
+** Created : 010427
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QINTERNAL_P_H
+#define QINTERNAL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+#ifndef QT_H
+#include <qnamespace.h>
+#include <qrect.h>
+#endif // QT_H
+
+class QWidget;
+class QPainter;
+class QPixmap;
+
+class Q_EXPORT QSharedDoubleBuffer
+{
+public:
+ enum DoubleBufferFlags {
+ NoFlags = 0x00,
+ InitBG = 0x01,
+ Force = 0x02,
+ Default = InitBG | Force
+ };
+ typedef uint DBFlags;
+
+ QSharedDoubleBuffer( DBFlags f = Default );
+ QSharedDoubleBuffer( QWidget* widget,
+ int x = 0, int y = 0, int w = -1, int h = -1,
+ DBFlags f = Default );
+ QSharedDoubleBuffer( QPainter* painter,
+ int x = 0, int y = 0, int w = -1, int h = -1,
+ DBFlags f = Default );
+ QSharedDoubleBuffer( QWidget *widget, const QRect &r, DBFlags f = Default );
+ QSharedDoubleBuffer( QPainter *painter, const QRect &r, DBFlags f = Default );
+ ~QSharedDoubleBuffer();
+
+ bool begin( QWidget* widget, int x = 0, int y = 0, int w = -1, int h = -1 );
+ bool begin( QPainter* painter, int x = 0, int y = 0, int w = -1, int h = -1);
+ bool begin( QWidget* widget, const QRect &r );
+ bool begin( QPainter* painter, const QRect &r );
+ bool end();
+
+ QPainter* painter() const;
+
+ bool isActive() const;
+ bool isBuffered() const;
+ void flush();
+
+ static bool isDisabled() { return !dblbufr; }
+ static void setDisabled( bool off ) { dblbufr = !off; }
+
+ static void cleanup();
+
+private:
+ enum DoubleBufferState {
+ Active = 0x0100,
+ BufferActive = 0x0200,
+ ExternalPainter = 0x0400
+ };
+ typedef uint DBState;
+
+ QPixmap *getPixmap();
+ void releasePixmap();
+
+ QWidget *wid;
+ int rx, ry, rw, rh;
+ DBFlags flags;
+ DBState state;
+
+ QPainter *p, *external_p;
+ QPixmap *pix;
+
+ static bool dblbufr;
+};
+
+inline bool QSharedDoubleBuffer::begin( QWidget* widget, const QRect &r )
+{ return begin( widget, r.x(), r.y(), r.width(), r.height() ); }
+
+inline bool QSharedDoubleBuffer::begin( QPainter *painter, const QRect &r )
+{ return begin( painter, r.x(), r.y(), r.width(), r.height() ); }
+
+inline QPainter* QSharedDoubleBuffer::painter() const
+{ return p; }
+
+inline bool QSharedDoubleBuffer::isActive() const
+{ return ( state & Active ); }
+
+inline bool QSharedDoubleBuffer::isBuffered() const
+{ return ( state & BufferActive ); }
+
+
+class QVirtualDestructor {
+public:
+ virtual ~QVirtualDestructor() {}
+};
+
+template <class T>
+class QAutoDeleter : public QVirtualDestructor {
+public:
+ QAutoDeleter( T* p ) : ptr( p ) {}
+ ~QAutoDeleter() { delete ptr; }
+private:
+ T* ptr;
+};
+
+template <class T>
+QAutoDeleter<T>* qAutoDeleter( T* p )
+{
+ return new QAutoDeleter<T>( p );
+}
+#endif // QINTERNAL_P_H
diff --git a/qmake/include/private/qkbddriverinterface_p.h b/qmake/include/private/qkbddriverinterface_p.h
new file mode 100644
index 0000000..efc7ded
--- a/dev/null
+++ b/qmake/include/private/qkbddriverinterface_p.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of Qt/Embedded Keyboard Driver Interface
+**
+** Created : 20020218
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses for Qt/Embedded may use this file in accordance with the
+** Qt Embedded Commercial License Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QKBDDRIVERINTERFACE_H
+#define QKBDDRIVERINTERFACE_H
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+// {C7C838EA-FC3E-4905-92AD-F479E81F1D02}
+#ifndef IID_QKbdDriver
+#define IID_QKbdDriver QUuid( 0xc7c838ea, 0xfc3e, 0x4905, 0x92, 0xad, 0xf4, 0x79, 0xe8, 0x1f, 0x1d, 0x02)
+#endif
+
+class QWSKeyboardHandler;
+
+struct Q_EXPORT QKbdDriverInterface : public QFeatureListInterface
+{
+ virtual QWSKeyboardHandler* create( const QString& driver, const QString& device ) = 0;
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // QKBDDRIVERINTERFACE_H
diff --git a/qmake/include/private/qlayoutengine_p.h b/qmake/include/private/qlayoutengine_p.h
new file mode 100644
index 0000000..4d88afe
--- a/dev/null
+++ b/qmake/include/private/qlayoutengine_p.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+** $Id$
+**
+** Internal header file.
+**
+** Created : 981027
+**
+** Copyright (C) 1998-99 by Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QLAYOUTENGINE_P_H
+#define QLAYOUTENGINE_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp.
+// This header file may change from version to version without notice,
+// or even be removed.
+//
+// We mean it.
+//
+//
+
+
+#ifndef QT_H
+#include "qabstractlayout.h"
+#endif // QT_H
+
+#ifndef QT_NO_LAYOUT
+
+struct QLayoutStruct
+{
+ void initParameters() {
+ minimumSize = sizeHint = 0;
+ maximumSize = QLAYOUTSIZE_MAX;
+ expansive = FALSE;
+ empty = TRUE;
+ }
+ void init() {
+ stretch = 0;
+ initParameters();
+ }
+
+ QCOORD smartSizeHint() {
+ return ( stretch > 0 ) ? minimumSize : sizeHint;
+ }
+
+ // permanent storage
+ int stretch;
+
+ // parameters
+ QCOORD sizeHint;
+ QCOORD maximumSize;
+ QCOORD minimumSize;
+ bool expansive;
+ bool empty;
+
+ // temporary storage
+ bool done;
+
+ // result
+ int pos;
+ int size;
+};
+
+
+Q_EXPORT void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count,
+ int pos, int space, int spacer );
+Q_EXPORT QSize qSmartMinSize( const QWidgetItem *i );
+Q_EXPORT QSize qSmartMinSize( QWidget *w );
+Q_EXPORT QSize qSmartMaxSize( const QWidgetItem *i, int align = 0 );
+Q_EXPORT QSize qSmartMaxSize( QWidget *w, int align = 0 );
+
+
+/*
+ Modify total maximum (max) and total expansion (exp)
+ when adding boxmax/boxexp.
+
+ Expansive boxes win over non-expansive boxes.
+*/
+static inline void qMaxExpCalc( QCOORD & max, bool &exp,
+ QCOORD boxmax, bool boxexp )
+{
+ if ( exp ) {
+ if ( boxexp )
+ max = QMAX( max, boxmax );
+ } else {
+ if ( boxexp )
+ max = boxmax;
+ else
+ max = QMIN( max, boxmax );
+ }
+ exp = exp || boxexp;
+}
+
+#endif //QT_NO_LAYOUT
+#endif
diff --git a/qmake/include/private/qlibrary_p.h b/qmake/include/private/qlibrary_p.h
new file mode 100644
index 0000000..c4dd565
--- a/dev/null
+++ b/qmake/include/private/qlibrary_p.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of an internal QLibrary class
+**
+** Created : 2000-01-01
+**
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QLIBRARY_P_H
+#define QLIBRARY_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the QLibrary class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#include "qlibrary.h"
+
+#ifndef QT_NO_LIBRARY
+
+#ifndef QT_H
+#if defined(Q_CC_GNU)
+#warning "avoid including header file \"qwindowdefs.h\" in directory 'tools'"
+#endif
+#include "qwindowdefs.h"
+#endif // QT_H
+
+class QLibraryPrivate
+{
+public:
+ QLibraryPrivate( QLibrary *lib );
+
+#ifdef Q_WS_WIN
+ HINSTANCE pHnd;
+#else
+ void *pHnd;
+#endif
+
+ bool loadLibrary();
+ bool freeLibrary();
+ void *resolveSymbol( const char * );
+
+private:
+ QLibrary *library;
+};
+
+#endif // QT_NO_LIBRARY
+#endif // QLIBRARY_P_H
diff --git a/qmake/include/private/qmousedriverinterface_p.h b/qmake/include/private/qmousedriverinterface_p.h
new file mode 100644
index 0000000..fd76308
--- a/dev/null
+++ b/qmake/include/private/qmousedriverinterface_p.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of Qt/Embedded Mouse Driver Interface
+**
+** Created : 20020220
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses for Qt/Embedded may use this file in accordance with the
+** Qt Embedded Commercial License Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QMOUSEDRIVERINTERFACE_H
+#define QMOUSEDRIVERINTERFACE_H
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#endif // QT_H
+
+#ifndef QT_NO_COMPONENT
+
+// {4367CF5A-F7CE-407B-8BB6-DF19AEDA2EBB}
+#ifndef IID_QMouseDriver
+#define IID_QMouseDriver QUuid( 0x4367cf5a, 0xf7ce, 0x407b, 0x8b, 0xb6, 0xdf, 0x19, 0xae, 0xda, 0x2e, 0xbb)
+#endif
+
+class QWSMouseHandler;
+
+struct Q_EXPORT QMouseDriverInterface : public QFeatureListInterface
+{
+ virtual QWSMouseHandler* create( const QString& driver, const QString &device ) = 0;
+};
+
+#endif // QT_NO_COMPONENT
+
+#endif // QMOUSEDRIVERINTERFACE_H
diff --git a/qmake/include/private/qmutex_p.h b/qmake/include/private/qmutex_p.h
new file mode 100644
index 0000000..d4ce97a
--- a/dev/null
+++ b/qmake/include/private/qmutex_p.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+** $Id$
+**
+** QMutex private class declarations
+**
+** Created : 20012507
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QMUTEX_P_H
+#define QMUTEX_P_H
+
+#ifndef QT_H
+#endif // QT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qmutex_unix.cpp and qmutex_win.cpp. This header file may change
+// from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+class QMutexPrivate {
+public:
+ // Q_MUTEX_T is defined in the various *.cpp files
+ Q_MUTEX_T handle;
+
+ virtual ~QMutexPrivate();
+
+ virtual void lock() = 0;
+ virtual void unlock() = 0;
+ virtual bool locked() = 0;
+ virtual bool trylock() = 0;
+ virtual int type() const = 0;
+};
+
+
+#endif // QMUTEX_P_H
diff --git a/qmake/include/private/qmutexpool_p.h b/qmake/include/private/qmutexpool_p.h
new file mode 100644
index 0000000..3d9fef7
--- a/dev/null
+++ b/qmake/include/private/qmutexpool_p.h
@@ -0,0 +1,39 @@
+#ifndef QMUTEXPOOL_H
+#define QMUTEXPOOL_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of QSettings. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifdef QT_THREAD_SUPPORT
+
+#include "qmutex.h"
+#include "qmemarray.h"
+
+class QMutexPool
+{
+public:
+ QMutexPool( bool recursive = FALSE, int size = 17 );
+ ~QMutexPool();
+
+ QMutex *get( void *address );
+
+private:
+ QMutex mutex;
+ QMemArray<QMutex*> mutexes;
+ bool recurs;
+};
+
+extern QMutexPool *qt_global_mutexpool;
+
+#endif // QT_THREAD_SUPPORT
+
+#endif // QMUTEXPOOL_H
diff --git a/qmake/include/private/qpainter_p.h b/qmake/include/private/qpainter_p.h
new file mode 100644
index 0000000..43f454e
--- a/dev/null
+++ b/qmake/include/private/qpainter_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of some Qt private functions.
+**
+** Created : 000909
+**
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPAINTER_P_H
+#define QPAINTER_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qpainter.cpp and qfont.cpp. This header file may change
+// from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#endif // QT_H
+
+extern void qt_format_text( const QFont& f, const QRect &r,
+ int tf, const QString& str, int len, QRect *brect,
+ int tabstops, int* tabarray, int tabarraylen,
+ QTextParag **internal, QPainter* painter );
+
+
+#endif
diff --git a/qmake/include/private/qpluginmanager_p.h b/qmake/include/private/qpluginmanager_p.h
new file mode 100644
index 0000000..4b64ba0
--- a/dev/null
+++ b/qmake/include/private/qpluginmanager_p.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QPluginManager class
+**
+** Created : 2000-01-01
+**
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPLUGINMANAGER_H
+#define QPLUGINMANAGER_H
+
+#ifndef QT_H
+#include "qgpluginmanager_p.h"
+#endif // QT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_NO_COMPONENT
+
+template<class Type>
+class QPluginManager : public QGPluginManager
+{
+public:
+ QPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE )
+ : QGPluginManager( id, paths, suffix, cs ) {}
+ QRESULT queryInterface(const QString& feature, Type** iface) const
+ {
+ return queryUnknownInterface( feature, (QUnknownInterface**)iface );
+ }
+};
+
+#endif //QT_NO_COMPONENT
+
+#endif //QPLUGINMANAGER_H
diff --git a/qmake/include/private/qpsprinter_p.h b/qmake/include/private/qpsprinter_p.h
new file mode 100644
index 0000000..27a4968
--- a/dev/null
+++ b/qmake/include/private/qpsprinter_p.h
@@ -0,0 +1,89 @@
+/**********************************************************************
+** $Id$
+**
+** Definition of internal QPSPrinter class.
+** QPSPrinter implements PostScript (tm) output via QPrinter.
+**
+** Created : 940927
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPSPRINTER_P_H
+#define QPSPRINTER_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qpsprinter.cpp and qprinter_x11.cpp.
+// This header file may change from version to version without notice,
+// or even be removed.
+//
+// We mean it.
+//
+//
+
+
+#ifndef QT_H
+#include "qprinter.h"
+#include "qtextstream.h"
+#endif // QT_H
+
+#ifndef QT_NO_PRINTER
+
+struct QPSPrinterPrivate;
+
+class Q_EXPORT QPSPrinter : public QPaintDevice
+{
+private:
+ // QPrinter uses these
+ QPSPrinter( QPrinter *, int );
+ ~QPSPrinter();
+
+ bool cmd ( int, QPainter *, QPDevCmdParam * );
+
+ enum { NewPage = 100, AbortPrinting };
+
+ friend class QPrinter;
+private:
+ // not used by QPrinter
+ QPSPrinterPrivate *d;
+
+ // Disabled copy constructor and operator=
+ QPSPrinter( const QPSPrinter & );
+ QPSPrinter &operator=( const QPSPrinter & );
+};
+
+#endif // QT_NO_PRINTER
+
+#endif // QPSPRINTER_P_H
diff --git a/qmake/include/private/qrichtext_p.h b/qmake/include/private/qrichtext_p.h
new file mode 100644
index 0000000..8e29804
--- a/dev/null
+++ b/qmake/include/private/qrichtext_p.h
@@ -0,0 +1,2133 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of internal rich text classes
+**
+** Created : 990124
+**
+** Copyright (C) 1999-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QRICHTEXT_P_H
+#define QRICHTEXT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qptrlist.h"
+#include "qrect.h"
+#include "qfontmetrics.h"
+#include "qintdict.h"
+#include "qmap.h"
+#include "qstringlist.h"
+#include "qfont.h"
+#include "qcolor.h"
+#include "qsize.h"
+#include "qvaluelist.h"
+#include "qvaluestack.h"
+#include "qobject.h"
+#include "qdict.h"
+#include "qpixmap.h"
+#include "qstylesheet.h"
+#include "qptrvector.h"
+#include "qpainter.h"
+#include "qlayout.h"
+#include "qobject.h"
+#include "private/qcomplextext_p.h"
+#include "qapplication.h"
+#endif // QT_H
+
+#ifndef QT_NO_RICHTEXT
+
+class QTextDocument;
+class QTextString;
+class QTextPreProcessor;
+class QTextFormat;
+class QTextCursor;
+class QTextParagraph;
+class QTextFormatter;
+class QTextIndent;
+class QTextFormatCollection;
+class QStyleSheetItem;
+#ifndef QT_NO_TEXTCUSTOMITEM
+class QTextCustomItem;
+#endif
+class QTextFlow;
+struct QBidiContext;
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextStringChar
+{
+ friend class QTextString;
+
+public:
+ // this is never called, initialize variables in QTextString::insert()!!!
+ QTextStringChar() : lineStart( 0 ), type( Regular ), startOfRun( 0 ) {d.format=0;}
+ ~QTextStringChar();
+
+ QChar c;
+ enum Type { Regular=0, Custom=1, Anchor=2, CustomAnchor=3 };
+ uint lineStart : 1;
+ uint rightToLeft : 1;
+ uint hasCursor : 1;
+ uint canBreak : 1;
+ Type type : 2;
+ uint startOfRun : 1;
+
+ int x;
+ int height() const;
+ int ascent() const;
+ int descent() const;
+ bool isCustom() const { return (type & Custom) != 0; }
+ QTextFormat *format() const;
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QTextCustomItem *customItem() const;
+#endif
+ void setFormat( QTextFormat *f );
+#ifndef QT_NO_TEXTCUSTOMITEM
+ void setCustomItem( QTextCustomItem *i );
+#endif
+ struct CustomData
+ {
+ QTextFormat *format;
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QTextCustomItem *custom;
+#endif
+ QString anchorName;
+ QString anchorHref;
+ };
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ void loseCustomItem();
+#endif
+
+ union {
+ QTextFormat* format;
+ CustomData* custom;
+ } d;
+
+ bool isAnchor() const { return ( type & Anchor) != 0; }
+ bool isLink() const { return isAnchor() && !!d.custom->anchorHref; }
+ QString anchorName() const;
+ QString anchorHref() const;
+ void setAnchor( const QString& name, const QString& href );
+
+private:
+ QTextStringChar &operator=( const QTextStringChar & ) {
+ //abort();
+ return *this;
+ }
+ friend class QComplexText;
+ friend class QTextParagraph;
+};
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<QTextStringChar>;
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT QTextString
+{
+public:
+
+ QTextString();
+ QTextString( const QTextString &s );
+ virtual ~QTextString();
+
+ static QString toString( const QMemArray<QTextStringChar> &data );
+ QString toString() const;
+
+ QTextStringChar &at( int i ) const;
+#if defined(Q_STRICT_INLINING_RULES)
+ // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the
+ // implementation to be a redefinition.
+ inline int length() const;
+#else
+ int length() const;
+#endif
+
+ int width( int idx ) const;
+
+ void insert( int index, const QString &s, QTextFormat *f );
+ void insert( int index, const QChar *unicode, int len, QTextFormat *f );
+ void insert( int index, QTextStringChar *c, bool doAddRefFormat = FALSE );
+ void truncate( int index );
+ void remove( int index, int len );
+ void clear();
+
+ void setFormat( int index, QTextFormat *f, bool useCollection );
+
+ void setBidi( bool b ) { bidi = b; }
+ bool isBidi() const;
+ bool isRightToLeft() const;
+ QChar::Direction direction() const;
+ void setDirection( QChar::Direction d ) { dir = d; bidiDirty = TRUE; }
+
+ QMemArray<QTextStringChar> subString( int start = 0, int len = 0xFFFFFF ) const;
+ QMemArray<QTextStringChar> rawData() const { return data.copy(); }
+
+ void operator=( const QString &s ) { clear(); insert( 0, s, 0 ); }
+ void operator+=( const QString &s ) { insert( length(), s, 0 ); }
+ void prepend( const QString &s ) { insert( 0, s, 0 ); }
+
+private:
+ void checkBidi() const;
+
+ QMemArray<QTextStringChar> data;
+ uint bidiDirty : 1;
+ uint bidi : 1; // true when the paragraph has right to left characters
+ uint rightToLeft : 1;
+ uint dir : 5;
+};
+
+inline bool QTextString::isBidi() const
+{
+ if ( bidiDirty )
+ checkBidi();
+ return bidi;
+}
+
+inline bool QTextString::isRightToLeft() const
+{
+ if ( bidiDirty )
+ checkBidi();
+ return rightToLeft;
+}
+
+inline QChar::Direction QTextString::direction() const
+{
+ return (QChar::Direction) dir;
+}
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<int>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<QTextParagraph*>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<bool>;
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT QTextCursor
+{
+public:
+ QTextCursor( QTextDocument *d = 0 );
+ QTextCursor( const QTextCursor &c );
+ QTextCursor &operator=( const QTextCursor &c );
+ virtual ~QTextCursor() {}
+
+ bool operator==( const QTextCursor &c ) const;
+ bool operator!=( const QTextCursor &c ) const { return !(*this == c); }
+
+#if defined(Q_STRICT_INLINING_RULES)
+ // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the
+ // implementation to be a redefinition.
+ inline QTextParagraph *paragraph() const;
+#else
+ QTextParagraph *paragraph() const;
+#endif
+
+ void setParagraph( QTextParagraph*p ) { gotoPosition(p, 0 ); }
+ QTextDocument *document() const;
+ int index() const;
+ void setIndex( int index ) { gotoPosition(paragraph(), index ); }
+
+ void gotoPosition( QTextParagraph* p, int index = 0);
+ void gotoLeft();
+ void gotoRight();
+ void gotoNextLetter();
+ void gotoPreviousLetter();
+ void gotoUp();
+ void gotoDown();
+ void gotoLineEnd();
+ void gotoLineStart();
+ void gotoHome();
+ void gotoEnd();
+ void gotoPageUp( int visibleHeight );
+ void gotoPageDown( int visibleHeight );
+ void gotoNextWord();
+ void gotoPreviousWord();
+ void gotoWordLeft();
+ void gotoWordRight();
+
+ void insert( const QString &s, bool checkNewLine, QMemArray<QTextStringChar> *formatting = 0 );
+ void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE );
+ bool remove();
+ void indent();
+
+ bool atParagStart();
+ bool atParagEnd();
+
+ int x() const; // x in current paragraph
+ int y() const; // y in current paragraph
+
+ int globalX() const;
+ int globalY() const;
+
+ QTextParagraph *topParagraph() const { return paras.isEmpty() ? para : paras.first(); }
+ int offsetX() const { return ox; } // inner document offset
+ int offsetY() const { return oy; } // inner document offset
+ int totalOffsetX() const; // total document offset
+ int totalOffsetY() const; // total document offset
+
+ bool place( const QPoint &pos, QTextParagraph *s ) { return place( pos, s, FALSE ); }
+ bool place( const QPoint &pos, QTextParagraph *s, bool link );
+ void restoreState();
+
+
+ int nestedDepth() const { return (int)indices.count(); } //### size_t/int cast
+ void oneUp() { if ( !indices.isEmpty() ) pop(); }
+ void setValid( bool b ) { valid = b; }
+ bool isValid() const { return valid; }
+
+private:
+ enum Operation { EnterBegin, EnterEnd, Next, Prev, Up, Down };
+
+ void push();
+ void pop();
+ void processNesting( Operation op );
+ void invalidateNested();
+ void gotoIntoNested( const QPoint &globalPos );
+
+ QTextParagraph *para;
+ int idx, tmpIndex;
+ int ox, oy;
+ QValueStack<int> indices;
+ QValueStack<QTextParagraph*> paras;
+ QValueStack<int> xOffsets;
+ QValueStack<int> yOffsets;
+ uint valid : 1;
+
+};
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextCommand
+{
+public:
+ enum Commands { Invalid, Insert, Delete, Format, Style };
+
+ QTextCommand( QTextDocument *d ) : doc( d ), cursor( d ) {}
+ virtual ~QTextCommand();
+
+ virtual Commands type() const;
+
+ virtual QTextCursor *execute( QTextCursor *c ) = 0;
+ virtual QTextCursor *unexecute( QTextCursor *c ) = 0;
+
+protected:
+ QTextDocument *doc;
+ QTextCursor cursor;
+
+};
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextCommand>;
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT QTextCommandHistory
+{
+public:
+ QTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); }
+ virtual ~QTextCommandHistory();
+
+ void clear() { history.clear(); current = -1; }
+
+ void addCommand( QTextCommand *cmd );
+ QTextCursor *undo( QTextCursor *c );
+ QTextCursor *redo( QTextCursor *c );
+
+ bool isUndoAvailable();
+ bool isRedoAvailable();
+
+ void setUndoDepth( int d ) { steps = d; }
+ int undoDepth() const { return steps; }
+
+ int historySize() const { return history.count(); }
+ int currentPosition() const { return current; }
+
+private:
+ QPtrList<QTextCommand> history;
+ int current, steps;
+
+};
+
+inline QTextCommandHistory::~QTextCommandHistory()
+{
+ clear();
+}
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+class Q_EXPORT QTextCustomItem
+{
+public:
+ QTextCustomItem( QTextDocument *p )
+ : xpos(0), ypos(-1), width(-1), height(0), parent( p )
+ {}
+ virtual ~QTextCustomItem();
+ virtual void draw(QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ) = 0;
+
+ virtual void adjustToPainter( QPainter* );
+
+ enum Placement { PlaceInline = 0, PlaceLeft, PlaceRight };
+ virtual Placement placement() const;
+ bool placeInline() { return placement() == PlaceInline; }
+
+ virtual bool ownLine() const;
+ virtual void resize( int nwidth );
+ virtual void invalidate();
+ virtual int ascent() const { return height; }
+
+ virtual bool isNested() const;
+ virtual int minimumWidth() const;
+
+ virtual QString richText() const;
+
+ int xpos; // used for floating items
+ int ypos; // used for floating items
+ int width;
+ int height;
+
+ QRect geometry() const { return QRect( xpos, ypos, width, height ); }
+
+ virtual bool enter( QTextCursor *, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enterAt( QTextCursor *, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy, const QPoint & );
+ virtual bool next( QTextCursor *, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+ virtual bool prev( QTextCursor *, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+ virtual bool down( QTextCursor *, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+ virtual bool up( QTextCursor *, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+
+ void setParagraph( QTextParagraph *p ) { parag = p; }
+ QTextParagraph *paragraph() const { return parag; }
+
+ QTextDocument *parent;
+ QTextParagraph *parag;
+
+ virtual void pageBreak( int y, QTextFlow* flow );
+};
+#endif
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<QString, QString>;
+// MOC_SKIP_END
+#endif
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+class Q_EXPORT QTextImage : public QTextCustomItem
+{
+public:
+ QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context,
+ QMimeSourceFactory &factory );
+ virtual ~QTextImage();
+
+ Placement placement() const { return place; }
+ void adjustToPainter( QPainter* );
+ int minimumWidth() const { return width; }
+
+ QString richText() const;
+
+ void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected );
+
+private:
+ QRegion* reg;
+ QPixmap pm;
+ Placement place;
+ int tmpwidth, tmpheight;
+ QMap<QString, QString> attributes;
+ QString imgId;
+
+};
+#endif
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+class Q_EXPORT QTextHorizontalLine : public QTextCustomItem
+{
+public:
+ QTextHorizontalLine( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context,
+ QMimeSourceFactory &factory );
+ virtual ~QTextHorizontalLine();
+
+ void adjustToPainter( QPainter* );
+ void draw(QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected );
+ QString richText() const;
+
+ bool ownLine() const { return TRUE; }
+
+private:
+ int tmpheight;
+ QColor color;
+ bool shade;
+
+};
+#endif
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextCustomItem>;
+// MOC_SKIP_END
+#endif
+#endif
+
+class Q_EXPORT QTextFlow
+{
+ friend class QTextDocument;
+#ifndef QT_NO_TEXTCUSTOMITEM
+ friend class QTextTableCell;
+#endif
+
+public:
+ QTextFlow();
+ virtual ~QTextFlow();
+
+ virtual void setWidth( int width );
+ int width() const;
+
+ virtual void setPageSize( int ps );
+ int pageSize() const { return pagesize; }
+
+ virtual int adjustLMargin( int yp, int h, int margin, int space );
+ virtual int adjustRMargin( int yp, int h, int margin, int space );
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ virtual void registerFloatingItem( QTextCustomItem* item );
+ virtual void unregisterFloatingItem( QTextCustomItem* item );
+#endif
+ virtual QRect boundingRect() const;
+ virtual void drawFloatingItems(QPainter* p, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected );
+
+ virtual int adjustFlow( int y, int w, int h ); // adjusts y according to the defined pagesize. Returns the shift.
+
+ virtual bool isEmpty();
+
+ void clear();
+
+private:
+ int w;
+ int pagesize;
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QPtrList<QTextCustomItem> leftItems;
+ QPtrList<QTextCustomItem> rightItems;
+#endif
+};
+
+inline int QTextFlow::width() const { return w; }
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+class QTextTable;
+
+class Q_EXPORT QTextTableCell : public QLayoutItem
+{
+ friend class QTextTable;
+
+public:
+ QTextTableCell( QTextTable* table,
+ int row, int column,
+ const QMap<QString, QString> &attr,
+ const QStyleSheetItem* style,
+ const QTextFormat& fmt, const QString& context,
+ QMimeSourceFactory &factory, QStyleSheet *sheet, const QString& doc );
+ virtual ~QTextTableCell();
+
+ QSize sizeHint() const ;
+ QSize minimumSize() const ;
+ QSize maximumSize() const ;
+ QSizePolicy::ExpandData expanding() const;
+ bool isEmpty() const;
+ void setGeometry( const QRect& ) ;
+ QRect geometry() const;
+
+ bool hasHeightForWidth() const;
+ int heightForWidth( int ) const;
+
+ void adjustToPainter( QPainter* );
+
+ int row() const { return row_; }
+ int column() const { return col_; }
+ int rowspan() const { return rowspan_; }
+ int colspan() const { return colspan_; }
+ int stretch() const { return stretch_; }
+
+ QTextDocument* richText() const { return richtext; }
+ QTextTable* table() const { return parent; }
+
+ void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected );
+
+ QBrush *backGround() const { return background; }
+ virtual void invalidate();
+
+ int verticalAlignmentOffset() const;
+ int horizontalAlignmentOffset() const;
+
+private:
+ QRect geom;
+ QTextTable* parent;
+ QTextDocument* richtext;
+ int row_;
+ int col_;
+ int rowspan_;
+ int colspan_;
+ int stretch_;
+ int maxw;
+ int minw;
+ bool hasFixedWidth;
+ QBrush *background;
+ int cached_width;
+ int cached_sizehint;
+ QMap<QString, QString> attributes;
+ int align;
+};
+#endif
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextTableCell>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<QTextCursor*, int>;
+// MOC_SKIP_END
+#endif
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+class Q_EXPORT QTextTable: public QTextCustomItem
+{
+ friend class QTextTableCell;
+
+public:
+ QTextTable( QTextDocument *p, const QMap<QString, QString> &attr );
+ virtual ~QTextTable();
+
+ void adjustToPainter( QPainter *p );
+ void pageBreak( int y, QTextFlow* flow );
+ void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch,
+ const QColorGroup& cg, bool selected );
+
+ bool noErase() const { return TRUE; }
+ bool ownLine() const { return TRUE; }
+ Placement placement() const { return place; }
+ bool isNested() const { return TRUE; }
+ void resize( int nwidth );
+ virtual void invalidate();
+
+ virtual bool enter( QTextCursor *c, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enterAt( QTextCursor *c, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy, const QPoint &pos );
+ virtual bool next( QTextCursor *c, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+ virtual bool prev( QTextCursor *c, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+ virtual bool down( QTextCursor *c, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+ virtual bool up( QTextCursor *c, QTextDocument *&doc, QTextParagraph *&parag, int &idx, int &ox, int &oy );
+
+ QString richText() const;
+
+ int minimumWidth() const;
+
+ QPtrList<QTextTableCell> tableCells() const { return cells; }
+
+ bool isStretching() const { return stretch; }
+
+private:
+ void format( int w );
+ void addCell( QTextTableCell* cell );
+
+private:
+ QGridLayout* layout;
+ QPtrList<QTextTableCell> cells;
+ int cachewidth;
+ int fixwidth;
+ int cellpadding;
+ int cellspacing;
+ int border;
+ int outerborder;
+ int stretch;
+ int innerborder;
+ int us_cp, us_ib, us_b, us_ob, us_cs;
+ QMap<QString, QString> attributes;
+ QMap<QTextCursor*, int> currCell;
+ Placement place;
+ void adjustCells( int y , int shift );
+ int pageBreakFor;
+};
+#endif
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+class QTextTableCell;
+class QTextParagraph;
+#endif
+
+struct Q_EXPORT QTextDocumentSelection
+{
+ QTextCursor startCursor, endCursor;
+ bool swapped;
+};
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QColor>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, bool>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextDocumentSelection>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextDocument>;
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT QTextDocument : public QObject
+{
+ Q_OBJECT
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ friend class QTextTableCell;
+#endif
+ friend class QTextCursor;
+ friend class QTextEdit;
+ friend class QTextParagraph;
+
+public:
+ enum SelectionIds {
+ Standard = 0,
+ IMSelectionText = 31998,
+ IMCompositionText = 31999, // this must be higher!
+ Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to
+ // remove multiple lines with removeSelectedText()
+ };
+
+ QTextDocument( QTextDocument *p );
+ QTextDocument( QTextDocument *d, QTextFormatCollection *f );
+ virtual ~QTextDocument();
+
+ QTextDocument *parent() const { return par; }
+ QTextParagraph *parentParagraph() const { return parentPar; }
+
+ void setText( const QString &text, const QString &context );
+ QMap<QString, QString> attributes() const { return attribs; }
+ void setAttributes( const QMap<QString, QString> &attr ) { attribs = attr; }
+
+ QString text() const;
+ QString text( int parag ) const;
+ QString originalText() const;
+
+ int x() const;
+ int y() const;
+ int width() const;
+ int widthUsed() const;
+ int visibleWidth() const;
+ int height() const;
+ void setWidth( int w );
+ int minimumWidth() const;
+ bool setMinimumWidth( int needed, int used = -1, QTextParagraph *parag = 0 );
+
+ void setY( int y );
+ int leftMargin() const;
+ void setLeftMargin( int lm );
+ int rightMargin() const;
+ void setRightMargin( int rm );
+
+ QTextParagraph *firstParagraph() const;
+ QTextParagraph *lastParagraph() const;
+ void setFirstParagraph( QTextParagraph *p );
+ void setLastParagraph( QTextParagraph *p );
+
+ void invalidate();
+
+ void setPreProcessor( QTextPreProcessor *sh );
+ QTextPreProcessor *preProcessor() const;
+
+ void setFormatter( QTextFormatter *f );
+ QTextFormatter *formatter() const;
+
+ void setIndent( QTextIndent *i );
+ QTextIndent *indent() const;
+
+ QColor selectionColor( int id ) const;
+ bool invertSelectionText( int id ) const;
+ void setSelectionColor( int id, const QColor &c );
+ void setInvertSelectionText( int id, bool b );
+ bool hasSelection( int id, bool visible = FALSE ) const;
+ void setSelectionStart( int id, const QTextCursor &cursor );
+ bool setSelectionEnd( int id, const QTextCursor &cursor );
+ void selectAll( int id );
+ bool removeSelection( int id );
+ void selectionStart( int id, int &paragId, int &index );
+ QTextCursor selectionStartCursor( int id );
+ QTextCursor selectionEndCursor( int id );
+ void selectionEnd( int id, int &paragId, int &index );
+ void setFormat( int id, QTextFormat *f, int flags );
+ int numSelections() const { return nSelections; }
+ void addSelection( int id );
+
+ QString selectedText( int id, bool asRichText = FALSE ) const;
+ void removeSelectedText( int id, QTextCursor *cursor );
+ void indentSelection( int id );
+
+ QTextParagraph *paragAt( int i ) const;
+
+ void addCommand( QTextCommand *cmd );
+ QTextCursor *undo( QTextCursor *c = 0 );
+ QTextCursor *redo( QTextCursor *c = 0 );
+ QTextCommandHistory *commands() const { return commandHistory; }
+
+ QTextFormatCollection *formatCollection() const;
+
+ bool find( QTextCursor &cursor, const QString &expr, bool cs, bool wo, bool forward);
+
+ void setTextFormat( Qt::TextFormat f );
+ Qt::TextFormat textFormat() const;
+
+ bool inSelection( int selId, const QPoint &pos ) const;
+
+ QStyleSheet *styleSheet() const { return sheet_; }
+#ifndef QT_NO_MIME
+ QMimeSourceFactory *mimeSourceFactory() const { return factory_; }
+#endif
+ QString context() const { return contxt; }
+
+ void setStyleSheet( QStyleSheet *s );
+ void setDefaultFormat( const QFont &font, const QColor &color );
+#ifndef QT_NO_MIME
+ void setMimeSourceFactory( QMimeSourceFactory *f ) { if ( f ) factory_ = f; }
+#endif
+ void setContext( const QString &c ) { if ( !c.isEmpty() ) contxt = c; }
+
+ void setUnderlineLinks( bool b );
+ bool underlineLinks() const { return underlLinks; }
+
+ void setPaper( QBrush *brush ) { if ( backBrush ) delete backBrush; backBrush = brush; }
+ QBrush *paper() const { return backBrush; }
+
+ void doLayout( QPainter *p, int w );
+ void draw( QPainter *p, const QRect& rect, const QColorGroup &cg, const QBrush *paper = 0 );
+ void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch,
+ QPixmap *&doubleBuffer, const QColorGroup &cg,
+ bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE );
+ QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg,
+ bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0,
+ bool resetChanged = TRUE );
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ void registerCustomItem( QTextCustomItem *i, QTextParagraph *p );
+ void unregisterCustomItem( QTextCustomItem *i, QTextParagraph *p );
+#endif
+
+ void setFlow( QTextFlow *f );
+ void takeFlow();
+ QTextFlow *flow() const { return flow_; }
+ bool isPageBreakEnabled() const { return pages; }
+ void setPageBreakEnabled( bool b ) { pages = b; }
+
+ void setUseFormatCollection( bool b ) { useFC = b; }
+ bool useFormatCollection() const { return useFC; }
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QTextTableCell *tableCell() const { return tc; }
+ void setTableCell( QTextTableCell *c ) { tc = c; }
+#endif
+
+ void setPlainText( const QString &text );
+ void setRichText( const QString &text, const QString &context );
+ QString richText() const;
+ QString plainText() const;
+
+ bool focusNextPrevChild( bool next );
+
+ int alignment() const;
+ void setAlignment( int a );
+
+ int *tabArray() const;
+ int tabStopWidth() const;
+ void setTabArray( int *a );
+ void setTabStops( int tw );
+
+ void setUndoDepth( int d ) { commandHistory->setUndoDepth( d ); }
+ int undoDepth() const { return commandHistory->undoDepth(); }
+
+ int length() const;
+ void clear( bool createEmptyParag = FALSE );
+
+ virtual QTextParagraph *createParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE );
+ void insertChild( QObject *o ) { QObject::insertChild( o ); }
+ void removeChild( QObject *o ) { QObject::removeChild( o ); }
+ void insertChild( QTextDocument *d ) { childList.append( d ); }
+ void removeChild( QTextDocument *d ) { childList.removeRef( d ); }
+ QPtrList<QTextDocument> children() const { return childList; }
+
+ bool hasFocusParagraph() const;
+ QString focusHref() const;
+ QString focusName() const;
+
+ void invalidateOriginalText() { oTextValid = FALSE; oText = ""; }
+
+signals:
+ void minimumWidthChanged( int );
+
+private:
+ void init();
+ QPixmap *bufferPixmap( const QSize &s );
+ // HTML parser
+ bool hasPrefix(const QChar* doc, int length, int pos, QChar c);
+ bool hasPrefix(const QChar* doc, int length, int pos, const QString& s);
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QTextCustomItem* parseTable( const QMap<QString, QString> &attr, const QTextFormat &fmt,
+ const QChar* doc, int length, int& pos, QTextParagraph *curpar );
+#endif
+ bool eatSpace(const QChar* doc, int length, int& pos, bool includeNbsp = FALSE );
+ bool eat(const QChar* doc, int length, int& pos, QChar c);
+ QString parseOpenTag(const QChar* doc, int length, int& pos, QMap<QString, QString> &attr, bool& emptyTag);
+ QString parseCloseTag( const QChar* doc, int length, int& pos );
+ QChar parseHTMLSpecialChar(const QChar* doc, int length, int& pos);
+ QString parseWord(const QChar* doc, int length, int& pos, bool lower = TRUE);
+ QChar parseChar(const QChar* doc, int length, int& pos, QStyleSheetItem::WhiteSpaceMode wsm );
+ void setRichTextInternal( const QString &text, QTextCursor* cursor = 0 );
+ void setRichTextMarginsInternal( QPtrList< QPtrVector<QStyleSheetItem> >& styles, QTextParagraph* stylesPar );
+
+private:
+ struct Q_EXPORT Focus {
+ QTextParagraph *parag;
+ int start, len;
+ QString href;
+ QString name;
+ };
+
+ int cx, cy, cw, vw;
+ QTextParagraph *fParag, *lParag;
+ QTextPreProcessor *pProcessor;
+ QMap<int, QColor> selectionColors;
+ QMap<int, QTextDocumentSelection> selections;
+ QMap<int, bool> selectionText;
+ QTextCommandHistory *commandHistory;
+ QTextFormatter *pFormatter;
+ QTextIndent *indenter;
+ QTextFormatCollection *fCollection;
+ Qt::TextFormat txtFormat;
+ uint preferRichText : 1;
+ uint pages : 1;
+ uint useFC : 1;
+ uint withoutDoubleBuffer : 1;
+ uint underlLinks : 1;
+ uint nextDoubleBuffered : 1;
+ uint oTextValid : 1;
+ uint mightHaveCustomItems : 1;
+ int align;
+ int nSelections;
+ QTextFlow *flow_;
+ QTextDocument *par;
+ QTextParagraph *parentPar;
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QTextTableCell *tc;
+#endif
+ QBrush *backBrush;
+ QPixmap *buf_pixmap;
+ Focus focusIndicator;
+ int minw;
+ int wused;
+ int leftmargin;
+ int rightmargin;
+ QTextParagraph *minwParag, *curParag;
+ QStyleSheet* sheet_;
+#ifndef QT_NO_MIME
+ QMimeSourceFactory* factory_;
+#endif
+ QString contxt;
+ QMap<QString, QString> attribs;
+ int *tArray;
+ int tStopWidth;
+ int uDepth;
+ QString oText;
+ QPtrList<QTextDocument> childList;
+ QColor linkColor;
+ double scaleFontsFactor;
+
+ short list_tm,list_bm, list_lm, li_tm, li_bm, par_tm, par_bm;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+ QTextDocument( const QTextDocument & );
+ QTextDocument &operator=( const QTextDocument & );
+#endif
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+class Q_EXPORT QTextDeleteCommand : public QTextCommand
+{
+public:
+ QTextDeleteCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str,
+ const QByteArray& oldStyle );
+ QTextDeleteCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str );
+ virtual ~QTextDeleteCommand();
+
+ Commands type() const { return Delete; }
+ QTextCursor *execute( QTextCursor *c );
+ QTextCursor *unexecute( QTextCursor *c );
+
+protected:
+ int id, index;
+ QTextParagraph *parag;
+ QMemArray<QTextStringChar> text;
+ QByteArray styleInformation;
+
+};
+
+class Q_EXPORT QTextInsertCommand : public QTextDeleteCommand
+{
+public:
+ QTextInsertCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str,
+ const QByteArray& oldStyleInfo )
+ : QTextDeleteCommand( d, i, idx, str, oldStyleInfo ) {}
+ QTextInsertCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str )
+ : QTextDeleteCommand( p, idx, str ) {}
+ virtual ~QTextInsertCommand() {}
+
+ Commands type() const { return Insert; }
+ QTextCursor *execute( QTextCursor *c ) { return QTextDeleteCommand::unexecute( c ); }
+ QTextCursor *unexecute( QTextCursor *c ) { return QTextDeleteCommand::execute( c ); }
+
+};
+
+class Q_EXPORT QTextFormatCommand : public QTextCommand
+{
+public:
+ QTextFormatCommand( QTextDocument *d, int sid, int sidx, int eid, int eidx, const QMemArray<QTextStringChar> &old, QTextFormat *f, int fl );
+ virtual ~QTextFormatCommand();
+
+ Commands type() const { return Format; }
+ QTextCursor *execute( QTextCursor *c );
+ QTextCursor *unexecute( QTextCursor *c );
+
+protected:
+ int startId, startIndex, endId, endIndex;
+ QTextFormat *format;
+ QMemArray<QTextStringChar> oldFormats;
+ int flags;
+
+};
+
+class Q_EXPORT QTextStyleCommand : public QTextCommand
+{
+public:
+ QTextStyleCommand( QTextDocument *d, int fParag, int lParag, const QByteArray& beforeChange );
+ virtual ~QTextStyleCommand() {}
+
+ Commands type() const { return Style; }
+ QTextCursor *execute( QTextCursor *c );
+ QTextCursor *unexecute( QTextCursor *c );
+
+ static QByteArray readStyleInformation( QTextDocument* d, int fParag, int lParag );
+ static void writeStyleInformation( QTextDocument* d, int fParag, const QByteArray& style );
+
+private:
+ int firstParag, lastParag;
+ QByteArray before;
+ QByteArray after;
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+struct Q_EXPORT QTextParagraphSelection
+{
+ int start, end;
+};
+
+struct Q_EXPORT QTextLineStart
+{
+ QTextLineStart() : y( 0 ), baseLine( 0 ), h( 0 )
+#ifndef QT_NO_COMPLEXTEXT
+ , bidicontext( 0 )
+#endif
+ { }
+ QTextLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ),
+ w( 0 )
+#ifndef QT_NO_COMPLEXTEXT
+ , bidicontext( 0 )
+#endif
+ { }
+#ifndef QT_NO_COMPLEXTEXT
+ QTextLineStart( QBidiContext *c, QBidiStatus s ) : y(0), baseLine(0), h(0),
+ status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); }
+#endif
+
+ virtual ~QTextLineStart()
+ {
+#ifndef QT_NO_COMPLEXTEXT
+ if ( bidicontext && bidicontext->deref() )
+ delete bidicontext;
+#endif
+ }
+
+#ifndef QT_NO_COMPLEXTEXT
+ void setContext( QBidiContext *c ) {
+ if ( c == bidicontext )
+ return;
+ if ( bidicontext && bidicontext->deref() )
+ delete bidicontext;
+ bidicontext = c;
+ if ( bidicontext )
+ bidicontext->ref();
+ }
+ QBidiContext *context() const { return bidicontext; }
+#endif
+
+public:
+ ushort y, baseLine, h;
+#ifndef QT_NO_COMPLEXTEXT
+ QBidiStatus status;
+#endif
+ int w;
+
+private:
+#ifndef QT_NO_COMPLEXTEXT
+ QBidiContext *bidicontext;
+#endif
+};
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextParagraphSelection>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextLineStart*>;
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT QTextParagraphData
+{
+public:
+ QTextParagraphData() {}
+ virtual ~QTextParagraphData();
+ virtual void join( QTextParagraphData * );
+};
+
+class Q_EXPORT QTextParagraphPseudoDocument
+{
+public:
+ QTextParagraphPseudoDocument();
+ ~QTextParagraphPseudoDocument();
+ QRect docRect;
+ QTextFormatter *pFormatter;
+ QTextCommandHistory *commandHistory;
+ int minw;
+ int wused;
+};
+
+//nase
+class Q_EXPORT QTextParagraph
+{
+ friend class QTextDocument;
+ friend class QTextCursor;
+
+public:
+ QTextParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE );
+ virtual ~QTextParagraph();
+
+ QTextString *string() const;
+ QTextStringChar *at( int i ) const; // maybe remove later
+ int leftGap() const;
+ int length() const; // maybe remove later
+
+ void setListStyle( QStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = TRUE; }
+ QStyleSheetItem::ListStyle listStyle() const { return lstyle; }
+ void setListItem( bool li );
+ bool isListItem() const { return litem; }
+ void setListValue( int v ) { list_val = v; }
+ int listValue() const { return list_val > 0 ? list_val : -1; }
+
+ void setListDepth( int depth );
+ int listDepth() const { return ldepth; }
+
+// void setFormat( QTextFormat *fm );
+// QTextFormat *paragFormat() const;
+
+ QTextDocument *document() const;
+ QTextParagraphPseudoDocument *pseudoDocument() const;
+
+ QRect rect() const;
+ void setHeight( int h ) { r.setHeight( h ); }
+ void show();
+ void hide();
+ bool isVisible() const { return visible; }
+
+ QTextParagraph *prev() const;
+ QTextParagraph *next() const;
+ void setPrev( QTextParagraph *s );
+ void setNext( QTextParagraph *s );
+
+ void insert( int index, const QString &s );
+ void insert( int index, const QChar *unicode, int len );
+ void append( const QString &s, bool reallyAtEnd = FALSE );
+ void truncate( int index );
+ void remove( int index, int len );
+ void join( QTextParagraph *s );
+
+ void invalidate( int chr );
+
+ void move( int &dy );
+ void format( int start = -1, bool doMove = TRUE );
+
+ bool isValid() const;
+ bool hasChanged() const;
+ void setChanged( bool b, bool recursive = FALSE );
+
+ int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const;
+ QTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const;
+ int lines() const;
+ QTextStringChar *lineStartOfLine( int line, int *index = 0 ) const;
+ int lineY( int l ) const;
+ int lineBaseLine( int l ) const;
+ int lineHeight( int l ) const;
+ void lineInfo( int l, int &y, int &h, int &bl ) const;
+
+ void setSelection( int id, int start, int end );
+ void removeSelection( int id );
+ int selectionStart( int id ) const;
+ int selectionEnd( int id ) const;
+ bool hasSelection( int id ) const;
+ bool hasAnySelection() const;
+ bool fullSelected( int id ) const;
+
+ void setEndState( int s );
+ int endState() const;
+
+ void setParagId( int i );
+ int paragId() const;
+
+ bool firstPreProcess() const;
+ void setFirstPreProcess( bool b );
+
+ void indent( int *oldIndent = 0, int *newIndent = 0 );
+
+ void setExtraData( QTextParagraphData *data );
+ QTextParagraphData *extraData() const;
+
+ QMap<int, QTextLineStart*> &lineStartList();
+
+ void setFormat( int index, int len, QTextFormat *f, bool useCollection = TRUE, int flags = -1 );
+
+ void setAlignment( int a );
+ int alignment() const;
+
+ virtual void paint( QPainter &painter, const QColorGroup &cg, QTextCursor *cursor = 0, bool drawSelections = FALSE,
+ int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 );
+
+ virtual int topMargin() const;
+ virtual int bottomMargin() const;
+ virtual int leftMargin() const;
+ virtual int firstLineMargin() const;
+ virtual int rightMargin() const;
+ virtual int lineSpacing() const;
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ void registerFloatingItem( QTextCustomItem *i );
+ void unregisterFloatingItem( QTextCustomItem *i );
+#endif
+
+ void setFullWidth( bool b ) { fullWidth = b; }
+ bool isFullWidth() const { return fullWidth; }
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QTextTableCell *tableCell() const;
+#endif
+
+ QBrush *background() const;
+
+ int documentWidth() const;
+ int documentVisibleWidth() const;
+ int documentX() const;
+ int documentY() const;
+ QTextFormatCollection *formatCollection() const;
+ QTextFormatter *formatter() const;
+
+ virtual int nextTab( int i, int x );
+ int *tabArray() const;
+ void setTabArray( int *a );
+ void setTabStops( int tw );
+
+ void adjustToPainter( QPainter *p );
+
+ void setNewLinesAllowed( bool b );
+ bool isNewLinesAllowed() const;
+
+ QString richText() const;
+
+ void addCommand( QTextCommand *cmd );
+ QTextCursor *undo( QTextCursor *c = 0 );
+ QTextCursor *redo( QTextCursor *c = 0 );
+ QTextCommandHistory *commands() const;
+ virtual void copyParagData( QTextParagraph *parag );
+
+ void setBreakable( bool b ) { breakable = b; }
+ bool isBreakable() const { return breakable; }
+
+ void setBackgroundColor( const QColor &c );
+ QColor *backgroundColor() const { return bgcol; }
+ void clearBackgroundColor();
+
+ void setMovedDown( bool b ) { movedDown = b; }
+ bool wasMovedDown() const { return movedDown; }
+
+ void setDirection( QChar::Direction d );
+ QChar::Direction direction() const;
+ void setPaintDevice( QPaintDevice *pd ) { paintdevice = pd; }
+
+ void readStyleInformation( QDataStream& stream );
+ void writeStyleInformation( QDataStream& stream ) const;
+
+protected:
+ virtual void setColorForSelection( QColor &c, QPainter &p, const QColorGroup& cg, int selection );
+ virtual void drawLabel( QPainter* p, int x, int y, int w, int h, int base, const QColorGroup& cg );
+ virtual void drawString( QPainter &painter, const QString &str, int start, int len, int xstart,
+ int y, int baseLine, int w, int h, int selection,
+ QTextStringChar *formatChar, const QColorGroup& cg,
+ bool rightToLeft );
+
+private:
+ QMap<int, QTextParagraphSelection> &selections() const;
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QPtrList<QTextCustomItem> &floatingItems() const;
+#endif
+ QBrush backgroundBrush( const QColorGroup&cg ) { if ( bgcol ) return *bgcol; return cg.brush( QColorGroup::Base ); }
+ void invalidateStyleCache();
+
+ QMap<int, QTextLineStart*> lineStarts;
+ int invalid;
+ QRect r;
+ QTextParagraph *p, *n;
+ void *docOrPseudo;
+ uint changed : 1;
+ uint firstFormat : 1;
+ uint firstPProcess : 1;
+ uint needPreProcess : 1;
+ uint fullWidth : 1;
+ uint lastInFrame : 1;
+ uint visible : 1;
+ uint breakable : 1;
+ uint movedDown : 1;
+ uint mightHaveCustomItems : 1;
+ uint hasdoc : 1;
+ uint litem : 1; // whether the paragraph is a list item
+ uint rtext : 1; // whether the paragraph needs rich text margin
+ int align : 4;
+ int state, id;
+ QTextString *str;
+ QMap<int, QTextParagraphSelection> *mSelections;
+#ifndef QT_NO_TEXTCUSTOMITEM
+ QPtrList<QTextCustomItem> *mFloatingItems;
+#endif
+ QStyleSheetItem::ListStyle lstyle;
+ short utm, ubm, ulm, urm, uflm, ulinespacing;
+ int *tArray;
+ short tabStopWidth;
+ QTextParagraphData *eData;
+ short list_val;
+ QColor *bgcol;
+ ushort ldepth;
+ QPaintDevice *paintdevice;
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextFormatter
+{
+public:
+ QTextFormatter();
+ virtual ~QTextFormatter();
+
+ virtual int format( QTextDocument *doc, QTextParagraph *parag, int start, const QMap<int, QTextLineStart*> &oldLineStarts ) = 0;
+ virtual int formatVertically( QTextDocument* doc, QTextParagraph* parag );
+
+ bool isWrapEnabled( QTextParagraph *p ) const { if ( !wrapEnabled ) return FALSE; if ( p && !p->isBreakable() ) return FALSE; return TRUE;}
+ int wrapAtColumn() const { return wrapColumn;}
+ virtual void setWrapEnabled( bool b );
+ virtual void setWrapAtColumn( int c );
+ virtual void setAllowBreakInWords( bool b ) { biw = b; }
+ bool allowBreakInWords() const { return biw; }
+
+ int minimumWidth() const { return thisminw; }
+ int widthUsed() const { return thiswused; }
+
+ static bool isBreakable( QTextString *string, int pos );
+
+protected:
+ virtual QTextLineStart *formatLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start,
+ QTextStringChar *last, int align = Qt::AlignAuto, int space = 0 );
+#ifndef QT_NO_COMPLEXTEXT
+ virtual QTextLineStart *bidiReorderLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start,
+ QTextStringChar *last, int align, int space );
+#endif
+ void insertLineStart( QTextParagraph *parag, int index, QTextLineStart *ls );
+
+ int thisminw;
+ int thiswused;
+
+private:
+ bool wrapEnabled;
+ int wrapColumn;
+ bool biw;
+
+#ifdef HAVE_THAI_BREAKS
+ static QCString *thaiCache;
+ static QTextString *cachedString;
+ static ThBreakIterator *thaiIt;
+#endif
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextFormatterBreakInWords : public QTextFormatter
+{
+public:
+ QTextFormatterBreakInWords();
+ virtual ~QTextFormatterBreakInWords() {}
+
+ int format( QTextDocument *doc, QTextParagraph *parag, int start, const QMap<int, QTextLineStart*> &oldLineStarts );
+
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextFormatterBreakWords : public QTextFormatter
+{
+public:
+ QTextFormatterBreakWords();
+ virtual ~QTextFormatterBreakWords() {}
+
+ int format( QTextDocument *doc, QTextParagraph *parag, int start, const QMap<int, QTextLineStart*> &oldLineStarts );
+
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextIndent
+{
+public:
+ QTextIndent();
+ virtual ~QTextIndent() {}
+
+ virtual void indent( QTextDocument *doc, QTextParagraph *parag, int *oldIndent = 0, int *newIndent = 0 ) = 0;
+
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextPreProcessor
+{
+public:
+ enum Ids {
+ Standard = 0
+ };
+
+ QTextPreProcessor();
+ virtual ~QTextPreProcessor() {}
+
+ virtual void process( QTextDocument *doc, QTextParagraph *, int, bool = TRUE ) = 0;
+ virtual QTextFormat *format( int id ) = 0;
+
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class Q_EXPORT QTextFormat
+{
+ friend class QTextFormatCollection;
+ friend class QTextDocument;
+
+public:
+ enum Flags {
+ NoFlags,
+ Bold = 1,
+ Italic = 2,
+ Underline = 4,
+ Family = 8,
+ Size = 16,
+ Color = 32,
+ Misspelled = 64,
+ VAlign = 128,
+ StrikeOut= 256,
+ Font = Bold | Italic | Underline | Family | Size | StrikeOut,
+ Format = Font | Color | Misspelled | VAlign
+ };
+
+ enum VerticalAlignment { AlignNormal, AlignSuperScript, AlignSubScript };
+
+ QTextFormat();
+ virtual ~QTextFormat();
+
+ QTextFormat( const QStyleSheetItem *s );
+ QTextFormat( const QFont &f, const QColor &c, QTextFormatCollection *parent = 0 );
+ QTextFormat( const QTextFormat &fm );
+ QTextFormat makeTextFormat( const QStyleSheetItem *style, const QMap<QString,QString>& attr, double scaleFontsFactor ) const;
+ QTextFormat& operator=( const QTextFormat &fm );
+ QColor color() const;
+ QFont font() const;
+ bool isMisspelled() const;
+ VerticalAlignment vAlign() const;
+ int minLeftBearing() const;
+ int minRightBearing() const;
+ int width( const QChar &c ) const;
+ int width( const QString &str, int pos ) const;
+ int height() const;
+ int ascent() const;
+ int descent() const;
+ int leading() const;
+ bool useLinkColor() const;
+
+ void setBold( bool b );
+ void setItalic( bool b );
+ void setUnderline( bool b );
+ void setStrikeOut( bool b );
+ void setFamily( const QString &f );
+ void setPointSize( int s );
+ void setFont( const QFont &f );
+ void setColor( const QColor &c );
+ void setMisspelled( bool b );
+ void setVAlign( VerticalAlignment a );
+
+ bool operator==( const QTextFormat &f ) const;
+ QTextFormatCollection *parent() const;
+ const QString &key() const;
+
+ static QString getKey( const QFont &f, const QColor &c, bool misspelled, VerticalAlignment vAlign );
+
+ void addRef();
+ void removeRef();
+
+ QString makeFormatChangeTags( QTextFormat* defaultFormat, QTextFormat *f, const QString& oldAnchorHref, const QString& anchorHref ) const;
+ QString makeFormatEndTags( QTextFormat* defaultFormat, const QString& anchorHref ) const;
+
+ static void setPainter( QPainter *p );
+ static QPainter* painter();
+
+ bool fontSizesInPixels() { return usePixelSizes; }
+
+protected:
+ virtual void generateKey();
+
+private:
+ void update();
+ static void applyFont( const QFont &f );
+
+private:
+ QFont fn;
+ QColor col;
+ QFontMetrics fm;
+ uint missp : 1;
+ uint linkColor : 1;
+ uint usePixelSizes : 1;
+ int leftBearing, rightBearing;
+ VerticalAlignment ha;
+ uchar widths[ 256 ];
+ int hei, asc, dsc;
+ QTextFormatCollection *collection;
+ int ref;
+ QString k;
+ int logicalFontSize;
+ int stdSize;
+ static QPainter *pntr;
+ static QFontMetrics *pntr_fm;
+ static int pntr_asc;
+ static int pntr_hei;
+ static int pntr_ldg;
+ static int pntr_dsc;
+
+};
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QTextFormat>;
+// MOC_SKIP_END
+#endif
+
+class Q_EXPORT QTextFormatCollection
+{
+ friend class QTextDocument;
+ friend class QTextFormat;
+
+public:
+ QTextFormatCollection();
+ virtual ~QTextFormatCollection();
+
+ void setDefaultFormat( QTextFormat *f );
+ QTextFormat *defaultFormat() const;
+ virtual QTextFormat *format( QTextFormat *f );
+ virtual QTextFormat *format( QTextFormat *of, QTextFormat *nf, int flags );
+ virtual QTextFormat *format( const QFont &f, const QColor &c );
+ virtual void remove( QTextFormat *f );
+ virtual QTextFormat *createFormat( const QTextFormat &f ) { return new QTextFormat( f ); }
+ virtual QTextFormat *createFormat( const QFont &f, const QColor &c ) { return new QTextFormat( f, c, this ); }
+
+ void updateDefaultFormat( const QFont &font, const QColor &c, QStyleSheet *sheet );
+ QDict<QTextFormat> dict() const { return cKey; }
+
+ QPaintDevice *paintDevice() const { return paintdevice; }
+ void setPaintDevice( QPaintDevice * );
+
+private:
+ void updateKeys();
+
+private:
+ QTextFormat *defFormat, *lastFormat, *cachedFormat;
+ QDict<QTextFormat> cKey;
+ QTextFormat *cres;
+ QFont cfont;
+ QColor ccol;
+ QString kof, knf;
+ int cflags;
+
+ QPaintDevice *paintdevice;
+};
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+inline int QTextString::length() const
+{
+ return data.size();
+}
+
+inline int QTextParagraph::length() const
+{
+ return str->length();
+}
+
+inline QRect QTextParagraph::rect() const
+{
+ return r;
+}
+
+inline QTextParagraph *QTextCursor::paragraph() const
+{
+ return para;
+}
+
+inline int QTextCursor::index() const
+{
+ return idx;
+}
+
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+inline int QTextDocument::x() const
+{
+ return cx;
+}
+
+inline int QTextDocument::y() const
+{
+ return cy;
+}
+
+inline int QTextDocument::width() const
+{
+ return QMAX( cw, flow_->width() );
+}
+
+inline int QTextDocument::visibleWidth() const
+{
+ return vw;
+}
+
+inline QTextParagraph *QTextDocument::firstParagraph() const
+{
+ return fParag;
+}
+
+inline QTextParagraph *QTextDocument::lastParagraph() const
+{
+ return lParag;
+}
+
+inline void QTextDocument::setFirstParagraph( QTextParagraph *p )
+{
+ fParag = p;
+}
+
+inline void QTextDocument::setLastParagraph( QTextParagraph *p )
+{
+ lParag = p;
+}
+
+inline void QTextDocument::setWidth( int w )
+{
+ cw = QMAX( w, minw );
+ flow_->setWidth( cw );
+ vw = w;
+}
+
+inline int QTextDocument::minimumWidth() const
+{
+ return minw;
+}
+
+inline void QTextDocument::setY( int y )
+{
+ cy = y;
+}
+
+inline int QTextDocument::leftMargin() const
+{
+ return leftmargin;
+}
+
+inline void QTextDocument::setLeftMargin( int lm )
+{
+ leftmargin = lm;
+}
+
+inline int QTextDocument::rightMargin() const
+{
+ return rightmargin;
+}
+
+inline void QTextDocument::setRightMargin( int rm )
+{
+ rightmargin = rm;
+}
+
+inline QTextPreProcessor *QTextDocument::preProcessor() const
+{
+ return pProcessor;
+}
+
+inline void QTextDocument::setPreProcessor( QTextPreProcessor * sh )
+{
+ pProcessor = sh;
+}
+
+inline void QTextDocument::setFormatter( QTextFormatter *f )
+{
+ delete pFormatter;
+ pFormatter = f;
+}
+
+inline QTextFormatter *QTextDocument::formatter() const
+{
+ return pFormatter;
+}
+
+inline void QTextDocument::setIndent( QTextIndent *i )
+{
+ indenter = i;
+}
+
+inline QTextIndent *QTextDocument::indent() const
+{
+ return indenter;
+}
+
+inline QColor QTextDocument::selectionColor( int id ) const
+{
+ return selectionColors[ id ];
+}
+
+inline bool QTextDocument::invertSelectionText( int id ) const
+{
+ return selectionText[ id ];
+}
+
+inline void QTextDocument::setSelectionColor( int id, const QColor &c )
+{
+ selectionColors[ id ] = c;
+}
+
+inline void QTextDocument::setInvertSelectionText( int id, bool b )
+{
+ selectionText[ id ] = b;
+}
+
+inline QTextFormatCollection *QTextDocument::formatCollection() const
+{
+ return fCollection;
+}
+
+inline int QTextDocument::alignment() const
+{
+ return align;
+}
+
+inline void QTextDocument::setAlignment( int a )
+{
+ align = a;
+}
+
+inline int *QTextDocument::tabArray() const
+{
+ return tArray;
+}
+
+inline int QTextDocument::tabStopWidth() const
+{
+ return tStopWidth;
+}
+
+inline void QTextDocument::setTabArray( int *a )
+{
+ tArray = a;
+}
+
+inline void QTextDocument::setTabStops( int tw )
+{
+ tStopWidth = tw;
+}
+
+inline QString QTextDocument::originalText() const
+{
+ if ( oTextValid )
+ return oText;
+ return text();
+}
+
+inline void QTextDocument::setFlow( QTextFlow *f )
+{
+ if ( flow_ )
+ delete flow_;
+ flow_ = f;
+}
+
+inline void QTextDocument::takeFlow()
+{
+ flow_ = 0;
+}
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+inline QColor QTextFormat::color() const
+{
+ return col;
+}
+
+inline QFont QTextFormat::font() const
+{
+ return fn;
+}
+
+inline bool QTextFormat::isMisspelled() const
+{
+ return missp;
+}
+
+inline QTextFormat::VerticalAlignment QTextFormat::vAlign() const
+{
+ return ha;
+}
+
+inline bool QTextFormat::operator==( const QTextFormat &f ) const
+{
+ return k == f.k;
+}
+
+inline QTextFormatCollection *QTextFormat::parent() const
+{
+ return collection;
+}
+
+inline void QTextFormat::addRef()
+{
+ ref++;
+}
+
+inline void QTextFormat::removeRef()
+{
+ ref--;
+ if ( !collection )
+ return;
+ if ( this == collection->defFormat )
+ return;
+ if ( ref == 0 )
+ collection->remove( this );
+}
+
+inline const QString &QTextFormat::key() const
+{
+ return k;
+}
+
+inline bool QTextFormat::useLinkColor() const
+{
+ return linkColor;
+}
+
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+inline QTextStringChar &QTextString::at( int i ) const
+{
+ return data[ i ];
+}
+
+// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+inline QTextStringChar *QTextParagraph::at( int i ) const
+{
+ return &str->at( i );
+}
+
+inline bool QTextParagraph::isValid() const
+{
+ return invalid == -1;
+}
+
+inline bool QTextParagraph::hasChanged() const
+{
+ return changed;
+}
+
+inline void QTextParagraph::setBackgroundColor( const QColor & c )
+{
+ delete bgcol;
+ bgcol = new QColor( c );
+ setChanged( TRUE );
+}
+
+inline void QTextParagraph::clearBackgroundColor()
+{
+ delete bgcol; bgcol = 0; setChanged( TRUE );
+}
+
+inline void QTextParagraph::append( const QString &s, bool reallyAtEnd )
+{
+ if ( reallyAtEnd )
+ insert( str->length(), s );
+ else
+ insert( QMAX( str->length() - 1, 0 ), s );
+}
+
+inline QTextParagraph *QTextParagraph::prev() const
+{
+ return p;
+}
+
+inline QTextParagraph *QTextParagraph::next() const
+{
+ return n;
+}
+
+inline bool QTextParagraph::hasAnySelection() const
+{
+ return mSelections ? !selections().isEmpty() : FALSE;
+}
+
+inline void QTextParagraph::setEndState( int s )
+{
+ if ( s == state )
+ return;
+ state = s;
+}
+
+inline int QTextParagraph::endState() const
+{
+ return state;
+}
+
+inline void QTextParagraph::setParagId( int i )
+{
+ id = i;
+}
+
+inline int QTextParagraph::paragId() const
+{
+ if ( id == -1 )
+ qWarning( "invalid parag id!!!!!!!! (%p)", (void*)this );
+ return id;
+}
+
+inline bool QTextParagraph::firstPreProcess() const
+{
+ return firstPProcess;
+}
+
+inline void QTextParagraph::setFirstPreProcess( bool b )
+{
+ firstPProcess = b;
+}
+
+inline QMap<int, QTextLineStart*> &QTextParagraph::lineStartList()
+{
+ return lineStarts;
+}
+
+inline QTextString *QTextParagraph::string() const
+{
+ return str;
+}
+
+inline QTextDocument *QTextParagraph::document() const
+{
+ if ( hasdoc )
+ return (QTextDocument*) docOrPseudo;
+ return 0;
+}
+
+inline QTextParagraphPseudoDocument *QTextParagraph::pseudoDocument() const
+{
+ if ( hasdoc )
+ return 0;
+ return (QTextParagraphPseudoDocument*) docOrPseudo;
+}
+
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+inline QTextTableCell *QTextParagraph::tableCell() const
+{
+ return hasdoc ? document()->tableCell () : 0;
+}
+#endif
+
+inline QTextCommandHistory *QTextParagraph::commands() const
+{
+ return hasdoc ? document()->commands() : pseudoDocument()->commandHistory;
+}
+
+
+inline int QTextParagraph::alignment() const
+{
+ return align;
+}
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+inline void QTextParagraph::registerFloatingItem( QTextCustomItem *i )
+{
+ floatingItems().append( i );
+}
+
+inline void QTextParagraph::unregisterFloatingItem( QTextCustomItem *i )
+{
+ floatingItems().removeRef( i );
+}
+#endif
+
+inline QBrush *QTextParagraph::background() const
+{
+#ifndef QT_NO_TEXTCUSTOMITEM
+ return tableCell() ? tableCell()->backGround() : 0;
+#else
+ return 0;
+#endif
+}
+
+inline int QTextParagraph::documentWidth() const
+{
+ return hasdoc ? document()->width() : pseudoDocument()->docRect.width();
+}
+
+inline int QTextParagraph::documentVisibleWidth() const
+{
+ return hasdoc ? document()->visibleWidth() : pseudoDocument()->docRect.width();
+}
+
+inline int QTextParagraph::documentX() const
+{
+ return hasdoc ? document()->x() : pseudoDocument()->docRect.x();
+}
+
+inline int QTextParagraph::documentY() const
+{
+ return hasdoc ? document()->y() : pseudoDocument()->docRect.y();
+}
+
+inline void QTextParagraph::setExtraData( QTextParagraphData *data )
+{
+ eData = data;
+}
+
+inline QTextParagraphData *QTextParagraph::extraData() const
+{
+ return eData;
+}
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+inline void QTextFormatCollection::setDefaultFormat( QTextFormat *f )
+{
+ defFormat = f;
+}
+
+inline QTextFormat *QTextFormatCollection::defaultFormat() const
+{
+ return defFormat;
+}
+
+// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+inline QTextFormat *QTextStringChar::format() const
+{
+ return (type == Regular) ? d.format : d.custom->format;
+}
+
+
+#ifndef QT_NO_TEXTCUSTOMITEM
+inline QTextCustomItem *QTextStringChar::customItem() const
+{
+ return isCustom() ? d.custom->custom : 0;
+}
+#endif
+
+inline int QTextStringChar::height() const
+{
+#ifndef QT_NO_TEXTCUSTOMITEM
+ return !isCustom() ? format()->height() : ( customItem()->placement() == QTextCustomItem::PlaceInline ? customItem()->height : 0 );
+#else
+ return format()->height();
+#endif
+}
+
+inline int QTextStringChar::ascent() const
+{
+#ifndef QT_NO_TEXTCUSTOMITEM
+ return !isCustom() ? format()->ascent() : ( customItem()->placement() == QTextCustomItem::PlaceInline ? customItem()->ascent() : 0 );
+#else
+ return format()->ascent();
+#endif
+}
+
+inline int QTextStringChar::descent() const
+{
+#ifndef QT_NO_TEXTCUSTOMITEM
+ return !isCustom() ? format()->descent() : 0;
+#else
+ return format()->descent();
+#endif
+}
+
+#endif //QT_NO_RICHTEXT
+
+#endif
diff --git a/qmake/include/private/qsettings_p.h b/qmake/include/private/qsettings_p.h
new file mode 100644
index 0000000..18d118b
--- a/dev/null
+++ b/qmake/include/private/qsettings_p.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QSettings related classes
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses for Windows may use this file in accordance with the Qt Commercial
+** License Agreement provided with the Software.
+**
+** This file is not available for use under any other license without
+** express written permission from the copyright holder.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSETTINGS_P_H
+#define QSETTINGS_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of QSettings. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qstringlist.h"
+#include "qmap.h"
+#include "qvaluestack.h"
+#endif // QT_H
+
+class QSettingsSysPrivate;
+
+// QSettingsGroup is a map of key/value pairs
+class QSettingsGroup : public QMap<QString,QString>
+{
+public:
+ QSettingsGroup();
+
+ bool modified;
+};
+
+// QSettingsHeading is a map of heading/group pairs
+class QSettingsHeading : public QMap<QString,QSettingsGroup>
+{
+public:
+ QSettingsHeading::Iterator git;
+ void read(const QString &);
+ void parseLine(QTextStream &);
+};
+
+
+class QSettingsPrivate
+{
+public:
+ QSettingsPrivate( QSettings::Format format );
+ ~QSettingsPrivate();
+
+ QSettingsGroup readGroup();
+ void removeGroup(const QString &);
+ void writeGroup(const QString &, const QString &);
+ QDateTime modificationTime();
+
+ QStringList searchPaths;
+ QMap<QString,QSettingsHeading> headings;
+ QString group;
+ QString heading;
+
+ /*### static data brings threading trouble
+ static QString *defProduct;
+ static QString *defDomain;
+ */
+ QValueStack<QString> groupStack;
+ QString groupPrefix;
+
+ bool groupDirty :1;
+ bool modified :1;
+ bool globalScope :1;
+
+#if defined(Q_WS_WIN) || defined(Q_OS_MAC)
+ // system dependent implementations to use the
+ // system specific setting database (ie. registry on Windows)
+
+ QSettingsSysPrivate *sysd;
+ void sysInit();
+ void sysClear();
+
+#if !defined(Q_NO_BOOL_TYPE)
+ bool sysWriteEntry( const QString &, bool );
+#endif
+ bool sysWriteEntry( const QString &, double );
+ bool sysWriteEntry( const QString &, int );
+ bool sysWriteEntry( const QString &, const QString & );
+ bool sysWriteEntry( const QString &, const QStringList & );
+ bool sysWriteEntry( const QString &, const QStringList &, const QChar& sep );
+
+ QStringList sysEntryList(const QString &) const;
+ QStringList sysSubkeyList(const QString &) const;
+
+ QStringList sysReadListEntry( const QString &, bool * = 0 ) const;
+ QStringList sysReadListEntry( const QString &, const QChar& sep, bool * = 0 ) const;
+ QString sysReadEntry( const QString &, const QString &def = QString::null, bool * = 0 ) const;
+ int sysReadNumEntry( const QString &, int def = 0, bool * = 0 ) const;
+ double sysReadDoubleEntry( const QString &, double def = 0, bool * = 0 ) const;
+ bool sysReadBoolEntry( const QString &, bool def = 0, bool * = 0 ) const;
+
+ bool sysRemoveEntry( const QString & );
+
+ bool sysSync();
+
+ void sysInsertSearchPath( QSettings::System, const QString & );
+ void sysRemoveSearchPath( QSettings::System, const QString & );
+#endif
+};
+
+#endif // QSETTINGS_P_H
diff --git a/qmake/include/private/qsharedmemory_p.h b/qmake/include/private/qsharedmemory_p.h
new file mode 100644
index 0000000..4a8339d
--- a/dev/null
+++ b/qmake/include/private/qsharedmemory_p.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+** $Id$
+**
+** Includes system files for shared memory
+**
+** Created : 020124
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses for Qt/Embedded may use this file in accordance with the
+** Qt Embedded Commercial License Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qapplication_qws.cpp and qgfxvnc_qws.cpp. This header file may
+// change from version to version without notice, or even be removed.
+//
+//
+
+#if !defined(QT_QSHM_H)
+#define QT_QSHM_H
+
+#include <qstring.h>
+
+#if !defined (QT_QWS_NO_SHM)
+
+#include <sys/types.h>
+#include <sys/ipc.h>
+
+class QSharedMemory {
+public:
+ QSharedMemory(){};
+ QSharedMemory(int, QString, char c = 'Q');
+ ~QSharedMemory(){};
+
+ bool create();
+ void destroy();
+
+ bool attach();
+ void detach();
+
+ void setPermissions(mode_t mode);
+ int size();
+ void * base() { return shmBase; };
+
+private:
+ void *shmBase;
+ int shmSize;
+ QString shmFile;
+ char character;
+#if defined(QT_POSIX_QSHM)
+ int shmFD;
+#else
+ int shmId;
+ key_t key;
+ int idInitted;
+#endif
+};
+
+#endif
+#endif
diff --git a/qmake/include/private/qsqldriverinterface_p.h b/qmake/include/private/qsqldriverinterface_p.h
new file mode 100644
index 0000000..8957b86
--- a/dev/null
+++ b/qmake/include/private/qsqldriverinterface_p.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Definition of QSqlDriverInterface class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLDRIVERINTERFACE_H
+#define QSQLDRIVERINTERFACE_H
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+#ifndef QT_NO_COMPONENT
+
+// {EDDD5AD5-DF3C-400c-A711-163B72FE5F61}
+#ifndef IID_QSqlDriverFactory
+#define IID_QSqlDriverFactory QUuid(0xeddd5ad5, 0xdf3c, 0x400c, 0xa7, 0x11, 0x16, 0x3b, 0x72, 0xfe, 0x5f, 0x61)
+#endif
+
+class QSqlDriver;
+
+struct QM_EXPORT_SQL QSqlDriverFactoryInterface : public QFeatureListInterface
+{
+ virtual QSqlDriver* create( const QString& name ) = 0;
+};
+
+#endif //QT_NO_COMPONENT
+#endif // QT_NO_SQL
+
+#endif // QSQLDRIVERINTERFACE_H
diff --git a/qmake/include/private/qsqlextension_p.h b/qmake/include/private/qsqlextension_p.h
new file mode 100644
index 0000000..597b266
--- a/dev/null
+++ b/qmake/include/private/qsqlextension_p.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Definition of the QSqlExtension class
+**
+** Created : 2002-06-03
+**
+** Copyright (C) 2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLEXTENSION_P_H
+#define QSQLEXTENSION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qmap.h"
+#include "qstring.h"
+#include "qvariant.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#if defined(Q_TEMPLATEDLL)
+Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<QString,QVariant>;
+Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<int,QString>;
+#endif
+
+class QM_EXPORT_SQL QSqlExtension {
+public:
+ QSqlExtension();
+ virtual ~QSqlExtension();
+ virtual bool prepare( const QString& query );
+ virtual bool exec();
+ virtual void bindValue( const QString& holder, const QVariant& value );
+ virtual void bindValue( int pos, const QVariant& value );
+ virtual void addBindValue( const QVariant& value );
+ void clearValues();
+ void clearIndex();
+
+ enum BindMethod { BindByPosition, BindByName };
+ BindMethod bindMethod();
+ BindMethod bindm;
+ int bindCount;
+
+ QMap<int, QString> index;
+ QMap<QString, QVariant> values;
+};
+
+class QM_EXPORT_SQL QSqlDriverExtension
+{
+public:
+ QSqlDriverExtension();
+ virtual ~QSqlDriverExtension();
+ virtual bool isOpen() const = 0;
+};
+
+#endif
+#endif
diff --git a/qmake/include/private/qsqlmanager_p.h b/qmake/include/private/qsqlmanager_p.h
new file mode 100644
index 0000000..e5f45b8
--- a/dev/null
+++ b/qmake/include/private/qsqlmanager_p.h
@@ -0,0 +1,159 @@
+/****************************************************************************
+**
+** Definition of QSqlManager class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLMANAGER_P_H
+#define QSQLMANAGER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qsql.h"
+#include "qsqlerror.h"
+#include "qsqlindex.h"
+#include "qsqlcursor.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlCursor;
+class QSqlForm;
+class QSqlCursorManagerPrivate;
+
+class QM_EXPORT_SQL QSqlCursorManager
+{
+public:
+ QSqlCursorManager();
+ virtual ~QSqlCursorManager();
+
+ virtual void setSort( const QSqlIndex& sort );
+ virtual void setSort( const QStringList& sort );
+ QStringList sort() const;
+ virtual void setFilter( const QString& filter );
+ QString filter() const;
+ virtual void setCursor( QSqlCursor* cursor, bool autoDelete = FALSE );
+ QSqlCursor* cursor() const;
+
+ virtual void setAutoDelete( bool enable );
+ bool autoDelete() const;
+
+ virtual bool refresh();
+ virtual bool findBuffer( const QSqlIndex& idx, int atHint = 0 );
+
+private:
+ QSqlCursorManagerPrivate* d;
+};
+
+#ifndef QT_NO_SQL_FORM
+
+class QSqlFormManagerPrivate;
+
+class QM_EXPORT_SQL QSqlFormManager
+{
+public:
+ QSqlFormManager();
+ virtual ~QSqlFormManager();
+
+ virtual void setForm( QSqlForm* form );
+ QSqlForm* form();
+ virtual void setRecord( QSqlRecord* record );
+ QSqlRecord* record();
+
+ virtual void clearValues();
+ virtual void readFields();
+ virtual void writeFields();
+
+private:
+ QSqlFormManagerPrivate* d;
+};
+
+#endif
+
+class QWidget;
+class QDataManagerPrivate;
+
+class QM_EXPORT_SQL QDataManager
+{
+public:
+ QDataManager();
+ virtual ~QDataManager();
+
+ virtual void setMode( QSql::Op m );
+ QSql::Op mode() const;
+ virtual void setAutoEdit( bool autoEdit );
+ bool autoEdit() const;
+
+ virtual void handleError( QWidget* parent, const QSqlError& error );
+ virtual QSql::Confirm confirmEdit( QWidget* parent, QSql::Op m );
+ virtual QSql::Confirm confirmCancel( QWidget* parent, QSql::Op m );
+
+ virtual void setConfirmEdits( bool confirm );
+ virtual void setConfirmInsert( bool confirm );
+ virtual void setConfirmUpdate( bool confirm );
+ virtual void setConfirmDelete( bool confirm );
+ virtual void setConfirmCancels( bool confirm );
+
+ bool confirmEdits() const;
+ bool confirmInsert() const;
+ bool confirmUpdate() const;
+ bool confirmDelete() const;
+ bool confirmCancels() const;
+
+private:
+ QDataManagerPrivate* d;
+};
+
+
+#endif
+#endif
diff --git a/qmake/include/private/qstyleinterface_p.h b/qmake/include/private/qstyleinterface_p.h
new file mode 100644
index 0000000..4aaedc7
--- a/dev/null
+++ b/qmake/include/private/qstyleinterface_p.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+** $Id$
+**
+** ...
+**
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the widgets module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSTYLEINTERFACE_H
+#define QSTYLEINTERFACE_H
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#endif // QT_H
+
+#ifndef QT_NO_STYLE
+#ifndef QT_NO_COMPONENT
+
+class QStyle;
+
+// {FC1B6EBE-053C-49c1-A483-C377739AB9A5}
+#ifndef IID_QStyleFactory
+#define IID_QStyleFactory QUuid(0xfc1b6ebe, 0x53c, 0x49c1, 0xa4, 0x83, 0xc3, 0x77, 0x73, 0x9a, 0xb9, 0xa5)
+#endif
+
+struct Q_EXPORT QStyleFactoryInterface : public QFeatureListInterface
+{
+ virtual QStyle* create( const QString& style ) = 0;
+};
+
+#endif //QT_NO_COMPONENT
+#endif //QT_NO_STYLE
+
+#endif //QSTYLEINTERFACE_H
diff --git a/qmake/include/private/qsvgdevice_p.h b/qmake/include/private/qsvgdevice_p.h
new file mode 100644
index 0000000..c1cc389
--- a/dev/null
+++ b/qmake/include/private/qsvgdevice_p.h
@@ -0,0 +1,134 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of the QSvgDevice class
+**
+** Created : 20001024
+**
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the xml module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+*****************************************************************************/
+
+#ifndef QSVGDEVICE_H
+#define QSVGDEVICE_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of the QPicture class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include "qpaintdevice.h"
+#include "qrect.h"
+#include "qdom.h"
+#endif // QT_H
+
+#if !defined(QT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML )
+#define QM_EXPORT_SVG
+#else
+#define QM_EXPORT_SVG Q_EXPORT
+#endif
+
+#ifndef QT_NO_SVG
+
+class QPainter;
+class QDomNode;
+class QDomNamedNodeMap;
+struct QSvgDeviceState;
+class QSvgDevicePrivate;
+
+class QM_EXPORT_SVG QSvgDevice : public QPaintDevice
+{
+public:
+ QSvgDevice();
+ ~QSvgDevice();
+
+ bool play( QPainter *p );
+
+ QString toString() const;
+
+ bool load( QIODevice *dev );
+ bool save( QIODevice *dev );
+ bool save( const QString &fileName );
+
+ QRect boundingRect() const;
+ void setBoundingRect( const QRect &r );
+
+protected:
+ virtual bool cmd ( int, QPainter*, QPDevCmdParam* );
+ virtual int metric( int ) const;
+
+private:
+ // reading
+ bool play( const QDomNode &node );
+ void saveAttributes();
+ void restoreAttributes();
+ QColor parseColor( const QString &col );
+ double parseLen( const QString &str, bool *ok=0, bool horiz=TRUE ) const;
+ int lenToInt( const QDomNamedNodeMap &map, const QString &attr,
+ int def=0 ) const;
+ void setStyleProperty( const QString &prop, const QString &val,
+ QPen *pen, QFont *font, int *talign );
+ void setStyle( const QString &s );
+ void setTransform( const QString &tr );
+ void drawPath( const QString &data );
+
+ // writing
+ void applyStyle( QDomElement *e, int c ) const;
+ void applyTransform( QDomElement *e ) const;
+
+ // reading
+ QRect brect; // bounding rectangle
+ QDomDocument doc; // document tree
+ QDomNode current;
+ QPoint curPt;
+ QSvgDeviceState *curr;
+ QPainter *pt; // used by play() et al
+
+ // writing
+ bool dirtyTransform, dirtyStyle;
+
+ QSvgDevicePrivate *d;
+};
+
+inline QRect QSvgDevice::boundingRect() const
+{
+ return brect;
+}
+
+#endif // QT_NO_SVG
+
+#endif // QSVGDEVICE_H
diff --git a/qmake/include/private/qtextcodecinterface_p.h b/qmake/include/private/qtextcodecinterface_p.h
new file mode 100644
index 0000000..d2a2cb9
--- a/dev/null
+++ b/qmake/include/private/qtextcodecinterface_p.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QTextCodecFactoryInterface interface
+**
+** Copyright (C) 2001-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTEXTCODECINTERFACE_P_H
+#define QTEXTCODECINTERFACE_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qpsprinter.cpp and qprinter_x11.cpp.
+// This header file may change from version to version without notice,
+// or even be removed.
+//
+// We mean it.
+//
+//
+
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#endif // QT_H
+
+#ifndef QT_NO_TEXTCODEC
+#ifndef QT_NO_COMPONENT
+
+class QTextCodec;
+
+
+// {F55BFA60-F695-11D4-823E-009027DC0F37}
+#ifndef IID_QTextCodecFactory
+#define IID_QTextCodecFactory QUuid( 0xf55bfa60, 0xf695, 0x11d4, 0x82, 0x3e, 0x00, 0x90, 0x27, 0xdc, 0x0f, 0x37)
+#endif
+
+
+struct Q_EXPORT QTextCodecFactoryInterface : public QFeatureListInterface
+{
+ virtual QTextCodec *createForMib( int mib ) = 0;
+ virtual QTextCodec *createForName( const QString &name ) = 0;
+};
+
+#endif // QT_NO_COMPONENT
+#endif // QT_NO_TEXTCODEC
+
+#endif // QTEXTCODECINTERFACE_P_H
diff --git a/qmake/include/private/qtitlebar_p.h b/qmake/include/private/qtitlebar_p.h
new file mode 100644
index 0000000..dabb6bf
--- a/dev/null
+++ b/qmake/include/private/qtitlebar_p.h
@@ -0,0 +1,136 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of some Qt private functions.
+**
+** Created : 2000-01-01
+**
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the widgets module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTITLEBAR_P_H
+#define QTITLEBAR_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qworkspace.cpp and qdockwindow.cpp. This header file may change
+// from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+
+#ifndef QT_H
+#include "qbutton.h"
+#include "qlabel.h"
+#endif // QT_H
+
+#if !defined(QT_NO_TITLEBAR)
+
+class QToolTip;
+class QTitleBarPrivate;
+class QPixmap;
+
+class Q_EXPORT QTitleBar : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY( bool autoRaise READ autoRaise WRITE setAutoRaise )
+ Q_PROPERTY( bool movable READ isMovable WRITE setMovable )
+
+public:
+ QTitleBar (QWidget* w, QWidget* parent, const char* name=0);
+ ~QTitleBar();
+
+ bool isActive() const;
+ bool usesActiveColor() const;
+ virtual QString visibleText() const;
+
+ bool isMovable() const;
+ void setMovable(bool);
+
+ bool autoRaise() const;
+ void setAutoRaise(bool);
+
+ QWidget *window() const;
+
+ QSize sizeHint() const;
+
+#ifdef QT_NO_WIDGET_TOPEXTRA
+ // We provide one, since titlebar is useless otherwise.
+ QString caption() const;
+#endif
+
+public slots:
+ void setActive( bool );
+ void setCaption( const QString& title );
+ void setIcon( const QPixmap& icon );
+
+signals:
+ void doActivate();
+ void doNormal();
+ void doClose();
+ void doMaximize();
+ void doMinimize();
+ void doShade();
+ void showOperationMenu();
+ void popupOperationMenu( const QPoint& );
+ void doubleClicked();
+
+protected:
+ bool event( QEvent *);
+ void resizeEvent( QResizeEvent *);
+ void contextMenuEvent( QContextMenuEvent * );
+ void mousePressEvent( QMouseEvent * );
+ void mouseDoubleClickEvent( QMouseEvent * );
+ void mouseReleaseEvent( QMouseEvent * );
+ void mouseMoveEvent( QMouseEvent * );
+ void enterEvent( QEvent *e );
+ void leaveEvent( QEvent *e );
+ void paintEvent( QPaintEvent *p );
+
+ virtual void cutText();
+
+private:
+ void readColors();
+
+ QTitleBarPrivate *d;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+ QTitleBar( const QTitleBar & );
+ QTitleBar &operator=( const QTitleBar & );
+#endif
+};
+
+#endif
+#endif //QTITLEBAR_P_H
diff --git a/qmake/include/private/qucom_p.h b/qmake/include/private/qucom_p.h
new file mode 100644
index 0000000..d2ff48e
--- a/dev/null
+++ b/qmake/include/private/qucom_p.h
@@ -0,0 +1,499 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of the QUcom interfaces
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QUCOM_H
+#define QUCOM_H
+
+#ifndef QT_H
+#include <qstring.h>
+#include "quuid.h"
+#endif // QT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifdef check
+#undef check
+#endif
+
+struct QUObject;
+struct QUInterfaceDescription;
+struct QUnknownInterface;
+struct QDispatchInterface;
+
+
+struct Q_EXPORT QUBuffer
+{
+ virtual long read( char *data, ulong maxlen ) = 0;
+ virtual long write( const char *data, ulong len ) = 0;
+};
+
+
+// A type for a QUObject
+struct Q_EXPORT QUType
+{
+ virtual const QUuid *uuid() const = 0;
+ virtual const char *desc() const = 0;
+
+
+ virtual bool canConvertFrom( QUObject *, QUType * ) = 0;
+ // virtual private, only called by canConvertFrom
+ virtual bool canConvertTo( QUObject *, QUType * ) = 0;
+
+
+ virtual bool convertFrom( QUObject *, QUType * ) = 0;
+ // virtual private, only called by convertFrom
+ virtual bool convertTo( QUObject *, QUType * ) = 0;
+
+ virtual void clear( QUObject * ) = 0;
+
+ virtual int serializeTo( QUObject *, QUBuffer * ) = 0;
+ virtual int serializeFrom( QUObject *, QUBuffer * ) = 0;
+
+ static bool isEqual( const QUType *t1, const QUType *t2 );
+ static bool check( QUObject* o, QUType* t );
+};
+
+
+// {DE56510E-4E9F-4b76-A3C2-D1E2EF42F1AC}
+extern Q_EXPORT const QUuid TID_QUType_Null;
+struct Q_EXPORT QUType_Null : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * );
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_Null static_QUType_Null;
+
+
+// The magic QUObject
+struct Q_EXPORT QUObject
+{
+public: // scary MSVC bug makes this necessary
+ QUObject() : type( &static_QUType_Null ) {}
+ ~QUObject() { type->clear( this ); }
+
+ QUType *type;
+
+ // the unavoidable union
+ union
+ {
+ bool b;
+
+ char c;
+ short s;
+ int i;
+ long l;
+
+ unsigned char uc;
+ unsigned short us;
+ unsigned int ui;
+ unsigned long ul;
+
+ float f;
+ double d;
+
+ char byte[16];
+
+ struct {
+ char* data;
+ unsigned long size;
+ } bytearray;
+
+ void* ptr;
+
+ struct {
+ void *ptr;
+ bool owner;
+ } voidstar;
+
+ struct {
+ char *ptr;
+ bool owner;
+ } charstar;
+
+ struct {
+ char *ptr;
+ bool owner;
+ } utf8;
+
+ struct {
+ char *ptr;
+ bool owner;
+ } local8bit;
+
+ QUnknownInterface* iface;
+ QDispatchInterface* idisp;
+
+ } payload;
+
+};
+
+
+// A parameter description describes one method parameters. A
+// parameter has a name, a type and a flag describing whether it's an
+// in parameter, an out parameter, or both ways
+struct Q_EXPORT QUParameter
+{
+ const char* name;
+ QUType *type;
+ const void* typeExtra; //Usually 0, UEnum* for QUType_enum, const char* for QUType_ptr, int* for QUType_varptr
+ enum { In = 1, Out = 2, InOut = In | Out };
+ int inOut;
+};
+
+// A method description describes one method. A method has a name and
+// an array of parameters.
+struct Q_EXPORT QUMethod
+{
+ const char* name;
+ int count;
+ const QUParameter* parameters;
+};
+
+// A Property description. Not used yet in the example.
+struct Q_EXPORT QUProperty
+{
+ const char* name;
+ QUType* type;
+ const void* typeExtra; //type dependend. Usually 0, but UEnum for QUTypeenum or const char* for QUTypeptr
+
+ int set; // -1 undefined
+ int get; // -1 undefined
+
+ int designable; // -1 FALSE, -2 TRUE, else method
+ int stored; // -1 FALSE, -2 TRUE, else method
+};
+
+// An interface description describes one interface, that is all its
+// methods and properties.
+struct Q_EXPORT QUInterfaceDescription
+{
+ int methodCount;
+ const QUMethod* methods;
+ int propertyCount;
+ const QUProperty* properties;
+};
+
+
+// A component description describe one component, that is its name,
+// vendor, release, info, its component uuid and all its interface
+// uuids.
+struct Q_EXPORT QUComponentDescription
+{
+ const char* name;
+ const char* vendor;
+ const char* release;
+ const char* info;
+ QUuid cid;
+ int count;
+ const QUuid* interfaces;
+};
+
+
+// A component server description describe one component server, that
+// is its name, vendor, release, info and the descriptions of all
+// components it can instantiate.
+struct Q_EXPORT QUComponentServerDescription
+{
+ const char* name;
+ const char* vendor;
+ const char* release;
+ const char* info;
+ int count;
+ const QUComponentDescription* components;
+};
+
+
+
+struct Q_EXPORT QUEnumItem // - a name/value pair
+{
+ const char *key;
+ int value;
+};
+
+struct Q_EXPORT QUEnum
+{
+ const char *name; // - enumerator name
+ unsigned int count; // - number of values
+ const QUEnumItem *items; // - the name/value pairs
+ bool set; // whether enum has to be treated as a set
+};
+
+inline bool QUType::isEqual( const QUType *t1, const QUType *t2 ) {
+ return t1 == t2 || t1->uuid() == t2->uuid() ||
+ *(t1->uuid()) == *(t2->uuid());
+}
+
+inline bool QUType::check( QUObject* o, QUType* t ) {
+ return isEqual( o->type, t ) || t->convertFrom( o, o->type );
+}
+
+
+
+// {7EE17B08-5419-47e2-9776-8EEA112DCAEC}
+extern Q_EXPORT const QUuid TID_QUType_enum;
+struct Q_EXPORT QUType_enum : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, int );
+ int &get( QUObject * o ) { return o->payload.i; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_enum static_QUType_enum;
+
+
+// {8AC26448-5AB4-49eb-968C-8F30AB13D732}
+extern Q_EXPORT const QUuid TID_QUType_ptr;
+struct Q_EXPORT QUType_ptr : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, const void* );
+ void* &get( QUObject * o ) { return o->payload.ptr; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_ptr static_QUType_ptr;
+
+// {97A2594D-6496-4402-A11E-55AEF2D4D25C}
+extern Q_EXPORT const QUuid TID_QUType_iface;
+struct Q_EXPORT QUType_iface : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, QUnknownInterface* );
+ QUnknownInterface* &get( QUObject *o ){ return o->payload.iface; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_iface static_QUType_iface;
+
+// {2F358164-E28F-4bf4-9FA9-4E0CDCABA50B}
+extern Q_EXPORT const QUuid TID_QUType_idisp;
+struct Q_EXPORT QUType_idisp : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, QDispatchInterface* );
+ QDispatchInterface* &get( QUObject *o ){ return o->payload.idisp; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_idisp static_QUType_idisp;
+
+// {CA42115D-13D0-456c-82B5-FC10187F313E}
+extern Q_EXPORT const QUuid TID_QUType_bool;
+struct Q_EXPORT QUType_bool : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, bool );
+ bool &get( QUObject *o ) { return o->payload.b; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_bool static_QUType_bool;
+
+// {53C1F3BE-73C3-4c7d-9E05-CCF09EB676B5}
+extern Q_EXPORT const QUuid TID_QUType_int;
+struct Q_EXPORT QUType_int : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, int );
+ int &get( QUObject *o ) { return o->payload.i; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_int static_QUType_int;
+
+// {5938712A-C496-11D5-8CB2-00C0F03BC0F3}
+extern Q_EXPORT const QUuid TID_QUType_uint;
+struct Q_EXPORT QUType_uint : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, uint );
+ uint &get( QUObject *o ) { return o->payload.ui; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_uint static_QUType_uint;
+
+// {2D0974E5-0BA6-4ec2-8837-C198972CB48C}
+extern Q_EXPORT const QUuid TID_QUType_double;
+struct Q_EXPORT QUType_double : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, double );
+ double &get( QUObject *o ) { return o->payload.d; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_double static_QUType_double;
+
+// {544C5175-6993-4486-B04D-CEC4D21BF4B9 }
+extern Q_EXPORT const QUuid TID_QUType_float;
+struct Q_EXPORT QUType_float : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, float );
+ float &get( QUObject *o ) { return o->payload.f; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_float static_QUType_float;
+
+// {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9}
+extern Q_EXPORT const QUuid TID_QUType_charstar;
+struct Q_EXPORT QUType_charstar : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, const char*, bool take = FALSE );
+ char* get( QUObject *o ){ return o->payload.charstar.ptr; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * );
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+
+};
+extern Q_EXPORT QUType_charstar static_QUType_charstar;
+
+// {44C2A547-01E7-4e56-8559-35AF9D2F42B7}
+extern const QUuid TID_QUType_QString;
+
+struct Q_EXPORT QUType_QString : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, const QString & );
+ QString &get( QUObject * o ) { return *(QString*)o->payload.ptr; }
+
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * );
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+
+};
+extern Q_EXPORT QUType_QString static_QUType_QString;
+
+
+#endif // QUCOM_H
diff --git a/qmake/include/private/qucomextra_p.h b/qmake/include/private/qucomextra_p.h
new file mode 100644
index 0000000..3de6104
--- a/dev/null
+++ b/qmake/include/private/qucomextra_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of extra QUcom classes
+**
+** Created : 990101
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QUCOMEXTRA_H
+#define QUCOMEXTRA_H
+
+#ifndef QT_H
+#include <private/qucom_p.h>
+#endif // QT_H
+
+
+class QVariant;
+
+#ifndef QT_NO_VARIANT
+// 6dc75d58-a1d9-4417-b591-d45c63a3a4ea
+extern const QUuid TID_QUType_QVariant;
+
+struct Q_EXPORT QUType_QVariant : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, const QVariant & );
+ QVariant &get( QUObject * o );
+
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * );
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_QVariant static_QUType_QVariant;
+#endif //QT_NO_VARIANT
+
+
+// {0x8d48b3a8, 0xbd7f, 0x11d5, 0x8d, 0x74, 0x00, 0xc0, 0xf0, 0x3b, 0xc0, 0xf3 }
+extern Q_EXPORT const QUuid TID_QUType_varptr;
+struct Q_EXPORT QUType_varptr : public QUType
+{
+ const QUuid *uuid() const;
+ const char *desc() const;
+
+ void set( QUObject *, const void* );
+ void* &get( QUObject * o ) { return o->payload.ptr; }
+ bool canConvertFrom( QUObject *, QUType * );
+ bool canConvertTo( QUObject *, QUType * );
+ bool convertFrom( QUObject *, QUType * );
+ bool convertTo( QUObject *, QUType * );
+ void clear( QUObject * ) {}
+ int serializeTo( QUObject *, QUBuffer * );
+ int serializeFrom( QUObject *, QUBuffer * );
+};
+extern Q_EXPORT QUType_varptr static_QUType_varptr;
+
+
+#endif // QUCOMEXTRA_H
+
diff --git a/qmake/include/private/qwidget_p.h b/qmake/include/private/qwidget_p.h
new file mode 100644
index 0000000..80368d0
--- a/dev/null
+++ b/qmake/include/private/qwidget_p.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of some Qt private functions.
+**
+** Created : 000903
+**
+** Copyright (C) 2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QWIDGET_P_H
+#define QWIDGET_P_H
+
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
+// file may change from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#endif // QT_H
+
+#if defined (Q_WS_X11) || defined (Q_WS_QWS)
+extern int qt_widget_tlw_gravity;
+#endif
+
+#endif
diff --git a/qmake/include/private/qwidgetinterface_p.h b/qmake/include/private/qwidgetinterface_p.h
new file mode 100644
index 0000000..5b5776b
--- a/dev/null
+++ b/qmake/include/private/qwidgetinterface_p.h
@@ -0,0 +1,111 @@
+ /**********************************************************************
+** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of Qt Designer.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QWIDGETINTERFACE_H
+#define QWIDGETINTERFACE_H
+
+
+#ifndef QT_H
+#include <private/qcom_p.h>
+#include <qiconset.h>
+#endif // QT_H
+
+#ifndef QT_NO_WIDGETPLUGIN
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of a number of Qt sources files. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+//
+
+class QWidget;
+
+// {55184143-f18f-42c0-a8eb-71c01516019a}
+#ifndef IID_QWidgetFactory
+#define IID_QWidgetFactory QUuid( 0x55184143, 0xf18f, 0x42c0, 0xa8, 0xeb, 0x71, 0xc0, 0x15, 0x16, 0x1, 0x9a )
+#endif
+
+/*! To add custom widgets to the Qt Designer, implement that interface
+ in your custom widget plugin.
+
+ You also have to implement the function featureList() (\sa
+ QFeatureListInterface) and return there all widgets (names of it)
+ which this interface provides.
+*/
+
+struct QWidgetFactoryInterface : public QFeatureListInterface
+{
+public:
+
+ /*! In the implementation create and return the widget \a widget
+ here, use \a parent and \a name when creating the widget */
+ virtual QWidget* create( const QString &widget, QWidget* parent = 0, const char* name = 0 ) = 0;
+
+ /*! In the implementation return the name of the group of the
+ widget \a widget */
+ virtual QString group( const QString &widget ) const = 0;
+
+ /*! In the implementation return the iconset, which should be used
+ in the Qt Designer menubar and toolbar to represent the widget
+ \a widget */
+ virtual QIconSet iconSet( const QString &widget ) const = 0;
+
+ /*! In the implementation return the include file which is needed
+ for the widget \a widget in the generated code which uic
+ generates. */
+ virtual QString includeFile( const QString &widget ) const = 0;
+
+ /*! In the implementation return the text which should be
+ displayed as tooltip for the widget \a widget */
+ virtual QString toolTip( const QString &widget ) const = 0;
+
+ /*! In the implementation return the text which should be used for
+ what's this help for the widget \a widget. */
+ virtual QString whatsThis( const QString &widget ) const = 0;
+
+ /*! In the implementation return TRUE here, of the \a widget
+ should be able to contain other widget in the Qt Designer, else
+ FALSE. */
+ virtual bool isContainer( const QString &widget ) const = 0;
+};
+
+#if CONTAINER_CUSTOM_WIDGETS
+// {15976628-e3c3-47f4-b525-d124a3caf30e}
+#ifndef IID_QWidgetContainer
+#define IID_QWidgetContainer QUuid( 0x15976628, 0xe3c3, 0x47f4, 0xb5, 0x25, 0xd1, 0x24, 0xa3, 0xca, 0xf3, 0x0e )
+#endif
+
+struct QWidgetContainerInterfacePrivate : public QUnknownInterface
+{
+public:
+ virtual QWidget *containerOfWidget( QWidget *widget ) const = 0;
+ virtual QWidgetList containersOf( QWidget *widget ) const = 0;
+ virtual bool isPassiveInteractor( QWidget *widget ) const = 0;
+};
+#endif
+
+#endif // QT_NO_WIDGETPLUGIN
+#endif // QWIDGETINTERFACE_H
diff --git a/qmake/include/private/qwidgetresizehandler_p.h b/qmake/include/private/qwidgetresizehandler_p.h
new file mode 100644
index 0000000..ca229db
--- a/dev/null
+++ b/qmake/include/private/qwidgetresizehandler_p.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of the QWidgetResizeHandler class
+**
+** Created : 001010
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the workspace module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QWIDGETRESIZEHANDLER_H
+#define QWIDGETRESIZEHANDLER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#endif // QT_H
+#ifndef QT_NO_RESIZEHANDLER
+class QMouseEvent;
+class QKeyEvent;
+
+class Q_EXPORT QWidgetResizeHandler : public QObject
+{
+ Q_OBJECT
+
+public:
+ QWidgetResizeHandler( QWidget *parent, QWidget *cw = 0, const char *name = 0 );
+ void setActive( bool b ) { active = b; if ( !active ) setMouseCursor( Nowhere ); }
+ bool isActive() const { return active; }
+ void setMovingEnabled( bool b ) { moving = b; }
+ bool isMovingEnabled() const { return moving; }
+
+ bool isButtonDown() const { return buttonDown; }
+
+ void setExtraHeight( int h ) { extrahei = h; }
+ void setSizeProtection( bool b ) { sizeprotect = b; }
+
+ void doResize();
+ void doMove();
+
+signals:
+ void activate();
+
+protected:
+ bool eventFilter( QObject *o, QEvent *e );
+ void mouseMoveEvent( QMouseEvent *e );
+ void keyPressEvent( QKeyEvent *e );
+
+private:
+ enum MousePosition {
+ Nowhere,
+ TopLeft, BottomRight, BottomLeft, TopRight,
+ Top, Bottom, Left, Right,
+ Center
+ };
+
+ QWidget *widget;
+ QWidget *childWidget;
+ QPoint moveOffset;
+ QPoint invertedMoveOffset;
+ MousePosition mode;
+ int extrahei;
+ int range;
+ uint buttonDown :1;
+ uint moveResizeMode :1;
+ uint active :1;
+ uint sizeprotect :1;
+ uint moving :1;
+
+ void setMouseCursor( MousePosition m );
+ bool isMove() const {
+ return moveResizeMode && mode == Center;
+ }
+ bool isResize() const {
+ return moveResizeMode && !isMove();
+ }
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QWidgetResizeHandler( const QWidgetResizeHandler & );
+ QWidgetResizeHandler& operator=( const QWidgetResizeHandler & );
+#endif
+
+};
+
+#endif //QT_NO_RESIZEHANDLER
+#endif
diff --git a/qmake/include/qasciidict.h b/qmake/include/qasciidict.h
new file mode 100644
index 0000000..8f344cd
--- a/dev/null
+++ b/qmake/include/qasciidict.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QAsciiDict template class
+**
+** Created : 920821
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QASCIIDICT_H
+#define QASCIIDICT_H
+
+#ifndef QT_H
+#include "qgdict.h"
+#endif // QT_H
+
+template<class type>
+class QAsciiDict
+#ifdef Q_QDOC
+ : public QPtrCollection
+#else
+ : public QGDict
+#endif
+{
+public:
+ QAsciiDict(int size=17, bool caseSensitive=TRUE, bool copyKeys=TRUE )
+ : QGDict(size,AsciiKey,caseSensitive,copyKeys) {}
+ QAsciiDict( const QAsciiDict<type> &d ) : QGDict(d) {}
+ ~QAsciiDict() { clear(); }
+ QAsciiDict<type> &operator=(const QAsciiDict<type> &d)
+ { return (QAsciiDict<type>&)QGDict::operator=(d); }
+ uint count() const { return QGDict::count(); }
+ uint size() const { return QGDict::size(); }
+ bool isEmpty() const { return QGDict::count() == 0; }
+
+ void insert( const char *k, const type *d )
+ { QGDict::look_ascii(k,(Item)d,1); }
+ void replace( const char *k, const type *d )
+ { QGDict::look_ascii(k,(Item)d,2); }
+ bool remove( const char *k ) { return QGDict::remove_ascii(k); }
+ type *take( const char *k ) { return (type *)QGDict::take_ascii(k); }
+ type *find( const char *k ) const
+ { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); }
+ type *operator[]( const char *k ) const
+ { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); }
+
+ void clear() { QGDict::clear(); }
+ void resize( uint n ) { QGDict::resize(n); }
+ void statistics() const { QGDict::statistics(); }
+
+#ifdef Q_QDOC
+protected:
+ virtual QDataStream& read( QDataStream &, QPtrCollection::Item & );
+ virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const;
+#endif
+
+private:
+ void deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void QAsciiDict<void>::deleteItem( QPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void QAsciiDict<type>::deleteItem( QPtrCollection::Item d )
+{
+ if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class QAsciiDictIterator : public QGDictIterator
+{
+public:
+ QAsciiDictIterator(const QAsciiDict<type> &d)
+ : QGDictIterator((QGDict &)d) {}
+ ~QAsciiDictIterator() {}
+ uint count() const { return dict->count(); }
+ bool isEmpty() const { return dict->count() == 0; }
+ type *toFirst() { return (type *)QGDictIterator::toFirst(); }
+ operator type *() const { return (type *)QGDictIterator::get(); }
+ type *current() const { return (type *)QGDictIterator::get(); }
+ const char *currentKey() const { return QGDictIterator::getKeyAscii(); }
+ type *operator()() { return (type *)QGDictIterator::operator()(); }
+ type *operator++() { return (type *)QGDictIterator::operator++(); }
+ type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);}
+};
+
+#endif // QASCIIDICT_H
diff --git a/qmake/include/qbitarray.h b/qmake/include/qbitarray.h
new file mode 100644
index 0000000..65c5cd3
--- a/dev/null
+++ b/qmake/include/qbitarray.h
@@ -0,0 +1,166 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QBitArray class
+**
+** Created : 940118
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QBITARRAY_H
+#define QBITARRAY_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+
+/*****************************************************************************
+ QBitVal class; a context class for QBitArray::operator[]
+ *****************************************************************************/
+
+class QBitArray;
+
+class Q_EXPORT QBitVal
+{
+private:
+ QBitArray *array;
+ uint index;
+public:
+ QBitVal( QBitArray *a, uint i ) : array(a), index(i) {}
+ operator int();
+ QBitVal &operator=( const QBitVal &v );
+ QBitVal &operator=( bool v );
+};
+
+
+/*****************************************************************************
+ QBitArray class
+ *****************************************************************************/
+
+class Q_EXPORT QBitArray : public QByteArray
+{
+public:
+ QBitArray();
+ QBitArray( uint size );
+ QBitArray( const QBitArray &a ) : QByteArray( a ) {}
+
+ QBitArray &operator=( const QBitArray & );
+
+ uint size() const;
+ bool resize( uint size );
+
+ bool fill( bool v, int size = -1 );
+
+ void detach();
+ QBitArray copy() const;
+
+ bool testBit( uint index ) const;
+ void setBit( uint index );
+ void setBit( uint index, bool value );
+ void clearBit( uint index );
+ bool toggleBit( uint index );
+
+ bool at( uint index ) const;
+ QBitVal operator[]( int index );
+ bool operator[]( int index ) const;
+
+ QBitArray &operator&=( const QBitArray & );
+ QBitArray &operator|=( const QBitArray & );
+ QBitArray &operator^=( const QBitArray & );
+ QBitArray operator~() const;
+
+protected:
+ struct bitarr_data : public QGArray::array_data {
+ uint nbits;
+ };
+ array_data *newData() { return new bitarr_data; }
+ void deleteData( array_data *d ) { delete (bitarr_data*)d; }
+private:
+ void pad0();
+};
+
+
+inline QBitArray &QBitArray::operator=( const QBitArray &a )
+{ return (QBitArray&)assign( a ); }
+
+inline uint QBitArray::size() const
+{ return ((bitarr_data*)sharedBlock())->nbits; }
+
+inline void QBitArray::setBit( uint index, bool value )
+{ if ( value ) setBit(index); else clearBit(index); }
+
+inline bool QBitArray::at( uint index ) const
+{ return testBit(index); }
+
+inline QBitVal QBitArray::operator[]( int index )
+{ return QBitVal( (QBitArray*)this, index ); }
+
+inline bool QBitArray::operator[]( int index ) const
+{ return testBit( index ); }
+
+
+/*****************************************************************************
+ Misc. QBitArray operator functions
+ *****************************************************************************/
+
+Q_EXPORT QBitArray operator&( const QBitArray &, const QBitArray & );
+Q_EXPORT QBitArray operator|( const QBitArray &, const QBitArray & );
+Q_EXPORT QBitArray operator^( const QBitArray &, const QBitArray & );
+
+
+inline QBitVal::operator int()
+{
+ return array->testBit( index );
+}
+
+inline QBitVal &QBitVal::operator=( const QBitVal &v )
+{
+ array->setBit( index, v.array->testBit(v.index) );
+ return *this;
+}
+
+inline QBitVal &QBitVal::operator=( bool v )
+{
+ array->setBit( index, v );
+ return *this;
+}
+
+
+/*****************************************************************************
+ QBitArray stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QBitArray & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QBitArray & );
+#endif
+
+#endif // QBITARRAY_H
diff --git a/qmake/include/qbuffer.h b/qmake/include/qbuffer.h
new file mode 100644
index 0000000..f1b869b
--- a/dev/null
+++ b/qmake/include/qbuffer.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QBuffer class
+**
+** Created : 930812
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QBUFFER_H
+#define QBUFFER_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#endif // QT_H
+
+
+class Q_EXPORT QBuffer : public QIODevice
+{
+public:
+ QBuffer();
+ QBuffer( QByteArray );
+ ~QBuffer();
+
+ QByteArray buffer() const;
+ bool setBuffer( QByteArray );
+
+ bool open( int );
+ void close();
+ void flush();
+
+ Offset size() const;
+ Offset at() const;
+ bool at( Offset );
+
+ Q_LONG readBlock( char *p, Q_ULONG );
+ Q_LONG writeBlock( const char *p, Q_ULONG );
+ Q_LONG writeBlock( const QByteArray& data )
+ { return QIODevice::writeBlock(data); }
+ Q_LONG readLine( char *p, Q_ULONG );
+
+ int getch();
+ int putch( int );
+ int ungetch( int );
+
+protected:
+ QByteArray a;
+
+private:
+ uint a_len;
+ uint a_inc;
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QBuffer( const QBuffer & );
+ QBuffer &operator=( const QBuffer & );
+#endif
+};
+
+
+inline QByteArray QBuffer::buffer() const
+{ return a; }
+
+inline QIODevice::Offset QBuffer::size() const
+{ return (Offset)a.size(); }
+
+inline QIODevice::Offset QBuffer::at() const
+{ return ioIndex; }
+
+
+#endif // QBUFFER_H
diff --git a/qmake/include/qcache.h b/qmake/include/qcache.h
new file mode 100644
index 0000000..94ba323
--- a/dev/null
+++ b/qmake/include/qcache.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QCache template class
+**
+** Created : 950209
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCACHE_H
+#define QCACHE_H
+
+#ifndef QT_H
+#include "qgcache.h"
+#endif // QT_H
+
+template<class type>
+class QCache
+#ifdef Q_QDOC
+ : public QPtrCollection
+#else
+ : public QGCache
+#endif
+{
+public:
+ QCache( const QCache<type> &c ) : QGCache(c) {}
+ QCache( int maxCost=100, int size=17, bool caseSensitive=TRUE )
+ : QGCache( maxCost, size, StringKey, caseSensitive, FALSE ) {}
+ ~QCache() { clear(); }
+ QCache<type> &operator=( const QCache<type> &c )
+ { return (QCache<type>&)QGCache::operator=(c); }
+ int maxCost() const { return QGCache::maxCost(); }
+ int totalCost() const { return QGCache::totalCost(); }
+ void setMaxCost( int m ) { QGCache::setMaxCost(m); }
+ uint count() const { return QGCache::count(); }
+ uint size() const { return QGCache::size(); }
+ bool isEmpty() const { return QGCache::count() == 0; }
+ void clear() { QGCache::clear(); }
+ bool insert( const QString &k, const type *d, int c=1, int p=0 )
+ { return QGCache::insert_string(k,(Item)d,c,p);}
+ bool remove( const QString &k )
+ { return QGCache::remove_string(k); }
+ type *take( const QString &k )
+ { return (type *)QGCache::take_string(k); }
+ type *find( const QString &k, bool ref=TRUE ) const
+ { return (type *)QGCache::find_string(k,ref);}
+ type *operator[]( const QString &k ) const
+ { return (type *)QGCache::find_string(k);}
+ void statistics() const { QGCache::statistics(); }
+private:
+ void deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void QCache<void>::deleteItem( QPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void QCache<type>::deleteItem( QPtrCollection::Item d )
+{
+ if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class QCacheIterator : public QGCacheIterator
+{
+public:
+ QCacheIterator( const QCache<type> &c ):QGCacheIterator((QGCache &)c) {}
+ QCacheIterator( const QCacheIterator<type> &ci)
+ : QGCacheIterator( (QGCacheIterator &)ci ) {}
+ QCacheIterator<type> &operator=(const QCacheIterator<type>&ci)
+ { return ( QCacheIterator<type>&)QGCacheIterator::operator=( ci ); }
+ uint count() const { return QGCacheIterator::count(); }
+ bool isEmpty() const { return QGCacheIterator::count() == 0; }
+ bool atFirst() const { return QGCacheIterator::atFirst(); }
+ bool atLast() const { return QGCacheIterator::atLast(); }
+ type *toFirst() { return (type *)QGCacheIterator::toFirst(); }
+ type *toLast() { return (type *)QGCacheIterator::toLast(); }
+ operator type *() const { return (type *)QGCacheIterator::get(); }
+ type *current() const { return (type *)QGCacheIterator::get(); }
+ QString currentKey() const{ return QGCacheIterator::getKeyString(); }
+ type *operator()() { return (type *)QGCacheIterator::operator()();}
+ type *operator++() { return (type *)QGCacheIterator::operator++(); }
+ type *operator+=(uint j) { return (type *)QGCacheIterator::operator+=(j);}
+ type *operator--() { return (type *)QGCacheIterator::operator--(); }
+ type *operator-=(uint j) { return (type *)QGCacheIterator::operator-=(j);}
+};
+
+#endif // QCACHE_H
diff --git a/qmake/include/qcleanuphandler.h b/qmake/include/qcleanuphandler.h
new file mode 100644
index 0000000..471dc7b
--- a/dev/null
+++ b/qmake/include/qcleanuphandler.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+** $Id$
+**
+** ...
+**
+** Copyright (C) 2001-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCLEANUPHANDLER_H
+#define QCLEANUPHANDLER_H
+
+#ifndef QT_H
+#include <qptrlist.h>
+#endif // QT_H
+
+template<class Type>
+class QCleanupHandler
+{
+public:
+ QCleanupHandler() : cleanupObjects( 0 ) {}
+ ~QCleanupHandler() { clear(); }
+
+ Type* add( Type **object ) {
+ if ( !cleanupObjects )
+ cleanupObjects = new QPtrList<Type*>;
+ cleanupObjects->insert( 0, object );
+ return *object;
+ }
+
+ void remove( Type **object ) {
+ if ( !cleanupObjects )
+ return;
+ if ( cleanupObjects->findRef( object ) >= 0 )
+ (void) cleanupObjects->take();
+ }
+
+ bool isEmpty() const {
+ return cleanupObjects ? cleanupObjects->isEmpty() : TRUE;
+ }
+
+ void clear() {
+ if ( !cleanupObjects )
+ return;
+ QPtrListIterator<Type*> it( *cleanupObjects );
+ Type **object;
+ while ( ( object = it.current() ) ) {
+ delete *object;
+ *object = 0;
+ cleanupObjects->remove( object );
+ }
+ delete cleanupObjects;
+ cleanupObjects = 0;
+ }
+
+private:
+ QPtrList<Type*> *cleanupObjects;
+};
+
+template<class Type>
+class QSingleCleanupHandler
+{
+public:
+ QSingleCleanupHandler() : object( 0 ) {}
+ ~QSingleCleanupHandler() {
+ if ( object ) {
+ delete *object;
+ *object = 0;
+ }
+ }
+ Type* set( Type **o ) {
+ object = o;
+ return *object;
+ }
+ void reset() { object = 0; }
+private:
+ Type **object;
+};
+
+template<class Type>
+class QSharedCleanupHandler
+{
+public:
+ QSharedCleanupHandler() : object( 0 ) {}
+ ~QSharedCleanupHandler() {
+ if ( object ) {
+ if ( (*object)->deref() )
+ delete *object;
+ *object = 0;
+ }
+ }
+ Type* set( Type **o ) {
+ object = o;
+ return *object;
+ }
+ void reset() { object = 0; }
+private:
+ Type **object;
+};
+
+#endif //QCLEANUPHANDLER_H
diff --git a/qmake/include/qcstring.h b/qmake/include/qcstring.h
new file mode 100644
index 0000000..004bb3b
--- a/dev/null
+++ b/qmake/include/qcstring.h
@@ -0,0 +1,391 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of the extended char array operations,
+** and QByteArray and QCString classes
+**
+** Created : 920609
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCSTRING_H
+#define QCSTRING_H
+
+#ifndef QT_H
+#include "qmemarray.h"
+#endif // QT_H
+
+#include <string.h>
+
+
+/*****************************************************************************
+ Safe and portable C string functions; extensions to standard string.h
+ *****************************************************************************/
+
+Q_EXPORT void *qmemmove( void *dst, const void *src, uint len );
+
+Q_EXPORT char *qstrdup( const char * );
+
+Q_EXPORT inline uint qstrlen( const char *str )
+{ return str ? (uint)strlen(str) : 0; }
+
+Q_EXPORT inline char *qstrcpy( char *dst, const char *src )
+{ return src ? strcpy(dst, src) : 0; }
+
+Q_EXPORT char *qstrncpy( char *dst, const char *src, uint len );
+
+Q_EXPORT inline int qstrcmp( const char *str1, const char *str2 )
+{
+ return ( str1 && str2 ) ? strcmp( str1, str2 )
+ : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
+}
+
+Q_EXPORT inline int qstrncmp( const char *str1, const char *str2, uint len )
+{
+ return ( str1 && str2 ) ? strncmp( str1, str2, len )
+ : ( str1 ? 1 : ( str2 ? -1 : 0 ) );
+}
+
+Q_EXPORT int qstricmp( const char *, const char * );
+
+Q_EXPORT int qstrnicmp( const char *, const char *, uint len );
+
+#ifndef QT_CLEAN_NAMESPACE
+Q_EXPORT inline uint cstrlen( const char *str )
+{ return (uint)strlen(str); }
+
+Q_EXPORT inline char *cstrcpy( char *dst, const char *src )
+{ return strcpy(dst,src); }
+
+Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 )
+{ return strcmp(str1,str2); }
+
+Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len )
+{ return strncmp(str1,str2,len); }
+#endif
+
+
+// qChecksum: Internet checksum
+
+Q_EXPORT Q_UINT16 qChecksum( const char *s, uint len );
+
+/*****************************************************************************
+ QByteArray class
+ *****************************************************************************/
+
+#if defined(Q_TEMPLATEDLL)
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<char>;
+#endif
+
+#if defined(Q_QDOC)
+/*
+ We want qdoc to document QByteArray as a real class that inherits
+ QMemArray<char> and that is inherited by QBitArray.
+*/
+class QByteArray : public QMemArray<char>
+{
+public:
+ QByteArray();
+ QByteArray( int size );
+};
+#else
+typedef QMemArray<char> QByteArray;
+#endif
+
+#ifndef QT_NO_COMPRESS
+Q_EXPORT QByteArray qCompress( const uchar* data, int nbytes );
+Q_EXPORT QByteArray qUncompress( const uchar* data, int nbytes );
+Q_EXPORT inline QByteArray qCompress( const QByteArray& data)
+{ return qCompress( (const uchar*)data.data(), data.size() ); }
+Q_EXPORT inline QByteArray qUncompress( const QByteArray& data )
+{ return qUncompress( (const uchar*)data.data(), data.size() ); }
+#endif
+
+/*****************************************************************************
+ QByteArray stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QByteArray & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QByteArray & );
+#endif
+
+/*****************************************************************************
+ QCString class
+ *****************************************************************************/
+
+class QRegExp;
+
+class Q_EXPORT QCString : public QByteArray // C string class
+{
+public:
+ QCString() {} // make null string
+ QCString( int size ); // allocate size incl. \0
+ QCString( const QCString &s ) : QByteArray( s ) {}
+ QCString( const char *str ); // deep copy
+ QCString( const char *str, uint maxlen ); // deep copy, max length
+ ~QCString();
+
+ QCString &operator=( const QCString &s );// shallow copy
+ QCString &operator=( const char *str ); // deep copy
+
+ bool isNull() const;
+ bool isEmpty() const;
+ uint length() const;
+ bool resize( uint newlen );
+ bool truncate( uint pos );
+ bool fill( char c, int len = -1 );
+
+ QCString copy() const;
+
+ QCString &sprintf( const char *format, ... );
+
+ int find( char c, int index=0, bool cs=TRUE ) const;
+ int find( const char *str, int index=0, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+ int find( const QRegExp &, int index=0 ) const;
+#endif
+ int findRev( char c, int index=-1, bool cs=TRUE) const;
+ int findRev( const char *str, int index=-1, bool cs=TRUE) const;
+#ifndef QT_NO_REGEXP_CAPTURE
+ int findRev( const QRegExp &, int index=-1 ) const;
+#endif
+ int contains( char c, bool cs=TRUE ) const;
+ int contains( const char *str, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+ int contains( const QRegExp & ) const;
+#endif
+ QCString left( uint len ) const;
+ QCString right( uint len ) const;
+ QCString mid( uint index, uint len=0xffffffff) const;
+
+ QCString leftJustify( uint width, char fill=' ', bool trunc=FALSE)const;
+ QCString rightJustify( uint width, char fill=' ',bool trunc=FALSE)const;
+
+ QCString lower() const;
+ QCString upper() const;
+
+ QCString stripWhiteSpace() const;
+ QCString simplifyWhiteSpace() const;
+
+ QCString &insert( uint index, const char * );
+ QCString &insert( uint index, char );
+ QCString &append( const char * );
+ QCString &prepend( const char * );
+ QCString &remove( uint index, uint len );
+ QCString &replace( uint index, uint len, const char * );
+#ifndef QT_NO_REGEXP
+ QCString &replace( const QRegExp &, const char * );
+#endif
+ QCString &replace( char c, const char *after );
+ QCString &replace( const char *, const char * );
+ QCString &replace( char, char );
+
+ short toShort( bool *ok=0 ) const;
+ ushort toUShort( bool *ok=0 ) const;
+ int toInt( bool *ok=0 ) const;
+ uint toUInt( bool *ok=0 ) const;
+ long toLong( bool *ok=0 ) const;
+ ulong toULong( bool *ok=0 ) const;
+ float toFloat( bool *ok=0 ) const;
+ double toDouble( bool *ok=0 ) const;
+
+ QCString &setStr( const char *s );
+ QCString &setNum( short );
+ QCString &setNum( ushort );
+ QCString &setNum( int );
+ QCString &setNum( uint );
+ QCString &setNum( long );
+ QCString &setNum( ulong );
+ QCString &setNum( float, char f='g', int prec=6 );
+ QCString &setNum( double, char f='g', int prec=6 );
+
+ bool setExpand( uint index, char c );
+
+ operator const char *() const;
+ QCString &operator+=( const char *str );
+ QCString &operator+=( char c );
+};
+
+
+/*****************************************************************************
+ QCString stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QCString & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QCString & );
+#endif
+
+/*****************************************************************************
+ QCString inline functions
+ *****************************************************************************/
+
+inline QCString &QCString::operator=( const QCString &s )
+{ return (QCString&)assign( s ); }
+
+inline QCString &QCString::operator=( const char *str )
+{ return (QCString&)duplicate( str, qstrlen(str)+1 ); }
+
+inline bool QCString::isNull() const
+{ return data() == 0; }
+
+inline bool QCString::isEmpty() const
+{ return data() == 0 || *data() == '\0'; }
+
+inline uint QCString::length() const
+{ return qstrlen( data() ); }
+
+inline bool QCString::truncate( uint pos )
+{ return resize(pos+1); }
+
+inline QCString QCString::copy() const
+{ return QCString( data() ); }
+
+inline QCString &QCString::prepend( const char *s )
+{ return insert(0,s); }
+
+inline QCString &QCString::append( const char *s )
+{ return operator+=(s); }
+
+inline QCString &QCString::setNum( short n )
+{ return setNum((long)n); }
+
+inline QCString &QCString::setNum( ushort n )
+{ return setNum((ulong)n); }
+
+inline QCString &QCString::setNum( int n )
+{ return setNum((long)n); }
+
+inline QCString &QCString::setNum( uint n )
+{ return setNum((ulong)n); }
+
+inline QCString &QCString::setNum( float n, char f, int prec )
+{ return setNum((double)n,f,prec); }
+
+inline QCString::operator const char *() const
+{ return (const char *)data(); }
+
+
+/*****************************************************************************
+ QCString non-member operators
+ *****************************************************************************/
+
+Q_EXPORT inline bool operator==( const QCString &s1, const QCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) == 0; }
+
+Q_EXPORT inline bool operator==( const QCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) == 0; }
+
+Q_EXPORT inline bool operator==( const char *s1, const QCString &s2 )
+{ return qstrcmp( s1, s2.data() ) == 0; }
+
+Q_EXPORT inline bool operator!=( const QCString &s1, const QCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) != 0; }
+
+Q_EXPORT inline bool operator!=( const QCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) != 0; }
+
+Q_EXPORT inline bool operator!=( const char *s1, const QCString &s2 )
+{ return qstrcmp( s1, s2.data() ) != 0; }
+
+Q_EXPORT inline bool operator<( const QCString &s1, const QCString& s2 )
+{ return qstrcmp( s1.data(), s2.data() ) < 0; }
+
+Q_EXPORT inline bool operator<( const QCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) < 0; }
+
+Q_EXPORT inline bool operator<( const char *s1, const QCString &s2 )
+{ return qstrcmp( s1, s2.data() ) < 0; }
+
+Q_EXPORT inline bool operator<=( const QCString &s1, const QCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) <= 0; }
+
+Q_EXPORT inline bool operator<=( const QCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) <= 0; }
+
+Q_EXPORT inline bool operator<=( const char *s1, const QCString &s2 )
+{ return qstrcmp( s1, s2.data() ) <= 0; }
+
+Q_EXPORT inline bool operator>( const QCString &s1, const QCString &s2 )
+{ return qstrcmp( s1.data(), s2.data() ) > 0; }
+
+Q_EXPORT inline bool operator>( const QCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) > 0; }
+
+Q_EXPORT inline bool operator>( const char *s1, const QCString &s2 )
+{ return qstrcmp( s1, s2.data() ) > 0; }
+
+Q_EXPORT inline bool operator>=( const QCString &s1, const QCString& s2 )
+{ return qstrcmp( s1.data(), s2.data() ) >= 0; }
+
+Q_EXPORT inline bool operator>=( const QCString &s1, const char *s2 )
+{ return qstrcmp( s1.data(), s2 ) >= 0; }
+
+Q_EXPORT inline bool operator>=( const char *s1, const QCString &s2 )
+{ return qstrcmp( s1, s2.data() ) >= 0; }
+
+Q_EXPORT inline const QCString operator+( const QCString &s1,
+ const QCString &s2 )
+{
+ QCString tmp( s1.data() );
+ tmp += s2;
+ return tmp;
+}
+
+Q_EXPORT inline const QCString operator+( const QCString &s1, const char *s2 )
+{
+ QCString tmp( s1.data() );
+ tmp += s2;
+ return tmp;
+}
+
+Q_EXPORT inline const QCString operator+( const char *s1, const QCString &s2 )
+{
+ QCString tmp( s1 );
+ tmp += s2;
+ return tmp;
+}
+
+Q_EXPORT inline const QCString operator+( const QCString &s1, char c2 )
+{
+ QCString tmp( s1.data() );
+ tmp += c2;
+ return tmp;
+}
+
+Q_EXPORT inline const QCString operator+( char c1, const QCString &s2 )
+{
+ QCString tmp;
+ tmp += c1;
+ tmp += s2;
+ return tmp;
+}
+
+#endif // QCSTRING_H
diff --git a/qmake/include/qdatastream.h b/qmake/include/qdatastream.h
new file mode 100644
index 0000000..09d7bef
--- a/dev/null
+++ b/qmake/include/qdatastream.h
@@ -0,0 +1,173 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QDataStream class
+**
+** Created : 930831
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDATASTREAM_H
+#define QDATASTREAM_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_DATASTREAM
+class Q_EXPORT QDataStream // data stream class
+{
+public:
+ QDataStream();
+ QDataStream( QIODevice * );
+ QDataStream( QByteArray, int mode );
+ virtual ~QDataStream();
+
+ QIODevice *device() const;
+ void setDevice( QIODevice * );
+ void unsetDevice();
+
+ bool atEnd() const;
+ bool eof() const;
+
+ enum ByteOrder { BigEndian, LittleEndian };
+ int byteOrder() const;
+ void setByteOrder( int );
+
+ bool isPrintableData() const;
+ void setPrintableData( bool );
+
+ int version() const;
+ void setVersion( int );
+
+ QDataStream &operator>>( Q_INT8 &i );
+ QDataStream &operator>>( Q_UINT8 &i );
+ QDataStream &operator>>( Q_INT16 &i );
+ QDataStream &operator>>( Q_UINT16 &i );
+ QDataStream &operator>>( Q_INT32 &i );
+ QDataStream &operator>>( Q_UINT32 &i );
+ QDataStream &operator>>( Q_LONG &i );
+ QDataStream &operator>>( Q_ULONG &i );
+
+ QDataStream &operator>>( float &f );
+ QDataStream &operator>>( double &f );
+ QDataStream &operator>>( char *&str );
+
+ QDataStream &operator<<( Q_INT8 i );
+ QDataStream &operator<<( Q_UINT8 i );
+ QDataStream &operator<<( Q_INT16 i );
+ QDataStream &operator<<( Q_UINT16 i );
+ QDataStream &operator<<( Q_INT32 i );
+ QDataStream &operator<<( Q_UINT32 i );
+ QDataStream &operator<<( Q_LONG i );
+ QDataStream &operator<<( Q_ULONG i );
+ QDataStream &operator<<( float f );
+ QDataStream &operator<<( double f );
+ QDataStream &operator<<( const char *str );
+
+ QDataStream &readBytes( char *&, uint &len );
+ QDataStream &readRawBytes( char *, uint len );
+
+ QDataStream &writeBytes( const char *, uint len );
+ QDataStream &writeRawBytes( const char *, uint len );
+
+private:
+ QIODevice *dev;
+ bool owndev;
+ int byteorder;
+ bool printable;
+ bool noswap;
+ int ver;
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QDataStream( const QDataStream & );
+ QDataStream &operator=( const QDataStream & );
+#endif
+};
+
+
+/*****************************************************************************
+ QDataStream inline functions
+ *****************************************************************************/
+
+inline QIODevice *QDataStream::device() const
+{ return dev; }
+
+inline bool QDataStream::atEnd() const
+{ return dev ? dev->atEnd() : TRUE; }
+
+inline bool QDataStream::eof() const
+{ return atEnd(); }
+
+inline int QDataStream::byteOrder() const
+{ return byteorder; }
+
+inline bool QDataStream::isPrintableData() const
+{ return printable; }
+
+inline void QDataStream::setPrintableData( bool p )
+{ printable = p; }
+
+inline int QDataStream::version() const
+{ return ver; }
+
+inline void QDataStream::setVersion( int v )
+{ ver = v; }
+
+inline QDataStream &QDataStream::operator>>( Q_UINT8 &i )
+{ return *this >> (Q_INT8&)i; }
+
+inline QDataStream &QDataStream::operator>>( Q_UINT16 &i )
+{ return *this >> (Q_INT16&)i; }
+
+inline QDataStream &QDataStream::operator>>( Q_UINT32 &i )
+{ return *this >> (Q_INT32&)i; }
+
+inline QDataStream &QDataStream::operator>>( Q_ULONG &i )
+{ return *this >> (Q_LONG&)i; }
+
+inline QDataStream &QDataStream::operator<<( Q_UINT8 i )
+{ return *this << (Q_INT8)i; }
+
+inline QDataStream &QDataStream::operator<<( Q_UINT16 i )
+{ return *this << (Q_INT16)i; }
+
+inline QDataStream &QDataStream::operator<<( Q_UINT32 i )
+{ return *this << (Q_INT32)i; }
+
+inline QDataStream &QDataStream::operator<<( Q_ULONG i )
+{ return *this << (Q_LONG)i; }
+
+
+#endif // QT_NO_DATASTREAM
+#endif // QDATASTREAM_H
diff --git a/qmake/include/qdatetime.h b/qmake/include/qdatetime.h
new file mode 100644
index 0000000..4f01760
--- a/dev/null
+++ b/qmake/include/qdatetime.h
@@ -0,0 +1,250 @@
+/*************************************************************************
+** $Id$
+**
+** Definition of date and time classes
+**
+** Created : 940124
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDATETIME_H
+#define QDATETIME_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qnamespace.h"
+#endif // QT_H
+
+
+/*****************************************************************************
+ QDate class
+ *****************************************************************************/
+
+class Q_EXPORT QDate
+{
+public:
+ QDate() { jd = 0; }
+ QDate( int y, int m, int d );
+
+ bool isNull() const { return jd == 0; }
+ bool isValid() const;
+
+ int year() const;
+ int month() const;
+ int day() const;
+ int dayOfWeek() const;
+ int dayOfYear() const;
+ int daysInMonth() const;
+ int daysInYear() const;
+ int weekNumber( int *yearNum = 0 ) const;
+
+#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_COMPAT
+ static QString monthName( int month ) { return shortMonthName( month ); }
+ static QString dayName( int weekday ) { return shortDayName( weekday ); }
+#endif
+ static QString shortMonthName( int month );
+ static QString shortDayName( int weekday );
+ static QString longMonthName( int month );
+ static QString longDayName( int weekday );
+#endif //QT_NO_TEXTDATE
+#ifndef QT_NO_TEXTSTRING
+#if !defined(QT_NO_SPRINTF)
+ QString toString( Qt::DateFormat f = Qt::TextDate ) const;
+#endif
+ QString toString( const QString& format ) const;
+#endif
+ bool setYMD( int y, int m, int d );
+
+ QDate addDays( int days ) const;
+ QDate addMonths( int months ) const;
+ QDate addYears( int years ) const;
+ int daysTo( const QDate & ) const;
+
+ bool operator==( const QDate &d ) const { return jd == d.jd; }
+ bool operator!=( const QDate &d ) const { return jd != d.jd; }
+ bool operator<( const QDate &d ) const { return jd < d.jd; }
+ bool operator<=( const QDate &d ) const { return jd <= d.jd; }
+ bool operator>( const QDate &d ) const { return jd > d.jd; }
+ bool operator>=( const QDate &d ) const { return jd >= d.jd; }
+
+ static QDate currentDate();
+ static QDate currentDate( Qt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+ static QDate fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );
+#endif
+ static bool isValid( int y, int m, int d );
+ static bool leapYear( int year );
+
+ static uint gregorianToJulian( int y, int m, int d );
+ static void julianToGregorian( uint jd, int &y, int &m, int &d );
+private:
+ uint jd;
+ friend class QDateTime;
+#ifndef QT_NO_DATASTREAM
+ friend Q_EXPORT QDataStream &operator<<( QDataStream &, const QDate & );
+ friend Q_EXPORT QDataStream &operator>>( QDataStream &, QDate & );
+#endif
+};
+
+
+/*****************************************************************************
+ QTime class
+ *****************************************************************************/
+
+class Q_EXPORT QTime
+{
+public:
+ QTime() { ds=0; } // set null time
+ QTime( int h, int m, int s=0, int ms=0 ); // set time
+
+ bool isNull() const { return ds == 0; }
+ bool isValid() const; // valid time
+
+ int hour() const; // 0..23
+ int minute() const; // 0..59
+ int second() const; // 0..59
+ int msec() const; // 0..999
+#ifndef QT_NO_DATESTRING
+#ifndef QT_NO_SPRINTF
+ QString toString( Qt::DateFormat f = Qt::TextDate ) const;
+#endif
+ QString toString( const QString& format ) const;
+#endif
+ bool setHMS( int h, int m, int s, int ms=0 );
+
+ QTime addSecs( int secs ) const;
+ int secsTo( const QTime & ) const;
+ QTime addMSecs( int ms ) const;
+ int msecsTo( const QTime & ) const;
+
+ bool operator==( const QTime &d ) const { return ds == d.ds; }
+ bool operator!=( const QTime &d ) const { return ds != d.ds; }
+ bool operator<( const QTime &d ) const { return ds < d.ds; }
+ bool operator<=( const QTime &d ) const { return ds <= d.ds; }
+ bool operator>( const QTime &d ) const { return ds > d.ds; }
+ bool operator>=( const QTime &d ) const { return ds >= d.ds; }
+
+ static QTime currentTime();
+ static QTime currentTime( Qt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+ static QTime fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );
+#endif
+ static bool isValid( int h, int m, int s, int ms=0 );
+
+ void start();
+ int restart();
+ int elapsed() const;
+
+private:
+ static bool currentTime( QTime * );
+ static bool currentTime( QTime *, Qt::TimeSpec );
+
+ uint ds;
+ friend class QDateTime;
+#ifndef QT_NO_DATASTREAM
+ friend Q_EXPORT QDataStream &operator<<( QDataStream &, const QTime & );
+ friend Q_EXPORT QDataStream &operator>>( QDataStream &, QTime & );
+#endif
+};
+
+
+/*****************************************************************************
+ QDateTime class
+ *****************************************************************************/
+
+class Q_EXPORT QDateTime
+{
+public:
+ QDateTime() {} // set null date and null time
+ QDateTime( const QDate & );
+ QDateTime( const QDate &, const QTime & );
+
+ bool isNull() const { return d.isNull() && t.isNull(); }
+ bool isValid() const { return d.isValid() && t.isValid(); }
+
+ QDate date() const { return d; }
+ QTime time() const { return t; }
+ uint toTime_t() const;
+ void setDate( const QDate &date ) { d = date; }
+ void setTime( const QTime &time ) { t = time; }
+ void setTime_t( uint secsSince1Jan1970UTC );
+ void setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+#ifndef QT_NO_SPRINTF
+ QString toString( Qt::DateFormat f = Qt::TextDate ) const;
+#endif
+ QString toString( const QString& format ) const;
+#endif
+ QDateTime addDays( int days ) const;
+ QDateTime addMonths( int months ) const;
+ QDateTime addYears( int years ) const;
+ QDateTime addSecs( int secs ) const;
+ int daysTo( const QDateTime & ) const;
+ int secsTo( const QDateTime & ) const;
+
+ bool operator==( const QDateTime &dt ) const;
+ bool operator!=( const QDateTime &dt ) const;
+ bool operator<( const QDateTime &dt ) const;
+ bool operator<=( const QDateTime &dt ) const;
+ bool operator>( const QDateTime &dt ) const;
+ bool operator>=( const QDateTime &dt ) const;
+
+ static QDateTime currentDateTime();
+ static QDateTime currentDateTime( Qt::TimeSpec );
+#ifndef QT_NO_DATESTRING
+ static QDateTime fromString( const QString& s, Qt::DateFormat f = Qt::TextDate );
+#endif
+private:
+ QDate d;
+ QTime t;
+#ifndef QT_NO_DATASTREAM
+ friend Q_EXPORT QDataStream &operator<<( QDataStream &, const QDateTime &);
+ friend Q_EXPORT QDataStream &operator>>( QDataStream &, QDateTime & );
+#endif
+};
+
+
+/*****************************************************************************
+ Date and time stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QDate & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QDate & );
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QTime & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QTime & );
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QDateTime & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QDateTime & );
+#endif // QT_NO_DATASTREAM
+
+#endif // QDATETIME_H
+
diff --git a/qmake/include/qdict.h b/qmake/include/qdict.h
new file mode 100644
index 0000000..04ae7bf
--- a/dev/null
+++ b/qmake/include/qdict.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QDict template class
+**
+** Created : 920821
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDICT_H
+#define QDICT_H
+
+#ifndef QT_H
+#include "qgdict.h"
+#endif // QT_H
+
+template<class type>
+class QDict
+#ifdef Q_QDOC
+ : public QPtrCollection
+#else
+ : public QGDict
+#endif
+{
+public:
+ QDict( int size = 17, bool caseSensitive = TRUE )
+ : QGDict( size, StringKey, caseSensitive, FALSE ) { }
+ QDict( const QDict<type> &d ) : QGDict( d ) { }
+ ~QDict() { clear(); }
+ QDict<type> &operator=(const QDict<type> &d)
+ { return (QDict<type>&)QGDict::operator=(d); }
+ uint count() const { return QGDict::count(); }
+ uint size() const { return QGDict::size(); }
+ bool isEmpty() const { return QGDict::count() == 0; }
+
+ void insert( const QString &k, const type *d )
+ { QGDict::look_string(k,(Item)d,1); }
+ void replace( const QString &k, const type *d )
+ { QGDict::look_string(k,(Item)d,2); }
+ bool remove( const QString &k ) { return QGDict::remove_string(k); }
+ type *take( const QString &k ) { return (type *)QGDict::take_string(k); }
+ type *find( const QString &k ) const
+ { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); }
+ type *operator[]( const QString &k ) const
+ { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); }
+
+ void clear() { QGDict::clear(); }
+ void resize( uint n ) { QGDict::resize(n); }
+ void statistics() const { QGDict::statistics(); }
+
+#ifdef Q_QDOC
+protected:
+ virtual QDataStream& read( QDataStream &, QPtrCollection::Item & );
+ virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const;
+#endif
+
+private:
+ void deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void QDict<void>::deleteItem( Item )
+{
+}
+#endif
+
+template<class type> inline void QDict<type>::deleteItem( QPtrCollection::Item d )
+{
+ if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class QDictIterator : public QGDictIterator
+{
+public:
+ QDictIterator(const QDict<type> &d) : QGDictIterator((QGDict &)d) { }
+ ~QDictIterator() {}
+ uint count() const { return dict->count(); }
+ bool isEmpty() const { return dict->count() == 0; }
+ type *toFirst() { return (type *)QGDictIterator::toFirst(); }
+ operator type *() const { return (type *)QGDictIterator::get(); }
+ type *operator*() { return (type *)QGDictIterator::get(); }
+ type *current() const { return (type *)QGDictIterator::get(); }
+ QString currentKey() const{ return QGDictIterator::getKeyString(); }
+ type *operator()() { return (type *)QGDictIterator::operator()(); }
+ type *operator++() { return (type *)QGDictIterator::operator++(); }
+ type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j); }
+};
+
+#endif // QDICT_H
diff --git a/qmake/include/qdir.h b/qmake/include/qdir.h
new file mode 100644
index 0000000..6e9f1ab
--- a/dev/null
+++ b/qmake/include/qdir.h
@@ -0,0 +1,241 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QDir class
+**
+** Created : 950427
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDIR_H
+#define QDIR_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qstrlist.h"
+#include "qfileinfo.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_DIR
+typedef QPtrList<QFileInfo> QFileInfoList;
+typedef QPtrListIterator<QFileInfo> QFileInfoListIterator;
+class QStringList;
+
+
+class Q_EXPORT QDir
+{
+public:
+ enum FilterSpec { Dirs = 0x001,
+ Files = 0x002,
+ Drives = 0x004,
+ NoSymLinks = 0x008,
+ All = 0x007,
+ TypeMask = 0x00F,
+
+ Readable = 0x010,
+ Writable = 0x020,
+ Executable = 0x040,
+ RWEMask = 0x070,
+
+ Modified = 0x080,
+ Hidden = 0x100,
+ System = 0x200,
+ AccessMask = 0x3F0,
+
+ DefaultFilter = -1 };
+
+ enum SortSpec { Name = 0x00,
+ Time = 0x01,
+ Size = 0x02,
+ Unsorted = 0x03,
+ SortByMask = 0x03,
+
+ DirsFirst = 0x04,
+ Reversed = 0x08,
+ IgnoreCase = 0x10,
+ DefaultSort = -1 };
+
+ QDir();
+ QDir( const QString &path, const QString &nameFilter = QString::null,
+ int sortSpec = Name | IgnoreCase, int filterSpec = All );
+ QDir( const QDir & );
+
+ virtual ~QDir();
+
+ QDir &operator=( const QDir & );
+ QDir &operator=( const QString &path );
+
+ virtual void setPath( const QString &path );
+ virtual QString path() const;
+ virtual QString absPath() const;
+ virtual QString canonicalPath() const;
+
+ virtual QString dirName() const;
+ virtual QString filePath( const QString &fileName,
+ bool acceptAbsPath = TRUE ) const;
+ virtual QString absFilePath( const QString &fileName,
+ bool acceptAbsPath = TRUE ) const;
+
+ static QString convertSeparators( const QString &pathName );
+
+ virtual bool cd( const QString &dirName, bool acceptAbsPath = TRUE );
+ virtual bool cdUp();
+
+ QString nameFilter() const;
+ virtual void setNameFilter( const QString &nameFilter );
+ FilterSpec filter() const;
+ virtual void setFilter( int filterSpec );
+ SortSpec sorting() const;
+ virtual void setSorting( int sortSpec );
+
+ bool matchAllDirs() const;
+ virtual void setMatchAllDirs( bool );
+
+ uint count() const;
+ QString operator[]( int ) const;
+
+ virtual QStrList encodedEntryList( int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual QStrList encodedEntryList( const QString &nameFilter,
+ int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual QStringList entryList( int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual QStringList entryList( const QString &nameFilter,
+ int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+
+ virtual const QFileInfoList *entryInfoList( int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+ virtual const QFileInfoList *entryInfoList( const QString &nameFilter,
+ int filterSpec = DefaultFilter,
+ int sortSpec = DefaultSort ) const;
+
+ static const QFileInfoList *drives();
+
+ virtual bool mkdir( const QString &dirName,
+ bool acceptAbsPath = TRUE ) const;
+ virtual bool rmdir( const QString &dirName,
+ bool acceptAbsPath = TRUE ) const;
+
+ virtual bool isReadable() const;
+ virtual bool exists() const;
+ virtual bool isRoot() const;
+
+ virtual bool isRelative() const;
+ virtual void convertToAbs();
+
+ virtual bool operator==( const QDir & ) const;
+ virtual bool operator!=( const QDir & ) const;
+
+ virtual bool remove( const QString &fileName,
+ bool acceptAbsPath = TRUE );
+ virtual bool rename( const QString &name, const QString &newName,
+ bool acceptAbsPaths = TRUE );
+ virtual bool exists( const QString &name,
+ bool acceptAbsPath = TRUE );
+
+ static char separator();
+
+ static bool setCurrent( const QString &path );
+ static QDir current();
+ static QDir home();
+ static QDir root();
+ static QString currentDirPath();
+ static QString homeDirPath();
+ static QString rootDirPath();
+
+ static bool match( const QStringList &filters, const QString &fileName );
+ static bool match( const QString &filter, const QString &fileName );
+ static QString cleanDirPath( const QString &dirPath );
+ static bool isRelativePath( const QString &path );
+
+private:
+#ifdef Q_OS_MAC
+ typedef struct FSSpec FSSpec;
+ static FSSpec *make_spec(const QString &);
+#endif
+ void init();
+ virtual bool readDirEntries( const QString &nameFilter,
+ int FilterSpec, int SortSpec );
+
+ static void slashify ( QString &);
+
+ QString dPath;
+ QStringList *fList;
+ QFileInfoList *fiList;
+ QString nameFilt;
+ FilterSpec filtS;
+ SortSpec sortS;
+ uint dirty : 1;
+ uint allDirs : 1;
+};
+
+
+inline QString QDir::path() const
+{
+ return dPath;
+}
+
+inline QString QDir::nameFilter() const
+{
+ return nameFilt;
+}
+
+inline QDir::FilterSpec QDir::filter() const
+{
+ return filtS;
+}
+
+inline QDir::SortSpec QDir::sorting() const
+{
+ return sortS;
+}
+
+inline bool QDir::matchAllDirs() const
+{
+ return allDirs;
+}
+
+inline bool QDir::operator!=( const QDir &d ) const
+{
+ return !(*this == d);
+}
+
+
+struct QDirSortItem {
+ QString filename_cache;
+ QFileInfo* item;
+};
+
+#endif // QT_NO_DIR
+#endif // QDIR_H
diff --git a/qmake/include/qfeatures.h b/qmake/include/qfeatures.h
new file mode 100644
index 0000000..57502f9
--- a/dev/null
+++ b/qmake/include/qfeatures.h
@@ -0,0 +1,959 @@
+// All feature and their dependencies
+//
+// This list is generated from $QTDIR/src/tools/qfeatures.txt
+//
+// Asynchronous I/O
+//#define QT_NO_ASYNC_IO
+
+// Bezier curves
+//#define QT_NO_BEZIER
+
+// Buttons
+//#define QT_NO_BUTTON
+
+// Named colors
+//#define QT_NO_COLORNAMES
+
+// Cursors
+//#define QT_NO_CURSOR
+
+// QDataStream
+//#define QT_NO_DATASTREAM
+
+// QDate/QTime/QDateTime toString() and fromString()
+//#define QT_NO_DATESTRING
+
+// Dialogs
+//#define QT_NO_DIALOG
+
+// QDirectPainter
+//#define QT_NO_DIRECTPAINTER
+
+// Special widget effects (fading, scrolling)
+//#define QT_NO_EFFECTS
+
+// Freetype font engine
+//#define QT_NO_FREETYPE
+
+// Dither QImage to 1-bit image
+//#define QT_NO_IMAGE_DITHER_TO_1
+
+// QImage::createHeuristicMask()
+//#define QT_NO_IMAGE_HEURISTIC_MASK
+
+// QImage mirroring
+//#define QT_NO_IMAGE_MIRROR
+
+// Smooth QImage scaling
+//#define QT_NO_IMAGE_SMOOTHSCALE
+
+// TrueColor QImage
+//#define QT_NO_IMAGE_TRUECOLOR
+
+// Automatic widget layout
+//#define QT_NO_LAYOUT
+
+// Networking
+//#define QT_NO_NETWORK
+
+// Palettes
+//#define QT_NO_PALETTE
+
+// Alpha-blended cursor
+//#define QT_NO_QWS_ALPHA_CURSOR
+
+// 1-bit monochrome
+//#define QT_NO_QWS_DEPTH_1
+
+// 15 or 16-bit color
+//#define QT_NO_QWS_DEPTH_16
+
+// 24-bit color
+//#define QT_NO_QWS_DEPTH_24
+
+// 32-bit color
+//#define QT_NO_QWS_DEPTH_32
+
+// 4-bit greyscale
+//#define QT_NO_QWS_DEPTH_4
+
+// 8-bit color
+//#define QT_NO_QWS_DEPTH_8
+
+// 8-bit grayscale
+//#define QT_NO_QWS_DEPTH_8GRAYSCALE
+
+// Favour code size over graphics speed
+//#define QT_NO_QWS_GFX_SPEED
+
+// Console keyboard
+//#define QT_NO_QWS_KEYBOARD
+
+// Linux framebuffer
+//#define QT_NO_QWS_LINUXFB
+
+// Mach64 acceleration
+//#define QT_NO_QWS_MACH64
+
+// Window Manager
+//#define QT_NO_QWS_MANAGER
+
+// Matrox MGA acceleration
+//#define QT_NO_QWS_MATROX
+
+// Autodetecting mouse driver
+//#define QT_NO_QWS_MOUSE_AUTO
+
+// Non-autodetecting mouse driver
+//#define QT_NO_QWS_MOUSE_MANUAL
+
+// Qt/Embedded window system properties.
+//#define QT_NO_QWS_PROPERTIES
+
+// Repeater display
+//#define QT_NO_QWS_REPEATER
+
+// Saving of fonts
+//#define QT_NO_QWS_SAVEFONTS
+
+// Shadow frame buffer
+//#define QT_NO_QWS_SHADOWFB
+
+// Virtual frame buffer
+//#define QT_NO_QWS_VFB
+
+// 4-bit VGA
+//#define QT_NO_QWS_VGA_16
+
+// Voodoo3 acceleration
+//#define QT_NO_QWS_VOODOO3
+
+// Range-control widgets
+//#define QT_NO_RANGECONTROL
+
+// Regular expression capture
+//#define QT_NO_REGEXP
+
+// QSignalMapper
+//#define QT_NO_SIGNALMAPPER
+
+// Playing sounds
+//#define QT_NO_SOUND
+
+// Standard template library compatiblity
+//#define QT_NO_STL
+
+// QStringList
+//#define QT_NO_STRINGLIST
+
+// Character set conversions
+//#define QT_NO_TEXTCODEC
+
+// QTextStream
+//#define QT_NO_TEXTSTREAM
+
+// Unicode property tables
+//#define QT_NO_UNICODETABLES
+
+// Input validators
+//#define QT_NO_VALIDATOR
+
+// QVariant
+//#define QT_NO_VARIANT
+
+// Wheel-mouse events
+//#define QT_NO_WHEELEVENT
+
+// QWMatrix
+//#define QT_NO_WMATRIX
+
+// Non-Unicode text conversions
+#if !defined(QT_NO_CODECS) && (defined(QT_NO_TEXTCODEC))
+#define QT_NO_CODECS
+#endif
+
+// QCop IPC
+#if !defined(QT_NO_COP) && (defined(QT_NO_DATASTREAM))
+#define QT_NO_COP
+#endif
+
+// QFontDatabase
+#if !defined(QT_NO_FONTDATABASE) && (defined(QT_NO_STRINGLIST))
+#define QT_NO_FONTDATABASE
+#endif
+
+// Image formats
+#if !defined(QT_NO_IMAGEIO) && (defined(QT_NO_REGEXP))
+#define QT_NO_IMAGEIO
+#endif
+
+// 16-bit QImage
+#if !defined(QT_NO_IMAGE_16_BIT) && (defined(QT_NO_IMAGE_TRUECOLOR))
+#define QT_NO_IMAGE_16_BIT
+#endif
+
+// Image file text strings
+#if !defined(QT_NO_IMAGE_TEXT) && (defined(QT_NO_STRINGLIST))
+#define QT_NO_IMAGE_TEXT
+#endif
+
+// Shared library wrapper
+#if !defined(QT_NO_LIBRARY) && (defined(QT_NO_REGEXP))
+#define QT_NO_LIBRARY
+#endif
+
+// Pixmap transformations
+#if !defined(QT_NO_PIXMAP_TRANSFORMATION) && (defined(QT_NO_WMATRIX))
+#define QT_NO_PIXMAP_TRANSFORMATION
+#endif
+
+// Convert UUID to/from string
+#if !defined(QT_NO_QUUID_STRING) && (defined(QT_NO_STRINGLIST))
+#define QT_NO_QUUID_STRING
+#endif
+
+// The "BeOS" style
+#if !defined(QT_NO_QWS_BEOS_WM_STYLE) && (defined(QT_NO_QWS_MANAGER))
+#define QT_NO_QWS_BEOS_WM_STYLE
+#endif
+
+// Visible cursor
+#if !defined(QT_NO_QWS_CURSOR) && (defined(QT_NO_CURSOR))
+#define QT_NO_QWS_CURSOR
+#endif
+
+// 32-bit color, BGR order
+#if !defined(QT_NO_QWS_DEPTH_32_BGR) && (defined(QT_NO_QWS_DEPTH_32))
+#define QT_NO_QWS_DEPTH_32_BGR
+#endif
+
+// The "Hydro" style
+#if !defined(QT_NO_QWS_HYDRO_WM_STYLE) && (defined(QT_NO_QWS_MANAGER))
+#define QT_NO_QWS_HYDRO_WM_STYLE
+#endif
+
+// The "KDE2" style
+#if !defined(QT_NO_QWS_KDE2_WM_STYLE) && (defined(QT_NO_QWS_MANAGER))
+#define QT_NO_QWS_KDE2_WM_STYLE
+#endif
+
+// The "KDE" style
+#if !defined(QT_NO_QWS_KDE_WM_STYLE) && (defined(QT_NO_QWS_MANAGER))
+#define QT_NO_QWS_KDE_WM_STYLE
+#endif
+
+// Multi-process architecture
+#if !defined(QT_NO_QWS_MULTIPROCESS) && (defined(QT_NO_NETWORK))
+#define QT_NO_QWS_MULTIPROCESS
+#endif
+
+// Transformed frame buffer
+#if !defined(QT_NO_QWS_TRANSFORMED) && (defined(QT_NO_QWS_LINUXFB))
+#define QT_NO_QWS_TRANSFORMED
+#endif
+
+// Remote frame buffer (VNC)
+#if !defined(QT_NO_QWS_VNC) && (defined(QT_NO_NETWORK))
+#define QT_NO_QWS_VNC
+#endif
+
+// The "Windows" style
+#if !defined(QT_NO_QWS_WINDOWS_WM_STYLE) && (defined(QT_NO_QWS_MANAGER))
+#define QT_NO_QWS_WINDOWS_WM_STYLE
+#endif
+
+// Regular expression anchors
+#if !defined(QT_NO_REGEXP_ANCHOR_ALT) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_ANCHOR_ALT
+#endif
+
+// Regular expression back-reference
+#if !defined(QT_NO_REGEXP_BACKREF) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_BACKREF
+#endif
+
+// Regular expression character-class
+#if !defined(QT_NO_REGEXP_CCLASS) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_CCLASS
+#endif
+
+// Regular expression escape
+#if !defined(QT_NO_REGEXP_ESCAPE) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_ESCAPE
+#endif
+
+// Regular expression interval
+#if !defined(QT_NO_REGEXP_INTERVAL) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_INTERVAL
+#endif
+
+// Regular expression lookahead
+#if !defined(QT_NO_REGEXP_LOOKAHEAD) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_LOOKAHEAD
+#endif
+
+// Regular expression optimization
+#if !defined(QT_NO_REGEXP_OPTIM) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_OPTIM
+#endif
+
+// Regular expression wildcard
+#if !defined(QT_NO_REGEXP_WILDCARD) && (defined(QT_NO_REGEXP))
+#define QT_NO_REGEXP_WILDCARD
+#endif
+
+// Semi-modal dialogs
+#if !defined(QT_NO_SEMIMODAL) && (defined(QT_NO_DIALOG))
+#define QT_NO_SEMIMODAL
+#endif
+
+// Session management
+#if !defined(QT_NO_SESSIONMANAGER) && (defined(QT_NO_STRINGLIST))
+#define QT_NO_SESSIONMANAGER
+#endif
+
+// QString::sprintf()
+#if !defined(QT_NO_SPRINTF) && (defined(QT_NO_REGEXP))
+#define QT_NO_SPRINTF
+#endif
+
+// Scaling and rotation
+#if !defined(QT_NO_TRANSFORMATIONS) && (defined(QT_NO_WMATRIX))
+#define QT_NO_TRANSFORMATIONS
+#endif
+
+// Translations via QObject::tr()
+#if !defined(QT_NO_TRANSLATION) && (defined(QT_NO_DATASTREAM))
+#define QT_NO_TRANSLATION
+#endif
+
+// Window icon and caption
+#if !defined(QT_NO_WIDGET_TOPEXTRA) && (defined(QT_NO_IMAGE_HEURISTIC_MASK))
+#define QT_NO_WIDGET_TOPEXTRA
+#endif
+
+// Keyboard accelerators and shortcuts
+#if !defined(QT_NO_ACCEL) && (defined(QT_NO_SPRINTF))
+#define QT_NO_ACCEL
+#endif
+
+// Asynchronous image I/O
+#if !defined(QT_NO_ASYNC_IMAGE_IO) && (defined(QT_NO_IMAGEIO))
+#define QT_NO_ASYNC_IMAGE_IO
+#endif
+
+// BDF font files
+#if !defined(QT_NO_BDF) && (defined(QT_NO_TEXTSTREAM) || defined(QT_NO_STRINGLIST))
+#define QT_NO_BDF
+#endif
+
+// QDir
+#if !defined(QT_NO_DIR) && (defined(QT_NO_STRINGLIST) || defined(QT_NO_REGEXP))
+#define QT_NO_DIR
+#endif
+
+// JPEG image I/O
+#if !defined(QT_NO_IMAGEIO_JPEG) && (defined(QT_NO_IMAGEIO))
+#define QT_NO_IMAGEIO_JPEG
+#endif
+
+// MNG image I/O
+#if !defined(QT_NO_IMAGEIO_MNG) && (defined(QT_NO_IMAGEIO))
+#define QT_NO_IMAGEIO_MNG
+#endif
+
+// PNG image I/O
+#if !defined(QT_NO_IMAGEIO_PNG) && (defined(QT_NO_IMAGEIO))
+#define QT_NO_IMAGEIO_PNG
+#endif
+
+// PPM image I/O
+#if !defined(QT_NO_IMAGEIO_PPM) && (defined(QT_NO_IMAGEIO))
+#define QT_NO_IMAGEIO_PPM
+#endif
+
+// XBM image I/O
+#if !defined(QT_NO_IMAGEIO_XBM) && (defined(QT_NO_IMAGEIO))
+#define QT_NO_IMAGEIO_XBM
+#endif
+
+// Image transformations
+#if !defined(QT_NO_IMAGE_TRANSFORMATION) && (defined(QT_NO_PIXMAP_TRANSFORMATION))
+#define QT_NO_IMAGE_TRANSFORMATION
+#endif
+
+// External process invocation.
+#if !defined(QT_NO_PROCESS) && (defined(QT_NO_STRINGLIST) || defined(QT_NO_REGEXP))
+#define QT_NO_PROCESS
+#endif
+
+// Regular expression capture
+#if !defined(QT_NO_REGEXP_CAPTURE) && (defined(QT_NO_REGEXP) || defined(QT_NO_STRINGLIST))
+#define QT_NO_REGEXP_CAPTURE
+#endif
+
+// Template classes in QVariant
+#if !defined(QT_NO_TEMPLATE_VARIANT) && (defined(QT_NO_VARIANT) || defined(QT_NO_STRINGLIST))
+#define QT_NO_TEMPLATE_VARIANT
+#endif
+
+// Month and day names in dates
+#if !defined(QT_NO_TEXTDATE) && (defined(QT_NO_STRINGLIST) || defined(QT_NO_DATESTRING))
+#define QT_NO_TEXTDATE
+#endif
+
+// Drawing utility functions
+#if !defined(QT_NO_DRAWUTIL) && (defined(QT_NO_SPRINTF) || defined(QT_NO_PALETTE))
+#define QT_NO_DRAWUTIL
+#endif
+
+// BMP image I/O
+#if !defined(QT_NO_IMAGEIO_BMP) && (defined(QT_NO_IMAGEIO) || defined(QT_NO_DATASTREAM))
+#define QT_NO_IMAGEIO_BMP
+#endif
+
+// QPicture
+#if !defined(QT_NO_PICTURE) && (defined(QT_NO_DATASTREAM) || defined(QT_NO_IMAGEIO))
+#define QT_NO_PICTURE
+#endif
+
+// Translations via QObject::trUtf8()
+#if !defined(QT_NO_TRANSLATION_UTF8) && (defined(QT_NO_TRANSLATION) || defined(QT_NO_TEXTCODEC))
+#define QT_NO_TRANSLATION_UTF8
+#endif
+
+// URL parser
+#if !defined(QT_NO_URL) && (defined(QT_NO_DIR))
+#define QT_NO_URL
+#endif
+
+// Animated images
+#if !defined(QT_NO_MOVIE) && (defined(QT_NO_ASYNC_IO) || defined(QT_NO_ASYNC_IMAGE_IO))
+#define QT_NO_MOVIE
+#endif
+
+// Persistent application settings
+#if !defined(QT_NO_SETTINGS) && (defined(QT_NO_DIR) || defined(QT_NO_TEXTSTREAM))
+#define QT_NO_SETTINGS
+#endif
+
+// QStyle
+#if !defined(QT_NO_STYLE) && (defined(QT_NO_DRAWUTIL))
+#define QT_NO_STYLE
+#endif
+
+// DNS
+#if !defined(QT_NO_DNS) && (defined(QT_NO_NETWORK) || defined(QT_NO_STRINGLIST) || defined(QT_NO_TEXTSTREAM) || defined(QT_NO_SPRINTF))
+#define QT_NO_DNS
+#endif
+
+// Framed widgets
+#if !defined(QT_NO_FRAME) && (defined(QT_NO_STYLE))
+#define QT_NO_FRAME
+#endif
+
+// QIconSet
+#if !defined(QT_NO_ICONSET) && (defined(QT_NO_IMAGEIO) || defined(QT_NO_IMAGE_SMOOTHSCALE) || defined(QT_NO_PALETTE) || defined(QT_NO_IMAGE_HEURISTIC_MASK))
+#define QT_NO_ICONSET
+#endif
+
+// XPM image I/O
+#if !defined(QT_NO_IMAGEIO_XPM) && (defined(QT_NO_IMAGEIO) || defined(QT_NO_SPRINTF) || defined(QT_NO_TEXTSTREAM))
+#define QT_NO_IMAGEIO_XPM
+#endif
+
+// QSizeGrip
+#if !defined(QT_NO_SIZEGRIP) && (defined(QT_NO_STYLE))
+#define QT_NO_SIZEGRIP
+#endif
+
+// Motif style
+#if !defined(QT_NO_STYLE_MOTIF) && (defined(QT_NO_STYLE))
+#define QT_NO_STYLE_MOTIF
+#endif
+
+// Windows style
+#if !defined(QT_NO_STYLE_WINDOWS) && (defined(QT_NO_STYLE))
+#define QT_NO_STYLE_WINDOWS
+#endif
+
+// Internal titlebar widget
+#if !defined(QT_NO_TITLEBAR) && (defined(QT_NO_STYLE))
+#define QT_NO_TITLEBAR
+#endif
+
+// XML
+#if !defined(QT_NO_XML) && (defined(QT_NO_TEXTSTREAM) || defined(QT_NO_TEXTCODEC) || defined(QT_NO_REGEXP_CAPTURE))
+#define QT_NO_XML
+#endif
+
+// Check-boxes
+#if !defined(QT_NO_CHECKBOX) && (defined(QT_NO_BUTTON) || defined(QT_NO_STYLE))
+#define QT_NO_CHECKBOX
+#endif
+
+// Dials
+#if !defined(QT_NO_DIAL) && (defined(QT_NO_RANGECONTROL) || defined(QT_NO_STYLE))
+#define QT_NO_DIAL
+#endif
+
+// QLabel
+#if !defined(QT_NO_LABEL) && (defined(QT_NO_FRAME))
+#define QT_NO_LABEL
+#endif
+
+// QLCDNumber
+#if !defined(QT_NO_LCDNUMBER) && (defined(QT_NO_FRAME))
+#define QT_NO_LCDNUMBER
+#endif
+
+// MIME
+#if !defined(QT_NO_MIME) && (defined(QT_NO_DIR) || defined(QT_NO_IMAGEIO) || defined(QT_NO_TEXTCODEC))
+#define QT_NO_MIME
+#endif
+
+// Printing
+#if !defined(QT_NO_PRINTER) && (defined(QT_NO_TEXTSTREAM) || defined(QT_NO_SPRINTF) || defined(QT_NO_FONTDATABASE) || defined(QT_NO_DATESTRING))
+#define QT_NO_PRINTER
+#endif
+
+// Progress bars
+#if !defined(QT_NO_PROGRESSBAR) && (defined(QT_NO_FRAME))
+#define QT_NO_PROGRESSBAR
+#endif
+
+// Radio-buttons
+#if !defined(QT_NO_RADIOBUTTON) && (defined(QT_NO_BUTTON) || defined(QT_NO_STYLE))
+#define QT_NO_RADIOBUTTON
+#endif
+
+// Internal resize handler
+#if !defined(QT_NO_RESIZEHANDLER) && (defined(QT_NO_FRAME))
+#define QT_NO_RESIZEHANDLER
+#endif
+
+// Scroll bars
+#if !defined(QT_NO_SCROLLBAR) && (defined(QT_NO_RANGECONTROL) || defined(QT_NO_STYLE))
+#define QT_NO_SCROLLBAR
+#endif
+
+// Sliders
+#if !defined(QT_NO_SLIDER) && (defined(QT_NO_RANGECONTROL) || defined(QT_NO_STYLE))
+#define QT_NO_SLIDER
+#endif
+
+// Spinbox control widget
+#if !defined(QT_NO_SPINWIDGET) && (defined(QT_NO_FRAME))
+#define QT_NO_SPINWIDGET
+#endif
+
+// Status bars
+#if !defined(QT_NO_STATUSBAR) && (defined(QT_NO_LAYOUT) || defined(QT_NO_STYLE))
+#define QT_NO_STATUSBAR
+#endif
+
+// Compact Windows style
+#if !defined(QT_NO_STYLE_COMPACT) && (defined(QT_NO_STYLE_WINDOWS))
+#define QT_NO_STYLE_COMPACT
+#endif
+
+// Interlace-friendly style
+#if !defined(QT_NO_STYLE_INTERLACE) && (defined(QT_NO_STYLE_MOTIF))
+#define QT_NO_STYLE_INTERLACE
+#endif
+
+// Platinum style
+#if !defined(QT_NO_STYLE_PLATINUM) && (defined(QT_NO_STYLE_WINDOWS))
+#define QT_NO_STYLE_PLATINUM
+#endif
+
+// Widget stacks
+#if !defined(QT_NO_WIDGETSTACK) && (defined(QT_NO_FRAME))
+#define QT_NO_WIDGETSTACK
+#endif
+
+// Grid layout widgets
+#if !defined(QT_NO_GRID) && (defined(QT_NO_LAYOUT) || defined(QT_NO_FRAME))
+#define QT_NO_GRID
+#endif
+
+// Group boxes
+#if !defined(QT_NO_GROUPBOX) && (defined(QT_NO_FRAME) || defined(QT_NO_LAYOUT))
+#define QT_NO_GROUPBOX
+#endif
+
+// Horizonal box layout widgets
+#if !defined(QT_NO_HBOX) && (defined(QT_NO_LAYOUT) || defined(QT_NO_FRAME))
+#define QT_NO_HBOX
+#endif
+
+// Menu-oriented widgets
+#if !defined(QT_NO_MENUDATA) && (defined(QT_NO_ICONSET) || defined(QT_NO_VARIANT))
+#define QT_NO_MENUDATA
+#endif
+
+// RichText (HTML) display
+#if !defined(QT_NO_RICHTEXT) && (defined(QT_NO_DRAWUTIL) || defined(QT_NO_LAYOUT) || defined(QT_NO_STRINGLIST) || defined(QT_NO_TEXTSTREAM))
+#define QT_NO_RICHTEXT
+#endif
+
+// Splitters
+#if !defined(QT_NO_SPLITTER) && (defined(QT_NO_FRAME) || defined(QT_NO_LAYOUT))
+#define QT_NO_SPLITTER
+#endif
+
+// Table-like widgets
+#if !defined(QT_NO_TABLEVIEW) && (defined(QT_NO_SCROLLBAR))
+#define QT_NO_TABLEVIEW
+#endif
+
+// Tool tips
+#if !defined(QT_NO_TOOLTIP) && (defined(QT_NO_LABEL))
+#define QT_NO_TOOLTIP
+#endif
+
+// Cut and paste
+#if !defined(QT_NO_CLIPBOARD) && (defined(QT_NO_QWS_PROPERTIES) || defined(QT_NO_MIME))
+#define QT_NO_CLIPBOARD
+#endif
+
+// Complex scripts (eg. BiDi)
+#if !defined(QT_NO_COMPLEXTEXT) && (defined(QT_NO_RICHTEXT))
+#define QT_NO_COMPLEXTEXT
+#endif
+
+// Horizontal group boxes
+#if !defined(QT_NO_HGROUPBOX) && (defined(QT_NO_GROUPBOX))
+#define QT_NO_HGROUPBOX
+#endif
+
+// Network file access
+#if !defined(QT_NO_NETWORKPROTOCOL) && (defined(QT_NO_DIR) || defined(QT_NO_TEXTCODEC) || defined(QT_NO_URL))
+#define QT_NO_NETWORKPROTOCOL
+#endif
+
+// Properties
+#if !defined(QT_NO_PROPERTIES) && (defined(QT_NO_VARIANT) || defined(QT_NO_STRINGLIST) || defined(QT_NO_ICONSET))
+#define QT_NO_PROPERTIES
+#endif
+
+// CDE style
+#if !defined(QT_NO_STYLE_CDE) && (defined(QT_NO_STYLE_MOTIF) || defined(QT_NO_TRANSFORMATIONS))
+#define QT_NO_STYLE_CDE
+#endif
+
+// Motif-plus style
+#if !defined(QT_NO_STYLE_MOTIFPLUS) && (defined(QT_NO_STYLE_MOTIF) || defined(QT_NO_TRANSFORMATIONS))
+#define QT_NO_STYLE_MOTIFPLUS
+#endif
+
+// SGI style
+#if !defined(QT_NO_STYLE_SGI) && (defined(QT_NO_STYLE_MOTIF) || defined(QT_NO_TRANSFORMATIONS))
+#define QT_NO_STYLE_SGI
+#endif
+
+// Vertical box layout widgets
+#if !defined(QT_NO_VBOX) && (defined(QT_NO_HBOX))
+#define QT_NO_VBOX
+#endif
+
+// Button groups
+#if !defined(QT_NO_BUTTONGROUP) && (defined(QT_NO_GROUPBOX) || defined(QT_NO_BUTTON))
+#define QT_NO_BUTTONGROUP
+#endif
+
+// Cut and paste non-text
+#if !defined(QT_NO_MIMECLIPBOARD) && (defined(QT_NO_CLIPBOARD))
+#define QT_NO_MIMECLIPBOARD
+#endif
+
+// Aqua style
+#if !defined(QT_NO_STYLE_AQUA) && (defined(QT_NO_STYLE_WINDOWS) || defined(QT_NO_IMAGE_TRANSFORMATION))
+#define QT_NO_STYLE_AQUA
+#endif
+
+// Vertical group boxes
+#if !defined(QT_NO_VGROUPBOX) && (defined(QT_NO_HGROUPBOX))
+#define QT_NO_VGROUPBOX
+#endif
+
+// Horizontal button groups
+#if !defined(QT_NO_HBUTTONGROUP) && (defined(QT_NO_BUTTONGROUP))
+#define QT_NO_HBUTTONGROUP
+#endif
+
+// Server to play sound
+#if !defined(QT_NO_QWS_SOUNDSERVER) && (defined(QT_NO_SOUND) || defined(QT_NO_DIR) || defined(QT_NO_DNS))
+#define QT_NO_QWS_SOUNDSERVER
+#endif
+
+// Hebrew Codec
+#if !defined(QT_NO_CODEC_HEBREW) && (defined(QT_NO_CODECS) || defined(QT_NO_COMPLEXTEXT))
+#define QT_NO_CODEC_HEBREW
+#endif
+
+// Dynamic module linking
+#if !defined(QT_NO_COMPONENT) && (defined(QT_NO_QUUID_STRING) || defined(QT_NO_SETTINGS) || defined(QT_NO_SPRINTF) || defined(QT_NO_LIBRARY))
+#define QT_NO_COMPONENT
+#endif
+
+// QHeader
+#if !defined(QT_NO_HEADER) && (defined(QT_NO_STYLE) || defined(QT_NO_ICONSET))
+#define QT_NO_HEADER
+#endif
+
+// Vertical button groups
+#if !defined(QT_NO_VBUTTONGROUP) && (defined(QT_NO_HBUTTONGROUP))
+#define QT_NO_VBUTTONGROUP
+#endif
+
+// Big Codecs (eg. CJK)
+#if !defined(QT_NO_BIG_CODECS) && (defined(QT_NO_CODEC_HEBREW))
+#define QT_NO_BIG_CODECS
+#endif
+
+// Tool-buttons
+#if !defined(QT_NO_TOOLBUTTON) && (defined(QT_NO_BUTTON) || defined(QT_NO_ICONSET) || defined(QT_NO_STYLE))
+#define QT_NO_TOOLBUTTON
+#endif
+
+// Document Object Model
+#if !defined(QT_NO_DOM) && (defined(QT_NO_XML) || defined(QT_NO_MIME))
+#define QT_NO_DOM
+#endif
+
+// Scrollable view widgets
+#if !defined(QT_NO_SCROLLVIEW) && (defined(QT_NO_SCROLLBAR) || defined(QT_NO_FRAME))
+#define QT_NO_SCROLLVIEW
+#endif
+
+// Tab-bars
+#if !defined(QT_NO_TABBAR) && (defined(QT_NO_TOOLBUTTON))
+#define QT_NO_TABBAR
+#endif
+
+// QTextCodecPlugin
+#if !defined(QT_NO_TEXTCODECPLUGIN) && (defined(QT_NO_COMPONENT) || defined(QT_NO_TEXTCODEC))
+#define QT_NO_TEXTCODECPLUGIN
+#endif
+
+// Drag and drop
+#if !defined(QT_NO_DRAGANDDROP) && (defined(QT_NO_MIME) || defined(QT_NO_QWS_PROPERTIES) || defined(QT_NO_IMAGEIO_XPM))
+#define QT_NO_DRAGANDDROP
+#endif
+
+// QGridView
+#if !defined(QT_NO_GRIDVIEW) && (defined(QT_NO_SCROLLVIEW))
+#define QT_NO_GRIDVIEW
+#endif
+
+// QImageFormatPlugin
+#if !defined(QT_NO_IMAGEFORMATPLUGIN) && (defined(QT_NO_COMPONENT) || defined(QT_NO_IMAGEIO))
+#define QT_NO_IMAGEFORMATPLUGIN
+#endif
+
+// Single-line edits
+#if !defined(QT_NO_LINEEDIT) && (defined(QT_NO_FRAME) || defined(QT_NO_RICHTEXT))
+#define QT_NO_LINEEDIT
+#endif
+
+// Popup-menus
+#if !defined(QT_NO_POPUPMENU) && (defined(QT_NO_MENUDATA) || defined(QT_NO_FRAME))
+#define QT_NO_POPUPMENU
+#endif
+
+// QCanvas
+#if !defined(QT_NO_CANVAS) && (defined(QT_NO_SCROLLVIEW) || defined(QT_NO_BEZIER))
+#define QT_NO_CANVAS
+#endif
+
+// QListBox
+#if !defined(QT_NO_LISTBOX) && (defined(QT_NO_SCROLLVIEW) || defined(QT_NO_STRINGLIST))
+#define QT_NO_LISTBOX
+#endif
+
+// Menu bars
+#if !defined(QT_NO_MENUBAR) && (defined(QT_NO_POPUPMENU))
+#define QT_NO_MENUBAR
+#endif
+
+// HTTP file access
+#if !defined(QT_NO_NETWORKPROTOCOL_HTTP) && (defined(QT_NO_NETWORKPROTOCOL) || defined(QT_NO_DNS))
+#define QT_NO_NETWORKPROTOCOL_HTTP
+#endif
+
+// RichText (HTML) tables and images
+#if !defined(QT_NO_TEXTCUSTOMITEM) && (defined(QT_NO_RICHTEXT) || defined(QT_NO_MIME))
+#define QT_NO_TEXTCUSTOMITEM
+#endif
+
+// QDateTimeEdit
+#if !defined(QT_NO_DATETIMEEDIT) && (defined(QT_NO_RICHTEXT) || defined(QT_NO_SPINWIDGET) || defined(QT_NO_DATESTRING))
+#define QT_NO_DATETIMEEDIT
+#endif
+
+// Push-buttons
+#if !defined(QT_NO_PUSHBUTTON) && (defined(QT_NO_BUTTON) || defined(QT_NO_POPUPMENU))
+#define QT_NO_PUSHBUTTON
+#endif
+
+// FTP file access
+#if !defined(QT_NO_NETWORKPROTOCOL_FTP) && (defined(QT_NO_NETWORKPROTOCOL) || defined(QT_NO_DNS) || defined(QT_NO_TEXTDATE))
+#define QT_NO_NETWORKPROTOCOL_FTP
+#endif
+
+// Scalable Vector Graphics (SVG)
+#if !defined(QT_NO_SVG) && (defined(QT_NO_DOM) || defined(QT_NO_TRANSFORMATIONS) || defined(QT_NO_SPRINTF))
+#define QT_NO_SVG
+#endif
+
+// QWidgetPlugin
+#if !defined(QT_NO_WIDGETPLUGIN) && (defined(QT_NO_COMPONENT) || defined(QT_NO_ICONSET))
+#define QT_NO_WIDGETPLUGIN
+#endif
+
+// QIconView
+#if !defined(QT_NO_ICONVIEW) && (defined(QT_NO_SCROLLVIEW) || defined(QT_NO_IMAGEIO_XPM) || defined(QT_NO_IMAGE_HEURISTIC_MASK))
+#define QT_NO_ICONVIEW
+#endif
+
+// Tab widgets
+#if !defined(QT_NO_TABWIDGET) && (defined(QT_NO_TABBAR) || defined(QT_NO_WIDGETSTACK))
+#define QT_NO_TABWIDGET
+#endif
+
+// "What's this" help
+#if !defined(QT_NO_WHATSTHIS) && (defined(QT_NO_TOOLTIP) || defined(QT_NO_TOOLBUTTON))
+#define QT_NO_WHATSTHIS
+#endif
+
+// Rich text edit
+#if !defined(QT_NO_TEXTEDIT) && (defined(QT_NO_RICHTEXT) || defined(QT_NO_SCROLLVIEW))
+#define QT_NO_TEXTEDIT
+#endif
+
+// Multi-line edits
+#if !defined(QT_NO_MULTILINEEDIT) && (defined(QT_NO_TEXTEDIT))
+#define QT_NO_MULTILINEEDIT
+#endif
+
+// QTextView
+#if !defined(QT_NO_TEXTVIEW) && (defined(QT_NO_TEXTEDIT))
+#define QT_NO_TEXTVIEW
+#endif
+
+// Spin boxes
+#if !defined(QT_NO_SPINBOX) && (defined(QT_NO_RANGECONTROL) || defined(QT_NO_SPINWIDGET) || defined(QT_NO_LINEEDIT) || defined(QT_NO_VALIDATOR))
+#define QT_NO_SPINBOX
+#endif
+
+// QMessageBox
+#if !defined(QT_NO_MESSAGEBOX) && (defined(QT_NO_DIALOG) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_LABEL))
+#define QT_NO_MESSAGEBOX
+#endif
+
+// SQL classes
+#if !defined(QT_NO_SQL) && (defined(QT_NO_MESSAGEBOX))
+#define QT_NO_SQL
+#endif
+
+// QTextBrowser
+#if !defined(QT_NO_TEXTBROWSER) && (defined(QT_NO_TEXTVIEW) || defined(QT_NO_MIME))
+#define QT_NO_TEXTBROWSER
+#endif
+
+// QProgressDialog
+#if !defined(QT_NO_PROGRESSDIALOG) && (defined(QT_NO_SEMIMODAL) || defined(QT_NO_LABEL) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_PROGRESSBAR))
+#define QT_NO_PROGRESSDIALOG
+#endif
+
+// QWizard
+#if !defined(QT_NO_WIZARD) && (defined(QT_NO_DIALOG) || defined(QT_NO_WIDGETSTACK) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_LAYOUT) || defined(QT_NO_LABEL))
+#define QT_NO_WIZARD
+#endif
+
+// QSqlForm
+#if !defined(QT_NO_SQL_FORM) && (defined(QT_NO_SQL) || defined(QT_NO_PROPERTIES))
+#define QT_NO_SQL_FORM
+#endif
+
+// QListView
+#if !defined(QT_NO_LISTVIEW) && (defined(QT_NO_SCROLLVIEW) || defined(QT_NO_HEADER) || defined(QT_NO_LINEEDIT))
+#define QT_NO_LISTVIEW
+#endif
+
+// QTabDialog
+#if !defined(QT_NO_TABDIALOG) && (defined(QT_NO_DIALOG) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_LAYOUT) || defined(QT_NO_TABWIDGET))
+#define QT_NO_TABDIALOG
+#endif
+
+// QComboBox
+#if !defined(QT_NO_COMBOBOX) && (defined(QT_NO_LISTBOX) || defined(QT_NO_LINEEDIT) || defined(QT_NO_POPUPMENU))
+#define QT_NO_COMBOBOX
+#endif
+
+// Main-windows
+#if !defined(QT_NO_MAINWINDOW) && (defined(QT_NO_STRINGLIST) || defined(QT_NO_POPUPMENU) || defined(QT_NO_TITLEBAR) || defined(QT_NO_RESIZEHANDLER) || defined(QT_NO_TOOLBUTTON) || defined(QT_NO_STATUSBAR))
+#define QT_NO_MAINWINDOW
+#endif
+
+// Toolbars
+#if !defined(QT_NO_TOOLBAR) && (defined(QT_NO_MAINWINDOW))
+#define QT_NO_TOOLBAR
+#endif
+
+// QColorDialog
+#if !defined(QT_NO_COLORDIALOG) && (defined(QT_NO_DIALOG) || defined(QT_NO_LABEL) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_LINEEDIT) || defined(QT_NO_VALIDATOR) || defined(QT_NO_GRIDVIEW))
+#define QT_NO_COLORDIALOG
+#endif
+
+// QErrorMessage
+#if !defined(QT_NO_ERRORMESSAGE) && (defined(QT_NO_DIALOG) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_LABEL) || defined(QT_NO_CHECKBOX) || defined(QT_NO_TEXTVIEW))
+#define QT_NO_ERRORMESSAGE
+#endif
+
+// QAction
+#if !defined(QT_NO_ACTION) && (defined(QT_NO_TOOLBUTTON) || defined(QT_NO_COMBOBOX))
+#define QT_NO_ACTION
+#endif
+
+// QWorkSpace
+#if !defined(QT_NO_WORKSPACE) && (defined(QT_NO_SCROLLBAR) || defined(QT_NO_VBOX) || defined(QT_NO_TITLEBAR) || defined(QT_NO_RESIZEHANDLER) || defined(QT_NO_POPUPMENU) || defined(QT_NO_LABEL) || defined(QT_NO_TOOLBUTTON))
+#define QT_NO_WORKSPACE
+#endif
+
+// QTable
+#if !defined(QT_NO_TABLE) && (defined(QT_NO_COMBOBOX) || defined(QT_NO_HEADER) || defined(QT_NO_CHECKBOX))
+#define QT_NO_TABLE
+#endif
+
+// QFontDialog
+#if !defined(QT_NO_FONTDIALOG) && (defined(QT_NO_DIALOG) || defined(QT_NO_FONTDATABASE) || defined(QT_NO_COMBOBOX) || defined(QT_NO_LABEL) || defined(QT_NO_CHECKBOX) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_VGROUPBOX))
+#define QT_NO_FONTDIALOG
+#endif
+
+// QInputDialog
+#if !defined(QT_NO_INPUTDIALOG) && (defined(QT_NO_DIALOG) || defined(QT_NO_COMBOBOX) || defined(QT_NO_LABEL) || defined(QT_NO_PUSHBUTTON) || defined(QT_NO_SPINBOX) || defined(QT_NO_WIDGETSTACK))
+#define QT_NO_INPUTDIALOG
+#endif
+
+// SQL value editor widgets
+#if !defined(QT_NO_SQL_EDIT_WIDGETS) && (defined(QT_NO_SQL) || defined(QT_NO_SPINBOX) || defined(QT_NO_COMBOBOX) || defined(QT_NO_CHECKBOX) || defined(QT_NO_DATETIMEEDIT))
+#define QT_NO_SQL_EDIT_WIDGETS
+#endif
+
+// QPrintDialog
+#if !defined(QT_NO_PRINTDIALOG) && (defined(QT_NO_DIALOG) || defined(QT_NO_LISTVIEW) || defined(QT_NO_PRINTER) || defined(QT_NO_COMBOBOX) || defined(QT_NO_LABEL) || defined(QT_NO_BUTTONGROUP) || defined(QT_NO_SPINBOX) || defined(QT_NO_RADIOBUTTON) || defined(QT_NO_PUSHBUTTON))
+#define QT_NO_PRINTDIALOG
+#endif
+
+// QFileDialog
+#if !defined(QT_NO_FILEDIALOG) && (defined(QT_NO_MESSAGEBOX) || defined(QT_NO_LISTVIEW) || defined(QT_NO_NETWORKPROTOCOL) || defined(QT_NO_COMBOBOX) || defined(QT_NO_SEMIMODAL) || defined(QT_NO_REGEXP_CAPTURE) || defined(QT_NO_TOOLBUTTON) || defined(QT_NO_BUTTONGROUP) || defined(QT_NO_VBOX) || defined(QT_NO_SPLITTER) || defined(QT_NO_PROGRESSBAR) || defined(QT_NO_WIDGETSTACK) || defined(QT_NO_DATESTRING))
+#define QT_NO_FILEDIALOG
+#endif
+
+// SQL table widgets
+#if !defined(QT_NO_SQL_VIEW_WIDGETS) && (defined(QT_NO_SQL_FORM) || defined(QT_NO_SQL_EDIT_WIDGETS) || defined(QT_NO_TABLE))
+#define QT_NO_SQL_VIEW_WIDGETS
+#endif
+
diff --git a/qmake/include/qfile.h b/qmake/include/qfile.h
new file mode 100644
index 0000000..14a917b
--- a/dev/null
+++ b/qmake/include/qfile.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QFile class
+**
+** Created : 930831
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QFILE_H
+#define QFILE_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#include <stdio.h>
+#endif // QT_H
+
+class QDir;
+
+
+class Q_EXPORT QFile : public QIODevice // file I/O device class
+{
+public:
+ QFile();
+ QFile( const QString &name );
+ ~QFile();
+
+ QString name() const;
+ void setName( const QString &name );
+
+ typedef QCString (*EncoderFn)( const QString &fileName );
+ typedef QString (*DecoderFn)( const QCString &localfileName );
+ static QCString encodeName( const QString &fileName );
+ static QString decodeName( const QCString &localFileName );
+ static void setEncodingFunction( EncoderFn );
+ static void setDecodingFunction( DecoderFn );
+
+ bool exists() const;
+ static bool exists( const QString &fileName );
+
+ bool remove();
+ static bool remove( const QString &fileName );
+
+ bool open( int );
+ bool open( int, FILE * );
+ bool open( int, int );
+ void close();
+ void flush();
+
+ Offset size() const;
+ Offset at() const;
+ bool at( Offset );
+ bool atEnd() const;
+
+ Q_LONG readBlock( char *data, Q_ULONG len );
+ Q_LONG writeBlock( const char *data, Q_ULONG len );
+ Q_LONG writeBlock( const QByteArray& data )
+ { return QIODevice::writeBlock(data); }
+ Q_LONG readLine( char *data, Q_ULONG maxlen );
+ Q_LONG readLine( QString &, Q_ULONG maxlen );
+
+ int getch();
+ int putch( int );
+ int ungetch( int );
+
+ int handle() const;
+
+protected:
+ QString fn;
+ FILE *fh;
+ int fd;
+ Offset length;
+ bool ext_f;
+ void * d;
+
+private:
+ void init();
+ QCString ungetchBuffer;
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QFile( const QFile & );
+ QFile &operator=( const QFile & );
+#endif
+};
+
+
+inline QString QFile::name() const
+{ return fn; }
+
+inline QIODevice::Offset QFile::at() const
+{ return ioIndex; }
+
+
+#endif // QFILE_H
diff --git a/qmake/include/qfileinfo.h b/qmake/include/qfileinfo.h
new file mode 100644
index 0000000..d6605b6
--- a/dev/null
+++ b/qmake/include/qfileinfo.h
@@ -0,0 +1,150 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QFileInfo class
+**
+** Created : 950628
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QFILEINFO_H
+#define QFILEINFO_H
+
+#ifndef QT_H
+#include "qfile.h"
+#include "qdatetime.h"
+#endif // QT_H
+
+
+class QDir;
+struct QFileInfoCache;
+
+
+class Q_EXPORT QFileInfo
+{
+public:
+ enum PermissionSpec {
+ ReadUser = 0400, WriteUser = 0200, ExeUser = 0100,
+ ReadGroup = 0040, WriteGroup = 0020, ExeGroup = 0010,
+ ReadOther = 0004, WriteOther = 0002, ExeOther = 0001 };
+
+ QFileInfo();
+ QFileInfo( const QString &file );
+ QFileInfo( const QFile & );
+#ifndef QT_NO_DIR
+ QFileInfo( const QDir &, const QString &fileName );
+#endif
+ QFileInfo( const QFileInfo & );
+ ~QFileInfo();
+
+ QFileInfo &operator=( const QFileInfo & );
+
+ void setFile( const QString &file );
+ void setFile( const QFile & );
+#ifndef QT_NO_DIR
+ void setFile( const QDir &, const QString &fileName );
+#endif
+ bool exists() const;
+ void refresh() const;
+ bool caching() const;
+ void setCaching( bool );
+
+ QString filePath() const;
+ QString fileName() const;
+#ifndef QT_NO_DIR //###
+ QString absFilePath() const;
+#endif
+ QString baseName( bool complete = FALSE ) const;
+ QString extension( bool complete = TRUE ) const;
+
+#ifndef QT_NO_DIR //###
+ QString dirPath( bool absPath = FALSE ) const;
+#endif
+#ifndef QT_NO_DIR
+ QDir dir( bool absPath = FALSE ) const;
+#endif
+ bool isReadable() const;
+ bool isWritable() const;
+ bool isExecutable() const;
+ bool isHidden() const;
+
+#ifndef QT_NO_DIR //###
+ bool isRelative() const;
+ bool convertToAbs();
+#endif
+
+ bool isFile() const;
+ bool isDir() const;
+ bool isSymLink() const;
+
+ QString readLink() const;
+
+ QString owner() const;
+ uint ownerId() const;
+ QString group() const;
+ uint groupId() const;
+
+ bool permission( int permissionSpec ) const;
+
+#if (QT_VERSION-0 >= 0x040000)
+#error "QFileInfo::size() should return QIODevice::Offset instead of uint"
+#elif defined(QT_ABI_QT4)
+ QIODevice::Offset size() const;
+#else
+ uint size() const;
+#endif
+
+ QDateTime created() const;
+ QDateTime lastModified() const;
+ QDateTime lastRead() const;
+
+private:
+ void doStat() const;
+ static void slashify( QString & );
+ static void makeAbs( QString & );
+
+ QString fn;
+ QFileInfoCache *fic;
+ bool cache;
+#if defined(Q_OS_UNIX)
+ bool symLink;
+#endif
+
+};
+
+
+inline bool QFileInfo::caching() const
+{
+ return cache;
+}
+
+
+#endif // QFILEINFO_H
diff --git a/qmake/include/qgarray.h b/qmake/include/qgarray.h
new file mode 100644
index 0000000..12edea6
--- a/dev/null
+++ b/qmake/include/qgarray.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QGArray class
+**
+** Created : 930906
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGARRAY_H
+#define QGARRAY_H
+
+#ifndef QT_H
+#include "qshared.h"
+#endif // QT_H
+
+
+class Q_EXPORT QGArray // generic array
+{
+friend class QBuffer;
+public:
+ //### DO NOT USE THIS. IT IS PUBLIC BUT DO NOT USE IT IN NEW CODE.
+ struct array_data : public QShared { // shared array
+ array_data() { data=0; len=0; }
+ char *data; // actual array data
+ uint len;
+ };
+ QGArray();
+protected:
+ QGArray( int, int ); // dummy; does not alloc
+ QGArray( int size ); // allocate 'size' bytes
+ QGArray( const QGArray &a ); // shallow copy
+ virtual ~QGArray();
+
+ QGArray &operator=( const QGArray &a ) { return assign( a ); }
+
+ virtual void detach() { duplicate(*this); }
+
+ // ### Qt 4.0: maybe provide two versions of data(), at(), etc.
+ char *data() const { return shd->data; }
+ uint nrefs() const { return shd->count; }
+ uint size() const { return shd->len; }
+ bool isEqual( const QGArray &a ) const;
+
+ bool resize( uint newsize );
+
+ bool fill( const char *d, int len, uint sz );
+
+ QGArray &assign( const QGArray &a );
+ QGArray &assign( const char *d, uint len );
+ QGArray &duplicate( const QGArray &a );
+ QGArray &duplicate( const char *d, uint len );
+ void store( const char *d, uint len );
+
+ array_data *sharedBlock() const { return shd; }
+ void setSharedBlock( array_data *p ) { shd=(array_data*)p; }
+
+ QGArray &setRawData( const char *d, uint len );
+ void resetRawData( const char *d, uint len );
+
+ int find( const char *d, uint index, uint sz ) const;
+ int contains( const char *d, uint sz ) const;
+
+ void sort( uint sz );
+ int bsearch( const char *d, uint sz ) const;
+
+ char *at( uint index ) const;
+
+ bool setExpand( uint index, const char *d, uint sz );
+
+protected:
+ virtual array_data *newData();
+ virtual void deleteData( array_data *p );
+
+private:
+ static void msg_index( uint );
+ array_data *shd;
+};
+
+
+inline char *QGArray::at( uint index ) const
+{
+#if defined(QT_CHECK_RANGE)
+ if ( index >= size() ) {
+ msg_index( index );
+ index = 0;
+ }
+#endif
+ return &shd->data[index];
+}
+
+
+#endif // QGARRAY_H
diff --git a/qmake/include/qgcache.h b/qmake/include/qgcache.h
new file mode 100644
index 0000000..093f7a7
--- a/dev/null
+++ b/qmake/include/qgcache.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QGCache and QGCacheIterator classes
+**
+** Created : 950208
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGCACHE_H
+#define QGCACHE_H
+
+#ifndef QT_H
+#include "qptrcollection.h"
+#include "qglist.h"
+#include "qgdict.h"
+#endif // QT_H
+
+
+class QCList; // internal classes
+class QCListIt;
+class QCDict;
+
+
+class Q_EXPORT QGCache : public QPtrCollection // generic LRU cache
+{
+friend class QGCacheIterator;
+protected:
+ enum KeyType { StringKey, AsciiKey, IntKey, PtrKey };
+ // identical to QGDict's, but PtrKey is not used at the moment
+
+ QGCache( int maxCost, uint size, KeyType kt, bool caseSensitive,
+ bool copyKeys );
+ QGCache( const QGCache & ); // not allowed, calls fatal()
+ ~QGCache();
+ QGCache &operator=( const QGCache & ); // not allowed, calls fatal()
+
+ uint count() const;
+ uint size() const;
+ int maxCost() const { return mCost; }
+ int totalCost() const { return tCost; }
+ void setMaxCost( int maxCost );
+ void clear();
+
+ bool insert_string( const QString &key, QPtrCollection::Item,
+ int cost, int priority );
+ bool insert_other( const char *key, QPtrCollection::Item,
+ int cost, int priority );
+ bool remove_string( const QString &key );
+ bool remove_other( const char *key );
+ QPtrCollection::Item take_string( const QString &key );
+ QPtrCollection::Item take_other( const char *key );
+
+ QPtrCollection::Item find_string( const QString &key, bool ref=TRUE ) const;
+ QPtrCollection::Item find_other( const char *key, bool ref=TRUE ) const;
+
+ void statistics() const;
+
+private:
+ bool makeRoomFor( int cost, int priority = -1 );
+ KeyType keytype;
+ QCList *lruList;
+ QCDict *dict;
+ int mCost;
+ int tCost;
+ bool copyk;
+};
+
+
+class Q_EXPORT QGCacheIterator // generic cache iterator
+{
+protected:
+ QGCacheIterator( const QGCache & );
+ QGCacheIterator( const QGCacheIterator & );
+ ~QGCacheIterator();
+ QGCacheIterator &operator=( const QGCacheIterator & );
+
+ uint count() const;
+ bool atFirst() const;
+ bool atLast() const;
+ QPtrCollection::Item toFirst();
+ QPtrCollection::Item toLast();
+
+ QPtrCollection::Item get() const;
+ QString getKeyString() const;
+ const char *getKeyAscii() const;
+ long getKeyInt() const;
+
+ QPtrCollection::Item operator()();
+ QPtrCollection::Item operator++();
+ QPtrCollection::Item operator+=( uint );
+ QPtrCollection::Item operator--();
+ QPtrCollection::Item operator-=( uint );
+
+protected:
+ QCListIt *it; // iterator on cache list
+};
+
+
+#endif // QGCACHE_H
diff --git a/qmake/include/qgdict.h b/qmake/include/qgdict.h
new file mode 100644
index 0000000..40b4568
--- a/dev/null
+++ b/qmake/include/qgdict.h
@@ -0,0 +1,222 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QGDict and QGDictIterator classes
+**
+** Created : 920529
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGDICT_H
+#define QGDICT_H
+
+#ifndef QT_H
+#include "qptrcollection.h"
+#include "qstring.h"
+#endif // QT_H
+
+class QGDictIterator;
+class QGDItList;
+
+
+class QBaseBucket // internal dict node
+{
+public:
+ QPtrCollection::Item getData() { return data; }
+ QPtrCollection::Item setData( QPtrCollection::Item d ) { return data = d; }
+ QBaseBucket *getNext() { return next; }
+ void setNext( QBaseBucket *n) { next = n; }
+protected:
+ QBaseBucket( QPtrCollection::Item d, QBaseBucket *n ) : data(d), next(n) {}
+ QPtrCollection::Item data;
+ QBaseBucket *next;
+};
+
+class QStringBucket : public QBaseBucket
+{
+public:
+ QStringBucket( const QString &k, QPtrCollection::Item d, QBaseBucket *n )
+ : QBaseBucket(d,n), key(k) {}
+ const QString &getKey() const { return key; }
+private:
+ QString key;
+};
+
+class QAsciiBucket : public QBaseBucket
+{
+public:
+ QAsciiBucket( const char *k, QPtrCollection::Item d, QBaseBucket *n )
+ : QBaseBucket(d,n), key(k) {}
+ const char *getKey() const { return key; }
+private:
+ const char *key;
+};
+
+class QIntBucket : public QBaseBucket
+{
+public:
+ QIntBucket( long k, QPtrCollection::Item d, QBaseBucket *n )
+ : QBaseBucket(d,n), key(k) {}
+ long getKey() const { return key; }
+private:
+ long key;
+};
+
+class QPtrBucket : public QBaseBucket
+{
+public:
+ QPtrBucket( void *k, QPtrCollection::Item d, QBaseBucket *n )
+ : QBaseBucket(d,n), key(k) {}
+ void *getKey() const { return key; }
+private:
+ void *key;
+};
+
+
+class Q_EXPORT QGDict : public QPtrCollection // generic dictionary class
+{
+public:
+ uint count() const { return numItems; }
+ uint size() const { return vlen; }
+ QPtrCollection::Item look_string( const QString& key, QPtrCollection::Item,
+ int );
+ QPtrCollection::Item look_ascii( const char *key, QPtrCollection::Item, int );
+ QPtrCollection::Item look_int( long key, QPtrCollection::Item, int );
+ QPtrCollection::Item look_ptr( void *key, QPtrCollection::Item, int );
+#ifndef QT_NO_DATASTREAM
+ QDataStream &read( QDataStream & );
+ QDataStream &write( QDataStream & ) const;
+#endif
+protected:
+ enum KeyType { StringKey, AsciiKey, IntKey, PtrKey };
+
+ QGDict( uint len, KeyType kt, bool cs, bool ck );
+ QGDict( const QGDict & );
+ ~QGDict();
+
+ QGDict &operator=( const QGDict & );
+
+ bool remove_string( const QString &key, QPtrCollection::Item item=0 );
+ bool remove_ascii( const char *key, QPtrCollection::Item item=0 );
+ bool remove_int( long key, QPtrCollection::Item item=0 );
+ bool remove_ptr( void *key, QPtrCollection::Item item=0 );
+ QPtrCollection::Item take_string( const QString &key );
+ QPtrCollection::Item take_ascii( const char *key );
+ QPtrCollection::Item take_int( long key );
+ QPtrCollection::Item take_ptr( void *key );
+
+ void clear();
+ void resize( uint );
+
+ int hashKeyString( const QString & );
+ int hashKeyAscii( const char * );
+
+ void statistics() const;
+
+#ifndef QT_NO_DATASTREAM
+ virtual QDataStream &read( QDataStream &, QPtrCollection::Item & );
+ virtual QDataStream &write( QDataStream &, QPtrCollection::Item ) const;
+#endif
+private:
+ QBaseBucket **vec;
+ uint vlen;
+ uint numItems;
+ uint keytype : 2;
+ uint cases : 1;
+ uint copyk : 1;
+ QGDItList *iterators;
+ void unlink_common( int, QBaseBucket *, QBaseBucket * );
+ QStringBucket *unlink_string( const QString &,
+ QPtrCollection::Item item = 0 );
+ QAsciiBucket *unlink_ascii( const char *, QPtrCollection::Item item = 0 );
+ QIntBucket *unlink_int( long, QPtrCollection::Item item = 0 );
+ QPtrBucket *unlink_ptr( void *, QPtrCollection::Item item = 0 );
+ void init( uint, KeyType, bool, bool );
+ friend class QGDictIterator;
+};
+
+
+class Q_EXPORT QGDictIterator // generic dictionary iterator
+{
+friend class QGDict;
+public:
+ QGDictIterator( const QGDict & );
+ QGDictIterator( const QGDictIterator & );
+ QGDictIterator &operator=( const QGDictIterator & );
+ ~QGDictIterator();
+
+ QPtrCollection::Item toFirst();
+
+ QPtrCollection::Item get() const;
+ QString getKeyString() const;
+ const char *getKeyAscii() const;
+ long getKeyInt() const;
+ void *getKeyPtr() const;
+
+ QPtrCollection::Item operator()();
+ QPtrCollection::Item operator++();
+ QPtrCollection::Item operator+=(uint);
+
+protected:
+ QGDict *dict;
+
+private:
+ QBaseBucket *curNode;
+ uint curIndex;
+};
+
+inline QPtrCollection::Item QGDictIterator::get() const
+{
+ return curNode ? curNode->getData() : 0;
+}
+
+inline QString QGDictIterator::getKeyString() const
+{
+ return curNode ? ((QStringBucket*)curNode)->getKey() : QString::null;
+}
+
+inline const char *QGDictIterator::getKeyAscii() const
+{
+ return curNode ? ((QAsciiBucket*)curNode)->getKey() : 0;
+}
+
+inline long QGDictIterator::getKeyInt() const
+{
+ return curNode ? ((QIntBucket*)curNode)->getKey() : 0;
+}
+
+inline void *QGDictIterator::getKeyPtr() const
+{
+ return curNode ? ((QPtrBucket*)curNode)->getKey() : 0;
+}
+
+
+#endif // QGDICT_H
diff --git a/qmake/include/qglist.h b/qmake/include/qglist.h
new file mode 100644
index 0000000..d6db3ed
--- a/dev/null
+++ b/qmake/include/qglist.h
@@ -0,0 +1,252 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QGList and QGListIterator classes
+**
+** Created : 920624
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGLIST_H
+#define QGLIST_H
+
+#ifndef QT_H
+#include "qptrcollection.h"
+#endif // QT_H
+
+class Q_EXPORT QLNode
+{
+friend class QGList;
+friend class QGListIterator;
+public:
+ QPtrCollection::Item getData() { return data; }
+private:
+ QPtrCollection::Item data;
+ QLNode *prev;
+ QLNode *next;
+ QLNode( QPtrCollection::Item d ) { data = d; }
+};
+
+class QGListIteratorList; // internal helper class
+
+class Q_EXPORT QGList : public QPtrCollection // doubly linked generic list
+{
+friend class QGListIterator;
+friend class QGListIteratorList;
+friend class QGVector; // needed by QGVector::toList
+public:
+ uint count() const; // return number of nodes
+
+#ifndef QT_NO_DATASTREAM
+ QDataStream &read( QDataStream & ); // read list from stream
+ QDataStream &write( QDataStream & ) const; // write list to stream
+#endif
+protected:
+ QGList(); // create empty list
+ QGList( const QGList & ); // make copy of other list
+ virtual ~QGList();
+
+ QGList &operator=( const QGList & ); // assign from other list
+ bool operator==( const QGList& ) const;
+
+ void inSort( QPtrCollection::Item ); // add item sorted in list
+ void append( QPtrCollection::Item ); // add item at end of list
+ bool insertAt( uint index, QPtrCollection::Item ); // add item at i'th position
+ void relinkNode( QLNode * ); // relink as first item
+ bool removeNode( QLNode * ); // remove node
+ bool remove( QPtrCollection::Item = 0 ); // remove item (0=current)
+ bool removeRef( QPtrCollection::Item = 0 ); // remove item (0=current)
+ bool removeFirst(); // remove first item
+ bool removeLast(); // remove last item
+ bool removeAt( uint ); // remove item at i'th position
+ bool replaceAt( uint, QPtrCollection::Item ); // replace item at position i with item
+ QPtrCollection::Item takeNode( QLNode * ); // take out node
+ QPtrCollection::Item take(); // take out current item
+ QPtrCollection::Item takeAt( uint index ); // take out item at i'th pos
+ QPtrCollection::Item takeFirst(); // take out first item
+ QPtrCollection::Item takeLast(); // take out last item
+
+ void sort(); // sort all items;
+ void clear(); // remove all items
+
+ int findRef( QPtrCollection::Item, bool = TRUE ); // find exact item in list
+ int find( QPtrCollection::Item, bool = TRUE ); // find equal item in list
+
+ uint containsRef( QPtrCollection::Item ) const; // get number of exact matches
+ uint contains( QPtrCollection::Item ) const; // get number of equal matches
+
+ QPtrCollection::Item at( uint index ); // access item at i'th pos
+ int at() const; // get current index
+ QLNode *currentNode() const; // get current node
+
+ QPtrCollection::Item get() const; // get current item
+
+ QPtrCollection::Item cfirst() const; // get ptr to first list item
+ QPtrCollection::Item clast() const; // get ptr to last list item
+ QPtrCollection::Item first(); // set first item in list curr
+ QPtrCollection::Item last(); // set last item in list curr
+ QPtrCollection::Item next(); // set next item in list curr
+ QPtrCollection::Item prev(); // set prev item in list curr
+
+ void toVector( QGVector * ) const; // put items in vector
+
+ virtual int compareItems( QPtrCollection::Item, QPtrCollection::Item );
+
+#ifndef QT_NO_DATASTREAM
+ virtual QDataStream &read( QDataStream &, QPtrCollection::Item & );
+ virtual QDataStream &write( QDataStream &, QPtrCollection::Item ) const;
+#endif
+private:
+ void prepend( QPtrCollection::Item ); // add item at start of list
+
+ void heapSortPushDown( QPtrCollection::Item* heap, int first, int last );
+
+ QLNode *firstNode; // first node
+ QLNode *lastNode; // last node
+ QLNode *curNode; // current node
+ int curIndex; // current index
+ uint numNodes; // number of nodes
+ QGListIteratorList *iterators; // list of iterators
+
+ QLNode *locate( uint ); // get node at i'th pos
+ QLNode *unlink(); // unlink node
+};
+
+
+inline uint QGList::count() const
+{
+ return numNodes;
+}
+
+inline bool QGList::removeFirst()
+{
+ first();
+ return remove();
+}
+
+inline bool QGList::removeLast()
+{
+ last();
+ return remove();
+}
+
+inline int QGList::at() const
+{
+ return curIndex;
+}
+
+inline QPtrCollection::Item QGList::at( uint index )
+{
+ QLNode *n = locate( index );
+ return n ? n->data : 0;
+}
+
+inline QLNode *QGList::currentNode() const
+{
+ return curNode;
+}
+
+inline QPtrCollection::Item QGList::get() const
+{
+ return curNode ? curNode->data : 0;
+}
+
+inline QPtrCollection::Item QGList::cfirst() const
+{
+ return firstNode ? firstNode->data : 0;
+}
+
+inline QPtrCollection::Item QGList::clast() const
+{
+ return lastNode ? lastNode->data : 0;
+}
+
+
+/*****************************************************************************
+ QGList stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator>>( QDataStream &, QGList & );
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QGList & );
+#endif
+
+/*****************************************************************************
+ QGListIterator class
+ *****************************************************************************/
+
+class Q_EXPORT QGListIterator // QGList iterator
+{
+friend class QGList;
+friend class QGListIteratorList;
+protected:
+ QGListIterator( const QGList & );
+ QGListIterator( const QGListIterator & );
+ QGListIterator &operator=( const QGListIterator & );
+ ~QGListIterator();
+
+ bool atFirst() const; // test if at first item
+ bool atLast() const; // test if at last item
+ QPtrCollection::Item toFirst(); // move to first item
+ QPtrCollection::Item toLast(); // move to last item
+
+ QPtrCollection::Item get() const; // get current item
+ QPtrCollection::Item operator()(); // get current and move to next
+ QPtrCollection::Item operator++(); // move to next item (prefix)
+ QPtrCollection::Item operator+=(uint); // move n positions forward
+ QPtrCollection::Item operator--(); // move to prev item (prefix)
+ QPtrCollection::Item operator-=(uint); // move n positions backward
+
+protected:
+ QGList *list; // reference to list
+
+private:
+ QLNode *curNode; // current node in list
+};
+
+
+inline bool QGListIterator::atFirst() const
+{
+ return curNode == list->firstNode;
+}
+
+inline bool QGListIterator::atLast() const
+{
+ return curNode == list->lastNode;
+}
+
+inline QPtrCollection::Item QGListIterator::get() const
+{
+ return curNode ? curNode->data : 0;
+}
+
+
+#endif // QGLIST_H
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h
new file mode 100644
index 0000000..13cff64
--- a/dev/null
+++ b/qmake/include/qglobal.h
@@ -0,0 +1,1006 @@
+/****************************************************************************
+** $Id$
+**
+** Global type declarations and definitions
+**
+** Created : 920529
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGLOBAL_H
+#define QGLOBAL_H
+
+#define QT_VERSION_STR "3.1.0-b2"
+/*
+ QT_VERSION is (major << 16) + (minor << 8) + patch.
+ */
+#define QT_VERSION 0x030100
+
+/*
+ The operating system, must be one of: (Q_OS_x)
+
+ MACX - Mac OS X
+ MAC9 - Mac OS 9
+ MSDOS - MS-DOS and Windows
+ OS2 - OS/2
+ OS2EMX - XFree86 on OS/2 (not PM)
+ WIN32 - Win32 (Windows 95/98/ME and Windows NT/2000/XP)
+ CYGWIN - Cygwin
+ SOLARIS - Sun Solaris
+ HPUX - HP-UX
+ ULTRIX - DEC Ultrix
+ LINUX - Linux
+ FREEBSD - FreeBSD
+ NETBSD - NetBSD
+ OPENBSD - OpenBSD
+ BSDI - BSD/OS
+ IRIX - SGI Irix
+ OSF - HP Tru64 UNIX
+ SCO - SCO OpenServer 5
+ UNIXWARE - UnixWare 7, Open UNIX 8
+ AIX - AIX
+ HURD - GNU Hurd
+ DGUX - DG/UX
+ RELIANT - Reliant UNIX
+ DYNIX - DYNIX/ptx
+ QNX - QNX
+ QNX6 - QNX RTP 6.1
+ LYNX - LynxOS
+ BSD4 - Any BSD 4.4 system
+ UNIX - Any UNIX BSD/SYSV system
+*/
+
+#if defined(__APPLE__) && defined(__GNUC__)
+# define Q_OS_MACX
+#elif defined(__MACOSX__)
+# define Q_OS_MACX
+#elif defined(macintosh)
+# define Q_OS_MAC9
+#elif defined(__CYGWIN__)
+# define Q_OS_CYGWIN
+#elif defined(MSDOS) || defined(_MSDOS)
+# define Q_OS_MSDOS
+#elif defined(__OS2__)
+# if defined(__EMX__)
+# define Q_OS_OS2EMX
+# else
+# define Q_OS_OS2
+# endif
+#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
+# define Q_OS_WIN32
+# define Q_OS_WIN64
+#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
+# define Q_OS_WIN32
+#elif defined(__MWERKS__) && defined(__INTEL__)
+# define Q_OS_WIN32
+#elif defined(__sun) || defined(sun)
+# define Q_OS_SOLARIS
+#elif defined(hpux) || defined(__hpux)
+# define Q_OS_HPUX
+#elif defined(__ultrix) || defined(ultrix)
+# define Q_OS_ULTRIX
+#elif defined(sinix)
+# define Q_OS_RELIANT
+#elif defined(__linux__) || defined(__linux)
+# define Q_OS_LINUX
+#elif defined(__FreeBSD__)
+# define Q_OS_FREEBSD
+# define Q_OS_BSD4
+#elif defined(__NetBSD__)
+# define Q_OS_NETBSD
+# define Q_OS_BSD4
+#elif defined(__OpenBSD__)
+# define Q_OS_OPENBSD
+# define Q_OS_BSD4
+#elif defined(__bsdi__)
+# define Q_OS_BSDI
+# define Q_OS_BSD4
+#elif defined(__sgi)
+# define Q_OS_IRIX
+#elif defined(__osf__)
+# define Q_OS_OSF
+#elif defined(_AIX)
+# define Q_OS_AIX
+#elif defined(__Lynx__)
+# define Q_OS_LYNX
+#elif defined(__GNU_HURD__)
+# define Q_OS_HURD
+#elif defined(__DGUX__)
+# define Q_OS_DGUX
+#elif defined(__QNXNTO__)
+# define Q_OS_QNX6
+#elif defined(__QNX__)
+# define Q_OS_QNX
+#elif defined(_SEQUENT_)
+# define Q_OS_DYNIX
+#elif defined(_SCO_DS) /* SCO OpenServer 5 */
+# define Q_OS_SCO
+#elif defined(__UNIXWARE__) /* UnixWare 7 + GCC, Open UNIX 8 + GCC */
+# define Q_OS_UNIXWARE
+# define Q_OS_UNIXWARE7
+#elif defined(__USLC__) /* UnixWare 7 + UDK, Open UNIX 8 + OUDK */
+# define Q_OS_UNIXWARE
+# define Q_OS_UNIXWARE7
+#else
+# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
+#endif
+
+#if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
+# define Q_OS_MAC
+#endif
+
+#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
+# undef Q_OS_UNIX
+#elif !defined(Q_OS_UNIX)
+# define Q_OS_UNIX
+#endif
+
+
+/*
+ The compiler, must be one of: (Q_CC_x)
+
+ SYM - Symantec C++ for both PC and Macintosh
+ MPW - MPW C++
+ MWERKS - Metrowerks CodeWarrior
+ MSVC - Microsoft Visual C/C++
+ BOR - Borland/Turbo C++
+ WAT - Watcom C++
+ GNU - GNU C++
+ COMEAU - Comeau C++
+ EDG - Edison Design Group C++
+ OC - CenterLine C++
+ SUN - Sun WorkShop, Forte Developer, or Sun ONE Studio C++
+ MIPS - MIPSpro C++
+ DEC - DEC C++
+ HP - HPUX C++
+ HPACC - HPUX ANSI C++
+ USLC - SCO OUDK, UDK, and UnixWare 2.X C++
+ CDS - Reliant C++
+ KAI - KAI C++
+ INTEL - Intel C++
+ HIGHC - MetaWare High C/C++
+ PGI - Portland Group C++
+ GHS - Green Hills Optimizing C++ Compilers
+
+ Should be sorted most to least authoritative.
+*/
+
+/* Symantec C++ is now Digital Mars */
+#if defined(__DMC__) || defined(__SC__)
+# define Q_CC_SYM
+/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */
+# if defined(__SC__) && __SC__ < 0x750
+# define Q_NO_EXPLICIT_KEYWORD
+# endif
+# define Q_NO_USING_KEYWORD
+# if !defined(_CPPUNWIND)
+# define Q_NO_EXCEPTIONS
+# endif
+
+#elif defined(applec)
+# define Q_CC_MPW
+# define Q_NO_BOOL_TYPE
+# define Q_NO_EXPLICIT_KEYWORD
+# define Q_NO_USING_KEYWORD
+
+#elif defined(__MWERKS__)
+# define Q_CC_MWERKS
+/* "explicit" recognized since 4.0d1 */
+# define QMAC_PASCAL pascal
+# define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+#elif defined(_MSC_VER)
+# define Q_CC_MSVC
+/* proper support of bool for _MSC_VER >= 1100 */
+# define Q_CANNOT_DELETE_CONSTANT
+# define Q_INLINE_TEMPLATES inline
+/* Visual C++.Net issues for _MSC_VER >= 1300 */
+# if _MSC_VER >= 1300
+# define Q_CC_MSVC_NET
+# define Q_TYPENAME
+# endif
+# define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+#elif defined(__BORLANDC__) || defined(__TURBOC__)
+# define Q_CC_BOR
+# if __BORLANDC__ < 0x502
+# define Q_NO_BOOL_TYPE
+# define Q_NO_EXPLICIT_KEYWORD
+# endif
+# define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+#elif defined(__WATCOMC__)
+# define Q_CC_WAT
+# if defined(Q_OS_QNX4)
+/* compiler flags */
+# define Q_TYPENAME
+# define Q_NO_BOOL_TYPE
+# define Q_CANNOT_DELETE_CONSTANT
+# define mutable
+/* ??? */
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+/* no template classes in QVariant */
+# define QT_NO_TEMPLATE_VARIANT
+/* Wcc does not fill in functions needed by valuelists, maps, and
+ valuestacks implicitly */
+# define Q_FULL_TEMPLATE_INSTANTIATION
+/* can we just compare the structures? */
+# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP
+/* these are not useful to our customers */
+# define QT_QWS_NO_SHM
+# define QT_NO_QWS_MULTIPROCESS
+# define QT_NO_SQL
+# define QT_NO_QWS_CURSOR
+# endif
+
+#elif defined(__GNUC__)
+# define Q_CC_GNU
+# define Q_C_CALLBACKS
+# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
+# define Q_FULL_TEMPLATE_INSTANTIATION
+# endif
+/* GCC 2.95 knows "using" but does not support it correctly */
+# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
+# define Q_NO_USING_KEYWORD
+# endif
+# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
+# define Q_PACKED __attribute__ ((packed))
+# endif
+# if !defined(__EXCEPTIONS)
+# define Q_NO_EXCEPTIONS
+# endif
+
+/* IBM compiler versions are a bit messy. There are actually two products:
+ the C product, and the C++ product. The C++ compiler is always packaged
+ with the latest version of the C compiler. Version numbers do not always
+ match. This little table (I'm not sure it's accurate) should be helpful:
+
+ C++ product C product
+
+ C Set 3.1 C Compiler 3.0
+ ... ...
+ C++ Compiler 3.6.6 C Compiler 4.3
+ ... ...
+ Visual Age C++ 4.0 ...
+ ... ...
+ Visual Age C++ 5.0 C Compiler 5.0
+
+ Now:
+ __xlC__ is the version of the C compiler in hexadecimal notation
+ is only an approximation of the C++ compiler version
+ __IBMCPP__ is the version of the C++ compiler in decimal notation
+ but it is not defined on older compilers like C Set 3.1 */
+#elif defined(__xlC__)
+# define Q_CC_XLC
+# define Q_FULL_TEMPLATE_INSTANTIATION
+# if __xlC__ < 0x400
+# define Q_NO_BOOL_TYPE
+# define Q_NO_EXPLICIT_KEYWORD
+# define Q_NO_USING_KEYWORD
+# define Q_TYPENAME
+# define Q_INLINE_TEMPLATES inline
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+# define Q_CANNOT_DELETE_CONSTANT
+# endif
+
+/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed
+ on DEC C++ V5.5-004. New versions do define __EDG__ - observed on
+ Compaq C++ V6.3-002.
+ This compiler is different enough from other EDG compilers to handle
+ it separately anyway. */
+#elif defined(__DECCXX)
+# define Q_CC_DEC
+/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older
+ DEC C++ V5 compilers. */
+# if defined(__EDG__)
+# define Q_CC_EDG
+# endif
+/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead
+ - observed on Compaq C++ V6.3-002.
+ In any case versions prior to Compaq C++ V6.0-005 do not have bool. */
+# if !defined(_BOOL_EXISTS)
+# define Q_NO_BOOL_TYPE
+# endif
+/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */
+# define Q_NO_USING_KEYWORD
+/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on
+ DEC C++ V5.5-004. */
+# if __DECCXX_VER < 60060000
+# define Q_TYPENAME
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+# define Q_CANNOT_DELETE_CONSTANT
+# endif
+/* avoid undefined symbol problems with out-of-line template members */
+# define Q_INLINE_TEMPLATES inline
+
+/* Compilers with EDG front end are similar. To detect them we test:
+ __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b
+ __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */
+#elif defined(__EDG) || defined(__EDG__)
+# define Q_CC_EDG
+/* From the EDG documentation (does not seem to apply to Compaq C++):
+ _BOOL
+ Defined in C++ mode when bool is a keyword. The name of this
+ predefined macro is specified by a configuration flag. _BOOL
+ is the default.
+ __BOOL_DEFINED
+ Defined in Microsoft C++ mode when bool is a keyword. */
+# if !defined(_BOOL) && !defined(__BOOL_DEFINED)
+# define Q_NO_BOOL_TYPE
+# endif
+
+/* The Portland Group compiler is based on EDG and does define __EDG__ */
+# if defined(__COMO__)
+# define Q_CC_COMEAU
+# define Q_C_CALLBACKS
+
+/* Using the `using' keyword avoids KAI C++ warnings */
+# elif defined(__KCC)
+# define Q_CC_KAI
+# if !defined(_EXCEPTIONS)
+# define Q_NO_EXCEPTIONS
+# endif
+
+/* Using the `using' keyword avoids Intel C++ warnings */
+# elif defined(__INTEL_COMPILER)
+# define Q_CC_INTEL
+# if !defined(__EXCEPTIONS)
+# define Q_NO_EXCEPTIONS
+# endif
+
+/* The Portland Group compiler is based on EDG and does define __EDG__ */
+# elif defined(__PGI)
+# define Q_CC_PGI
+# if !defined(__EXCEPTIONS)
+# define Q_NO_EXCEPTIONS
+# endif
+
+/* Never tested! */
+# elif defined(__ghs)
+# define Q_CC_GHS
+
+/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
+# elif defined(__USLC__) && defined(__SCO_VERSION__)
+# define Q_CC_USLC
+# define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+/* Never tested! */
+# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
+# define Q_CC_OC
+# define Q_NO_USING_KEYWORD
+
+/* CDS++ is not documented to define __EDG__ or __EDG in the Reliant
+ documentation but we suppose it does, in any case it does follow
+ conventions like _BOOL */
+# elif defined(sinix)
+# define Q_CC_CDS
+# define Q_NO_USING_KEYWORD
+# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
+# define Q_NO_EXCEPTIONS
+# endif
+
+/* The MIPSpro compiler in o32 mode is based on EDG but disables features
+ such as template specialization nevertheless */
+# elif defined(__sgi)
+# define Q_CC_MIPS
+# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
+# define Q_TYPENAME
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+# define Q_STRICT_INLINING_RULES
+# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
+# define Q_TYPENAME
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+# endif
+# define Q_NO_USING_KEYWORD /* ### check "using" status */
+# endif
+
+/* The older UnixWare 2.X compiler? */
+#elif defined(__USLC__) && !defined(__SCO_VERSION__)
+# define Q_CC_USLC
+# define Q_NO_BOOL_TYPE
+# define Q_NO_EXPLICIT_KEYWORD
+# define Q_NO_USING_KEYWORD
+
+/* Never tested! */
+#elif defined(__HIGHC__)
+# define Q_CC_HIGHC
+
+#elif defined(__SUNPRO_CC)
+# define Q_CC_SUN
+/* 5.0 compiler or better
+ 'bool' is enabled by default but can be disabled using -features=nobool
+ in which case _BOOL is not defined
+ this is the default in 4.2 compatibility mode triggered by -compat=4 */
+# if __SUNPRO_CC >= 0x500
+# if !defined(_BOOL)
+# define Q_NO_BOOL_TYPE
+# endif
+# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
+# define Q_NO_USING_KEYWORD
+# endif
+# define Q_C_CALLBACKS
+/* 4.2 compiler or older */
+# else
+# define Q_NO_BOOL_TYPE
+# define Q_NO_EXPLICIT_KEYWORD
+# define Q_NO_USING_KEYWORD
+# endif
+
+#elif defined(Q_OS_HPUX)
+/* __HP_aCC was not defined in first aCC releases */
+# if defined(__HP_aCC) || __cplusplus >= 199707L
+# define Q_CC_HPACC
+# else
+# define Q_CC_HP
+# define Q_NO_BOOL_TYPE
+# define Q_FULL_TEMPLATE_INSTANTIATION
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+# define Q_NO_EXPLICIT_KEYWORD
+# endif
+# define Q_NO_USING_KEYWORD /* ### check "using" status */
+
+#else
+# error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
+#endif
+
+#ifndef Q_PACKED
+# define Q_PACKED
+#endif
+
+
+/*
+ The window system, must be one of: (Q_WS_x)
+
+ MACX - Mac OS X
+ MAC9 - Mac OS 9
+ QWS - Qt/Embedded
+ WIN32 - Windows
+ X11 - X Window System
+ PM - unsupported
+ WIN16 - unsupported
+*/
+
+#if defined(Q_OS_MAC9)
+# define Q_WS_MAC9
+#elif defined(Q_OS_MSDOS)
+# define Q_WS_WIN16
+# error "Qt requires Win32 and does not work with Windows 3.x"
+#elif defined(_WIN32_X11_)
+# define Q_WS_X11
+#elif defined(Q_OS_WIN32)
+# define Q_WS_WIN32
+# if defined(Q_OS_WIN64)
+# define Q_WS_WIN64
+# endif
+#elif defined(Q_OS_OS2)
+# define Q_WS_PM
+# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
+#elif defined(Q_OS_UNIX)
+# if defined(QWS)
+# define Q_WS_QWS
+# elif defined(Q_OS_MACX)
+# define Q_WS_MACX
+# else
+# define Q_WS_X11
+# endif
+#endif
+#if defined(Q_OS_MAC) && !defined(QMAC_PASCAL)
+# define QMAC_PASCAL
+#endif
+
+#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)
+# define Q_WS_WIN
+#endif
+
+#if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11)
+# define Q_WS_MAC
+#endif
+
+
+/*
+ Some classes do not permit copies to be made of an object.
+ These classes contains a private copy constructor and operator=
+ to disable copying (the compiler gives an error message).
+ Undefine Q_DISABLE_COPY to turn off this checking.
+*/
+
+#define Q_DISABLE_COPY
+
+#if defined(__cplusplus)
+
+
+//
+// Useful type definitions for Qt
+//
+
+#if defined(Q_NO_BOOL_TYPE)
+#if defined(Q_CC_HP)
+// bool is an unsupported reserved keyword in later versions
+#define bool int
+#else
+typedef int bool;
+#endif
+#endif
+
+typedef unsigned char uchar;
+typedef unsigned short ushort;
+typedef unsigned uint;
+typedef unsigned long ulong;
+typedef char *pchar;
+typedef uchar *puchar;
+typedef const char *pcchar;
+
+
+//
+// Constant bool values
+//
+
+#ifndef TRUE
+const bool FALSE = 0;
+const bool TRUE = !0;
+#endif
+#if defined(__WATCOMC__)
+# if defined(Q_OS_QNX4)
+const bool false = FALSE;
+const bool true = TRUE;
+# endif
+#endif
+
+
+//
+// Use the "explicit" keyword on platforms that support it.
+//
+
+#if !defined(Q_NO_EXPLICIT_KEYWORD)
+# define Q_EXPLICIT explicit
+#else
+# define Q_EXPLICIT
+#endif
+
+
+//
+// Workaround for static const members on MSVC++.
+//
+
+#if defined(Q_CC_MSVC)
+# define QT_STATIC_CONST static
+# define QT_STATIC_CONST_IMPL
+#else
+# define QT_STATIC_CONST static const
+# define QT_STATIC_CONST_IMPL const
+#endif
+
+
+//
+// Utility macros and inline functions
+//
+
+#define QMAX(a, b) ((b) < (a) ? (a) : (b))
+#define QMIN(a, b) ((a) < (b) ? (a) : (b))
+#define QABS(a) ((a) >= 0 ? (a) : -(a))
+
+inline int qRound( double d )
+{
+ return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1);
+}
+
+
+//
+// Size-dependent types (architechture-dependent byte order)
+//
+
+#if !defined(QT_CLEAN_NAMESPACE)
+// source compatibility with Qt 1.x
+typedef signed char INT8; // 8 bit signed
+typedef unsigned char UINT8; // 8 bit unsigned
+typedef short INT16; // 16 bit signed
+typedef unsigned short UINT16; // 16 bit unsigned
+typedef int INT32; // 32 bit signed
+typedef unsigned int UINT32; // 32 bit unsigned
+#endif
+
+typedef signed char Q_INT8; // 8 bit signed
+typedef unsigned char Q_UINT8; // 8 bit unsigned
+typedef short Q_INT16; // 16 bit signed
+typedef unsigned short Q_UINT16; // 16 bit unsigned
+typedef int Q_INT32; // 32 bit signed
+typedef unsigned int Q_UINT32; // 32 bit unsigned
+#if defined(Q_OS_WIN64)
+// LLP64 64-bit model on Windows
+typedef __int64 Q_LONG; // word up to 64 bit signed
+typedef unsigned __int64 Q_ULONG; // word up to 64 bit unsigned
+#else
+// LP64 64-bit model on Linux
+typedef long Q_LONG;
+typedef unsigned long Q_ULONG;
+#endif
+
+#if !defined(QT_CLEAN_NAMESPACE)
+// mininum size of 64 bits is not guaranteed
+#define Q_INT64 Q_LONG
+#define Q_UINT64 Q_ULONG
+#endif
+
+#if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT)
+# define QT_LARGEFILE_SUPPORT 64
+#endif
+#if defined(QT_LARGEFILE_SUPPORT)
+ typedef unsigned long long QtOffset;
+#else
+ typedef Q_ULONG QtOffset;
+#endif
+
+
+//
+// Data stream functions is provided by many classes (defined in qdatastream.h)
+//
+
+class QDataStream;
+
+
+//
+// Feature subsetting
+//
+// Note that disabling some features will produce a libqt that is not
+// compatible with other libqt builds. Such modifications are only
+// supported on Qt/Embedded where reducing the library size is important
+// and where the application-suite is often a fixed set.
+//
+
+#if !defined(QT_MOC)
+#if defined(QCONFIG_LOCAL)
+#include <qconfig-local.h>
+#elif defined(QCONFIG_MINIMAL)
+#include <qconfig-minimal.h>
+#elif defined(QCONFIG_SMALL)
+#include <qconfig-small.h>
+#elif defined(QCONFIG_MEDIUM)
+#include <qconfig-medium.h>
+#elif defined(QCONFIG_LARGE)
+#include <qconfig-large.h>
+#else // everything...
+#include <qconfig.h>
+#endif
+#endif
+
+
+#ifndef QT_BUILD_KEY
+#define QT_BUILD_KEY "unspecified"
+#endif
+
+// prune to local config
+#include "qmodules.h"
+#ifndef QT_MODULE_ICONVIEW
+# define QT_NO_ICONVIEW
+#endif
+#ifndef QT_MODULE_WORKSPACE
+# define QT_NO_WORKSPACE
+#endif
+#ifndef QT_MODULE_NETWORK
+#define QT_NO_NETWORK
+#endif
+#ifndef QT_MODULE_CANVAS
+# define QT_NO_CANVAS
+#endif
+#ifndef QT_MODULE_TABLE
+#define QT_NO_TABLE
+#endif
+#ifndef QT_MODULE_XML
+# define QT_NO_XML
+#endif
+#ifndef QT_MODULE_OPENGL
+# define QT_NO_OPENGL
+#endif
+#if !defined(QT_MODULE_SQL)
+# define QT_NO_SQL
+#endif
+
+#if defined(Q_WS_MAC9)
+//No need for menu merging
+# ifndef QMAC_QMENUBAR_NO_MERGE
+# define QMAC_QMENUBAR_NO_MERGE
+# endif
+//Mac9 does not use quartz
+# ifndef QMAC_NO_QUARTZ
+# define QMAC_NO_QUARTZ
+# endif
+# ifndef QMAC_QMENUBAR_NO_EVENT
+# define QMAC_QMENUBAR_NO_EVENT
+# endif
+#endif
+#if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks
+# ifndef QMAC_NO_QUARTZ
+# define QMAC_NO_QUARTZ
+# endif
+# ifndef QMAC_QMENUBAR_NO_EVENT
+# define QMAC_QMENUBAR_NO_EVENT
+# endif
+#endif
+
+#ifndef QT_H
+#include <qfeatures.h>
+#endif // QT_H
+
+
+//
+// Create Qt DLL if QT_DLL is defined (Windows only)
+//
+
+#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
+# if defined(QT_NODLL)
+# undef QT_MAKEDLL
+# undef QT_DLL
+# elif defined(QT_MAKEDLL) /* create a Qt DLL library */
+# if defined(QT_DLL)
+# undef QT_DLL
+# endif
+# define Q_EXPORT __declspec(dllexport)
+# define Q_TEMPLATEDLL
+# define Q_TEMPLATE_EXTERN
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# elif defined(QT_DLL) /* use a Qt DLL library */
+# define Q_EXPORT __declspec(dllimport)
+# define Q_TEMPLATEDLL
+# ifndef Q_TEMPLATE_EXTERN
+# if defined(Q_CC_MSVC)
+# define Q_TEMPLATE_EXTERN /*extern*/ //### too many warnings, even though disabled
+# else
+# define Q_TEMPLATE_EXTERN
+# endif
+# endif
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# endif
+#else
+# undef QT_MAKEDLL /* ignore these for other platforms */
+# undef QT_DLL
+#endif
+
+#ifndef Q_EXPORT
+# define Q_EXPORT
+#endif
+
+
+//
+// Some platform specific stuff
+//
+
+#if defined(Q_WS_WIN)
+extern Q_EXPORT bool qt_winunicode;
+#endif
+
+
+//
+// System information
+//
+
+Q_EXPORT const char *qVersion();
+Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
+#if defined(Q_WS_WIN)
+Q_EXPORT int qWinVersion();
+#if defined(UNICODE)
+#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
+#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
+#else
+#define QT_WA( uni, ansi ) ansi
+#define QT_WA_INLINE( uni, ansi ) ansi
+#endif
+#endif
+
+#ifdef Q_OS_TEMP
+#ifdef QT_WA
+#undef QT_WA
+#undef QT_WA_INLINE
+#endif
+#define QT_WA( uni, ansi ) uni
+#define QT_WA_INLINE( uni, ansi ) ( uni )
+#endif
+
+#ifndef Q_INLINE_TEMPLATES
+# define Q_INLINE_TEMPLATES
+#endif
+
+#ifndef Q_TYPENAME
+# define Q_TYPENAME typename
+#endif
+
+//
+// Use to avoid "unused parameter" warnings
+//
+
+#define Q_UNUSED(x) (void)x;
+
+//
+// Debugging and error handling
+//
+
+#if !defined(QT_NO_CHECK)
+# define QT_CHECK_STATE // check state of objects etc.
+# define QT_CHECK_RANGE // check range of indexes etc.
+# define QT_CHECK_NULL // check null pointers
+# define QT_CHECK_MATH // check math functions
+#endif
+
+#if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
+# define QT_DEBUG // display debug messages
+# if !defined(QT_NO_COMPAT) // compatibility with Qt 2
+# if !defined(NO_DEBUG) && !defined(DEBUG)
+# if !defined(Q_OS_MACX) // clash with MacOS X headers
+# define DEBUG
+# endif
+# endif
+# endif
+#endif
+
+
+Q_EXPORT void qDebug( const char *, ... ) // print debug message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+ __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void qWarning( const char *, ... ) // print warning message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+ __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
+#if defined(Q_CC_GNU)
+ __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void qSystemWarning( const char *, int code = -1 );
+
+#if !defined(QT_CLEAN_NAMESPACE) // compatibility with Qt 1
+
+Q_EXPORT void debug( const char *, ... ) // print debug message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+ __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void warning( const char *, ... ) // print warning message
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+ __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+ __attribute__ ((format (printf, 1, 2)))
+#endif
+;
+
+#endif // QT_CLEAN_NAMESPACE
+
+
+#if !defined(Q_ASSERT)
+# if defined(QT_CHECK_STATE)
+# if defined(QT_FATAL_ASSERT)
+# define Q_ASSERT(x) ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
+# else
+# define Q_ASSERT(x) ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
+# endif
+# else
+# define Q_ASSERT(x)
+# endif
+#endif
+
+#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
+# if !defined(ASSERT)
+# if !defined(Q_OS_TEMP)
+# define ASSERT(x) Q_ASSERT(x)
+# endif
+# endif
+#endif // QT_NO_COMPAT
+
+
+Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
+
+#if defined(QT_CHECK_NULL)
+# define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__))
+#else
+# define Q_CHECK_PTR(p)
+#endif
+
+#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
+# if !defined(CHECK_PTR)
+# define CHECK_PTR(x) Q_CHECK_PTR(x)
+# endif
+#endif // QT_NO_COMPAT
+
+enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
+
+typedef void (*QtMsgHandler)(QtMsgType, const char *);
+Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler );
+
+#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
+typedef QtMsgHandler msg_handler;
+#endif // QT_NO_COMPAT
+
+Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE );
+
+Q_EXPORT void qObsolete( const char *obj, const char *oldfunc,
+ const char *newfunc );
+Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
+Q_EXPORT void qObsolete( const char *message );
+
+
+//
+// Install paths from configure
+//
+
+Q_EXPORT const char *qInstallPath();
+Q_EXPORT const char *qInstallPathDocs();
+Q_EXPORT const char *qInstallPathHeaders();
+Q_EXPORT const char *qInstallPathLibs();
+Q_EXPORT const char *qInstallPathBins();
+Q_EXPORT const char *qInstallPathPlugins();
+Q_EXPORT const char *qInstallPathData();
+
+#endif // __cplusplus
+
+#endif // QGLOBAL_H
+
+//
+// Avoid some particularly useless warnings from some stupid compilers.
+// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
+// the line "#define QT_NO_WARNINGS"
+//
+
+#if !defined(QT_CC_WARNINGS)
+# define QT_NO_WARNINGS
+#endif
+#if defined(QT_NO_WARNINGS)
+# if defined(Q_CC_MSVC)
+# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
+# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
+# pragma warning(disable: 4514) // unreferenced inline/local function has been removed
+# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
+# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
+# pragma warning(disable: 4706) // assignment within conditional expression
+# pragma warning(disable: 4786) // truncating debug info after 255 characters
+# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
+# pragma warning(disable: 4355) // 'this' : used in base member initializer list
+# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
+# elif defined(Q_CC_BOR)
+# pragma option -w-inl
+# pragma option -w-aus
+# pragma warn -inl
+# pragma warn -pia
+# pragma warn -ccc
+# pragma warn -rch
+# pragma warn -sig
+# elif defined(Q_CC_MWERKS)
+# pragma warn_possunwant off
+# endif
+#endif
diff --git a/qmake/include/qgvector.h b/qmake/include/qgvector.h
new file mode 100644
index 0000000..6e8bdfc
--- a/dev/null
+++ b/qmake/include/qgvector.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QGVector class
+**
+** Created : 930907
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QGVECTOR_H
+#define QGVECTOR_H
+
+#ifndef QT_H
+#include "qptrcollection.h"
+#endif // QT_H
+
+
+class Q_EXPORT QGVector : public QPtrCollection // generic vector
+{
+friend class QGList; // needed by QGList::toVector
+public:
+#ifndef QT_NO_DATASTREAM
+ QDataStream &read( QDataStream & ); // read vector from stream
+ QDataStream &write( QDataStream & ) const; // write vector to stream
+#endif
+ virtual int compareItems( Item, Item );
+
+protected:
+ QGVector(); // create empty vector
+ QGVector( uint size ); // create vector with nullptrs
+ QGVector( const QGVector &v ); // make copy of other vector
+ ~QGVector();
+
+ QGVector &operator=( const QGVector &v ); // assign from other vector
+ bool operator==( const QGVector &v ) const;
+
+ Item *data() const { return vec; }
+ uint size() const { return len; }
+ uint count() const { return numItems; }
+
+ bool insert( uint index, Item ); // insert item at index
+ bool remove( uint index ); // remove item
+ Item take( uint index ); // take out item
+
+ void clear(); // clear vector
+ bool resize( uint newsize ); // resize vector
+
+ bool fill( Item, int flen ); // resize and fill vector
+
+ void sort(); // sort vector
+ int bsearch( Item ) const; // binary search (when sorted)
+
+ int findRef( Item, uint index ) const; // find exact item in vector
+ int find( Item, uint index ) const; // find equal item in vector
+ uint containsRef( Item ) const; // get number of exact matches
+ uint contains( Item ) const; // get number of equal matches
+
+ Item at( uint index ) const // return indexed item
+ {
+#if defined(QT_CHECK_RANGE)
+ if ( index >= len )
+ warningIndexRange( index );
+#endif
+ return vec[index];
+ }
+
+ bool insertExpand( uint index, Item ); // insert, expand if necessary
+
+ void toList( QGList * ) const; // put items in list
+
+#ifndef QT_NO_DATASTREAM
+ virtual QDataStream &read( QDataStream &, Item & );
+ virtual QDataStream &write( QDataStream &, Item ) const;
+#endif
+private:
+ Item *vec;
+ uint len;
+ uint numItems;
+
+ static void warningIndexRange( uint );
+};
+
+
+/*****************************************************************************
+ QGVector stream functions
+ *****************************************************************************/
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator>>( QDataStream &, QGVector & );
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QGVector & );
+#endif
+
+#endif // QGVECTOR_H
diff --git a/qmake/include/qintdict.h b/qmake/include/qintdict.h
new file mode 100644
index 0000000..b4cb223
--- a/dev/null
+++ b/qmake/include/qintdict.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QIntDict template class
+**
+** Created : 940624
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QINTDICT_H
+#define QINTDICT_H
+
+#ifndef QT_H
+#include "qgdict.h"
+#endif // QT_H
+
+template<class type>
+class QIntDict
+#ifdef Q_QDOC
+ : public QPtrCollection
+#else
+ : public QGDict
+#endif
+{
+public:
+ QIntDict(int size=17) : QGDict(size,IntKey,0,0) {}
+ QIntDict( const QIntDict<type> &d ) : QGDict(d) {}
+ ~QIntDict() { clear(); }
+ QIntDict<type> &operator=(const QIntDict<type> &d)
+ { return (QIntDict<type>&)QGDict::operator=(d); }
+ uint count() const { return QGDict::count(); }
+ uint size() const { return QGDict::size(); }
+ bool isEmpty() const { return QGDict::count() == 0; }
+ void insert( long k, const type *d )
+ { QGDict::look_int(k,(Item)d,1); }
+ void replace( long k, const type *d )
+ { QGDict::look_int(k,(Item)d,2); }
+ bool remove( long k ) { return QGDict::remove_int(k); }
+ type *take( long k ) { return (type*)QGDict::take_int(k); }
+ type *find( long k ) const
+ { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); }
+ type *operator[]( long k ) const
+ { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); }
+ void clear() { QGDict::clear(); }
+ void resize( uint n ) { QGDict::resize(n); }
+ void statistics() const { QGDict::statistics(); }
+
+#ifdef Q_QDOC
+protected:
+ virtual QDataStream& read( QDataStream &, QPtrCollection::Item & );
+ virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const;
+#endif
+
+private:
+ void deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void QIntDict<void>::deleteItem( QPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void QIntDict<type>::deleteItem( QPtrCollection::Item d )
+{
+ if ( del_item ) delete (type*)d;
+}
+
+template<class type>
+class QIntDictIterator : public QGDictIterator
+{
+public:
+ QIntDictIterator(const QIntDict<type> &d) :QGDictIterator((QGDict &)d) {}
+ ~QIntDictIterator() {}
+ uint count() const { return dict->count(); }
+ bool isEmpty() const { return dict->count() == 0; }
+ type *toFirst() { return (type *)QGDictIterator::toFirst(); }
+ operator type *() const { return (type *)QGDictIterator::get(); }
+ type *current() const { return (type *)QGDictIterator::get(); }
+ long currentKey() const { return QGDictIterator::getKeyInt(); }
+ type *operator()() { return (type *)QGDictIterator::operator()(); }
+ type *operator++() { return (type *)QGDictIterator::operator++(); }
+ type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);}
+};
+
+#endif // QINTDICT_H
diff --git a/qmake/include/qiodevice.h b/qmake/include/qiodevice.h
new file mode 100644
index 0000000..cb83463
--- a/dev/null
+++ b/qmake/include/qiodevice.h
@@ -0,0 +1,161 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QIODevice class
+**
+** Created : 940913
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QIODEVICE_H
+#define QIODEVICE_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qcstring.h"
+#endif // QT_H
+
+
+// IO device access types
+
+#define IO_Direct 0x0100 // direct access device
+#define IO_Sequential 0x0200 // sequential access device
+#define IO_Combined 0x0300 // combined direct/sequential
+#define IO_TypeMask 0x0f00
+
+// IO handling modes
+
+#define IO_Raw 0x0040 // raw access (not buffered)
+#define IO_Async 0x0080 // asynchronous mode
+
+// IO device open modes
+
+#define IO_ReadOnly 0x0001 // readable device
+#define IO_WriteOnly 0x0002 // writable device
+#define IO_ReadWrite 0x0003 // read+write device
+#define IO_Append 0x0004 // append
+#define IO_Truncate 0x0008 // truncate device
+#define IO_Translate 0x0010 // translate CR+LF
+#define IO_ModeMask 0x00ff
+
+// IO device state
+
+#define IO_Open 0x1000 // device is open
+#define IO_StateMask 0xf000
+
+// IO device status
+
+#define IO_Ok 0
+#define IO_ReadError 1 // read error
+#define IO_WriteError 2 // write error
+#define IO_FatalError 3 // fatal unrecoverable error
+#define IO_ResourceError 4 // resource limitation
+#define IO_OpenError 5 // cannot open device
+#define IO_ConnectError 5 // cannot connect to device
+#define IO_AbortError 6 // abort error
+#define IO_TimeOutError 7 // time out
+#define IO_UnspecifiedError 8 // unspecified error
+
+
+class Q_EXPORT QIODevice
+{
+public:
+#if defined(QT_ABI_64BITOFFSET)
+ typedef QtOffset Offset;
+#else
+ typedef Q_ULONG Offset;
+#endif
+
+ QIODevice();
+ virtual ~QIODevice();
+
+ int flags() const { return ioMode; }
+ int mode() const { return ioMode & IO_ModeMask; }
+ int state() const { return ioMode & IO_StateMask; }
+
+ bool isDirectAccess() const { return ((ioMode & IO_Direct) == IO_Direct); }
+ bool isSequentialAccess() const { return ((ioMode & IO_Sequential) == IO_Sequential); }
+ bool isCombinedAccess() const { return ((ioMode & IO_Combined) == IO_Combined); }
+ bool isBuffered() const { return ((ioMode & IO_Raw) != IO_Raw); }
+ bool isRaw() const { return ((ioMode & IO_Raw) == IO_Raw); }
+ bool isSynchronous() const { return ((ioMode & IO_Async) != IO_Async); }
+ bool isAsynchronous() const { return ((ioMode & IO_Async) == IO_Async); }
+ bool isTranslated() const { return ((ioMode & IO_Translate) == IO_Translate); }
+ bool isReadable() const { return ((ioMode & IO_ReadOnly) == IO_ReadOnly); }
+ bool isWritable() const { return ((ioMode & IO_WriteOnly) == IO_WriteOnly); }
+ bool isReadWrite() const { return ((ioMode & IO_ReadWrite) == IO_ReadWrite); }
+ bool isInactive() const { return state() == 0; }
+ bool isOpen() const { return state() == IO_Open; }
+
+ int status() const { return ioSt; }
+ void resetStatus() { ioSt = IO_Ok; }
+
+ virtual bool open( int mode ) = 0;
+ virtual void close() = 0;
+ virtual void flush() = 0;
+
+ virtual Offset size() const = 0;
+ virtual Offset at() const;
+ virtual bool at( Offset );
+ virtual bool atEnd() const;
+ bool reset() { return at(0); }
+
+ virtual Q_LONG readBlock( char *data, Q_ULONG maxlen ) = 0;
+ virtual Q_LONG writeBlock( const char *data, Q_ULONG len ) = 0;
+ virtual Q_LONG readLine( char *data, Q_ULONG maxlen );
+ Q_LONG writeBlock( const QByteArray& data );
+ virtual QByteArray readAll();
+
+ virtual int getch() = 0;
+ virtual int putch( int ) = 0;
+ virtual int ungetch( int ) = 0;
+
+protected:
+ void setFlags( int f ) { ioMode = f; }
+ void setType( int );
+ void setMode( int );
+ void setState( int );
+ void setStatus( int );
+ Offset ioIndex;
+
+private:
+ int ioMode;
+ int ioSt;
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QIODevice( const QIODevice & );
+ QIODevice &operator=( const QIODevice & );
+#endif
+};
+
+
+#endif // QIODEVICE_H
diff --git a/qmake/include/qmap.h b/qmake/include/qmap.h
new file mode 100644
index 0000000..269bd6b
--- a/dev/null
+++ b/qmake/include/qmap.h
@@ -0,0 +1,883 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QMap class
+**
+** Created : 990406
+**
+** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QMAP_H
+#define QMAP_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qshared.h"
+#include "qdatastream.h"
+#include "qpair.h"
+#include "qvaluelist.h"
+#endif // QT_H
+
+#ifndef QT_NO_STL
+#include <iterator>
+#include <map>
+#endif
+
+//#define QT_CHECK_MAP_RANGE
+
+struct Q_EXPORT QMapNodeBase
+{
+ enum Color { Red, Black };
+
+ QMapNodeBase* left;
+ QMapNodeBase* right;
+ QMapNodeBase* parent;
+
+ Color color;
+
+ QMapNodeBase* minimum() {
+ QMapNodeBase* x = this;
+ while ( x->left )
+ x = x->left;
+ return x;
+ }
+
+ QMapNodeBase* maximum() {
+ QMapNodeBase* x = this;
+ while ( x->right )
+ x = x->right;
+ return x;
+ }
+};
+
+
+template <class K, class T>
+struct QMapNode : public QMapNodeBase
+{
+ QMapNode( const K& _key, const T& _data ) { data = _data; key = _key; }
+ QMapNode( const K& _key ) { key = _key; }
+ QMapNode( const QMapNode<K,T>& _n ) { key = _n.key; data = _n.data; }
+ QMapNode() { }
+ T data;
+ K key;
+};
+
+
+template<class K, class T>
+class QMapIterator
+{
+ public:
+ /**
+ * Typedefs
+ */
+ typedef QMapNode< K, T >* NodePtr;
+#ifndef QT_NO_STL
+ typedef std::bidirectional_iterator_tag iterator_category;
+#endif
+ typedef T value_type;
+#ifndef QT_NO_STL
+ typedef ptrdiff_t difference_type;
+#else
+ typedef int difference_type;
+#endif
+ typedef T* pointer;
+ typedef T& reference;
+
+ /**
+ * Variables
+ */
+ QMapNode<K,T>* node;
+
+ /**
+ * Functions
+ */
+ QMapIterator() : node( 0 ) {}
+ QMapIterator( QMapNode<K,T>* p ) : node( p ) {}
+ QMapIterator( const QMapIterator<K,T>& it ) : node( it.node ) {}
+
+ bool operator==( const QMapIterator<K,T>& it ) const { return node == it.node; }
+ bool operator!=( const QMapIterator<K,T>& it ) const { return node != it.node; }
+ T& operator*() { return node->data; }
+ const T& operator*() const { return node->data; }
+ // UDT for T = x*
+ // T* operator->() const { return &node->data; }
+
+ const K& key() const { return node->key; }
+ T& data() { return node->data; }
+ const T& data() const { return node->data; }
+
+private:
+ int inc();
+ int dec();
+
+public:
+ QMapIterator<K,T>& operator++() {
+ inc();
+ return *this;
+ }
+
+ QMapIterator<K,T> operator++(int) {
+ QMapIterator<K,T> tmp = *this;
+ inc();
+ return tmp;
+ }
+
+ QMapIterator<K,T>& operator--() {
+ dec();
+ return *this;
+ }
+
+ QMapIterator<K,T> operator--(int) {
+ QMapIterator<K,T> tmp = *this;
+ dec();
+ return tmp;
+ }
+};
+
+template <class K, class T>
+Q_INLINE_TEMPLATES int QMapIterator<K,T>::inc()
+{
+ QMapNodeBase* tmp = node;
+ if ( tmp->right ) {
+ tmp = tmp->right;
+ while ( tmp->left )
+ tmp = tmp->left;
+ } else {
+ QMapNodeBase* y = tmp->parent;
+ while (tmp == y->right) {
+ tmp = y;
+ y = y->parent;
+ }
+ if (tmp->right != y)
+ tmp = y;
+ }
+ node = (NodePtr)tmp;
+ return 0;
+}
+
+template <class K, class T>
+Q_INLINE_TEMPLATES int QMapIterator<K,T>::dec()
+{
+ QMapNodeBase* tmp = node;
+ if (tmp->color == QMapNodeBase::Red &&
+ tmp->parent->parent == tmp ) {
+ tmp = tmp->right;
+ } else if (tmp->left != 0) {
+ QMapNodeBase* y = tmp->left;
+ while ( y->right )
+ y = y->right;
+ tmp = y;
+ } else {
+ QMapNodeBase* y = tmp->parent;
+ while (tmp == y->left) {
+ tmp = y;
+ y = y->parent;
+ }
+ tmp = y;
+ }
+ node = (NodePtr)tmp;
+ return 0;
+}
+
+template<class K, class T>
+class QMapConstIterator
+{
+ public:
+ /**
+ * Typedefs
+ */
+ typedef QMapNode< K, T >* NodePtr;
+#ifndef QT_NO_STL
+ typedef std::bidirectional_iterator_tag iterator_category;
+#endif
+ typedef T value_type;
+#ifndef QT_NO_STL
+ typedef ptrdiff_t difference_type;
+#else
+ typedef int difference_type;
+#endif
+ typedef const T* pointer;
+ typedef const T& reference;
+
+
+ /**
+ * Variables
+ */
+ QMapNode<K,T>* node;
+
+ /**
+ * Functions
+ */
+ QMapConstIterator() : node( 0 ) {}
+ QMapConstIterator( QMapNode<K,T>* p ) : node( p ) {}
+ QMapConstIterator( const QMapConstIterator<K,T>& it ) : node( it.node ) {}
+ QMapConstIterator( const QMapIterator<K,T>& it ) : node( it.node ) {}
+
+ bool operator==( const QMapConstIterator<K,T>& it ) const { return node == it.node; }
+ bool operator!=( const QMapConstIterator<K,T>& it ) const { return node != it.node; }
+ const T& operator*() const { return node->data; }
+ // UDT for T = x*
+ // const T* operator->() const { return &node->data; }
+
+ const K& key() const { return node->key; }
+ const T& data() const { return node->data; }
+
+private:
+ int inc();
+ int dec();
+
+public:
+ QMapConstIterator<K,T>& operator++() {
+ inc();
+ return *this;
+ }
+
+ QMapConstIterator<K,T> operator++(int) {
+ QMapConstIterator<K,T> tmp = *this;
+ inc();
+ return tmp;
+ }
+
+ QMapConstIterator<K,T>& operator--() {
+ dec();
+ return *this;
+ }
+
+ QMapConstIterator<K,T> operator--(int) {
+ QMapConstIterator<K,T> tmp = *this;
+ dec();
+ return tmp;
+ }
+};
+
+template <class K, class T>
+Q_INLINE_TEMPLATES int QMapConstIterator<K,T>::inc()
+{
+ QMapNodeBase* tmp = node;
+ if ( tmp->right ) {
+ tmp = tmp->right;
+ while ( tmp->left )
+ tmp = tmp->left;
+ } else {
+ QMapNodeBase* y = tmp->parent;
+ while (tmp == y->right) {
+ tmp = y;
+ y = y->parent;
+ }
+ if (tmp->right != y)
+ tmp = y;
+ }
+ node = (NodePtr)tmp;
+ return 0;
+}
+
+template <class K, class T>
+Q_INLINE_TEMPLATES int QMapConstIterator<K,T>::dec()
+{
+ QMapNodeBase* tmp = node;
+ if (tmp->color == QMapNodeBase::Red &&
+ tmp->parent->parent == tmp ) {
+ tmp = tmp->right;
+ } else if (tmp->left != 0) {
+ QMapNodeBase* y = tmp->left;
+ while ( y->right )
+ y = y->right;
+ tmp = y;
+ } else {
+ QMapNodeBase* y = tmp->parent;
+ while (tmp == y->left) {
+ tmp = y;
+ y = y->parent;
+ }
+ tmp = y;
+ }
+ node = (NodePtr)tmp;
+ return 0;
+}
+
+class Q_EXPORT QMapPrivateBase : public QShared
+{
+public:
+ QMapPrivateBase() {
+ node_count = 0;
+ }
+ QMapPrivateBase( const QMapPrivateBase* _map) {
+ node_count = _map->node_count;
+ }
+
+ /**
+ * Implementations of basic tree algorithms
+ */
+ void rotateLeft( QMapNodeBase* x, QMapNodeBase*& root);
+ void rotateRight( QMapNodeBase* x, QMapNodeBase*& root );
+ void rebalance( QMapNodeBase* x, QMapNodeBase*& root );
+ QMapNodeBase* removeAndRebalance( QMapNodeBase* z, QMapNodeBase*& root,
+ QMapNodeBase*& leftmost,
+ QMapNodeBase*& rightmost );
+
+ /**
+ * Variables
+ */
+ int node_count;
+};
+
+
+template <class Key, class T>
+class QMapPrivate : public QMapPrivateBase
+{
+public:
+ /**
+ * Typedefs
+ */
+ typedef QMapIterator< Key, T > Iterator;
+ typedef QMapConstIterator< Key, T > ConstIterator;
+ typedef QMapNode< Key, T > Node;
+ typedef QMapNode< Key, T >* NodePtr;
+
+ /**
+ * Functions
+ */
+ QMapPrivate();
+ QMapPrivate( const QMapPrivate< Key, T >* _map );
+ ~QMapPrivate() { clear(); delete header; }
+
+ NodePtr copy( NodePtr p );
+ void clear();
+ void clear( NodePtr p );
+
+ Iterator begin() { return Iterator( (NodePtr)(header->left ) ); }
+ Iterator end() { return Iterator( header ); }
+ ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); }
+ ConstIterator end() const { return ConstIterator( header ); }
+
+ ConstIterator find(const Key& k) const;
+
+ void remove( Iterator it ) {
+ NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right );
+ delete del;
+ --node_count;
+ }
+
+#ifdef QT_QMAP_DEBUG
+ void inorder( QMapNodeBase* x = 0, int level = 0 ){
+ if ( !x )
+ x = header->parent;
+ if ( x->left )
+ inorder( x->left, level + 1 );
+ //cout << level << " Key=" << key(x) << " Value=" << ((NodePtr)x)->data << endl;
+ if ( x->right )
+ inorder( x->right, level + 1 );
+ }
+#endif
+
+#if 0
+ Iterator insertMulti(const Key& v){
+ QMapNodeBase* y = header;
+ QMapNodeBase* x = header->parent;
+ while (x != 0){
+ y = x;
+ x = ( v < key(x) ) ? x->left : x->right;
+ }
+ return insert(x, y, v);
+ }
+#endif
+
+ Iterator insertSingle( const Key& k );
+ Iterator insert( QMapNodeBase* x, QMapNodeBase* y, const Key& k );
+
+protected:
+ /**
+ * Helpers
+ */
+ const Key& key( QMapNodeBase* b ) const { return ((NodePtr)b)->key; }
+
+ /**
+ * Variables
+ */
+ NodePtr header;
+};
+
+
+template <class Key, class T>
+Q_INLINE_TEMPLATES QMapPrivate<Key,T>::QMapPrivate() {
+ header = new Node;
+ header->color = QMapNodeBase::Red; // Mark the header
+ header->parent = 0;
+ header->left = header->right = header;
+}
+template <class Key, class T>
+Q_INLINE_TEMPLATES QMapPrivate<Key,T>::QMapPrivate( const QMapPrivate< Key, T >* _map ) : QMapPrivateBase( _map ) {
+ header = new Node;
+ header->color = QMapNodeBase::Red; // Mark the header
+ if ( _map->header->parent == 0 ) {
+ header->parent = 0;
+ header->left = header->right = header;
+ } else {
+ header->parent = copy( (NodePtr)(_map->header->parent) );
+ header->parent->parent = header;
+ header->left = header->parent->minimum();
+ header->right = header->parent->maximum();
+ }
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QMapPrivate<Key,T>::NodePtr QMapPrivate<Key,T>::copy( Q_TYPENAME QMapPrivate<Key,T>::NodePtr p )
+{
+ if ( !p )
+ return 0;
+ NodePtr n = new Node( *p );
+ n->color = p->color;
+ if ( p->left ) {
+ n->left = copy( (NodePtr)(p->left) );
+ n->left->parent = n;
+ } else {
+ n->left = 0;
+ }
+ if ( p->right ) {
+ n->right = copy( (NodePtr)(p->right) );
+ n->right->parent = n;
+ } else {
+ n->right = 0;
+ }
+ return n;
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATES void QMapPrivate<Key,T>::clear()
+{
+ clear( (NodePtr)(header->parent) );
+ header->color = QMapNodeBase::Red;
+ header->parent = 0;
+ header->left = header->right = header;
+ node_count = 0;
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATES void QMapPrivate<Key,T>::clear( Q_TYPENAME QMapPrivate<Key,T>::NodePtr p )
+{
+ while ( p != 0 ) {
+ clear( (NodePtr)p->right );
+ NodePtr y = (NodePtr)p->left;
+ delete p;
+ p = y;
+ }
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QMapPrivate<Key,T>::ConstIterator QMapPrivate<Key,T>::find(const Key& k) const
+{
+ QMapNodeBase* y = header; // Last node
+ QMapNodeBase* x = header->parent; // Root node.
+
+ while ( x != 0 ) {
+ // If as k <= key(x) go left
+ if ( !( key(x) < k ) ) {
+ y = x;
+ x = x->left;
+ } else {
+ x = x->right;
+ }
+ }
+
+ // Was k bigger/smaller then the biggest/smallest
+ // element of the tree ? Return end()
+ if ( y == header || k < key(y) )
+ return ConstIterator( header );
+ return ConstIterator( (NodePtr)y );
+}
+
+template <class Key, class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QMapPrivate<Key,T>::Iterator QMapPrivate<Key,T>::insertSingle( const Key& k )
+{
+ // Search correct position in the tree
+ QMapNodeBase* y = header;
+ QMapNodeBase* x = header->parent;
+ bool result = TRUE;
+ while ( x != 0 ) {
+ result = ( k < key(x) );
+ y = x;
+ x = result ? x->left : x->right;
+ }
+ // Get iterator on the last not empty one
+ Iterator j( (NodePtr)y );
+ if ( result ) {
+ // Smaller then the leftmost one ?
+ if ( j == begin() ) {
+ return insert(x, y, k );
+ } else {
+ // Perhaps daddy is the right one ?
+ --j;
+ }
+ }
+ // Really bigger ?
+ if ( (j.node->key) < k )
+ return insert(x, y, k );
+ // We are going to replace a node
+ return j;
+}
+
+
+template <class Key, class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QMapPrivate<Key,T>::Iterator QMapPrivate<Key,T>::insert( QMapNodeBase* x, QMapNodeBase* y, const Key& k )
+{
+ NodePtr z = new Node( k );
+ if (y == header || x != 0 || k < key(y) ) {
+ y->left = z; // also makes leftmost = z when y == header
+ if ( y == header ) {
+ header->parent = z;
+ header->right = z;
+ } else if ( y == header->left )
+ header->left = z; // maintain leftmost pointing to min node
+ } else {
+ y->right = z;
+ if ( y == header->right )
+ header->right = z; // maintain rightmost pointing to max node
+ }
+ z->parent = y;
+ z->left = 0;
+ z->right = 0;
+ rebalance( z, header->parent );
+ ++node_count;
+ return Iterator(z);
+}
+
+
+#ifdef QT_CHECK_RANGE
+# if !defined( QT_NO_DEBUG ) && defined( QT_CHECK_MAP_RANGE )
+# define QT_CHECK_INVALID_MAP_ELEMENT if ( empty() ) qWarning( "QMap: Warning invalid element" )
+# define QT_CHECK_INVALID_MAP_ELEMENT_FATAL Q_ASSERT( !empty() );
+# else
+# define QT_CHECK_INVALID_MAP_ELEMENT
+# define QT_CHECK_INVALID_MAP_ELEMENT_FATAL
+# endif
+#else
+# define QT_CHECK_INVALID_MAP_ELEMENT
+# define QT_CHECK_INVALID_MAP_ELEMENT_FATAL
+#endif
+
+template <class T> class QDeepCopy;
+
+template<class Key, class T>
+class QMap
+{
+public:
+ /**
+ * Typedefs
+ */
+ typedef Key key_type;
+ typedef T mapped_type;
+ typedef QPair<const key_type, mapped_type> value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+#ifndef QT_NO_STL
+ typedef ptrdiff_t difference_type;
+#else
+ typedef int difference_type;
+#endif
+ typedef size_t size_type;
+ typedef QMapIterator<Key,T> iterator;
+ typedef QMapConstIterator<Key,T> const_iterator;
+ typedef QPair<iterator,bool> insert_pair;
+
+ typedef QMapIterator< Key, T > Iterator;
+ typedef QMapConstIterator< Key, T > ConstIterator;
+ typedef T ValueType;
+ typedef QMapPrivate< Key, T > Priv;
+
+ /**
+ * API
+ */
+ QMap()
+ {
+ sh = new QMapPrivate< Key, T >;
+ }
+ QMap( const QMap<Key,T>& m )
+ {
+ sh = m.sh; sh->ref();
+ }
+
+#ifndef QT_NO_STL
+# ifdef Q_CC_HPACC // HP-UX aCC does require typename in some place
+# undef Q_TYPENAME // but not accept them at others.
+# define Q_TYPENAME // also doesn't like re-defines ...
+# endif
+ QMap( const Q_TYPENAME std::map<Key,T>& m )
+ {
+ sh = new QMapPrivate<Key,T>;
+#if defined(Q_OS_WIN32)
+ std::map<Key,T>::const_iterator it = m.begin();
+#else
+ QMapConstIterator<Key,T> it = m.begin();
+#endif
+ for ( ; it != m.end(); ++it ) {
+ value_type p( (*it).first, (*it).second );
+ insert( p );
+ }
+ }
+#endif
+ ~QMap()
+ {
+ if ( sh->deref() )
+ delete sh;
+ }
+ QMap<Key,T>& operator= ( const QMap<Key,T>& m );
+#ifndef QT_NO_STL
+ QMap<Key,T>& operator= ( const Q_TYPENAME std::map<Key,T>& m )
+ {
+ clear();
+#if defined(Q_OS_WIN32)
+ std::map<Key,T>::const_iterator it = m.begin();
+#else
+ QMapConstIterator<Key,T> it = m.begin();
+#endif
+ for ( ; it != m.end(); ++it ) {
+ value_type p( (*it).first, (*it).second );
+ insert( p );
+ }
+ return *this;
+ }
+# ifdef Q_CC_HPACC // undo the HP-UX aCC hackery done above
+# undef Q_TYPENAME
+# define Q_TYPENAME typename
+# endif
+#endif
+
+ iterator begin() { detach(); return sh->begin(); }
+ iterator end() { detach(); return sh->end(); }
+ const_iterator begin() const { return ((const Priv*)sh)->begin(); }
+ const_iterator end() const { return ((const Priv*)sh)->end(); }
+ iterator replace( const Key& k, const T& v )
+ {
+ remove( k );
+ return insert( k, v );
+ }
+
+ size_type size() const
+ {
+ return sh->node_count;
+ }
+ bool empty() const
+ {
+ return sh->node_count == 0;
+ }
+ QPair<iterator,bool> insert( const value_type& x );
+
+ void erase( iterator it )
+ {
+ detach();
+ sh->remove( it );
+ }
+ void erase( const key_type& k );
+ size_type count( const key_type& k ) const;
+ T& operator[] ( const Key& k );
+ void clear();
+
+ iterator find ( const Key& k )
+ {
+ detach();
+ return iterator( sh->find( k ).node );
+ }
+ const_iterator find ( const Key& k ) const { return sh->find( k ); }
+
+ const T& operator[] ( const Key& k ) const
+ { QT_CHECK_INVALID_MAP_ELEMENT; return sh->find( k ).data(); }
+ bool contains ( const Key& k ) const
+ { return find( k ) != end(); }
+ //{ return sh->find( k ) != ((const Priv*)sh)->end(); }
+
+ size_type count() const { return sh->node_count; }
+
+ QValueList<Key> keys() const {
+ QValueList<Key> r;
+ for (const_iterator i=begin(); i!=end(); ++i)
+ r.append(i.key());
+ return r;
+ }
+
+ QValueList<T> values() const {
+ QValueList<T> r;
+ for (const_iterator i=begin(); i!=end(); ++i)
+ r.append(*i);
+ return r;
+ }
+
+ bool isEmpty() const { return sh->node_count == 0; }
+
+ iterator insert( const Key& key, const T& value, bool overwrite = TRUE );
+ void remove( iterator it ) { detach(); sh->remove( it ); }
+ void remove( const Key& k );
+
+#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+ bool operator==( const QMap<Key,T>& ) const { return FALSE; }
+#ifndef QT_NO_STL
+ bool operator==( const Q_TYPENAME std::map<Key,T>& ) const { return FALSE; }
+#endif
+#endif
+
+protected:
+ /**
+ * Helpers
+ */
+ void detach() { if ( sh->count > 1 ) detachInternal(); }
+
+ Priv* sh;
+private:
+ void detachInternal();
+
+ friend class QDeepCopy< QMap<Key,T> >;
+};
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES QMap<Key,T>& QMap<Key,T>::operator= ( const QMap<Key,T>& m )
+{
+ m.sh->ref();
+ if ( sh->deref() )
+ delete sh;
+ sh = m.sh;
+ return *this;
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QMap<Key,T>::insert_pair QMap<Key,T>::insert( const Q_TYPENAME QMap<Key,T>::value_type& x )
+{
+ detach();
+ size_type n = size();
+ iterator it = sh->insertSingle( x.first );
+ bool inserted = FALSE;
+ if ( n < size() ) {
+ inserted = TRUE;
+ it.data() = x.second;
+ }
+ return QPair<iterator,bool>( it, inserted );
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES void QMap<Key,T>::erase( const Key& k )
+{
+ detach();
+ iterator it( sh->find( k ).node );
+ if ( it != end() )
+ sh->remove( it );
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QMap<Key,T>::size_type QMap<Key,T>::count( const Key& k ) const
+{
+ const_iterator it( sh->find( k ).node );
+ if ( it != end() ) {
+ size_type c = 0;
+ while ( it != end() ) {
+ ++it;
+ ++c;
+ }
+ return c;
+ }
+ return 0;
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES T& QMap<Key,T>::operator[] ( const Key& k )
+{
+ detach();
+ QMapNode<Key,T>* p = sh->find( k ).node;
+ if ( p != sh->end().node )
+ return p->data;
+ return insert( k, T() ).data();
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES void QMap<Key,T>::clear()
+{
+ if ( sh->count == 1 )
+ sh->clear();
+ else {
+ sh->deref();
+ sh = new QMapPrivate<Key,T>;
+ }
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QMap<Key,T>::iterator QMap<Key,T>::insert( const Key& key, const T& value, bool overwrite )
+{
+ detach();
+ size_type n = size();
+ iterator it = sh->insertSingle( key );
+ if ( overwrite || n < size() )
+ it.data() = value;
+ return it;
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES void QMap<Key,T>::remove( const Key& k )
+{
+ detach();
+ iterator it( sh->find( k ).node );
+ if ( it != end() )
+ sh->remove( it );
+}
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES void QMap<Key,T>::detachInternal()
+{
+ sh->deref(); sh = new QMapPrivate<Key,T>( sh );
+}
+
+
+#ifndef QT_NO_DATASTREAM
+template<class Key, class T>
+Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QMap<Key,T>& m ) {
+ m.clear();
+ Q_UINT32 c;
+ s >> c;
+ for( Q_UINT32 i = 0; i < c; ++i ) {
+ Key k; T t;
+ s >> k >> t;
+ m.insert( k, t );
+ if ( s.atEnd() )
+ break;
+ }
+ return s;
+}
+
+
+template<class Key, class T>
+Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QMap<Key,T>& m ) {
+ s << (Q_UINT32)m.size();
+ QMapConstIterator<Key,T> it = m.begin();
+ for( ; it != m.end(); ++it )
+ s << it.key() << it.data();
+ return s;
+}
+#endif
+
+#endif // QMAP_H
diff --git a/qmake/include/qmemarray.h b/qmake/include/qmemarray.h
new file mode 100644
index 0000000..a5baf99
--- a/dev/null
+++ b/qmake/include/qmemarray.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QMemArray template/macro class
+**
+** Created : 930906
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QMEMARRAY_H
+#define QMEMARRAY_H
+
+#ifndef QT_H
+#include "qgarray.h"
+#endif // QT_H
+
+
+template<class type>
+class QMemArray : public QGArray
+{
+public:
+ typedef type* Iterator;
+ typedef const type* ConstIterator;
+ typedef type ValueType;
+
+protected:
+ QMemArray( int, int ) : QGArray( 0, 0 ) {}
+
+public:
+ QMemArray() {}
+ QMemArray( int size ) : QGArray(size*sizeof(type)) {}
+ QMemArray( const QMemArray<type> &a ) : QGArray(a) {}
+ ~QMemArray() {}
+ QMemArray<type> &operator=(const QMemArray<type> &a)
+ { return (QMemArray<type>&)QGArray::assign(a); }
+ type *data() const { return (type *)QGArray::data(); }
+ uint nrefs() const { return QGArray::nrefs(); }
+ uint size() const { return QGArray::size()/sizeof(type); }
+ uint count() const { return size(); }
+ bool isEmpty() const { return QGArray::size() == 0; }
+ bool isNull() const { return QGArray::data() == 0; }
+ bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); }
+ bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); }
+ bool fill( const type &d, int size = -1 )
+ { return QGArray::fill((char*)&d,size,sizeof(type) ); }
+ void detach() { QGArray::detach(); }
+ QMemArray<type> copy() const
+ { QMemArray<type> tmp; return tmp.duplicate(*this); }
+ QMemArray<type>& assign( const QMemArray<type>& a )
+ { return (QMemArray<type>&)QGArray::assign(a); }
+ QMemArray<type>& assign( const type *a, uint n )
+ { return (QMemArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); }
+ QMemArray<type>& duplicate( const QMemArray<type>& a )
+ { return (QMemArray<type>&)QGArray::duplicate(a); }
+ QMemArray<type>& duplicate( const type *a, uint n )
+ { return (QMemArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); }
+ QMemArray<type>& setRawData( const type *a, uint n )
+ { return (QMemArray<type>&)QGArray::setRawData((char*)a,
+ n*sizeof(type)); }
+ void resetRawData( const type *a, uint n )
+ { QGArray::resetRawData((char*)a,n*sizeof(type)); }
+ int find( const type &d, uint i=0 ) const
+ { return QGArray::find((char*)&d,i,sizeof(type)); }
+ int contains( const type &d ) const
+ { return QGArray::contains((char*)&d,sizeof(type)); }
+ void sort() { QGArray::sort(sizeof(type)); }
+ int bsearch( const type &d ) const
+ { return QGArray::bsearch((const char*)&d,sizeof(type)); }
+ // ### Qt 4.0: maybe provide uint overload as work-around for MSVC bug
+ type& operator[]( int i ) const
+ { return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
+ type& at( uint i ) const
+ { return (type &)(*(type *)QGArray::at(i*sizeof(type))); }
+ operator const type*() const { return (const type *)QGArray::data(); }
+ bool operator==( const QMemArray<type> &a ) const { return isEqual(a); }
+ bool operator!=( const QMemArray<type> &a ) const { return !isEqual(a); }
+ Iterator begin() { return data(); }
+ Iterator end() { return data() + size(); }
+ ConstIterator begin() const { return data(); }
+ ConstIterator end() const { return data() + size(); }
+};
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<int>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<bool>;
+// MOC_SKIP_END
+#endif
+
+#ifndef QT_NO_COMPAT
+#define QArray QMemArray
+#endif
+
+#endif // QARRAY_H
diff --git a/qmake/include/qnamespace.h b/qmake/include/qnamespace.h
new file mode 100644
index 0000000..58b485f
--- a/dev/null
+++ b/qmake/include/qnamespace.h
@@ -0,0 +1,843 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of Qt namespace (as class for compiler compatibility)
+**
+** Created : 980927
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the kernel module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QNAMESPACE_H
+#define QNAMESPACE_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+
+class QColor;
+class QCursor;
+
+
+class Q_EXPORT Qt {
+public:
+ QT_STATIC_CONST QColor & color0;
+ QT_STATIC_CONST QColor & color1;
+ QT_STATIC_CONST QColor & black;
+ QT_STATIC_CONST QColor & white;
+ QT_STATIC_CONST QColor & darkGray;
+ QT_STATIC_CONST QColor & gray;
+ QT_STATIC_CONST QColor & lightGray;
+ QT_STATIC_CONST QColor & red;
+ QT_STATIC_CONST QColor & green;
+ QT_STATIC_CONST QColor & blue;
+ QT_STATIC_CONST QColor & cyan;
+ QT_STATIC_CONST QColor & magenta;
+ QT_STATIC_CONST QColor & yellow;
+ QT_STATIC_CONST QColor & darkRed;
+ QT_STATIC_CONST QColor & darkGreen;
+ QT_STATIC_CONST QColor & darkBlue;
+ QT_STATIC_CONST QColor & darkCyan;
+ QT_STATIC_CONST QColor & darkMagenta;
+ QT_STATIC_CONST QColor & darkYellow;
+
+ // documented in qevent.cpp
+ enum ButtonState { // mouse/keyboard state values
+ NoButton = 0x0000,
+ LeftButton = 0x0001,
+ RightButton = 0x0002,
+ MidButton = 0x0004,
+ MouseButtonMask = 0x0007,
+ ShiftButton = 0x0100,
+ ControlButton = 0x0200,
+ AltButton = 0x0400,
+ MetaButton = 0x0800,
+ KeyButtonMask = 0x0f00,
+ Keypad = 0x4000
+ };
+
+ // documented in qobject.cpp
+ // ideally would start at 1, as in QSizePolicy, but that breaks other things
+ enum Orientation {
+ Horizontal = 0,
+ Vertical
+ };
+
+ // Text formatting flags for QPainter::drawText and QLabel
+ // the following four enums can be combined to one integer which
+ // is passed as textflag to drawText and qt_format_text.
+
+ // documented in qpainter.cpp
+ enum AlignmentFlags {
+ AlignAuto = 0x0000, // text alignment
+ AlignLeft = 0x0001,
+ AlignRight = 0x0002,
+ AlignHCenter = 0x0004,
+ AlignJustify = 0x0008,
+ AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify,
+ AlignTop = 0x0010,
+ AlignBottom = 0x0020,
+ AlignVCenter = 0x0040,
+ AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter,
+ AlignCenter = AlignVCenter | AlignHCenter
+ };
+
+ // documented in qpainter.cpp
+ enum TextFlags {
+ SingleLine = 0x0080, // misc. flags
+ DontClip = 0x0100,
+ ExpandTabs = 0x0200,
+ ShowPrefix = 0x0400,
+ WordBreak = 0x0800,
+ BreakAnywhere = 0x1000,
+ DontPrint = 0x2000, // internal
+ NoAccel = 0x4000
+ };
+
+ // Widget flags; documented in qwidget.cpp
+ typedef uint WState;
+
+ // QWidget state flags (internal, barely documented in qwidget.cpp)
+ enum WidgetState {
+ WState_Created = 0x00000001,
+ WState_Disabled = 0x00000002,
+ WState_Visible = 0x00000004,
+ WState_ForceHide = 0x00000008,
+ WState_OwnCursor = 0x00000010,
+ WState_MouseTracking = 0x00000020,
+ WState_CompressKeys = 0x00000040,
+ WState_BlockUpdates = 0x00000080,
+ WState_InPaintEvent = 0x00000100,
+ WState_Reparented = 0x00000200,
+ WState_ConfigPending = 0x00000400,
+ WState_Resized = 0x00000800,
+ WState_AutoMask = 0x00001000,
+ WState_Polished = 0x00002000,
+ WState_DND = 0x00004000,
+ WState_Reserved0 = 0x00008000,
+ WState_Reserved1 = 0x00010000,
+ WState_Reserved2 = 0x00020000,
+ WState_CreatedHidden = 0x00040000,
+ WState_Maximized = 0x00080000,
+ WState_Minimized = 0x00100000,
+ WState_ForceDisabled = 0x00200000,
+ WState_Exposed = 0x00400000,
+ WState_HasMouse = 0x00800000
+ };
+
+ // Widget flags2; documented in qwidget.cpp
+ typedef uint WFlags;
+
+ // documented in qwidget.cpp
+ enum WidgetFlags {
+ WType_TopLevel = 0x00000001, // widget type flags
+ WType_Dialog = 0x00000002,
+ WType_Popup = 0x00000004,
+ WType_Desktop = 0x00000008,
+ WType_Mask = 0x0000000f,
+
+ WStyle_Customize = 0x00000010, // window style flags
+ WStyle_NormalBorder = 0x00000020,
+ WStyle_DialogBorder = 0x00000040, // MS-Windows only
+ WStyle_NoBorder = 0x00002000,
+ WStyle_Title = 0x00000080,
+ WStyle_SysMenu = 0x00000100,
+ WStyle_Minimize = 0x00000200,
+ WStyle_Maximize = 0x00000400,
+ WStyle_MinMax = WStyle_Minimize | WStyle_Maximize,
+ WStyle_Tool = 0x00000800,
+ WStyle_StaysOnTop = 0x00001000,
+ WStyle_ContextHelp = 0x00004000,
+ WStyle_Reserved = 0x00008000,
+ WStyle_Mask = 0x0000fff0,
+
+ WDestructiveClose = 0x00010000, // misc flags
+ WPaintDesktop = 0x00020000,
+ WPaintUnclipped = 0x00040000,
+ WPaintClever = 0x00080000,
+ WResizeNoErase = 0x00100000,
+ WMouseNoMask = 0x00200000,
+ WStaticContents = 0x00400000,
+ WRepaintNoErase = 0x00800000,
+#ifdef Q_WS_X11
+ WX11BypassWM = 0x01000000,
+ WWinOwnDC = 0x00000000,
+#else
+ WX11BypassWM = 0x00000000,
+ WWinOwnDC = 0x01000000,
+#endif
+ WGroupLeader = 0x02000000,
+ WShowModal = 0x04000000,
+ WNoMousePropagation = 0x08000000,
+ WSubWindow = 0x10000000
+#ifndef QT_NO_COMPAT
+ ,
+ WNorthWestGravity = WStaticContents,
+ WType_Modal = WType_Dialog | WShowModal,
+ WStyle_Dialog = WType_Dialog,
+ WStyle_NoBorderEx = WStyle_NoBorder
+#endif
+ };
+
+ // Image conversion flags. The unusual ordering is caused by
+ // compatibility and default requirements.
+ // Documented in qimage.cpp
+
+ enum ImageConversionFlags {
+ ColorMode_Mask = 0x00000003,
+ AutoColor = 0x00000000,
+ ColorOnly = 0x00000003,
+ MonoOnly = 0x00000002,
+ // Reserved = 0x00000001,
+
+ AlphaDither_Mask = 0x0000000c,
+ ThresholdAlphaDither = 0x00000000,
+ OrderedAlphaDither = 0x00000004,
+ DiffuseAlphaDither = 0x00000008,
+ NoAlpha = 0x0000000c, // Not supported
+
+ Dither_Mask = 0x00000030,
+ DiffuseDither = 0x00000000,
+ OrderedDither = 0x00000010,
+ ThresholdDither = 0x00000020,
+ // ReservedDither= 0x00000030,
+
+ DitherMode_Mask = 0x000000c0,
+ AutoDither = 0x00000000,
+ PreferDither = 0x00000040,
+ AvoidDither = 0x00000080
+ };
+
+ // documented in qpainter.cpp
+ enum BGMode { // background mode
+ TransparentMode,
+ OpaqueMode
+ };
+
+#ifndef QT_NO_COMPAT
+ // documented in qpainter.cpp
+ enum PaintUnit { // paint unit
+ PixelUnit,
+ LoMetricUnit, // OBSOLETE
+ HiMetricUnit, // OBSOLETE
+ LoEnglishUnit, // OBSOLETE
+ HiEnglishUnit, // OBSOLETE
+ TwipsUnit // OBSOLETE
+ };
+#endif
+
+ // documented in qstyle.cpp
+#ifdef QT_NO_COMPAT
+ enum GUIStyle {
+ WindowsStyle = 1, // ### Qt 4.0: either remove the obsolete enums or clean up compat vs.
+ MotifStyle = 4 // ### QT_NO_COMPAT by reordering or combination into one enum.
+ };
+#else
+ enum GUIStyle {
+ MacStyle, // OBSOLETE
+ WindowsStyle,
+ Win3Style, // OBSOLETE
+ PMStyle, // OBSOLETE
+ MotifStyle
+ };
+#endif
+
+ // documented in qkeysequence.cpp
+ enum SequenceMatch {
+ NoMatch,
+ PartialMatch,
+ Identical
+ };
+
+ // documented in qevent.cpp
+ enum Modifier { // accelerator modifiers
+ META = 0x00100000,
+ SHIFT = 0x00200000,
+ CTRL = 0x00400000,
+ ALT = 0x00800000,
+ MODIFIER_MASK = 0x00f00000,
+ UNICODE_ACCEL = 0x10000000,
+
+ ASCII_ACCEL = UNICODE_ACCEL // 1.x compat
+ };
+
+ // documented in qevent.cpp
+ enum Key {
+ Key_Escape = 0x1000, // misc keys
+ Key_Tab = 0x1001,
+ Key_Backtab = 0x1002, Key_BackTab = Key_Backtab,
+ Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace,
+ Key_Return = 0x1004,
+ Key_Enter = 0x1005,
+ Key_Insert = 0x1006,
+ Key_Delete = 0x1007,
+ Key_Pause = 0x1008,
+ Key_Print = 0x1009,
+ Key_SysReq = 0x100a,
+ Key_Clear = 0x100b,
+ Key_Home = 0x1010, // cursor movement
+ Key_End = 0x1011,
+ Key_Left = 0x1012,
+ Key_Up = 0x1013,
+ Key_Right = 0x1014,
+ Key_Down = 0x1015,
+ Key_Prior = 0x1016, Key_PageUp = Key_Prior,
+ Key_Next = 0x1017, Key_PageDown = Key_Next,
+ Key_Shift = 0x1020, // modifiers
+ Key_Control = 0x1021,
+ Key_Meta = 0x1022,
+ Key_Alt = 0x1023,
+ Key_CapsLock = 0x1024,
+ Key_NumLock = 0x1025,
+ Key_ScrollLock = 0x1026,
+ Key_F1 = 0x1030, // function keys
+ Key_F2 = 0x1031,
+ Key_F3 = 0x1032,
+ Key_F4 = 0x1033,
+ Key_F5 = 0x1034,
+ Key_F6 = 0x1035,
+ Key_F7 = 0x1036,
+ Key_F8 = 0x1037,
+ Key_F9 = 0x1038,
+ Key_F10 = 0x1039,
+ Key_F11 = 0x103a,
+ Key_F12 = 0x103b,
+ Key_F13 = 0x103c,
+ Key_F14 = 0x103d,
+ Key_F15 = 0x103e,
+ Key_F16 = 0x103f,
+ Key_F17 = 0x1040,
+ Key_F18 = 0x1041,
+ Key_F19 = 0x1042,
+ Key_F20 = 0x1043,
+ Key_F21 = 0x1044,
+ Key_F22 = 0x1045,
+ Key_F23 = 0x1046,
+ Key_F24 = 0x1047,
+ Key_F25 = 0x1048, // F25 .. F35 only on X11
+ Key_F26 = 0x1049,
+ Key_F27 = 0x104a,
+ Key_F28 = 0x104b,
+ Key_F29 = 0x104c,
+ Key_F30 = 0x104d,
+ Key_F31 = 0x104e,
+ Key_F32 = 0x104f,
+ Key_F33 = 0x1050,
+ Key_F34 = 0x1051,
+ Key_F35 = 0x1052,
+ Key_Super_L = 0x1053, // extra keys
+ Key_Super_R = 0x1054,
+ Key_Menu = 0x1055,
+ Key_Hyper_L = 0x1056,
+ Key_Hyper_R = 0x1057,
+ Key_Help = 0x1058,
+ Key_Direction_L = 0x1059,
+ Key_Direction_R = 0x1060,
+ Key_Space = 0x20, // 7 bit printable ASCII
+ Key_Any = Key_Space,
+ Key_Exclam = 0x21,
+ Key_QuoteDbl = 0x22,
+ Key_NumberSign = 0x23,
+ Key_Dollar = 0x24,
+ Key_Percent = 0x25,
+ Key_Ampersand = 0x26,
+ Key_Apostrophe = 0x27,
+ Key_ParenLeft = 0x28,
+ Key_ParenRight = 0x29,
+ Key_Asterisk = 0x2a,
+ Key_Plus = 0x2b,
+ Key_Comma = 0x2c,
+ Key_Minus = 0x2d,
+ Key_Period = 0x2e,
+ Key_Slash = 0x2f,
+ Key_0 = 0x30,
+ Key_1 = 0x31,
+ Key_2 = 0x32,
+ Key_3 = 0x33,
+ Key_4 = 0x34,
+ Key_5 = 0x35,
+ Key_6 = 0x36,
+ Key_7 = 0x37,
+ Key_8 = 0x38,
+ Key_9 = 0x39,
+ Key_Colon = 0x3a,
+ Key_Semicolon = 0x3b,
+ Key_Less = 0x3c,
+ Key_Equal = 0x3d,
+ Key_Greater = 0x3e,
+ Key_Question = 0x3f,
+ Key_At = 0x40,
+ Key_A = 0x41,
+ Key_B = 0x42,
+ Key_C = 0x43,
+ Key_D = 0x44,
+ Key_E = 0x45,
+ Key_F = 0x46,
+ Key_G = 0x47,
+ Key_H = 0x48,
+ Key_I = 0x49,
+ Key_J = 0x4a,
+ Key_K = 0x4b,
+ Key_L = 0x4c,
+ Key_M = 0x4d,
+ Key_N = 0x4e,
+ Key_O = 0x4f,
+ Key_P = 0x50,
+ Key_Q = 0x51,
+ Key_R = 0x52,
+ Key_S = 0x53,
+ Key_T = 0x54,
+ Key_U = 0x55,
+ Key_V = 0x56,
+ Key_W = 0x57,
+ Key_X = 0x58,
+ Key_Y = 0x59,
+ Key_Z = 0x5a,
+ Key_BracketLeft = 0x5b,
+ Key_Backslash = 0x5c,
+ Key_BracketRight = 0x5d,
+ Key_AsciiCircum = 0x5e,
+ Key_Underscore = 0x5f,
+ Key_QuoteLeft = 0x60,
+ Key_BraceLeft = 0x7b,
+ Key_Bar = 0x7c,
+ Key_BraceRight = 0x7d,
+ Key_AsciiTilde = 0x7e,
+
+ // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
+
+ Key_nobreakspace = 0x0a0,
+ Key_exclamdown = 0x0a1,
+ Key_cent = 0x0a2,
+ Key_sterling = 0x0a3,
+ Key_currency = 0x0a4,
+ Key_yen = 0x0a5,
+ Key_brokenbar = 0x0a6,
+ Key_section = 0x0a7,
+ Key_diaeresis = 0x0a8,
+ Key_copyright = 0x0a9,
+ Key_ordfeminine = 0x0aa,
+ Key_guillemotleft = 0x0ab, // left angle quotation mark
+ Key_notsign = 0x0ac,
+ Key_hyphen = 0x0ad,
+ Key_registered = 0x0ae,
+ Key_macron = 0x0af,
+ Key_degree = 0x0b0,
+ Key_plusminus = 0x0b1,
+ Key_twosuperior = 0x0b2,
+ Key_threesuperior = 0x0b3,
+ Key_acute = 0x0b4,
+ Key_mu = 0x0b5,
+ Key_paragraph = 0x0b6,
+ Key_periodcentered = 0x0b7,
+ Key_cedilla = 0x0b8,
+ Key_onesuperior = 0x0b9,
+ Key_masculine = 0x0ba,
+ Key_guillemotright = 0x0bb, // right angle quotation mark
+ Key_onequarter = 0x0bc,
+ Key_onehalf = 0x0bd,
+ Key_threequarters = 0x0be,
+ Key_questiondown = 0x0bf,
+ Key_Agrave = 0x0c0,
+ Key_Aacute = 0x0c1,
+ Key_Acircumflex = 0x0c2,
+ Key_Atilde = 0x0c3,
+ Key_Adiaeresis = 0x0c4,
+ Key_Aring = 0x0c5,
+ Key_AE = 0x0c6,
+ Key_Ccedilla = 0x0c7,
+ Key_Egrave = 0x0c8,
+ Key_Eacute = 0x0c9,
+ Key_Ecircumflex = 0x0ca,
+ Key_Ediaeresis = 0x0cb,
+ Key_Igrave = 0x0cc,
+ Key_Iacute = 0x0cd,
+ Key_Icircumflex = 0x0ce,
+ Key_Idiaeresis = 0x0cf,
+ Key_ETH = 0x0d0,
+ Key_Ntilde = 0x0d1,
+ Key_Ograve = 0x0d2,
+ Key_Oacute = 0x0d3,
+ Key_Ocircumflex = 0x0d4,
+ Key_Otilde = 0x0d5,
+ Key_Odiaeresis = 0x0d6,
+ Key_multiply = 0x0d7,
+ Key_Ooblique = 0x0d8,
+ Key_Ugrave = 0x0d9,
+ Key_Uacute = 0x0da,
+ Key_Ucircumflex = 0x0db,
+ Key_Udiaeresis = 0x0dc,
+ Key_Yacute = 0x0dd,
+ Key_THORN = 0x0de,
+ Key_ssharp = 0x0df,
+ Key_agrave = 0x0e0,
+ Key_aacute = 0x0e1,
+ Key_acircumflex = 0x0e2,
+ Key_atilde = 0x0e3,
+ Key_adiaeresis = 0x0e4,
+ Key_aring = 0x0e5,
+ Key_ae = 0x0e6,
+ Key_ccedilla = 0x0e7,
+ Key_egrave = 0x0e8,
+ Key_eacute = 0x0e9,
+ Key_ecircumflex = 0x0ea,
+ Key_ediaeresis = 0x0eb,
+ Key_igrave = 0x0ec,
+ Key_iacute = 0x0ed,
+ Key_icircumflex = 0x0ee,
+ Key_idiaeresis = 0x0ef,
+ Key_eth = 0x0f0,
+ Key_ntilde = 0x0f1,
+ Key_ograve = 0x0f2,
+ Key_oacute = 0x0f3,
+ Key_ocircumflex = 0x0f4,
+ Key_otilde = 0x0f5,
+ Key_odiaeresis = 0x0f6,
+ Key_division = 0x0f7,
+ Key_oslash = 0x0f8,
+ Key_ugrave = 0x0f9,
+ Key_uacute = 0x0fa,
+ Key_ucircumflex = 0x0fb,
+ Key_udiaeresis = 0x0fc,
+ Key_yacute = 0x0fd,
+ Key_thorn = 0x0fe,
+ Key_ydiaeresis = 0x0ff,
+
+ // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
+
+ Key_Back = 0x1061,
+ Key_Forward = 0x1062,
+ Key_Stop = 0x1063,
+ Key_Refresh = 0x1064,
+
+ Key_VolumeDown = 0x1070,
+ Key_VolumeMute = 0x1071,
+ Key_VolumeUp = 0x1072,
+ Key_BassBoost = 0x1073,
+ Key_BassUp = 0x1074,
+ Key_BassDown = 0x1075,
+ Key_TrebleUp = 0x1076,
+ Key_TrebleDown = 0x1077,
+
+ Key_MediaPlay = 0x1080,
+ Key_MediaStop = 0x1081,
+ Key_MediaPrev = 0x1082,
+ Key_MediaNext = 0x1083,
+ Key_MediaRecord = 0x1084,
+
+ Key_HomePage = 0x1090,
+ Key_Favorites = 0x1091,
+ Key_Search = 0x1092,
+ Key_Standby = 0x1093,
+ Key_OpenUrl = 0x1094,
+
+ Key_LaunchMail = 0x10a0,
+ Key_LaunchMedia = 0x10a1,
+ Key_Launch0 = 0x10a2,
+ Key_Launch1 = 0x10a3,
+ Key_Launch2 = 0x10a4,
+ Key_Launch3 = 0x10a5,
+ Key_Launch4 = 0x10a6,
+ Key_Launch5 = 0x10a7,
+ Key_Launch6 = 0x10a8,
+ Key_Launch7 = 0x10a9,
+ Key_Launch8 = 0x10aa,
+ Key_Launch9 = 0x10ab,
+ Key_LaunchA = 0x10ac,
+ Key_LaunchB = 0x10ad,
+ Key_LaunchC = 0x10ae,
+ Key_LaunchD = 0x10af,
+ Key_LaunchE = 0x10b0,
+ Key_LaunchF = 0x10b1,
+
+ Key_MediaLast = 0x1fff,
+
+ Key_unknown = 0xffff
+ };
+
+ // documented in qcommonstyle.cpp
+ enum ArrowType {
+ UpArrow,
+ DownArrow,
+ LeftArrow,
+ RightArrow
+ };
+
+ // documented in qpainter.cpp
+ enum RasterOp { // raster op mode
+ CopyROP,
+ OrROP,
+ XorROP,
+ NotAndROP, EraseROP=NotAndROP,
+ NotCopyROP,
+ NotOrROP,
+ NotXorROP,
+ AndROP, NotEraseROP=AndROP,
+ NotROP,
+ ClearROP,
+ SetROP,
+ NopROP,
+ AndNotROP,
+ OrNotROP,
+ NandROP,
+ NorROP, LastROP=NorROP
+ };
+
+ // documented in qpainter.cpp
+ enum PenStyle { // pen style
+ NoPen,
+ SolidLine,
+ DashLine,
+ DotLine,
+ DashDotLine,
+ DashDotDotLine,
+ MPenStyle = 0x0f
+ };
+
+ // documented in qpainter.cpp
+ enum PenCapStyle { // line endcap style
+ FlatCap = 0x00,
+ SquareCap = 0x10,
+ RoundCap = 0x20,
+ MPenCapStyle = 0x30
+ };
+
+ // documented in qpainter.cpp
+ enum PenJoinStyle { // line join style
+ MiterJoin = 0x00,
+ BevelJoin = 0x40,
+ RoundJoin = 0x80,
+ MPenJoinStyle = 0xc0
+ };
+
+ // documented in qpainter.cpp
+ enum BrushStyle { // brush style
+ NoBrush,
+ SolidPattern,
+ Dense1Pattern,
+ Dense2Pattern,
+ Dense3Pattern,
+ Dense4Pattern,
+ Dense5Pattern,
+ Dense6Pattern,
+ Dense7Pattern,
+ HorPattern,
+ VerPattern,
+ CrossPattern,
+ BDiagPattern,
+ FDiagPattern,
+ DiagCrossPattern,
+ CustomPattern=24
+ };
+
+ // documented in qapplication_win.cpp
+ enum WindowsVersion {
+ WV_32s = 0x0001,
+ WV_95 = 0x0002,
+ WV_98 = 0x0003,
+ WV_Me = 0x0004,
+ WV_DOS_based = 0x000f,
+
+ WV_NT = 0x0010,
+ WV_2000 = 0x0020,
+ WV_XP = 0x0030,
+ WV_NT_based = 0x00f0
+ };
+
+ // documented in qstyle.cpp
+ enum UIEffect {
+ UI_General,
+ UI_AnimateMenu,
+ UI_FadeMenu,
+ UI_AnimateCombo,
+ UI_AnimateTooltip,
+ UI_FadeTooltip
+ };
+
+ // documented in qcursor.cpp
+ enum CursorShape {
+ ArrowCursor,
+ UpArrowCursor,
+ CrossCursor,
+ WaitCursor,
+ IbeamCursor,
+ SizeVerCursor,
+ SizeHorCursor,
+ SizeBDiagCursor,
+ SizeFDiagCursor,
+ SizeAllCursor,
+ BlankCursor,
+ SplitVCursor,
+ SplitHCursor,
+ PointingHandCursor,
+ ForbiddenCursor,
+ WhatsThisCursor,
+ LastCursor = WhatsThisCursor,
+ BitmapCursor = 24
+ };
+
+ // Global cursors
+
+ QT_STATIC_CONST QCursor & arrowCursor; // standard arrow cursor
+ QT_STATIC_CONST QCursor & upArrowCursor; // upwards arrow
+ QT_STATIC_CONST QCursor & crossCursor; // crosshair
+ QT_STATIC_CONST QCursor & waitCursor; // hourglass/watch
+ QT_STATIC_CONST QCursor & ibeamCursor; // ibeam/text entry
+ QT_STATIC_CONST QCursor & sizeVerCursor; // vertical resize
+ QT_STATIC_CONST QCursor & sizeHorCursor; // horizontal resize
+ QT_STATIC_CONST QCursor & sizeBDiagCursor; // diagonal resize (/)
+ QT_STATIC_CONST QCursor & sizeFDiagCursor; // diagonal resize (\)
+ QT_STATIC_CONST QCursor & sizeAllCursor; // all directions resize
+ QT_STATIC_CONST QCursor & blankCursor; // blank/invisible cursor
+ QT_STATIC_CONST QCursor & splitVCursor; // vertical bar with left-right
+ // arrows
+ QT_STATIC_CONST QCursor & splitHCursor; // horizontal bar with up-down
+ // arrows
+ QT_STATIC_CONST QCursor & pointingHandCursor; // pointing hand
+ QT_STATIC_CONST QCursor & forbiddenCursor; // forbidden cursor (slashed circle)
+ QT_STATIC_CONST QCursor & whatsThisCursor; // arrow with a question mark
+
+
+ enum TextFormat {
+ PlainText,
+ RichText,
+ AutoText,
+ LogText
+ };
+
+ // Documented in qtextedit.cpp
+ enum AnchorAttribute {
+ AnchorName,
+ AnchorHref
+ };
+
+ // Documented in qmainwindow.cpp
+ enum Dock {
+ DockUnmanaged,
+ DockTornOff,
+ DockTop,
+ DockBottom,
+ DockRight,
+ DockLeft,
+ DockMinimized
+#ifndef QT_NO_COMPAT
+ ,
+ Unmanaged = DockUnmanaged,
+ TornOff = DockTornOff,
+ Top = DockTop,
+ Bottom = DockBottom,
+ Right = DockRight,
+ Left = DockLeft,
+ Minimized = DockMinimized
+#endif
+ };
+ // compatibility
+ typedef Dock ToolBarDock;
+
+ // documented in qdatetime.cpp
+ enum DateFormat {
+ TextDate, // default Qt
+ ISODate, // ISO 8601
+ LocalDate // locale dependant
+ };
+
+ // documented in qdatetime.cpp
+ enum TimeSpec {
+ LocalTime,
+ UTC
+ };
+
+ // documented in qwidget.cpp
+ enum BackgroundMode {
+ FixedColor,
+ FixedPixmap,
+ NoBackground,
+ PaletteForeground,
+ PaletteButton,
+ PaletteLight,
+ PaletteMidlight,
+ PaletteDark,
+ PaletteMid,
+ PaletteText,
+ PaletteBrightText,
+ PaletteBase,
+ PaletteBackground,
+ PaletteShadow,
+ PaletteHighlight,
+ PaletteHighlightedText,
+ PaletteButtonText,
+ PaletteLink,
+ PaletteLinkVisited,
+ X11ParentRelative
+ };
+
+ typedef uint ComparisonFlags;
+
+ // Documented in qstring.cpp
+ enum StringComparisonMode {
+ CaseSensitive = 0x00001, // 0 0001
+ BeginsWith = 0x00002, // 0 0010
+ EndsWith = 0x00004, // 0 0100
+ Contains = 0x00008, // 0 1000
+ ExactMatch = 0x00010 // 1 0000
+ };
+
+ // "handle" type for system objects. Documented as \internal in
+ // qapplication.cpp
+#if defined(Q_WS_MAC)
+ typedef void * HANDLE;
+#elif defined(Q_WS_WIN)
+ typedef void *HANDLE;
+#elif defined(Q_WS_X11)
+ typedef unsigned long HANDLE;
+#elif defined(Q_WS_QWS)
+ typedef void * HANDLE;
+#endif
+};
+
+
+class Q_EXPORT QInternal {
+public:
+ enum PaintDeviceFlags {
+ UndefinedDevice = 0x00,
+ Widget = 0x01,
+ Pixmap = 0x02,
+ Printer = 0x03,
+ Picture = 0x04,
+ System = 0x05,
+ DeviceTypeMask = 0x0f,
+ ExternalDevice = 0x10,
+ // used to emulate some of the behaviour different between Qt2 and Qt3 (mainly for printing)
+ CompatibilityMode = 0x20
+ };
+};
+
+#endif // QNAMESPACE_H
diff --git a/qmake/include/qpair.h b/qmake/include/qpair.h
new file mode 100644
index 0000000..e7cd70e
--- a/dev/null
+++ b/qmake/include/qpair.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Definition of QPair class
+**
+**
+** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPAIR_H
+#define QPAIR_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qdatastream.h"
+#endif // QT_H
+
+template <class T1, class T2>
+struct QPair
+{
+ typedef T1 first_type;
+ typedef T2 second_type;
+
+ QPair()
+ : first( T1() ), second( T2() )
+ {}
+ QPair( const T1& t1, const T2& t2 )
+ : first( t1 ), second( t2 )
+ {}
+
+ T1 first;
+ T2 second;
+};
+
+template <class T1, class T2>
+Q_INLINE_TEMPLATES bool operator==( const QPair<T1, T2>& x, const QPair<T1, T2>& y )
+{
+ return x.first == y.first && x.second == y.second;
+}
+
+template <class T1, class T2>
+Q_INLINE_TEMPLATES bool operator<( const QPair<T1, T2>& x, const QPair<T1, T2>& y )
+{
+ return x.first < y.first ||
+ ( !( y.first < x.first ) && x.second < y.second );
+}
+
+template <class T1, class T2>
+Q_INLINE_TEMPLATES QPair<T1, T2> qMakePair( const T1& x, const T2& y )
+{
+ return QPair<T1, T2>( x, y );
+}
+
+#ifndef QT_NO_DATASTREAM
+template <class T1, class T2>
+inline QDataStream& operator>>( QDataStream& s, QPair<T1, T2>& p )
+{
+ s >> p.first >> p.second;
+ return s;
+}
+
+template <class T1, class T2>
+inline QDataStream& operator<<( QDataStream& s, const QPair<T1, T2>& p )
+{
+ s << p.first << p.second;
+ return s;
+}
+#endif
+
+#endif
diff --git a/qmake/include/qptrcollection.h b/qmake/include/qptrcollection.h
new file mode 100644
index 0000000..4f121fa
--- a/dev/null
+++ b/qmake/include/qptrcollection.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Definition of base class for all pointer based collection classes
+**
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPTRCOLLECTION_H
+#define QPTRCOLLECTION_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+
+class QGVector;
+class QGList;
+class QGDict;
+
+
+class Q_EXPORT QPtrCollection // inherited by all collections
+{
+public:
+ bool autoDelete() const { return del_item; }
+ void setAutoDelete( bool enable ) { del_item = enable; }
+
+ virtual uint count() const = 0;
+ virtual void clear() = 0; // delete all objects
+
+ typedef void *Item; // generic collection item
+
+protected:
+ QPtrCollection() { del_item = FALSE; } // no deletion of objects
+ QPtrCollection(const QPtrCollection &) { del_item = FALSE; }
+ virtual ~QPtrCollection() {}
+
+ bool del_item; // default FALSE
+
+ virtual Item newItem( Item ); // create object
+ virtual void deleteItem( Item ) = 0; // delete object
+};
+
+
+#ifndef QT_NO_COMPAT
+#define QCollection QPtrCollection
+#endif
+
+#endif // QPTRCOLLECTION_H
diff --git a/qmake/include/qptrlist.h b/qmake/include/qptrlist.h
new file mode 100644
index 0000000..53fb605
--- a/dev/null
+++ b/qmake/include/qptrlist.h
@@ -0,0 +1,160 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QPtrList template/macro class
+**
+** Created :
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPTRLIST_H
+#define QPTRLIST_H
+
+#ifndef QT_H
+#include "qglist.h"
+#endif // QT_H
+
+
+template<class type>
+class QPtrList
+#ifdef Q_QDOC
+ : public QPtrCollection
+#else
+ : public QGList
+#endif
+{
+public:
+ QPtrList() {}
+ QPtrList( const QPtrList<type> &l ) : QGList(l) {}
+ ~QPtrList() { clear(); }
+ QPtrList<type> &operator=(const QPtrList<type> &l)
+ { return (QPtrList<type>&)QGList::operator=(l); }
+ bool operator==( const QPtrList<type> &list ) const
+ { return QGList::operator==( list ); }
+ bool operator!=( const QPtrList<type> &list ) const
+ { return !QGList::operator==( list ); }
+ uint count() const { return QGList::count(); }
+ bool isEmpty() const { return QGList::count() == 0; }
+ bool insert( uint i, const type *d){ return QGList::insertAt(i,(QPtrCollection::Item)d); }
+ void inSort( const type *d ) { QGList::inSort((QPtrCollection::Item)d); }
+ void prepend( const type *d ) { QGList::insertAt(0,(QPtrCollection::Item)d); }
+ void append( const type *d ) { QGList::append((QPtrCollection::Item)d); }
+ bool remove( uint i ) { return QGList::removeAt(i); }
+ bool remove() { return QGList::remove((QPtrCollection::Item)0); }
+ bool remove( const type *d ) { return QGList::remove((QPtrCollection::Item)d); }
+ bool removeRef( const type *d ) { return QGList::removeRef((QPtrCollection::Item)d); }
+ void removeNode( QLNode *n ) { QGList::removeNode(n); }
+ bool removeFirst() { return QGList::removeFirst(); }
+ bool removeLast() { return QGList::removeLast(); }
+ type *take( uint i ) { return (type *)QGList::takeAt(i); }
+ type *take() { return (type *)QGList::take(); }
+ type *takeNode( QLNode *n ) { return (type *)QGList::takeNode(n); }
+ void clear() { QGList::clear(); }
+ void sort() { QGList::sort(); }
+ int find( const type *d ) { return QGList::find((QPtrCollection::Item)d); }
+ int findNext( const type *d ) { return QGList::find((QPtrCollection::Item)d,FALSE); }
+ int findRef( const type *d ) { return QGList::findRef((QPtrCollection::Item)d); }
+ int findNextRef( const type *d ){ return QGList::findRef((QPtrCollection::Item)d,FALSE);}
+ uint contains( const type *d ) const { return QGList::contains((QPtrCollection::Item)d); }
+ uint containsRef( const type *d ) const
+ { return QGList::containsRef((QPtrCollection::Item)d); }
+ bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); }
+ type *at( uint i ) { return (type *)QGList::at(i); }
+ int at() const { return QGList::at(); }
+ type *current() const { return (type *)QGList::get(); }
+ QLNode *currentNode() const { return QGList::currentNode(); }
+ type *getFirst() const { return (type *)QGList::cfirst(); }
+ type *getLast() const { return (type *)QGList::clast(); }
+ type *first() { return (type *)QGList::first(); }
+ type *last() { return (type *)QGList::last(); }
+ type *next() { return (type *)QGList::next(); }
+ type *prev() { return (type *)QGList::prev(); }
+ void toVector( QGVector *vec )const{ QGList::toVector(vec); }
+
+#ifdef Q_QDOC
+protected:
+ virtual int compareItems( QPtrCollection::Item, QPtrCollection::Item );
+ virtual QDataStream& read( QDataStream&, QPtrCollection::Item& );
+ virtual QDataStream& write( QDataStream&, QPtrCollection::Item ) const;
+#endif
+
+private:
+ void deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void QPtrList<void>::deleteItem( QPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void QPtrList<type>::deleteItem( QPtrCollection::Item d )
+{
+ if ( del_item ) delete (type *)d;
+}
+
+template<class type>
+class QPtrListIterator : public QGListIterator
+{
+public:
+ QPtrListIterator(const QPtrList<type> &l) :QGListIterator((QGList &)l) {}
+ ~QPtrListIterator() {}
+ uint count() const { return list->count(); }
+ bool isEmpty() const { return list->count() == 0; }
+ bool atFirst() const { return QGListIterator::atFirst(); }
+ bool atLast() const { return QGListIterator::atLast(); }
+ type *toFirst() { return (type *)QGListIterator::toFirst(); }
+ type *toLast() { return (type *)QGListIterator::toLast(); }
+ operator type *() const { return (type *)QGListIterator::get(); }
+ type *operator*() { return (type *)QGListIterator::get(); }
+
+ // No good, since QPtrList<char> (ie. QStrList fails...
+ //
+ // MSVC++ gives warning
+ // Sunpro C++ 4.1 gives error
+ // type *operator->() { return (type *)QGListIterator::get(); }
+
+ type *current() const { return (type *)QGListIterator::get(); }
+ type *operator()() { return (type *)QGListIterator::operator()();}
+ type *operator++() { return (type *)QGListIterator::operator++(); }
+ type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);}
+ type *operator--() { return (type *)QGListIterator::operator--(); }
+ type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);}
+ QPtrListIterator<type>& operator=(const QPtrListIterator<type>&it)
+ { QGListIterator::operator=(it); return *this; }
+};
+
+#ifndef QT_NO_COMPAT
+#define QList QPtrList
+#define QListIterator QPtrListIterator
+#endif
+
+#endif // QPTRLIST_H
diff --git a/qmake/include/qptrvector.h b/qmake/include/qptrvector.h
new file mode 100644
index 0000000..f6d9623
--- a/dev/null
+++ b/qmake/include/qptrvector.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QPtrVector pointer based template class
+**
+** Created : 930907
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QPTRVECTOR_H
+#define QPTRVECTOR_H
+
+#ifndef QT_H
+#include "qgvector.h"
+#endif // QT_H
+
+template<class type>
+class QPtrVector
+#ifdef Q_QDOC
+ : public QPtrCollection
+#else
+ : public QGVector
+#endif
+{
+public:
+ QPtrVector() { }
+ QPtrVector( uint size ) : QGVector(size) { }
+ QPtrVector( const QPtrVector<type> &v ) : QGVector( v ) { }
+ ~QPtrVector() { clear(); }
+ QPtrVector<type> &operator=(const QPtrVector<type> &v)
+ { return (QPtrVector<type>&)QGVector::operator=(v); }
+ bool operator==( const QPtrVector<type> &v ) const { return QGVector::operator==(v); }
+ type **data() const { return (type **)QGVector::data(); }
+ uint size() const { return QGVector::size(); }
+ uint count() const { return QGVector::count(); }
+ bool isEmpty() const { return QGVector::count() == 0; }
+ bool isNull() const { return QGVector::size() == 0; }
+ bool resize( uint size ) { return QGVector::resize(size); }
+ bool insert( uint i, const type *d){ return QGVector::insert(i,(Item)d); }
+ bool remove( uint i ) { return QGVector::remove(i); }
+ type *take( uint i ) { return (type *)QGVector::take(i); }
+ void clear() { QGVector::clear(); }
+ bool fill( const type *d, int size=-1 )
+ { return QGVector::fill((Item)d,size);}
+ void sort() { QGVector::sort(); }
+ int bsearch( const type *d ) const{ return QGVector::bsearch((Item)d); }
+ int findRef( const type *d, uint i=0 ) const
+ { return QGVector::findRef((Item)d,i);}
+ int find( const type *d, uint i= 0 ) const
+ { return QGVector::find((Item)d,i); }
+ uint containsRef( const type *d ) const
+ { return QGVector::containsRef((Item)d); }
+ uint contains( const type *d ) const
+ { return QGVector::contains((Item)d); }
+ type *operator[]( int i ) const { return (type *)QGVector::at(i); }
+ type *at( uint i ) const { return (type *)QGVector::at(i); }
+ void toList( QGList *list ) const { QGVector::toList(list); }
+
+#ifdef Q_QDOC
+protected:
+ virtual int compareItems( QPtrCollection::Item d1, QPtrCollection::Item d2 );
+ virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &d );
+ virtual QDataStream& write( QDataStream &s, QPtrCollection::Item d ) const;
+#endif
+
+private:
+ void deleteItem( Item d );
+};
+
+#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
+template<> inline void QPtrVector<void>::deleteItem( QPtrCollection::Item )
+{
+}
+#endif
+
+template<class type> inline void QPtrVector<type>::deleteItem( QPtrCollection::Item d )
+{
+ if ( del_item ) delete (type *)d;
+}
+
+#ifndef QT_NO_COMPAT
+#define QVector QPtrVector
+#endif
+
+#endif // QVECTOR_H
diff --git a/qmake/include/qregexp.h b/qmake/include/qregexp.h
new file mode 100644
index 0000000..7bb777a
--- a/dev/null
+++ b/qmake/include/qregexp.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QRegExp class
+**
+** Created : 950126
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QREGEXP_H
+#define QREGEXP_H
+
+#ifndef QT_H
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_REGEXP
+class QRegExpEngine;
+struct QRegExpPrivate;
+
+class Q_EXPORT QRegExp
+{
+public:
+ enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
+
+ QRegExp();
+ QRegExp( const QString& pattern, bool caseSensitive = TRUE,
+ bool wildcard = FALSE );
+ QRegExp( const QRegExp& rx );
+ ~QRegExp();
+ QRegExp& operator=( const QRegExp& rx );
+
+ bool operator==( const QRegExp& rx ) const;
+ bool operator!=( const QRegExp& rx ) const { return !operator==( rx ); }
+
+ bool isEmpty() const;
+ bool isValid() const;
+ QString pattern() const;
+ void setPattern( const QString& pattern );
+ bool caseSensitive() const;
+ void setCaseSensitive( bool sensitive );
+#ifndef QT_NO_REGEXP_WILDCARD
+ bool wildcard() const;
+ void setWildcard( bool wildcard );
+#endif
+ bool minimal() const;
+ void setMinimal( bool minimal );
+
+ bool exactMatch( const QString& str ) const;
+#ifndef QT_NO_COMPAT
+ int match( const QString& str, int index = 0, int *len = 0,
+ bool indexIsStart = TRUE ) const;
+#endif
+
+#if defined(qdoc)
+ int search( const QString& str, int offset = 0,
+ CaretMode caretMode = CaretAtZero ) const;
+ int searchRev( const QString& str, int offset = -1,
+ CaretMode caretMode = CaretAtZero ) const;
+#else
+ // ### Qt 4.0: reduce these four to two functions
+ int search( const QString& str, int offset = 0 ) const;
+ int search( const QString& str, int offset, CaretMode caretMode ) const;
+ int searchRev( const QString& str, int offset = -1 ) const;
+ int searchRev( const QString& str, int offset, CaretMode caretMode ) const;
+#endif
+ int matchedLength() const;
+#ifndef QT_NO_REGEXP_CAPTURE
+ int numCaptures() const;
+ QStringList capturedTexts();
+ QString cap( int nth = 0 );
+ int pos( int nth = 0 );
+ QString errorString();
+#endif
+
+ static QString escape( const QString& str );
+
+private:
+ void compile( bool caseSensitive );
+
+ static int caretIndex( int offset, CaretMode caretMode );
+
+ QRegExpEngine *eng;
+ QRegExpPrivate *priv;
+};
+#endif // QT_NO_REGEXP
+#endif // QREGEXP_H
diff --git a/qmake/include/qshared.h b/qmake/include/qshared.h
new file mode 100644
index 0000000..3c2f97f
--- a/dev/null
+++ b/qmake/include/qshared.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QShared struct
+**
+** Created : 940112
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSHARED_H
+#define QSHARED_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+
+struct Q_EXPORT QShared
+{
+ QShared() : count( 1 ) { }
+ void ref() { count++; }
+ bool deref() { return !--count; }
+ uint count;
+};
+
+
+#endif // QSHARED_H
diff --git a/qmake/include/qstring.h b/qmake/include/qstring.h
new file mode 100644
index 0000000..2a87a5a
--- a/dev/null
+++ b/qmake/include/qstring.h
@@ -0,0 +1,950 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of the QString class, and related Unicode
+** functions.
+**
+** Created : 920609
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSTRING_H
+#define QSTRING_H
+
+#ifndef QT_H
+#include "qcstring.h"
+#endif // QT_H
+
+
+/*****************************************************************************
+ QString class
+ *****************************************************************************/
+
+class QRegExp;
+class QString;
+class QCharRef;
+template <class T> class QDeepCopy;
+
+class Q_EXPORT QChar {
+public:
+ QChar();
+ QChar( char c );
+ QChar( uchar c );
+ QChar( uchar c, uchar r );
+ QChar( const QChar& c );
+ QChar( ushort rc );
+ QChar( short rc );
+ QChar( uint rc );
+ QChar( int rc );
+
+ QT_STATIC_CONST QChar null; // 0000
+ QT_STATIC_CONST QChar replacement; // FFFD
+ QT_STATIC_CONST QChar byteOrderMark; // FEFF
+ QT_STATIC_CONST QChar byteOrderSwapped; // FFFE
+ QT_STATIC_CONST QChar nbsp; // 00A0
+
+ // Unicode information
+
+ enum Category
+ {
+ NoCategory,
+
+ Mark_NonSpacing, // Mn
+ Mark_SpacingCombining, // Mc
+ Mark_Enclosing, // Me
+
+ Number_DecimalDigit, // Nd
+ Number_Letter, // Nl
+ Number_Other, // No
+
+ Separator_Space, // Zs
+ Separator_Line, // Zl
+ Separator_Paragraph, // Zp
+
+ Other_Control, // Cc
+ Other_Format, // Cf
+ Other_Surrogate, // Cs
+ Other_PrivateUse, // Co
+ Other_NotAssigned, // Cn
+
+ Letter_Uppercase, // Lu
+ Letter_Lowercase, // Ll
+ Letter_Titlecase, // Lt
+ Letter_Modifier, // Lm
+ Letter_Other, // Lo
+
+ Punctuation_Connector, // Pc
+ Punctuation_Dash, // Pd
+ Punctuation_Dask = Punctuation_Dash, // oops
+ Punctuation_Open, // Ps
+ Punctuation_Close, // Pe
+ Punctuation_InitialQuote, // Pi
+ Punctuation_FinalQuote, // Pf
+ Punctuation_Other, // Po
+
+ Symbol_Math, // Sm
+ Symbol_Currency, // Sc
+ Symbol_Modifier, // Sk
+ Symbol_Other // So
+ };
+
+ enum Direction
+ {
+ DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
+ DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
+ };
+
+ enum Decomposition
+ {
+ Single, Canonical, Font, NoBreak, Initial, Medial,
+ Final, Isolated, Circle, Super, Sub, Vertical,
+ Wide, Narrow, Small, Square, Compat, Fraction
+ };
+
+ enum Joining
+ {
+ OtherJoining, Dual, Right, Center
+ };
+
+ enum CombiningClass
+ {
+ Combining_BelowLeftAttached = 200,
+ Combining_BelowAttached = 202,
+ Combining_BelowRightAttached = 204,
+ Combining_LeftAttached = 208,
+ Combining_RightAttached = 210,
+ Combining_AboveLeftAttached = 212,
+ Combining_AboveAttached = 214,
+ Combining_AboveRightAttached = 216,
+
+ Combining_BelowLeft = 218,
+ Combining_Below = 220,
+ Combining_BelowRight = 222,
+ Combining_Left = 224,
+ Combining_Right = 226,
+ Combining_AboveLeft = 228,
+ Combining_Above = 230,
+ Combining_AboveRight = 232,
+
+ Combining_DoubleBelow = 233,
+ Combining_DoubleAbove = 234,
+ Combining_IotaSubscript = 240
+ };
+
+ // ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO
+
+ int digitValue() const;
+ QChar lower() const;
+ QChar upper() const;
+
+ Category category() const;
+ Direction direction() const;
+ Joining joining() const;
+ bool mirrored() const;
+ QChar mirroredChar() const;
+ const QString &decomposition() const; // ### return just QString in 4.0
+ Decomposition decompositionTag() const;
+ unsigned char combiningClass() const;
+
+ char latin1() const { return ucs > 0xff ? 0 : (char) ucs; }
+ ushort unicode() const { return ucs; }
+ ushort &unicode() { return ucs; }
+#ifndef QT_NO_CAST_ASCII
+ // like all ifdef'd code this is undocumented
+ operator char() const { return latin1(); }
+#endif
+
+ bool isNull() const { return unicode()==0; }
+ bool isPrint() const;
+ bool isPunct() const;
+ bool isSpace() const;
+ bool isMark() const;
+ bool isLetter() const;
+ bool isNumber() const;
+ bool isLetterOrNumber() const;
+ bool isDigit() const;
+ bool isSymbol() const;
+
+ uchar cell() const { return ((uchar) ucs & 0xff); }
+ uchar row() const { return ((uchar) (ucs>>8)&0xff); }
+ void setCell( uchar cell ) { ucs = (ucs & 0xff00) + cell; }
+ void setRow( uchar row ) { ucs = (((ushort) row)<<8) + (ucs&0xff); }
+
+ static bool networkOrdered() {
+ int wordSize;
+ bool bigEndian = FALSE;
+ qSysInfo( &wordSize, &bigEndian );
+ return bigEndian;
+ }
+
+ friend inline bool operator==( char ch, QChar c );
+ friend inline bool operator==( QChar c, char ch );
+ friend inline bool operator==( QChar c1, QChar c2 );
+ friend inline bool operator!=( QChar c1, QChar c2 );
+ friend inline bool operator!=( char ch, QChar c );
+ friend inline bool operator!=( QChar c, char ch );
+ friend inline bool operator<=( QChar c, char ch );
+ friend inline bool operator<=( char ch, QChar c );
+ friend inline bool operator<=( QChar c1, QChar c2 );
+
+private:
+ ushort ucs;
+#if defined(QT_QSTRING_UCS_4)
+ ushort grp;
+#endif
+} Q_PACKED;
+
+inline QChar::QChar() : ucs( 0 )
+#ifdef QT_QSTRING_UCS_4
+ , grp( 0 )
+#endif
+{
+}
+inline QChar::QChar( char c ) : ucs( (uchar)c )
+#ifdef QT_QSTRING_UCS_4
+ , grp( 0 )
+#endif
+{
+}
+inline QChar::QChar( uchar c ) : ucs( c )
+#ifdef QT_QSTRING_UCS_4
+ , grp( 0 )
+#endif
+{
+}
+inline QChar::QChar( uchar c, uchar r ) : ucs( (r << 8) | c )
+#ifdef QT_QSTRING_UCS_4
+ , grp( 0 )
+#endif
+{
+}
+inline QChar::QChar( const QChar& c ) : ucs( c.ucs )
+#ifdef QT_QSTRING_UCS_4
+ , grp( c.grp )
+#endif
+{
+}
+
+inline QChar::QChar( ushort rc ) : ucs( rc )
+#ifdef QT_QSTRING_UCS_4
+ , grp( 0 )
+#endif
+{
+}
+inline QChar::QChar( short rc ) : ucs( (ushort) rc )
+#ifdef QT_QSTRING_UCS_4
+ , grp( 0 )
+#endif
+{
+}
+inline QChar::QChar( uint rc ) : ucs( (ushort ) (rc & 0xffff) )
+#ifdef QT_QSTRING_UCS_4
+ , grp( (ushort) ((rc >> 16) & 0xffff) )
+#endif
+{
+}
+inline QChar::QChar( int rc ) : ucs( (ushort) (rc & 0xffff) )
+#ifdef QT_QSTRING_UCS_4
+ , grp( (ushort) ((rc >> 16) & 0xffff) )
+#endif
+{
+}
+
+inline bool operator==( char ch, QChar c )
+{
+ return ((uchar) ch) == c.ucs;
+}
+
+inline bool operator==( QChar c, char ch )
+{
+ return ((uchar) ch) == c.ucs;
+}
+
+inline bool operator==( QChar c1, QChar c2 )
+{
+ return c1.ucs == c2.ucs;
+}
+
+inline bool operator!=( QChar c1, QChar c2 )
+{
+ return c1.ucs != c2.ucs;
+}
+
+inline bool operator!=( char ch, QChar c )
+{
+ return ((uchar)ch) != c.ucs;
+}
+
+inline bool operator!=( QChar c, char ch )
+{
+ return ((uchar) ch) != c.ucs;
+}
+
+inline bool operator<=( QChar c, char ch )
+{
+ return c.ucs <= ((uchar) ch);
+}
+
+inline bool operator<=( char ch, QChar c )
+{
+ return ((uchar) ch) <= c.ucs;
+}
+
+inline bool operator<=( QChar c1, QChar c2 )
+{
+ return c1.ucs <= c2.ucs;
+}
+
+inline bool operator>=( QChar c, char ch ) { return ch <= c; }
+inline bool operator>=( char ch, QChar c ) { return c <= ch; }
+inline bool operator>=( QChar c1, QChar c2 ) { return c2 <= c1; }
+inline bool operator<( QChar c, char ch ) { return !(ch<=c); }
+inline bool operator<( char ch, QChar c ) { return !(c<=ch); }
+inline bool operator<( QChar c1, QChar c2 ) { return !(c2<=c1); }
+inline bool operator>( QChar c, char ch ) { return !(ch>=c); }
+inline bool operator>( char ch, QChar c ) { return !(c>=ch); }
+inline bool operator>( QChar c1, QChar c2 ) { return !(c2>=c1); }
+
+// internal
+struct Q_EXPORT QStringData : public QShared {
+ QStringData() :
+ QShared(), unicode(0), ascii(0), len(0), simpletext(1), maxl(0), dirty(0) { ref(); }
+ QStringData(QChar *u, uint l, uint m) :
+ QShared(), unicode(u), ascii(0), len(l), simpletext(1), maxl(m), dirty(1) { }
+ ~QStringData() { if ( unicode ) delete[] ((char*)unicode);
+ if ( ascii ) delete[] ascii; }
+
+ void deleteSelf();
+ QChar *unicode;
+ char *ascii;
+ void setDirty() {
+ if ( ascii ) {
+ delete [] ascii;
+ ascii = 0;
+ }
+ dirty = 1;
+ }
+#ifdef Q_OS_MAC9
+ uint len;
+#else
+ uint len : 30;
+#endif
+ uint simpletext : 1;
+#ifdef Q_OS_MAC9
+ uint maxl;
+#else
+ uint maxl : 30;
+#endif
+ uint dirty : 1;
+
+private:
+#if defined(Q_DISABLE_COPY)
+ QStringData( const QStringData& );
+ QStringData& operator=( const QStringData& );
+#endif
+};
+
+
+class Q_EXPORT QString
+{
+public:
+ QString(); // make null string
+ QString( QChar ); // one-char string
+ QString( const QString & ); // impl-shared copy
+ QString( const QByteArray& ); // deep copy
+ QString( const QChar* unicode, uint length ); // deep copy
+#ifndef QT_NO_CAST_ASCII
+ QString( const char *str ); // deep copy
+#endif
+ ~QString();
+
+ QString &operator=( const QString & ); // impl-shared copy
+#ifndef QT_NO_CAST_ASCII
+ QString &operator=( const char * ); // deep copy
+#endif
+ QString &operator=( const QCString& ); // deep copy
+ QString &operator=( QChar c );
+ QString &operator=( char c );
+
+ QT_STATIC_CONST QString null;
+
+ bool isNull() const;
+ bool isEmpty() const;
+ uint length() const;
+ void truncate( uint pos );
+
+ QString & fill( QChar c, int len = -1 );
+
+ QString copy() const;
+
+ QString arg( long a, int fieldwidth=0, int base=10 ) const;
+ QString arg( ulong a, int fieldwidth=0, int base=10 ) const;
+ QString arg( int a, int fieldwidth=0, int base=10 ) const;
+ QString arg( uint a, int fieldwidth=0, int base=10 ) const;
+ QString arg( short a, int fieldwidth=0, int base=10 ) const;
+ QString arg( ushort a, int fieldwidth=0, int base=10 ) const;
+ QString arg( char a, int fieldwidth=0 ) const;
+ QString arg( QChar a, int fieldwidth=0 ) const;
+ QString arg( const QString& a, int fieldwidth=0 ) const;
+ QString arg( double a, int fieldwidth=0, char fmt='g', int prec=-1 ) const;
+
+#ifndef QT_NO_SPRINTF
+ QString &sprintf( const char* format, ... )
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
+ __attribute__ ((format (printf, 2, 3)))
+#endif
+ ;
+#endif
+
+ int find( QChar c, int index=0, bool cs=TRUE ) const;
+ int find( char c, int index=0, bool cs=TRUE ) const;
+ int find( const QString &str, int index=0, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+ int find( const QRegExp &, int index=0 ) const;
+#endif
+#ifndef QT_NO_CAST_ASCII
+ int find( const char* str, int index=0 ) const;
+#endif
+ int findRev( QChar c, int index=-1, bool cs=TRUE) const;
+ int findRev( char c, int index=-1, bool cs=TRUE) const;
+ int findRev( const QString &str, int index=-1, bool cs=TRUE) const;
+#ifndef QT_NO_REGEXP
+ int findRev( const QRegExp &, int index=-1 ) const;
+#endif
+#ifndef QT_NO_CAST_ASCII
+ int findRev( const char* str, int index=-1 ) const;
+#endif
+ int contains( QChar c, bool cs=TRUE ) const;
+ int contains( char c, bool cs=TRUE ) const
+ { return contains(QChar(c), cs); }
+#ifndef QT_NO_CAST_ASCII
+ int contains( const char* str, bool cs=TRUE ) const;
+#endif
+ int contains( const QString &str, bool cs=TRUE ) const;
+#ifndef QT_NO_REGEXP
+ int contains( const QRegExp & ) const;
+#endif
+
+ enum SectionFlags {
+ SectionDefault = 0x00,
+ SectionSkipEmpty = 0x01,
+ SectionIncludeLeadingSep = 0x02,
+ SectionIncludeTrailingSep = 0x04,
+ SectionCaseInsensitiveSeps = 0x08
+ };
+ QString section( QChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+ QString section( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#ifndef QT_NO_CAST_ASCII
+ QString section( const char *in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#endif
+ QString section( const QString &in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#ifndef QT_NO_REGEXP
+ QString section( const QRegExp &reg, int start, int end = 0xffffffff, int flags = SectionDefault ) const;
+#endif
+
+ QString left( uint len ) const;
+ QString right( uint len ) const;
+ QString mid( uint index, uint len=0xffffffff) const;
+
+ QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const;
+ QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const;
+
+ QString lower() const;
+ QString upper() const;
+
+ QString stripWhiteSpace() const;
+ QString simplifyWhiteSpace() const;
+
+ QString &insert( uint index, const QString & );
+ QString &insert( uint index, const QChar*, uint len );
+ QString &insert( uint index, QChar );
+ QString &insert( uint index, char c ) { return insert(index,QChar(c)); }
+ QString &append( char );
+ QString &append( QChar );
+ QString &append( const QString & );
+#ifndef QT_NO_CAST_ASCII
+ QString &append( const QByteArray & );
+ QString &append( const char * );
+#endif
+ QString &prepend( char );
+ QString &prepend( QChar );
+ QString &prepend( const QString & );
+#ifndef QT_NO_CAST_ASCII
+ QString &prepend( const QByteArray & );
+ QString &prepend( const char * );
+#endif
+ QString &remove( uint index, uint len );
+ QString &remove( QChar c );
+ QString &remove( char c ) { return remove( QChar(c) ); }
+ QString &remove( const QString & );
+#ifndef QT_NO_REGEXP
+ QString &remove( const QRegExp & );
+#endif
+#ifndef QT_NO_CAST_ASCII
+ QString &remove( const char * );
+#endif
+ QString &replace( uint index, uint len, const QString & );
+ QString &replace( uint index, uint len, const QChar*, uint clen );
+ QString &replace( uint index, uint len, QChar );
+ QString &replace( uint index, uint len, char c )
+ { return replace( index, len, QChar(c) ); }
+ QString &replace( QChar c, const QString & );
+ QString &replace( char c, const QString & after )
+ { return replace( QChar(c), after ); }
+ QString &replace( const QString &, const QString & );
+#ifndef QT_NO_REGEXP_CAPTURE
+ QString &replace( const QRegExp &, const QString & );
+#endif
+ QString &replace( QChar, QChar );
+
+ short toShort( bool *ok=0, int base=10 ) const;
+ ushort toUShort( bool *ok=0, int base=10 ) const;
+ int toInt( bool *ok=0, int base=10 ) const;
+ uint toUInt( bool *ok=0, int base=10 ) const;
+ long toLong( bool *ok=0, int base=10 ) const;
+ ulong toULong( bool *ok=0, int base=10 ) const;
+ float toFloat( bool *ok=0 ) const;
+ double toDouble( bool *ok=0 ) const;
+
+ QString &setNum( short, int base=10 );
+ QString &setNum( ushort, int base=10 );
+ QString &setNum( int, int base=10 );
+ QString &setNum( uint, int base=10 );
+ QString &setNum( long, int base=10 );
+ QString &setNum( ulong, int base=10 );
+ QString &setNum( float, char f='g', int prec=6 );
+ QString &setNum( double, char f='g', int prec=6 );
+
+ static QString number( long, int base=10 );
+ static QString number( ulong, int base=10);
+ static QString number( int, int base=10 );
+ static QString number( uint, int base=10);
+ static QString number( double, char f='g', int prec=6 );
+
+ void setExpand( uint index, QChar c );
+
+ QString &operator+=( const QString &str );
+#ifndef QT_NO_CAST_ASCII
+ QString &operator+=( const QByteArray &str );
+ QString &operator+=( const char *str );
+#endif
+ QString &operator+=( QChar c );
+ QString &operator+=( char c );
+
+ QChar at( uint i ) const
+ { return i < d->len ? d->unicode[i] : QChar::null; }
+ QChar operator[]( int i ) const { return at((uint)i); }
+ QCharRef at( uint i );
+ QCharRef operator[]( int i );
+
+ QChar constref(uint i) const
+ { return at(i); }
+ QChar& ref(uint i)
+ { // Optimized for easy-inlining by simple compilers.
+ if ( d->count != 1 || i >= d->len )
+ subat( i );
+ d->setDirty();
+ return d->unicode[i];
+ }
+
+ const QChar* unicode() const { return d->unicode; }
+ const char* ascii() const { return latin1(); }
+ const char* latin1() const;
+ static QString fromLatin1(const char*, int len=-1);
+ QCString utf8() const;
+ static QString fromUtf8(const char*, int len=-1);
+ QCString local8Bit() const;
+ static QString fromLocal8Bit(const char*, int len=-1);
+ bool operator!() const;
+#ifndef QT_NO_ASCII_CAST
+ operator const char *() const { return latin1(); }
+#endif
+ static QString fromUcs2( const unsigned short *ucs2 );
+ const unsigned short *ucs2() const;
+
+ QString &setUnicode( const QChar* unicode, uint len );
+ QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len );
+ QString &setLatin1( const char*, int len=-1 );
+
+ int compare( const QString& s ) const;
+ static int compare( const QString& s1, const QString& s2 )
+ { return s1.compare( s2 ); }
+
+ int localeAwareCompare( const QString& s ) const;
+ static int localeAwareCompare( const QString& s1, const QString& s2 )
+ { return s1.localeAwareCompare( s2 ); }
+
+#ifndef QT_NO_DATASTREAM
+ friend Q_EXPORT QDataStream &operator>>( QDataStream &, QString & );
+#endif
+
+ void compose();
+
+#ifndef QT_NO_COMPAT
+ const char* data() const { return latin1(); }
+#endif
+
+ bool startsWith( const QString& ) const;
+ bool endsWith( const QString& ) const;
+
+ void setLength( uint newLength );
+
+ bool simpleText() const { if ( d->dirty ) checkSimpleText(); return (bool)d->simpletext; }
+ bool isRightToLeft() const;
+
+
+private:
+ QString( int size, bool /* dummy */ ); // allocate size incl. \0
+
+ void deref();
+ void real_detach();
+ void subat( uint );
+ bool findArg(int& pos, int& len) const;
+
+ void checkSimpleText() const;
+
+ static QChar* asciiToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
+ static QChar* asciiToUnicode( const QByteArray&, uint * len );
+ static char* unicodeToAscii( const QChar*, uint len );
+
+ QStringData *d;
+ static QStringData* shared_null;
+ static QStringData* makeSharedNull();
+
+ friend class QConstString;
+ friend class QTextStream;
+ QString( QStringData* dd, bool /* dummy */ ) : d(dd) { }
+
+ // needed for QDeepCopy
+ void detach();
+ friend class QDeepCopy<QString>;
+};
+
+class Q_EXPORT QCharRef {
+ friend class QString;
+ QString& s;
+ uint p;
+ QCharRef(QString* str, uint pos) : s(*str), p(pos) { }
+
+public:
+ // most QChar operations repeated here...
+
+ // all this is not documented: We just say "like QChar" and let it be.
+#ifndef Q_QDOC
+ ushort unicode() const { return s.constref(p).unicode(); }
+ char latin1() const { return s.constref(p).latin1(); }
+
+ // An operator= for each QChar cast constructor...
+ QCharRef operator=(char c ) { s.ref(p)=c; return *this; }
+ QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; }
+ QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; }
+ QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; }
+ QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; }
+ QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; }
+ QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; }
+ QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; }
+
+ operator QChar () const { return s.constref(p); }
+
+ // each function...
+ bool isNull() const { return unicode()==0; }
+ bool isPrint() const { return s.constref(p).isPrint(); }
+ bool isPunct() const { return s.constref(p).isPunct(); }
+ bool isSpace() const { return s.constref(p).isSpace(); }
+ bool isMark() const { return s.constref(p).isMark(); }
+ bool isLetter() const { return s.constref(p).isLetter(); }
+ bool isNumber() const { return s.constref(p).isNumber(); }
+ bool isLetterOrNumber() { return s.constref(p).isLetterOrNumber(); }
+ bool isDigit() const { return s.constref(p).isDigit(); }
+
+ int digitValue() const { return s.constref(p).digitValue(); }
+ QChar lower() const { return s.constref(p).lower(); }
+ QChar upper() const { return s.constref(p).upper(); }
+
+ QChar::Category category() const { return s.constref(p).category(); }
+ QChar::Direction direction() const { return s.constref(p).direction(); }
+ QChar::Joining joining() const { return s.constref(p).joining(); }
+ bool mirrored() const { return s.constref(p).mirrored(); }
+ QChar mirroredChar() const { return s.constref(p).mirroredChar(); }
+ const QString &decomposition() const { return s.constref(p).decomposition(); }
+ QChar::Decomposition decompositionTag() const { return s.constref(p).decompositionTag(); }
+ unsigned char combiningClass() const { return s.constref(p).combiningClass(); }
+
+ // Not the non-const ones of these.
+ uchar cell() const { return s.constref(p).cell(); }
+ uchar row() const { return s.constref(p).row(); }
+#endif
+};
+
+inline QCharRef QString::at( uint i ) { return QCharRef(this,i); }
+inline QCharRef QString::operator[]( int i ) { return at((uint)i); }
+
+
+class Q_EXPORT QConstString : private QString {
+public:
+ QConstString( const QChar* unicode, uint length );
+ ~QConstString();
+ const QString& string() const { return *this; }
+};
+
+
+/*****************************************************************************
+ QString stream functions
+ *****************************************************************************/
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QString & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QString & );
+#endif
+
+/*****************************************************************************
+ QString inline functions
+ *****************************************************************************/
+
+// These two move code into makeSharedNull() and deletesData()
+// to improve cache-coherence (and reduce code bloat), while
+// keeping the common cases fast.
+//
+// No safe way to pre-init shared_null on ALL compilers/linkers.
+inline QString::QString() :
+ d(shared_null ? shared_null : makeSharedNull())
+{
+ d->ref();
+}
+//
+inline QString::~QString()
+{
+ if ( d->deref() ) {
+ if ( d != shared_null )
+ d->deleteSelf();
+ }
+}
+
+// needed for QDeepCopy
+inline void QString::detach()
+{ real_detach(); }
+
+inline QString QString::section( QChar sep, int start, int end, int flags ) const
+{ return section(QString(sep), start, end, flags); }
+
+inline QString QString::section( char sep, int start, int end, int flags ) const
+{ return section(QChar(sep), start, end, flags); }
+
+#ifndef QT_NO_CAST_ASCII
+inline QString QString::section( const char *in_sep, int start, int end, int flags ) const
+{ return section(QString(in_sep), start, end, flags); }
+#endif
+
+inline QString &QString::operator=( QChar c )
+{ *this = QString(c); return *this; }
+
+inline QString &QString::operator=( char c )
+{ *this = QString(QChar(c)); return *this; }
+
+inline bool QString::isNull() const
+{ return unicode() == 0; }
+
+inline bool QString::operator!() const
+{ return isNull(); }
+
+inline uint QString::length() const
+{ return d->len; }
+
+inline bool QString::isEmpty() const
+{ return length() == 0; }
+
+inline QString QString::copy() const
+{ return QString( *this ); }
+
+inline QString &QString::prepend( const QString & s )
+{ return insert(0,s); }
+
+inline QString &QString::prepend( QChar c )
+{ return insert(0,c); }
+
+inline QString &QString::prepend( char c )
+{ return insert(0,c); }
+
+#ifndef QT_NO_CAST_ASCII
+inline QString &QString::prepend( const QByteArray & s )
+{ return insert(0,s.data()); }
+#endif
+
+inline QString &QString::append( const QString & s )
+{ return operator+=(s); }
+
+#ifndef QT_NO_CAST_ASCII
+inline QString &QString::append( const QByteArray &s )
+{ return operator+=(s.data()); }
+
+inline QString &QString::append( const char * s )
+{ return operator+=(s); }
+#endif
+
+inline QString &QString::append( QChar c )
+{ return operator+=(c); }
+
+inline QString &QString::append( char c )
+{ return operator+=(c); }
+
+#ifndef QT_NO_CAST_ASCII
+inline QString &QString::operator+=( const QByteArray &s )
+{ return operator+=(s.data()); }
+#endif
+
+inline QString &QString::setNum( short n, int base )
+{ return setNum((long)n, base); }
+
+inline QString &QString::setNum( ushort n, int base )
+{ return setNum((ulong)n, base); }
+
+inline QString &QString::setNum( int n, int base )
+{ return setNum((long)n, base); }
+
+inline QString &QString::setNum( uint n, int base )
+{ return setNum((ulong)n, base); }
+
+inline QString &QString::setNum( float n, char f, int prec )
+{ return setNum((double)n,f,prec); }
+
+inline QString QString::arg(int a, int fieldwidth, int base) const
+{ return arg((long)a, fieldwidth, base); }
+
+inline QString QString::arg(uint a, int fieldwidth, int base) const
+{ return arg((ulong)a, fieldwidth, base); }
+
+inline QString QString::arg(short a, int fieldwidth, int base) const
+{ return arg((long)a, fieldwidth, base); }
+
+inline QString QString::arg(ushort a, int fieldwidth, int base) const
+{ return arg((ulong)a, fieldwidth, base); }
+
+inline int QString::find( char c, int index, bool cs ) const
+{ return find(QChar(c), index, cs); }
+
+inline int QString::findRev( char c, int index, bool cs) const
+{ return findRev( QChar(c), index, cs ); }
+
+#ifndef QT_NO_CAST_ASCII
+inline int QString::find( const char* str, int index ) const
+{ return find(QString::fromLatin1(str), index); }
+
+inline int QString::findRev( const char* str, int index ) const
+{ return findRev(QString::fromLatin1(str), index); }
+#endif
+
+
+/*****************************************************************************
+ QString non-member operators
+ *****************************************************************************/
+
+Q_EXPORT bool operator!=( const QString &s1, const QString &s2 );
+Q_EXPORT bool operator<( const QString &s1, const QString &s2 );
+Q_EXPORT bool operator<=( const QString &s1, const QString &s2 );
+Q_EXPORT bool operator==( const QString &s1, const QString &s2 );
+Q_EXPORT bool operator>( const QString &s1, const QString &s2 );
+Q_EXPORT bool operator>=( const QString &s1, const QString &s2 );
+#ifndef QT_NO_CAST_ASCII
+Q_EXPORT bool operator!=( const QString &s1, const char *s2 );
+Q_EXPORT bool operator<( const QString &s1, const char *s2 );
+Q_EXPORT bool operator<=( const QString &s1, const char *s2 );
+Q_EXPORT bool operator==( const QString &s1, const char *s2 );
+Q_EXPORT bool operator>( const QString &s1, const char *s2 );
+Q_EXPORT bool operator>=( const QString &s1, const char *s2 );
+Q_EXPORT bool operator!=( const char *s1, const QString &s2 );
+Q_EXPORT bool operator<( const char *s1, const QString &s2 );
+Q_EXPORT bool operator<=( const char *s1, const QString &s2 );
+Q_EXPORT bool operator==( const char *s1, const QString &s2 );
+//Q_EXPORT bool operator>( const char *s1, const QString &s2 ); // MSVC++
+Q_EXPORT bool operator>=( const char *s1, const QString &s2 );
+#endif
+
+Q_EXPORT inline const QString operator+( const QString &s1, const QString &s2 )
+{
+ QString tmp( s1 );
+ tmp += s2;
+ return tmp;
+}
+
+#ifndef QT_NO_CAST_ASCII
+Q_EXPORT inline const QString operator+( const QString &s1, const char *s2 )
+{
+ QString tmp( s1 );
+ tmp += QString::fromLatin1(s2);
+ return tmp;
+}
+
+Q_EXPORT inline const QString operator+( const char *s1, const QString &s2 )
+{
+ QString tmp = QString::fromLatin1( s1 );
+ tmp += s2;
+ return tmp;
+}
+#endif
+
+Q_EXPORT inline const QString operator+( const QString &s1, QChar c2 )
+{
+ QString tmp( s1 );
+ tmp += c2;
+ return tmp;
+}
+
+Q_EXPORT inline const QString operator+( const QString &s1, char c2 )
+{
+ QString tmp( s1 );
+ tmp += c2;
+ return tmp;
+}
+
+Q_EXPORT inline const QString operator+( QChar c1, const QString &s2 )
+{
+ QString tmp;
+ tmp += c1;
+ tmp += s2;
+ return tmp;
+}
+
+Q_EXPORT inline const QString operator+( char c1, const QString &s2 )
+{
+ QString tmp;
+ tmp += c1;
+ tmp += s2;
+ return tmp;
+}
+
+#if defined(Q_OS_WIN32)
+extern Q_EXPORT QString qt_winQString(void*);
+extern Q_EXPORT const void* qt_winTchar(const QString& str, bool addnul);
+extern Q_EXPORT void* qt_winTchar_new(const QString& str);
+extern Q_EXPORT QCString qt_winQString2MB( const QString& s, int len=-1 );
+extern Q_EXPORT QString qt_winMB2QString( const char* mb, int len=-1 );
+#endif
+
+#endif // QSTRING_H
diff --git a/qmake/include/qstringlist.h b/qmake/include/qstringlist.h
new file mode 100644
index 0000000..be9d6ae
--- a/dev/null
+++ b/qmake/include/qstringlist.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QStringList class
+**
+** Created : 990406
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSTRINGLIST_H
+#define QSTRINGLIST_H
+
+#ifndef QT_H
+#include "qvaluelist.h"
+#include "qstring.h"
+#include "qstrlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_STRINGLIST
+
+class QRegExp;
+
+class Q_EXPORT QStringList : public QValueList<QString>
+{
+public:
+ QStringList() { }
+ QStringList( const QStringList& l ) : QValueList<QString>(l) { }
+ QStringList( const QValueList<QString>& l ) : QValueList<QString>(l) { }
+ QStringList( const QString& i ) { append(i); }
+#ifndef QT_NO_CAST_ASCII
+ QStringList( const char* i ) { append(i); }
+#endif
+
+ static QStringList fromStrList(const QStrList&);
+
+ void sort();
+
+ static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE );
+ static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE );
+#ifndef QT_NO_REGEXP
+ static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE );
+#endif
+ QString join( const QString &sep ) const;
+
+ QStringList grep( const QString &str, bool cs = TRUE ) const;
+#ifndef QT_NO_REGEXP
+ QStringList grep( const QRegExp &expr ) const;
+#endif
+};
+
+#ifndef QT_NO_DATASTREAM
+class QDataStream;
+extern Q_EXPORT QDataStream &operator>>( QDataStream &, QStringList& );
+extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QStringList& );
+#endif
+
+#endif // QT_NO_STRINGLIST
+#endif // QSTRINGLIST_H
diff --git a/qmake/include/qstrlist.h b/qmake/include/qstrlist.h
new file mode 100644
index 0000000..86de328
--- a/dev/null
+++ b/qmake/include/qstrlist.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QStrList, QStrIList and QStrListIterator classes
+**
+** Created : 920730
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSTRLIST_H
+#define QSTRLIST_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qptrlist.h"
+#include "qdatastream.h"
+#endif // QT_H
+
+
+#if defined(Q_TEMPLATEDLL)
+Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<char>;
+Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrListIterator<char>;
+#endif
+
+#if defined(Q_QDOC)
+class QStrListIterator : public QPtrListIterator<char>
+{
+};
+#else
+typedef QPtrListIterator<char> QStrListIterator;
+#endif
+
+class Q_EXPORT QStrList : public QPtrList<char>
+{
+public:
+ QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; }
+ QStrList( const QStrList & );
+ ~QStrList() { clear(); }
+ QStrList& operator=( const QStrList & );
+
+private:
+ QPtrCollection::Item newItem( QPtrCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; }
+ void deleteItem( QPtrCollection::Item d ) { if ( del_item ) delete[] (char*)d; }
+ int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 ) { return qstrcmp((const char*)s1,
+ (const char*)s2); }
+#ifndef QT_NO_DATASTREAM
+ QDataStream &read( QDataStream &s, QPtrCollection::Item &d )
+ { s >> (char *&)d; return s; }
+ QDataStream &write( QDataStream &s, QPtrCollection::Item d ) const
+ { return s << (const char *)d; }
+#endif
+ bool dc;
+};
+
+
+class Q_EXPORT QStrIList : public QStrList // case insensitive string list
+{
+public:
+ QStrIList( bool deepCopies=TRUE ) : QStrList( deepCopies ) {}
+ ~QStrIList() { clear(); }
+private:
+ int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+ { return qstricmp((const char*)s1,
+ (const char*)s2); }
+};
+
+
+inline QStrList & QStrList::operator=( const QStrList &strList )
+{
+ clear();
+ dc = strList.dc;
+ del_item = dc;
+ QPtrList<char>::operator=( strList );
+ return *this;
+}
+
+inline QStrList::QStrList( const QStrList &strList )
+ : QPtrList<char>( strList )
+{
+ dc = FALSE;
+ operator=( strList );
+}
+
+#endif // QSTRLIST_H
diff --git a/qmake/include/qtextcodec.h b/qmake/include/qtextcodec.h
new file mode 100644
index 0000000..149b5cb
--- a/dev/null
+++ b/qmake/include/qtextcodec.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QTextCodec class
+**
+** Created : 981015
+**
+** Copyright (C) 1998-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTEXTCODEC_H
+#define QTEXTCODEC_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_TEXTCODEC
+
+class QTextCodec;
+class QIODevice;
+class QFont;
+
+class Q_EXPORT QTextEncoder {
+public:
+ virtual ~QTextEncoder();
+ virtual QCString fromUnicode(const QString& uc, int& lenInOut) = 0;
+};
+
+class Q_EXPORT QTextDecoder {
+public:
+ virtual ~QTextDecoder();
+ virtual QString toUnicode(const char* chars, int len) = 0;
+};
+
+class Q_EXPORT QTextCodec {
+public:
+ virtual ~QTextCodec();
+
+#ifndef QT_NO_CODECS
+ static QTextCodec* loadCharmap(QIODevice*);
+ static QTextCodec* loadCharmapFile(QString filename);
+#endif //QT_NO_CODECS
+ static QTextCodec* codecForMib(int mib);
+ static QTextCodec* codecForName(const char* hint, int accuracy=0);
+ static QTextCodec* codecForContent(const char* chars, int len);
+ static QTextCodec* codecForIndex(int i);
+ static QTextCodec* codecForLocale();
+ static void setCodecForLocale(QTextCodec *c);
+
+ static void deleteAllCodecs();
+
+ static const char* locale();
+
+ virtual const char* name() const = 0;
+ virtual const char* mimeName() const;
+ virtual int mibEnum() const = 0;
+
+ virtual QTextDecoder* makeDecoder() const;
+ virtual QTextEncoder* makeEncoder() const;
+
+ virtual QString toUnicode(const char* chars, int len) const;
+ virtual QCString fromUnicode(const QString& uc, int& lenInOut) const;
+
+ QCString fromUnicode(const QString& uc) const;
+ QString toUnicode(const QByteArray&, int len) const;
+ QString toUnicode(const QByteArray&) const;
+ QString toUnicode(const QCString&, int len) const;
+ QString toUnicode(const QCString&) const;
+ QString toUnicode(const char* chars) const;
+ virtual bool canEncode( QChar ) const;
+ virtual bool canEncode( const QString& ) const;
+
+ virtual int heuristicContentMatch(const char* chars, int len) const = 0;
+ virtual int heuristicNameMatch(const char* hint) const;
+
+ virtual QByteArray fromUnicode(const QString& uc, int from, int len) const;
+ virtual unsigned short characterFromUnicode(const QString &str, int pos) const;
+
+protected:
+ QTextCodec();
+ static int simpleHeuristicNameMatch(const char* name, const char* hint);
+
+ friend class QFont;
+};
+#endif // QT_NO_TEXTCODEC
+#endif // QTEXTCODEC_H
diff --git a/qmake/include/qtextstream.h b/qmake/include/qtextstream.h
new file mode 100644
index 0000000..6979ed7
--- a/dev/null
+++ b/qmake/include/qtextstream.h
@@ -0,0 +1,335 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QTextStream class
+**
+** Created : 940922
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTEXTSTREAM_H
+#define QTEXTSTREAM_H
+
+#ifndef QT_H
+#include "qiodevice.h"
+#include "qstring.h"
+#include <stdio.h>
+#endif // QT_H
+
+#ifndef QT_NO_TEXTSTREAM
+class QTextCodec;
+class QTextDecoder;
+
+class QTextStreamPrivate;
+
+class Q_EXPORT QTextStream // text stream class
+{
+public:
+ enum Encoding { Locale, Latin1, Unicode, UnicodeNetworkOrder,
+ UnicodeReverse, RawUnicode, UnicodeUTF8 };
+
+ void setEncoding( Encoding );
+#ifndef QT_NO_TEXTCODEC
+ void setCodec( QTextCodec* );
+ QTextCodec *codec();
+#endif
+
+ QTextStream();
+ QTextStream( QIODevice * );
+ QTextStream( QString*, int mode );
+ QTextStream( QString&, int mode ); // obsolete
+ QTextStream( QByteArray, int mode );
+ QTextStream( FILE *, int mode );
+ virtual ~QTextStream();
+
+ QIODevice *device() const;
+ void setDevice( QIODevice * );
+ void unsetDevice();
+
+ bool atEnd() const;
+ bool eof() const;
+
+ QTextStream &operator>>( QChar & );
+ QTextStream &operator>>( char & );
+ QTextStream &operator>>( signed short & );
+ QTextStream &operator>>( unsigned short & );
+ QTextStream &operator>>( signed int & );
+ QTextStream &operator>>( unsigned int & );
+ QTextStream &operator>>( signed long & );
+ QTextStream &operator>>( unsigned long & );
+ QTextStream &operator>>( float & );
+ QTextStream &operator>>( double & );
+ QTextStream &operator>>( char * );
+ QTextStream &operator>>( QString & );
+ QTextStream &operator>>( QCString & );
+
+ QTextStream &operator<<( QChar );
+ QTextStream &operator<<( char );
+ QTextStream &operator<<( signed short );
+ QTextStream &operator<<( unsigned short );
+ QTextStream &operator<<( signed int );
+ QTextStream &operator<<( unsigned int );
+ QTextStream &operator<<( signed long );
+ QTextStream &operator<<( unsigned long );
+ QTextStream &operator<<( float );
+ QTextStream &operator<<( double );
+ QTextStream &operator<<( const char* );
+ QTextStream &operator<<( const QString & );
+ QTextStream &operator<<( const QCString & );
+ QTextStream &operator<<( void * ); // any pointer
+
+ QTextStream &readRawBytes( char *, uint len );
+ QTextStream &writeRawBytes( const char* , uint len );
+
+ QString readLine();
+ QString read();
+ void skipWhiteSpace();
+
+ enum {
+ skipws = 0x0001, // skip whitespace on input
+ left = 0x0002, // left-adjust output
+ right = 0x0004, // right-adjust output
+ internal = 0x0008, // pad after sign
+ bin = 0x0010, // binary format integer
+ oct = 0x0020, // octal format integer
+ dec = 0x0040, // decimal format integer
+ hex = 0x0080, // hex format integer
+ showbase = 0x0100, // show base indicator
+ showpoint = 0x0200, // force decimal point (float)
+ uppercase = 0x0400, // upper-case hex output
+ showpos = 0x0800, // add '+' to positive integers
+ scientific= 0x1000, // scientific float output
+ fixed = 0x2000 // fixed float output
+ };
+
+ static const int basefield; // bin | oct | dec | hex
+ static const int adjustfield; // left | right | internal
+ static const int floatfield; // scientific | fixed
+
+ int flags() const;
+ int flags( int f );
+ int setf( int bits );
+ int setf( int bits, int mask );
+ int unsetf( int bits );
+
+ void reset();
+
+ int width() const;
+ int width( int );
+ int fill() const;
+ int fill( int );
+ int precision() const;
+ int precision( int );
+
+private:
+ long input_int();
+ void init();
+ QTextStream &output_int( int, ulong, bool );
+ QIODevice *dev;
+
+ int fflags;
+ int fwidth;
+ int fillchar;
+ int fprec;
+ bool doUnicodeHeader;
+ bool owndev;
+ QTextCodec *mapper;
+ QTextStreamPrivate * d;
+ QChar unused1; // ### remove in Qt 4.0
+ bool latin1;
+ bool internalOrder;
+ bool networkOrder;
+ void *unused2; // ### remove in Qt 4.0
+
+ QChar eat_ws();
+ uint ts_getline( QChar* );
+ void ts_ungetc( QChar );
+ QChar ts_getc();
+ uint ts_getbuf( QChar*, uint );
+ void ts_putc(int);
+ void ts_putc(QChar);
+ bool ts_isspace(QChar);
+ bool ts_isdigit(QChar);
+ ulong input_bin();
+ ulong input_oct();
+ ulong input_dec();
+ ulong input_hex();
+ double input_double();
+ QTextStream &writeBlock( const char* p, uint len );
+ QTextStream &writeBlock( const QChar* p, uint len );
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QTextStream( const QTextStream & );
+ QTextStream &operator=( const QTextStream & );
+#endif
+};
+
+typedef QTextStream QTS;
+
+class Q_EXPORT QTextIStream : public QTextStream {
+public:
+ QTextIStream( const QString* s ) :
+ QTextStream((QString*)s,IO_ReadOnly) { }
+ QTextIStream( QByteArray ba ) :
+ QTextStream(ba,IO_ReadOnly) { }
+ QTextIStream( FILE *f ) :
+ QTextStream(f,IO_ReadOnly) { }
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QTextIStream( const QTextIStream & );
+ QTextIStream &operator=( const QTextIStream & );
+#endif
+};
+
+class Q_EXPORT QTextOStream : public QTextStream {
+public:
+ QTextOStream( QString* s ) :
+ QTextStream(s,IO_WriteOnly) { }
+ QTextOStream( QByteArray ba ) :
+ QTextStream(ba,IO_WriteOnly) { }
+ QTextOStream( FILE *f ) :
+ QTextStream(f,IO_WriteOnly) { }
+
+private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ QTextOStream( const QTextOStream & );
+ QTextOStream &operator=( const QTextOStream & );
+#endif
+};
+
+/*****************************************************************************
+ QTextStream inline functions
+ *****************************************************************************/
+
+inline QIODevice *QTextStream::device() const
+{ return dev; }
+
+inline bool QTextStream::atEnd() const
+{ return dev ? dev->atEnd() : FALSE; }
+
+inline bool QTextStream::eof() const
+{ return atEnd(); }
+
+inline int QTextStream::flags() const
+{ return fflags; }
+
+inline int QTextStream::flags( int f )
+{ int oldf = fflags; fflags = f; return oldf; }
+
+inline int QTextStream::setf( int bits )
+{ int oldf = fflags; fflags |= bits; return oldf; }
+
+inline int QTextStream::setf( int bits, int mask )
+{ int oldf = fflags; fflags = (fflags & ~mask) | (bits & mask); return oldf; }
+
+inline int QTextStream::unsetf( int bits )
+{ int oldf = fflags; fflags &= ~bits; return oldf; }
+
+inline int QTextStream::width() const
+{ return fwidth; }
+
+inline int QTextStream::width( int w )
+{ int oldw = fwidth; fwidth = w; return oldw; }
+
+inline int QTextStream::fill() const
+{ return fillchar; }
+
+inline int QTextStream::fill( int f )
+{ int oldc = fillchar; fillchar = f; return oldc; }
+
+inline int QTextStream::precision() const
+{ return fprec; }
+
+inline int QTextStream::precision( int p )
+{ int oldp = fprec; fprec = p; return oldp; }
+
+/*!
+ Returns one character from the stream, or EOF.
+*/
+inline QChar QTextStream::ts_getc()
+{ QChar r; return ( ts_getbuf( &r,1 ) == 1 ? r : QChar((ushort)0xffff) ); }
+
+/*****************************************************************************
+ QTextStream manipulators
+ *****************************************************************************/
+
+typedef QTextStream & (*QTSFUNC)(QTextStream &);// manipulator function
+typedef int (QTextStream::*QTSMFI)(int); // manipulator w/int argument
+
+class Q_EXPORT QTSManip { // text stream manipulator
+public:
+ QTSManip( QTSMFI m, int a ) { mf=m; arg=a; }
+ void exec( QTextStream &s ) { (s.*mf)(arg); }
+private:
+ QTSMFI mf; // QTextStream member function
+ int arg; // member function argument
+};
+
+Q_EXPORT inline QTextStream &operator>>( QTextStream &s, QTSFUNC f )
+{ return (*f)( s ); }
+
+Q_EXPORT inline QTextStream &operator<<( QTextStream &s, QTSFUNC f )
+{ return (*f)( s ); }
+
+Q_EXPORT inline QTextStream &operator<<( QTextStream &s, QTSManip m )
+{ m.exec(s); return s; }
+
+Q_EXPORT QTextStream &bin( QTextStream &s ); // set bin notation
+Q_EXPORT QTextStream &oct( QTextStream &s ); // set oct notation
+Q_EXPORT QTextStream &dec( QTextStream &s ); // set dec notation
+Q_EXPORT QTextStream &hex( QTextStream &s ); // set hex notation
+Q_EXPORT QTextStream &endl( QTextStream &s ); // insert EOL ('\n')
+Q_EXPORT QTextStream &flush( QTextStream &s ); // flush output
+Q_EXPORT QTextStream &ws( QTextStream &s ); // eat whitespace on input
+Q_EXPORT QTextStream &reset( QTextStream &s ); // set default flags
+
+Q_EXPORT inline QTSManip qSetW( int w )
+{
+ QTSMFI func = &QTextStream::width;
+ return QTSManip(func,w);
+}
+
+Q_EXPORT inline QTSManip qSetFill( int f )
+{
+ QTSMFI func = &QTextStream::fill;
+ return QTSManip(func,f);
+}
+
+Q_EXPORT inline QTSManip qSetPrecision( int p )
+{
+ QTSMFI func = &QTextStream::precision;
+ return QTSManip(func,p);
+}
+
+#endif // QT_NO_TEXTSTREAM
+#endif // QTEXTSTREAM_H
diff --git a/qmake/include/qtl.h b/qmake/include/qtl.h
new file mode 100644
index 0000000..346cecc
--- a/dev/null
+++ b/qmake/include/qtl.h
@@ -0,0 +1,321 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of Qt template library classes
+**
+** Created : 990128
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTL_H
+#define QTL_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#include "qtextstream.h"
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_TEXTSTREAM
+template <class T>
+class QTextOStreamIterator
+{
+protected:
+ QTextOStream& stream;
+ QString separator;
+
+public:
+ QTextOStreamIterator( QTextOStream& s) : stream( s ) {}
+ QTextOStreamIterator( QTextOStream& s, const QString& sep )
+ : stream( s ), separator( sep ) {}
+ QTextOStreamIterator<T>& operator= ( const T& x ) {
+ stream << x;
+ if ( !separator.isEmpty() )
+ stream << separator;
+ return *this;
+ }
+ QTextOStreamIterator<T>& operator*() { return *this; }
+ QTextOStreamIterator<T>& operator++() { return *this; }
+ QTextOStreamIterator<T>& operator++(int) { return *this; }
+};
+#endif //QT_NO_TEXTSTREAM
+
+template <class InputIterator, class OutputIterator>
+inline OutputIterator qCopy( InputIterator _begin, InputIterator _end,
+ OutputIterator _dest )
+{
+ while( _begin != _end )
+ *_dest++ = *_begin++;
+ return _dest;
+}
+
+template <class BiIterator, class BiOutputIterator>
+inline BiOutputIterator qCopyBackward( BiIterator _begin, BiIterator _end,
+ BiOutputIterator _dest )
+{
+ while ( _begin != _end )
+ *--_dest = *--_end;
+ return _dest;
+}
+
+template <class InputIterator1, class InputIterator2>
+inline bool qEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 )
+{
+ for ( ; first1 != last1; ++first1, ++first2 )
+ if ( *first1 != *first2 )
+ return FALSE;
+ return TRUE;
+}
+
+template <class ForwardIterator, class T>
+inline void qFill( ForwardIterator first, ForwardIterator last, const T& val )
+{
+ for ( ; first != last; ++first )
+ *first = val;
+}
+
+#if 0
+template <class BiIterator, class OutputIterator>
+inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end,
+ OutputIterator _dest )
+{
+ while ( _begin != _end ) {
+ --_end;
+ *_dest = *_end;
+ ++_dest;
+ }
+ return _dest;
+}
+#endif
+
+
+template <class InputIterator, class T>
+inline InputIterator qFind( InputIterator first, InputIterator last,
+ const T& val )
+{
+ while ( first != last && *first != val )
+ ++first;
+ return first;
+}
+
+template <class InputIterator, class T, class Size>
+inline void qCount( InputIterator first, InputIterator last, const T& value,
+ Size& n )
+{
+ for ( ; first != last; ++first )
+ if ( *first == value )
+ ++n;
+}
+
+template <class T>
+inline void qSwap( T& _value1, T& _value2 )
+{
+ T tmp = _value1;
+ _value1 = _value2;
+ _value2 = tmp;
+}
+
+
+template <class InputIterator>
+Q_INLINE_TEMPLATES void qBubbleSort( InputIterator b, InputIterator e )
+{
+ // Goto last element;
+ InputIterator last = e;
+ --last;
+ // only one element or no elements ?
+ if ( last == b )
+ return;
+
+ // So we have at least two elements in here
+ while( b != last ) {
+ bool swapped = FALSE;
+ InputIterator swap_pos = b;
+ InputIterator x = e;
+ InputIterator y = x;
+ y--;
+ do {
+ --x;
+ --y;
+ if ( *x < *y ) {
+ swapped = TRUE;
+ qSwap( *x, *y );
+ swap_pos = y;
+ }
+ } while( y != b );
+ if ( !swapped )
+ return;
+ b = swap_pos;
+ b++;
+ }
+}
+
+
+template <class Container>
+inline void qBubbleSort( Container &c )
+{
+ qBubbleSort( c.begin(), c.end() );
+}
+
+
+template <class Value>
+Q_INLINE_TEMPLATES void qHeapSortPushDown( Value* heap, int first, int last )
+{
+ int r = first;
+ while ( r <= last / 2 ) {
+ if ( last == 2 * r ) {
+ // node r has only one child
+ if ( heap[2 * r] < heap[r] )
+ qSwap( heap[r], heap[2 * r] );
+ r = last;
+ } else {
+ // node r has two children
+ if ( heap[2 * r] < heap[r] && !(heap[2 * r + 1] < heap[2 * r]) ) {
+ // swap with left child
+ qSwap( heap[r], heap[2 * r] );
+ r *= 2;
+ } else if ( heap[2 * r + 1] < heap[r]
+ && heap[2 * r + 1] < heap[2 * r] ) {
+ // swap with right child
+ qSwap( heap[r], heap[2 * r + 1] );
+ r = 2 * r + 1;
+ } else {
+ r = last;
+ }
+ }
+ }
+}
+
+
+template <class InputIterator, class Value>
+Q_INLINE_TEMPLATES void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n )
+{
+ // Create the heap
+ InputIterator insert = b;
+ Value* realheap = new Value[n];
+ // Wow, what a fake. But I want the heap to be indexed as 1...n
+ Value* heap = realheap - 1;
+ int size = 0;
+ for( ; insert != e; ++insert ) {
+ heap[++size] = *insert;
+ int i = size;
+ while( i > 1 && heap[i] < heap[i / 2] ) {
+ qSwap( heap[i], heap[i / 2] );
+ i /= 2;
+ }
+ }
+
+ // Now do the sorting
+ for( uint i = n; i > 0; i-- ) {
+ *b++ = heap[1];
+ if ( i > 1 ) {
+ heap[1] = heap[i];
+ qHeapSortPushDown( heap, 1, (int)i - 1 );
+ }
+ }
+
+ delete[] realheap;
+}
+
+
+template <class InputIterator>
+Q_INLINE_TEMPLATES void qHeapSort( InputIterator b, InputIterator e )
+{
+ // Empty ?
+ if ( b == e )
+ return;
+
+ // How many entries have to be sorted ?
+ InputIterator it = b;
+ uint n = 0;
+ while ( it != e ) {
+ ++n;
+ ++it;
+ }
+
+ // The second last parameter is a hack to retrieve the value type
+ // Do the real sorting here
+ qHeapSortHelper( b, e, *b, n );
+}
+
+
+template <class Container>
+Q_INLINE_TEMPLATES void qHeapSort( Container &c )
+{
+ if ( c.begin() == c.end() )
+ return;
+
+ // The second last parameter is a hack to retrieve the value type
+ // Do the real sorting here
+ qHeapSortHelper( c.begin(), c.end(), *(c.begin()), (uint)c.count() );
+}
+
+template <class Container>
+class QBackInsertIterator
+{
+public:
+ Q_EXPLICIT QBackInsertIterator( Container &c )
+ : container( &c )
+ {
+ }
+
+ QBackInsertIterator<Container>&
+ operator=( const Q_TYPENAME Container::value_type &value )
+ {
+ container->push_back( value );
+ return *this;
+ }
+
+ QBackInsertIterator<Container>& operator*()
+ {
+ return *this;
+ }
+
+ QBackInsertIterator<Container>& operator++()
+ {
+ return *this;
+ }
+
+ QBackInsertIterator<Container>& operator++(int)
+ {
+ return *this;
+ }
+
+protected:
+ Container *container;
+};
+
+template <class Container>
+inline QBackInsertIterator<Container> qBackInserter( Container &c )
+{
+ return QBackInsertIterator<Container>( c );
+}
+
+#endif
diff --git a/qmake/include/quuid.h b/qmake/include/quuid.h
new file mode 100644
index 0000000..591d2f1
--- a/dev/null
+++ b/qmake/include/quuid.h
@@ -0,0 +1,168 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QUuid class
+**
+** Created: 010523
+**
+** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QUUID_H
+#define QUUID_H
+
+#ifndef QT_H
+#include <qstring.h>
+#endif // QT_H
+
+#include <string.h>
+
+#if defined(Q_OS_WIN32)
+#ifndef GUID_DEFINED
+#define GUID_DEFINED
+typedef struct _GUID
+{
+ ulong Data1;
+ ushort Data2;
+ ushort Data3;
+ uchar Data4[ 8 ];
+} GUID;
+#endif
+#endif
+
+struct Q_EXPORT QUuid
+{
+ QUuid()
+ {
+ memset( this, 0, sizeof(QUuid) );
+ }
+ QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
+ {
+ data1 = l;
+ data2 = w1;
+ data3 = w2;
+ data4[0] = b1;
+ data4[1] = b2;
+ data4[2] = b3;
+ data4[3] = b4;
+ data4[4] = b5;
+ data4[5] = b6;
+ data4[6] = b7;
+ data4[7] = b8;
+ }
+ QUuid( const QUuid &uuid )
+ {
+ memcpy( this, &uuid, sizeof(QUuid) );
+ }
+#ifndef QT_NO_QUUID_STRING
+ QUuid( const QString & );
+ QUuid( const char * );
+ QString toString() const;
+ operator QString() const { return toString(); }
+#endif
+ bool isNull() const;
+
+ QUuid &operator=(const QUuid &orig )
+ {
+ memcpy( this, &orig, sizeof(QUuid) );
+ return *this;
+ }
+
+ bool operator==(const QUuid &orig ) const
+ {
+ uint i;
+ if ( data1 != orig.data1 || data2 != orig.data2 ||
+ data3 != orig.data3 )
+ return FALSE;
+
+ for( i = 0; i < 8; i++ )
+ if ( data4[i] != orig.data4[i] )
+ return FALSE;
+
+ return TRUE;
+ }
+
+ bool operator!=(const QUuid &orig ) const
+ {
+ return !( *this == orig );
+ }
+
+#if defined(Q_OS_WIN32)
+ // On Windows we have a type GUID that is used by the platform API, so we
+ // provide convenience operators to cast from and to this type.
+ QUuid( const GUID &guid )
+ {
+ memcpy( this, &guid, sizeof(GUID) );
+ }
+
+ QUuid &operator=(const GUID &orig )
+ {
+ memcpy( this, &orig, sizeof(QUuid) );
+ return *this;
+ }
+
+ operator GUID() const
+ {
+ GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } };
+ return guid;
+ }
+
+ bool operator==( const GUID &guid ) const
+ {
+ uint i;
+ if ( data1 != guid.Data1 || data2 != guid.Data2 ||
+ data3 != guid.Data3 )
+ return FALSE;
+
+ for( i = 0; i < 8; i++ )
+ if ( data4[i] != guid.Data4[i] )
+ return FALSE;
+
+ return TRUE;
+ }
+
+ bool operator!=( const GUID &guid ) const
+ {
+ return !( *this == guid );
+ }
+#endif
+
+ uint data1;
+ ushort data2;
+ ushort data3;
+ uchar data4[ 8 ];
+};
+
+#ifndef QT_NO_DATASTREAM
+Q_EXPORT QDataStream &operator<<( QDataStream &, const QUuid & );
+Q_EXPORT QDataStream &operator>>( QDataStream &, QUuid & );
+#endif
+
+#endif //QUUID_H
diff --git a/qmake/include/qvaluelist.h b/qmake/include/qvaluelist.h
new file mode 100644
index 0000000..54f7aec
--- a/dev/null
+++ b/qmake/include/qvaluelist.h
@@ -0,0 +1,665 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QValueList class
+**
+** Created : 990406
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QVALUELIST_H
+#define QVALUELIST_H
+
+#ifndef QT_H
+#include "qtl.h"
+#include "qshared.h"
+#include "qdatastream.h"
+#endif // QT_H
+
+#ifndef QT_NO_STL
+#include <iterator>
+#include <list>
+#endif
+
+//#define QT_CHECK_VALUELIST_RANGE
+
+#if defined(Q_CC_MSVC)
+#pragma warning(disable:4284) // "return type for operator -> is not a UDT"
+#endif
+
+template <class T>
+class QValueListNode
+{
+public:
+ QValueListNode( const T& t ) : data( t ) { }
+ QValueListNode() { }
+#if defined(Q_TEMPLATEDLL)
+ // Workaround MS bug in memory de/allocation in DLL vs. EXE
+ virtual ~QValueListNode() { }
+#endif
+
+ QValueListNode<T>* next;
+ QValueListNode<T>* prev;
+ T data;
+};
+
+template<class T>
+class QValueListIterator
+{
+ public:
+ /**
+ * Typedefs
+ */
+ typedef QValueListNode<T>* NodePtr;
+#ifndef QT_NO_STL
+ typedef std::bidirectional_iterator_tag iterator_category;
+#endif
+ typedef T value_type;
+ typedef size_t size_type;
+#ifndef QT_NO_STL
+ typedef ptrdiff_t difference_type;
+#else
+ typedef int difference_type;
+#endif
+ typedef T* pointer;
+ typedef T& reference;
+
+ /**
+ * Variables
+ */
+ NodePtr node;
+
+ /**
+ * Functions
+ */
+ QValueListIterator() : node( 0 ) {}
+ QValueListIterator( NodePtr p ) : node( p ) {}
+ QValueListIterator( const QValueListIterator<T>& it ) : node( it.node ) {}
+
+ bool operator==( const QValueListIterator<T>& it ) const { return node == it.node; }
+ bool operator!=( const QValueListIterator<T>& it ) const { return node != it.node; }
+ const T& operator*() const { return node->data; }
+ T& operator*() { return node->data; }
+ // UDT for T = x*
+ // T* operator->() const { return &node->data; }
+
+ QValueListIterator<T>& operator++() {
+ node = node->next;
+ return *this;
+ }
+
+ QValueListIterator<T> operator++(int) {
+ QValueListIterator<T> tmp = *this;
+ node = node->next;
+ return tmp;
+ }
+
+ QValueListIterator<T>& operator--() {
+ node = node->prev;
+ return *this;
+ }
+
+ QValueListIterator<T> operator--(int) {
+ QValueListIterator<T> tmp = *this;
+ node = node->prev;
+ return tmp;
+ }
+
+ QValueListIterator<T>& operator+=( int j ) {
+ while ( j-- )
+ node = node->next;
+ return *this;
+ }
+
+ QValueListIterator<T>& operator-=( int j ) {
+ while ( j-- )
+ node = node->prev;
+ return *this;
+ }
+
+};
+
+template<class T>
+class QValueListConstIterator
+{
+ public:
+ /**
+ * Typedefs
+ */
+ typedef QValueListNode<T>* NodePtr;
+#ifndef QT_NO_STL
+ typedef std::bidirectional_iterator_tag iterator_category;
+#endif
+ typedef T value_type;
+ typedef size_t size_type;
+#ifndef QT_NO_STL
+ typedef ptrdiff_t difference_type;
+#else
+ typedef int difference_type;
+#endif
+ typedef const T* pointer;
+ typedef const T& reference;
+
+ /**
+ * Variables
+ */
+ NodePtr node;
+
+ /**
+ * Functions
+ */
+ QValueListConstIterator() : node( 0 ) {}
+ QValueListConstIterator( NodePtr p ) : node( p ) {}
+ QValueListConstIterator( const QValueListConstIterator<T>& it ) : node( it.node ) {}
+ QValueListConstIterator( const QValueListIterator<T>& it ) : node( it.node ) {}
+
+ bool operator==( const QValueListConstIterator<T>& it ) const { return node == it.node; }
+ bool operator!=( const QValueListConstIterator<T>& it ) const { return node != it.node; }
+ const T& operator*() const { return node->data; }
+ // UDT for T = x*
+ // const T* operator->() const { return &node->data; }
+
+ QValueListConstIterator<T>& operator++() {
+ node = node->next;
+ return *this;
+ }
+
+ QValueListConstIterator<T> operator++(int) {
+ QValueListConstIterator<T> tmp = *this;
+ node = node->next;
+ return tmp;
+ }
+
+ QValueListConstIterator<T>& operator--() {
+ node = node->prev;
+ return *this;
+ }
+
+ QValueListConstIterator<T> operator--(int) {
+ QValueListConstIterator<T> tmp = *this;
+ node = node->prev;
+ return tmp;
+ }
+};
+
+template <class T>
+class QValueListPrivate : public QShared
+{
+public:
+ /**
+ * Typedefs
+ */
+ typedef QValueListIterator<T> Iterator;
+ typedef QValueListConstIterator<T> ConstIterator;
+ typedef QValueListNode<T> Node;
+ typedef QValueListNode<T>* NodePtr;
+ typedef size_t size_type;
+
+ /**
+ * Functions
+ */
+ QValueListPrivate();
+ QValueListPrivate( const QValueListPrivate<T>& _p );
+
+ void derefAndDelete() // ### hack to get around hp-cc brain damage
+ {
+ if ( deref() )
+ delete this;
+ }
+
+#if defined(Q_TEMPLATEDLL)
+ // Workaround MS bug in memory de/allocation in DLL vs. EXE
+ virtual
+#endif
+ ~QValueListPrivate();
+
+ Iterator insert( Iterator it, const T& x );
+ Iterator remove( Iterator it );
+ NodePtr find( NodePtr start, const T& x ) const;
+ int findIndex( NodePtr start, const T& x ) const;
+ uint contains( const T& x ) const;
+ uint remove( const T& x );
+ NodePtr at( size_type i ) const;
+ void clear();
+
+ NodePtr node;
+ size_type nodes;
+};
+
+template <class T>
+Q_INLINE_TEMPLATES QValueListPrivate<T>::QValueListPrivate()
+{
+ node = new Node; node->next = node->prev = node; nodes = 0;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES QValueListPrivate<T>::QValueListPrivate( const QValueListPrivate<T>& _p )
+ : QShared()
+{
+ node = new Node; node->next = node->prev = node; nodes = 0;
+ Iterator b( _p.node->next );
+ Iterator e( _p.node );
+ Iterator i( node );
+ while( b != e )
+ insert( i, *b++ );
+}
+
+template <class T>
+Q_INLINE_TEMPLATES QValueListPrivate<T>::~QValueListPrivate() {
+ NodePtr p = node->next;
+ while( p != node ) {
+ NodePtr x = p->next;
+ delete p;
+ p = x;
+ }
+ delete node;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QValueListPrivate<T>::Iterator QValueListPrivate<T>::insert( Q_TYPENAME QValueListPrivate<T>::Iterator it, const T& x )
+{
+ NodePtr p = new Node( x );
+ p->next = it.node;
+ p->prev = it.node->prev;
+ it.node->prev->next = p;
+ it.node->prev = p;
+ nodes++;
+ return p;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QValueListPrivate<T>::Iterator QValueListPrivate<T>::remove( Q_TYPENAME QValueListPrivate<T>::Iterator it )
+{
+ Q_ASSERT ( it.node != node );
+ NodePtr next = it.node->next;
+ NodePtr prev = it.node->prev;
+ prev->next = next;
+ next->prev = prev;
+ delete it.node;
+ nodes--;
+ return Iterator( next );
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QValueListPrivate<T>::NodePtr QValueListPrivate<T>::find( Q_TYPENAME QValueListPrivate<T>::NodePtr start, const T& x ) const
+{
+ ConstIterator first( start );
+ ConstIterator last( node );
+ while( first != last) {
+ if ( *first == x )
+ return first.node;
+ ++first;
+ }
+ return last.node;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES int QValueListPrivate<T>::findIndex( Q_TYPENAME QValueListPrivate<T>::NodePtr start, const T& x ) const
+{
+ ConstIterator first( start );
+ ConstIterator last( node );
+ int pos = 0;
+ while( first != last) {
+ if ( *first == x )
+ return pos;
+ ++first;
+ ++pos;
+ }
+ return -1;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES uint QValueListPrivate<T>::contains( const T& x ) const
+{
+ uint result = 0;
+ Iterator first = Iterator( node->next );
+ Iterator last = Iterator( node );
+ while( first != last) {
+ if ( *first == x )
+ ++result;
+ ++first;
+ }
+ return result;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES uint QValueListPrivate<T>::remove( const T& x )
+{
+ uint result = 0;
+ Iterator first = Iterator( node->next );
+ Iterator last = Iterator( node );
+ while( first != last) {
+ if ( *first == x ) {
+ first = remove( first );
+ ++result;
+ } else
+ ++first;
+ }
+ return result;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QValueListPrivate<T>::NodePtr QValueListPrivate<T>::at( size_type i ) const
+{
+ Q_ASSERT( i <= nodes );
+ NodePtr p = node->next;
+ for( size_type x = 0; x < i; ++x )
+ p = p->next;
+ return p;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES void QValueListPrivate<T>::clear()
+{
+ nodes = 0;
+ NodePtr p = node->next;
+ while( p != node ) {
+ NodePtr next = p->next;
+ delete p;
+ p = next;
+ }
+ node->next = node->prev = node;
+}
+
+#ifdef QT_CHECK_RANGE
+# if !defined( QT_NO_DEBUG ) && defined( QT_CHECK_VALUELIST_RANGE )
+# define QT_CHECK_INVALID_LIST_ELEMENT if ( empty() ) qWarning( "QValueList: Warning invalid element" )
+# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL Q_ASSERT( !empty() );
+# else
+# define QT_CHECK_INVALID_LIST_ELEMENT
+# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL
+# endif
+#else
+# define QT_CHECK_INVALID_LIST_ELEMENT
+# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL
+#endif
+
+template <class T> class QDeepCopy;
+
+template <class T>
+class QValueList
+{
+public:
+ /**
+ * Typedefs
+ */
+ typedef QValueListIterator<T> iterator;
+ typedef QValueListConstIterator<T> const_iterator;
+ typedef T value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+#ifndef QT_NO_STL
+ typedef ptrdiff_t difference_type;
+#else
+ typedef int difference_type;
+#endif
+
+ /**
+ * API
+ */
+ QValueList() { sh = new QValueListPrivate<T>; }
+ QValueList( const QValueList<T>& l ) { sh = l.sh; sh->ref(); }
+#ifndef QT_NO_STL
+# ifdef Q_CC_HPACC // HP-UX aCC does require typename in some place
+# undef Q_TYPENAME // but not accept them at others.
+# define Q_TYPENAME // also doesn't like re-defines ...
+# endif
+ QValueList( const Q_TYPENAME std::list<T>& l )
+ {
+ sh = new QValueListPrivate<T>;
+ qCopy( l.begin(), l.end(), std::back_inserter( *this ) );
+ }
+#endif
+ ~QValueList() { sh->derefAndDelete(); }
+
+ QValueList<T>& operator= ( const QValueList<T>& l )
+ {
+ l.sh->ref();
+ sh->derefAndDelete();
+ sh = l.sh;
+ return *this;
+ }
+#ifndef QT_NO_STL
+ QValueList<T>& operator= ( const Q_TYPENAME std::list<T>& l )
+ {
+ detach();
+ qCopy( l.begin(), l.end(), std::back_inserter( *this ) );
+ return *this;
+ }
+ bool operator== ( const Q_TYPENAME std::list<T>& l ) const
+ {
+ if ( size() != l.size() )
+ return FALSE;
+ const_iterator it2 = begin();
+#if !defined(Q_CC_MIPS)
+ typename
+#endif
+ std::list<T>::const_iterator it = l.begin();
+ for ( ; it2 != end(); ++it2, ++it )
+ if ( !((*it2) == (*it)) )
+ return FALSE;
+ return TRUE;
+ }
+# ifdef Q_CC_HPACC // undo the HP-UX aCC hackery done above
+# undef Q_TYPENAME
+# define Q_TYPENAME typename
+# endif
+#endif
+ bool operator== ( const QValueList<T>& l ) const;
+ bool operator!= ( const QValueList<T>& l ) const { return !( *this == l ); }
+ iterator begin() { detach(); return iterator( sh->node->next ); }
+ const_iterator begin() const { return const_iterator( sh->node->next ); }
+ iterator end() { detach(); return iterator( sh->node ); }
+ const_iterator end() const { return const_iterator( sh->node ); }
+ iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); }
+ uint remove( const T& x ) { detach(); return sh->remove( x ); }
+ void clear();
+
+ QValueList<T>& operator<< ( const T& x )
+ {
+ append( x );
+ return *this;
+ }
+
+ size_type size() const { return sh->nodes; }
+ bool empty() const { return sh->nodes == 0; }
+ void push_front( const T& x ) { detach(); sh->insert( begin(), x ); }
+ void push_back( const T& x ) { detach(); sh->insert( end(), x ); }
+ iterator erase( iterator pos ) { detach(); return sh->remove( pos ); }
+ iterator erase( iterator first, iterator last );
+ reference front() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); }
+ const_reference front() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); }
+ reference back() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); }
+ const_reference back() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); }
+ void pop_front() { QT_CHECK_INVALID_LIST_ELEMENT; erase( begin() ); }
+ void pop_back() {
+ QT_CHECK_INVALID_LIST_ELEMENT;
+ iterator tmp = end();
+ erase( --tmp );
+ }
+ void insert( iterator pos, size_type n, const T& x );
+ // Some compilers (incl. vc++) would instantiate this function even if
+ // it is not used; this would constrain QValueList to classes that provide
+ // an operator<
+ /*
+ void sort()
+ {
+ qHeapSort( *this );
+ }
+ */
+
+ QValueList<T> operator+ ( const QValueList<T>& l ) const;
+ QValueList<T>& operator+= ( const QValueList<T>& l );
+
+ iterator fromLast() { detach(); return iterator( sh->node->prev ); }
+ const_iterator fromLast() const { return const_iterator( sh->node->prev ); }
+
+ bool isEmpty() const { return ( sh->nodes == 0 ); }
+
+ iterator append( const T& x ) { detach(); return sh->insert( end(), x ); }
+ iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); }
+
+ iterator remove( iterator it ) { detach(); return sh->remove( it ); }
+
+ T& first() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->next->data; }
+ const T& first() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->next->data; }
+ T& last() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->prev->data; }
+ const T& last() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->prev->data; }
+
+ T& operator[] ( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->at(i)->data; }
+ const T& operator[] ( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->at(i)->data; }
+ iterator at( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return iterator( sh->at(i) ); }
+ const_iterator at( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return const_iterator( sh->at(i) ); }
+ iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); }
+ const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); }
+ iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); }
+ const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); }
+ int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; }
+ size_type contains( const T& x ) const { return sh->contains( x ); }
+
+ size_type count() const { return sh->nodes; }
+
+ QValueList<T>& operator+= ( const T& x )
+ {
+ append( x );
+ return *this;
+ }
+ typedef QValueListIterator<T> Iterator;
+ typedef QValueListConstIterator<T> ConstIterator;
+ typedef T ValueType;
+
+protected:
+ /**
+ * Helpers
+ */
+ void detach() { if ( sh->count > 1 ) detachInternal(); }
+
+ /**
+ * Variables
+ */
+ QValueListPrivate<T>* sh;
+
+private:
+ void detachInternal();
+
+ friend class QDeepCopy< QValueList<T> >;
+};
+
+template <class T>
+Q_INLINE_TEMPLATES bool QValueList<T>::operator== ( const QValueList<T>& l ) const
+{
+ if ( size() != l.size() )
+ return FALSE;
+ const_iterator it2 = begin();
+ const_iterator it = l.begin();
+ for( ; it != l.end(); ++it, ++it2 )
+ if ( !( *it == *it2 ) )
+ return FALSE;
+ return TRUE;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES void QValueList<T>::clear()
+{
+ if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new QValueListPrivate<T>; }
+}
+
+template <class T>
+Q_INLINE_TEMPLATES Q_TYPENAME QValueList<T>::iterator QValueList<T>::erase( Q_TYPENAME QValueList<T>::iterator first, Q_TYPENAME QValueList<T>::iterator last )
+{
+ while ( first != last )
+ erase( first++ );
+ return last;
+}
+
+
+template <class T>
+Q_INLINE_TEMPLATES void QValueList<T>::insert( Q_TYPENAME QValueList<T>::iterator pos, size_type n, const T& x )
+{
+ for ( ; n > 0; --n )
+ insert( pos, x );
+}
+
+template <class T>
+Q_INLINE_TEMPLATES QValueList<T> QValueList<T>::operator+ ( const QValueList<T>& l ) const
+{
+ QValueList<T> l2( *this );
+ for( const_iterator it = l.begin(); it != l.end(); ++it )
+ l2.append( *it );
+ return l2;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES QValueList<T>& QValueList<T>::operator+= ( const QValueList<T>& l )
+{
+ for( const_iterator it = l.begin(); it != l.end(); ++it )
+ append( *it );
+ return *this;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES void QValueList<T>::detachInternal()
+{
+ sh->deref(); sh = new QValueListPrivate<T>( *sh );
+}
+
+#ifndef QT_NO_DATASTREAM
+template <class T>
+Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QValueList<T>& l )
+{
+ l.clear();
+ Q_UINT32 c;
+ s >> c;
+ for( Q_UINT32 i = 0; i < c; ++i )
+ {
+ T t;
+ s >> t;
+ l.append( t );
+ if ( s.atEnd() )
+ break;
+ }
+ return s;
+}
+
+template <class T>
+Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QValueList<T>& l )
+{
+ s << (Q_UINT32)l.size();
+ QValueListConstIterator<T> it = l.begin();
+ for( ; it != l.end(); ++it )
+ s << *it;
+ return s;
+}
+#endif // QT_NO_DATASTREAM
+#endif // QVALUELIST_H
diff --git a/qmake/include/qvaluestack.h b/qmake/include/qvaluestack.h
new file mode 100644
index 0000000..7e9bc48
--- a/dev/null
+++ b/qmake/include/qvaluestack.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QValueStack class
+**
+** Created : 990925
+**
+** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+**
+** This file is part of the tools module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+** information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QVALUESTACK_H
+#define QVALUESTACK_H
+
+#ifndef QT_H
+#include "qvaluelist.h"
+#endif // QT_H
+
+
+template<class T>
+class QValueStack : public QValueList<T>
+{
+public:
+ QValueStack() {}
+ ~QValueStack() {}
+ void push( const T& d ) { append(d); }
+ T pop()
+ {
+ T elem( this->last() );
+ if ( !this->isEmpty() )
+ remove( this->fromLast() );
+ return elem;
+ }
+ T& top() { return this->last(); }
+ const T& top() const { return this->last(); }
+};
+
+#endif