From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- knode/articlewidget.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'knode/articlewidget.cpp') diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp index 491d2c9b1..301c9bb58 100644 --- a/knode/articlewidget.cpp +++ b/knode/articlewidget.cpp @@ -75,11 +75,11 @@ using namespace KNode; TQValueList ArticleWidget::mInstances; -ArticleWidget::ArticleWidget( TQWidget *parent, +ArticleWidget::ArticleWidget( TQWidget *tqparent, KXMLGUIClient *guiClient, KActionCollection *actionCollection, const char *name ) : - TQWidget( parent, name ), + TQWidget( tqparent, name ), mArticle( 0 ), mViewer( 0 ), mCSSHelper( 0 ), @@ -139,7 +139,7 @@ void ArticleWidget::initActions() mPrintAction = KStdAction::print( this, TQT_SLOT(slotPrint()), mActionCollection ); mCopySelectionAction = KStdAction::copy( this, TQT_SLOT(slotCopySelection()), mActionCollection ); mSelectAllAction = KStdAction::selectAll( this, TQT_SLOT(slotSelectAll()), mActionCollection ); - mFindAction = KStdAction::find( this, TQT_SLOT(slotFind()), mActionCollection, "find_in_article" ); + mFindAction = KStdAction::tqfind( this, TQT_SLOT(slotFind()), mActionCollection, "find_in_article" ); mFindAction->setText( i18n("F&ind in Article...") ); mViewSourceAction = new KAction( i18n("&View Source"), Key_V , this, TQT_SLOT(slotViewSource()), mActionCollection, "article_viewSource" ); @@ -374,7 +374,7 @@ void ArticleWidget::displayArticle() mViewer->view()->ensureVisible( 0, 0 ); if ( !mArticle->hasContent() ) { - displayErrorMessage( i18n("The article tqcontains no data.") ); + displayErrorMessage( i18n("The article contains no data.") ); return; } @@ -410,12 +410,12 @@ void ArticleWidget::displayArticle() // signature, we show a nice header: TQPtrList pgpBlocks; TQStrList nonPgpBlocks; - bool tqcontainsPGP = Kpgp::Module::prepareMessageForDecryption( mArticle->body(), pgpBlocks, nonPgpBlocks ); + bool containsPGP = Kpgp::Module::prepareMessageForDecryption( mArticle->body(), pgpBlocks, nonPgpBlocks ); mViewer->write ( html ); html = TQString(); - if ( tqcontainsPGP ) { + if ( containsPGP ) { TQPtrListIterator pbit( pgpBlocks ); TQStrListIterator npbit( nonPgpBlocks ); TQTextCodec *codec; @@ -490,7 +490,7 @@ void ArticleWidget::displayArticle() } } else { - if ( !tqcontainsPGP ) { + if ( !containsPGP ) { TQStringList lines; text->decodedText( lines, true, cfgMgr->readNewsViewer()->removeTrailingNewlines() ); displayBodyBlock( lines ); @@ -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.find("430") != -1 || msg.find("423") != -1 ) ) { + ( msg.tqfind("430") != -1 || msg.tqfind("423") != -1 ) ) { KNRemoteArticle::List l; l.append( static_cast( mArticle ) ); knGlobals.articleManager()->setRead( l, true ); @@ -836,7 +836,7 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum ) TQString label = ct->name(); if ( label.isEmpty() ) label = i18n("unnamed" ); - // if label consists of only whitespace tqreplace them by underscores + // if label consists of only whitespace replace them by underscores if ( (uint)label.tqcontains( ' ' ) == label.length() ) label.tqreplace( TQRegExp( " ", true, true ), "_" ); label = toHtmlString( label, None ); @@ -882,7 +882,7 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum ) } else { // icon TQCString mimetype = ct->mimeType(); KPIM::kAsciiToLower( mimetype.data() ); - TQString iconName = KMimeType::mimeType( mimetype )->icon( TQString::null, false ); + TQString iconName = KMimeType::mimeType( mimetype )->icon( TQString(), false ); TQString iconFile = KGlobal::instance()->iconLoader()->iconPath( iconName, KIcon::Desktop ); html += "
" + label + @@ -928,7 +928,7 @@ int ArticleWidget::quotingDepth( const TQString &line, const TQString "eChar // skip spaces if ( line[i].isSpace() ) continue; - if ( quoteChars.find( line[i] ) != -1 ) + if ( quoteChars.tqfind( line[i] ) != -1 ) ++level; else break; @@ -972,7 +972,7 @@ void ArticleWidget::updateContents() TQString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int partNum ) { // more or less KMail code - KTempFile *tempFile = new KTempFile( TQString::null, "." + TQString::number( partNum ) ); + KTempFile *tempFile = new KTempFile( TQString(), "." + TQString::number( partNum ) ); tempFile->setAutoDelete( true ); TQString fname = tempFile->name(); delete tempFile; @@ -981,7 +981,7 @@ TQString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int part // Not there or not writable if( ::mkdir( TQFile::encodeName( fname ), 0 ) != 0 || ::chmod( TQFile::encodeName( fname ), S_IRWXU ) != 0 ) - return TQString::null; //failed create + return TQString(); //failed create Q_ASSERT( !fname.isNull() ); @@ -1000,7 +1000,7 @@ TQString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int part size_t size = data.size(); // ### KMail does crlf2lf conversion here before writing the file if( !KPIM::kBytesToFile( data.data(), size, fname, false, false, false ) ) - return TQString::null; + return TQString(); mTempFiles.append( fname ); // make file read-only so that nobody gets the impression that he might @@ -1167,7 +1167,7 @@ void ArticleWidget::slotURLClicked( const KURL &url, bool forceOpen) KMime::Content *c = mAttachments.at( partNum ); if ( !c ) return; - // TODO: tqreplace with message box as done in KMail + // TODO: replace 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->tqfindText(); + mViewer->findText(); } @@ -1408,8 +1408,8 @@ void ArticleWidget::slotCopyURL() address = mCurrentURL.path(); else address = mCurrentURL.url(); - TQApplication::clipboard()->setText( address, QClipboard::Clipboard ); - TQApplication::clipboard()->setText( address, QClipboard::Selection ); + TQApplication::clipboard()->setText( address, TQClipboard::Clipboard ); + TQApplication::clipboard()->setText( address, TQClipboard::Selection ); } void ArticleWidget::slotAddBookmark() -- cgit v1.2.1