summaryrefslogtreecommitdiffstats
path: root/kmobile/kioslave
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile/kioslave')
-rw-r--r--kmobile/kioslave/kio_mobile.cpp80
-rw-r--r--kmobile/kioslave/mimetypes/mobile_device.desktop2
2 files changed, 41 insertions, 41 deletions
diff --git a/kmobile/kioslave/kio_mobile.cpp b/kmobile/kioslave/kio_mobile.cpp
index d8216bcd3..ed570196d 100644
--- a/kmobile/kioslave/kio_mobile.cpp
+++ b/kmobile/kioslave/kio_mobile.cpp
@@ -78,13 +78,13 @@ KMobileProtocol::~KMobileProtocol()
}
/*
- * getDeviceAndRessource("mobile:/<devicename>/<resource>/...") - split
+ * getDeviceAndRessource("mobile:/<tqdevicename>/<resource>/...") - split
*/
int KMobileProtocol::getDeviceAndRessource(const TQString &_path,
TQString &devName, TQString &resource, TQString &devPath,
KMobileDevice::Capabilities &devCaps)
{
-// PRINT_DEBUG << TQString("###getDeviceAndRessource### %1\n").arg(_path);
+// PRINT_DEBUG << TQString("###getDeviceAndRessource### %1\n").tqarg(_path);
TQStringList path = TQStringList::split('/', _path, false);
devName = resource = devPath = TQString();
@@ -140,7 +140,7 @@ void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString&
addAtom(entry, KIO::UDS_URL, 0, url);
addAtom(entry, KIO::UDS_USER, 0, getenv("USER"));
addAtom(entry, KIO::UDS_GROUP, 0, getenv("USER"));
- 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);
}
@@ -159,7 +159,7 @@ void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString&
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);
}
@@ -169,7 +169,7 @@ void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString&
void KMobileProtocol::get(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << TQString("get(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("get(%1)\n").tqarg(url.path());
KMobileDevice::Capabilities devCaps;
TQString devName, resource, devPath;
@@ -227,16 +227,16 @@ void KMobileProtocol::get(const KURL &url)
/*
- * listRoot() - gives listing of all devices
+ * listRoot() - gives listing of all tqdevices
*/
void KMobileProtocol::listRoot(const KURL& url)
{
- PRINT_DEBUG << TQString("########## listRoot(%1) for %2:/\n").arg(url.path()).arg(url.protocol());
+ PRINT_DEBUG << TQString("########## listRoot(%1) for %2:/\n").tqarg(url.path()).tqarg(url.protocol());
KIO::UDSEntry entry;
- TQStringList deviceNames = m_dev.deviceNames();
- unsigned int dirs = deviceNames.count();
+ TQStringList tqdeviceNames = m_dev.tqdeviceNames();
+ unsigned int dirs = tqdeviceNames.count();
totalSize(dirs);
int classMask = KMobileDevice::Unclassified;
@@ -251,7 +251,7 @@ void KMobileProtocol::listRoot(const KURL& url)
for (unsigned int i=0; i<dirs; i++) {
- TQString devName = deviceNames[i];
+ TQString devName = tqdeviceNames[i];
if (classMask != KMobileDevice::Unclassified &&
m_dev.classType(devName) != classMask)
@@ -307,12 +307,12 @@ TQString KMobileProtocol::entryMimeType(int cap)
}
/*
- * listTopDeviceDir("mobile:/<devicename>") - sub-directory of a devices
+ * listTopDeviceDir("mobile:/<tqdevicename>") - sub-directory of a tqdevices
*/
void KMobileProtocol::listTopDeviceDir(const TQString &devName)
{
- PRINT_DEBUG << TQString("listTopDeviceDir(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listTopDeviceDir(%1)\n").tqarg(devName);
KIO::UDSEntry entry;
unsigned int caps = m_dev.capabilities(devName);
@@ -325,7 +325,7 @@ void KMobileProtocol::listTopDeviceDir(const TQString &devName)
TQString filename = m_dev.nameForCap(devName, cap);
TQString mimetype = folderMimeType(cap);
- createDirEntry(entry, filename, TQString("mobile:/%1/%2/").arg(devName).arg(filename), mimetype);
+ createDirEntry(entry, filename, TQString("mobile:/%1/%2/").tqarg(devName).tqarg(filename), mimetype);
listEntry(entry, false);
}
listEntry(entry, true);
@@ -334,13 +334,13 @@ void KMobileProtocol::listTopDeviceDir(const TQString &devName)
/*
- * listEntries("mobile:/<devicename>/<resource>") - resources of a device
+ * listEntries("mobile:/<tqdevicename>/<resource>") - resources of a tqdevice
*/
void KMobileProtocol::listEntries(const TQString &devName,
const TQString &resource, const TQString &devPath,
const KMobileDevice::Capabilities devCaps)
{
- PRINT_DEBUG << TQString("listEntries(%1,%2,%3)\n").arg(devName).arg(resource).arg(devPath);
+ PRINT_DEBUG << TQString("listEntries(%1,%2,%3)\n").tqarg(devName).tqarg(resource).tqarg(devPath);
switch (devCaps) {
case KMobileDevice::hasAddressBook: listAddressBook(devName, resource);
break;
@@ -351,16 +351,16 @@ void KMobileProtocol::listEntries(const TQString &devName,
case KMobileDevice::hasFileStorage: listFileStorage(devName, resource, devPath);
break;
default: error( ERR_CANNOT_ENTER_DIRECTORY,
- TQString("/%1/%2").arg(devName).arg(resource) );
+ TQString("/%1/%2").tqarg(devName).tqarg(resource) );
}
}
/*
- * listAddressBook("mobile:/<devicename>/Addressbook) - list the addressbook
+ * listAddressBook("mobile:/<tqdevicename>/Addressbook) - list the addressbook
*/
void KMobileProtocol::listAddressBook(const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << TQString("listAddressBook(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listAddressBook(%1)\n").tqarg(devName);
KIO::UDSEntry entry;
@@ -382,11 +382,11 @@ void KMobileProtocol::listAddressBook(const TQString &devName, const TQString &r
name = "_" + rx.cap(1);
#endif
- TQString filename = TQString("%1%2.vcf").arg(i,fieldwidth).arg(name);
+ TQString filename = TQString("%1%2.vcf").tqarg(i,fieldwidth).tqarg(name);
for (int p=0; p<fieldwidth; p++) {
if (filename[p]==' ') filename[p]='0'; else break;
}
- TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString url = TQString("mobile:/%1/%2/%3").tqarg(devName).tqarg(resource).tqarg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasAddressBook),
400 /*content.utf8().length()*/ );
@@ -403,7 +403,7 @@ void KMobileProtocol::listAddressBook(const TQString &devName, const TQString &r
*/
int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQString &mime, const TQString &path )
{
- PRINT_DEBUG << TQString("getVCard(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getVCard(%1)\n").tqarg(path);
int index = path.find('.');
if (index>0)
@@ -421,11 +421,11 @@ int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQStr
}
/*
- * listCalendar("mobile:/<devicename>/Calendar) - list the calendar entries
+ * listCalendar("mobile:/<tqdevicename>/Calendar) - list the calendar entries
*/
void KMobileProtocol::listCalendar( const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << TQString("listCalendar(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listCalendar(%1)\n").tqarg(devName);
KIO::UDSEntry entry;
@@ -433,8 +433,8 @@ void KMobileProtocol::listCalendar( const TQString &devName, const TQString &res
totalSize(entries);
for (int i=0; i<entries; i++) {
- TQString filename = TQString("%1_%2.vcs").arg(i).arg(i18n("calendar"));
- TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString filename = TQString("%1_%2.vcs").tqarg(i).tqarg(i18n("calendar"));
+ TQString url = TQString("mobile:/%1/%2/%3").tqarg(devName).tqarg(resource).tqarg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasCalendar));
listEntry(entry, false);
@@ -450,7 +450,7 @@ void KMobileProtocol::listCalendar( const TQString &devName, const TQString &res
*/
int KMobileProtocol::getCalendar( const TQString &devName, TQCString &result, TQString &mime, const TQString &path)
{
- PRINT_DEBUG << TQString("getCalendar(%1, #%2)\n").arg(devName).arg(path);
+ PRINT_DEBUG << TQString("getCalendar(%1, #%2)\n").tqarg(devName).tqarg(path);
/* TODO */
Q_UNUSED(result);
@@ -460,11 +460,11 @@ int KMobileProtocol::getCalendar( const TQString &devName, TQCString &result, TQ
/*
- * listNotes("mobile:/<devicename>/Notes) - list the notes
+ * listNotes("mobile:/<tqdevicename>/Notes) - list the notes
*/
void KMobileProtocol::listNotes( const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << TQString("listNotes(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listNotes(%1)\n").tqarg(devName);
KIO::UDSEntry entry;
@@ -474,8 +474,8 @@ void KMobileProtocol::listNotes( const TQString &devName, const TQString &resour
TQString note /*= m_dev.readNote(devName, i)*/;
- TQString filename = TQString("%1_%2.txt").arg(i).arg(i18n("note"));
- TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString filename = TQString("%1_%2.txt").tqarg(i).tqarg(i18n("note"));
+ TQString url = TQString("mobile:/%1/%2/%3").tqarg(devName).tqarg(resource).tqarg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasNotes),
0 /*note.utf8().length()*/);
@@ -492,7 +492,7 @@ void KMobileProtocol::listNotes( const TQString &devName, const TQString &resour
*/
int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQString &mime, const TQString &path )
{
- PRINT_DEBUG << TQString("getNote(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getNote(%1)\n").tqarg(path);
int index = path.find('_');
if (index>0)
@@ -510,14 +510,14 @@ int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQStri
}
/*
- * listFileStorage("mobile:/<devicename>/Files) - list the files on the device
+ * listFileStorage("mobile:/<tqdevicename>/Files) - list the files on the tqdevice
*/
void KMobileProtocol::listFileStorage(const TQString &devName, const TQString &resource, const TQString &devPath)
{
- PRINT_DEBUG << TQString("listFileStorage(%1,%2)\n").arg(devName).arg(devPath);
+ PRINT_DEBUG << TQString("listFileStorage(%1,%2)\n").tqarg(devName).tqarg(devPath);
/* TODO */
- error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) );
+ error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").tqarg(devName).tqarg(resource).tqarg(devPath) );
}
/*
@@ -525,7 +525,7 @@ void KMobileProtocol::listFileStorage(const TQString &devName, const TQString &r
*/
int KMobileProtocol::getFileStorage(const TQString &devName, TQCString &result, TQString &mime, const TQString &path)
{
- PRINT_DEBUG << TQString("getFileStorage(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getFileStorage(%1)\n").tqarg(path);
/* TODO */
Q_UNUSED(devName);
@@ -541,7 +541,7 @@ int KMobileProtocol::getFileStorage(const TQString &devName, TQCString &result,
void KMobileProtocol::stat( const KURL &url )
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << TQString("stat(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("stat(%1)\n").tqarg(url.path());
KMobileDevice::Capabilities devCaps;
TQString devName, resource, devPath;
@@ -555,7 +555,7 @@ void KMobileProtocol::stat( const KURL &url )
TQStringList path = TQStringList::split('/', url.path(), false);
TQString filename = (path.count()>0) ? path[path.count()-1] : "/";
TQString fullPath = path.join("/");
- TQString fullUrl = TQString("mobile:/%1").arg(fullPath);
+ TQString fullUrl = TQString("mobile:/%1").tqarg(fullPath);
UDSEntry entry;
@@ -577,7 +577,7 @@ void KMobileProtocol::stat( const KURL &url )
void KMobileProtocol::mimetype(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << TQString("mimetype(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("mimetype(%1)\n").tqarg(url.path());
KMobileDevice::Capabilities devCaps;
TQString devName, resource, devPath;
@@ -599,7 +599,7 @@ void KMobileProtocol::mimetype(const KURL &url)
void KMobileProtocol::listDir(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << TQString("listDir(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("listDir(%1)\n").tqarg(url.path());
if (!m_dev.isKMobileAvailable()) {
error( KIO::ERR_CONNECTION_BROKEN, i18n("KDE Mobile Device Manager") );
@@ -622,7 +622,7 @@ void KMobileProtocol::listDir(const KURL &url)
#if 0
if (!dev) {
- error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1").arg(devName) );
+ error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1").tqarg(devName) );
return;
}
#endif
diff --git a/kmobile/kioslave/mimetypes/mobile_device.desktop b/kmobile/kioslave/mimetypes/mobile_device.desktop
index 4462b124d..a04b0b8fe 100644
--- a/kmobile/kioslave/mimetypes/mobile_device.desktop
+++ b/kmobile/kioslave/mimetypes/mobile_device.desktop
@@ -58,7 +58,7 @@ Comment[zh_CN]=移动设备
Comment[zh_TW]=行動裝置
Icon=kmobile
Type=MimeType
-MimeType=kdedevice/mobiledevice
+MimeType=kdetqdevice/mobiletqdevice
Patterns=
X-KDE-AutoEmbed=true