From d8cc8bdfa7fa624a526d5aa1626974e1444cb799 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 27 May 2011 19:21:21 +0000 Subject: TQt4 port k3b This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libk3b/tools/k3bdevicecombobox.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'libk3b/tools/k3bdevicecombobox.cpp') diff --git a/libk3b/tools/k3bdevicecombobox.cpp b/libk3b/tools/k3bdevicecombobox.cpp index 165b59d..e6ce8ce 100644 --- a/libk3b/tools/k3bdevicecombobox.cpp +++ b/libk3b/tools/k3bdevicecombobox.cpp @@ -20,26 +20,26 @@ #include -#include -#include +#include +#include class K3bDeviceComboBox::Private { public: - QMap deviceIndexMap; - QPtrVector devices; + TQMap deviceIndexMap; + TQPtrVector devices; }; -K3bDeviceComboBox::K3bDeviceComboBox( QWidget* parent, const char* name ) - : KComboBox( parent, name ) +K3bDeviceComboBox::K3bDeviceComboBox( TQWidget* tqparent, const char* name ) + : KComboBox( tqparent, name ) { d = new Private(); - connect( this, SIGNAL(activated(int)), - this, SLOT(slotActivated(int)) ); - connect( k3bcore->deviceManager(), SIGNAL(changed(K3bDevice::DeviceManager*)), - this, SLOT(slotDeviceManagerChanged(K3bDevice::DeviceManager*)) ); + connect( this, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotActivated(int)) ); + connect( k3bcore->deviceManager(), TQT_SIGNAL(changed(K3bDevice::DeviceManager*)), + this, TQT_SLOT(slotDeviceManagerChanged(K3bDevice::DeviceManager*)) ); } @@ -96,10 +96,10 @@ void K3bDeviceComboBox::addDevice( K3bDevice::Device* dev ) void K3bDeviceComboBox::removeDevice( K3bDevice::Device* dev ) { if( dev ) { - if( d->deviceIndexMap.contains(dev->devicename()) ) { + if( d->deviceIndexMap.tqcontains(dev->devicename()) ) { // let's make it easy and recreate the whole list K3bDevice::Device* selDev = selectedDevice(); - QPtrList devices; + TQPtrList devices; for( unsigned int i = 0; i < d->devices.size(); ++i ) devices.append( d->devices[i] ); @@ -114,19 +114,19 @@ void K3bDeviceComboBox::removeDevice( K3bDevice::Device* dev ) } -void K3bDeviceComboBox::addDevices( const QPtrList& list ) +void K3bDeviceComboBox::addDevices( const TQPtrList& list ) { - for( QPtrListIterator it( list ); + for( TQPtrListIterator it( list ); it.current(); ++it ) addDevice( it.current() ); } -void K3bDeviceComboBox::refreshDevices( const QPtrList& list ) +void K3bDeviceComboBox::refreshDevices( const TQPtrList& list ) { K3bDevice::Device* selDev = selectedDevice(); clear(); - if( !list.containsRef( selDev ) ) + if( !list.tqcontainsRef( selDev ) ) selDev = 0; addDevices( list ); setSelectedDevice( selDev ); @@ -136,7 +136,7 @@ void K3bDeviceComboBox::refreshDevices( const QPtrList& list void K3bDeviceComboBox::setSelectedDevice( K3bDevice::Device* dev ) { if( dev ) { - if( d->deviceIndexMap.contains(dev->devicename()) ) { + if( d->deviceIndexMap.tqcontains(dev->devicename()) ) { setCurrentItem( d->deviceIndexMap[dev->devicename()] ); emit selectionChanged( dev ); } @@ -162,7 +162,7 @@ void K3bDeviceComboBox::slotDeviceManagerChanged( K3bDevice::DeviceManager* dm ) { unsigned int i = 0; while( i < d->devices.size() ) { - if( !dm->allDevices().containsRef( d->devices[i] ) ) { + if( !dm->allDevices().tqcontainsRef( d->devices[i] ) ) { removeDevice( d->devices[i] ); i = 0; } -- cgit v1.2.3