diff options
Diffstat (limited to 'kbabel/kbabel/mymultilineedit.cpp')
-rw-r--r-- | kbabel/kbabel/mymultilineedit.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kbabel/kbabel/mymultilineedit.cpp b/kbabel/kbabel/mymultilineedit.cpp index af58cd0a..a3251a6b 100644 --- a/kbabel/kbabel/mymultilineedit.cpp +++ b/kbabel/kbabel/mymultilineedit.cpp @@ -141,7 +141,7 @@ void MyMultiLineEdit::processCommand(EditCommand* cmd, bool undo) setCursorPosition( row, col ); _firstChangedLine=row; - if(delcmd->str.tqfind("\n")>0 )_lastChangedLine=row+delcmd->str.tqcontains("\n"); + if(delcmd->str.find("\n")>0 )_lastChangedLine=row+delcmd->str.contains("\n"); else _lastChangedLine=row; KTextEdit::insert( delcmd->str ); @@ -355,7 +355,7 @@ void MyMultiLineEdit::insert( const TQString & text, bool indent, bool checkNewL emit signalUndoCmd( new EndCommand(-1,UndefPart)); } - int n=text.tqfind("\n"); + int n=text.find("\n"); if( n > 0 ) _lastChangedLine+=n; // setup palettes @@ -661,7 +661,7 @@ void MsgMultiLineEdit::setText(const TQString& s) if(_showDiff) { diffPos.clear(); - int lines = s.tqcontains('\n'); + int lines = s.contains('\n'); diffPos.resize(lines+1); TQStringList lineList = TQStringList::split('\n',s,true); @@ -689,7 +689,7 @@ void MsgMultiLineEdit::setText(const TQString& s) } else { - addPos = (*it).tqfind("<KBABELADD>",lastPos); + addPos = (*it).find("<KBABELADD>",lastPos); } if(haveDel && multiline) @@ -698,7 +698,7 @@ void MsgMultiLineEdit::setText(const TQString& s) } else { - delPos = (*it).tqfind("<KBABELDEL>",lastPos); + delPos = (*it).find("<KBABELDEL>",lastPos); } if(delPos >= 0 && addPos >= 0) @@ -741,7 +741,7 @@ void MsgMultiLineEdit::setText(const TQString& s) (*it).remove(addPos,11); } - int endPos = (*it).tqfind("</KBABELADD>",addPos); + int endPos = (*it).find("</KBABELADD>",addPos); if(endPos < 0) { endPos = (*it).length(); @@ -768,7 +768,7 @@ void MsgMultiLineEdit::setText(const TQString& s) (*it).remove(delPos,11); } - int endPos = (*it).tqfind("</KBABELDEL>",delPos); + int endPos = (*it).find("</KBABELDEL>",delPos); if(endPos < 0) { endPos = (*it).length(); @@ -805,9 +805,9 @@ void MsgMultiLineEdit::setText(const TQString& s) } TQRegExp reg("</?KBABELADD>"); - str.tqreplace(reg,""); + str.replace(reg,""); reg.setPattern("</?KBABELDEL>"); - str.tqreplace(reg,""); + str.replace(reg,""); } MyMultiLineEdit::setText(str); @@ -989,7 +989,7 @@ void MsgMultiLineEdit::paintSpacePoints() if ( paragraphRect( curpara ).top() > contentsY()+visibleHeight()) break; const TQString& s = text(curpara); - int i = s.tqfind( " " ); + int i = s.find( " " ); while( (i >= 0) && (i < (int)s.length()-1) ) // -1 because text will end by EOLN { TQPixmap* pm = ( s.tqat(i).tqunicode() == 0x00A0U ) ? wsnb : ws; @@ -997,7 +997,7 @@ void MsgMultiLineEdit::paintSpacePoints() r.moveBy( r.width()/2, (r.height() - fm.descent())/2 ); r.moveBy( -pm->rect().width()/2, -pm->rect().height()/2-1 ); bitBlt(viewport(), r.topLeft(), pm, pm->rect(), TQt::CopyROP); - i = s.tqfind( " ", i+1 ); + i = s.find( " ", i+1 ); } ++curpara; } @@ -1522,7 +1522,7 @@ void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e) { TQString spclChars="abfnrtv'\"?\\"; if(col < (int)str.length()-1 - && spclChars.tqcontains(str.at(col+1))) + && spclChars.contains(str.at(col+1))) { del(); } @@ -1548,7 +1548,7 @@ void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e) TQString str=text(row); TQString spclChars="abfnrtv'\"?\\"; - if(!str.isEmpty() && col > 0 && spclChars.tqcontains(str.at(col-1))) + if(!str.isEmpty() && col > 0 && spclChars.contains(str.at(col-1))) { if(col > 1 && str.at(col-2)=='\\' && !isMasked(&str,col-2)) { |