From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/kgenericfactory.tcc | 66 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'kdecore/kgenericfactory.tcc') diff --git a/kdecore/kgenericfactory.tcc b/kdecore/kgenericfactory.tcc index 41cd77824..cee230b53 100644 --- a/kdecore/kgenericfactory.tcc +++ b/kdecore/kgenericfactory.tcc @@ -112,26 +112,26 @@ namespace KDEPrivate // but not least the standard default constructor of parent/name . // the choice of the right constructor is done using an ordered inheritance // test. - template + template class ConcreteFactory { public: typedef typename If< PartInheritanceTest< Product >::Result, KParts::Part, typename If< QWidgetInheritanceTest< Product >::Result, - QWidget, QObject >::Result >::Result BaseType; + QWidget, TQObject >::Result >::Result BaseType; - static inline Product *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, + static inline Product *create( QWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, const char *className, const QStringList &args ) { - QMetaObject *metaObject = Product::staticMetaObject(); - while ( metaObject ) + QMetaObject *tqmetaObject = Product::staticMetaObject(); + while ( tqmetaObject ) { - if ( !qstrcmp( className, metaObject->className() ) ) - return create( parentWidget, widgetName, + if ( !qstrcmp( className, tqmetaObject->className() ) ) + return create( tqparentWidget, widgetName, parent, name, args, Type2Type() ); - metaObject = metaObject->superClass(); + tqmetaObject = tqmetaObject->superClass(); } return 0; } @@ -139,15 +139,15 @@ namespace KDEPrivate typedef typename If< QWidgetInheritanceTest::Result, ParentType, QWidget >::Result WidgetParentType; - static inline Product *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, + static inline Product *create( QWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, const QStringList &args, Type2Type ) { - return new Product( parentWidget, widgetName, parent, name, args ); + return new Product( tqparentWidget, widgetName, parent, name, args ); } - static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/, - QObject *parent, const char *name, + static inline Product *create( QWidget* /*tqparentWidget*/, const char* /*widgetName*/, + TQObject *parent, const char *name, const QStringList &args, Type2Type ) { @@ -157,9 +157,9 @@ namespace KDEPrivate return new Product( p, name, args ); } - static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/, - QObject *parent, const char *name, - const QStringList &args, Type2Type ) + static inline Product *create( QWidget* /*tqparentWidget*/, const char* /*widgetName*/, + TQObject *parent, const char *name, + const QStringList &args, Type2Type ) { ParentType *p = dynamic_cast( parent ); if ( parent && !p ) @@ -171,16 +171,16 @@ namespace KDEPrivate // this template is used to iterate through the typelist and call the // concrete factory for each type. the specializations of this template // are the ones actually being responsible for iterating, in fact. - template + template class MultiFactory { public: - inline static QObject *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, + inline static TQObject *create( QWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, const char *className, const QStringList &args ) { - return ConcreteFactory::create( parentWidget, widgetName, + return ConcreteFactory::create( tqparentWidget, widgetName, parent, name, className, args ); } @@ -193,7 +193,7 @@ namespace KDEPrivate class MultiFactory { public: - inline static QObject *create( QWidget *, const char *, QObject *, + inline static TQObject *create( QWidget *, const char *, TQObject *, const char *, const char *, const QStringList & ) { return 0; } @@ -205,29 +205,29 @@ namespace KDEPrivate class MultiFactory { public: - inline static QObject *create( QWidget *, const char *, QObject *, + inline static TQObject *create( QWidget *, const char *, TQObject *, const char *, const char *, const QStringList & ) { return 0; } }; template - class MultiFactory< KTypeList, QObject > + class MultiFactory< KTypeList, TQObject > { public: - inline static QObject *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, + inline static TQObject *create( QWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, const char *className, const QStringList &args ) { // try with the head of the typelist first. the head is always // a concrete type. - QObject *object = MultiFactory::create( parentWidget, widgetName, + TQObject *object = MultiFactory::create( tqparentWidget, widgetName, parent, name, className, args ); if ( !object ) - object = MultiFactory::create( parentWidget, widgetName, + object = MultiFactory::create( tqparentWidget, widgetName, parent, name, className, args ); @@ -241,15 +241,15 @@ namespace KDEPrivate KTypeList > { public: - inline static QObject *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, + inline static TQObject *create( QWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, const char *className, const QStringList &args ) { // try with the head of the typelist first. the head is always // a concrete type. - QObject *object = MultiFactory - ::create( parentWidget, widgetName, + TQObject *object = MultiFactory + ::create( tqparentWidget, widgetName, parent, name, className, args ); // if that failed continue by advancing the typelist, calling this @@ -257,7 +257,7 @@ namespace KDEPrivate // at the end we reach the nulltype specialization. if ( !object ) object = MultiFactory - ::create( parentWidget, widgetName, + ::create( tqparentWidget, widgetName, parent, name, className, args ); return object; -- cgit v1.2.1