diff options
Diffstat (limited to 'kbabel/kbabel')
-rw-r--r-- | kbabel/kbabel/contextview.cpp | 12 | ||||
-rw-r--r-- | kbabel/kbabel/kbabel.cpp | 4 | ||||
-rw-r--r-- | kbabel/kbabel/kbabelview.cpp | 84 | ||||
-rw-r--r-- | kbabel/kbabel/kbabelview.h | 8 | ||||
-rw-r--r-- | kbabel/kbabel/kbabelview2.cpp | 22 | ||||
-rw-r--r-- | kbabel/kbabel/kbbookmarkhandler.cpp | 4 | ||||
-rw-r--r-- | kbabel/kbabel/kbcataloglistview.cpp | 2 | ||||
-rw-r--r-- | kbabel/kbabel/kbcataloglistviewitem.cpp | 6 | ||||
-rw-r--r-- | kbabel/kbabel/kbhighlighting.cpp | 14 | ||||
-rw-r--r-- | kbabel/kbabel/mymultilineedit.cpp | 26 |
10 files changed, 91 insertions, 91 deletions
diff --git a/kbabel/kbabel/contextview.cpp b/kbabel/kbabel/contextview.cpp index 72303fef..94bbf000 100644 --- a/kbabel/kbabel/contextview.cpp +++ b/kbabel/kbabel/contextview.cpp @@ -106,15 +106,15 @@ void ContextView::updateView() if(!temp.isEmpty()) { temp = TQStyleSheet::convertFromPlainText(temp); - temp.tqreplace(TQRegExp("^<p>"),""); - temp.tqreplace(TQRegExp("</p>$"),""); + temp.replace(TQRegExp("^<p>"),""); + temp.replace(TQRegExp("</p>$"),""); entry += "<i>"+temp+"</i><br/>"; } // FIXME: should care about plural forms temp = TQStyleSheet::convertFromPlainText(_catalog->msgid(i).first()); - temp.tqreplace(TQRegExp("^<p>"),""); - temp.tqreplace(TQRegExp("</p>$"),""); + temp.replace(TQRegExp("^<p>"),""); + temp.replace(TQRegExp("</p>$"),""); entry += temp + "<br/>---<br/>"; TQStringList tempList = _catalog->msgstr(i); @@ -141,8 +141,8 @@ void ContextView::updateView() } } temp = TQStyleSheet::convertFromPlainText(temp); - temp.tqreplace(TQRegExp("^<p>"),""); - temp.tqreplace(TQRegExp("</p>$"),""); + temp.replace(TQRegExp("^<p>"),""); + temp.replace(TQRegExp("</p>$"),""); entry += temp+"<br/>"; } diff --git a/kbabel/kbabel/kbabel.cpp b/kbabel/kbabel/kbabel.cpp index d3aafed8..64733fa1 100644 --- a/kbabel/kbabel/kbabel.cpp +++ b/kbabel/kbabel/kbabel.cpp @@ -437,10 +437,10 @@ void KBabelMW::setupActions() action = KStdAction::copy(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalCopy()), actionCollection()); action = KStdAction::paste(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalPaste()), actionCollection()); action = KStdAction::selectAll(TQT_TQOBJECT(m_view), TQT_SIGNAL(signalSelectAll()), actionCollection()); - action = KStdAction::find(TQT_TQOBJECT(m_view), TQT_SLOT(tqfind()), actionCollection()); + action = KStdAction::find(TQT_TQOBJECT(m_view), TQT_SLOT(find()), actionCollection()); action = KStdAction::findNext(TQT_TQOBJECT(m_view), TQT_SLOT(findNext()), actionCollection()); action = KStdAction::findPrev(TQT_TQOBJECT(m_view), TQT_SLOT(findPrev()), actionCollection()); - action = KStdAction::replace(TQT_TQOBJECT(m_view), TQT_SLOT(tqreplace()), actionCollection()); + action = KStdAction::replace(TQT_TQOBJECT(m_view), TQT_SLOT(replace()), actionCollection()); action = KStdAction::clear( TQT_TQOBJECT(m_view), TQT_SLOT(clear()), actionCollection(), "clear" ); diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp index 9d7f4df2..1f9aab72 100644 --- a/kbabel/kbabel/kbabelview.cpp +++ b/kbabel/kbabel/kbabelview.cpp @@ -931,7 +931,7 @@ void KBabelView::setupAutoCheckTools() TQValueList<KDataToolInfo>::Iterator it; for( it=tools.begin(); it!=tools.end() ; ++it ) { - if(KBabelSettings::autoCheckTools().tqcontains((*it).service()->library()) ) + if(KBabelSettings::autoCheckTools().contains((*it).service()->library()) ) { // maybe we can reuse the tools KDataTool* t = (*it).createTool(); @@ -2331,7 +2331,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui) } -void KBabelView::tqfind() +void KBabelView::find() { Part hadFocus; if(msgidLabel->hasFocus()) @@ -2425,7 +2425,7 @@ void KBabelView::tqfind() } } -void KBabelView::tqreplace() +void KBabelView::replace() { _replacesTotal=0; _replaceLen=0; @@ -2518,7 +2518,7 @@ void KBabelView::tqreplace() if(success) { if(!_replaceAskDialog) { _replaceAskDialog = new ReplaceDialog(this); - connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext())); + connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext())); connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace())); connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll())); } @@ -2749,7 +2749,7 @@ void KBabelView::replaceInFile(TQCString fileSource, KBabel::ReplaceOptions opti else { if(!_replaceAskDialog) { _replaceAskDialog = new ReplaceDialog(this); - connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext())); + connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext())); connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace())); connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll())); } @@ -2803,37 +2803,37 @@ void KBabelView::msgid2msgstr() TQString text = _catalog->msgid(_currentIndex).first(); // this is KDE specific: - if(text.tqfind("_: NAME OF TRANSLATORS\\n")==0) + if(text.find("_: NAME OF TRANSLATORS\\n")==0) { text=_catalog->identitySettings().authorLocalizedName; } - else if(text.tqfind("_: EMAIL OF TRANSLATORS\\n")==0) + else if(text.find("_: EMAIL OF TRANSLATORS\\n")==0) { text=_catalog->identitySettings().authorEmail; } - else if(_catalog->isGeneratedFromDocbook() && text.tqfind("ROLES_OF_TRANSLATORS")==0) + else if(_catalog->isGeneratedFromDocbook() && text.find("ROLES_OF_TRANSLATORS")==0) { text="<othercredit role=\\\"translator\\\">\n" "<firstname></firstname><surname></surname>\n" "<affiliation><address><email>"+_catalog->identitySettings().authorEmail+"</email></address>\n" "</affiliation><contrib></contrib></othercredit>"; } - else if(_catalog->isGeneratedFromDocbook() && text.tqfind("CREDIT_FOR_TRANSLATORS")==0) + else if(_catalog->isGeneratedFromDocbook() && text.find("CREDIT_FOR_TRANSLATORS")==0) { text="<para>"+_catalog->identitySettings().authorLocalizedName+"\n"+ "<email>"+_catalog->identitySettings().authorEmail+"</email></para>"; } - else if(text.tqcontains(_catalog->miscSettings().singularPlural)) + else if(text.contains(_catalog->miscSettings().singularPlural)) { - text.tqreplace(_catalog->miscSettings().singularPlural,""); + text.replace(_catalog->miscSettings().singularPlural,""); } // end of KDE specific part TQRegExp reg=_catalog->miscSettings().contextInfo; - if(text.tqcontains(reg)) + if(text.contains(reg)) { - text.tqreplace(reg,""); + text.replace(reg,""); } modifyMsgstrText(0,text,true); @@ -3204,9 +3204,9 @@ void KBabelView::startSearch(bool delay) { TQString msg = _catalog->msgid(_currentIndex,true).first(); TQRegExp reg=_catalog->miscSettings().contextInfo; - if(msg.tqcontains(reg)) + if(msg.contains(reg)) { - msg.tqreplace(reg,""); + msg.replace(reg,""); } dictBox->setActiveModule(KBabelSettings::defaultModule()); @@ -3225,9 +3225,9 @@ void KBabelView::startSearch(const TQString module) // FIXME: should care about plural forms TQString msg = _catalog->msgid(_currentIndex,true).first(); TQRegExp reg=_catalog->miscSettings().contextInfo; - if(msg.tqcontains(reg)) + if(msg.contains(reg)) { - msg.tqreplace(reg,""); + msg.replace(reg,""); } dictBox->setActiveModule(module); @@ -3258,9 +3258,9 @@ void KBabelView::startSelectionSearch(const TQString module) // should care about plural forms TQString msg = _catalog->msgid(_currentIndex,true).first(); TQRegExp reg=_catalog->miscSettings().contextInfo; - if(msg.tqcontains(reg)) + if(msg.contains(reg)) { - msg.tqreplace(reg,""); + msg.replace(reg,""); } dictBox->startSearch(msg); @@ -3302,7 +3302,7 @@ void KBabelView::emitEntryState() TQPalette palette=msgstrEdit->palette(); palette.setColor( TQColorGroup::Text, red ); - if( _catalog->itemtqStatus(_currentIndex).tqcontains("syntax error")) + if( _catalog->itemtqStatus(_currentIndex).contains("syntax error")) { msgstrEdit->setCurrentColor( MsgMultiLineEdit::ErrorColor ); } @@ -3732,7 +3732,7 @@ void KBabelView::addSpellcheckWords( uint pos, TQString text, uint index, uint f } else if( c == '\\') { - if(pos+1 < textLength && spclChars.tqcontains(text[pos+1]) ) + if(pos+1 < textLength && spclChars.contains(text[pos+1]) ) { pos+=2; } @@ -3981,9 +3981,9 @@ void KBabelView::spellStart(KSpell *) if(_spellcheckSettings.rememberIgnored) { TQString urlString = _spellcheckSettings.ignoreURL; - if(urlString.tqcontains("@PACKAGE@")) + if(urlString.contains("@PACKAGE@")) { - urlString.tqreplace("@PACKAGE@",_catalog->packageName()); + urlString.replace("@PACKAGE@",_catalog->packageName()); } // ### TODO: correctly set the URL; support for MostLocalURL KURL url(urlString); @@ -4085,13 +4085,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos) text=text.mid(begin,end-begin); TQChar accelMarker=_catalog->miscSettings().accelMarker; - if(text.tqcontains(accelMarker)) + if(text.contains(accelMarker)) { - text.tqreplace(accelMarker,""); + text.replace(accelMarker,""); } - if(text.tqcontains('\n')) + if(text.contains('\n')) { - text.tqreplace("\n",""); + text.replace("\n",""); } bool textOk=true; @@ -4099,8 +4099,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos) { // if text and orig are not the same, // maybe it was a word with hyphens - int n=text.tqcontains('-'); - n+=text.tqcontains('\''); + int n=text.contains('-'); + n+=text.contains('\''); if( n > 0 ) { // re-get the original text since we replace some things above @@ -4113,8 +4113,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos) while(!textFound && i <= n) { int lastPos=e+1; - e = text.tqfind('-',lastPos); - int tmp = text.tqfind('\'',lastPos); + e = text.find('-',lastPos); + int tmp = text.find('\'',lastPos); if(e < 0 && tmp > 0) { e=tmp; @@ -4127,13 +4127,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos) if(e<0) e=text.length(); TQString w=text.mid(lastPos,e-lastPos); - if(w.tqcontains(accelMarker)) + if(w.contains(accelMarker)) { - w.tqreplace(accelMarker,""); + w.replace(accelMarker,""); } - if(text.tqcontains('\n')) + if(text.contains('\n')) { - text.tqreplace("\n",""); + text.replace("\n",""); } if( w == orig) { @@ -4225,15 +4225,15 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi TQString marked=msgstrEdit->selectedText(); spell.origWords.append(marked); - if(marked.tqcontains("\n") && !newWord.tqcontains('\n')) + if(marked.contains("\n") && !newWord.contains('\n')) { TQString s1=newWord; - s1.tqreplace(" ","\n"); + s1.replace(" ","\n"); // if only a newline has been replaced with a white space if(s1==marked) { - newWord.tqreplace(" "," \n"); + newWord.replace(" "," \n"); } } @@ -4241,11 +4241,11 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi // word has no accelerator, try to add the accelerator for // the same char else add in at the same position TQChar accelMarker=_catalog->miscSettings().accelMarker; - if(marked.tqcontains(accelMarker) && !newWord.tqcontains(accelMarker)) + if(marked.contains(accelMarker) && !newWord.contains(accelMarker)) { - int b=marked.tqfind(accelMarker); + int b=marked.find(accelMarker); TQChar accel=marked[b+1]; - int nb=newWord.tqfind(accel,0,false); + int nb=newWord.find(accel,0,false); if(nb>=0) { newWord.insert(nb,accelMarker); @@ -4422,7 +4422,7 @@ void KBabelView::cancelSpellcheck() void KBabelView::spellAddIgnore(const TQString &word) { - if(!spell.ignoreList.tqcontains(word)) + if(!spell.ignoreList.contains(word)) { spell.newIgnoreList.append(word); } diff --git a/kbabel/kbabel/kbabelview.h b/kbabel/kbabel/kbabelview.h index 8fecb9f0..a6b8e252 100644 --- a/kbabel/kbabel/kbabelview.h +++ b/kbabel/kbabel/kbabelview.h @@ -217,10 +217,10 @@ public slots: void textPaste(); bool findNext(); bool findPrev(); - void tqfind(); + void find(); void findInFile(TQCString fileSource, KBabel::FindOptions options); void replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options); - void tqreplace(); + void replace(); void selectAll(); void deselectAll(); void clear(); @@ -470,13 +470,13 @@ private slots: */ void replaceNext(); /** - * called from a signal from ReplaceDialog to tqreplace + * called from a signal from ReplaceDialog to replace * all without asking anymore. */ void replaceAll(); /** * called from a signal from ReplaceDialog to go to next - * string to tqreplace + * string to replace */ void findNextReplace(); diff --git a/kbabel/kbabel/kbabelview2.cpp b/kbabel/kbabel/kbabelview2.cpp index daf0819e..c70b42e7 100644 --- a/kbabel/kbabel/kbabelview2.cpp +++ b/kbabel/kbabel/kbabelview2.cpp @@ -203,7 +203,7 @@ void KBabelView::updateTags() { TQString s = *it; if( s.startsWith("&") ) s = "&"+s; - if(!tList.tqcontains(s)) + if(!tList.contains(s)) { _tagsMenu->insertItem(s,counter); tList.append(s); @@ -297,7 +297,7 @@ void KBabelView::modifyMsgstrText(const uint offset, const TQString& text, bool void KBabelView::insertTag(int n) { TQString tag = _tagsMenu->text(n); - if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // tqreplace && -> &. && is used for correct menu display + if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // replace && -> &. && is used for correct menu display modifyMsgstrText( msgstrEdit->currentIndex(), tag ); } @@ -331,10 +331,10 @@ void KBabelView::insertNextTagMsgid() if( _catalog->pluralForm( _currentIndex ) == KDESpecific ) { int pos = msgstrEdit->currentIndex(); - int currentFormBegin=s.tqfindRev("\\n",pos); + int currentFormBegin=s.findRev("\\n",pos); if( currentFormBegin == -1 ) currentFormBegin=0; else currentFormBegin+=3; // skip the newline - int currentFormEnd=s.tqfind("\\n",pos); + int currentFormEnd=s.find("\\n",pos); if( currentFormEnd == -1 ) currentFormEnd=s.length(); s=s.mid(currentFormBegin,currentFormEnd-currentFormBegin); @@ -382,7 +382,7 @@ void KBabelView::updateArgs() for(it=_args.begin(); it!=_args.end(); ++it) { TQString s = *it; - if(!tList.tqcontains(s)) + if(!tList.contains(s)) { _argsMenu->insertItem(s,counter); tList.append(s); @@ -427,10 +427,10 @@ void KBabelView::insertNextArg() if( _catalog->pluralForm( _currentIndex ) == KDESpecific ) { int pos = msgstrEdit->currentIndex(); - int currentFormBegin=s.tqfindRev("\\n",pos); + int currentFormBegin=s.findRev("\\n",pos); if( currentFormBegin == -1 ) currentFormBegin=0; else currentFormBegin+=3; // skip the newline - int currentFormEnd=s.tqfind("\\n",pos); + int currentFormEnd=s.find("\\n",pos); if( currentFormEnd == -1 ) currentFormEnd=s.length(); s=s.mid(currentFormBegin,currentFormEnd-currentFormBegin); @@ -807,7 +807,7 @@ void KBabelView::showTryLaterMessageBox() lay->add( label2 ); lay->addStretch(1); - TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this tqfind/replace session again"), topcontents); + TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this find/replace session again"), topcontents); dialog->setMainWidget(topcontents); dialog->enableButtonSeparator(false); @@ -904,10 +904,10 @@ void KBabelView::plural2msgstr() case KDESpecific: { pos = msgstrEdit->currentIndex(); - currentFormBegin=text.tqfindRev("\\n",pos); + currentFormBegin=text.findRev("\\n",pos); if( currentFormBegin == -1 ) currentFormBegin=0; else currentFormBegin+=3; // skip the newline - currentFormEnd=text.tqfind("\\n",pos); + currentFormEnd=text.find("\\n",pos); if( currentFormEnd == -1 ) currentFormEnd=text.length(); text=text.mid(currentFormBegin,currentFormEnd-currentFormBegin); @@ -940,7 +940,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const TQString & bool result=_catalog->checkUsingTool(tool); emitEntryState(); - TQString checkName = *(info.userCommands().at( info.commands().tqfindIndex(command) )); + TQString checkName = *(info.userCommands().at( info.commands().findIndex(command) )); if(result) { diff --git a/kbabel/kbabel/kbbookmarkhandler.cpp b/kbabel/kbabel/kbbookmarkhandler.cpp index 4d3f0a37..3f9b70b8 100644 --- a/kbabel/kbabel/kbbookmarkhandler.cpp +++ b/kbabel/kbabel/kbbookmarkhandler.cpp @@ -50,10 +50,10 @@ KBabelBookmark::KBabelBookmark(int msgindex, TQString msgtext) // insert one '&' before every consecutive group of ampersands to keep the // first of these from acting either as accelerator or tqmask in the menu TQRegExp rx("&+"); - int pos = msgtext.tqfind(rx); + int pos = msgtext.find(rx); while (pos >= 0) { msgtext.insert(pos, '&'); - pos = msgtext.tqfind(rx, pos + rx.matchedLength() + 1); + pos = msgtext.find(rx, pos + rx.matchedLength() + 1); } _msgtext = msgtext; diff --git a/kbabel/kbabel/kbcataloglistview.cpp b/kbabel/kbabel/kbcataloglistview.cpp index 40fb29e8..25cff704 100644 --- a/kbabel/kbabel/kbcataloglistview.cpp +++ b/kbabel/kbabel/kbcataloglistview.cpp @@ -63,7 +63,7 @@ KBCatalogListView::~KBCatalogListView() void KBCatalogListView::selectionChanged ( TQListViewItem * item) { DocPosition pos; - int number = m_items->tqfind(reinterpret_cast<KBCatalogListViewItem*>(item)); + int number = m_items->find(reinterpret_cast<KBCatalogListViewItem*>(item)); if(number<0) number = 0; pos.item=number; diff --git a/kbabel/kbabel/kbcataloglistviewitem.cpp b/kbabel/kbabel/kbcataloglistviewitem.cpp index 1889e518..45be428e 100644 --- a/kbabel/kbabel/kbcataloglistviewitem.cpp +++ b/kbabel/kbabel/kbcataloglistviewitem.cpp @@ -205,9 +205,9 @@ TQString KBCatalogListViewItem::formatMsg(const TQString str) { // TODO: Use KBHighlighting for this TQString tmp_msgid = str; - tmp_msgid = tmp_msgid.tqreplace( "\\n", "<br>" ); - tmp_msgid = tmp_msgid.tqreplace( "<", "<" ); - tmp_msgid = tmp_msgid.tqreplace( ">", ">" ); + tmp_msgid = tmp_msgid.replace( "\\n", "<br>" ); + tmp_msgid = tmp_msgid.replace( "<", "<" ); + tmp_msgid = tmp_msgid.replace( ">", ">" ); return tmp_msgid; } diff --git a/kbabel/kbabel/kbhighlighting.cpp b/kbabel/kbabel/kbhighlighting.cpp index 05aada8f..c67d56a7 100644 --- a/kbabel/kbabel/kbhighlighting.cpp +++ b/kbabel/kbabel/kbhighlighting.cpp @@ -98,7 +98,7 @@ void KBabelHighlighter::highlight( ) // create a single line out of the text: remove "\n", so that we only // have to deal with one single line of text. TQString text = _edit->text( ); - text.tqreplace( "\n", "" ); + text.replace( "\n", "" ); TQRegExp rx; int pos; @@ -107,10 +107,10 @@ void KBabelHighlighter::highlight( ) { for ( uint i = 0; i < regexps.count( ); ++i ) { rx.setPattern( regexps[i] ); - pos = text.tqfind( rx ); + pos = text.find( rx ); while ( pos >= 0 ) { doHighlighting( (HighlightType)(i+1), pos, rx.matchedLength( ) ); - pos = text.tqfind( rx, pos + rx.matchedLength( ) ); + pos = text.find( rx, pos + rx.matchedLength( ) ); } } } @@ -223,7 +223,7 @@ void KBabelHighlighter::flushCurrentWord() currentPos += tags.matchedLength(); } - currentWord.tqreplace ( tags, "" ); + currentWord.replace ( tags, "" ); if (!currentWord.isEmpty()) { bool isPlainWord = true; @@ -251,7 +251,7 @@ bool KBabelHighlighter::isMisspelled(const TQString& wordRaw) // word first. TQString word = wordRaw; kdDebug(KBABEL) << "isampersand: checking (raw):" << word << endl; - word.tqreplace("&", "" ); + word.replace("&", "" ); kdDebug(KBABEL) << "isMisspelled: checking: " << word << endl; // Normally isMisspelled would look up a dictionary and return @@ -266,7 +266,7 @@ bool KBabelHighlighter::isMisspelled(const TQString& wordRaw) // there is no 'spelt correctly' signal so default to Okay kdDebug(KBABEL) << "Adding word " << word << endl; - dict.tqreplace(word, Okay); + dict.replace(word, Okay); mSpell->checkWord(word, false); return false; } @@ -275,7 +275,7 @@ void KBabelHighlighter::slotMisspelling(const TQString & originalword, const TQStringList & suggestions, unsigned int) { kdDebug(KBABEL) << "Misspelled " << originalword << ", " << suggestions << endl; - dict.tqreplace( originalword, NotOkay ); + dict.replace( originalword, NotOkay ); // this is slow but since kspell is async this will have to do for now highlight(); 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)) { |