summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp200
1 files changed, 100 insertions, 100 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index a6b3c1d51..5b80dc0ab 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -150,7 +150,7 @@ NewByteArray& NewByteArray::appendNULL()
{
TQByteArray::detach();
uint len1 = size();
- if ( !TQByteArray::resize( len1 + 1 ) )
+ if ( !TQByteArray::tqresize( len1 + 1 ) )
return *this;
*(data() + len1) = '\0';
return *this;
@@ -162,7 +162,7 @@ NewByteArray& NewByteArray::operator+=( const char * newData )
TQByteArray::detach();
uint len1 = size();
uint len2 = tqstrlen( newData );
- if ( !TQByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::tqresize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData, len2 );
return *this;
@@ -174,7 +174,7 @@ NewByteArray& NewByteArray::operator+=( const TQByteArray & newData )
TQByteArray::detach();
uint len1 = size();
uint len2 = newData.size();
- if ( !TQByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::tqresize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData.data(), len2 );
return *this;
@@ -186,7 +186,7 @@ NewByteArray& NewByteArray::operator+=( const TQCString & newData )
TQByteArray::detach();
uint len1 = size();
uint len2 = newData.length(); // forget about the trailing 0x00 !
- if ( !TQByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::tqresize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData.data(), len2 );
return *this;
@@ -207,7 +207,7 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node,
int recCount )
{
kdDebug(5006) << TQString("-------------------------------------------------" ) << endl;
- kdDebug(5006) << TQString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").arg( recCount ) << endl;
+ kdDebug(5006) << TQString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").tqarg( recCount ) << endl;
if( node ) {
kdDebug(5006) << node->typeString() << '/' << node->subTypeString() << endl;
@@ -360,7 +360,7 @@ kdDebug(5006) << " Root node will NOT be replaced." << endl
recCount + 1 );
}
}
- kdDebug(5006) << TQString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").arg( recCount ) << endl;
+ kdDebug(5006) << TQString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").tqarg( recCount ) << endl;
}
@@ -386,7 +386,7 @@ kdDebug(5006) << " Root node will NOT be replaced." << endl
void KMReaderWin::createWidgets() {
TQVBoxLayout * vlay = new TQVBoxLayout( this );
- mSplitter = new TQSplitter( TQt::Vertical, this, "mSplitter" );
+ mSplitter = new TQSplitter( Qt::Vertical, this, "mSplitter" );
vlay->addWidget( mSplitter );
mMimePartTree = new KMMimePartTree( this, mSplitter, "mMimePartTree" );
mBox = new TQHBox( mSplitter, "mBox" );
@@ -467,11 +467,11 @@ KMReaderWin::KMReaderWin(TQWidget *aParent,
mLevelQuote = GlobalSettings::self()->collapseQuoteLevelSpin() - 1;
connect( &mUpdateReaderWinTimer, TQT_SIGNAL(timeout()),
- this, TQT_SLOT(updateReaderWin()) );
+ TQT_TQOBJECT(this), TQT_SLOT(updateReaderWin()) );
connect( &mResizeTimer, TQT_SIGNAL(timeout()),
- this, TQT_SLOT(slotDelayedResize()) );
+ TQT_TQOBJECT(this), TQT_SLOT(slotDelayedResize()) );
connect( &mDelayedMarkTimer, TQT_SIGNAL(timeout()),
- this, TQT_SLOT(slotTouchMessage()) );
+ TQT_TQOBJECT(this), TQT_SLOT(slotTouchMessage()) );
}
@@ -487,45 +487,45 @@ void KMReaderWin::createActions( KActionCollection * ac ) {
headerMenu->setToolTip( i18n("Choose display style of message headers") );
connect( headerMenu, TQT_SIGNAL(activated()),
- this, TQT_SLOT(slotCycleHeaderStyles()) );
+ TQT_TQOBJECT(this), TQT_SLOT(slotCycleHeaderStyles()) );
raction = new KRadioAction( i18n("View->headers->", "&Enterprise Headers"), 0,
- this, TQT_SLOT(slotEnterpriseHeaders()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotEnterpriseHeaders()),
ac, "view_headers_enterprise" );
raction->setToolTip( i18n("Show the list of headers in Enterprise style") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert(raction);
raction = new KRadioAction( i18n("View->headers->", "&Fancy Headers"), 0,
- this, TQT_SLOT(slotFancyHeaders()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotFancyHeaders()),
ac, "view_headers_fancy" );
raction->setToolTip( i18n("Show the list of headers in a fancy format") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&Brief Headers"), 0,
- this, TQT_SLOT(slotBriefHeaders()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotBriefHeaders()),
ac, "view_headers_brief" );
raction->setToolTip( i18n("Show brief list of message headers") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&Standard Headers"), 0,
- this, TQT_SLOT(slotStandardHeaders()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotStandardHeaders()),
ac, "view_headers_standard" );
raction->setToolTip( i18n("Show standard list of message headers") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&Long Headers"), 0,
- this, TQT_SLOT(slotLongHeaders()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotLongHeaders()),
ac, "view_headers_long" );
raction->setToolTip( i18n("Show long list of message headers") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&All Headers"), 0,
- this, TQT_SLOT(slotAllHeaders()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotAllHeaders()),
ac, "view_headers_all" );
raction->setToolTip( i18n("Show all message headers") );
raction->setExclusiveGroup( "view_headers_group" );
@@ -536,38 +536,38 @@ void KMReaderWin::createActions( KActionCollection * ac ) {
new KActionMenu( i18n("View->", "&Attachments"), ac, "view_attachments" );
attachmentMenu->setToolTip( i18n("Choose display style of attachments") );
connect( attachmentMenu, TQT_SIGNAL(activated()),
- this, TQT_SLOT(slotCycleAttachmentStrategy()) );
+ TQT_TQOBJECT(this), TQT_SLOT(slotCycleAttachmentStrategy()) );
raction = new KRadioAction( i18n("View->attachments->", "&As Icons"), 0,
- this, TQT_SLOT(slotIconicAttachments()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotIconicAttachments()),
ac, "view_attachments_as_icons" );
raction->setToolTip( i18n("Show all attachments as icons. Click to see them.") );
raction->setExclusiveGroup( "view_attachments_group" );
attachmentMenu->insert( raction );
raction = new KRadioAction( i18n("View->attachments->", "&Smart"), 0,
- this, TQT_SLOT(slotSmartAttachments()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotSmartAttachments()),
ac, "view_attachments_smart" );
raction->setToolTip( i18n("Show attachments as suggested by sender.") );
raction->setExclusiveGroup( "view_attachments_group" );
attachmentMenu->insert( raction );
raction = new KRadioAction( i18n("View->attachments->", "&Inline"), 0,
- this, TQT_SLOT(slotInlineAttachments()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotInlineAttachments()),
ac, "view_attachments_inline" );
raction->setToolTip( i18n("Show all attachments inline (if possible)") );
raction->setExclusiveGroup( "view_attachments_group" );
attachmentMenu->insert( raction );
raction = new KRadioAction( i18n("View->attachments->", "&Hide"), 0,
- this, TQT_SLOT(slotHideAttachments()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotHideAttachments()),
ac, "view_attachments_hide" );
raction->setToolTip( i18n("Do not show attachments in the message viewer") );
raction->setExclusiveGroup( "view_attachments_group" );
attachmentMenu->insert( raction );
mHeaderOnlyAttachmentsAction = new KRadioAction( i18n( "View->attachments->", "In Header &Only" ), 0,
- this, TQT_SLOT( slotHeaderOnlyAttachments() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotHeaderOnlyAttachments() ),
ac, "view_attachments_headeronly" );
mHeaderOnlyAttachmentsAction->setToolTip( i18n( "Show Attachments only in the header of the mail" ) );
mHeaderOnlyAttachmentsAction->setExclusiveGroup( "view_attachments_group" );
@@ -575,7 +575,7 @@ void KMReaderWin::createActions( KActionCollection * ac ) {
// Set Encoding submenu
mSelectEncodingAction = new KSelectAction( i18n( "&Set Encoding" ), "charset", 0,
- this, TQT_SLOT( slotSetEncoding() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotSetEncoding() ),
ac, "encoding" );
TQStringList encodings = KMMsgBase::supportedEncodings( false );
encodings.prepend( i18n( "Auto" ) );
@@ -583,39 +583,39 @@ void KMReaderWin::createActions( KActionCollection * ac ) {
mSelectEncodingAction->setCurrentItem( 0 );
mMailToComposeAction = new KAction( i18n("New Message To..."), "mail_new",
- 0, this, TQT_SLOT(slotMailtoCompose()), ac,
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotMailtoCompose()), ac,
"mailto_compose" );
mMailToReplyAction = new KAction( i18n("Reply To..."), "mail_reply",
- 0, this, TQT_SLOT(slotMailtoReply()), ac,
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotMailtoReply()), ac,
"mailto_reply" );
mMailToForwardAction = new KAction( i18n("Forward To..."), "mail_forward",
- 0, this, TQT_SLOT(slotMailtoForward()), ac,
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotMailtoForward()), ac,
"mailto_forward" );
mAddAddrBookAction = new KAction( i18n("Add to Address Book"),
- 0, this, TQT_SLOT(slotMailtoAddAddrBook()),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotMailtoAddAddrBook()),
ac, "add_addr_book" );
mOpenAddrBookAction = new KAction( i18n("Open in Address Book"),
- 0, this, TQT_SLOT(slotMailtoOpenAddrBook()),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotMailtoOpenAddrBook()),
ac, "openin_addr_book" );
- mCopyAction = KStdAction::copy( this, TQT_SLOT(slotCopySelectedText()), ac, "kmail_copy");
- mSelectAllAction = new KAction( i18n("Select All Text"), CTRL+SHIFT+Key_A, this,
+ mCopyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopySelectedText()), ac, "kmail_copy");
+ mSelectAllAction = new KAction( i18n("Select All Text"), CTRL+SHIFT+Key_A, TQT_TQOBJECT(this),
TQT_SLOT(selectAll()), ac, "mark_all_text" );
- mCopyURLAction = new KAction( i18n("Copy Link Address"), 0, this,
+ mCopyURLAction = new KAction( i18n("Copy Link Address"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotUrlCopy()), ac, "copy_url" );
- mUrlOpenAction = new KAction( i18n("Open URL"), 0, this,
+ mUrlOpenAction = new KAction( i18n("Open URL"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotUrlOpen()), ac, "open_url" );
mAddBookmarksAction = new KAction( i18n("Bookmark This Link"),
"bookmark_add",
- 0, this, TQT_SLOT(slotAddBookmarks()),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddBookmarks()),
ac, "add_bookmarks" );
- mUrlSaveAsAction = new KAction( i18n("Save Link As..."), 0, this,
+ mUrlSaveAsAction = new KAction( i18n("Save Link As..."), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotUrlSave()), ac, "saveas_url" );
mToggleFixFontAction = new KToggleAction( i18n("Use Fi&xed Font"),
- Key_X, this, TQT_SLOT(slotToggleFixedFont()),
+ Key_X, TQT_TQOBJECT(this), TQT_SLOT(slotToggleFixedFont()),
ac, "toggle_fixedfont" );
- mStartIMChatAction = new KAction( i18n("Chat &With..."), 0, this,
+ mStartIMChatAction = new KAction( i18n("Chat &With..."), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotIMChat()), ac, "start_im_chat" );
}
@@ -988,7 +988,7 @@ void KMReaderWin::writeConfig( bool sync ) const {
//-----------------------------------------------------------------------------
void KMReaderWin::initHtmlWidget(void)
{
- mViewer->widget()->setFocusPolicy(WheelFocus);
+ mViewer->widget()->setFocusPolicy(Qt::WheelFocus);
// Let's better be paranoid and disable plugins (it defaults to enabled):
mViewer->setPluginsEnabled(false);
mViewer->setJScriptEnabled(false); // just make this explicit
@@ -1017,9 +1017,9 @@ void KMReaderWin::initHtmlWidget(void)
connect(mViewer,TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)),
TQT_SLOT(slotUrlPopup(const TQString &, const TQPoint &)));
connect( kmkernel->imProxy(), TQT_SIGNAL( sigContactPresenceChanged( const TQString & ) ),
- this, TQT_SLOT( contacStatusChanged( const TQString & ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( contacStatusChanged( const TQString & ) ) );
connect( kmkernel->imProxy(), TQT_SIGNAL( sigPresenceInfoExpired() ),
- this, TQT_SLOT( updateReaderWin() ) );
+ TQT_TQOBJECT(this), TQT_SLOT( updateReaderWin() ) );
}
void KMReaderWin::contacStatusChanged( const TQString &uid)
@@ -1285,11 +1285,11 @@ void KMReaderWin::displaySplashPage( const TQString &info )
TQString location = locate("data", "kmail/about/main.html");
TQString content = KPIM::kFileToString(location);
- content = content.arg( locate( "data", "libkdepim/about/kde_infopage.css" ) );
+ content = content.tqarg( locate( "data", "libkdepim/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
- content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libkdepim/about/kde_infopage_rtl.css" ) );
+ content = content.tqarg( "@import \"%1\";" ).tqarg( locate( "data", "libkdepim/about/kde_infopage_rtl.css" ) );
else
- content = content.arg( "" );
+ content = content.tqarg( "" );
mViewer->begin(KURL( location ));
@@ -1297,7 +1297,7 @@ void KMReaderWin::displaySplashPage( const TQString &info )
TQString appTitle = i18n("KMail");
TQString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
TQString quickDescription = i18n("The email client for the K Desktop Environment.");
- mViewer->write(content.arg(fontSize).arg(appTitle).arg(catchPhrase).arg(quickDescription).arg(info));
+ mViewer->write(content.tqarg(fontSize).tqarg(appTitle).tqarg(catchPhrase).tqarg(quickDescription).tqarg(info));
mViewer->end();
}
@@ -1345,41 +1345,41 @@ void KMReaderWin::displayAboutPage()
"<p>We hope that you will enjoy KMail.</p>\n"
"<p>Thank you,</p>\n"
"<p style='margin-bottom: 0px'>&nbsp; &nbsp; The KMail Team</p>")
- .arg(KMAIL_VERSION) // KMail version
- .arg("help:/kmail/index.html") // KMail help:// URL
- .arg("http://kontact.kde.org/kmail/") // KMail homepage URL
- .arg("1.8").arg("3.4"); // prior KMail and KDE version
+ .tqarg(KMAIL_VERSION) // KMail version
+ .tqarg("help:/kmail/index.html") // KMail help:// URL
+ .tqarg("http://kontact.kde.org/kmail/") // KMail homepage URL
+ .tqarg("1.8").tqarg("3.4"); // prior KMail and KDE version
TQString featureItems;
for ( int i = 0 ; i < numKMailNewFeatures ; i++ )
- featureItems += i18n("<li>%1</li>\n").arg( i18n( kmailNewFeatures[i] ) );
+ featureItems += i18n("<li>%1</li>\n").tqarg( i18n( kmailNewFeatures[i] ) );
- info = info.arg( featureItems );
+ info = info.tqarg( featureItems );
if( kmkernel->firstStart() ) {
- info = info.arg( i18n("<p>Please take a moment to fill in the KMail "
+ info = info.tqarg( i18n("<p>Please take a moment to fill in the KMail "
"configuration panel at Settings-&gt;Configure "
"KMail.\n"
"You need to create at least a default identity and "
"an incoming as well as outgoing mail account."
"</p>\n") );
} else {
- info = info.arg( TQString() );
+ info = info.tqarg( TQString() );
}
if ( ( numKMailChanges > 1 ) || ( numKMailChanges == 1 && strlen(kmailChanges[0]) > 0 ) ) {
TQString changesText =
i18n("<p><span style='font-size:125%; font-weight:bold;'>"
"Important changes</span> (compared to KMail %1):</p>\n")
- .arg("1.8");
+ .tqarg("1.8");
changesText += "<ul>\n";
for ( int i = 0 ; i < numKMailChanges ; i++ )
- changesText += i18n("<li>%1</li>\n").arg( i18n( kmailChanges[i] ) );
+ changesText += i18n("<li>%1</li>\n").tqarg( i18n( kmailChanges[i] ) );
changesText += "</ul>\n";
- info = info.arg( changesText );
+ info = info.tqarg( changesText );
}
else
- info = info.arg(""); // remove the %8
+ info = info.tqarg(""); // remove the %8
displaySplashPage( info );
}
@@ -1480,7 +1480,7 @@ void KMReaderWin::displayMessage() {
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
- TQTimer::singleShot( 1, this, TQT_SLOT(injectAttachments()) );
+ TQTimer::singleShot( 1, TQT_TQOBJECT(this), TQT_SLOT(injectAttachments()) );
}
static bool message_was_saved_decrypted_before( const KMMessage * msg ) {
@@ -1694,7 +1694,7 @@ TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
return TQString();
// strip off a leading path
- int slashPos = fileName.findRev( '/' );
+ int slashPos = fileName.tqfindRev( '/' );
if( -1 != slashPos )
fileName = fileName.mid( slashPos + 1 );
if( fileName.isEmpty() )
@@ -1764,8 +1764,8 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl)
if (!aUrl.isLocalFile()) return -1;
TQString path = aUrl.path();
- uint right = path.findRev('/');
- uint left = path.findRev('.', right);
+ uint right = path.tqfindRev('/');
+ uint left = path.tqfindRev('.', right);
bool ok;
int res = path.mid(left + 1, right - left - 1).toInt(&ok);
@@ -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, TQt::LeftButton );
+ emit urlClicked( aUrl, Qt::LeftButton );
}
//-----------------------------------------------------------------------------
@@ -1955,8 +1955,8 @@ static bool hasParentDivWithId( const DOM::Node &start, const TQString &id )
}
}
- if ( !start.tqparentNode().isNull() )
- return hasParentDivWithId( start.tqparentNode(), id );
+ if ( !start.parentNode().isNull() )
+ return hasParentDivWithId( start.parentNode(), id );
else return false;
}
@@ -1976,7 +1976,7 @@ void KMReaderWin::showAttachmentPopup( int id, const TQString & name, const TQPo
menu->insertItem(SmallIcon("edit"), i18n("Edit Attachment"), 8 );
if ( GlobalSettings::self()->allowAttachmentDeletion() && canChange )
menu->insertItem(SmallIcon("editdelete"), i18n("Delete Attachment"), 7 );
- if ( name.endsWith( ".xia", false ) &&
+ if ( name.tqendsWith( ".xia", false ) &&
Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ) )
menu->insertItem( i18n( "Decrypt With Chiasmus..." ), 6 );
menu->insertItem(i18n("Properties"), 5);
@@ -1987,7 +1987,7 @@ void KMReaderWin::showAttachmentPopup( int id, const TQString & name, const TQPo
menu->insertItem( i18n("Scroll To"), 10 );
}
- connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotHandleAttachment(int)));
+ connect(menu, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotHandleAttachment(int)));
menu->exec( p ,0 );
delete menu;
}
@@ -1999,10 +1999,10 @@ void KMReaderWin::setStyleDependantFrameWidth()
return;
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
- if( style().isA("KeramikStyle") )
- frameWidth = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
+ if( tqstyle().isA("KeramikStyle") )
+ frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth );
+ frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != mBox->lineWidth() )
@@ -2028,7 +2028,7 @@ void KMReaderWin::slotHandleAttachment( int choice )
node, message(), mAtmCurrent, mAtmCurrentName,
KMHandleAttachmentCommand::AttachmentAction( choice ), 0, this );
connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ),
- this, TQT_SLOT( slotAtmView( int, const TQString& ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( slotAtmView( int, const TQString& ) ) );
command->start();
} else if ( choice == 7 ) {
slotDeleteAttachment( node );
@@ -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, TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard );
} else if ( choice == 10 ) { // Scroll To
scrollToAttachment( node );
}
@@ -2142,7 +2142,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
}
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
- mMainWindow->setCaption(i18n("View Attachment: %1").arg(pname));
+ mMainWindow->setCaption(i18n("View Attachment: %1").tqarg(pname));
} else if (kasciistricmp(aMsgPart->typeStr(), "image")==0 ||
(kasciistricmp(aMsgPart->typeStr(), "application")==0 &&
kasciistricmp(aMsgPart->subtypeStr(), "postscript")==0))
@@ -2178,7 +2178,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
"\" border=\"0\">\n"
"</body></html>\n" );
htmlWriter()->end();
- setCaption( i18n("View Attachment: %1").arg( pname ) );
+ setCaption( i18n("View Attachment: %1").tqarg( pname ) );
show();
delete iio;
} else {
@@ -2198,7 +2198,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
htmlWriter()->queue( "</pre>" );
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
- mMainWindow->setCaption(i18n("View Attachment: %1").arg(pname));
+ mMainWindow->setCaption(i18n("View Attachment: %1").tqarg(pname));
}
// ---Sven's view text, html and image attachments in html widget end ---
}
@@ -2287,14 +2287,14 @@ void KMReaderWin::openAttachment( int id, const TQString & name )
if ( filenameText.isEmpty() )
filenameText = msgPart.name();
if ( offer ) {
- open_text = i18n("&Open with '%1'").arg( offer->name() );
+ open_text = i18n("&Open with '%1'").tqarg( offer->name() );
} else {
open_text = i18n("&Open With...");
}
const TQString text = i18n("Open attachment '%1'?\n"
"Note that opening an attachment may compromise "
"your system's security.")
- .arg( filenameText );
+ .tqarg( filenameText );
const int choice = KMessageBox::questionYesNoCancel( this, text,
i18n("Open Attachment?"), KStdGuiItem::saveAs(), open_text,
TQString::tqfromLatin1("askSave") + mimetype->name() ); // dontAskAgainName
@@ -2305,7 +2305,7 @@ void KMReaderWin::openAttachment( int id, const TQString & name )
message(), mAtmCurrent, mAtmCurrentName, KMHandleAttachmentCommand::Save,
offer, this );
connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ),
- this, TQT_SLOT( slotAtmView( int, const TQString& ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( slotAtmView( int, const TQString& ) ) );
command->start();
}
else if( choice == KMessageBox::No ) { // Open
@@ -2315,7 +2315,7 @@ void KMReaderWin::openAttachment( int id, const TQString & name )
KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand( node,
message(), mAtmCurrent, mAtmCurrentName, action, offer, this );
connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ),
- this, TQT_SLOT( slotAtmView( int, const TQString& ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( slotAtmView( int, const TQString& ) ) );
command->start();
} else { // Cancel
kdDebug(5006) << "Canceled opening attachment" << endl;
@@ -2577,8 +2577,8 @@ KURL KMReaderWin::tempFileUrlFromPartNode( const partNode * node )
while ( it != end ) {
TQString path = *it;
it++;
- uint right = path.findRev('/');
- uint left = path.findRev('.', right);
+ uint right = path.tqfindRev('/');
+ uint left = path.tqfindRev('.', right);
bool ok;
int res = path.mid(left + 1, right - left - 1).toInt(&ok);
@@ -2636,8 +2636,8 @@ static TQString linkForNode( const DOM::Node &node )
return href.nodeValue().string();
}
}
- if ( !node.tqparentNode().isNull() ) {
- return linkForNode( node.tqparentNode() );
+ if ( !node.parentNode().isNull() ) {
+ return linkForNode( node.parentNode() );
} else {
return TQString();
}
@@ -2651,14 +2651,14 @@ static TQString linkForNode( const DOM::Node &node )
bool KMReaderWin::eventFilter( TQObject *, TQEvent *e )
{
if ( e->type() == TQEvent::MouseButtonPress ) {
- TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
- if ( me->button() == LeftButton && ( me->state() & ShiftButton ) ) {
+ TQMouseEvent* me = TQT_TQMOUSEEVENT(e);
+ if ( me->button() == Qt::LeftButton && ( me->state() & ShiftButton ) ) {
// special processing for shift+click
URLHandlerManager::instance()->handleShiftClick( mHoveredUrl, this );
return true;
}
- if ( me->button() == LeftButton ) {
+ if ( me->button() == Qt::LeftButton ) {
TQString imagePath;
const DOM::Node nodeUnderMouse = mViewer->nodeUnderMouse();
@@ -2683,7 +2683,7 @@ bool KMReaderWin::eventFilter( TQObject *, TQEvent *e )
}
if ( e->type() == TQEvent::MouseMove ) {
- TQMouseEvent* me = static_cast<TQMouseEvent*>( e );
+ TQMouseEvent* me = TQT_TQMOUSEEVENT( e );
// Handle this ourselves instead of connecting to mViewer::onURL(), since KHTML misses some
// notifications in case we started a drag ourselves
@@ -2698,8 +2698,8 @@ bool KMReaderWin::eventFilter( TQObject *, TQEvent *e )
// HACK: Send a mouse release event to the KHTMLView, as otherwise that will be missed in
// case we started a drag. If the event is missed, the HTML view gets into a wrong
// state, in which funny things like unsolicited drags start to happen.
- TQMouseEvent mouseEvent( TQEvent::MouseButtonRelease, me->pos(), TQt::NoButton, TQt::NoButton );
- static_cast<TQObject*>( mViewer->view() )->eventFilter( mViewer->view()->viewport(),
+ TQMouseEvent mouseEvent( TQEvent::MouseButtonRelease, me->pos(), Qt::NoButton, Qt::NoButton );
+ TQT_TQOBJECT( mViewer->view() )->eventFilter( mViewer->view()->viewport(),
&mouseEvent );
return true;
}
@@ -2751,9 +2751,9 @@ void KMReaderWin::slotDeleteAttachment(partNode * node)
KMDeleteAttachmentCommand* command = new KMDeleteAttachmentCommand( nodeId, msg, this );
command->start();
connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
- this, TQT_SLOT( updateReaderWin() ) );
+ TQT_TQOBJECT(this), TQT_SLOT( updateReaderWin() ) );
connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
- this, TQT_SLOT( disconnectMsgAdded() ) );
+ TQT_TQOBJECT(this), TQT_SLOT( disconnectMsgAdded() ) );
// ### HACK: Since the command will do delete + add, a new message will arrive. However, we don't
// want the selection to change. Therefore, as soon as a new message arrives, select it, and then
@@ -2762,7 +2762,7 @@ void KMReaderWin::slotDeleteAttachment(partNode * node)
// And it won't work properly with multiple main windows
const KMHeaders * const headers = KMKernel::self()->getKMMainWidget()->headers();
connect( headers, TQT_SIGNAL( msgAddedToListView( TQListViewItem* ) ),
- this, TQT_SLOT( msgAdded( TQListViewItem* ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( msgAdded( TQListViewItem* ) ) );
}
// If we are operating on a copy of parts of the message, make sure to update the copy as well.
@@ -2788,7 +2788,7 @@ void KMReaderWin::disconnectMsgAdded()
{
const KMHeaders *const headers = KMKernel::self()->getKMMainWidget()->headers();
disconnect( headers, TQT_SIGNAL( msgAddedToListView( TQListViewItem* ) ),
- this, TQT_SLOT( msgAdded( TQListViewItem* ) ) );
+ TQT_TQOBJECT(this), TQT_SLOT( msgAdded( TQListViewItem* ) ) );
}
void KMReaderWin::slotEditAttachment(partNode * node)
@@ -2828,12 +2828,12 @@ void KMReaderWin::scrollToAttachment( const partNode *node )
DOM::Document doc = mViewer->htmlDocument();
// The anchors for this are created in ObjectTreeParser::parseObjectTree()
- mViewer->gotoAnchor( TQString::tqfromLatin1( "att%1" ).arg( node->nodeId() ) );
+ mViewer->gotoAnchor( TQString::tqfromLatin1( "att%1" ).tqarg( node->nodeId() ) );
// Remove any old color markings which might be there
const partNode *root = node->topLevelParent();
for ( int i = 0; i <= root->totalChildCount() + 1; i++ ) {
- DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).arg( i + 1 ) );
+ DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).tqarg( i + 1 ) );
if ( !attachmentDiv.isNull() )
attachmentDiv.removeAttribute( "style" );
}
@@ -2845,14 +2845,14 @@ void KMReaderWin::scrollToAttachment( const partNode *node )
// Now, color the div of the attachment in yellow, so that the user sees what happened.
// We created a special marked div for this in writeAttachmentMarkHeader() in ObjectTreeParser,
// find and modify that now.
- DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).arg( node->nodeId() ) );
+ DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).tqarg( node->nodeId() ) );
if ( attachmentDiv.isNull() ) {
kdWarning( 5006 ) << "Could not find attachment div for attachment " << node->nodeId() << endl;
return;
}
attachmentDiv.setAttribute( "style", TQString( "border:2px solid %1" )
- .arg( cssHelper()->pgpWarnColor().name() ) );
+ .tqarg( cssHelper()->pgpWarnColor().name() ) );
// Update rendering, otherwise the rendering is not updated when the user clicks on an attachment
// that causes scrolling and the open attachment dialog
@@ -2880,7 +2880,7 @@ void KMReaderWin::injectAttachments()
imgSrc.append( "attachmentQuicklistOpened.png" );
}
- TQString html = renderAttachments( mRootNode, TQApplication::palette().active().background() );
+ TQString html = renderAttachments( mRootNode, TQApplication::tqpalette().active().background() );
if ( html.isEmpty() )
return;
@@ -2931,8 +2931,8 @@ TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor
align = "right";
if ( node->msgPart().typeStr().lower() == "message" || node == mRootNode )
html += TQString::tqfromLatin1("<div style=\"background:%1; %2"
- "vertical-align:middle; float:%3; %4\">").arg( bgColor.name() ).arg( margin )
- .arg( align ).arg( visibility );
+ "vertical-align:middle; float:%3; %4\">").tqarg( bgColor.name() ).tqarg( margin )
+ .tqarg( align ).tqarg( visibility );
html += subHtml;
if ( node->msgPart().typeStr().lower() == "message" || node == mRootNode )
html += "</div>";
@@ -2941,7 +2941,7 @@ TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor
partNode::AttachmentDisplayInfo info = node->attachmentDisplayInfo();
if ( info.displayInHeader ) {
html += "<div style=\"float:left;\">";
- html += TQString::tqfromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() );
+ html += TQString::tqfromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).tqarg( bgColor.name() );
TQString fileName = writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
TQString href = node->asHREF( "header" );
html += TQString::tqfromLatin1( "<a href=\"" ) + href +
@@ -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.tqfind( index );
+ const std::map<TQCString,BodyPartMemento*>::const_iterator it = mBodyPartMementoMap.find( index );
if ( it == mBodyPartMementoMap.end() ) {
return 0;
}