summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 0fce722d3..a6b3c1d51 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -136,7 +136,7 @@ using KMail::TeeHtmlWriter;
#include <paths.h>
#endif
-class NewByteArray : public QByteArray
+class NewByteArray : public TQByteArray
{
public:
NewByteArray &appendNULL();
@@ -274,21 +274,21 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node,
DwHeaders * headers(
(part && part->hasHeaders())
? &part->Headers()
- : ( (weAreReplacingTheRootNode || !dataNode->parentNode())
+ : ( (weAreReplacingTheRootNode || !dataNode->tqparentNode())
? &rootHeaders
: 0 ) );
if( dataNode == curNode ) {
kdDebug(5006) << "dataNode == curNode: Save curNode without replacing it." << endl;
// A) Store the headers of this part IF curNode is not the root node
- // AND we are not replacing a node that already *has* tqreplaced
+ // AND we are not replacing a node that already *has* replaced
// the root node in previous recursion steps of this function...
if( headers ) {
- if( dataNode->parentNode() && !weAreReplacingTheRootNode ) {
+ if( dataNode->tqparentNode() && !weAreReplacingTheRootNode ) {
kdDebug(5006) << "dataNode is NOT replacing the root node: Store the headers." << endl;
resultingData += headers->AsString().c_str();
} else if( weAreReplacingTheRootNode && part && part->hasHeaders() ){
-kdDebug(5006) << "dataNode tqreplace the root node: Do NOT store the headers but change" << endl;
+kdDebug(5006) << "dataNode replace the root node: Do NOT store the headers but change" << endl;
kdDebug(5006) << " the Message's headers accordingly." << endl;
kdDebug(5006) << " old Content-Type = " << rootHeaders.ContentType().AsString().c_str() << endl;
kdDebug(5006) << " new Content-Type = " << headers->ContentType( ).AsString().c_str() << endl;
@@ -309,10 +309,10 @@ kdDebug(5006) << " new Content-Type = " << headers->ContentType(
// B) Store the body of this part.
if( headers && bIsMultipart && dataNode->firstChild() ) {
-kdDebug(5006) << "is valid Multipart, processing children:" << endl;
+kdDebug(5006) << "is valid Multipart, processing tqchildren:" << endl;
TQCString boundary = headers->ContentType().Boundary().c_str();
curNode = dataNode->firstChild();
- // store children of multipart
+ // store tqchildren of multipart
while( curNode ) {
kdDebug(5006) << "--boundary" << endl;
if( resultingData.size() &&
@@ -323,7 +323,7 @@ kdDebug(5006) << "--boundary" << endl;
resultingData += boundary;
resultingData += "\n";
// note: We are processing a harmless multipart that is *not*
- // to be tqreplaced by one of it's children, therefor
+ // to be replaced by one of it's tqchildren, therefor
// we set their doStoreHeaders to true.
objectTreeToDecryptedMsg( curNode,
resultingData,
@@ -336,7 +336,7 @@ kdDebug(5006) << "--boundary--" << endl;
resultingData += "\n--";
resultingData += boundary;
resultingData += "--\n\n";
-kdDebug(5006) << "Multipart processing children - DONE" << endl;
+kdDebug(5006) << "Multipart processing tqchildren - DONE" << endl;
} else if( part ){
// store simple part
kdDebug(5006) << "is Simple part or invalid Multipart, storing body data .. DONE" << endl;
@@ -345,13 +345,13 @@ kdDebug(5006) << "is Simple part or invalid Multipart, storing body data .. DONE
}
} else {
kdDebug(5006) << "dataNode != curNode: Replace curNode by dataNode." << endl;
- bool rootNodeReplaceFlag = weAreReplacingTheRootNode || !curNode->parentNode();
+ bool rootNodeReplaceFlag = weAreReplacingTheRootNode || !curNode->tqparentNode();
if( rootNodeReplaceFlag ) {
-kdDebug(5006) << " Root node will be tqreplaced." << endl;
+kdDebug(5006) << " Root node will be replaced." << endl;
} else {
-kdDebug(5006) << " Root node will NOT be tqreplaced." << endl;
+kdDebug(5006) << " Root node will NOT be replaced." << endl;
}
- // store special data to tqreplace the current part
+ // store special data to replace the current part
// (e.g. decrypted data or embedded RfC 822 data)
objectTreeToDecryptedMsg( dataNode,
resultingData,
@@ -386,7 +386,7 @@ kdDebug(5006) << " Root node will NOT be tqreplaced." << en
void KMReaderWin::createWidgets() {
TQVBoxLayout * vlay = new TQVBoxLayout( this );
- mSplitter = new TQSplitter( Qt::Vertical, this, "mSplitter" );
+ mSplitter = new TQSplitter( TQt::Vertical, this, "mSplitter" );
vlay->addWidget( mSplitter );
mMimePartTree = new KMMimePartTree( this, mSplitter, "mMimePartTree" );
mBox = new TQHBox( mSplitter, "mBox" );
@@ -406,7 +406,7 @@ KMReaderWin::KMReaderWin(TQWidget *aParent,
KActionCollection* actionCollection,
const char *aName,
int aFlags )
- : TQWidget(aParent, aName, aFlags | Qt::WDestructiveClose),
+ : TQWidget(aParent, aName, aFlags | TQt::WDestructiveClose),
mSerNumOfOriginalMessage( 0 ),
mNodeIdOffset( -1 ),
mAttachmentStrategy( 0 ),
@@ -1002,7 +1002,7 @@ void KMReaderWin::initHtmlWidget(void)
if ( !htmlWriter() )
#ifdef KMAIL_READER_HTML_DEBUG
- mHtmlWriter = new TeeHtmlWriter( new FileHtmlWriter( TQString::null ),
+ mHtmlWriter = new TeeHtmlWriter( new FileHtmlWriter( TQString() ),
new KHtmlPartHtmlWriter( mViewer, 0 ) );
#else
mHtmlWriter = new KHtmlPartHtmlWriter( mViewer, 0 );
@@ -1033,7 +1033,7 @@ void KMReaderWin::contacStatusChanged( const TQString &uid)
kdDebug( 5006 ) << "name is " << n.nodeName().string() << endl;
kdDebug( 5006 ) << "value of content was " << n.firstChild().nodeValue().string() << endl;
TQString newPresence = kmkernel->imProxy()->presenceString( uid );
- if ( newPresence.isNull() ) // KHTML crashes if you setNodeValue( TQString::null )
+ if ( newPresence.isNull() ) // KHTML crashes if you setNodeValue( TQString() )
newPresence = TQString::tqfromLatin1( "ENOIMRUNNING" );
n.firstChild().setNodeValue( newPresence );
// kdDebug( 5006 ) << "value of content is now " << n.firstChild().nodeValue().string() << endl;
@@ -1088,7 +1088,7 @@ void KMReaderWin::setOverrideEncoding( const TQString & encoding )
kdWarning(5006) << "Unknown override character encoding \"" << encoding
<< "\". Using Auto instead." << endl;
mSelectEncodingAction->setCurrentItem( 0 );
- mOverrideEncoding = TQString::null;
+ mOverrideEncoding = TQString();
}
}
}
@@ -1364,7 +1364,7 @@ void KMReaderWin::displayAboutPage()
"an incoming as well as outgoing mail account."
"</p>\n") );
} else {
- info = info.arg( TQString::null );
+ info = info.arg( TQString() );
}
if ( ( numKMailChanges > 1 ) || ( numKMailChanges == 1 && strlen(kmailChanges[0]) > 0 ) ) {
@@ -1465,7 +1465,7 @@ void KMReaderWin::displayMessage() {
htmlWriter()->begin( mCSSHelper->cssDefinitions( isFixedFont() ) );
htmlWriter()->queue( mCSSHelper->htmlHead( isFixedFont() ) );
- if (!parent())
+ if (!tqparent())
setCaption(msg->subject());
removeTempFiles();
@@ -1592,7 +1592,7 @@ void KMReaderWin::parseMsg(KMMessage* aMsg)
kdDebug(5006) << "\n\n\nKMReaderWin::parseMsg() - special post-encryption handling:\n1." << endl;
kdDebug(5006) << "(aMsg == msg) = " << (aMsg == message()) << endl;
-kdDebug(5006) << "aMsg->parent() && aMsg->parent() != kmkernel->outboxFolder() = " << (aMsg->parent() && aMsg->parent() != kmkernel->outboxFolder()) << endl;
+kdDebug(5006) << "aMsg->tqparent() && aMsg->tqparent() != kmkernel->outboxFolder() = " << (aMsg->tqparent() && aMsg->tqparent() != kmkernel->outboxFolder()) << endl;
kdDebug(5006) << "message_was_saved_decrypted_before( aMsg ) = " << message_was_saved_decrypted_before( aMsg ) << endl;
kdDebug(5006) << "this->decryptMessage() = " << decryptMessage() << endl;
kdDebug(5006) << "otp.hasPendingAsyncJobs() = " << otp.hasPendingAsyncJobs() << endl;
@@ -1602,7 +1602,7 @@ kdDebug(5006) << "|| (KMMsgPartiallyEncrypted == encryptionState) = " << (KMMsgP
// double click on the message (==not running in a separate window)
if( (aMsg == message())
// don't remove encryption in the outbox folder :)
- && ( aMsg->parent() && aMsg->parent() != kmkernel->outboxFolder() )
+ && ( aMsg->tqparent() && aMsg->tqparent() != kmkernel->outboxFolder() )
// only proceed if this message was not saved encryptedly before
&& !message_was_saved_decrypted_before( aMsg )
// only proceed if the message has actually been decrypted
@@ -1653,7 +1653,7 @@ kdDebug(5006) << "KMReaderWin - composing unencrypted message" << endl;
if( emitReplaceMsgByUnencryptedVersion ) {
kdDebug(5006) << "KMReaderWin - invoce saving in decrypted form:" << endl;
- emit tqreplaceMsgByUnencryptedVersion();
+ emit replaceMsgByUnencryptedVersion();
} else {
kdDebug(5006) << "KMReaderWin - finished parsing and displaying of message." << endl;
showHideMimeTree( rootNodeCntType == DwMime::kTypeText &&
@@ -1708,7 +1708,7 @@ TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
size = KMail::Util::crlf2lf( data.data(), size );
}
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
@@ -1720,7 +1720,7 @@ TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
TQString KMReaderWin::createTempDir( const TQString &param )
{
- KTempFile *tempFile = new KTempFile( TQString::null, "." + param );
+ KTempFile *tempFile = new KTempFile( TQString(), "." + param );
tempFile->setAutoDelete( true );
TQString fname = tempFile->name();
delete tempFile;
@@ -1729,7 +1729,7 @@ TQString KMReaderWin::createTempDir( const TQString &param )
// 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
assert( !fname.isNull() );
@@ -1814,7 +1814,7 @@ void KMReaderWin::slotTouchMessage()
message()->encryptionState() != KMMsgEncryptionStateUnknown )
return;
- KMFolder *folder = message()->parent();
+ KMFolder *folder = message()->tqparent();
if (folder &&
(folder->isOutbox() || folder->isSent() || folder->isTrash() ||
folder->isDrafts() || folder->isTemplates() ) )
@@ -1845,15 +1845,15 @@ bool foundSMIMEData( const TQString aUrl,
displayName = "";
libName = "";
keyId = "";
- int i1 = aUrl.find( showCertMan );
+ int i1 = aUrl.tqfind( showCertMan );
if( -1 < i1 ) {
i1 += showCertMan.length();
- int i2 = aUrl.find(" ### ", i1);
+ int i2 = aUrl.tqfind(" ### ", i1);
if( i1 < i2 )
{
displayName = aUrl.mid( i1, i2-i1 );
i1 = i2+5;
- i2 = aUrl.find(" ### ", i1);
+ i2 = aUrl.tqfind(" ### ", i1);
if( i1 < i2 )
{
libName = aUrl.mid( i1, i2-i1 );
@@ -1892,7 +1892,7 @@ void KMReaderWin::slotUrlOn(const TQString &aUrl)
}
if ( aUrl.stripWhiteSpace().isEmpty() ) {
- KPIM::BroadcasStatus::instance()->reset();
+ KPIM::BroadcastqStatus::instance()->reset();
mHoveredUrl = KURL();
mLastClickImagePath = TQString();
return;
@@ -1903,7 +1903,7 @@ void KMReaderWin::slotUrlOn(const TQString &aUrl)
const TQString msg = URLHandlerManager::instance()->statusBarMessage( url, this );
kdWarning( msg.isEmpty(), 5006 ) << "KMReaderWin::slotUrlOn(): Unhandled URL hover!" << endl;
- KPIM::BroadcasStatus::instance()->setTransienStatusMsg( msg );
+ KPIM::BroadcastqStatus::instance()->setTransienStatusMsg( msg );
}
@@ -1916,7 +1916,7 @@ void KMReaderWin::slotUrlOpen(const KURL &aUrl, const KParts::URLArgs &)
return;
kdWarning( 5006 ) << "KMReaderWin::slotOpenUrl(): Unhandled URL click!" << endl;
- emit urlClicked( aUrl, Qt::LeftButton );
+ emit urlClicked( aUrl, TQt::LeftButton );
}
//-----------------------------------------------------------------------------
@@ -1940,7 +1940,7 @@ void KMReaderWin::slotUrlPopup(const TQString &aUrl, const TQPoint& aPos)
}
}
-// Checks if the given node has a parent node that is a DIV which has an ID attribute
+// Checks if the given node has a tqparent node that is a DIV which has an ID attribute
// with the value specified here
static bool hasParentDivWithId( const DOM::Node &start, const TQString &id )
{
@@ -1955,8 +1955,8 @@ static bool hasParentDivWithId( const DOM::Node &start, const TQString &id )
}
}
- if ( !start.parentNode().isNull() )
- return hasParentDivWithId( start.parentNode(), id );
+ if ( !start.tqparentNode().isNull() )
+ return hasParentDivWithId( start.tqparentNode(), id );
else return false;
}
@@ -1971,7 +1971,7 @@ void KMReaderWin::showAttachmentPopup( int id, const TQString & name, const TQPo
menu->insertItem(i18n("to view something", "View"), 3);
menu->insertItem(SmallIcon("filesaveas"),i18n("Save As..."), 4);
menu->insertItem(SmallIcon("editcopy"), i18n("Copy"), 9 );
- const bool canChange = message()->parent() ? !message()->parent()->isReadOnly() : false;
+ const bool canChange = message()->tqparent() ? !message()->tqparent()->isReadOnly() : false;
if ( GlobalSettings::self()->allowAttachmentEditing() && canChange )
menu->insertItem(SmallIcon("edit"), i18n("Edit Attachment"), 8 );
if ( GlobalSettings::self()->allowAttachmentDeletion() && canChange )
@@ -2041,7 +2041,7 @@ void KMReaderWin::slotHandleAttachment( int choice )
if (!url.isValid() ) return;
urls.append( url );
KURLDrag* drag = new KURLDrag( urls, this );
- TQApplication::clipboard()->setData( drag, QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( drag, TQClipboard::Clipboard );
} else if ( choice == 10 ) { // Scroll To
scrollToAttachment( node );
}
@@ -2050,13 +2050,13 @@ void KMReaderWin::slotHandleAttachment( int choice )
//-----------------------------------------------------------------------------
void KMReaderWin::slotFind()
{
- mViewer->tqfindText();
+ mViewer->findText();
}
//-----------------------------------------------------------------------------
void KMReaderWin::slotFindNext()
{
- mViewer->tqfindTextNext();
+ mViewer->findTextNext();
}
//-----------------------------------------------------------------------------
@@ -2084,7 +2084,7 @@ void KMReaderWin::atmViewMsg( KMMessagePart* aMsgPart, int nodeId )
assert(msg != 0);
msg->setMsgSerNum( 0 ); // because lookups will fail
// some information that is needed for imap messages with LOD
- msg->setParent( message()->parent() );
+ msg->setParent( message()->tqparent() );
msg->setUID(message()->UID());
msg->setReadyToShow(true);
KMReaderMainWin *win = new KMReaderMainWin();
@@ -2138,7 +2138,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
ObjectTreeParser otp( this );
otp.writeBodyStr( str,
overrideCodec() ? overrideCodec() : aMsgPart->codec(),
- message() ? message()->from() : TQString::null );
+ message() ? message()->from() : TQString() );
}
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
@@ -2190,8 +2190,8 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
// A TQString cannot handle binary data. So if it's shorter than the
// attachment, we assume the attachment is binary:
if( str.length() < (unsigned) aMsgPart->decodedSize() ) {
- str.prepend( i18n("[KMail: Attachment tqcontains binary data. Trying to show first character.]",
- "[KMail: Attachment tqcontains binary data. Trying to show first %n characters.]",
+ str.prepend( i18n("[KMail: Attachment contains binary data. Trying to show first character.]",
+ "[KMail: Attachment contains binary data. Trying to show first %n characters.]",
str.length()) + TQChar('\n') );
}
htmlWriter()->queue( TQStyleSheet::escape( str ) );
@@ -2270,13 +2270,13 @@ void KMReaderWin::openAttachment( int id, const TQString & name )
mimetype = KMimeType::mimeType( TQString::tqfromLatin1( contentTypeStr ) );
if ( mimetype->name() == "application/octet-stream" ) {
// consider the filename if Content-Type is application/octet-stream
- mimetype = KMimeType::tqfindByPath( name, 0, true /* no disk access */ );
+ mimetype = KMimeType::findByPath( name, 0, true /* no disk access */ );
}
if ( ( mimetype->name() == "application/octet-stream" )
&& msgPart.isComplete() ) {
// consider the attachment's contents if neither the Content-Type header
// nor the filename give us a clue
- mimetype = KMimeType::tqfindByFileContent( name );
+ mimetype = KMimeType::findByFileContent( name );
}
KService::Ptr offer =
@@ -2476,8 +2476,8 @@ void KMReaderWin::slotUrlClicked()
{
KMMainWidget *mainWidget = dynamic_cast<KMMainWidget*>(mMainWindow);
uint identity = 0;
- if ( message() && message()->parent() ) {
- identity = message()->parent()->identity();
+ if ( message() && message()->tqparent() ) {
+ identity = message()->tqparent()->identity();
}
KMCommand *command = new KMUrlClickedCommand( mClickedUrl, identity, this,
@@ -2636,8 +2636,8 @@ static TQString linkForNode( const DOM::Node &node )
return href.nodeValue().string();
}
}
- if ( !node.parentNode().isNull() ) {
- return linkForNode( node.parentNode() );
+ if ( !node.tqparentNode().isNull() ) {
+ return linkForNode( node.tqparentNode() );
} else {
return TQString();
}
@@ -2905,7 +2905,7 @@ static TQColor nextColor( const TQColor & c )
{
int h, s, v;
c.hsv( &h, &s, &v );
- return TQColor( (h + 50) % 360, QMAX(s, 64), v, TQColor::Hsv );
+ return TQColor( (h + 50) % 360, TQMAX(s, 64), v, TQColor::Hsv );
}
TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor )
@@ -3000,7 +3000,7 @@ void KMReaderWin::setBodyPartMemento( const partNode * node, const TQCString & w
BodyPartMemento * KMReaderWin::bodyPartMemento( const partNode * node, const TQCString & which ) const
{
const TQCString index = node->path() + ':' + which.lower();
- const std::map<TQCString,BodyPartMemento*>::const_iterator it = mBodyPartMementoMap.find( index );
+ const std::map<TQCString,BodyPartMemento*>::const_iterator it = mBodyPartMementoMap.tqfind( index );
if ( it == mBodyPartMementoMap.end() ) {
return 0;
}