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) { if (KPasswordDialog::getPassword(pw,prompt,0)==KPasswordDialog::Accepted) {
std::cout << pw.data() << std::endl; std::cout << pw.data() << std::endl;
/* cleanup memory */ /* cleanup memory */
pw.tqreplace(0,pw.length(),"0"); pw.replace(0,pw.length(),"0");
return 0; return 0;
} }
return 1; return 1;

@ -66,7 +66,7 @@ KURL KTranslateUrl::translateSystemUrl(const KURL&_url)
bool KTranslateUrl::parseURL(const KURL&url,TQString&name,TQString&path) bool KTranslateUrl::parseURL(const KURL&url,TQString&name,TQString&path)
{ {
TQString url_path = url.path(); TQString url_path = url.path();
int i = url_path.tqfind('/', 1); int i = url_path.find('/', 1);
if (i > 0) if (i > 0)
{ {
name = url_path.mid(1, i-1); 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 */ /* we try to check if it is ssh and try to get a password for it */
TQString proto = url.protocol(); TQString proto = url.protocol();
if (proto.tqfind("ssh")!=-1) { if (proto.find("ssh")!=-1) {
SshAgent ag; SshAgent ag;
ag.addSshIdentities(); ag.addSshIdentities();
} }
svn::Revision rev,tmp; svn::Revision rev,tmp;
rev = svn::Revision::UNDEFINED; rev = svn::Revision::UNDEFINED;
if (q.tqfind("rev")!=q.end()) { if (q.find("rev")!=q.end()) {
TQString v = q["rev"]; TQString v = q["rev"];
m_Svnclient->url2Revision(v,rev,tmp); 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; col = col+1;
} }
while (1) { while (1) {
bool result = tqfind(to_find_string,case_sensitive,false, bool result = find(to_find_string,case_sensitive,false,
(!back),&line,&col); (!back),&line,&col);
if (result) { if (result) {

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

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

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

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

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

@ -132,13 +132,13 @@ void FileListViewItem::refreshtqStatus(bool childs,TQPtrList<SvnItem>*exclude,bo
} }
it = static_cast<FileListViewItem*>(tqparent()); it = static_cast<FileListViewItem*>(tqparent());
if (!childs) { if (!childs) {
if (it && (!exclude || exclude->tqfind(it)==-1)) { if (it && (!exclude || exclude->find(it)==-1)) {
it->refreshtqStatus(false,exclude); it->refreshtqStatus(false,exclude);
} }
} else if (firstChild()){ } else if (firstChild()){
it = static_cast<FileListViewItem*>(firstChild()); it = static_cast<FileListViewItem*>(firstChild());
while (it) { while (it) {
if (!exclude || exclude->tqfind(it)==-1) { if (!exclude || exclude->find(it)==-1) {
it->refreshtqStatus(true,exclude); it->refreshtqStatus(true,exclude);
} }
it = static_cast<FileListViewItem*>(it->nextSibling()); 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) bool Propertylist::checkExisting(const TQString&aName,TQListViewItem*it)
{ {
if (!it) { if (!it) {
return tqfindItem(aName,0)!=0; return findItem(aName,0)!=0;
} }
TQListViewItemIterator iter(this); TQListViewItemIterator iter(this);
while ( iter.current() ) { while ( iter.current() ) {

@ -71,7 +71,7 @@ void PannerView::contentsMouseMoveEvent(TQMouseEvent* e)
void PannerView::contentsMousePressEvent(TQMouseEvent* e) void PannerView::contentsMousePressEvent(TQMouseEvent* e)
{ {
if (m_ZoomRect.isValid()) { 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(), emit zoomRectMoved(e->pos().x() - m_ZoomRect.center().x(),
e->pos().y() - m_ZoomRect.center().y()); e->pos().y() - m_ZoomRect.center().y());
} }

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

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

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

@ -45,7 +45,7 @@ void OpenContextmenu::setup()
TQCString nam; TQCString nam;
nam.setNum( id ); nam.setNum( id );
TQString actionName( (*it)->name().tqreplace("&", "&&") ); TQString actionName( (*it)->name().replace("&", "&&") );
act = new KAction( actionName, (*it)->pixmap( KIcon::Small ), 0, act = new KAction( actionName, (*it)->pixmap( KIcon::Small ), 0,
TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), TQT_TQOBJECT(this), nam.prepend( "appservice_" ) ); TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), TQT_TQOBJECT(this), nam.prepend( "appservice_" ) );
act->plug(this); act->plug(this);
@ -62,9 +62,9 @@ void OpenContextmenu::setup()
void OpenContextmenu::slotRunService() void OpenContextmenu::slotRunService()
{ {
TQCString senderName = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name(); 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() ) if ( it != m_mapPopup.end() )
{ {
KRun::run( **it, m_Path ); KRun::run( **it, m_Path );

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

@ -94,7 +94,7 @@ void SvnItem_p::init()
/* dir name possible */ /* dir name possible */
m_full.truncate(m_full.length()-1); m_full.truncate(m_full.length()-1);
} }
int p = m_full.tqfindRev("/"); int p = m_full.findRev("/");
if (p>-1) { if (p>-1) {
++p; ++p;
m_short = m_full.right(m_full.length()-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 // YES! I'd checked it: this is much faster than getting list of keys
// and iterating over that list! // and iterating over that list!
for (long c=max;c>-1;--c) { for (long c=max;c>-1;--c) {
if (!itemMap.tqcontains(c)) { if (!itemMap.contains(c)) {
continue; continue;
} }
if (itemMap[c]->realName().isEmpty()) { if (itemMap[c]->realName().isEmpty()) {
@ -319,7 +319,7 @@ TQString SvnLogDlgImp::genReplace(const TQString&r1match)
TQString res(""); TQString res("");
if (_r2.pattern().length()<1) { if (_r2.pattern().length()<1) {
res = _bugurl; res = _bugurl;
res.tqreplace("%BUGID%",_r1.cap(1)); res.replace("%BUGID%",_r1.cap(1));
res = anf+res+mid+r1match+end; res = anf+res+mid+r1match+end;
return res; return res;
} }
@ -331,7 +331,7 @@ TQString SvnLogDlgImp::genReplace(const TQString&r1match)
while (pos > -1) { while (pos > -1) {
oldpos = pos+count; oldpos = pos+count;
pos = r1match.tqfind(_r2,pos+count); pos = r1match.find(_r2,pos+count);
if (pos==-1) { if (pos==-1) {
break; break;
} }
@ -339,7 +339,7 @@ TQString SvnLogDlgImp::genReplace(const TQString&r1match)
res+=r1match.mid(oldpos,pos-oldpos); res+=r1match.mid(oldpos,pos-oldpos);
TQString sub = r1match.mid(pos,count); TQString sub = r1match.mid(pos,count);
TQString _url = _bugurl; TQString _url = _bugurl;
_url.tqreplace("%BUGID%",sub); _url.replace("%BUGID%",sub);
res+=anf+_url+mid+sub+end; res+=anf+_url+mid+sub+end;
} }
res+=r1match.mid(oldpos); res+=r1match.mid(oldpos);
@ -366,7 +366,7 @@ void SvnLogDlgImp::replaceBugids(TQString&msg)
kdDebug()<<TQString(_r1.cap(1)) << endl; kdDebug()<<TQString(_r1.cap(1)) << endl;
TQString rep = genReplace(s1); TQString rep = genReplace(s1);
kdDebug()<<"Replace with "<<rep << endl; kdDebug()<<"Replace with "<<rep << endl;
msg = msg.tqreplace(pos,count,rep); msg = msg.replace(pos,count,rep);
pos = _r1.search(msg,pos+rep.length()); pos = _r1.search(msg,pos+rep.length());
count = _r1.matchedLength(); 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) bool SvnLogDlgImp::getSingleLog(svn::LogEntry&t,const svn::Revision&r,const TQString&what,const svn::Revision&peg,TQString&root)
{ {
root = _base; 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); return m_Actions->getSingleLog(t,r,what,peg,root);
} }

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

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

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

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

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

Loading…
Cancel
Save