diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
commit | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch) | |
tree | 89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kmobile/kmobileview.cpp | |
parent | 1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff) | |
download | tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmobile/kmobileview.cpp')
-rw-r--r-- | kmobile/kmobileview.cpp | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/kmobile/kmobileview.cpp b/kmobile/kmobileview.cpp index 26ac4d0b3..3770dc0dd 100644 --- a/kmobile/kmobileview.cpp +++ b/kmobile/kmobileview.cpp @@ -49,10 +49,10 @@ KMobileView::~KMobileView() bool KMobileView::addNewDevice(KConfig *config, KService::Ptr service) { - kdDebug() << "New mobile tqdevice item:\n"; + kdDebug() << "New mobile device item:\n"; kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n") - .tqarg(service->library()).tqarg(service->name()).tqarg(service->icon()) - .tqarg(service->comment()); + .arg(service->library()).arg(service->name()).arg(service->icon()) + .arg(service->comment()); KMobileItem *it; it = new KMobileItem(this, config, service); @@ -89,10 +89,10 @@ void KMobileView::restoreAll() emit signalChangeStatusbar( i18n("Configuration restored") ); } -KMobileItem *KMobileView::findDevice( const TQString &tqdeviceName ) const +KMobileItem *KMobileView::findDevice( const TQString &deviceName ) const { for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) { - if (item->text() == tqdeviceName) + if (item->text() == deviceName) return static_cast<KMobileItem *>(item); } return 0L; @@ -119,7 +119,7 @@ void KMobileView::slotDoubleClicked( TQIconViewItem * item ) #define MUTEX_UNLOCK(dev) dev->m_mutex.unlock(); } -TQStringList KMobileView::tqdeviceNames() +TQStringList KMobileView::deviceNames() { TQStringList names; for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) { @@ -128,15 +128,15 @@ TQStringList KMobileView::tqdeviceNames() return names; } -void KMobileView::removeDevice( TQString tqdeviceName ) +void KMobileView::removeDevice( TQString deviceName ) { - delete findDevice(tqdeviceName); - emit signalChangeStatusbar( i18n("%1 removed").tqarg(tqdeviceName) ); + delete findDevice(deviceName); + emit signalChangeStatusbar( i18n("%1 removed").arg(deviceName) ); } -void KMobileView::configDevice( TQString tqdeviceName ) +void KMobileView::configDevice( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return; MUTEX_LOCK(dev->m_dev); @@ -145,9 +145,9 @@ void KMobileView::configDevice( TQString tqdeviceName ) } -bool KMobileView::connectDevice( TQString tqdeviceName ) +bool KMobileView::connectDevice( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return false; bool connected; @@ -155,14 +155,14 @@ bool KMobileView::connectDevice( TQString tqdeviceName ) connected = dev->m_dev->connectDevice(); MUTEX_UNLOCK(dev->m_dev); emit signalChangeStatusbar( - connected ? i18n("Connection to %1 established").tqarg(tqdeviceName) - : i18n("Connection to %1 failed").tqarg(tqdeviceName) ); + connected ? i18n("Connection to %1 established").arg(deviceName) + : i18n("Connection to %1 failed").arg(deviceName) ); return connected; } -bool KMobileView::disconnectDevice( TQString tqdeviceName ) +bool KMobileView::disconnectDevice( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return true; bool disconnected; @@ -170,14 +170,14 @@ bool KMobileView::disconnectDevice( TQString tqdeviceName ) disconnected = dev->m_dev->disconnectDevice(); MUTEX_UNLOCK(dev->m_dev); emit signalChangeStatusbar( - disconnected ? i18n("%1 disconnected").tqarg(tqdeviceName) - : i18n("Disconnection of %1 failed").tqarg(tqdeviceName) ); + disconnected ? i18n("%1 disconnected").arg(deviceName) + : i18n("Disconnection of %1 failed").arg(deviceName) ); return disconnected; } -bool KMobileView::connected( TQString tqdeviceName ) +bool KMobileView::connected( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return false; bool conn; @@ -188,33 +188,33 @@ bool KMobileView::connected( TQString tqdeviceName ) } -TQString KMobileView::tqdeviceClassName( TQString tqdeviceName ) +TQString KMobileView::deviceClassName( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return TQString(); TQString cn; MUTEX_LOCK(dev->m_dev); - cn = dev->m_dev->tqdeviceClassName(); + cn = dev->m_dev->deviceClassName(); MUTEX_UNLOCK(dev->m_dev); return cn; } -TQString KMobileView::tqdeviceName( TQString tqdeviceName ) +TQString KMobileView::deviceName( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return TQString(); TQString dn; MUTEX_LOCK(dev->m_dev); - dn = dev->m_dev->tqdeviceName(); + dn = dev->m_dev->deviceName(); MUTEX_UNLOCK(dev->m_dev); return dn; } -TQString KMobileView::revision( TQString tqdeviceName ) +TQString KMobileView::revision( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return TQString(); TQString rev; @@ -224,9 +224,9 @@ TQString KMobileView::revision( TQString tqdeviceName ) return rev; } -int KMobileView::classType( TQString tqdeviceName ) +int KMobileView::classType( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return KMobileDevice::Unclassified; int ct; @@ -236,9 +236,9 @@ int KMobileView::classType( TQString tqdeviceName ) return ct; } -int KMobileView::capabilities( TQString tqdeviceName ) +int KMobileView::capabilities( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return KMobileDevice::hasNothing; int cap; @@ -248,9 +248,9 @@ int KMobileView::capabilities( TQString tqdeviceName ) return cap; } -TQString KMobileView::nameForCap( TQString tqdeviceName, int cap ) +TQString KMobileView::nameForCap( TQString deviceName, int cap ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return TQString(); TQString nc; @@ -260,9 +260,9 @@ TQString KMobileView::nameForCap( TQString tqdeviceName, int cap ) return nc; } -TQString KMobileView::iconFileName( TQString tqdeviceName ) +TQString KMobileView::iconFileName( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return TQString(); TQString fn; @@ -272,9 +272,9 @@ TQString KMobileView::iconFileName( TQString tqdeviceName ) return fn; } -int KMobileView::numAddresses( TQString tqdeviceName ) +int KMobileView::numAddresses( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return 0; int num; @@ -284,9 +284,9 @@ int KMobileView::numAddresses( TQString tqdeviceName ) return num; } -TQString KMobileView::readAddress( TQString tqdeviceName, int index ) +TQString KMobileView::readAddress( TQString deviceName, int index ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return TQString(); @@ -304,14 +304,14 @@ TQString KMobileView::readAddress( TQString tqdeviceName, int index ) return TQString(); emit signalChangeStatusbar( i18n("Read addressbook entry %1 from %2") - .tqarg(index).tqarg(tqdeviceName) ); + .arg(index).arg(deviceName) ); return str; } -bool KMobileView::storeAddress( TQString tqdeviceName, int index, TQString vcard, bool append ) +bool KMobileView::storeAddress( TQString deviceName, int index, TQString vcard, bool append ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return false; @@ -325,14 +325,14 @@ bool KMobileView::storeAddress( TQString tqdeviceName, int index, TQString vcard err = dev->m_dev->storeAddress(index, adr, append); MUTEX_UNLOCK(dev->m_dev); emit signalChangeStatusbar( - err ? i18n("Storing contact %1 on %2 failed").tqarg(index).tqarg(tqdeviceName) - : i18n("Contact %1 stored on %2").tqarg(index).tqarg(tqdeviceName) ); + err ? i18n("Storing contact %1 on %2 failed").arg(index).arg(deviceName) + : i18n("Contact %1 stored on %2").arg(index).arg(deviceName) ); return (err == 0); } -int KMobileView::numCalendarEntries( TQString tqdeviceName ) +int KMobileView::numCalendarEntries( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return 0; int num; @@ -342,9 +342,9 @@ int KMobileView::numCalendarEntries( TQString tqdeviceName ) return num; } -int KMobileView::numNotes( TQString tqdeviceName ) +int KMobileView::numNotes( TQString deviceName ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return 0; int num; @@ -354,9 +354,9 @@ int KMobileView::numNotes( TQString tqdeviceName ) return num; } -TQString KMobileView::readNote( TQString tqdeviceName, int index ) +TQString KMobileView::readNote( TQString deviceName, int index ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return TQString(); @@ -368,13 +368,13 @@ TQString KMobileView::readNote( TQString tqdeviceName, int index ) if (err) return TQString(); emit signalChangeStatusbar( i18n("Read note %1 from %2") - .tqarg(index).tqarg(tqdeviceName) ); + .arg(index).arg(deviceName) ); return note; } -bool KMobileView::storeNote( TQString tqdeviceName, int index, TQString note ) +bool KMobileView::storeNote( TQString deviceName, int index, TQString note ) { - KMobileItem *dev = findDevice(tqdeviceName); + KMobileItem *dev = findDevice(deviceName); if (!dev || !dev->driverAvailable()) return false; @@ -385,28 +385,28 @@ bool KMobileView::storeNote( TQString tqdeviceName, int index, TQString note ) if (err) return false; emit signalChangeStatusbar( i18n("Stored note %1 to %2") - .tqarg(index).tqarg(tqdeviceName) ); + .arg(index).arg(deviceName) ); return true; } /* - * DCOP Implementation for the tqdevices:/ kioslave + * DCOP Implementation for the devices:/ kioslave */ /* - * returns the information for the given tqdeviceName for usage in the - * the tqdevices kioslave. The TQStringList returned is comparable to the - * format of /etc/fstab file. Please refer to the tqdevices kioslave for + * returns the information for the given deviceName for usage in the + * the devices kioslave. The TQStringList returned is comparable to the + * format of /etc/fstab file. Please refer to the devices kioslave for * further information. - * If tqdeviceName is empty, this functions returns information for all - * active mobile tqdevices. - * (function is only used by the tqdevices kioslave - don't use elsewhere !) + * If deviceName is empty, this functions returns information for all + * active mobile devices. + * (function is only used by the devices kioslave - don't use elsewhere !) */ -TQStringList KMobileView::kio_tqdevices_tqdeviceInfo(TQString tqdeviceName) +TQStringList KMobileView::kio_devices_deviceInfo(TQString deviceName) { - TQStringList mobiles = tqdeviceNames(); + TQStringList mobiles = deviceNames(); if (mobiles.count() == 0) return mobiles; @@ -414,10 +414,10 @@ TQStringList KMobileView::kio_tqdevices_tqdeviceInfo(TQString tqdeviceName) for ( TQStringList::Iterator it = mobiles.begin(); it != mobiles.end(); ++it ) { TQString name = *it; - if (tqdeviceName.isEmpty()) + if (deviceName.isEmpty()) mountList << name; else - if (tqdeviceName!=name) + if (deviceName!=name) continue; KMobileItem *dev = findDevice(name); @@ -425,11 +425,11 @@ TQStringList KMobileView::kio_tqdevices_tqdeviceInfo(TQString tqdeviceName) mountList << name; mountList << " "; - mountList << TQString("mobile:/%1").tqarg(name); // KIO::encodeFileName() + mountList << TQString("mobile:/%1").arg(name); // KIO::encodeFileName() mountList << mime; mountList << "true"; // mountState mountList << "---"; - if (!tqdeviceName.isEmpty()) + if (!deviceName.isEmpty()) break; } return mountList; |