API more in line with TQt for Qt4 3.4.0 TPI

This WILL cause Trinity build failures


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1210711 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 726035ac64
commit d88be03ff7

@ -142,11 +142,11 @@ include ../admin/Doxyfile.am
if USE_QT3 if USE_QT3
QT_VER_REPLACE = s/QT_VER=X/QT_VER=3/g QT_VER_REPLACE = s/QT_VER=X/QT_VER=3/g
QT_HVER_REPLACE = s/USE_QTX/USE_QT3/g QT_HVER_REPLACE = 25s/USE_QTX/USE_QT3/g
endif endif
if USE_QT4 if USE_QT4
QT_VER_REPLACE = s/QT_VER=X/QT_VER=4/g QT_VER_REPLACE = s/QT_VER=X/QT_VER=4/g
QT_HVER_REPLACE = s/USE_QTX/USE_QT4/g QT_HVER_REPLACE = 25s/USE_QTX/USE_QT4/g
endif endif
install-exec-local: install-exec-local:
@ -164,4 +164,4 @@ install-exec-local:
sed -i '$(QT_VER_REPLACE)' "$(DESTDIR)$(bindir)/tqt-replace" sed -i '$(QT_VER_REPLACE)' "$(DESTDIR)$(bindir)/tqt-replace"
sed -i '$(QT_VER_REPLACE)' "$(DESTDIR)$(bindir)/tqt-replace-stream" sed -i '$(QT_VER_REPLACE)' "$(DESTDIR)$(bindir)/tqt-replace-stream"
sed -i '$(QT_HVER_REPLACE)' "$(srcdir)/tqt.h" sed -i '$(QT_HVER_REPLACE)' "$(srcdir)/tqt.h"
cp -Rp "$(srcdir)/tqt4/" "$(DESTDIR)$(includedir)/" cp -Rp "$(srcdir)/tqt4/" "$(DESTDIR)$(includedir)/"

@ -30,6 +30,25 @@ Boston, MA 02110-1301, USA.
// For Qt3, no changes are needed // For Qt3, no changes are needed
#include <qobject.h> #include <qobject.h>
#include <qobjectlist.h>
class TQObject : public QObject
{
Q_OBJECT
public:
inline TQObject( QObject *tqparent=0, const char *name=0 ) : QObject ( tqparent, name ) {}
inline const TQObjectList tqchildren() const { return *children(); }
// Interoperability
static const TQObject& convertFromQObject( QObject& ql );
};
// Interoperability
inline static const TQObject& convertFromQObject( const QObject& qo ) {
return (*static_cast<const TQObject*>(&qo));
}
#endif // USE_QT3 #endif // USE_QT3
@ -42,4 +61,4 @@ Boston, MA 02110-1301, USA.
#endif // USE_QT4 #endif // USE_QT4
#endif /* TQOBJECT_H */ #endif /* TQOBJECT_H */

@ -22,7 +22,11 @@ Boston, MA 02110-1301, USA.
#ifndef TQT_H #ifndef TQT_H
#define TQT_H #define TQT_H
#define USE_QTX #define USE_QTX // WARNING: KEEP THIS ON LINE 25 AT ALL TIMES OTHERWISE BUILD FAILURE WILL OCCUR
#ifdef USE_QTX
#define USE_QT3 // Default to Qt3
#endif
#ifdef USE_QT4 #ifdef USE_QT4
#define QT3_SUPPORT #define QT3_SUPPORT
@ -382,9 +386,9 @@ Boston, MA 02110-1301, USA.
#define TQNetworkOperation QNetworkOperation #define TQNetworkOperation QNetworkOperation
#define TQObjectCleanupHandler QObjectCleanupHandler #define TQObjectCleanupHandler QObjectCleanupHandler
#define TQObjectDictionary QObjectDictionary #define TQObjectDictionary QObjectDictionary
#define TQObject QObject //#define TQObject QObject
#define TQObjectUserData QObjectUserData #define TQObjectUserData QObjectUserData
#define TQObject QObject //#define TQObject QObject
#define TQObjectList QObjectList #define TQObjectList QObjectList
#define TQObjectListIterator QObjectListIterator #define TQObjectListIterator QObjectListIterator
#define TQObjectListIt QObjectListIt #define TQObjectListIt QObjectListIt
@ -614,7 +618,7 @@ Boston, MA 02110-1301, USA.
#define tqStatus Status #define tqStatus Status
#define tqmetaObject metaObject #define tqmetaObject metaObject
#define tqfind find #define tqfind find
#define tqchildren children //#define tqchildren children
#define tqsetObjectName setObjectName #define tqsetObjectName setObjectName
#define tqtopLevelWidget topLevelWidget #define tqtopLevelWidget topLevelWidget
#define tqparent parent #define tqparent parent
@ -683,7 +687,7 @@ Boston, MA 02110-1301, USA.
#define TQT_TQMETAOBJECT(x) (static_cast<TQMetaObject*>(static_cast<QMetaObject*>(x))) #define TQT_TQMETAOBJECT(x) (static_cast<TQMetaObject*>(static_cast<QMetaObject*>(x)))
#define TQT_TQSTYLEOPTION(x) (static_cast<TQStyleOption*>(static_cast<TQStyleOption*>(x))) #define TQT_TQSTYLEOPTION(x) (static_cast<TQStyleOption*>(static_cast<TQStyleOption*>(x)))
#define TQT_TQOBJECT_OBJECT(x) x #define TQT_TQOBJECT_OBJECT(x) (convertFromQObject(x))
#define TQT_TQSIZEPOLICY_OBJECT(x) x #define TQT_TQSIZEPOLICY_OBJECT(x) x
#define TQT_TQLAYOUT_OBJECT(x) x #define TQT_TQLAYOUT_OBJECT(x) x
#define TQT_TQCOLOR_OBJECT(x) x #define TQT_TQCOLOR_OBJECT(x) x

Loading…
Cancel
Save