From 539a35866f0bac8f00e493654d4a8ec6863726e2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: 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 --- conduits/abbrowserconduit/abbrowser-conduit.cc | 22 +++++++++++----------- conduits/abbrowserconduit/kabcRecord.cc | 2 +- conduits/abbrowserconduit/resolutionDialog.cc | 2 +- conduits/docconduit/DOC-converter.cc | 6 +++--- conduits/docconduit/doc-conduit.cc | 10 +++++----- conduits/knotes/knotes-action.cc | 4 ++-- conduits/malconduit/mal-conduit.cc | 4 ++-- conduits/memofileconduit/memofile-conduit.cc | 4 ++-- conduits/memofileconduit/memofileconduit.xmi | 2 +- conduits/memofileconduit/memofiles.cc | 18 +++++++++--------- conduits/memofileconduit/memofiles.h | 4 ++-- conduits/null/null-conduit.cc | 2 +- conduits/null/null-conduit.h | 2 +- conduits/sysinfoconduit/sysinfo-conduit.cc | 26 +++++++++++++------------- conduits/vcalconduit/kcalRecord.cc | 6 +++--- kpilot/conduitConfigDialog.cc | 8 ++++---- kpilot/dbSelectionDialog.cc | 8 ++++---- kpilot/fileInstallWidget.cc | 2 +- kpilot/hotSync.cc | 8 ++++---- kpilot/kpilot.cc | 2 +- kpilot/kpilotConfig.cc | 6 +++--- kpilot/kpilotConfigWizard.cc | 2 +- kpilot/listItems.cc | 6 +++--- kpilot/pilotDaemon.cc | 8 ++++---- lib/kpilotdevicelinkPrivate.h | 2 +- lib/kpilotlocallink.cc | 2 +- lib/options.cc | 2 +- lib/pilotDateEntry.cc | 14 +++++++------- lib/pilotLocalDatabase.cc | 4 ++-- lib/pilotMemo.cc | 4 ++-- lib/plugin.cc | 8 ++++---- lib/recordConduit.cc | 20 ++++++++++---------- lib/syncAction.cc | 6 +++--- tests/mergecalendars.cc | 2 +- tests/testidmapper.cc | 4 ++-- 35 files changed, 116 insertions(+), 116 deletions(-) diff --git a/conduits/abbrowserconduit/abbrowser-conduit.cc b/conduits/abbrowserconduit/abbrowser-conduit.cc index 7de5582..8885bbf 100644 --- a/conduits/abbrowserconduit/abbrowser-conduit.cc +++ b/conduits/abbrowserconduit/abbrowser-conduit.cc @@ -171,7 +171,7 @@ void AbbrowserConduit::_mapContactsToPilot(TQMap < recordid_t, TQString > &idCon // if we do (this can come from a copy/paste in kaddressbook, etc.), then we need // to reset our Addressee so that we can assign him a new pilot Id later and sync // him properly. if we don't do this, we'll lose one of these on the pilot. - if (!idContactMap.tqcontains(id)) + if (!idContactMap.contains(id)) { idContactMap.insert(id, aContact.uid()); } @@ -619,7 +619,7 @@ void AbbrowserConduit::slotPalmRecToPC() } // already synced, so skip: - if(syncedIds.tqcontains(palmRec->id())) + if(syncedIds.contains(palmRec->id())) { KPILOT_DELETE(palmRec); TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC())); @@ -696,7 +696,7 @@ void AbbrowserConduit::slotPCRecToPalm() } // look into the list of already synced record ids to see if the addressee hasn't already been synced - if (syncedIds.tqcontains(rid)) + if (syncedIds.contains(rid)) { DEBUGKPILOT << ": address with id " << rid << " already synced." << endl; TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm())); @@ -819,7 +819,7 @@ void AbbrowserConduit::slotDeleteUnsyncedPCRecords() AddressBook::Iterator abit; for (abit = aBook->begin(); abit != aBook->end(); ++abit) { - if (!uids.tqcontains((*abit).uid())) + if (!uids.contains((*abit).uid())) { DEBUGKPILOT<<"Deleting addressee "<<(*abit).realName()<<" from PC (is not on HH, and syncing with HH->PC direction)"<HH direction)"<deleteRecord(*it); @@ -1150,7 +1150,7 @@ bool AbbrowserConduit::_deleteAddressee(Addressee &pcAddr, PilotAddress*backupAd if (palmAddr) { - if (!syncedIds.tqcontains(palmAddr->id())) { + if (!syncedIds.contains(palmAddr->id())) { DEBUGKPILOT << fname << ": adding id:["<< palmAddr->id() << "] to syncedIds." << endl; syncedIds.append(palmAddr->id()); } @@ -1160,7 +1160,7 @@ bool AbbrowserConduit::_deleteAddressee(Addressee &pcAddr, PilotAddress*backupAd } else if (backupAddr) { - if (!syncedIds.tqcontains(backupAddr->id())) { + if (!syncedIds.contains(backupAddr->id())) { DEBUGKPILOT << fname << ": adding id:["<< backupAddr->id() << "] to syncedIds." << endl; syncedIds.append(backupAddr->id()); } @@ -1205,7 +1205,7 @@ bool AbbrowserConduit::_savePalmAddr(PilotAddress *palmAddr, Addressee &pcAddr) if(pilotId != 0) { palmAddr->setID(pilotId); - if (!syncedIds.tqcontains(pilotId)) { + if (!syncedIds.contains(pilotId)) { DEBUGKPILOT << fname << ": adding id:["<< pilotId << "] to syncedIds." << endl; syncedIds.append(pilotId); } @@ -1339,14 +1339,14 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab return false; } for (TQStringList::Iterator it = abEmails.begin(); it != abEmails.end(); it++) { - if (!piEmails.tqcontains(*it)) + if (!piEmails.contains(*it)) { DEBUGKPILOT << fname << ": pilot e-mail missing" << endl; return false; } } for (TQStringList::Iterator it = piEmails.begin(); it != piEmails.end(); it++) { - if (!abEmails.tqcontains(*it)) + if (!abEmails.contains(*it)) { DEBUGKPILOT << fname << ": kabc e-mail missing" << endl; return false; @@ -1861,7 +1861,7 @@ Addressee AbbrowserConduit::_findMatch(const PilotAddress & pilotAddress) const { if (rid==pilotAddress.id()) return abEntry;// yes, we found it // skip this addressee, as it can an other corresponding address on the handheld - if (allIds.tqcontains(rid)) continue; + if (allIds.contains(rid)) continue; } } diff --git a/conduits/abbrowserconduit/kabcRecord.cc b/conduits/abbrowserconduit/kabcRecord.cc index b503031..91cbcb1 100644 --- a/conduits/abbrowserconduit/kabcRecord.cc +++ b/conduits/abbrowserconduit/kabcRecord.cc @@ -236,7 +236,7 @@ unsigned int KABCSync::bestMatchedCategory(const TQStringList &pccategories, // See if the suggested hhcategory is in the list, and if // so that is the best match. if (Pilot::validCategory(hhcategory) && - pccategories.tqcontains(info.categoryName(hhcategory))) + pccategories.contains(info.categoryName(hhcategory))) { return hhcategory; } diff --git a/conduits/abbrowserconduit/resolutionDialog.cc b/conduits/abbrowserconduit/resolutionDialog.cc index 0064a68..ca61afe 100644 --- a/conduits/abbrowserconduit/resolutionDialog.cc +++ b/conduits/abbrowserconduit/resolutionDialog.cc @@ -160,7 +160,7 @@ void ResolutionCheckListItem::setCaption(TQString caption) void ResolutionCheckListItem::updateText() { TQString newText(i18n("Entries in the resolution dialog. First the name of the field, then the entry from the Handheld or PC after the colon", "%1: %2").tqarg(fCaption).tqarg(fText)); - newText.tqreplace(TQRegExp(CSL1("\n")), + newText.replace(TQRegExp(CSL1("\n")), i18n("Denoting newlines in Address entries. No need to translate", " | ")); setText(0, newText); } diff --git a/conduits/docconduit/DOC-converter.cc b/conduits/docconduit/DOC-converter.cc index 06f45b7..2e25b61 100644 --- a/conduits/docconduit/DOC-converter.cc +++ b/conduits/docconduit/DOC-converter.cc @@ -79,7 +79,7 @@ int docMatchBookmark::findMatches(TQString doctext, bmkList &fBookmarks) { #endif while (pos >= 0 && foundinstallFiles(pdbfilename, false)) { DBInfo dbinfo; // Include all "extensions" except the last. This allows full stops inside the database name (e.g. abbreviations) @@ -559,7 +559,7 @@ void DOCConduit::checkDeletedDocs() FUNCTIONSETUP; for (TQStringList::Iterator it=fDBListSynced.begin(); it!=fDBListSynced.end(); ++it ) { - if (!fDBNames.tqcontains(*it)) { + if (!fDBNames.contains(*it)) { // We need to delete this doc: TQString dbname(*it); TQString txtfilename=constructTXTFileName(dbname); @@ -702,7 +702,7 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo) sinfo.direction = eSyncNone; PilotDatabase*docdb=openDOCDatabase(TQString::tqfromLatin1(sinfo.dbinfo.name)); - if (!fDBListSynced.tqcontains(sinfo.handheldDB)) { + if (!fDBListSynced.contains(sinfo.handheldDB)) { // the database wasn't included on last sync, so it has to be new. #ifdef DEBUG DEBUGKPILOT<<"Database "<fNotesResource->journals(); - DEBUGKPILOT << fname << ": the resource tqcontains " << notes.size() + DEBUGKPILOT << fname << ": the resource contains " << notes.size() << " note(s)." << endl; KCal::Journal::List::ConstIterator it; @@ -521,7 +521,7 @@ bool KNotesAction::deleteNoteOnPilot() while ( i != fP->fIdList.end() ) { // TODO DCOP_REMOVE - if (fP->fNotes.tqcontains((*i).note())) + if (fP->fNotes.contains((*i).note())) { #ifdef DEBUG DEBUGKPILOT << fname << ": Note " << (*i).note() << " still exists." << endl; diff --git a/conduits/malconduit/mal-conduit.cc b/conduits/malconduit/mal-conduit.cc index 10f1352..69a3f19 100644 --- a/conduits/malconduit/mal-conduit.cc +++ b/conduits/malconduit/mal-conduit.cc @@ -309,8 +309,8 @@ void MALConduit::printLogMessage(TQString msg) FUNCTIONSETUP; // Remove the pseudo-progressbar: TQString newmsg(msg); - newmsg.tqreplace( TQRegExp("^\\s*\\.*\\s*"), ""); - newmsg.tqreplace( TQRegExp("\\s*\\.*\\s*$"), ""); + newmsg.replace( TQRegExp("^\\s*\\.*\\s*"), ""); + newmsg.replace( TQRegExp("\\s*\\.*\\s*$"), ""); if (newmsg.length()>0) { emit logMessage(newmsg); diff --git a/conduits/memofileconduit/memofile-conduit.cc b/conduits/memofileconduit/memofile-conduit.cc index 233f6af..42461f5 100644 --- a/conduits/memofileconduit/memofile-conduit.cc +++ b/conduits/memofileconduit/memofile-conduit.cc @@ -187,7 +187,7 @@ bool MemofileConduit::setAppInfo() for (unsigned int i = 0; i < Pilot::CATEGORY_COUNT; i++) { - if (fCategories.tqcontains(i)) { + if (fCategories.contains(i)) { fMemoAppInfo->setCategoryName(i,fCategories[i]); } } @@ -448,7 +448,7 @@ void MemofileConduit::deleteUnsyncedHHRecords() Pilot::RecordIDList::iterator it; for ( it = ids.begin(); it != ids.end(); ++it ) { - if (!_memofiles->tqfind(*it)) + if (!_memofiles->find(*it)) { DEBUGKPILOT << fname << "Deleting record with ID "<< *it <<" from handheld " diff --git a/conduits/memofileconduit/memofileconduit.xmi b/conduits/memofileconduit/memofileconduit.xmi index 9088d35..8e8ef1e 100644 --- a/conduits/memofileconduit/memofileconduit.xmi +++ b/conduits/memofileconduit/memofileconduit.xmi @@ -92,7 +92,7 @@ - + diff --git a/conduits/memofileconduit/memofiles.cc b/conduits/memofileconduit/memofiles.cc index c8ce67b..db3d8ca 100644 --- a/conduits/memofileconduit/memofiles.cc +++ b/conduits/memofileconduit/memofiles.cc @@ -89,7 +89,7 @@ void Memofiles::load (bool loadAll) // DEBUGKPILOT << fname // << ": checking category: [" << categoryName // << "], file: [" << file << "]." << endl; - Memofile * memofile = tqfind(categoryName, file); + Memofile * memofile = find(categoryName, file); if (NULL == memofile) { memofile = new Memofile(category, categoryName, file, _baseDirectory); memofile->setModified(true); @@ -316,7 +316,7 @@ bool Memofiles::loadFromMetadata () return true; } -Memofile * Memofiles::tqfind (recordid_t id) +Memofile * Memofiles::find (recordid_t id) { Memofile * memofile; @@ -331,7 +331,7 @@ Memofile * Memofiles::tqfind (recordid_t id) } -Memofile * Memofiles::tqfind (const TQString & category, const TQString & filename) +Memofile * Memofiles::find (const TQString & category, const TQString & filename) { Memofile * memofile; @@ -353,7 +353,7 @@ void Memofiles::deleteMemo(PilotMemo * memo) if (! memo->isDeleted()) return; - Memofile * memofile = tqfind(memo->id()); + Memofile * memofile = find(memo->id()); if (memofile) { memofile->deleteFile(); _memofiles.remove(memofile); @@ -375,7 +375,7 @@ void Memofiles::addModifiedMemo (PilotMemo * memo) + TQString::number(memo->id()) + CSL1("], title: [") + memo->getTitle() + CSL1("]. "); - Memofile * memofile = tqfind(memo->id()); + Memofile * memofile = find(memo->id()); if (NULL == memofile) { _cudCounter.created(); @@ -653,7 +653,7 @@ TQString Memofiles::filename(PilotMemo * memo) if (filename.isEmpty()) { TQString text = memo->text(); - int i = text.tqfind(CSL1("\n")); + int i = text.find(CSL1("\n")); if (i > 1) { filename = text.left(i); } @@ -666,7 +666,7 @@ TQString Memofiles::filename(PilotMemo * memo) TQString category = _categories[memo->category()]; - Memofile * memofile = tqfind(category, filename); + Memofile * memofile = find(category, filename); // if we couldn't find a memofile with this filename, or if the // memofile that is found is the same as the memo that we're looking @@ -683,7 +683,7 @@ TQString Memofiles::filename(PilotMemo * memo) // for trouble. while (NULL != memofile && uniq <=20) { newfilename = TQString(filename + CSL1(".") + TQString::number(uniq++) ); - memofile = tqfind(category, newfilename); + memofile = find(category, newfilename); } return newfilename; @@ -694,7 +694,7 @@ TQString Memofiles::sanitizeName(TQString name) TQString clean = name; // safety net. we can't save a // filesystem separator as part of a filename, now can we? - clean.tqreplace('/', CSL1("-")); + clean.replace('/', CSL1("-")); return clean; } diff --git a/conduits/memofileconduit/memofiles.h b/conduits/memofileconduit/memofiles.h index 290cf3a..72b6ed4 100644 --- a/conduits/memofileconduit/memofiles.h +++ b/conduits/memofileconduit/memofiles.h @@ -55,8 +55,8 @@ public: TQPtrList getModified(); TQPtrList getAll() { return _memofiles; } ; - Memofile * tqfind (const TQString & category, const TQString & filename); - Memofile * tqfind (recordid_t id); + Memofile * find (const TQString & category, const TQString & filename); + Memofile * find (recordid_t id); MemoCategoryMap readCategoryMetadata(); void setCategories(MemoCategoryMap map) { _categories = map; } ; diff --git a/conduits/null/null-conduit.cc b/conduits/null/null-conduit.cc index 29d2499..c8e0b3a 100644 --- a/conduits/null/null-conduit.cc +++ b/conduits/null/null-conduit.cc @@ -57,7 +57,7 @@ NullConduit::NullConduit(KPilotLink *d, const TQStringList &l) : ConduitAction(d,n,l), fDatabase(0L), - fFailImmediately( l.tqcontains( CSL1("--fail") )) + fFailImmediately( l.contains( CSL1("--fail") )) { FUNCTIONSETUP; fConduitName=i18n("Null"); diff --git a/conduits/null/null-conduit.h b/conduits/null/null-conduit.h index 48593d9..4cdbbde 100644 --- a/conduits/null/null-conduit.h +++ b/conduits/null/null-conduit.h @@ -45,7 +45,7 @@ class PilotDatabase; class NullConduit : public ConduitAction { public: - /** Constructor. Special case is if @p tqcontains + /** Constructor. Special case is if @p contains * @c --fail as an argument to the conduit, then * the conduit will fail instead of trivially succeeding. */ diff --git a/conduits/sysinfoconduit/sysinfo-conduit.cc b/conduits/sysinfoconduit/sysinfo-conduit.cc index b46f5a3..3ee13e2 100644 --- a/conduits/sysinfoconduit/sysinfo-conduit.cc +++ b/conduits/sysinfoconduit/sysinfo-conduit.cc @@ -520,13 +520,13 @@ void SysInfoConduit::writeFile() for ( TQStringList::Iterator it = keepParts.begin(); it != keepParts.end(); ++it ) { TQRegExp re(CSL1("").tqarg(*it).tqarg(*it)); re.setMinimal(true); - output.tqreplace(re, CSL1("\\1")); + output.replace(re, CSL1("\\1")); } // Do a loop through all keys in fValues TQMap::Iterator it; for ( it = fValues.begin(); it != fValues.end(); ++it ) { - output.tqreplace(CSL1("#%1#").tqarg(it.key()), it.data()); + output.replace(CSL1("#%1#").tqarg(it.key()), it.data()); } // Insert the list of databases @@ -552,27 +552,27 @@ void SysInfoConduit::writeFile() * %8 .. modifyDate * %9 .. backupDate */ - newpatt.tqreplace(CSL1("%0"), TQString::tqfromLatin1(dbi.name)); + newpatt.replace(CSL1("%0"), TQString::tqfromLatin1(dbi.name)); set_long(&tmpchr[0],dbi.type); - newpatt.tqreplace(CSL1("%1"), TQString::tqfromLatin1(tmpchr)); + newpatt.replace(CSL1("%1"), TQString::tqfromLatin1(tmpchr)); set_long(&tmpchr[0],dbi.creator); - newpatt.tqreplace(CSL1("%2"), TQString::tqfromLatin1(tmpchr)); - newpatt.tqreplace(CSL1("%3"), TQString::number(dbi.index)); - newpatt.tqreplace(CSL1("%4"), TQString::number(dbi.flags)); - newpatt.tqreplace(CSL1("%5"), TQString::number(dbi.miscFlags)); - newpatt.tqreplace(CSL1("%6"), TQString::number(dbi.version)); + newpatt.replace(CSL1("%2"), TQString::tqfromLatin1(tmpchr)); + newpatt.replace(CSL1("%3"), TQString::number(dbi.index)); + newpatt.replace(CSL1("%4"), TQString::number(dbi.flags)); + newpatt.replace(CSL1("%5"), TQString::number(dbi.miscFlags)); + newpatt.replace(CSL1("%6"), TQString::number(dbi.version)); TQDateTime tm; tm.setTime_t(dbi.createDate); - newpatt.tqreplace(CSL1("%7"), tm.toString(Qt::LocalDate)); + newpatt.replace(CSL1("%7"), tm.toString(Qt::LocalDate)); tm.setTime_t(dbi.modifyDate); - newpatt.tqreplace(CSL1("%8"), tm.toString(Qt::LocalDate)); + newpatt.replace(CSL1("%8"), tm.toString(Qt::LocalDate)); tm.setTime_t(dbi.backupDate); - newpatt.tqreplace(CSL1("%9"), tm.toString(Qt::LocalDate)); + newpatt.replace(CSL1("%9"), tm.toString(Qt::LocalDate)); dbstring.append(newpatt); } // Now, just replace the whole found pattern by the string we just constructed. - output.tqreplace(re.cap(0), dbstring); + output.replace(re.cap(0), dbstring); } // Write out the result diff --git a/conduits/vcalconduit/kcalRecord.cc b/conduits/vcalconduit/kcalRecord.cc index e7f8c68..598866d 100644 --- a/conduits/vcalconduit/kcalRecord.cc +++ b/conduits/vcalconduit/kcalRecord.cc @@ -63,7 +63,7 @@ void KCalSync::setCategory(PilotRecordBase *de, if (de->category() != Pilot::Unfiled) { deCategory = Pilot::categoryName(&info,de->category()); - if (eventCategories.tqcontains(deCategory)) + if (eventCategories.contains(deCategory)) { // Found, so leave the category unchanged. return; @@ -86,7 +86,7 @@ void KCalSync::setCategory(PilotRecordBase *de, continue; } - if (availableHandheldCategories.tqcontains(*it)) + if (availableHandheldCategories.contains(*it)) { // Since the string is in the list of available categories, // this *can't* fail. @@ -122,7 +122,7 @@ void KCalSync::setCategory(KCal::Incidence *e, if ( Pilot::validCategory(cat) && (cat != Pilot::Unfiled)) { - if (!cats.tqcontains(newcat)) + if (!cats.contains(newcat)) { // if this event only has one category associated with it, then we can // safely assume that what we should be doing here is changing it to match diff --git a/kpilot/conduitConfigDialog.cc b/kpilot/conduitConfigDialog.cc index ac5a3dc..f2a3d54 100644 --- a/kpilot/conduitConfigDialog.cc +++ b/kpilot/conduitConfigDialog.cc @@ -133,7 +133,7 @@ ConduitTip::~ConduitTip() TQString s = l->text(CONDUIT_COMMENT); if (s.isEmpty()) return; - if (s.tqfind(CSL1(""),0,false) == -1) + if (s.find(CSL1(""),0,false) == -1) { s.prepend(CSL1("")); s.append(CSL1("")); @@ -412,7 +412,7 @@ void ConduitConfigWidget::fillLists() p->setText(CONDUIT_COMMENT,i18n(c)); \ p->setText(CONDUIT_LIBRARY,CSL1("internal_" b)); \ p->setText(CONDUIT_DESKTOP,CSL1("internal_" b)); \ - if (potentiallyInstalled.tqfindIndex(p->text(CONDUIT_DESKTOP))>=0) \ + if (potentiallyInstalled.findIndex(p->text(CONDUIT_DESKTOP))>=0) \ p->setOriginalState(true); IC("Install Files","fileinstall", @@ -450,7 +450,7 @@ void ConduitConfigWidget::fillLists() p->setText(CONDUIT_DESKTOP,o->desktopEntryName()); p->setText(CONDUIT_LIBRARY,o->library()); - if (potentiallyInstalled.tqfindIndex(o->desktopEntryName()) < 0) + if (potentiallyInstalled.findIndex(o->desktopEntryName()) < 0) { p->setOriginalState(false); } @@ -805,7 +805,7 @@ void ConduitConfigWidget::load() TQCheckListItem*qq=dynamic_cast(q); if (qq) { - qq->setOn(! (potentiallyInstalled.tqfindIndex(qq->text(CONDUIT_DESKTOP))<0) ); + qq->setOn(! (potentiallyInstalled.findIndex(qq->text(CONDUIT_DESKTOP))<0) ); } q = q->nextSibling(); } diff --git a/kpilot/dbSelectionDialog.cc b/kpilot/dbSelectionDialog.cc index 81cf50e..4ce9c02 100644 --- a/kpilot/dbSelectionDialog.cc +++ b/kpilot/dbSelectionDialog.cc @@ -57,17 +57,17 @@ KPilotDBSelectionDialog::KPilotDBSelectionDialog(TQStringList &selectedDBs, TQSt // Fill the encodings list TQStringList items(deviceDBs); for ( TQStringList::Iterator it = fAddedDBs.begin(); it != fAddedDBs.end(); ++it ) { - if (items.tqcontains(*it)==0) items << (*it); + if (items.contains(*it)==0) items << (*it); } for ( TQStringList::Iterator it = fSelectedDBs.begin(); it != fSelectedDBs.end(); ++it ) { - if (items.tqcontains(*it)==0) items << (*it); + if (items.contains(*it)==0) items << (*it); } items.sort(); for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) { TQCheckListItem*checkitem=new TQCheckListItem(fSelectionWidget->fDatabaseList, *it, TQCheckListItem::CheckBox); - if (fSelectedDBs.tqcontains(*it)) checkitem->setOn(true); + if (fSelectedDBs.contains(*it)) checkitem->setOn(true); } connect(fSelectionWidget->fNameEdit, TQT_SIGNAL(textChanged( const TQString & )), @@ -103,7 +103,7 @@ void KPilotDBSelectionDialog::removeDB() if (item) { TQString dbname=item->text(0); - if (fDeviceDBs.tqcontains(dbname)) + if (fDeviceDBs.contains(dbname)) { KMessageBox::error(this, i18n("This is a database that exists on the device. It was not added manually, so it can not removed from the list."), i18n("Database on Device")); } diff --git a/kpilot/fileInstallWidget.cc b/kpilot/fileInstallWidget.cc index e8b55de..c9ce561 100644 --- a/kpilot/fileInstallWidget.cc +++ b/kpilot/fileInstallWidget.cc @@ -285,7 +285,7 @@ void FileInstallWidget::contextMenu(TQMouseEvent *event) TQPopupMenu popup(fIconView); - item = fIconView->tqfindItem(event->pos()); + item = fIconView->findItem(event->pos()); if(item) { // Popup for the right clicked item popup.insertItem(i18n("Delete a single file item","Delete"), 10); diff --git a/kpilot/hotSync.cc b/kpilot/hotSync.cc index b8b7356..96e006c 100644 --- a/kpilot/hotSync.cc +++ b/kpilot/hotSync.cc @@ -121,11 +121,11 @@ public: TQString dbname = Pilot::fromPilot( info->name, 32 ); - if ( !fDeviceDBs.tqcontains( creator ) ) + if ( !fDeviceDBs.contains( creator ) ) { fDeviceDBs << creator; } - if ( !fDeviceDBs.tqcontains( dbname ) ) + if ( !fDeviceDBs.contains( dbname ) ) { fDeviceDBs << dbname; } @@ -151,7 +151,7 @@ public: return false; } - if (fNoBackupCreators.tqfindIndex(info->creator) != -1) + if (fNoBackupCreators.findIndex(info->creator) != -1) { return false; } @@ -501,7 +501,7 @@ bool BackupAction::startBackupThread(DBInfo *info) // if we're here then we are going to back this database up. do some basic sanity // checks and proceed.... TQString databaseName(Pilot::fromPilot(info->name)); - databaseName.tqreplace('/', '_'); + databaseName.replace('/', '_'); TQString fullBackupName = fP->fBackupDir + databaseName; diff --git a/kpilot/kpilot.cc b/kpilot/kpilot.cc index 91d8d31..328029f 100644 --- a/kpilot/kpilot.cc +++ b/kpilot/kpilot.cc @@ -189,7 +189,7 @@ void KPilotInstaller::startDaemonIfNeeded() { int wordoffset; s.remove(0,12); - wordoffset=s.tqfind(';'); + wordoffset=s.find(';'); if (wordoffset>0) s.truncate(wordoffset); fLogWidget->addMessage( diff --git a/kpilot/kpilotConfig.cc b/kpilot/kpilotConfig.cc index cec6382..35f25fa 100644 --- a/kpilot/kpilotConfig.cc +++ b/kpilot/kpilotConfig.cc @@ -125,7 +125,7 @@ void KPilotConfig::addDirtyDatabase(TQString db) { FUNCTIONSETUP; TQStringList l(KPilotSettings::dirtyDatabases()); - if (!l.tqcontains(db)) + if (!l.contains(db)) { l.append(db); KPilotSettings::setDirtyDatabases(l); @@ -136,7 +136,7 @@ void KPilotConfig::addDirtyDatabase(TQString db) void KPilotConfig::addAppBlockChangedDatabase(TQString db) { TQStringList l(KPilotSettings::appBlockChangedDatabases()); - if (!l.tqcontains(db)) + if (!l.contains(db)) { l.append(db); KPilotSettings::setAppBlockChangedDatabases(l); @@ -146,7 +146,7 @@ void KPilotConfig::addAppBlockChangedDatabase(TQString db) void KPilotConfig::addFlagsChangedDatabase(TQString db) { TQStringList l(KPilotSettings::flagsChangedDatabases()); - if (!l.tqcontains(db)) + if (!l.contains(db)) { l.append(db); KPilotSettings::setFlagsChangedDatabases(l); diff --git a/kpilot/kpilotConfigWizard.cc b/kpilot/kpilotConfigWizard.cc index d26fbb6..fd6036d 100644 --- a/kpilot/kpilotConfigWizard.cc +++ b/kpilot/kpilotConfigWizard.cc @@ -123,7 +123,7 @@ void ConfigWizard::accept() TQStringList conduits = KPilotSettings::installedConduits(); int version(0); -#define APPEND_CONDUIT(a) if (!conduits.tqcontains(a)) conduits.append(a) +#define APPEND_CONDUIT(a) if (!conduits.contains(a)) conduits.append(a) TQString applicationName(i18n("general KDE-PIM")); APPEND_CONDUIT("internal_fileinstall"); APPEND_CONDUIT("todo-conduit"); diff --git a/kpilot/listItems.cc b/kpilot/listItems.cc index 1dbc09e..2b5b98e 100644 --- a/kpilot/listItems.cc +++ b/kpilot/listItems.cc @@ -176,12 +176,12 @@ void PilotListViewItem::setNumericCol(int col, bool numeric) // FUNCTIONSETUP; if (numeric) { - if (!numericCols.tqcontains(col)) + if (!numericCols.contains(col)) numericCols.append(col); } else { - if (numericCols.tqcontains(col)) + if (numericCols.contains(col)) numericCols.remove(col); } } @@ -211,7 +211,7 @@ int PilotListViewItem::compare( TQListViewItem *i, int col, bool ascending ) con /*#ifdef DEBUG DEBUGKPILOT<<"Item of dyn cast: "<insert( CSL1("internal_fileinstall"), new TQString(i18n("File Installer")) ); } @@ -739,7 +739,7 @@ static void fillConduitNameMap() TQStringList::ConstIterator end = l.end(); for (TQStringList::ConstIterator i = l.begin(); i != end; ++i) { - if (!conduitNameMap->tqfind(*i)) + if (!conduitNameMap->find(*i)) { TQString readableName = CSL1(""); KSharedPtr < KService > o = KService::serviceByDesktopName(*i); @@ -774,7 +774,7 @@ TQStringList PilotDaemon::configuredConduitList() TQStringList result; for (TQStringList::ConstIterator i = keys.begin(); i != end; ++i) { - result << *(conduitNameMap->tqfind(*i)); + result << *(conduitNameMap->find(*i)); } return result; @@ -920,7 +920,7 @@ static void queueInstaller(ActionQueue *fSyncStack, FileInstaller *fInstaller, const TQStringList &c) { - if (c.tqfindIndex(CSL1("internal_fileinstall")) >= 0) + if (c.findIndex(CSL1("internal_fileinstall")) >= 0) { fSyncStack->addAction(new FileInstallAction(pilotLink,fInstaller->dir())); } 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("
\n")); + return t.replace(CSL1("\n"), CSL1("
\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- string. Use that to tqfind + // Experiment with a long non- 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; diff --git a/tests/mergecalendars.cc b/tests/mergecalendars.cc index 0d390aa..2fc1e78 100644 --- a/tests/mergecalendars.cc +++ b/tests/mergecalendars.cc @@ -185,7 +185,7 @@ int main(int argc, char **argv) next = *korgIt; } - if (ev->categoriesStr().tqcontains(categoryToken)) + if (ev->categoriesStr().contains(categoryToken)) { if (debug_level) DEBUGKPILOT << " - Found matching event: [" diff --git a/tests/testidmapper.cc b/tests/testidmapper.cc index 94e6db8..8d60afc 100644 --- a/tests/testidmapper.cc +++ b/tests/testidmapper.cc @@ -170,7 +170,7 @@ bool test4() // This prevents the test from chrashing when getHHObjectIds.size is 0. if( result1 ) - result2 = ( mapper->getHHObjectIds( CONDUIT ).tqcontains( 150 ) ); + result2 = ( mapper->getHHObjectIds( CONDUIT ).contains( 150 ) ); if( result1 && result2 ) { @@ -210,7 +210,7 @@ bool test5() bool result2 = false; if( result1 ) - result2 = ( mapper->getPCObjectIds( CONDUIT ).tqcontains( "testuid-2" ) ); + result2 = ( mapper->getPCObjectIds( CONDUIT ).contains( "testuid-2" ) ); if( result1 && result2 ) -- cgit v1.2.3