diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
commit | 10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch) | |
tree | 4bc444c00a79e88105f2cfce5b6209994c413ca0 /kdecore/kgenericfactory.tcc | |
parent | 307136d8eef0ba133b78ceee8e901138d4c996a1 (diff) | |
download | tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kgenericfactory.tcc')
-rw-r--r-- | kdecore/kgenericfactory.tcc | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kdecore/kgenericfactory.tcc b/kdecore/kgenericfactory.tcc index cee230b53..41cd77824 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 <class Product, class ParentType = TQObject> + template <class Product, class ParentType = QObject> class ConcreteFactory { public: typedef typename If< PartInheritanceTest< Product >::Result, KParts::Part, typename If< QWidgetInheritanceTest< Product >::Result, - QWidget, TQObject >::Result >::Result BaseType; + QWidget, QObject >::Result >::Result BaseType; - static inline Product *create( QWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name, + static inline Product *create( QWidget *parentWidget, const char *widgetName, + QObject *parent, const char *name, const char *className, const QStringList &args ) { - QMetaObject *tqmetaObject = Product::staticMetaObject(); - while ( tqmetaObject ) + QMetaObject *metaObject = Product::staticMetaObject(); + while ( metaObject ) { - if ( !qstrcmp( className, tqmetaObject->className() ) ) - return create( tqparentWidget, widgetName, + if ( !qstrcmp( className, metaObject->className() ) ) + return create( parentWidget, widgetName, parent, name, args, Type2Type<BaseType>() ); - tqmetaObject = tqmetaObject->superClass(); + metaObject = metaObject->superClass(); } return 0; } @@ -139,15 +139,15 @@ namespace KDEPrivate typedef typename If< QWidgetInheritanceTest<ParentType>::Result, ParentType, QWidget >::Result WidgetParentType; - static inline Product *create( QWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name, + static inline Product *create( QWidget *parentWidget, const char *widgetName, + QObject *parent, const char *name, const QStringList &args, Type2Type<KParts::Part> ) { - return new Product( tqparentWidget, widgetName, parent, name, args ); + return new Product( parentWidget, widgetName, parent, name, args ); } - static inline Product *create( QWidget* /*tqparentWidget*/, const char* /*widgetName*/, - TQObject *parent, const char *name, + static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/, + QObject *parent, const char *name, const QStringList &args, Type2Type<QWidget> ) { @@ -157,9 +157,9 @@ namespace KDEPrivate return new Product( p, name, args ); } - static inline Product *create( QWidget* /*tqparentWidget*/, const char* /*widgetName*/, - TQObject *parent, const char *name, - const QStringList &args, Type2Type<TQObject> ) + static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/, + QObject *parent, const char *name, + const QStringList &args, Type2Type<QObject> ) { ParentType *p = dynamic_cast<ParentType *>( 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 <class Product, class ParentType = TQObject> + template <class Product, class ParentType = QObject> class MultiFactory { public: - inline static TQObject *create( QWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name, + inline static QObject *create( QWidget *parentWidget, const char *widgetName, + QObject *parent, const char *name, const char *className, const QStringList &args ) { - return ConcreteFactory<Product, ParentType>::create( tqparentWidget, widgetName, + return ConcreteFactory<Product, ParentType>::create( parentWidget, widgetName, parent, name, className, args ); } @@ -193,7 +193,7 @@ namespace KDEPrivate class MultiFactory<KDE::NullType> { public: - inline static TQObject *create( QWidget *, const char *, TQObject *, + inline static QObject *create( QWidget *, const char *, QObject *, const char *, const char *, const QStringList & ) { return 0; } @@ -205,29 +205,29 @@ namespace KDEPrivate class MultiFactory<KDE::NullType, KDE::NullType> { public: - inline static TQObject *create( QWidget *, const char *, TQObject *, + inline static QObject *create( QWidget *, const char *, QObject *, const char *, const char *, const QStringList & ) { return 0; } }; template <class Product, class ProductListTail> - class MultiFactory< KTypeList<Product, ProductListTail>, TQObject > + class MultiFactory< KTypeList<Product, ProductListTail>, QObject > { public: - inline static TQObject *create( QWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name, + inline static QObject *create( QWidget *parentWidget, const char *widgetName, + QObject *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. - TQObject *object = MultiFactory<Product>::create( tqparentWidget, widgetName, + QObject *object = MultiFactory<Product>::create( parentWidget, widgetName, parent, name, className, args ); if ( !object ) - object = MultiFactory<ProductListTail>::create( tqparentWidget, widgetName, + object = MultiFactory<ProductListTail>::create( parentWidget, widgetName, parent, name, className, args ); @@ -241,15 +241,15 @@ namespace KDEPrivate KTypeList<ParentType, ParentTypeListTail> > { public: - inline static TQObject *create( QWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name, + inline static QObject *create( QWidget *parentWidget, const char *widgetName, + QObject *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. - TQObject *object = MultiFactory<Product, ParentType> - ::create( tqparentWidget, widgetName, + QObject *object = MultiFactory<Product, ParentType> + ::create( parentWidget, 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<ProductListTail, ParentTypeListTail> - ::create( tqparentWidget, widgetName, + ::create( parentWidget, widgetName, parent, name, className, args ); return object; |