From b0e912c8b3d02a518fedda28c3180eb4794a7520 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 27 May 2011 23:37:00 +0000 Subject: TQt4 convert k9copy This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- k9devices/k9cddrive.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'k9devices/k9cddrive.cpp') diff --git a/k9devices/k9cddrive.cpp b/k9devices/k9cddrive.cpp index 0a47b70..5fdf0bf 100644 --- a/k9devices/k9cddrive.cpp +++ b/k9devices/k9cddrive.cpp @@ -35,12 +35,12 @@ k9CdDrive::k9CdDrive() { } k9CdDrive::~k9CdDrive() {} -k9CdDrives::k9CdDrives():QObject( 0,0) { +k9CdDrives::k9CdDrives():TQObject( 0,0) { drives.setAutoDelete(true); #ifdef HAVE_HAL m_connection=k9HalConnection::getInstance(); - connect(m_connection,SIGNAL(deviceAdded( k9HalDevice* )),this,SLOT(deviceAdded( k9HalDevice* ))); - connect(m_connection,SIGNAL(deviceRemoved( k9HalDevice* )),this,SLOT(deviceRemoved( k9HalDevice*))); + connect(m_connection,TQT_SIGNAL(deviceAdded( k9HalDevice* )),this,TQT_SLOT(deviceAdded( k9HalDevice* ))); + connect(m_connection,TQT_SIGNAL(deviceRemoved( k9HalDevice* )),this,TQT_SLOT(deviceRemoved( k9HalDevice*))); #else m_devMgr=new K3bDevice::DeviceManager(this); @@ -81,7 +81,7 @@ void k9CdDrives::addDrive(k9HalDevice *_device) { drive->canWriteCDR=_device->getCanBurnCd(); drive->device=_device->getDeviceName(); drive->name=_device->getModel(); - QValueList writeSpeeds; + TQValueList writeSpeeds; for (int i=2;i <=_device->getMaxWriteSpeed()/1385;i+=2) writeSpeeds.append( i); drive->setWriteSpeeds(writeSpeeds); @@ -96,7 +96,7 @@ void k9CdDrives::scanDrives() { drives.clear(); #ifdef HAVE_HAL - QPtrList list=m_connection->getDevices(); + TQPtrList list=m_connection->getDevices(); for (k9HalDevice *hdrive=list.first();hdrive;hdrive=list.next()) { addDrive(hdrive); @@ -104,7 +104,7 @@ void k9CdDrives::scanDrives() { #else m_devMgr->scanBus(); int row=0; - QPtrList lDev=m_devMgr->allDevices(); + TQPtrList lDev=m_devMgr->allDevices(); for (K3bDevice::Device *dev=lDev.first();dev;dev=lDev.next()) { k9CdDrive *drive=new k9CdDrive; drive->device=dev->blockDeviceName(); @@ -112,7 +112,7 @@ void k9CdDrives::scanDrives() { drive->canReadDVD=dev->readsDvd(); drive->canWriteCDR=dev->writesCd(); drive->canWriteDVD=dev->writesDvd(); - QValueList writeSpeeds; + TQValueList writeSpeeds; for (int i=2;i <=dev->determineMaximalWriteSpeed()/1385;i+=2) writeSpeeds.append( i); drive->setWriteSpeeds(writeSpeeds); @@ -127,7 +127,7 @@ void k9CdDrives::scanDrives() { readConfig(); } -void k9CdDrives::eject(const QString & device) { +void k9CdDrives::eject(const TQString & device) { KProcess *process =new KProcess(); if (k9Tools::checkProgram("kdeeject")) *process <<"kdeeject" << device; @@ -141,26 +141,26 @@ void k9CdDrives::eject(const QString & device) { /** reads devices that was entered manually **/ void k9CdDrives::readConfig() { - QStringList ldev; - QStringList llabels; - QStringList lIO; + TQStringList ldev; + TQStringList llabels; + TQStringList lIO; k9Config config; ldev=config.getDevices(); llabels=config.getDevicesLabels(); lIO=config.getDevicesIO(); int row=count(); int i=0; - for ( QStringList::Iterator it = ldev.begin(); it != ldev.end(); ++it ) { + for ( TQStringList::Iterator it = ldev.begin(); it != ldev.end(); ++it ) { k9CdDrive *drive=new k9CdDrive; drive->device=(*it); - QStringList::Iterator it2=llabels.at(i); - QStringList::Iterator it3=lIO.at(i); + TQStringList::Iterator it2=llabels.at(i); + TQStringList::Iterator it3=lIO.at(i); drive->name=(*it2); - QString c=(*it3); - if (c.contains("I")) { + TQString c=(*it3); + if (c.tqcontains("I")) { drive->canReadDVD=true; } - if (c.contains("O")) { + if (c.tqcontains("O")) { drive->canWriteCDR=true; drive->canWriteDVD=true; } @@ -185,12 +185,12 @@ k9CdDrive * k9CdDrives::getDrive(int num) { } -QValueList< int > k9CdDrive::getWriteSpeeds() const { +TQValueList< int > k9CdDrive::getWriteSpeeds() const { return writeSpeeds; } -void k9CdDrive::setWriteSpeeds(const QValueList< int >& _value) { +void k9CdDrive::setWriteSpeeds(const TQValueList< int >& _value) { writeSpeeds = _value; } -- cgit v1.2.1