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 @@ | |||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QAPPLICATION_P_H | 38 | #ifndef QAPPLICATION_P_H |
39 | #define QAPPLICATION_P_H | 39 | #define QAPPLICATION_P_H |
40 | 40 | ||
41 | 41 | ||
42 | // | 42 | // |
43 | // W A R N I N G | 43 | // W A R N I N G |
44 | // ------------- | 44 | // ------------- |
45 | // | 45 | // |
46 | // This file is not part of the Qt API. It exists for the convenience | 46 | // This file is not part of the Qt API. It exists for the convenience |
47 | // of qapplication_*.cpp, qwidget*.cpp, qcolor_x11.cpp, qfiledialog.cpp | 47 | // of qapplication_*.cpp, qwidget*.cpp, qcolor_x11.cpp, qfiledialog.cpp |
48 | // and many other. This header file may change from version to version | 48 | // and many other. This header file may change from version to version |
49 | // without notice, or even be removed. | 49 | // without notice, or even be removed. |
50 | // | 50 | // |
51 | // We mean it. | 51 | // We mean it. |
52 | // | 52 | // |
53 | // | 53 | // |
54 | 54 | ||
55 | #ifndef QT_H | 55 | #ifndef QT_H |
56 | #endif // QT_H | 56 | #endif // QT_H |
57 | 57 | ||
58 | class QWidget; | 58 | class QWidget; |
59 | class QObject; | 59 | class QObject; |
60 | class QClipboard; | 60 | class QClipboard; |
61 | class QKeyEvent; | 61 | class QKeyEvent; |
62 | class QMouseEvent; | 62 | class QMouseEvent; |
63 | class QWheelEvent; | 63 | class QWheelEvent; |
64 | 64 | ||
65 | extern Q_EXPORT bool qt_modal_state(); | 65 | extern Q_EXPORT bool qt_modal_state(); |
66 | extern Q_EXPORT void qt_enter_modal( QWidget* ); | 66 | extern Q_EXPORT void qt_enter_modal( QWidget* ); |
67 | extern Q_EXPORT void qt_leave_modal( QWidget* ); | 67 | extern Q_EXPORT void qt_leave_modal( QWidget* ); |
68 | 68 | ||
69 | extern bool qt_is_gui_used; | 69 | extern bool qt_is_gui_used; |
70 | #ifndef QT_NO_CLIPBOARD | 70 | #ifndef QT_NO_CLIPBOARD |
71 | extern QClipboard *qt_clipboard; | 71 | extern QClipboard *qt_clipboard; |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #if defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN) | 74 | #if defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN) |
75 | extern Qt::WindowsVersion qt_winver; | 75 | extern Qt::WindowsVersion qt_winver; |
76 | #elif defined (Q_OS_MAC) | ||
77 | extern Qt::MacintoshVersion qt_macver; | ||
76 | #endif | 78 | #endif |
77 | 79 | ||
78 | #if defined (Q_WS_X11) | 80 | #if defined (Q_WS_X11) |
79 | extern int qt_ncols_option; | 81 | extern int qt_ncols_option; |
80 | #endif | 82 | #endif |
81 | 83 | ||
82 | 84 | ||
83 | extern void qt_dispatchEnterLeave( QWidget*, QWidget* ); | 85 | extern void qt_dispatchEnterLeave( QWidget*, QWidget* ); |
84 | 86 | extern bool qt_tryModalHelper( QWidget *, QWidget ** = 0 ); | |
85 | |||
86 | 87 | ||
87 | #endif | 88 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** ... | 4 | ** ... |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | 8 | ** This file is part of the tools module of the Qt GUI Toolkit. |
9 | ** | 9 | ** |
10 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
11 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
12 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
15 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
17 | ** packaging of this file. | 17 | ** packaging of this file. |
18 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
20 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
21 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
22 | ** | 22 | ** |
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
25 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
27 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 30 | ** |
31 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
32 | ** not clear to you. | 32 | ** not clear to you. |
33 | ** | 33 | ** |
34 | **********************************************************************/ | 34 | **********************************************************************/ |
35 | 35 | ||
36 | #ifndef QCOM_H | 36 | #ifndef QCOM_P_H |
37 | #define QCOM_H | 37 | #define QCOM_P_H |
38 | 38 | ||
39 | // | 39 | // |
40 | // W A R N I N G | 40 | // W A R N I N G |
41 | // ------------- | 41 | // ------------- |
42 | // | 42 | // |
43 | // This file is not part of the Qt API. It exists for the convenience | 43 | // This file is not part of the Qt API. It exists for the convenience |
44 | // of a number of Qt sources files. This header file may change from | 44 | // of a number of Qt sources files. This header file may change from |
45 | // version to version without notice, or even be removed. | 45 | // version to version without notice, or even be removed. |
46 | // | 46 | // |
47 | // We mean it. | 47 | // We mean it. |
48 | // | 48 | // |
49 | // | 49 | // |
50 | 50 | ||
51 | #ifndef QT_H | 51 | #ifndef QT_H |
52 | #include "qstringlist.h" | 52 | #include "qstringlist.h" |
53 | #include "quuid.h" | 53 | #include "quuid.h" |
54 | #endif // QT_H | 54 | #endif // QT_H |
55 | 55 | ||
56 | #ifndef QT_NO_COMPONENT | 56 | #ifndef QT_NO_COMPONENT |
57 | 57 | ||
58 | class QObject; | 58 | class QObject; |
59 | struct QUInterfaceDescription; | 59 | struct QUInterfaceDescription; |
60 | struct QUObject; | 60 | struct QUObject; |
61 | 61 | ||
62 | #define QRESULT unsigned long | 62 | #define QRESULT unsigned long |
63 | #define QS_OK (QRESULT)0x00000000 | 63 | #define QS_OK (QRESULT)0x00000000 |
64 | #define QS_FALSE(QRESULT)0x00000001 | 64 | #define QS_FALSE(QRESULT)0x00000001 |
65 | 65 | ||
66 | #define QE_NOTIMPL (QRESULT)0x80000001 | 66 | #define QE_NOTIMPL (QRESULT)0x80000001 |
67 | #define QE_OUTOFMEMORY (QRESULT)0x80000002 | 67 | #define QE_OUTOFMEMORY (QRESULT)0x80000002 |
68 | #define QE_INVALIDARG(QRESULT)0x80000003 | 68 | #define QE_INVALIDARG(QRESULT)0x80000003 |
69 | #define QE_NOINTERFACE(QRESULT)0x80000004 | 69 | #define QE_NOINTERFACE(QRESULT)0x80000004 |
70 | #define QE_NOCOMPONENT(QRESULT)0x80000005 | 70 | #define QE_NOCOMPONENT(QRESULT)0x80000005 |
71 | 71 | ||
72 | 72 | ||
73 | // {1D8518CD-E8F5-4366-99E8-879FD7E482DE} | 73 | // {1D8518CD-E8F5-4366-99E8-879FD7E482DE} |
74 | #ifndef IID_QUnknown | 74 | #ifndef IID_QUnknown |
75 | #define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde) | 75 | #define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde) |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | struct Q_EXPORT QUnknownInterface | 78 | struct Q_EXPORT QUnknownInterface |
79 | { | 79 | { |
80 | virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0; | 80 | virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0; |
81 | virtual ulong addRef() = 0; | 81 | virtual ulong addRef() = 0; |
82 | virtual ulong release() = 0; | 82 | virtual ulong release() = 0; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | // {FBAC965E-A441-413F-935E-CDF582573FAB} | 85 | // {FBAC965E-A441-413F-935E-CDF582573FAB} |
@@ -289,49 +289,49 @@ public: \ | |||
289 | #ifndef Q_UCM_VERIFICATION_DATA | 289 | #ifndef Q_UCM_VERIFICATION_DATA |
290 | # define Q_UCM_VERIFICATION_DATA \ | 290 | # define Q_UCM_VERIFICATION_DATA \ |
291 | static const char *qt_ucm_verification_data = \ | 291 | static const char *qt_ucm_verification_data = \ |
292 | "pattern=""QT_UCM_VERIFICATION_DATA""\n" \ | 292 | "pattern=""QT_UCM_VERIFICATION_DATA""\n" \ |
293 | "version="QT_VERSION_STR"\n" \ | 293 | "version="QT_VERSION_STR"\n" \ |
294 | "flags="Q_UCM_FLAGS_STRING"\n" \ | 294 | "flags="Q_UCM_FLAGS_STRING"\n" \ |
295 | "buildkey="QT_BUILD_KEY"\0"; | 295 | "buildkey="QT_BUILD_KEY"\0"; |
296 | #endif // Q_UCM_VERIFICATION_DATA | 296 | #endif // Q_UCM_VERIFICATION_DATA |
297 | 297 | ||
298 | // This macro expands to the default implementation of ucm_instantiate. | 298 | // This macro expands to the default implementation of ucm_instantiate. |
299 | #ifndef Q_CREATE_INSTANCE | 299 | #ifndef Q_CREATE_INSTANCE |
300 | # define Q_CREATE_INSTANCE( IMPLEMENTATION ) \ | 300 | # define Q_CREATE_INSTANCE( IMPLEMENTATION ) \ |
301 | IMPLEMENTATION *i = new IMPLEMENTATION; \ | 301 | IMPLEMENTATION *i = new IMPLEMENTATION; \ |
302 | QUnknownInterface* iface = 0; \ | 302 | QUnknownInterface* iface = 0; \ |
303 | i->queryInterface( IID_QUnknown, &iface );\ | 303 | i->queryInterface( IID_QUnknown, &iface );\ |
304 | return iface; | 304 | return iface; |
305 | #endif // Q_CREATE_INSTANCE | 305 | #endif // Q_CREATE_INSTANCE |
306 | 306 | ||
307 | # ifdef Q_WS_WIN | 307 | # ifdef Q_WS_WIN |
308 | #ifdef Q_CC_BOR | 308 | #ifdef Q_CC_BOR |
309 | # define Q_EXPORT_COMPONENT() \ | 309 | # define Q_EXPORT_COMPONENT() \ |
310 | Q_UCM_VERIFICATION_DATA \ | 310 | Q_UCM_VERIFICATION_DATA \ |
311 | Q_EXTERN_C __declspec(dllexport) \ | 311 | Q_EXTERN_C __declspec(dllexport) \ |
312 | const char * __stdcall qt_ucm_query_verification_data() \ | 312 | const char * __stdcall qt_ucm_query_verification_data() \ |
313 | { return qt_ucm_verification_data; } \ | 313 | { return qt_ucm_verification_data; } \ |
314 | Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \ | 314 | Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \ |
315 | __stdcall ucm_instantiate() | 315 | __stdcall ucm_instantiate() |
316 | #else | 316 | #else |
317 | # define Q_EXPORT_COMPONENT() \ | 317 | # define Q_EXPORT_COMPONENT() \ |
318 | Q_UCM_VERIFICATION_DATA \ | 318 | Q_UCM_VERIFICATION_DATA \ |
319 | Q_EXTERN_C __declspec(dllexport) \ | 319 | Q_EXTERN_C __declspec(dllexport) \ |
320 | const char *qt_ucm_query_verification_data() \ | 320 | const char *qt_ucm_query_verification_data() \ |
321 | { return qt_ucm_verification_data; } \ | 321 | { return qt_ucm_verification_data; } \ |
322 | Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() | 322 | Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() |
323 | #endif | 323 | #endif |
324 | # else | 324 | # else |
325 | #define Q_EXPORT_COMPONENT() \ | 325 | #define Q_EXPORT_COMPONENT() \ |
326 | Q_UCM_VERIFICATION_DATA \ | 326 | Q_UCM_VERIFICATION_DATA \ |
327 | Q_EXTERN_C \ | 327 | Q_EXTERN_C \ |
328 | const char *qt_ucm_query_verification_data() \ | 328 | const char *qt_ucm_query_verification_data() \ |
329 | { return qt_ucm_verification_data; } \ | 329 | { return qt_ucm_verification_data; } \ |
330 | Q_EXTERN_C QUnknownInterface* ucm_instantiate() | 330 | Q_EXTERN_C QUnknownInterface* ucm_instantiate() |
331 | # endif | 331 | # endif |
332 | # define Q_EXPORT_INTERFACE() Q_EXPORT_COMPONENT() | 332 | # define Q_EXPORT_INTERFACE() Q_EXPORT_COMPONENT() |
333 | #endif | 333 | #endif |
334 | 334 | ||
335 | #endif //QT_NO_COMPONENT | 335 | #endif //QT_NO_COMPONENT |
336 | 336 | ||
337 | #endif //QCOM_H | 337 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QComLibrary class | 4 | ** Definition of QComLibrary class |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | 8 | ** This file is part of the tools module of the Qt GUI Toolkit. |
9 | ** | 9 | ** |
10 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
11 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
12 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
15 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
17 | ** packaging of this file. | 17 | ** packaging of this file. |
18 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
20 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
21 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
22 | ** | 22 | ** |
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
25 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
27 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 30 | ** |
31 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
32 | ** not clear to you. | 32 | ** not clear to you. |
33 | ** | 33 | ** |
34 | **********************************************************************/ | 34 | **********************************************************************/ |
35 | 35 | ||
36 | #ifndef QUCOMLIBRARY_H | 36 | #ifndef QCOMLIBRARY_P_H |
37 | #define QUCOMLIBRARY_H | 37 | #define QCOMLIBRARY_P_H |
38 | 38 | ||
39 | // | 39 | // |
40 | // W A R N I N G | 40 | // W A R N I N G |
41 | // ------------- | 41 | // ------------- |
42 | // | 42 | // |
43 | // This file is not part of the Qt API. It exists for the convenience | 43 | // This file is not part of the Qt API. It exists for the convenience |
44 | // of a number of Qt sources files. This header file may change from | 44 | // of a number of Qt sources files. This header file may change from |
45 | // version to version without notice, or even be removed. | 45 | // version to version without notice, or even be removed. |
46 | // | 46 | // |
47 | // We mean it. | 47 | // We mean it. |
48 | // | 48 | // |
49 | // | 49 | // |
50 | 50 | ||
51 | #ifndef QT_H | 51 | #ifndef QT_H |
52 | #include "qcom_p.h" | 52 | #include "qcom_p.h" |
53 | #include "qlibrary.h" | 53 | #include "qlibrary.h" |
54 | #endif // QT_H | 54 | #endif // QT_H |
55 | 55 | ||
56 | #ifndef QT_NO_COMPONENT | 56 | #ifndef QT_NO_COMPONENT |
57 | 57 | ||
58 | class Q_EXPORT QComLibrary : public QLibrary | 58 | class Q_EXPORT QComLibrary : public QLibrary |
59 | { | 59 | { |
60 | public: | 60 | public: |
61 | QComLibrary( const QString &filename ); | 61 | QComLibrary( const QString &filename ); |
62 | ~QComLibrary(); | 62 | ~QComLibrary(); |
63 | 63 | ||
64 | bool unload(); | 64 | bool unload(); |
65 | QRESULT queryInterface( const QUuid &iid, QUnknownInterface **iface ); | 65 | QRESULT queryInterface( const QUuid &iid, QUnknownInterface **iface ); |
66 | uint qtVersion(); | 66 | uint qtVersion(); |
67 | 67 | ||
68 | private: | 68 | private: |
69 | void createInstanceInternal(); | 69 | void createInstanceInternal(); |
70 | 70 | ||
71 | QUnknownInterface *entry; | 71 | QUnknownInterface *entry; |
72 | QLibraryInterface *libiface; | 72 | QLibraryInterface *libiface; |
73 | uint qt_version; | 73 | uint qt_version; |
74 | 74 | ||
75 | }; | 75 | }; |
76 | 76 | ||
77 | #endif //QT_NO_COMPONENT | 77 | #endif //QT_NO_COMPONENT |
78 | 78 | ||
79 | #endif // QUCOMLIBRARY_H | 79 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Internal header file. | 4 | ** Internal header file. |
5 | ** | 5 | ** |
6 | ** Created : | 6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. |
7 | ** | ||
8 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | ||
9 | ** | 7 | ** |
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 8 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
11 | ** | 9 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 13 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 17 | ** packaging of this file. |
20 | ** | 18 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
24 | ** | 22 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 25 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 30 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 32 | ** not clear to you. |
35 | ** | 33 | ** |
36 | **********************************************************************/ | 34 | **********************************************************************/ |
37 | 35 | ||
38 | #ifndef QCOMPLEXTEXT_H | 36 | #ifndef QCOMPLEXTEXT_P_H |
39 | #define QCOMPLEXTEXT_H | 37 | #define QCOMPLEXTEXT_P_H |
40 | 38 | ||
41 | // | 39 | // |
42 | // W A R N I N G | 40 | // W A R N I N G |
43 | // ------------- | 41 | // ------------- |
44 | // | 42 | // |
45 | // This file is not part of the Qt API. It exists for the convenience | 43 | // This file is not part of the Qt API. It exists for the convenience |
46 | // of Qt Remote Control. This header file may change from version to | 44 | // of Qt Remote Control. This header file may change from version to |
47 | // version without notice, or even be removed. | 45 | // version without notice, or even be removed. |
48 | // | 46 | // |
49 | // We mean it. | 47 | // We mean it. |
50 | // | 48 | // |
51 | // | 49 | // |
52 | 50 | ||
53 | #ifndef QT_H | 51 | #ifndef QT_H |
54 | #include <qstring.h> | 52 | #include <qstring.h> |
55 | #include <qpointarray.h> | 53 | #include <qpointarray.h> |
56 | #include <qfont.h> | 54 | #include <qfont.h> |
57 | #include <qpainter.h> | 55 | #include <qpainter.h> |
58 | #include <qptrlist.h> | 56 | #include <qptrlist.h> |
59 | #include <qshared.h> | 57 | #include <qshared.h> |
60 | #endif // QT_H | 58 | #endif // QT_H |
61 | 59 | ||
62 | #ifndef QT_NO_COMPLEXTEXT | 60 | #ifndef QT_NO_COMPLEXTEXT |
63 | 61 | ||
64 | // bidi helper classes. Internal to Qt | 62 | // bidi helper classes. Internal to Qt |
65 | struct Q_EXPORT QBidiStatus { | 63 | struct Q_EXPORT QBidiStatus { |
66 | QBidiStatus() { | 64 | QBidiStatus() { |
67 | eor = QChar::DirON; | 65 | eor = QChar::DirON; |
68 | lastStrong = QChar::DirON; | 66 | lastStrong = QChar::DirON; |
69 | last = QChar:: DirON; | 67 | last = QChar:: DirON; |
70 | } | 68 | } |
71 | QChar::Direction eor; | 69 | QChar::Direction eor; |
72 | QChar::Direction lastStrong; | 70 | QChar::Direction lastStrong; |
73 | QChar::Direction last; | 71 | QChar::Direction last; |
74 | }; | 72 | }; |
75 | 73 | ||
76 | struct Q_EXPORT QBidiContext : public QShared { | 74 | struct Q_EXPORT QBidiContext : public QShared { |
77 | // ### ref and deref parent? | 75 | // ### ref and deref parent? |
78 | QBidiContext( uchar level, QChar::Direction embedding, QBidiContext *parent = 0, bool override = FALSE ); | 76 | QBidiContext( uchar level, QChar::Direction embedding, QBidiContext *parent = 0, bool override = FALSE ); |
79 | ~QBidiContext(); | 77 | ~QBidiContext(); |
80 | 78 | ||
81 | unsigned char level; | 79 | unsigned char level; |
82 | bool override : 1; | 80 | bool override : 1; |
83 | QChar::Direction dir : 5; | 81 | QChar::Direction dir : 5; |
84 | 82 | ||
85 | QBidiContext *parent; | 83 | QBidiContext *parent; |
86 | }; | 84 | }; |
87 | 85 | ||
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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of the QComponentFactory class | 4 | ** Definition of the QComponentFactory class |
5 | ** | 5 | ** |
6 | ** Created : 990101 | 6 | ** Created : 990101 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QCOMPONENTFACTORY_H | 38 | #ifndef QCOMPONENTFACTORY_P_H |
39 | #define QCOMPONENTFACTORY_H | 39 | #define QCOMPONENTFACTORY_P_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qcom_p.h" | 42 | #include "qcom_p.h" |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | // | 45 | // |
46 | // W A R N I N G | 46 | // W A R N I N G |
47 | // ------------- | 47 | // ------------- |
48 | // | 48 | // |
49 | // This file is not part of the Qt API. It exists for the convenience | 49 | // This file is not part of the Qt API. It exists for the convenience |
50 | // of a number of Qt sources files. This header file may change from | 50 | // of a number of Qt sources files. This header file may change from |
51 | // version to version without notice, or even be removed. | 51 | // version to version without notice, or even be removed. |
52 | // | 52 | // |
53 | // We mean it. | 53 | // We mean it. |
54 | // | 54 | // |
55 | // | 55 | // |
56 | 56 | ||
57 | #ifndef QT_NO_COMPONENT | 57 | #ifndef QT_NO_COMPONENT |
58 | 58 | ||
59 | class Q_EXPORT QComponentFactory | 59 | class Q_EXPORT QComponentFactory |
60 | { | 60 | { |
61 | public: | 61 | public: |
62 | static QRESULT createInstance( const QString &cid, const QUuid &iid, QUnknownInterface** instance, QUnknownInterface *outer = 0 ); | 62 | static QRESULT createInstance( const QString &cid, const QUuid &iid, QUnknownInterface** instance, QUnknownInterface *outer = 0 ); |
63 | static QRESULT registerServer( const QString &filename ); | 63 | static QRESULT registerServer( const QString &filename ); |
64 | static QRESULT unregisterServer( const QString &filename ); | 64 | static QRESULT unregisterServer( const QString &filename ); |
65 | 65 | ||
66 | static bool registerComponent( const QUuid &cid, const QString &filename, const QString &name = QString::null, | 66 | static bool registerComponent( const QUuid &cid, const QString &filename, const QString &name = QString::null, |
67 | int version = 0, const QString &description = QString::null ); | 67 | int version = 0, const QString &description = QString::null ); |
68 | static bool unregisterComponent( const QUuid &cid ); | 68 | static bool unregisterComponent( const QUuid &cid ); |
69 | }; | 69 | }; |
70 | 70 | ||
71 | #endif // QT_NO_COMPONENT | 71 | #endif // QT_NO_COMPONENT |
72 | 72 | ||
73 | #endif // QCOMPONENTFACTORY_H | 73 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QCriticalSection class | 4 | ** Definition of QCriticalSection class |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** This file is part of the Qt GUI Toolkit. | 8 | ** This file is part of the Qt GUI Toolkit. |
9 | ** | 9 | ** |
10 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
11 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
12 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
15 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
17 | ** packaging of this file. | 17 | ** packaging of this file. |
18 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
20 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
21 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
22 | ** | 22 | ** |
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
25 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
27 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 30 | ** |
31 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
32 | ** not clear to you. | 32 | ** not clear to you. |
33 | ** | 33 | ** |
34 | **********************************************************************/ | 34 | **********************************************************************/ |
35 | 35 | ||
36 | #ifndef QCRITICALSECTION_H | 36 | #ifndef QCRITICALSECTION_P_H |
37 | #define QCRITICALSECTION_H | 37 | #define QCRITICALSECTION_P_H |
38 | 38 | ||
39 | #ifndef QT_H | 39 | #ifndef QT_H |
40 | #endif // QT_H | 40 | #endif // QT_H |
41 | 41 | ||
42 | // | 42 | // |
43 | // W A R N I N G | 43 | // W A R N I N G |
44 | // ------------- | 44 | // ------------- |
45 | // | 45 | // |
46 | // This file is not part of the Qt API. It exists for the convenience | 46 | // This file is not part of the Qt API. It exists for the convenience |
47 | // of Qt Remote Control. This header file may change from version to | 47 | // of Qt Remote Control. This header file may change from version to |
48 | // version without notice, or even be removed. | 48 | // version without notice, or even be removed. |
49 | // | 49 | // |
50 | // We mean it. | 50 | // We mean it. |
51 | // | 51 | // |
52 | // | 52 | // |
53 | 53 | ||
54 | #if defined(QT_THREAD_SUPPORT) | 54 | #if defined(QT_THREAD_SUPPORT) |
55 | 55 | ||
56 | #if defined(Q_WS_WIN) | 56 | #if defined(Q_WS_WIN) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | QCriticalSection | 59 | QCriticalSection |
60 | */ | 60 | */ |
61 | 61 | ||
62 | class QCriticalSectionPrivate; | 62 | class QCriticalSectionPrivate; |
63 | 63 | ||
64 | class QCriticalSection | 64 | class QCriticalSection |
65 | { | 65 | { |
66 | public: | 66 | public: |
67 | QCriticalSection(); | 67 | QCriticalSection(); |
68 | ~QCriticalSection(); | 68 | ~QCriticalSection(); |
69 | void enter(); | 69 | void enter(); |
70 | void leave(); | 70 | void leave(); |
71 | 71 | ||
72 | private: | 72 | private: |
73 | QCriticalSectionPrivate *d; | 73 | QCriticalSectionPrivate *d; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #endif | 80 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of some private QDir functions. | 4 | ** Definition of some private QDir functions. |
5 | ** | 5 | ** |
6 | ** Created : 2000.11.06 | 6 | ** Created : 001106 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QDIR_P_H | 38 | #ifndef QDIR_P_H |
39 | #define QDIR_P_H | 39 | #define QDIR_P_H |
40 | 40 | ||
41 | |||
42 | // | 41 | // |
43 | // W A R N I N G | 42 | // W A R N I N G |
44 | // ------------- | 43 | // ------------- |
45 | // | 44 | // |
46 | // This file is not part of the Qt API. It exists for the convenience | 45 | // This file is not part of the Qt API. It exists for the convenience |
47 | // of qdir.cpp and qdir_*.cpp. | 46 | // of qdir.cpp and qdir_*.cpp. |
48 | // This header file may change from version to version without notice, | 47 | // This header file may change from version to version without notice, |
49 | // or even be removed. | 48 | // or even be removed. |
50 | // | 49 | // |
51 | // We mean it. | 50 | // We mean it. |
52 | // | 51 | // |
53 | // | 52 | // |
54 | 53 | ||
55 | #ifndef QT_H | 54 | #ifndef QT_H |
55 | #include "qregexp.h" | ||
56 | #include "qvaluelist.h" | ||
56 | #endif // QT_H | 57 | #endif // QT_H |
57 | 58 | ||
58 | extern QStringList qt_makeFilterList( const QString & ); | 59 | extern QValueList<QRegExp> qt_makeFilterList( const QString & ); |
59 | 60 | extern bool qt_matchFilterList( const QValueList<QRegExp> &, const QString & ); | |
60 | 61 | ||
61 | extern int qt_cmp_si_sortSpec; | 62 | extern int qt_cmp_si_sortSpec; |
62 | 63 | ||
63 | #if defined(Q_C_CALLBACKS) | 64 | #if defined(Q_C_CALLBACKS) |
64 | extern "C" { | 65 | extern "C" { |
65 | #endif | 66 | #endif |
66 | 67 | ||
67 | #ifdef Q_OS_TEMP | 68 | #ifdef Q_OS_TEMP |
68 | extern int __cdecl qt_cmp_si( const void *, const void * ); | 69 | extern int __cdecl qt_cmp_si( const void *, const void * ); |
69 | #else | 70 | #else |
70 | extern int qt_cmp_si( const void *, const void * ); | 71 | extern int qt_cmp_si( const void *, const void * ); |
71 | #endif | 72 | #endif |
72 | 73 | ||
73 | #if defined(Q_C_CALLBACKS) | 74 | #if defined(Q_C_CALLBACKS) |
74 | } | 75 | } |
75 | #endif | 76 | #endif |
76 | 77 | ||
77 | 78 | ||
78 | #endif // QDIR_P_H | 79 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QEffects functions | 4 | ** Definition of QEffects functions |
5 | ** | 5 | ** |
6 | ** Created : 2000.06.21 | 6 | ** Created : 000621 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the widgets module of the Qt GUI Toolkit. | 10 | ** This file is part of the widgets module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QEFFECTS_P_H | 38 | #ifndef QEFFECTS_P_H |
39 | #define QEFFECTS_P_H | 39 | #define QEFFECTS_P_H |
40 | 40 | ||
41 | 41 | ||
42 | // | 42 | // |
43 | // W A R N I N G | 43 | // W A R N I N G |
44 | // ------------- | 44 | // ------------- |
45 | // | 45 | // |
46 | // This file is not part of the Qt API. It exists for the convenience | 46 | // This file is not part of the Qt API. It exists for the convenience |
47 | // of qeffects.cpp, qcombobox.cpp, qpopupmenu.cpp and qtooltip.cpp. | 47 | // of qeffects.cpp, qcombobox.cpp, qpopupmenu.cpp and qtooltip.cpp. |
48 | // This header file may change from version to version without notice, | 48 | // This header file may change from version to version without notice, |
49 | // or even be removed. | 49 | // or even be removed. |
50 | // | 50 | // |
51 | // We mean it. | 51 | // We mean it. |
52 | // | 52 | // |
53 | // | 53 | // |
54 | 54 | ||
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 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QEventLoop class | ||
5 | ** | ||
6 | ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed and/or modified under the terms of the | ||
11 | ** GNU General Public License version 2 as published by the Free Software | ||
12 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
13 | ** packaging of this file. | ||
14 | ** | ||
15 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
16 | ** licenses for Qt/Embedded may use this file in accordance with the | ||
17 | ** Qt Embedded Commercial License Agreement provided with the Software. | ||
18 | ** | ||
19 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
20 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | ** | ||
22 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
23 | ** information about Qt Commercial License Agreements. | ||
24 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
25 | ** | ||
26 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
27 | ** not clear to you. | ||
28 | ** | ||
29 | **********************************************************************/ | ||
30 | |||
1 | #ifndef QEVENTLOOP_P_H | 31 | #ifndef QEVENTLOOP_P_H |
2 | #define QEVENTLOOP_P_H | 32 | #define QEVENTLOOP_P_H |
3 | 33 | ||
34 | // | ||
35 | // W A R N I N G | ||
36 | // ------------- | ||
37 | // | ||
38 | // This file is not part of the Qt API. This header file may | ||
39 | // change from version to version without notice, or even be | ||
40 | // removed. | ||
41 | // | ||
42 | // We mean it. | ||
43 | // | ||
44 | // | ||
45 | |||
4 | #include "qplatformdefs.h" | 46 | #include "qplatformdefs.h" |
47 | |||
48 | // SCO OpenServer redefines raise -> kill | ||
49 | #if defined(raise) | ||
50 | # undef raise | ||
51 | #endif | ||
52 | |||
5 | #include "qwindowdefs.h" | 53 | #include "qwindowdefs.h" |
6 | 54 | ||
7 | class QSocketNotifier; | 55 | class QSocketNotifier; |
8 | 56 | ||
9 | #if defined(Q_OS_UNIX) | 57 | #if defined(Q_OS_UNIX) || defined (Q_WS_WIN) |
10 | #include <qptrlist.h> | 58 | #include <qptrlist.h> |
59 | #endif // Q_OS_UNIX || Q_WS_WIN | ||
11 | 60 | ||
61 | #if defined(Q_OS_UNIX) | ||
12 | struct QSockNot | 62 | struct QSockNot |
13 | { | 63 | { |
14 | QSocketNotifier *obj; | 64 | QSocketNotifier *obj; |
15 | int fd; | 65 | int fd; |
16 | fd_set *queue; | 66 | fd_set *queue; |
17 | }; | 67 | }; |
18 | 68 | ||
19 | class QSockNotType | 69 | class QSockNotType |
20 | { | 70 | { |
21 | public: | 71 | public: |
22 | QSockNotType(); | 72 | QSockNotType(); |
23 | ~QSockNotType(); | 73 | ~QSockNotType(); |
24 | 74 | ||
25 | QPtrList<QSockNot> *list; | 75 | QPtrList<QSockNot> *list; |
26 | fd_set select_fds; | 76 | fd_set select_fds; |
27 | fd_set enabled_fds; | 77 | fd_set enabled_fds; |
28 | fd_set pending_fds; | 78 | fd_set pending_fds; |
29 | 79 | ||
30 | }; | 80 | }; |
31 | #endif // Q_OS_UNIX | 81 | #endif // Q_OS_UNIX |
32 | 82 | ||
83 | #if defined(Q_WS_WIN) | ||
84 | struct QSockNot { | ||
85 | QSocketNotifier *obj; | ||
86 | int fd; | ||
87 | }; | ||
88 | #endif // Q_WS_WIN | ||
33 | 89 | ||
34 | class QEventLoopPrivate | 90 | class QEventLoopPrivate |
35 | { | 91 | { |
36 | public: | 92 | public: |
37 | QEventLoopPrivate() | 93 | QEventLoopPrivate() |
38 | { | 94 | { |
39 | reset(); | 95 | reset(); |
40 | } | 96 | } |
41 | 97 | ||
42 | void reset() { | 98 | void reset() { |
43 | looplevel = 0; | 99 | looplevel = 0; |
44 | quitcode = 0; | 100 | quitcode = 0; |
45 | quitnow = FALSE; | 101 | quitnow = FALSE; |
46 | exitloop = FALSE; | 102 | exitloop = FALSE; |
103 | shortcut = FALSE; | ||
47 | } | 104 | } |
48 | 105 | ||
49 | int looplevel; | 106 | int looplevel; |
50 | int quitcode; | 107 | int quitcode; |
51 | bool quitnow; | 108 | unsigned int quitnow : 1; |
52 | bool exitloop; | 109 | unsigned int exitloop : 1; |
110 | unsigned int shortcut : 1; | ||
53 | 111 | ||
54 | #if defined(Q_WS_MAC) | 112 | #if defined(Q_WS_MAC) |
55 | EventLoopTimerRef select_timer; | 113 | EventLoopTimerRef select_timer; |
56 | #endif | 114 | #endif |
57 | 115 | ||
58 | #if defined(Q_WS_X11) | 116 | #if defined(Q_WS_X11) |
59 | int xfd; | 117 | int xfd; |
60 | #endif // Q_WS_X11 | 118 | #endif // Q_WS_X11 |
61 | 119 | ||
62 | #if defined(Q_OS_UNIX) | 120 | #if defined(Q_OS_UNIX) |
63 | int thread_pipe[2]; | 121 | int thread_pipe[2]; |
64 | 122 | ||
65 | // pending socket notifiers list | 123 | // pending socket notifiers list |
66 | QPtrList<QSockNot> sn_pending_list; | 124 | QPtrList<QSockNot> sn_pending_list; |
67 | // highest fd for all socket notifiers | 125 | // highest fd for all socket notifiers |
68 | int sn_highest; | 126 | int sn_highest; |
69 | // 3 socket notifier types - read, write and exception | 127 | // 3 socket notifier types - read, write and exception |
70 | QSockNotType sn_vec[3]; | 128 | QSockNotType sn_vec[3]; |
71 | #endif | 129 | #endif |
130 | |||
131 | #ifdef Q_WS_WIN | ||
132 | // pending socket notifiers list | ||
133 | QPtrList<QSockNot> sn_pending_list; | ||
134 | #endif // Q_WS_WIN | ||
135 | |||
72 | }; | 136 | }; |
73 | 137 | ||
74 | #endif // QEVENTLOOP_P_H | 138 | #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 @@ | |||
6 | ** Created : 20001101 | 6 | ** Created : 20001101 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QFONTCODECS_P_H | 38 | #ifndef QFONTCODECS_P_H |
39 | #define QFONTCODECS_P_H | 39 | #define QFONTCODECS_P_H |
40 | 40 | ||
41 | // | 41 | // |
42 | // W A R N I N G | 42 | // W A R N I N G |
43 | // ------------- | 43 | // ------------- |
44 | // | 44 | // |
45 | // This file is not part of the Qt API. It exists for the convenience | 45 | // This file is not part of the Qt API. It exists for the convenience |
46 | // of qfontencodings_x11.cpp and qfont_x11.cpp. This header file may | 46 | // of qfontencodings_x11.cpp and qfont_x11.cpp. This header file may |
47 | // change from version to version without notice, or even be removed. | 47 | // change from version to version without notice, or even be removed. |
48 | // | 48 | // |
49 | // We mean it. | 49 | // We mean it. |
50 | // | 50 | // |
51 | // | 51 | // |
52 | 52 | ||
53 | #ifndef QT_H | 53 | #ifndef QT_H |
54 | #include <qglobal.h> | 54 | #include "qglobal.h" |
55 | #include <qtextcodec.h> | 55 | #include "qtextcodec.h" |
56 | #endif // QT_H | 56 | #endif // QT_H |
57 | 57 | ||
58 | 58 | ||
59 | #ifndef QT_NO_CODECS | 59 | #ifndef QT_NO_CODECS |
60 | #ifndef QT_NO_BIG_CODECS | 60 | #ifndef QT_NO_BIG_CODECS |
61 | 61 | ||
62 | 62 | ||
63 | class QJpUnicodeConv; | 63 | class QJpUnicodeConv; |
64 | 64 | ||
65 | 65 | ||
66 | class QFontJis0201Codec : public QTextCodec | 66 | class QFontJis0201Codec : public QTextCodec |
67 | { | 67 | { |
68 | public: | 68 | public: |
69 | QFontJis0201Codec(); | 69 | QFontJis0201Codec(); |
70 | 70 | ||
71 | const char *name() const; | 71 | const char *name() const; |
72 | 72 | ||
73 | int mibEnum() const; | 73 | int mibEnum() const; |
74 | 74 | ||
75 | #if !defined(Q_NO_USING_KEYWORD) | 75 | #if !defined(Q_NO_USING_KEYWORD) |
76 | using QTextCodec::fromUnicode; | 76 | using QTextCodec::fromUnicode; |
77 | #endif | 77 | #endif |
78 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | 78 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; |
79 | 79 | ||
80 | int heuristicContentMatch(const char *, int) const; | 80 | int heuristicContentMatch(const char *, int) const; |
81 | int heuristicNameMatch(const char* hint) const; | 81 | int heuristicNameMatch(const char* hint) const; |
82 | 82 | ||
83 | #if !defined(Q_NO_USING_KEYWORD) | 83 | #if !defined(Q_NO_USING_KEYWORD) |
84 | using QTextCodec::canEncode; | 84 | using QTextCodec::canEncode; |
85 | #endif | 85 | #endif |
86 | bool canEncode( QChar ) const; | 86 | bool canEncode( QChar ) const; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | 89 | ||
90 | class QFontJis0208Codec : public QTextCodec | 90 | class QFontJis0208Codec : public QTextCodec |
91 | { | 91 | { |
92 | public: | 92 | public: |
93 | QFontJis0208Codec(); | 93 | QFontJis0208Codec(); |
94 | ~QFontJis0208Codec(); | 94 | ~QFontJis0208Codec(); |
95 | 95 | ||
96 | // Return the official name for the encoding. | 96 | // Return the official name for the encoding. |
97 | const char* name() const ; | 97 | const char* name() const ; |
98 | 98 | ||
99 | // Return the MIB enum for the encoding if it is listed in the | 99 | // Return the MIB enum for the encoding if it is listed in the |
100 | // IANA character-sets encoding file. | 100 | // IANA character-sets encoding file. |
101 | int mibEnum() const ; | 101 | int mibEnum() const ; |
102 | 102 | ||
103 | // Converts len characters from chars to Unicode. | 103 | // 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: | |||
117 | { ; } | 117 | { ; } |
118 | 118 | ||
119 | ~QFontStruct(); | 119 | ~QFontStruct(); |
120 | 120 | ||
121 | Qt::HANDLE handle, xfthandle, xftpattern; | 121 | Qt::HANDLE handle, xfthandle, xftpattern; |
122 | QCString name; | 122 | QCString name; |
123 | QTextCodec *codec; | 123 | QTextCodec *codec; |
124 | int cache_cost; | 124 | int cache_cost; |
125 | float scale; // needed for printing, to correctly scale font metrics for bitmap fonts | 125 | float scale; // needed for printing, to correctly scale font metrics for bitmap fonts |
126 | }; | 126 | }; |
127 | 127 | ||
128 | enum { widthCacheSize = 0x500 }; | 128 | enum { widthCacheSize = 0x500 }; |
129 | 129 | ||
130 | class QFontX11Data // used as a QFontPrivate member | 130 | class QFontX11Data // used as a QFontPrivate member |
131 | { | 131 | { |
132 | public: | 132 | public: |
133 | // X fontstruct handles for each character set | 133 | // X fontstruct handles for each character set |
134 | QFontStruct *fontstruct[QFont::LastPrivateScript]; | 134 | QFontStruct *fontstruct[QFont::LastPrivateScript]; |
135 | 135 | ||
136 | uchar widthCache[widthCacheSize]; | 136 | uchar widthCache[widthCacheSize]; |
137 | 137 | ||
138 | QFontX11Data(); | 138 | QFontX11Data(); |
139 | ~QFontX11Data(); | 139 | ~QFontX11Data(); |
140 | }; | 140 | }; |
141 | 141 | ||
142 | #endif // Q_WS_X11 | 142 | #endif // Q_WS_X11 |
143 | 143 | ||
144 | 144 | ||
145 | #ifdef Q_WS_WIN | 145 | #ifdef Q_WS_WIN |
146 | 146 | ||
147 | class QFontStruct : public QShared | 147 | class QFontStruct : public QShared |
148 | { | 148 | { |
149 | public: | 149 | public: |
150 | QFontStruct( const QString &key ); | 150 | QFontStruct( const QString &key ); |
151 | ~QFontStruct() { reset(); } | 151 | ~QFontStruct() { reset(); } |
152 | bool dirty() const { return hfont == 0; } | 152 | bool dirty() const { return hfont == 0; } |
153 | HDC dc() const; | 153 | HDC dc() const; |
154 | HFONT font() const { return hfont; } | 154 | HFONT font() const { return hfont; } |
155 | const TEXTMETRICA *textMetricA() const { return &tm.a; } | 155 | const TEXTMETRICA *textMetricA() const { return &tm.a; } |
156 | const TEXTMETRICW *textMetricW() const { return &tm.w; } | 156 | const TEXTMETRICW *textMetricW() const { return &tm.w; } |
157 | QString key() const { return k; } | 157 | QString key() const { return k; } |
158 | void reset(); | 158 | void reset(); |
159 | 159 | ||
160 | QStringk; | 160 | QStringk; |
161 | HDC hdc; | 161 | HDC hdc; |
162 | HFONThfont; | 162 | HFONThfont; |
163 | uintstockFont:1; | 163 | uintstockFont:1; |
164 | uintpaintDevice:1; | 164 | uintpaintDevice:1; |
165 | uint useTextOutA:1; | ||
165 | union { | 166 | union { |
166 | TEXTMETRICWw; | 167 | TEXTMETRICWw; |
167 | TEXTMETRICAa; | 168 | TEXTMETRICAa; |
168 | } tm; | 169 | } tm; |
169 | int lw; | 170 | int lw; |
170 | int cache_cost; | 171 | int cache_cost; |
171 | // friend void QFont::initFontInfo() const; | 172 | // friend void QFont::initFontInfo() const; |
172 | }; | 173 | }; |
173 | 174 | ||
174 | #endif // Q_WS_WIN | 175 | #endif // Q_WS_WIN |
175 | 176 | ||
176 | #if defined( Q_WS_MAC ) | 177 | #if defined( Q_WS_MAC ) |
177 | 178 | ||
178 | #if defined( Q_WS_MACX ) | 179 | #if defined( Q_WS_MACX ) |
179 | # define QMAC_FONT_ATSUI | 180 | # define QMAC_FONT_ATSUI |
180 | #endif | 181 | #endif |
181 | #include "qt_mac.h" | 182 | #include "qt_mac.h" |
182 | class QMacFontInfo; | 183 | class QMacFontInfo; |
183 | 184 | ||
184 | class QFontStruct : public QShared | 185 | class QFontStruct : public QShared |
185 | { | 186 | { |
186 | public: | 187 | public: |
187 | inline QFontStruct() : QShared(), info(NULL), fnum(-1), cache_cost(0), internal_fi(NULL) { } | 188 | inline QFontStruct() : QShared(), info(NULL), fnum(-1), cache_cost(0), internal_fi(NULL) { } |
188 | #if defined( QMAC_FONT_ATSUI ) && 0 | 189 | #if defined( QMAC_FONT_ATSUI ) && 0 |
189 | ATSFontMetrics *info; | 190 | ATSFontMetrics *info; |
190 | int maxWidth() const { return (int)info->maxAdvanceWidth; } | 191 | int maxWidth() const { return (int)info->maxAdvanceWidth; } |
191 | #else | 192 | #else |
192 | FontInfo *info; | 193 | FontInfo *info; |
193 | int maxWidth() const { return info->widMax; } | 194 | int maxWidth() const { return info->widMax; } |
194 | #endif | 195 | #endif |
195 | int ascent() const { return (int)info->ascent; } | 196 | int ascent() const { return (int)info->ascent; } |
196 | int descent() const { return (int)info->descent; } | 197 | int descent() const { return (int)info->descent; } |
197 | int leading() const { return (int)info->leading; } | 198 | int leading() const { return (int)info->leading; } |
198 | int minLeftBearing() const { return 0; } | 199 | int minLeftBearing() const { return 0; } |
199 | int minRightBearing() const { return 0; } | 200 | int minRightBearing() const { return 0; } |
200 | 201 | ||
201 | short fnum; | 202 | short fnum; |
202 | int psize, cache_cost; | 203 | int psize, cache_cost; |
203 | QMacFontInfo *internal_fi; | 204 | QMacFontInfo *internal_fi; |
204 | }; | 205 | }; |
205 | 206 | ||
206 | #endif | 207 | #endif |
207 | 208 | ||
208 | #ifdef Q_WS_QWS | 209 | #ifdef Q_WS_QWS |
209 | class QFontStruct; | 210 | class QFontStruct; |
210 | class QGfx; | 211 | class QGfx; |
211 | #endif | 212 | #endif |
212 | 213 | ||
@@ -368,97 +369,97 @@ public: | |||
368 | #ifndef QT_NO_XFTFREETYPE | 369 | #ifndef QT_NO_XFTFREETYPE |
369 | XftPattern *findXftFont(const QChar &, bool *, double *scale) const; | 370 | XftPattern *findXftFont(const QChar &, bool *, double *scale) const; |
370 | XftPattern *bestXftPattern(const QString &, const QString &, const QChar &, double *scale) const; | 371 | XftPattern *bestXftPattern(const QString &, const QString &, const QChar &, double *scale) const; |
371 | #endif // QT_NO_XFTFREETYPE | 372 | #endif // QT_NO_XFTFREETYPE |
372 | QCString findFont(QFont::Script, bool *, double *) const; | 373 | QCString findFont(QFont::Script, bool *, double *) const; |
373 | QCString bestFamilyMember(QFont::Script, const QString &, const QString &, | 374 | QCString bestFamilyMember(QFont::Script, const QString &, const QString &, |
374 | const QString &, int *, double *) const; | 375 | const QString &, int *, double *) const; |
375 | QCString bestMatch(const char *, int *, QFont::Script, double *) const; | 376 | QCString bestMatch(const char *, int *, QFont::Script, double *) const; |
376 | int fontMatchScore(const char *, QCString &, float *, int *, bool *, | 377 | int fontMatchScore(const char *, QCString &, float *, int *, bool *, |
377 | bool *, QFont::Script, double *) const; | 378 | bool *, QFont::Script, double *) const; |
378 | void initFontInfo(QFont::Script, double scale); | 379 | void initFontInfo(QFont::Script, double scale); |
379 | void load(QFont::Script = QFont::NoScript, bool = TRUE); | 380 | void load(QFont::Script = QFont::NoScript, bool = TRUE); |
380 | bool loadUnicode(QFont::Script, const QChar &); | 381 | bool loadUnicode(QFont::Script, const QChar &); |
381 | void computeLineWidth(); | 382 | void computeLineWidth(); |
382 | 383 | ||
383 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); | 384 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); |
384 | void textExtents( const QString &str, int pos, int len, QCharStruct *overall ); | 385 | void textExtents( const QString &str, int pos, int len, QCharStruct *overall ); |
385 | void drawText( Display *dpy, int screen, Qt::HANDLE hd, Qt::HANDLE rendhd, | 386 | void drawText( Display *dpy, int screen, Qt::HANDLE hd, Qt::HANDLE rendhd, |
386 | GC gc, const QColor &pen, Qt::BGMode, const QColor &bgcolor, | 387 | GC gc, const QColor &pen, Qt::BGMode, const QColor &bgcolor, |
387 | int x, int y, const TextRun *cache, int pdWidth ); | 388 | int x, int y, const TextRun *cache, int pdWidth ); |
388 | bool inFont( const QChar &ch ); | 389 | bool inFont( const QChar &ch ); |
389 | 390 | ||
390 | QFontX11Data x11data; | 391 | QFontX11Data x11data; |
391 | static QFont::Script defaultScript; | 392 | static QFont::Script defaultScript; |
392 | int x11Screen; | 393 | int x11Screen; |
393 | #endif // Q_WS_X11 | 394 | #endif // Q_WS_X11 |
394 | 395 | ||
395 | QPaintDevice *paintdevice; | 396 | QPaintDevice *paintdevice; |
396 | 397 | ||
397 | #ifdef Q_WS_WIN | 398 | #ifdef Q_WS_WIN |
398 | void load(); | 399 | void load(); |
399 | void initFontInfo(); | 400 | void initFontInfo(); |
400 | HFONT create( bool *stockFont, HDC hdc = 0, bool compatMode = FALSE ); | 401 | HFONT create( bool *stockFont, HDC hdc = 0, bool compatMode = FALSE ); |
401 | QFontStruct *fin; | 402 | QFontStruct *fin; |
402 | 403 | ||
403 | void buildCache( HDC hdc, const QString &str, int pos, int len, TextRun *cache ); | 404 | void buildCache( HDC hdc, const QString &str, int pos, int len, TextRun *cache ); |
404 | void drawText( HDC hdc, int x, int y, TextRun *cache ); | 405 | void drawText( HDC hdc, int x, int y, TextRun *cache ); |
405 | #endif // Q_WS_WIN | 406 | #endif // Q_WS_WIN |
406 | 407 | ||
407 | #ifdef Q_WS_QWS | 408 | #ifdef Q_WS_QWS |
408 | void load(); | 409 | void load(); |
409 | QFontStruct *fin; | 410 | QFontStruct *fin; |
410 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); | 411 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); |
411 | void drawText( QGfx *gfx, int x, int y, const TextRun *cache ); | 412 | void drawText( QGfx *gfx, int x, int y, const TextRun *cache ); |
412 | #endif | 413 | #endif |
413 | 414 | ||
414 | #if defined( Q_WS_MAC ) | 415 | #if defined( Q_WS_MAC ) |
415 | void macSetFont(QPaintDevice *); | 416 | void macSetFont(QPaintDevice *); |
416 | void drawText(int x, int y, QString s, int len, QPaintDevice *dev, const QRegion *rgn); | 417 | void drawText(int x, int y, const QString &s, int from, int len, QPaintDevice *dev, const QRegion *rgn, int dir); |
417 | void computeLineWidth(); | 418 | void computeLineWidth(); |
418 | void load(); | 419 | void load(); |
419 | QFontStruct *fin; | 420 | QFontStruct *fin; |
420 | #endif | 421 | #endif |
421 | 422 | ||
422 | }; | 423 | }; |
423 | 424 | ||
424 | inline QFontPrivate::QFontPrivate() | 425 | inline QFontPrivate::QFontPrivate() |
425 | : QShared(), exactMatch(FALSE), lineWidth(1) | 426 | : QShared(), exactMatch(FALSE), lineWidth(1) |
426 | { | 427 | { |
427 | 428 | ||
428 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) | 429 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) |
429 | fin = 0; | 430 | fin = 0; |
430 | #endif // Q_WS_WIN || Q_WS_QWS | 431 | #endif // Q_WS_WIN || Q_WS_QWS |
431 | #if defined(Q_WS_X11) | 432 | #if defined(Q_WS_X11) |
432 | x11Screen = QPaintDevice::x11AppScreen(); | 433 | x11Screen = QPaintDevice::x11AppScreen(); |
433 | #endif // Q_WS_X11 | 434 | #endif // Q_WS_X11 |
434 | paintdevice = 0; | 435 | paintdevice = 0; |
435 | } | 436 | } |
436 | 437 | ||
437 | inline QFontPrivate::QFontPrivate(const QFontPrivate &fp) | 438 | inline QFontPrivate::QFontPrivate(const QFontPrivate &fp) |
438 | : QShared(), request(fp.request), actual(fp.actual), | 439 | : QShared(), request(fp.request), actual(fp.actual), |
439 | exactMatch(fp.exactMatch), lineWidth(1) | 440 | exactMatch(fp.exactMatch), lineWidth(1) |
440 | { | 441 | { |
441 | Q_ASSERT(!fp.paintdevice); | 442 | Q_ASSERT(!fp.paintdevice); |
442 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) | 443 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) |
443 | fin = 0; | 444 | fin = 0; |
444 | #endif // Q_WS_WIN || Q_WS_QWS | 445 | #endif // Q_WS_WIN || Q_WS_QWS |
445 | #if defined(Q_WS_X11) | 446 | #if defined(Q_WS_X11) |
446 | x11Screen = fp.x11Screen; | 447 | x11Screen = fp.x11Screen; |
447 | #endif // Q_WS_X11 | 448 | #endif // Q_WS_X11 |
448 | paintdevice = 0; | 449 | paintdevice = 0; |
449 | } | 450 | } |
450 | 451 | ||
451 | inline QFontPrivate::QFontPrivate( const QFontPrivate &fp, QPaintDevice *pd ) | 452 | inline QFontPrivate::QFontPrivate( const QFontPrivate &fp, QPaintDevice *pd ) |
452 | : QShared(), request(fp.request), actual(fp.actual), | 453 | : QShared(), request(fp.request), actual(fp.actual), |
453 | exactMatch(fp.exactMatch), lineWidth(1) | 454 | exactMatch(fp.exactMatch), lineWidth(1) |
454 | { | 455 | { |
455 | 456 | ||
456 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) | 457 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) |
457 | fin = 0; | 458 | fin = 0; |
458 | #endif // Q_WS_WIN || Q_WS_QWS | 459 | #endif // Q_WS_WIN || Q_WS_QWS |
459 | #if defined(Q_WS_X11) | 460 | #if defined(Q_WS_X11) |
460 | x11Screen = pd->x11Screen(); | 461 | x11Screen = pd->x11Screen(); |
461 | #endif // Q_WS_X11 | 462 | #endif // Q_WS_X11 |
462 | paintdevice = pd; | 463 | paintdevice = pd; |
463 | } | 464 | } |
464 | 465 | ||
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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of Qt/Embedded Graphics Driver Interface | 4 | ** Definition of Qt/Embedded Graphics Driver Interface |
5 | ** | 5 | ** |
6 | ** Created : 20020211 | 6 | ** Created : 20020211 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 10 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed and/or modified under the terms of the | 12 | ** This file may be distributed and/or modified under the terms of the |
13 | ** GNU General Public License version 2 as published by the Free Software | 13 | ** GNU General Public License version 2 as published by the Free Software |
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | 14 | ** Foundation and appearing in the file LICENSE.GPL included in the |
15 | ** packaging of this file. | 15 | ** packaging of this file. |
16 | ** | 16 | ** |
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
18 | ** licenses for Qt/Embedded may use this file in accordance with the | 18 | ** licenses for Qt/Embedded may use this file in accordance with the |
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | 19 | ** Qt Embedded Commercial License Agreement provided with the Software. |
20 | ** | 20 | ** |
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
23 | ** | 23 | ** |
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
25 | ** information about Qt Commercial License Agreements. | 25 | ** information about Qt Commercial License Agreements. |
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
27 | ** | 27 | ** |
28 | ** Contact info@trolltech.com if any conditions of this licensing are | 28 | ** Contact info@trolltech.com if any conditions of this licensing are |
29 | ** not clear to you. | 29 | ** not clear to you. |
30 | ** | 30 | ** |
31 | **********************************************************************/ | 31 | **********************************************************************/ |
32 | 32 | ||
33 | #ifndef QGFXDRIVERINTERFACE_H | 33 | #ifndef QGFXDRIVERINTERFACE_P_H |
34 | #define QGFXDRIVERINTERFACE_H | 34 | #define QGFXDRIVERINTERFACE_P_H |
35 | |||
36 | // | ||
37 | // W A R N I N G | ||
38 | // ------------- | ||
39 | // | ||
40 | // This file is not part of the Qt API. This header file may | ||
41 | // change from version to version without notice, or even be | ||
42 | // removed. | ||
43 | // | ||
44 | // We mean it. | ||
45 | // | ||
46 | // | ||
35 | 47 | ||
36 | #ifndef QT_H | 48 | #ifndef QT_H |
37 | #include <private/qcom_p.h> | 49 | #include <private/qcom_p.h> |
38 | #endif // QT_H | 50 | #endif // QT_H |
39 | 51 | ||
40 | #ifndef QT_NO_COMPONENT | 52 | #ifndef QT_NO_COMPONENT |
41 | 53 | ||
42 | // {449EC6C6-DF3E-43E3-9E57-354A3D05AB34} | 54 | // {449EC6C6-DF3E-43E3-9E57-354A3D05AB34} |
43 | #ifndef IID_QGfxDriver | 55 | #ifndef IID_QGfxDriver |
44 | #define IID_QGfxDriver QUuid( 0x449ec6c6, 0xdf3e, 0x43e3, 0x9e, 0x57, 0x35, 0x4a, 0x3d, 0x05, 0xab, 0x34) | 56 | #define IID_QGfxDriver QUuid( 0x449ec6c6, 0xdf3e, 0x43e3, 0x9e, 0x57, 0x35, 0x4a, 0x3d, 0x05, 0xab, 0x34) |
45 | #endif | 57 | #endif |
46 | 58 | ||
47 | class QScreen; | 59 | class QScreen; |
48 | 60 | ||
49 | struct Q_EXPORT QGfxDriverInterface : public QFeatureListInterface | 61 | struct Q_EXPORT QGfxDriverInterface : public QFeatureListInterface |
50 | { | 62 | { |
51 | virtual QScreen* create( const QString& driver, int displayId ) = 0; | 63 | virtual QScreen* create( const QString& driver, int displayId ) = 0; |
52 | }; | 64 | }; |
53 | 65 | ||
54 | #endif // QT_NO_COMPONENT | 66 | #endif // QT_NO_COMPONENT |
55 | 67 | ||
56 | #endif // QGFXDRIVERINTERFACE_H | 68 | #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 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QGPluginManager class | 4 | ** Definition of QGPluginManager class |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | 8 | ** This file is part of the tools module of the Qt GUI Toolkit. |
9 | ** | 9 | ** |
10 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
11 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
12 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
15 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
17 | ** packaging of this file. | 17 | ** packaging of this file. |
18 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
20 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
21 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
22 | ** | 22 | ** |
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
25 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
27 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 30 | ** |
31 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
32 | ** not clear to you. | 32 | ** not clear to you. |
33 | ** | 33 | ** |
34 | **********************************************************************/ | 34 | **********************************************************************/ |
35 | 35 | ||
36 | #ifndef QGPLUGINMANAGER_H | 36 | #ifndef QGPLUGINMANAGER_P_H |
37 | #define QGPLUGINMANAGER_H | 37 | #define QGPLUGINMANAGER_P_H |
38 | 38 | ||
39 | #ifndef QT_H | 39 | #ifndef QT_H |
40 | #include "qdict.h" | 40 | #include "qdict.h" |
41 | #include "qlibrary.h" | 41 | #include "qlibrary.h" |
42 | #include "quuid.h" | 42 | #include "quuid.h" |
43 | #include "qstringlist.h" | 43 | #include "qstringlist.h" |
44 | #include "qcom_p.h" | 44 | #include "qcom_p.h" |
45 | #endif // QT_H | 45 | #endif // QT_H |
46 | 46 | ||
47 | // | 47 | // |
48 | // W A R N I N G | 48 | // W A R N I N G |
49 | // ------------- | 49 | // ------------- |
50 | // | 50 | // |
51 | // This file is not part of the Qt API. It exists for the convenience | 51 | // This file is not part of the Qt API. It exists for the convenience |
52 | // of a number of Qt sources files. This header file may change from | 52 | // of a number of Qt sources files. This header file may change from |
53 | // version to version without notice, or even be removed. | 53 | // version to version without notice, or even be removed. |
54 | // | 54 | // |
55 | // We mean it. | 55 | // We mean it. |
56 | // | 56 | // |
57 | // | 57 | // |
58 | 58 | ||
59 | #ifndef QT_NO_COMPONENT | 59 | #ifndef QT_NO_COMPONENT |
60 | 60 | ||
61 | #if defined(Q_TEMPLATEDLL) | 61 | #if defined(Q_TEMPLATEDLL) |
62 | // MOC_SKIP_BEGIN | 62 | // MOC_SKIP_BEGIN |
63 | Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QLibrary>; | 63 | Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QLibrary>; |
64 | // MOC_SKIP_END | 64 | // MOC_SKIP_END |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | class Q_EXPORT QGPluginManager | 67 | class Q_EXPORT QGPluginManager |
68 | { | 68 | { |
69 | public: | 69 | public: |
70 | QGPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE ); | 70 | QGPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE ); |
71 | ~QGPluginManager(); | 71 | ~QGPluginManager(); |
72 | 72 | ||
73 | void addLibraryPath( const QString& path ); | 73 | void addLibraryPath( const QString& path ); |
74 | const QLibrary* library( const QString& feature ) const; | 74 | const QLibrary* library( const QString& feature ) const; |
75 | QStringList featureList() const; | 75 | QStringList featureList() const; |
76 | 76 | ||
77 | bool autoUnload() const; | 77 | bool autoUnload() const; |
78 | void setAutoUnload( bool ); | 78 | void setAutoUnload( bool ); |
79 | 79 | ||
80 | protected: | 80 | protected: |
81 | bool enabled() const; | 81 | bool enabled() const; |
82 | bool addLibrary( QLibrary* plugin ); | 82 | bool addLibrary( QLibrary* plugin ); |
83 | 83 | ||
84 | QRESULT queryUnknownInterface(const QString& feature, QUnknownInterface** iface) const; | 84 | QRESULT queryUnknownInterface(const QString& feature, QUnknownInterface** iface) const; |
85 | 85 | ||
86 | QUuid interfaceId; | 86 | QUuid interfaceId; |
87 | QDict<QLibrary> plugDict; // Dict to match feature with library | 87 | QDict<QLibrary> plugDict; // Dict to match feature with library |
88 | QDict<QLibrary> libDict; // Dict to match library file with library | 88 | QDict<QLibrary> libDict; // Dict to match library file with library |
89 | QStringList libList; | 89 | QStringList libList; |
90 | 90 | ||
91 | uint casesens : 1; | 91 | uint casesens : 1; |
92 | uint autounload : 1; | 92 | uint autounload : 1; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | inline void QGPluginManager::setAutoUnload( bool unload ) | 95 | inline void QGPluginManager::setAutoUnload( bool unload ) |
96 | { | 96 | { |
97 | autounload = unload; | 97 | autounload = unload; |
98 | } | 98 | } |
99 | 99 | ||
100 | inline bool QGPluginManager::autoUnload() const | 100 | inline bool QGPluginManager::autoUnload() const |
101 | { | 101 | { |
102 | return autounload; | 102 | return autounload; |
103 | } | 103 | } |
104 | 104 | ||
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #endif //QGPLUGINMANAGER_H | 107 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of ??? | 4 | ** ... |
5 | ** | 5 | ** |
6 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 8 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
9 | ** | 9 | ** |
10 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
11 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
12 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
15 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
17 | ** packaging of this file. | 17 | ** packaging of this file. |
18 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
20 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
21 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
22 | ** | 22 | ** |
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
25 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
27 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 30 | ** |
31 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
32 | ** not clear to you. | 32 | ** not clear to you. |
33 | ** | 33 | ** |
34 | **********************************************************************/ | 34 | **********************************************************************/ |
35 | 35 | ||
36 | #ifndef QIMAGEFORMATINTERFACE_H | 36 | #ifndef QIMAGEFORMATINTERFACE_P_H |
37 | #define QIMAGEFORMATINTERFACE_H | 37 | #define QIMAGEFORMATINTERFACE_P_H |
38 | 38 | ||
39 | #ifndef QT_H | 39 | #ifndef QT_H |
40 | #include <private/qcom_p.h> | 40 | #include <private/qcom_p.h> |
41 | #endif // QT_H | 41 | #endif // QT_H |
42 | 42 | ||
43 | 43 | ||
44 | // | 44 | // |
45 | // W A R N I N G | 45 | // W A R N I N G |
46 | // ------------- | 46 | // ------------- |
47 | // | 47 | // |
48 | // This file is not part of the Qt API. It exists for the convenience | 48 | // This file is not part of the Qt API. It exists for the convenience |
49 | // of internal files. This header file may change from version to version | 49 | // of internal files. This header file may change from version to version |
50 | // without notice, or even be removed. | 50 | // without notice, or even be removed. |
51 | // | 51 | // |
52 | // We mean it. | 52 | // We mean it. |
53 | // | 53 | // |
54 | // | 54 | // |
55 | 55 | ||
56 | #ifndef QT_NO_COMPONENT | 56 | #ifndef QT_NO_COMPONENT |
57 | 57 | ||
58 | // {04903F05-54B1-4726-A849-FB5CB097CA87} | 58 | // {04903F05-54B1-4726-A849-FB5CB097CA87} |
59 | #ifndef IID_QImageFormat | 59 | #ifndef IID_QImageFormat |
60 | #define IID_QImageFormat QUuid( 0x04903f05, 0x54b1, 0x4726, 0xa8, 0x49, 0xfb, 0x5c, 0xb0, 0x97, 0xca, 0x87 ) | 60 | #define IID_QImageFormat QUuid( 0x04903f05, 0x54b1, 0x4726, 0xa8, 0x49, 0xfb, 0x5c, 0xb0, 0x97, 0xca, 0x87 ) |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | class QImage; | 63 | class QImage; |
64 | 64 | ||
65 | struct Q_EXPORT QImageFormatInterface : public QFeatureListInterface | 65 | struct Q_EXPORT QImageFormatInterface : public QFeatureListInterface |
66 | { | 66 | { |
67 | virtual QRESULT loadImage( const QString &format, const QString &filename, QImage * ) = 0; | 67 | virtual QRESULT loadImage( const QString &format, const QString &filename, QImage * ) = 0; |
68 | virtual QRESULT saveImage( const QString &format, const QString &filename, const QImage & ) = 0; | 68 | virtual QRESULT saveImage( const QString &format, const QString &filename, const QImage & ) = 0; |
69 | 69 | ||
70 | virtual QRESULT installIOHandler( const QString & ) = 0; | 70 | virtual QRESULT installIOHandler( const QString & ) = 0; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #endif // QT_NO_COMPONENT | 73 | #endif // QT_NO_COMPONENT |
74 | 74 | ||
75 | #endif // QIMAGEFORMATINTERFACE_H | 75 | #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 @@ | |||
42 | // ------------- | 42 | // ------------- |
43 | // | 43 | // |
44 | // This file is not part of the Qt API. It exists for the convenience | 44 | // This file is not part of the Qt API. It exists for the convenience |
45 | // of internal files. This header file may change from version to version | 45 | // of internal files. This header file may change from version to version |
46 | // without notice, or even be removed. | 46 | // without notice, or even be removed. |
47 | // | 47 | // |
48 | // We mean it. | 48 | // We mean it. |
49 | // | 49 | // |
50 | // | 50 | // |
51 | 51 | ||
52 | #include <qglobal.h> | 52 | #include <qglobal.h> |
53 | 53 | ||
54 | class QKeyEvent; | 54 | class QKeyEvent; |
55 | class QWidget; | 55 | class QWidget; |
56 | class QFont; | 56 | class QFont; |
57 | class QString; | 57 | class QString; |
58 | 58 | ||
59 | 59 | ||
60 | #ifdef Q_WS_X11 | 60 | #ifdef Q_WS_X11 |
61 | #include "qarray.h" | 61 | #include "qarray.h" |
62 | #include "qwindowdefs.h" | 62 | #include "qwindowdefs.h" |
63 | #include "qt_x11.h" | 63 | #include "qt_x11.h" |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #ifdef Q_WS_WIN | 66 | #ifdef Q_WS_WIN |
67 | #include <qt_windows.h> | 67 | #include <qt_windows.h> |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #ifdef Q_WS_QWS | 70 | #ifdef Q_WS_QWS |
71 | class QWSIMEvent; | 71 | class QWSIMEvent; |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | class QInputContext | 74 | class QInputContext |
75 | { | 75 | { |
76 | public: | 76 | public: |
77 | #ifdef Q_WS_X11 | 77 | #ifdef Q_WS_X11 |
78 | QInputContext(QWidget *); // should be a toplevel widget | 78 | QInputContext(QWidget *); // should be a toplevel widget |
79 | ~QInputContext(); | 79 | ~QInputContext(); |
80 | 80 | ||
81 | void setFocus(); | 81 | void setFocus(); |
82 | void setComposePosition(int, int); | 82 | void setComposePosition(int, int); |
83 | void setComposeArea(int, int, int, int); | 83 | void setComposeArea(int, int, int, int); |
84 | void reset(); | 84 | void reset(); |
85 | 85 | ||
86 | int lookupString(XKeyEvent *, QCString &, KeySym *, Status *) const; | 86 | int lookupString(XKeyEvent *, QCString &, KeySym *, Status *) const; |
87 | void setXFontSet(const QFont &); | 87 | void setXFontSet(const QFont &); |
88 | 88 | ||
89 | void *ic; | 89 | void *ic; |
90 | QString text, lastcompose; | 90 | QString text; |
91 | QWidget *focusWidget; | 91 | QWidget *focusWidget; |
92 | bool composing; | 92 | bool composing; |
93 | QFont font; | 93 | QFont font; |
94 | XFontSet fontset; | 94 | XFontSet fontset; |
95 | QMemArray<bool> selectedChars; | 95 | QMemArray<bool> selectedChars; |
96 | #endif // Q_WS_X11 | 96 | #endif // Q_WS_X11 |
97 | 97 | ||
98 | #ifdef Q_WS_QWS | 98 | #ifdef Q_WS_QWS |
99 | static void translateIMEvent( QWSIMEvent *, QWidget * ); | 99 | static void translateIMEvent( QWSIMEvent *, QWidget * ); |
100 | static void reset(); | 100 | static void reset(); |
101 | private: | 101 | private: |
102 | static QWidget* focusWidget; | 102 | static QWidget* focusWidget; |
103 | static QString* composition; | 103 | static QString* composition; |
104 | #endif //Q_WS_QWS | 104 | #endif //Q_WS_QWS |
105 | 105 | ||
106 | #ifdef Q_WS_WIN | 106 | #ifdef Q_WS_WIN |
107 | static void init(); | 107 | static void init(); |
108 | static void shutdown(); | 108 | static void shutdown(); |
109 | 109 | ||
110 | static void TranslateMessage( const MSG *msg); | 110 | static void TranslateMessage( const MSG *msg); |
111 | static LRESULT DefWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); | 111 | static LRESULT DefWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); |
112 | 112 | ||
113 | static void setFont( const QWidget *w, const QFont & ); | 113 | static void setFont( const QWidget *w, const QFont & ); |
114 | static void setFocusHint( int x, int y, int w, int h, const QWidget *widget ); | 114 | static void setFocusHint( int x, int y, int w, int h, const QWidget *widget ); |
115 | static bool startComposition(); | 115 | static bool startComposition(); |
116 | static bool endComposition( QWidget *fw = 0 ); | 116 | static bool endComposition( QWidget *fw = 0 ); |
117 | static bool composition( LPARAM lparam ); | 117 | static bool composition( LPARAM lparam ); |
118 | |||
119 | static void accept( QWidget *fw = 0 ); | ||
120 | static void enable( bool ); | ||
118 | #endif | 121 | #endif |
119 | }; | 122 | }; |
120 | 123 | ||
121 | #endif // QINPUTCONTEXT_P_H | 124 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of Qt/Embedded Keyboard Driver Interface | 4 | ** Definition of Qt/Embedded Keyboard Driver Interface |
5 | ** | 5 | ** |
6 | ** Created : 20020218 | 6 | ** Created : 20020218 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 10 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed and/or modified under the terms of the | 12 | ** This file may be distributed and/or modified under the terms of the |
13 | ** GNU General Public License version 2 as published by the Free Software | 13 | ** GNU General Public License version 2 as published by the Free Software |
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | 14 | ** Foundation and appearing in the file LICENSE.GPL included in the |
15 | ** packaging of this file. | 15 | ** packaging of this file. |
16 | ** | 16 | ** |
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
18 | ** licenses for Qt/Embedded may use this file in accordance with the | 18 | ** licenses for Qt/Embedded may use this file in accordance with the |
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | 19 | ** Qt Embedded Commercial License Agreement provided with the Software. |
20 | ** | 20 | ** |
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
23 | ** | 23 | ** |
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
25 | ** information about Qt Commercial License Agreements. | 25 | ** information about Qt Commercial License Agreements. |
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
27 | ** | 27 | ** |
28 | ** Contact info@trolltech.com if any conditions of this licensing are | 28 | ** Contact info@trolltech.com if any conditions of this licensing are |
29 | ** not clear to you. | 29 | ** not clear to you. |
30 | ** | 30 | ** |
31 | **********************************************************************/ | 31 | **********************************************************************/ |
32 | 32 | ||
33 | #ifndef QKBDDRIVERINTERFACE_H | 33 | #ifndef QKBDDRIVERINTERFACE_P_H |
34 | #define QKBDDRIVERINTERFACE_H | 34 | #define QKBDDRIVERINTERFACE_P_H |
35 | |||
36 | // | ||
37 | // W A R N I N G | ||
38 | // ------------- | ||
39 | // | ||
40 | // This file is not part of the Qt API. This header file may | ||
41 | // change from version to version without notice, or even be | ||
42 | // removed. | ||
43 | // | ||
44 | // We mean it. | ||
45 | // | ||
46 | // | ||
35 | 47 | ||
36 | #ifndef QT_H | 48 | #ifndef QT_H |
37 | #include <private/qcom_p.h> | 49 | #include <private/qcom_p.h> |
38 | #endif // QT_H | 50 | #endif // QT_H |
39 | 51 | ||
40 | #ifndef QT_NO_COMPONENT | 52 | #ifndef QT_NO_COMPONENT |
41 | 53 | ||
42 | // {C7C838EA-FC3E-4905-92AD-F479E81F1D02} | 54 | // {C7C838EA-FC3E-4905-92AD-F479E81F1D02} |
43 | #ifndef IID_QKbdDriver | 55 | #ifndef IID_QKbdDriver |
44 | #define IID_QKbdDriver QUuid( 0xc7c838ea, 0xfc3e, 0x4905, 0x92, 0xad, 0xf4, 0x79, 0xe8, 0x1f, 0x1d, 0x02) | 56 | #define IID_QKbdDriver QUuid( 0xc7c838ea, 0xfc3e, 0x4905, 0x92, 0xad, 0xf4, 0x79, 0xe8, 0x1f, 0x1d, 0x02) |
45 | #endif | 57 | #endif |
46 | 58 | ||
47 | class QWSKeyboardHandler; | 59 | class QWSKeyboardHandler; |
48 | 60 | ||
49 | struct Q_EXPORT QKbdDriverInterface : public QFeatureListInterface | 61 | struct Q_EXPORT QKbdDriverInterface : public QFeatureListInterface |
50 | { | 62 | { |
51 | virtual QWSKeyboardHandler* create( const QString& driver, const QString& device ) = 0; | 63 | virtual QWSKeyboardHandler* create( const QString& driver, const QString& device ) = 0; |
52 | }; | 64 | }; |
53 | 65 | ||
54 | #endif // QT_NO_COMPONENT | 66 | #endif // QT_NO_COMPONENT |
55 | 67 | ||
56 | #endif // QKBDDRIVERINTERFACE_H | 68 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of an internal QLibrary class | 4 | ** Definition of an internal QLibrary class |
5 | ** | 5 | ** |
6 | ** Created : 2000-01-01 | 6 | ** Created : 000101 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QLIBRARY_P_H | 38 | #ifndef QLIBRARY_P_H |
39 | #define QLIBRARY_P_H | 39 | #define QLIBRARY_P_H |
40 | 40 | ||
41 | // | 41 | // |
42 | // W A R N I N G | 42 | // W A R N I N G |
43 | // ------------- | 43 | // ------------- |
44 | // | 44 | // |
45 | // This file is not part of the Qt API. It exists for the convenience | 45 | // This file is not part of the Qt API. It exists for the convenience |
46 | // of the QLibrary class. This header file may change from | 46 | // of the QLibrary class. This header file may change from |
47 | // version to version without notice, or even be removed. | 47 | // version to version without notice, or even be removed. |
48 | // | 48 | // |
49 | // We mean it. | 49 | // We mean it. |
50 | // | 50 | // |
51 | // | 51 | // |
52 | 52 | ||
53 | #include "qlibrary.h" | 53 | #include "qlibrary.h" |
54 | 54 | ||
55 | #ifndef QT_NO_LIBRARY | 55 | #ifndef QT_NO_LIBRARY |
56 | 56 | ||
57 | #ifndef QT_H | 57 | #ifndef QT_H |
58 | #if defined(Q_CC_GNU) | ||
59 | #warning "avoid including header file \"qwindowdefs.h\" in directory 'tools'" | ||
60 | #endif | ||
61 | #include "qwindowdefs.h" | 58 | #include "qwindowdefs.h" |
62 | #endif // QT_H | 59 | #endif // QT_H |
63 | 60 | ||
64 | class QLibraryPrivate | 61 | class QLibraryPrivate |
65 | { | 62 | { |
66 | public: | 63 | public: |
67 | QLibraryPrivate( QLibrary *lib ); | 64 | QLibraryPrivate( QLibrary *lib ); |
68 | 65 | ||
69 | #ifdef Q_WS_WIN | 66 | #ifdef Q_WS_WIN |
70 | HINSTANCE pHnd; | 67 | HINSTANCE pHnd; |
71 | #else | 68 | #else |
72 | void *pHnd; | 69 | void *pHnd; |
73 | #endif | 70 | #endif |
74 | 71 | ||
75 | bool loadLibrary(); | 72 | bool loadLibrary(); |
76 | bool freeLibrary(); | 73 | bool freeLibrary(); |
77 | void *resolveSymbol( const char * ); | 74 | void *resolveSymbol( const char * ); |
78 | 75 | ||
79 | private: | 76 | private: |
80 | QLibrary *library; | 77 | QLibrary *library; |
81 | }; | 78 | }; |
82 | 79 | ||
83 | #endif // QT_NO_LIBRARY | 80 | #endif // QT_NO_LIBRARY |
84 | #endif // QLIBRARY_P_H | 81 | #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 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QLock class. This manages interprocess locking | ||
5 | ** | ||
6 | ** Created : 20000406 | ||
7 | ** | ||
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed and/or modified under the terms of the | ||
13 | ** GNU General Public License version 2 as published by the Free Software | ||
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
15 | ** packaging of this file. | ||
16 | ** | ||
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
18 | ** licenses for Qt/Embedded may use this file in accordance with the | ||
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | ||
20 | ** | ||
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
23 | ** | ||
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
25 | ** information about Qt Commercial License Agreements. | ||
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
27 | ** | ||
28 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
29 | ** not clear to you. | ||
30 | ** | ||
31 | **********************************************************************/ | ||
32 | |||
33 | #ifndef QLOCK_P_H | ||
34 | #define QLOCK_P_H | ||
35 | |||
36 | // | ||
37 | // W A R N I N G | ||
38 | // ------------- | ||
39 | // | ||
40 | // This file is not part of the Qt API. This header file may | ||
41 | // change from version to version without notice, or even be | ||
42 | // removed. | ||
43 | // | ||
44 | // We mean it. | ||
45 | // | ||
46 | // | ||
47 | |||
48 | #ifndef QT_H | ||
49 | #include <qstring.h> | ||
50 | #endif // QT_H | ||
51 | |||
52 | class QLockData; | ||
53 | |||
54 | class QLock | ||
55 | { | ||
56 | public: | ||
57 | QLock( const QString &filename, char id, bool create = FALSE ); | ||
58 | ~QLock(); | ||
59 | |||
60 | enum Type { Read, Write }; | ||
61 | |||
62 | bool isValid() const; | ||
63 | void lock( Type type ); | ||
64 | void unlock(); | ||
65 | bool locked() const; | ||
66 | |||
67 | private: | ||
68 | Type type; | ||
69 | QLockData *data; | ||
70 | }; | ||
71 | |||
72 | |||
73 | // Nice class for ensuring the lock is released. | ||
74 | // Just create one on the stack and the lock is automatically released | ||
75 | // when QLockHolder is destructed. | ||
76 | class QLockHolder | ||
77 | { | ||
78 | public: | ||
79 | QLockHolder( QLock *l, QLock::Type type ) : qlock(l) { | ||
80 | qlock->lock( type ); | ||
81 | } | ||
82 | ~QLockHolder() { if ( locked() ) qlock->unlock(); } | ||
83 | |||
84 | void lock( QLock::Type type ) { qlock->lock( type ); } | ||
85 | void unlock() { qlock->unlock(); } | ||
86 | bool locked() const { return qlock->locked(); } | ||
87 | |||
88 | private: | ||
89 | QLock *qlock; | ||
90 | }; | ||
91 | |||
92 | #endif | ||
93 | |||
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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of Qt/Embedded Mouse Driver Interface | 4 | ** Definition of Qt/Embedded Mouse Driver Interface |
5 | ** | 5 | ** |
6 | ** Created : 20020220 | 6 | ** Created : 20020220 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 10 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed and/or modified under the terms of the | 12 | ** This file may be distributed and/or modified under the terms of the |
13 | ** GNU General Public License version 2 as published by the Free Software | 13 | ** GNU General Public License version 2 as published by the Free Software |
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | 14 | ** Foundation and appearing in the file LICENSE.GPL included in the |
15 | ** packaging of this file. | 15 | ** packaging of this file. |
16 | ** | 16 | ** |
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
18 | ** licenses for Qt/Embedded may use this file in accordance with the | 18 | ** licenses for Qt/Embedded may use this file in accordance with the |
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | 19 | ** Qt Embedded Commercial License Agreement provided with the Software. |
20 | ** | 20 | ** |
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
23 | ** | 23 | ** |
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
25 | ** information about Qt Commercial License Agreements. | 25 | ** information about Qt Commercial License Agreements. |
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
27 | ** | 27 | ** |
28 | ** Contact info@trolltech.com if any conditions of this licensing are | 28 | ** Contact info@trolltech.com if any conditions of this licensing are |
29 | ** not clear to you. | 29 | ** not clear to you. |
30 | ** | 30 | ** |
31 | **********************************************************************/ | 31 | **********************************************************************/ |
32 | 32 | ||
33 | #ifndef QMOUSEDRIVERINTERFACE_H | 33 | #ifndef QMOUSEDRIVERINTERFACE_P_H |
34 | #define QMOUSEDRIVERINTERFACE_H | 34 | #define QMOUSEDRIVERINTERFACE_P_H |
35 | |||
36 | // | ||
37 | // W A R N I N G | ||
38 | // ------------- | ||
39 | // | ||
40 | // This file is not part of the Qt API. This header file may | ||
41 | // change from version to version without notice, or even be | ||
42 | // removed. | ||
43 | // | ||
44 | // We mean it. | ||
45 | // | ||
46 | // | ||
35 | 47 | ||
36 | #ifndef QT_H | 48 | #ifndef QT_H |
37 | #include <private/qcom_p.h> | 49 | #include <private/qcom_p.h> |
38 | #endif // QT_H | 50 | #endif // QT_H |
39 | 51 | ||
40 | #ifndef QT_NO_COMPONENT | 52 | #ifndef QT_NO_COMPONENT |
41 | 53 | ||
42 | // {4367CF5A-F7CE-407B-8BB6-DF19AEDA2EBB} | 54 | // {4367CF5A-F7CE-407B-8BB6-DF19AEDA2EBB} |
43 | #ifndef IID_QMouseDriver | 55 | #ifndef IID_QMouseDriver |
44 | #define IID_QMouseDriver QUuid( 0x4367cf5a, 0xf7ce, 0x407b, 0x8b, 0xb6, 0xdf, 0x19, 0xae, 0xda, 0x2e, 0xbb) | 56 | #define IID_QMouseDriver QUuid( 0x4367cf5a, 0xf7ce, 0x407b, 0x8b, 0xb6, 0xdf, 0x19, 0xae, 0xda, 0x2e, 0xbb) |
45 | #endif | 57 | #endif |
46 | 58 | ||
47 | class QWSMouseHandler; | 59 | class QWSMouseHandler; |
48 | 60 | ||
49 | struct Q_EXPORT QMouseDriverInterface : public QFeatureListInterface | 61 | struct Q_EXPORT QMouseDriverInterface : public QFeatureListInterface |
50 | { | 62 | { |
51 | virtual QWSMouseHandler* create( const QString& driver, const QString &device ) = 0; | 63 | virtual QWSMouseHandler* create( const QString& driver, const QString &device ) = 0; |
52 | }; | 64 | }; |
53 | 65 | ||
54 | #endif // QT_NO_COMPONENT | 66 | #endif // QT_NO_COMPONENT |
55 | 67 | ||
56 | #endif // QMOUSEDRIVERINTERFACE_H | 68 | #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 @@ | |||
1 | #ifndef QMUTEXPOOL_H | 1 | /**************************************************************************** |
2 | #define QMUTEXPOOL_H | 2 | ** $Id$ |
3 | ** | ||
4 | ** ... | ||
5 | ** | ||
6 | ** Copyright (C) 2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QMUTEXPOOL_P_H | ||
37 | #define QMUTEXPOOL_P_H | ||
3 | 38 | ||
4 | // | 39 | // |
5 | // W A R N I N G | 40 | // W A R N I N G |
6 | // ------------- | 41 | // ------------- |
7 | // | 42 | // |
8 | // This file is not part of the Qt API. It exists for the convenience | 43 | // This file is not part of the Qt API. It exists for the convenience |
9 | // of QSettings. This header file may change from version to | 44 | // of QSettings. This header file may change from version to |
10 | // version without notice, or even be removed. | 45 | // version without notice, or even be removed. |
11 | // | 46 | // |
12 | // We mean it. | 47 | // We mean it. |
13 | // | 48 | // |
14 | // | 49 | // |
15 | 50 | ||
16 | #ifdef QT_THREAD_SUPPORT | 51 | #ifdef QT_THREAD_SUPPORT |
17 | 52 | ||
18 | #include "qmutex.h" | 53 | #include "qmutex.h" |
19 | #include "qmemarray.h" | 54 | #include "qmemarray.h" |
20 | 55 | ||
21 | class QMutexPool | 56 | class QMutexPool |
22 | { | 57 | { |
23 | public: | 58 | public: |
24 | QMutexPool( bool recursive = FALSE, int size = 17 ); | 59 | QMutexPool( bool recursive = FALSE, int size = 17 ); |
25 | ~QMutexPool(); | 60 | ~QMutexPool(); |
26 | 61 | ||
27 | QMutex *get( void *address ); | 62 | QMutex *get( void *address ); |
28 | 63 | ||
29 | private: | 64 | private: |
30 | QMutex mutex; | 65 | QMutex mutex; |
31 | QMemArray<QMutex*> mutexes; | 66 | QMutex **mutexes; |
67 | int count; | ||
32 | bool recurs; | 68 | bool recurs; |
33 | }; | 69 | }; |
34 | 70 | ||
35 | extern QMutexPool *qt_global_mutexpool; | 71 | extern QMutexPool *qt_global_mutexpool; |
36 | 72 | ||
37 | #endif // QT_THREAD_SUPPORT | 73 | #endif // QT_THREAD_SUPPORT |
38 | 74 | ||
39 | #endif // QMUTEXPOOL_H | 75 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QPluginManager class | 4 | ** Definition of QPluginManager class |
5 | ** | 5 | ** |
6 | ** Created : 2000-01-01 | 6 | ** Created : 000101 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QPLUGINMANAGER_H | 38 | #ifndef QPLUGINMANAGER_P_H |
39 | #define QPLUGINMANAGER_H | 39 | #define QPLUGINMANAGER_P_H |
40 | |||
41 | #ifndef QT_H | ||
42 | #include "qgpluginmanager_p.h" | ||
43 | #endif // QT_H | ||
44 | 40 | ||
45 | // | 41 | // |
46 | // W A R N I N G | 42 | // W A R N I N G |
47 | // ------------- | 43 | // ------------- |
48 | // | 44 | // |
49 | // This file is not part of the Qt API. It exists for the convenience | 45 | // This file is not part of the Qt API. It exists for the convenience |
50 | // of a number of Qt sources files. This header file may change from | 46 | // of a number of Qt sources files. This header file may change from |
51 | // version to version without notice, or even be removed. | 47 | // version to version without notice, or even be removed. |
52 | // | 48 | // |
53 | // We mean it. | 49 | // We mean it. |
54 | // | 50 | // |
55 | // | 51 | // |
56 | 52 | ||
53 | #ifndef QT_H | ||
54 | #include "qgpluginmanager_p.h" | ||
55 | #endif // QT_H | ||
56 | |||
57 | #ifndef QT_NO_COMPONENT | 57 | #ifndef QT_NO_COMPONENT |
58 | 58 | ||
59 | template<class Type> | 59 | template<class Type> |
60 | class QPluginManager : public QGPluginManager | 60 | class QPluginManager : public QGPluginManager |
61 | { | 61 | { |
62 | public: | 62 | public: |
63 | QPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE ) | 63 | QPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE ) |
64 | : QGPluginManager( id, paths, suffix, cs ) {} | 64 | : QGPluginManager( id, paths, suffix, cs ) {} |
65 | QRESULT queryInterface(const QString& feature, Type** iface) const | 65 | QRESULT queryInterface(const QString& feature, Type** iface) const |
66 | { | 66 | { |
67 | return queryUnknownInterface( feature, (QUnknownInterface**)iface ); | 67 | return queryUnknownInterface( feature, (QUnknownInterface**)iface ); |
68 | } | 68 | } |
69 | }; | 69 | }; |
70 | 70 | ||
71 | #endif //QT_NO_COMPONENT | 71 | #endif //QT_NO_COMPONENT |
72 | 72 | ||
73 | #endif //QPLUGINMANAGER_H | 73 | #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 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of internal QPSPrinter class. | 4 | ** Definition of internal QPSPrinter class. |
5 | ** QPSPrinter implements PostScript (tm) output via QPrinter. | 5 | ** QPSPrinter implements PostScript (tm) output via QPrinter. |
6 | ** | 6 | ** |
7 | ** Created : 940927 | 7 | ** Created : 940927 |
8 | ** | 8 | ** |
9 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 9 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
10 | ** | 10 | ** |
11 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 11 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
12 | ** | 12 | ** |
13 | ** This file may be distributed under the terms of the Q Public License | 13 | ** This file may be distributed under the terms of the Q Public License |
14 | ** as defined by Trolltech AS of Norway and appearing in the file | 14 | ** as defined by Trolltech AS of Norway and appearing in the file |
15 | ** LICENSE.QPL included in the packaging of this file. | 15 | ** LICENSE.QPL included in the packaging of this file. |
16 | ** | 16 | ** |
17 | ** This file may be distributed and/or modified under the terms of the | 17 | ** This file may be distributed and/or modified under the terms of the |
18 | ** GNU General Public License version 2 as published by the Free Software | 18 | ** GNU General Public License version 2 as published by the Free Software |
19 | ** Foundation and appearing in the file LICENSE.GPL included in the | 19 | ** Foundation and appearing in the file LICENSE.GPL included in the |
20 | ** packaging of this file. | 20 | ** packaging of this file. |
21 | ** | 21 | ** |
22 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 22 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
23 | ** licenses may use this file in accordance with the Qt Commercial License | 23 | ** licenses may use this file in accordance with the Qt Commercial License |
24 | ** Agreement provided with the Software. | 24 | ** Agreement provided with the Software. |
25 | ** | 25 | ** |
26 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 26 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
27 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 27 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
28 | ** | 28 | ** |
29 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 29 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
30 | ** information about Qt Commercial License Agreements. | 30 | ** information about Qt Commercial License Agreements. |
31 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 31 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
32 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 32 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
33 | ** | 33 | ** |
34 | ** Contact info@trolltech.com if any conditions of this licensing are | 34 | ** Contact info@trolltech.com if any conditions of this licensing are |
35 | ** not clear to you. | 35 | ** not clear to you. |
36 | ** | 36 | ** |
37 | **********************************************************************/ | 37 | **********************************************************************/ |
38 | 38 | ||
39 | #ifndef QPSPRINTER_P_H | 39 | #ifndef QPSPRINTER_P_H |
40 | #define QPSPRINTER_P_H | 40 | #define QPSPRINTER_P_H |
41 | 41 | ||
42 | 42 | ||
43 | // | 43 | // |
44 | // W A R N I N G | 44 | // W A R N I N G |
45 | // ------------- | 45 | // ------------- |
46 | // | 46 | // |
47 | // This file is not part of the Qt API. It exists for the convenience | 47 | // This file is not part of the Qt API. It exists for the convenience |
48 | // of qpsprinter.cpp and qprinter_x11.cpp. | 48 | // of qpsprinter.cpp and qprinter_x11.cpp. |
49 | // This header file may change from version to version without notice, | 49 | // This header file may change from version to version without notice, |
50 | // or even be removed. | 50 | // or even be removed. |
51 | // | 51 | // |
52 | // We mean it. | 52 | // We mean it. |
53 | // | 53 | // |
54 | // | 54 | // |
55 | 55 | ||
56 | 56 | ||
57 | #ifndef QT_H | 57 | #ifndef QT_H |
58 | #include "qprinter.h" | 58 | #include "qprinter.h" |
59 | #include "qtextstream.h" | 59 | #include "qtextstream.h" |
60 | #endif // QT_H | 60 | #endif // QT_H |
61 | 61 | ||
62 | #ifndef QT_NO_PRINTER | 62 | #ifndef QT_NO_PRINTER |
63 | 63 | ||
64 | struct QPSPrinterPrivate; | 64 | class QPSPrinterPrivate; |
65 | 65 | ||
66 | class Q_EXPORT QPSPrinter : public QPaintDevice | 66 | class Q_EXPORT QPSPrinter : public QPaintDevice |
67 | { | 67 | { |
68 | private: | 68 | private: |
69 | // QPrinter uses these | 69 | // QPrinter uses these |
70 | QPSPrinter( QPrinter *, int ); | 70 | QPSPrinter( QPrinter *, int ); |
71 | ~QPSPrinter(); | 71 | ~QPSPrinter(); |
72 | 72 | ||
73 | bool cmd ( int, QPainter *, QPDevCmdParam * ); | 73 | bool cmd ( int, QPainter *, QPDevCmdParam * ); |
74 | 74 | ||
75 | enum { NewPage = 100, AbortPrinting }; | 75 | enum { NewPage = 100, AbortPrinting }; |
76 | 76 | ||
77 | friend class QPrinter; | 77 | friend class QPrinter; |
78 | private: | 78 | private: |
79 | // not used by QPrinter | 79 | // not used by QPrinter |
80 | QPSPrinterPrivate *d; | 80 | QPSPrinterPrivate *d; |
81 | 81 | ||
82 | // Disabled copy constructor and operator= | 82 | // Disabled copy constructor and operator= |
83 | QPSPrinter( const QPSPrinter & ); | 83 | QPSPrinter( const QPSPrinter & ); |
84 | QPSPrinter &operator=( const QPSPrinter & ); | 84 | QPSPrinter &operator=( const QPSPrinter & ); |
85 | }; | 85 | }; |
86 | 86 | ||
87 | #endif // QT_NO_PRINTER | 87 | #endif // QT_NO_PRINTER |
88 | 88 | ||
89 | #endif // QPSPRINTER_P_H | 89 | #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: | |||
111 | uint hasCursor : 1; | 111 | uint hasCursor : 1; |
112 | uint canBreak : 1; | 112 | uint canBreak : 1; |
113 | Type type : 2; | 113 | Type type : 2; |
114 | uint startOfRun : 1; | 114 | uint startOfRun : 1; |
115 | 115 | ||
116 | int x; | 116 | int x; |
117 | int height() const; | 117 | int height() const; |
118 | int ascent() const; | 118 | int ascent() const; |
119 | int descent() const; | 119 | int descent() const; |
120 | bool isCustom() const { return (type & Custom) != 0; } | 120 | bool isCustom() const { return (type & Custom) != 0; } |
121 | QTextFormat *format() const; | 121 | QTextFormat *format() const; |
122 | #ifndef QT_NO_TEXTCUSTOMITEM | 122 | #ifndef QT_NO_TEXTCUSTOMITEM |
123 | QTextCustomItem *customItem() const; | 123 | QTextCustomItem *customItem() const; |
124 | #endif | 124 | #endif |
125 | void setFormat( QTextFormat *f ); | 125 | void setFormat( QTextFormat *f ); |
126 | #ifndef QT_NO_TEXTCUSTOMITEM | 126 | #ifndef QT_NO_TEXTCUSTOMITEM |
127 | void setCustomItem( QTextCustomItem *i ); | 127 | void setCustomItem( QTextCustomItem *i ); |
128 | #endif | 128 | #endif |
129 | struct CustomData | 129 | struct CustomData |
130 | { | 130 | { |
131 | QTextFormat *format; | 131 | QTextFormat *format; |
132 | #ifndef QT_NO_TEXTCUSTOMITEM | 132 | #ifndef QT_NO_TEXTCUSTOMITEM |
133 | QTextCustomItem *custom; | 133 | QTextCustomItem *custom; |
134 | #endif | 134 | #endif |
135 | QString anchorName; | 135 | QString anchorName; |
136 | QString anchorHref; | 136 | QString anchorHref; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | #ifndef QT_NO_TEXTCUSTOMITEM | 139 | #ifndef QT_NO_TEXTCUSTOMITEM |
140 | void loseCustomItem(); | 140 | void loseCustomItem(); |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | union { | 143 | union { |
144 | QTextFormat* format; | 144 | QTextFormat* format; |
145 | CustomData* custom; | 145 | CustomData* custom; |
146 | } d; | 146 | } d; |
147 | 147 | ||
148 | bool isAnchor() const { return ( type & Anchor) != 0; } | 148 | bool isAnchor() const { return ( type & Anchor) != 0; } |
149 | bool isLink() const { return isAnchor() && !!d.custom->anchorHref; } | 149 | bool isLink() const { return isAnchor() && !!d.custom->anchorHref; } |
150 | QString anchorName() const; | 150 | QString anchorName() const; |
151 | QString anchorHref() const; | 151 | QString anchorHref() const; |
152 | void setAnchor( const QString& name, const QString& href ); | 152 | void setAnchor( const QString& name, const QString& href ); |
153 | 153 | ||
154 | private: | 154 | private: |
155 | QTextStringChar &operator=( const QTextStringChar & ) { | 155 | QTextStringChar &operator=( const QTextStringChar & ) { |
156 | //abort(); | 156 | //abort(); |
157 | return *this; | 157 | return *this; |
158 | } | 158 | } |
159 | QTextStringChar( const QTextStringChar & ) { | ||
160 | } | ||
159 | friend class QComplexText; | 161 | friend class QComplexText; |
160 | friend class QTextParagraph; | 162 | friend class QTextParagraph; |
161 | }; | 163 | }; |
162 | 164 | ||
163 | #if defined(Q_TEMPLATEDLL) | 165 | #if defined(Q_TEMPLATEDLL) |
164 | // MOC_SKIP_BEGIN | 166 | // MOC_SKIP_BEGIN |
165 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<QTextStringChar>; | 167 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<QTextStringChar>; |
166 | // MOC_SKIP_END | 168 | // MOC_SKIP_END |
167 | #endif | 169 | #endif |
168 | 170 | ||
169 | class Q_EXPORT QTextString | 171 | class Q_EXPORT QTextString |
170 | { | 172 | { |
171 | public: | 173 | public: |
172 | 174 | ||
173 | QTextString(); | 175 | QTextString(); |
174 | QTextString( const QTextString &s ); | 176 | QTextString( const QTextString &s ); |
175 | virtual ~QTextString(); | 177 | virtual ~QTextString(); |
176 | 178 | ||
177 | static QString toString( const QMemArray<QTextStringChar> &data ); | 179 | static QString toString( const QMemArray<QTextStringChar> &data, bool fixspaces = TRUE ); |
178 | QString toString() const; | 180 | QString toString( bool fixspaces = TRUE ) const; |
179 | 181 | ||
180 | QTextStringChar &at( int i ) const; | 182 | QTextStringChar &at( int i ) const; |
181 | #if defined(Q_STRICT_INLINING_RULES) | 183 | #if defined(Q_STRICT_INLINING_RULES) |
182 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the | 184 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the |
183 | // implementation to be a redefinition. | 185 | // implementation to be a redefinition. |
184 | inline int length() const; | 186 | inline int length() const; |
185 | #else | 187 | #else |
186 | int length() const; | 188 | int length() const; |
187 | #endif | 189 | #endif |
188 | 190 | ||
189 | int width( int idx ) const; | 191 | int width( int idx ) const; |
190 | 192 | ||
191 | void insert( int index, const QString &s, QTextFormat *f ); | 193 | void insert( int index, const QString &s, QTextFormat *f ); |
192 | void insert( int index, const QChar *unicode, int len, QTextFormat *f ); | 194 | void insert( int index, const QChar *unicode, int len, QTextFormat *f ); |
193 | void insert( int index, QTextStringChar *c, bool doAddRefFormat = FALSE ); | 195 | void insert( int index, QTextStringChar *c, bool doAddRefFormat = FALSE ); |
194 | void truncate( int index ); | 196 | void truncate( int index ); |
195 | void remove( int index, int len ); | 197 | void remove( int index, int len ); |
196 | void clear(); | 198 | void clear(); |
197 | 199 | ||
198 | void setFormat( int index, QTextFormat *f, bool useCollection ); | 200 | void setFormat( int index, QTextFormat *f, bool useCollection ); |
199 | 201 | ||
200 | void setBidi( bool b ) { bidi = b; } | 202 | void setBidi( bool b ) { bidi = b; } |
201 | bool isBidi() const; | 203 | bool isBidi() const; |
202 | bool isRightToLeft() const; | 204 | bool isRightToLeft() const; |
203 | QChar::Direction direction() const; | 205 | QChar::Direction direction() const; |
204 | void setDirection( QChar::Direction d ) { dir = d; bidiDirty = TRUE; } | 206 | void setDirection( QChar::Direction d ) { dir = d; bidiDirty = TRUE; } |
205 | 207 | ||
206 | QMemArray<QTextStringChar> subString( int start = 0, int len = 0xFFFFFF ) const; | 208 | QMemArray<QTextStringChar> subString( int start = 0, int len = 0xFFFFFF ) const; |
207 | QMemArray<QTextStringChar> rawData() const { return data.copy(); } | 209 | QMemArray<QTextStringChar> rawData() const { return data.copy(); } |
208 | 210 | ||
209 | void operator=( const QString &s ) { clear(); insert( 0, s, 0 ); } | 211 | void operator=( const QString &s ) { clear(); insert( 0, s, 0 ); } |
210 | void operator+=( const QString &s ) { insert( length(), s, 0 ); } | 212 | void operator+=( const QString &s ) { insert( length(), s, 0 ); } |
211 | void prepend( const QString &s ) { insert( 0, s, 0 ); } | 213 | void prepend( const QString &s ) { insert( 0, s, 0 ); } |
212 | 214 | ||
213 | private: | 215 | private: |
214 | void checkBidi() const; | 216 | void checkBidi() const; |
215 | 217 | ||
216 | QMemArray<QTextStringChar> data; | 218 | QMemArray<QTextStringChar> data; |
217 | uint bidiDirty : 1; | 219 | uint bidiDirty : 1; |
218 | uint bidi : 1; // true when the paragraph has right to left characters | 220 | uint bidi : 1; // true when the paragraph has right to left characters |
219 | uint rightToLeft : 1; | 221 | uint rightToLeft : 1; |
220 | uint dir : 5; | 222 | uint dir : 5; |
221 | }; | 223 | }; |
222 | 224 | ||
223 | inline bool QTextString::isBidi() const | 225 | inline bool QTextString::isBidi() const |
224 | { | 226 | { |
225 | if ( bidiDirty ) | 227 | if ( bidiDirty ) |
226 | checkBidi(); | 228 | checkBidi(); |
@@ -241,137 +243,137 @@ inline QChar::Direction QTextString::direction() const | |||
241 | 243 | ||
242 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 244 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
243 | 245 | ||
244 | #if defined(Q_TEMPLATEDLL) | 246 | #if defined(Q_TEMPLATEDLL) |
245 | // MOC_SKIP_BEGIN | 247 | // MOC_SKIP_BEGIN |
246 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<int>; | 248 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<int>; |
247 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<QTextParagraph*>; | 249 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<QTextParagraph*>; |
248 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<bool>; | 250 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<bool>; |
249 | // MOC_SKIP_END | 251 | // MOC_SKIP_END |
250 | #endif | 252 | #endif |
251 | 253 | ||
252 | class Q_EXPORT QTextCursor | 254 | class Q_EXPORT QTextCursor |
253 | { | 255 | { |
254 | public: | 256 | public: |
255 | QTextCursor( QTextDocument *d = 0 ); | 257 | QTextCursor( QTextDocument *d = 0 ); |
256 | QTextCursor( const QTextCursor &c ); | 258 | QTextCursor( const QTextCursor &c ); |
257 | QTextCursor &operator=( const QTextCursor &c ); | 259 | QTextCursor &operator=( const QTextCursor &c ); |
258 | virtual ~QTextCursor() {} | 260 | virtual ~QTextCursor() {} |
259 | 261 | ||
260 | bool operator==( const QTextCursor &c ) const; | 262 | bool operator==( const QTextCursor &c ) const; |
261 | bool operator!=( const QTextCursor &c ) const { return !(*this == c); } | 263 | bool operator!=( const QTextCursor &c ) const { return !(*this == c); } |
262 | 264 | ||
263 | #if defined(Q_STRICT_INLINING_RULES) | 265 | #if defined(Q_STRICT_INLINING_RULES) |
264 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the | 266 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the |
265 | // implementation to be a redefinition. | 267 | // implementation to be a redefinition. |
266 | inline QTextParagraph *paragraph() const; | 268 | inline QTextParagraph *paragraph() const; |
267 | #else | 269 | #else |
268 | QTextParagraph *paragraph() const; | 270 | QTextParagraph *paragraph() const; |
269 | #endif | 271 | #endif |
270 | 272 | ||
271 | void setParagraph( QTextParagraph*p ) { gotoPosition(p, 0 ); } | 273 | void setParagraph( QTextParagraph*p ) { gotoPosition(p, 0 ); } |
272 | QTextDocument *document() const; | 274 | QTextDocument *document() const; |
273 | int index() const; | 275 | int index() const; |
274 | void setIndex( int index ) { gotoPosition(paragraph(), index ); } | 276 | void setIndex( int index ) { gotoPosition(paragraph(), index ); } |
275 | 277 | ||
276 | void gotoPosition( QTextParagraph* p, int index = 0); | 278 | void gotoPosition( QTextParagraph* p, int index = 0); |
277 | void gotoLeft(); | 279 | void gotoLeft(); |
278 | void gotoRight(); | 280 | void gotoRight(); |
279 | void gotoNextLetter(); | 281 | void gotoNextLetter(); |
280 | void gotoPreviousLetter(); | 282 | void gotoPreviousLetter(); |
281 | void gotoUp(); | 283 | void gotoUp(); |
282 | void gotoDown(); | 284 | void gotoDown(); |
283 | void gotoLineEnd(); | 285 | void gotoLineEnd(); |
284 | void gotoLineStart(); | 286 | void gotoLineStart(); |
285 | void gotoHome(); | 287 | void gotoHome(); |
286 | void gotoEnd(); | 288 | void gotoEnd(); |
287 | void gotoPageUp( int visibleHeight ); | 289 | void gotoPageUp( int visibleHeight ); |
288 | void gotoPageDown( int visibleHeight ); | 290 | void gotoPageDown( int visibleHeight ); |
289 | void gotoNextWord(); | 291 | void gotoNextWord( bool onlySpace = FALSE ); |
290 | void gotoPreviousWord(); | 292 | void gotoPreviousWord( bool onlySpace = FALSE ); |
291 | void gotoWordLeft(); | 293 | void gotoWordLeft(); |
292 | void gotoWordRight(); | 294 | void gotoWordRight(); |
293 | 295 | ||
294 | void insert( const QString &s, bool checkNewLine, QMemArray<QTextStringChar> *formatting = 0 ); | 296 | void insert( const QString &s, bool checkNewLine, QMemArray<QTextStringChar> *formatting = 0 ); |
295 | void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE ); | 297 | void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE ); |
296 | bool remove(); | 298 | bool remove(); |
297 | void indent(); | 299 | void indent(); |
298 | 300 | ||
299 | bool atParagStart(); | 301 | bool atParagStart(); |
300 | bool atParagEnd(); | 302 | bool atParagEnd(); |
301 | 303 | ||
302 | int x() const; // x in current paragraph | 304 | int x() const; // x in current paragraph |
303 | int y() const; // y in current paragraph | 305 | int y() const; // y in current paragraph |
304 | 306 | ||
305 | int globalX() const; | 307 | int globalX() const; |
306 | int globalY() const; | 308 | int globalY() const; |
307 | 309 | ||
308 | QTextParagraph *topParagraph() const { return paras.isEmpty() ? para : paras.first(); } | 310 | QTextParagraph *topParagraph() const { return paras.isEmpty() ? para : paras.first(); } |
309 | int offsetX() const { return ox; } // inner document offset | 311 | int offsetX() const { return ox; } // inner document offset |
310 | int offsetY() const { return oy; } // inner document offset | 312 | int offsetY() const { return oy; } // inner document offset |
311 | int totalOffsetX() const; // total document offset | 313 | int totalOffsetX() const; // total document offset |
312 | int totalOffsetY() const; // total document offset | 314 | int totalOffsetY() const; // total document offset |
313 | 315 | ||
314 | bool place( const QPoint &pos, QTextParagraph *s ) { return place( pos, s, FALSE ); } | 316 | bool place( const QPoint &pos, QTextParagraph *s ) { return place( pos, s, FALSE ); } |
315 | bool place( const QPoint &pos, QTextParagraph *s, bool link ); | 317 | bool place( const QPoint &pos, QTextParagraph *s, bool link ); |
316 | void restoreState(); | 318 | void restoreState(); |
317 | 319 | ||
318 | 320 | ||
319 | int nestedDepth() const { return (int)indices.count(); } //### size_t/int cast | 321 | int nestedDepth() const { return (int)indices.count(); } //### size_t/int cast |
320 | void oneUp() { if ( !indices.isEmpty() ) pop(); } | 322 | void oneUp() { if ( !indices.isEmpty() ) pop(); } |
321 | void setValid( bool b ) { valid = b; } | 323 | void setValid( bool b ) { valid = b; } |
322 | bool isValid() const { return valid; } | 324 | bool isValid() const { return valid; } |
323 | 325 | ||
324 | private: | 326 | private: |
325 | enum Operation { EnterBegin, EnterEnd, Next, Prev, Up, Down }; | 327 | enum Operation { EnterBegin, EnterEnd, Next, Prev, Up, Down }; |
326 | 328 | ||
327 | void push(); | 329 | void push(); |
328 | void pop(); | 330 | void pop(); |
329 | void processNesting( Operation op ); | 331 | bool processNesting( Operation op ); |
330 | void invalidateNested(); | 332 | void invalidateNested(); |
331 | void gotoIntoNested( const QPoint &globalPos ); | 333 | void gotoIntoNested( const QPoint &globalPos ); |
332 | 334 | ||
333 | QTextParagraph *para; | 335 | QTextParagraph *para; |
334 | int idx, tmpIndex; | 336 | int idx, tmpIndex; |
335 | int ox, oy; | 337 | int ox, oy; |
336 | QValueStack<int> indices; | 338 | QValueStack<int> indices; |
337 | QValueStack<QTextParagraph*> paras; | 339 | QValueStack<QTextParagraph*> paras; |
338 | QValueStack<int> xOffsets; | 340 | QValueStack<int> xOffsets; |
339 | QValueStack<int> yOffsets; | 341 | QValueStack<int> yOffsets; |
340 | uint valid : 1; | 342 | uint valid : 1; |
341 | 343 | ||
342 | }; | 344 | }; |
343 | 345 | ||
344 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 346 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
345 | 347 | ||
346 | class Q_EXPORT QTextCommand | 348 | class Q_EXPORT QTextCommand |
347 | { | 349 | { |
348 | public: | 350 | public: |
349 | enum Commands { Invalid, Insert, Delete, Format, Style }; | 351 | enum Commands { Invalid, Insert, Delete, Format, Style }; |
350 | 352 | ||
351 | QTextCommand( QTextDocument *d ) : doc( d ), cursor( d ) {} | 353 | QTextCommand( QTextDocument *d ) : doc( d ), cursor( d ) {} |
352 | virtual ~QTextCommand(); | 354 | virtual ~QTextCommand(); |
353 | 355 | ||
354 | virtual Commands type() const; | 356 | virtual Commands type() const; |
355 | 357 | ||
356 | virtual QTextCursor *execute( QTextCursor *c ) = 0; | 358 | virtual QTextCursor *execute( QTextCursor *c ) = 0; |
357 | virtual QTextCursor *unexecute( QTextCursor *c ) = 0; | 359 | virtual QTextCursor *unexecute( QTextCursor *c ) = 0; |
358 | 360 | ||
359 | protected: | 361 | protected: |
360 | QTextDocument *doc; | 362 | QTextDocument *doc; |
361 | QTextCursor cursor; | 363 | QTextCursor cursor; |
362 | 364 | ||
363 | }; | 365 | }; |
364 | 366 | ||
365 | #if defined(Q_TEMPLATEDLL) | 367 | #if defined(Q_TEMPLATEDLL) |
366 | // MOC_SKIP_BEGIN | 368 | // MOC_SKIP_BEGIN |
367 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextCommand>; | 369 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextCommand>; |
368 | // MOC_SKIP_END | 370 | // MOC_SKIP_END |
369 | #endif | 371 | #endif |
370 | 372 | ||
371 | class Q_EXPORT QTextCommandHistory | 373 | class Q_EXPORT QTextCommandHistory |
372 | { | 374 | { |
373 | public: | 375 | public: |
374 | QTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); } | 376 | QTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); } |
375 | virtual ~QTextCommandHistory(); | 377 | virtual ~QTextCommandHistory(); |
376 | 378 | ||
377 | void clear() { history.clear(); current = -1; } | 379 | void clear() { history.clear(); current = -1; } |
@@ -658,96 +660,97 @@ public: | |||
658 | virtual bool enterAt( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, const QPoint &pos ); | 660 | virtual bool enterAt( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, const QPoint &pos ); |
659 | virtual bool next( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | 661 | virtual bool next( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); |
660 | virtual bool prev( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | 662 | virtual bool prev( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); |
661 | virtual bool down( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | 663 | virtual bool down( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); |
662 | virtual bool up( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | 664 | virtual bool up( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); |
663 | 665 | ||
664 | QString richText() const; | 666 | QString richText() const; |
665 | 667 | ||
666 | int minimumWidth() const; | 668 | int minimumWidth() const; |
667 | 669 | ||
668 | QPtrList<QTextTableCell> tableCells() const { return cells; } | 670 | QPtrList<QTextTableCell> tableCells() const { return cells; } |
669 | 671 | ||
670 | bool isStretching() const { return stretch; } | 672 | bool isStretching() const { return stretch; } |
671 | 673 | ||
672 | private: | 674 | private: |
673 | void format( int w ); | 675 | void format( int w ); |
674 | void addCell( QTextTableCell* cell ); | 676 | void addCell( QTextTableCell* cell ); |
675 | 677 | ||
676 | private: | 678 | private: |
677 | QGridLayout* layout; | 679 | QGridLayout* layout; |
678 | QPtrList<QTextTableCell> cells; | 680 | QPtrList<QTextTableCell> cells; |
679 | int cachewidth; | 681 | int cachewidth; |
680 | int fixwidth; | 682 | int fixwidth; |
681 | int cellpadding; | 683 | int cellpadding; |
682 | int cellspacing; | 684 | int cellspacing; |
683 | int border; | 685 | int border; |
684 | int outerborder; | 686 | int outerborder; |
685 | int stretch; | 687 | int stretch; |
686 | int innerborder; | 688 | int innerborder; |
687 | int us_cp, us_ib, us_b, us_ob, us_cs; | 689 | int us_cp, us_ib, us_b, us_ob, us_cs; |
688 | QMap<QString, QString> attributes; | 690 | QMap<QString, QString> attributes; |
689 | QMap<QTextCursor*, int> currCell; | 691 | QMap<QTextCursor*, int> currCell; |
690 | Placement place; | 692 | Placement place; |
691 | void adjustCells( int y , int shift ); | 693 | void adjustCells( int y , int shift ); |
692 | int pageBreakFor; | 694 | int pageBreakFor; |
693 | }; | 695 | }; |
694 | #endif | 696 | #endif |
695 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 697 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
696 | 698 | ||
697 | #ifndef QT_NO_TEXTCUSTOMITEM | 699 | #ifndef QT_NO_TEXTCUSTOMITEM |
698 | class QTextTableCell; | 700 | class QTextTableCell; |
699 | class QTextParagraph; | 701 | class QTextParagraph; |
700 | #endif | 702 | #endif |
701 | 703 | ||
702 | struct Q_EXPORT QTextDocumentSelection | 704 | struct Q_EXPORT QTextDocumentSelection |
703 | { | 705 | { |
704 | QTextCursor startCursor, endCursor; | 706 | QTextCursor startCursor, endCursor; |
705 | bool swapped; | 707 | bool swapped; |
708 | Q_DUMMY_COMPARISON_OPERATOR(QTextDocumentSelection) | ||
706 | }; | 709 | }; |
707 | 710 | ||
708 | #if defined(Q_TEMPLATEDLL) | 711 | #if defined(Q_TEMPLATEDLL) |
709 | // MOC_SKIP_BEGIN | 712 | // MOC_SKIP_BEGIN |
710 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QColor>; | 713 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QColor>; |
711 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, bool>; | 714 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, bool>; |
712 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextDocumentSelection>; | 715 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextDocumentSelection>; |
713 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextDocument>; | 716 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextDocument>; |
714 | // MOC_SKIP_END | 717 | // MOC_SKIP_END |
715 | #endif | 718 | #endif |
716 | 719 | ||
717 | class Q_EXPORT QTextDocument : public QObject | 720 | class Q_EXPORT QTextDocument : public QObject |
718 | { | 721 | { |
719 | Q_OBJECT | 722 | Q_OBJECT |
720 | 723 | ||
721 | #ifndef QT_NO_TEXTCUSTOMITEM | 724 | #ifndef QT_NO_TEXTCUSTOMITEM |
722 | friend class QTextTableCell; | 725 | friend class QTextTableCell; |
723 | #endif | 726 | #endif |
724 | friend class QTextCursor; | 727 | friend class QTextCursor; |
725 | friend class QTextEdit; | 728 | friend class QTextEdit; |
726 | friend class QTextParagraph; | 729 | friend class QTextParagraph; |
727 | 730 | ||
728 | public: | 731 | public: |
729 | enum SelectionIds { | 732 | enum SelectionIds { |
730 | Standard = 0, | 733 | Standard = 0, |
731 | IMSelectionText = 31998, | 734 | IMSelectionText = 31998, |
732 | IMCompositionText= 31999, // this must be higher! | 735 | IMCompositionText= 31999, // this must be higher! |
733 | Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to | 736 | Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to |
734 | // remove multiple lines with removeSelectedText() | 737 | // remove multiple lines with removeSelectedText() |
735 | }; | 738 | }; |
736 | 739 | ||
737 | QTextDocument( QTextDocument *p ); | 740 | QTextDocument( QTextDocument *p ); |
738 | QTextDocument( QTextDocument *d, QTextFormatCollection *f ); | 741 | QTextDocument( QTextDocument *d, QTextFormatCollection *f ); |
739 | virtual ~QTextDocument(); | 742 | virtual ~QTextDocument(); |
740 | 743 | ||
741 | QTextDocument *parent() const { return par; } | 744 | QTextDocument *parent() const { return par; } |
742 | QTextParagraph *parentParagraph() const { return parentPar; } | 745 | QTextParagraph *parentParagraph() const { return parentPar; } |
743 | 746 | ||
744 | void setText( const QString &text, const QString &context ); | 747 | void setText( const QString &text, const QString &context ); |
745 | QMap<QString, QString> attributes() const { return attribs; } | 748 | QMap<QString, QString> attributes() const { return attribs; } |
746 | void setAttributes( const QMap<QString, QString> &attr ) { attribs = attr; } | 749 | void setAttributes( const QMap<QString, QString> &attr ) { attribs = attr; } |
747 | 750 | ||
748 | QString text() const; | 751 | QString text() const; |
749 | QString text( int parag ) const; | 752 | QString text( int parag ) const; |
750 | QString originalText() const; | 753 | QString originalText() const; |
751 | 754 | ||
752 | int x() const; | 755 | int x() const; |
753 | int y() const; | 756 | int y() const; |
@@ -794,96 +797,99 @@ public: | |||
794 | QTextCursor selectionStartCursor( int id ); | 797 | QTextCursor selectionStartCursor( int id ); |
795 | QTextCursor selectionEndCursor( int id ); | 798 | QTextCursor selectionEndCursor( int id ); |
796 | void selectionEnd( int id, int ¶gId, int &index ); | 799 | void selectionEnd( int id, int ¶gId, int &index ); |
797 | void setFormat( int id, QTextFormat *f, int flags ); | 800 | void setFormat( int id, QTextFormat *f, int flags ); |
798 | int numSelections() const { return nSelections; } | 801 | int numSelections() const { return nSelections; } |
799 | void addSelection( int id ); | 802 | void addSelection( int id ); |
800 | 803 | ||
801 | QString selectedText( int id, bool asRichText = FALSE ) const; | 804 | QString selectedText( int id, bool asRichText = FALSE ) const; |
802 | void removeSelectedText( int id, QTextCursor *cursor ); | 805 | void removeSelectedText( int id, QTextCursor *cursor ); |
803 | void indentSelection( int id ); | 806 | void indentSelection( int id ); |
804 | 807 | ||
805 | QTextParagraph *paragAt( int i ) const; | 808 | QTextParagraph *paragAt( int i ) const; |
806 | 809 | ||
807 | void addCommand( QTextCommand *cmd ); | 810 | void addCommand( QTextCommand *cmd ); |
808 | QTextCursor *undo( QTextCursor *c = 0 ); | 811 | QTextCursor *undo( QTextCursor *c = 0 ); |
809 | QTextCursor *redo( QTextCursor *c = 0 ); | 812 | QTextCursor *redo( QTextCursor *c = 0 ); |
810 | QTextCommandHistory *commands() const { return commandHistory; } | 813 | QTextCommandHistory *commands() const { return commandHistory; } |
811 | 814 | ||
812 | QTextFormatCollection *formatCollection() const; | 815 | QTextFormatCollection *formatCollection() const; |
813 | 816 | ||
814 | bool find( QTextCursor &cursor, const QString &expr, bool cs, bool wo, bool forward); | 817 | bool find( QTextCursor &cursor, const QString &expr, bool cs, bool wo, bool forward); |
815 | 818 | ||
816 | void setTextFormat( Qt::TextFormat f ); | 819 | void setTextFormat( Qt::TextFormat f ); |
817 | Qt::TextFormat textFormat() const; | 820 | Qt::TextFormat textFormat() const; |
818 | 821 | ||
819 | bool inSelection( int selId, const QPoint &pos ) const; | 822 | bool inSelection( int selId, const QPoint &pos ) const; |
820 | 823 | ||
821 | QStyleSheet *styleSheet() const { return sheet_; } | 824 | QStyleSheet *styleSheet() const { return sheet_; } |
822 | #ifndef QT_NO_MIME | 825 | #ifndef QT_NO_MIME |
823 | QMimeSourceFactory *mimeSourceFactory() const { return factory_; } | 826 | QMimeSourceFactory *mimeSourceFactory() const { return factory_; } |
824 | #endif | 827 | #endif |
825 | QString context() const { return contxt; } | 828 | QString context() const { return contxt; } |
826 | 829 | ||
827 | void setStyleSheet( QStyleSheet *s ); | 830 | void setStyleSheet( QStyleSheet *s ); |
828 | void setDefaultFormat( const QFont &font, const QColor &color ); | 831 | void setDefaultFormat( const QFont &font, const QColor &color ); |
829 | #ifndef QT_NO_MIME | 832 | #ifndef QT_NO_MIME |
830 | void setMimeSourceFactory( QMimeSourceFactory *f ) { if ( f ) factory_ = f; } | 833 | void setMimeSourceFactory( QMimeSourceFactory *f ) { if ( f ) factory_ = f; } |
831 | #endif | 834 | #endif |
832 | void setContext( const QString &c ) { if ( !c.isEmpty() ) contxt = c; } | 835 | void setContext( const QString &c ) { if ( !c.isEmpty() ) contxt = c; } |
833 | 836 | ||
834 | void setUnderlineLinks( bool b ); | 837 | void setUnderlineLinks( bool b ); |
835 | bool underlineLinks() const { return underlLinks; } | 838 | bool underlineLinks() const { return underlLinks; } |
836 | 839 | ||
837 | void setPaper( QBrush *brush ) { if ( backBrush ) delete backBrush; backBrush = brush; } | 840 | void setPaper( QBrush *brush ) { if ( backBrush ) delete backBrush; backBrush = brush; } |
838 | QBrush *paper() const { return backBrush; } | 841 | QBrush *paper() const { return backBrush; } |
839 | 842 | ||
840 | void doLayout( QPainter *p, int w ); | 843 | void doLayout( QPainter *p, int w ); |
841 | void draw( QPainter *p, const QRect& rect, const QColorGroup &cg, const QBrush *paper = 0 ); | 844 | void draw( QPainter *p, const QRect& rect, const QColorGroup &cg, const QBrush *paper = 0 ); |
845 | void eraseParagraphEmptyArea( QTextParagraph *parag, QPainter *p, const QColorGroup &cg ); | ||
846 | bool useDoubleBuffer( QTextParagraph *parag, QPainter *p ); | ||
847 | |||
842 | void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, | 848 | void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, |
843 | QPixmap *&doubleBuffer, const QColorGroup &cg, | 849 | QPixmap *&doubleBuffer, const QColorGroup &cg, |
844 | bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); | 850 | bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); |
845 | QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, | 851 | QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, |
846 | bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, | 852 | bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, |
847 | bool resetChanged = TRUE ); | 853 | bool resetChanged = TRUE ); |
848 | 854 | ||
849 | #ifndef QT_NO_TEXTCUSTOMITEM | 855 | #ifndef QT_NO_TEXTCUSTOMITEM |
850 | void registerCustomItem( QTextCustomItem *i, QTextParagraph *p ); | 856 | void registerCustomItem( QTextCustomItem *i, QTextParagraph *p ); |
851 | void unregisterCustomItem( QTextCustomItem *i, QTextParagraph *p ); | 857 | void unregisterCustomItem( QTextCustomItem *i, QTextParagraph *p ); |
852 | #endif | 858 | #endif |
853 | 859 | ||
854 | void setFlow( QTextFlow *f ); | 860 | void setFlow( QTextFlow *f ); |
855 | void takeFlow(); | 861 | void takeFlow(); |
856 | QTextFlow *flow() const { return flow_; } | 862 | QTextFlow *flow() const { return flow_; } |
857 | bool isPageBreakEnabled() const { return pages; } | 863 | bool isPageBreakEnabled() const { return pages; } |
858 | void setPageBreakEnabled( bool b ) { pages = b; } | 864 | void setPageBreakEnabled( bool b ) { pages = b; } |
859 | 865 | ||
860 | void setUseFormatCollection( bool b ) { useFC = b; } | 866 | void setUseFormatCollection( bool b ) { useFC = b; } |
861 | bool useFormatCollection() const { return useFC; } | 867 | bool useFormatCollection() const { return useFC; } |
862 | 868 | ||
863 | #ifndef QT_NO_TEXTCUSTOMITEM | 869 | #ifndef QT_NO_TEXTCUSTOMITEM |
864 | QTextTableCell *tableCell() const { return tc; } | 870 | QTextTableCell *tableCell() const { return tc; } |
865 | void setTableCell( QTextTableCell *c ) { tc = c; } | 871 | void setTableCell( QTextTableCell *c ) { tc = c; } |
866 | #endif | 872 | #endif |
867 | 873 | ||
868 | void setPlainText( const QString &text ); | 874 | void setPlainText( const QString &text ); |
869 | void setRichText( const QString &text, const QString &context ); | 875 | void setRichText( const QString &text, const QString &context ); |
870 | QString richText() const; | 876 | QString richText() const; |
871 | QString plainText() const; | 877 | QString plainText() const; |
872 | 878 | ||
873 | bool focusNextPrevChild( bool next ); | 879 | bool focusNextPrevChild( bool next ); |
874 | 880 | ||
875 | int alignment() const; | 881 | int alignment() const; |
876 | void setAlignment( int a ); | 882 | void setAlignment( int a ); |
877 | 883 | ||
878 | int *tabArray() const; | 884 | int *tabArray() const; |
879 | int tabStopWidth() const; | 885 | int tabStopWidth() const; |
880 | void setTabArray( int *a ); | 886 | void setTabArray( int *a ); |
881 | void setTabStops( int tw ); | 887 | void setTabStops( int tw ); |
882 | 888 | ||
883 | void setUndoDepth( int d ) { commandHistory->setUndoDepth( d ); } | 889 | void setUndoDepth( int d ) { commandHistory->setUndoDepth( d ); } |
884 | int undoDepth() const { return commandHistory->undoDepth(); } | 890 | int undoDepth() const { return commandHistory->undoDepth(); } |
885 | 891 | ||
886 | int length() const; | 892 | int length() const; |
887 | void clear( bool createEmptyParag = FALSE ); | 893 | void clear( bool createEmptyParag = FALSE ); |
888 | 894 | ||
889 | virtual QTextParagraph *createParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); | 895 | virtual QTextParagraph *createParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); |
@@ -1022,206 +1028,205 @@ public: | |||
1022 | Commands type() const { return Insert; } | 1028 | Commands type() const { return Insert; } |
1023 | QTextCursor *execute( QTextCursor *c ) { return QTextDeleteCommand::unexecute( c ); } | 1029 | QTextCursor *execute( QTextCursor *c ) { return QTextDeleteCommand::unexecute( c ); } |
1024 | QTextCursor *unexecute( QTextCursor *c ) { return QTextDeleteCommand::execute( c ); } | 1030 | QTextCursor *unexecute( QTextCursor *c ) { return QTextDeleteCommand::execute( c ); } |
1025 | 1031 | ||
1026 | }; | 1032 | }; |
1027 | 1033 | ||
1028 | class Q_EXPORT QTextFormatCommand : public QTextCommand | 1034 | class Q_EXPORT QTextFormatCommand : public QTextCommand |
1029 | { | 1035 | { |
1030 | public: | 1036 | public: |
1031 | QTextFormatCommand( QTextDocument *d, int sid, int sidx, int eid, int eidx, const QMemArray<QTextStringChar> &old, QTextFormat *f, int fl ); | 1037 | QTextFormatCommand( QTextDocument *d, int sid, int sidx, int eid, int eidx, const QMemArray<QTextStringChar> &old, QTextFormat *f, int fl ); |
1032 | virtual ~QTextFormatCommand(); | 1038 | virtual ~QTextFormatCommand(); |
1033 | 1039 | ||
1034 | Commands type() const { return Format; } | 1040 | Commands type() const { return Format; } |
1035 | QTextCursor *execute( QTextCursor *c ); | 1041 | QTextCursor *execute( QTextCursor *c ); |
1036 | QTextCursor *unexecute( QTextCursor *c ); | 1042 | QTextCursor *unexecute( QTextCursor *c ); |
1037 | 1043 | ||
1038 | protected: | 1044 | protected: |
1039 | int startId, startIndex, endId, endIndex; | 1045 | int startId, startIndex, endId, endIndex; |
1040 | QTextFormat *format; | 1046 | QTextFormat *format; |
1041 | QMemArray<QTextStringChar> oldFormats; | 1047 | QMemArray<QTextStringChar> oldFormats; |
1042 | int flags; | 1048 | int flags; |
1043 | 1049 | ||
1044 | }; | 1050 | }; |
1045 | 1051 | ||
1046 | class Q_EXPORT QTextStyleCommand : public QTextCommand | 1052 | class Q_EXPORT QTextStyleCommand : public QTextCommand |
1047 | { | 1053 | { |
1048 | public: | 1054 | public: |
1049 | QTextStyleCommand( QTextDocument *d, int fParag, int lParag, const QByteArray& beforeChange ); | 1055 | QTextStyleCommand( QTextDocument *d, int fParag, int lParag, const QByteArray& beforeChange ); |
1050 | virtual ~QTextStyleCommand() {} | 1056 | virtual ~QTextStyleCommand() {} |
1051 | 1057 | ||
1052 | Commands type() const { return Style; } | 1058 | Commands type() const { return Style; } |
1053 | QTextCursor *execute( QTextCursor *c ); | 1059 | QTextCursor *execute( QTextCursor *c ); |
1054 | QTextCursor *unexecute( QTextCursor *c ); | 1060 | QTextCursor *unexecute( QTextCursor *c ); |
1055 | 1061 | ||
1056 | static QByteArray readStyleInformation( QTextDocument* d, int fParag, int lParag ); | 1062 | static QByteArray readStyleInformation( QTextDocument* d, int fParag, int lParag ); |
1057 | static void writeStyleInformation( QTextDocument* d, int fParag, const QByteArray& style ); | 1063 | static void writeStyleInformation( QTextDocument* d, int fParag, const QByteArray& style ); |
1058 | 1064 | ||
1059 | private: | 1065 | private: |
1060 | int firstParag, lastParag; | 1066 | int firstParag, lastParag; |
1061 | QByteArray before; | 1067 | QByteArray before; |
1062 | QByteArray after; | 1068 | QByteArray after; |
1063 | }; | 1069 | }; |
1064 | 1070 | ||
1065 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1071 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1066 | 1072 | ||
1067 | struct Q_EXPORT QTextParagraphSelection | 1073 | struct Q_EXPORT QTextParagraphSelection |
1068 | { | 1074 | { |
1069 | int start, end; | 1075 | int start, end; |
1076 | Q_DUMMY_COMPARISON_OPERATOR(QTextParagraphSelection) | ||
1070 | }; | 1077 | }; |
1071 | 1078 | ||
1072 | struct Q_EXPORT QTextLineStart | 1079 | struct Q_EXPORT QTextLineStart |
1073 | { | 1080 | { |
1074 | QTextLineStart() : y( 0 ), baseLine( 0 ), h( 0 ) | 1081 | QTextLineStart() : y( 0 ), baseLine( 0 ), h( 0 ) |
1075 | #ifndef QT_NO_COMPLEXTEXT | 1082 | #ifndef QT_NO_COMPLEXTEXT |
1076 | , bidicontext( 0 ) | 1083 | , bidicontext( 0 ) |
1077 | #endif | 1084 | #endif |
1078 | { } | 1085 | { } |
1079 | QTextLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ), | 1086 | QTextLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ), |
1080 | w( 0 ) | 1087 | w( 0 ) |
1081 | #ifndef QT_NO_COMPLEXTEXT | 1088 | #ifndef QT_NO_COMPLEXTEXT |
1082 | , bidicontext( 0 ) | 1089 | , bidicontext( 0 ) |
1083 | #endif | 1090 | #endif |
1084 | { } | 1091 | { } |
1085 | #ifndef QT_NO_COMPLEXTEXT | 1092 | #ifndef QT_NO_COMPLEXTEXT |
1086 | QTextLineStart( QBidiContext *c, QBidiStatus s ) : y(0), baseLine(0), h(0), | 1093 | QTextLineStart( QBidiContext *c, QBidiStatus s ) : y(0), baseLine(0), h(0), |
1087 | status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } | 1094 | status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } |
1088 | #endif | 1095 | #endif |
1089 | 1096 | ||
1090 | virtual ~QTextLineStart() | 1097 | virtual ~QTextLineStart() |
1091 | { | 1098 | { |
1092 | #ifndef QT_NO_COMPLEXTEXT | 1099 | #ifndef QT_NO_COMPLEXTEXT |
1093 | if ( bidicontext && bidicontext->deref() ) | 1100 | if ( bidicontext && bidicontext->deref() ) |
1094 | delete bidicontext; | 1101 | delete bidicontext; |
1095 | #endif | 1102 | #endif |
1096 | } | 1103 | } |
1097 | 1104 | ||
1098 | #ifndef QT_NO_COMPLEXTEXT | 1105 | #ifndef QT_NO_COMPLEXTEXT |
1099 | void setContext( QBidiContext *c ) { | 1106 | void setContext( QBidiContext *c ) { |
1100 | if ( c == bidicontext ) | 1107 | if ( c == bidicontext ) |
1101 | return; | 1108 | return; |
1102 | if ( bidicontext && bidicontext->deref() ) | 1109 | if ( bidicontext && bidicontext->deref() ) |
1103 | delete bidicontext; | 1110 | delete bidicontext; |
1104 | bidicontext = c; | 1111 | bidicontext = c; |
1105 | if ( bidicontext ) | 1112 | if ( bidicontext ) |
1106 | bidicontext->ref(); | 1113 | bidicontext->ref(); |
1107 | } | 1114 | } |
1108 | QBidiContext *context() const { return bidicontext; } | 1115 | QBidiContext *context() const { return bidicontext; } |
1109 | #endif | 1116 | #endif |
1110 | 1117 | ||
1111 | public: | 1118 | public: |
1112 | ushort y, baseLine, h; | 1119 | ushort y, baseLine, h; |
1113 | #ifndef QT_NO_COMPLEXTEXT | 1120 | #ifndef QT_NO_COMPLEXTEXT |
1114 | QBidiStatus status; | 1121 | QBidiStatus status; |
1115 | #endif | 1122 | #endif |
1116 | int w; | 1123 | int w; |
1117 | 1124 | ||
1118 | private: | 1125 | private: |
1119 | #ifndef QT_NO_COMPLEXTEXT | 1126 | #ifndef QT_NO_COMPLEXTEXT |
1120 | QBidiContext *bidicontext; | 1127 | QBidiContext *bidicontext; |
1121 | #endif | 1128 | #endif |
1122 | }; | 1129 | }; |
1123 | 1130 | ||
1124 | #if defined(Q_TEMPLATEDLL) | 1131 | #if defined(Q_TEMPLATEDLL) |
1125 | // MOC_SKIP_BEGIN | 1132 | // MOC_SKIP_BEGIN |
1126 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextParagraphSelection>; | 1133 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextParagraphSelection>; |
1127 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextLineStart*>; | 1134 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextLineStart*>; |
1128 | // MOC_SKIP_END | 1135 | // MOC_SKIP_END |
1129 | #endif | 1136 | #endif |
1130 | 1137 | ||
1131 | class Q_EXPORT QTextParagraphData | 1138 | class Q_EXPORT QTextParagraphData |
1132 | { | 1139 | { |
1133 | public: | 1140 | public: |
1134 | QTextParagraphData() {} | 1141 | QTextParagraphData() {} |
1135 | virtual ~QTextParagraphData(); | 1142 | virtual ~QTextParagraphData(); |
1136 | virtual void join( QTextParagraphData * ); | 1143 | virtual void join( QTextParagraphData * ); |
1137 | }; | 1144 | }; |
1138 | 1145 | ||
1139 | class Q_EXPORT QTextParagraphPseudoDocument | 1146 | class QTextParagraphPseudoDocument; |
1140 | { | 1147 | |
1141 | public: | 1148 | class QSyntaxHighlighter; |
1142 | QTextParagraphPseudoDocument(); | ||
1143 | ~QTextParagraphPseudoDocument(); | ||
1144 | QRect docRect; | ||
1145 | QTextFormatter *pFormatter; | ||
1146 | QTextCommandHistory *commandHistory; | ||
1147 | int minw; | ||
1148 | int wused; | ||
1149 | }; | ||
1150 | 1149 | ||
1151 | //nase | ||
1152 | class Q_EXPORT QTextParagraph | 1150 | class Q_EXPORT QTextParagraph |
1153 | { | 1151 | { |
1154 | friend class QTextDocument; | 1152 | friend class QTextDocument; |
1155 | friend class QTextCursor; | 1153 | friend class QTextCursor; |
1154 | friend class QSyntaxHighlighter; | ||
1156 | 1155 | ||
1157 | public: | 1156 | public: |
1158 | QTextParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); | 1157 | QTextParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); |
1159 | virtual ~QTextParagraph(); | 1158 | virtual ~QTextParagraph(); |
1160 | 1159 | ||
1161 | QTextString *string() const; | 1160 | QTextString *string() const; |
1162 | QTextStringChar *at( int i ) const; // maybe remove later | 1161 | QTextStringChar *at( int i ) const; // maybe remove later |
1163 | int leftGap() const; | 1162 | int leftGap() const; |
1164 | int length() const; // maybe remove later | 1163 | int length() const; // maybe remove later |
1165 | 1164 | ||
1166 | void setListStyle( QStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = TRUE; } | 1165 | void setListStyle( QStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = TRUE; } |
1167 | QStyleSheetItem::ListStyle listStyle() const { return lstyle; } | 1166 | QStyleSheetItem::ListStyle listStyle() const { return lstyle; } |
1168 | void setListItem( bool li ); | 1167 | void setListItem( bool li ); |
1169 | bool isListItem() const { return litem; } | 1168 | bool isListItem() const { return litem; } |
1170 | void setListValue( int v ) { list_val = v; } | 1169 | void setListValue( int v ) { list_val = v; } |
1171 | int listValue() const { return list_val > 0 ? list_val : -1; } | 1170 | int listValue() const { return list_val > 0 ? list_val : -1; } |
1172 | 1171 | ||
1173 | void setListDepth( int depth ); | 1172 | void setListDepth( int depth ); |
1174 | int listDepth() const { return ldepth; } | 1173 | int listDepth() const { return ldepth; } |
1175 | 1174 | ||
1176 | // void setFormat( QTextFormat *fm ); | 1175 | // void setFormat( QTextFormat *fm ); |
1177 | // QTextFormat *paragFormat() const; | 1176 | // QTextFormat *paragFormat() const; |
1178 | 1177 | ||
1178 | #if defined(Q_STRICT_INLINING_RULES) | ||
1179 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the | ||
1180 | // implementation to be a redefinition. | ||
1181 | inline QTextDocument *document() const; | ||
1182 | #else | ||
1179 | QTextDocument *document() const; | 1183 | QTextDocument *document() const; |
1184 | #endif | ||
1180 | QTextParagraphPseudoDocument *pseudoDocument() const; | 1185 | QTextParagraphPseudoDocument *pseudoDocument() const; |
1181 | 1186 | ||
1182 | QRect rect() const; | 1187 | QRect rect() const; |
1183 | void setHeight( int h ) { r.setHeight( h ); } | 1188 | void setHeight( int h ) { r.setHeight( h ); } |
1184 | void show(); | 1189 | void show(); |
1185 | void hide(); | 1190 | void hide(); |
1186 | bool isVisible() const { return visible; } | 1191 | bool isVisible() const { return visible; } |
1187 | 1192 | ||
1188 | QTextParagraph *prev() const; | 1193 | QTextParagraph *prev() const; |
1189 | QTextParagraph *next() const; | 1194 | QTextParagraph *next() const; |
1190 | void setPrev( QTextParagraph *s ); | 1195 | void setPrev( QTextParagraph *s ); |
1191 | void setNext( QTextParagraph *s ); | 1196 | void setNext( QTextParagraph *s ); |
1192 | 1197 | ||
1193 | void insert( int index, const QString &s ); | 1198 | void insert( int index, const QString &s ); |
1194 | void insert( int index, const QChar *unicode, int len ); | 1199 | void insert( int index, const QChar *unicode, int len ); |
1195 | void append( const QString &s, bool reallyAtEnd = FALSE ); | 1200 | void append( const QString &s, bool reallyAtEnd = FALSE ); |
1196 | void truncate( int index ); | 1201 | void truncate( int index ); |
1197 | void remove( int index, int len ); | 1202 | void remove( int index, int len ); |
1198 | void join( QTextParagraph *s ); | 1203 | void join( QTextParagraph *s ); |
1199 | 1204 | ||
1200 | void invalidate( int chr ); | 1205 | void invalidate( int chr ); |
1201 | 1206 | ||
1202 | void move( int &dy ); | 1207 | void move( int &dy ); |
1203 | void format( int start = -1, bool doMove = TRUE ); | 1208 | void format( int start = -1, bool doMove = TRUE ); |
1204 | 1209 | ||
1205 | bool isValid() const; | 1210 | bool isValid() const; |
1206 | bool hasChanged() const; | 1211 | bool hasChanged() const; |
1207 | void setChanged( bool b, bool recursive = FALSE ); | 1212 | void setChanged( bool b, bool recursive = FALSE ); |
1208 | 1213 | ||
1209 | int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const; | 1214 | int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const; |
1210 | QTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const; | 1215 | QTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const; |
1211 | int lines() const; | 1216 | int lines() const; |
1212 | QTextStringChar *lineStartOfLine( int line, int *index = 0 ) const; | 1217 | QTextStringChar *lineStartOfLine( int line, int *index = 0 ) const; |
1213 | int lineY( int l ) const; | 1218 | int lineY( int l ) const; |
1214 | int lineBaseLine( int l ) const; | 1219 | int lineBaseLine( int l ) const; |
1215 | int lineHeight( int l ) const; | 1220 | int lineHeight( int l ) const; |
1216 | void lineInfo( int l, int &y, int &h, int &bl ) const; | 1221 | void lineInfo( int l, int &y, int &h, int &bl ) const; |
1217 | 1222 | ||
1218 | void setSelection( int id, int start, int end ); | 1223 | void setSelection( int id, int start, int end ); |
1219 | void removeSelection( int id ); | 1224 | void removeSelection( int id ); |
1220 | int selectionStart( int id ) const; | 1225 | int selectionStart( int id ) const; |
1221 | int selectionEnd( int id ) const; | 1226 | int selectionEnd( int id ) const; |
1222 | bool hasSelection( int id ) const; | 1227 | bool hasSelection( int id ) const; |
1223 | bool hasAnySelection() const; | 1228 | bool hasAnySelection() const; |
1224 | bool fullSelected( int id ) const; | 1229 | bool fullSelected( int id ) const; |
1225 | 1230 | ||
1226 | void setEndState( int s ); | 1231 | void setEndState( int s ); |
1227 | int endState() const; | 1232 | int endState() const; |
@@ -1551,116 +1556,128 @@ private: | |||
1551 | uint missp : 1; | 1556 | uint missp : 1; |
1552 | uint linkColor : 1; | 1557 | uint linkColor : 1; |
1553 | uint usePixelSizes : 1; | 1558 | uint usePixelSizes : 1; |
1554 | int leftBearing, rightBearing; | 1559 | int leftBearing, rightBearing; |
1555 | VerticalAlignment ha; | 1560 | VerticalAlignment ha; |
1556 | uchar widths[ 256 ]; | 1561 | uchar widths[ 256 ]; |
1557 | int hei, asc, dsc; | 1562 | int hei, asc, dsc; |
1558 | QTextFormatCollection *collection; | 1563 | QTextFormatCollection *collection; |
1559 | int ref; | 1564 | int ref; |
1560 | QString k; | 1565 | QString k; |
1561 | int logicalFontSize; | 1566 | int logicalFontSize; |
1562 | int stdSize; | 1567 | int stdSize; |
1563 | static QPainter *pntr; | 1568 | static QPainter *pntr; |
1564 | static QFontMetrics *pntr_fm; | 1569 | static QFontMetrics *pntr_fm; |
1565 | static int pntr_asc; | 1570 | static int pntr_asc; |
1566 | static int pntr_hei; | 1571 | static int pntr_hei; |
1567 | static int pntr_ldg; | 1572 | static int pntr_ldg; |
1568 | static int pntr_dsc; | 1573 | static int pntr_dsc; |
1569 | 1574 | ||
1570 | }; | 1575 | }; |
1571 | 1576 | ||
1572 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1577 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1573 | 1578 | ||
1574 | #if defined(Q_TEMPLATEDLL) | 1579 | #if defined(Q_TEMPLATEDLL) |
1575 | // MOC_SKIP_BEGIN | 1580 | // MOC_SKIP_BEGIN |
1576 | Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QTextFormat>; | 1581 | Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QTextFormat>; |
1577 | // MOC_SKIP_END | 1582 | // MOC_SKIP_END |
1578 | #endif | 1583 | #endif |
1579 | 1584 | ||
1580 | class Q_EXPORT QTextFormatCollection | 1585 | class Q_EXPORT QTextFormatCollection |
1581 | { | 1586 | { |
1582 | friend class QTextDocument; | 1587 | friend class QTextDocument; |
1583 | friend class QTextFormat; | 1588 | friend class QTextFormat; |
1584 | 1589 | ||
1585 | public: | 1590 | public: |
1586 | QTextFormatCollection(); | 1591 | QTextFormatCollection(); |
1587 | virtual ~QTextFormatCollection(); | 1592 | virtual ~QTextFormatCollection(); |
1588 | 1593 | ||
1589 | void setDefaultFormat( QTextFormat *f ); | 1594 | void setDefaultFormat( QTextFormat *f ); |
1590 | QTextFormat *defaultFormat() const; | 1595 | QTextFormat *defaultFormat() const; |
1591 | virtual QTextFormat *format( QTextFormat *f ); | 1596 | virtual QTextFormat *format( QTextFormat *f ); |
1592 | virtual QTextFormat *format( QTextFormat *of, QTextFormat *nf, int flags ); | 1597 | virtual QTextFormat *format( QTextFormat *of, QTextFormat *nf, int flags ); |
1593 | virtual QTextFormat *format( const QFont &f, const QColor &c ); | 1598 | virtual QTextFormat *format( const QFont &f, const QColor &c ); |
1594 | virtual void remove( QTextFormat *f ); | 1599 | virtual void remove( QTextFormat *f ); |
1595 | virtual QTextFormat *createFormat( const QTextFormat &f ) { return new QTextFormat( f ); } | 1600 | virtual QTextFormat *createFormat( const QTextFormat &f ) { return new QTextFormat( f ); } |
1596 | virtual QTextFormat *createFormat( const QFont &f, const QColor &c ) { return new QTextFormat( f, c, this ); } | 1601 | virtual QTextFormat *createFormat( const QFont &f, const QColor &c ) { return new QTextFormat( f, c, this ); } |
1597 | 1602 | ||
1598 | void updateDefaultFormat( const QFont &font, const QColor &c, QStyleSheet *sheet ); | 1603 | void updateDefaultFormat( const QFont &font, const QColor &c, QStyleSheet *sheet ); |
1599 | QDict<QTextFormat> dict() const { return cKey; } | ||
1600 | 1604 | ||
1601 | QPaintDevice *paintDevice() const { return paintdevice; } | 1605 | QPaintDevice *paintDevice() const { return paintdevice; } |
1602 | void setPaintDevice( QPaintDevice * ); | 1606 | void setPaintDevice( QPaintDevice * ); |
1603 | 1607 | ||
1604 | private: | 1608 | private: |
1605 | void updateKeys(); | 1609 | void updateKeys(); |
1606 | 1610 | ||
1607 | private: | 1611 | private: |
1608 | QTextFormat *defFormat, *lastFormat, *cachedFormat; | 1612 | QTextFormat *defFormat, *lastFormat, *cachedFormat; |
1609 | QDict<QTextFormat> cKey; | 1613 | QDict<QTextFormat> cKey; |
1610 | QTextFormat *cres; | 1614 | QTextFormat *cres; |
1611 | QFont cfont; | 1615 | QFont cfont; |
1612 | QColor ccol; | 1616 | QColor ccol; |
1613 | QString kof, knf; | 1617 | QString kof, knf; |
1614 | int cflags; | 1618 | int cflags; |
1615 | 1619 | ||
1616 | QPaintDevice *paintdevice; | 1620 | QPaintDevice *paintdevice; |
1617 | }; | 1621 | }; |
1618 | 1622 | ||
1623 | class Q_EXPORT QTextParagraphPseudoDocument | ||
1624 | { | ||
1625 | public: | ||
1626 | QTextParagraphPseudoDocument(); | ||
1627 | ~QTextParagraphPseudoDocument(); | ||
1628 | QRect docRect; | ||
1629 | QTextFormatter *pFormatter; | ||
1630 | QTextCommandHistory *commandHistory; | ||
1631 | int minw; | ||
1632 | int wused; | ||
1633 | QTextFormatCollection collection; | ||
1634 | }; | ||
1635 | |||
1619 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1636 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1620 | 1637 | ||
1621 | inline int QTextString::length() const | 1638 | inline int QTextString::length() const |
1622 | { | 1639 | { |
1623 | return data.size(); | 1640 | return data.size(); |
1624 | } | 1641 | } |
1625 | 1642 | ||
1626 | inline int QTextParagraph::length() const | 1643 | inline int QTextParagraph::length() const |
1627 | { | 1644 | { |
1628 | return str->length(); | 1645 | return str->length(); |
1629 | } | 1646 | } |
1630 | 1647 | ||
1631 | inline QRect QTextParagraph::rect() const | 1648 | inline QRect QTextParagraph::rect() const |
1632 | { | 1649 | { |
1633 | return r; | 1650 | return r; |
1634 | } | 1651 | } |
1635 | 1652 | ||
1636 | inline QTextParagraph *QTextCursor::paragraph() const | 1653 | inline QTextParagraph *QTextCursor::paragraph() const |
1637 | { | 1654 | { |
1638 | return para; | 1655 | return para; |
1639 | } | 1656 | } |
1640 | 1657 | ||
1641 | inline int QTextCursor::index() const | 1658 | inline int QTextCursor::index() const |
1642 | { | 1659 | { |
1643 | return idx; | 1660 | return idx; |
1644 | } | 1661 | } |
1645 | 1662 | ||
1646 | 1663 | ||
1647 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1664 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1648 | 1665 | ||
1649 | inline int QTextDocument::x() const | 1666 | inline int QTextDocument::x() const |
1650 | { | 1667 | { |
1651 | return cx; | 1668 | return cx; |
1652 | } | 1669 | } |
1653 | 1670 | ||
1654 | inline int QTextDocument::y() const | 1671 | inline int QTextDocument::y() const |
1655 | { | 1672 | { |
1656 | return cy; | 1673 | return cy; |
1657 | } | 1674 | } |
1658 | 1675 | ||
1659 | inline int QTextDocument::width() const | 1676 | inline int QTextDocument::width() const |
1660 | { | 1677 | { |
1661 | return QMAX( cw, flow_->width() ); | 1678 | return QMAX( cw, flow_->width() ); |
1662 | } | 1679 | } |
1663 | 1680 | ||
1664 | inline int QTextDocument::visibleWidth() const | 1681 | inline int QTextDocument::visibleWidth() const |
1665 | { | 1682 | { |
1666 | return vw; | 1683 | return vw; |
@@ -1783,96 +1800,102 @@ inline int QTextDocument::alignment() const | |||
1783 | { | 1800 | { |
1784 | return align; | 1801 | return align; |
1785 | } | 1802 | } |
1786 | 1803 | ||
1787 | inline void QTextDocument::setAlignment( int a ) | 1804 | inline void QTextDocument::setAlignment( int a ) |
1788 | { | 1805 | { |
1789 | align = a; | 1806 | align = a; |
1790 | } | 1807 | } |
1791 | 1808 | ||
1792 | inline int *QTextDocument::tabArray() const | 1809 | inline int *QTextDocument::tabArray() const |
1793 | { | 1810 | { |
1794 | return tArray; | 1811 | return tArray; |
1795 | } | 1812 | } |
1796 | 1813 | ||
1797 | inline int QTextDocument::tabStopWidth() const | 1814 | inline int QTextDocument::tabStopWidth() const |
1798 | { | 1815 | { |
1799 | return tStopWidth; | 1816 | return tStopWidth; |
1800 | } | 1817 | } |
1801 | 1818 | ||
1802 | inline void QTextDocument::setTabArray( int *a ) | 1819 | inline void QTextDocument::setTabArray( int *a ) |
1803 | { | 1820 | { |
1804 | tArray = a; | 1821 | tArray = a; |
1805 | } | 1822 | } |
1806 | 1823 | ||
1807 | inline void QTextDocument::setTabStops( int tw ) | 1824 | inline void QTextDocument::setTabStops( int tw ) |
1808 | { | 1825 | { |
1809 | tStopWidth = tw; | 1826 | tStopWidth = tw; |
1810 | } | 1827 | } |
1811 | 1828 | ||
1812 | inline QString QTextDocument::originalText() const | 1829 | inline QString QTextDocument::originalText() const |
1813 | { | 1830 | { |
1814 | if ( oTextValid ) | 1831 | if ( oTextValid ) |
1815 | return oText; | 1832 | return oText; |
1816 | return text(); | 1833 | return text(); |
1817 | } | 1834 | } |
1818 | 1835 | ||
1819 | inline void QTextDocument::setFlow( QTextFlow *f ) | 1836 | inline void QTextDocument::setFlow( QTextFlow *f ) |
1820 | { | 1837 | { |
1821 | if ( flow_ ) | 1838 | if ( flow_ ) |
1822 | delete flow_; | 1839 | delete flow_; |
1823 | flow_ = f; | 1840 | flow_ = f; |
1824 | } | 1841 | } |
1825 | 1842 | ||
1826 | inline void QTextDocument::takeFlow() | 1843 | inline void QTextDocument::takeFlow() |
1827 | { | 1844 | { |
1828 | flow_ = 0; | 1845 | flow_ = 0; |
1829 | } | 1846 | } |
1830 | 1847 | ||
1848 | inline bool QTextDocument::useDoubleBuffer( QTextParagraph *parag, QPainter *p ) | ||
1849 | { | ||
1850 | return ( !parag->document()->parent() || parag->document()->nextDoubleBuffered ) && | ||
1851 | ( !p || !p->device() || p->device()->devType() != QInternal::Printer ); | ||
1852 | } | ||
1853 | |||
1831 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1854 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1832 | 1855 | ||
1833 | inline QColor QTextFormat::color() const | 1856 | inline QColor QTextFormat::color() const |
1834 | { | 1857 | { |
1835 | return col; | 1858 | return col; |
1836 | } | 1859 | } |
1837 | 1860 | ||
1838 | inline QFont QTextFormat::font() const | 1861 | inline QFont QTextFormat::font() const |
1839 | { | 1862 | { |
1840 | return fn; | 1863 | return fn; |
1841 | } | 1864 | } |
1842 | 1865 | ||
1843 | inline bool QTextFormat::isMisspelled() const | 1866 | inline bool QTextFormat::isMisspelled() const |
1844 | { | 1867 | { |
1845 | return missp; | 1868 | return missp; |
1846 | } | 1869 | } |
1847 | 1870 | ||
1848 | inline QTextFormat::VerticalAlignment QTextFormat::vAlign() const | 1871 | inline QTextFormat::VerticalAlignment QTextFormat::vAlign() const |
1849 | { | 1872 | { |
1850 | return ha; | 1873 | return ha; |
1851 | } | 1874 | } |
1852 | 1875 | ||
1853 | inline bool QTextFormat::operator==( const QTextFormat &f ) const | 1876 | inline bool QTextFormat::operator==( const QTextFormat &f ) const |
1854 | { | 1877 | { |
1855 | return k == f.k; | 1878 | return k == f.k; |
1856 | } | 1879 | } |
1857 | 1880 | ||
1858 | inline QTextFormatCollection *QTextFormat::parent() const | 1881 | inline QTextFormatCollection *QTextFormat::parent() const |
1859 | { | 1882 | { |
1860 | return collection; | 1883 | return collection; |
1861 | } | 1884 | } |
1862 | 1885 | ||
1863 | inline void QTextFormat::addRef() | 1886 | inline void QTextFormat::addRef() |
1864 | { | 1887 | { |
1865 | ref++; | 1888 | ref++; |
1866 | } | 1889 | } |
1867 | 1890 | ||
1868 | inline void QTextFormat::removeRef() | 1891 | inline void QTextFormat::removeRef() |
1869 | { | 1892 | { |
1870 | ref--; | 1893 | ref--; |
1871 | if ( !collection ) | 1894 | if ( !collection ) |
1872 | return; | 1895 | return; |
1873 | if ( this == collection->defFormat ) | 1896 | if ( this == collection->defFormat ) |
1874 | return; | 1897 | return; |
1875 | if ( ref == 0 ) | 1898 | if ( ref == 0 ) |
1876 | collection->remove( this ); | 1899 | collection->remove( this ); |
1877 | } | 1900 | } |
1878 | 1901 | ||
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 @@ | |||
49 | class QSettingsSysPrivate; | 49 | class QSettingsSysPrivate; |
50 | 50 | ||
51 | // QSettingsGroup is a map of key/value pairs | 51 | // QSettingsGroup is a map of key/value pairs |
52 | class QSettingsGroup : public QMap<QString,QString> | 52 | class QSettingsGroup : public QMap<QString,QString> |
53 | { | 53 | { |
54 | public: | 54 | public: |
55 | QSettingsGroup(); | 55 | QSettingsGroup(); |
56 | 56 | ||
57 | bool modified; | 57 | bool modified; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | // QSettingsHeading is a map of heading/group pairs | 60 | // QSettingsHeading is a map of heading/group pairs |
61 | class QSettingsHeading : public QMap<QString,QSettingsGroup> | 61 | class QSettingsHeading : public QMap<QString,QSettingsGroup> |
62 | { | 62 | { |
63 | public: | 63 | public: |
64 | QSettingsHeading::Iterator git; | 64 | QSettingsHeading::Iterator git; |
65 | void read(const QString &); | 65 | void read(const QString &); |
66 | void parseLine(QTextStream &); | 66 | void parseLine(QTextStream &); |
67 | }; | 67 | }; |
68 | 68 | ||
69 | 69 | ||
70 | class QSettingsPrivate | 70 | class QSettingsPrivate |
71 | { | 71 | { |
72 | public: | 72 | public: |
73 | QSettingsPrivate( QSettings::Format format ); | 73 | QSettingsPrivate( QSettings::Format format ); |
74 | ~QSettingsPrivate(); | 74 | ~QSettingsPrivate(); |
75 | 75 | ||
76 | QSettingsGroup readGroup(); | 76 | QSettingsGroup readGroup(); |
77 | void removeGroup(const QString &); | 77 | void removeGroup(const QString &); |
78 | void writeGroup(const QString &, const QString &); | 78 | void writeGroup(const QString &, const QString &); |
79 | QDateTime modificationTime(); | 79 | QDateTime modificationTime(); |
80 | 80 | ||
81 | QStringList searchPaths; | 81 | QStringList searchPaths; |
82 | QMap<QString,QSettingsHeading> headings; | 82 | QMap<QString,QSettingsHeading> headings; |
83 | QString group; | 83 | QString group; |
84 | QString heading; | 84 | QString heading; |
85 | 85 | ||
86 | /*### static data brings threading trouble | 86 | /*### static data brings threading trouble |
87 | static QString *defProduct; | 87 | static QString *defProduct; |
88 | static QString *defDomain; | 88 | static QString *defDomain; |
89 | */ | 89 | */ |
90 | QValueStack<QString> groupStack; | 90 | QValueStack<QString> groupStack; |
91 | QString groupPrefix; | 91 | QString groupPrefix; |
92 | 92 | ||
93 | bool groupDirty :1; | 93 | bool groupDirty :1; |
94 | bool modified :1; | 94 | bool modified :1; |
95 | bool globalScope :1; | 95 | bool globalScope :1; |
96 | 96 | ||
97 | #if defined(Q_WS_WIN) || defined(Q_OS_MAC) | 97 | #if !defined(QWS) && (defined(Q_WS_WIN) || defined(Q_OS_MAC)) |
98 | // system dependent implementations to use the | 98 | // system dependent implementations to use the |
99 | // system specific setting database (ie. registry on Windows) | 99 | // system specific setting database (ie. registry on Windows) |
100 | 100 | ||
101 | QSettingsSysPrivate *sysd; | 101 | QSettingsSysPrivate *sysd; |
102 | voidsysInit(); | 102 | voidsysInit(); |
103 | voidsysClear(); | 103 | voidsysClear(); |
104 | 104 | ||
105 | #if !defined(Q_NO_BOOL_TYPE) | 105 | #if !defined(Q_NO_BOOL_TYPE) |
106 | boolsysWriteEntry( const QString &, bool ); | 106 | boolsysWriteEntry( const QString &, bool ); |
107 | #endif | 107 | #endif |
108 | boolsysWriteEntry( const QString &, double ); | 108 | boolsysWriteEntry( const QString &, double ); |
109 | boolsysWriteEntry( const QString &, int ); | 109 | boolsysWriteEntry( const QString &, int ); |
110 | boolsysWriteEntry( const QString &, const QString & ); | 110 | boolsysWriteEntry( const QString &, const QString & ); |
111 | boolsysWriteEntry( const QString &, const QStringList & ); | 111 | boolsysWriteEntry( const QString &, const QStringList & ); |
112 | boolsysWriteEntry( const QString &, const QStringList &, const QChar& sep ); | 112 | boolsysWriteEntry( const QString &, const QStringList &, const QChar& sep ); |
113 | 113 | ||
114 | QStringList sysEntryList(const QString &) const; | 114 | QStringList sysEntryList(const QString &) const; |
115 | QStringList sysSubkeyList(const QString &) const; | 115 | QStringList sysSubkeyList(const QString &) const; |
116 | 116 | ||
117 | QStringList sysReadListEntry( const QString &, bool * = 0 ) const; | 117 | QStringList sysReadListEntry( const QString &, bool * = 0 ) const; |
118 | QStringList sysReadListEntry( const QString &, const QChar& sep, bool * = 0 ) const; | 118 | QStringList sysReadListEntry( const QString &, const QChar& sep, bool * = 0 ) const; |
119 | QStringsysReadEntry( const QString &, const QString &def = QString::null, bool * = 0 ) const; | 119 | QStringsysReadEntry( const QString &, const QString &def = QString::null, bool * = 0 ) const; |
120 | int sysReadNumEntry( const QString &, int def = 0, bool * = 0 ) const; | 120 | int sysReadNumEntry( const QString &, int def = 0, bool * = 0 ) const; |
121 | doublesysReadDoubleEntry( const QString &, double def = 0, bool * = 0 ) const; | 121 | doublesysReadDoubleEntry( const QString &, double def = 0, bool * = 0 ) const; |
122 | boolsysReadBoolEntry( const QString &, bool def = 0, bool * = 0 ) const; | 122 | boolsysReadBoolEntry( const QString &, bool def = 0, bool * = 0 ) const; |
123 | 123 | ||
124 | boolsysRemoveEntry( const QString & ); | 124 | boolsysRemoveEntry( const QString & ); |
125 | 125 | ||
126 | boolsysSync(); | 126 | boolsysSync(); |
127 | 127 | ||
128 | voidsysInsertSearchPath( QSettings::System, const QString & ); | 128 | voidsysInsertSearchPath( QSettings::System, const QString & ); |
129 | voidsysRemoveSearchPath( QSettings::System, const QString & ); | 129 | voidsysRemoveSearchPath( QSettings::System, const QString & ); |
130 | #endif | 130 | #endif |
131 | }; | 131 | }; |
132 | 132 | ||
133 | #endif // QSETTINGS_P_H | 133 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Includes system files for shared memory | 4 | ** Includes system files for shared memory |
5 | ** | 5 | ** |
6 | ** Created : 020124 | 6 | ** Created : 020124 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 10 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed and/or modified under the terms of the | 12 | ** This file may be distributed and/or modified under the terms of the |
13 | ** GNU General Public License version 2 as published by the Free Software | 13 | ** GNU General Public License version 2 as published by the Free Software |
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | 14 | ** Foundation and appearing in the file LICENSE.GPL included in the |
15 | ** packaging of this file. | 15 | ** packaging of this file. |
16 | ** | 16 | ** |
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
18 | ** licenses for Qt/Embedded may use this file in accordance with the | 18 | ** licenses for Qt/Embedded may use this file in accordance with the |
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | 19 | ** Qt Embedded Commercial License Agreement provided with the Software. |
20 | ** | 20 | ** |
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
23 | ** | 23 | ** |
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
25 | ** information about Qt Commercial License Agreements. | 25 | ** information about Qt Commercial License Agreements. |
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
27 | ** | 27 | ** |
28 | ** Contact info@trolltech.com if any conditions of this licensing are | 28 | ** Contact info@trolltech.com if any conditions of this licensing are |
29 | ** not clear to you. | 29 | ** not clear to you. |
30 | ** | 30 | ** |
31 | **********************************************************************/ | 31 | **********************************************************************/ |
32 | 32 | ||
33 | #ifndef QSHAREDMEMORY_P_H | ||
34 | #define QSHAREDMEMORY_P_H | ||
35 | |||
33 | // | 36 | // |
34 | // W A R N I N G | 37 | // W A R N I N G |
35 | // ------------- | 38 | // ------------- |
36 | // | 39 | // |
37 | // This file is not part of the Qt API. It exists for the convenience | 40 | // This file is not part of the Qt API. It exists for the convenience |
38 | // of qapplication_qws.cpp and qgfxvnc_qws.cpp. This header file may | 41 | // of qapplication_qws.cpp and qgfxvnc_qws.cpp. This header file may |
39 | // change from version to version without notice, or even be removed. | 42 | // change from version to version without notice, or even be removed. |
40 | // | 43 | // |
44 | // We mean it. | ||
45 | // | ||
41 | // | 46 | // |
42 | |||
43 | #if !defined(QT_QSHM_H) | ||
44 | #define QT_QSHM_H | ||
45 | 47 | ||
46 | #include <qstring.h> | 48 | #include <qstring.h> |
47 | 49 | ||
48 | #if !defined (QT_QWS_NO_SHM) | 50 | #if !defined (QT_QWS_NO_SHM) |
49 | 51 | ||
50 | #include <sys/types.h> | 52 | #include <sys/types.h> |
51 | #include <sys/ipc.h> | 53 | #include <sys/ipc.h> |
52 | 54 | ||
53 | class QSharedMemory { | 55 | class QSharedMemory { |
54 | public: | 56 | public: |
55 | QSharedMemory(){}; | 57 | QSharedMemory(){}; |
56 | QSharedMemory(int, QString, char c = 'Q'); | 58 | QSharedMemory(int, QString, char c = 'Q'); |
57 | ~QSharedMemory(){}; | 59 | ~QSharedMemory(){}; |
58 | 60 | ||
59 | bool create(); | 61 | bool create(); |
60 | void destroy(); | 62 | void destroy(); |
61 | 63 | ||
62 | bool attach(); | 64 | bool attach(); |
63 | void detach(); | 65 | void detach(); |
64 | 66 | ||
65 | void setPermissions(mode_t mode); | 67 | void setPermissions(mode_t mode); |
66 | int size(); | 68 | int size(); |
67 | void * base() { return shmBase; }; | 69 | void * base() { return shmBase; }; |
68 | 70 | ||
69 | private: | 71 | private: |
70 | void *shmBase; | 72 | void *shmBase; |
71 | int shmSize; | 73 | int shmSize; |
72 | QString shmFile; | 74 | QString shmFile; |
73 | char character; | 75 | char character; |
74 | #if defined(QT_POSIX_QSHM) | 76 | #if defined(QT_POSIX_QSHM) |
75 | int shmFD; | 77 | int shmFD; |
76 | #else | 78 | #else |
77 | int shmId; | 79 | int shmId; |
78 | key_t key; | 80 | key_t key; |
79 | int idInitted; | 81 | int idInitted; |
80 | #endif | 82 | #endif |
81 | }; | 83 | }; |
82 | 84 | ||
83 | #endif | 85 | #endif |
86 | |||
84 | #endif | 87 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | ||
2 | ** | 3 | ** |
3 | ** Definition of QSqlDriverInterface class | 4 | ** Definition of QSqlDriverInterface class |
4 | ** | 5 | ** |
5 | ** Created : 2000-11-03 | 6 | ** Created : 2000-11-03 |
6 | ** | 7 | ** |
7 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
8 | ** | 9 | ** |
9 | ** This file is part of the sql module of the Qt GUI Toolkit. | 10 | ** This file is part of the sql module of the Qt GUI Toolkit. |
10 | ** | 11 | ** |
11 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
12 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
13 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
14 | ** | 15 | ** |
15 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
16 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
17 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
18 | ** packaging of this file. | 19 | ** packaging of this file. |
19 | ** | 20 | ** |
20 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | 21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this |
21 | ** file in accordance with the Qt Commercial License Agreement provided | 22 | ** file in accordance with the Qt Commercial License Agreement provided |
22 | ** with the Software. | 23 | ** with the Software. |
23 | ** | 24 | ** |
24 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
25 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
26 | ** | 27 | ** |
27 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
28 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
29 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
30 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
31 | ** | 32 | ** |
32 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
33 | ** not clear to you. | 34 | ** not clear to you. |
34 | ** | 35 | ** |
35 | **********************************************************************/ | 36 | **********************************************************************/ |
36 | 37 | ||
37 | #ifndef QSQLDRIVERINTERFACE_H | 38 | #ifndef QSQLDRIVERINTERFACE_H |
38 | #define QSQLDRIVERINTERFACE_H | 39 | #define QSQLDRIVERINTERFACE_H |
39 | 40 | ||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. This header file may | ||
46 | // change from version to version without notice, or even be | ||
47 | // removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
40 | #ifndef QT_H | 53 | #ifndef QT_H |
41 | #include <private/qcom_p.h> | 54 | #include <private/qcom_p.h> |
42 | #endif // QT_H | 55 | #endif // QT_H |
43 | 56 | ||
44 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) | 57 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) |
45 | #define QM_EXPORT_SQL | 58 | #define QM_EXPORT_SQL |
46 | #else | 59 | #else |
47 | #define QM_EXPORT_SQL Q_EXPORT | 60 | #define QM_EXPORT_SQL Q_EXPORT |
48 | #endif | 61 | #endif |
49 | 62 | ||
50 | #ifndef QT_NO_SQL | 63 | #ifndef QT_NO_SQL |
51 | 64 | ||
52 | #ifndef QT_NO_COMPONENT | 65 | #ifndef QT_NO_COMPONENT |
53 | 66 | ||
54 | // {EDDD5AD5-DF3C-400c-A711-163B72FE5F61} | 67 | // {EDDD5AD5-DF3C-400c-A711-163B72FE5F61} |
55 | #ifndef IID_QSqlDriverFactory | 68 | #ifndef IID_QSqlDriverFactory |
56 | #define IID_QSqlDriverFactory QUuid(0xeddd5ad5, 0xdf3c, 0x400c, 0xa7, 0x11, 0x16, 0x3b, 0x72, 0xfe, 0x5f, 0x61) | 69 | #define IID_QSqlDriverFactory QUuid(0xeddd5ad5, 0xdf3c, 0x400c, 0xa7, 0x11, 0x16, 0x3b, 0x72, 0xfe, 0x5f, 0x61) |
57 | #endif | 70 | #endif |
58 | 71 | ||
59 | class QSqlDriver; | 72 | class QSqlDriver; |
60 | 73 | ||
61 | struct QM_EXPORT_SQL QSqlDriverFactoryInterface : public QFeatureListInterface | 74 | struct QM_EXPORT_SQL QSqlDriverFactoryInterface : public QFeatureListInterface |
62 | { | 75 | { |
63 | virtual QSqlDriver* create( const QString& name ) = 0; | 76 | virtual QSqlDriver* create( const QString& name ) = 0; |
64 | }; | 77 | }; |
65 | 78 | ||
66 | #endif //QT_NO_COMPONENT | 79 | #endif //QT_NO_COMPONENT |
67 | #endif // QT_NO_SQL | 80 | #endif // QT_NO_SQL |
68 | 81 | ||
69 | #endif // QSQLDRIVERINTERFACE_H | 82 | #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 @@ | |||
6 | ** | 6 | ** |
7 | ** Copyright (C) 2002 Trolltech AS. All rights reserved. | 7 | ** Copyright (C) 2002 Trolltech AS. All rights reserved. |
8 | ** | 8 | ** |
9 | ** This file is part of the sql module of the Qt GUI Toolkit. | 9 | ** This file is part of the sql module of the Qt GUI Toolkit. |
10 | ** | 10 | ** |
11 | ** This file may be distributed under the terms of the Q Public License | 11 | ** This file may be distributed under the terms of the Q Public License |
12 | ** as defined by Trolltech AS of Norway and appearing in the file | 12 | ** as defined by Trolltech AS of Norway and appearing in the file |
13 | ** LICENSE.QPL included in the packaging of this file. | 13 | ** LICENSE.QPL included in the packaging of this file. |
14 | ** | 14 | ** |
15 | ** This file may be distributed and/or modified under the terms of the | 15 | ** This file may be distributed and/or modified under the terms of the |
16 | ** GNU General Public License version 2 as published by the Free Software | 16 | ** GNU General Public License version 2 as published by the Free Software |
17 | ** Foundation and appearing in the file LICENSE.GPL included in the | 17 | ** Foundation and appearing in the file LICENSE.GPL included in the |
18 | ** packaging of this file. | 18 | ** packaging of this file. |
19 | ** | 19 | ** |
20 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | 20 | ** Licensees holding valid Qt Enterprise Edition licenses may use this |
21 | ** file in accordance with the Qt Commercial License Agreement provided | 21 | ** file in accordance with the Qt Commercial License Agreement provided |
22 | ** with the Software. | 22 | ** with the Software. |
23 | ** | 23 | ** |
24 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 24 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
25 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 25 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
26 | ** | 26 | ** |
27 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 27 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
28 | ** information about Qt Commercial License Agreements. | 28 | ** information about Qt Commercial License Agreements. |
29 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 29 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
30 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 30 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
31 | ** | 31 | ** |
32 | ** Contact info@trolltech.com if any conditions of this licensing are | 32 | ** Contact info@trolltech.com if any conditions of this licensing are |
33 | ** not clear to you. | 33 | ** not clear to you. |
34 | ** | 34 | ** |
35 | **********************************************************************/ | 35 | **********************************************************************/ |
36 | 36 | ||
37 | #ifndef QSQLEXTENSION_P_H | 37 | #ifndef QSQLEXTENSION_P_H |
38 | #define QSQLEXTENSION_P_H | 38 | #define QSQLEXTENSION_P_H |
39 | 39 | ||
40 | // | 40 | // |
41 | // W A R N I N G | 41 | // W A R N I N G |
42 | // ------------- | 42 | // ------------- |
43 | // | 43 | // |
44 | // This file is not part of the Qt API. It exists for the convenience | 44 | // This file is not part of the Qt API. It exists for the convenience |
45 | // of other Qt classes. This header file may change from version to | 45 | // of other Qt classes. This header file may change from version to |
46 | // version without notice, or even be removed. | 46 | // version without notice, or even be removed. |
47 | // | 47 | // |
48 | // We mean it. | 48 | // We mean it. |
49 | // | 49 | // |
50 | // | 50 | // |
51 | 51 | ||
52 | #ifndef QT_H | 52 | #ifndef QT_H |
53 | #include "qmap.h" | 53 | #include "qmap.h" |
54 | #include "qvaluevector.h" | ||
54 | #include "qstring.h" | 55 | #include "qstring.h" |
55 | #include "qvariant.h" | 56 | #include "qvariant.h" |
57 | #include "qsql.h" | ||
56 | #endif // QT_H | 58 | #endif // QT_H |
57 | 59 | ||
58 | #ifndef QT_NO_SQL | 60 | #ifndef QT_NO_SQL |
59 | 61 | ||
60 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) | 62 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) |
61 | #define QM_EXPORT_SQL | 63 | #define QM_EXPORT_SQL |
64 | #define QM_TEMPLATE_EXTERN_SQL | ||
62 | #else | 65 | #else |
63 | #define QM_EXPORT_SQL Q_EXPORT | 66 | #define QM_EXPORT_SQL Q_EXPORT |
67 | #define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN | ||
64 | #endif | 68 | #endif |
65 | 69 | ||
70 | struct Param { | ||
71 | Param( const QVariant& v = QVariant(), QSql::ParameterType t = QSql::In ): value( v ), typ( t ) {} | ||
72 | QVariant value; | ||
73 | QSql::ParameterType typ; | ||
74 | Q_DUMMY_COMPARISON_OPERATOR(Param) | ||
75 | }; | ||
76 | |||
77 | struct Holder { | ||
78 | Holder( const QString& hldr = QString::null, int pos = -1 ): holderName( hldr ), holderPos( pos ) {} | ||
79 | bool operator==( const Holder& h ) const { return h.holderPos == holderPos && h.holderName == holderName; } | ||
80 | bool operator!=( const Holder& h ) const { return h.holderPos != holderPos || h.holderName != holderName; } | ||
81 | QString holderName; | ||
82 | int holderPos; | ||
83 | }; | ||
84 | |||
66 | #if defined(Q_TEMPLATEDLL) | 85 | #if defined(Q_TEMPLATEDLL) |
67 | Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<QString,QVariant>; | 86 | QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<QString,Param>; |
68 | Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<int,QString>; | 87 | QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QMap<int,QString>; |
88 | QM_TEMPLATE_EXTERN_SQL template class QM_EXPORT_SQL QValueVector<Holder>; | ||
69 | #endif | 89 | #endif |
70 | 90 | ||
71 | class QM_EXPORT_SQL QSqlExtension { | 91 | class QM_EXPORT_SQL QSqlExtension { |
72 | public: | 92 | public: |
73 | QSqlExtension(); | 93 | QSqlExtension(); |
74 | virtual ~QSqlExtension(); | 94 | virtual ~QSqlExtension(); |
75 | virtual bool prepare( const QString& query ); | 95 | virtual bool prepare( const QString& query ); |
76 | virtual bool exec(); | 96 | virtual bool exec(); |
77 | virtual void bindValue( const QString& holder, const QVariant& value ); | 97 | virtual void bindValue( const QString& holder, const QVariant& value, QSql::ParameterType = QSql::In ); |
78 | virtual void bindValue( int pos, const QVariant& value ); | 98 | virtual void bindValue( int pos, const QVariant& value, QSql::ParameterType = QSql::In ); |
79 | virtual void addBindValue( const QVariant& value ); | 99 | virtual void addBindValue( const QVariant& value, QSql::ParameterType = QSql::In ); |
100 | virtual QVariant parameterValue( const QString& holder ); | ||
101 | virtual QVariant parameterValue( int pos ); | ||
80 | void clearValues(); | 102 | void clearValues(); |
81 | void clearIndex(); | 103 | void clearIndex(); |
82 | 104 | ||
83 | enum BindMethod { BindByPosition, BindByName }; | 105 | enum BindMethod { BindByPosition, BindByName }; |
84 | BindMethod bindMethod(); | 106 | BindMethod bindMethod(); |
85 | BindMethod bindm; | 107 | BindMethod bindm; |
86 | int bindCount; | 108 | int bindCount; |
87 | 109 | ||
88 | QMap<int, QString> index; | 110 | QMap<int, QString> index; |
89 | QMap<QString, QVariant> values; | 111 | typedef QMap<QString, Param> ValueMap; |
112 | ValueMap values; | ||
113 | |||
114 | // convenience container for QSqlQuery | ||
115 | // to map holders <-> positions | ||
116 | typedef QValueVector<Holder> HolderVector; | ||
117 | HolderVector holders; | ||
90 | }; | 118 | }; |
91 | 119 | ||
92 | class QM_EXPORT_SQL QSqlDriverExtension | 120 | class QM_EXPORT_SQL QSqlDriverExtension |
93 | { | 121 | { |
94 | public: | 122 | public: |
95 | QSqlDriverExtension(); | 123 | QSqlDriverExtension(); |
96 | virtual ~QSqlDriverExtension(); | 124 | virtual ~QSqlDriverExtension(); |
97 | virtual bool isOpen() const = 0; | 125 | virtual bool isOpen() const = 0; |
98 | }; | 126 | }; |
99 | |||
100 | #endif | 127 | #endif |
101 | #endif | 128 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** ... | 4 | ** ... |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** This file is part of the widgets module of the Qt GUI Toolkit. | 8 | ** This file is part of the widgets module of the Qt GUI Toolkit. |
9 | ** | 9 | ** |
10 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
11 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
12 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
15 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
17 | ** packaging of this file. | 17 | ** packaging of this file. |
18 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
20 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
21 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
22 | ** | 22 | ** |
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
25 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
27 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 30 | ** |
31 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
32 | ** not clear to you. | 32 | ** not clear to you. |
33 | ** | 33 | ** |
34 | **********************************************************************/ | 34 | **********************************************************************/ |
35 | 35 | ||
36 | #ifndef QSTYLEINTERFACE_H | 36 | #ifndef QSTYLEINTERFACE_P_H |
37 | #define QSTYLEINTERFACE_H | 37 | #define QSTYLEINTERFACE_P_H |
38 | |||
39 | // | ||
40 | // W A R N I N G | ||
41 | // ------------- | ||
42 | // | ||
43 | // This file is not part of the Qt API. This header file may | ||
44 | // change from version to version without notice, or even be | ||
45 | // removed. | ||
46 | // | ||
47 | // We mean it. | ||
48 | // | ||
49 | // | ||
38 | 50 | ||
39 | #ifndef QT_H | 51 | #ifndef QT_H |
40 | #include <private/qcom_p.h> | 52 | #include <private/qcom_p.h> |
41 | #endif // QT_H | 53 | #endif // QT_H |
42 | 54 | ||
43 | #ifndef QT_NO_STYLE | 55 | #ifndef QT_NO_STYLE |
44 | #ifndef QT_NO_COMPONENT | 56 | #ifndef QT_NO_COMPONENT |
45 | 57 | ||
46 | class QStyle; | 58 | class QStyle; |
47 | 59 | ||
48 | // {FC1B6EBE-053C-49c1-A483-C377739AB9A5} | 60 | // {FC1B6EBE-053C-49c1-A483-C377739AB9A5} |
49 | #ifndef IID_QStyleFactory | 61 | #ifndef IID_QStyleFactory |
50 | #define IID_QStyleFactory QUuid(0xfc1b6ebe, 0x53c, 0x49c1, 0xa4, 0x83, 0xc3, 0x77, 0x73, 0x9a, 0xb9, 0xa5) | 62 | #define IID_QStyleFactory QUuid(0xfc1b6ebe, 0x53c, 0x49c1, 0xa4, 0x83, 0xc3, 0x77, 0x73, 0x9a, 0xb9, 0xa5) |
51 | #endif | 63 | #endif |
52 | 64 | ||
53 | struct Q_EXPORT QStyleFactoryInterface : public QFeatureListInterface | 65 | struct Q_EXPORT QStyleFactoryInterface : public QFeatureListInterface |
54 | { | 66 | { |
55 | virtual QStyle* create( const QString& style ) = 0; | 67 | virtual QStyle* create( const QString& style ) = 0; |
56 | }; | 68 | }; |
57 | 69 | ||
58 | #endif //QT_NO_COMPONENT | 70 | #endif //QT_NO_COMPONENT |
59 | #endif //QT_NO_STYLE | 71 | #endif //QT_NO_STYLE |
60 | 72 | ||
61 | #endif //QSTYLEINTERFACE_H | 73 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of the QSvgDevice class | 4 | ** Definition of the QSvgDevice class |
5 | ** | 5 | ** |
6 | ** Created : 20001024 | 6 | ** Created : 001024 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the xml module of the Qt GUI Toolkit. | 10 | ** This file is part of the xml module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | 21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this |
22 | ** file in accordance with the Qt Commercial License Agreement provided | 22 | ** file in accordance with the Qt Commercial License Agreement provided |
23 | ** with the Software. | 23 | ** with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | *****************************************************************************/ | 36 | *****************************************************************************/ |
37 | 37 | ||
38 | #ifndef QSVGDEVICE_H | 38 | #ifndef QSVGDEVICE_P_H |
39 | #define QSVGDEVICE_H | 39 | #define QSVGDEVICE_P_H |
40 | 40 | ||
41 | // | 41 | // |
42 | // W A R N I N G | 42 | // W A R N I N G |
43 | // ------------- | 43 | // ------------- |
44 | // | 44 | // |
45 | // This file is not part of the Qt API. It exists for the convenience | 45 | // This file is not part of the Qt API. It exists for the convenience |
46 | // of the QPicture class. This header file may change from | 46 | // of the QPicture class. This header file may change from |
47 | // version to version without notice, or even be removed. | 47 | // version to version without notice, or even be removed. |
48 | // | 48 | // |
49 | // We mean it. | 49 | // We mean it. |
50 | // | 50 | // |
51 | // | 51 | // |
52 | 52 | ||
53 | #ifndef QT_H | 53 | #ifndef QT_H |
54 | #include "qpaintdevice.h" | 54 | #include "qpaintdevice.h" |
55 | #include "qrect.h" | 55 | #include "qrect.h" |
56 | #include "qdom.h" | 56 | #include "qdom.h" |
57 | #endif // QT_H | 57 | #endif // QT_H |
58 | 58 | ||
59 | #if !defined(QT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML ) | 59 | #if !defined(QT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML ) |
60 | #define QM_EXPORT_SVG | 60 | #define QM_EXPORT_SVG |
61 | #else | 61 | #else |
62 | #define QM_EXPORT_SVG Q_EXPORT | 62 | #define QM_EXPORT_SVG Q_EXPORT |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #ifndef QT_NO_SVG | 65 | #ifndef QT_NO_SVG |
66 | 66 | ||
67 | class QPainter; | 67 | class QPainter; |
68 | class QDomNode; | 68 | class QDomNode; |
69 | class QDomNamedNodeMap; | 69 | class QDomNamedNodeMap; |
70 | struct QSvgDeviceState; | 70 | struct QSvgDeviceState; |
71 | class QSvgDevicePrivate; | 71 | class QSvgDevicePrivate; |
72 | 72 | ||
73 | class QM_EXPORT_SVG QSvgDevice : public QPaintDevice | 73 | class QM_EXPORT_SVG QSvgDevice : public QPaintDevice |
74 | { | 74 | { |
75 | public: | 75 | public: |
76 | QSvgDevice(); | 76 | QSvgDevice(); |
77 | ~QSvgDevice(); | 77 | ~QSvgDevice(); |
78 | 78 | ||
79 | bool play( QPainter *p ); | 79 | bool play( QPainter *p ); |
80 | 80 | ||
81 | QString toString() const; | 81 | QString toString() const; |
82 | 82 | ||
83 | bool load( QIODevice *dev ); | 83 | bool load( QIODevice *dev ); |
84 | bool save( QIODevice *dev ); | 84 | bool save( QIODevice *dev ); |
85 | bool save( const QString &fileName ); | 85 | bool save( const QString &fileName ); |
86 | 86 | ||
87 | QRect boundingRect() const; | 87 | QRect boundingRect() const; |
88 | void setBoundingRect( const QRect &r ); | 88 | void setBoundingRect( const QRect &r ); |
89 | 89 | ||
90 | protected: | 90 | protected: |
91 | virtual bool cmd ( int, QPainter*, QPDevCmdParam* ); | 91 | virtual bool cmd ( int, QPainter*, QPDevCmdParam* ); |
92 | virtual int metric( int ) const; | 92 | virtual int metric( int ) const; |
93 | 93 | ||
94 | private: | 94 | private: |
95 | // reading | 95 | // reading |
96 | bool play( const QDomNode &node ); | 96 | bool play( const QDomNode &node ); |
97 | void saveAttributes(); | 97 | void saveAttributes(); |
98 | void restoreAttributes(); | 98 | void restoreAttributes(); |
99 | QColor parseColor( const QString &col ); | 99 | QColor parseColor( const QString &col ); |
100 | double parseLen( const QString &str, bool *ok=0, bool horiz=TRUE ) const; | 100 | double parseLen( const QString &str, bool *ok=0, bool horiz=TRUE ) const; |
101 | int lenToInt( const QDomNamedNodeMap &map, const QString &attr, | 101 | int lenToInt( const QDomNamedNodeMap &map, const QString &attr, |
102 | int def=0 ) const; | 102 | int def=0 ) const; |
103 | void setStyleProperty( const QString &prop, const QString &val, | 103 | void setStyleProperty( const QString &prop, const QString &val, |
104 | QPen *pen, QFont *font, int *talign ); | 104 | QPen *pen, QFont *font, int *talign ); |
105 | void setStyle( const QString &s ); | 105 | void setStyle( const QString &s ); |
106 | void setTransform( const QString &tr ); | 106 | void setTransform( const QString &tr ); |
107 | void drawPath( const QString &data ); | 107 | void drawPath( const QString &data ); |
108 | 108 | ||
109 | // writing | 109 | // writing |
110 | void applyStyle( QDomElement *e, int c ) const; | 110 | void applyStyle( QDomElement *e, int c ) const; |
111 | void applyTransform( QDomElement *e ) const; | 111 | void applyTransform( QDomElement *e ) const; |
112 | 112 | ||
113 | // reading | 113 | // reading |
114 | QRect brect; // bounding rectangle | 114 | QRect brect; // bounding rectangle |
115 | QDomDocument doc; // document tree | 115 | QDomDocument doc; // document tree |
116 | QDomNode current; | 116 | QDomNode current; |
117 | QPoint curPt; | 117 | QPoint curPt; |
118 | QSvgDeviceState *curr; | 118 | QSvgDeviceState *curr; |
119 | QPainter *pt; // used by play() et al | 119 | QPainter *pt; // used by play() et al |
120 | 120 | ||
121 | // writing | 121 | // writing |
122 | bool dirtyTransform, dirtyStyle; | 122 | bool dirtyTransform, dirtyStyle; |
123 | 123 | ||
124 | QSvgDevicePrivate *d; | 124 | QSvgDevicePrivate *d; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | inline QRect QSvgDevice::boundingRect() const | 127 | inline QRect QSvgDevice::boundingRect() const |
128 | { | 128 | { |
129 | return brect; | 129 | return brect; |
130 | } | 130 | } |
131 | 131 | ||
132 | #endif // QT_NO_SVG | 132 | #endif // QT_NO_SVG |
133 | 133 | ||
134 | #endif // QSVGDEVICE_H | 134 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QTextCodecFactoryInterface interface | 4 | ** Definition of QTextCodecFactoryInterface interface |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | 8 | ** This file is part of the tools module of the Qt GUI Toolkit. |
9 | ** | 9 | ** |
10 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
11 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
12 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
15 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
17 | ** packaging of this file. | 17 | ** packaging of this file. |
18 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
20 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
21 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
22 | ** | 22 | ** |
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
25 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
27 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 30 | ** |
31 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
32 | ** not clear to you. | 32 | ** not clear to you. |
33 | ** | 33 | ** |
34 | **********************************************************************/ | 34 | **********************************************************************/ |
35 | 35 | ||
36 | #ifndef QTEXTCODECINTERFACE_P_H | 36 | #ifndef QTEXTCODECINTERFACE_P_H |
37 | #define QTEXTCODECINTERFACE_P_H | 37 | #define QTEXTCODECINTERFACE_P_H |
38 | 38 | ||
39 | |||
40 | // | 39 | // |
41 | // W A R N I N G | 40 | // W A R N I N G |
42 | // ------------- | 41 | // ------------- |
43 | // | 42 | // |
44 | // This file is not part of the Qt API. It exists for the convenience | 43 | // This file is not part of the Qt API. It exists for the convenience |
45 | // of qpsprinter.cpp and qprinter_x11.cpp. | 44 | // of qpsprinter.cpp and qprinter_x11.cpp. |
46 | // This header file may change from version to version without notice, | 45 | // This header file may change from version to version without notice, |
47 | // or even be removed. | 46 | // or even be removed. |
48 | // | 47 | // |
49 | // We mean it. | 48 | // We mean it. |
50 | // | 49 | // |
51 | // | 50 | // |
52 | 51 | ||
53 | |||
54 | #ifndef QT_H | 52 | #ifndef QT_H |
55 | #include <private/qcom_p.h> | 53 | #include <private/qcom_p.h> |
56 | #endif // QT_H | 54 | #endif // QT_H |
57 | 55 | ||
58 | #ifndef QT_NO_TEXTCODEC | 56 | #ifndef QT_NO_TEXTCODEC |
59 | #ifndef QT_NO_COMPONENT | 57 | #ifndef QT_NO_COMPONENT |
60 | 58 | ||
61 | class QTextCodec; | 59 | class QTextCodec; |
62 | 60 | ||
63 | 61 | ||
64 | // {F55BFA60-F695-11D4-823E-009027DC0F37} | 62 | // {F55BFA60-F695-11D4-823E-009027DC0F37} |
65 | #ifndef IID_QTextCodecFactory | 63 | #ifndef IID_QTextCodecFactory |
66 | #define IID_QTextCodecFactory QUuid( 0xf55bfa60, 0xf695, 0x11d4, 0x82, 0x3e, 0x00, 0x90, 0x27, 0xdc, 0x0f, 0x37) | 64 | #define IID_QTextCodecFactory QUuid( 0xf55bfa60, 0xf695, 0x11d4, 0x82, 0x3e, 0x00, 0x90, 0x27, 0xdc, 0x0f, 0x37) |
67 | #endif | 65 | #endif |
68 | 66 | ||
69 | 67 | ||
70 | struct Q_EXPORT QTextCodecFactoryInterface : public QFeatureListInterface | 68 | struct Q_EXPORT QTextCodecFactoryInterface : public QFeatureListInterface |
71 | { | 69 | { |
72 | virtual QTextCodec *createForMib( int mib ) = 0; | 70 | virtual QTextCodec *createForMib( int mib ) = 0; |
73 | virtual QTextCodec *createForName( const QString &name ) = 0; | 71 | virtual QTextCodec *createForName( const QString &name ) = 0; |
74 | }; | 72 | }; |
75 | 73 | ||
76 | #endif // QT_NO_COMPONENT | 74 | #endif // QT_NO_COMPONENT |
77 | #endif // QT_NO_TEXTCODEC | 75 | #endif // QT_NO_TEXTCODEC |
78 | 76 | ||
79 | #endif // QTEXTCODECINTERFACE_P_H | 77 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of some Qt private functions. | 4 | ** Definition of some Qt private functions. |
5 | ** | 5 | ** |
6 | ** Created : 2000-01-01 | 6 | ** Created : 000101 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the widgets module of the Qt GUI Toolkit. | 10 | ** This file is part of the widgets module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QTITLEBAR_P_H | 38 | #ifndef QTITLEBAR_P_H |
39 | #define QTITLEBAR_P_H | 39 | #define QTITLEBAR_P_H |
40 | 40 | ||
41 | 41 | ||
42 | // | 42 | // |
43 | // W A R N I N G | 43 | // W A R N I N G |
44 | // ------------- | 44 | // ------------- |
45 | // | 45 | // |
46 | // This file is not part of the Qt API. It exists for the convenience | 46 | // This file is not part of the Qt API. It exists for the convenience |
47 | // of qworkspace.cpp and qdockwindow.cpp. This header file may change | 47 | // of qworkspace.cpp and qdockwindow.cpp. This header file may change |
48 | // from version to version without notice, or even be removed. | 48 | // from version to version without notice, or even be removed. |
49 | // | 49 | // |
50 | // We mean it. | 50 | // We mean it. |
51 | // | 51 | // |
52 | // | 52 | // |
53 | 53 | ||
54 | 54 | ||
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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of the QUcom interfaces | 4 | ** Definition of the QUcom interfaces |
5 | ** | 5 | ** |
6 | ** Created : 990101 | 6 | ** Created : 990101 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QUCOM_H | 38 | #ifndef QUCOM_P_H |
39 | #define QUCOM_H | 39 | #define QUCOM_P_H |
40 | |||
41 | #ifndef QT_H | ||
42 | #include <qstring.h> | ||
43 | #include "quuid.h" | ||
44 | #endif // QT_H | ||
45 | 40 | ||
46 | // | 41 | // |
47 | // W A R N I N G | 42 | // W A R N I N G |
48 | // ------------- | 43 | // ------------- |
49 | // | 44 | // |
50 | // This file is not part of the Qt API. It exists for the convenience | 45 | // This file is not part of the Qt API. It exists for the convenience |
51 | // of a number of Qt sources files. This header file may change from | 46 | // of a number of Qt sources files. This header file may change from |
52 | // version to version without notice, or even be removed. | 47 | // version to version without notice, or even be removed. |
53 | // | 48 | // |
54 | // We mean it. | 49 | // We mean it. |
55 | // | 50 | // |
56 | // | 51 | // |
57 | 52 | ||
53 | #ifndef QT_H | ||
54 | #include <qstring.h> | ||
55 | #include "quuid.h" | ||
56 | #endif // QT_H | ||
57 | |||
58 | #ifdef check | 58 | #ifdef check |
59 | #undef check | 59 | #undef check |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | struct QUObject; | 62 | struct QUObject; |
63 | struct QUInterfaceDescription; | 63 | struct QUInterfaceDescription; |
64 | struct QUnknownInterface; | 64 | struct QUnknownInterface; |
65 | struct QDispatchInterface; | 65 | struct QDispatchInterface; |
66 | 66 | ||
67 | 67 | ||
68 | struct Q_EXPORT QUBuffer | 68 | struct Q_EXPORT QUBuffer |
69 | { | 69 | { |
70 | virtual long read( char *data, ulong maxlen ) = 0; | 70 | virtual long read( char *data, ulong maxlen ) = 0; |
71 | virtual long write( const char *data, ulong len ) = 0; | 71 | virtual long write( const char *data, ulong len ) = 0; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | 74 | ||
75 | // A type for a QUObject | 75 | // A type for a QUObject |
76 | struct Q_EXPORT QUType | 76 | struct Q_EXPORT QUType |
77 | { | 77 | { |
78 | virtual const QUuid *uuid() const = 0; | 78 | virtual const QUuid *uuid() const = 0; |
79 | virtual const char *desc() const = 0; | 79 | virtual const char *desc() const = 0; |
80 | 80 | ||
81 | 81 | ||
82 | virtual bool canConvertFrom( QUObject *, QUType * ) = 0; | 82 | virtual bool canConvertFrom( QUObject *, QUType * ) = 0; |
83 | // virtual private, only called by canConvertFrom | 83 | // virtual private, only called by canConvertFrom |
84 | virtual bool canConvertTo( QUObject *, QUType * ) = 0; | 84 | virtual bool canConvertTo( QUObject *, QUType * ) = 0; |
85 | 85 | ||
86 | 86 | ||
87 | virtual bool convertFrom( QUObject *, QUType * ) = 0; | 87 | virtual bool convertFrom( QUObject *, QUType * ) = 0; |
88 | // virtual private, only called by convertFrom | 88 | // virtual private, only called by convertFrom |
89 | virtual bool convertTo( QUObject *, QUType * ) = 0; | 89 | virtual bool convertTo( QUObject *, QUType * ) = 0; |
90 | 90 | ||
91 | virtual void clear( QUObject * ) = 0; | 91 | virtual void clear( QUObject * ) = 0; |
92 | 92 | ||
93 | virtual int serializeTo( QUObject *, QUBuffer * ) = 0; | 93 | virtual int serializeTo( QUObject *, QUBuffer * ) = 0; |
94 | virtual int serializeFrom( QUObject *, QUBuffer * ) = 0; | 94 | virtual int serializeFrom( QUObject *, QUBuffer * ) = 0; |
95 | 95 | ||
96 | static bool isEqual( const QUType *t1, const QUType *t2 ); | 96 | static bool isEqual( const QUType *t1, const QUType *t2 ); |
97 | static bool check( QUObject* o, QUType* t ); | 97 | static bool check( QUObject* o, QUType* t ); |
98 | }; | 98 | }; |
99 | 99 | ||
100 | 100 | ||
101 | // {DE56510E-4E9F-4b76-A3C2-D1E2EF42F1AC} | 101 | // {DE56510E-4E9F-4b76-A3C2-D1E2EF42F1AC} |
102 | extern Q_EXPORT const QUuid TID_QUType_Null; | 102 | extern Q_EXPORT const QUuid TID_QUType_Null; |
103 | struct Q_EXPORT QUType_Null : public QUType | 103 | struct Q_EXPORT QUType_Null : public QUType |
104 | { | 104 | { |
105 | const QUuid *uuid() const; | 105 | const QUuid *uuid() const; |
106 | const char *desc() const; | 106 | const char *desc() const; |
107 | 107 | ||
108 | bool canConvertFrom( QUObject *, QUType * ); | 108 | bool canConvertFrom( QUObject *, QUType * ); |
109 | bool canConvertTo( QUObject *, QUType * ); | 109 | bool canConvertTo( QUObject *, QUType * ); |
110 | bool convertFrom( QUObject *, QUType * ); | 110 | bool convertFrom( QUObject *, QUType * ); |
111 | bool convertTo( QUObject *, QUType * ); | 111 | bool convertTo( QUObject *, QUType * ); |
112 | void clear( QUObject * ); | 112 | void clear( QUObject * ); |
113 | int serializeTo( QUObject *, QUBuffer * ); | 113 | int serializeTo( QUObject *, QUBuffer * ); |
114 | int serializeFrom( QUObject *, QUBuffer * ); | 114 | int serializeFrom( QUObject *, QUBuffer * ); |
115 | }; | 115 | }; |
116 | extern Q_EXPORT QUType_Null static_QUType_Null; | 116 | extern Q_EXPORT QUType_Null static_QUType_Null; |
117 | 117 | ||
118 | 118 | ||
119 | // The magic QUObject | 119 | // The magic QUObject |
120 | struct Q_EXPORT QUObject | 120 | struct Q_EXPORT QUObject |
121 | { | 121 | { |
122 | public: // scary MSVC bug makes this necessary | 122 | public: // scary MSVC bug makes this necessary |
123 | QUObject() : type( &static_QUType_Null ) {} | 123 | QUObject() : type( &static_QUType_Null ) {} |
124 | ~QUObject() { type->clear( this ); } | 124 | ~QUObject() { type->clear( this ); } |
125 | 125 | ||
126 | QUType *type; | 126 | QUType *type; |
127 | 127 | ||
128 | // the unavoidable union | 128 | // the unavoidable union |
129 | union | 129 | union |
130 | { | 130 | { |
131 | bool b; | 131 | bool b; |
132 | 132 | ||
133 | char c; | 133 | char c; |
134 | short s; | 134 | short s; |
135 | int i; | 135 | int i; |
136 | long l; | 136 | long l; |
137 | 137 | ||
138 | unsigned char uc; | 138 | unsigned char uc; |
139 | unsigned short us; | 139 | unsigned short us; |
140 | unsigned int ui; | 140 | unsigned int ui; |
141 | unsigned long ul; | 141 | unsigned long ul; |
142 | 142 | ||
143 | float f; | 143 | float f; |
144 | double d; | 144 | double d; |
145 | 145 | ||
146 | char byte[16]; | 146 | char byte[16]; |
147 | 147 | ||
148 | struct { | 148 | struct { |
149 | char* data; | 149 | char* data; |
150 | unsigned long size; | 150 | unsigned long size; |
151 | } bytearray; | 151 | } bytearray; |
152 | 152 | ||
153 | void* ptr; | 153 | void* ptr; |
154 | 154 | ||
155 | struct { | 155 | struct { |
156 | void *ptr; | 156 | void *ptr; |
157 | bool owner; | 157 | bool owner; |
158 | } voidstar; | 158 | } voidstar; |
159 | 159 | ||
160 | struct { | 160 | struct { |
161 | char *ptr; | 161 | char *ptr; |
162 | bool owner; | 162 | bool owner; |
163 | } charstar; | 163 | } charstar; |
164 | 164 | ||
165 | struct { | 165 | struct { |
166 | char *ptr; | 166 | char *ptr; |
167 | bool owner; | 167 | bool owner; |
168 | } utf8; | 168 | } utf8; |
169 | 169 | ||
170 | struct { | 170 | struct { |
171 | char *ptr; | 171 | char *ptr; |
172 | bool owner; | 172 | bool owner; |
173 | } local8bit; | 173 | } local8bit; |
174 | 174 | ||
175 | QUnknownInterface* iface; | 175 | QUnknownInterface* iface; |
176 | QDispatchInterface* idisp; | 176 | QDispatchInterface* idisp; |
177 | 177 | ||
178 | } payload; | 178 | } payload; |
179 | 179 | ||
180 | }; | 180 | }; |
181 | 181 | ||
182 | 182 | ||
183 | // A parameter description describes one method parameters. A | 183 | // A parameter description describes one method parameters. A |
184 | // parameter has a name, a type and a flag describing whether it's an | 184 | // parameter has a name, a type and a flag describing whether it's an |
185 | // in parameter, an out parameter, or both ways | 185 | // in parameter, an out parameter, or both ways |
186 | struct Q_EXPORT QUParameter | 186 | struct Q_EXPORT QUParameter |
187 | { | 187 | { |
188 | const char* name; | 188 | const char* name; |
189 | QUType *type; | 189 | QUType *type; |
190 | const void* typeExtra; //Usually 0, UEnum* for QUType_enum, const char* for QUType_ptr, int* for QUType_varptr | 190 | const void* typeExtra; //Usually 0, UEnum* for QUType_enum, const char* for QUType_ptr, int* for QUType_varptr |
191 | enum { In = 1, Out = 2, InOut = In | Out }; | 191 | enum { In = 1, Out = 2, InOut = In | Out }; |
192 | int inOut; | 192 | int inOut; |
193 | }; | 193 | }; |
194 | 194 | ||
195 | // A method description describes one method. A method has a name and | 195 | // A method description describes one method. A method has a name and |
196 | // an array of parameters. | 196 | // an array of parameters. |
197 | struct Q_EXPORT QUMethod | 197 | struct Q_EXPORT QUMethod |
198 | { | 198 | { |
199 | const char* name; | 199 | const char* name; |
200 | int count; | 200 | int count; |
201 | const QUParameter* parameters; | 201 | const QUParameter* parameters; |
202 | }; | 202 | }; |
203 | 203 | ||
204 | // A Property description. Not used yet in the example. | 204 | // A Property description. Not used yet in the example. |
205 | struct Q_EXPORT QUProperty | 205 | struct Q_EXPORT QUProperty |
206 | { | 206 | { |
207 | const char* name; | 207 | const char* name; |
208 | QUType* type; | 208 | QUType* type; |
209 | const void* typeExtra; //type dependend. Usually 0, but UEnum for QUTypeenum or const char* for QUTypeptr | 209 | const void* typeExtra; //type dependend. Usually 0, but UEnum for QUTypeenum or const char* for QUTypeptr |
210 | 210 | ||
211 | int set; // -1 undefined | 211 | int set; // -1 undefined |
212 | int get; // -1 undefined | 212 | int get; // -1 undefined |
213 | 213 | ||
214 | int designable; // -1 FALSE, -2 TRUE, else method | 214 | int designable; // -1 FALSE, -2 TRUE, else method |
215 | int stored; // -1 FALSE, -2 TRUE, else method | 215 | int stored; // -1 FALSE, -2 TRUE, else method |
216 | }; | 216 | }; |
217 | 217 | ||
218 | // An interface description describes one interface, that is all its | 218 | // An interface description describes one interface, that is all its |
219 | // methods and properties. | 219 | // methods and properties. |
220 | struct Q_EXPORT QUInterfaceDescription | 220 | struct Q_EXPORT QUInterfaceDescription |
221 | { | 221 | { |
222 | int methodCount; | 222 | int methodCount; |
223 | const QUMethod* methods; | 223 | const QUMethod* methods; |
224 | int propertyCount; | 224 | int propertyCount; |
225 | const QUProperty* properties; | 225 | const QUProperty* properties; |
226 | }; | 226 | }; |
227 | 227 | ||
228 | 228 | ||
229 | // A component description describe one component, that is its name, | 229 | // A component description describe one component, that is its name, |
230 | // vendor, release, info, its component uuid and all its interface | 230 | // vendor, release, info, its component uuid and all its interface |
231 | // uuids. | 231 | // uuids. |
232 | struct Q_EXPORT QUComponentDescription | 232 | struct Q_EXPORT QUComponentDescription |
233 | { | 233 | { |
234 | const char* name; | 234 | const char* name; |
235 | const char* vendor; | 235 | const char* vendor; |
236 | const char* release; | 236 | const char* release; |
237 | const char* info; | 237 | const char* info; |
238 | QUuid cid; | 238 | QUuid cid; |
239 | int count; | 239 | int count; |
240 | const QUuid* interfaces; | 240 | const QUuid* interfaces; |
241 | }; | 241 | }; |
242 | 242 | ||
243 | 243 | ||
244 | // A component server description describe one component server, that | 244 | // A component server description describe one component server, that |
245 | // is its name, vendor, release, info and the descriptions of all | 245 | // is its name, vendor, release, info and the descriptions of all |
246 | // components it can instantiate. | 246 | // components it can instantiate. |
247 | struct Q_EXPORT QUComponentServerDescription | 247 | struct Q_EXPORT QUComponentServerDescription |
248 | { | 248 | { |
249 | const char* name; | 249 | const char* name; |
250 | const char* vendor; | 250 | const char* vendor; |
251 | const char* release; | 251 | const char* release; |
252 | const char* info; | 252 | const char* info; |
253 | int count; | 253 | int count; |
254 | const QUComponentDescription* components; | 254 | const QUComponentDescription* components; |
255 | }; | 255 | }; |
256 | 256 | ||
257 | 257 | ||
258 | 258 | ||
259 | struct Q_EXPORT QUEnumItem // - a name/value pair | 259 | struct Q_EXPORT QUEnumItem // - a name/value pair |
260 | { | 260 | { |
261 | const char *key; | 261 | const char *key; |
262 | int value; | 262 | int value; |
263 | }; | 263 | }; |
264 | 264 | ||
265 | struct Q_EXPORT QUEnum | 265 | struct Q_EXPORT QUEnum |
266 | { | 266 | { |
267 | const char *name; // - enumerator name | 267 | const char *name; // - enumerator name |
268 | unsigned int count; // - number of values | 268 | unsigned int count; // - number of values |
269 | const QUEnumItem *items; // - the name/value pairs | 269 | const QUEnumItem *items; // - the name/value pairs |
270 | bool set; // whether enum has to be treated as a set | 270 | bool set; // whether enum has to be treated as a set |
271 | }; | 271 | }; |
272 | 272 | ||
273 | inline bool QUType::isEqual( const QUType *t1, const QUType *t2 ) { | 273 | inline bool QUType::isEqual( const QUType *t1, const QUType *t2 ) { |
274 | return t1 == t2 || t1->uuid() == t2->uuid() || | 274 | return t1 == t2 || t1->uuid() == t2->uuid() || |
275 | *(t1->uuid()) == *(t2->uuid()); | 275 | *(t1->uuid()) == *(t2->uuid()); |
276 | } | 276 | } |
277 | 277 | ||
278 | inline bool QUType::check( QUObject* o, QUType* t ) { | 278 | inline bool QUType::check( QUObject* o, QUType* t ) { |
279 | return isEqual( o->type, t ) || t->convertFrom( o, o->type ); | 279 | return isEqual( o->type, t ) || t->convertFrom( o, o->type ); |
280 | } | 280 | } |
281 | 281 | ||
282 | 282 | ||
283 | 283 | ||
284 | // {7EE17B08-5419-47e2-9776-8EEA112DCAEC} | 284 | // {7EE17B08-5419-47e2-9776-8EEA112DCAEC} |
285 | extern Q_EXPORT const QUuid TID_QUType_enum; | 285 | extern Q_EXPORT const QUuid TID_QUType_enum; |
286 | struct Q_EXPORT QUType_enum : public QUType | 286 | struct Q_EXPORT QUType_enum : public QUType |
287 | { | 287 | { |
288 | const QUuid *uuid() const; | 288 | const QUuid *uuid() const; |
289 | const char *desc() const; | 289 | const char *desc() const; |
290 | 290 | ||
291 | void set( QUObject *, int ); | 291 | void set( QUObject *, int ); |
292 | int &get( QUObject * o ) { return o->payload.i; } | 292 | int &get( QUObject * o ) { return o->payload.i; } |
293 | bool canConvertFrom( QUObject *, QUType * ); | 293 | bool canConvertFrom( QUObject *, QUType * ); |
294 | bool canConvertTo( QUObject *, QUType * ); | 294 | bool canConvertTo( QUObject *, QUType * ); |
295 | bool convertFrom( QUObject *, QUType * ); | 295 | bool convertFrom( QUObject *, QUType * ); |
296 | bool convertTo( QUObject *, QUType * ); | 296 | bool convertTo( QUObject *, QUType * ); |
297 | void clear( QUObject * ) {} | 297 | void clear( QUObject * ) {} |
298 | int serializeTo( QUObject *, QUBuffer * ); | 298 | int serializeTo( QUObject *, QUBuffer * ); |
299 | int serializeFrom( QUObject *, QUBuffer * ); | 299 | int serializeFrom( QUObject *, QUBuffer * ); |
300 | }; | 300 | }; |
301 | extern Q_EXPORT QUType_enum static_QUType_enum; | 301 | extern Q_EXPORT QUType_enum static_QUType_enum; |
302 | 302 | ||
303 | 303 | ||
304 | // {8AC26448-5AB4-49eb-968C-8F30AB13D732} | 304 | // {8AC26448-5AB4-49eb-968C-8F30AB13D732} |
305 | extern Q_EXPORT const QUuid TID_QUType_ptr; | 305 | extern Q_EXPORT const QUuid TID_QUType_ptr; |
306 | struct Q_EXPORT QUType_ptr : public QUType | 306 | struct Q_EXPORT QUType_ptr : public QUType |
307 | { | 307 | { |
308 | const QUuid *uuid() const; | 308 | const QUuid *uuid() const; |
309 | const char *desc() const; | 309 | const char *desc() const; |
310 | 310 | ||
311 | void set( QUObject *, const void* ); | 311 | void set( QUObject *, const void* ); |
312 | void* &get( QUObject * o ) { return o->payload.ptr; } | 312 | void* &get( QUObject * o ) { return o->payload.ptr; } |
313 | bool canConvertFrom( QUObject *, QUType * ); | 313 | bool canConvertFrom( QUObject *, QUType * ); |
314 | bool canConvertTo( QUObject *, QUType * ); | 314 | bool canConvertTo( QUObject *, QUType * ); |
@@ -351,149 +351,113 @@ struct Q_EXPORT QUType_idisp : public QUType | |||
351 | bool canConvertFrom( QUObject *, QUType * ); | 351 | bool canConvertFrom( QUObject *, QUType * ); |
352 | bool canConvertTo( QUObject *, QUType * ); | 352 | bool canConvertTo( QUObject *, QUType * ); |
353 | bool convertFrom( QUObject *, QUType * ); | 353 | bool convertFrom( QUObject *, QUType * ); |
354 | bool convertTo( QUObject *, QUType * ); | 354 | bool convertTo( QUObject *, QUType * ); |
355 | void clear( QUObject * ) {} | 355 | void clear( QUObject * ) {} |
356 | int serializeTo( QUObject *, QUBuffer * ); | 356 | int serializeTo( QUObject *, QUBuffer * ); |
357 | int serializeFrom( QUObject *, QUBuffer * ); | 357 | int serializeFrom( QUObject *, QUBuffer * ); |
358 | }; | 358 | }; |
359 | extern Q_EXPORT QUType_idisp static_QUType_idisp; | 359 | extern Q_EXPORT QUType_idisp static_QUType_idisp; |
360 | 360 | ||
361 | // {CA42115D-13D0-456c-82B5-FC10187F313E} | 361 | // {CA42115D-13D0-456c-82B5-FC10187F313E} |
362 | extern Q_EXPORT const QUuid TID_QUType_bool; | 362 | extern Q_EXPORT const QUuid TID_QUType_bool; |
363 | struct Q_EXPORT QUType_bool : public QUType | 363 | struct Q_EXPORT QUType_bool : public QUType |
364 | { | 364 | { |
365 | const QUuid *uuid() const; | 365 | const QUuid *uuid() const; |
366 | const char *desc() const; | 366 | const char *desc() const; |
367 | 367 | ||
368 | void set( QUObject *, bool ); | 368 | void set( QUObject *, bool ); |
369 | bool &get( QUObject *o ) { return o->payload.b; } | 369 | bool &get( QUObject *o ) { return o->payload.b; } |
370 | bool canConvertFrom( QUObject *, QUType * ); | 370 | bool canConvertFrom( QUObject *, QUType * ); |
371 | bool canConvertTo( QUObject *, QUType * ); | 371 | bool canConvertTo( QUObject *, QUType * ); |
372 | bool convertFrom( QUObject *, QUType * ); | 372 | bool convertFrom( QUObject *, QUType * ); |
373 | bool convertTo( QUObject *, QUType * ); | 373 | bool convertTo( QUObject *, QUType * ); |
374 | void clear( QUObject * ) {} | 374 | void clear( QUObject * ) {} |
375 | int serializeTo( QUObject *, QUBuffer * ); | 375 | int serializeTo( QUObject *, QUBuffer * ); |
376 | int serializeFrom( QUObject *, QUBuffer * ); | 376 | int serializeFrom( QUObject *, QUBuffer * ); |
377 | }; | 377 | }; |
378 | extern Q_EXPORT QUType_bool static_QUType_bool; | 378 | extern Q_EXPORT QUType_bool static_QUType_bool; |
379 | 379 | ||
380 | // {53C1F3BE-73C3-4c7d-9E05-CCF09EB676B5} | 380 | // {53C1F3BE-73C3-4c7d-9E05-CCF09EB676B5} |
381 | extern Q_EXPORT const QUuid TID_QUType_int; | 381 | extern Q_EXPORT const QUuid TID_QUType_int; |
382 | struct Q_EXPORT QUType_int : public QUType | 382 | struct Q_EXPORT QUType_int : public QUType |
383 | { | 383 | { |
384 | const QUuid *uuid() const; | 384 | const QUuid *uuid() const; |
385 | const char *desc() const; | 385 | const char *desc() const; |
386 | 386 | ||
387 | void set( QUObject *, int ); | 387 | void set( QUObject *, int ); |
388 | int &get( QUObject *o ) { return o->payload.i; } | 388 | int &get( QUObject *o ) { return o->payload.i; } |
389 | bool canConvertFrom( QUObject *, QUType * ); | 389 | bool canConvertFrom( QUObject *, QUType * ); |
390 | bool canConvertTo( QUObject *, QUType * ); | 390 | bool canConvertTo( QUObject *, QUType * ); |
391 | bool convertFrom( QUObject *, QUType * ); | 391 | bool convertFrom( QUObject *, QUType * ); |
392 | bool convertTo( QUObject *, QUType * ); | 392 | bool convertTo( QUObject *, QUType * ); |
393 | void clear( QUObject * ) {} | 393 | void clear( QUObject * ) {} |
394 | int serializeTo( QUObject *, QUBuffer * ); | 394 | int serializeTo( QUObject *, QUBuffer * ); |
395 | int serializeFrom( QUObject *, QUBuffer * ); | 395 | int serializeFrom( QUObject *, QUBuffer * ); |
396 | }; | 396 | }; |
397 | extern Q_EXPORT QUType_int static_QUType_int; | 397 | extern Q_EXPORT QUType_int static_QUType_int; |
398 | 398 | ||
399 | // {5938712A-C496-11D5-8CB2-00C0F03BC0F3} | ||
400 | extern Q_EXPORT const QUuid TID_QUType_uint; | ||
401 | struct Q_EXPORT QUType_uint : public QUType | ||
402 | { | ||
403 | const QUuid *uuid() const; | ||
404 | const char *desc() const; | ||
405 | |||
406 | void set( QUObject *, uint ); | ||
407 | uint &get( QUObject *o ) { return o->payload.ui; } | ||
408 | bool canConvertFrom( QUObject *, QUType * ); | ||
409 | bool canConvertTo( QUObject *, QUType * ); | ||
410 | bool convertFrom( QUObject *, QUType * ); | ||
411 | bool convertTo( QUObject *, QUType * ); | ||
412 | void clear( QUObject * ) {} | ||
413 | int serializeTo( QUObject *, QUBuffer * ); | ||
414 | int serializeFrom( QUObject *, QUBuffer * ); | ||
415 | }; | ||
416 | extern Q_EXPORT QUType_uint static_QUType_uint; | ||
417 | 399 | ||
418 | // {2D0974E5-0BA6-4ec2-8837-C198972CB48C} | 400 | // {2D0974E5-0BA6-4ec2-8837-C198972CB48C} |
419 | extern Q_EXPORT const QUuid TID_QUType_double; | 401 | extern Q_EXPORT const QUuid TID_QUType_double; |
420 | struct Q_EXPORT QUType_double : public QUType | 402 | struct Q_EXPORT QUType_double : public QUType |
421 | { | 403 | { |
422 | const QUuid *uuid() const; | 404 | const QUuid *uuid() const; |
423 | const char *desc() const; | 405 | const char *desc() const; |
424 | 406 | ||
425 | void set( QUObject *, double ); | 407 | void set( QUObject *, double ); |
426 | double &get( QUObject *o ) { return o->payload.d; } | 408 | double &get( QUObject *o ) { return o->payload.d; } |
427 | bool canConvertFrom( QUObject *, QUType * ); | 409 | bool canConvertFrom( QUObject *, QUType * ); |
428 | bool canConvertTo( QUObject *, QUType * ); | 410 | bool canConvertTo( QUObject *, QUType * ); |
429 | bool convertFrom( QUObject *, QUType * ); | 411 | bool convertFrom( QUObject *, QUType * ); |
430 | bool convertTo( QUObject *, QUType * ); | 412 | bool convertTo( QUObject *, QUType * ); |
431 | void clear( QUObject * ) {} | 413 | void clear( QUObject * ) {} |
432 | int serializeTo( QUObject *, QUBuffer * ); | 414 | int serializeTo( QUObject *, QUBuffer * ); |
433 | int serializeFrom( QUObject *, QUBuffer * ); | 415 | int serializeFrom( QUObject *, QUBuffer * ); |
434 | }; | 416 | }; |
435 | extern Q_EXPORT QUType_double static_QUType_double; | 417 | extern Q_EXPORT QUType_double static_QUType_double; |
436 | 418 | ||
437 | // {544C5175-6993-4486-B04D-CEC4D21BF4B9 } | ||
438 | extern Q_EXPORT const QUuid TID_QUType_float; | ||
439 | struct Q_EXPORT QUType_float : public QUType | ||
440 | { | ||
441 | const QUuid *uuid() const; | ||
442 | const char *desc() const; | ||
443 | |||
444 | void set( QUObject *, float ); | ||
445 | float &get( QUObject *o ) { return o->payload.f; } | ||
446 | bool canConvertFrom( QUObject *, QUType * ); | ||
447 | bool canConvertTo( QUObject *, QUType * ); | ||
448 | bool convertFrom( QUObject *, QUType * ); | ||
449 | bool convertTo( QUObject *, QUType * ); | ||
450 | void clear( QUObject * ) {} | ||
451 | int serializeTo( QUObject *, QUBuffer * ); | ||
452 | int serializeFrom( QUObject *, QUBuffer * ); | ||
453 | }; | ||
454 | extern Q_EXPORT QUType_float static_QUType_float; | ||
455 | 419 | ||
456 | // {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9} | 420 | // {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9} |
457 | extern Q_EXPORT const QUuid TID_QUType_charstar; | 421 | extern Q_EXPORT const QUuid TID_QUType_charstar; |
458 | struct Q_EXPORT QUType_charstar : public QUType | 422 | struct Q_EXPORT QUType_charstar : public QUType |
459 | { | 423 | { |
460 | const QUuid *uuid() const; | 424 | const QUuid *uuid() const; |
461 | const char *desc() const; | 425 | const char *desc() const; |
462 | 426 | ||
463 | void set( QUObject *, const char*, bool take = FALSE ); | 427 | void set( QUObject *, const char*, bool take = FALSE ); |
464 | char* get( QUObject *o ){ return o->payload.charstar.ptr; } | 428 | char* get( QUObject *o ){ return o->payload.charstar.ptr; } |
465 | bool canConvertFrom( QUObject *, QUType * ); | 429 | bool canConvertFrom( QUObject *, QUType * ); |
466 | bool canConvertTo( QUObject *, QUType * ); | 430 | bool canConvertTo( QUObject *, QUType * ); |
467 | bool convertFrom( QUObject *, QUType * ); | 431 | bool convertFrom( QUObject *, QUType * ); |
468 | bool convertTo( QUObject *, QUType * ); | 432 | bool convertTo( QUObject *, QUType * ); |
469 | void clear( QUObject * ); | 433 | void clear( QUObject * ); |
470 | int serializeTo( QUObject *, QUBuffer * ); | 434 | int serializeTo( QUObject *, QUBuffer * ); |
471 | int serializeFrom( QUObject *, QUBuffer * ); | 435 | int serializeFrom( QUObject *, QUBuffer * ); |
472 | 436 | ||
473 | }; | 437 | }; |
474 | extern Q_EXPORT QUType_charstar static_QUType_charstar; | 438 | extern Q_EXPORT QUType_charstar static_QUType_charstar; |
475 | 439 | ||
476 | // {44C2A547-01E7-4e56-8559-35AF9D2F42B7} | 440 | // {44C2A547-01E7-4e56-8559-35AF9D2F42B7} |
477 | extern const QUuid TID_QUType_QString; | 441 | extern const QUuid TID_QUType_QString; |
478 | 442 | ||
479 | struct Q_EXPORT QUType_QString : public QUType | 443 | struct Q_EXPORT QUType_QString : public QUType |
480 | { | 444 | { |
481 | const QUuid *uuid() const; | 445 | const QUuid *uuid() const; |
482 | const char *desc() const; | 446 | const char *desc() const; |
483 | 447 | ||
484 | void set( QUObject *, const QString & ); | 448 | void set( QUObject *, const QString & ); |
485 | QString &get( QUObject * o ) { return *(QString*)o->payload.ptr; } | 449 | QString &get( QUObject * o ) { return *(QString*)o->payload.ptr; } |
486 | 450 | ||
487 | bool canConvertFrom( QUObject *, QUType * ); | 451 | bool canConvertFrom( QUObject *, QUType * ); |
488 | bool canConvertTo( QUObject *, QUType * ); | 452 | bool canConvertTo( QUObject *, QUType * ); |
489 | bool convertFrom( QUObject *, QUType * ); | 453 | bool convertFrom( QUObject *, QUType * ); |
490 | bool convertTo( QUObject *, QUType * ); | 454 | bool convertTo( QUObject *, QUType * ); |
491 | void clear( QUObject * ); | 455 | void clear( QUObject * ); |
492 | int serializeTo( QUObject *, QUBuffer * ); | 456 | int serializeTo( QUObject *, QUBuffer * ); |
493 | int serializeFrom( QUObject *, QUBuffer * ); | 457 | int serializeFrom( QUObject *, QUBuffer * ); |
494 | 458 | ||
495 | }; | 459 | }; |
496 | extern Q_EXPORT QUType_QString static_QUType_QString; | 460 | extern Q_EXPORT QUType_QString static_QUType_QString; |
497 | 461 | ||
498 | 462 | ||
499 | #endif // QUCOM_H | 463 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of extra QUcom classes | 4 | ** Definition of extra QUcom classes |
5 | ** | 5 | ** |
6 | ** Created : 990101 | 6 | ** Created : 990101 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | 10 | ** This file is part of the kernel module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QUCOMEXTRA_H | 38 | #ifndef QUCOMEXTRA_P_H |
39 | #define QUCOMEXTRA_H | 39 | #define QUCOMEXTRA_P_H |
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. This header file may | ||
46 | // change from version to version without notice, or even be | ||
47 | // removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
40 | 52 | ||
41 | #ifndef QT_H | 53 | #ifndef QT_H |
42 | #include <private/qucom_p.h> | 54 | #include <private/qucom_p.h> |
43 | #endif // QT_H | 55 | #endif // QT_H |
44 | 56 | ||
45 | 57 | ||
46 | class QVariant; | 58 | class QVariant; |
47 | 59 | ||
48 | #ifndef QT_NO_VARIANT | 60 | #ifndef QT_NO_VARIANT |
49 | // 6dc75d58-a1d9-4417-b591-d45c63a3a4ea | 61 | // 6dc75d58-a1d9-4417-b591-d45c63a3a4ea |
50 | extern const QUuid TID_QUType_QVariant; | 62 | extern const QUuid TID_QUType_QVariant; |
51 | 63 | ||
52 | struct Q_EXPORT QUType_QVariant : public QUType | 64 | struct Q_EXPORT QUType_QVariant : public QUType |
53 | { | 65 | { |
54 | const QUuid *uuid() const; | 66 | const QUuid *uuid() const; |
55 | const char *desc() const; | 67 | const char *desc() const; |
56 | 68 | ||
57 | void set( QUObject *, const QVariant & ); | 69 | void set( QUObject *, const QVariant & ); |
58 | QVariant &get( QUObject * o ); | 70 | QVariant &get( QUObject * o ); |
59 | 71 | ||
60 | bool canConvertFrom( QUObject *, QUType * ); | 72 | bool canConvertFrom( QUObject *, QUType * ); |
61 | bool canConvertTo( QUObject *, QUType * ); | 73 | bool canConvertTo( QUObject *, QUType * ); |
62 | bool convertFrom( QUObject *, QUType * ); | 74 | bool convertFrom( QUObject *, QUType * ); |
63 | bool convertTo( QUObject *, QUType * ); | 75 | bool convertTo( QUObject *, QUType * ); |
64 | void clear( QUObject * ); | 76 | void clear( QUObject * ); |
65 | int serializeTo( QUObject *, QUBuffer * ); | 77 | int serializeTo( QUObject *, QUBuffer * ); |
66 | int serializeFrom( QUObject *, QUBuffer * ); | 78 | int serializeFrom( QUObject *, QUBuffer * ); |
67 | }; | 79 | }; |
68 | extern Q_EXPORT QUType_QVariant static_QUType_QVariant; | 80 | extern Q_EXPORT QUType_QVariant static_QUType_QVariant; |
69 | #endif //QT_NO_VARIANT | 81 | #endif //QT_NO_VARIANT |
70 | 82 | ||
71 | 83 | ||
72 | // {0x8d48b3a8, 0xbd7f, 0x11d5, 0x8d, 0x74, 0x00, 0xc0, 0xf0, 0x3b, 0xc0, 0xf3 } | 84 | // {0x8d48b3a8, 0xbd7f, 0x11d5, 0x8d, 0x74, 0x00, 0xc0, 0xf0, 0x3b, 0xc0, 0xf3 } |
73 | extern Q_EXPORT const QUuid TID_QUType_varptr; | 85 | extern Q_EXPORT const QUuid TID_QUType_varptr; |
74 | struct Q_EXPORT QUType_varptr : public QUType | 86 | struct Q_EXPORT QUType_varptr : public QUType |
75 | { | 87 | { |
76 | const QUuid *uuid() const; | 88 | const QUuid *uuid() const; |
77 | const char *desc() const; | 89 | const char *desc() const; |
78 | 90 | ||
79 | void set( QUObject *, const void* ); | 91 | void set( QUObject *, const void* ); |
80 | void* &get( QUObject * o ) { return o->payload.ptr; } | 92 | void* &get( QUObject * o ) { return o->payload.ptr; } |
81 | bool canConvertFrom( QUObject *, QUType * ); | 93 | bool canConvertFrom( QUObject *, QUType * ); |
82 | bool canConvertTo( QUObject *, QUType * ); | 94 | bool canConvertTo( QUObject *, QUType * ); |
83 | bool convertFrom( QUObject *, QUType * ); | 95 | bool convertFrom( QUObject *, QUType * ); |
84 | bool convertTo( QUObject *, QUType * ); | 96 | bool convertTo( QUObject *, QUType * ); |
85 | void clear( QUObject * ) {} | 97 | void clear( QUObject * ) {} |
86 | int serializeTo( QUObject *, QUBuffer * ); | 98 | int serializeTo( QUObject *, QUBuffer * ); |
87 | int serializeFrom( QUObject *, QUBuffer * ); | 99 | int serializeFrom( QUObject *, QUBuffer * ); |
88 | }; | 100 | }; |
89 | extern Q_EXPORT QUType_varptr static_QUType_varptr; | 101 | extern Q_EXPORT QUType_varptr static_QUType_varptr; |
90 | 102 | ||
91 | 103 | ||
92 | #endif // QUCOMEXTRA_H | 104 | #endif // QUCOMEXTRA_P_H |
93 | 105 | ||
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 @@ | |||
1 | /********************************************************************** | 1 | /**************************************************************************** |
2 | ** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** This file is part of Qt Designer. | 4 | ** ... |
5 | ** | ||
6 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the widgets module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
5 | ** | 13 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 17 | ** packaging of this file. |
10 | ** | 18 | ** |
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 25 | ** |
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 30 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 32 | ** not clear to you. |
18 | ** | 33 | ** |
19 | **********************************************************************/ | 34 | **********************************************************************/ |
20 | 35 | ||
21 | #ifndef QWIDGETINTERFACE_H | 36 | #ifndef QWIDGETINTERFACE_P_H |
22 | #define QWIDGETINTERFACE_H | 37 | #define QWIDGETINTERFACE_P_H |
23 | |||
24 | |||
25 | #ifndef QT_H | ||
26 | #include <private/qcom_p.h> | ||
27 | #include <qiconset.h> | ||
28 | #endif // QT_H | ||
29 | |||
30 | #ifndef QT_NO_WIDGETPLUGIN | ||
31 | 38 | ||
32 | // | 39 | // |
33 | // W A R N I N G | 40 | // W A R N I N G |
34 | // ------------- | 41 | // ------------- |
35 | // | 42 | // |
36 | // This file is not part of the Qt API. It exists for the convenience | 43 | // This file is not part of the Qt API. It exists for the convenience |
37 | // of a number of Qt sources files. This header file may change from | 44 | // of a number of Qt sources files. This header file may change from |
38 | // version to version without notice, or even be removed. | 45 | // version to version without notice, or even be removed. |
39 | // | 46 | // |
40 | // We mean it. | 47 | // We mean it. |
41 | // | 48 | // |
42 | // | 49 | // |
43 | 50 | ||
51 | #ifndef QT_H | ||
52 | #include <private/qcom_p.h> | ||
53 | #include <qiconset.h> | ||
54 | #endif // QT_H | ||
55 | |||
56 | #ifndef QT_NO_WIDGETPLUGIN | ||
57 | |||
44 | class QWidget; | 58 | class QWidget; |
45 | 59 | ||
46 | // {55184143-f18f-42c0-a8eb-71c01516019a} | 60 | // {55184143-f18f-42c0-a8eb-71c01516019a} |
47 | #ifndef IID_QWidgetFactory | 61 | #ifndef IID_QWidgetFactory |
48 | #define IID_QWidgetFactory QUuid( 0x55184143, 0xf18f, 0x42c0, 0xa8, 0xeb, 0x71, 0xc0, 0x15, 0x16, 0x1, 0x9a ) | 62 | #define IID_QWidgetFactory QUuid( 0x55184143, 0xf18f, 0x42c0, 0xa8, 0xeb, 0x71, 0xc0, 0x15, 0x16, 0x1, 0x9a ) |
49 | #endif | 63 | #endif |
50 | 64 | ||
51 | /*! To add custom widgets to the Qt Designer, implement that interface | 65 | /*! To add custom widgets to the Qt Designer, implement that interface |
52 | in your custom widget plugin. | 66 | in your custom widget plugin. |
53 | 67 | ||
54 | You also have to implement the function featureList() (\sa | 68 | You also have to implement the function featureList() (\sa |
55 | QFeatureListInterface) and return there all widgets (names of it) | 69 | QFeatureListInterface) and return there all widgets (names of it) |
56 | which this interface provides. | 70 | which this interface provides. |
57 | */ | 71 | */ |
58 | 72 | ||
59 | struct QWidgetFactoryInterface : public QFeatureListInterface | 73 | struct QWidgetFactoryInterface : public QFeatureListInterface |
60 | { | 74 | { |
61 | public: | 75 | public: |
62 | 76 | ||
63 | /*! In the implementation create and return the widget \a widget | 77 | /*! In the implementation create and return the widget \a widget |
64 | here, use \a parent and \a name when creating the widget */ | 78 | here, use \a parent and \a name when creating the widget */ |
65 | virtual QWidget* create( const QString &widget, QWidget* parent = 0, const char* name = 0 ) = 0; | 79 | virtual QWidget* create( const QString &widget, QWidget* parent = 0, const char* name = 0 ) = 0; |
66 | 80 | ||
67 | /*! In the implementation return the name of the group of the | 81 | /*! In the implementation return the name of the group of the |
68 | widget \a widget */ | 82 | widget \a widget */ |
69 | virtual QString group( const QString &widget ) const = 0; | 83 | virtual QString group( const QString &widget ) const = 0; |
70 | 84 | ||
71 | /*! In the implementation return the iconset, which should be used | 85 | /*! In the implementation return the iconset, which should be used |
72 | in the Qt Designer menubar and toolbar to represent the widget | 86 | in the Qt Designer menubar and toolbar to represent the widget |
73 | \a widget */ | 87 | \a widget */ |
74 | virtual QIconSet iconSet( const QString &widget ) const = 0; | 88 | virtual QIconSet iconSet( const QString &widget ) const = 0; |
75 | 89 | ||
76 | /*! In the implementation return the include file which is needed | 90 | /*! In the implementation return the include file which is needed |
77 | for the widget \a widget in the generated code which uic | 91 | for the widget \a widget in the generated code which uic |
78 | generates. */ | 92 | generates. */ |
79 | virtual QString includeFile( const QString &widget ) const = 0; | 93 | virtual QString includeFile( const QString &widget ) const = 0; |
80 | 94 | ||
81 | /*! In the implementation return the text which should be | 95 | /*! In the implementation return the text which should be |
82 | displayed as tooltip for the widget \a widget */ | 96 | displayed as tooltip for the widget \a widget */ |
83 | virtual QString toolTip( const QString &widget ) const = 0; | 97 | virtual QString toolTip( const QString &widget ) const = 0; |
84 | 98 | ||
85 | /*! In the implementation return the text which should be used for | 99 | /*! In the implementation return the text which should be used for |
86 | what's this help for the widget \a widget. */ | 100 | what's this help for the widget \a widget. */ |
87 | virtual QString whatsThis( const QString &widget ) const = 0; | 101 | virtual QString whatsThis( const QString &widget ) const = 0; |
88 | 102 | ||
89 | /*! In the implementation return TRUE here, of the \a widget | 103 | /*! In the implementation return TRUE here, of the \a widget |
90 | should be able to contain other widget in the Qt Designer, else | 104 | should be able to contain other widget in the Qt Designer, else |
91 | FALSE. */ | 105 | FALSE. */ |
92 | virtual bool isContainer( const QString &widget ) const = 0; | 106 | virtual bool isContainer( const QString &widget ) const = 0; |
93 | }; | 107 | }; |
94 | 108 | ||
95 | #if CONTAINER_CUSTOM_WIDGETS | 109 | #ifdef QT_CONTAINER_CUSTOM_WIDGETS |
96 | // {15976628-e3c3-47f4-b525-d124a3caf30e} | 110 | // {15976628-e3c3-47f4-b525-d124a3caf30e} |
97 | #ifndef IID_QWidgetContainer | 111 | #ifndef IID_QWidgetContainer |
98 | #define IID_QWidgetContainer QUuid( 0x15976628, 0xe3c3, 0x47f4, 0xb5, 0x25, 0xd1, 0x24, 0xa3, 0xca, 0xf3, 0x0e ) | 112 | #define IID_QWidgetContainer QUuid( 0x15976628, 0xe3c3, 0x47f4, 0xb5, 0x25, 0xd1, 0x24, 0xa3, 0xca, 0xf3, 0x0e ) |
99 | #endif | 113 | #endif |
100 | 114 | ||
101 | struct QWidgetContainerInterfacePrivate : public QUnknownInterface | 115 | struct QWidgetContainerInterfacePrivate : public QUnknownInterface |
102 | { | 116 | { |
103 | public: | 117 | public: |
104 | virtual QWidget *containerOfWidget( QWidget *widget ) const = 0; | 118 | virtual QWidget *containerOfWidget( const QString &f, QWidget *container ) const = 0; |
105 | virtual QWidgetList containersOf( QWidget *widget ) const = 0; | 119 | virtual bool isPassiveInteractor( const QString &f, QWidget *container ) const = 0; |
106 | virtual bool isPassiveInteractor( QWidget *widget ) const = 0; | 120 | |
121 | virtual bool supportsPages( const QString &f ) const = 0; | ||
122 | |||
123 | virtual QWidget *addPage( const QString &f, QWidget *container, | ||
124 | const QString &name, int index ) const = 0; | ||
125 | virtual void insertPage( const QString &f, QWidget *container, | ||
126 | const QString &name, int index, QWidget *page ) const = 0; | ||
127 | virtual void removePage( const QString &f, QWidget *container, int index ) const = 0; | ||
128 | virtual void movePage( const QString &f, QWidget *container, int fromIndex, int toIndex ) const = 0; | ||
129 | virtual int count( const QString &key, QWidget *container ) const = 0; | ||
130 | virtual int currentIndex( const QString &key, QWidget *container ) const = 0; | ||
131 | virtual QString pageLabel( const QString &key, QWidget *container, int index ) const = 0; | ||
132 | virtual QWidget *page( const QString &key, QWidget *container, int index ) const = 0; | ||
133 | virtual void renamePage( const QString &key, QWidget *container, | ||
134 | int index, const QString &newName ) const = 0; | ||
135 | virtual QWidgetList pages( const QString &f, QWidget *container ) const = 0; | ||
107 | }; | 136 | }; |
108 | #endif | 137 | #endif |
109 | 138 | ||
110 | #endif // QT_NO_WIDGETPLUGIN | 139 | #endif // QT_NO_WIDGETPLUGIN |
111 | #endif // QWIDGETINTERFACE_H | 140 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of the QWidgetResizeHandler class | 4 | ** Definition of the QWidgetResizeHandler class |
5 | ** | 5 | ** |
6 | ** Created : 001010 | 6 | ** Created : 001010 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the workspace module of the Qt GUI Toolkit. | 10 | ** This file is part of the workspace module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | 21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this |
22 | ** file in accordance with the Qt Commercial License Agreement provided | 22 | ** file in accordance with the Qt Commercial License Agreement provided |
23 | ** with the Software. | 23 | ** with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QWIDGETRESIZEHANDLER_H | 38 | #ifndef QWIDGETRESIZEHANDLER_P_H |
39 | #define QWIDGETRESIZEHANDLER_H | 39 | #define QWIDGETRESIZEHANDLER_P_H |
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. This header file may | ||
46 | // change from version to version without notice, or even be | ||
47 | // removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
40 | 52 | ||
41 | #ifndef QT_H | 53 | #ifndef QT_H |
42 | #include "qobject.h" | 54 | #include "qobject.h" |
43 | #endif // QT_H | 55 | #endif // QT_H |
44 | #ifndef QT_NO_RESIZEHANDLER | 56 | #ifndef QT_NO_RESIZEHANDLER |
45 | class QMouseEvent; | 57 | class QMouseEvent; |
46 | class QKeyEvent; | 58 | class QKeyEvent; |
47 | 59 | ||
48 | class Q_EXPORT QWidgetResizeHandler : public QObject | 60 | class Q_EXPORT QWidgetResizeHandler : public QObject |
49 | { | 61 | { |
50 | Q_OBJECT | 62 | Q_OBJECT |
51 | 63 | ||
52 | public: | 64 | public: |
53 | QWidgetResizeHandler( QWidget *parent, QWidget *cw = 0, const char *name = 0 ); | 65 | QWidgetResizeHandler( QWidget *parent, QWidget *cw = 0, const char *name = 0 ); |
54 | void setActive( bool b ) { active = b; if ( !active ) setMouseCursor( Nowhere ); } | 66 | void setActive( bool b ) { active = b; if ( !active ) setMouseCursor( Nowhere ); } |
55 | bool isActive() const { return active; } | 67 | bool isActive() const { return active; } |
56 | void setMovingEnabled( bool b ) { moving = b; } | 68 | void setMovingEnabled( bool b ) { moving = b; } |
57 | bool isMovingEnabled() const { return moving; } | 69 | bool isMovingEnabled() const { return moving; } |
58 | 70 | ||
59 | bool isButtonDown() const { return buttonDown; } | 71 | bool isButtonDown() const { return buttonDown; } |
60 | 72 | ||
61 | void setExtraHeight( int h ) { extrahei = h; } | 73 | void setExtraHeight( int h ) { extrahei = h; } |
62 | void setSizeProtection( bool b ) { sizeprotect = b; } | 74 | void setSizeProtection( bool b ) { sizeprotect = b; } |
63 | 75 | ||
64 | void doResize(); | 76 | void doResize(); |
65 | void doMove(); | 77 | void doMove(); |
66 | 78 | ||
67 | signals: | 79 | signals: |
68 | void activate(); | 80 | void activate(); |
69 | 81 | ||
70 | protected: | 82 | protected: |
71 | bool eventFilter( QObject *o, QEvent *e ); | 83 | bool eventFilter( QObject *o, QEvent *e ); |
72 | void mouseMoveEvent( QMouseEvent *e ); | 84 | void mouseMoveEvent( QMouseEvent *e ); |
73 | void keyPressEvent( QKeyEvent *e ); | 85 | void keyPressEvent( QKeyEvent *e ); |
74 | 86 | ||
75 | private: | 87 | private: |
76 | enum MousePosition { | 88 | enum MousePosition { |
77 | Nowhere, | 89 | Nowhere, |
78 | TopLeft, BottomRight, BottomLeft, TopRight, | 90 | TopLeft, BottomRight, BottomLeft, TopRight, |
79 | Top, Bottom, Left, Right, | 91 | Top, Bottom, Left, Right, |
80 | Center | 92 | Center |
81 | }; | 93 | }; |
82 | 94 | ||
83 | QWidget *widget; | 95 | QWidget *widget; |
84 | QWidget *childWidget; | 96 | QWidget *childWidget; |
85 | QPoint moveOffset; | 97 | QPoint moveOffset; |
86 | QPoint invertedMoveOffset; | 98 | QPoint invertedMoveOffset; |
87 | MousePosition mode; | 99 | 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: | |||
70 | type *find( const char *k ) const | 70 | type *find( const char *k ) const |
71 | { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } | 71 | { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } |
72 | type *operator[]( const char *k ) const | 72 | type *operator[]( const char *k ) const |
73 | { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } | 73 | { return (type *)((QGDict*)this)->QGDict::look_ascii(k,0,0); } |
74 | 74 | ||
75 | void clear() { QGDict::clear(); } | 75 | void clear() { QGDict::clear(); } |
76 | void resize( uint n ) { QGDict::resize(n); } | 76 | void resize( uint n ) { QGDict::resize(n); } |
77 | void statistics() const { QGDict::statistics(); } | 77 | void statistics() const { QGDict::statistics(); } |
78 | 78 | ||
79 | #ifdef Q_QDOC | 79 | #ifdef Q_QDOC |
80 | protected: | 80 | protected: |
81 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); | 81 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); |
82 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; | 82 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | private: | 85 | private: |
86 | void deleteItem( Item d ); | 86 | void deleteItem( Item d ); |
87 | }; | 87 | }; |
88 | 88 | ||
89 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) | 89 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) |
90 | template<> inline void QAsciiDict<void>::deleteItem( QPtrCollection::Item ) | 90 | template<> inline void QAsciiDict<void>::deleteItem( QPtrCollection::Item ) |
91 | { | 91 | { |
92 | } | 92 | } |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | template<class type> inline void QAsciiDict<type>::deleteItem( QPtrCollection::Item d ) | 95 | template<class type> inline void QAsciiDict<type>::deleteItem( QPtrCollection::Item d ) |
96 | { | 96 | { |
97 | if ( del_item ) delete (type *)d; | 97 | if ( del_item ) delete (type *)d; |
98 | } | 98 | } |
99 | 99 | ||
100 | template<class type> | 100 | template<class type> |
101 | class QAsciiDictIterator : public QGDictIterator | 101 | class QAsciiDictIterator : public QGDictIterator |
102 | { | 102 | { |
103 | public: | 103 | public: |
104 | QAsciiDictIterator(const QAsciiDict<type> &d) | 104 | QAsciiDictIterator(const QAsciiDict<type> &d) |
105 | : QGDictIterator((QGDict &)d) {} | 105 | : QGDictIterator((QGDict &)d) {} |
106 | ~QAsciiDictIterator() {} | 106 | ~QAsciiDictIterator() {} |
107 | uint count() const { return dict->count(); } | 107 | uint count() const { return dict->count(); } |
108 | bool isEmpty() const { return dict->count() == 0; } | 108 | bool isEmpty() const { return dict->count() == 0; } |
109 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } | 109 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } |
110 | operator type *() const { return (type *)QGDictIterator::get(); } | 110 | operator type *() const { return (type *)QGDictIterator::get(); } |
111 | type *current() const { return (type *)QGDictIterator::get(); } | 111 | type *current() const { return (type *)QGDictIterator::get(); } |
112 | const char *currentKey() const { return QGDictIterator::getKeyAscii(); } | 112 | const char *currentKey() const { return QGDictIterator::getKeyAscii(); } |
113 | type *operator()() { return (type *)QGDictIterator::operator()(); } | 113 | type *operator()() { return (type *)QGDictIterator::operator()(); } |
114 | type *operator++() { return (type *)QGDictIterator::operator++(); } | 114 | type *operator++() { return (type *)QGDictIterator::operator++(); } |
115 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} | 115 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #ifdef QT_QWINEXPORT | ||
119 | #define Q_DEFINED_QASCIIDICT | ||
120 | #include "qwinexport.h" | ||
121 | #endif /* QT_QWINEXPORT */ | ||
118 | #endif // QASCIIDICT_H | 122 | #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 * ); | |||
56 | 56 | ||
57 | Q_EXPORT inline uint qstrlen( const char *str ) | 57 | Q_EXPORT inline uint qstrlen( const char *str ) |
58 | { return str ? (uint)strlen(str) : 0; } | 58 | { return str ? (uint)strlen(str) : 0; } |
59 | 59 | ||
60 | Q_EXPORT inline char *qstrcpy( char *dst, const char *src ) | 60 | Q_EXPORT inline char *qstrcpy( char *dst, const char *src ) |
61 | { return src ? strcpy(dst, src) : 0; } | 61 | { return src ? strcpy(dst, src) : 0; } |
62 | 62 | ||
63 | Q_EXPORT char *qstrncpy( char *dst, const char *src, uint len ); | 63 | Q_EXPORT char *qstrncpy( char *dst, const char *src, uint len ); |
64 | 64 | ||
65 | Q_EXPORT inline int qstrcmp( const char *str1, const char *str2 ) | 65 | Q_EXPORT inline int qstrcmp( const char *str1, const char *str2 ) |
66 | { | 66 | { |
67 | return ( str1 && str2 ) ? strcmp( str1, str2 ) | 67 | return ( str1 && str2 ) ? strcmp( str1, str2 ) |
68 | : ( str1 ? 1 : ( str2 ? -1 : 0 ) ); | 68 | : ( str1 ? 1 : ( str2 ? -1 : 0 ) ); |
69 | } | 69 | } |
70 | 70 | ||
71 | Q_EXPORT inline int qstrncmp( const char *str1, const char *str2, uint len ) | 71 | Q_EXPORT inline int qstrncmp( const char *str1, const char *str2, uint len ) |
72 | { | 72 | { |
73 | return ( str1 && str2 ) ? strncmp( str1, str2, len ) | 73 | return ( str1 && str2 ) ? strncmp( str1, str2, len ) |
74 | : ( str1 ? 1 : ( str2 ? -1 : 0 ) ); | 74 | : ( str1 ? 1 : ( str2 ? -1 : 0 ) ); |
75 | } | 75 | } |
76 | 76 | ||
77 | Q_EXPORT int qstricmp( const char *, const char * ); | 77 | Q_EXPORT int qstricmp( const char *, const char * ); |
78 | 78 | ||
79 | Q_EXPORT int qstrnicmp( const char *, const char *, uint len ); | 79 | Q_EXPORT int qstrnicmp( const char *, const char *, uint len ); |
80 | 80 | ||
81 | #ifndef QT_CLEAN_NAMESPACE | 81 | #ifndef QT_CLEAN_NAMESPACE |
82 | Q_EXPORT inline uint cstrlen( const char *str ) | 82 | Q_EXPORT inline uint cstrlen( const char *str ) |
83 | { return (uint)strlen(str); } | 83 | { return (uint)strlen(str); } |
84 | 84 | ||
85 | Q_EXPORT inline char *cstrcpy( char *dst, const char *src ) | 85 | Q_EXPORT inline char *cstrcpy( char *dst, const char *src ) |
86 | { return strcpy(dst,src); } | 86 | { return strcpy(dst,src); } |
87 | 87 | ||
88 | Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 ) | 88 | Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 ) |
89 | { return strcmp(str1,str2); } | 89 | { return strcmp(str1,str2); } |
90 | 90 | ||
91 | Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len ) | 91 | Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len ) |
92 | { return strncmp(str1,str2,len); } | 92 | { return strncmp(str1,str2,len); } |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | 95 | ||
96 | // qChecksum: Internet checksum | 96 | // qChecksum: Internet checksum |
97 | 97 | ||
98 | Q_EXPORT Q_UINT16 qChecksum( const char *s, uint len ); | 98 | Q_EXPORT Q_UINT16 qChecksum( const char *s, uint len ); |
99 | 99 | ||
100 | /***************************************************************************** | 100 | /***************************************************************************** |
101 | QByteArray class | 101 | QByteArray class |
102 | *****************************************************************************/ | 102 | *****************************************************************************/ |
103 | 103 | ||
104 | #ifndef QT_QWINEXPORT | ||
104 | #if defined(Q_TEMPLATEDLL) | 105 | #if defined(Q_TEMPLATEDLL) |
105 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<char>; | 106 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<char>; |
106 | #endif | 107 | #endif |
108 | #endif /* QT_QWINEXPORT */ | ||
107 | 109 | ||
108 | #if defined(Q_QDOC) | 110 | #if defined(Q_QDOC) |
109 | /* | 111 | /* |
110 | We want qdoc to document QByteArray as a real class that inherits | 112 | We want qdoc to document QByteArray as a real class that inherits |
111 | QMemArray<char> and that is inherited by QBitArray. | 113 | QMemArray<char> and that is inherited by QBitArray. |
112 | */ | 114 | */ |
113 | class QByteArray : public QMemArray<char> | 115 | class QByteArray : public QMemArray<char> |
114 | { | 116 | { |
115 | public: | 117 | public: |
116 | QByteArray(); | 118 | QByteArray(); |
117 | QByteArray( int size ); | 119 | QByteArray( int size ); |
118 | }; | 120 | }; |
119 | #else | 121 | #else |
120 | typedef QMemArray<char> QByteArray; | 122 | typedef QMemArray<char> QByteArray; |
121 | #endif | 123 | #endif |
122 | 124 | ||
123 | #ifndef QT_NO_COMPRESS | 125 | #ifndef QT_NO_COMPRESS |
124 | Q_EXPORT QByteArray qCompress( const uchar* data, int nbytes ); | 126 | Q_EXPORT QByteArray qCompress( const uchar* data, int nbytes ); |
125 | Q_EXPORT QByteArray qUncompress( const uchar* data, int nbytes ); | 127 | Q_EXPORT QByteArray qUncompress( const uchar* data, int nbytes ); |
126 | Q_EXPORT inline QByteArray qCompress( const QByteArray& data) | 128 | Q_EXPORT inline QByteArray qCompress( const QByteArray& data) |
127 | { return qCompress( (const uchar*)data.data(), data.size() ); } | 129 | { return qCompress( (const uchar*)data.data(), data.size() ); } |
128 | Q_EXPORT inline QByteArray qUncompress( const QByteArray& data ) | 130 | Q_EXPORT inline QByteArray qUncompress( const QByteArray& data ) |
129 | { return qUncompress( (const uchar*)data.data(), data.size() ); } | 131 | { return qUncompress( (const uchar*)data.data(), data.size() ); } |
130 | #endif | 132 | #endif |
131 | 133 | ||
132 | /***************************************************************************** | 134 | /***************************************************************************** |
133 | QByteArray stream functions | 135 | QByteArray stream functions |
134 | *****************************************************************************/ | 136 | *****************************************************************************/ |
135 | #ifndef QT_NO_DATASTREAM | 137 | #ifndef QT_NO_DATASTREAM |
136 | Q_EXPORT QDataStream &operator<<( QDataStream &, const QByteArray & ); | 138 | Q_EXPORT QDataStream &operator<<( QDataStream &, const QByteArray & ); |
137 | Q_EXPORT QDataStream &operator>>( QDataStream &, QByteArray & ); | 139 | Q_EXPORT QDataStream &operator>>( QDataStream &, QByteArray & ); |
138 | #endif | 140 | #endif |
139 | 141 | ||
140 | /***************************************************************************** | 142 | /***************************************************************************** |
141 | QCString class | 143 | QCString class |
142 | *****************************************************************************/ | 144 | *****************************************************************************/ |
143 | 145 | ||
144 | class QRegExp; | 146 | class QRegExp; |
145 | 147 | ||
146 | class Q_EXPORT QCString : public QByteArray// C string class | 148 | class Q_EXPORT QCString : public QByteArray// C string class |
147 | { | 149 | { |
148 | public: | 150 | public: |
149 | QCString() {} // make null string | 151 | QCString() {} // make null string |
150 | QCString( int size ); // allocate size incl. \0 | 152 | QCString( int size ); // allocate size incl. \0 |
151 | QCString( const QCString &s ) : QByteArray( s ) {} | 153 | QCString( const QCString &s ) : QByteArray( s ) {} |
152 | QCString( const char *str ); // deep copy | 154 | QCString( const char *str ); // deep copy |
153 | QCString( const char *str, uint maxlen );// deep copy, max length | 155 | QCString( const char *str, uint maxlen );// deep copy, max length |
154 | ~QCString(); | 156 | ~QCString(); |
@@ -187,96 +189,98 @@ public: | |||
187 | QCStringmid( uint index, uint len=0xffffffff) const; | 189 | QCStringmid( uint index, uint len=0xffffffff) const; |
188 | 190 | ||
189 | QCStringleftJustify( uint width, char fill=' ', bool trunc=FALSE)const; | 191 | QCStringleftJustify( uint width, char fill=' ', bool trunc=FALSE)const; |
190 | QCStringrightJustify( uint width, char fill=' ',bool trunc=FALSE)const; | 192 | QCStringrightJustify( uint width, char fill=' ',bool trunc=FALSE)const; |
191 | 193 | ||
192 | QCStringlower() const; | 194 | QCStringlower() const; |
193 | QCStringupper() const; | 195 | QCStringupper() const; |
194 | 196 | ||
195 | QCString stripWhiteSpace()const; | 197 | QCString stripWhiteSpace()const; |
196 | QCString simplifyWhiteSpace()const; | 198 | QCString simplifyWhiteSpace()const; |
197 | 199 | ||
198 | QCString &insert( uint index, const char * ); | 200 | QCString &insert( uint index, const char * ); |
199 | QCString &insert( uint index, char ); | 201 | QCString &insert( uint index, char ); |
200 | QCString &append( const char * ); | 202 | QCString &append( const char * ); |
201 | QCString &prepend( const char * ); | 203 | QCString &prepend( const char * ); |
202 | QCString &remove( uint index, uint len ); | 204 | QCString &remove( uint index, uint len ); |
203 | QCString &replace( uint index, uint len, const char * ); | 205 | QCString &replace( uint index, uint len, const char * ); |
204 | #ifndef QT_NO_REGEXP | 206 | #ifndef QT_NO_REGEXP |
205 | QCString &replace( const QRegExp &, const char * ); | 207 | QCString &replace( const QRegExp &, const char * ); |
206 | #endif | 208 | #endif |
207 | QCString &replace( char c, const char *after ); | 209 | QCString &replace( char c, const char *after ); |
208 | QCString &replace( const char *, const char * ); | 210 | QCString &replace( const char *, const char * ); |
209 | QCString &replace( char, char ); | 211 | QCString &replace( char, char ); |
210 | 212 | ||
211 | short toShort( bool *ok=0 )const; | 213 | short toShort( bool *ok=0 )const; |
212 | ushort toUShort( bool *ok=0 )const; | 214 | ushort toUShort( bool *ok=0 )const; |
213 | int toInt( bool *ok=0 )const; | 215 | int toInt( bool *ok=0 )const; |
214 | uint toUInt( bool *ok=0 )const; | 216 | uint toUInt( bool *ok=0 )const; |
215 | long toLong( bool *ok=0 )const; | 217 | long toLong( bool *ok=0 )const; |
216 | ulong toULong( bool *ok=0 )const; | 218 | ulong toULong( bool *ok=0 )const; |
217 | float toFloat( bool *ok=0 )const; | 219 | float toFloat( bool *ok=0 )const; |
218 | double toDouble( bool *ok=0 )const; | 220 | double toDouble( bool *ok=0 )const; |
219 | 221 | ||
220 | QCString &setStr( const char *s ); | 222 | QCString &setStr( const char *s ); |
221 | QCString &setNum( short ); | 223 | QCString &setNum( short ); |
222 | QCString &setNum( ushort ); | 224 | QCString &setNum( ushort ); |
223 | QCString &setNum( int ); | 225 | QCString &setNum( int ); |
224 | QCString &setNum( uint ); | 226 | QCString &setNum( uint ); |
225 | QCString &setNum( long ); | 227 | QCString &setNum( long ); |
226 | QCString &setNum( ulong ); | 228 | QCString &setNum( ulong ); |
227 | QCString &setNum( float, char f='g', int prec=6 ); | 229 | QCString &setNum( float, char f='g', int prec=6 ); |
228 | QCString &setNum( double, char f='g', int prec=6 ); | 230 | QCString &setNum( double, char f='g', int prec=6 ); |
229 | 231 | ||
230 | boolsetExpand( uint index, char c ); | 232 | boolsetExpand( uint index, char c ); |
231 | 233 | ||
232 | operator const char *() const; | 234 | operator const char *() const; |
233 | QCString &operator+=( const char *str ); | 235 | QCString &operator+=( const char *str ); |
234 | QCString &operator+=( char c ); | 236 | QCString &operator+=( char c ); |
237 | private: | ||
238 | intfind( const char *str, int index, bool cs, uint l ) const; | ||
235 | }; | 239 | }; |
236 | 240 | ||
237 | 241 | ||
238 | /***************************************************************************** | 242 | /***************************************************************************** |
239 | QCString stream functions | 243 | QCString stream functions |
240 | *****************************************************************************/ | 244 | *****************************************************************************/ |
241 | #ifndef QT_NO_DATASTREAM | 245 | #ifndef QT_NO_DATASTREAM |
242 | Q_EXPORT QDataStream &operator<<( QDataStream &, const QCString & ); | 246 | Q_EXPORT QDataStream &operator<<( QDataStream &, const QCString & ); |
243 | Q_EXPORT QDataStream &operator>>( QDataStream &, QCString & ); | 247 | Q_EXPORT QDataStream &operator>>( QDataStream &, QCString & ); |
244 | #endif | 248 | #endif |
245 | 249 | ||
246 | /***************************************************************************** | 250 | /***************************************************************************** |
247 | QCString inline functions | 251 | QCString inline functions |
248 | *****************************************************************************/ | 252 | *****************************************************************************/ |
249 | 253 | ||
250 | inline QCString &QCString::operator=( const QCString &s ) | 254 | inline QCString &QCString::operator=( const QCString &s ) |
251 | { return (QCString&)assign( s ); } | 255 | { return (QCString&)assign( s ); } |
252 | 256 | ||
253 | inline QCString &QCString::operator=( const char *str ) | 257 | inline QCString &QCString::operator=( const char *str ) |
254 | { return (QCString&)duplicate( str, qstrlen(str)+1 ); } | 258 | { return (QCString&)duplicate( str, qstrlen(str)+1 ); } |
255 | 259 | ||
256 | inline bool QCString::isNull() const | 260 | inline bool QCString::isNull() const |
257 | { return data() == 0; } | 261 | { return data() == 0; } |
258 | 262 | ||
259 | inline bool QCString::isEmpty() const | 263 | inline bool QCString::isEmpty() const |
260 | { return data() == 0 || *data() == '\0'; } | 264 | { return data() == 0 || *data() == '\0'; } |
261 | 265 | ||
262 | inline uint QCString::length() const | 266 | inline uint QCString::length() const |
263 | { return qstrlen( data() ); } | 267 | { return qstrlen( data() ); } |
264 | 268 | ||
265 | inline bool QCString::truncate( uint pos ) | 269 | inline bool QCString::truncate( uint pos ) |
266 | { return resize(pos+1); } | 270 | { return resize(pos+1); } |
267 | 271 | ||
268 | inline QCString QCString::copy() const | 272 | inline QCString QCString::copy() const |
269 | { return QCString( data() ); } | 273 | { return QCString( data() ); } |
270 | 274 | ||
271 | inline QCString &QCString::prepend( const char *s ) | 275 | inline QCString &QCString::prepend( const char *s ) |
272 | { return insert(0,s); } | 276 | { return insert(0,s); } |
273 | 277 | ||
274 | inline QCString &QCString::append( const char *s ) | 278 | inline QCString &QCString::append( const char *s ) |
275 | { return operator+=(s); } | 279 | { return operator+=(s); } |
276 | 280 | ||
277 | inline QCString &QCString::setNum( short n ) | 281 | inline QCString &QCString::setNum( short n ) |
278 | { return setNum((long)n); } | 282 | { return setNum((long)n); } |
279 | 283 | ||
280 | inline QCString &QCString::setNum( ushort n ) | 284 | inline QCString &QCString::setNum( ushort n ) |
281 | { return setNum((ulong)n); } | 285 | { return setNum((ulong)n); } |
282 | 286 | ||
@@ -343,49 +347,52 @@ Q_EXPORT inline bool operator>( const char *s1, const QCString &s2 ) | |||
343 | { return qstrcmp( s1, s2.data() ) > 0; } | 347 | { return qstrcmp( s1, s2.data() ) > 0; } |
344 | 348 | ||
345 | Q_EXPORT inline bool operator>=( const QCString &s1, const QCString& s2 ) | 349 | Q_EXPORT inline bool operator>=( const QCString &s1, const QCString& s2 ) |
346 | { return qstrcmp( s1.data(), s2.data() ) >= 0; } | 350 | { return qstrcmp( s1.data(), s2.data() ) >= 0; } |
347 | 351 | ||
348 | Q_EXPORT inline bool operator>=( const QCString &s1, const char *s2 ) | 352 | Q_EXPORT inline bool operator>=( const QCString &s1, const char *s2 ) |
349 | { return qstrcmp( s1.data(), s2 ) >= 0; } | 353 | { return qstrcmp( s1.data(), s2 ) >= 0; } |
350 | 354 | ||
351 | Q_EXPORT inline bool operator>=( const char *s1, const QCString &s2 ) | 355 | Q_EXPORT inline bool operator>=( const char *s1, const QCString &s2 ) |
352 | { return qstrcmp( s1, s2.data() ) >= 0; } | 356 | { return qstrcmp( s1, s2.data() ) >= 0; } |
353 | 357 | ||
354 | Q_EXPORT inline const QCString operator+( const QCString &s1, | 358 | Q_EXPORT inline const QCString operator+( const QCString &s1, |
355 | const QCString &s2 ) | 359 | const QCString &s2 ) |
356 | { | 360 | { |
357 | QCString tmp( s1.data() ); | 361 | QCString tmp( s1.data() ); |
358 | tmp += s2; | 362 | tmp += s2; |
359 | return tmp; | 363 | return tmp; |
360 | } | 364 | } |
361 | 365 | ||
362 | Q_EXPORT inline const QCString operator+( const QCString &s1, const char *s2 ) | 366 | Q_EXPORT inline const QCString operator+( const QCString &s1, const char *s2 ) |
363 | { | 367 | { |
364 | QCString tmp( s1.data() ); | 368 | QCString tmp( s1.data() ); |
365 | tmp += s2; | 369 | tmp += s2; |
366 | return tmp; | 370 | return tmp; |
367 | } | 371 | } |
368 | 372 | ||
369 | Q_EXPORT inline const QCString operator+( const char *s1, const QCString &s2 ) | 373 | Q_EXPORT inline const QCString operator+( const char *s1, const QCString &s2 ) |
370 | { | 374 | { |
371 | QCString tmp( s1 ); | 375 | QCString tmp( s1 ); |
372 | tmp += s2; | 376 | tmp += s2; |
373 | return tmp; | 377 | return tmp; |
374 | } | 378 | } |
375 | 379 | ||
376 | Q_EXPORT inline const QCString operator+( const QCString &s1, char c2 ) | 380 | Q_EXPORT inline const QCString operator+( const QCString &s1, char c2 ) |
377 | { | 381 | { |
378 | QCString tmp( s1.data() ); | 382 | QCString tmp( s1.data() ); |
379 | tmp += c2; | 383 | tmp += c2; |
380 | return tmp; | 384 | return tmp; |
381 | } | 385 | } |
382 | 386 | ||
383 | Q_EXPORT inline const QCString operator+( char c1, const QCString &s2 ) | 387 | Q_EXPORT inline const QCString operator+( char c1, const QCString &s2 ) |
384 | { | 388 | { |
385 | QCString tmp; | 389 | QCString tmp; |
386 | tmp += c1; | 390 | tmp += c1; |
387 | tmp += s2; | 391 | tmp += s2; |
388 | return tmp; | 392 | return tmp; |
389 | } | 393 | } |
390 | 394 | ||
395 | #ifdef QT_QWINEXPORT | ||
396 | #include <qwinexport.h> | ||
397 | #endif /* QT_QWINEXPORT */ | ||
391 | #endif // QCSTRING_H | 398 | #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: | |||
70 | type *find( const QString &k ) const | 70 | type *find( const QString &k ) const |
71 | { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); } | 71 | { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); } |
72 | type *operator[]( const QString &k ) const | 72 | type *operator[]( const QString &k ) const |
73 | { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); } | 73 | { return (type *)((QGDict*)this)->QGDict::look_string(k,0,0); } |
74 | 74 | ||
75 | void clear() { QGDict::clear(); } | 75 | void clear() { QGDict::clear(); } |
76 | void resize( uint n ) { QGDict::resize(n); } | 76 | void resize( uint n ) { QGDict::resize(n); } |
77 | void statistics() const { QGDict::statistics(); } | 77 | void statistics() const { QGDict::statistics(); } |
78 | 78 | ||
79 | #ifdef Q_QDOC | 79 | #ifdef Q_QDOC |
80 | protected: | 80 | protected: |
81 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); | 81 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); |
82 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; | 82 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | private: | 85 | private: |
86 | void deleteItem( Item d ); | 86 | void deleteItem( Item d ); |
87 | }; | 87 | }; |
88 | 88 | ||
89 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) | 89 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) |
90 | template<> inline void QDict<void>::deleteItem( Item ) | 90 | template<> inline void QDict<void>::deleteItem( Item ) |
91 | { | 91 | { |
92 | } | 92 | } |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | template<class type> inline void QDict<type>::deleteItem( QPtrCollection::Item d ) | 95 | template<class type> inline void QDict<type>::deleteItem( QPtrCollection::Item d ) |
96 | { | 96 | { |
97 | if ( del_item ) delete (type *)d; | 97 | if ( del_item ) delete (type *)d; |
98 | } | 98 | } |
99 | 99 | ||
100 | template<class type> | 100 | template<class type> |
101 | class QDictIterator : public QGDictIterator | 101 | class QDictIterator : public QGDictIterator |
102 | { | 102 | { |
103 | public: | 103 | public: |
104 | QDictIterator(const QDict<type> &d) : QGDictIterator((QGDict &)d) { } | 104 | QDictIterator(const QDict<type> &d) : QGDictIterator((QGDict &)d) { } |
105 | ~QDictIterator() {} | 105 | ~QDictIterator() {} |
106 | uint count() const { return dict->count(); } | 106 | uint count() const { return dict->count(); } |
107 | bool isEmpty() const { return dict->count() == 0; } | 107 | bool isEmpty() const { return dict->count() == 0; } |
108 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } | 108 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } |
109 | operator type *() const { return (type *)QGDictIterator::get(); } | 109 | operator type *() const { return (type *)QGDictIterator::get(); } |
110 | type *operator*() { return (type *)QGDictIterator::get(); } | 110 | type *operator*() { return (type *)QGDictIterator::get(); } |
111 | type *current() const { return (type *)QGDictIterator::get(); } | 111 | type *current() const { return (type *)QGDictIterator::get(); } |
112 | QString currentKey() const{ return QGDictIterator::getKeyString(); } | 112 | QString currentKey() const{ return QGDictIterator::getKeyString(); } |
113 | type *operator()() { return (type *)QGDictIterator::operator()(); } | 113 | type *operator()() { return (type *)QGDictIterator::operator()(); } |
114 | type *operator++() { return (type *)QGDictIterator::operator++(); } | 114 | type *operator++() { return (type *)QGDictIterator::operator++(); } |
115 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j); } | 115 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j); } |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #ifdef QT_QWINEXPORT | ||
119 | #define Q_DEFINED_QDICT | ||
120 | #include "qwinexport.h" | ||
121 | #endif /* QT_QWINEXPORT */ | ||
118 | #endif // QDICT_H | 122 | #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: | |||
133 | virtual QStringList entryList( const QString &nameFilter, | 133 | virtual QStringList entryList( const QString &nameFilter, |
134 | int filterSpec = DefaultFilter, | 134 | int filterSpec = DefaultFilter, |
135 | int sortSpec = DefaultSort ) const; | 135 | int sortSpec = DefaultSort ) const; |
136 | 136 | ||
137 | virtual const QFileInfoList *entryInfoList( int filterSpec = DefaultFilter, | 137 | virtual const QFileInfoList *entryInfoList( int filterSpec = DefaultFilter, |
138 | int sortSpec = DefaultSort ) const; | 138 | int sortSpec = DefaultSort ) const; |
139 | virtual const QFileInfoList *entryInfoList( const QString &nameFilter, | 139 | virtual const QFileInfoList *entryInfoList( const QString &nameFilter, |
140 | int filterSpec = DefaultFilter, | 140 | int filterSpec = DefaultFilter, |
141 | int sortSpec = DefaultSort ) const; | 141 | int sortSpec = DefaultSort ) const; |
142 | 142 | ||
143 | static const QFileInfoList *drives(); | 143 | static const QFileInfoList *drives(); |
144 | 144 | ||
145 | virtual bool mkdir( const QString &dirName, | 145 | virtual bool mkdir( const QString &dirName, |
146 | bool acceptAbsPath = TRUE ) const; | 146 | bool acceptAbsPath = TRUE ) const; |
147 | virtual bool rmdir( const QString &dirName, | 147 | virtual bool rmdir( const QString &dirName, |
148 | bool acceptAbsPath = TRUE ) const; | 148 | bool acceptAbsPath = TRUE ) const; |
149 | 149 | ||
150 | virtual bool isReadable() const; | 150 | virtual bool isReadable() const; |
151 | virtual bool exists() const; | 151 | virtual bool exists() const; |
152 | virtual bool isRoot() const; | 152 | virtual bool isRoot() const; |
153 | 153 | ||
154 | virtual bool isRelative() const; | 154 | virtual bool isRelative() const; |
155 | virtual void convertToAbs(); | 155 | virtual void convertToAbs(); |
156 | 156 | ||
157 | virtual bool operator==( const QDir & ) const; | 157 | virtual bool operator==( const QDir & ) const; |
158 | virtual bool operator!=( const QDir & ) const; | 158 | virtual bool operator!=( const QDir & ) const; |
159 | 159 | ||
160 | virtual bool remove( const QString &fileName, | 160 | virtual bool remove( const QString &fileName, |
161 | bool acceptAbsPath = TRUE ); | 161 | bool acceptAbsPath = TRUE ); |
162 | virtual bool rename( const QString &name, const QString &newName, | 162 | virtual bool rename( const QString &name, const QString &newName, |
163 | bool acceptAbsPaths = TRUE ); | 163 | bool acceptAbsPaths = TRUE ); |
164 | virtual bool exists( const QString &name, | 164 | virtual bool exists( const QString &name, |
165 | bool acceptAbsPath = TRUE ); | 165 | bool acceptAbsPath = TRUE ); |
166 | 166 | ||
167 | static char separator(); | 167 | static char separator(); |
168 | 168 | ||
169 | static bool setCurrent( const QString &path ); | 169 | static bool setCurrent( const QString &path ); |
170 | static QDir current(); | 170 | static QDir current(); |
171 | static QDir home(); | 171 | static QDir home(); |
172 | static QDir root(); | 172 | static QDir root(); |
173 | static QString currentDirPath(); | 173 | static QString currentDirPath(); |
174 | static QString homeDirPath(); | 174 | static QString homeDirPath(); |
175 | static QString rootDirPath(); | 175 | static QString rootDirPath(); |
176 | 176 | ||
177 | static bool match( const QStringList &filters, const QString &fileName ); | 177 | static bool match( const QStringList &filters, const QString &fileName ); |
178 | static bool match( const QString &filter, const QString &fileName ); | 178 | static bool match( const QString &filter, const QString &fileName ); |
179 | static QString cleanDirPath( const QString &dirPath ); | 179 | static QString cleanDirPath( const QString &dirPath ); |
180 | static bool isRelativePath( const QString &path ); | 180 | static bool isRelativePath( const QString &path ); |
181 | void refresh() const; | ||
181 | 182 | ||
182 | private: | 183 | private: |
183 | #ifdef Q_OS_MAC | 184 | #ifdef Q_OS_MAC |
184 | typedef struct FSSpec FSSpec; | 185 | typedef struct FSSpec FSSpec; |
185 | static FSSpec *make_spec(const QString &); | 186 | static FSSpec *make_spec(const QString &); |
186 | #endif | 187 | #endif |
187 | void init(); | 188 | void init(); |
188 | virtual bool readDirEntries( const QString &nameFilter, | 189 | virtual bool readDirEntries( const QString &nameFilter, |
189 | int FilterSpec, int SortSpec ); | 190 | int FilterSpec, int SortSpec ); |
190 | 191 | ||
191 | static void slashify ( QString &); | 192 | static void slashify( QString & ); |
192 | 193 | ||
193 | QStringdPath; | 194 | QStringdPath; |
194 | QStringList *fList; | 195 | QStringList *fList; |
195 | QFileInfoList *fiList; | 196 | QFileInfoList *fiList; |
196 | QStringnameFilt; | 197 | QStringnameFilt; |
197 | FilterSpecfiltS; | 198 | FilterSpecfiltS; |
198 | SortSpecsortS; | 199 | SortSpecsortS; |
199 | uint dirty: 1; | 200 | uint dirty: 1; |
200 | uintallDirs : 1; | 201 | uintallDirs : 1; |
201 | }; | 202 | }; |
202 | 203 | ||
203 | 204 | ||
204 | inline QString QDir::path() const | 205 | inline QString QDir::path() const |
205 | { | 206 | { |
206 | return dPath; | 207 | return dPath; |
207 | } | 208 | } |
208 | 209 | ||
209 | inline QString QDir::nameFilter() const | 210 | inline QString QDir::nameFilter() const |
210 | { | 211 | { |
211 | return nameFilt; | 212 | return nameFilt; |
212 | } | 213 | } |
213 | 214 | ||
214 | inline QDir::FilterSpec QDir::filter() const | 215 | inline QDir::FilterSpec QDir::filter() const |
215 | { | 216 | { |
216 | return filtS; | 217 | return filtS; |
217 | } | 218 | } |
218 | 219 | ||
219 | inline QDir::SortSpec QDir::sorting() const | 220 | inline QDir::SortSpec QDir::sorting() const |
220 | { | 221 | { |
221 | return sortS; | 222 | return sortS; |
222 | } | 223 | } |
223 | 224 | ||
224 | inline bool QDir::matchAllDirs() const | 225 | inline bool QDir::matchAllDirs() const |
225 | { | 226 | { |
226 | return allDirs; | 227 | return allDirs; |
227 | } | 228 | } |
228 | 229 | ||
229 | inline bool QDir::operator!=( const QDir &d ) const | 230 | inline bool QDir::operator!=( const QDir &d ) const |
230 | { | 231 | { |
231 | return !(*this == d); | 232 | return !(*this == d); |
232 | } | 233 | } |
233 | 234 | ||
234 | 235 | ||
235 | struct QDirSortItem { | 236 | struct QDirSortItem { |
236 | QString filename_cache; | 237 | QString filename_cache; |
237 | QFileInfo* item; | 238 | QFileInfo* item; |
238 | }; | 239 | }; |
239 | 240 | ||
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 @@ | |||
29 | // QDirectPainter | 29 | // QDirectPainter |
30 | //#define QT_NO_DIRECTPAINTER | 30 | //#define QT_NO_DIRECTPAINTER |
31 | 31 | ||
32 | // Special widget effects (fading, scrolling) | 32 | // Special widget effects (fading, scrolling) |
33 | //#define QT_NO_EFFECTS | 33 | //#define QT_NO_EFFECTS |
34 | 34 | ||
35 | // Freetype font engine | 35 | // Freetype font engine |
36 | //#define QT_NO_FREETYPE | 36 | //#define QT_NO_FREETYPE |
37 | 37 | ||
38 | // Dither QImage to 1-bit image | 38 | // Dither QImage to 1-bit image |
39 | //#define QT_NO_IMAGE_DITHER_TO_1 | 39 | //#define QT_NO_IMAGE_DITHER_TO_1 |
40 | 40 | ||
41 | // QImage::createHeuristicMask() | 41 | // QImage::createHeuristicMask() |
42 | //#define QT_NO_IMAGE_HEURISTIC_MASK | 42 | //#define QT_NO_IMAGE_HEURISTIC_MASK |
43 | 43 | ||
44 | // QImage mirroring | 44 | // QImage mirroring |
45 | //#define QT_NO_IMAGE_MIRROR | 45 | //#define QT_NO_IMAGE_MIRROR |
46 | 46 | ||
47 | // Smooth QImage scaling | 47 | // Smooth QImage scaling |
48 | //#define QT_NO_IMAGE_SMOOTHSCALE | 48 | //#define QT_NO_IMAGE_SMOOTHSCALE |
49 | 49 | ||
50 | // TrueColor QImage | 50 | // TrueColor QImage |
51 | //#define QT_NO_IMAGE_TRUECOLOR | 51 | //#define QT_NO_IMAGE_TRUECOLOR |
52 | 52 | ||
53 | // Automatic widget layout | 53 | // Automatic widget layout |
54 | //#define QT_NO_LAYOUT | 54 | //#define QT_NO_LAYOUT |
55 | 55 | ||
56 | // Networking | 56 | // Networking |
57 | //#define QT_NO_NETWORK | 57 | //#define QT_NO_NETWORK |
58 | 58 | ||
59 | // Palettes | 59 | // Palettes |
60 | //#define QT_NO_PALETTE | 60 | //#define QT_NO_PALETTE |
61 | 61 | ||
62 | // Alpha-blended cursor | 62 | // Alpha-blended cursor |
63 | //#define QT_NO_QWS_ALPHA_CURSOR | 63 | //#define QT_NO_QWS_ALPHA_CURSOR |
64 | 64 | ||
65 | // 1-bit monochrome | 65 | // 1-bit monochrome |
66 | //#define QT_NO_QWS_DEPTH_1 | 66 | //#define QT_NO_QWS_DEPTH_1 |
67 | 67 | ||
68 | // 15 or 16-bit color | 68 | // 15 or 16-bit color |
69 | //#define QT_NO_QWS_DEPTH_16 | 69 | //#define QT_NO_QWS_DEPTH_16 |
70 | 70 | ||
71 | // 24-bit color | 71 | // 24-bit color |
72 | //#define QT_NO_QWS_DEPTH_24 | 72 | //#define QT_NO_QWS_DEPTH_24 |
73 | 73 | ||
74 | // 32-bit color | 74 | // 32-bit color |
75 | //#define QT_NO_QWS_DEPTH_32 | 75 | //#define QT_NO_QWS_DEPTH_32 |
76 | 76 | ||
77 | // 4-bit greyscale | 77 | // 4-bit grayscale |
78 | //#define QT_NO_QWS_DEPTH_4 | 78 | //#define QT_NO_QWS_DEPTH_4 |
79 | 79 | ||
80 | // 8-bit color | 80 | // 8-bit color |
81 | //#define QT_NO_QWS_DEPTH_8 | 81 | //#define QT_NO_QWS_DEPTH_8 |
82 | 82 | ||
83 | // 8-bit grayscale | 83 | // 8-bit grayscale |
84 | //#define QT_NO_QWS_DEPTH_8GRAYSCALE | 84 | //#define QT_NO_QWS_DEPTH_8GRAYSCALE |
85 | 85 | ||
86 | // Favour code size over graphics speed | 86 | // Favour code size over graphics speed |
87 | //#define QT_NO_QWS_GFX_SPEED | 87 | //#define QT_NO_QWS_GFX_SPEED |
88 | 88 | ||
89 | // Console keyboard | 89 | // Console keyboard |
90 | //#define QT_NO_QWS_KEYBOARD | 90 | //#define QT_NO_QWS_KEYBOARD |
91 | 91 | ||
92 | // Linux framebuffer | 92 | // Linux framebuffer |
93 | //#define QT_NO_QWS_LINUXFB | 93 | //#define QT_NO_QWS_LINUXFB |
94 | 94 | ||
95 | // Mach64 acceleration | 95 | // Mach64 acceleration |
96 | //#define QT_NO_QWS_MACH64 | 96 | //#define QT_NO_QWS_MACH64 |
97 | 97 | ||
98 | // Window Manager | 98 | // Window Manager |
99 | //#define QT_NO_QWS_MANAGER | 99 | //#define QT_NO_QWS_MANAGER |
100 | 100 | ||
101 | // Matrox MGA acceleration | 101 | // Matrox MGA acceleration |
102 | //#define QT_NO_QWS_MATROX | 102 | //#define QT_NO_QWS_MATROX |
103 | 103 | ||
104 | // Autodetecting mouse driver | 104 | // Autodetecting mouse driver |
105 | //#define QT_NO_QWS_MOUSE_AUTO | 105 | //#define QT_NO_QWS_MOUSE_AUTO |
106 | 106 | ||
107 | // Non-autodetecting mouse driver | 107 | // Non-autodetecting mouse driver |
108 | //#define QT_NO_QWS_MOUSE_MANUAL | 108 | //#define QT_NO_QWS_MOUSE_MANUAL |
109 | 109 | ||
110 | // Qt/Embedded window system properties. | 110 | // Qt/Embedded window system properties. |
111 | //#define QT_NO_QWS_PROPERTIES | 111 | //#define QT_NO_QWS_PROPERTIES |
112 | 112 | ||
113 | // Repeater display | 113 | // Repeater display |
114 | //#define QT_NO_QWS_REPEATER | 114 | //#define QT_NO_QWS_REPEATER |
115 | 115 | ||
116 | // Saving of fonts | 116 | // Saving of fonts |
117 | //#define QT_NO_QWS_SAVEFONTS | 117 | //#define QT_NO_QWS_SAVEFONTS |
118 | 118 | ||
119 | // Shadow frame buffer | 119 | // Shadow frame buffer |
120 | //#define QT_NO_QWS_SHADOWFB | 120 | //#define QT_NO_QWS_SHADOWFB |
121 | 121 | ||
122 | // Virtual frame buffer | 122 | // Virtual frame buffer |
123 | //#define QT_NO_QWS_VFB | 123 | //#define QT_NO_QWS_VFB |
124 | 124 | ||
125 | // 4-bit VGA | 125 | // 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 @@ | |||
4 | ** Definition of QGArray class | 4 | ** Definition of QGArray class |
5 | ** | 5 | ** |
6 | ** Created : 930906 | 6 | ** Created : 930906 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QGARRAY_H | 38 | #ifndef QGARRAY_H |
39 | #define QGARRAY_H | 39 | #define QGARRAY_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qshared.h" | 42 | #include "qshared.h" |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | 45 | ||
46 | class Q_EXPORT QGArray // generic array | 46 | class Q_EXPORT QGArray // generic array |
47 | { | 47 | { |
48 | friend class QBuffer; | 48 | friend class QBuffer; |
49 | public: | 49 | public: |
50 | //### DO NOT USE THIS. IT IS PUBLIC BUT DO NOT USE IT IN NEW CODE. | 50 | //### DO NOT USE THIS. IT IS PUBLIC BUT DO NOT USE IT IN NEW CODE. |
51 | struct array_data : public QShared {// shared array | 51 | struct array_data : public QShared {// shared array |
52 | array_data(){ data=0; len=0; } | 52 | array_data():data(0),len(0) |
53 | #ifdef QT_QGARRAY_SPEED_OPTIM | ||
54 | ,maxl(0) | ||
55 | #endif | ||
56 | {} | ||
53 | char *data; // actual array data | 57 | char *data; // actual array data |
54 | uint len; | 58 | uint len; |
59 | #ifdef QT_QGARRAY_SPEED_OPTIM | ||
60 | uint maxl; | ||
61 | #endif | ||
55 | }; | 62 | }; |
56 | QGArray(); | 63 | QGArray(); |
64 | enum Optimization { MemOptim, SpeedOptim }; | ||
57 | protected: | 65 | protected: |
58 | QGArray( int, int ); // dummy; does not alloc | 66 | QGArray( int, int ); // dummy; does not alloc |
59 | QGArray( int size ); // allocate 'size' bytes | 67 | QGArray( int size ); // allocate 'size' bytes |
60 | QGArray( const QGArray &a ); // shallow copy | 68 | QGArray( const QGArray &a ); // shallow copy |
61 | virtual ~QGArray(); | 69 | virtual ~QGArray(); |
62 | 70 | ||
63 | QGArray &operator=( const QGArray &a ) { return assign( a ); } | 71 | QGArray &operator=( const QGArray &a ) { return assign( a ); } |
64 | 72 | ||
65 | virtual void detach(){ duplicate(*this); } | 73 | virtual void detach(){ duplicate(*this); } |
66 | 74 | ||
67 | // ### Qt 4.0: maybe provide two versions of data(), at(), etc. | 75 | // ### Qt 4.0: maybe provide two versions of data(), at(), etc. |
68 | char *data() const{ return shd->data; } | 76 | char *data() const{ return shd->data; } |
69 | uint nrefs() const{ return shd->count; } | 77 | uint nrefs() const{ return shd->count; } |
70 | uint size() const{ return shd->len; } | 78 | uint size() const{ return shd->len; } |
71 | boolisEqual( const QGArray &a ) const; | 79 | boolisEqual( const QGArray &a ) const; |
72 | 80 | ||
81 | boolresize( uint newsize, Optimization optim ); | ||
73 | boolresize( uint newsize ); | 82 | boolresize( uint newsize ); |
74 | 83 | ||
75 | boolfill( const char *d, int len, uint sz ); | 84 | boolfill( const char *d, int len, uint sz ); |
76 | 85 | ||
77 | QGArray &assign( const QGArray &a ); | 86 | QGArray &assign( const QGArray &a ); |
78 | QGArray &assign( const char *d, uint len ); | 87 | QGArray &assign( const char *d, uint len ); |
79 | QGArray &duplicate( const QGArray &a ); | 88 | QGArray &duplicate( const QGArray &a ); |
80 | QGArray &duplicate( const char *d, uint len ); | 89 | QGArray &duplicate( const char *d, uint len ); |
81 | voidstore( const char *d, uint len ); | 90 | voidstore( const char *d, uint len ); |
82 | 91 | ||
83 | array_data *sharedBlock() const { return shd; } | 92 | array_data *sharedBlock() const { return shd; } |
84 | voidsetSharedBlock( array_data *p ) { shd=(array_data*)p; } | 93 | voidsetSharedBlock( array_data *p ) { shd=(array_data*)p; } |
85 | 94 | ||
86 | QGArray &setRawData( const char *d, uint len ); | 95 | QGArray &setRawData( const char *d, uint len ); |
87 | voidresetRawData( const char *d, uint len ); | 96 | voidresetRawData( const char *d, uint len ); |
88 | 97 | ||
89 | int find( const char *d, uint index, uint sz ) const; | 98 | int find( const char *d, uint index, uint sz ) const; |
90 | int contains( const char *d, uint sz ) const; | 99 | int contains( const char *d, uint sz ) const; |
91 | 100 | ||
92 | voidsort( uint sz ); | 101 | voidsort( uint sz ); |
93 | int bsearch( const char *d, uint sz ) const; | 102 | int bsearch( const char *d, uint sz ) const; |
94 | 103 | ||
95 | char *at( uint index ) const; | 104 | char *at( uint index ) const; |
96 | 105 | ||
97 | boolsetExpand( uint index, const char *d, uint sz ); | 106 | boolsetExpand( uint index, const char *d, uint sz ); |
98 | 107 | ||
99 | protected: | 108 | protected: |
100 | virtual array_data *newData(); | 109 | virtual array_data *newData(); |
101 | virtual void deleteData( array_data *p ); | 110 | virtual void deleteData( array_data *p ); |
102 | 111 | ||
103 | private: | 112 | private: |
104 | static void msg_index( uint ); | 113 | static void msg_index( uint ); |
105 | array_data *shd; | 114 | array_data *shd; |
106 | }; | 115 | }; |
107 | 116 | ||
108 | 117 | ||
109 | inline char *QGArray::at( uint index ) const | 118 | inline char *QGArray::at( uint index ) const |
110 | { | 119 | { |
111 | #if defined(QT_CHECK_RANGE) | 120 | #if defined(QT_CHECK_RANGE) |
112 | if ( index >= size() ) { | 121 | if ( index >= size() ) { |
113 | msg_index( index ); | 122 | msg_index( index ); |
114 | index = 0; | 123 | index = 0; |
115 | } | 124 | } |
116 | #endif | 125 | #endif |
117 | return &shd->data[index]; | 126 | return &shd->data[index]; |
118 | } | 127 | } |
119 | 128 | ||
120 | 129 | ||
121 | #endif // QGARRAY_H | 130 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Global type declarations and definitions | 4 | ** Global type declarations and definitions |
5 | ** | 5 | ** |
6 | ** Created : 920529 | 6 | ** Created : 920529 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QGLOBAL_H | 38 | #ifndef QGLOBAL_H |
39 | #define QGLOBAL_H | 39 | #define QGLOBAL_H |
40 | 40 | ||
41 | #define QT_VERSION_STR "3.1.0-b2" | 41 | #define QT_VERSION_STR "3.1.2" |
42 | /* | 42 | /* |
43 | QT_VERSION is (major << 16) + (minor << 8) + patch. | 43 | QT_VERSION is (major << 16) + (minor << 8) + patch. |
44 | */ | 44 | */ |
45 | #define QT_VERSION 0x030100 | 45 | #define QT_VERSION 0x030102 |
46 | 46 | ||
47 | /* | 47 | /* |
48 | The operating system, must be one of: (Q_OS_x) | 48 | The operating system, must be one of: (Q_OS_x) |
49 | 49 | ||
50 | MACX- Mac OS X | 50 | MACX- Mac OS X |
51 | MAC9- Mac OS 9 | 51 | MAC9- Mac OS 9 |
52 | MSDOS- MS-DOS and Windows | 52 | MSDOS- MS-DOS and Windows |
53 | OS2- OS/2 | 53 | OS2- OS/2 |
54 | OS2EMX- XFree86 on OS/2 (not PM) | 54 | OS2EMX- XFree86 on OS/2 (not PM) |
55 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) | 55 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) |
56 | CYGWIN- Cygwin | 56 | CYGWIN- Cygwin |
57 | SOLARIS- Sun Solaris | 57 | SOLARIS- Sun Solaris |
58 | HPUX- HP-UX | 58 | HPUX- HP-UX |
59 | ULTRIX- DEC Ultrix | 59 | ULTRIX- DEC Ultrix |
60 | LINUX- Linux | 60 | LINUX- Linux |
61 | FREEBSD- FreeBSD | 61 | FREEBSD- FreeBSD |
62 | NETBSD- NetBSD | 62 | NETBSD- NetBSD |
63 | OPENBSD- OpenBSD | 63 | OPENBSD- OpenBSD |
64 | BSDI- BSD/OS | 64 | BSDI- BSD/OS |
65 | IRIX- SGI Irix | 65 | IRIX- SGI Irix |
66 | OSF- HP Tru64 UNIX | 66 | OSF- HP Tru64 UNIX |
67 | SCO- SCO OpenServer 5 | 67 | SCO- SCO OpenServer 5 |
68 | UNIXWARE- UnixWare 7, Open UNIX 8 | 68 | UNIXWARE- UnixWare 7, Open UNIX 8 |
69 | AIX- AIX | 69 | AIX- AIX |
70 | HURD- GNU Hurd | 70 | HURD- GNU Hurd |
71 | DGUX- DG/UX | 71 | DGUX- DG/UX |
72 | RELIANT- Reliant UNIX | 72 | RELIANT- Reliant UNIX |
73 | DYNIX- DYNIX/ptx | 73 | DYNIX- DYNIX/ptx |
74 | QNX- QNX | 74 | QNX- QNX |
75 | QNX6- QNX RTP 6.1 | 75 | QNX6- QNX RTP 6.1 |
76 | LYNX- LynxOS | 76 | LYNX- LynxOS |
77 | BSD4- Any BSD 4.4 system | 77 | BSD4- Any BSD 4.4 system |
78 | UNIX- Any UNIX BSD/SYSV system | 78 | UNIX- Any UNIX BSD/SYSV system |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #if defined(__APPLE__) && defined(__GNUC__) | 81 | #if defined(__APPLE__) && defined(__GNUC__) |
82 | # define Q_OS_MACX | 82 | # define Q_OS_MACX |
83 | #elif defined(__MACOSX__) | 83 | #elif defined(__MACOSX__) |
84 | # define Q_OS_MACX | 84 | # define Q_OS_MACX |
85 | #elif defined(macintosh) | 85 | #elif defined(macintosh) |
86 | # define Q_OS_MAC9 | 86 | # define Q_OS_MAC9 |
87 | #elif defined(__CYGWIN__) | 87 | #elif defined(__CYGWIN__) |
88 | # define Q_OS_CYGWIN | 88 | # define Q_OS_CYGWIN |
89 | #elif defined(MSDOS) || defined(_MSDOS) | 89 | #elif defined(MSDOS) || defined(_MSDOS) |
90 | # define Q_OS_MSDOS | 90 | # define Q_OS_MSDOS |
91 | #elif defined(__OS2__) | 91 | #elif defined(__OS2__) |
92 | # if defined(__EMX__) | 92 | # if defined(__EMX__) |
93 | # define Q_OS_OS2EMX | 93 | # define Q_OS_OS2EMX |
@@ -96,226 +96,232 @@ | |||
96 | # endif | 96 | # endif |
97 | #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) | 97 | #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) |
98 | # define Q_OS_WIN32 | 98 | # define Q_OS_WIN32 |
99 | # define Q_OS_WIN64 | 99 | # define Q_OS_WIN64 |
100 | #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) | 100 | #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) |
101 | # define Q_OS_WIN32 | 101 | # define Q_OS_WIN32 |
102 | #elif defined(__MWERKS__) && defined(__INTEL__) | 102 | #elif defined(__MWERKS__) && defined(__INTEL__) |
103 | # define Q_OS_WIN32 | 103 | # define Q_OS_WIN32 |
104 | #elif defined(__sun) || defined(sun) | 104 | #elif defined(__sun) || defined(sun) |
105 | # define Q_OS_SOLARIS | 105 | # define Q_OS_SOLARIS |
106 | #elif defined(hpux) || defined(__hpux) | 106 | #elif defined(hpux) || defined(__hpux) |
107 | # define Q_OS_HPUX | 107 | # define Q_OS_HPUX |
108 | #elif defined(__ultrix) || defined(ultrix) | 108 | #elif defined(__ultrix) || defined(ultrix) |
109 | # define Q_OS_ULTRIX | 109 | # define Q_OS_ULTRIX |
110 | #elif defined(sinix) | 110 | #elif defined(sinix) |
111 | # define Q_OS_RELIANT | 111 | # define Q_OS_RELIANT |
112 | #elif defined(__linux__) || defined(__linux) | 112 | #elif defined(__linux__) || defined(__linux) |
113 | # define Q_OS_LINUX | 113 | # define Q_OS_LINUX |
114 | #elif defined(__FreeBSD__) | 114 | #elif defined(__FreeBSD__) |
115 | # define Q_OS_FREEBSD | 115 | # define Q_OS_FREEBSD |
116 | # define Q_OS_BSD4 | 116 | # define Q_OS_BSD4 |
117 | #elif defined(__NetBSD__) | 117 | #elif defined(__NetBSD__) |
118 | # define Q_OS_NETBSD | 118 | # define Q_OS_NETBSD |
119 | # define Q_OS_BSD4 | 119 | # define Q_OS_BSD4 |
120 | #elif defined(__OpenBSD__) | 120 | #elif defined(__OpenBSD__) |
121 | # define Q_OS_OPENBSD | 121 | # define Q_OS_OPENBSD |
122 | # define Q_OS_BSD4 | 122 | # define Q_OS_BSD4 |
123 | #elif defined(__bsdi__) | 123 | #elif defined(__bsdi__) |
124 | # define Q_OS_BSDI | 124 | # define Q_OS_BSDI |
125 | # define Q_OS_BSD4 | 125 | # define Q_OS_BSD4 |
126 | #elif defined(__sgi) | 126 | #elif defined(__sgi) |
127 | # define Q_OS_IRIX | 127 | # define Q_OS_IRIX |
128 | #elif defined(__osf__) | 128 | #elif defined(__osf__) |
129 | # define Q_OS_OSF | 129 | # define Q_OS_OSF |
130 | #elif defined(_AIX) | 130 | #elif defined(_AIX) |
131 | # define Q_OS_AIX | 131 | # define Q_OS_AIX |
132 | #elif defined(__Lynx__) | 132 | #elif defined(__Lynx__) |
133 | # define Q_OS_LYNX | 133 | # define Q_OS_LYNX |
134 | #elif defined(__GNU_HURD__) | 134 | #elif defined(__GNU_HURD__) |
135 | # define Q_OS_HURD | 135 | # define Q_OS_HURD |
136 | #elif defined(__DGUX__) | 136 | #elif defined(__DGUX__) |
137 | # define Q_OS_DGUX | 137 | # define Q_OS_DGUX |
138 | #elif defined(__QNXNTO__) | 138 | #elif defined(__QNXNTO__) |
139 | # define Q_OS_QNX6 | 139 | # define Q_OS_QNX6 |
140 | #elif defined(__QNX__) | 140 | #elif defined(__QNX__) |
141 | # define Q_OS_QNX | 141 | # define Q_OS_QNX |
142 | #elif defined(_SEQUENT_) | 142 | #elif defined(_SEQUENT_) |
143 | # define Q_OS_DYNIX | 143 | # define Q_OS_DYNIX |
144 | #elif defined(_SCO_DS) /* SCO OpenServer 5 */ | 144 | #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ |
145 | # define Q_OS_SCO | 145 | # define Q_OS_SCO |
146 | #elif defined(__UNIXWARE__) /* UnixWare 7 + GCC, Open UNIX 8 + GCC */ | 146 | #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ |
147 | # define Q_OS_UNIXWARE | 147 | # define Q_OS_UNIXWARE |
148 | # define Q_OS_UNIXWARE7 | 148 | # define Q_OS_UNIXWARE7 |
149 | #elif defined(__USLC__) /* UnixWare 7 + UDK, Open UNIX 8 + OUDK */ | 149 | #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ |
150 | # define Q_OS_UNIXWARE | 150 | # define Q_OS_UNIXWARE |
151 | # define Q_OS_UNIXWARE7 | 151 | # define Q_OS_UNIXWARE7 |
152 | #else | 152 | #else |
153 | # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" | 153 | # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) | 156 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) |
157 | # define Q_OS_MAC | 157 | # define Q_OS_MAC |
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | 160 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) |
161 | # undef Q_OS_UNIX | 161 | # undef Q_OS_UNIX |
162 | #elif !defined(Q_OS_UNIX) | 162 | #elif !defined(Q_OS_UNIX) |
163 | # define Q_OS_UNIX | 163 | # define Q_OS_UNIX |
164 | #endif | 164 | #endif |
165 | 165 | ||
166 | 166 | ||
167 | /* | 167 | /* |
168 | The compiler, must be one of: (Q_CC_x) | 168 | The compiler, must be one of: (Q_CC_x) |
169 | 169 | ||
170 | SYM- Symantec C++ for both PC and Macintosh | 170 | SYM- Symantec C++ for both PC and Macintosh |
171 | MPW- MPW C++ | 171 | MPW- MPW C++ |
172 | MWERKS- Metrowerks CodeWarrior | 172 | MWERKS- Metrowerks CodeWarrior |
173 | MSVC- Microsoft Visual C/C++ | 173 | MSVC- Microsoft Visual C/C++ |
174 | BOR- Borland/Turbo C++ | 174 | BOR- Borland/Turbo C++ |
175 | WAT- Watcom C++ | 175 | WAT- Watcom C++ |
176 | GNU- GNU C++ | 176 | GNU- GNU C++ |
177 | COMEAU- Comeau C++ | 177 | COMEAU- Comeau C++ |
178 | EDG- Edison Design Group C++ | 178 | EDG- Edison Design Group C++ |
179 | OC - CenterLine C++ | 179 | OC - CenterLine C++ |
180 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ | 180 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ |
181 | MIPS- MIPSpro C++ | 181 | MIPS- MIPSpro C++ |
182 | DEC- DEC C++ | 182 | DEC- DEC C++ |
183 | HP - HPUX C++ | 183 | HP - HPUX C++ |
184 | HPACC- HPUX ANSI C++ | 184 | HPACC- HPUX ANSI C++ |
185 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ | 185 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ |
186 | CDS- Reliant C++ | 186 | CDS- Reliant C++ |
187 | KAI- KAI C++ | 187 | KAI- KAI C++ |
188 | INTEL- Intel C++ | 188 | INTEL- Intel C++ |
189 | HIGHC- MetaWare High C/C++ | 189 | HIGHC- MetaWare High C/C++ |
190 | PGI- Portland Group C++ | 190 | PGI- Portland Group C++ |
191 | GHS- Green Hills Optimizing C++ Compilers | 191 | GHS- Green Hills Optimizing C++ Compilers |
192 | 192 | ||
193 | Should be sorted most to least authoritative. | 193 | Should be sorted most to least authoritative. |
194 | */ | 194 | */ |
195 | 195 | ||
196 | /* Symantec C++ is now Digital Mars */ | 196 | /* Symantec C++ is now Digital Mars */ |
197 | #if defined(__DMC__) || defined(__SC__) | 197 | #if defined(__DMC__) || defined(__SC__) |
198 | # define Q_CC_SYM | 198 | # define Q_CC_SYM |
199 | /* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ | 199 | /* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ |
200 | # if defined(__SC__) && __SC__ < 0x750 | 200 | # if defined(__SC__) && __SC__ < 0x750 |
201 | # define Q_NO_EXPLICIT_KEYWORD | 201 | # define Q_NO_EXPLICIT_KEYWORD |
202 | # endif | 202 | # endif |
203 | # define Q_NO_USING_KEYWORD | 203 | # define Q_NO_USING_KEYWORD |
204 | # if !defined(_CPPUNWIND) | 204 | # if !defined(_CPPUNWIND) |
205 | # define Q_NO_EXCEPTIONS | 205 | # define Q_NO_EXCEPTIONS |
206 | # endif | 206 | # endif |
207 | 207 | ||
208 | #elif defined(applec) | 208 | #elif defined(applec) |
209 | # define Q_CC_MPW | 209 | # define Q_CC_MPW |
210 | # define Q_NO_BOOL_TYPE | 210 | # define Q_NO_BOOL_TYPE |
211 | # define Q_NO_EXPLICIT_KEYWORD | 211 | # define Q_NO_EXPLICIT_KEYWORD |
212 | # define Q_NO_USING_KEYWORD | 212 | # define Q_NO_USING_KEYWORD |
213 | 213 | ||
214 | #elif defined(__MWERKS__) | 214 | #elif defined(__MWERKS__) |
215 | # define Q_CC_MWERKS | 215 | # define Q_CC_MWERKS |
216 | /* "explicit" recognized since 4.0d1 */ | 216 | /* "explicit" recognized since 4.0d1 */ |
217 | # define QMAC_PASCAL pascal | 217 | # define QMAC_PASCAL pascal |
218 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 218 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
219 | 219 | ||
220 | #elif defined(_MSC_VER) | 220 | #elif defined(_MSC_VER) |
221 | # define Q_CC_MSVC | 221 | # define Q_CC_MSVC |
222 | /* proper support of bool for _MSC_VER >= 1100 */ | 222 | /* proper support of bool for _MSC_VER >= 1100 */ |
223 | # define Q_CANNOT_DELETE_CONSTANT | 223 | # define Q_CANNOT_DELETE_CONSTANT |
224 | # define Q_INLINE_TEMPLATES inline | 224 | # define Q_INLINE_TEMPLATES inline |
225 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ | 225 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ |
226 | # if _MSC_VER >= 1300 | 226 | # if _MSC_VER >= 1300 |
227 | # define Q_CC_MSVC_NET | 227 | # define Q_CC_MSVC_NET |
228 | # define Q_TYPENAME | 228 | # if _MSC_VER < 1310 |
229 | # define Q_TYPENAME | ||
230 | # endif | ||
229 | # endif | 231 | # endif |
230 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 232 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
231 | 233 | ||
232 | #elif defined(__BORLANDC__) || defined(__TURBOC__) | 234 | #elif defined(__BORLANDC__) || defined(__TURBOC__) |
233 | # define Q_CC_BOR | 235 | # define Q_CC_BOR |
234 | # if __BORLANDC__ < 0x502 | 236 | # if __BORLANDC__ < 0x502 |
235 | # define Q_NO_BOOL_TYPE | 237 | # define Q_NO_BOOL_TYPE |
236 | # define Q_NO_EXPLICIT_KEYWORD | 238 | # define Q_NO_EXPLICIT_KEYWORD |
237 | # endif | 239 | # endif |
238 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 240 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
239 | 241 | ||
240 | #elif defined(__WATCOMC__) | 242 | #elif defined(__WATCOMC__) |
241 | # define Q_CC_WAT | 243 | # define Q_CC_WAT |
242 | # if defined(Q_OS_QNX4) | 244 | # if defined(Q_OS_QNX4) |
243 | /* compiler flags */ | 245 | /* compiler flags */ |
244 | # define Q_TYPENAME | 246 | # define Q_TYPENAME |
245 | # define Q_NO_BOOL_TYPE | 247 | # define Q_NO_BOOL_TYPE |
246 | # define Q_CANNOT_DELETE_CONSTANT | 248 | # define Q_CANNOT_DELETE_CONSTANT |
247 | # define mutable | 249 | # define mutable |
248 | /* ??? */ | 250 | /* ??? */ |
249 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 251 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
250 | /* no template classes in QVariant */ | 252 | /* no template classes in QVariant */ |
251 | # define QT_NO_TEMPLATE_VARIANT | 253 | # define QT_NO_TEMPLATE_VARIANT |
252 | /* Wcc does not fill in functions needed by valuelists, maps, and | 254 | /* Wcc does not fill in functions needed by valuelists, maps, and |
253 | valuestacks implicitly */ | 255 | valuestacks implicitly */ |
254 | # define Q_FULL_TEMPLATE_INSTANTIATION | 256 | # define Q_FULL_TEMPLATE_INSTANTIATION |
255 | /* can we just compare the structures? */ | 257 | /* can we just compare the structures? */ |
256 | # define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP | 258 | # define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP |
257 | /* these are not useful to our customers */ | 259 | /* these are not useful to our customers */ |
258 | # define QT_QWS_NO_SHM | 260 | # define QT_QWS_NO_SHM |
259 | # define QT_NO_QWS_MULTIPROCESS | 261 | # define QT_NO_QWS_MULTIPROCESS |
260 | # define QT_NO_SQL | 262 | # define QT_NO_SQL |
261 | # define QT_NO_QWS_CURSOR | 263 | # define QT_NO_QWS_CURSOR |
262 | # endif | 264 | # endif |
263 | 265 | ||
264 | #elif defined(__GNUC__) | 266 | #elif defined(__GNUC__) |
265 | # define Q_CC_GNU | 267 | # define Q_CC_GNU |
266 | # define Q_C_CALLBACKS | 268 | # define Q_C_CALLBACKS |
267 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 | 269 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 |
268 | # define Q_FULL_TEMPLATE_INSTANTIATION | 270 | # define Q_FULL_TEMPLATE_INSTANTIATION |
269 | # endif | 271 | # endif |
270 | /* GCC 2.95 knows "using" but does not support it correctly */ | 272 | /* GCC 2.95 knows "using" but does not support it correctly */ |
271 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 | 273 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 |
272 | # define Q_NO_USING_KEYWORD | 274 | # define Q_NO_USING_KEYWORD |
273 | # endif | 275 | # endif |
276 | /* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ | ||
277 | # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 | ||
278 | # define Q_WRONG_SB_CTYPE_MACROS | ||
279 | # endif | ||
274 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) | 280 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) |
275 | # define Q_PACKED __attribute__ ((packed)) | 281 | # define Q_PACKED __attribute__ ((packed)) |
276 | # endif | 282 | # endif |
277 | # if !defined(__EXCEPTIONS) | 283 | # if !defined(__EXCEPTIONS) |
278 | # define Q_NO_EXCEPTIONS | 284 | # define Q_NO_EXCEPTIONS |
279 | # endif | 285 | # endif |
280 | 286 | ||
281 | /* IBM compiler versions are a bit messy. There are actually two products: | 287 | /* IBM compiler versions are a bit messy. There are actually two products: |
282 | the C product, and the C++ product. The C++ compiler is always packaged | 288 | the C product, and the C++ product. The C++ compiler is always packaged |
283 | with the latest version of the C compiler. Version numbers do not always | 289 | with the latest version of the C compiler. Version numbers do not always |
284 | match. This little table (I'm not sure it's accurate) should be helpful: | 290 | match. This little table (I'm not sure it's accurate) should be helpful: |
285 | 291 | ||
286 | C++ product C product | 292 | C++ product C product |
287 | 293 | ||
288 | C Set 3.1 C Compiler 3.0 | 294 | C Set 3.1 C Compiler 3.0 |
289 | ... ... | 295 | ... ... |
290 | C++ Compiler 3.6.6 C Compiler 4.3 | 296 | C++ Compiler 3.6.6 C Compiler 4.3 |
291 | ... ... | 297 | ... ... |
292 | Visual Age C++ 4.0 ... | 298 | Visual Age C++ 4.0 ... |
293 | ... ... | 299 | ... ... |
294 | Visual Age C++ 5.0 C Compiler 5.0 | 300 | Visual Age C++ 5.0 C Compiler 5.0 |
295 | 301 | ||
296 | Now: | 302 | Now: |
297 | __xlC__ is the version of the C compiler in hexadecimal notation | 303 | __xlC__ is the version of the C compiler in hexadecimal notation |
298 | is only an approximation of the C++ compiler version | 304 | is only an approximation of the C++ compiler version |
299 | __IBMCPP__ is the version of the C++ compiler in decimal notation | 305 | __IBMCPP__ is the version of the C++ compiler in decimal notation |
300 | but it is not defined on older compilers like C Set 3.1 */ | 306 | but it is not defined on older compilers like C Set 3.1 */ |
301 | #elif defined(__xlC__) | 307 | #elif defined(__xlC__) |
302 | # define Q_CC_XLC | 308 | # define Q_CC_XLC |
303 | # define Q_FULL_TEMPLATE_INSTANTIATION | 309 | # define Q_FULL_TEMPLATE_INSTANTIATION |
304 | # if __xlC__ < 0x400 | 310 | # if __xlC__ < 0x400 |
305 | # define Q_NO_BOOL_TYPE | 311 | # define Q_NO_BOOL_TYPE |
306 | # define Q_NO_EXPLICIT_KEYWORD | 312 | # define Q_NO_EXPLICIT_KEYWORD |
307 | # define Q_NO_USING_KEYWORD | 313 | # define Q_NO_USING_KEYWORD |
308 | # define Q_TYPENAME | 314 | # define Q_TYPENAME |
309 | # define Q_INLINE_TEMPLATES inline | 315 | # define Q_INLINE_TEMPLATES inline |
310 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 316 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
311 | # define Q_CANNOT_DELETE_CONSTANT | 317 | # define Q_CANNOT_DELETE_CONSTANT |
312 | # endif | 318 | # endif |
313 | 319 | ||
314 | /* Older versions of DEC C++ do not define __EDG__ or __EDG - observed | 320 | /* Older versions of DEC C++ do not define __EDG__ or __EDG - observed |
315 | on DEC C++ V5.5-004. New versions do define __EDG__ - observed on | 321 | on DEC C++ V5.5-004. New versions do define __EDG__ - observed on |
316 | Compaq C++ V6.3-002. | 322 | Compaq C++ V6.3-002. |
317 | This compiler is different enough from other EDG compilers to handle | 323 | This compiler is different enough from other EDG compilers to handle |
318 | it separately anyway. */ | 324 | it separately anyway. */ |
319 | #elif defined(__DECCXX) | 325 | #elif defined(__DECCXX) |
320 | # define Q_CC_DEC | 326 | # define Q_CC_DEC |
321 | /* Compaq C++ V6 compilers are EDG-based but I'm not sure about older | 327 | /* Compaq C++ V6 compilers are EDG-based but I'm not sure about older |
@@ -345,212 +351,230 @@ | |||
345 | __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b | 351 | __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b |
346 | __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ | 352 | __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ |
347 | #elif defined(__EDG) || defined(__EDG__) | 353 | #elif defined(__EDG) || defined(__EDG__) |
348 | # define Q_CC_EDG | 354 | # define Q_CC_EDG |
349 | /* From the EDG documentation (does not seem to apply to Compaq C++): | 355 | /* From the EDG documentation (does not seem to apply to Compaq C++): |
350 | _BOOL | 356 | _BOOL |
351 | Defined in C++ mode when bool is a keyword. The name of this | 357 | Defined in C++ mode when bool is a keyword. The name of this |
352 | predefined macro is specified by a configuration flag. _BOOL | 358 | predefined macro is specified by a configuration flag. _BOOL |
353 | is the default. | 359 | is the default. |
354 | __BOOL_DEFINED | 360 | __BOOL_DEFINED |
355 | Defined in Microsoft C++ mode when bool is a keyword. */ | 361 | Defined in Microsoft C++ mode when bool is a keyword. */ |
356 | # if !defined(_BOOL) && !defined(__BOOL_DEFINED) | 362 | # if !defined(_BOOL) && !defined(__BOOL_DEFINED) |
357 | # define Q_NO_BOOL_TYPE | 363 | # define Q_NO_BOOL_TYPE |
358 | # endif | 364 | # endif |
359 | 365 | ||
360 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ | 366 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ |
361 | # if defined(__COMO__) | 367 | # if defined(__COMO__) |
362 | # define Q_CC_COMEAU | 368 | # define Q_CC_COMEAU |
363 | # define Q_C_CALLBACKS | 369 | # define Q_C_CALLBACKS |
364 | 370 | ||
365 | /* Using the `using' keyword avoids KAI C++ warnings */ | 371 | /* Using the `using' keyword avoids KAI C++ warnings */ |
366 | # elif defined(__KCC) | 372 | # elif defined(__KCC) |
367 | # define Q_CC_KAI | 373 | # define Q_CC_KAI |
368 | # if !defined(_EXCEPTIONS) | 374 | # if !defined(_EXCEPTIONS) |
369 | # define Q_NO_EXCEPTIONS | 375 | # define Q_NO_EXCEPTIONS |
370 | # endif | 376 | # endif |
371 | 377 | ||
372 | /* Using the `using' keyword avoids Intel C++ warnings */ | 378 | /* Using the `using' keyword avoids Intel C++ warnings */ |
373 | # elif defined(__INTEL_COMPILER) | 379 | # elif defined(__INTEL_COMPILER) |
374 | # define Q_CC_INTEL | 380 | # define Q_CC_INTEL |
375 | # if !defined(__EXCEPTIONS) | 381 | # if !defined(__EXCEPTIONS) |
376 | # define Q_NO_EXCEPTIONS | 382 | # define Q_NO_EXCEPTIONS |
377 | # endif | 383 | # endif |
378 | 384 | ||
379 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ | 385 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ |
380 | # elif defined(__PGI) | 386 | # elif defined(__PGI) |
381 | # define Q_CC_PGI | 387 | # define Q_CC_PGI |
382 | # if !defined(__EXCEPTIONS) | 388 | # if !defined(__EXCEPTIONS) |
383 | # define Q_NO_EXCEPTIONS | 389 | # define Q_NO_EXCEPTIONS |
384 | # endif | 390 | # endif |
385 | 391 | ||
386 | /* Never tested! */ | 392 | /* Never tested! */ |
387 | # elif defined(__ghs) | 393 | # elif defined(__ghs) |
388 | # define Q_CC_GHS | 394 | # define Q_CC_GHS |
389 | 395 | ||
390 | /* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ | 396 | /* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ |
391 | # elif defined(__USLC__) && defined(__SCO_VERSION__) | 397 | # elif defined(__USLC__) && defined(__SCO_VERSION__) |
392 | # define Q_CC_USLC | 398 | # define Q_CC_USLC |
399 | /* The latest UDK 7.1.1b does not need this, but previous versions do */ | ||
400 | # if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010) | ||
401 | # define Q_INLINE_TEMPLATES inline | ||
402 | # endif | ||
393 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 403 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
394 | 404 | ||
395 | /* Never tested! */ | 405 | /* Never tested! */ |
396 | # elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) | 406 | # elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) |
397 | # define Q_CC_OC | 407 | # define Q_CC_OC |
398 | # define Q_NO_USING_KEYWORD | 408 | # define Q_NO_USING_KEYWORD |
399 | 409 | ||
400 | /* CDS++ is not documented to define __EDG__ or __EDG in the Reliant | 410 | /* CDS++ defines __EDG__ although this is not documented in the Reliant |
401 | documentation but we suppose it does, in any case it does follow | 411 | documentation. It also follows conventions like _BOOL and this documented */ |
402 | conventions like _BOOL */ | ||
403 | # elif defined(sinix) | 412 | # elif defined(sinix) |
404 | # define Q_CC_CDS | 413 | # define Q_CC_CDS |
405 | # define Q_NO_USING_KEYWORD | 414 | # define Q_NO_USING_KEYWORD |
406 | # if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */ | 415 | # if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */ |
407 | # define Q_NO_EXCEPTIONS | 416 | # define Q_NO_EXCEPTIONS |
408 | # endif | 417 | # endif |
409 | 418 | ||
410 | /* The MIPSpro compiler in o32 mode is based on EDG but disables features | 419 | /* The MIPSpro compiler in o32 mode is based on EDG but disables features |
411 | such as template specialization nevertheless */ | 420 | such as template specialization nevertheless */ |
412 | # elif defined(__sgi) | 421 | # elif defined(__sgi) |
413 | # define Q_CC_MIPS | 422 | # define Q_CC_MIPS |
414 | # if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ | 423 | # if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ |
415 | # define Q_TYPENAME | 424 | # define Q_TYPENAME |
416 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 425 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
417 | # define Q_STRICT_INLINING_RULES | 426 | # define Q_STRICT_INLINING_RULES |
427 | # define Q_NO_EXPLICIT_KEYWORD | ||
428 | # define Q_INLINE_TEMPLATES inline | ||
418 | # elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ | 429 | # elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ |
419 | # define Q_TYPENAME | 430 | # define Q_TYPENAME |
420 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 431 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
421 | # endif | 432 | # endif |
422 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 433 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
423 | # endif | 434 | # endif |
424 | 435 | ||
425 | /* The older UnixWare 2.X compiler? */ | 436 | /* The older UnixWare 2.X compiler? */ |
426 | #elif defined(__USLC__) && !defined(__SCO_VERSION__) | 437 | #elif defined(__USLC__) |
427 | # define Q_CC_USLC | 438 | # define Q_CC_USLC |
439 | # define Q_TYPENAME | ||
428 | # define Q_NO_BOOL_TYPE | 440 | # define Q_NO_BOOL_TYPE |
429 | # define Q_NO_EXPLICIT_KEYWORD | 441 | # define Q_NO_EXPLICIT_KEYWORD |
430 | # define Q_NO_USING_KEYWORD | 442 | # define Q_NO_USING_KEYWORD |
443 | # define Q_INLINE_TEMPLATES inline | ||
431 | 444 | ||
432 | /* Never tested! */ | 445 | /* Never tested! */ |
433 | #elif defined(__HIGHC__) | 446 | #elif defined(__HIGHC__) |
434 | # define Q_CC_HIGHC | 447 | # define Q_CC_HIGHC |
435 | 448 | ||
436 | #elif defined(__SUNPRO_CC) | 449 | #elif defined(__SUNPRO_CC) |
437 | # define Q_CC_SUN | 450 | # define Q_CC_SUN |
438 | /* 5.0 compiler or better | 451 | /* 5.0 compiler or better |
439 | 'bool' is enabled by default but can be disabled using -features=nobool | 452 | 'bool' is enabled by default but can be disabled using -features=nobool |
440 | in which case _BOOL is not defined | 453 | in which case _BOOL is not defined |
441 | this is the default in 4.2 compatibility mode triggered by -compat=4 */ | 454 | this is the default in 4.2 compatibility mode triggered by -compat=4 */ |
442 | # if __SUNPRO_CC >= 0x500 | 455 | # if __SUNPRO_CC >= 0x500 |
443 | # if !defined(_BOOL) | 456 | # if !defined(_BOOL) |
444 | # define Q_NO_BOOL_TYPE | 457 | # define Q_NO_BOOL_TYPE |
445 | # endif | 458 | # endif |
446 | # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) | 459 | # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) |
447 | # define Q_NO_USING_KEYWORD | 460 | # define Q_NO_USING_KEYWORD |
448 | # endif | 461 | # endif |
449 | # define Q_C_CALLBACKS | 462 | # define Q_C_CALLBACKS |
450 | /* 4.2 compiler or older */ | 463 | /* 4.2 compiler or older */ |
451 | # else | 464 | # else |
452 | # define Q_NO_BOOL_TYPE | 465 | # define Q_NO_BOOL_TYPE |
453 | # define Q_NO_EXPLICIT_KEYWORD | 466 | # define Q_NO_EXPLICIT_KEYWORD |
454 | # define Q_NO_USING_KEYWORD | 467 | # define Q_NO_USING_KEYWORD |
455 | # endif | 468 | # endif |
456 | 469 | ||
470 | /* CDS++ does not seem to define __EDG__ or __EDG according to Reliant | ||
471 | documentation but nevertheless uses EDG conventions like _BOOL */ | ||
472 | #elif defined(sinix) | ||
473 | # define Q_CC_EDG | ||
474 | # define Q_CC_CDS | ||
475 | # if !defined(_BOOL) | ||
476 | # define Q_NO_BOOL_TYPE | ||
477 | # endif | ||
478 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | ||
479 | |||
457 | #elif defined(Q_OS_HPUX) | 480 | #elif defined(Q_OS_HPUX) |
458 | /* __HP_aCC was not defined in first aCC releases */ | 481 | /* __HP_aCC was not defined in first aCC releases */ |
459 | # if defined(__HP_aCC) || __cplusplus >= 199707L | 482 | # if defined(__HP_aCC) || __cplusplus >= 199707L |
460 | # define Q_CC_HPACC | 483 | # define Q_CC_HPACC |
461 | # else | 484 | # else |
462 | # define Q_CC_HP | 485 | # define Q_CC_HP |
463 | # define Q_NO_BOOL_TYPE | 486 | # define Q_NO_BOOL_TYPE |
464 | # define Q_FULL_TEMPLATE_INSTANTIATION | 487 | # define Q_FULL_TEMPLATE_INSTANTIATION |
465 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 488 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
466 | # define Q_NO_EXPLICIT_KEYWORD | 489 | # define Q_NO_EXPLICIT_KEYWORD |
467 | # endif | 490 | # endif |
468 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 491 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
469 | 492 | ||
470 | #else | 493 | #else |
471 | # error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" | 494 | # error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" |
472 | #endif | 495 | #endif |
473 | 496 | ||
474 | #ifndef Q_PACKED | 497 | #ifndef Q_PACKED |
475 | # define Q_PACKED | 498 | # define Q_PACKED |
476 | #endif | 499 | #endif |
477 | 500 | ||
478 | 501 | ||
479 | /* | 502 | /* |
480 | The window system, must be one of: (Q_WS_x) | 503 | The window system, must be one of: (Q_WS_x) |
481 | 504 | ||
482 | MACX- Mac OS X | 505 | MACX- Mac OS X |
483 | MAC9- Mac OS 9 | 506 | MAC9- Mac OS 9 |
484 | QWS- Qt/Embedded | 507 | QWS- Qt/Embedded |
485 | WIN32- Windows | 508 | WIN32- Windows |
486 | X11- X Window System | 509 | X11- X Window System |
487 | PM - unsupported | 510 | PM - unsupported |
488 | WIN16- unsupported | 511 | WIN16- unsupported |
489 | */ | 512 | */ |
490 | 513 | ||
491 | #if defined(Q_OS_MAC9) | 514 | #if defined(Q_OS_MAC9) |
492 | # define Q_WS_MAC9 | 515 | # define Q_WS_MAC9 |
493 | #elif defined(Q_OS_MSDOS) | 516 | #elif defined(Q_OS_MSDOS) |
494 | # define Q_WS_WIN16 | 517 | # define Q_WS_WIN16 |
495 | # error "Qt requires Win32 and does not work with Windows 3.x" | 518 | # error "Qt requires Win32 and does not work with Windows 3.x" |
496 | #elif defined(_WIN32_X11_) | 519 | #elif defined(_WIN32_X11_) |
497 | # define Q_WS_X11 | 520 | # define Q_WS_X11 |
498 | #elif defined(Q_OS_WIN32) | 521 | #elif defined(Q_OS_WIN32) |
499 | # define Q_WS_WIN32 | 522 | # define Q_WS_WIN32 |
500 | # if defined(Q_OS_WIN64) | 523 | # if defined(Q_OS_WIN64) |
501 | # define Q_WS_WIN64 | 524 | # define Q_WS_WIN64 |
502 | # endif | 525 | # endif |
503 | #elif defined(Q_OS_OS2) | 526 | #elif defined(Q_OS_OS2) |
504 | # define Q_WS_PM | 527 | # define Q_WS_PM |
505 | # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" | 528 | # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" |
506 | #elif defined(Q_OS_UNIX) | 529 | #elif defined(Q_OS_UNIX) |
507 | # if defined(QWS) | 530 | # if defined(QWS) |
508 | # define Q_WS_QWS | 531 | # define Q_WS_QWS |
532 | # define QT_NO_QWS_IM | ||
509 | # elif defined(Q_OS_MACX) | 533 | # elif defined(Q_OS_MACX) |
510 | # define Q_WS_MACX | 534 | # define Q_WS_MACX |
511 | # else | 535 | # else |
512 | # define Q_WS_X11 | 536 | # define Q_WS_X11 |
513 | # endif | 537 | # endif |
514 | #endif | 538 | #endif |
515 | #if defined(Q_OS_MAC) && !defined(QMAC_PASCAL) | 539 | #if defined(Q_OS_MAC) && !defined(QMAC_PASCAL) |
516 | # define QMAC_PASCAL | 540 | # define QMAC_PASCAL |
517 | #endif | 541 | #endif |
518 | 542 | ||
519 | #if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) | 543 | #if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) |
520 | # define Q_WS_WIN | 544 | # define Q_WS_WIN |
521 | #endif | 545 | #endif |
522 | 546 | ||
523 | #if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11) | 547 | #if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11) |
524 | # define Q_WS_MAC | 548 | # define Q_WS_MAC |
525 | #endif | 549 | #endif |
526 | 550 | ||
527 | 551 | ||
528 | /* | 552 | /* |
529 | Some classes do not permit copies to be made of an object. | 553 | Some classes do not permit copies to be made of an object. |
530 | These classes contains a private copy constructor and operator= | 554 | These classes contains a private copy constructor and operator= |
531 | to disable copying (the compiler gives an error message). | 555 | to disable copying (the compiler gives an error message). |
532 | Undefine Q_DISABLE_COPY to turn off this checking. | 556 | Undefine Q_DISABLE_COPY to turn off this checking. |
533 | */ | 557 | */ |
534 | 558 | ||
535 | #define Q_DISABLE_COPY | 559 | #define Q_DISABLE_COPY |
536 | 560 | ||
537 | #if defined(__cplusplus) | 561 | #if defined(__cplusplus) |
538 | 562 | ||
539 | 563 | ||
540 | // | 564 | // |
541 | // Useful type definitions for Qt | 565 | // Useful type definitions for Qt |
542 | // | 566 | // |
543 | 567 | ||
544 | #if defined(Q_NO_BOOL_TYPE) | 568 | #if defined(Q_NO_BOOL_TYPE) |
545 | #if defined(Q_CC_HP) | 569 | #if defined(Q_CC_HP) |
546 | // bool is an unsupported reserved keyword in later versions | 570 | // bool is an unsupported reserved keyword in later versions |
547 | #define bool int | 571 | #define bool int |
548 | #else | 572 | #else |
549 | typedef int bool; | 573 | typedef int bool; |
550 | #endif | 574 | #endif |
551 | #endif | 575 | #endif |
552 | 576 | ||
553 | typedef unsigned char uchar; | 577 | typedef unsigned char uchar; |
554 | typedef unsigned short ushort; | 578 | typedef unsigned short ushort; |
555 | typedef unsigneduint; | 579 | typedef unsigneduint; |
556 | typedef unsigned long ulong; | 580 | typedef unsigned long ulong; |
@@ -700,155 +724,173 @@ class QDataStream; | |||
700 | #include "qmodules.h" | 724 | #include "qmodules.h" |
701 | #ifndef QT_MODULE_ICONVIEW | 725 | #ifndef QT_MODULE_ICONVIEW |
702 | # define QT_NO_ICONVIEW | 726 | # define QT_NO_ICONVIEW |
703 | #endif | 727 | #endif |
704 | #ifndef QT_MODULE_WORKSPACE | 728 | #ifndef QT_MODULE_WORKSPACE |
705 | # define QT_NO_WORKSPACE | 729 | # define QT_NO_WORKSPACE |
706 | #endif | 730 | #endif |
707 | #ifndef QT_MODULE_NETWORK | 731 | #ifndef QT_MODULE_NETWORK |
708 | #define QT_NO_NETWORK | 732 | #define QT_NO_NETWORK |
709 | #endif | 733 | #endif |
710 | #ifndef QT_MODULE_CANVAS | 734 | #ifndef QT_MODULE_CANVAS |
711 | # define QT_NO_CANVAS | 735 | # define QT_NO_CANVAS |
712 | #endif | 736 | #endif |
713 | #ifndef QT_MODULE_TABLE | 737 | #ifndef QT_MODULE_TABLE |
714 | #define QT_NO_TABLE | 738 | #define QT_NO_TABLE |
715 | #endif | 739 | #endif |
716 | #ifndef QT_MODULE_XML | 740 | #ifndef QT_MODULE_XML |
717 | # define QT_NO_XML | 741 | # define QT_NO_XML |
718 | #endif | 742 | #endif |
719 | #ifndef QT_MODULE_OPENGL | 743 | #ifndef QT_MODULE_OPENGL |
720 | # define QT_NO_OPENGL | 744 | # define QT_NO_OPENGL |
721 | #endif | 745 | #endif |
722 | #if !defined(QT_MODULE_SQL) | 746 | #if !defined(QT_MODULE_SQL) |
723 | # define QT_NO_SQL | 747 | # define QT_NO_SQL |
724 | #endif | 748 | #endif |
725 | 749 | ||
726 | #if defined(Q_WS_MAC9) | 750 | #if defined(Q_WS_MAC9) |
727 | //No need for menu merging | 751 | //No need for menu merging |
728 | # ifndef QMAC_QMENUBAR_NO_MERGE | 752 | # ifndef QMAC_QMENUBAR_NO_MERGE |
729 | # define QMAC_QMENUBAR_NO_MERGE | 753 | # define QMAC_QMENUBAR_NO_MERGE |
730 | # endif | 754 | # endif |
731 | //Mac9 does not use quartz | 755 | //Mac9 does not use quartz |
732 | # ifndef QMAC_NO_QUARTZ | 756 | # ifndef QMAC_NO_QUARTZ |
733 | # define QMAC_NO_QUARTZ | 757 | # define QMAC_NO_QUARTZ |
734 | # endif | 758 | # endif |
735 | # ifndef QMAC_QMENUBAR_NO_EVENT | 759 | # ifndef QMAC_QMENUBAR_NO_EVENT |
736 | # define QMAC_QMENUBAR_NO_EVENT | 760 | # define QMAC_QMENUBAR_NO_EVENT |
737 | # endif | 761 | # endif |
738 | #endif | 762 | #endif |
739 | #if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks | 763 | #if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks |
740 | # ifndef QMAC_NO_QUARTZ | 764 | # ifndef QMAC_NO_QUARTZ |
741 | # define QMAC_NO_QUARTZ | 765 | # define QMAC_NO_QUARTZ |
742 | # endif | 766 | # endif |
743 | # ifndef QMAC_QMENUBAR_NO_EVENT | 767 | # ifndef QMAC_QMENUBAR_NO_EVENT |
744 | # define QMAC_QMENUBAR_NO_EVENT | 768 | # define QMAC_QMENUBAR_NO_EVENT |
745 | # endif | 769 | # endif |
746 | #endif | 770 | #endif |
747 | 771 | ||
772 | #if !defined(Q_WS_QWS) && !defined(QT_NO_COP) | ||
773 | # define QT_NO_COP | ||
774 | #endif | ||
775 | |||
748 | #ifndef QT_H | 776 | #ifndef QT_H |
749 | #include <qfeatures.h> | 777 | #include <qfeatures.h> |
750 | #endif // QT_H | 778 | #endif // QT_H |
751 | 779 | ||
752 | 780 | ||
753 | // | 781 | // |
754 | // Create Qt DLL if QT_DLL is defined (Windows only) | 782 | // Create Qt DLL if QT_DLL is defined (Windows only) |
783 | // or QT_SHARED is defined (Kylix only) | ||
755 | // | 784 | // |
756 | 785 | ||
757 | #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | 786 | #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) |
758 | # if defined(QT_NODLL) | 787 | # if defined(QT_NODLL) |
759 | # undef QT_MAKEDLL | 788 | # undef QT_MAKEDLL |
760 | # undef QT_DLL | 789 | # undef QT_DLL |
761 | # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ | 790 | # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ |
762 | # if defined(QT_DLL) | 791 | # if defined(QT_DLL) |
763 | # undef QT_DLL | 792 | # undef QT_DLL |
764 | # endif | 793 | # endif |
765 | # define Q_EXPORT __declspec(dllexport) | 794 | # define Q_EXPORT __declspec(dllexport) |
766 | # define Q_TEMPLATEDLL | 795 | # define Q_TEMPLATEDLL |
767 | # define Q_TEMPLATE_EXTERN | 796 | # define Q_TEMPLATE_EXTERN |
768 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ | 797 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ |
769 | # elif defined(QT_DLL) /* use a Qt DLL library */ | 798 | # elif defined(QT_DLL) /* use a Qt DLL library */ |
770 | # define Q_EXPORT __declspec(dllimport) | 799 | # define Q_EXPORT __declspec(dllimport) |
771 | # define Q_TEMPLATEDLL | 800 | # define Q_TEMPLATEDLL |
772 | # ifndef Q_TEMPLATE_EXTERN | 801 | # ifndef Q_TEMPLATE_EXTERN |
773 | # if defined(Q_CC_MSVC) | 802 | # if defined(Q_CC_MSVC_NET) |
774 | # define Q_TEMPLATE_EXTERN /*extern*/ //### too many warnings, even though disabled | 803 | # define Q_TEMPLATE_EXTERN extern |
775 | # else | 804 | # else |
776 | # define Q_TEMPLATE_EXTERN | 805 | # define Q_TEMPLATE_EXTERN |
777 | # endif | 806 | # endif |
778 | # endif | 807 | # endif |
779 | # undef Q_DISABLE_COPY /* avoid unresolved externals */ | 808 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ |
809 | # endif | ||
810 | #elif defined(Q_OS_LINUX) && defined(Q_CC_BOR) | ||
811 | # if defined(QT_SHARED)/* create a Qt shared library */ | ||
812 | # define Q_EXPORT __declspec(dllexport) | ||
813 | # define Q_TEMPLATEDLL | ||
814 | # define Q_TEMPLATE_EXTERN | ||
815 | # undef Q_DISABLE_COPY/* avoid unresolved externals */ | ||
816 | # else | ||
817 | # define Q_TEMPLATEDLL | ||
818 | # define Q_TEMPLATE_EXTERN | ||
819 | # undef Q_DISABLE_COPY /* avoid unresolved externals */ | ||
780 | # endif | 820 | # endif |
781 | #else | 821 | #else |
782 | # undef QT_MAKEDLL /* ignore these for other platforms */ | 822 | # undef QT_MAKEDLL /* ignore these for other platforms */ |
783 | # undef QT_DLL | 823 | # undef QT_DLL |
784 | #endif | 824 | #endif |
785 | 825 | ||
786 | #ifndef Q_EXPORT | 826 | #ifndef Q_EXPORT |
787 | # define Q_EXPORT | 827 | # define Q_EXPORT |
788 | #endif | 828 | #endif |
789 | 829 | ||
790 | 830 | ||
791 | // | 831 | // |
792 | // Some platform specific stuff | 832 | // Some platform specific stuff |
793 | // | 833 | // |
794 | 834 | ||
795 | #if defined(Q_WS_WIN) | 835 | #if defined(Q_WS_WIN) |
796 | extern Q_EXPORT bool qt_winunicode; | 836 | extern Q_EXPORT bool qt_winunicode; |
797 | #endif | 837 | #endif |
798 | 838 | ||
799 | 839 | ||
800 | // | 840 | // |
801 | // System information | 841 | // System information |
802 | // | 842 | // |
803 | 843 | ||
804 | Q_EXPORT const char *qVersion(); | 844 | Q_EXPORT const char *qVersion(); |
805 | Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); | 845 | Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); |
806 | #if defined(Q_WS_WIN) | 846 | #if defined(Q_OS_MAC) |
847 | int qMacVersion(); | ||
848 | #elif defined(Q_WS_WIN) | ||
807 | Q_EXPORT int qWinVersion(); | 849 | Q_EXPORT int qWinVersion(); |
808 | #if defined(UNICODE) | 850 | #if defined(UNICODE) |
809 | #define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } | 851 | #define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } |
810 | #define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) | 852 | #define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) |
811 | #else | 853 | #else |
812 | #define QT_WA( uni, ansi ) ansi | 854 | #define QT_WA( uni, ansi ) ansi |
813 | #define QT_WA_INLINE( uni, ansi ) ansi | 855 | #define QT_WA_INLINE( uni, ansi ) ansi |
814 | #endif | 856 | #endif |
815 | #endif | 857 | #endif |
816 | 858 | ||
817 | #ifdef Q_OS_TEMP | 859 | #ifdef Q_OS_TEMP |
818 | #ifdef QT_WA | 860 | #ifdef QT_WA |
819 | #undef QT_WA | 861 | #undef QT_WA |
820 | #undef QT_WA_INLINE | 862 | #undef QT_WA_INLINE |
821 | #endif | 863 | #endif |
822 | #define QT_WA( uni, ansi ) uni | 864 | #define QT_WA( uni, ansi ) uni |
823 | #define QT_WA_INLINE( uni, ansi ) ( uni ) | 865 | #define QT_WA_INLINE( uni, ansi ) ( uni ) |
824 | #endif | 866 | #endif |
825 | 867 | ||
826 | #ifndef Q_INLINE_TEMPLATES | 868 | #ifndef Q_INLINE_TEMPLATES |
827 | # define Q_INLINE_TEMPLATES | 869 | # define Q_INLINE_TEMPLATES |
828 | #endif | 870 | #endif |
829 | 871 | ||
830 | #ifndef Q_TYPENAME | 872 | #ifndef Q_TYPENAME |
831 | # define Q_TYPENAME typename | 873 | # define Q_TYPENAME typename |
832 | #endif | 874 | #endif |
833 | 875 | ||
834 | // | 876 | // |
835 | // Use to avoid "unused parameter" warnings | 877 | // Use to avoid "unused parameter" warnings |
836 | // | 878 | // |
837 | 879 | ||
838 | #define Q_UNUSED(x) (void)x; | 880 | #define Q_UNUSED(x) (void)x; |
839 | 881 | ||
840 | // | 882 | // |
841 | // Debugging and error handling | 883 | // Debugging and error handling |
842 | // | 884 | // |
843 | 885 | ||
844 | #if !defined(QT_NO_CHECK) | 886 | #if !defined(QT_NO_CHECK) |
845 | # define QT_CHECK_STATE // check state of objects etc. | 887 | # define QT_CHECK_STATE // check state of objects etc. |
846 | # define QT_CHECK_RANGE // check range of indexes etc. | 888 | # define QT_CHECK_RANGE // check range of indexes etc. |
847 | # define QT_CHECK_NULL // check null pointers | 889 | # define QT_CHECK_NULL // check null pointers |
848 | # define QT_CHECK_MATH // check math functions | 890 | # define QT_CHECK_MATH // check math functions |
849 | #endif | 891 | #endif |
850 | 892 | ||
851 | #if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG) | 893 | #if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG) |
852 | # define QT_DEBUG // display debug messages | 894 | # define QT_DEBUG // display debug messages |
853 | # if !defined(QT_NO_COMPAT) // compatibility with Qt 2 | 895 | # if !defined(QT_NO_COMPAT) // compatibility with Qt 2 |
854 | # if !defined(NO_DEBUG) && !defined(DEBUG) | 896 | # if !defined(NO_DEBUG) && !defined(DEBUG) |
@@ -924,83 +966,100 @@ Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit | |||
924 | #endif // QT_NO_COMPAT | 966 | #endif // QT_NO_COMPAT |
925 | 967 | ||
926 | 968 | ||
927 | Q_EXPORT bool qt_check_pointer( bool c, const char *, int ); | 969 | Q_EXPORT bool qt_check_pointer( bool c, const char *, int ); |
928 | 970 | ||
929 | #if defined(QT_CHECK_NULL) | 971 | #if defined(QT_CHECK_NULL) |
930 | # define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__)) | 972 | # define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__)) |
931 | #else | 973 | #else |
932 | # define Q_CHECK_PTR(p) | 974 | # define Q_CHECK_PTR(p) |
933 | #endif | 975 | #endif |
934 | 976 | ||
935 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 | 977 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 |
936 | # if !defined(CHECK_PTR) | 978 | # if !defined(CHECK_PTR) |
937 | # define CHECK_PTR(x) Q_CHECK_PTR(x) | 979 | # define CHECK_PTR(x) Q_CHECK_PTR(x) |
938 | # endif | 980 | # endif |
939 | #endif // QT_NO_COMPAT | 981 | #endif // QT_NO_COMPAT |
940 | 982 | ||
941 | enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; | 983 | enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg }; |
942 | 984 | ||
943 | typedef void (*QtMsgHandler)(QtMsgType, const char *); | 985 | typedef void (*QtMsgHandler)(QtMsgType, const char *); |
944 | Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler ); | 986 | Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler ); |
945 | 987 | ||
946 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 | 988 | #if !defined(QT_NO_COMPAT) // compatibility with Qt 2 |
947 | typedef QtMsgHandler msg_handler; | 989 | typedef QtMsgHandler msg_handler; |
948 | #endif // QT_NO_COMPAT | 990 | #endif // QT_NO_COMPAT |
949 | 991 | ||
950 | Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE ); | 992 | Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE ); |
951 | 993 | ||
952 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc, | 994 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc, |
953 | const char *newfunc ); | 995 | const char *newfunc ); |
954 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); | 996 | Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); |
955 | Q_EXPORT void qObsolete( const char *message ); | 997 | Q_EXPORT void qObsolete( const char *message ); |
956 | 998 | ||
957 | 999 | ||
958 | // | 1000 | // |
959 | // Install paths from configure | 1001 | // Install paths from configure |
960 | // | 1002 | // |
961 | 1003 | ||
962 | Q_EXPORT const char *qInstallPath(); | 1004 | Q_EXPORT const char *qInstallPath(); |
963 | Q_EXPORT const char *qInstallPathDocs(); | 1005 | Q_EXPORT const char *qInstallPathDocs(); |
964 | Q_EXPORT const char *qInstallPathHeaders(); | 1006 | Q_EXPORT const char *qInstallPathHeaders(); |
965 | Q_EXPORT const char *qInstallPathLibs(); | 1007 | Q_EXPORT const char *qInstallPathLibs(); |
966 | Q_EXPORT const char *qInstallPathBins(); | 1008 | Q_EXPORT const char *qInstallPathBins(); |
967 | Q_EXPORT const char *qInstallPathPlugins(); | 1009 | Q_EXPORT const char *qInstallPathPlugins(); |
968 | Q_EXPORT const char *qInstallPathData(); | 1010 | Q_EXPORT const char *qInstallPathData(); |
969 | 1011 | ||
970 | #endif // __cplusplus | 1012 | #endif // __cplusplus |
971 | 1013 | ||
1014 | // compilers which follow outdated template instantiation rules | ||
1015 | // require a class to have a comparison operator to exist when | ||
1016 | // a QValueList of this type is instantiated. It's not actually | ||
1017 | // used in the list, though. Hence the dummy implementation. | ||
1018 | // Just in case other code relies on it we better trigger a warning | ||
1019 | // mandating a real implementation. | ||
1020 | #ifdef Q_FULL_TEMPLATE_INSTANTIATION | ||
1021 | # define Q_DUMMY_COMPARISON_OPERATOR(C) \ | ||
1022 | bool operator==( const C& ) const { \ | ||
1023 | qWarning( #C"::operator==( const "#C"& ) got called." ); \ | ||
1024 | return FALSE; \ | ||
1025 | } | ||
1026 | #else | ||
1027 | # define Q_DUMMY_COMPARISON_OPERATOR(C) | ||
1028 | #endif | ||
1029 | |||
972 | #endif // QGLOBAL_H | 1030 | #endif // QGLOBAL_H |
973 | 1031 | ||
974 | // | 1032 | // |
975 | // Avoid some particularly useless warnings from some stupid compilers. | 1033 | // Avoid some particularly useless warnings from some stupid compilers. |
976 | // To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out | 1034 | // To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out |
977 | // the line "#define QT_NO_WARNINGS" | 1035 | // the line "#define QT_NO_WARNINGS" |
978 | // | 1036 | // |
979 | 1037 | ||
980 | #if !defined(QT_CC_WARNINGS) | 1038 | #if !defined(QT_CC_WARNINGS) |
981 | # define QT_NO_WARNINGS | 1039 | # define QT_NO_WARNINGS |
982 | #endif | 1040 | #endif |
983 | #if defined(QT_NO_WARNINGS) | 1041 | #if defined(QT_NO_WARNINGS) |
984 | # if defined(Q_CC_MSVC) | 1042 | # if defined(Q_CC_MSVC) |
985 | # pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data | 1043 | # pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data |
986 | # pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' | 1044 | # pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' |
987 | # pragma warning(disable: 4514) // unreferenced inline/local function has been removed | 1045 | # pragma warning(disable: 4514) // unreferenced inline/local function has been removed |
988 | # pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning) | 1046 | # pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning) |
989 | # pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' | 1047 | # pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' |
990 | # pragma warning(disable: 4706) // assignment within conditional expression | 1048 | # pragma warning(disable: 4706) // assignment within conditional expression |
991 | # pragma warning(disable: 4786) // truncating debug info after 255 characters | 1049 | # pragma warning(disable: 4786) // truncating debug info after 255 characters |
992 | # pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated | 1050 | # pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated |
993 | # pragma warning(disable: 4355) // 'this' : used in base member initializer list | 1051 | # pragma warning(disable: 4355) // 'this' : used in base member initializer list |
994 | # pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation | 1052 | # pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation |
1053 | # pragma warning(disable: 4710) // function not inlined | ||
995 | # elif defined(Q_CC_BOR) | 1054 | # elif defined(Q_CC_BOR) |
996 | # pragma option -w-inl | 1055 | # pragma option -w-inl |
997 | # pragma option -w-aus | 1056 | # pragma option -w-aus |
998 | # pragma warn -inl | 1057 | # pragma warn -inl |
999 | # pragma warn -pia | 1058 | # pragma warn -pia |
1000 | # pragma warn -ccc | 1059 | # pragma warn -ccc |
1001 | # pragma warn -rch | 1060 | # pragma warn -rch |
1002 | # pragma warn -sig | 1061 | # pragma warn -sig |
1003 | # elif defined(Q_CC_MWERKS) | 1062 | # elif defined(Q_CC_MWERKS) |
1004 | # pragma warn_possunwant off | 1063 | # pragma warn_possunwant off |
1005 | # endif | 1064 | # endif |
1006 | #endif | 1065 | #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: | |||
66 | bool remove( long k ) { return QGDict::remove_int(k); } | 66 | bool remove( long k ) { return QGDict::remove_int(k); } |
67 | type *take( long k ) { return (type*)QGDict::take_int(k); } | 67 | type *take( long k ) { return (type*)QGDict::take_int(k); } |
68 | type *find( long k ) const | 68 | type *find( long k ) const |
69 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } | 69 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } |
70 | type *operator[]( long k ) const | 70 | type *operator[]( long k ) const |
71 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } | 71 | { return (type *)((QGDict*)this)->QGDict::look_int(k,0,0); } |
72 | void clear() { QGDict::clear(); } | 72 | void clear() { QGDict::clear(); } |
73 | void resize( uint n ) { QGDict::resize(n); } | 73 | void resize( uint n ) { QGDict::resize(n); } |
74 | void statistics() const { QGDict::statistics(); } | 74 | void statistics() const { QGDict::statistics(); } |
75 | 75 | ||
76 | #ifdef Q_QDOC | 76 | #ifdef Q_QDOC |
77 | protected: | 77 | protected: |
78 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); | 78 | virtual QDataStream& read( QDataStream &, QPtrCollection::Item & ); |
79 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; | 79 | virtual QDataStream& write( QDataStream &, QPtrCollection::Item ) const; |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | private: | 82 | private: |
83 | void deleteItem( Item d ); | 83 | void deleteItem( Item d ); |
84 | }; | 84 | }; |
85 | 85 | ||
86 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) | 86 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) |
87 | template<> inline void QIntDict<void>::deleteItem( QPtrCollection::Item ) | 87 | template<> inline void QIntDict<void>::deleteItem( QPtrCollection::Item ) |
88 | { | 88 | { |
89 | } | 89 | } |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | template<class type> inline void QIntDict<type>::deleteItem( QPtrCollection::Item d ) | 92 | template<class type> inline void QIntDict<type>::deleteItem( QPtrCollection::Item d ) |
93 | { | 93 | { |
94 | if ( del_item ) delete (type*)d; | 94 | if ( del_item ) delete (type*)d; |
95 | } | 95 | } |
96 | 96 | ||
97 | template<class type> | 97 | template<class type> |
98 | class QIntDictIterator : public QGDictIterator | 98 | class QIntDictIterator : public QGDictIterator |
99 | { | 99 | { |
100 | public: | 100 | public: |
101 | QIntDictIterator(const QIntDict<type> &d) :QGDictIterator((QGDict &)d) {} | 101 | QIntDictIterator(const QIntDict<type> &d) :QGDictIterator((QGDict &)d) {} |
102 | ~QIntDictIterator() {} | 102 | ~QIntDictIterator() {} |
103 | uint count() const { return dict->count(); } | 103 | uint count() const { return dict->count(); } |
104 | bool isEmpty() const { return dict->count() == 0; } | 104 | bool isEmpty() const { return dict->count() == 0; } |
105 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } | 105 | type *toFirst() { return (type *)QGDictIterator::toFirst(); } |
106 | operator type *() const { return (type *)QGDictIterator::get(); } | 106 | operator type *() const { return (type *)QGDictIterator::get(); } |
107 | type *current() const { return (type *)QGDictIterator::get(); } | 107 | type *current() const { return (type *)QGDictIterator::get(); } |
108 | long currentKey() const { return QGDictIterator::getKeyInt(); } | 108 | long currentKey() const { return QGDictIterator::getKeyInt(); } |
109 | type *operator()() { return (type *)QGDictIterator::operator()(); } | 109 | type *operator()() { return (type *)QGDictIterator::operator()(); } |
110 | type *operator++() { return (type *)QGDictIterator::operator++(); } | 110 | type *operator++() { return (type *)QGDictIterator::operator++(); } |
111 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} | 111 | type *operator+=(uint j) { return (type *)QGDictIterator::operator+=(j);} |
112 | }; | 112 | }; |
113 | 113 | ||
114 | #ifdef QT_QWINEXPORT | ||
115 | #define Q_DEFINED_QINTDICT | ||
116 | #include "qwinexport.h" | ||
117 | #endif /* QT_QWINEXPORT */ | ||
114 | #endif // QINTDICT_H | 118 | #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 | |||
835 | if ( overwrite || n < size() ) | 835 | if ( overwrite || n < size() ) |
836 | it.data() = value; | 836 | it.data() = value; |
837 | return it; | 837 | return it; |
838 | } | 838 | } |
839 | 839 | ||
840 | template<class Key, class T> | 840 | template<class Key, class T> |
841 | Q_INLINE_TEMPLATES void QMap<Key,T>::remove( const Key& k ) | 841 | Q_INLINE_TEMPLATES void QMap<Key,T>::remove( const Key& k ) |
842 | { | 842 | { |
843 | detach(); | 843 | detach(); |
844 | iterator it( sh->find( k ).node ); | 844 | iterator it( sh->find( k ).node ); |
845 | if ( it != end() ) | 845 | if ( it != end() ) |
846 | sh->remove( it ); | 846 | sh->remove( it ); |
847 | } | 847 | } |
848 | 848 | ||
849 | template<class Key, class T> | 849 | template<class Key, class T> |
850 | Q_INLINE_TEMPLATES void QMap<Key,T>::detachInternal() | 850 | Q_INLINE_TEMPLATES void QMap<Key,T>::detachInternal() |
851 | { | 851 | { |
852 | sh->deref(); sh = new QMapPrivate<Key,T>( sh ); | 852 | sh->deref(); sh = new QMapPrivate<Key,T>( sh ); |
853 | } | 853 | } |
854 | 854 | ||
855 | 855 | ||
856 | #ifndef QT_NO_DATASTREAM | 856 | #ifndef QT_NO_DATASTREAM |
857 | template<class Key, class T> | 857 | template<class Key, class T> |
858 | Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QMap<Key,T>& m ) { | 858 | Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QMap<Key,T>& m ) { |
859 | m.clear(); | 859 | m.clear(); |
860 | Q_UINT32 c; | 860 | Q_UINT32 c; |
861 | s >> c; | 861 | s >> c; |
862 | for( Q_UINT32 i = 0; i < c; ++i ) { | 862 | for( Q_UINT32 i = 0; i < c; ++i ) { |
863 | Key k; T t; | 863 | Key k; T t; |
864 | s >> k >> t; | 864 | s >> k >> t; |
865 | m.insert( k, t ); | 865 | m.insert( k, t ); |
866 | if ( s.atEnd() ) | 866 | if ( s.atEnd() ) |
867 | break; | 867 | break; |
868 | } | 868 | } |
869 | return s; | 869 | return s; |
870 | } | 870 | } |
871 | 871 | ||
872 | 872 | ||
873 | template<class Key, class T> | 873 | template<class Key, class T> |
874 | Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QMap<Key,T>& m ) { | 874 | Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QMap<Key,T>& m ) { |
875 | s << (Q_UINT32)m.size(); | 875 | s << (Q_UINT32)m.size(); |
876 | QMapConstIterator<Key,T> it = m.begin(); | 876 | QMapConstIterator<Key,T> it = m.begin(); |
877 | for( ; it != m.end(); ++it ) | 877 | for( ; it != m.end(); ++it ) |
878 | s << it.key() << it.data(); | 878 | s << it.key() << it.data(); |
879 | return s; | 879 | return s; |
880 | } | 880 | } |
881 | #endif | 881 | #endif |
882 | 882 | ||
883 | #ifdef QT_QWINEXPORT | ||
884 | #define Q_DEFINED_QMAP | ||
885 | #include "qwinexport.h" | ||
886 | #endif /* QT_QWINEXPORT */ | ||
883 | #endif // QMAP_H | 887 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QMemArray template/macro class | 4 | ** Definition of QMemArray template/macro class |
5 | ** | 5 | ** |
6 | ** Created : 930906 | 6 | ** Created : 930906 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QMEMARRAY_H | 38 | #ifndef QMEMARRAY_H |
39 | #define QMEMARRAY_H | 39 | #define QMEMARRAY_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qgarray.h" | 42 | #include "qgarray.h" |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | 45 | ||
46 | template<class type> | 46 | template<class type> |
47 | class QMemArray : public QGArray | 47 | class QMemArray : public QGArray |
48 | { | 48 | { |
49 | public: | 49 | public: |
50 | typedef type* Iterator; | 50 | typedef type* Iterator; |
51 | typedef const type* ConstIterator; | 51 | typedef const type* ConstIterator; |
52 | typedef type ValueType; | 52 | typedef type ValueType; |
53 | 53 | ||
54 | protected: | 54 | protected: |
55 | QMemArray( int, int ) : QGArray( 0, 0 ) {} | 55 | QMemArray( int, int ) : QGArray( 0, 0 ) {} |
56 | 56 | ||
57 | public: | 57 | public: |
58 | QMemArray() {} | 58 | QMemArray() {} |
59 | QMemArray( int size ) : QGArray(size*sizeof(type)) {} | 59 | QMemArray( int size ) : QGArray(size*sizeof(type)) {} |
60 | QMemArray( const QMemArray<type> &a ) : QGArray(a) {} | 60 | QMemArray( const QMemArray<type> &a ) : QGArray(a) {} |
61 | ~QMemArray() {} | 61 | ~QMemArray() {} |
62 | QMemArray<type> &operator=(const QMemArray<type> &a) | 62 | QMemArray<type> &operator=(const QMemArray<type> &a) |
63 | { return (QMemArray<type>&)QGArray::assign(a); } | 63 | { return (QMemArray<type>&)QGArray::assign(a); } |
64 | type *data() const{ return (type *)QGArray::data(); } | 64 | type *data() const{ return (type *)QGArray::data(); } |
65 | uint nrefs() const{ return QGArray::nrefs(); } | 65 | uint nrefs() const{ return QGArray::nrefs(); } |
66 | uint size() const{ return QGArray::size()/sizeof(type); } | 66 | uint size() const{ return QGArray::size()/sizeof(type); } |
67 | uint count() const{ return size(); } | 67 | uint count() const{ return size(); } |
68 | bool isEmpty() const{ return QGArray::size() == 0; } | 68 | bool isEmpty() const{ return QGArray::size() == 0; } |
69 | bool isNull() const{ return QGArray::data() == 0; } | 69 | bool isNull() const{ return QGArray::data() == 0; } |
70 | bool resize( uint size ){ return QGArray::resize(size*sizeof(type)); } | 70 | bool resize( uint size ){ return QGArray::resize(size*sizeof(type)); } |
71 | bool resize( uint size, Optimization optim ) { return QGArray::resize(size*sizeof(type), optim); } | ||
71 | bool truncate( uint pos ){ return QGArray::resize(pos*sizeof(type)); } | 72 | bool truncate( uint pos ){ return QGArray::resize(pos*sizeof(type)); } |
72 | bool fill( const type &d, int size = -1 ) | 73 | bool fill( const type &d, int size = -1 ) |
73 | { return QGArray::fill((char*)&d,size,sizeof(type) ); } | 74 | { return QGArray::fill((char*)&d,size,sizeof(type) ); } |
74 | void detach() { QGArray::detach(); } | 75 | void detach() { QGArray::detach(); } |
75 | QMemArray<type> copy() const | 76 | QMemArray<type> copy() const |
76 | { QMemArray<type> tmp; return tmp.duplicate(*this); } | 77 | { QMemArray<type> tmp; return tmp.duplicate(*this); } |
77 | QMemArray<type>& assign( const QMemArray<type>& a ) | 78 | QMemArray<type>& assign( const QMemArray<type>& a ) |
78 | { return (QMemArray<type>&)QGArray::assign(a); } | 79 | { return (QMemArray<type>&)QGArray::assign(a); } |
79 | QMemArray<type>& assign( const type *a, uint n ) | 80 | QMemArray<type>& assign( const type *a, uint n ) |
80 | { return (QMemArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); } | 81 | { return (QMemArray<type>&)QGArray::assign((char*)a,n*sizeof(type)); } |
81 | QMemArray<type>& duplicate( const QMemArray<type>& a ) | 82 | QMemArray<type>& duplicate( const QMemArray<type>& a ) |
82 | { return (QMemArray<type>&)QGArray::duplicate(a); } | 83 | { return (QMemArray<type>&)QGArray::duplicate(a); } |
83 | QMemArray<type>& duplicate( const type *a, uint n ) | 84 | QMemArray<type>& duplicate( const type *a, uint n ) |
84 | { return (QMemArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); } | 85 | { return (QMemArray<type>&)QGArray::duplicate((char*)a,n*sizeof(type)); } |
85 | QMemArray<type>& setRawData( const type *a, uint n ) | 86 | QMemArray<type>& setRawData( const type *a, uint n ) |
86 | { return (QMemArray<type>&)QGArray::setRawData((char*)a, | 87 | { return (QMemArray<type>&)QGArray::setRawData((char*)a, |
87 | n*sizeof(type)); } | 88 | n*sizeof(type)); } |
88 | void resetRawData( const type *a, uint n ) | 89 | void resetRawData( const type *a, uint n ) |
89 | { QGArray::resetRawData((char*)a,n*sizeof(type)); } | 90 | { QGArray::resetRawData((char*)a,n*sizeof(type)); } |
90 | int find( const type &d, uint i=0 ) const | 91 | int find( const type &d, uint i=0 ) const |
91 | { return QGArray::find((char*)&d,i,sizeof(type)); } | 92 | { return QGArray::find((char*)&d,i,sizeof(type)); } |
92 | int contains( const type &d ) const | 93 | int contains( const type &d ) const |
93 | { return QGArray::contains((char*)&d,sizeof(type)); } | 94 | { return QGArray::contains((char*)&d,sizeof(type)); } |
94 | void sort() { QGArray::sort(sizeof(type)); } | 95 | void sort() { QGArray::sort(sizeof(type)); } |
95 | int bsearch( const type &d ) const | 96 | int bsearch( const type &d ) const |
96 | { return QGArray::bsearch((const char*)&d,sizeof(type)); } | 97 | { return QGArray::bsearch((const char*)&d,sizeof(type)); } |
97 | // ### Qt 4.0: maybe provide uint overload as work-around for MSVC bug | 98 | // ### Qt 4.0: maybe provide uint overload as work-around for MSVC bug |
98 | type& operator[]( int i ) const | 99 | type& operator[]( int i ) const |
99 | { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } | 100 | { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } |
100 | type& at( uint i ) const | 101 | type& at( uint i ) const |
101 | { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } | 102 | { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } |
102 | operator const type*() const { return (const type *)QGArray::data(); } | 103 | operator const type*() const { return (const type *)QGArray::data(); } |
103 | bool operator==( const QMemArray<type> &a ) const { return isEqual(a); } | 104 | bool operator==( const QMemArray<type> &a ) const { return isEqual(a); } |
104 | bool operator!=( const QMemArray<type> &a ) const { return !isEqual(a); } | 105 | bool operator!=( const QMemArray<type> &a ) const { return !isEqual(a); } |
105 | Iterator begin() { return data(); } | 106 | Iterator begin() { return data(); } |
106 | Iterator end() { return data() + size(); } | 107 | Iterator end() { return data() + size(); } |
107 | ConstIterator begin() const { return data(); } | 108 | ConstIterator begin() const { return data(); } |
108 | ConstIterator end() const { return data() + size(); } | 109 | ConstIterator end() const { return data() + size(); } |
109 | }; | 110 | }; |
110 | 111 | ||
112 | #ifndef QT_QWINEXPORT | ||
111 | #if defined(Q_TEMPLATEDLL) | 113 | #if defined(Q_TEMPLATEDLL) |
112 | // MOC_SKIP_BEGIN | 114 | // MOC_SKIP_BEGIN |
113 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<int>; | 115 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<int>; |
114 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<bool>; | 116 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<bool>; |
115 | // MOC_SKIP_END | 117 | // MOC_SKIP_END |
116 | #endif | 118 | #endif |
119 | #endif /* QT_QWINEXPORT */ | ||
117 | 120 | ||
118 | #ifndef QT_NO_COMPAT | 121 | #ifndef QT_NO_COMPAT |
119 | #define QArray QMemArray | 122 | #define QArray QMemArray |
120 | #endif | 123 | #endif |
121 | 124 | ||
125 | #ifdef QT_QWINEXPORT | ||
126 | #define Q_DEFINED_QMEMARRAY | ||
127 | #include <qwinexport.h> | ||
128 | #endif /* QT_QWINEXPORT */ | ||
122 | #endif // QARRAY_H | 129 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QPtrList template/macro class | 4 | ** Definition of QPtrList template/macro class |
5 | ** | 5 | ** |
6 | ** Created : | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 6 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 7 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 8 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 9 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 12 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 13 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 14 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 15 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 16 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 17 | ** packaging of this file. |
20 | ** | 18 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 20 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 21 | ** Agreement provided with the Software. |
24 | ** | 22 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 25 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 27 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 30 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 31 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 32 | ** not clear to you. |
35 | ** | 33 | ** |
36 | **********************************************************************/ | 34 | **********************************************************************/ |
37 | 35 | ||
38 | #ifndef QPTRLIST_H | 36 | #ifndef QPTRLIST_H |
39 | #define QPTRLIST_H | 37 | #define QPTRLIST_H |
40 | 38 | ||
41 | #ifndef QT_H | 39 | #ifndef QT_H |
42 | #include "qglist.h" | 40 | #include "qglist.h" |
43 | #endif // QT_H | 41 | #endif // QT_H |
44 | 42 | ||
45 | 43 | ||
46 | template<class type> | 44 | template<class type> |
47 | class QPtrList | 45 | class QPtrList |
48 | #ifdef Q_QDOC | 46 | #ifdef Q_QDOC |
49 | : public QPtrCollection | 47 | : public QPtrCollection |
50 | #else | 48 | #else |
51 | : public QGList | 49 | : public QGList |
52 | #endif | 50 | #endif |
53 | { | 51 | { |
54 | public: | 52 | public: |
55 | QPtrList() {} | 53 | QPtrList() {} |
@@ -112,49 +110,53 @@ private: | |||
112 | 110 | ||
113 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) | 111 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) |
114 | template<> inline void QPtrList<void>::deleteItem( QPtrCollection::Item ) | 112 | template<> inline void QPtrList<void>::deleteItem( QPtrCollection::Item ) |
115 | { | 113 | { |
116 | } | 114 | } |
117 | #endif | 115 | #endif |
118 | 116 | ||
119 | template<class type> inline void QPtrList<type>::deleteItem( QPtrCollection::Item d ) | 117 | template<class type> inline void QPtrList<type>::deleteItem( QPtrCollection::Item d ) |
120 | { | 118 | { |
121 | if ( del_item ) delete (type *)d; | 119 | if ( del_item ) delete (type *)d; |
122 | } | 120 | } |
123 | 121 | ||
124 | template<class type> | 122 | template<class type> |
125 | class QPtrListIterator : public QGListIterator | 123 | class QPtrListIterator : public QGListIterator |
126 | { | 124 | { |
127 | public: | 125 | public: |
128 | QPtrListIterator(const QPtrList<type> &l) :QGListIterator((QGList &)l) {} | 126 | QPtrListIterator(const QPtrList<type> &l) :QGListIterator((QGList &)l) {} |
129 | ~QPtrListIterator() {} | 127 | ~QPtrListIterator() {} |
130 | uint count() const { return list->count(); } | 128 | uint count() const { return list->count(); } |
131 | bool isEmpty() const { return list->count() == 0; } | 129 | bool isEmpty() const { return list->count() == 0; } |
132 | bool atFirst() const { return QGListIterator::atFirst(); } | 130 | bool atFirst() const { return QGListIterator::atFirst(); } |
133 | bool atLast() const { return QGListIterator::atLast(); } | 131 | bool atLast() const { return QGListIterator::atLast(); } |
134 | type *toFirst() { return (type *)QGListIterator::toFirst(); } | 132 | type *toFirst() { return (type *)QGListIterator::toFirst(); } |
135 | type *toLast() { return (type *)QGListIterator::toLast(); } | 133 | type *toLast() { return (type *)QGListIterator::toLast(); } |
136 | operator type *() const { return (type *)QGListIterator::get(); } | 134 | operator type *() const { return (type *)QGListIterator::get(); } |
137 | type *operator*() { return (type *)QGListIterator::get(); } | 135 | type *operator*() { return (type *)QGListIterator::get(); } |
138 | 136 | ||
139 | // No good, since QPtrList<char> (ie. QStrList fails... | 137 | // No good, since QPtrList<char> (ie. QStrList fails... |
140 | // | 138 | // |
141 | // MSVC++ gives warning | 139 | // MSVC++ gives warning |
142 | // Sunpro C++ 4.1 gives error | 140 | // Sunpro C++ 4.1 gives error |
143 | // type *operator->() { return (type *)QGListIterator::get(); } | 141 | // type *operator->() { return (type *)QGListIterator::get(); } |
144 | 142 | ||
145 | type *current() const { return (type *)QGListIterator::get(); } | 143 | type *current() const { return (type *)QGListIterator::get(); } |
146 | type *operator()() { return (type *)QGListIterator::operator()();} | 144 | type *operator()() { return (type *)QGListIterator::operator()();} |
147 | type *operator++() { return (type *)QGListIterator::operator++(); } | 145 | type *operator++() { return (type *)QGListIterator::operator++(); } |
148 | type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);} | 146 | type *operator+=(uint j) { return (type *)QGListIterator::operator+=(j);} |
149 | type *operator--() { return (type *)QGListIterator::operator--(); } | 147 | type *operator--() { return (type *)QGListIterator::operator--(); } |
150 | type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);} | 148 | type *operator-=(uint j) { return (type *)QGListIterator::operator-=(j);} |
151 | QPtrListIterator<type>& operator=(const QPtrListIterator<type>&it) | 149 | QPtrListIterator<type>& operator=(const QPtrListIterator<type>&it) |
152 | { QGListIterator::operator=(it); return *this; } | 150 | { QGListIterator::operator=(it); return *this; } |
153 | }; | 151 | }; |
154 | 152 | ||
155 | #ifndef QT_NO_COMPAT | 153 | #ifndef QT_NO_COMPAT |
156 | #define QList QPtrList | 154 | #define QList QPtrList |
157 | #define QListIterator QPtrListIterator | 155 | #define QListIterator QPtrListIterator |
158 | #endif | 156 | #endif |
159 | 157 | ||
158 | #ifdef QT_QWINEXPORT | ||
159 | #define Q_DEFINED_QPTRLIST | ||
160 | #include "qwinexport.h" | ||
161 | #endif /* QT_QWINEXPORT */ | ||
160 | #endif // QPTRLIST_H | 162 | #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: | |||
65 | bool isNull() const { return QGVector::size() == 0; } | 65 | bool isNull() const { return QGVector::size() == 0; } |
66 | bool resize( uint size ) { return QGVector::resize(size); } | 66 | bool resize( uint size ) { return QGVector::resize(size); } |
67 | bool insert( uint i, const type *d){ return QGVector::insert(i,(Item)d); } | 67 | bool insert( uint i, const type *d){ return QGVector::insert(i,(Item)d); } |
68 | bool remove( uint i ) { return QGVector::remove(i); } | 68 | bool remove( uint i ) { return QGVector::remove(i); } |
69 | type *take( uint i ) { return (type *)QGVector::take(i); } | 69 | type *take( uint i ) { return (type *)QGVector::take(i); } |
70 | void clear() { QGVector::clear(); } | 70 | void clear() { QGVector::clear(); } |
71 | bool fill( const type *d, int size=-1 ) | 71 | bool fill( const type *d, int size=-1 ) |
72 | { return QGVector::fill((Item)d,size);} | 72 | { return QGVector::fill((Item)d,size);} |
73 | void sort() { QGVector::sort(); } | 73 | void sort() { QGVector::sort(); } |
74 | int bsearch( const type *d ) const{ return QGVector::bsearch((Item)d); } | 74 | int bsearch( const type *d ) const{ return QGVector::bsearch((Item)d); } |
75 | int findRef( const type *d, uint i=0 ) const | 75 | int findRef( const type *d, uint i=0 ) const |
76 | { return QGVector::findRef((Item)d,i);} | 76 | { return QGVector::findRef((Item)d,i);} |
77 | int find( const type *d, uint i= 0 ) const | 77 | int find( const type *d, uint i= 0 ) const |
78 | { return QGVector::find((Item)d,i); } | 78 | { return QGVector::find((Item)d,i); } |
79 | uint containsRef( const type *d ) const | 79 | uint containsRef( const type *d ) const |
80 | { return QGVector::containsRef((Item)d); } | 80 | { return QGVector::containsRef((Item)d); } |
81 | uint contains( const type *d ) const | 81 | uint contains( const type *d ) const |
82 | { return QGVector::contains((Item)d); } | 82 | { return QGVector::contains((Item)d); } |
83 | type *operator[]( int i ) const{ return (type *)QGVector::at(i); } | 83 | type *operator[]( int i ) const{ return (type *)QGVector::at(i); } |
84 | type *at( uint i ) const { return (type *)QGVector::at(i); } | 84 | type *at( uint i ) const { return (type *)QGVector::at(i); } |
85 | void toList( QGList *list ) const{ QGVector::toList(list); } | 85 | void toList( QGList *list ) const{ QGVector::toList(list); } |
86 | 86 | ||
87 | #ifdef Q_QDOC | 87 | #ifdef Q_QDOC |
88 | protected: | 88 | protected: |
89 | virtual int compareItems( QPtrCollection::Item d1, QPtrCollection::Item d2 ); | 89 | virtual int compareItems( QPtrCollection::Item d1, QPtrCollection::Item d2 ); |
90 | virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &d ); | 90 | virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &d ); |
91 | virtual QDataStream& write( QDataStream &s, QPtrCollection::Item d ) const; | 91 | virtual QDataStream& write( QDataStream &s, QPtrCollection::Item d ) const; |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | private: | 94 | private: |
95 | void deleteItem( Item d ); | 95 | void deleteItem( Item d ); |
96 | }; | 96 | }; |
97 | 97 | ||
98 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) | 98 | #if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) |
99 | template<> inline void QPtrVector<void>::deleteItem( QPtrCollection::Item ) | 99 | template<> inline void QPtrVector<void>::deleteItem( QPtrCollection::Item ) |
100 | { | 100 | { |
101 | } | 101 | } |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | template<class type> inline void QPtrVector<type>::deleteItem( QPtrCollection::Item d ) | 104 | template<class type> inline void QPtrVector<type>::deleteItem( QPtrCollection::Item d ) |
105 | { | 105 | { |
106 | if ( del_item ) delete (type *)d; | 106 | if ( del_item ) delete (type *)d; |
107 | } | 107 | } |
108 | 108 | ||
109 | #ifndef QT_NO_COMPAT | 109 | #ifndef QT_NO_COMPAT |
110 | #define QVector QPtrVector | 110 | #define QVector QPtrVector |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #ifdef QT_QWINEXPORT | ||
114 | #define Q_DEFINED_QPTRVECTOR | ||
115 | #include "qwinexport.h" | ||
116 | #endif /* QT_QWINEXPORT */ | ||
113 | #endif // QVECTOR_H | 117 | #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 @@ | |||
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QREGEXP_H | 38 | #ifndef QREGEXP_H |
39 | #define QREGEXP_H | 39 | #define QREGEXP_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qstringlist.h" | 42 | #include "qstringlist.h" |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | #ifndef QT_NO_REGEXP | 45 | #ifndef QT_NO_REGEXP |
46 | class QRegExpEngine; | 46 | class QRegExpEngine; |
47 | struct QRegExpPrivate; | 47 | struct QRegExpPrivate; |
48 | 48 | ||
49 | class Q_EXPORT QRegExp | 49 | class Q_EXPORT QRegExp |
50 | { | 50 | { |
51 | public: | 51 | public: |
52 | enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; | 52 | enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; |
53 | 53 | ||
54 | QRegExp(); | 54 | QRegExp(); |
55 | QRegExp( const QString& pattern, bool caseSensitive = TRUE, | 55 | QRegExp( const QString& pattern, bool caseSensitive = TRUE, |
56 | bool wildcard = FALSE ); | 56 | bool wildcard = FALSE ); |
57 | QRegExp( const QRegExp& rx ); | 57 | QRegExp( const QRegExp& rx ); |
58 | ~QRegExp(); | 58 | ~QRegExp(); |
59 | QRegExp& operator=( const QRegExp& rx ); | 59 | QRegExp& operator=( const QRegExp& rx ); |
60 | 60 | ||
61 | bool operator==( const QRegExp& rx ) const; | 61 | bool operator==( const QRegExp& rx ) const; |
62 | bool operator!=( const QRegExp& rx ) const { return !operator==( rx ); } | 62 | bool operator!=( const QRegExp& rx ) const { return !operator==( rx ); } |
63 | 63 | ||
64 | bool isEmpty() const; | 64 | bool isEmpty() const; |
65 | bool isValid() const; | 65 | bool isValid() const; |
66 | QString pattern() const; | 66 | QString pattern() const; |
67 | void setPattern( const QString& pattern ); | 67 | void setPattern( const QString& pattern ); |
68 | bool caseSensitive() const; | 68 | bool caseSensitive() const; |
69 | void setCaseSensitive( bool sensitive ); | 69 | void setCaseSensitive( bool sensitive ); |
70 | #ifndef QT_NO_REGEXP_WILDCARD | 70 | #ifndef QT_NO_REGEXP_WILDCARD |
71 | bool wildcard() const; | 71 | bool wildcard() const; |
72 | void setWildcard( bool wildcard ); | 72 | void setWildcard( bool wildcard ); |
73 | #endif | 73 | #endif |
74 | bool minimal() const; | 74 | bool minimal() const; |
75 | void setMinimal( bool minimal ); | 75 | void setMinimal( bool minimal ); |
76 | 76 | ||
77 | bool exactMatch( const QString& str ) const; | 77 | bool exactMatch( const QString& str ) const; |
78 | #ifndef QT_NO_COMPAT | 78 | #ifndef QT_NO_COMPAT |
79 | int match( const QString& str, int index = 0, int *len = 0, | 79 | int match( const QString& str, int index = 0, int *len = 0, |
80 | bool indexIsStart = TRUE ) const; | 80 | bool indexIsStart = TRUE ) const; |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #if defined(qdoc) | 83 | #if defined(Q_QDOC) |
84 | int search( const QString& str, int offset = 0, | 84 | int search( const QString& str, int offset = 0, |
85 | CaretMode caretMode = CaretAtZero ) const; | 85 | CaretMode caretMode = CaretAtZero ) const; |
86 | int searchRev( const QString& str, int offset = -1, | 86 | int searchRev( const QString& str, int offset = -1, |
87 | CaretMode caretMode = CaretAtZero ) const; | 87 | CaretMode caretMode = CaretAtZero ) const; |
88 | #else | 88 | #else |
89 | // ### Qt 4.0: reduce these four to two functions | 89 | // ### Qt 4.0: reduce these four to two functions |
90 | int search( const QString& str, int offset = 0 ) const; | 90 | int search( const QString& str, int offset = 0 ) const; |
91 | int search( const QString& str, int offset, CaretMode caretMode ) const; | 91 | int search( const QString& str, int offset, CaretMode caretMode ) const; |
92 | int searchRev( const QString& str, int offset = -1 ) const; | 92 | int searchRev( const QString& str, int offset = -1 ) const; |
93 | int searchRev( const QString& str, int offset, CaretMode caretMode ) const; | 93 | int searchRev( const QString& str, int offset, CaretMode caretMode ) const; |
94 | #endif | 94 | #endif |
95 | int matchedLength() const; | 95 | int matchedLength() const; |
96 | #ifndef QT_NO_REGEXP_CAPTURE | 96 | #ifndef QT_NO_REGEXP_CAPTURE |
97 | int numCaptures() const; | 97 | int numCaptures() const; |
98 | QStringList capturedTexts(); | 98 | QStringList capturedTexts(); |
99 | QString cap( int nth = 0 ); | 99 | QString cap( int nth = 0 ); |
100 | int pos( int nth = 0 ); | 100 | int pos( int nth = 0 ); |
101 | QString errorString(); | 101 | QString errorString(); |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | static QString escape( const QString& str ); | 104 | static QString escape( const QString& str ); |
105 | 105 | ||
106 | private: | 106 | private: |
107 | void compile( bool caseSensitive ); | 107 | void compile( bool caseSensitive ); |
108 | 108 | ||
109 | static int caretIndex( int offset, CaretMode caretMode ); | 109 | static int caretIndex( int offset, CaretMode caretMode ); |
110 | 110 | ||
111 | QRegExpEngine *eng; | 111 | QRegExpEngine *eng; |
112 | QRegExpPrivate *priv; | 112 | QRegExpPrivate *priv; |
113 | }; | 113 | }; |
114 | #endif // QT_NO_REGEXP | 114 | #endif // QT_NO_REGEXP |
115 | #endif // QREGEXP_H | 115 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of the QString class, and related Unicode | 4 | ** Definition of the QString class, and related Unicode functions. |
5 | ** functions. | ||
6 | ** | 5 | ** |
7 | ** Created : 920609 | 6 | ** Created : 920609 |
8 | ** | 7 | ** |
9 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. |
10 | ** | 9 | ** |
11 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
12 | ** | 11 | ** |
13 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
14 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
15 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
16 | ** | 15 | ** |
17 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
18 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
19 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
20 | ** packaging of this file. | 19 | ** packaging of this file. |
21 | ** | 20 | ** |
22 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
23 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
24 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
25 | ** | 24 | ** |
26 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
27 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
28 | ** | 27 | ** |
29 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
30 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
31 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
32 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
33 | ** | 32 | ** |
34 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
35 | ** not clear to you. | 34 | ** not clear to you. |
36 | ** | 35 | ** |
37 | **********************************************************************/ | 36 | **********************************************************************/ |
38 | 37 | ||
39 | #ifndef QSTRING_H | 38 | #ifndef QSTRING_H |
40 | #define QSTRING_H | 39 | #define QSTRING_H |
41 | 40 | ||
42 | #ifndef QT_H | 41 | #ifndef QT_H |
43 | #include "qcstring.h" | 42 | #include "qcstring.h" |
44 | #endif // QT_H | 43 | #endif // QT_H |
45 | 44 | ||
45 | #ifndef QT_NO_STL | ||
46 | #include <string> | ||
47 | #if defined(Q_WRONG_SB_CTYPE_MACROS) && defined(_SB_CTYPE_MACROS) | ||
48 | #undef _SB_CTYPE_MACROS | ||
49 | #endif | ||
50 | #endif | ||
51 | |||
46 | 52 | ||
47 | /***************************************************************************** | 53 | /***************************************************************************** |
48 | QString class | 54 | QString class |
49 | *****************************************************************************/ | 55 | *****************************************************************************/ |
50 | 56 | ||
51 | class QRegExp; | 57 | class QRegExp; |
52 | class QString; | 58 | class QString; |
53 | class QCharRef; | 59 | class QCharRef; |
54 | template <class T> class QDeepCopy; | 60 | template <class T> class QDeepCopy; |
55 | 61 | ||
56 | class Q_EXPORT QChar { | 62 | class Q_EXPORT QChar { |
57 | public: | 63 | public: |
58 | QChar(); | 64 | QChar(); |
59 | QChar( char c ); | 65 | QChar( char c ); |
60 | QChar( uchar c ); | 66 | QChar( uchar c ); |
61 | QChar( uchar c, uchar r ); | 67 | QChar( uchar c, uchar r ); |
62 | QChar( const QChar& c ); | 68 | QChar( const QChar& c ); |
63 | QChar( ushort rc ); | 69 | QChar( ushort rc ); |
64 | QChar( short rc ); | 70 | QChar( short rc ); |
65 | QChar( uint rc ); | 71 | QChar( uint rc ); |
66 | QChar( int rc ); | 72 | QChar( int rc ); |
67 | 73 | ||
68 | QT_STATIC_CONST QChar null; // 0000 | 74 | QT_STATIC_CONST QChar null; // 0000 |
69 | QT_STATIC_CONST QChar replacement; // FFFD | 75 | QT_STATIC_CONST QChar replacement; // FFFD |
70 | QT_STATIC_CONST QChar byteOrderMark; // FEFF | 76 | QT_STATIC_CONST QChar byteOrderMark; // FEFF |
71 | QT_STATIC_CONST QChar byteOrderSwapped; // FFFE | 77 | QT_STATIC_CONST QChar byteOrderSwapped; // FFFE |
72 | QT_STATIC_CONST QChar nbsp; // 00A0 | 78 | QT_STATIC_CONST QChar nbsp; // 00A0 |
73 | 79 | ||
74 | // Unicode information | 80 | // Unicode information |
75 | 81 | ||
76 | enum Category | 82 | enum Category |
77 | { | 83 | { |
78 | NoCategory, | 84 | NoCategory, |
79 | 85 | ||
80 | Mark_NonSpacing, // Mn | 86 | Mark_NonSpacing, // Mn |
81 | Mark_SpacingCombining, // Mc | 87 | Mark_SpacingCombining, // Mc |
82 | Mark_Enclosing, // Me | 88 | Mark_Enclosing, // Me |
83 | 89 | ||
84 | Number_DecimalDigit, // Nd | 90 | Number_DecimalDigit, // Nd |
85 | Number_Letter, // Nl | 91 | Number_Letter, // Nl |
86 | Number_Other, // No | 92 | Number_Other, // No |
87 | 93 | ||
88 | Separator_Space, // Zs | 94 | Separator_Space, // Zs |
89 | Separator_Line, // Zl | 95 | Separator_Line, // Zl |
90 | Separator_Paragraph, // Zp | 96 | Separator_Paragraph, // Zp |
91 | 97 | ||
92 | Other_Control, // Cc | 98 | Other_Control, // Cc |
93 | Other_Format, // Cf | 99 | Other_Format, // Cf |
@@ -291,149 +297,153 @@ inline bool operator==( QChar c, char ch ) | |||
291 | inline bool operator==( QChar c1, QChar c2 ) | 297 | inline bool operator==( QChar c1, QChar c2 ) |
292 | { | 298 | { |
293 | return c1.ucs == c2.ucs; | 299 | return c1.ucs == c2.ucs; |
294 | } | 300 | } |
295 | 301 | ||
296 | inline bool operator!=( QChar c1, QChar c2 ) | 302 | inline bool operator!=( QChar c1, QChar c2 ) |
297 | { | 303 | { |
298 | return c1.ucs != c2.ucs; | 304 | return c1.ucs != c2.ucs; |
299 | } | 305 | } |
300 | 306 | ||
301 | inline bool operator!=( char ch, QChar c ) | 307 | inline bool operator!=( char ch, QChar c ) |
302 | { | 308 | { |
303 | return ((uchar)ch) != c.ucs; | 309 | return ((uchar)ch) != c.ucs; |
304 | } | 310 | } |
305 | 311 | ||
306 | inline bool operator!=( QChar c, char ch ) | 312 | inline bool operator!=( QChar c, char ch ) |
307 | { | 313 | { |
308 | return ((uchar) ch) != c.ucs; | 314 | return ((uchar) ch) != c.ucs; |
309 | } | 315 | } |
310 | 316 | ||
311 | inline bool operator<=( QChar c, char ch ) | 317 | inline bool operator<=( QChar c, char ch ) |
312 | { | 318 | { |
313 | return c.ucs <= ((uchar) ch); | 319 | return c.ucs <= ((uchar) ch); |
314 | } | 320 | } |
315 | 321 | ||
316 | inline bool operator<=( char ch, QChar c ) | 322 | inline bool operator<=( char ch, QChar c ) |
317 | { | 323 | { |
318 | return ((uchar) ch) <= c.ucs; | 324 | return ((uchar) ch) <= c.ucs; |
319 | } | 325 | } |
320 | 326 | ||
321 | inline bool operator<=( QChar c1, QChar c2 ) | 327 | inline bool operator<=( QChar c1, QChar c2 ) |
322 | { | 328 | { |
323 | return c1.ucs <= c2.ucs; | 329 | return c1.ucs <= c2.ucs; |
324 | } | 330 | } |
325 | 331 | ||
326 | inline bool operator>=( QChar c, char ch ) { return ch <= c; } | 332 | inline bool operator>=( QChar c, char ch ) { return ch <= c; } |
327 | inline bool operator>=( char ch, QChar c ) { return c <= ch; } | 333 | inline bool operator>=( char ch, QChar c ) { return c <= ch; } |
328 | inline bool operator>=( QChar c1, QChar c2 ) { return c2 <= c1; } | 334 | inline bool operator>=( QChar c1, QChar c2 ) { return c2 <= c1; } |
329 | inline bool operator<( QChar c, char ch ) { return !(ch<=c); } | 335 | inline bool operator<( QChar c, char ch ) { return !(ch<=c); } |
330 | inline bool operator<( char ch, QChar c ) { return !(c<=ch); } | 336 | inline bool operator<( char ch, QChar c ) { return !(c<=ch); } |
331 | inline bool operator<( QChar c1, QChar c2 ) { return !(c2<=c1); } | 337 | inline bool operator<( QChar c1, QChar c2 ) { return !(c2<=c1); } |
332 | inline bool operator>( QChar c, char ch ) { return !(ch>=c); } | 338 | inline bool operator>( QChar c, char ch ) { return !(ch>=c); } |
333 | inline bool operator>( char ch, QChar c ) { return !(c>=ch); } | 339 | inline bool operator>( char ch, QChar c ) { return !(c>=ch); } |
334 | inline bool operator>( QChar c1, QChar c2 ) { return !(c2>=c1); } | 340 | inline bool operator>( QChar c1, QChar c2 ) { return !(c2>=c1); } |
335 | 341 | ||
336 | // internal | 342 | // internal |
337 | struct Q_EXPORT QStringData : public QShared { | 343 | struct Q_EXPORT QStringData : public QShared { |
338 | QStringData() : | 344 | QStringData() : |
339 | QShared(), unicode(0), ascii(0), len(0), simpletext(1), maxl(0), dirty(0) { ref(); } | 345 | QShared(), unicode(0), ascii(0), len(0), issimpletext(TRUE), maxl(0), islatin1(FALSE) { ref(); } |
340 | QStringData(QChar *u, uint l, uint m) : | 346 | QStringData(QChar *u, uint l, uint m) : |
341 | QShared(), unicode(u), ascii(0), len(l), simpletext(1), maxl(m), dirty(1) { } | 347 | QShared(), unicode(u), ascii(0), len(l), issimpletext(FALSE), maxl(m), islatin1(FALSE) { } |
342 | ~QStringData() { if ( unicode ) delete[] ((char*)unicode); | 348 | ~QStringData() { if ( unicode ) delete[] ((char*)unicode); |
343 | if ( ascii ) delete[] ascii; } | 349 | if ( ascii ) delete[] ascii; } |
344 | 350 | ||
345 | void deleteSelf(); | 351 | void deleteSelf(); |
346 | QChar *unicode; | 352 | QChar *unicode; |
347 | char *ascii; | 353 | char *ascii; |
348 | void setDirty() { | 354 | void setDirty() { |
349 | if ( ascii ) { | 355 | if ( ascii ) { |
350 | delete [] ascii; | 356 | delete [] ascii; |
351 | ascii = 0; | 357 | ascii = 0; |
352 | } | 358 | } |
353 | dirty = 1; | 359 | issimpletext = FALSE; |
354 | } | 360 | } |
355 | #ifdef Q_OS_MAC9 | 361 | #ifdef Q_OS_MAC9 |
356 | uint len; | 362 | uint len; |
357 | #else | 363 | #else |
358 | uint len : 30; | 364 | uint len : 30; |
359 | #endif | 365 | #endif |
360 | uint simpletext : 1; | 366 | uint issimpletext : 1; |
361 | #ifdef Q_OS_MAC9 | 367 | #ifdef Q_OS_MAC9 |
362 | uint maxl; | 368 | uint maxl; |
363 | #else | 369 | #else |
364 | uint maxl : 30; | 370 | uint maxl : 30; |
365 | #endif | 371 | #endif |
366 | uint dirty : 1; | 372 | uint islatin1 : 1; |
367 | 373 | ||
368 | private: | 374 | private: |
369 | #if defined(Q_DISABLE_COPY) | 375 | #if defined(Q_DISABLE_COPY) |
370 | QStringData( const QStringData& ); | 376 | QStringData( const QStringData& ); |
371 | QStringData& operator=( const QStringData& ); | 377 | QStringData& operator=( const QStringData& ); |
372 | #endif | 378 | #endif |
373 | }; | 379 | }; |
374 | 380 | ||
375 | 381 | ||
376 | class Q_EXPORT QString | 382 | class Q_EXPORT QString |
377 | { | 383 | { |
378 | public: | 384 | public: |
379 | QString(); // make null string | 385 | QString(); // make null string |
380 | QString( QChar ); // one-char string | 386 | QString( QChar ); // one-char string |
381 | QString( const QString & ); // impl-shared copy | 387 | QString( const QString & ); // impl-shared copy |
382 | QString( const QByteArray& ); // deep copy | 388 | QString( const QByteArray& ); // deep copy |
383 | QString( const QChar* unicode, uint length ); // deep copy | 389 | QString( const QChar* unicode, uint length ); // deep copy |
384 | #ifndef QT_NO_CAST_ASCII | 390 | #ifndef QT_NO_CAST_ASCII |
385 | QString( const char *str ); // deep copy | 391 | QString( const char *str ); // deep copy |
386 | #endif | 392 | #endif |
393 | #ifndef QT_NO_STL | ||
394 | QString( const std::string& ); // deep copy | ||
395 | #endif | ||
387 | ~QString(); | 396 | ~QString(); |
388 | 397 | ||
389 | QString &operator=( const QString & ); // impl-shared copy | 398 | QString &operator=( const QString & ); // impl-shared copy |
390 | #ifndef QT_NO_CAST_ASCII | ||
391 | QString &operator=( const char * ); // deep copy | 399 | QString &operator=( const char * ); // deep copy |
400 | #ifndef QT_NO_STL | ||
401 | QString &operator=( const std::string& ); // deep copy | ||
392 | #endif | 402 | #endif |
393 | QString &operator=( const QCString& ); // deep copy | 403 | QString &operator=( const QCString& ); // deep copy |
394 | QString &operator=( QChar c ); | 404 | QString &operator=( QChar c ); |
395 | QString &operator=( char c ); | 405 | QString &operator=( char c ); |
396 | 406 | ||
397 | QT_STATIC_CONST QString null; | 407 | QT_STATIC_CONST QString null; |
398 | 408 | ||
399 | bool isNull() const; | 409 | bool isNull() const; |
400 | bool isEmpty() const; | 410 | bool isEmpty() const; |
401 | uint length() const; | 411 | uint length() const; |
402 | void truncate( uint pos ); | 412 | void truncate( uint pos ); |
403 | 413 | ||
404 | QString & fill( QChar c, int len = -1 ); | 414 | QString & fill( QChar c, int len = -1 ); |
405 | 415 | ||
406 | QString copy() const; | 416 | QString copy() const; |
407 | 417 | ||
408 | QString arg( long a, int fieldwidth=0, int base=10 ) const; | 418 | QString arg( long a, int fieldwidth=0, int base=10 ) const; |
409 | QString arg( ulong a, int fieldwidth=0, int base=10 ) const; | 419 | QString arg( ulong a, int fieldwidth=0, int base=10 ) const; |
410 | QString arg( int a, int fieldwidth=0, int base=10 ) const; | 420 | QString arg( int a, int fieldwidth=0, int base=10 ) const; |
411 | QString arg( uint a, int fieldwidth=0, int base=10 ) const; | 421 | QString arg( uint a, int fieldwidth=0, int base=10 ) const; |
412 | QString arg( short a, int fieldwidth=0, int base=10 ) const; | 422 | QString arg( short a, int fieldwidth=0, int base=10 ) const; |
413 | QString arg( ushort a, int fieldwidth=0, int base=10 ) const; | 423 | QString arg( ushort a, int fieldwidth=0, int base=10 ) const; |
414 | QString arg( char a, int fieldwidth=0 ) const; | 424 | QString arg( char a, int fieldwidth=0 ) const; |
415 | QString arg( QChar a, int fieldwidth=0 ) const; | 425 | QString arg( QChar a, int fieldwidth=0 ) const; |
416 | QString arg( const QString& a, int fieldwidth=0 ) const; | 426 | QString arg( const QString& a, int fieldwidth=0 ) const; |
417 | QString arg( double a, int fieldwidth=0, char fmt='g', int prec=-1 ) const; | 427 | QString arg( double a, int fieldwidth=0, char fmt='g', int prec=-1 ) const; |
418 | 428 | ||
419 | #ifndef QT_NO_SPRINTF | 429 | #ifndef QT_NO_SPRINTF |
420 | QString &sprintf( const char* format, ... ) | 430 | QString &sprintf( const char* format, ... ) |
421 | #if defined(Q_CC_GNU) && !defined(__INSURE__) | 431 | #if defined(Q_CC_GNU) && !defined(__INSURE__) |
422 | __attribute__ ((format (printf, 2, 3))) | 432 | __attribute__ ((format (printf, 2, 3))) |
423 | #endif | 433 | #endif |
424 | ; | 434 | ; |
425 | #endif | 435 | #endif |
426 | 436 | ||
427 | int find( QChar c, int index=0, bool cs=TRUE ) const; | 437 | int find( QChar c, int index=0, bool cs=TRUE ) const; |
428 | int find( char c, int index=0, bool cs=TRUE ) const; | 438 | int find( char c, int index=0, bool cs=TRUE ) const; |
429 | int find( const QString &str, int index=0, bool cs=TRUE ) const; | 439 | int find( const QString &str, int index=0, bool cs=TRUE ) const; |
430 | #ifndef QT_NO_REGEXP | 440 | #ifndef QT_NO_REGEXP |
431 | int find( const QRegExp &, int index=0 ) const; | 441 | int find( const QRegExp &, int index=0 ) const; |
432 | #endif | 442 | #endif |
433 | #ifndef QT_NO_CAST_ASCII | 443 | #ifndef QT_NO_CAST_ASCII |
434 | int find( const char* str, int index=0 ) const; | 444 | int find( const char* str, int index=0 ) const; |
435 | #endif | 445 | #endif |
436 | int findRev( QChar c, int index=-1, bool cs=TRUE) const; | 446 | int findRev( QChar c, int index=-1, bool cs=TRUE) const; |
437 | int findRev( char c, int index=-1, bool cs=TRUE) const; | 447 | int findRev( char c, int index=-1, bool cs=TRUE) const; |
438 | int findRev( const QString &str, int index=-1, bool cs=TRUE) const; | 448 | int findRev( const QString &str, int index=-1, bool cs=TRUE) const; |
439 | #ifndef QT_NO_REGEXP | 449 | #ifndef QT_NO_REGEXP |
@@ -449,236 +459,251 @@ public: | |||
449 | int contains( const char* str, bool cs=TRUE ) const; | 459 | int contains( const char* str, bool cs=TRUE ) const; |
450 | #endif | 460 | #endif |
451 | int contains( const QString &str, bool cs=TRUE ) const; | 461 | int contains( const QString &str, bool cs=TRUE ) const; |
452 | #ifndef QT_NO_REGEXP | 462 | #ifndef QT_NO_REGEXP |
453 | int contains( const QRegExp & ) const; | 463 | int contains( const QRegExp & ) const; |
454 | #endif | 464 | #endif |
455 | 465 | ||
456 | enum SectionFlags { | 466 | enum SectionFlags { |
457 | SectionDefault = 0x00, | 467 | SectionDefault = 0x00, |
458 | SectionSkipEmpty = 0x01, | 468 | SectionSkipEmpty = 0x01, |
459 | SectionIncludeLeadingSep = 0x02, | 469 | SectionIncludeLeadingSep = 0x02, |
460 | SectionIncludeTrailingSep = 0x04, | 470 | SectionIncludeTrailingSep = 0x04, |
461 | SectionCaseInsensitiveSeps = 0x08 | 471 | SectionCaseInsensitiveSeps = 0x08 |
462 | }; | 472 | }; |
463 | QString section( QChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; | 473 | QString section( QChar sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; |
464 | QString section( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; | 474 | QString section( char sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; |
465 | #ifndef QT_NO_CAST_ASCII | 475 | #ifndef QT_NO_CAST_ASCII |
466 | QString section( const char *in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; | 476 | QString section( const char *in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; |
467 | #endif | 477 | #endif |
468 | QString section( const QString &in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; | 478 | QString section( const QString &in_sep, int start, int end = 0xffffffff, int flags = SectionDefault ) const; |
469 | #ifndef QT_NO_REGEXP | 479 | #ifndef QT_NO_REGEXP |
470 | QString section( const QRegExp ®, int start, int end = 0xffffffff, int flags = SectionDefault ) const; | 480 | QString section( const QRegExp ®, int start, int end = 0xffffffff, int flags = SectionDefault ) const; |
471 | #endif | 481 | #endif |
472 | 482 | ||
473 | QString left( uint len ) const; | 483 | QString left( uint len ) const; |
474 | QString right( uint len ) const; | 484 | QString right( uint len ) const; |
475 | QString mid( uint index, uint len=0xffffffff) const; | 485 | QString mid( uint index, uint len=0xffffffff) const; |
476 | 486 | ||
477 | QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const; | 487 | QString leftJustify( uint width, QChar fill=' ', bool trunc=FALSE)const; |
478 | QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const; | 488 | QString rightJustify( uint width, QChar fill=' ',bool trunc=FALSE)const; |
479 | 489 | ||
480 | QString lower() const; | 490 | QString lower() const; |
481 | QString upper() const; | 491 | QString upper() const; |
482 | 492 | ||
483 | QString stripWhiteSpace() const; | 493 | QString stripWhiteSpace() const; |
484 | QString simplifyWhiteSpace() const; | 494 | QString simplifyWhiteSpace() const; |
485 | 495 | ||
486 | QString &insert( uint index, const QString & ); | 496 | QString &insert( uint index, const QString & ); |
487 | QString &insert( uint index, const QChar*, uint len ); | 497 | QString &insert( uint index, const QChar*, uint len ); |
488 | QString &insert( uint index, QChar ); | 498 | QString &insert( uint index, QChar ); |
489 | QString &insert( uint index, char c ) { return insert(index,QChar(c)); } | 499 | QString &insert( uint index, char c ) { return insert(index,QChar(c)); } |
490 | QString &append( char ); | 500 | QString &append( char ); |
491 | QString &append( QChar ); | 501 | QString &append( QChar ); |
492 | QString &append( const QString & ); | 502 | QString &append( const QString & ); |
493 | #ifndef QT_NO_CAST_ASCII | 503 | #ifndef QT_NO_CAST_ASCII |
494 | QString &append( const QByteArray & ); | 504 | QString &append( const QByteArray & ); |
495 | QString &append( const char * ); | 505 | QString &append( const char * ); |
496 | #endif | 506 | #endif |
507 | #ifndef QT_NO_STL | ||
508 | QString &append( const std::string& ); | ||
509 | #endif | ||
497 | QString &prepend( char ); | 510 | QString &prepend( char ); |
498 | QString &prepend( QChar ); | 511 | QString &prepend( QChar ); |
499 | QString &prepend( const QString & ); | 512 | QString &prepend( const QString & ); |
500 | #ifndef QT_NO_CAST_ASCII | 513 | #ifndef QT_NO_CAST_ASCII |
501 | QString &prepend( const QByteArray & ); | 514 | QString &prepend( const QByteArray & ); |
502 | QString &prepend( const char * ); | 515 | QString &prepend( const char * ); |
503 | #endif | 516 | #endif |
517 | #ifndef QT_NO_STL | ||
518 | QString &prepend( const std::string& ); | ||
519 | #endif | ||
504 | QString &remove( uint index, uint len ); | 520 | QString &remove( uint index, uint len ); |
505 | QString &remove( QChar c ); | 521 | QString &remove( QChar c ); |
506 | QString &remove( char c ) { return remove( QChar(c) ); } | 522 | QString &remove( char c ) { return remove( QChar(c) ); } |
507 | QString &remove( const QString & ); | 523 | QString &remove( const QString & ); |
508 | #ifndef QT_NO_REGEXP | 524 | #ifndef QT_NO_REGEXP |
509 | QString &remove( const QRegExp & ); | 525 | QString &remove( const QRegExp & ); |
510 | #endif | 526 | #endif |
511 | #ifndef QT_NO_CAST_ASCII | 527 | #ifndef QT_NO_CAST_ASCII |
512 | QString &remove( const char * ); | 528 | QString &remove( const char * ); |
513 | #endif | 529 | #endif |
514 | QString &replace( uint index, uint len, const QString & ); | 530 | QString &replace( uint index, uint len, const QString & ); |
515 | QString &replace( uint index, uint len, const QChar*, uint clen ); | 531 | QString &replace( uint index, uint len, const QChar*, uint clen ); |
516 | QString &replace( uint index, uint len, QChar ); | 532 | QString &replace( uint index, uint len, QChar ); |
517 | QString &replace( uint index, uint len, char c ) | 533 | QString &replace( uint index, uint len, char c ) |
518 | { return replace( index, len, QChar(c) ); } | 534 | { return replace( index, len, QChar(c) ); } |
519 | QString &replace( QChar c, const QString & ); | 535 | QString &replace( QChar c, const QString & ); |
520 | QString &replace( char c, const QString & after ) | 536 | QString &replace( char c, const QString & after ) |
521 | { return replace( QChar(c), after ); } | 537 | { return replace( QChar(c), after ); } |
522 | QString &replace( const QString &, const QString & ); | 538 | QString &replace( const QString &, const QString & ); |
523 | #ifndef QT_NO_REGEXP_CAPTURE | 539 | #ifndef QT_NO_REGEXP_CAPTURE |
524 | QString &replace( const QRegExp &, const QString & ); | 540 | QString &replace( const QRegExp &, const QString & ); |
525 | #endif | 541 | #endif |
526 | QString &replace( QChar, QChar ); | 542 | QString &replace( QChar, QChar ); |
527 | 543 | ||
528 | short toShort( bool *ok=0, int base=10 ) const; | 544 | short toShort( bool *ok=0, int base=10 ) const; |
529 | ushort toUShort( bool *ok=0, int base=10 ) const; | 545 | ushort toUShort( bool *ok=0, int base=10 ) const; |
530 | int toInt( bool *ok=0, int base=10 ) const; | 546 | int toInt( bool *ok=0, int base=10 ) const; |
531 | uint toUInt( bool *ok=0, int base=10 ) const; | 547 | uint toUInt( bool *ok=0, int base=10 ) const; |
532 | long toLong( bool *ok=0, int base=10 ) const; | 548 | long toLong( bool *ok=0, int base=10 ) const; |
533 | ulong toULong( bool *ok=0, int base=10 ) const; | 549 | ulong toULong( bool *ok=0, int base=10 ) const; |
534 | float toFloat( bool *ok=0 ) const; | 550 | float toFloat( bool *ok=0 ) const; |
535 | double toDouble( bool *ok=0 ) const; | 551 | double toDouble( bool *ok=0 ) const; |
536 | 552 | ||
537 | QString &setNum( short, int base=10 ); | 553 | QString &setNum( short, int base=10 ); |
538 | QString &setNum( ushort, int base=10 ); | 554 | QString &setNum( ushort, int base=10 ); |
539 | QString &setNum( int, int base=10 ); | 555 | QString &setNum( int, int base=10 ); |
540 | QString &setNum( uint, int base=10 ); | 556 | QString &setNum( uint, int base=10 ); |
541 | QString &setNum( long, int base=10 ); | 557 | QString &setNum( long, int base=10 ); |
542 | QString &setNum( ulong, int base=10 ); | 558 | QString &setNum( ulong, int base=10 ); |
543 | QString &setNum( float, char f='g', int prec=6 ); | 559 | QString &setNum( float, char f='g', int prec=6 ); |
544 | QString &setNum( double, char f='g', int prec=6 ); | 560 | QString &setNum( double, char f='g', int prec=6 ); |
545 | 561 | ||
546 | static QString number( long, int base=10 ); | 562 | static QString number( long, int base=10 ); |
547 | static QString number( ulong, int base=10); | 563 | static QString number( ulong, int base=10); |
548 | static QString number( int, int base=10 ); | 564 | static QString number( int, int base=10 ); |
549 | static QString number( uint, int base=10); | 565 | static QString number( uint, int base=10); |
550 | static QString number( double, char f='g', int prec=6 ); | 566 | static QString number( double, char f='g', int prec=6 ); |
551 | 567 | ||
552 | void setExpand( uint index, QChar c ); | 568 | void setExpand( uint index, QChar c ); |
553 | 569 | ||
554 | QString &operator+=( const QString &str ); | 570 | QString &operator+=( const QString &str ); |
555 | #ifndef QT_NO_CAST_ASCII | 571 | #ifndef QT_NO_CAST_ASCII |
556 | QString &operator+=( const QByteArray &str ); | 572 | QString &operator+=( const QByteArray &str ); |
557 | QString &operator+=( const char *str ); | 573 | QString &operator+=( const char *str ); |
558 | #endif | 574 | #endif |
575 | #ifndef QT_NO_STL | ||
576 | QString &operator+=( const std::string& ); | ||
577 | #endif | ||
559 | QString &operator+=( QChar c ); | 578 | QString &operator+=( QChar c ); |
560 | QString &operator+=( char c ); | 579 | QString &operator+=( char c ); |
561 | 580 | ||
562 | QChar at( uint i ) const | 581 | QChar at( uint i ) const |
563 | { return i < d->len ? d->unicode[i] : QChar::null; } | 582 | { return i < d->len ? d->unicode[i] : QChar::null; } |
564 | QChar operator[]( int i ) const { return at((uint)i); } | 583 | QChar operator[]( int i ) const { return at((uint)i); } |
565 | QCharRef at( uint i ); | 584 | QCharRef at( uint i ); |
566 | QCharRef operator[]( int i ); | 585 | QCharRef operator[]( int i ); |
567 | 586 | ||
568 | QChar constref(uint i) const | 587 | QChar constref(uint i) const |
569 | { return at(i); } | 588 | { return at(i); } |
570 | QChar& ref(uint i) | 589 | QChar& ref(uint i) |
571 | { // Optimized for easy-inlining by simple compilers. | 590 | { // Optimized for easy-inlining by simple compilers. |
572 | if ( d->count != 1 || i >= d->len ) | 591 | if ( d->count != 1 || i >= d->len ) |
573 | subat( i ); | 592 | subat( i ); |
574 | d->setDirty(); | 593 | d->setDirty(); |
575 | return d->unicode[i]; | 594 | return d->unicode[i]; |
576 | } | 595 | } |
577 | 596 | ||
578 | const QChar* unicode() const { return d->unicode; } | 597 | const QChar* unicode() const { return d->unicode; } |
579 | const char* ascii() const { return latin1(); } | 598 | const char* ascii() const; |
599 | static QString fromAscii(const char*, int len=-1); | ||
580 | const char* latin1() const; | 600 | const char* latin1() const; |
581 | static QString fromLatin1(const char*, int len=-1); | 601 | static QString fromLatin1(const char*, int len=-1); |
582 | QCString utf8() const; | 602 | QCString utf8() const; |
583 | static QString fromUtf8(const char*, int len=-1); | 603 | static QString fromUtf8(const char*, int len=-1); |
584 | QCString local8Bit() const; | 604 | QCString local8Bit() const; |
585 | static QString fromLocal8Bit(const char*, int len=-1); | 605 | static QString fromLocal8Bit(const char*, int len=-1); |
586 | bool operator!() const; | 606 | bool operator!() const; |
587 | #ifndef QT_NO_ASCII_CAST | 607 | #ifndef QT_NO_ASCII_CAST |
588 | operator const char *() const { return latin1(); } | 608 | operator const char *() const { return ascii(); } |
589 | #endif | 609 | #endif |
610 | #ifndef QT_NO_STL | ||
611 | operator std::string() const { return ascii() ? ascii() : ""; } | ||
612 | #endif | ||
613 | |||
590 | static QString fromUcs2( const unsigned short *ucs2 ); | 614 | static QString fromUcs2( const unsigned short *ucs2 ); |
591 | const unsigned short *ucs2() const; | 615 | const unsigned short *ucs2() const; |
592 | 616 | ||
593 | QString &setUnicode( const QChar* unicode, uint len ); | 617 | QString &setUnicode( const QChar* unicode, uint len ); |
594 | QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len ); | 618 | QString &setUnicodeCodes( const ushort* unicode_as_ushorts, uint len ); |
619 | QString &setAscii( const char*, int len=-1 ); | ||
595 | QString &setLatin1( const char*, int len=-1 ); | 620 | QString &setLatin1( const char*, int len=-1 ); |
596 | 621 | ||
597 | int compare( const QString& s ) const; | 622 | int compare( const QString& s ) const; |
598 | static int compare( const QString& s1, const QString& s2 ) | 623 | static int compare( const QString& s1, const QString& s2 ) |
599 | { return s1.compare( s2 ); } | 624 | { return s1.compare( s2 ); } |
600 | 625 | ||
601 | int localeAwareCompare( const QString& s ) const; | 626 | int localeAwareCompare( const QString& s ) const; |
602 | static int localeAwareCompare( const QString& s1, const QString& s2 ) | 627 | static int localeAwareCompare( const QString& s1, const QString& s2 ) |
603 | { return s1.localeAwareCompare( s2 ); } | 628 | { return s1.localeAwareCompare( s2 ); } |
604 | 629 | ||
605 | #ifndef QT_NO_DATASTREAM | 630 | #ifndef QT_NO_DATASTREAM |
606 | friend Q_EXPORT QDataStream &operator>>( QDataStream &, QString & ); | 631 | friend Q_EXPORT QDataStream &operator>>( QDataStream &, QString & ); |
607 | #endif | 632 | #endif |
608 | 633 | ||
609 | void compose(); | 634 | void compose(); |
610 | 635 | ||
611 | #ifndef QT_NO_COMPAT | 636 | #ifndef QT_NO_COMPAT |
612 | const char* data() const { return latin1(); } | 637 | const char* data() const { return ascii(); } |
613 | #endif | 638 | #endif |
614 | 639 | ||
615 | bool startsWith( const QString& ) const; | 640 | bool startsWith( const QString& ) const; |
616 | bool endsWith( const QString& ) const; | 641 | bool endsWith( const QString& ) const; |
617 | 642 | ||
618 | void setLength( uint newLength ); | 643 | void setLength( uint newLength ); |
619 | 644 | ||
620 | bool simpleText() const { if ( d->dirty ) checkSimpleText(); return (bool)d->simpletext; } | 645 | bool simpleText() const { if ( !d->issimpletext ) checkSimpleText(); return (bool)d->issimpletext; } |
621 | bool isRightToLeft() const; | 646 | bool isRightToLeft() const; |
622 | 647 | ||
623 | 648 | ||
624 | private: | 649 | private: |
625 | QString( int size, bool /* dummy */ );// allocate size incl. \0 | 650 | QString( int size, bool /* dummy */ );// allocate size incl. \0 |
626 | 651 | ||
627 | void deref(); | 652 | void deref(); |
628 | void real_detach(); | 653 | void real_detach(); |
629 | void subat( uint ); | 654 | void subat( uint ); |
630 | bool findArg(int& pos, int& len) const; | 655 | bool findArg(int& pos, int& len) const; |
631 | 656 | ||
632 | void checkSimpleText() const; | 657 | void checkSimpleText() const; |
633 | 658 | ||
634 | static QChar* asciiToUnicode( const char*, uint * len, uint maxlen=(uint)-1 ); | 659 | static QChar* latin1ToUnicode( const char*, uint * len, uint maxlen=(uint)-1 ); |
635 | static QChar* asciiToUnicode( const QByteArray&, uint * len ); | 660 | static QChar* latin1ToUnicode( const QByteArray&, uint * len ); |
636 | static char* unicodeToAscii( const QChar*, uint len ); | 661 | static char* unicodeToLatin1( const QChar*, uint len ); |
637 | 662 | ||
638 | QStringData *d; | 663 | QStringData *d; |
639 | static QStringData* shared_null; | 664 | static QStringData* shared_null; |
640 | static QStringData* makeSharedNull(); | 665 | static QStringData* makeSharedNull(); |
641 | 666 | ||
642 | friend class QConstString; | 667 | friend class QConstString; |
643 | friend class QTextStream; | 668 | friend class QTextStream; |
644 | QString( QStringData* dd, bool /* dummy */ ) : d(dd) { } | 669 | QString( QStringData* dd, bool /* dummy */ ) : d(dd) { } |
645 | 670 | ||
646 | // needed for QDeepCopy | 671 | // needed for QDeepCopy |
647 | void detach(); | 672 | void detach(); |
648 | friend class QDeepCopy<QString>; | 673 | friend class QDeepCopy<QString>; |
649 | }; | 674 | }; |
650 | 675 | ||
651 | class Q_EXPORT QCharRef { | 676 | class Q_EXPORT QCharRef { |
652 | friend class QString; | 677 | friend class QString; |
653 | QString& s; | 678 | QString& s; |
654 | uint p; | 679 | uint p; |
655 | QCharRef(QString* str, uint pos) : s(*str), p(pos) { } | 680 | QCharRef(QString* str, uint pos) : s(*str), p(pos) { } |
656 | 681 | ||
657 | public: | 682 | public: |
658 | // most QChar operations repeated here... | 683 | // most QChar operations repeated here... |
659 | 684 | ||
660 | // all this is not documented: We just say "like QChar" and let it be. | 685 | // all this is not documented: We just say "like QChar" and let it be. |
661 | #ifndef Q_QDOC | 686 | #ifndef Q_QDOC |
662 | ushort unicode() const { return s.constref(p).unicode(); } | 687 | ushort unicode() const { return s.constref(p).unicode(); } |
663 | char latin1() const { return s.constref(p).latin1(); } | 688 | char latin1() const { return s.constref(p).latin1(); } |
664 | 689 | ||
665 | // An operator= for each QChar cast constructor... | 690 | // An operator= for each QChar cast constructor... |
666 | QCharRef operator=(char c ) { s.ref(p)=c; return *this; } | 691 | QCharRef operator=(char c ) { s.ref(p)=c; return *this; } |
667 | QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; } | 692 | QCharRef operator=(uchar c ) { s.ref(p)=c; return *this; } |
668 | QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; } | 693 | QCharRef operator=(QChar c ) { s.ref(p)=c; return *this; } |
669 | QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; } | 694 | QCharRef operator=(const QCharRef& c ) { s.ref(p)=c.unicode(); return *this; } |
670 | QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; } | 695 | QCharRef operator=(ushort rc ) { s.ref(p)=rc; return *this; } |
671 | QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; } | 696 | QCharRef operator=(short rc ) { s.ref(p)=rc; return *this; } |
672 | QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; } | 697 | QCharRef operator=(uint rc ) { s.ref(p)=rc; return *this; } |
673 | QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; } | 698 | QCharRef operator=(int rc ) { s.ref(p)=rc; return *this; } |
674 | 699 | ||
675 | operator QChar () const { return s.constref(p); } | 700 | operator QChar () const { return s.constref(p); } |
676 | 701 | ||
677 | // each function... | 702 | // each function... |
678 | bool isNull() const { return unicode()==0; } | 703 | bool isNull() const { return unicode()==0; } |
679 | bool isPrint() const { return s.constref(p).isPrint(); } | 704 | bool isPrint() const { return s.constref(p).isPrint(); } |
680 | bool isPunct() const { return s.constref(p).isPunct(); } | 705 | bool isPunct() const { return s.constref(p).isPunct(); } |
681 | bool isSpace() const { return s.constref(p).isSpace(); } | 706 | bool isSpace() const { return s.constref(p).isSpace(); } |
682 | bool isMark() const { return s.constref(p).isMark(); } | 707 | bool isMark() const { return s.constref(p).isMark(); } |
683 | bool isLetter() const { return s.constref(p).isLetter(); } | 708 | bool isLetter() const { return s.constref(p).isLetter(); } |
684 | bool isNumber() const { return s.constref(p).isNumber(); } | 709 | bool isNumber() const { return s.constref(p).isNumber(); } |
@@ -749,202 +774,218 @@ inline QString::~QString() | |||
749 | 774 | ||
750 | // needed for QDeepCopy | 775 | // needed for QDeepCopy |
751 | inline void QString::detach() | 776 | inline void QString::detach() |
752 | { real_detach(); } | 777 | { real_detach(); } |
753 | 778 | ||
754 | inline QString QString::section( QChar sep, int start, int end, int flags ) const | 779 | inline QString QString::section( QChar sep, int start, int end, int flags ) const |
755 | { return section(QString(sep), start, end, flags); } | 780 | { return section(QString(sep), start, end, flags); } |
756 | 781 | ||
757 | inline QString QString::section( char sep, int start, int end, int flags ) const | 782 | inline QString QString::section( char sep, int start, int end, int flags ) const |
758 | { return section(QChar(sep), start, end, flags); } | 783 | { return section(QChar(sep), start, end, flags); } |
759 | 784 | ||
760 | #ifndef QT_NO_CAST_ASCII | 785 | #ifndef QT_NO_CAST_ASCII |
761 | inline QString QString::section( const char *in_sep, int start, int end, int flags ) const | 786 | inline QString QString::section( const char *in_sep, int start, int end, int flags ) const |
762 | { return section(QString(in_sep), start, end, flags); } | 787 | { return section(QString(in_sep), start, end, flags); } |
763 | #endif | 788 | #endif |
764 | 789 | ||
765 | inline QString &QString::operator=( QChar c ) | 790 | inline QString &QString::operator=( QChar c ) |
766 | { *this = QString(c); return *this; } | 791 | { *this = QString(c); return *this; } |
767 | 792 | ||
768 | inline QString &QString::operator=( char c ) | 793 | inline QString &QString::operator=( char c ) |
769 | { *this = QString(QChar(c)); return *this; } | 794 | { *this = QString(QChar(c)); return *this; } |
770 | 795 | ||
771 | inline bool QString::isNull() const | 796 | inline bool QString::isNull() const |
772 | { return unicode() == 0; } | 797 | { return unicode() == 0; } |
773 | 798 | ||
774 | inline bool QString::operator!() const | 799 | inline bool QString::operator!() const |
775 | { return isNull(); } | 800 | { return isNull(); } |
776 | 801 | ||
777 | inline uint QString::length() const | 802 | inline uint QString::length() const |
778 | { return d->len; } | 803 | { return d->len; } |
779 | 804 | ||
780 | inline bool QString::isEmpty() const | 805 | inline bool QString::isEmpty() const |
781 | { return length() == 0; } | 806 | { return length() == 0; } |
782 | 807 | ||
783 | inline QString QString::copy() const | 808 | inline QString QString::copy() const |
784 | { return QString( *this ); } | 809 | { return QString( *this ); } |
785 | 810 | ||
786 | inline QString &QString::prepend( const QString & s ) | 811 | inline QString &QString::prepend( const QString & s ) |
787 | { return insert(0,s); } | 812 | { return insert(0,s); } |
788 | 813 | ||
789 | inline QString &QString::prepend( QChar c ) | 814 | inline QString &QString::prepend( QChar c ) |
790 | { return insert(0,c); } | 815 | { return insert(0,c); } |
791 | 816 | ||
792 | inline QString &QString::prepend( char c ) | 817 | inline QString &QString::prepend( char c ) |
793 | { return insert(0,c); } | 818 | { return insert(0,c); } |
794 | 819 | ||
795 | #ifndef QT_NO_CAST_ASCII | 820 | #ifndef QT_NO_CAST_ASCII |
796 | inline QString &QString::prepend( const QByteArray & s ) | 821 | inline QString &QString::prepend( const QByteArray & s ) |
797 | { return insert(0,s.data()); } | 822 | { return insert(0,QString(s)); } |
823 | #endif | ||
824 | |||
825 | #ifndef QT_NO_STL | ||
826 | inline QString &QString::prepend( const std::string& s ) | ||
827 | { return insert(0, s); } | ||
828 | #endif | ||
829 | |||
830 | #ifndef QT_NO_CAST_ASCII | ||
831 | inline QString &QString::operator+=( const QByteArray &s ) | ||
832 | { return operator+=(QString(s)); } | ||
798 | #endif | 833 | #endif |
799 | 834 | ||
800 | inline QString &QString::append( const QString & s ) | 835 | inline QString &QString::append( const QString & s ) |
801 | { return operator+=(s); } | 836 | { return operator+=(s); } |
802 | 837 | ||
803 | #ifndef QT_NO_CAST_ASCII | 838 | #ifndef QT_NO_CAST_ASCII |
804 | inline QString &QString::append( const QByteArray &s ) | 839 | inline QString &QString::append( const QByteArray &s ) |
805 | { return operator+=(s.data()); } | 840 | { return operator+=(s); } |
806 | 841 | ||
807 | inline QString &QString::append( const char * s ) | 842 | inline QString &QString::append( const char * s ) |
808 | { return operator+=(s); } | 843 | { return operator+=(s); } |
809 | #endif | 844 | #endif |
810 | 845 | ||
811 | inline QString &QString::append( QChar c ) | 846 | inline QString &QString::append( QChar c ) |
812 | { return operator+=(c); } | 847 | { return operator+=(c); } |
813 | 848 | ||
814 | inline QString &QString::append( char c ) | 849 | inline QString &QString::append( char c ) |
815 | { return operator+=(c); } | 850 | { return operator+=(c); } |
816 | 851 | ||
817 | #ifndef QT_NO_CAST_ASCII | 852 | #ifndef QT_NO_STL |
818 | inline QString &QString::operator+=( const QByteArray &s ) | 853 | inline QString &QString::operator+=( const std::string& s ) |
819 | { return operator+=(s.data()); } | 854 | { return operator+=(s.c_str()); } |
855 | inline QString &QString::append( const std::string& s ) | ||
856 | { return operator+=(s); } | ||
820 | #endif | 857 | #endif |
821 | 858 | ||
822 | inline QString &QString::setNum( short n, int base ) | 859 | inline QString &QString::setNum( short n, int base ) |
823 | { return setNum((long)n, base); } | 860 | { return setNum((long)n, base); } |
824 | 861 | ||
825 | inline QString &QString::setNum( ushort n, int base ) | 862 | inline QString &QString::setNum( ushort n, int base ) |
826 | { return setNum((ulong)n, base); } | 863 | { return setNum((ulong)n, base); } |
827 | 864 | ||
828 | inline QString &QString::setNum( int n, int base ) | 865 | inline QString &QString::setNum( int n, int base ) |
829 | { return setNum((long)n, base); } | 866 | { return setNum((long)n, base); } |
830 | 867 | ||
831 | inline QString &QString::setNum( uint n, int base ) | 868 | inline QString &QString::setNum( uint n, int base ) |
832 | { return setNum((ulong)n, base); } | 869 | { return setNum((ulong)n, base); } |
833 | 870 | ||
834 | inline QString &QString::setNum( float n, char f, int prec ) | 871 | inline QString &QString::setNum( float n, char f, int prec ) |
835 | { return setNum((double)n,f,prec); } | 872 | { return setNum((double)n,f,prec); } |
836 | 873 | ||
837 | inline QString QString::arg(int a, int fieldwidth, int base) const | 874 | inline QString QString::arg(int a, int fieldwidth, int base) const |
838 | { return arg((long)a, fieldwidth, base); } | 875 | { return arg((long)a, fieldwidth, base); } |
839 | 876 | ||
840 | inline QString QString::arg(uint a, int fieldwidth, int base) const | 877 | inline QString QString::arg(uint a, int fieldwidth, int base) const |
841 | { return arg((ulong)a, fieldwidth, base); } | 878 | { return arg((ulong)a, fieldwidth, base); } |
842 | 879 | ||
843 | inline QString QString::arg(short a, int fieldwidth, int base) const | 880 | inline QString QString::arg(short a, int fieldwidth, int base) const |
844 | { return arg((long)a, fieldwidth, base); } | 881 | { return arg((long)a, fieldwidth, base); } |
845 | 882 | ||
846 | inline QString QString::arg(ushort a, int fieldwidth, int base) const | 883 | inline QString QString::arg(ushort a, int fieldwidth, int base) const |
847 | { return arg((ulong)a, fieldwidth, base); } | 884 | { return arg((ulong)a, fieldwidth, base); } |
848 | 885 | ||
849 | inline int QString::find( char c, int index, bool cs ) const | 886 | inline int QString::find( char c, int index, bool cs ) const |
850 | { return find(QChar(c), index, cs); } | 887 | { return find(QChar(c), index, cs); } |
851 | 888 | ||
852 | inline int QString::findRev( char c, int index, bool cs) const | 889 | inline int QString::findRev( char c, int index, bool cs) const |
853 | { return findRev( QChar(c), index, cs ); } | 890 | { return findRev( QChar(c), index, cs ); } |
854 | 891 | ||
855 | #ifndef QT_NO_CAST_ASCII | 892 | #ifndef QT_NO_CAST_ASCII |
856 | inline int QString::find( const char* str, int index ) const | 893 | inline int QString::find( const char* str, int index ) const |
857 | { return find(QString::fromLatin1(str), index); } | 894 | { return find(QString::fromAscii(str), index); } |
858 | 895 | ||
859 | inline int QString::findRev( const char* str, int index ) const | 896 | inline int QString::findRev( const char* str, int index ) const |
860 | { return findRev(QString::fromLatin1(str), index); } | 897 | { return findRev(QString::fromAscii(str), index); } |
861 | #endif | 898 | #endif |
862 | 899 | ||
863 | 900 | ||
864 | /***************************************************************************** | 901 | /***************************************************************************** |
865 | QString non-member operators | 902 | QString non-member operators |
866 | *****************************************************************************/ | 903 | *****************************************************************************/ |
867 | 904 | ||
868 | Q_EXPORT bool operator!=( const QString &s1, const QString &s2 ); | 905 | Q_EXPORT bool operator!=( const QString &s1, const QString &s2 ); |
869 | Q_EXPORT bool operator<( const QString &s1, const QString &s2 ); | 906 | Q_EXPORT bool operator<( const QString &s1, const QString &s2 ); |
870 | Q_EXPORT bool operator<=( const QString &s1, const QString &s2 ); | 907 | Q_EXPORT bool operator<=( const QString &s1, const QString &s2 ); |
871 | Q_EXPORT bool operator==( const QString &s1, const QString &s2 ); | 908 | Q_EXPORT bool operator==( const QString &s1, const QString &s2 ); |
872 | Q_EXPORT bool operator>( const QString &s1, const QString &s2 ); | 909 | Q_EXPORT bool operator>( const QString &s1, const QString &s2 ); |
873 | Q_EXPORT bool operator>=( const QString &s1, const QString &s2 ); | 910 | Q_EXPORT bool operator>=( const QString &s1, const QString &s2 ); |
874 | #ifndef QT_NO_CAST_ASCII | 911 | #ifndef QT_NO_CAST_ASCII |
875 | Q_EXPORT bool operator!=( const QString &s1, const char *s2 ); | 912 | Q_EXPORT bool operator!=( const QString &s1, const char *s2 ); |
876 | Q_EXPORT bool operator<( const QString &s1, const char *s2 ); | 913 | Q_EXPORT bool operator<( const QString &s1, const char *s2 ); |
877 | Q_EXPORT bool operator<=( const QString &s1, const char *s2 ); | 914 | Q_EXPORT bool operator<=( const QString &s1, const char *s2 ); |
878 | Q_EXPORT bool operator==( const QString &s1, const char *s2 ); | 915 | Q_EXPORT bool operator==( const QString &s1, const char *s2 ); |
879 | Q_EXPORT bool operator>( const QString &s1, const char *s2 ); | 916 | Q_EXPORT bool operator>( const QString &s1, const char *s2 ); |
880 | Q_EXPORT bool operator>=( const QString &s1, const char *s2 ); | 917 | Q_EXPORT bool operator>=( const QString &s1, const char *s2 ); |
881 | Q_EXPORT bool operator!=( const char *s1, const QString &s2 ); | 918 | Q_EXPORT bool operator!=( const char *s1, const QString &s2 ); |
882 | Q_EXPORT bool operator<( const char *s1, const QString &s2 ); | 919 | Q_EXPORT bool operator<( const char *s1, const QString &s2 ); |
883 | Q_EXPORT bool operator<=( const char *s1, const QString &s2 ); | 920 | Q_EXPORT bool operator<=( const char *s1, const QString &s2 ); |
884 | Q_EXPORT bool operator==( const char *s1, const QString &s2 ); | 921 | Q_EXPORT bool operator==( const char *s1, const QString &s2 ); |
885 | //Q_EXPORT bool operator>( const char *s1, const QString &s2 ); // MSVC++ | 922 | //Q_EXPORT bool operator>( const char *s1, const QString &s2 ); // MSVC++ |
886 | Q_EXPORT bool operator>=( const char *s1, const QString &s2 ); | 923 | Q_EXPORT bool operator>=( const char *s1, const QString &s2 ); |
887 | #endif | 924 | #endif |
888 | 925 | ||
889 | Q_EXPORT inline const QString operator+( const QString &s1, const QString &s2 ) | 926 | Q_EXPORT inline const QString operator+( const QString &s1, const QString &s2 ) |
890 | { | 927 | { |
891 | QString tmp( s1 ); | 928 | QString tmp( s1 ); |
892 | tmp += s2; | 929 | tmp += s2; |
893 | return tmp; | 930 | return tmp; |
894 | } | 931 | } |
895 | 932 | ||
896 | #ifndef QT_NO_CAST_ASCII | 933 | #ifndef QT_NO_CAST_ASCII |
897 | Q_EXPORT inline const QString operator+( const QString &s1, const char *s2 ) | 934 | Q_EXPORT inline const QString operator+( const QString &s1, const char *s2 ) |
898 | { | 935 | { |
899 | QString tmp( s1 ); | 936 | QString tmp( s1 ); |
900 | tmp += QString::fromLatin1(s2); | 937 | tmp += QString::fromAscii(s2); |
901 | return tmp; | 938 | return tmp; |
902 | } | 939 | } |
903 | 940 | ||
904 | Q_EXPORT inline const QString operator+( const char *s1, const QString &s2 ) | 941 | Q_EXPORT inline const QString operator+( const char *s1, const QString &s2 ) |
905 | { | 942 | { |
906 | QString tmp = QString::fromLatin1( s1 ); | 943 | QString tmp = QString::fromAscii( s1 ); |
907 | tmp += s2; | 944 | tmp += s2; |
908 | return tmp; | 945 | return tmp; |
909 | } | 946 | } |
910 | #endif | 947 | #endif |
911 | 948 | ||
912 | Q_EXPORT inline const QString operator+( const QString &s1, QChar c2 ) | 949 | Q_EXPORT inline const QString operator+( const QString &s1, QChar c2 ) |
913 | { | 950 | { |
914 | QString tmp( s1 ); | 951 | QString tmp( s1 ); |
915 | tmp += c2; | 952 | tmp += c2; |
916 | return tmp; | 953 | return tmp; |
917 | } | 954 | } |
918 | 955 | ||
919 | Q_EXPORT inline const QString operator+( const QString &s1, char c2 ) | 956 | Q_EXPORT inline const QString operator+( const QString &s1, char c2 ) |
920 | { | 957 | { |
921 | QString tmp( s1 ); | 958 | QString tmp( s1 ); |
922 | tmp += c2; | 959 | tmp += c2; |
923 | return tmp; | 960 | return tmp; |
924 | } | 961 | } |
925 | 962 | ||
926 | Q_EXPORT inline const QString operator+( QChar c1, const QString &s2 ) | 963 | Q_EXPORT inline const QString operator+( QChar c1, const QString &s2 ) |
927 | { | 964 | { |
928 | QString tmp; | 965 | QString tmp; |
929 | tmp += c1; | 966 | tmp += c1; |
930 | tmp += s2; | 967 | tmp += s2; |
931 | return tmp; | 968 | return tmp; |
932 | } | 969 | } |
933 | 970 | ||
934 | Q_EXPORT inline const QString operator+( char c1, const QString &s2 ) | 971 | Q_EXPORT inline const QString operator+( char c1, const QString &s2 ) |
935 | { | 972 | { |
936 | QString tmp; | 973 | QString tmp; |
937 | tmp += c1; | 974 | tmp += c1; |
938 | tmp += s2; | 975 | tmp += s2; |
939 | return tmp; | 976 | return tmp; |
940 | } | 977 | } |
941 | 978 | ||
942 | #if defined(Q_OS_WIN32) | 979 | #if defined(Q_OS_WIN32) |
943 | extern Q_EXPORT QString qt_winQString(void*); | 980 | extern Q_EXPORT QString qt_winQString(void*); |
944 | extern Q_EXPORT const void* qt_winTchar(const QString& str, bool addnul); | 981 | extern Q_EXPORT const void* qt_winTchar(const QString& str, bool addnul); |
945 | extern Q_EXPORT void* qt_winTchar_new(const QString& str); | 982 | extern Q_EXPORT void* qt_winTchar_new(const QString& str); |
946 | extern Q_EXPORT QCString qt_winQString2MB( const QString& s, int len=-1 ); | 983 | extern Q_EXPORT QCString qt_winQString2MB( const QString& s, int len=-1 ); |
947 | extern Q_EXPORT QString qt_winMB2QString( const char* mb, int len=-1 ); | 984 | extern Q_EXPORT QString qt_winMB2QString( const char* mb, int len=-1 ); |
948 | #endif | 985 | #endif |
949 | 986 | ||
987 | #ifdef QT_QWINEXPORT | ||
988 | #define Q_DEFINED_QSTRING | ||
989 | #include "qwinexport.h" | ||
990 | #endif /* QT_QWINEXPORT */ | ||
950 | #endif // QSTRING_H | 991 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QStrList, QStrIList and QStrListIterator classes | 4 | ** Definition of QStrList, QStrIList and QStrListIterator classes |
5 | ** | 5 | ** |
6 | ** Created : 920730 | 6 | ** Created : 920730 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QSTRLIST_H | 38 | #ifndef QSTRLIST_H |
39 | #define QSTRLIST_H | 39 | #define QSTRLIST_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qstring.h" | 42 | #include "qstring.h" |
43 | #include "qptrlist.h" | 43 | #include "qptrlist.h" |
44 | #include "qdatastream.h" | 44 | #include "qdatastream.h" |
45 | #endif // QT_H | 45 | #endif // QT_H |
46 | 46 | ||
47 | 47 | ||
48 | #ifndef QT_QWINEXPORT | ||
48 | #if defined(Q_TEMPLATEDLL) | 49 | #if defined(Q_TEMPLATEDLL) |
49 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<char>; | 50 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<char>; |
50 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrListIterator<char>; | 51 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrListIterator<char>; |
51 | #endif | 52 | #endif |
53 | #endif /* QT_QWINEXPORT */ | ||
52 | 54 | ||
53 | #if defined(Q_QDOC) | 55 | #if defined(Q_QDOC) |
54 | class QStrListIterator : public QPtrListIterator<char> | 56 | class QStrListIterator : public QPtrListIterator<char> |
55 | { | 57 | { |
56 | }; | 58 | }; |
57 | #else | 59 | #else |
58 | typedef QPtrListIterator<char> QStrListIterator; | 60 | typedef QPtrListIterator<char> QStrListIterator; |
59 | #endif | 61 | #endif |
60 | 62 | ||
61 | class Q_EXPORT QStrList : public QPtrList<char> | 63 | class Q_EXPORT QStrList : public QPtrList<char> |
62 | { | 64 | { |
63 | public: | 65 | public: |
64 | QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; } | 66 | QStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; } |
65 | QStrList( const QStrList & ); | 67 | QStrList( const QStrList & ); |
66 | ~QStrList() { clear(); } | 68 | ~QStrList() { clear(); } |
67 | QStrList& operator=( const QStrList & ); | 69 | QStrList& operator=( const QStrList & ); |
68 | 70 | ||
69 | private: | 71 | private: |
70 | QPtrCollection::Item newItem( QPtrCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; } | 72 | QPtrCollection::Item newItem( QPtrCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; } |
71 | void deleteItem( QPtrCollection::Item d ) { if ( del_item ) delete[] (char*)d; } | 73 | void deleteItem( QPtrCollection::Item d ) { if ( del_item ) delete[] (char*)d; } |
72 | int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 ) { return qstrcmp((const char*)s1, | 74 | int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 ) { return qstrcmp((const char*)s1, |
73 | (const char*)s2); } | 75 | (const char*)s2); } |
74 | #ifndef QT_NO_DATASTREAM | 76 | #ifndef QT_NO_DATASTREAM |
75 | QDataStream &read( QDataStream &s, QPtrCollection::Item &d ) | 77 | QDataStream &read( QDataStream &s, QPtrCollection::Item &d ) |
76 | { s >> (char *&)d; return s; } | 78 | { s >> (char *&)d; return s; } |
77 | QDataStream &write( QDataStream &s, QPtrCollection::Item d ) const | 79 | QDataStream &write( QDataStream &s, QPtrCollection::Item d ) const |
78 | { return s << (const char *)d; } | 80 | { return s << (const char *)d; } |
79 | #endif | 81 | #endif |
80 | bool dc; | 82 | bool dc; |
81 | }; | 83 | }; |
82 | 84 | ||
83 | 85 | ||
84 | class Q_EXPORT QStrIList : public QStrList// case insensitive string list | 86 | class Q_EXPORT QStrIList : public QStrList// case insensitive string list |
85 | { | 87 | { |
86 | public: | 88 | public: |
87 | QStrIList( bool deepCopies=TRUE ) : QStrList( deepCopies ) {} | 89 | QStrIList( bool deepCopies=TRUE ) : QStrList( deepCopies ) {} |
88 | ~QStrIList() { clear(); } | 90 | ~QStrIList() { clear(); } |
89 | private: | 91 | private: |
90 | int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 ) | 92 | int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 ) |
91 | { return qstricmp((const char*)s1, | 93 | { return qstricmp((const char*)s1, |
92 | (const char*)s2); } | 94 | (const char*)s2); } |
93 | }; | 95 | }; |
94 | 96 | ||
95 | 97 | ||
96 | inline QStrList & QStrList::operator=( const QStrList &strList ) | 98 | inline QStrList & QStrList::operator=( const QStrList &strList ) |
97 | { | 99 | { |
98 | clear(); | 100 | clear(); |
99 | dc = strList.dc; | 101 | 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 @@ | |||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QTEXTCODEC_H | 38 | #ifndef QTEXTCODEC_H |
39 | #define QTEXTCODEC_H | 39 | #define QTEXTCODEC_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qstring.h" | 42 | #include "qstring.h" |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | #ifndef QT_NO_TEXTCODEC | 45 | #ifndef QT_NO_TEXTCODEC |
46 | 46 | ||
47 | class QTextCodec; | 47 | class QTextCodec; |
48 | class QIODevice; | 48 | class QIODevice; |
49 | class QFont; | 49 | class QFont; |
50 | 50 | ||
51 | class Q_EXPORT QTextEncoder { | 51 | class Q_EXPORT QTextEncoder { |
52 | public: | 52 | public: |
53 | virtual ~QTextEncoder(); | 53 | virtual ~QTextEncoder(); |
54 | virtual QCString fromUnicode(const QString& uc, int& lenInOut) = 0; | 54 | virtual QCString fromUnicode(const QString& uc, int& lenInOut) = 0; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | class Q_EXPORT QTextDecoder { | 57 | class Q_EXPORT QTextDecoder { |
58 | public: | 58 | public: |
59 | virtual ~QTextDecoder(); | 59 | virtual ~QTextDecoder(); |
60 | virtual QString toUnicode(const char* chars, int len) = 0; | 60 | virtual QString toUnicode(const char* chars, int len) = 0; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | class Q_EXPORT QTextCodec { | 63 | class Q_EXPORT QTextCodec { |
64 | public: | 64 | public: |
65 | virtual ~QTextCodec(); | 65 | virtual ~QTextCodec(); |
66 | 66 | ||
67 | #ifndef QT_NO_CODECS | 67 | #ifndef QT_NO_CODECS |
68 | static QTextCodec* loadCharmap(QIODevice*); | 68 | static QTextCodec* loadCharmap(QIODevice*); |
69 | static QTextCodec* loadCharmapFile(QString filename); | 69 | static QTextCodec* loadCharmapFile(QString filename); |
70 | #endif //QT_NO_CODECS | 70 | #endif //QT_NO_CODECS |
71 | static QTextCodec* codecForMib(int mib); | 71 | static QTextCodec* codecForMib(int mib); |
72 | static QTextCodec* codecForName(const char* hint, int accuracy=0); | 72 | static QTextCodec* codecForName(const char* hint, int accuracy=0); |
73 | static QTextCodec* codecForContent(const char* chars, int len); | 73 | static QTextCodec* codecForContent(const char* chars, int len); |
74 | static QTextCodec* codecForIndex(int i); | 74 | static QTextCodec* codecForIndex(int i); |
75 | static QTextCodec* codecForLocale(); | 75 | static QTextCodec* codecForLocale(); |
76 | static void setCodecForLocale(QTextCodec *c); | 76 | static void setCodecForLocale(QTextCodec *c); |
77 | 77 | ||
78 | static QTextCodec* codecForTr(); | ||
79 | static void setCodecForTr(QTextCodec *c); | ||
80 | static QTextCodec* codecForCStrings(); | ||
81 | static void setCodecForCStrings(QTextCodec *c); | ||
82 | |||
78 | static void deleteAllCodecs(); | 83 | static void deleteAllCodecs(); |
79 | 84 | ||
80 | static const char* locale(); | 85 | static const char* locale(); |
81 | 86 | ||
82 | virtual const char* name() const = 0; | 87 | virtual const char* name() const = 0; |
83 | virtual const char* mimeName() const; | 88 | virtual const char* mimeName() const; |
84 | virtual int mibEnum() const = 0; | 89 | virtual int mibEnum() const = 0; |
85 | 90 | ||
86 | virtual QTextDecoder* makeDecoder() const; | 91 | virtual QTextDecoder* makeDecoder() const; |
87 | virtual QTextEncoder* makeEncoder() const; | 92 | virtual QTextEncoder* makeEncoder() const; |
88 | 93 | ||
89 | virtual QString toUnicode(const char* chars, int len) const; | 94 | virtual QString toUnicode(const char* chars, int len) const; |
90 | virtual QCString fromUnicode(const QString& uc, int& lenInOut) const; | 95 | virtual QCString fromUnicode(const QString& uc, int& lenInOut) const; |
91 | 96 | ||
92 | QCString fromUnicode(const QString& uc) const; | 97 | QCString fromUnicode(const QString& uc) const; |
93 | QString toUnicode(const QByteArray&, int len) const; | 98 | QString toUnicode(const QByteArray&, int len) const; |
94 | QString toUnicode(const QByteArray&) const; | 99 | QString toUnicode(const QByteArray&) const; |
95 | QString toUnicode(const QCString&, int len) const; | 100 | QString toUnicode(const QCString&, int len) const; |
96 | QString toUnicode(const QCString&) const; | 101 | QString toUnicode(const QCString&) const; |
97 | QString toUnicode(const char* chars) const; | 102 | QString toUnicode(const char* chars) const; |
98 | virtual bool canEncode( QChar ) const; | 103 | virtual bool canEncode( QChar ) const; |
99 | virtual bool canEncode( const QString& ) const; | 104 | virtual bool canEncode( const QString& ) const; |
100 | 105 | ||
101 | virtual int heuristicContentMatch(const char* chars, int len) const = 0; | 106 | virtual int heuristicContentMatch(const char* chars, int len) const = 0; |
102 | virtual int heuristicNameMatch(const char* hint) const; | 107 | virtual int heuristicNameMatch(const char* hint) const; |
103 | 108 | ||
104 | virtual QByteArray fromUnicode(const QString& uc, int from, int len) const; | 109 | virtual QByteArray fromUnicode(const QString& uc, int from, int len) const; |
105 | virtual unsigned short characterFromUnicode(const QString &str, int pos) const; | 110 | virtual unsigned short characterFromUnicode(const QString &str, int pos) const; |
106 | 111 | ||
107 | protected: | 112 | protected: |
108 | QTextCodec(); | 113 | QTextCodec(); |
109 | static int simpleHeuristicNameMatch(const char* name, const char* hint); | 114 | static int simpleHeuristicNameMatch(const char* name, const char* hint); |
110 | 115 | ||
116 | private: | ||
117 | static QTextCodec *cftr; | ||
118 | static QTextCodec *cfcs; | ||
111 | friend class QFont; | 119 | friend class QFont; |
112 | }; | 120 | }; |
121 | |||
122 | inline QTextCodec* QTextCodec::codecForTr() { return cftr; } | ||
123 | inline void QTextCodec::setCodecForTr(QTextCodec *c) { cftr = c; } | ||
124 | inline QTextCodec* QTextCodec::codecForCStrings() { return cfcs; } | ||
125 | inline void QTextCodec::setCodecForCStrings(QTextCodec *c) { cfcs = c; } | ||
126 | |||
113 | #endif // QT_NO_TEXTCODEC | 127 | #endif // QT_NO_TEXTCODEC |
114 | #endif // QTEXTCODEC_H | 128 | #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 @@ | |||
44 | #include "qstring.h" | 44 | #include "qstring.h" |
45 | #endif // QT_H | 45 | #endif // QT_H |
46 | 46 | ||
47 | #ifndef QT_NO_TEXTSTREAM | 47 | #ifndef QT_NO_TEXTSTREAM |
48 | template <class T> | 48 | template <class T> |
49 | class QTextOStreamIterator | 49 | class QTextOStreamIterator |
50 | { | 50 | { |
51 | protected: | 51 | protected: |
52 | QTextOStream& stream; | 52 | QTextOStream& stream; |
53 | QString separator; | 53 | QString separator; |
54 | 54 | ||
55 | public: | 55 | public: |
56 | QTextOStreamIterator( QTextOStream& s) : stream( s ) {} | 56 | QTextOStreamIterator( QTextOStream& s) : stream( s ) {} |
57 | QTextOStreamIterator( QTextOStream& s, const QString& sep ) | 57 | QTextOStreamIterator( QTextOStream& s, const QString& sep ) |
58 | : stream( s ), separator( sep ) {} | 58 | : stream( s ), separator( sep ) {} |
59 | QTextOStreamIterator<T>& operator= ( const T& x ) { | 59 | QTextOStreamIterator<T>& operator= ( const T& x ) { |
60 | stream << x; | 60 | stream << x; |
61 | if ( !separator.isEmpty() ) | 61 | if ( !separator.isEmpty() ) |
62 | stream << separator; | 62 | stream << separator; |
63 | return *this; | 63 | return *this; |
64 | } | 64 | } |
65 | QTextOStreamIterator<T>& operator*() { return *this; } | 65 | QTextOStreamIterator<T>& operator*() { return *this; } |
66 | QTextOStreamIterator<T>& operator++() { return *this; } | 66 | QTextOStreamIterator<T>& operator++() { return *this; } |
67 | QTextOStreamIterator<T>& operator++(int) { return *this; } | 67 | QTextOStreamIterator<T>& operator++(int) { return *this; } |
68 | }; | 68 | }; |
69 | #endif //QT_NO_TEXTSTREAM | 69 | #endif //QT_NO_TEXTSTREAM |
70 | 70 | ||
71 | template <class InputIterator, class OutputIterator> | 71 | template <class InputIterator, class OutputIterator> |
72 | inline OutputIterator qCopy( InputIterator _begin, InputIterator _end, | 72 | inline OutputIterator qCopy( InputIterator _begin, InputIterator _end, |
73 | OutputIterator _dest ) | 73 | OutputIterator _dest ) |
74 | { | 74 | { |
75 | while( _begin != _end ) | 75 | while( _begin != _end ) |
76 | *_dest++ = *_begin++; | 76 | *_dest++ = *_begin++; |
77 | return _dest; | 77 | return _dest; |
78 | } | 78 | } |
79 | 79 | ||
80 | template <class BiIterator, class BiOutputIterator> | 80 | template <class BiIterator, class BiOutputIterator> |
81 | inline BiOutputIterator qCopyBackward( BiIterator _begin, BiIterator _end, | 81 | inline BiOutputIterator qCopyBackward( BiIterator _begin, BiIterator _end, |
82 | BiOutputIterator _dest ) | 82 | BiOutputIterator _dest ) |
83 | { | 83 | { |
84 | while ( _begin != _end ) | 84 | while ( _begin != _end ) |
85 | *--_dest = *--_end; | 85 | *--_dest = *--_end; |
86 | return _dest; | 86 | return _dest; |
87 | } | 87 | } |
88 | 88 | ||
89 | template <class InputIterator1, class InputIterator2> | 89 | template <class InputIterator1, class InputIterator2> |
90 | inline bool qEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 ) | 90 | inline bool qEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 ) |
91 | { | 91 | { |
92 | // ### compare using !(*first1 == *first2) in Qt 4.0 | ||
92 | for ( ; first1 != last1; ++first1, ++first2 ) | 93 | for ( ; first1 != last1; ++first1, ++first2 ) |
93 | if ( *first1 != *first2 ) | 94 | if ( *first1 != *first2 ) |
94 | return FALSE; | 95 | return FALSE; |
95 | return TRUE; | 96 | return TRUE; |
96 | } | 97 | } |
97 | 98 | ||
98 | template <class ForwardIterator, class T> | 99 | template <class ForwardIterator, class T> |
99 | inline void qFill( ForwardIterator first, ForwardIterator last, const T& val ) | 100 | inline void qFill( ForwardIterator first, ForwardIterator last, const T& val ) |
100 | { | 101 | { |
101 | for ( ; first != last; ++first ) | 102 | for ( ; first != last; ++first ) |
102 | *first = val; | 103 | *first = val; |
103 | } | 104 | } |
104 | 105 | ||
105 | #if 0 | 106 | #if 0 |
106 | template <class BiIterator, class OutputIterator> | 107 | template <class BiIterator, class OutputIterator> |
107 | inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end, | 108 | inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end, |
108 | OutputIterator _dest ) | 109 | OutputIterator _dest ) |
109 | { | 110 | { |
110 | while ( _begin != _end ) { | 111 | while ( _begin != _end ) { |
111 | --_end; | 112 | --_end; |
112 | *_dest = *_end; | 113 | *_dest = *_end; |
113 | ++_dest; | 114 | ++_dest; |
114 | } | 115 | } |
115 | return _dest; | 116 | return _dest; |
116 | } | 117 | } |
117 | #endif | 118 | #endif |
118 | 119 | ||
119 | 120 | ||
120 | template <class InputIterator, class T> | 121 | template <class InputIterator, class T> |
121 | inline InputIterator qFind( InputIterator first, InputIterator last, | 122 | inline InputIterator qFind( InputIterator first, InputIterator last, |
122 | const T& val ) | 123 | const T& val ) |
123 | { | 124 | { |
124 | while ( first != last && *first != val ) | 125 | while ( first != last && *first != val ) |
125 | ++first; | 126 | ++first; |
126 | return first; | 127 | return first; |
127 | } | 128 | } |
128 | 129 | ||
129 | template <class InputIterator, class T, class Size> | 130 | template <class InputIterator, class T, class Size> |
130 | inline void qCount( InputIterator first, InputIterator last, const T& value, | 131 | inline void qCount( InputIterator first, InputIterator last, const T& value, |
131 | Size& n ) | 132 | Size& n ) |
132 | { | 133 | { |
133 | for ( ; first != last; ++first ) | 134 | for ( ; first != last; ++first ) |
134 | if ( *first == value ) | 135 | if ( *first == value ) |
135 | ++n; | 136 | ++n; |
136 | } | 137 | } |
137 | 138 | ||
138 | template <class T> | 139 | template <class T> |
139 | inline void qSwap( T& _value1, T& _value2 ) | 140 | 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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QUuid class | 4 | ** Definition of QUuid class |
5 | ** | 5 | ** |
6 | ** Created: 010523 | 6 | ** Created : 010523 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2001 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QUUID_H | 38 | #ifndef QUUID_H |
39 | #define QUUID_H | 39 | #define QUUID_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include <qstring.h> | 42 | #include <qstring.h> |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | #include <string.h> | 45 | #include <string.h> |
46 | 46 | ||
47 | #if defined(Q_OS_WIN32) | 47 | #if defined(Q_OS_WIN32) |
48 | #ifndef GUID_DEFINED | 48 | #ifndef GUID_DEFINED |
49 | #define GUID_DEFINED | 49 | #define GUID_DEFINED |
50 | typedef struct _GUID | 50 | typedef struct _GUID |
51 | { | 51 | { |
52 | ulong Data1; | 52 | ulong Data1; |
53 | ushort Data2; | 53 | ushort Data2; |
54 | ushort Data3; | 54 | ushort Data3; |
55 | uchar Data4[ 8 ]; | 55 | uchar Data4[ 8 ]; |
56 | } GUID; | 56 | } GUID, *REFGUID, *LPGUID; |
57 | #endif | 57 | #endif |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | struct Q_EXPORT QUuid | 60 | struct Q_EXPORT QUuid |
61 | { | 61 | { |
62 | QUuid() | 62 | QUuid() |
63 | { | 63 | { |
64 | memset( this, 0, sizeof(QUuid) ); | 64 | memset( this, 0, sizeof(QUuid) ); |
65 | } | 65 | } |
66 | QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) | 66 | QUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) |
67 | { | 67 | { |
68 | data1 = l; | 68 | data1 = l; |
69 | data2 = w1; | 69 | data2 = w1; |
70 | data3 = w2; | 70 | data3 = w2; |
71 | data4[0] = b1; | 71 | data4[0] = b1; |
72 | data4[1] = b2; | 72 | data4[1] = b2; |
73 | data4[2] = b3; | 73 | data4[2] = b3; |
74 | data4[3] = b4; | 74 | data4[3] = b4; |
75 | data4[4] = b5; | 75 | data4[4] = b5; |
76 | data4[5] = b6; | 76 | data4[5] = b6; |
77 | data4[6] = b7; | 77 | data4[6] = b7; |
78 | data4[7] = b8; | 78 | data4[7] = b8; |
79 | } | 79 | } |
80 | QUuid( const QUuid &uuid ) | 80 | QUuid( const QUuid &uuid ) |
81 | { | 81 | { |
82 | memcpy( this, &uuid, sizeof(QUuid) ); | 82 | memcpy( this, &uuid, sizeof(QUuid) ); |
83 | } | 83 | } |
84 | #ifndef QT_NO_QUUID_STRING | 84 | #ifndef QT_NO_QUUID_STRING |
85 | QUuid( const QString & ); | 85 | QUuid( const QString & ); |
86 | QUuid( const char * ); | 86 | QUuid( const char * ); |
87 | QString toString() const; | 87 | QString toString() const; |
88 | operator QString() const { return toString(); } | 88 | operator QString() const { return toString(); } |
89 | #endif | 89 | #endif |
90 | bool isNull() const; | 90 | bool isNull() const; |
91 | 91 | ||
92 | QUuid &operator=(const QUuid &orig ) | 92 | QUuid &operator=(const QUuid &orig ) |
93 | { | 93 | { |
94 | memcpy( this, &orig, sizeof(QUuid) ); | 94 | memcpy( this, &orig, sizeof(QUuid) ); |
95 | return *this; | 95 | return *this; |
96 | } | 96 | } |
97 | 97 | ||
98 | bool operator==(const QUuid &orig ) const | 98 | bool operator==(const QUuid &orig ) const |
99 | { | 99 | { |
100 | uint i; | 100 | uint i; |
101 | if ( data1 != orig.data1 || data2 != orig.data2 || | 101 | if ( data1 != orig.data1 || data2 != orig.data2 || |
102 | data3 != orig.data3 ) | 102 | data3 != orig.data3 ) |
103 | return FALSE; | 103 | return FALSE; |
104 | 104 | ||
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>& | |||
617 | QValueList<T> l2( *this ); | 617 | QValueList<T> l2( *this ); |
618 | for( const_iterator it = l.begin(); it != l.end(); ++it ) | 618 | for( const_iterator it = l.begin(); it != l.end(); ++it ) |
619 | l2.append( *it ); | 619 | l2.append( *it ); |
620 | return l2; | 620 | return l2; |
621 | } | 621 | } |
622 | 622 | ||
623 | template <class T> | 623 | template <class T> |
624 | Q_INLINE_TEMPLATES QValueList<T>& QValueList<T>::operator+= ( const QValueList<T>& l ) | 624 | Q_INLINE_TEMPLATES QValueList<T>& QValueList<T>::operator+= ( const QValueList<T>& l ) |
625 | { | 625 | { |
626 | for( const_iterator it = l.begin(); it != l.end(); ++it ) | 626 | for( const_iterator it = l.begin(); it != l.end(); ++it ) |
627 | append( *it ); | 627 | append( *it ); |
628 | return *this; | 628 | return *this; |
629 | } | 629 | } |
630 | 630 | ||
631 | template <class T> | 631 | template <class T> |
632 | Q_INLINE_TEMPLATES void QValueList<T>::detachInternal() | 632 | Q_INLINE_TEMPLATES void QValueList<T>::detachInternal() |
633 | { | 633 | { |
634 | sh->deref(); sh = new QValueListPrivate<T>( *sh ); | 634 | sh->deref(); sh = new QValueListPrivate<T>( *sh ); |
635 | } | 635 | } |
636 | 636 | ||
637 | #ifndef QT_NO_DATASTREAM | 637 | #ifndef QT_NO_DATASTREAM |
638 | template <class T> | 638 | template <class T> |
639 | Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QValueList<T>& l ) | 639 | Q_INLINE_TEMPLATES QDataStream& operator>>( QDataStream& s, QValueList<T>& l ) |
640 | { | 640 | { |
641 | l.clear(); | 641 | l.clear(); |
642 | Q_UINT32 c; | 642 | Q_UINT32 c; |
643 | s >> c; | 643 | s >> c; |
644 | for( Q_UINT32 i = 0; i < c; ++i ) | 644 | for( Q_UINT32 i = 0; i < c; ++i ) |
645 | { | 645 | { |
646 | T t; | 646 | T t; |
647 | s >> t; | 647 | s >> t; |
648 | l.append( t ); | 648 | l.append( t ); |
649 | if ( s.atEnd() ) | 649 | if ( s.atEnd() ) |
650 | break; | 650 | break; |
651 | } | 651 | } |
652 | return s; | 652 | return s; |
653 | } | 653 | } |
654 | 654 | ||
655 | template <class T> | 655 | template <class T> |
656 | Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QValueList<T>& l ) | 656 | Q_INLINE_TEMPLATES QDataStream& operator<<( QDataStream& s, const QValueList<T>& l ) |
657 | { | 657 | { |
658 | s << (Q_UINT32)l.size(); | 658 | s << (Q_UINT32)l.size(); |
659 | QValueListConstIterator<T> it = l.begin(); | 659 | QValueListConstIterator<T> it = l.begin(); |
660 | for( ; it != l.end(); ++it ) | 660 | for( ; it != l.end(); ++it ) |
661 | s << *it; | 661 | s << *it; |
662 | return s; | 662 | return s; |
663 | } | 663 | } |
664 | #endif // QT_NO_DATASTREAM | 664 | #endif // QT_NO_DATASTREAM |
665 | #ifdef QT_QWINEXPORT | ||
666 | #define Q_DEFINED_QVALUELIST | ||
667 | #include "qwinexport.h" | ||
668 | #endif /* QT_QWINEXPORT */ | ||
665 | #endif // QVALUELIST_H | 669 | #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 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QValueStack class | 4 | ** Definition of QValueStack class |
5 | ** | 5 | ** |
6 | ** Created : 990925 | 6 | ** Created : 990925 |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 8 | ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. |
9 | ** | 9 | ** |
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | 10 | ** This file is part of the tools module of the Qt GUI Toolkit. |
11 | ** | 11 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 12 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 13 | ** as defined by Trolltech AS of Norway and appearing in the file |
14 | ** LICENSE.QPL included in the packaging of this file. | 14 | ** LICENSE.QPL included in the packaging of this file. |
15 | ** | 15 | ** |
16 | ** This file may be distributed and/or modified under the terms of the | 16 | ** This file may be distributed and/or modified under the terms of the |
17 | ** GNU General Public License version 2 as published by the Free Software | 17 | ** GNU General Public License version 2 as published by the Free Software |
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | 18 | ** Foundation and appearing in the file LICENSE.GPL included in the |
19 | ** packaging of this file. | 19 | ** packaging of this file. |
20 | ** | 20 | ** |
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition |
22 | ** licenses may use this file in accordance with the Qt Commercial License | 22 | ** licenses may use this file in accordance with the Qt Commercial License |
23 | ** Agreement provided with the Software. | 23 | ** Agreement provided with the Software. |
24 | ** | 24 | ** |
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
27 | ** | 27 | ** |
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for |
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QVALUESTACK_H | 38 | #ifndef QVALUESTACK_H |
39 | #define QVALUESTACK_H | 39 | #define QVALUESTACK_H |
40 | 40 | ||
41 | #ifndef QT_H | 41 | #ifndef QT_H |
42 | #include "qvaluelist.h" | 42 | #include "qvaluelist.h" |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | 45 | ||
46 | template<class T> | 46 | template<class T> |
47 | class QValueStack : public QValueList<T> | 47 | class QValueStack : public QValueList<T> |
48 | { | 48 | { |
49 | public: | 49 | public: |
50 | QValueStack() {} | 50 | QValueStack() {} |
51 | ~QValueStack() {} | 51 | ~QValueStack() {} |
52 | void push( const T& d ) { append(d); } | 52 | void push( const T& d ) { append(d); } |
53 | T pop() | 53 | T pop() |
54 | { | 54 | { |
55 | T elem( this->last() ); | 55 | T elem( this->last() ); |
56 | if ( !this->isEmpty() ) | 56 | if ( !this->isEmpty() ) |
57 | remove( this->fromLast() ); | 57 | this->remove( this->fromLast() ); |
58 | return elem; | 58 | return elem; |
59 | } | 59 | } |
60 | T& top() { return this->last(); } | 60 | T& top() { return this->last(); } |
61 | const T& top() const { return this->last(); } | 61 | const T& top() const { return this->last(); } |
62 | }; | 62 | }; |
63 | 63 | ||
64 | #endif | 64 | #endif |