From 6f57abfc9cd3acf1d648aee696947ac9216adb71 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 9 Sep 2024 14:57:42 +0900 Subject: Rename remaining ntq[s-z]* related files to equivalent tq* Signed-off-by: Michele Calgaro --- src/tools/ntqshared.h | 57 ------ src/tools/ntqtl.h | 325 ------------------------------ src/tools/ntquuid.h | 194 ------------------ src/tools/ntqwinexport.h | 224 --------------------- src/tools/qcom_p.h | 2 +- src/tools/qt_tools.pri | 8 +- src/tools/qucom.cpp | 2 +- src/tools/qucom_p.h | 2 +- src/tools/quuid.cpp | 434 ----------------------------------------- src/tools/qwinexport.cpp | 29 --- src/tools/tqasciidict.h | 2 +- src/tools/tqcstring.h | 2 +- src/tools/tqdict.h | 2 +- src/tools/tqfeatures.txt | 4 +- src/tools/tqgarray.cpp | 2 +- src/tools/tqgarray.h | 2 +- src/tools/tqgpluginmanager_p.h | 2 +- src/tools/tqintdict.h | 2 +- src/tools/tqlibrary.h | 2 +- src/tools/tqlibrary_p.h | 2 +- src/tools/tqmap.h | 4 +- src/tools/tqmemarray.h | 2 +- src/tools/tqptrlist.h | 2 +- src/tools/tqptrvector.h | 2 +- src/tools/tqregexp.cpp | 2 +- src/tools/tqshared.h | 57 ++++++ src/tools/tqstring.h | 2 +- src/tools/tqstringlist.cpp | 6 +- src/tools/tqthreadinstance_p.h | 2 +- src/tools/tqtl.h | 325 ++++++++++++++++++++++++++++++ src/tools/tquuid.cpp | 434 +++++++++++++++++++++++++++++++++++++++++ src/tools/tquuid.h | 194 ++++++++++++++++++ src/tools/tqvaluelist.h | 6 +- src/tools/tqvaluevector.h | 6 +- src/tools/tqwinexport.cpp | 29 +++ src/tools/tqwinexport.h | 224 +++++++++++++++++++++ 36 files changed, 1298 insertions(+), 1298 deletions(-) delete mode 100644 src/tools/ntqshared.h delete mode 100644 src/tools/ntqtl.h delete mode 100644 src/tools/ntquuid.h delete mode 100644 src/tools/ntqwinexport.h delete mode 100644 src/tools/quuid.cpp delete mode 100644 src/tools/qwinexport.cpp create mode 100644 src/tools/tqshared.h create mode 100644 src/tools/tqtl.h create mode 100644 src/tools/tquuid.cpp create mode 100644 src/tools/tquuid.h create mode 100644 src/tools/tqwinexport.cpp create mode 100644 src/tools/tqwinexport.h (limited to 'src/tools') diff --git a/src/tools/ntqshared.h b/src/tools/ntqshared.h deleted file mode 100644 index 62dcc8e35..000000000 --- a/src/tools/ntqshared.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Definition of TQShared struct -** -** Created : 940112 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQSHARED_H -#define TQSHARED_H - -#ifndef QT_H -#include "tqglobal.h" -#endif // QT_H - -struct TQ_EXPORT TQShared -{ - TQShared() : count( 1 ) { } - void ref() { count++; } - bool deref() { return !--count; } - uint count; -}; - - -#endif // TQSHARED_H diff --git a/src/tools/ntqtl.h b/src/tools/ntqtl.h deleted file mode 100644 index df5a7cdb6..000000000 --- a/src/tools/ntqtl.h +++ /dev/null @@ -1,325 +0,0 @@ -/**************************************************************************** -** -** Definition of TQt template library classes -** -** Created : 990128 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQTL_H -#define TQTL_H - -#ifndef QT_H -#include "tqglobal.h" -#include "tqtextstream.h" -#include "tqstring.h" -#endif // QT_H - -#ifndef TQT_NO_TEXTSTREAM -template -class TQTextOStreamIterator -{ -protected: - TQTextOStream& stream; - TQString separator; - -public: - TQTextOStreamIterator( TQTextOStream& s) : stream( s ) {} - TQTextOStreamIterator( TQTextOStream& s, const TQString& sep ) - : stream( s ), separator( sep ) {} - TQTextOStreamIterator& operator= ( const T& x ) { - stream << x; - if ( !separator.isEmpty() ) - stream << separator; - return *this; - } - TQTextOStreamIterator& operator*() { return *this; } - TQTextOStreamIterator& operator++() { return *this; } - TQTextOStreamIterator& operator++(int) { return *this; } -}; -#endif //TQT_NO_TEXTSTREAM - -template -inline OutputIterator tqCopy( InputIterator _begin, InputIterator _end, - OutputIterator _dest ) -{ - while( _begin != _end ) - *_dest++ = *_begin++; - return _dest; -} - -template -inline BiOutputIterator tqCopyBackward( BiIterator _begin, BiIterator _end, - BiOutputIterator _dest ) -{ - while ( _begin != _end ) - *--_dest = *--_end; - return _dest; -} - -template -inline bool tqEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 ) -{ - // ### compare using !(*first1 == *first2) in TQt 4.0 - for ( ; first1 != last1; ++first1, ++first2 ) - if ( *first1 != *first2 ) - return FALSE; - return TRUE; -} - -template -inline void tqFill( ForwardIterator first, ForwardIterator last, const T& val ) -{ - for ( ; first != last; ++first ) - *first = val; -} - -#if 0 -template -inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end, - OutputIterator _dest ) -{ - while ( _begin != _end ) { - --_end; - *_dest = *_end; - ++_dest; - } - return _dest; -} -#endif - - -template -inline InputIterator tqFind( InputIterator first, InputIterator last, - const T& val ) -{ - while ( first != last && *first != val ) - ++first; - return first; -} - -template -inline void tqCount( InputIterator first, InputIterator last, const T& value, - Size& n ) -{ - for ( ; first != last; ++first ) - if ( *first == value ) - ++n; -} - -template -inline void tqSwap( T& _value1, T& _value2 ) -{ - T tmp = _value1; - _value1 = _value2; - _value2 = tmp; -} - - -template -TQ_INLINE_TEMPLATES void qBubbleSort( InputIterator b, InputIterator e ) -{ - // Goto last element; - InputIterator last = e; - --last; - // only one element or no elements ? - if ( last == b ) - return; - - // So we have at least two elements in here - while( b != last ) { - bool swapped = FALSE; - InputIterator swap_pos = b; - InputIterator x = e; - InputIterator y = x; - y--; - do { - --x; - --y; - if ( *x < *y ) { - swapped = TRUE; - tqSwap( *x, *y ); - swap_pos = y; - } - } while( y != b ); - if ( !swapped ) - return; - b = swap_pos; - b++; - } -} - - -template -inline void qBubbleSort( Container &c ) -{ - qBubbleSort( c.begin(), c.end() ); -} - - -template -TQ_INLINE_TEMPLATES void qHeapSortPushDown( Value* heap, int first, int last ) -{ - int r = first; - while ( r <= last / 2 ) { - if ( last == 2 * r ) { - // node r has only one child - if ( heap[2 * r] < heap[r] ) - tqSwap( heap[r], heap[2 * r] ); - r = last; - } else { - // node r has two children - if ( heap[2 * r] < heap[r] && !(heap[2 * r + 1] < heap[2 * r]) ) { - // swap with left child - tqSwap( heap[r], heap[2 * r] ); - r *= 2; - } else if ( heap[2 * r + 1] < heap[r] - && heap[2 * r + 1] < heap[2 * r] ) { - // swap with right child - tqSwap( heap[r], heap[2 * r + 1] ); - r = 2 * r + 1; - } else { - r = last; - } - } - } -} - - -template -TQ_INLINE_TEMPLATES void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n ) -{ - // Create the heap - InputIterator insert = b; - Value* realheap = new Value[n]; - // Wow, what a fake. But I want the heap to be indexed as 1...n - Value* heap = realheap - 1; - int size = 0; - for( ; insert != e; ++insert ) { - heap[++size] = *insert; - int i = size; - while( i > 1 && heap[i] < heap[i / 2] ) { - tqSwap( heap[i], heap[i / 2] ); - i /= 2; - } - } - - // Now do the sorting - for( uint i = n; i > 0; i-- ) { - *b++ = heap[1]; - if ( i > 1 ) { - heap[1] = heap[i]; - qHeapSortPushDown( heap, 1, (int)i - 1 ); - } - } - - delete[] realheap; -} - - -template -TQ_INLINE_TEMPLATES void qHeapSort( InputIterator b, InputIterator e ) -{ - // Empty ? - if ( b == e ) - return; - - // How many entries have to be sorted ? - InputIterator it = b; - uint n = 0; - while ( it != e ) { - ++n; - ++it; - } - - // The second last parameter is a hack to retrieve the value type - // Do the real sorting here - qHeapSortHelper( b, e, *b, n ); -} - - -template -TQ_INLINE_TEMPLATES void qHeapSort( Container &c ) -{ - if ( c.begin() == c.end() ) - return; - - // The second last parameter is a hack to retrieve the value type - // Do the real sorting here - qHeapSortHelper( c.begin(), c.end(), *(c.begin()), (uint)c.count() ); -} - -template -class TQBackInsertIterator -{ -public: - Q_EXPLICIT TQBackInsertIterator( Container &c ) - : container( &c ) - { - } - - TQBackInsertIterator& - operator=( const TQ_TYPENAME Container::value_type &value ) - { - container->push_back( value ); - return *this; - } - - TQBackInsertIterator& operator*() - { - return *this; - } - - TQBackInsertIterator& operator++() - { - return *this; - } - - TQBackInsertIterator& operator++(int) - { - return *this; - } - -protected: - Container *container; -}; - -template -inline TQBackInsertIterator qBackInserter( Container &c ) -{ - return TQBackInsertIterator( c ); -} - -#endif diff --git a/src/tools/ntquuid.h b/src/tools/ntquuid.h deleted file mode 100644 index 69092a5d7..000000000 --- a/src/tools/ntquuid.h +++ /dev/null @@ -1,194 +0,0 @@ -/**************************************************************************** -** -** Definition of TQUuid class -** -** Created : 010523 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQUUID_H -#define TQUUID_H - -#ifndef QT_H -#include "tqstring.h" -#endif // QT_H - -#include - -#if defined(Q_OS_WIN32) -#ifndef GUID_DEFINED -#define GUID_DEFINED -typedef struct _GUID -{ - ulong Data1; - ushort Data2; - ushort Data3; - uchar Data4[ 8 ]; -} GUID, *REFGUID, *LPGUID; -#endif -#endif - - -struct TQ_EXPORT TQUuid -{ - enum Variant { - VarUnknown =-1, - NCS = 0, // 0 - - - DCE = 2, // 1 0 - - Microsoft = 6, // 1 1 0 - Reserved = 7 // 1 1 1 - }; - - enum Version { - VerUnknown =-1, - Time = 1, // 0 0 0 1 - EmbeddedPOSIX = 2, // 0 0 1 0 - Name = 3, // 0 0 1 1 - Random = 4 // 0 1 0 0 - }; - - TQUuid() - { - memset( this, 0, sizeof(TQUuid) ); - } - TQUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) - { - data1 = l; - data2 = w1; - data3 = w2; - data4[0] = b1; - data4[1] = b2; - data4[2] = b3; - data4[3] = b4; - data4[4] = b5; - data4[5] = b6; - data4[6] = b7; - data4[7] = b8; - } - TQUuid( const TQUuid &uuid ) - { - memcpy( this, &uuid, sizeof(TQUuid) ); - } -#ifndef TQT_NO_QUUID_STRING - TQUuid( const TQString & ); - TQUuid( const char * ); - TQString toString() const; - operator TQString() const { return toString(); } -#endif - bool isNull() const; - - TQUuid &operator=(const TQUuid &orig ) - { - memcpy( this, &orig, sizeof(TQUuid) ); - return *this; - } - - bool operator==(const TQUuid &orig ) const - { - uint i; - if ( data1 != orig.data1 || data2 != orig.data2 || - data3 != orig.data3 ) - return FALSE; - - for( i = 0; i < 8; i++ ) - if ( data4[i] != orig.data4[i] ) - return FALSE; - - return TRUE; - } - - bool operator!=(const TQUuid &orig ) const - { - return !( *this == orig ); - } - - bool operator<(const TQUuid &other ) const; - bool operator>(const TQUuid &other ) const; - -#if defined(Q_OS_WIN32) - // On Windows we have a type GUID that is used by the platform API, so we - // provide convenience operators to cast from and to this type. - TQUuid( const GUID &guid ) - { - memcpy( this, &guid, sizeof(GUID) ); - } - - TQUuid &operator=(const GUID &orig ) - { - memcpy( this, &orig, sizeof(TQUuid) ); - return *this; - } - - operator GUID() const - { - GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } }; - return guid; - } - - bool operator==( const GUID &guid ) const - { - uint i; - if ( data1 != guid.Data1 || data2 != guid.Data2 || - data3 != guid.Data3 ) - return FALSE; - - for( i = 0; i < 8; i++ ) - if ( data4[i] != guid.Data4[i] ) - return FALSE; - - return TRUE; - } - - bool operator!=( const GUID &guid ) const - { - return !( *this == guid ); - } -#endif - static TQUuid createUuid(); - TQUuid::Variant variant() const; - TQUuid::Version version() const; - - uint data1; - ushort data2; - ushort data3; - uchar data4[ 8 ]; -}; - -#ifndef TQT_NO_DATASTREAM -TQ_EXPORT TQDataStream &operator<<( TQDataStream &, const TQUuid & ); -TQ_EXPORT TQDataStream &operator>>( TQDataStream &, TQUuid & ); -#endif - -#endif //TQUUID_H diff --git a/src/tools/ntqwinexport.h b/src/tools/ntqwinexport.h deleted file mode 100644 index 2f4c41f13..000000000 --- a/src/tools/ntqwinexport.h +++ /dev/null @@ -1,224 +0,0 @@ -/**************************************************************************** -** -** Global type declarations and definitions -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#if defined(Q_TEMPLATEDLL) && ( !defined(Q_CC_BOR) || !defined(QT_MAKEDLL) || defined(Q_EXPORT_TEMPLATES) ) -// MOC_SKIP_BEGIN - -#if defined(Q_DEFINED_QASCIIDICT) && defined(Q_DEFINED_QCONNECTION_LIST) && !defined(Q_EXPORTED_QASCIIDICT_TEMPLATES) -#define Q_EXPORTED_QASCIIDICT_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQAsciiDictIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQAsciiDict; -#endif - -#if defined(Q_DEFINED_QSTYLESHEET) && defined(Q_DEFINED_QDICT) && !defined(Q_EXPORTED_QSTYLESHEET_TEMPLATES) -#define Q_EXPORTED_QSTYLESHEET_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict; -#endif - -#if defined(Q_DEFINED_QLIBRARY) && defined(Q_DEFINED_QDICT) && !defined(Q_EXPORTED_QDICTLIBRARY_TEMPLATES) -#define Q_EXPORTED_QDICTLIBRARY_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict; // for TQtopia -#endif - -#if defined(Q_DEFINED_QGUARDEDPTR) && defined(Q_DEFINED_QOBJECT) && !defined(Q_EXPORTED_QGUARDEDPTROBJECT_TEMPLATES) -#define Q_EXPORTED_QGUARDEDPTROBJECT_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQGuardedPtr; -#endif - -// needed for TQtopia -#if defined(Q_DEFINED_QGUARDEDPTR) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED_QGUARDEDPTRTQWIDGET_TEMPLATES) -#define Q_EXPORTED_QGUARDEDPTRTQWIDGET_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQGuardedPtr; -#endif - -#if defined(Q_DEFINED_QGUARDEDPTR) && defined(Q_DEFINED_QACCESSIBLE_OBJECT) && !defined(Q_EXPORTED_QACCESSIBLEOBJECT_TEMPLATES) -#define Q_EXPORTED_QACCESSIBLEOBJECT_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQGuardedPtr; -#endif - -#if defined(Q_DEFINED_QINTDICT) && !defined(Q_EXPORTED_QINTDICT_TEMPLATES) -#define Q_EXPORTED_QINTDICT_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQIntDict; -#endif - -#if defined(Q_DEFINED_QINTDICT) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED__TEMPLATES) -#define Q_EXPORTED__TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQIntDictIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQIntDict; -#endif - -#if defined(Q_DEFINED_QMAP) && !defined(Q_EXPORTED_QMAPBASIC_TEMPLATES) -#define Q_EXPORTED_QMAPBASIC_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia -#endif - -#if defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QMAPTQSTRING_TEMPLATES) -#define Q_EXPORTED_QMAPTQSTRING_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia -#endif - -#if defined(Q_DEFINED_QMEMARRAY) && !defined(Q_EXPORTED_QMEMARRAY_BASIC_TEMPLATES) -#define Q_EXPORTED_QMEMARRAY_BASIC_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; -#endif - -#if defined(Q_DEFINED_QMEMARRAY) && defined(Q_DEFINED_QPOINT) && !defined(Q_EXPORTED_QMEMARAYPOINT_TEMPLATES) -#define Q_EXPORTED_QMEMARAYPOINT_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; -#endif - -#if defined(Q_DEFINED_QPTRLIST) && !defined(Q_EXPORTED_QPTRLIST_BASIC_TEMPLATES) -#define Q_EXPORTED_QPTRLIST_BASIC_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; -#endif - -#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED_QPTRLISTWIDGET_TEMPLATES) -#define Q_EXPORTED_QPTRLISTWIDGET_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; -#endif - -#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QCONNECTION) && !defined(Q_EXPORTED_QPTRLISTCONNECTION_TEMPLATES) -#define Q_EXPORTED_QPTRLISTCONNECTION_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; -#endif - -#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QOBJECT) && !defined(Q_EXPORTED_QPTRLISTOBJECT_TEMPLATES) -#define Q_EXPORTED_QPTRLISTOBJECT_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; -#endif - -#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QDOCKWINDOW) && !defined(Q_EXPORTED_QPTRLISTDOCWINDOW_TEMPLATES) -#define Q_EXPORTED_QPTRLISTDOCWINDOW_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; -#endif - -#if defined(Q_DEFINED_QPTRVECTOR) && !defined(Q_EXPORTED_QPTRVECTOR_BASIC_TEMPLATES) -#define Q_EXPORTED_QPTRVECTOR_BASIC_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; -#endif - -#if defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QSTYLESHEET) && !defined(Q_EXPORTED_QPTRVECTORSTYLESHEETITEM_TEMPLATES) -#define Q_EXPORTED_QPTRVECTORSTYLESHEETITEM_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; -#endif - -#if defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED_QPTRVECTORWIDGET_TEMPLATES) -#define Q_EXPORTED_QPTRVECTORWIDGET_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; -#endif - -#if defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QCONNECTION_LIST) && !defined(Q_EXPORTED_QPTRVECTORCONNECTTIONLIST_TEMPLATES) -#define Q_EXPORTED_QPTRVECTORCONNECTTIONLIST_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; -#endif - -#if defined(Q_DEFINED_QVALUELIST) && !defined(Q_EXPORTED_QVALUELIST_BASIC_TEMPLATES) -#define Q_EXPORTED_QVALUELIST_BASIC_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; -#endif - -#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QRECT) && !defined(Q_EXPORTED_QVALUELISTRECT_TEMPLATES) -#define Q_EXPORTED_QVALUELISTRECT_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; -#endif - -#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QVALUELISTSTRING_TEMPLATES) -#define Q_EXPORTED_QVALUELISTSTRING_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; -#endif - -// TQStylesheet template exports -#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QSTYLESHEET) && !defined(Q_EXPORTED_QSTYLESHEETITEM1_TEMPLATES) -#define Q_EXPORTED_QSTYLESHEETITEM1_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList< TQPtrVector< TQStyleSheetItem> >; -#endif - -#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QSTYLESHEET) && !defined(Q_EXPORTED_QSTYLESHEETITEM2_TEMPLATES) -#define Q_EXPORTED_QSTYLESHEETITEM2_TEMPLATES -Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; -#endif - -// tqcanvas template exports -#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QCANVAS) && !defined(Q_EXPORTED_QCANVAS1_TEMPLATES) -#define Q_EXPORTED_QCANVAS1_TEMPLATES -TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrListIterator< TQCanvasItem >; -TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrList< TQCanvasItem >; -TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrListIterator< TQCanvasView >; -TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrList< TQCanvasView >; -#endif - -// tqtable template exports -#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QTABLE_SELECTION) && !defined(Q_EXPORTED_QTABLESELECTION_TEMPLATES) -#define Q_EXPORTED_QTABLESELECTION_TEMPLATES -TQM_TEMPLATE_EXTERN_TABLE template class TQM_EXPORT_TABLE TQPtrList; -#endif - -#if defined(Q_DEFINED_QTABLE_ITEM) && defined(Q_DEFINED_QPTRVECTOR) && !defined(Q_EXPORTED_QTABLEITEM_TEMPLATES) -#define Q_EXPORTED_QTABLEITEM_TEMPLATES -TQM_TEMPLATE_EXTERN_TABLE template class TQM_EXPORT_TABLE TQPtrVector; -#endif - -#if defined(Q_DEFINED_QTABLE) && defined(Q_DEFINED_QPTRVECTOR) -//Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; -#endif - -// tqsqlextension template exports -#if defined(Q_DEFINED_QSQLEXTENSION) && defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QVALUEVECTOR) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QSQLEXTENSION_TEMPLATES) -#define Q_EXPORTED_QSQLEXTENSION_TEMPLATES -TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQMap; -TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQValueVector; -#endif - - -// MOC_SKIP_END -#endif // template defined diff --git a/src/tools/qcom_p.h b/src/tools/qcom_p.h index 623c920dc..0c9d60d01 100644 --- a/src/tools/qcom_p.h +++ b/src/tools/qcom_p.h @@ -53,7 +53,7 @@ #ifndef QT_H #include "tqstringlist.h" -#include "ntquuid.h" +#include "tquuid.h" #endif // QT_H #if __GNUC__ - 0 > 3 diff --git a/src/tools/qt_tools.pri b/src/tools/qt_tools.pri index 03bf94e37..c8eacaee8 100644 --- a/src/tools/qt_tools.pri +++ b/src/tools/qt_tools.pri @@ -48,7 +48,7 @@ tools { $$TOOLS_H/tqsemaphore.h \ $$TOOLS_H/tqsettings.h \ $$TOOLS_P/tqsettings_p.h \ - $$TOOLS_H/ntqshared.h \ + $$TOOLS_H/tqshared.h \ $$TOOLS_H/tqptrstack.h \ $$TOOLS_H/tqstring.h \ $$TOOLS_H/tqstringlist.h \ @@ -65,7 +65,7 @@ tools { $$TOOLS_H/tqwaitcondition.h \ $$TOOLS_P/qcom_p.h \ $$TOOLS_P/qucom_p.h \ - $$TOOLS_H/ntquuid.h + $$TOOLS_H/tquuid.h win32:SOURCES += $$TOOLS_CPP/tqdir_win.cpp \ $$TOOLS_CPP/tqfile_win.cpp \ @@ -77,7 +77,7 @@ tools { $$TOOLS_CPP/tqthreadstorage_win.cpp \ $$TOOLS_CPP/qcriticalsection_p.cpp - win32-borland:SOURCES += $$TOOLS_CPP/qwinexport.cpp + win32-borland:SOURCES += $$TOOLS_CPP/tqwinexport.cpp wince-* { SOURCES -= $$TOOLS_CPP/tqdir_win.cpp \ @@ -137,7 +137,7 @@ tools { $$TOOLS_CPP/tqtextstream.cpp \ $$TOOLS_CPP/qunicodetables.cpp \ $$TOOLS_CPP/qucom.cpp \ - $$TOOLS_CPP/quuid.cpp + $$TOOLS_CPP/tquuid.cpp irix-cc* { CXXFLAGS_PRELINK = $$QMAKE_CXXFLAGS diff --git a/src/tools/qucom.cpp b/src/tools/qucom.cpp index 372b1358a..8444c7f3b 100644 --- a/src/tools/qucom.cpp +++ b/src/tools/qucom.cpp @@ -41,7 +41,7 @@ #include "private/qucom_p.h" #include "private/qucomextra_p.h" -#include "ntqvariant.h" +#include "tqvariant.h" #include diff --git a/src/tools/qucom_p.h b/src/tools/qucom_p.h index ce4db1f00..761d5cee4 100644 --- a/src/tools/qucom_p.h +++ b/src/tools/qucom_p.h @@ -55,7 +55,7 @@ #ifndef QT_H #include "tqstring.h" -#include "ntquuid.h" +#include "tquuid.h" #endif // QT_H #ifdef check diff --git a/src/tools/quuid.cpp b/src/tools/quuid.cpp deleted file mode 100644 index b07eadd09..000000000 --- a/src/tools/quuid.cpp +++ /dev/null @@ -1,434 +0,0 @@ -/**************************************************************************** -** -** Implementation of TQUuid class -** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the TQt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.TQPL -** included in the packaging of this file. Licensees holding valid TQt -** Commercial licenses may use this file in accordance with the TQt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "ntquuid.h" - -#include "tqdatastream.h" - -/*! - \class TQUuid ntquuid.h - \brief The TQUuid class defines a Universally Unique Identifier (UUID). - - \reentrant - - For objects or declarations that must be uniquely identified, - UUIDs (also known as GUIDs) are widely used in order to assign a - fixed and easy to compare value to the object or declaration. The - 128-bit value of a UUID is generated by an algorithm that - guarantees that the value is unique. - - In TQt, UUIDs are wrapped by the TQUuid struct which provides - convenience functions for handling UUIDs. Most platforms provide a - tool to generate new UUIDs, for example, uuidgen and guidgen. - - UUIDs generated by TQUuid, are based on the \c Random version of the - \c DCE (Distributed Computing Environment) standard. - - UUIDs can be constructed from numeric values or from strings, or - using the static createUuid() function. They can be converted to a - string with toString(). UUIDs have a variant() and a version(), - and null UUIDs return TRUE from isNull(). -*/ - -/*! - \fn TQUuid::TQUuid() - - Creates the null UUID {00000000-0000-0000-0000-000000000000}. -*/ - -/*! - \fn TQUuid::TQUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) - - Creates a UUID with the value specified by the parameters, \a l, - \a w1, \a w2, \a b1, \a b2, \a b3, \a b4, \a b5, \a b6, \a b7, \a - b8. - - Example: - \code - // {67C8770B-44F1-410A-AB9A-F9B5446F13EE} - TQUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee ) - \endcode -*/ - -/*! - \fn TQUuid::TQUuid( const TQUuid &orig ) - - Creates a copy of the TQUuid \a orig. -*/ -#ifndef TQT_NO_QUUID_STRING -/*! - Creates a TQUuid object from the string \a text. The function can - only convert a string in the format - {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH} (where 'H' stands for a hex - digit). If the conversion fails a null UUID is created. -*/ -TQUuid::TQUuid( const TQString &text ) -{ - bool ok; - if ( text.isEmpty() ) { - *this = TQUuid(); - return; - } - TQString temp = text.upper(); - if ( temp[0] != '{' ) - temp = "{" + text; - if ( text[(int)text.length()-1] != '}' ) - temp += "}"; - - data1 = temp.mid( 1, 8 ).toULong( &ok, 16 ); - if ( !ok ) { - *this = TQUuid(); - return; - } - - data2 = temp.mid( 10, 4 ).toUInt( &ok, 16 ); - if ( !ok ) { - *this = TQUuid(); - return; - } - data3 = temp.mid( 15, 4 ).toUInt( &ok, 16 ); - if ( !ok ) { - *this = TQUuid(); - return; - } - data4[0] = temp.mid( 20, 2 ).toUInt( &ok, 16 ); - if ( !ok ) { - *this = TQUuid(); - return; - } - data4[1] = temp.mid( 22, 2 ).toUInt( &ok, 16 ); - if ( !ok ) { - *this = TQUuid(); - return; - } - for ( int i = 2; i<8; i++ ) { - data4[i] = temp.mid( 25 + (i-2)*2, 2 ).toUShort( &ok, 16 ); - if ( !ok ) { - *this = TQUuid(); - return; - } - } -} - -/*! - \internal -*/ -TQUuid::TQUuid( const char *text ) -{ - *this = TQUuid( TQString(text) ); -} -#endif -/*! - \fn TQUuid TQUuid::operator=(const TQUuid &uuid ) - - Assigns the value of \a uuid to this TQUuid object. -*/ - -/*! - \fn bool TQUuid::operator==(const TQUuid &other) const - - Returns TRUE if this TQUuid and the \a other TQUuid are identical; - otherwise returns FALSE. -*/ - -/*! - \fn bool TQUuid::operator!=(const TQUuid &other) const - - Returns TRUE if this TQUuid and the \a other TQUuid are different; - otherwise returns FALSE. -*/ -#ifndef TQT_NO_QUUID_STRING -/*! - \fn TQUuid::operator TQString() const - - Returns the string representation of the uuid. - - \sa toString() -*/ - -/*! - TQString TQUuid::toString() const - - Returns the string representation of the uuid. -*/ -TQString TQUuid::toString() const -{ - TQString result; - - result = "{" + TQString::number( data1, 16 ).rightJustify( 8, '0' ) + "-"; - result += TQString::number( (int)data2, 16 ).rightJustify( 4, '0' ) + "-"; - result += TQString::number( (int)data3, 16 ).rightJustify( 4, '0' ) + "-"; - result += TQString::number( (int)data4[0], 16 ).rightJustify( 2, '0' ); - result += TQString::number( (int)data4[1], 16 ).rightJustify( 2, '0' ) + "-"; - for ( int i = 2; i < 8; i++ ) - result += TQString::number( (int)data4[i], 16 ).rightJustify( 2, '0' ); - - return result + "}"; -} -#endif - -#ifndef TQT_NO_DATASTREAM -/*! - \relates TQUuid - Writes the uuid \a id to the datastream \a s. -*/ -TQDataStream &operator<<( TQDataStream &s, const TQUuid &id ) -{ - s << (TQ_UINT32)id.data1; - s << (TQ_UINT16)id.data2; - s << (TQ_UINT16)id.data3; - for (int i = 0; i < 8; i++ ) - s << (TQ_UINT8)id.data4[i]; - return s; -} - -/*! - \relates TQUuid - Reads uuid from from the stream \a s into \a id. -*/ -TQDataStream &operator>>( TQDataStream &s, TQUuid &id ) -{ - TQ_UINT32 u32; - TQ_UINT16 u16; - TQ_UINT8 u8; - s >> u32; - id.data1 = u32; - s >> u16; - id.data2 = u16; - s >> u16; - id.data3 = u16; - for (int i = 0; i < 8; i++ ) { - s >> u8; - id.data4[i] = u8; - } - return s; -} -#endif - -/*! - Returns TRUE if this is the null UUID - {00000000-0000-0000-0000-000000000000}; otherwise returns FALSE. -*/ -bool TQUuid::isNull() const -{ - return data4[0] == 0 && data4[1] == 0 && data4[2] == 0 && data4[3] == 0 && - data4[4] == 0 && data4[5] == 0 && data4[6] == 0 && data4[7] == 0 && - data1 == 0 && data2 == 0 && data3 == 0; -} - -/*! - \enum TQUuid::Variant - - This enum defines the variant of the UUID, which is the scheme - which defines the layout of the 128-bits value. - - \value VarUnknown Variant is unknown - \value NCS Reserved for NCS (Network Computing System) backward compatibility - \value DCE Distributed Computing Environment, the scheme used by TQUuid - \value Microsoft Reserved for Microsoft backward compatibility (GUID) - \value Reserved Reserved for future definition -*/ - -/*! - \enum TQUuid::Version - - This enum defines the version of the UUID. - - \value VerUnknown Version is unknown - \value Time Time-based, by using timestamp, clock sequence, and - MAC network card address (if available) for the node sections - \value EmbeddedPOSIX DCE Security version, with embedded POSIX UUIDs - \value Name Name-based, by using values from a name for all sections - \value Random Random-based, by using random numbers for all sections -*/ - -/*! - \fn TQUuid::Variant TQUuid::variant() const - - Returns the variant of the UUID. - The null UUID is considered to be of an unknown variant. - - \sa version() -*/ -TQUuid::Variant TQUuid::variant() const -{ - if ( isNull() ) - return VarUnknown; - // Check the 3 MSB of data4[0] - if ( (data4[0] & 0x80) == 0x00 ) return NCS; - else if ( (data4[0] & 0xC0) == 0x80 ) return DCE; - else if ( (data4[0] & 0xE0) == 0xC0 ) return Microsoft; - else if ( (data4[0] & 0xE0) == 0xE0 ) return Reserved; - return VarUnknown; -} - -/*! - \fn TQUuid::Version TQUuid::version() const - - Returns the version of the UUID, if the UUID is of the DCE - variant; otherwise returns VerUnknown. - - \sa variant() -*/ -TQUuid::Version TQUuid::version() const -{ - // Check the 4 MSB of data3 - Version ver = (Version)(data3>>12); - if ( isNull() - || (variant() != DCE) - || ver < Time - || ver > Random ) - return VerUnknown; - return ver; -} - -/*! - \fn bool TQUuid::operator<(const TQUuid &other) const - - Returns TRUE if this TQUuid is of the same variant, - and lexicographically before the \a other TQUuid; - otherwise returns FALSE. - - \sa variant() -*/ -#define ISLESS(f1, f2) if (f1!=f2) return (f1(const TQUuid &other) const - - Returns TRUE if this TQUuid is of the same variant, - and lexicographically after the \a other TQUuid; - otherwise returns FALSE. - - \sa variant() -*/ -#define ISMORE(f1, f2) if (f1!=f2) return (f1>f2); -bool TQUuid::operator>(const TQUuid &other ) const -{ - if ( variant() != other.variant() ) - return FALSE; - - ISMORE( data1, other.data1 ); - ISMORE( data2, other.data2 ); - ISMORE( data3, other.data3 ); - for ( int n = 0; n < 8; n++ ) { - ISMORE( data4[n], other.data4[n] ); - } - return FALSE; -} - -/*! - \fn TQUuid TQUuid::createUuid() - - Returns a new UUID of \c DCE variant, and \c Random type. The - UUIDs generated are based on the platform specific pseudo-random - generator, which is usually not a cryptographic-quality random - number generator. Therefore, a UUID is not guaranteed to be unique - cross application instances. - - On Windows, the new UUID is extremely likely to be unique on the - same or any other system, networked or not. - - \sa variant(), version() -*/ -#if defined(Q_OS_WIN32) -#include // For CoCreateGuid -TQUuid TQUuid::createUuid() -{ - GUID guid; - CoCreateGuid( &guid ); - TQUuid result = guid; - return result; -} -#else // !Q_OS_WIN32 -#if defined(Q_OS_LINUX) -#include -TQUuid TQUuid::createUuid() -{ - uuid_t raw_uuid; - char uuid_string[37]; - - uuid_generate(raw_uuid); - uuid_unparse(raw_uuid, uuid_string); - return TQUuid(uuid_string); -} -#else // !Q_OS_LINUX -#include "tqdatetime.h" -#include "stdlib.h" // For srand/rand -TQUuid TQUuid::createUuid() -{ - static const int intbits = sizeof(int)*8; - static int randbits = 0; - if ( !randbits ) { - int max = RAND_MAX; - do { ++randbits; } while ( (max=max>>1) ); - srand( (uint)TQDateTime::currentDateTime().toTime_t() ); - rand(); // Skip first - } - - TQUuid result; - uint *data = &(result.data1); - int chunks = 16 / sizeof(uint); - while ( chunks-- ) { - uint randNumber = 0; - for ( int filled = 0; filled < intbits; filled += randbits ) - randNumber |= rand()< -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/src/tools/tqasciidict.h b/src/tools/tqasciidict.h index 7489e1822..24c28894b 100644 --- a/src/tools/tqasciidict.h +++ b/src/tools/tqasciidict.h @@ -119,5 +119,5 @@ public: }; #define Q_DEFINED_QASCIIDICT -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQASCIIDICT_H diff --git a/src/tools/tqcstring.h b/src/tools/tqcstring.h index 3d989ff52..4f7f31942 100644 --- a/src/tools/tqcstring.h +++ b/src/tools/tqcstring.h @@ -378,5 +378,5 @@ TQ_EXPORT inline const TQCString operator+( char c1, const TQCString &s2 ) tmp += s2; return tmp; } -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQCSTRING_H diff --git a/src/tools/tqdict.h b/src/tools/tqdict.h index f82579919..014fb893a 100644 --- a/src/tools/tqdict.h +++ b/src/tools/tqdict.h @@ -119,5 +119,5 @@ public: }; #define Q_DEFINED_QDICT -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQDICT_H diff --git a/src/tools/tqfeatures.txt b/src/tools/tqfeatures.txt index d6a05abb4..fa42349b2 100644 --- a/src/tools/tqfeatures.txt +++ b/src/tools/tqfeatures.txt @@ -92,13 +92,13 @@ SeeAlso: ??? Feature: TEMPLATE_VARIANT Section: Data structures Requires: VARIANT STRINGLIST -Name: Template classes in QVariant +Name: Template classes in TQVariant SeeAlso: ??? Feature: VARIANT Section: Data structures Requires: -Name: QVariant +Name: TQVariant SeeAlso: ??? Feature: REGEXP_OPTIM diff --git a/src/tools/tqgarray.cpp b/src/tools/tqgarray.cpp index b8d500adf..1eb1a05c2 100644 --- a/src/tools/tqgarray.cpp +++ b/src/tools/tqgarray.cpp @@ -77,7 +77,7 @@ #endif /*! - \class TQShared ntqshared.h + \class TQShared tqshared.h \reentrant \ingroup shared \brief The TQShared class is used internally for implementing shared classes. diff --git a/src/tools/tqgarray.h b/src/tools/tqgarray.h index 4d239dd66..6340f7ccb 100644 --- a/src/tools/tqgarray.h +++ b/src/tools/tqgarray.h @@ -42,7 +42,7 @@ #define TQGARRAY_H #ifndef QT_H -#include "ntqshared.h" +#include "tqshared.h" #endif // QT_H diff --git a/src/tools/tqgpluginmanager_p.h b/src/tools/tqgpluginmanager_p.h index 7b713990c..946fe3bc4 100644 --- a/src/tools/tqgpluginmanager_p.h +++ b/src/tools/tqgpluginmanager_p.h @@ -42,7 +42,7 @@ #ifndef QT_H #include "tqdict.h" #include "tqlibrary.h" -#include "ntquuid.h" +#include "tquuid.h" #include "tqstringlist.h" #include "qcom_p.h" #endif // QT_H diff --git a/src/tools/tqintdict.h b/src/tools/tqintdict.h index 4c20aa486..8427e4467 100644 --- a/src/tools/tqintdict.h +++ b/src/tools/tqintdict.h @@ -115,5 +115,5 @@ public: }; #define Q_DEFINED_QINTDICT -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQINTDICT_H diff --git a/src/tools/tqlibrary.h b/src/tools/tqlibrary.h index d8b5f4ba5..6b53edf7f 100644 --- a/src/tools/tqlibrary.h +++ b/src/tools/tqlibrary.h @@ -81,6 +81,6 @@ private: // Disabled copy constructor and operator= }; #define Q_DEFINED_QLIBRARY -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif //TQT_NO_LIBRARY #endif //TQLIBRARY_H diff --git a/src/tools/tqlibrary_p.h b/src/tools/tqlibrary_p.h index 1ae03c601..d4aa33d66 100644 --- a/src/tools/tqlibrary_p.h +++ b/src/tools/tqlibrary_p.h @@ -58,7 +58,7 @@ #ifndef TQT_NO_LIBRARY #ifndef QT_H -#include "ntqwindowdefs.h" +#include "tqwindowdefs.h" #endif // QT_H class TQLibraryPrivate diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h index 6a813dd6c..46e4c4fbb 100644 --- a/src/tools/tqmap.h +++ b/src/tools/tqmap.h @@ -43,7 +43,7 @@ #ifndef QT_H #include "tqglobal.h" -#include "ntqshared.h" +#include "tqshared.h" #include "tqdatastream.h" #include "tqpair.h" #include "tqvaluelist.h" @@ -877,5 +877,5 @@ TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap inline void TQPtrVector::deleteItem( TQPtrCollection: } #define Q_DEFINED_QPTRVECTOR -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQPTRVECTOR_H diff --git a/src/tools/tqregexp.cpp b/src/tools/tqregexp.cpp index 1aed2ca4c..6ed3e3a15 100644 --- a/src/tools/tqregexp.cpp +++ b/src/tools/tqregexp.cpp @@ -50,7 +50,7 @@ #include "tqmap.h" #include "tqptrvector.h" #include "tqstring.h" -#include "ntqtl.h" +#include "tqtl.h" #ifdef TQT_THREAD_SUPPORT #include "tqthreadstorage.h" diff --git a/src/tools/tqshared.h b/src/tools/tqshared.h new file mode 100644 index 000000000..62dcc8e35 --- /dev/null +++ b/src/tools/tqshared.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Definition of TQShared struct +** +** Created : 940112 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the tools module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQSHARED_H +#define TQSHARED_H + +#ifndef QT_H +#include "tqglobal.h" +#endif // QT_H + +struct TQ_EXPORT TQShared +{ + TQShared() : count( 1 ) { } + void ref() { count++; } + bool deref() { return !--count; } + uint count; +}; + + +#endif // TQSHARED_H diff --git a/src/tools/tqstring.h b/src/tools/tqstring.h index 253ba3a03..03fcf9459 100644 --- a/src/tools/tqstring.h +++ b/src/tools/tqstring.h @@ -1109,5 +1109,5 @@ extern TQ_EXPORT TQString qt_winMB2TQString( const char* mb, int len=-1 ); #endif #define Q_DEFINED_QSTRING -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQSTRING_H diff --git a/src/tools/tqstringlist.cpp b/src/tools/tqstringlist.cpp index 43637c203..b1a2f70c4 100644 --- a/src/tools/tqstringlist.cpp +++ b/src/tools/tqstringlist.cpp @@ -44,7 +44,7 @@ #include "tqregexp.h" #include "tqstrlist.h" #include "tqdatastream.h" -#include "ntqtl.h" +#include "tqtl.h" /*! \class TQStringList tqstringlist.h @@ -61,7 +61,7 @@ objects. Unlike TQStrList, which stores pointers to characters, TQStringList holds real TQString objects. It is the class of choice whenever you work with Unicode strings. TQStringList is part of the - \link ntqtl.html TQt Template Library\endlink. + \link tqtl.html TQt Template Library\endlink. Like TQString itself, TQStringList objects are implicitly shared, so passing them around as value-parameters is both fast and safe. @@ -171,7 +171,7 @@ /*! Sorts the list of strings in ascending case-sensitive order. - Sorting is very fast. It uses the \link ntqtl.html TQt Template + Sorting is very fast. It uses the \link tqtl.html TQt Template Library's\endlink efficient HeapSort implementation that has a time complexity of O(n*log n). diff --git a/src/tools/tqthreadinstance_p.h b/src/tools/tqthreadinstance_p.h index 1cc0d083e..2778d5daa 100644 --- a/src/tools/tqthreadinstance_p.h +++ b/src/tools/tqthreadinstance_p.h @@ -55,7 +55,7 @@ #ifndef QT_H #include "tqmutex.h" -#include "ntqwindowdefs.h" +#include "tqwindowdefs.h" #endif // QT_H #ifdef Q_OS_UNIX diff --git a/src/tools/tqtl.h b/src/tools/tqtl.h new file mode 100644 index 000000000..df5a7cdb6 --- /dev/null +++ b/src/tools/tqtl.h @@ -0,0 +1,325 @@ +/**************************************************************************** +** +** Definition of TQt template library classes +** +** Created : 990128 +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the tools module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#ifndef TQTL_H +#define TQTL_H + +#ifndef QT_H +#include "tqglobal.h" +#include "tqtextstream.h" +#include "tqstring.h" +#endif // QT_H + +#ifndef TQT_NO_TEXTSTREAM +template +class TQTextOStreamIterator +{ +protected: + TQTextOStream& stream; + TQString separator; + +public: + TQTextOStreamIterator( TQTextOStream& s) : stream( s ) {} + TQTextOStreamIterator( TQTextOStream& s, const TQString& sep ) + : stream( s ), separator( sep ) {} + TQTextOStreamIterator& operator= ( const T& x ) { + stream << x; + if ( !separator.isEmpty() ) + stream << separator; + return *this; + } + TQTextOStreamIterator& operator*() { return *this; } + TQTextOStreamIterator& operator++() { return *this; } + TQTextOStreamIterator& operator++(int) { return *this; } +}; +#endif //TQT_NO_TEXTSTREAM + +template +inline OutputIterator tqCopy( InputIterator _begin, InputIterator _end, + OutputIterator _dest ) +{ + while( _begin != _end ) + *_dest++ = *_begin++; + return _dest; +} + +template +inline BiOutputIterator tqCopyBackward( BiIterator _begin, BiIterator _end, + BiOutputIterator _dest ) +{ + while ( _begin != _end ) + *--_dest = *--_end; + return _dest; +} + +template +inline bool tqEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 ) +{ + // ### compare using !(*first1 == *first2) in TQt 4.0 + for ( ; first1 != last1; ++first1, ++first2 ) + if ( *first1 != *first2 ) + return FALSE; + return TRUE; +} + +template +inline void tqFill( ForwardIterator first, ForwardIterator last, const T& val ) +{ + for ( ; first != last; ++first ) + *first = val; +} + +#if 0 +template +inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end, + OutputIterator _dest ) +{ + while ( _begin != _end ) { + --_end; + *_dest = *_end; + ++_dest; + } + return _dest; +} +#endif + + +template +inline InputIterator tqFind( InputIterator first, InputIterator last, + const T& val ) +{ + while ( first != last && *first != val ) + ++first; + return first; +} + +template +inline void tqCount( InputIterator first, InputIterator last, const T& value, + Size& n ) +{ + for ( ; first != last; ++first ) + if ( *first == value ) + ++n; +} + +template +inline void tqSwap( T& _value1, T& _value2 ) +{ + T tmp = _value1; + _value1 = _value2; + _value2 = tmp; +} + + +template +TQ_INLINE_TEMPLATES void qBubbleSort( InputIterator b, InputIterator e ) +{ + // Goto last element; + InputIterator last = e; + --last; + // only one element or no elements ? + if ( last == b ) + return; + + // So we have at least two elements in here + while( b != last ) { + bool swapped = FALSE; + InputIterator swap_pos = b; + InputIterator x = e; + InputIterator y = x; + y--; + do { + --x; + --y; + if ( *x < *y ) { + swapped = TRUE; + tqSwap( *x, *y ); + swap_pos = y; + } + } while( y != b ); + if ( !swapped ) + return; + b = swap_pos; + b++; + } +} + + +template +inline void qBubbleSort( Container &c ) +{ + qBubbleSort( c.begin(), c.end() ); +} + + +template +TQ_INLINE_TEMPLATES void qHeapSortPushDown( Value* heap, int first, int last ) +{ + int r = first; + while ( r <= last / 2 ) { + if ( last == 2 * r ) { + // node r has only one child + if ( heap[2 * r] < heap[r] ) + tqSwap( heap[r], heap[2 * r] ); + r = last; + } else { + // node r has two children + if ( heap[2 * r] < heap[r] && !(heap[2 * r + 1] < heap[2 * r]) ) { + // swap with left child + tqSwap( heap[r], heap[2 * r] ); + r *= 2; + } else if ( heap[2 * r + 1] < heap[r] + && heap[2 * r + 1] < heap[2 * r] ) { + // swap with right child + tqSwap( heap[r], heap[2 * r + 1] ); + r = 2 * r + 1; + } else { + r = last; + } + } + } +} + + +template +TQ_INLINE_TEMPLATES void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n ) +{ + // Create the heap + InputIterator insert = b; + Value* realheap = new Value[n]; + // Wow, what a fake. But I want the heap to be indexed as 1...n + Value* heap = realheap - 1; + int size = 0; + for( ; insert != e; ++insert ) { + heap[++size] = *insert; + int i = size; + while( i > 1 && heap[i] < heap[i / 2] ) { + tqSwap( heap[i], heap[i / 2] ); + i /= 2; + } + } + + // Now do the sorting + for( uint i = n; i > 0; i-- ) { + *b++ = heap[1]; + if ( i > 1 ) { + heap[1] = heap[i]; + qHeapSortPushDown( heap, 1, (int)i - 1 ); + } + } + + delete[] realheap; +} + + +template +TQ_INLINE_TEMPLATES void qHeapSort( InputIterator b, InputIterator e ) +{ + // Empty ? + if ( b == e ) + return; + + // How many entries have to be sorted ? + InputIterator it = b; + uint n = 0; + while ( it != e ) { + ++n; + ++it; + } + + // The second last parameter is a hack to retrieve the value type + // Do the real sorting here + qHeapSortHelper( b, e, *b, n ); +} + + +template +TQ_INLINE_TEMPLATES void qHeapSort( Container &c ) +{ + if ( c.begin() == c.end() ) + return; + + // The second last parameter is a hack to retrieve the value type + // Do the real sorting here + qHeapSortHelper( c.begin(), c.end(), *(c.begin()), (uint)c.count() ); +} + +template +class TQBackInsertIterator +{ +public: + Q_EXPLICIT TQBackInsertIterator( Container &c ) + : container( &c ) + { + } + + TQBackInsertIterator& + operator=( const TQ_TYPENAME Container::value_type &value ) + { + container->push_back( value ); + return *this; + } + + TQBackInsertIterator& operator*() + { + return *this; + } + + TQBackInsertIterator& operator++() + { + return *this; + } + + TQBackInsertIterator& operator++(int) + { + return *this; + } + +protected: + Container *container; +}; + +template +inline TQBackInsertIterator qBackInserter( Container &c ) +{ + return TQBackInsertIterator( c ); +} + +#endif diff --git a/src/tools/tquuid.cpp b/src/tools/tquuid.cpp new file mode 100644 index 000000000..566c9f405 --- /dev/null +++ b/src/tools/tquuid.cpp @@ -0,0 +1,434 @@ +/**************************************************************************** +** +** Implementation of TQUuid class +** +** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the tools module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#include "tquuid.h" + +#include "tqdatastream.h" + +/*! + \class TQUuid tquuid.h + \brief The TQUuid class defines a Universally Unique Identifier (UUID). + + \reentrant + + For objects or declarations that must be uniquely identified, + UUIDs (also known as GUIDs) are widely used in order to assign a + fixed and easy to compare value to the object or declaration. The + 128-bit value of a UUID is generated by an algorithm that + guarantees that the value is unique. + + In TQt, UUIDs are wrapped by the TQUuid struct which provides + convenience functions for handling UUIDs. Most platforms provide a + tool to generate new UUIDs, for example, uuidgen and guidgen. + + UUIDs generated by TQUuid, are based on the \c Random version of the + \c DCE (Distributed Computing Environment) standard. + + UUIDs can be constructed from numeric values or from strings, or + using the static createUuid() function. They can be converted to a + string with toString(). UUIDs have a variant() and a version(), + and null UUIDs return TRUE from isNull(). +*/ + +/*! + \fn TQUuid::TQUuid() + + Creates the null UUID {00000000-0000-0000-0000-000000000000}. +*/ + +/*! + \fn TQUuid::TQUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) + + Creates a UUID with the value specified by the parameters, \a l, + \a w1, \a w2, \a b1, \a b2, \a b3, \a b4, \a b5, \a b6, \a b7, \a + b8. + + Example: + \code + // {67C8770B-44F1-410A-AB9A-F9B5446F13EE} + TQUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee ) + \endcode +*/ + +/*! + \fn TQUuid::TQUuid( const TQUuid &orig ) + + Creates a copy of the TQUuid \a orig. +*/ +#ifndef TQT_NO_QUUID_STRING +/*! + Creates a TQUuid object from the string \a text. The function can + only convert a string in the format + {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH} (where 'H' stands for a hex + digit). If the conversion fails a null UUID is created. +*/ +TQUuid::TQUuid( const TQString &text ) +{ + bool ok; + if ( text.isEmpty() ) { + *this = TQUuid(); + return; + } + TQString temp = text.upper(); + if ( temp[0] != '{' ) + temp = "{" + text; + if ( text[(int)text.length()-1] != '}' ) + temp += "}"; + + data1 = temp.mid( 1, 8 ).toULong( &ok, 16 ); + if ( !ok ) { + *this = TQUuid(); + return; + } + + data2 = temp.mid( 10, 4 ).toUInt( &ok, 16 ); + if ( !ok ) { + *this = TQUuid(); + return; + } + data3 = temp.mid( 15, 4 ).toUInt( &ok, 16 ); + if ( !ok ) { + *this = TQUuid(); + return; + } + data4[0] = temp.mid( 20, 2 ).toUInt( &ok, 16 ); + if ( !ok ) { + *this = TQUuid(); + return; + } + data4[1] = temp.mid( 22, 2 ).toUInt( &ok, 16 ); + if ( !ok ) { + *this = TQUuid(); + return; + } + for ( int i = 2; i<8; i++ ) { + data4[i] = temp.mid( 25 + (i-2)*2, 2 ).toUShort( &ok, 16 ); + if ( !ok ) { + *this = TQUuid(); + return; + } + } +} + +/*! + \internal +*/ +TQUuid::TQUuid( const char *text ) +{ + *this = TQUuid( TQString(text) ); +} +#endif +/*! + \fn TQUuid TQUuid::operator=(const TQUuid &uuid ) + + Assigns the value of \a uuid to this TQUuid object. +*/ + +/*! + \fn bool TQUuid::operator==(const TQUuid &other) const + + Returns TRUE if this TQUuid and the \a other TQUuid are identical; + otherwise returns FALSE. +*/ + +/*! + \fn bool TQUuid::operator!=(const TQUuid &other) const + + Returns TRUE if this TQUuid and the \a other TQUuid are different; + otherwise returns FALSE. +*/ +#ifndef TQT_NO_QUUID_STRING +/*! + \fn TQUuid::operator TQString() const + + Returns the string representation of the uuid. + + \sa toString() +*/ + +/*! + TQString TQUuid::toString() const + + Returns the string representation of the uuid. +*/ +TQString TQUuid::toString() const +{ + TQString result; + + result = "{" + TQString::number( data1, 16 ).rightJustify( 8, '0' ) + "-"; + result += TQString::number( (int)data2, 16 ).rightJustify( 4, '0' ) + "-"; + result += TQString::number( (int)data3, 16 ).rightJustify( 4, '0' ) + "-"; + result += TQString::number( (int)data4[0], 16 ).rightJustify( 2, '0' ); + result += TQString::number( (int)data4[1], 16 ).rightJustify( 2, '0' ) + "-"; + for ( int i = 2; i < 8; i++ ) + result += TQString::number( (int)data4[i], 16 ).rightJustify( 2, '0' ); + + return result + "}"; +} +#endif + +#ifndef TQT_NO_DATASTREAM +/*! + \relates TQUuid + Writes the uuid \a id to the datastream \a s. +*/ +TQDataStream &operator<<( TQDataStream &s, const TQUuid &id ) +{ + s << (TQ_UINT32)id.data1; + s << (TQ_UINT16)id.data2; + s << (TQ_UINT16)id.data3; + for (int i = 0; i < 8; i++ ) + s << (TQ_UINT8)id.data4[i]; + return s; +} + +/*! + \relates TQUuid + Reads uuid from from the stream \a s into \a id. +*/ +TQDataStream &operator>>( TQDataStream &s, TQUuid &id ) +{ + TQ_UINT32 u32; + TQ_UINT16 u16; + TQ_UINT8 u8; + s >> u32; + id.data1 = u32; + s >> u16; + id.data2 = u16; + s >> u16; + id.data3 = u16; + for (int i = 0; i < 8; i++ ) { + s >> u8; + id.data4[i] = u8; + } + return s; +} +#endif + +/*! + Returns TRUE if this is the null UUID + {00000000-0000-0000-0000-000000000000}; otherwise returns FALSE. +*/ +bool TQUuid::isNull() const +{ + return data4[0] == 0 && data4[1] == 0 && data4[2] == 0 && data4[3] == 0 && + data4[4] == 0 && data4[5] == 0 && data4[6] == 0 && data4[7] == 0 && + data1 == 0 && data2 == 0 && data3 == 0; +} + +/*! + \enum TQUuid::Variant + + This enum defines the variant of the UUID, which is the scheme + which defines the layout of the 128-bits value. + + \value VarUnknown Variant is unknown + \value NCS Reserved for NCS (Network Computing System) backward compatibility + \value DCE Distributed Computing Environment, the scheme used by TQUuid + \value Microsoft Reserved for Microsoft backward compatibility (GUID) + \value Reserved Reserved for future definition +*/ + +/*! + \enum TQUuid::Version + + This enum defines the version of the UUID. + + \value VerUnknown Version is unknown + \value Time Time-based, by using timestamp, clock sequence, and + MAC network card address (if available) for the node sections + \value EmbeddedPOSIX DCE Security version, with embedded POSIX UUIDs + \value Name Name-based, by using values from a name for all sections + \value Random Random-based, by using random numbers for all sections +*/ + +/*! + \fn TQUuid::Variant TQUuid::variant() const + + Returns the variant of the UUID. + The null UUID is considered to be of an unknown variant. + + \sa version() +*/ +TQUuid::Variant TQUuid::variant() const +{ + if ( isNull() ) + return VarUnknown; + // Check the 3 MSB of data4[0] + if ( (data4[0] & 0x80) == 0x00 ) return NCS; + else if ( (data4[0] & 0xC0) == 0x80 ) return DCE; + else if ( (data4[0] & 0xE0) == 0xC0 ) return Microsoft; + else if ( (data4[0] & 0xE0) == 0xE0 ) return Reserved; + return VarUnknown; +} + +/*! + \fn TQUuid::Version TQUuid::version() const + + Returns the version of the UUID, if the UUID is of the DCE + variant; otherwise returns VerUnknown. + + \sa variant() +*/ +TQUuid::Version TQUuid::version() const +{ + // Check the 4 MSB of data3 + Version ver = (Version)(data3>>12); + if ( isNull() + || (variant() != DCE) + || ver < Time + || ver > Random ) + return VerUnknown; + return ver; +} + +/*! + \fn bool TQUuid::operator<(const TQUuid &other) const + + Returns TRUE if this TQUuid is of the same variant, + and lexicographically before the \a other TQUuid; + otherwise returns FALSE. + + \sa variant() +*/ +#define ISLESS(f1, f2) if (f1!=f2) return (f1(const TQUuid &other) const + + Returns TRUE if this TQUuid is of the same variant, + and lexicographically after the \a other TQUuid; + otherwise returns FALSE. + + \sa variant() +*/ +#define ISMORE(f1, f2) if (f1!=f2) return (f1>f2); +bool TQUuid::operator>(const TQUuid &other ) const +{ + if ( variant() != other.variant() ) + return FALSE; + + ISMORE( data1, other.data1 ); + ISMORE( data2, other.data2 ); + ISMORE( data3, other.data3 ); + for ( int n = 0; n < 8; n++ ) { + ISMORE( data4[n], other.data4[n] ); + } + return FALSE; +} + +/*! + \fn TQUuid TQUuid::createUuid() + + Returns a new UUID of \c DCE variant, and \c Random type. The + UUIDs generated are based on the platform specific pseudo-random + generator, which is usually not a cryptographic-quality random + number generator. Therefore, a UUID is not guaranteed to be unique + cross application instances. + + On Windows, the new UUID is extremely likely to be unique on the + same or any other system, networked or not. + + \sa variant(), version() +*/ +#if defined(Q_OS_WIN32) +#include // For CoCreateGuid +TQUuid TQUuid::createUuid() +{ + GUID guid; + CoCreateGuid( &guid ); + TQUuid result = guid; + return result; +} +#else // !Q_OS_WIN32 +#if defined(Q_OS_LINUX) +#include +TQUuid TQUuid::createUuid() +{ + uuid_t raw_uuid; + char uuid_string[37]; + + uuid_generate(raw_uuid); + uuid_unparse(raw_uuid, uuid_string); + return TQUuid(uuid_string); +} +#else // !Q_OS_LINUX +#include "tqdatetime.h" +#include "stdlib.h" // For srand/rand +TQUuid TQUuid::createUuid() +{ + static const int intbits = sizeof(int)*8; + static int randbits = 0; + if ( !randbits ) { + int max = RAND_MAX; + do { ++randbits; } while ( (max=max>>1) ); + srand( (uint)TQDateTime::currentDateTime().toTime_t() ); + rand(); // Skip first + } + + TQUuid result; + uint *data = &(result.data1); + int chunks = 16 / sizeof(uint); + while ( chunks-- ) { + uint randNumber = 0; + for ( int filled = 0; filled < intbits; filled += randbits ) + randNumber |= rand()< + +#if defined(Q_OS_WIN32) +#ifndef GUID_DEFINED +#define GUID_DEFINED +typedef struct _GUID +{ + ulong Data1; + ushort Data2; + ushort Data3; + uchar Data4[ 8 ]; +} GUID, *REFGUID, *LPGUID; +#endif +#endif + + +struct TQ_EXPORT TQUuid +{ + enum Variant { + VarUnknown =-1, + NCS = 0, // 0 - - + DCE = 2, // 1 0 - + Microsoft = 6, // 1 1 0 + Reserved = 7 // 1 1 1 + }; + + enum Version { + VerUnknown =-1, + Time = 1, // 0 0 0 1 + EmbeddedPOSIX = 2, // 0 0 1 0 + Name = 3, // 0 0 1 1 + Random = 4 // 0 1 0 0 + }; + + TQUuid() + { + memset( this, 0, sizeof(TQUuid) ); + } + TQUuid( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 ) + { + data1 = l; + data2 = w1; + data3 = w2; + data4[0] = b1; + data4[1] = b2; + data4[2] = b3; + data4[3] = b4; + data4[4] = b5; + data4[5] = b6; + data4[6] = b7; + data4[7] = b8; + } + TQUuid( const TQUuid &uuid ) + { + memcpy( this, &uuid, sizeof(TQUuid) ); + } +#ifndef TQT_NO_QUUID_STRING + TQUuid( const TQString & ); + TQUuid( const char * ); + TQString toString() const; + operator TQString() const { return toString(); } +#endif + bool isNull() const; + + TQUuid &operator=(const TQUuid &orig ) + { + memcpy( this, &orig, sizeof(TQUuid) ); + return *this; + } + + bool operator==(const TQUuid &orig ) const + { + uint i; + if ( data1 != orig.data1 || data2 != orig.data2 || + data3 != orig.data3 ) + return FALSE; + + for( i = 0; i < 8; i++ ) + if ( data4[i] != orig.data4[i] ) + return FALSE; + + return TRUE; + } + + bool operator!=(const TQUuid &orig ) const + { + return !( *this == orig ); + } + + bool operator<(const TQUuid &other ) const; + bool operator>(const TQUuid &other ) const; + +#if defined(Q_OS_WIN32) + // On Windows we have a type GUID that is used by the platform API, so we + // provide convenience operators to cast from and to this type. + TQUuid( const GUID &guid ) + { + memcpy( this, &guid, sizeof(GUID) ); + } + + TQUuid &operator=(const GUID &orig ) + { + memcpy( this, &orig, sizeof(TQUuid) ); + return *this; + } + + operator GUID() const + { + GUID guid = { data1, data2, data3, { data4[0], data4[1], data4[2], data4[3], data4[4], data4[5], data4[6], data4[7] } }; + return guid; + } + + bool operator==( const GUID &guid ) const + { + uint i; + if ( data1 != guid.Data1 || data2 != guid.Data2 || + data3 != guid.Data3 ) + return FALSE; + + for( i = 0; i < 8; i++ ) + if ( data4[i] != guid.Data4[i] ) + return FALSE; + + return TRUE; + } + + bool operator!=( const GUID &guid ) const + { + return !( *this == guid ); + } +#endif + static TQUuid createUuid(); + TQUuid::Variant variant() const; + TQUuid::Version version() const; + + uint data1; + ushort data2; + ushort data3; + uchar data4[ 8 ]; +}; + +#ifndef TQT_NO_DATASTREAM +TQ_EXPORT TQDataStream &operator<<( TQDataStream &, const TQUuid & ); +TQ_EXPORT TQDataStream &operator>>( TQDataStream &, TQUuid & ); +#endif + +#endif //TQUUID_H diff --git a/src/tools/tqvaluelist.h b/src/tools/tqvaluelist.h index 8a5bcb841..d90001397 100644 --- a/src/tools/tqvaluelist.h +++ b/src/tools/tqvaluelist.h @@ -42,8 +42,8 @@ #define TQVALUELIST_H #ifndef QT_H -#include "ntqtl.h" -#include "ntqshared.h" +#include "tqtl.h" +#include "tqshared.h" #include "tqdatastream.h" #endif // QT_H @@ -677,5 +677,5 @@ TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueList #define Q_DEFINED_QVALUELIST #define Q_DEFINED_QVALUELIST -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQVALUELIST_H diff --git a/src/tools/tqvaluevector.h b/src/tools/tqvaluevector.h index fd45bce85..06dfc06f4 100644 --- a/src/tools/tqvaluevector.h +++ b/src/tools/tqvaluevector.h @@ -42,8 +42,8 @@ #include #ifndef QT_H -#include "ntqtl.h" -#include "ntqshared.h" +#include "tqtl.h" +#include "tqshared.h" #include "tqdatastream.h" #endif // QT_H @@ -573,5 +573,5 @@ TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueVect #endif // TQT_NO_DATASTREAM #define Q_DEFINED_QVALUEVECTOR -#include "ntqwinexport.h" +#include "tqwinexport.h" #endif // TQVALUEVECTOR_H diff --git a/src/tools/tqwinexport.cpp b/src/tools/tqwinexport.cpp new file mode 100644 index 000000000..d1a2bce22 --- /dev/null +++ b/src/tools/tqwinexport.cpp @@ -0,0 +1,29 @@ +#define Q_EXPORT_TEMPLATES + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/src/tools/tqwinexport.h b/src/tools/tqwinexport.h new file mode 100644 index 000000000..2f4c41f13 --- /dev/null +++ b/src/tools/tqwinexport.h @@ -0,0 +1,224 @@ +/**************************************************************************** +** +** Global type declarations and definitions +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of the tools module of the TQt GUI Toolkit. +** +** This file may be used under the terms of the GNU General +** Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the files LICENSE.GPL2 +** and LICENSE.GPL3 included in the packaging of this file. +** Alternatively you may (at your option) use any later version +** of the GNU General Public License if such license has been +** publicly approved by Trolltech ASA (or its successors, if any) +** and the KDE Free TQt Foundation. +** +** Please review the following information to ensure GNU General +** Public Licensing requirements will be met: +** http://trolltech.com/products/qt/licenses/licensing/opensource/. +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://trolltech.com/products/qt/licenses/licensing/licensingoverview +** or contact the sales department at sales@trolltech.com. +** +** This file may be used under the terms of the Q Public License as +** defined by Trolltech ASA and appearing in the file LICENSE.TQPL +** included in the packaging of this file. Licensees holding valid TQt +** Commercial licenses may use this file in accordance with the TQt +** Commercial License Agreement provided with the Software. +** +** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, +** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted +** herein. +** +**********************************************************************/ + +#if defined(Q_TEMPLATEDLL) && ( !defined(Q_CC_BOR) || !defined(QT_MAKEDLL) || defined(Q_EXPORT_TEMPLATES) ) +// MOC_SKIP_BEGIN + +#if defined(Q_DEFINED_QASCIIDICT) && defined(Q_DEFINED_QCONNECTION_LIST) && !defined(Q_EXPORTED_QASCIIDICT_TEMPLATES) +#define Q_EXPORTED_QASCIIDICT_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQAsciiDictIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQAsciiDict; +#endif + +#if defined(Q_DEFINED_QSTYLESHEET) && defined(Q_DEFINED_QDICT) && !defined(Q_EXPORTED_QSTYLESHEET_TEMPLATES) +#define Q_EXPORTED_QSTYLESHEET_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict; +#endif + +#if defined(Q_DEFINED_QLIBRARY) && defined(Q_DEFINED_QDICT) && !defined(Q_EXPORTED_QDICTLIBRARY_TEMPLATES) +#define Q_EXPORTED_QDICTLIBRARY_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQDict; // for TQtopia +#endif + +#if defined(Q_DEFINED_QGUARDEDPTR) && defined(Q_DEFINED_QOBJECT) && !defined(Q_EXPORTED_QGUARDEDPTROBJECT_TEMPLATES) +#define Q_EXPORTED_QGUARDEDPTROBJECT_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQGuardedPtr; +#endif + +// needed for TQtopia +#if defined(Q_DEFINED_QGUARDEDPTR) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED_QGUARDEDPTRTQWIDGET_TEMPLATES) +#define Q_EXPORTED_QGUARDEDPTRTQWIDGET_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQGuardedPtr; +#endif + +#if defined(Q_DEFINED_QGUARDEDPTR) && defined(Q_DEFINED_QACCESSIBLE_OBJECT) && !defined(Q_EXPORTED_QACCESSIBLEOBJECT_TEMPLATES) +#define Q_EXPORTED_QACCESSIBLEOBJECT_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQGuardedPtr; +#endif + +#if defined(Q_DEFINED_QINTDICT) && !defined(Q_EXPORTED_QINTDICT_TEMPLATES) +#define Q_EXPORTED_QINTDICT_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQIntDict; +#endif + +#if defined(Q_DEFINED_QINTDICT) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED__TEMPLATES) +#define Q_EXPORTED__TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQIntDictIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQIntDict; +#endif + +#if defined(Q_DEFINED_QMAP) && !defined(Q_EXPORTED_QMAPBASIC_TEMPLATES) +#define Q_EXPORTED_QMAPBASIC_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia +#endif + +#if defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QMAPTQSTRING_TEMPLATES) +#define Q_EXPORTED_QMAPTQSTRING_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMap; // for TQtopia +#endif + +#if defined(Q_DEFINED_QMEMARRAY) && !defined(Q_EXPORTED_QMEMARRAY_BASIC_TEMPLATES) +#define Q_EXPORTED_QMEMARRAY_BASIC_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; +#endif + +#if defined(Q_DEFINED_QMEMARRAY) && defined(Q_DEFINED_QPOINT) && !defined(Q_EXPORTED_QMEMARAYPOINT_TEMPLATES) +#define Q_EXPORTED_QMEMARAYPOINT_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQMemArray; +#endif + +#if defined(Q_DEFINED_QPTRLIST) && !defined(Q_EXPORTED_QPTRLIST_BASIC_TEMPLATES) +#define Q_EXPORTED_QPTRLIST_BASIC_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; +#endif + +#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED_QPTRLISTWIDGET_TEMPLATES) +#define Q_EXPORTED_QPTRLISTWIDGET_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; +#endif + +#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QCONNECTION) && !defined(Q_EXPORTED_QPTRLISTCONNECTION_TEMPLATES) +#define Q_EXPORTED_QPTRLISTCONNECTION_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; +#endif + +#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QOBJECT) && !defined(Q_EXPORTED_QPTRLISTOBJECT_TEMPLATES) +#define Q_EXPORTED_QPTRLISTOBJECT_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; +#endif + +#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QDOCKWINDOW) && !defined(Q_EXPORTED_QPTRLISTDOCWINDOW_TEMPLATES) +#define Q_EXPORTED_QPTRLISTDOCWINDOW_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList; +#endif + +#if defined(Q_DEFINED_QPTRVECTOR) && !defined(Q_EXPORTED_QPTRVECTOR_BASIC_TEMPLATES) +#define Q_EXPORTED_QPTRVECTOR_BASIC_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; +#endif + +#if defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QSTYLESHEET) && !defined(Q_EXPORTED_QPTRVECTORSTYLESHEETITEM_TEMPLATES) +#define Q_EXPORTED_QPTRVECTORSTYLESHEETITEM_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; +#endif + +#if defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QWIDGET) && !defined(Q_EXPORTED_QPTRVECTORWIDGET_TEMPLATES) +#define Q_EXPORTED_QPTRVECTORWIDGET_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; +#endif + +#if defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QCONNECTION_LIST) && !defined(Q_EXPORTED_QPTRVECTORCONNECTTIONLIST_TEMPLATES) +#define Q_EXPORTED_QPTRVECTORCONNECTTIONLIST_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; +#endif + +#if defined(Q_DEFINED_QVALUELIST) && !defined(Q_EXPORTED_QVALUELIST_BASIC_TEMPLATES) +#define Q_EXPORTED_QVALUELIST_BASIC_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; +#endif + +#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QRECT) && !defined(Q_EXPORTED_QVALUELISTRECT_TEMPLATES) +#define Q_EXPORTED_QVALUELISTRECT_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; +#endif + +#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QVALUELISTSTRING_TEMPLATES) +#define Q_EXPORTED_QVALUELISTSTRING_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueListIterator; +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; +#endif + +// TQStylesheet template exports +#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QPTRVECTOR) && defined(Q_DEFINED_QSTYLESHEET) && !defined(Q_EXPORTED_QSTYLESHEETITEM1_TEMPLATES) +#define Q_EXPORTED_QSTYLESHEETITEM1_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList< TQPtrVector< TQStyleSheetItem> >; +#endif + +#if defined(Q_DEFINED_QVALUELIST) && defined(Q_DEFINED_QSTYLESHEET) && !defined(Q_EXPORTED_QSTYLESHEETITEM2_TEMPLATES) +#define Q_EXPORTED_QSTYLESHEETITEM2_TEMPLATES +Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueList; +#endif + +// tqcanvas template exports +#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QCANVAS) && !defined(Q_EXPORTED_QCANVAS1_TEMPLATES) +#define Q_EXPORTED_QCANVAS1_TEMPLATES +TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrListIterator< TQCanvasItem >; +TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrList< TQCanvasItem >; +TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrListIterator< TQCanvasView >; +TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQPtrList< TQCanvasView >; +#endif + +// tqtable template exports +#if defined(Q_DEFINED_QPTRLIST) && defined(Q_DEFINED_QTABLE_SELECTION) && !defined(Q_EXPORTED_QTABLESELECTION_TEMPLATES) +#define Q_EXPORTED_QTABLESELECTION_TEMPLATES +TQM_TEMPLATE_EXTERN_TABLE template class TQM_EXPORT_TABLE TQPtrList; +#endif + +#if defined(Q_DEFINED_QTABLE_ITEM) && defined(Q_DEFINED_QPTRVECTOR) && !defined(Q_EXPORTED_QTABLEITEM_TEMPLATES) +#define Q_EXPORTED_QTABLEITEM_TEMPLATES +TQM_TEMPLATE_EXTERN_TABLE template class TQM_EXPORT_TABLE TQPtrVector; +#endif + +#if defined(Q_DEFINED_QTABLE) && defined(Q_DEFINED_QPTRVECTOR) +//Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrVector; +#endif + +// tqsqlextension template exports +#if defined(Q_DEFINED_QSQLEXTENSION) && defined(Q_DEFINED_QMAP) && defined(Q_DEFINED_QVALUEVECTOR) && defined(Q_DEFINED_QSTRING) && !defined(Q_EXPORTED_QSQLEXTENSION_TEMPLATES) +#define Q_EXPORTED_QSQLEXTENSION_TEMPLATES +TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQMap; +TQM_TEMPLATE_EXTERN_SQL template class TQM_EXPORT_SQL TQValueVector; +#endif + + +// MOC_SKIP_END +#endif // template defined -- cgit v1.2.1