rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 4be907152d
commit 93f9fda465

@ -57,7 +57,7 @@ int main(int argc, char** argv)
if (KPasswordDialog::getPassword(pw,prompt,0)==KPasswordDialog::Accepted) {
std::cout << pw.data() << std::endl;
/* cleanup memory */
pw.tqreplace(0,pw.length(),"0");
pw.replace(0,pw.length(),"0");
return 0;
}
return 1;

@ -66,7 +66,7 @@ KURL KTranslateUrl::translateSystemUrl(const KURL&_url)
bool KTranslateUrl::parseURL(const KURL&url,TQString&name,TQString&path)
{
TQString url_path = url.path();
int i = url_path.tqfind('/', 1);
int i = url_path.find('/', 1);
if (i > 0)
{
name = url_path.mid(1, i-1);

@ -123,14 +123,14 @@ svn::Revision KioSvnData::urlToRev(const KURL&url)
/* we try to check if it is ssh and try to get a password for it */
TQString proto = url.protocol();
if (proto.tqfind("ssh")!=-1) {
if (proto.find("ssh")!=-1) {
SshAgent ag;
ag.addSshIdentities();
}
svn::Revision rev,tmp;
rev = svn::Revision::UNDEFINED;
if (q.tqfind("rev")!=q.end()) {
if (q.find("rev")!=q.end()) {
TQString v = q["rev"];
m_Svnclient->url2Revision(v,rev,tmp);
}

@ -163,7 +163,7 @@ void DiffBrowser::doSearch(const TQString&to_find_string,bool case_sensitive,boo
col = col+1;
}
while (1) {
bool result = tqfind(to_find_string,case_sensitive,false,
bool result = find(to_find_string,case_sensitive,false,
(!back),&line,&col);
if (result) {

@ -261,7 +261,7 @@ void Logmsg_impl::saveHistory(bool canceld)
/// @todo make static threadsafe
if (!canceld) {
TQValueList<TQString>::iterator it;
if ( (it=sLogHistory.tqfind(m_LogEdit->text()))!=sLogHistory.end()) {
if ( (it=sLogHistory.find(m_LogEdit->text()))!=sLogHistory.end()) {
sLogHistory.erase(it);
}
sLogHistory.push_front(m_LogEdit->text());

@ -152,7 +152,7 @@ bool PwStorage::getLogin(const TQString&realm,TQString&user,TQString&pw)
}
TQMap<TQString,TQString> content;
int j = mData->getWallet()->readMap(realm,content);
if (j!=0||content.tqfind("user")==content.end()) {
if (j!=0||content.find("user")==content.end()) {
return true;
}
user = content["user"];
@ -163,7 +163,7 @@ bool PwStorage::getLogin(const TQString&realm,TQString&user,TQString&pw)
bool PwStorage::getCachedLogin(const TQString&realm,TQString&user,TQString&pw)
{
TQMutexLocker lc(mData->getCacheMutex());
PwStorageData::cache_type::ConstIterator it = mData->getLoginCache()->tqfind(realm);
PwStorageData::cache_type::ConstIterator it = mData->getLoginCache()->find(realm);
if (it!=mData->getLoginCache()->end()) {
user=(*it).first;
pw = (*it).second;

@ -115,7 +115,7 @@ public:
setText(COL_AUT,m_Content.tAuthor());
}
TQString _line = m_Content.tLine();
_line.tqreplace("\t"," ");
_line.replace("\t"," ");
setText(COL_LINE,TQString("%1").tqarg(_line));
}
@ -162,7 +162,7 @@ void BlameDisplayItem::display()
setText(COL_LINENR,TQString("%1").tqarg(m_Content.lineNumber()+1));
TQString _line = m_Content.tLine();
_line.tqreplace("\t"," ");
_line.replace("\t"," ");
setText(COL_LINE,TQString("%1").tqarg(_line));
}
@ -296,7 +296,7 @@ void BlameDisplay_impl::setContent(const TQString&what,const svn::AnnotatedFile&
if (disp) {
lastRev = (*bit).revision();
}
if (m_Data->m_shadingMap.tqfind((*bit).revision())==m_Data->m_shadingMap.end()) {
if (m_Data->m_shadingMap.find((*bit).revision())==m_Data->m_shadingMap.end()) {
m_Data->m_shadingMap[(*bit).revision()]=TQColor();
}
}
@ -307,7 +307,7 @@ void BlameDisplay_impl::setContent(const TQString&what,const svn::AnnotatedFile&
uint colinc=0;
for (svn_revnum_t i = m_Data->min; i<= m_Data->max;++i) {
if (m_Data->m_shadingMap.tqfind(i)==m_Data->m_shadingMap.end()) {
if (m_Data->m_shadingMap.find(i)==m_Data->m_shadingMap.end()) {
continue;
}
a.setRgb(a.red()+offset,a.green()+offset,a.blue()+offset);
@ -340,7 +340,7 @@ void BlameDisplay_impl::setContent(const TQString&what,const svn::AnnotatedFile&
const TQColor BlameDisplay_impl::rev2color(svn_revnum_t r )const
{
if (m_Data->m_shadingMap.tqfind(r)!=m_Data->m_shadingMap.end() && m_Data->m_shadingMap[r].isValid())
if (m_Data->m_shadingMap.find(r)!=m_Data->m_shadingMap.end() && m_Data->m_shadingMap[r].isValid())
{
return m_Data->m_shadingMap[r];
} else {
@ -399,7 +399,7 @@ void BlameDisplay_impl::showCommit(BlameDisplayItem*bit)
if (!bit) return;
WidgetBlockStack a(m_BlameList);
TQString text;
if (m_Data->m_logCache.tqfind(bit->rev())!=m_Data->m_logCache.end()) {
if (m_Data->m_logCache.find(bit->rev())!=m_Data->m_logCache.end()) {
text = m_Data->m_logCache[bit->rev()].message;
} else {
CursorStack a(TQt::BusyCursor);

@ -226,13 +226,13 @@ int CommandExec::exec()
tmpurl = helpers::KTranslateUrl::translateSystemUrl(m_pCPart->args->url(j).prettyURL());
query = tmpurl.query();
q = m_pCPart->args->url(j).queryItems();
if (q.tqfind("rev")!=q.end()) {
if (q.find("rev")!=q.end()) {
v = q["rev"];
} else {
v = "";
}
tmpurl.setProtocol(svn::Url::transformProtokoll(tmpurl.protocol()));
if (tmpurl.protocol().tqfind("ssh")!=-1) {
if (tmpurl.protocol().find("ssh")!=-1) {
SshAgent ag;
// this class itself checks if done before
ag.addSshIdentities();
@ -410,7 +410,7 @@ void CommandExec::slotCmd_blame()
void CommandExec::slotCmd_cat()
{
if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) {
if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) {
m_pCPart->rev_set=true;
m_pCPart->start=m_pCPart->extraRevisions[0];
} else {
@ -423,7 +423,7 @@ void CommandExec::slotCmd_cat()
void CommandExec::slotCmd_get()
{
if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) {
if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) {
m_pCPart->rev_set=true;
m_pCPart->start=m_pCPart->extraRevisions[0];
} else {
@ -454,12 +454,12 @@ void CommandExec::slotCmd_diff()
} else {
svn::Revision r1 = svn::Revision::HEAD;
svn::Revision r2 = svn::Revision::HEAD;
if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) {
if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) {
r1 = m_pCPart->extraRevisions[0];
} else if (!svn::Url::isValid(m_pCPart->url[0])) {
r1 = svn::Revision::WORKING;
}
if (m_pCPart->extraRevisions.tqfind(1)!=m_pCPart->extraRevisions.end()) {
if (m_pCPart->extraRevisions.find(1)!=m_pCPart->extraRevisions.end()) {
r2 = m_pCPart->extraRevisions[1];
} else if (!svn::Url::isValid(m_pCPart->url[1])) {
r2 = svn::Revision::WORKING;
@ -470,7 +470,7 @@ void CommandExec::slotCmd_diff()
void CommandExec::slotCmd_info()
{
if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) {
if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) {
m_pCPart->rev_set=true;
m_pCPart->start=m_pCPart->extraRevisions[0];
}
@ -520,7 +520,7 @@ void CommandExec::slotCmd_copy()
} else {
target = m_pCPart->url[1];
}
if (m_pCPart->extraRevisions.tqfind(0)!=m_pCPart->extraRevisions.end()) {
if (m_pCPart->extraRevisions.find(0)!=m_pCPart->extraRevisions.end()) {
m_pCPart->rev_set=true;
m_pCPart->start=m_pCPart->extraRevisions[0];
} else {
@ -629,7 +629,7 @@ void CommandExec::slotCmd_switch()
clientException(i18n("May only switch one url at time!"));
return;
}
if (m_pCPart->baseUrls.tqfind(0)==m_pCPart->baseUrls.end()) {
if (m_pCPart->baseUrls.find(0)==m_pCPart->baseUrls.end()) {
clientException(i18n("Switch only on working copies!"));
return;
}

@ -137,14 +137,14 @@ void EditProperty_impl::updateToolTip(const TQString & selection)
int i;
if (isDir) {
i = dirProperties.tqfindIndex(selection);
i = dirProperties.findIndex(selection);
if (i >= 0) {
comment = dirComments[i];
} else {
comment = "No help for this property available";
}
} else {
i = fileProperties.tqfindIndex(selection);
i = fileProperties.findIndex(selection);
if (i >= 0) {
comment = fileComments[i];
} else {

@ -132,13 +132,13 @@ void FileListViewItem::refreshtqStatus(bool childs,TQPtrList<SvnItem>*exclude,bo
}
it = static_cast<FileListViewItem*>(tqparent());
if (!childs) {
if (it && (!exclude || exclude->tqfind(it)==-1)) {
if (it && (!exclude || exclude->find(it)==-1)) {
it->refreshtqStatus(false,exclude);
}
} else if (firstChild()){
it = static_cast<FileListViewItem*>(firstChild());
while (it) {
if (!exclude || exclude->tqfind(it)==-1) {
if (!exclude || exclude->find(it)==-1) {
it->refreshtqStatus(true,exclude);
}
it = static_cast<FileListViewItem*>(it->nextSibling());

@ -131,7 +131,7 @@ void Propertylist::slotItemRenamed(TQListViewItem*_item,const TQString & text,in
bool Propertylist::checkExisting(const TQString&aName,TQListViewItem*it)
{
if (!it) {
return tqfindItem(aName,0)!=0;
return findItem(aName,0)!=0;
}
TQListViewItemIterator iter(this);
while ( iter.current() ) {

@ -71,7 +71,7 @@ void PannerView::contentsMouseMoveEvent(TQMouseEvent* e)
void PannerView::contentsMousePressEvent(TQMouseEvent* e)
{
if (m_ZoomRect.isValid()) {
if (!m_ZoomRect.tqcontains(e->pos())) {
if (!m_ZoomRect.contains(e->pos())) {
emit zoomRectMoved(e->pos().x() - m_ZoomRect.center().x(),
e->pos().y() - m_ZoomRect.center().y());
}

@ -172,7 +172,7 @@ void RevGraphView::dotExit(KProcess*p)
if (p!=renderProcess)return;
// remove line breaks when lines to long
TQRegExp endslash("\\\\\\n");
dotOutput.tqreplace(endslash,"");
dotOutput.replace(endslash,"");
double scale = 1.0, scaleX = 1.0, scaleY = 1.0;
double dotWidth, dotHeight;
TQTextStream* dotStream;
@ -275,11 +275,11 @@ void RevGraphView::dotExit(KProcess*p)
int indexHead = -1;
TQMap<TQString,GraphTreeLabel*>::Iterator it;
it = m_NodeList.tqfind(node2Name);
it = m_NodeList.find(node2Name);
if (it!=m_NodeList.end()) {
it.data()->setSource(node1Name);
}
it = m_NodeList.tqfind(node1Name);
it = m_NodeList.find(node1Name);
if (it!=m_NodeList.end()) {
GraphTreeLabel*tlab = it.data();
if (tlab) {
@ -342,7 +342,7 @@ bool RevGraphView::isStart(const TQString&nodeName)const
{
bool res = false;
trevTree::ConstIterator it;
it = m_Tree.tqfind(nodeName);
it = m_Tree.find(nodeName);
if (it==m_Tree.end()) {
return res;
}
@ -357,7 +357,7 @@ bool RevGraphView::isStart(const TQString&nodeName)const
char RevGraphView::getAction(const TQString&nodeName)const
{
trevTree::ConstIterator it;
it = m_Tree.tqfind(nodeName);
it = m_Tree.find(nodeName);
if (it==m_Tree.end()) {
return (char)0;
}
@ -367,7 +367,7 @@ char RevGraphView::getAction(const TQString&nodeName)const
TQColor RevGraphView::getBgColor(const TQString&nodeName)const
{
trevTree::ConstIterator it;
it = m_Tree.tqfind(nodeName);
it = m_Tree.find(nodeName);
TQColor res = TQt::white;
if (it==m_Tree.end()) {
return res;
@ -400,12 +400,12 @@ TQColor RevGraphView::getBgColor(const TQString&nodeName)const
const TQString&RevGraphView::getLabelstring(const TQString&nodeName)
{
TQMap<TQString,TQString>::ConstIterator nIt;
nIt = m_LabelMap.tqfind(nodeName);
nIt = m_LabelMap.find(nodeName);
if (nIt!=m_LabelMap.end()) {
return nIt.data();
}
trevTree::ConstIterator it1;
it1 = m_Tree.tqfind(nodeName);
it1 = m_Tree.find(nodeName);
if (it1==m_Tree.end()) {
return m_LabelMap[""];
}
@ -514,7 +514,7 @@ TQString RevGraphView::toolTip(const TQString&_nodename,bool full)const
{
TQString res = TQString();
trevTree::ConstIterator it;
it = m_Tree.tqfind(_nodename);
it = m_Tree.find(_nodename);
if (it==m_Tree.end()) {
return res;
}
@ -895,7 +895,7 @@ void RevGraphView::makeCat(GraphTreeLabel*_l)
return;
}
TQString n1 = _l->nodename();
trevTree::ConstIterator it = m_Tree.tqfind(n1);
trevTree::ConstIterator it = m_Tree.find(n1);
if (it==m_Tree.end()) {
return;
}
@ -917,14 +917,14 @@ void RevGraphView::makeDiff(const TQString&n1,const TQString&n2)
{
if (n1.isEmpty()||n2.isEmpty()) return;
trevTree::ConstIterator it;
it = m_Tree.tqfind(n2);
it = m_Tree.find(n2);
if (it==m_Tree.end()) {
return;
}
svn::Revision sr(it.data().rev);
TQString sp = _basePath+it.data().name;
it = m_Tree.tqfind(n1);
it = m_Tree.find(n1);
if (it==m_Tree.end()) {
return;
}

@ -361,8 +361,8 @@ bool RevisionTree::isValid()const
static TQString uniqueNodeName(long rev,const TQString&path)
{
TQString res = KCodecs::base64Encode(path.local8Bit(),false);
res.tqreplace("\"","_quot_");
res.tqreplace(" ","_space_");
res.replace("\"","_quot_");
res.replace(" ","_space_");
TQString n; n.sprintf("%05ld",rev);
res = "\""+n+TQString("_%1\"").tqarg(res);
return res;

@ -568,7 +568,7 @@ bool kdesvnfilelist::openURL( const KURL &url,bool noReinit )
}
if (query.length()>1) {
TQMap<TQString,TQString> q = url.queryItems();
if (q.tqfind("rev")!=q.end()) {
if (q.find("rev")!=q.end()) {
TQString v = q["rev"];
svn::Revision tmp;
m_SvnWrapper->svnclient()->url2Revision(v,m_pList->m_remoteRevision,tmp);
@ -831,7 +831,7 @@ void kdesvnfilelist::slotItemRead(TQListViewItem*aItem)
_ex = k->isDir();
}
if (_ex &&(m_Dirsread.tqfind(k->fullName())==m_Dirsread.end()||m_Dirsread[k->fullName()]==false)) {
if (_ex &&(m_Dirsread.find(k->fullName())==m_Dirsread.end()||m_Dirsread[k->fullName()]==false)) {
if (checkDirs(k->fullName(),k)) {
m_Dirsread[k->fullName()]=true;
} else {
@ -1410,7 +1410,7 @@ bool kdesvnfilelist::refreshRecursive(FileListViewItem*_tqparent,bool down)
}
while (item) {
if (item->isDir()) {
if ((m_Dirsread.tqfind(item->fullName())!=m_Dirsread.end()&&m_Dirsread[item->fullName()]==true)) {
if ((m_Dirsread.find(item->fullName())!=m_Dirsread.end()&&m_Dirsread[item->fullName()]==true)) {
if (item->childCount()==0) {
checkDirs(item->fullName(),item);
dispchanged = true;
@ -2611,7 +2611,7 @@ void kdesvnfilelist::slotDirItemDeleted(const TQString&what)
{
m_pList->stopDirTimer();
m_pList->m_fileTip->setItem(0);
TQMap<TQString,TQChar>::Iterator it = m_pList->dirItems.tqfind(what);
TQMap<TQString,TQChar>::Iterator it = m_pList->dirItems.find(what);
if (it!=m_pList->dirItems.end() && m_pList->dirItems[what]=='A') {
m_pList->dirItems.erase(it);
} else {

@ -45,7 +45,7 @@ void OpenContextmenu::setup()
TQCString nam;
nam.setNum( id );
TQString actionName( (*it)->name().tqreplace("&", "&&") );
TQString actionName( (*it)->name().replace("&", "&&") );
act = new KAction( actionName, (*it)->pixmap( KIcon::Small ), 0,
TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), TQT_TQOBJECT(this), nam.prepend( "appservice_" ) );
act->plug(this);
@ -62,9 +62,9 @@ void OpenContextmenu::setup()
void OpenContextmenu::slotRunService()
{
TQCString senderName = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name();
int id = senderName.mid( senderName.tqfind( '_' ) + 1 ).toInt();
int id = senderName.mid( senderName.find( '_' ) + 1 ).toInt();
TQMap<int,KService::Ptr>::Iterator it = m_mapPopup.tqfind( id );
TQMap<int,KService::Ptr>::Iterator it = m_mapPopup.find( id );
if ( it != m_mapPopup.end() )
{
KRun::run( **it, m_Path );

@ -138,7 +138,7 @@ public:
if (Kdesvnsettings::use_external_diff()) {
TQString edisp = Kdesvnsettings::external_diff_display();
TQStringList wlist = TQStringList::split(" ",edisp);
if (wlist.count()>=3 && edisp.tqfind("%1")!=-1 && edisp.tqfind("%2")!=-1) {
if (wlist.count()>=3 && edisp.find("%1")!=-1 && edisp.find("%2")!=-1) {
return true;
}
}
@ -345,7 +345,7 @@ bool SvnActions::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const TQStri
svn::LogEntriesMap _m;
try {
svn::cache::ReposLog rl(m_Data->m_Svnclient ,root);
if (rl.isValid() && rl.simpleLog(_m,r,r,true) && _m.tqfind(r.revnum())!=_m.end() ) {
if (rl.isValid() && rl.simpleLog(_m,r,r,true) && _m.find(r.revnum())!=_m.end() ) {
t = _m[r.revnum()];
res = true;
}
@ -357,7 +357,7 @@ bool SvnActions::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const TQStri
if (!res) {
svn::SharedPointer<svn::LogEntriesMap> log = getLog(r,r,peg,root,true,1);
if (log) {
if (log->tqfind(r.revnum())!=log->end()) {
if (log->find(r.revnum())!=log->end()) {
t = (*log)[r.revnum()];
res = true;
}
@ -379,7 +379,7 @@ bool SvnActions::singleInfo(const TQString&what,const svn::Revision&_rev,svn::In
// working copy
// url = svn::Wc::getUrl(what);
url = what;
if (url.tqfind("@")!=-1) {
if (url.find("@")!=-1) {
url+="@BASE";
}
peg = svn::Revision::UNDEFINED;
@ -676,7 +676,7 @@ TQString SvnActions::getInfo(const TQString& _what,const svn::Revision&rev,const
connect(this,TQT_SIGNAL(sigExtraLogMsg(const TQString&)),&sdlg,TQT_SLOT(slotExtraMessage(const TQString&)));
svn::InfoEntries e;
entries = (m_Data->m_Svnclient->info(_what+
(_what.tqfind("@")>-1&&!svn::Url::isValid(_what)?"@BASE":""),recursive?svn::DepthInfinity:svn::DepthEmpty,rev,peg));
(_what.find("@")>-1&&!svn::Url::isValid(_what)?"@BASE":""),recursive?svn::DepthInfinity:svn::DepthEmpty,rev,peg));
} catch (const svn::Exception&e) {
emit clientException(e.msg());
return TQString();
@ -1058,14 +1058,14 @@ void SvnActions::procClosed(KProcess*proc)
{
if (!proc) return;
TQMap<KProcess*,TQStringList>::iterator it;
if ( (it=m_Data->m_tempfilelist.tqfind(proc))!=m_Data->m_tempfilelist.end()) {
if ( (it=m_Data->m_tempfilelist.find(proc))!=m_Data->m_tempfilelist.end()) {
for (TQStringList::iterator it2 = (*it).begin();
it2 != (*it).end();++it2) {
::unlink((*it2).ascii());
}
m_Data->m_tempfilelist.erase(it);
}
if ( (it=m_Data->m_tempdirlist.tqfind(proc))!=m_Data->m_tempdirlist.end()) {
if ( (it=m_Data->m_tempdirlist.find(proc))!=m_Data->m_tempdirlist.end()) {
for (TQStringList::iterator it2 = (*it).begin();
it2 != (*it).end();++it2) {
KIO::NetAccess::del((*it2),0);
@ -1323,7 +1323,7 @@ void SvnActions::dispDiff(const TQByteArray&ex)
TQString what = Kdesvnsettings::external_diff_display();
int r = KProcess::Stdin|KProcess::Stderr;
if (Kdesvnsettings::use_external_diff() && (what.tqfind("%1")==-1 || what.tqfind("%2")==-1)) {
if (Kdesvnsettings::use_external_diff() && (what.find("%1")==-1 || what.find("%2")==-1)) {
TQStringList wlist = TQStringList::split(" ",what);
KProcess*proc = new KProcess();
bool fname_used = false;
@ -2680,7 +2680,7 @@ bool SvnActions::makeIgnoreEntry(SvnItem*which,bool unignore)
}
bool result = false;
TQStringList lst = TQStringList::split("\n",data);
TQStringList::iterator it = lst.tqfind(name);
TQStringList::iterator it = lst.find(name);
if (it != lst.end()) {
if (unignore) {
lst.erase(it);
@ -2752,7 +2752,7 @@ bool SvnActions::isLockNeeded(SvnItem*which,const svn::Revision&where)
svn::PathPropertiesMapList pm = pmp.second;
if (pm.size()>0) {
svn::PropertiesMap&mp = pm[0].second;
if (mp.tqfind("svn:needs-lock")!=mp.end()) {
if (mp.find("svn:needs-lock")!=mp.end()) {
return true;
}
}
@ -2775,7 +2775,7 @@ TQString SvnActions::searchProperty(TQString&Store, const TQString&property, con
}
if (pm->size()>0) {
svn::PropertiesMap&mp = (*pm)[0].second;
if (mp.tqfind(property)!=mp.end()) {
if (mp.find(property)!=mp.end()) {
Store=mp[property];
return pa;
}
@ -2850,7 +2850,7 @@ void SvnActions::slotCancel(bool how)
void SvnActions::setContextData(const TQString&aKey,const TQString&aValue)
{
if (aValue.isNull()) {
TQMap<TQString,TQString>::iterator it = m_Data->m_contextData.tqfind(aKey);
TQMap<TQString,TQString>::iterator it = m_Data->m_contextData.find(aKey);
if (it!=m_Data->m_contextData.end()) {
m_Data->m_contextData.remove(it);
}
@ -2866,7 +2866,7 @@ void SvnActions::clearContextData()
TQString SvnActions::getContextData(const TQString&aKey)const
{
if (m_Data->m_contextData.tqfind(aKey)!=m_Data->m_contextData.end()) {
if (m_Data->m_contextData.find(aKey)!=m_Data->m_contextData.end()) {
return m_Data->m_contextData[aKey];
}
return TQString();

@ -94,7 +94,7 @@ void SvnItem_p::init()
/* dir name possible */
m_full.truncate(m_full.length()-1);
}
int p = m_full.tqfindRev("/");
int p = m_full.findRev("/");
if (p>-1) {
++p;
m_short = m_full.right(m_full.length()-p);

@ -301,7 +301,7 @@ void SvnLogDlgImp::dispLog(const svn::SharedPointer<svn::LogEntriesMap>&_log)
// YES! I'd checked it: this is much faster than getting list of keys
// and iterating over that list!
for (long c=max;c>-1;--c) {
if (!itemMap.tqcontains(c)) {
if (!itemMap.contains(c)) {
continue;
}
if (itemMap[c]->realName().isEmpty()) {
@ -319,7 +319,7 @@ TQString SvnLogDlgImp::genReplace(const TQString&r1match)
TQString res("");
if (_r2.pattern().length()<1) {
res = _bugurl;
res.tqreplace("%BUGID%",_r1.cap(1));
res.replace("%BUGID%",_r1.cap(1));
res = anf+res+mid+r1match+end;
return res;
}
@ -331,7 +331,7 @@ TQString SvnLogDlgImp::genReplace(const TQString&r1match)
while (pos > -1) {
oldpos = pos+count;
pos = r1match.tqfind(_r2,pos+count);
pos = r1match.find(_r2,pos+count);
if (pos==-1) {
break;
}
@ -339,7 +339,7 @@ TQString SvnLogDlgImp::genReplace(const TQString&r1match)
res+=r1match.mid(oldpos,pos-oldpos);
TQString sub = r1match.mid(pos,count);
TQString _url = _bugurl;
_url.tqreplace("%BUGID%",sub);
_url.replace("%BUGID%",sub);
res+=anf+_url+mid+sub+end;
}
res+=r1match.mid(oldpos);
@ -366,7 +366,7 @@ void SvnLogDlgImp::replaceBugids(TQString&msg)
kdDebug()<<TQString(_r1.cap(1)) << endl;
TQString rep = genReplace(s1);
kdDebug()<<"Replace with "<<rep << endl;
msg = msg.tqreplace(pos,count,rep);
msg = msg.replace(pos,count,rep);
pos = _r1.search(msg,pos+rep.length());
count = _r1.matchedLength();
@ -516,7 +516,7 @@ void SvnLogDlgImp::slotDispSelected()
bool SvnLogDlgImp::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const TQString&what,const svn::Revision&peg,TQString&root)
{
root = _base;
if (m_Entries->tqfind(r.revnum()) == m_Entries->end())
if (m_Entries->find(r.revnum()) == m_Entries->end())
{
return m_Actions->getSingleLog(t,r,what,peg,root);
}

@ -70,18 +70,18 @@ public:
TQSqlQuery _q(TQString(), aDb);
TQStringList list = aDb->tables();
if (list.tqfind("logentries")==list.end()) {
if (list.find("logentries")==list.end()) {
aDb->transaction();
_q.exec("CREATE TABLE \"logentries\" (\"revision\" INTEGER UNITQUE,\"date\" INTEGER,\"author\" TEXT, \"message\" TEXT)");
aDb->commit();
}
if (list.tqfind("changeditems")==list.end()) {
if (list.find("changeditems")==list.end()) {
aDb->transaction();
_q.exec("CREATE TABLE \"changeditems\" (\"revision\" INTEGER,\"changeditem\" TEXT,\"action\" TEXT,\"copyfrom\" TEXT,\"copyfromrev\" INTEGER, PRIMARY KEY(revision,changeditem,action))");
aDb->commit();
}
list = aDb->tables();
if (list.tqfind("logentries")==list.end() || list.tqfind("changeditems")==list.end()) {
if (list.find("logentries")==list.end() || list.find("changeditems")==list.end()) {
return false;
}
return true;
@ -148,12 +148,12 @@ public:
}
checkDone=true;
}
if (m_mainDB.localData()->reposCacheNames.tqfind(dbFile)!=m_mainDB.localData()->reposCacheNames.end()) {
if (m_mainDB.localData()->reposCacheNames.find(dbFile)!=m_mainDB.localData()->reposCacheNames.end()) {
return TQSqlDatabase::database(m_mainDB.localData()->reposCacheNames[dbFile]);
}
int i = 0;
TQString _key = dbFile;
while (TQSqlDatabase::tqcontains(_key)) {
while (TQSqlDatabase::contains(_key)) {
_key = TQString("%1-%2").tqarg(dbFile).tqarg(i++);
}
// qDebug("The repository key is now: %s",_key.TOUTF8().data());
@ -179,7 +179,7 @@ public:
if (!m_mainDB.hasLocalData()) {
unsigned i=0;
TQString _key = STQLMAIN;
while (TQSqlDatabase::tqcontains(_key)) {
while (TQSqlDatabase::contains(_key)) {
_key.sprintf("%s-%i",STQLMAIN,i++);
}
qDebug("The key is now: %s",_key.TOUTF8().data());

@ -128,7 +128,7 @@ void TQSQLite3ResultPrivate::initColumns()
for (int i = 0; i < nCols; ++i) {
TQString colName = TQString::fromUtf8(sqlite3_column_name(stmt, i));
int dotIdx = colName.tqfindRev('.');
int dotIdx = colName.findRev('.');
rInf.append(TQSqlField(colName.mid(dotIdx == -1 ? 0 : dotIdx + 1),
qSqliteType(sqlite3_column_type(stmt, i))));
}
@ -427,8 +427,8 @@ TQSqlIndex TQSQLite3Driver::primaryIndex(const TQString &tblname) const
while(q.next()) {
TQString name = q.value(2).toString();
TQSqlVariant::Type type = TQSqlVariant::Invalid;
if (rec.tqcontains(name))
type = rec.tqfind(name).type();
if (rec.contains(name))
type = rec.find(name).type();
index.append(TQSqlField(name, type));
}
return index;

@ -126,7 +126,7 @@ namespace svn
svn_node_kind_t
kind () const;
/**
* @return scheduling (add, delete, tqreplace)
* @return scheduling (add, delete, replace)
*/
svn_wc_schedule_t
schedule () const;

@ -77,11 +77,11 @@ namespace svn
}
}
m_path = TQString::FROMUTF8(int_path);
if (Url::isValid(path) && m_path.tqfind("@")!=-1 ) {
if (Url::isValid(path) && m_path.find("@")!=-1 ) {
/// @todo make sure that "@" is never used as revision paramter
TQUrl uri = m_path;
m_path = uri.path();
m_path.tqreplace("@","%40");
m_path.replace("@","%40");
m_path = uri.protocol()+"://"+(uri.hasUser()?uri.user()+(uri.hasPassword()?":"+uri.password():"")+"@":"")
+uri.host()+m_path;
if (m_path.endsWith("/")) {
@ -116,7 +116,7 @@ namespace svn
Pool pool;
const char * int_path = svn_path_uri_decode(m_path.TOUTF8(), pool.pool () );
TQString _p = TQString::FROMUTF8(int_path);
_p.tqreplace("%40","@");
_p.replace("%40","@");
return _p;
}
@ -208,7 +208,7 @@ namespace svn
split (dir, basename);
// next search for last .
int pos = basename.tqfindRev(TQChar('.'));
int pos = basename.findRev(TQChar('.'));
if (pos == -1)
{

@ -151,13 +151,13 @@ namespace svn
{
const TQString tokenStart ("handles '");
const TQString tokenEnd ("' schem");
pos = descriptions.tqfind (tokenStart, pos);
pos = descriptions.find (tokenStart, pos);
if (pos == not_found)
break;
pos += tokenStart.length ();
int posEnd = descriptions.tqfind (tokenEnd, pos);
int posEnd = descriptions.find (tokenEnd, pos);
if (posEnd == not_found)
break;

Loading…
Cancel
Save