summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabel/kbabelview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/kbabel/kbabelview.cpp')
-rw-r--r--kbabel/kbabel/kbabelview.cpp84
1 files changed, 42 insertions, 42 deletions
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);
}