summaryrefslogtreecommitdiffstats
path: root/knode
diff options
context:
space:
mode:
Diffstat (limited to 'knode')
-rw-r--r--knode/ChangeLog2
-rw-r--r--knode/articlewidget.cpp20
-rw-r--r--knode/filters/1.fltr4
-rw-r--r--knode/filters/2.fltr4
-rw-r--r--knode/filters/3.fltr4
-rw-r--r--knode/filters/4.fltr4
-rw-r--r--knode/filters/5.fltr4
-rw-r--r--knode/filters/6.fltr4
-rw-r--r--knode/filters/7.fltr4
-rw-r--r--knode/filters/8.fltr4
-rw-r--r--knode/knaccountmanager.cpp2
-rw-r--r--knode/knarticle.cpp2
-rw-r--r--knode/knarticlefactory.cpp18
-rw-r--r--knode/knarticlemanager.cpp2
-rw-r--r--knode/kncollectionviewitem.cpp4
-rw-r--r--knode/kncomposer.cpp50
-rw-r--r--knode/kncomposerui.rc8
-rw-r--r--knode/knconfig.cpp10
-rw-r--r--knode/knconfigwidgets.cpp4
-rw-r--r--knode/knconvert.cpp2
-rw-r--r--knode/knfiltermanager.cpp4
-rw-r--r--knode/knfolder.cpp8
-rw-r--r--knode/kngroup.cpp14
-rw-r--r--knode/kngroup.h2
-rw-r--r--knode/kngroupbrowser.cpp12
-rw-r--r--knode/kngroupmanager.cpp8
-rw-r--r--knode/knmainwidget.cpp10
-rw-r--r--knode/knnntpclient.cpp6
-rw-r--r--knode/knsearchdialog.cpp2
-rw-r--r--knode/knserverinfo.cpp4
-rw-r--r--knode/knstringfilter.cpp10
-rw-r--r--knode/utilities.cpp4
32 files changed, 120 insertions, 120 deletions
diff --git a/knode/ChangeLog b/knode/ChangeLog
index 646df19d0..f9585f5f5 100644
--- a/knode/ChangeLog
+++ b/knode/ChangeLog
@@ -130,7 +130,7 @@ changes between 0.1.13 and 0.3.2
- ability to display attachments inline
- posting of MIME multipart-messages (attachments)
- significantly improved composer:
- + all standard editor features (tqfind, tqreplace, select all, ...)
+ + all standard editor features (find, replace, select all, ...)
+ spellchecker
+ optional external editor
+ nice attachment handling
diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp
index b5586c33c..dde18d69a 100644
--- a/knode/articlewidget.cpp
+++ b/knode/articlewidget.cpp
@@ -473,7 +473,7 @@ void ArticleWidget::displayArticle()
text->decodedText( htmlTxt, true, cfgMgr->readNewsViewer()->removeTrailingNewlines() );
if ( mShowHtml ) {
// strip </html> & </body>
- int i = kMin( htmlTxt.tqfindRev( "</html>", -1, false ), htmlTxt.tqfindRev( "</body>", -1, false ) );
+ int i = kMin( htmlTxt.findRev( "</html>", -1, false ), htmlTxt.findRev( "</body>", -1, false ) );
if ( i >= 0 )
htmlTxt.truncate( i );
html += htmlTxt;
@@ -527,7 +527,7 @@ void ArticleWidget::displayErrorMessage( const TQString &msg )
mViewer->write( "<b><font size=\"+1\" color=\"red\">" );
mViewer->write( i18n("An error occurred.") );
mViewer->write( "</font></b><hr/><br/>" );
- mViewer->write( errMsg.tqreplace( "\n", "<br/>" ) );
+ mViewer->write( errMsg.replace( "\n", "<br/>" ) );
mViewer->write( "</body></html>");
mViewer->end();
@@ -535,7 +535,7 @@ void ArticleWidget::displayErrorMessage( const TQString &msg )
KNConfigManager *cfgMgr = knGlobals.configManager();
if ( cfgMgr->readNewsGeneral()->autoMark() &&
mArticle && mArticle->type() == KMime::Base::ATremote && !mArticle->isOrphant() &&
- ( msg.tqfind("430") != -1 || msg.tqfind("423") != -1 ) ) {
+ ( msg.find("430") != -1 || msg.find("423") != -1 ) ) {
KNRemoteArticle::List l;
l.append( static_cast<KNRemoteArticle*>( mArticle ) );
knGlobals.articleManager()->setRead( l, true );
@@ -610,7 +610,7 @@ void ArticleWidget::displayHeader()
headerHtml += toHtmlString( KGlobal::locale()->formatDateTime(date->qdt(), false, true), None );
} else if ( hb->is("Newsgroups") ) {
TQString groups = hb->asUnicodeString();
- groups.tqreplace( ',', ", " );
+ groups.replace( ',', ", " );
headerHtml += toHtmlString( groups, ParseURL );
} else
headerHtml += toHtmlString( hb->asUnicodeString(), ParseURL );
@@ -837,8 +837,8 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum )
if ( label.isEmpty() )
label = i18n("unnamed" );
// if label consists of only whitespace replace them by underscores
- if ( (uint)label.tqcontains( ' ' ) == label.length() )
- label.tqreplace( TQRegExp( " ", true, true ), "_" );
+ if ( (uint)label.contains( ' ' ) == label.length() )
+ label.replace( TQRegExp( " ", true, true ), "_" );
label = toHtmlString( label, None );
// attachment comment
@@ -928,7 +928,7 @@ int ArticleWidget::quotingDepth( const TQString &line, const TQString &quoteChar
// skip spaces
if ( line[i].isSpace() )
continue;
- if ( quoteChars.tqfind( line[i] ) != -1 )
+ if ( quoteChars.find( line[i] ) != -1 )
++level;
else
break;
@@ -989,7 +989,7 @@ TQString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int part
// strip off a leading path
KMime::Headers::ContentType* ct = att->contentType();
TQString attName = ct->name();
- int slashPos = attName.tqfindRev( '/' );
+ int slashPos = attName.findRev( '/' );
if( -1 != slashPos )
attName = attName.mid( slashPos + 1 );
if( attName.isEmpty() )
@@ -1158,7 +1158,7 @@ void ArticleWidget::slotURLClicked( const KURL &url, bool forceOpen)
int partNum = 0;
if ( url.protocol() == "file" || url.protocol() == "part" ) {
if ( url.protocol() == "file" ) {
- if ( !mAttachementMap.tqcontains( url.path() ) )
+ if ( !mAttachementMap.contains( url.path() ) )
return;
partNum = mAttachementMap[url.path()];
}
@@ -1444,7 +1444,7 @@ void ArticleWidget::slotSaveAttachment()
return;
int partNum = 0;
if ( mCurrentURL.protocol() == "file" ) {
- if ( !mAttachementMap.tqcontains( mCurrentURL.path() ) )
+ if ( !mAttachementMap.contains( mCurrentURL.path() ) )
return;
partNum = mAttachementMap[mCurrentURL.path()];
}
diff --git a/knode/filters/1.fltr b/knode/filters/1.fltr
index 16e644570..f66021cd3 100644
--- a/knode/filters/1.fltr
+++ b/knode/filters/1.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=false
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/filters/2.fltr b/knode/filters/2.fltr
index f9f7b84fa..7b11f48e2 100644
--- a/knode/filters/2.fltr
+++ b/knode/filters/2.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=true
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/filters/3.fltr b/knode/filters/3.fltr
index 82139623e..e7c3e0f6e 100644
--- a/knode/filters/3.fltr
+++ b/knode/filters/3.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=false
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/filters/4.fltr b/knode/filters/4.fltr
index ee6cb67b8..4972266fd 100644
--- a/knode/filters/4.fltr
+++ b/knode/filters/4.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=false
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/filters/5.fltr b/knode/filters/5.fltr
index 1386f4d7e..24ca696b0 100644
--- a/knode/filters/5.fltr
+++ b/knode/filters/5.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=true
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/filters/6.fltr b/knode/filters/6.fltr
index 867e80292..7ad3d6124 100644
--- a/knode/filters/6.fltr
+++ b/knode/filters/6.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=false
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/filters/7.fltr b/knode/filters/7.fltr
index 07f16f3b9..81fec0cde 100644
--- a/knode/filters/7.fltr
+++ b/knode/filters/7.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=%MYNAME
-tqcontains=true
+contains=true
enabled=true
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=false
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/filters/8.fltr b/knode/filters/8.fltr
index dc0859ff1..5978c616f 100644
--- a/knode/filters/8.fltr
+++ b/knode/filters/8.fltr
@@ -6,7 +6,7 @@ val1=0
val2=0
[FROM]
Data=%MYNAME
-tqcontains=true
+contains=true
enabled=true
regX=false
[GENERAL]
@@ -37,6 +37,6 @@ EN_R=false
EN_US=false
[SUBJECT]
Data=
-tqcontains=true
+contains=true
enabled=false
regX=false
diff --git a/knode/knaccountmanager.cpp b/knode/knaccountmanager.cpp
index b62679a2f..01678265d 100644
--- a/knode/knaccountmanager.cpp
+++ b/knode/knaccountmanager.cpp
@@ -127,7 +127,7 @@ bool KNAccountManager::newAccount(KNNntpAccount *a)
TQStringList entries(d.entryList("nntp.*", TQDir::Dirs));
int id = 1;
- while (entries.tqfindIndex(TQString("nntp.%1").tqarg(id))!=-1)
+ while (entries.findIndex(TQString("nntp.%1").tqarg(id))!=-1)
++id;
a->setId(id);
diff --git a/knode/knarticle.cpp b/knode/knarticle.cpp
index a46b98380..e253d2ef8 100644
--- a/knode/knarticle.cpp
+++ b/knode/knarticle.cpp
@@ -453,7 +453,7 @@ void KNAttachment::setMimeType(const TQString &s)
m_imeType=s.latin1();
h_asChanged=true;
- if(m_imeType.tqfind("text/", 0, false)==-1) {
+ if(m_imeType.find("text/", 0, false)==-1) {
f_b64=true;
e_ncoding.setCte(Headers::CEbase64);
}
diff --git a/knode/knarticlefactory.cpp b/knode/knarticlefactory.cpp
index 37c1b4961..53eabd8bb 100644
--- a/knode/knarticlefactory.cpp
+++ b/knode/knarticlefactory.cpp
@@ -210,12 +210,12 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, TQString selectedText, bo
TQString name(a->from()->name());
if (name.isEmpty())
name = TQString::tqfromLatin1(a->from()->email());
- attribution.tqreplace(TQRegExp("%NAME"),name);
- attribution.tqreplace(TQRegExp("%EMAIL"),TQString::tqfromLatin1(a->from()->email()));
- attribution.tqreplace(TQRegExp("%DATE"),KGlobal::locale()->formatDateTime(a->date()->qdt(),false));
- attribution.tqreplace(TQRegExp("%MSID"),a->messageID()->asUnicodeString());
- attribution.tqreplace(TQRegExp("%GROUP"),g->groupname());
- attribution.tqreplace(TQRegExp("%L"),"\n");
+ attribution.replace(TQRegExp("%NAME"),name);
+ attribution.replace(TQRegExp("%EMAIL"),TQString::tqfromLatin1(a->from()->email()));
+ attribution.replace(TQRegExp("%DATE"),KGlobal::locale()->formatDateTime(a->date()->qdt(),false));
+ attribution.replace(TQRegExp("%MSID"),a->messageID()->asUnicodeString());
+ attribution.replace(TQRegExp("%GROUP"),g->groupname());
+ attribution.replace(TQRegExp("%L"),"\n");
attribution+="\n\n";
TQString quoted=attribution;
@@ -876,11 +876,11 @@ KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, TQString &sig, T
TQString name(origPost->from()->name());
if (name.isEmpty())
name = TQString::tqfromLatin1(origPost->from()->email());
- value.tqreplace(TQRegExp("%NAME"), name);
- value.tqreplace(TQRegExp("%EMAIL"), TQString::tqfromLatin1(origPost->from()->email()));
+ value.replace(TQRegExp("%NAME"), name);
+ value.replace(TQRegExp("%EMAIL"), TQString::tqfromLatin1(origPost->from()->email()));
}
else
- if(value.tqfind("%NAME") != -1 || value.tqfind("%EMAIL") != -1)
+ if(value.find("%NAME") != -1 || value.find("%EMAIL") != -1)
continue;
art->setHeader( new KMime::Headers::Generic( (TQCString("X-")+(*it).name()), art, value, pnt->charset() ) );
diff --git a/knode/knarticlemanager.cpp b/knode/knarticlemanager.cpp
index 625f22f06..e871b1f5c 100644
--- a/knode/knarticlemanager.cpp
+++ b/knode/knarticlemanager.cpp
@@ -99,7 +99,7 @@ void KNArticleManager::saveArticleToFile(KNArticle *a, TQWidget *tqparent)
else
s.append(' ');
fName = s.simplifyWhiteSpace();
- fName.tqreplace(TQRegExp("[\\s]"),"_");
+ fName.replace(TQRegExp("[\\s]"),"_");
KNSaveHelper helper(fName,tqparent);
TQFile *file = helper.getFile(i18n("Save Article"));
diff --git a/knode/kncollectionviewitem.cpp b/knode/kncollectionviewitem.cpp
index 0be47ddc3..245ea7778 100644
--- a/knode/kncollectionviewitem.cpp
+++ b/knode/kncollectionviewitem.cpp
@@ -157,10 +157,10 @@ TQString KNCollectionViewItem::squeezeFolderName( const TQString &text,
int curPos = 0, nextPos = 0;
TQString temp;
while ( (uint)fm.width(t) > width && nextPos != -1 ) {
- nextPos = t.tqfind('.', curPos);
+ nextPos = t.find('.', curPos);
if ( nextPos != -1 ) {
temp = t[curPos];
- t.tqreplace( curPos, nextPos - curPos, temp );
+ t.replace( curPos, nextPos - curPos, temp );
curPos += 2;
}
}
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;
diff --git a/knode/kncomposerui.rc b/knode/kncomposerui.rc
index 4e0ec378d..0a203d266 100644
--- a/knode/kncomposerui.rc
+++ b/knode/kncomposerui.rc
@@ -20,9 +20,9 @@
<Action name="paste_quoted"/>
<Action name="edit_select_all"/>
<Separator/>
- <Action name="edit_tqfind"/>
+ <Action name="edit_find"/>
<Action name="edit_find_next"/>
- <Action name="edit_tqreplace"/>
+ <Action name="edit_replace"/>
</Menu>
<Menu name="attach"><text>&amp;Attach</text>
<Action name="append_signature"/>
@@ -91,8 +91,8 @@
<Action name="paste_quoted"/>
<Action name="edit_select_all"/>
<Separator/>
- <Action name="edit_tqfind"/>
- <Action name="edit_tqreplace"/>
+ <Action name="edit_find"/>
+ <Action name="edit_replace"/>
<Separator/>
<Menu name="spell"><text>Spell Result</text>
<ActionList name="spell_result"/>
diff --git a/knode/knconfig.cpp b/knode/knconfig.cpp
index 608e625a9..a16e459f0 100644
--- a/knode/knconfig.cpp
+++ b/knode/knconfig.cpp
@@ -149,7 +149,7 @@ TQString KNConfig::Identity::getSignature()
else
s_igContents = s_igText;
- if (!s_igContents.isEmpty() && !s_igContents.tqcontains("\n-- \n") && !(s_igContents.left(4) == "-- \n"))
+ if (!s_igContents.isEmpty() && !s_igContents.contains("\n-- \n") && !(s_igContents.left(4) == "-- \n"))
s_igContents.prepend("-- \n");
return s_igContents;
@@ -801,7 +801,7 @@ void KNConfig::DisplayedHeaders::remove(KNDisplayedHeader *h)
void KNConfig::DisplayedHeaders::up(KNDisplayedHeader *h)
{
- int idx = mHeaderList.tqfindIndex( h );
+ int idx = mHeaderList.findIndex( h );
if ( idx != -1 ) {
mHeaderList.remove( mHeaderList.at( idx ) );
mHeaderList.insert( mHeaderList.at( idx - 1 ), h );
@@ -812,7 +812,7 @@ void KNConfig::DisplayedHeaders::up(KNDisplayedHeader *h)
void KNConfig::DisplayedHeaders::down(KNDisplayedHeader *h)
{
- int idx = mHeaderList.tqfindIndex( h );
+ int idx = mHeaderList.findIndex( h );
if ( idx != -1 ) {
mHeaderList.remove( mHeaderList.at( idx ) );
mHeaderList.insert( mHeaderList.at( idx + 1 ), h );
@@ -862,7 +862,7 @@ void KNConfig::Scoring::save()
KNConfig::XHeader::XHeader(const TQString &s)
{
if(s.left(2)=="X-") {
- int pos=s.tqfind(": ");
+ int pos=s.find(": ");
if(pos!=-1) {
n_ame=s.mid(2, pos-2).latin1();
pos+=2;
@@ -999,7 +999,7 @@ int KNConfig::PostNewsTechnical::indexForCharset(const TQCString &str)
TQCString KNConfig::PostNewsTechnical::findComposerCharset(TQCString cs)
{
- TQCString *ret=findComposerCSCache.tqfind(cs);
+ TQCString *ret=findComposerCSCache.find(cs);
if (ret)
return *ret;
diff --git a/knode/knconfigwidgets.cpp b/knode/knconfigwidgets.cpp
index dd7012c2c..a915fe17f 100644
--- a/knode/knconfigwidgets.cpp
+++ b/knode/knconfigwidgets.cpp
@@ -2131,7 +2131,7 @@ KNConfig::XHeaderConfDialog::XHeaderConfDialog(const TQString &h, TQWidget *p, c
new TQLabel(":", page);
v_alue=new KLineEdit(page);
- int pos=h.tqfind(": ", 2);
+ int pos=h.find(": ", 2);
if(pos!=-1) {
n_ame->setText(h.mid(2, pos-2));
pos+=2;
@@ -2157,7 +2157,7 @@ TQString KNConfig::XHeaderConfDialog::result()
{
TQString value = v_alue->text();
// just in case someone pastes a newline
- value.tqreplace( '\n', ' ' );
+ value.replace( '\n', ' ' );
return TQString( "X-%1: %2" ).tqarg( n_ame->text() ).tqarg( value );
}
diff --git a/knode/knconvert.cpp b/knode/knconvert.cpp
index da039f54a..70d447034 100644
--- a/knode/knconvert.cpp
+++ b/knode/knconvert.cpp
@@ -405,7 +405,7 @@ int KNConvert::Converter04::convertFolder(TQString srcPrefix, TQString dstPrefix
buff.tqat(readBytes)='\0'; //terminate string;
//remove "X-KNode-Overview"
- int pos=buff.tqfind('\n');
+ int pos=buff.find('\n');
if(pos>-1)
buff.remove(0, pos+1);
diff --git a/knode/knfiltermanager.cpp b/knode/knfiltermanager.cpp
index 70f00b711..67302063a 100644
--- a/knode/knfiltermanager.cpp
+++ b/knode/knfiltermanager.cpp
@@ -205,7 +205,7 @@ void KNFilterManager::addFilter(KNArticleFilter *f)
for ( TQValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
activeFilters << (*it)->id();
int newId = 1;
- while ( activeFilters.tqcontains( newId ) > 0 )
+ while ( activeFilters.contains( newId ) > 0 )
newId++;
f->setId( newId );
}
@@ -369,7 +369,7 @@ void KNFilterManager::slotShowFilterChooser()
int currentItem=0;
if (currFilter)
- currentItem=ids.tqfindIndex(currFilter->id());
+ currentItem=ids.findIndex(currFilter->id());
if (currentItem==-1)
currentItem=0;
diff --git a/knode/knfolder.cpp b/knode/knfolder.cpp
index e9839b994..68a43dcea 100644
--- a/knode/knfolder.cpp
+++ b/knode/knfolder.cpp
@@ -244,8 +244,8 @@ bool KNFolder::loadHdrs()
//set overview
bool end=false;
- pos1=tmp.tqfind(' ')+1;
- pos2=tmp.tqfind('\t', pos1);
+ pos1=tmp.find(' ')+1;
+ pos2=tmp.find('\t', pos1);
if (pos2 == -1) {
pos2=tmp.length();
end=true;
@@ -254,7 +254,7 @@ bool KNFolder::loadHdrs()
if (!end) {
pos1=pos2+1;
- pos2=tmp.tqfind('\t', pos1);
+ pos2=tmp.find('\t', pos1);
if (pos2 == -1) {
pos2=tmp.length();
end=true;
@@ -264,7 +264,7 @@ bool KNFolder::loadHdrs()
if (!end) {
pos1=pos2+1;
- pos2=tmp.tqfind('\t', pos1);
+ pos2=tmp.find('\t', pos1);
if (pos2 == -1) {
pos2=tmp.length();
end=true;
diff --git a/knode/kngroup.cpp b/knode/kngroup.cpp
index aad26b8b3..a6b3e6619 100644
--- a/knode/kngroup.cpp
+++ b/knode/kngroup.cpp
@@ -254,7 +254,7 @@ bool KNGroup::loadHdrs()
// following lines contain one header per line
for (uint i = buff.toUInt(); i > 0; --i) {
buff = f.readLine();
- int pos = buff.tqfind(':');
+ int pos = buff.find(':');
TQCString hdrName = buff.left( pos );
// skip headers we already set above and which we actually never should
// find here, but however it still happens... (eg. #101355)
@@ -457,10 +457,10 @@ void KNGroup::insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolCli
if (!split.next())
break;
data = split.string();
- int pos = hdr.tqfind(':');
+ int pos = hdr.find(':');
hdrName = hdr.left( pos );
// if the header format is 'full' we have to strip the header name
- if (hdr.tqfindRev("full") == (int)(hdr.length() - 4))
+ if (hdr.findRev("full") == (int)(hdr.length() - 4))
data = data.right( data.length() - (hdrName.length() + 2) );
// add header
@@ -558,7 +558,7 @@ int KNGroup::saveStaticData(int cnt,bool ovr)
// optional headers
ts << mOptionalHeaders.count() << '\n';
for (TQCString hdrName = mOptionalHeaders.first(); !hdrName.isNull(); hdrName = mOptionalHeaders.next()) {
- hdrName = hdrName.left( hdrName.tqfind(':') );
+ hdrName = hdrName.left( hdrName.find(':') );
KMime::Headers::Base *hdr = art->getHeaderByType( hdrName );
if ( hdr )
ts << hdrName << ": " << hdr->asUnicodeString() << '\n';
@@ -701,7 +701,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client)
art=at(idx);
if(art->threadingLevel()>1) {
oldRef=art->idRef();
- ref=tqfindReference(art);
+ ref=findReference(art);
if(ref) {
// this method is called from the nntp-thread!!!
#ifndef NDEBUG
@@ -720,7 +720,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client)
if(art->idRef()==-1 && !art->references()->isEmpty() ){ //hdr has references
refCnt++;
- if(tqfindReference(art))
+ if(findReference(art))
foundCnt++;
}
else {
@@ -866,7 +866,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client)
}
-KNRemoteArticle* KNGroup::tqfindReference(KNRemoteArticle *a)
+KNRemoteArticle* KNGroup::findReference(KNRemoteArticle *a)
{
int found=false;
TQCString ref_mid;
diff --git a/knode/kngroup.h b/knode/kngroup.h
index b0c31f93f..387ff0f6e 100644
--- a/knode/kngroup.h
+++ b/knode/kngroup.h
@@ -134,7 +134,7 @@ class KNGroup : public KNArticleCollection , public KNJobItem {
protected:
void buildThreads(int cnt, KNProtocolClient *client=0);
- KNRemoteArticle* tqfindReference(KNRemoteArticle *a);
+ KNRemoteArticle* findReference(KNRemoteArticle *a);
int n_ewCount,
l_astFetchCount,
diff --git a/knode/kngroupbrowser.cpp b/knode/kngroupbrowser.cpp
index c3ab27d98..584eae40c 100644
--- a/knode/kngroupbrowser.cpp
+++ b/knode/kngroupbrowser.cpp
@@ -217,7 +217,7 @@ void KNGroupBrowser::createListItems(TQListViewItem *tqparent)
compare=gn->name.mid(prefix.length());
if(!expandit || !compare.startsWith(tlgn)) {
- if((colon=compare.tqfind('.'))!=-1) {
+ if((colon=compare.find('.'))!=-1) {
colon++;
expandit=true;
} else {
@@ -316,7 +316,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt)
bool notCheckNew = !newCB->isChecked();
bool notCheckStr = (filtertxt.isEmpty());
- bool isRegexp = filtertxt.tqcontains(TQRegExp("[^a-z0-9\\-\\+.]"));
+ bool isRegexp = filtertxt.contains(TQRegExp("[^a-z0-9\\-\\+.]"));
bool doIncrementalUpdate = (!isRegexp && incrementalFilter && (filtertxt.left(lastFilter.length())==lastFilter));
@@ -327,7 +327,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt)
for(KNGroupInfo *g=matchList->first(); g; g=matchList->next()) {
if ((notCheckSub||g->subscribed)&&
(notCheckNew||g->newGroup)&&
- (notCheckStr||(g->name.tqfind(filtertxt)!=-1)))
+ (notCheckStr||(g->name.find(filtertxt)!=-1)))
tempList->append(g);
}
@@ -339,7 +339,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt)
for(KNGroupInfo *g=allList->first(); g; g=allList->next()) {
if ((notCheckSub||g->subscribed)&&
(notCheckNew||g->newGroup)&&
- (notCheckStr||(isRegexp? (reg.search(g->name,0) != -1):(g->name.tqfind(filtertxt)!=-1))))
+ (notCheckStr||(isRegexp? (reg.search(g->name,0) != -1):(g->name.find(filtertxt)!=-1))))
matchList->append(g);
}
}
@@ -411,7 +411,7 @@ KNGroupBrowser::CheckItem::CheckItem(TQListView *v, const KNGroupInfo &gi, KNGro
TQString des(gi.description);
if (gi.status == KNGroup::moderated) {
setText(0,gi.name+" (m)");
- if (!des.upper().tqcontains(i18n("moderated").upper()))
+ if (!des.upper().contains(i18n("moderated").upper()))
des+=i18n(" (moderated)");
}
setText(1,des);
@@ -424,7 +424,7 @@ KNGroupBrowser::CheckItem::CheckItem(TQListViewItem *i, const KNGroupInfo &gi, K
TQString des(gi.description);
if (gi.status == KNGroup::moderated) {
setText(0,gi.name+" (m)");
- if (!des.upper().tqcontains(i18n("moderated").upper()))
+ if (!des.upper().contains(i18n("moderated").upper()))
des+=i18n(" (moderated)");
}
setText(1,des);
diff --git a/knode/kngroupmanager.cpp b/knode/kngroupmanager.cpp
index 151efa0f0..c0677a0ad 100644
--- a/knode/kngroupmanager.cpp
+++ b/knode/kngroupmanager.cpp
@@ -111,7 +111,7 @@ bool KNGroupListData::readIn(KNProtocolClient *client)
if(f.open(IO_ReadOnly)) {
while(!f.atEnd()) {
line = f.readLine();
- sepPos1 = line.tqfind(' ');
+ sepPos1 = line.find(' ');
if (sepPos1==-1) { // no description
name = TQString::fromUtf8(line);
@@ -120,7 +120,7 @@ bool KNGroupListData::readIn(KNProtocolClient *client)
} else {
name = TQString::fromUtf8(line.left(sepPos1));
- sepPos2 = line.tqfind(' ',sepPos1+1);
+ sepPos2 = line.find(' ',sepPos1+1);
if (sepPos2==-1) { // no status
description = TQString::fromUtf8(line.right(line.length()-sepPos1-1));
status = KNGroup::unknown;
@@ -139,7 +139,7 @@ bool KNGroupListData::readIn(KNProtocolClient *client)
}
}
- if (subscribed.tqcontains(name)) {
+ if (subscribed.contains(name)) {
subscribed.remove(name); // group names are unique, we wont find it again anyway...
sub = true;
} else
@@ -201,7 +201,7 @@ void KNGroupListData::merge(TQSortedList<KNGroupInfo>* newGroups)
bool subscribed;
for (KNGroupInfo *i=newGroups->first(); i; i=newGroups->next()) {
- if (groups->tqfind(i)>=0) {
+ if (groups->find(i)>=0) {
subscribed = groups->current()->subscribed;
groups->remove(); // avoid duplicates
} else
diff --git a/knode/knmainwidget.cpp b/knode/knmainwidget.cpp
index 5ea58757c..2214cb836 100644
--- a/knode/knmainwidget.cpp
+++ b/knode/knmainwidget.cpp
@@ -484,7 +484,7 @@ void KNMainWidget::openURL(const KURL &url)
}
if (acc) {
- bool isMID=(url.url().tqcontains('@')==1);
+ bool isMID=(url.url().contains('@')==1);
if (!isMID) {
TQString groupname=url.path(-1);
@@ -678,7 +678,7 @@ void KNMainWidget::initActions()
a_ctArtFilter->setShortcutConfigurable(false);
a_ctArtFilterKeyb = new KAction(i18n("Filter"), Key_F6, actionCollection(), "view_Filter_Keyb");
a_ctArtFilterKeyb->plugAccel(a_ccel);
- a_ctArtSearch = new KAction(i18n("&Search Articles..."),"mail_tqfind" , Key_F4 , TQT_TQOBJECT(this),
+ a_ctArtSearch = new KAction(i18n("&Search Articles..."),"mail_find" , Key_F4 , TQT_TQOBJECT(this),
TQT_SLOT(slotArtSearch()), actionCollection(), "article_search");
a_ctArtRefreshList = new KAction(i18n("&Refresh List"),"reload", KStdAccel::shortcut(KStdAccel::Reload), TQT_TQOBJECT(this),
TQT_SLOT(slotArtRefreshList()), actionCollection(), "view_Refresh");
@@ -963,7 +963,7 @@ void KNMainWidget::getSelectedThreads(KNRemoteArticle::List &l)
art=static_cast<KNRemoteArticle*> ((static_cast<KNHdrViewItem*>(i))->art);
// ignore the article if it is already in the list
// (multiple aritcles are selected in one thread)
- if ( l.tqfind(art) == l.end() )
+ if ( l.find(art) == l.end() )
art->thread(l);
}
}
@@ -1946,8 +1946,8 @@ void KNMainWidget::slotFetchArticleWithID()
if (dlg->exec()) {
TQString id = dlg->messageId().simplifyWhiteSpace();
- if (id.tqfind(TQRegExp("*@*",false,true))!=-1) {
- if (id.tqfind(TQRegExp("<*>",false,true))==-1) // add "<>" when necessary
+ if (id.find(TQRegExp("*@*",false,true))!=-1) {
+ if (id.find(TQRegExp("<*>",false,true))==-1) // add "<>" when necessary
id = TQString("<%1>").tqarg(id);
if(!KNArticleWindow::raiseWindowForArticle(id.latin1())) { //article not yet opened
diff --git a/knode/knnntpclient.cpp b/knode/knnntpclient.cpp
index b81f13485..26473b6a1 100644
--- a/knode/knnntpclient.cpp
+++ b/knode/knnntpclient.cpp
@@ -115,7 +115,7 @@ void KNNntpClient::doFetchGroups()
name = TQString::fromUtf8(line);
- if (target->subscribed.tqcontains(name)) {
+ if (target->subscribed.contains(name)) {
target->subscribed.remove(name); // group names are unique, we wont find it again anyway...
subscribed = true;
} else
@@ -523,9 +523,9 @@ void KNNntpClient::doPostArticle()
if (art->messageID(false)==0) { // article has no message ID => search for a ID in the response
TQCString s = getCurrentLine();
- int start = s.tqfindRev(TQRegExp("<[^\\s]*@[^\\s]*>"));
+ int start = s.findRev(TQRegExp("<[^\\s]*@[^\\s]*>"));
if (start != -1) { // post response includes a recommended id
- int end = s.tqfind('>',start);
+ int end = s.find('>',start);
art->messageID()->from7BitString(s.mid(start,end-start+1));
art->assemble();
#ifndef NDEBUG
diff --git a/knode/knsearchdialog.cpp b/knode/knsearchdialog.cpp
index 5f8ff1ada..72e98dd1f 100644
--- a/knode/knsearchdialog.cpp
+++ b/knode/knsearchdialog.cpp
@@ -36,7 +36,7 @@ KNSearchDialog::KNSearchDialog(searchType /*t*/, TQWidget *tqparent)
setIcon(SmallIcon("knode"));
TQGroupBox *bg=new TQGroupBox(this);
- startBtn=new TQPushButton(SmallIcon("mail_tqfind"),i18n("Sea&rch"), bg);
+ startBtn=new TQPushButton(SmallIcon("mail_find"),i18n("Sea&rch"), bg);
startBtn->setDefault(true);
newBtn=new TQPushButton(SmallIcon("editclear"),i18n("C&lear"), bg);
closeBtn=new KPushButton(KStdGuiItem::close(), bg);
diff --git a/knode/knserverinfo.cpp b/knode/knserverinfo.cpp
index 5b7dc407c..c0351349b 100644
--- a/knode/knserverinfo.cpp
+++ b/knode/knserverinfo.cpp
@@ -78,9 +78,9 @@ void KNServerInfo::readConf(KConfig *conf)
readPassword();
TQString encStr = conf->readEntry( "encryption", "None" );
- if ( encStr.tqcontains( "SSL", false ) )
+ if ( encStr.contains( "SSL", false ) )
mEncryption = SSL;
- else if ( encStr.tqcontains( "TLS", false ) )
+ else if ( encStr.contains( "TLS", false ) )
mEncryption = TLS;
else
mEncryption = None;
diff --git a/knode/knstringfilter.cpp b/knode/knstringfilter.cpp
index 1570da040..51fdc1bd3 100644
--- a/knode/knstringfilter.cpp
+++ b/knode/knstringfilter.cpp
@@ -47,7 +47,7 @@ bool KNStringFilter::doFilter(const TQString &s)
TQRegExp matcher(expanded);
ret = ( matcher.search(s) >= 0 );
} else
- ret=(s.tqfind(expanded,0,false)!=-1);
+ ret=(s.find(expanded,0,false)!=-1);
if(!con) ret=!ret;
}
@@ -69,15 +69,15 @@ void KNStringFilter::expand(KNGroup *g)
}
expanded = data;
- expanded.tqreplace(TQRegExp("%MYNAME"), id->name());
- expanded.tqreplace(TQRegExp("%MYEMAIL"), id->email());
+ expanded.replace(TQRegExp("%MYNAME"), id->name());
+ expanded.replace(TQRegExp("%MYEMAIL"), id->email());
}
void KNStringFilter::load(KSimpleConfig *conf)
{
- con=conf->readBoolEntry("tqcontains", true);
+ con=conf->readBoolEntry("contains", true);
data=conf->readEntry("Data");
regExp=conf->readBoolEntry("regX", false);
}
@@ -86,7 +86,7 @@ void KNStringFilter::load(KSimpleConfig *conf)
void KNStringFilter::save(KSimpleConfig *conf)
{
- conf->writeEntry("tqcontains", con);
+ conf->writeEntry("contains", con);
conf->writeEntry("Data", data);
conf->writeEntry("regX", regExp);
}
diff --git a/knode/utilities.cpp b/knode/utilities.cpp
index 4c857a3e5..0927c9171 100644
--- a/knode/utilities.cpp
+++ b/knode/utilities.cpp
@@ -274,7 +274,7 @@ int KNHelper::selectDialog(TQWidget *tqparent, const TQString &caption, const TQ
TQString s;
for ( TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it ) {
s = (*it);
- s.tqreplace(TQRegExp("&"),""); // remove accelerators
+ s.replace(TQRegExp("&"),""); // remove accelerators
list->insertItem(s);
}
@@ -427,7 +427,7 @@ TQString KNHelper::rewrapStringList(TQStringList text, int wrapAt, TQChar quoteC
thisLine = thisLine.stripWhiteSpace();
if(!leftover.isEmpty()) { // don't break paragraphs, tables and quote levels
- if(thisLine.isEmpty() || (thisPrefix!=lastPrefix) || thisLine.tqcontains(" ") || thisLine.tqcontains('\t'))
+ if(thisLine.isEmpty() || (thisPrefix!=lastPrefix) || thisLine.contains(" ") || thisLine.contains('\t'))
appendTextWPrefix(quoted, leftover, wrapAt, lastPrefix);
else
thisLine.prepend(leftover+" ");