From f7e71d47719ab6094cf4a9fafffa5ea351973522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 13 Jan 2011 08:32:36 +0000 Subject: Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kparts/componentfactory.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'kparts/componentfactory.h') diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h index 7e9de4280..3e6578781 100644 --- a/kparts/componentfactory.h +++ b/kparts/componentfactory.h @@ -63,7 +63,7 @@ namespace KParts const TQStringList &args = TQStringList() ) { TQObject *object = factory->create( parent, name, - T::staticMetaObject()->className(), + T::tqstaticMetaObject()->className(), args ); T *result = dynamic_cast( object ); @@ -82,7 +82,7 @@ namespace KParts * \endcode * * @param factory The factory to ask for the creation of the component - * @param parentWidget the parent widget for the part + * @param tqparentWidget the parent widget for the part * @param widgetName the name of the part's widget * @param parent The parent object (see TQObject constructor) * @param name The name of the object to create (see TQObject constructor) @@ -93,13 +93,13 @@ namespace KParts */ template static T *createPartInstanceFromFactory( KParts::Factory *factory, - TQWidget *parentWidget = 0, + TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const TQStringList &args = TQStringList() ) { - KParts::Part *object = factory->createPart( parentWidget, widgetName, + KParts::Part *object = factory->createPart( tqparentWidget, widgetName, parent, name, T::staticMetaObject()->className(), args ); @@ -156,7 +156,7 @@ namespace KParts template static T *createPartInstanceFromLibrary( const char *libraryName, - TQWidget *parentWidget = 0, + TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, @@ -186,7 +186,7 @@ namespace KParts *error = ErrNoFactory; return 0; } - T *res = createPartInstanceFromFactory( partFactory, parentWidget, + T *res = createPartInstanceFromFactory( partFactory, tqparentWidget, widgetName, parent, name, args ); if ( !res ) { @@ -218,7 +218,7 @@ namespace KParts template static T *createPartInstanceFromService( const KService::Ptr &service, - TQWidget *parentWidget = 0, + TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, @@ -233,7 +233,7 @@ namespace KParts return 0; } - return createPartInstanceFromLibrary( library.local8Bit().data(), parentWidget, + return createPartInstanceFromLibrary( library.local8Bit().data(), tqparentWidget, widgetName, parent, name, args, error ); } @@ -267,7 +267,7 @@ namespace KParts template static T *createPartInstanceFromServices( ServiceIterator begin, ServiceIterator end, - TQWidget *parentWidget = 0, + TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, @@ -281,7 +281,7 @@ namespace KParts if ( error ) *error = 0; - T *component = createPartInstanceFromService( service, parentWidget, + T *component = createPartInstanceFromService( service, tqparentWidget, widgetName, parent, name, args, error ); if ( component ) @@ -344,18 +344,18 @@ namespace KParts * You can use this method to create a generic viewer - that can display any * kind of file, provided that there is a ReadOnlyPart installed for it - in 5 lines: * \code - * // Given the following: KURL url, TQWidget* parentWidget and TQObject* parentObject. + * // Given the following: KURL url, TQWidget* tqparentWidget and TQObject* parentObject. * TQString mimetype = KMimeType::findByURL( url )->name(); - * KParts::ReadOnlyPart* part = KParts::ComponentFactory::createPartInstanceFromQuery( mimetype, TQString::null, parentWidget, 0, parentObject, 0 ); + * KParts::ReadOnlyPart* part = KParts::ComponentFactory::createPartInstanceFromQuery( mimetype, TQString::null, tqparentWidget, 0, parentObject, 0 ); * if ( part ) { * part->openURL( url ); - * part->widget()->show(); // also insert the widget into a layout, or simply use a TQVBox as parentWidget + * part->widget()->show(); // also insert the widget into a layout, or simply use a TQVBox as tqparentWidget * } * \endcode * * @param serviceType the type of service for which to find a part, e.g. a mimetype * @param constraint an optional constraint to pass to the trader (see KTrader) - * @param parentWidget the parent widget, will be set as the parent of the part's widget + * @param tqparentWidget the parent widget, will be set as the parent of the part's widget * @param widgetName the name that will be given to the part's widget * @param parent the parent object for the part itself * @param name the name that will be given to the part @@ -369,14 +369,14 @@ namespace KParts template static T *createPartInstanceFromQuery( const TQString &serviceType, const TQString &constraint, - TQWidget *parentWidget = 0, + TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const TQStringList &args = TQStringList(), int *error = 0 ) { - KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::fromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); + KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::tqfromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); if ( offers.isEmpty() ) { if ( error ) @@ -385,7 +385,7 @@ namespace KParts } return createPartInstanceFromServices( offers.begin(), offers.end(), - parentWidget, widgetName, + tqparentWidget, widgetName, parent, name, args, error ); } -- cgit v1.2.1