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 --- kresources/configdialog.cpp | 2 +- kresources/configpage.cpp | 16 ++++++++-------- kresources/configwidget.h | 2 +- kresources/factory.cpp | 10 +++++----- kresources/manager.h | 2 +- kresources/managerimpl.cpp | 12 ++++++------ kresources/resource.h | 2 +- kresources/selectdialog.cpp | 4 ++-- 8 files changed, 25 insertions(+), 25 deletions(-) (limited to 'kresources') diff --git a/kresources/configdialog.cpp b/kresources/configdialog.cpp index bbebc47a3..a705fda3a 100644 --- a/kresources/configdialog.cpp +++ b/kresources/configdialog.cpp @@ -82,7 +82,7 @@ ConfigDialog::ConfigDialog( TQWidget *parent, const TQString& resourceFamily, TQT_SLOT( slotNameChanged(const TQString &))); slotNameChanged( mName->text() ); - setMinimumSize( sizeHint() ); + setMinimumSize( tqsizeHint() ); } void ConfigDialog::setInEditMode( bool value ) diff --git a/kresources/configpage.cpp b/kresources/configpage.cpp index 5e5e61198..46f7bfa79 100644 --- a/kresources/configpage.cpp +++ b/kresources/configpage.cpp @@ -58,7 +58,7 @@ ResourcePageInfo::~ResourcePageInfo() { } -class ConfigViewItem : public QCheckListItem +class ConfigViewItem : public TQCheckListItem { public: ConfigViewItem( TQListView *parent, Resource* resource ) : @@ -122,13 +122,13 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name ) groupBoxLayout->addWidget( mListView, 1, 0 ); connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ), this, TQT_SLOT( slotEdit() ) ); - KButtonBox *buttonBox = new KButtonBox( groupBox, Vertical ); - mAddButton = buttonBox->addButton( i18n( "&Add..." ), this, TQT_SLOT(slotAdd()) ); - mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, TQT_SLOT(slotRemove()) ); + KButtonBox *buttonBox = new KButtonBox( groupBox, Qt::Vertical ); + mAddButton = buttonBox->addButton( i18n( "&Add..." ), TQT_TQOBJECT(this), TQT_SLOT(slotAdd()) ); + mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), TQT_TQOBJECT(this), TQT_SLOT(slotRemove()) ); mRemoveButton->setEnabled( false ); - mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, TQT_SLOT(slotEdit()) ); + mEditButton = buttonBox->addButton( i18n( "&Edit..." ), TQT_TQOBJECT(this), TQT_SLOT(slotEdit()) ); mEditButton->setEnabled( false ); - mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), this, TQT_SLOT(slotStandard()) ); + mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), TQT_TQOBJECT(this), TQT_SLOT(slotStandard()) ); mStandardButton->setEnabled( false ); buttonBox->layout(); @@ -179,7 +179,7 @@ void ConfigPage::load() KTrader::OfferList::ConstIterator end = plugins.end(); for ( ; it != end; ++it ) { const TQString family = (*it)->property( "X-KDE-ResourceFamily" ).toString(); - if ( compatFamilyNames.find( family ) == compatFamilyNames.end() ) + if ( compatFamilyNames.tqfind( family ) == compatFamilyNames.end() ) compatFamilyNames.append( family ); } @@ -300,7 +300,7 @@ void ConfigPage::slotAdd() if ( !ok ) return; - TQString type = types[ descs.findIndex( desc ) ]; + TQString type = types[ descs.tqfindIndex( desc ) ]; // Create new resource Resource *resource = mCurrentManager->createResource( type ); diff --git a/kresources/configwidget.h b/kresources/configwidget.h index 47917edd3..3a2fe3f55 100644 --- a/kresources/configwidget.h +++ b/kresources/configwidget.h @@ -30,7 +30,7 @@ namespace KRES { -class KRESOURCES_EXPORT ConfigWidget : public QWidget +class KRESOURCES_EXPORT ConfigWidget : public TQWidget { Q_OBJECT public: diff --git a/kresources/factory.cpp b/kresources/factory.cpp index 462d6be9c..14f905603 100644 --- a/kresources/factory.cpp +++ b/kresources/factory.cpp @@ -45,7 +45,7 @@ Factory *Factory::self( const TQString& resourceFamily ) if ( !mSelves ) staticDeleter.setObject( mSelves, new TQDict ); - factory = mSelves->find( resourceFamily ); + factory = mSelves->tqfind( resourceFamily ); if ( !factory ) { factory = new Factory( resourceFamily ); @@ -79,7 +79,7 @@ TQStringList Factory::typeNames() const ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent ) { - if ( type.isEmpty() || !mTypeMap.contains( type ) ) + if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) return 0; KService::Ptr ptr = mTypeMap[ type ]; @@ -109,7 +109,7 @@ ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent ) TQString Factory::typeName( const TQString &type ) const { - if ( type.isEmpty() || !mTypeMap.contains( type ) ) + if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) return TQString(); KService::Ptr ptr = mTypeMap[ type ]; @@ -118,7 +118,7 @@ TQString Factory::typeName( const TQString &type ) const TQString Factory::typeDescription( const TQString &type ) const { - if ( type.isEmpty() || !mTypeMap.contains( type ) ) + if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) return TQString(); KService::Ptr ptr = mTypeMap[ type ]; @@ -129,7 +129,7 @@ Resource *Factory::resource( const TQString& type, const KConfig *config ) { kdDebug(5650) << "Factory::resource( " << type << ", config )" << endl; - if ( type.isEmpty() || !mTypeMap.contains( type ) ) { + if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) { kdDebug(5650) << "Factory::resource() no such type " << type << endl; return 0; } diff --git a/kresources/manager.h b/kresources/manager.h index ab1562716..c11ecaab5 100644 --- a/kresources/manager.h +++ b/kresources/manager.h @@ -335,7 +335,7 @@ class Manager : private ManagerNotifier ++it ) { TQString desc = mFactory->typeName( *it ); if ( !mFactory->typeDescription( *it ).isEmpty() ) - desc += TQString::fromLatin1(" (") + mFactory->typeDescription( *it ) + TQString::fromLatin1(")"); + desc += TQString::tqfromLatin1(" (") + mFactory->typeDescription( *it ) + TQString::tqfromLatin1(")"); typeDescs.append( desc ); } diff --git a/kresources/managerimpl.cpp b/kresources/managerimpl.cpp index b5d9ec32f..15dd33428 100644 --- a/kresources/managerimpl.cpp +++ b/kresources/managerimpl.cpp @@ -353,7 +353,7 @@ Resource *ManagerImpl::readResourceConfig( const TQString &identifier, if ( checkActive ) { TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" ); - resource->setActive( activeKeys.contains( identifier ) ); + resource->setActive( activeKeys.tqcontains( identifier ) ); } mResources.append( resource ); @@ -383,20 +383,20 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive ) TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" ); TQStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" ); if ( resource->isActive() ) { - if ( passiveKeys.contains( key ) ) { // remove it from passive list + if ( passiveKeys.tqcontains( key ) ) { // remove it from passive list passiveKeys.remove( key ); mConfig->writeEntry( "PassiveResourceKeys", passiveKeys ); } - if ( !activeKeys.contains( key ) ) { // add it to active list + if ( !activeKeys.tqcontains( key ) ) { // add it to active list activeKeys.append( key ); mConfig->writeEntry( "ResourceKeys", activeKeys ); } } else if ( !resource->isActive() ) { - if ( activeKeys.contains( key ) ) { // remove it from active list + if ( activeKeys.tqcontains( key ) ) { // remove it from active list activeKeys.remove( key ); mConfig->writeEntry( "ResourceKeys", activeKeys ); } - if ( !passiveKeys.contains( key ) ) { // add it to passive list + if ( !passiveKeys.tqcontains( key ) ) { // add it to passive list passiveKeys.append( key ); mConfig->writeEntry( "PassiveResourceKeys", passiveKeys ); } @@ -414,7 +414,7 @@ void ManagerImpl::removeResource( Resource *resource ) mConfig->setGroup( "General" ); TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" ); - if ( activeKeys.contains( key ) ) { + if ( activeKeys.tqcontains( key ) ) { activeKeys.remove( key ); mConfig->writeEntry( "ResourceKeys", activeKeys ); } else { diff --git a/kresources/resource.h b/kresources/resource.h index 63190378d..eec790bbe 100644 --- a/kresources/resource.h +++ b/kresources/resource.h @@ -252,7 +252,7 @@ service_DATA = resourceexample.desktop data. Subclasses of ResourceCalendar would implement this API for local files, remote files, specific calendar servers etc. */ -class KRESOURCES_EXPORT Resource : public QObject +class KRESOURCES_EXPORT Resource : public TQObject { friend class Factory; friend class ManagerImpl; diff --git a/kresources/selectdialog.cpp b/kresources/selectdialog.cpp index cc1c7e593..3eb8ad332 100644 --- a/kresources/selectdialog.cpp +++ b/kresources/selectdialog.cpp @@ -57,8 +57,8 @@ SelectDialog::SelectDialog( TQPtrList list, TQWidget *parent, KButtonBox *buttonBox = new KButtonBox( this ); buttonBox->addStretch(); - buttonBox->addButton( KStdGuiItem::ok(), this, TQT_SLOT( accept() ) ); - buttonBox->addButton( KStdGuiItem::cancel(), this, TQT_SLOT( reject() ) ); + buttonBox->addButton( KStdGuiItem::ok(), TQT_TQOBJECT(this), TQT_SLOT( accept() ) ); + buttonBox->addButton( KStdGuiItem::cancel(), TQT_TQOBJECT(this), TQT_SLOT( reject() ) ); buttonBox->layout(); mainLayout->addWidget( buttonBox ); -- cgit v1.2.1