summaryrefslogtreecommitdiffstats
path: root/src/kile/codecompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kile/codecompletion.cpp')
-rw-r--r--src/kile/codecompletion.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/kile/codecompletion.cpp b/src/kile/codecompletion.cpp
index 9cdc703..f8225f2 100644
--- a/src/kile/codecompletion.cpp
+++ b/src/kile/codecompletion.cpp
@@ -87,9 +87,9 @@ namespace KileDocument
CodeCompletion::Type CodeCompletion::getType( const TQString &text )
{
- if ( text.tqfind( reRef ) != -1 )
+ if ( text.find( reRef ) != -1 )
return CodeCompletion::ctReference;
- else if ( text.tqfind( reCite ) != -1 )
+ else if ( text.find( reCite ) != -1 )
return CodeCompletion::ctCitation;
else
return CodeCompletion::ctNone;
@@ -106,39 +106,39 @@ namespace KileDocument
{
uint column = m_view->cursorColumnReal();
TQString currentline = m_view->getDoc()->textLine(m_view->cursorLine()).left(column);
- int pos = currentline.tqfindRev('\\');
+ int pos = currentline.findRev('\\');
if ( pos >= 0 )
{
TQString command = currentline.mid(pos,column-pos);
KILE_DEBUG() << "pos=" << pos << ",column=" << column << ",currentline=" << currentline << ",command=" << command << endl;
- if( command.tqfind(reRefExt) != -1 ){
+ if( command.find(reRefExt) != -1 ){
KILE_DEBUG() << "reRefExt" << endl;
startpattern = command.right(command.length()-reRefExt.cap(0).length());
KILE_DEBUG() << "startpattern=" << startpattern << endl;
- if ( startpattern.tqfind(reNotRefChars) == -1 ){
+ if ( startpattern.find(reNotRefChars) == -1 ){
return CodeCompletion::ctReference ;
}
}
- else if ( command.tqfind(reRef) != -1 ){
+ else if ( command.find(reRef) != -1 ){
startpattern = command.right(command.length()-reRef.cap(0).length());
KILE_DEBUG() << "startpattern=" << startpattern << endl;
- if ( startpattern.tqfind(reNotRefChars) == -1 ){
+ if ( startpattern.find(reNotRefChars) == -1 ){
return CodeCompletion::ctReference ;
}
}
- else if( command.tqfind(reCiteExt) != -1 ){
+ else if( command.find(reCiteExt) != -1 ){
KILE_DEBUG() << "reCiteExt" << endl;
startpattern = command.right(command.length()-reCiteExt.cap(0).length());
KILE_DEBUG() << "startpattern=" << startpattern << endl;
- if ( startpattern.tqfind(reNotCiteChars) == -1 ){
+ if ( startpattern.find(reNotCiteChars) == -1 ){
return CodeCompletion::ctCitation;
}
}
- else if ( command.tqfind(reCite) != -1 ){
+ else if ( command.find(reCite) != -1 ){
startpattern = command.right(command.length()-reCite.cap(0).length());
KILE_DEBUG() << "startpattern=" << startpattern << endl;
- if ( startpattern.tqfind(reNotCiteChars) == -1 ){
+ if ( startpattern.find(reNotCiteChars) == -1 ){
return CodeCompletion::ctCitation;
}
}
@@ -219,13 +219,13 @@ namespace KileDocument
{
// build list of references
TQString references = getCommandList(KileDocument::CmdAttrReference);
- references.tqreplace("*","\\*");
+ references.replace("*","\\*");
reRef.setPattern("^\\\\(" + references + ")\\{");
reRefExt.setPattern("^\\\\(" + references + ")\\{[^\\{\\}\\\\]+,");
// build list of citations
TQString citations = getCommandList(KileDocument::CmdAttrCitations);
- citations.tqreplace("*","\\*");
+ citations.replace("*","\\*");
reCite.setPattern("^\\\\(((c|C|noc)(ite|itep|itet|itealt|itealp|iteauthor|iteyear|iteyearpar|itetext))" + citations + ")\\{");
reCiteExt.setPattern("^\\\\(((c|C|noc)(ite|itep|itet|itealt|itealp|iteauthor|iteyear|iteyearpar|itetext))" + citations + ")\\{[^\\{\\}\\\\]+,");
}
@@ -376,7 +376,7 @@ namespace KileDocument
// switch to cmLatex mode, if cmLabel is chosen without any entries
if ( mode==cmLabel && m_labellist.count()==0 ) {
TQString s = doc->textLine(m_ycursor);
- int pos = s.tqfindRev("\\",m_xcursor);
+ int pos = s.findRev("\\",m_xcursor);
if (pos < 0) {
KILE_DEBUG() << "\tfound no backslash! s=" << s << endl;
return;
@@ -561,7 +561,7 @@ namespace KileDocument
{
case cmLatex:
s = buildLatexText( text, m_yoffset, m_xoffset );
- if ( m_autobrackets && textline.at(col)=='}' && m_text.tqfind('{')>=0 )
+ if ( m_autobrackets && textline.at(col)=='}' && m_text.find('{')>=0 )
{
doc->removeText(row,col,row,col+1);
}
@@ -580,7 +580,7 @@ namespace KileDocument
}
}
s = buildEnvironmentText( text, type, prefix, m_yoffset, m_xoffset );
- if ( m_autobrackets && textline.at(col)=='}' && (textline[m_xstart]!='\\' || m_text.tqfind('{')>=0 ) )
+ if ( m_autobrackets && textline.at(col)=='}' && (textline[m_xstart]!='\\' || m_text.find('{')>=0 ) )
{
doc->removeText(row,col,row,col+1);
}
@@ -695,7 +695,7 @@ namespace KileDocument
{
TQString s;
- int index = text.tqfind( '=' );
+ int index = text.find( '=' );
if ( index >= 0 )
{
// determine text to insert
@@ -929,7 +929,7 @@ namespace KileDocument
e.type = "";
// add new entry
- if ( list->tqfindIndex(e) == -1 )
+ if ( list->findIndex(e) == -1 )
list->append(e);
}
}
@@ -967,7 +967,7 @@ namespace KileDocument
s[j] = 52;
}
// don't allow duplicate entries
- if ( ! map.tqcontains(s) )
+ if ( ! map.contains(s) )
{
map[s] = wordlist[i];
keylist.append(s);
@@ -1036,7 +1036,7 @@ namespace KileDocument
for ( it=m_abbrevlist.begin(); it!=m_abbrevlist.end(); ++it )
{
TQString s = (*it).text;
- int index = s.tqfind("=");
+ int index = s.find("=");
if ( index>=0 && s.left(index)==abbrev )
return s.right( s.length()-index-1 );
}
@@ -1284,7 +1284,7 @@ namespace KileDocument
TQString textline = m_view->getDoc()->textLine( row );
// search the current reference string
- int pos = textline.tqfindRev(reNotRefChars,col-1);
+ int pos = textline.findRev(reNotRefChars,col-1);
if ( pos < 0 )
pos = 0;
@@ -1313,7 +1313,7 @@ namespace KileDocument
while ( pos >= 0 ) {
pos = reg.search(s,pos);
if ( pos >= 0 ) {
- if ( reg.cap(1).at(0)!='\\' && text!=reg.cap(1) && !seen.tqfind(reg.cap(1)) ) {
+ if ( reg.cap(1).at(0)!='\\' && text!=reg.cap(1) && !seen.find(reg.cap(1)) ) {
e.text = reg.cap(1); // normal entry
e.type = "";
list.append( e );