summaryrefslogtreecommitdiffstats
path: root/kmobile
diff options
context:
space:
mode:
Diffstat (limited to 'kmobile')
-rw-r--r--kmobile/devices/gnokii/gnokii_mobile.cpp40
-rw-r--r--kmobile/devices/skeleton/skeleton.cpp8
-rw-r--r--kmobile/kioslave/kio_mobile.cpp58
-rw-r--r--kmobile/kmobile.cpp30
-rw-r--r--kmobile/kmobileclient.cpp10
-rw-r--r--kmobile/kmobiledevice.cpp28
-rw-r--r--kmobile/kmobiledevice.h9
-rw-r--r--kmobile/kmobileitem.cpp12
-rw-r--r--kmobile/kmobileview.cpp26
-rw-r--r--kmobile/systemtray.cpp4
-rw-r--r--kmobile/testlibkmobile.cpp6
11 files changed, 116 insertions, 115 deletions
diff --git a/kmobile/devices/gnokii/gnokii_mobile.cpp b/kmobile/devices/gnokii/gnokii_mobile.cpp
index dabccb89b..7ceb5ea7c 100644
--- a/kmobile/devices/gnokii/gnokii_mobile.cpp
+++ b/kmobile/devices/gnokii/gnokii_mobile.cpp
@@ -48,7 +48,7 @@
#define GNOKII_CHECK_ERROR(error) \
do { \
if (error) \
- PRINT_DEBUG << TQString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\
+ PRINT_DEBUG << TQString("ERROR %1: %2\n").tqarg(error).tqarg(gn_error_print(error));\
} while (0)
@@ -103,8 +103,8 @@ KMobileGnokii::KMobileGnokii(TQObject *obj, const char *name, const TQStringList
m_baud = "9600";
}
- PRINT_DEBUG << TQString("Using GNOKII configuration: %1 %2 %3 %4\n").arg(m_modelnr)
- .arg(m_connection).arg(m_port).arg(m_baud);
+ PRINT_DEBUG << TQString("Using GNOKII configuration: %1 %2 %3 %4\n").tqarg(m_modelnr)
+ .tqarg(m_connection).tqarg(m_port).tqarg(m_baud);
saveDeviceConfiguration();
saveGnokiiConfiguration();
@@ -237,7 +237,7 @@ static TQString businit(void)
state.config.require_dcd = old_dcd;
if (error != GN_ERR_NONE) {
busterminate();
- return i18n("Mobile phone interface initialization failed:\n%1").arg(gn_error_print(error));
+ return i18n("Mobile phone interface initialization failed:\n%1").tqarg(gn_error_print(error));
}
// model
@@ -265,9 +265,9 @@ static TQString businit(void)
data.imei = NULL;
GNOKII_DEBUG( TQString("Found mobile phone: Model: %1, Revision: %2, IMEI: %3\n")
- .arg(model).arg(revision).arg(imei) );
+ .tqarg(model).tqarg(revision).tqarg(imei) );
- PhoneProductId = TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
+ PhoneProductId = TQString("%1-%2-%3-%4").tqarg(APP).tqarg(model).tqarg(revision).tqarg(imei);
return TQString();
}
@@ -299,7 +299,7 @@ static gn_error read_phone_memstat( gn_memory_type memtype, gn_memory_status *me
}
}
GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
- .arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) );
+ .tqarg(memtype).tqarg(memstat->used).tqarg(memstat->free).tqarg(memstat->used+memstat->free) );
return error;
}
@@ -372,8 +372,8 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
if (error != GN_ERR_NONE)
return error;
- GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(index).arg(entry.name)
- .arg(entry.number).arg(entry.location).arg(entry.caller_group).arg(entry.subentries_count));
+ GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").tqarg(index).tqarg(entry.name)
+ .tqarg(entry.number).tqarg(entry.location).tqarg(entry.caller_group).tqarg(entry.subentries_count));
// try to split Name into FamilyName and GivenName
s = TQString(entry.name).simplifyWhiteSpace();
@@ -395,7 +395,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
}
a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(entry.caller_group));
- a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1_%2").arg(GN_MT_ME).arg(entry.location));
+ a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1_%2").tqarg(GN_MT_ME).tqarg(entry.location));
// set ProductId
a->setProductId(PhoneProductId);
@@ -407,7 +407,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
else
datetime = TQDateTime( TQDate(entry.date.year, entry.date.month, entry.date.day),
TQTime(entry.date.hour, entry.date.minute, entry.date.second) );
- GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString()));
+ GNOKII_DEBUG(TQString(" date=%1\n").tqarg(datetime.toString()));
a->setRevision(datetime);
if (!entry.subentries_count)
@@ -418,8 +418,8 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
for (int n=0; n<entry.subentries_count; n++) {
TQString s = TQString(entry.subentries[n].data.number).simplifyWhiteSpace();
GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
- .arg(n).arg(entry.subentries[n].entry_type)
- .arg(entry.subentries[n].number_type).arg(s));
+ .tqarg(n).tqarg(entry.subentries[n].entry_type)
+ .tqarg(entry.subentries[n].number_type).tqarg(s));
if (s.isEmpty())
continue;
switch(entry.subentries[n].entry_type) {
@@ -478,7 +478,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
break;
default:
GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n")
- .arg(entry.subentries[n].entry_type).arg(s));
+ .tqarg(entry.subentries[n].entry_type).tqarg(s));
break;
} // switch()
} // for(subentry)
@@ -501,7 +501,7 @@ bool KMobileGnokii::connectDevice(TQWidget * /*tqparent*/)
TQString err = businit();
m_connected = err.isEmpty();
- PRINT_DEBUG << TQString("connectDevice() : %1\n").arg(m_connected ? "Ok" : err);
+ PRINT_DEBUG << TQString("connectDevice() : %1\n").tqarg(m_connected ? "Ok" : err);
return m_connected;
}
@@ -512,7 +512,7 @@ bool KMobileGnokii::disconnectDevice(TQWidget * /*tqparent*/)
return true;
busterminate();
m_connected = false;
- PRINT_DEBUG << TQString("disconnectDevice() : %1\n").arg("done");
+ PRINT_DEBUG << TQString("disconnectDevice() : %1\n").tqarg("done");
return true;
}
@@ -547,7 +547,7 @@ TQString KMobileGnokii::iconFileName() const
// this String is used to have a unique identification for syncronisation.
TQString KMobileGnokii::tqdeviceUniqueID()
{
- return TQString("GNOKII-IMEI-%1").arg(TQString::fromLocal8Bit(imei));
+ return TQString("GNOKII-IMEI-%1").tqarg(TQString::fromLocal8Bit(imei));
}
@@ -587,7 +587,7 @@ int KMobileGnokii::numAddresses()
int KMobileGnokii::readAddress( int index, KABC::Addressee &addr )
{
- PRINT_DEBUG << TQString("############ GET ADDRESS #%1\n").arg(index);
+ PRINT_DEBUG << TQString("############ GET ADDRESS #%1\n").tqarg(index);
// index is zero-based, but in gnokii the first address starts at 1
if (index<0 || index>=numAddresses())
return KIO::ERR_DOES_NOT_EXIST;
@@ -870,8 +870,8 @@ int KMobileGnokii::readNote( int index, TQString &note )
"DeviceClassName: %3\n"
"Device Driver : %4\n"
"Device Revision: %5\n")
- .arg(index).arg(index)
- .arg(tqdeviceClassName()).arg(tqdeviceName()).arg(revision());
+ .tqarg(index).tqarg(index)
+ .tqarg(tqdeviceClassName()).tqarg(tqdeviceName()).tqarg(revision());
return 0;
}
diff --git a/kmobile/devices/skeleton/skeleton.cpp b/kmobile/devices/skeleton/skeleton.cpp
index c027baaeb..c1bcd4929 100644
--- a/kmobile/devices/skeleton/skeleton.cpp
+++ b/kmobile/devices/skeleton/skeleton.cpp
@@ -64,7 +64,7 @@ KMobileSkeleton::~KMobileSkeleton()
bool KMobileSkeleton::connectDevice(TQWidget *tqparent)
{
if (KMessageBox::Continue != KMessageBox::warningContinueCancel(tqparent,
- i18n("Please turn on your %1 on now and press continue to proceed.").arg(m_tqdeviceName),
+ i18n("Please turn on your %1 on now and press continue to proceed.").tqarg(m_tqdeviceName),
m_tqdeviceClassName ) )
return false;
// connect it now...
@@ -112,7 +112,7 @@ int KMobileSkeleton::readAddress( int index, KABC::Addressee &addr )
return KIO::ERR_DOES_NOT_EXIST;
// now build our own sample name
- addr.setFamilyName(TQString("Meyer_%1").arg(index+1));
+ addr.setFamilyName(TQString("Meyer_%1").tqarg(index+1));
addr.setGivenName("Peter");
addr.setFormattedName("Peter "+addr.familyName());
addr.setNickName("PeterM");
@@ -156,8 +156,8 @@ int KMobileSkeleton::readNote( int index, TQString &note )
"DeviceClassName: %3\n"
"Device Driver : %4\n"
"Device Revision: %5\n")
- .arg(index).arg(index)
- .arg(tqdeviceClassName()).arg(tqdeviceName()).arg(revision());
+ .tqarg(index).tqarg(index)
+ .tqarg(tqdeviceClassName()).tqarg(tqdeviceName()).tqarg(revision());
return 0;
}
diff --git a/kmobile/kioslave/kio_mobile.cpp b/kmobile/kioslave/kio_mobile.cpp
index b22930e2b..94d803306 100644
--- a/kmobile/kioslave/kio_mobile.cpp
+++ b/kmobile/kioslave/kio_mobile.cpp
@@ -84,7 +84,7 @@ 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;
@@ -231,7 +231,7 @@ void KMobileProtocol::get(const KURL &url)
*/
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;
@@ -312,7 +312,7 @@ TQString KMobileProtocol::entryMimeType(int cap)
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);
@@ -340,7 +340,7 @@ 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,7 +351,7 @@ 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) );
}
}
@@ -360,7 +360,7 @@ void KMobileProtocol::listEntries(const TQString &devName,
*/
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.tqfind('.');
if (index>0)
@@ -425,7 +425,7 @@ int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQStr
*/
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);
@@ -464,7 +464,7 @@ int KMobileProtocol::getCalendar( const TQString &devName, TQCString &result, TQ
*/
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.tqfind('_');
if (index>0)
@@ -514,10 +514,10 @@ int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQStri
*/
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/kmobile.cpp b/kmobile/kmobile.cpp
index a34215e4a..db2e1cd11 100644
--- a/kmobile/kmobile.cpp
+++ b/kmobile/kmobile.cpp
@@ -93,29 +93,29 @@ KMobile::~KMobile()
void KMobile::setupActions()
{
- KStdAction::close(this, TQT_SLOT(dockApplication()), actionCollection());
- KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
+ KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(dockApplication()), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection());
- m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
+ m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection());
optionsShowToolbar();
- m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
+ m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection());
- KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection());
new KAction(i18n("&Add Device..."), "folder_new", 0,
- this, TQT_SLOT(addDevice()), actionCollection(), "tqdevice_add");
+ TQT_TQOBJECT(this), TQT_SLOT(addDevice()), actionCollection(), "tqdevice_add");
new KAction( KGuiItem( i18n("&Remove Device"), "edittrash", i18n("Remove this tqdevice") ),
- "Delete", this, TQT_SLOT(removeDevice()), actionCollection(), "tqdevice_remove");
+ "Delete", TQT_TQOBJECT(this), TQT_SLOT(removeDevice()), actionCollection(), "tqdevice_remove");
new KAction(i18n("Re&name Device..."), 0, Key_F2,
- this, TQT_SLOT(renameDevice()), actionCollection(), "tqdevice_rename");
+ TQT_TQOBJECT(this), TQT_SLOT(renameDevice()), actionCollection(), "tqdevice_rename");
new KAction(i18n("&Configure Device..."), "configure", 0,
- this, TQT_SLOT(configDevice()), actionCollection(), "tqdevice_configure");
+ TQT_TQOBJECT(this), TQT_SLOT(configDevice()), actionCollection(), "tqdevice_configure");
createGUI();
- connect( kapp, TQT_SIGNAL(aboutToQuit()), this, TQT_SLOT(saveAll()) );
+ connect( kapp, TQT_SIGNAL(aboutToQuit()), TQT_TQOBJECT(this), TQT_SLOT(saveAll()) );
}
@@ -273,7 +273,7 @@ void KMobile::addDevice()
for ( it = list.begin(); it != list.end(); ++it ) {
ptr = *it;
kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
- .arg(ptr->library()).arg(ptr->name()).arg(ptr->icon()).arg(ptr->comment());
+ .tqarg(ptr->library()).tqarg(ptr->name()).tqarg(ptr->icon()).tqarg(ptr->comment());
TQString iconName = ptr->icon();
if (iconName.isEmpty())
@@ -303,7 +303,7 @@ void KMobile::addDevice()
TQString("<qt>KMobile could not load the <b>%1</b> Device Driver.<p>"
"Please use the Skeleton- or Gnokii Device Driver during development.<p>"
"This driver will still be visible, but you won't be able to access it "
- "from Konqueror or any other application.</qt>").arg(ptr->name()),
+ "from Konqueror or any other application.</qt>").tqarg(ptr->name()),
kapp->name());
}
@@ -357,7 +357,7 @@ KMobileDevice * KMobileFactory::chooseDeviceDialog( TQWidget *tqparent,
continue;
// kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4' #%5\n")
- // .arg(ptr->library()).arg(ptr->name()).arg(ptr->icon()).arg(ptr->comment()).arg(i);
+ // .tqarg(ptr->library()).tqarg(ptr->name()).tqarg(ptr->icon()).tqarg(ptr->comment()).tqarg(i);
TQString iconName = ptr->icon();
if (iconName.isEmpty())
diff --git a/kmobile/kmobileclient.cpp b/kmobile/kmobileclient.cpp
index 518185534..f587ee2c7 100644
--- a/kmobile/kmobileclient.cpp
+++ b/kmobile/kmobileclient.cpp
@@ -36,10 +36,10 @@ KMobileClient::KMobileClient()
m_kmobileObj = "kmobileIface";
bool ok = attach();
- PRINT_DEBUG << TQString("attached to DCOP server %1\n").arg(ok?"sucessful.":"failed.");
+ PRINT_DEBUG << TQString("attached to DCOP server %1\n").tqarg(ok?"sucessful.":"failed.");
// m_clientAppId = registerAs("kmobileclient");
-// PRINT_DEBUG << TQString("registered as DCOP client %1\n").arg(m_clientAppId);
+// PRINT_DEBUG << TQString("registered as DCOP client %1\n").tqarg(m_clientAppId);
isKMobileAvailable();
}
@@ -54,7 +54,7 @@ KMobileClient::~KMobileClient()
bool KMobileClient::isKMobileAvailable()
{
bool available = isApplicationRegistered(m_kmobileApp);
- PRINT_DEBUG << TQString("KMobile DCOP server: %1\n").arg(available?"available.":"not available");
+ PRINT_DEBUG << TQString("KMobile DCOP server: %1\n").tqarg(available?"available.":"not available");
if (!available) {
startKMobileApplication();
// check again...
@@ -73,7 +73,7 @@ bool KMobileClient::startKMobileApplication()
TQCString replyType;
TQByteArray replyData;
bool ok = call("klauncher", "klauncher", "kdeinit_exec_wait(TQString,TQStringList)", data, replyType, replyData);
- PRINT_DEBUG << TQString("DCOP-CALL to klauncher: %1\n").arg(ok?"ok.":"failed.");
+ PRINT_DEBUG << TQString("DCOP-CALL to klauncher: %1\n").tqarg(ok?"ok.":"failed.");
return ok;
}
@@ -93,7 +93,7 @@ bool KMobileClient::startKMobileApplication()
TQCString replyType; \
TQByteArray replyData; \
bool ok = call(m_kmobileApp, m_kmobileObj, FUNC, data, replyType, replyData, KMOBILECLIENT_USE_EVENTLOOP, KMOBILECLIENT_TIMEOUT); \
- PRINT_DEBUG << TQString("DCOP-CALL to %1: %2\n").arg(FUNC).arg(ok?"ok.":"FAILED.")
+ PRINT_DEBUG << TQString("DCOP-CALL to %1: %2\n").tqarg(FUNC).tqarg(ok?"ok.":"FAILED.")
#define RETURN_TYPE( FUNC, PARAMS, RETURN_TYPE ) \
PREPARE( FUNC, PARAMS ); \
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();
diff --git a/kmobile/kmobiledevice.h b/kmobile/kmobiledevice.h
index 16e12aad5..d89e3f2d8 100644
--- a/kmobile/kmobiledevice.h
+++ b/kmobile/kmobiledevice.h
@@ -38,7 +38,7 @@
class KConfig;
#define KMOBILE_MIMETYPE_DEVICE "kdetqdevice/mobiletqdevice"
-#define KMOBILE_MIMETYPE_DEVICE_KONTQUEROR(name) TQString("kdetqdevice/kmobile_%1").arg(name)
+#define KMOBILE_MIMETYPE_DEVICE_KONTQUEROR(name) TQString("kdetqdevice/kmobile_%1").tqarg(name)
#define KMOBILE_MIMETYPE_INODE "inode/"
#define KMOBILE_ICON_UNKNOWN "mobile_unknown"
@@ -64,8 +64,8 @@ class KConfig;
class KDE_EXPORT KMobileDevice : public KLibFactory
{
-Q_OBJECT
- TQ_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
friend class KMobileView;
public:
@@ -428,9 +428,10 @@ signals:
*/
void finished();
-
+#ifndef Q_MOC_RUN
enum MessageBoxType { QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3,
WarningYesNoCancel = 4, Information = 5, SSLMessageBox = 6 };
+#endif // Q_MOC_RUN
/**
* Call this to show a message box from the slave (it will in fact be handled
diff --git a/kmobile/kmobileitem.cpp b/kmobile/kmobileitem.cpp
index 0ea93353f..cb4473f80 100644
--- a/kmobile/kmobileitem.cpp
+++ b/kmobile/kmobileitem.cpp
@@ -38,7 +38,7 @@ KMobileItem::KMobileItem(TQIconView *tqparent, KConfig *_config, KService::Ptr s
if (service) {
setText(service->name());
m_tqdeviceDesktopFile = service->desktopEntryName();
- m_tqdeviceConfigFile = TQString("kmobile_%1_rc").arg(text());
+ m_tqdeviceConfigFile = TQString("kmobile_%1_rc").tqarg(text());
m_tqdeviceConfigFile = m_tqdeviceConfigFile.tqreplace(' ', "");
m_iconName = service->icon();
};
@@ -104,7 +104,7 @@ TQPixmap KMobileItem::getIcon() const
TQString KMobileItem::config_SectionName(int idx) const
{
if (idx == -1) idx = index();
- return TQString("MobileDevice_%1").arg(idx);
+ return TQString("MobileDevice_%1").tqarg(idx);
}
/* this MimeType is used by konqueror */
@@ -118,7 +118,7 @@ void KMobileItem::writeKonquMimeFile() const
{
// strip path and file extension of icon name
TQString icon = m_iconName;
- int p = icon.findRev('/');
+ int p = icon.tqfindRev('/');
if (p>=0) icon = icon.mid(p+1);
p = icon.tqfind('.');
if (p>=0) icon = icon.left(p);
@@ -162,7 +162,7 @@ KService::Ptr KMobileItem::getServicePtr() const
return ptr;
}
PRINT_DEBUG << TQString("Service for library '%1' not found in KService list\n")
- .arg(m_tqdeviceDesktopFile);
+ .tqarg(m_tqdeviceDesktopFile);
return 0L;
}
@@ -178,7 +178,7 @@ bool KMobileItem::driverAvailable()
if (!ptr)
return false;
- PRINT_DEBUG << TQString("Loading library %1\n").arg(ptr->library());
+ PRINT_DEBUG << TQString("Loading library %1\n").tqarg(ptr->library());
KLibFactory *factory = KLibLoader::self()->factory( ptr->library().utf8() );
if (!factory)
return false;
@@ -186,7 +186,7 @@ bool KMobileItem::driverAvailable()
m_dev = static_cast<KMobileDevice *>(factory->create(this, ptr->name().utf8(),
"KMobileDevice", TQStringList(m_tqdeviceConfigFile)));
PRINT_DEBUG << TQString("Got KMobileDevice object at 0x%1, configfile=%2\n")
- .arg((unsigned long)m_dev, 0, 16).arg(m_tqdeviceConfigFile);
+ .tqarg((unsigned long)m_dev, 0, 16).tqarg(m_tqdeviceConfigFile);
return (m_dev != 0);
}
diff --git a/kmobile/kmobileview.cpp b/kmobile/kmobileview.cpp
index 7a83f52ef..32fb916ae 100644
--- a/kmobile/kmobileview.cpp
+++ b/kmobile/kmobileview.cpp
@@ -51,8 +51,8 @@ bool KMobileView::addNewDevice(KConfig *config, KService::Ptr service)
{
kdDebug() << "New mobile tqdevice item:\n";
kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
- .arg(service->library()).arg(service->name()).arg(service->icon())
- .arg(service->comment());
+ .tqarg(service->library()).tqarg(service->name()).tqarg(service->icon())
+ .tqarg(service->comment());
KMobileItem *it;
it = new KMobileItem(this, config, service);
@@ -131,7 +131,7 @@ TQStringList KMobileView::tqdeviceNames()
void KMobileView::removeDevice( TQString tqdeviceName )
{
delete findDevice(tqdeviceName);
- emit signalChangeStatusbar( i18n("%1 removed").arg(tqdeviceName) );
+ emit signalChangeStatusbar( i18n("%1 removed").tqarg(tqdeviceName) );
}
void KMobileView::configDevice( TQString tqdeviceName )
@@ -155,8 +155,8 @@ bool KMobileView::connectDevice( TQString tqdeviceName )
connected = dev->m_dev->connectDevice();
MUTEX_UNLOCK(dev->m_dev);
emit signalChangeStatusbar(
- connected ? i18n("Connection to %1 established").arg(tqdeviceName)
- : i18n("Connection to %1 failed").arg(tqdeviceName) );
+ connected ? i18n("Connection to %1 established").tqarg(tqdeviceName)
+ : i18n("Connection to %1 failed").tqarg(tqdeviceName) );
return connected;
}
@@ -170,8 +170,8 @@ bool KMobileView::disconnectDevice( TQString tqdeviceName )
disconnected = dev->m_dev->disconnectDevice();
MUTEX_UNLOCK(dev->m_dev);
emit signalChangeStatusbar(
- disconnected ? i18n("%1 disconnected").arg(tqdeviceName)
- : i18n("Disconnection of %1 failed").arg(tqdeviceName) );
+ disconnected ? i18n("%1 disconnected").tqarg(tqdeviceName)
+ : i18n("Disconnection of %1 failed").tqarg(tqdeviceName) );
return disconnected;
}
@@ -304,7 +304,7 @@ TQString KMobileView::readAddress( TQString tqdeviceName, int index )
return TQString();
emit signalChangeStatusbar( i18n("Read addressbook entry %1 from %2")
- .arg(index).arg(tqdeviceName) );
+ .tqarg(index).tqarg(tqdeviceName) );
return str;
}
@@ -325,8 +325,8 @@ 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").arg(index).arg(tqdeviceName)
- : i18n("Contact %1 stored on %2").arg(index).arg(tqdeviceName) );
+ err ? i18n("Storing contact %1 on %2 failed").tqarg(index).tqarg(tqdeviceName)
+ : i18n("Contact %1 stored on %2").tqarg(index).tqarg(tqdeviceName) );
return (err == 0);
}
@@ -368,7 +368,7 @@ TQString KMobileView::readNote( TQString tqdeviceName, int index )
if (err)
return TQString();
emit signalChangeStatusbar( i18n("Read note %1 from %2")
- .arg(index).arg(tqdeviceName) );
+ .tqarg(index).tqarg(tqdeviceName) );
return note;
}
@@ -385,7 +385,7 @@ bool KMobileView::storeNote( TQString tqdeviceName, int index, TQString note )
if (err)
return false;
emit signalChangeStatusbar( i18n("Stored note %1 to %2")
- .arg(index).arg(tqdeviceName) );
+ .tqarg(index).tqarg(tqdeviceName) );
return true;
}
@@ -425,7 +425,7 @@ TQStringList KMobileView::kio_tqdevices_tqdeviceInfo(TQString tqdeviceName)
mountList << name;
mountList << " ";
- mountList << TQString("mobile:/%1").arg(name); // KIO::encodeFileName()
+ mountList << TQString("mobile:/%1").tqarg(name); // KIO::encodeFileName()
mountList << mime;
mountList << "true"; // mountState
mountList << "---";
diff --git a/kmobile/systemtray.cpp b/kmobile/systemtray.cpp
index e40dff642..76546cce0 100644
--- a/kmobile/systemtray.cpp
+++ b/kmobile/systemtray.cpp
@@ -60,7 +60,7 @@ SystemTray::~SystemTray()
void SystemTray::contextMenuAboutToShow(KPopupMenu *menu)
{
- KMobile *main = static_cast<KMobile *>(tqparent());
+ KMobile *main = static_cast<KMobile *>(TQT_TQWIDGET(tqparent()));
const int pos = 3;
while (menu->idAt(pos)>=SYSTEMTRAY_STARTID &&
@@ -84,7 +84,7 @@ void SystemTray::menuItemSelected()
if (m_menuID<SYSTEMTRAY_STARTID || m_menuID>SYSTEMTRAY_STARTID+1000)
return;
TQString devName = contextMenu()->text(m_menuID);
- KMobile *main = static_cast<KMobile *>(tqparent());
+ KMobile *main = static_cast<KMobile *>(TQT_TQWIDGET(tqparent()));
main->mainView()->startKonqueror(devName);
}
diff --git a/kmobile/testlibkmobile.cpp b/kmobile/testlibkmobile.cpp
index 5d6d17527..774a191e7 100644
--- a/kmobile/testlibkmobile.cpp
+++ b/kmobile/testlibkmobile.cpp
@@ -31,10 +31,10 @@ int main(int argc, char **argv)
TQStringList tqdeviceNames;
reply >> tqdeviceNames;
- kdDebug() << TQString("%1\n").arg(ok?"Ok":"Failure");
- kdDebug() << TQString("Number of currently registered drivers: %1\n").arg(tqdeviceNames.count());
+ kdDebug() << TQString("%1\n").tqarg(ok?"Ok":"Failure");
+ kdDebug() << TQString("Number of currently registered drivers: %1\n").tqarg(tqdeviceNames.count());
for (int i=0; i<tqdeviceNames.count(); i++)
- kdDebug() << TQString("Device %1: %2\n").arg(i+1).arg(tqdeviceNames[i]);
+ kdDebug() << TQString("Device %1: %2\n").tqarg(i+1).tqarg(tqdeviceNames[i]);
// return app.exec();
}