diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 539a35866f0bac8f00e493654d4a8ec6863726e2 (patch) | |
tree | 8991e5472fe88379787cafa85542d94706bd6fa4 /lib | |
parent | 45598e35650c5806ecf2d684afeeb0da41c3ff6b (diff) | |
download | kpilot-539a35866f0bac8f00e493654d4a8ec6863726e2.tar.gz kpilot-539a35866f0bac8f00e493654d4a8ec6863726e2.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpilot@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kpilotdevicelinkPrivate.h | 2 | ||||
-rw-r--r-- | lib/kpilotlocallink.cc | 2 | ||||
-rw-r--r-- | lib/options.cc | 2 | ||||
-rw-r--r-- | lib/pilotDateEntry.cc | 14 | ||||
-rw-r--r-- | lib/pilotLocalDatabase.cc | 4 | ||||
-rw-r--r-- | lib/pilotMemo.cc | 4 | ||||
-rw-r--r-- | lib/plugin.cc | 8 | ||||
-rw-r--r-- | lib/recordConduit.cc | 20 | ||||
-rw-r--r-- | lib/syncAction.cc | 6 |
9 files changed, 31 insertions, 31 deletions
diff --git a/lib/kpilotdevicelinkPrivate.h b/lib/kpilotdevicelinkPrivate.h index b0967ba..e945295 100644 --- a/lib/kpilotdevicelinkPrivate.h +++ b/lib/kpilotdevicelinkPrivate.h @@ -56,7 +56,7 @@ public: << device << "]" << endl; showList(); - return !mBoundDevices.tqcontains(device); + return !mBoundDevices.contains(device); } void bindDevice(const TQString &device) diff --git a/lib/kpilotlocallink.cc b/lib/kpilotlocallink.cc index aaf14c6..30c2fe9 100644 --- a/lib/kpilotlocallink.cc +++ b/lib/kpilotlocallink.cc @@ -99,7 +99,7 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private & TQString dbname = (*i); dbname.remove(dbname.length()-4,4); - TQString dbnamecheck = (*i).left((*i).tqfindRev(CSL1(".pdb"))); + TQString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb"))); Q_ASSERT(dbname == dbnamecheck); if (PilotLocalDatabase::infoFromFile( path + CSL1("/") + (*i), &dbi)) diff --git a/lib/options.cc b/lib/options.cc index 749a57b..84474c6 100644 --- a/lib/options.cc +++ b/lib/options.cc @@ -60,7 +60,7 @@ TQString rtExpand(const TQString &s, TQt::TextFormat richText) if (richText == TQt::RichText) { TQString t(s); - return t.tqreplace(CSL1("\n"), CSL1("<br/>\n")); + return t.replace(CSL1("\n"), CSL1("<br/>\n")); } else { diff --git a/lib/pilotDateEntry.cc b/lib/pilotDateEntry.cc index 42becf2..4a5fd3d 100644 --- a/lib/pilotDateEntry.cc +++ b/lib/pilotDateEntry.cc @@ -416,16 +416,16 @@ void PilotDateEntry::setLocation(const TQString &s) // per TQString docs, this covers null and 0 length if( s.isEmpty() ) { - note.tqreplace(rxp,""); + note.replace(rxp,""); } else { TQString location = "Location: " + s + "\n"; - int pos = note.tqfind(rxp); + int pos = note.find(rxp); if(pos >= 0) { - note.tqreplace( rxp, location ); + note.replace( rxp, location ); } else { @@ -441,14 +441,14 @@ TQString PilotDateEntry::getLocation() const // one from PilotDateEntry::getNote(); TQString note = Pilot::fromPilot(getNoteP()); TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n"); - int pos = note.tqfind(rxp, 0); + int pos = note.find(rxp, 0); if(pos >= 0) { TQString location = rxp.capturedTexts().first(); rxp = TQRegExp("^[Ll]ocation:[\\s|\t]*"); - location.tqreplace(rxp,""); - location.tqreplace("\n", ""); + location.replace(rxp,""); + location.replace("\n", ""); return location; } else @@ -467,7 +467,7 @@ TQString PilotDateEntry::getNote() const { TQString note = Pilot::fromPilot(getNoteP()); TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n"); - note.tqreplace(rxp, "" ); + note.replace(rxp, "" ); return note; } diff --git a/lib/pilotLocalDatabase.cc b/lib/pilotLocalDatabase.cc index 71de3eb..9c3bbc0 100644 --- a/lib/pilotLocalDatabase.cc +++ b/lib/pilotLocalDatabase.cc @@ -125,7 +125,7 @@ PilotLocalDatabase::PilotLocalDatabase(const TQString &dbName) : { FUNCTIONSETUP; - int p = dbName.tqfindRev( '/' ); + int p = dbName.findRev( '/' ); if (p<0) { // No slash @@ -153,7 +153,7 @@ PilotLocalDatabase::~PilotLocalDatabase() void PilotLocalDatabase::fixupDBName() { FUNCTIONSETUP; - fDBName = fDBName.tqreplace(CSL1("/"),CSL1("_")); + fDBName = fDBName.replace(CSL1("/"),CSL1("_")); } bool PilotLocalDatabase::createDatabase(long creator, long type, int, int flags, int version) diff --git a/lib/pilotMemo.cc b/lib/pilotMemo.cc index fab0ae8..c5d4c09 100644 --- a/lib/pilotMemo.cc +++ b/lib/pilotMemo.cc @@ -92,7 +92,7 @@ TQString PilotMemo::getTitle() const { if (fText.isEmpty()) return TQString(); - int memoTitleLen = fText.tqfind('\n'); + int memoTitleLen = fText.find('\n'); if (-1 == memoTitleLen) memoTitleLen=fText.length(); return fText.left(memoTitleLen); } @@ -106,7 +106,7 @@ TQString PilotMemo::shortTitle() const return t; t.truncate(40); - int spaceIndex = t.tqfindRev(' '); + int spaceIndex = t.findRev(' '); if (spaceIndex > 32) { diff --git a/lib/plugin.cc b/lib/plugin.cc index 98c110d..0149a85 100644 --- a/lib/plugin.cc +++ b/lib/plugin.cc @@ -138,7 +138,7 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *tqparent, KAboutData *ad) } text = new TQLabel(w); - // Experiment with a long non-<qt> string. Use that to tqfind + // Experiment with a long non-<qt> string. Use that to find // sensible widths for the columns. // text->setText(i18n("Send questions and comments to kdepim-users@kde.org")); @@ -294,7 +294,7 @@ ConduitAction::ConduitAction(KPilotLink *p, if (cResolution.isEmpty()) { fConflictResolution=(SyncAction::ConflictResolution) - cResolution.tqreplace(TQRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt(); + cResolution.replace(TQRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt(); } for (TQStringList::ConstIterator it = args.begin(); @@ -340,7 +340,7 @@ bool ConduitAction::openDatabases(const TQString &name, bool *retrieved) // we always want to use the conduits/ directory for our local // databases. this keeps our backups and data that our conduits use // for record keeping separate - localPathName.tqreplace(CSL1("DBBackup/"), CSL1("conduits/")); + localPathName.replace(CSL1("DBBackup/"), CSL1("conduits/")); DEBUGKPILOT << fname << ": localPathName: [" << localPathName << "]" << endl; @@ -683,7 +683,7 @@ TQString findArgument(const TQStringList &a, const TQString &arg) { DCOPClient *dcop = KApplication::kApplication()->dcopClient(); QCStringList apps = dcop->registeredApplications(); - return apps.tqcontains(n); + return apps.contains(n); } diff --git a/lib/recordConduit.cc b/lib/recordConduit.cc index ee01063..89dfac6 100644 --- a/lib/recordConduit.cc +++ b/lib/recordConduit.cc @@ -359,7 +359,7 @@ void RecordConduit::slotPalmRecToPC() } // already synced, so skip: - if ( mSyncedIds.tqcontains( palmRec->id() ) ) + if ( mSyncedIds.contains( palmRec->id() ) ) { KPILOT_DELETE( palmRec ); TQTimer::singleShot( 0, this, TQT_SLOT( slotPalmRecToPC() ) ); @@ -433,7 +433,7 @@ void RecordConduit::slotPCRecToPalm() } // look into the list of already synced record ids to see if the PCEntry hasn't already been synced - if ( mSyncedIds.tqcontains( recID ) ) + if ( mSyncedIds.contains( recID ) ) { #ifdef DEBUG DEBUGKPILOT << ": address with id " << recID << " already synced." << endl; @@ -488,7 +488,7 @@ void RecordConduit::slotDeletedRecord() } // already synced, so skip this record: - if ( mSyncedIds.tqcontains( backupRec->id() ) ) + if ( mSyncedIds.contains( backupRec->id() ) ) { KPILOT_DELETE( backupRec ); TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) ); @@ -537,7 +537,7 @@ void RecordConduit::slotDeleteUnsyncedPCRecords() TQStringList::ConstIterator uidit; for ( uidit = alluids.constBegin(); uidit != alluids.constEnd(); ++uidit ) { - if ( !uids.tqcontains( *uidit ) ) + if ( !uids.contains( *uidit ) ) { #ifdef DEBUG DEBUGKPILOT << "Deleting PCEntry with uid " << (*uidit) << " from PC (is not on HH, and syncing with HH->PC direction)" << endl; @@ -560,7 +560,7 @@ void RecordConduit::slotDeleteUnsyncedHHRecords() RecordIDList::iterator it; for ( it = ids.begin(); it != ids.end(); ++it ) { - if ( !mSyncedIds.tqcontains(*it) ) + if ( !mSyncedIds.contains(*it) ) { #ifdef DEBUG DEBUGKPILOT << "Deleting record with ID " << *it << " from handheld (is not on PC, and syncing with PC->HH direction)" << endl; @@ -706,7 +706,7 @@ TQString RecordConduit::getCatForHH( const TQStringList cats, const TQString cur FUNCTIONSETUP; if ( cats.size() < 1 ) return TQString(); - if ( cats.tqcontains( curr ) ) + if ( cats.contains( curr ) ) return curr; for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it) { @@ -967,7 +967,7 @@ bool RecordConduit::palmSaveEntry( PilotAppCategory *palmEntry, PCEntry *pcEntry if ( pilotId != 0 ) { palmEntry->setID( pilotId ); - if ( !mSyncedIds.tqcontains( pilotId ) ) + if ( !mSyncedIds.contains( pilotId ) ) { mSyncedIds.append( pilotId ); } @@ -1029,7 +1029,7 @@ bool RecordConduit::pcDeleteEntry( PCEntry *pcEntry, PilotAppCategory *backupEnt if ( palmEntry ) { - if ( !mSyncedIds.tqcontains( palmEntry->id() ) ) + if ( !mSyncedIds.contains( palmEntry->id() ) ) { mSyncedIds.append(palmEntry->id()); } @@ -1044,7 +1044,7 @@ bool RecordConduit::pcDeleteEntry( PCEntry *pcEntry, PilotAppCategory *backupEnt } else if ( backupEntry ) { - if ( !mSyncedIds.tqcontains( backupEntry->id() ) ) + if ( !mSyncedIds.contains( backupEntry->id() ) ) { mSyncedIds.append( backupEntry->id() ); } @@ -1121,7 +1121,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry ) if ( rid == palmEntry->id() ) return abEntry;// yes, we found it // skip this PCEntry, as it has a different corresponding address on the handheld - //if ( mAllIds.tqcontains( rid ) ) continue; + //if ( mAllIds.contains( rid ) ) continue; } if ( _equal( palmEntry, abEntry, eqFlagsAlmostAll ) ) diff --git a/lib/syncAction.cc b/lib/syncAction.cc index d0227f4..6134b30 100644 --- a/lib/syncAction.cc +++ b/lib/syncAction.cc @@ -136,13 +136,13 @@ static struct SyncAction::SyncMode::SyncMode(const TQStringList &args) : fMode(eHotSync), - fTest(args.tqcontains("--test")), - fLocal(args.tqcontains("--local")) + fTest(args.contains("--test")), + fLocal(args.contains("--local")) { int i = 0; while(maps[i].name) { - if (args.tqcontains(TQString::tqfromLatin1(maps[i].name))) + if (args.contains(TQString::tqfromLatin1(maps[i].name))) { fMode = maps[i].mode; break; |