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
v3.5.13-sru
tpearson 13 years ago
parent 45598e3565
commit 539a35866f

@ -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)"<<endl;
abChanged = true;
@ -843,7 +843,7 @@ void AbbrowserConduit::slotDeleteUnsyncedHHRecords()
RecordIDList::iterator it;
for ( it = ids.begin(); it != ids.end(); ++it )
{
if (!syncedIds.tqcontains(*it))
if (!syncedIds.contains(*it))
{
DEBUGKPILOT<<"Deleting record with ID "<<*it<<" from handheld (is not on PC, and syncing with PC->HH direction)"<<endl;
fDatabase->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;
}
}

@ -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;
}

@ -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);
}

@ -79,7 +79,7 @@ int docMatchBookmark::findMatches(TQString doctext, bmkList &fBookmarks) {
#endif
while (pos >= 0 && found<to) {
pos = doctext.tqfind(pattern, pos);
pos = doctext.find(pattern, pos);
#ifdef DEBUG
DEBUGKPILOT<<"Result of search: pos="<<pos<<endl;
#endif
@ -120,8 +120,8 @@ int docRegExpBookmark::findMatches(TQString doctext, bmkList &fBookmarks)
// TODO: use the subexpressions from the regexp for the bmk name ($1..$9) (given as separate regexp)
TQString bmkText(bmkName);
for (int i=0; i<=rx.numCaptures(); ++i) {
bmkText.tqreplace(CSL1("$%1").tqarg(i), rx.cap(i));
bmkText.tqreplace(CSL1("\\%1").tqarg(i), rx.cap(i));
bmkText.replace(CSL1("$%1").tqarg(i), rx.cap(i));
bmkText.replace(CSL1("\\%1").tqarg(i), rx.cap(i));
}
fBookmarks.append(new docBookmark(bmkText.left(16), pos));
}

@ -414,7 +414,7 @@ void DOCConduit::syncNextDB() {
// if creator and/or type don't match, go to next db
if (!isCorrectDBTypeCreator(dbinfo) ||
fDBNames.tqcontains(TQString::tqfromLatin1(dbinfo.name)))
fDBNames.contains(TQString::tqfromLatin1(dbinfo.name)))
{
TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB()));
return;
@ -474,7 +474,7 @@ void DOCConduit::syncNextTXT()
memset(&dbinfo.name[0], 0, 33);
strncpy(&dbinfo.name[0], fl.baseName(TRUE).latin1(), 30);
bool alreadySynced=fDBNames.tqcontains(fl.baseName(TRUE));
bool alreadySynced=fDBNames.contains(fl.baseName(TRUE));
if (!alreadySynced) {
docSyncInfo syncInfo(TQString::tqfromLatin1(dbinfo.name),
txtfilename, pdbfilename, eSyncNone);
@ -529,7 +529,7 @@ void DOCConduit::checkPDBFiles() {
// Get the doc title and check if it has already been synced (in the synced docs list of in fDBNames to be synced)
// If the doc title doesn't appear in either list, install it to the Handheld, and add it to the list of dbs to be synced.
TQString dbname=fl.baseName(TRUE).left(30);
if (!fDBNames.tqcontains(dbname) && !fDBListSynced.tqcontains(dbname)) {
if (!fDBNames.contains(dbname) && !fDBListSynced.contains(dbname)) {
if (fHandle->installFiles(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 "<<sinfo.dbinfo.name<<" wasn't included in the previous sync!"<<endl;

@ -288,7 +288,7 @@ void KNotesAction::listNotes()
FUNCTIONSETUP;
KCal::Journal::List notes = fP->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;

@ -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);

@ -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 "

@ -92,7 +92,7 @@
</UML:Operation>
<UML:Operation visibility="private" xmi.id="97" type="void" name="ensureDirectoryReady" />
<UML:Operation visibility="public" xmi.id="98" type="void" name="loadIds" />
<UML:Operation visibility="public" xmi.id="99" type="Memofile" name="tqfind" >
<UML:Operation visibility="public" xmi.id="99" type="Memofile" name="find" >
<UML:Parameter visibility="public" xmi.id="100" value="" type=TQSTRING_OBJECT_NAME_STRING name="category" />
<UML:Parameter visibility="public" xmi.id="101" value="" type=TQSTRING_OBJECT_NAME_STRING name="filename" />
</UML:Operation>

@ -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;
}

@ -55,8 +55,8 @@ public:
TQPtrList<Memofile> getModified();
TQPtrList<Memofile> 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; } ;

@ -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");

@ -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.
*/

@ -520,13 +520,13 @@ void SysInfoConduit::writeFile()
for ( TQStringList::Iterator it = keepParts.begin(); it != keepParts.end(); ++it ) {
TQRegExp re(CSL1("<!--#if%1#(.*)#endif%1#-->").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<TQString,TQString>::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

@ -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

@ -133,7 +133,7 @@ ConduitTip::~ConduitTip()
TQString s = l->text(CONDUIT_COMMENT);
if (s.isEmpty()) return;
if (s.tqfind(CSL1("<qt>"),0,false) == -1)
if (s.find(CSL1("<qt>"),0,false) == -1)
{
s.prepend(CSL1("<qt>"));
s.append(CSL1("</qt>"));
@ -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<TQCheckListItem*>(q);
if (qq)
{
qq->setOn(! (potentiallyInstalled.tqfindIndex(qq->text(CONDUIT_DESKTOP))<0) );
qq->setOn(! (potentiallyInstalled.findIndex(qq->text(CONDUIT_DESKTOP))<0) );
}
q = q->nextSibling();
}

@ -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"));
}

@ -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);

@ -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;

@ -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(

@ -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);

@ -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");

@ -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: "<<item<<endl;
#endif*/
if (item && numericCols.tqcontains(col))
if (item && numericCols.contains(col))
{
/*#ifdef DEBUG
DEBUGKPILOT<<"Comparing: col "<<col<<", Ascending: "<<ascending<<endl;

@ -731,7 +731,7 @@ static void fillConduitNameMap()
TQStringList l = KPilotSettings::installedConduits();
// Fill with internal settings.
if ( l.tqfind( CSL1("internal_fileinstall") ) != l.end() ) {
if ( l.find( CSL1("internal_fileinstall") ) != l.end() ) {
conduitNameMap->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("<unknown>");
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()));
}

@ -56,7 +56,7 @@ public:
<< device << "]" << endl;
showList();
return !mBoundDevices.tqcontains(device);
return !mBoundDevices.contains(device);
}
void bindDevice(const TQString &device)

@ -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))

@ -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
{

@ -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;
}

@ -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)

@ -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)
{

@ -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);
}

@ -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 ) )

@ -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;

@ -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: ["

@ -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 )

Loading…
Cancel
Save