summaryrefslogtreecommitdiff
path: root/qmake/include
authorllornkcor <llornkcor>2003-07-10 02:40:10 (UTC)
committer llornkcor <llornkcor>2003-07-10 02:40:10 (UTC)
commit155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (side-by-side diff)
treee6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/include
parent86703e8a5527ef114facd02c005b6b3a7e62e263 (diff)
downloadopie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip
opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz
opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2
update qmake to 1.05a
Diffstat (limited to 'qmake/include') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/private/qapplication_p.h5
-rw-r--r--qmake/include/private/qcom_p.h6
-rw-r--r--qmake/include/private/qcomlibrary_p.h6
-rw-r--r--qmake/include/private/qcomplextext_p.h8
-rw-r--r--qmake/include/private/qcomponentfactory_p.h6
-rw-r--r--qmake/include/private/qcriticalsection_p.h4
-rw-r--r--qmake/include/private/qdir_p.h9
-rw-r--r--qmake/include/private/qeffects_p.h2
-rw-r--r--qmake/include/private/qeventloop_p.h70
-rw-r--r--qmake/include/private/qfontcodecs_p.h4
-rw-r--r--qmake/include/private/qfontdata_p.h3
-rw-r--r--qmake/include/private/qgfxdriverinterface_p.h18
-rw-r--r--qmake/include/private/qgpluginmanager_p.h8
-rw-r--r--qmake/include/private/qimageformatinterface_p.h8
-rw-r--r--qmake/include/private/qinputcontext_p.h5
-rw-r--r--qmake/include/private/qkbddriverinterface_p.h18
-rw-r--r--qmake/include/private/qlibrary_p.h5
-rw-r--r--qmake/include/private/qlock_p.h93
-rw-r--r--qmake/include/private/qmousedriverinterface_p.h18
-rw-r--r--qmake/include/private/qmutexpool_p.h44
-rw-r--r--qmake/include/private/qpluginmanager_p.h16
-rw-r--r--qmake/include/private/qpsprinter_p.h4
-rw-r--r--qmake/include/private/qrichtext_p.h59
-rw-r--r--qmake/include/private/qsettings_p.h2
-rw-r--r--qmake/include/private/qsharedmemory_p.h11
-rw-r--r--qmake/include/private/qsqldriverinterface_p.h17
-rw-r--r--qmake/include/private/qsqlextension_p.h41
-rw-r--r--qmake/include/private/qstyleinterface_p.h18
-rw-r--r--qmake/include/private/qsvgdevice_p.h8
-rw-r--r--qmake/include/private/qtextcodecinterface_p.h2
-rw-r--r--qmake/include/private/qtitlebar_p.h2
-rw-r--r--qmake/include/private/qucom_p.h76
-rw-r--r--qmake/include/private/qucomextra_p.h18
-rw-r--r--qmake/include/private/qwidgetinterface_p.h65
-rw-r--r--qmake/include/private/qwidgetresizehandler_p.h18
-rw-r--r--qmake/include/qasciidict.h4
-rw-r--r--qmake/include/qcstring.h7
-rw-r--r--qmake/include/qdict.h4
-rw-r--r--qmake/include/qdir.h3
-rw-r--r--qmake/include/qfeatures.h2
-rw-r--r--qmake/include/qgarray.h13
-rw-r--r--qmake/include/qglobal.h87
-rw-r--r--qmake/include/qintdict.h4
-rw-r--r--qmake/include/qmap.h4
-rw-r--r--qmake/include/qmemarray.h9
-rw-r--r--qmake/include/qptrlist.h6
-rw-r--r--qmake/include/qptrvector.h4
-rw-r--r--qmake/include/qregexp.h2
-rw-r--r--qmake/include/qstring.h91
-rw-r--r--qmake/include/qstrlist.h2
-rw-r--r--qmake/include/qtextcodec.h16
-rw-r--r--qmake/include/qtl.h1
-rw-r--r--qmake/include/quuid.h6
-rw-r--r--qmake/include/qvaluelist.h4
-rw-r--r--qmake/include/qvaluestack.h4
55 files changed, 730 insertions, 240 deletions
diff --git a/qmake/include/private/qapplication_p.h b/qmake/include/private/qapplication_p.h
index 6fab6b3..280992e 100644
--- a/qmake/include/private/qapplication_p.h
+++ b/qmake/include/private/qapplication_p.h
@@ -28,60 +28,61 @@
** 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;
+#elif defined (Q_OS_MAC)
+extern Qt::MacintoshVersion qt_macver;
#endif
#if defined (Q_WS_X11)
extern int qt_ncols_option;
#endif
extern void qt_dispatchEnterLeave( QWidget*, QWidget* );
-
-
+extern bool qt_tryModalHelper( QWidget *, QWidget ** = 0 );
#endif
diff --git a/qmake/include/private/qcom_p.h b/qmake/include/private/qcom_p.h
index 6e7e1c8..5bed8c8c 100644
--- a/qmake/include/private/qcom_p.h
+++ b/qmake/include/private/qcom_p.h
@@ -1,85 +1,85 @@
/****************************************************************************
** $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
+#ifndef QCOM_P_H
+#define QCOM_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 "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}
@@ -289,49 +289,49 @@ public: \
#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
+#endif //QCOM_P_H
diff --git a/qmake/include/private/qcomlibrary_p.h b/qmake/include/private/qcomlibrary_p.h
index f52f679..3f440c0 100644
--- a/qmake/include/private/qcomlibrary_p.h
+++ b/qmake/include/private/qcomlibrary_p.h
@@ -1,79 +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
+#ifndef QCOMLIBRARY_P_H
+#define QCOMLIBRARY_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 "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
+#endif
diff --git a/qmake/include/private/qcomplextext_p.h b/qmake/include/private/qcomplextext_p.h
index 2132522..c3aeeb1 100644
--- a/qmake/include/private/qcomplextext_p.h
+++ b/qmake/include/private/qcomplextext_p.h
@@ -1,87 +1,85 @@
/****************************************************************************
** $Id$
**
** Internal header file.
**
-** Created :
-**
-** Copyright (C) 2001 Trolltech AS. All rights reserved.
+** Copyright (C) 2001-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 QCOMPLEXTEXT_H
-#define QCOMPLEXTEXT_H
+#ifndef QCOMPLEXTEXT_P_H
+#define QCOMPLEXTEXT_P_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;
};
diff --git a/qmake/include/private/qcomponentfactory_p.h b/qmake/include/private/qcomponentfactory_p.h
index 1ac973f..d5c1743 100644
--- a/qmake/include/private/qcomponentfactory_p.h
+++ b/qmake/include/private/qcomponentfactory_p.h
@@ -1,73 +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 QCOMPONENTFACTORY_P_H
+#define QCOMPONENTFACTORY_P_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
+#endif // QCOMPONENTFACTORY_P_H
diff --git a/qmake/include/private/qcriticalsection_p.h b/qmake/include/private/qcriticalsection_p.h
index 7d9feca..8dacc62 100644
--- a/qmake/include/private/qcriticalsection_p.h
+++ b/qmake/include/private/qcriticalsection_p.h
@@ -1,80 +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 QCRITICALSECTION_P_H
+#define QCRITICALSECTION_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 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
index 35dba28..a6c7c91 100644
--- a/qmake/include/private/qdir_p.h
+++ b/qmake/include/private/qdir_p.h
@@ -1,78 +1,79 @@
/****************************************************************************
** $Id$
**
** Definition of some private QDir functions.
**
-** Created : 2000.11.06
+** Created : 001106
**
** 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
+#include "qregexp.h"
+#include "qvaluelist.h"
#endif // QT_H
-extern QStringList qt_makeFilterList( const QString & );
-
+extern QValueList<QRegExp> qt_makeFilterList( const QString & );
+extern bool qt_matchFilterList( const QValueList<QRegExp> &, 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
index 4178b6f..3b6c212 100644
--- a/qmake/include/private/qeffects_p.h
+++ b/qmake/include/private/qeffects_p.h
@@ -1,54 +1,54 @@
/****************************************************************************
** $Id$
**
** Definition of QEffects functions
**
-** Created : 2000.06.21
+** Created : 000621
**
** 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.
//
//
diff --git a/qmake/include/private/qeventloop_p.h b/qmake/include/private/qeventloop_p.h
index b64d0df..3a5350e 100644
--- a/qmake/include/private/qeventloop_p.h
+++ b/qmake/include/private/qeventloop_p.h
@@ -1,74 +1,138 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QEventLoop class
+**
+** Copyright (C) 1992-2003 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 QEVENTLOOP_P_H
#define QEVENTLOOP_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. This header file may
+// change from version to version without notice, or even be
+// removed.
+//
+// We mean it.
+//
+//
+
#include "qplatformdefs.h"
+
+// SCO OpenServer redefines raise -> kill
+#if defined(raise)
+# undef raise
+#endif
+
#include "qwindowdefs.h"
class QSocketNotifier;
-#if defined(Q_OS_UNIX)
+#if defined(Q_OS_UNIX) || defined (Q_WS_WIN)
#include <qptrlist.h>
+#endif // Q_OS_UNIX || Q_WS_WIN
+#if defined(Q_OS_UNIX)
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
+#if defined(Q_WS_WIN)
+struct QSockNot {
+ QSocketNotifier *obj;
+ int fd;
+};
+#endif // Q_WS_WIN
class QEventLoopPrivate
{
public:
QEventLoopPrivate()
{
reset();
}
void reset() {
looplevel = 0;
quitcode = 0;
quitnow = FALSE;
exitloop = FALSE;
+ shortcut = FALSE;
}
int looplevel;
int quitcode;
- bool quitnow;
- bool exitloop;
+ unsigned int quitnow : 1;
+ unsigned int exitloop : 1;
+ unsigned int shortcut : 1;
#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
+
+#ifdef Q_WS_WIN
+ // pending socket notifiers list
+ QPtrList<QSockNot> sn_pending_list;
+#endif // Q_WS_WIN
+
};
#endif // QEVENTLOOP_P_H
diff --git a/qmake/include/private/qfontcodecs_p.h b/qmake/include/private/qfontcodecs_p.h
index 8222f98..54b0ac1 100644
--- a/qmake/include/private/qfontcodecs_p.h
+++ b/qmake/include/private/qfontcodecs_p.h
@@ -6,98 +6,98 @@
** 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>
+#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.
diff --git a/qmake/include/private/qfontdata_p.h b/qmake/include/private/qfontdata_p.h
index 917d14f..1eaf80c 100644
--- a/qmake/include/private/qfontdata_p.h
+++ b/qmake/include/private/qfontdata_p.h
@@ -117,96 +117,97 @@ public:
{ ; }
~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;
+ uint useTextOutA: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
@@ -368,97 +369,97 @@ public:
#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 drawText(int x, int y, const QString &s, int from, int len, QPaintDevice *dev, const QRegion *rgn, int dir);
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;
}
diff --git a/qmake/include/private/qgfxdriverinterface_p.h b/qmake/include/private/qgfxdriverinterface_p.h
index 1782ed4..e8259ac 100644
--- a/qmake/include/private/qgfxdriverinterface_p.h
+++ b/qmake/include/private/qgfxdriverinterface_p.h
@@ -1,56 +1,68 @@
/****************************************************************************
** $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 QGFXDRIVERINTERFACE_P_H
+#define QGFXDRIVERINTERFACE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. 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_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
+#endif // QGFXDRIVERINTERFACE_P_H
diff --git a/qmake/include/private/qgpluginmanager_p.h b/qmake/include/private/qgpluginmanager_p.h
index e0c0e78..2e4e9c5 100644
--- a/qmake/include/private/qgpluginmanager_p.h
+++ b/qmake/include/private/qgpluginmanager_p.h
@@ -1,107 +1,107 @@
/**********************************************************************
** $Id$
**
** Definition of QGPluginManager class
**
-** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+** 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 QGPLUGINMANAGER_H
-#define QGPLUGINMANAGER_H
+#ifndef QGPLUGINMANAGER_P_H
+#define QGPLUGINMANAGER_P_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
+#endif //QGPLUGINMANAGER_P_H
diff --git a/qmake/include/private/qimageformatinterface_p.h b/qmake/include/private/qimageformatinterface_p.h
index 5f7601c..fd4c256 100644
--- a/qmake/include/private/qimageformatinterface_p.h
+++ b/qmake/include/private/qimageformatinterface_p.h
@@ -1,75 +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 QIMAGEFORMATINTERFACE_P_H
+#define QIMAGEFORMATINTERFACE_P_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
+#endif // QIMAGEFORMATINTERFACE_P_H
diff --git a/qmake/include/private/qinputcontext_p.h b/qmake/include/private/qinputcontext_p.h
index 9ac0d2b..4d94147 100644
--- a/qmake/include/private/qinputcontext_p.h
+++ b/qmake/include/private/qinputcontext_p.h
@@ -42,80 +42,83 @@
// -------------
//
// 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;
+ QString text;
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 );
+
+ static void accept( QWidget *fw = 0 );
+ static void enable( bool );
#endif
};
#endif // QINPUTCONTEXT_P_H
diff --git a/qmake/include/private/qkbddriverinterface_p.h b/qmake/include/private/qkbddriverinterface_p.h
index efc7ded..fe13487 100644
--- a/qmake/include/private/qkbddriverinterface_p.h
+++ b/qmake/include/private/qkbddriverinterface_p.h
@@ -1,56 +1,68 @@
/****************************************************************************
** $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 QKBDDRIVERINTERFACE_P_H
+#define QKBDDRIVERINTERFACE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. 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_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
+#endif // QKBDDRIVERINTERFACE_P_H
diff --git a/qmake/include/private/qlibrary_p.h b/qmake/include/private/qlibrary_p.h
index c4dd565..1624ca5 100644
--- a/qmake/include/private/qlibrary_p.h
+++ b/qmake/include/private/qlibrary_p.h
@@ -1,84 +1,81 @@
/****************************************************************************
** $Id$
**
** Definition of an internal QLibrary class
**
-** Created : 2000-01-01
+** Created : 000101
**
** 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/qlock_p.h b/qmake/include/private/qlock_p.h
new file mode 100644
index 0000000..5c261aa
--- a/dev/null
+++ b/qmake/include/private/qlock_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QLock class. This manages interprocess locking
+**
+** Created : 20000406
+**
+** 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 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 QLOCK_P_H
+#define QLOCK_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. This header file may
+// change from version to version without notice, or even be
+// removed.
+//
+// We mean it.
+//
+//
+
+#ifndef QT_H
+#include <qstring.h>
+#endif // QT_H
+
+class QLockData;
+
+class QLock
+{
+public:
+ QLock( const QString &filename, char id, bool create = FALSE );
+ ~QLock();
+
+ enum Type { Read, Write };
+
+ bool isValid() const;
+ void lock( Type type );
+ void unlock();
+ bool locked() const;
+
+private:
+ Type type;
+ QLockData *data;
+};
+
+
+// Nice class for ensuring the lock is released.
+// Just create one on the stack and the lock is automatically released
+// when QLockHolder is destructed.
+class QLockHolder
+{
+public:
+ QLockHolder( QLock *l, QLock::Type type ) : qlock(l) {
+ qlock->lock( type );
+ }
+ ~QLockHolder() { if ( locked() ) qlock->unlock(); }
+
+ void lock( QLock::Type type ) { qlock->lock( type ); }
+ void unlock() { qlock->unlock(); }
+ bool locked() const { return qlock->locked(); }
+
+private:
+ QLock *qlock;
+};
+
+#endif
+
diff --git a/qmake/include/private/qmousedriverinterface_p.h b/qmake/include/private/qmousedriverinterface_p.h
index fd76308..42a2e3e 100644
--- a/qmake/include/private/qmousedriverinterface_p.h
+++ b/qmake/include/private/qmousedriverinterface_p.h
@@ -1,56 +1,68 @@
/****************************************************************************
** $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 QMOUSEDRIVERINTERFACE_P_H
+#define QMOUSEDRIVERINTERFACE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. 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_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
+#endif // QMOUSEDRIVERINTERFACE_P_H
diff --git a/qmake/include/private/qmutexpool_p.h b/qmake/include/private/qmutexpool_p.h
index 3d9fef7..fb84157 100644
--- a/qmake/include/private/qmutexpool_p.h
+++ b/qmake/include/private/qmutexpool_p.h
@@ -1,39 +1,75 @@
-#ifndef QMUTEXPOOL_H
-#define QMUTEXPOOL_H
+/****************************************************************************
+** $Id$
+**
+** ...
+**
+** Copyright (C) 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 QMUTEXPOOL_P_H
+#define QMUTEXPOOL_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.
//
//
#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;
+ QMutex **mutexes;
+ int count;
bool recurs;
};
extern QMutexPool *qt_global_mutexpool;
#endif // QT_THREAD_SUPPORT
-#endif // QMUTEXPOOL_H
+#endif // QMUTEXPOOL_P_H
diff --git a/qmake/include/private/qpluginmanager_p.h b/qmake/include/private/qpluginmanager_p.h
index 4b64ba0..a8da10e 100644
--- a/qmake/include/private/qpluginmanager_p.h
+++ b/qmake/include/private/qpluginmanager_p.h
@@ -1,73 +1,73 @@
/****************************************************************************
** $Id$
**
** Definition of QPluginManager class
**
-** Created : 2000-01-01
+** Created : 000101
**
** 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
+#ifndef QPLUGINMANAGER_P_H
+#define QPLUGINMANAGER_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 "qgpluginmanager_p.h"
+#endif // QT_H
+
#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
+#endif //QPLUGINMANAGER_P_H
diff --git a/qmake/include/private/qpsprinter_p.h b/qmake/include/private/qpsprinter_p.h
index 27a4968..692cb44 100644
--- a/qmake/include/private/qpsprinter_p.h
+++ b/qmake/include/private/qpsprinter_p.h
@@ -1,89 +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.
+** 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 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 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
index 8e29804..9ed87cf 100644
--- a/qmake/include/private/qrichtext_p.h
+++ b/qmake/include/private/qrichtext_p.h
@@ -111,116 +111,118 @@ public:
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;
}
+ QTextStringChar( const QTextStringChar & ) {
+ }
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;
+ static QString toString( const QMemArray<QTextStringChar> &data, bool fixspaces = TRUE );
+ QString toString( bool fixspaces = TRUE ) 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();
@@ -241,137 +243,137 @@ inline QChar::Direction QTextString::direction() const
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#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 gotoNextWord( bool onlySpace = FALSE );
+ void gotoPreviousWord( bool onlySpace = FALSE );
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 );
+ bool 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; }
@@ -658,96 +660,97 @@ public:
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;
+ Q_DUMMY_COMPARISON_OPERATOR(QTextDocumentSelection)
};
#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;
@@ -794,96 +797,99 @@ public:
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 eraseParagraphEmptyArea( QTextParagraph *parag, QPainter *p, const QColorGroup &cg );
+ bool useDoubleBuffer( QTextParagraph *parag, QPainter *p );
+
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 );
@@ -1022,206 +1028,205 @@ public:
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;
+ Q_DUMMY_COMPARISON_OPERATOR(QTextParagraphSelection)
};
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;
-};
+class QTextParagraphPseudoDocument;
+
+class QSyntaxHighlighter;
-//nase
class Q_EXPORT QTextParagraph
{
friend class QTextDocument;
friend class QTextCursor;
+ friend class QSyntaxHighlighter;
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;
+#if defined(Q_STRICT_INLINING_RULES)
+ // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the
+ // implementation to be a redefinition.
+ inline QTextDocument *document() const;
+#else
QTextDocument *document() const;
+#endif
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;
@@ -1551,116 +1556,128 @@ private:
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;
};
+class Q_EXPORT QTextParagraphPseudoDocument
+{
+public:
+ QTextParagraphPseudoDocument();
+ ~QTextParagraphPseudoDocument();
+ QRect docRect;
+ QTextFormatter *pFormatter;
+ QTextCommandHistory *commandHistory;
+ int minw;
+ int wused;
+ QTextFormatCollection collection;
+};
+
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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;
@@ -1783,96 +1800,102 @@ 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 bool QTextDocument::useDoubleBuffer( QTextParagraph *parag, QPainter *p )
+{
+ return ( !parag->document()->parent() || parag->document()->nextDoubleBuffered ) &&
+ ( !p || !p->device() || p->device()->devType() != QInternal::Printer );
+}
+
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 );
}
diff --git a/qmake/include/private/qsettings_p.h b/qmake/include/private/qsettings_p.h
index 18d118b..095291c 100644
--- a/qmake/include/private/qsettings_p.h
+++ b/qmake/include/private/qsettings_p.h
@@ -49,85 +49,85 @@
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)
+#if !defined(QWS) && (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
index 4a8339d..927de89 100644
--- a/qmake/include/private/qsharedmemory_p.h
+++ b/qmake/include/private/qsharedmemory_p.h
@@ -1,84 +1,87 @@
/****************************************************************************
** $Id$
**
** Includes system files for shared memory
**
** Created : 020124
**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+** Copyright (C) 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 QSHAREDMEMORY_P_H
+#define QSHAREDMEMORY_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_qws.cpp and qgfxvnc_qws.cpp. This header file may
// change from version to version without notice, or even be removed.
//
+// We mean it.
+//
//
-
-#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
index 8957b86..8a39ddf 100644
--- a/qmake/include/private/qsqldriverinterface_p.h
+++ b/qmake/include/private/qsqldriverinterface_p.h
@@ -1,69 +1,82 @@
/****************************************************************************
+** $Id$
**
** Definition of QSqlDriverInterface class
**
** Created : 2000-11-03
**
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-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 QSQLDRIVERINTERFACE_H
#define QSQLDRIVERINTERFACE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. 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
#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
+#endif // QSQLDRIVERINTERFACE_P_H
diff --git a/qmake/include/private/qsqlextension_p.h b/qmake/include/private/qsqlextension_p.h
index 597b266..3445b47 100644
--- a/qmake/include/private/qsqlextension_p.h
+++ b/qmake/include/private/qsqlextension_p.h
@@ -6,96 +6,123 @@
**
** 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 "qvaluevector.h"
#include "qstring.h"
#include "qvariant.h"
+#include "qsql.h"
#endif // QT_H
#ifndef QT_NO_SQL
#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
#define QM_EXPORT_SQL
+#define QM_TEMPLATE_EXTERN_SQL
#else
#define QM_EXPORT_SQL Q_EXPORT
+#define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
#endif
+struct Param {
+ Param( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {}
+ QVariant value;
+ QSql::ParameterType typ;
+ Q_DUMMY_COMPARISON_OPERATOR(Param)
+};
+
+struct Holder {
+ Holder( const QString& hldr = QString::null, int pos = -1 ): holderName( hldr ), holderPos( pos ) {}
+ bool operator==( const Holder& h ) const { return h.holderPos == holderPos && h.holderName == holderName; }
+ bool operator!=( const Holder& h ) const { return h.holderPos != holderPos || h.holderName != holderName; }
+ QString holderName;
+ int holderPos;
+};
+
#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>;
+QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<QString,Param>;
+QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<int,QString>;
+QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QValueVector<Holder>;
#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 );
+ virtual void bindValue( const QString& holder, const QVariant& value, QSql::ParameterType = QSql::In );
+ virtual void bindValue( int pos, const QVariant& value, QSql::ParameterType = QSql::In );
+ virtual void addBindValue( const QVariant& value, QSql::ParameterType = QSql::In );
+ virtual QVariant parameterValue( const QString& holder );
+ virtual QVariant parameterValue( int pos );
void clearValues();
void clearIndex();
enum BindMethod { BindByPosition, BindByName };
BindMethod bindMethod();
BindMethod bindm;
int bindCount;
QMap<int, QString> index;
- QMap<QString, QVariant> values;
+ typedef QMap<QString, Param> ValueMap;
+ ValueMap values;
+
+ // convenience container for QSqlQuery
+ // to map holders <-> positions
+ typedef QValueVector<Holder> HolderVector;
+ HolderVector holders;
};
class QM_EXPORT_SQL QSqlDriverExtension
{
public:
QSqlDriverExtension();
virtual ~QSqlDriverExtension();
virtual bool isOpen() const = 0;
};
-
#endif
#endif
diff --git a/qmake/include/private/qstyleinterface_p.h b/qmake/include/private/qstyleinterface_p.h
index 4aaedc7..24a43ad 100644
--- a/qmake/include/private/qstyleinterface_p.h
+++ b/qmake/include/private/qstyleinterface_p.h
@@ -1,61 +1,73 @@
/****************************************************************************
** $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 QSTYLEINTERFACE_P_H
+#define QSTYLEINTERFACE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. 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_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
+#endif //QSTYLEINTERFACE_P_H
diff --git a/qmake/include/private/qsvgdevice_p.h b/qmake/include/private/qsvgdevice_p.h
index c1cc389..3407705 100644
--- a/qmake/include/private/qsvgdevice_p.h
+++ b/qmake/include/private/qsvgdevice_p.h
@@ -1,134 +1,134 @@
/****************************************************************************
** $Id$
**
** Definition of the QSvgDevice class
**
-** Created : 20001024
+** Created : 001024
**
** 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
+#ifndef QSVGDEVICE_P_H
+#define QSVGDEVICE_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 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
+#endif // QSVGDEVICE_P_H
diff --git a/qmake/include/private/qtextcodecinterface_p.h b/qmake/include/private/qtextcodecinterface_p.h
index d2a2cb9..76e77f7 100644
--- a/qmake/include/private/qtextcodecinterface_p.h
+++ b/qmake/include/private/qtextcodecinterface_p.h
@@ -1,79 +1,77 @@
/****************************************************************************
** $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
index dabb6bf..091845f 100644
--- a/qmake/include/private/qtitlebar_p.h
+++ b/qmake/include/private/qtitlebar_p.h
@@ -1,54 +1,54 @@
/****************************************************************************
** $Id$
**
** Definition of some Qt private functions.
**
-** Created : 2000-01-01
+** Created : 000101
**
** 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.
//
//
diff --git a/qmake/include/private/qucom_p.h b/qmake/include/private/qucom_p.h
index d2ff48e..6b6ad40 100644
--- a/qmake/include/private/qucom_p.h
+++ b/qmake/include/private/qucom_p.h
@@ -1,314 +1,314 @@
/****************************************************************************
** $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
+#ifndef QUCOM_P_H
+#define QUCOM_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 "quuid.h"
+#endif // QT_H
+
#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 * );
@@ -351,149 +351,113 @@ struct Q_EXPORT QUType_idisp : public QUType
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
+#endif // QUCOM_P_H
diff --git a/qmake/include/private/qucomextra_p.h b/qmake/include/private/qucomextra_p.h
index 3de6104..fe39692 100644
--- a/qmake/include/private/qucomextra_p.h
+++ b/qmake/include/private/qucomextra_p.h
@@ -1,93 +1,105 @@
/****************************************************************************
** $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 QUCOMEXTRA_P_H
+#define QUCOMEXTRA_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. This header file may
+// change from version to version without notice, or even be
+// removed.
+//
+// We mean it.
+//
+//
#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
+#endif // QUCOMEXTRA_P_H
diff --git a/qmake/include/private/qwidgetinterface_p.h b/qmake/include/private/qwidgetinterface_p.h
index 5b5776b..78e9aad 100644
--- a/qmake/include/private/qwidgetinterface_p.h
+++ b/qmake/include/private/qwidgetinterface_p.h
@@ -1,111 +1,140 @@
- /**********************************************************************
-** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
+/****************************************************************************
+** $Id$
**
-** This file is part of Qt Designer.
+** ...
+**
+** 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 QWIDGETINTERFACE_H
-#define QWIDGETINTERFACE_H
-
-
-#ifndef QT_H
-#include <private/qcom_p.h>
-#include <qiconset.h>
-#endif // QT_H
-
-#ifndef QT_NO_WIDGETPLUGIN
+#ifndef QWIDGETINTERFACE_P_H
+#define QWIDGETINTERFACE_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 <private/qcom_p.h>
+#include <qiconset.h>
+#endif // QT_H
+
+#ifndef QT_NO_WIDGETPLUGIN
+
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
+#ifdef QT_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;
+ virtual QWidget *containerOfWidget( const QString &f, QWidget *container ) const = 0;
+ virtual bool isPassiveInteractor( const QString &f, QWidget *container ) const = 0;
+
+ virtual bool supportsPages( const QString &f ) const = 0;
+
+ virtual QWidget *addPage( const QString &f, QWidget *container,
+ const QString &name, int index ) const = 0;
+ virtual void insertPage( const QString &f, QWidget *container,
+ const QString &name, int index, QWidget *page ) const = 0;
+ virtual void removePage( const QString &f, QWidget *container, int index ) const = 0;
+ virtual void movePage( const QString &f, QWidget *container, int fromIndex, int toIndex ) const = 0;
+ virtual int count( const QString &key, QWidget *container ) const = 0;
+ virtual int currentIndex( const QString &key, QWidget *container ) const = 0;
+ virtual QString pageLabel( const QString &key, QWidget *container, int index ) const = 0;
+ virtual QWidget *page( const QString &key, QWidget *container, int index ) const = 0;
+ virtual void renamePage( const QString &key, QWidget *container,
+ int index, const QString &newName ) const = 0;
+ virtual QWidgetList pages( const QString &f, QWidget *container ) const = 0;
};
#endif
#endif // QT_NO_WIDGETPLUGIN
-#endif // QWIDGETINTERFACE_H
+#endif // QWIDGETINTERFACE_P_H
diff --git a/qmake/include/private/qwidgetresizehandler_p.h b/qmake/include/private/qwidgetresizehandler_p.h
index ca229db..9297832 100644
--- a/qmake/include/private/qwidgetresizehandler_p.h
+++ b/qmake/include/private/qwidgetresizehandler_p.h
@@ -1,87 +1,99 @@
/****************************************************************************
** $Id$
**
** Definition of the QWidgetResizeHandler class
**
** Created : 001010
**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+** Copyright (C) 1992-2002 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 QWIDGETRESIZEHANDLER_P_H
+#define QWIDGETRESIZEHANDLER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. This header file may
+// change from version to version without notice, or even be
+// removed.
+//
+// We mean it.
+//
+//
#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;
diff --git a/qmake/include/qasciidict.h b/qmake/include/qasciidict.h
index 8f344cd..ecd9c9f 100644
--- a/qmake/include/qasciidict.h
+++ b/qmake/include/qasciidict.h
@@ -70,49 +70,53 @@ public:
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);}
};
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QASCIIDICT
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QASCIIDICT_H
diff --git a/qmake/include/qcstring.h b/qmake/include/qcstring.h
index 004bb3b..6b7352a 100644
--- a/qmake/include/qcstring.h
+++ b/qmake/include/qcstring.h
@@ -56,99 +56,101 @@ 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
*****************************************************************************/
+#ifndef QT_QWINEXPORT
#if defined(Q_TEMPLATEDLL)
Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<char>;
#endif
+#endif /* QT_QWINEXPORT */
#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();
@@ -187,96 +189,98 @@ public:
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 );
+private:
+ int find( const char *str, int index, bool cs, uint l ) const;
};
/*****************************************************************************
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); }
@@ -343,49 +347,52 @@ 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;
}
+#ifdef QT_QWINEXPORT
+#include <qwinexport.h>
+#endif /* QT_QWINEXPORT */
#endif // QCSTRING_H
diff --git a/qmake/include/qdict.h b/qmake/include/qdict.h
index 04ae7bf..d8943ad 100644
--- a/qmake/include/qdict.h
+++ b/qmake/include/qdict.h
@@ -70,49 +70,53 @@ public:
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); }
};
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QDICT
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QDICT_H
diff --git a/qmake/include/qdir.h b/qmake/include/qdir.h
index 6e9f1ab..4b08b79 100644
--- a/qmake/include/qdir.h
+++ b/qmake/include/qdir.h
@@ -133,107 +133,108 @@ public:
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 );
+ void refresh() const;
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 &);
+ 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;
};
diff --git a/qmake/include/qfeatures.h b/qmake/include/qfeatures.h
index 57502f9..270a6de 100644
--- a/qmake/include/qfeatures.h
+++ b/qmake/include/qfeatures.h
@@ -29,97 +29,97 @@
// 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
+// 4-bit grayscale
//#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
diff --git a/qmake/include/qgarray.h b/qmake/include/qgarray.h
index 12edea6..40720a6 100644
--- a/qmake/include/qgarray.h
+++ b/qmake/include/qgarray.h
@@ -4,118 +4,127 @@
** 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; }
+ array_data():data(0),len(0)
+#ifdef QT_QGARRAY_SPEED_OPTIM
+ ,maxl(0)
+#endif
+ {}
char *data; // actual array data
uint len;
+#ifdef QT_QGARRAY_SPEED_OPTIM
+ uint maxl;
+#endif
};
QGArray();
+ enum Optimization { MemOptim, SpeedOptim };
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, Optimization optim );
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/qglobal.h b/qmake/include/qglobal.h
index 13cff64..d212bff 100644
--- a/qmake/include/qglobal.h
+++ b/qmake/include/qglobal.h
@@ -1,93 +1,93 @@
/****************************************************************************
** $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"
+#define QT_VERSION_STR "3.1.2"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x030100
+#define QT_VERSION 0x030102
/*
The operating system, must be one of: (Q_OS_x)
MACX - Mac OS X
MAC9 - Mac OS 9
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
@@ -96,226 +96,232 @@
# 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 */
+#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
# define Q_OS_SCO
-#elif defined(__UNIXWARE__) /* UnixWare 7 + GCC, Open UNIX 8 + GCC */
+#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
# define Q_OS_UNIXWARE
# define Q_OS_UNIXWARE7
-#elif defined(__USLC__) /* UnixWare 7 + UDK, Open UNIX 8 + OUDK */
+#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
# define Q_OS_UNIXWARE
# define Q_OS_UNIXWARE7
#else
# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
#endif
#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
+# if _MSC_VER < 1310
+# define Q_TYPENAME
+# endif
# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
#elif defined(__BORLANDC__) || defined(__TURBOC__)
# define Q_CC_BOR
# if __BORLANDC__ < 0x502
# 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
+/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */
+# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
+# define Q_WRONG_SB_CTYPE_MACROS
+# endif
# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
# define Q_PACKED __attribute__ ((packed))
# endif
# if !defined(__EXCEPTIONS)
# define Q_NO_EXCEPTIONS
# endif
/* 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
@@ -345,212 +351,230 @@
__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
+/* The latest UDK 7.1.1b does not need this, but previous versions do */
+# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
+# define Q_INLINE_TEMPLATES inline
+# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
/* Never tested! */
# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
# define Q_CC_OC
# define Q_NO_USING_KEYWORD
-/* CDS++ is not documented to define __EDG__ or __EDG in the Reliant
- documentation but we suppose it does, in any case it does follow
- conventions like _BOOL */
+/* CDS++ defines __EDG__ although this is not documented in the Reliant
+ documentation. It also follows conventions like _BOOL and this documented */
# elif defined(sinix)
# define Q_CC_CDS
# define Q_NO_USING_KEYWORD
# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
# define Q_NO_EXCEPTIONS
# endif
/* 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
+# define Q_NO_EXPLICIT_KEYWORD
+# define Q_INLINE_TEMPLATES inline
# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
# define Q_TYPENAME
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
# endif
/* The older UnixWare 2.X compiler? */
-#elif defined(__USLC__) && !defined(__SCO_VERSION__)
+#elif defined(__USLC__)
# define Q_CC_USLC
+# define Q_TYPENAME
# define Q_NO_BOOL_TYPE
# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
+# define Q_INLINE_TEMPLATES inline
/* Never tested! */
#elif defined(__HIGHC__)
# define Q_CC_HIGHC
#elif defined(__SUNPRO_CC)
# 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
+/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
+ documentation but nevertheless uses EDG conventions like _BOOL */
+#elif defined(sinix)
+# define Q_CC_EDG
+# define Q_CC_CDS
+# if !defined(_BOOL)
+# define Q_NO_BOOL_TYPE
+# endif
+# define Q_BROKEN_TEMPLATE_SPECIALIZATION
+
#elif defined(Q_OS_HPUX)
/* __HP_aCC was not defined in first aCC releases */
# if defined(__HP_aCC) || __cplusplus >= 199707L
# define Q_CC_HPACC
# else
# define Q_CC_HP
# 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
+# define QT_NO_QWS_IM
# 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;
@@ -700,155 +724,173 @@ class QDataStream;
#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
+#if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
+# define QT_NO_COP
+#endif
+
#ifndef QT_H
#include <qfeatures.h>
#endif // QT_H
//
// Create Qt DLL if QT_DLL is defined (Windows only)
+// or QT_SHARED is defined (Kylix only)
//
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
# if defined(QT_NODLL)
# undef QT_MAKEDLL
# undef QT_DLL
# 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
+# if defined(Q_CC_MSVC_NET)
+# define Q_TEMPLATE_EXTERN extern
# else
# define Q_TEMPLATE_EXTERN
# endif
# endif
-# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# endif
+#elif defined(Q_OS_LINUX) && defined(Q_CC_BOR)
+# if defined(QT_SHARED) /* create a Qt shared library */
+# define Q_EXPORT __declspec(dllexport)
+# define Q_TEMPLATEDLL
+# define Q_TEMPLATE_EXTERN
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
+# else
+# define Q_TEMPLATEDLL
+# define Q_TEMPLATE_EXTERN
+# undef Q_DISABLE_COPY /* avoid unresolved externals */
# endif
#else
# undef QT_MAKEDLL /* ignore these for other platforms */
# undef QT_DLL
#endif
#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)
+#if defined(Q_OS_MAC)
+int qMacVersion();
+#elif defined(Q_WS_WIN)
Q_EXPORT int qWinVersion();
#if defined(UNICODE)
#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
#else
#define QT_WA( uni, ansi ) ansi
#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)
@@ -924,83 +966,100 @@ Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
#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
+// compilers which follow outdated template instantiation rules
+// require a class to have a comparison operator to exist when
+// a QValueList of this type is instantiated. It's not actually
+// used in the list, though. Hence the dummy implementation.
+// Just in case other code relies on it we better trigger a warning
+// mandating a real implementation.
+#ifdef Q_FULL_TEMPLATE_INSTANTIATION
+# define Q_DUMMY_COMPARISON_OPERATOR(C) \
+ bool operator==( const C& ) const { \
+ qWarning( #C"::operator==( const "#C"& ) got called." ); \
+ return FALSE; \
+ }
+#else
+# define Q_DUMMY_COMPARISON_OPERATOR(C)
+#endif
+
#endif // QGLOBAL_H
//
// Avoid some particularly useless warnings from some stupid compilers.
// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
// the line "#define QT_NO_WARNINGS"
//
#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
+# pragma warning(disable: 4710) // function not inlined
# elif defined(Q_CC_BOR)
# pragma option -w-inl
# pragma option -w-aus
# pragma warn -inl
# pragma warn -pia
# pragma warn -ccc
# pragma warn -rch
# pragma warn -sig
# elif defined(Q_CC_MWERKS)
# pragma warn_possunwant off
# endif
#endif
diff --git a/qmake/include/qintdict.h b/qmake/include/qintdict.h
index b4cb223..0299879 100644
--- a/qmake/include/qintdict.h
+++ b/qmake/include/qintdict.h
@@ -66,49 +66,53 @@ public:
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);}
};
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QINTDICT
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QINTDICT_H
diff --git a/qmake/include/qmap.h b/qmake/include/qmap.h
index 269bd6b..4bc0a2f 100644
--- a/qmake/include/qmap.h
+++ b/qmake/include/qmap.h
@@ -835,49 +835,53 @@ Q_INLINE_TEMPLATES Q_TYPENAME QMap<Key,T>::iterator QMap<Key,T>::insert( const K
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
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QMAP
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QMAP_H
diff --git a/qmake/include/qmemarray.h b/qmake/include/qmemarray.h
index a5baf99..267670d 100644
--- a/qmake/include/qmemarray.h
+++ b/qmake/include/qmemarray.h
@@ -1,122 +1,129 @@
/****************************************************************************
** $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>
+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 resize( uint size, Optimization optim ) { return QGArray::resize(size*sizeof(type), optim); }
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(); }
};
+#ifndef QT_QWINEXPORT
#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
+#endif /* QT_QWINEXPORT */
#ifndef QT_NO_COMPAT
#define QArray QMemArray
#endif
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QMEMARRAY
+#include <qwinexport.h>
+#endif /* QT_QWINEXPORT */
#endif // QARRAY_H
diff --git a/qmake/include/qptrlist.h b/qmake/include/qptrlist.h
index 53fb605..17b5ee9 100644
--- a/qmake/include/qptrlist.h
+++ b/qmake/include/qptrlist.h
@@ -1,55 +1,53 @@
/****************************************************************************
** $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() {}
@@ -112,49 +110,53 @@ private:
#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
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QPTRLIST
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QPTRLIST_H
diff --git a/qmake/include/qptrvector.h b/qmake/include/qptrvector.h
index f6d9623..49b40b7 100644
--- a/qmake/include/qptrvector.h
+++ b/qmake/include/qptrvector.h
@@ -65,49 +65,53 @@ public:
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
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QPTRVECTOR
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QVECTOR_H
diff --git a/qmake/include/qregexp.h b/qmake/include/qregexp.h
index 7bb777a..90f54bd 100644
--- a/qmake/include/qregexp.h
+++ b/qmake/include/qregexp.h
@@ -35,81 +35,81 @@
**
**********************************************************************/
#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)
+#if defined(Q_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/qstring.h b/qmake/include/qstring.h
index 2a87a5a..c1d6740 100644
--- a/qmake/include/qstring.h
+++ b/qmake/include/qstring.h
@@ -1,93 +1,99 @@
/****************************************************************************
** $Id$
**
-** Definition of the QString class, and related Unicode
-** functions.
+** Definition of the QString class, and related Unicode functions.
**
** Created : 920609
**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+** 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 QSTRING_H
#define QSTRING_H
#ifndef QT_H
#include "qcstring.h"
#endif // QT_H
+#ifndef QT_NO_STL
+#include <string>
+#if defined(Q_WRONG_SB_CTYPE_MACROS) && defined(_SB_CTYPE_MACROS)
+#undef _SB_CTYPE_MACROS
+#endif
+#endif
+
/*****************************************************************************
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
@@ -291,149 +297,153 @@ inline bool operator==( QChar c, char ch )
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(); }
+ QShared(), unicode(0), ascii(0), len(0), issimpletext(TRUE), maxl(0), islatin1(FALSE) { ref(); }
QStringData(QChar *u, uint l, uint m) :
- QShared(), unicode(u), ascii(0), len(l), simpletext(1), maxl(m), dirty(1) { }
+ QShared(), unicode(u), ascii(0), len(l), issimpletext(FALSE), maxl(m), islatin1(FALSE) { }
~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;
+ issimpletext = FALSE;
}
#ifdef Q_OS_MAC9
uint len;
#else
uint len : 30;
#endif
- uint simpletext : 1;
+ uint issimpletext : 1;
#ifdef Q_OS_MAC9
uint maxl;
#else
uint maxl : 30;
#endif
- uint dirty : 1;
+ uint islatin1 : 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
+#ifndef QT_NO_STL
+ QString( const std::string& ); // deep copy
+#endif
~QString();
QString &operator=( const QString & ); // impl-shared copy
-#ifndef QT_NO_CAST_ASCII
QString &operator=( const char * ); // deep copy
+#ifndef QT_NO_STL
+ QString &operator=( const std::string& ); // 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
@@ -449,236 +459,251 @@ public:
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
+#ifndef QT_NO_STL
+ QString &append( const std::string& );
+#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
+#ifndef QT_NO_STL
+ QString &prepend( const std::string& );
+#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
+#ifndef QT_NO_STL
+ QString &operator+=( const std::string& );
+#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* ascii() const;
+ static QString fromAscii(const char*, int len=-1);
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(); }
+ operator const char *() const { return ascii(); }
#endif
+#ifndef QT_NO_STL
+ operator std::string() const { return ascii() ? ascii() : ""; }
+#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 &setAscii( const char*, int len=-1 );
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(); }
+ const char* data() const { return ascii(); }
#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 simpleText() const { if ( !d->issimpletext ) checkSimpleText(); return (bool)d->issimpletext; }
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 );
+ static QChar* latin1ToUnicode( const char*, uint * len, uint maxlen=(uint)-1 );
+ static QChar* latin1ToUnicode( const QByteArray&, uint * len );
+ static char* unicodeToLatin1( 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(); }
@@ -749,202 +774,218 @@ inline QString::~QString()
// 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()); }
+{ return insert(0,QString(s)); }
+#endif
+
+#ifndef QT_NO_STL
+inline QString &QString::prepend( const std::string& s )
+{ return insert(0, s); }
+#endif
+
+#ifndef QT_NO_CAST_ASCII
+inline QString &QString::operator+=( const QByteArray &s )
+{ return operator+=(QString(s)); }
#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()); }
+{ return operator+=(s); }
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()); }
+#ifndef QT_NO_STL
+inline QString &QString::operator+=( const std::string& s )
+{ return operator+=(s.c_str()); }
+inline QString &QString::append( const std::string& s )
+{ return operator+=(s); }
#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); }
+{ return find(QString::fromAscii(str), index); }
inline int QString::findRev( const char* str, int index ) const
-{ return findRev(QString::fromLatin1(str), index); }
+{ return findRev(QString::fromAscii(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);
+ tmp += QString::fromAscii(s2);
return tmp;
}
Q_EXPORT inline const QString operator+( const char *s1, const QString &s2 )
{
- QString tmp = QString::fromLatin1( s1 );
+ QString tmp = QString::fromAscii( 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
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QSTRING
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QSTRING_H
diff --git a/qmake/include/qstrlist.h b/qmake/include/qstrlist.h
index 86de328..b9dd753 100644
--- a/qmake/include/qstrlist.h
+++ b/qmake/include/qstrlist.h
@@ -1,99 +1,101 @@
/****************************************************************************
** $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
+#ifndef QT_QWINEXPORT
#if defined(Q_TEMPLATEDLL)
Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<char>;
Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrListIterator<char>;
#endif
+#endif /* QT_QWINEXPORT */
#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;
diff --git a/qmake/include/qtextcodec.h b/qmake/include/qtextcodec.h
index 149b5cb..995e434 100644
--- a/qmake/include/qtextcodec.h
+++ b/qmake/include/qtextcodec.h
@@ -30,85 +30,99 @@
** 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 QTextCodec* codecForTr();
+ static void setCodecForTr(QTextCodec *c);
+ static QTextCodec* codecForCStrings();
+ static void setCodecForCStrings(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);
+private:
+ static QTextCodec *cftr;
+ static QTextCodec *cfcs;
friend class QFont;
};
+
+inline QTextCodec* QTextCodec::codecForTr() { return cftr; }
+inline void QTextCodec::setCodecForTr(QTextCodec *c) { cftr = c; }
+inline QTextCodec* QTextCodec::codecForCStrings() { return cfcs; }
+inline void QTextCodec::setCodecForCStrings(QTextCodec *c) { cfcs = c; }
+
#endif // QT_NO_TEXTCODEC
#endif // QTEXTCODEC_H
diff --git a/qmake/include/qtl.h b/qmake/include/qtl.h
index 346cecc..25631fd 100644
--- a/qmake/include/qtl.h
+++ b/qmake/include/qtl.h
@@ -44,96 +44,97 @@
#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 )
{
+ // ### compare using !(*first1 == *first2) in Qt 4.0
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 )
diff --git a/qmake/include/quuid.h b/qmake/include/quuid.h
index 591d2f1..664c149 100644
--- a/qmake/include/quuid.h
+++ b/qmake/include/quuid.h
@@ -1,104 +1,104 @@
/****************************************************************************
** $Id$
**
** Definition of QUuid class
**
-** Created: 010523
+** Created : 010523
**
-** Copyright (C) 1992-2001 Trolltech AS. All rights reserved.
+** Copyright (C) 1992-2003 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;
+} GUID, *REFGUID, *LPGUID;
#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;
diff --git a/qmake/include/qvaluelist.h b/qmake/include/qvaluelist.h
index 54f7aec..f5cd7bb 100644
--- a/qmake/include/qvaluelist.h
+++ b/qmake/include/qvaluelist.h
@@ -617,49 +617,53 @@ Q_INLINE_TEMPLATES QValueList<T> QValueList<T>::operator+ ( const QValueList<T>&
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
+#ifdef QT_QWINEXPORT
+#define Q_DEFINED_QVALUELIST
+#include "qwinexport.h"
+#endif /* QT_QWINEXPORT */
#endif // QVALUELIST_H
diff --git a/qmake/include/qvaluestack.h b/qmake/include/qvaluestack.h
index 7e9bc48..c3f966e 100644
--- a/qmake/include/qvaluestack.h
+++ b/qmake/include/qvaluestack.h
@@ -1,64 +1,64 @@
/****************************************************************************
** $Id$
**
** Definition of QValueStack class
**
** Created : 990925
**
-** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
+** Copyright (C) 1992-2003 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() );
+ this->remove( this->fromLast() );
return elem;
}
T& top() { return this->last(); }
const T& top() const { return this->last(); }
};
#endif