summaryrefslogtreecommitdiffstats
path: root/knode/kncomposer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knode/kncomposer.cpp')
-rw-r--r--knode/kncomposer.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/knode/kncomposer.cpp b/knode/kncomposer.cpp
index 160ab38e5..60564d39d 100644
--- a/knode/kncomposer.cpp
+++ b/knode/kncomposer.cpp
@@ -343,7 +343,7 @@ KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &
if (firstEdit) { // now we place the cursor at the end of the quoted text / below the attribution line
if (knGlobals.configManager()->postNewsComposer()->cursorOnTop()) {
- int numLines = knGlobals.configManager()->postNewsComposer()->intro().tqcontains("%L");
+ int numLines = knGlobals.configManager()->postNewsComposer()->intro().contains("%L");
v_iew->e_dit->setCursorPosition(numLines+1,0);
}
else
@@ -411,7 +411,7 @@ int KNComposer::listOfResultOfCheckWord( const TQStringList & lst , const TQStri
createGUI("kncomposerui.rc", false);
unplugActionList("spell_result" );
m_listAction.clear();
- if ( !lst.tqcontains( selectWord ) )
+ if ( !lst.contains( selectWord ) )
{
TQStringList::ConstIterator it = lst.begin();
for ( ; it != lst.end() ; ++it )
@@ -534,7 +534,7 @@ void KNComposer::setMessageMode(MessageMode mode)
if (m_ode == news_mail) {
TQString s = v_iew->e_dit->textLine(0);
- if (!s.tqcontains(i18n("<posted & mailed>")))
+ if (!s.contains(i18n("<posted & mailed>")))
v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0);
} else {
if (v_iew->e_dit->textLine(0)==i18n("<posted & mailed>")) {
@@ -1173,7 +1173,7 @@ void KNComposer::slotToggleDoMail()
if (knGlobals.configManager()->postNewsTechnical()->useExternalMailer()) {
TQString s = v_iew->e_dit->textLine(0);
- if (!s.tqcontains(i18n("<posted & mailed>")))
+ if (!s.contains(i18n("<posted & mailed>")))
v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0);
TQString tmp;
TQStringList textLines = v_iew->e_dit->processedText();
@@ -1293,8 +1293,8 @@ void KNComposer::slotExternalEditor()
TQStringList command = TQStringList::split(' ',editorCommand);
bool filenameAdded=false;
for ( TQStringList::Iterator it = command.begin(); it != command.end(); ++it ) {
- if ((*it).tqcontains("%f")) {
- (*it).tqreplace(TQRegExp("%f"),e_ditorTempfile->name());
+ if ((*it).contains("%f")) {
+ (*it).replace(TQRegExp("%f"),e_ditorTempfile->name());
filenameAdded=true;
}
(*e_xternalEditor) << (*it);
@@ -1424,8 +1424,8 @@ void KNComposer::slotSubjectChanged(const TQString &t)
{
// replace newlines
TQString subject = t;
- subject.tqreplace( '\n', ' ' );
- subject.tqreplace( '\r', ' ' );
+ subject.replace( '\n', ' ' );
+ subject.replace( '\r', ' ' );
if ( subject != t ) // setText() sets the cursor to the end
v_iew->s_ubject->setText( subject );
// update caption
@@ -2046,13 +2046,13 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
if( !paraText.at(charPos).isSpace() )
{
//Get word right clicked on
- firstSpace = paraText.tqfindRev( m_bound, charPos ) + 1;
- lastSpace = paraText.tqfind( m_bound, charPos );
+ firstSpace = paraText.findRev( m_bound, charPos ) + 1;
+ lastSpace = paraText.find( m_bound, charPos );
if( lastSpace == -1 )
lastSpace = paraText.length();
TQString word = paraText.mid( firstSpace, lastSpace - firstSpace );
//Continue if this word was misspelled
- if( !word.isEmpty() && m_replacements.tqcontains( word ) )
+ if( !word.isEmpty() && m_replacements.contains( word ) )
{
KPopupMenu p;
p.insertTitle( i18n("Suggestions") );
@@ -2140,9 +2140,9 @@ TQStringList KNComposer::Editor::processedText()
TQString replacement;
int tabPos;
for (TQStringList::Iterator it = ret.begin(); it != ret.end(); ++it ) {
- while ((tabPos=(*it).tqfind('\t'))!=-1) {
+ while ((tabPos=(*it).find('\t'))!=-1) {
replacement.fill(TQChar(' '), 8-(tabPos%8));
- (*it).tqreplace(tabPos, 1, replacement);
+ (*it).replace(tabPos, 1, replacement);
}
}
@@ -2159,7 +2159,7 @@ void KNComposer::Editor::slotPasteAsQuotation()
s[i] = ' ';
}
s.prepend("> ");
- s.tqreplace(TQRegExp("\n"),"\n> ");
+ s.replace(TQRegExp("\n"),"\n> ");
insert(s);
}
}
@@ -2186,7 +2186,7 @@ void KNComposer::Editor::slotAddQuotes()
if (hasMarkedText()) {
TQString s = markedText();
s.prepend("> ");
- s.tqreplace(TQRegExp("\n"),"\n> ");
+ s.replace(TQRegExp("\n"),"\n> ");
insert(s);
} else {
int l = currentLine();
@@ -2206,7 +2206,7 @@ void KNComposer::Editor::slotRemoveQuotes()
TQString s = markedText();
if (s.left(2) == "> ")
s.remove(0,2);
- s.tqreplace(TQRegExp("\n> "),"\n");
+ s.replace(TQRegExp("\n> "),"\n");
insert(s);
} else {
int l = currentLine();
@@ -2227,7 +2227,7 @@ void KNComposer::Editor::slotAddBox()
if (hasMarkedText()) {
TQString s = markedText();
s.prepend(",----[ ]\n");
- s.tqreplace(TQRegExp("\n"),"\n| ");
+ s.replace(TQRegExp("\n"),"\n| ");
s.append("\n`----");
insert(s);
} else {
@@ -2245,9 +2245,9 @@ void KNComposer::Editor::slotRemoveBox()
{
if (hasMarkedText()) {
TQString s = TQString::tqfromLatin1("\n") + markedText() + TQString::tqfromLatin1("\n");
- s.tqreplace(TQRegExp("\n,----[^\n]*\n"),"\n");
- s.tqreplace(TQRegExp("\n| "),"\n");
- s.tqreplace(TQRegExp("\n`----[^\n]*\n"),"\n");
+ s.replace(TQRegExp("\n,----[^\n]*\n"),"\n");
+ s.replace(TQRegExp("\n| "),"\n");
+ s.replace(TQRegExp("\n`----[^\n]*\n"),"\n");
s.remove(0,1);
s.truncate(s.length()-1);
insert(s);
@@ -2261,7 +2261,7 @@ void KNComposer::Editor::slotRemoveBox()
setAutoUpdate(false);
- // tqfind & remove box begin
+ // find & remove box begin
int x = l;
while ((x>=0)&&(textLine(x).left(5)!=",----"))
x--;
@@ -2278,7 +2278,7 @@ void KNComposer::Editor::slotRemoveBox()
}
}
- // tqfind & remove box end
+ // find & remove box end
x = l;
while ((x<numLines())&&(textLine(x).left(5)!="`----"))
x++;
@@ -2368,7 +2368,7 @@ void KNComposer::Editor::keyPressEvent ( TQKeyEvent *e)
&& newLine[leadingWhiteSpaceCount].isSpace() ) {
++leadingWhiteSpaceCount;
}
- newLine = newLine.tqreplace( 0, leadingWhiteSpaceCount,
+ newLine = newLine.replace( 0, leadingWhiteSpaceCount,
lineText.left( bot ) );
removeParagraph( line + 1 );
insertParagraph( newLine, line + 1 );
@@ -2626,11 +2626,11 @@ void KNComposer::AttachmentPropertiesDlg::apply()
void KNComposer::AttachmentPropertiesDlg::accept()
{
- if(m_imeType->text().tqfind('/')==-1) {
+ if(m_imeType->text().find('/')==-1) {
KMessageBox::sorry(this, i18n("You have set an invalid mime-type.\nPlease change it."));
return;
}
- else if(n_onTextAsText && m_imeType->text().tqfind("text/", 0, false)!=-1 &&
+ else if(n_onTextAsText && m_imeType->text().find("text/", 0, false)!=-1 &&
KMessageBox::warningContinueCancel(this,
i18n("You have changed the mime-type of this non-textual attachment\nto text. This might cause an error while loading or encoding the file.\nProceed?")
) == KMessageBox::Cancel) return;