summaryrefslogtreecommitdiffstats
path: root/kmobile/kmobiledevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile/kmobiledevice.cpp')
-rw-r--r--kmobile/kmobiledevice.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kmobile/kmobiledevice.cpp b/kmobile/kmobiledevice.cpp
index 9fdddf6fa..cc25c3664 100644
--- a/kmobile/kmobiledevice.cpp
+++ b/kmobile/kmobiledevice.cpp
@@ -63,7 +63,7 @@ KMobileDevice::KMobileDevice(TQObject *obj, const char *name, const TQStringList
m_config = new KConfig();
else
m_config = new KConfig(m_configFileName);
- PRINT_DEBUG << TQString("name of config file is %1\n").arg(m_configFileName);
+ PRINT_DEBUG << TQString("name of config file is %1\n").tqarg(m_configFileName);
}
KMobileDevice::~KMobileDevice()
@@ -260,7 +260,7 @@ void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const TQString& name, c
addAtom(entry, KIO::UDS_ACCESS, 0500);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
addAtom(entry, KIO::UDS_URL, 0, url);
- PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
+ PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").tqarg(name).tqarg(mime).tqarg(url);
// addAtom(entry, KIO::UDS_SIZE, 0);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
}
@@ -276,7 +276,7 @@ void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const TQString& name,
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
if (size) addAtom(entry, KIO::UDS_SIZE, size);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
- PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
+ PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").tqarg(name).tqarg(size).tqarg(mime);
}
@@ -385,7 +385,7 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
int pid = -1;
TQStringList all = TQStringList::split('/', tqdevice);
if (!all.count()) {
- err_reason = i18n("Invalid tqdevice (%1)").arg(tqdevice);
+ err_reason = i18n("Invalid tqdevice (%1)").tqarg(tqdevice);
return false;
}
TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
@@ -393,7 +393,7 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
if (file.exists() && file.open(IO_ReadOnly)) {
if (file.size() == 0) {
err_reason = i18n("Unable to read lockfile %s. Please check for reason and "
- "remove the lockfile by hand.").arg(lockName);
+ "remove the lockfile by hand.").tqarg(lockName);
PRINT_DEBUG << err_reason;
return false;
}
@@ -406,16 +406,16 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
file.close();
if (pid > 0 && kill((pid_t)pid, 0) < 0 && errno == ESRCH) {
- PRINT_DEBUG << TQString("Lockfile %1 is stale. Overriding it..\n").arg(lockName);
+ PRINT_DEBUG << TQString("Lockfile %1 is stale. Overriding it..\n").tqarg(lockName);
sleep(1);
if (!file.remove()) {
PRINT_DEBUG << TQString("Overriding failed, please check the permissions\n");
- PRINT_DEBUG << TQString("Cannot lock tqdevice %1\n").arg(tqdevice);
- err_reason = i18n("Lockfile %1 is stale. Please check permissions.").arg(lockName);
+ PRINT_DEBUG << TQString("Cannot lock tqdevice %1\n").tqarg(tqdevice);
+ err_reason = i18n("Lockfile %1 is stale. Please check permissions.").tqarg(lockName);
return false;
}
} else {
- err_reason = i18n("Device %1 already locked.").arg(tqdevice);
+ err_reason = i18n("Device %1 already locked.").tqarg(tqdevice);
return false;
}
}
@@ -424,22 +424,22 @@ bool KMobileDevice::lockDevice(const TQString &tqdevice, TQString &err_reason)
int fd = open(lockName.local8Bit(), O_CREAT | O_EXCL | O_WRONLY, 0644);
if (fd == -1) {
if (errno == EEXIST)
- err_reason = i18n("Device %1 seems to be locked by unknown process.").arg(tqdevice);
+ err_reason = i18n("Device %1 seems to be locked by unknown process.").tqarg(tqdevice);
else if (errno == EACCES)
err_reason = i18n("Please check permission on lock directory.");
else if (errno == ENOENT)
- err_reason = i18n("Cannot create lockfile %1. Please check for existence of path.").arg(lockName);
+ err_reason = i18n("Cannot create lockfile %1. Please check for existence of path.").tqarg(lockName);
else
- err_reason = i18n("Could not create lockfile %1. Error-Code is %2.").arg(lockName).arg(errno);
+ err_reason = i18n("Could not create lockfile %1. Error-Code is %2.").tqarg(lockName).tqarg(errno);
return false;
}
TQString lockText;
- lockText = TQString("%1 kmobile\n").arg(getpid(),10);
+ lockText = TQString("%1 kmobile\n").tqarg(getpid(),10);
write(fd, lockText.utf8(), lockText.utf8().length());
close(fd);
PRINT_DEBUG << TQString("%1: Device %2 locked with lockfile %3.\n")
- .arg(tqdeviceName()).arg(tqdevice).arg(lockName);
+ .tqarg(tqdeviceName()).tqarg(tqdevice).tqarg(lockName);
err_reason = TQString();