diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-01 22:40:03 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-01 22:40:03 +0000 |
commit | df2e39d7a8ad016787dfe560842828580c109d1d (patch) | |
tree | 3c319c4ae489ed50b344c4d2437ee050912554d4 /qtinterface | |
parent | d88be03ff79b47d2211d719652430eb3780cfc87 (diff) | |
download | tqtinterface-df2e39d7a8ad016787dfe560842828580c109d1d.tar.gz tqtinterface-df2e39d7a8ad016787dfe560842828580c109d1d.zip |
Additional FTBFS fixes
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1210728 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtinterface')
-rw-r--r-- | qtinterface/tqobject.cpp | 36 | ||||
-rw-r--r-- | qtinterface/tqobject.h | 7 | ||||
-rw-r--r-- | qtinterface/tqobjectlist.h | 52 | ||||
-rw-r--r-- | qtinterface/tqt.h | 28 |
4 files changed, 115 insertions, 8 deletions
diff --git a/qtinterface/tqobject.cpp b/qtinterface/tqobject.cpp index 3029a5f..351e799 100644 --- a/qtinterface/tqobject.cpp +++ b/qtinterface/tqobject.cpp @@ -22,6 +22,40 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <tqobject.h> +#ifdef USE_QT3 +#include <qobjectlist.h> +#include "tqobjectlist.h" + +const TQObjectList TQObject::tqchildren() const +{ +// return *children(); + + QObjectList qlr; + TQObjectList tqt_tqobject_list; + qlr = *(this->children()); + tqt_tqobject_list.clear(); + for (int i = 0; i < qlr.count(); ++i) { + tqt_tqobject_list.append(static_cast<TQObject*>(qlr.at(i))); + } + return tqt_tqobject_list; +} + +const TQObjectList TQObject::tqobjectTrees() +{ +// return *objectTrees(); + + QObjectList qlr; + TQObjectList tqt_tqobject_list; + qlr = *objectTrees(); + tqt_tqobject_list.clear(); + for (int i = 0; i < qlr.count(); ++i) { + tqt_tqobject_list.append(static_cast<TQObject*>(qlr.at(i))); + } + return tqt_tqobject_list; +} + +#endif // USE_QT3 + #ifdef USE_QT4 const QObjectList *QObject::objectTrees() { @@ -51,4 +85,4 @@ bool QObject::qt_invoke(int slot, QUObject* uo) { return method.invoke(this, Qt::DirectConnection); } -#endif
\ No newline at end of file +#endif diff --git a/qtinterface/tqobject.h b/qtinterface/tqobject.h index 72e3ec8..ca133ee 100644 --- a/qtinterface/tqobject.h +++ b/qtinterface/tqobject.h @@ -30,7 +30,8 @@ Boston, MA 02110-1301, USA. // For Qt3, no changes are needed #include <qobject.h> -#include <qobjectlist.h> + +class TQObjectList; class TQObject : public QObject { @@ -39,7 +40,9 @@ class TQObject : public QObject public: inline TQObject( QObject *tqparent=0, const char *name=0 ) : QObject ( tqparent, name ) {} - inline const TQObjectList tqchildren() const { return *children(); } + const TQObjectList tqchildren() const; + static const TQObjectList tqobjectTrees(); + inline TQObject *tqparent() const { return TQT_TQOBJECT(parent()); } // Interoperability static const TQObject& convertFromQObject( QObject& ql ); diff --git a/qtinterface/tqobjectlist.h b/qtinterface/tqobjectlist.h index 1286100..0c519b4 100644 --- a/qtinterface/tqobjectlist.h +++ b/qtinterface/tqobjectlist.h @@ -29,7 +29,55 @@ Boston, MA 02110-1301, USA. // Reimplement the QObjectList class // For Qt3, no changes are needed -#include <qobjectlist.h> +//#include <qobjectlist.h> + +//#ifndef TQT_H +#include "tqobject.h" +#include "tqptrlist.h" +//#endif // TQT_H + + +#if defined(TQ_TEMPLATEDLL) +//TQ_TEMPLATE_EXTERN template class Q_EXPORT TQPtrList<TQObject>; +//TQ_TEMPLATE_EXTERN template class Q_EXPORT TQPtrListIterator<TQObject>; +#endif + + +class Q_EXPORT TQObjectList : public TQPtrList<TQObject> +{ +public: + TQObjectList() : TQPtrList<TQObject>() {} + TQObjectList( const TQObjectList &list ) : TQPtrList<TQObject>(list) {} + ~TQObjectList() { clear(); } + TQObjectList &operator=(const TQObjectList &list) + { return (TQObjectList&)TQPtrList<TQObject>::operator=(list); } +}; + +class Q_EXPORT TQObjectListIterator : public TQPtrListIterator<TQObject> +{ +public: + TQObjectListIterator( const TQObjectList &l ) + : TQPtrListIterator<TQObject>( l ) { } + TQObjectListIterator &operator=( const TQObjectListIterator &i ) + { return (TQObjectListIterator&) + TQPtrListIterator<TQObject>::operator=( i ); } +}; + +#if (TQT_VERSION-0 >= 0x040000) +#if defined(TQ_CC_GNU) +#warning "remove the TQObjectListIt class" +#warning "remove the typedef too, maybe" +#endif +typedef TQObjectListIterator TQObjectListIt; +#else +class Q_EXPORT TQObjectListIt : public TQPtrListIterator<TQObject> +{ +public: + TQObjectListIt( const TQObjectList &l ) : TQPtrListIterator<TQObject>(l) {} + TQObjectListIt &operator=(const TQObjectListIt &i) + { return (TQObjectListIt&)TQPtrListIterator<TQObject>::operator=(i); } +}; +#endif #endif // USE_QT3 @@ -42,4 +90,4 @@ Boston, MA 02110-1301, USA. #endif // USE_QT4 -#endif /* TQOBJECTLIST_H */
\ No newline at end of file +#endif /* TQOBJECTLIST_H */ diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h index fdd3e94..6254419 100644 --- a/qtinterface/tqt.h +++ b/qtinterface/tqt.h @@ -49,6 +49,8 @@ Boston, MA 02110-1301, USA. #endif // __cplusplus #ifdef USE_QT3 +#define TQ_OBJECT /* UNUSED */ + #define qint64 long #define quint64 unsigned long @@ -365,6 +367,7 @@ Boston, MA 02110-1301, USA. #define TQCustomMenuItem QCustomMenuItem #define TQMenuData QMenuData #define TQMessageBox QMessageBox +#define TQMetaData QMetaData #define TQMetaProperty QMetaProperty #define TQMetaObject QMetaObject #define TQMetaObjectCleanUp QMetaObjectCleanUp @@ -389,9 +392,9 @@ Boston, MA 02110-1301, USA. //#define TQObject QObject #define TQObjectUserData QObjectUserData //#define TQObject QObject -#define TQObjectList QObjectList -#define TQObjectListIterator QObjectListIterator -#define TQObjectListIt QObjectListIt +//#define TQObjectList QObjectList +//#define TQObjectListIterator QObjectListIterator +//#define TQObjectListIt QObjectListIt #define TQPaintDevice QPaintDevice #define TQPaintDeviceMetrics QPaintDeviceMetrics #define TQColorGroup QColorGroup @@ -599,6 +602,20 @@ Boston, MA 02110-1301, USA. #define TQMOC MOC #define TQRGB_MASK RGB_MASK +#define TQ_INT8 Q_INT8 +#define TQ_INT16 Q_INT16 +#define TQ_INT32 Q_INT32 +#define TQ_INT64 Q_INT64 +#define TQ_UINT8 Q_UINT8 +#define TQ_UINT16 Q_UINT16 +#define TQ_UINT32 Q_UINT32 +#define TQ_UINT64 Q_UINT64 + +#define TQ_LONG Q_LONG +#define TQ_LLONG Q_LLONG +#define TQ_ULONG Q_ULONG +#define TQ_ULLONG Q_ULLONG + #define tqRed qRed #define tqGreen qGreen #define tqBlue qBlue @@ -656,9 +673,14 @@ Boston, MA 02110-1301, USA. #define tqdrawTextItem drawTextItem #define tqsetLibraryPaths setLibraryPaths #define tqsetColorGroup setColorGroup +#define tqfindRev findRev +#define tqfindProperty findProperty +#define tqfindSlot findSlot #define TQUObject QUObject +#define tqt_mo_access access + // BEGIN BLOCK ONE // This block of text is taken (mostly) straight from TQt for Qt4 tqtglobaldefines.h // It will need to be updated now and then as TQt for Qt4 changes |