diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:24 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:24 -0600 |
commit | 631a19d8c5c5f69dc0d941c1997806fb422c79a6 (patch) | |
tree | 48a1a5d40ca2aa276b04f95398d9fba3fd9d7d8a /lib | |
parent | 87cd441352f3f2f1b2279bb47ebbb54ced81194f (diff) | |
download | kpilot-631a19d8c5c5f69dc0d941c1997806fb422c79a6.tar.gz kpilot-631a19d8c5c5f69dc0d941c1997806fb422c79a6.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'lib')
-rw-r--r-- | lib/actions.cc | 6 | ||||
-rw-r--r-- | lib/kpilotdevicelink.cc | 54 | ||||
-rw-r--r-- | lib/kpilotdevicelink.h | 12 | ||||
-rw-r--r-- | lib/options.h | 6 | ||||
-rw-r--r-- | lib/pilot.cc | 4 | ||||
-rw-r--r-- | lib/pilotAddress.cc | 14 | ||||
-rw-r--r-- | lib/pilotAddress.h | 2 | ||||
-rw-r--r-- | lib/pilotDateEntry.cc | 30 | ||||
-rw-r--r-- | lib/pilotLocalDatabase.cc | 6 | ||||
-rw-r--r-- | lib/pilotMemo.cc | 4 | ||||
-rw-r--r-- | lib/pilotRecord.cc | 4 | ||||
-rw-r--r-- | lib/pilotTodoEntry.cc | 6 | ||||
-rw-r--r-- | lib/plugin.cc | 62 | ||||
-rw-r--r-- | lib/plugin.h | 4 | ||||
-rw-r--r-- | lib/recordConduit.cc | 6 | ||||
-rw-r--r-- | lib/syncAction.cc | 18 | ||||
-rw-r--r-- | lib/syncAction.h | 6 |
17 files changed, 122 insertions, 122 deletions
diff --git a/lib/actions.cc b/lib/actions.cc index 03138a6..212540f 100644 --- a/lib/actions.cc +++ b/lib/actions.cc @@ -52,8 +52,8 @@ WelcomeAction::WelcomeAction(KPilotLink *p) : FUNCTIONSETUP; addSyncLogEntry(i18n("KPilot %1 HotSync starting...\n") - .tqarg(TQString::tqfromLatin1(KPILOT_VERSION))); - emit logMessage( i18n("Using encoding %1 on the handheld.").tqarg(Pilot::codecName()) ); + .arg(TQString::fromLatin1(KPILOT_VERSION))); + emit logMessage( i18n("Using encoding %1 on the handheld.").arg(Pilot::codecName()) ); emit syncDone(this); return true; } @@ -128,7 +128,7 @@ TestLink::TestLink(KPilotLink * p) : // Let the KDE User know what's happening // Pretty sure all database names are in latin1. emit logMessage(i18n("Syncing database %1...") - .tqarg(Pilot::fromPilot(db.name))); + .arg(Pilot::fromPilot(db.name))); } emit logMessage(i18n("HotSync finished.")); diff --git a/lib/kpilotdevicelink.cc b/lib/kpilotdevicelink.cc index 0cea610..84e26da 100644 --- a/lib/kpilotdevicelink.cc +++ b/lib/kpilotdevicelink.cc @@ -146,7 +146,7 @@ void DeviceCommThread::reset() { TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage, i18n("Could not open device: %1 (will retry)") - .tqarg(link()->pilotPath() ))); + .arg(link()->pilotPath() ))); } link()->fMessages->reset(); @@ -155,7 +155,7 @@ void DeviceCommThread::reset() // Timer already deleted by close() call. startOpenTimer(this,fOpenTimer); - link()->fLinktqStatus = WaitingForDevice; + link()->fLinkStatus = WaitingForDevice; } /** @@ -176,16 +176,16 @@ void DeviceCommThread::openDevice() // This transition (from Waiting to Found) can only be // taken once. // - if (link()->fLinktqStatus == WaitingForDevice) + if (link()->fLinkStatus == WaitingForDevice) { - link()->fLinktqStatus = FoundDevice; + link()->fLinkStatus = FoundDevice; } if (link()->fMessages->shouldPrint(Messages::OpenMessage)) { TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage, i18n("Trying to open device %1...") - .tqarg(link()->fPilotPath))); + .arg(link()->fPilotPath))); } // if we're not supposed to be done, try to open the main pilot @@ -244,7 +244,7 @@ bool DeviceCommThread::open(const TQString &device) << link()->fRealPilotPath << "] already connected." << endl; WARNINGKPILOT << msg << endl; - link()->fLinktqStatus = PilotLinkError; + link()->fLinkStatus = PilotLinkError; TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); @@ -259,11 +259,11 @@ bool DeviceCommThread::open(const TQString &device) { e = errno; msg = i18n("Cannot create socket for communicating " - "with the Pilot (%1)").tqarg(errorMessage(e)); + "with the Pilot (%1)").arg(errorMessage(e)); DEBUGKPILOT << msg << endl; DEBUGKPILOT << "(" << strerror(e) << ")" << endl; - link()->fLinktqStatus = PilotLinkError; + link()->fLinkStatus = PilotLinkError; TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg)); @@ -272,7 +272,7 @@ bool DeviceCommThread::open(const TQString &device) DEBUGKPILOT << fname << ": Got socket: [" << fTempSocket << "]" << endl; - link()->fLinktqStatus = CreatedSocket; + link()->fLinkStatus = CreatedSocket; DEBUGKPILOT << fname << ": Binding to path: [" << link()->fRealPilotPath << "]" << endl; @@ -286,12 +286,12 @@ bool DeviceCommThread::open(const TQString &device) << strerror(errno) << "]" << endl; e = errno; - msg = i18n("Cannot open Pilot port \"%1\". ").tqarg(link()->fRealPilotPath); + msg = i18n("Cannot open Pilot port \"%1\". ").arg(link()->fRealPilotPath); DEBUGKPILOT << msg << endl; DEBUGKPILOT << "(" << strerror(e) << ")" << endl; - link()->fLinktqStatus = PilotLinkError; + link()->fLinkStatus = PilotLinkError; if (link()->fMessages->shouldPrint(Messages::OpenFailMessage)) { @@ -301,7 +301,7 @@ bool DeviceCommThread::open(const TQString &device) return false; } - link()->fLinktqStatus = DeviceOpen; + link()->fLinkStatus = DeviceOpen; DeviceMap::self()->bindDevice(link()->fRealPilotPath); fSocketNotifier = new TQSocketNotifier(fTempSocket, @@ -409,22 +409,22 @@ void DeviceCommThread::acceptDevice() WARNINGKPILOT << "pi_accept returned: [" << s << "]" << endl; TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)") - .tqarg(TQString::fromLocal8Bit(s)))); + .arg(TQString::fromLocal8Bit(s)))); - link()->fLinktqStatus = PilotLinkError; + link()->fLinkStatus = PilotLinkError; reset(); return; } DEBUGKPILOT << fname << ": Link accept done." << endl; - if ((link()->fLinktqStatus != DeviceOpen) || (fPilotSocket == -1)) + if ((link()->fLinkStatus != DeviceOpen) || (fPilotSocket == -1)) { - link()->fLinktqStatus = PilotLinkError; + link()->fLinkStatus = PilotLinkError; WARNINGKPILOT << "Already connected or unable to connect!" << endl; TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)") - .tqarg(i18n("already connected")))); + .arg(i18n("already connected")))); reset(); return; @@ -440,7 +440,7 @@ void DeviceCommThread::acceptDevice() TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Unable to read system information from Pilot"))); - link()->fLinktqStatus=PilotLinkError; + link()->fLinkStatus=PilotLinkError; reset(); return; } @@ -488,7 +488,7 @@ void DeviceCommThread::acceptDevice() "Perhaps you have a password set on the device?"))); } - link()->fLinktqStatus = AcceptedDevice; + link()->fLinkStatus = AcceptedDevice; TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString(), 100)); @@ -529,7 +529,7 @@ void DeviceCommThread::run() KPilotDeviceLink::KPilotDeviceLink(TQObject * parent, const char *name, const TQString &tempDevice) : - KPilotLink(parent, name), fLinktqStatus(Init), fWorkaroundUSB(false), + KPilotLink(parent, name), fLinkStatus(Init), fWorkaroundUSB(false), fPilotSocket(-1), fTempDevice(tempDevice), fMessages(new Messages(this)), fDeviceCommThread(0L) { FUNCTIONSETUP; @@ -550,7 +550,7 @@ KPilotDeviceLink::~KPilotDeviceLink() /* virtual */bool KPilotDeviceLink::isConnected() const { - return fLinktqStatus == AcceptedDevice; + return fLinkStatus == AcceptedDevice; } /* virtual */bool KPilotDeviceLink::event(TQEvent *e) @@ -640,7 +640,7 @@ void KPilotDeviceLink::reset(const TQString & dP) { FUNCTIONSETUP; - fLinktqStatus = Init; + fLinkStatus = Init; // Release all resources // @@ -670,7 +670,7 @@ void KPilotDeviceLink::startCommThread() TQString msg = i18n("The Pilot device is not configured yet."); WARNINGKPILOT << msg << endl; - fLinktqStatus = PilotLinkError; + fLinkStatus = PilotLinkError; emit logError(msg); return; @@ -689,7 +689,7 @@ void KPilotDeviceLink::reset() checkDevice(); - fLinktqStatus = WaitingForDevice; + fLinkStatus = WaitingForDevice; startCommThread(); } @@ -707,7 +707,7 @@ void KPilotDeviceLink::checkDevice() if (!(fi.isReadable() && fi.isWritable())) { emit logError(i18n("Pilot device %1 is not read-write.") - .tqarg(fPilotPath)); + .arg(fPilotPath)); } } else @@ -718,7 +718,7 @@ void KPilotDeviceLink::checkDevice() emit logError(i18n("Pilot device %1 does not exist. " "Probably it is a USB device and will appear during a HotSync.") - .tqarg(fPilotPath)); + .arg(fPilotPath)); // Suppress all normal and error messages about opening the device. fMessages->block(Messages::OpenMessage | Messages::OpenFailMessage, true); @@ -788,7 +788,7 @@ int KPilotDeviceLink::openConduit() return dlp_OpenConduit(fPilotSocket); } -TQString KPilotDeviceLink::statusString(LinktqStatus l) +TQString KPilotDeviceLink::statusString(LinkStatus l) { TQString s= CSL1("KPilotDeviceLink="); diff --git a/lib/kpilotdevicelink.h b/lib/kpilotdevicelink.h index c4fb9f3..6fe02ef 100644 --- a/lib/kpilotdevicelink.h +++ b/lib/kpilotdevicelink.h @@ -42,7 +42,7 @@ class DeviceCommThread; ///< Thread for doing all palm device communications * it waits for the actual device to become available, and * then becomes ready to handle syncing. */ -enum LinktqStatus { +enum LinkStatus { Init, WaitingForDevice, FoundDevice, @@ -100,15 +100,15 @@ public: /** * Get the status (state enum) of this link. - * @return The LinktqStatus enum for the link's current state. + * @return The LinkStatus enum for the link's current state. */ - LinktqStatus status() const + LinkStatus status() const { - return fLinktqStatus; + return fLinkStatus; } /** Get a human-readable string for the given status @p l. */ - static TQString statusString(LinktqStatus l); + static TQString statusString(LinkStatus l); // The following API is the actual implementation of // the KPilotLink API, for documentation see that file. @@ -141,7 +141,7 @@ protected: private: - LinktqStatus fLinktqStatus; + LinkStatus fLinkStatus; public: diff --git a/lib/options.h b/lib/options.h index ae2c4be..d8dcc0c 100644 --- a/lib/options.h +++ b/lib/options.h @@ -155,7 +155,7 @@ KDE_EXPORT struct tm writeTm(const TQDateTime &dt); KDE_EXPORT struct tm writeTm(const TQDate &dt); -// Some tqlayout macros +// Some layout macros // // SPACING is a generic distance between visual elements; // 10 seems reasonably good even at high resolutions. @@ -176,7 +176,7 @@ KDE_EXPORT struct tm writeTm(const TQDate &dt); // variant is to handle plurals and is wrong, but unavoidable. // // -#define TODO_I18N(a) TQString::tqfromLatin1(a) +#define TODO_I18N(a) TQString::fromLatin1(a) #define TODO_I18N_P(a,b,c) ((c>1) ? a : b) // Handle some cases for TQT_NO_CAST_ASCII and NO_ASCII_CAST. @@ -190,6 +190,6 @@ KDE_EXPORT struct tm writeTm(const TQDate &dt); // with constant strings. // // -#define CSL1(a) TQString::tqfromLatin1(a "") +#define CSL1(a) TQString::fromLatin1(a "") #endif diff --git a/lib/pilot.cc b/lib/pilot.cc index 18e61f6..23a8511 100644 --- a/lib/pilot.cc +++ b/lib/pilot.cc @@ -31,7 +31,7 @@ #include "options.h" -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqmutex.h> #include <kcharsets.h> #include <kglobal.h> @@ -137,7 +137,7 @@ bool setupPilotCodec(const TQString &s) TQString codecName() { - return TQString::tqfromLatin1(codec->name()); + return TQString::fromLatin1(codec->name()); } TQString category(const struct CategoryAppInfo *info, unsigned int i) diff --git a/lib/pilotAddress.cc b/lib/pilotAddress.cc index 11fdd12..8865c93 100644 --- a/lib/pilotAddress.cc +++ b/lib/pilotAddress.cc @@ -171,7 +171,7 @@ unsigned int PhoneSlot::toField() const PhoneSlot::operator TQString() const { - return TQString("%1,%2").tqarg(toOffset()).tqarg(toField()); + return TQString("%1,%2").arg(toOffset()).arg(toField()); } #define MAXFIELDS 19 @@ -294,13 +294,13 @@ TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, TQt:: if (firstName.isEmpty()) { // So replace placeholder for first name (%1) with empty - tmp = tmp.tqarg(TQString()); + tmp = tmp.arg(TQString()); } else { - tmp = tmp.tqarg(rtExpand(firstName,richText)); + tmp = tmp.arg(rtExpand(firstName,richText)); } - tmp=tmp.tqarg(rtExpand(getField(entryLastname), richText)); + tmp=tmp.arg(rtExpand(getField(entryLastname), richText)); text += tmp; text += ps; @@ -335,13 +335,13 @@ TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, TQt:: } if (info) { - tmp=tmp.tqarg(info->phoneLabel( getPhoneType( i ) )); + tmp=tmp.arg(info->phoneLabel( getPhoneType( i ) )); } else { - tmp=tmp.tqarg(CSL1("Contact: ")); + tmp=tmp.arg(CSL1("Contact: ")); } - tmp=tmp.tqarg(rtExpand(getField(i.toField()), richText)); + tmp=tmp.arg(rtExpand(getField(i.toField()), richText)); text += tmp; text += br; } diff --git a/lib/pilotAddress.h b/lib/pilotAddress.h index 40b5630..db0f18c 100644 --- a/lib/pilotAddress.h +++ b/lib/pilotAddress.h @@ -314,7 +314,7 @@ public: protected: // Get the pointers in cases where no conversion to - // tqunicode is desired. + // unicode is desired. // const char *getFieldP(int field) const { diff --git a/lib/pilotDateEntry.cc b/lib/pilotDateEntry.cc index 4a5fd3d..b11c057 100644 --- a/lib/pilotDateEntry.cc +++ b/lib/pilotDateEntry.cc @@ -170,13 +170,13 @@ TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText) // title + name text += par; tmp=richText?CSL1("<b><big>%1</big></b>"):CSL1("%1"); - text += tmp.tqarg(rtExpand(getDescription(), richText)); + text += tmp.arg(rtExpand(getDescription(), richText)); text += ps; TQDateTime dt(readTm(getEventStart())); TQString startDate(dt.toString(Qt::LocalDate)); text+=par; - text+=i18n("Start date: %1").tqarg(startDate); + text+=i18n("Start date: %1").arg(startDate); text+=ps; if (isEvent()) @@ -190,7 +190,7 @@ TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText) dt=readTm(getEventEnd()); TQString endDate(dt.toString(Qt::LocalDate)); text+=par; - text+=i18n("End date: %1").tqarg(endDate); + text+=i18n("End date: %1").arg(endDate); text+=ps; } @@ -201,10 +201,10 @@ TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText) arg(getAdvance()); switch (getAdvanceUnits()) { - case advMinutes: tmp=tmp.tqarg(i18n("minutes")); break; - case advHours: tmp=tmp.tqarg(i18n("hours")); break; - case advDays: tmp=tmp.tqarg(i18n("days")); break; - default: tmp=tmp.tqarg(TQString()); break;; + case advMinutes: tmp=tmp.arg(i18n("minutes")); break; + case advHours: tmp=tmp.arg(i18n("hours")); break; + case advDays: tmp=tmp.arg(i18n("days")); break; + default: tmp=tmp.arg(TQString()); break;; } text+=tmp; text+=ps; @@ -215,16 +215,16 @@ TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText) text+=par; tmp=i18n("Recurrence: every %1 %2"); int freq = getRepeatFrequency(); - tmp=tmp.tqarg(freq); + tmp=tmp.arg(freq); switch(getRepeatType()) { - case repeatDaily: tmp=tmp.tqarg(i18n("day(s)")); break; - case repeatWeekly: tmp=tmp.tqarg(i18n("week(s)")); break; + case repeatDaily: tmp=tmp.arg(i18n("day(s)")); break; + case repeatWeekly: tmp=tmp.arg(i18n("week(s)")); break; case repeatMonthlyByDay: - case repeatMonthlyByDate: tmp=tmp.tqarg(i18n("month(s)")); break; - case repeatYearly: tmp=tmp.tqarg(i18n("year(s)")); break; - default: tmp=tmp.tqarg(TQString()); break; + case repeatMonthlyByDate: tmp=tmp.arg(i18n("month(s)")); break; + case repeatYearly: tmp=tmp.arg(i18n("year(s)")); break; + default: tmp=tmp.arg(TQString()); break; } text+=tmp; text+=br; @@ -237,7 +237,7 @@ TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText) else { dt = readTm(getRepeatEnd()).date(); - text+=i18n("Until %1").tqarg(dt.toString(Qt::LocalDate)); + text+=i18n("Until %1").arg(dt.toString(Qt::LocalDate)); } text+=br; @@ -245,7 +245,7 @@ TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText) if (getRepeatType()==repeatMonthlyByDate) text+=i18n("Repeating on the n-th day of the month")+br; // TODO: show the dayArray when repeating weekly /*TQBitArray dayArray(7); - if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").tqarg(getRepeatDays + if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").arg(getRepeatDays const int *days = dateEntry->getRepeatDays(); // Rotate the days of the week, since day numbers on the Pilot and // in vCal / Events are different. diff --git a/lib/pilotLocalDatabase.cc b/lib/pilotLocalDatabase.cc index 9c3bbc0..91e0047 100644 --- a/lib/pilotLocalDatabase.cc +++ b/lib/pilotLocalDatabase.cc @@ -182,9 +182,9 @@ bool PilotLocalDatabase::createDatabase(long creator, long type, int, int flags, fDBInfo.version=version; fDBInfo.modnum=0; fDBInfo.index=0; - fDBInfo.createDate=(TQDateTime::tqcurrentDateTime()).toTime_t(); - fDBInfo.modifyDate=(TQDateTime::tqcurrentDateTime()).toTime_t(); - fDBInfo.backupDate=(TQDateTime::tqcurrentDateTime()).toTime_t(); + fDBInfo.createDate=(TQDateTime::currentDateTime()).toTime_t(); + fDBInfo.modifyDate=(TQDateTime::currentDateTime()).toTime_t(); + fDBInfo.backupDate=(TQDateTime::currentDateTime()).toTime_t(); delete[] fAppInfo; fAppInfo=0L; diff --git a/lib/pilotMemo.cc b/lib/pilotMemo.cc index c5d4c09..c163e46 100644 --- a/lib/pilotMemo.cc +++ b/lib/pilotMemo.cc @@ -79,11 +79,11 @@ TQString PilotMemo::getTextRepresentation(TQt::TextFormat richText) if (richText==TQt::RichText) { return i18n("<i>Title:</i> %1<br>\n<i>MemoText:</i><br>%2"). - tqarg(rtExpand(getTitle(), richText)).tqarg(rtExpand(text(), richText)); + arg(rtExpand(getTitle(), richText)).arg(rtExpand(text(), richText)); } else { - return i18n("Title: %1\nMemoText:\n%2").tqarg(getTitle()).tqarg(text()); + return i18n("Title: %1\nMemoText:\n%2").arg(getTitle()).arg(text()); } } diff --git a/lib/pilotRecord.cc b/lib/pilotRecord.cc index 5abeaaf..59f055c 100644 --- a/lib/pilotRecord.cc +++ b/lib/pilotRecord.cc @@ -54,8 +54,8 @@ /* virtual */ TQString PilotRecord::textRepresentation() const { return CSL1("[ %1,%2 ]") - .tqarg(PilotRecordBase::textRepresentation()) - .tqarg(size()); + .arg(PilotRecordBase::textRepresentation()) + .arg(size()); } diff --git a/lib/pilotTodoEntry.cc b/lib/pilotTodoEntry.cc index 8aa17ec..f91b6d5 100644 --- a/lib/pilotTodoEntry.cc +++ b/lib/pilotTodoEntry.cc @@ -125,7 +125,7 @@ TQString PilotTodoEntry::getTextRepresentation(TQt::TextFormat richText) // title + name text += par; tmp= (richText==TQt::RichText) ?CSL1("<b><big>%1</big></b>"):CSL1("%1"); - text += tmp.tqarg(rtExpand(getDescription(), richText)); + text += tmp.arg(rtExpand(getDescription(), richText)); text += ps; text += par; @@ -140,7 +140,7 @@ TQString PilotTodoEntry::getTextRepresentation(TQt::TextFormat richText) TQDate dt(readTm(getDueDate()).date()); TQString dueDate(dt.toString(Qt::LocalDate)); text+=par; - text+=i18n("Due date: %1").tqarg(dueDate); + text+=i18n("Due date: %1").arg(dueDate); text+=ps; } @@ -148,7 +148,7 @@ TQString PilotTodoEntry::getTextRepresentation(TQt::TextFormat richText) text+=ps; text+=par; - text+=i18n("Priority: %1").tqarg(getPriority()); + text+=i18n("Priority: %1").arg(getPriority()); text+=ps; if (!getNote().isEmpty()) diff --git a/lib/plugin.cc b/lib/plugin.cc index fc24e9f..49c17e7 100644 --- a/lib/plugin.cc +++ b/lib/plugin.cc @@ -39,12 +39,12 @@ #include <tqfileinfo.h> #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpushbutton.h> #include <tqregexp.h> #include <tqstringlist.h> #include <tqtabwidget.h> -#include <tqtextview.h> +#include <textview.h> #include <tqtimer.h> #include <dcopclient.h> @@ -91,7 +91,7 @@ ConduitConfigBase::~ConduitConfigBase() FUNCTIONSETUP; return i18n("<qt>The <i>%1</i> conduit's settings have been changed. Do you " - "want to save the changes before continuing?</qt>").tqarg(this->conduitName()); + "want to save the changes before continuing?</qt>").arg(this->conduitName()); } /* virtual */ bool ConduitConfigBase::maybeSave() @@ -102,7 +102,7 @@ ConduitConfigBase::~ConduitConfigBase() int r = KMessageBox::questionYesNoCancel(fWidget, maybeSaveText(), - i18n("%1 Conduit").tqarg(this->conduitName()), KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("%1 Conduit").arg(this->conduitName()), KStdGuiItem::save(), KStdGuiItem::discard()); if (r == KMessageBox::Cancel) return false; if (r == KMessageBox::Yes) commit(); return true; @@ -126,14 +126,14 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad) TQPixmap applicationIcon = - l->loadIcon(TQString::tqfromLatin1(p->appName()), + l->loadIcon(TQString::fromLatin1(p->appName()), KIcon::Desktop, 64, KIcon::DefaultState, 0L, true); if (applicationIcon.isNull()) { - applicationIcon = l->loadIcon(TQString::tqfromLatin1("kpilot"), + applicationIcon = l->loadIcon(TQString::fromLatin1("kpilot"), KIcon::Desktop); } @@ -184,7 +184,7 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad) if (!p->homepage().isEmpty()) { s = TQString(); - s += CSL1("<a href=\"%1\">").tqarg(p->homepage()); + s += CSL1("<a href=\"%1\">").arg(p->homepage()); s += p->homepage(); s += CSL1("</a><br>"); linktext->append(s); @@ -192,12 +192,12 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad) s = TQString(); s += i18n("Send questions and comments to <a href=\"mailto:%1\">%2</a>.") - .tqarg( CSL1("tdepim-users@kde.org") ) - .tqarg( CSL1("tdepim-users@kde.org") ); + .arg( CSL1("tdepim-users@kde.org") ) + .arg( CSL1("tdepim-users@kde.org") ); s += ' '; s += i18n("Send bug reports to <a href=\"mailto:%1\">%2</a>.") - .tqarg(p->bugAddress()) - .tqarg(p->bugAddress()); + .arg(p->bugAddress()) + .arg(p->bugAddress()); s += ' '; s += i18n("For trademark information, see the " "<a href=\"help:/kpilot/trademarks.html\">KPilot User's Guide</a>."); @@ -218,9 +218,9 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad) for (i=pl.begin(); i!=pl.end(); ++i) { s.append(CSL1("%1 (<i>%2</i>)%3") - .tqarg((*i).name()) - .tqarg((*i).task()) - .tqarg(count<pl.count() ? comma : TQString()) + .arg((*i).name()) + .arg((*i).task()) + .arg(count<pl.count() ? comma : TQString()) ); count++; } @@ -235,9 +235,9 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad) for (i=pl.begin(); i!=pl.end(); ++i) { s.append(CSL1("%1 (<i>%2</i>)%3") - .tqarg((*i).name()) - .tqarg((*i).task()) - .tqarg(count<pl.count() ? comma : TQString()) + .arg((*i).name()) + .arg((*i).task()) + .arg(count<pl.count() ? comma : TQString()) ); count++; } @@ -485,8 +485,8 @@ void ConduitAction::finished() if (hhVolatility > allowedVolatility) { - query = query.tqarg(fConduitName) - .tqarg(fCtrHH->type()).tqarg(fCtrHH->moo()); + query = query.arg(fConduitName) + .arg(fCtrHH->type()).arg(fCtrHH->moo()); DEBUGKPILOT << fname << ": Yikes, lots of volatility " << "caught. Check with user: [" << query @@ -533,7 +533,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p, WARNINGKPILOT << "Can't find desktop file for conduit " << fDesktopName << endl; - addSyncLogEntry(i18n("Could not find conduit %1.").tqarg(fDesktopName)); + addSyncLogEntry(i18n("Could not find conduit %1.").arg(fDesktopName)); return false; } @@ -556,7 +556,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p, << " - " << KLibLoader::self()->lastErrorMessage() << endl; - addSyncLogEntry(i18n("Could not load conduit %1.").tqarg(fDesktopName)); + addSyncLogEntry(i18n("Could not load conduit %1.").arg(fDesktopName)); return false; } @@ -568,7 +568,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p, << " has version " << version << endl; - addSyncLogEntry(i18n("Conduit %1 has wrong version (%2).").tqarg(fDesktopName).tqarg(version)); + addSyncLogEntry(i18n("Conduit %1 has wrong version (%2).").arg(fDesktopName).arg(version)); return false; } @@ -578,7 +578,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p, WARNINGKPILOT << "Can't find factory in library " << fLibraryName << endl; - addSyncLogEntry(i18n("Could not initialize conduit %1.").tqarg(fDesktopName)); + addSyncLogEntry(i18n("Could not initialize conduit %1.").arg(fDesktopName)); return false; } @@ -591,7 +591,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p, if (!object) { WARNINGKPILOT << "Can't create SyncAction." << endl; - addSyncLogEntry(i18n("Could not create conduit %1.").tqarg(fDesktopName)); + addSyncLogEntry(i18n("Could not create conduit %1.").arg(fDesktopName)); return false; } @@ -600,11 +600,11 @@ ConduitProxy::ConduitProxy(KPilotLink *p, if (!fConduit) { WARNINGKPILOT << "Can't cast to ConduitAction." << endl; - addSyncLogEntry(i18n("Could not create conduit %1.").tqarg(fDesktopName)); + addSyncLogEntry(i18n("Could not create conduit %1.").arg(fDesktopName)); return false; } - addSyncLogEntry(i18n("[Conduit %1]").tqarg(fDesktopName)); + addSyncLogEntry(i18n("[Conduit %1]").arg(fDesktopName)); // Handle the syncDone signal properly & unload the conduit. TQObject::connect(fConduit,TQT_SIGNAL(syncDone(SyncAction *)), @@ -706,7 +706,7 @@ TQString findArgument(const TQStringList &a, const TQString &arg) if (!lib->hasSymbol(symbol.latin1())) return TQString(); - return TQString::tqfromLatin1(*((const char **)(lib->symbol(symbol.latin1())))); + return TQString::fromLatin1(*((const char **)(lib->symbol(symbol.latin1())))); } @@ -746,11 +746,11 @@ void CUDCounter::setEndCount(unsigned int t) TQString CUDCounter::moo() const { TQString result = fType + ": " + - i18n("Start: %1. End: %2. ").tqarg(fStart).tqarg(fEnd); + i18n("Start: %1. End: %2. ").arg(fStart).arg(fEnd); - if (fC > 0) result += i18n("%1 new. ").tqarg(fC); - if (fU > 0) result += i18n("%1 changed. ").tqarg(fU); - if (fD > 0) result += i18n("%1 deleted. ").tqarg(fD); + if (fC > 0) result += i18n("%1 new. ").arg(fC); + if (fU > 0) result += i18n("%1 changed. ").arg(fU); + if (fD > 0) result += i18n("%1 deleted. ").arg(fD); if ( (fC+fU+fD) <= 0) result += i18n("No changes made. "); diff --git a/lib/plugin.h b/lib/plugin.h index b4eb59f..f1dbec8 100644 --- a/lib/plugin.h +++ b/lib/plugin.h @@ -70,8 +70,8 @@ namespace Pilot * NB. The reason that this is a TQObject which needs to create a * separate widget - instead of a TQWidget subclass - has to do with * layouting. If you make the widget with designer then the easiest -* thing to do is to use a grid tqlayout there. Making ConduitConfigBase -* a TQWidget subclass would require an additional tqlayout here, which +* thing to do is to use a grid layout there. Making ConduitConfigBase +* a TQWidget subclass would require an additional layout here, which * seems a little foolish. * */ diff --git a/lib/recordConduit.cc b/lib/recordConduit.cc index 89dfac6..7c92152 100644 --- a/lib/recordConduit.cc +++ b/lib/recordConduit.cc @@ -66,7 +66,7 @@ long version_record_conduit = Pilot::PLUGIN_API; bool retrieved = false; if (!openDatabases( fDBName, &retrieved)) { - emit logError(i18n("Unable to open the %1 database on the handheld.").tqarg( fDBName ) ); + emit logError(i18n("Unable to open the %1 database on the handheld.").arg( fDBName ) ); return false; } if (retrieved) setFirstSync(true); @@ -286,13 +286,13 @@ RecordConduit::~RecordConduit() // Database names probably in latin1. if( !openDatabases( dbName(), &fFirstSync ) ) { - emit logError(i18n("Unable to open the %1 database on the handheld.").tqarg( dbName() ) ); + emit logError(i18n("Unable to open the %1 database on the handheld.").arg( dbName() ) ); return false; } _getAppInfo(); if( !mPCData->loadData() ) { - emit logError( i18n("Unable to open %1.").tqarg( mPCData->description() ) ); + emit logError( i18n("Unable to open %1.").arg( mPCData->description() ) ); return false; } // get the addresseMap which maps Pilot unique record(address) id's to diff --git a/lib/syncAction.cc b/lib/syncAction.cc index 55278a1..a527a12 100644 --- a/lib/syncAction.cc +++ b/lib/syncAction.cc @@ -36,7 +36,7 @@ #include <tqtimer.h> #include <tqvbox.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcheckbox.h> #include <tqlabel.h> #include <tqmessagebox.h> @@ -101,7 +101,7 @@ SyncAction::~SyncAction() if (!r) { emit logError(i18n("The conduit %1 could not be executed.") - .tqarg(TQString::tqfromLatin1(name()))); + .arg(TQString::fromLatin1(name()))); delayDone(); } } @@ -142,7 +142,7 @@ SyncAction::SyncMode::SyncMode(const TQStringList &args) : int i = 0; while(maps[i].name) { - if (args.contains(TQString::tqfromLatin1(maps[i].name))) + if (args.contains(TQString::fromLatin1(maps[i].name))) { fMode = maps[i].mode; break; @@ -181,7 +181,7 @@ TQStringList SyncAction::SyncMode::list() const { if ( fMode == maps[i].mode ) { - l.append(TQString::tqfromLatin1(maps[i].name)); + l.append(TQString::fromLatin1(maps[i].name)); break; } i++; @@ -189,7 +189,7 @@ TQStringList SyncAction::SyncMode::list() const if ( !maps[i].name ) { WARNINGKPILOT << "Mode " << fMode << " does not have a name." << endl; - l.append(TQString::tqfromLatin1(maps[0].name)); + l.append(TQString::fromLatin1(maps[0].name)); } if (isTest()) l.append(CSL1("--test")); @@ -217,11 +217,11 @@ TQString SyncAction::SyncMode::name() const if (isTest()) { - s.append(CSL1(" [%1]").tqarg(i18n("Test Sync"))); + s.append(CSL1(" [%1]").arg(i18n("Test Sync"))); } if (isLocal()) { - s.append(CSL1(" [%1]").tqarg(i18n("Local Sync"))); + s.append(CSL1(" [%1]").arg(i18n("Local Sync"))); } return s; } @@ -357,7 +357,7 @@ int SyncAction::questionYesNo(const TQString & text, label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information)); lay->add( label1 ); TQLabel *label2 = new TQLabel( text, contents); - label2->setMinimumSize(label2->tqsizeHint()); + label2->setMinimumSize(label2->sizeHint()); lay->add(label2); lay->addStretch(1); @@ -469,7 +469,7 @@ int SyncAction::questionYesNoCancel(const TQString & text, label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information)); lay->add( label1 ); TQLabel *label2 = new TQLabel( text, contents); - label2->setMinimumSize(label2->tqsizeHint()); + label2->setMinimumSize(label2->sizeHint()); lay->add(label2); lay->addStretch(1); diff --git a/lib/syncAction.h b/lib/syncAction.h index 42b1854..8636731 100644 --- a/lib/syncAction.h +++ b/lib/syncAction.h @@ -60,7 +60,7 @@ public: const char *name=0L); ~SyncAction(); - typedef enum { Error=-1 } tqStatus; + typedef enum { Error=-1 } Status; /** A syncaction has a status, which can be expressed as an * integer. Subclasses are expected to define their own status @@ -68,7 +68,7 @@ public: */ int status() const { - return fActiontqStatus; + return fActionStatus; } /** Return a human-readable representation of the status. */ virtual TQString statusString() const; @@ -156,7 +156,7 @@ public: protected: /** Connection to the device. @todo make private. */ KPilotLink *fHandle; - int fActiontqStatus; + int fActionStatus; /** Returns a pointer to the connection to the device. */ inline KPilotLink *deviceLink() const |