summaryrefslogtreecommitdiffstats
path: root/knode/articlewidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
commitf4fae92b6768541e2952173c3d4b09040f95bf7e (patch)
treed8c5d93232235cd635f3310b4d95490df181ba2d /knode/articlewidget.cpp
parent125c0a08265b75a133644d3b55f47e37c919f45d (diff)
downloadtdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz
tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knode/articlewidget.cpp')
-rw-r--r--knode/articlewidget.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp
index 357a9c009..491d2c9b1 100644
--- a/knode/articlewidget.cpp
+++ b/knode/articlewidget.cpp
@@ -374,7 +374,7 @@ void ArticleWidget::displayArticle()
mViewer->view()->ensureVisible( 0, 0 );
if ( !mArticle->hasContent() ) {
- displayErrorMessage( i18n("The article contains no data.") );
+ displayErrorMessage( i18n("The article tqcontains no data.") );
return;
}
@@ -410,12 +410,12 @@ void ArticleWidget::displayArticle()
// signature, we show a nice header:
TQPtrList<Kpgp::Block> pgpBlocks;
TQStrList nonPgpBlocks;
- bool containsPGP = Kpgp::Module::prepareMessageForDecryption( mArticle->body(), pgpBlocks, nonPgpBlocks );
+ bool tqcontainsPGP = Kpgp::Module::prepareMessageForDecryption( mArticle->body(), pgpBlocks, nonPgpBlocks );
mViewer->write ( html );
html = TQString();
- if ( containsPGP ) {
+ if ( tqcontainsPGP ) {
TQPtrListIterator<Kpgp::Block> pbit( pgpBlocks );
TQStrListIterator npbit( nonPgpBlocks );
TQTextCodec *codec;
@@ -490,7 +490,7 @@ void ArticleWidget::displayArticle()
}
}
else {
- if ( !containsPGP ) {
+ if ( !tqcontainsPGP ) {
TQStringList lines;
text->decodedText( lines, true, cfgMgr->readNewsViewer()->removeTrailingNewlines() );
displayBodyBlock( lines );
@@ -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.replace( "\n", "<br/>" ) );
+ mViewer->write( errMsg.tqreplace( "\n", "<br/>" ) );
mViewer->write( "</body></html>");
mViewer->end();
@@ -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.replace( ',', ", " );
+ groups.tqreplace( ',', ", " );
headerHtml += toHtmlString( groups, ParseURL );
} else
headerHtml += toHtmlString( hb->asUnicodeString(), ParseURL );
@@ -635,7 +635,7 @@ void ArticleWidget::displayHeader()
TQString xface = "";
if ( !xfhead.isEmpty() ) {
KPIM::KXFace xf;
- xface = TQString::fromLatin1( "<div class=\"senderpic\"><img src=\"%1\" width=\"48\" height=\"48\"/></div>" )
+ xface = TQString::tqfromLatin1( "<div class=\"senderpic\"><img src=\"%1\" width=\"48\" height=\"48\"/></div>" )
.arg( imgToDataUrl( xf.toImage( xfhead ), "PNG" ) );
}
@@ -663,7 +663,7 @@ void ArticleWidget::displayHeader()
html += TQString( "<b>%1</b>" ).arg( i18n("References:") );
while ( i <= refCnt ) {
- html += " <a href=\"news:" + TQString::fromLatin1( id ) + "\">" + TQString::number( i ) + "</a>";
+ html += " <a href=\"news:" + TQString::tqfromLatin1( id ) + "\">" + TQString::number( i ) + "</a>";
id = refs->next();
id = id.mid( 1, id.length() - 2 ); // remove <>
i++;
@@ -836,9 +836,9 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum )
TQString label = ct->name();
if ( label.isEmpty() )
label = i18n("unnamed" );
- // if label consists of only whitespace replace them by underscores
- if ( (uint)label.contains( ' ' ) == label.length() )
- label.replace( TQRegExp( " ", true, true ), "_" );
+ // if label consists of only whitespace tqreplace them by underscores
+ if ( (uint)label.tqcontains( ' ' ) == label.length() )
+ label.tqreplace( TQRegExp( " ", true, true ), "_" );
label = toHtmlString( label, None );
// attachment comment
@@ -915,7 +915,7 @@ TQString ArticleWidget::imgToDataUrl( const TQImage &image, const char* fmt )
TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
image.save( &buffer, fmt );
- return TQString::fromLatin1("data:image/%1;base64,%2")
+ return TQString::tqfromLatin1("data:image/%1;base64,%2")
.arg( fmt, KCodecs::base64Encode( ba ) );
}
@@ -964,7 +964,7 @@ void ArticleWidget::updateContents()
else
clear();
// restore scrollbar position
- mViewer->view()->setContentsPos( 0, qRound( mViewer->view()->contentsHeight() * savedPosition ) );
+ mViewer->view()->setContentsPos( 0, tqRound( mViewer->view()->contentsHeight() * savedPosition ) );
}
@@ -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.contains( url.path() ) )
+ if ( !mAttachementMap.tqcontains( url.path() ) )
return;
partNum = mAttachementMap[url.path()];
}
@@ -1167,7 +1167,7 @@ void ArticleWidget::slotURLClicked( const KURL &url, bool forceOpen)
KMime::Content *c = mAttachments.at( partNum );
if ( !c )
return;
- // TODO: replace with message box as done in KMail
+ // TODO: tqreplace with message box as done in KMail
KNConfigManager *cfgMgr = knGlobals.configManager();
if ( forceOpen || cfgMgr->readNewsViewer()->openAttachmentsOnClick() )
knGlobals.articleManager()->openContent( c );
@@ -1240,7 +1240,7 @@ void ArticleWidget::slotSelectAll()
void ArticleWidget::slotFind()
{
- mViewer->findText();
+ mViewer->tqfindText();
}
@@ -1416,7 +1416,7 @@ void ArticleWidget::slotAddBookmark()
{
if ( mCurrentURL.isEmpty() )
return;
- TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") );
+ TQString filename = locateLocal( "data", TQString::tqfromLatin1("konqueror/bookmarks.xml") );
KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename, false );
KBookmarkGroup group = bookManager->root();
group.addBookmark( bookManager, mCurrentURL.url(), mCurrentURL );
@@ -1444,7 +1444,7 @@ void ArticleWidget::slotSaveAttachment()
return;
int partNum = 0;
if ( mCurrentURL.protocol() == "file" ) {
- if ( !mAttachementMap.contains( mCurrentURL.path() ) )
+ if ( !mAttachementMap.tqcontains( mCurrentURL.path() ) )
return;
partNum = mAttachementMap[mCurrentURL.path()];
}