diff options
author | Timothy Pearson <[email protected]> | 2011-12-19 11:39:08 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-19 11:39:08 -0600 |
commit | 46d967c53bb9221c29b1d357086d600a01a97706 (patch) | |
tree | ca7261e0162da2f49d6c9fe73890b56e54212205 /lib | |
parent | e2574db445c23b812a26740475cbacbbd964639b (diff) | |
download | kpilot-46d967c53bb9221c29b1d357086d600a01a97706.tar.gz kpilot-46d967c53bb9221c29b1d357086d600a01a97706.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/actions.cc | 6 | ||||
-rw-r--r-- | lib/kpilotdevicelink.cc | 16 | ||||
-rw-r--r-- | lib/pilotAddress.cc | 14 | ||||
-rw-r--r-- | lib/pilotDateEntry.cc | 30 | ||||
-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 | 52 | ||||
-rw-r--r-- | lib/recordConduit.cc | 6 | ||||
-rw-r--r-- | lib/syncAction.cc | 6 |
10 files changed, 72 insertions, 72 deletions
diff --git a/lib/actions.cc b/lib/actions.cc index eed9a3a..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::fromLatin1(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 9f661cd..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(); @@ -185,7 +185,7 @@ void DeviceCommThread::openDevice() { 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 @@ -259,7 +259,7 @@ 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; @@ -286,7 +286,7 @@ 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; @@ -409,7 +409,7 @@ 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()->fLinkStatus = PilotLinkError; reset(); @@ -424,7 +424,7 @@ void DeviceCommThread::acceptDevice() 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; @@ -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); 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/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/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 b573695..7ef1bb9 100644 --- a/lib/plugin.cc +++ b/lib/plugin.cc @@ -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; @@ -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("[email protected]") ) - .tqarg( CSL1("[email protected]") ); + .arg( CSL1("[email protected]") ) + .arg( CSL1("[email protected]") ); 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 *)), @@ -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/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 404498b..444226e 100644 --- a/lib/syncAction.cc +++ b/lib/syncAction.cc @@ -101,7 +101,7 @@ SyncAction::~SyncAction() if (!r) { emit logError(i18n("The conduit %1 could not be executed.") - .tqarg(TQString::fromLatin1(name()))); + .arg(TQString::fromLatin1(name()))); delayDone(); } } @@ -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; } |