summaryrefslogtreecommitdiffstats
path: root/kmail/urlhandlermanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmail/urlhandlermanager.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/urlhandlermanager.cpp')
-rw-r--r--kmail/urlhandlermanager.cpp124
1 files changed, 62 insertions, 62 deletions
diff --git a/kmail/urlhandlermanager.cpp b/kmail/urlhandlermanager.cpp
index cf5b92d62..100009faa 100644
--- a/kmail/urlhandlermanager.cpp
+++ b/kmail/urlhandlermanager.cpp
@@ -62,10 +62,10 @@ namespace {
~KMailProtocolURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL & url, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL & url, const TQPoint &, KMReaderWin * ) const {
return url.protocol() == "kmail";
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class ExpandCollapseQuoteURLManager : public KMail::URLHandler {
@@ -74,10 +74,10 @@ namespace {
~ExpandCollapseQuoteURLManager() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
@@ -87,10 +87,10 @@ namespace {
~SMimeURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class MailToURLHandler : public KMail::URLHandler {
@@ -99,10 +99,10 @@ namespace {
~MailToURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const { return false; }
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class HtmlAnchorHandler : public KMail::URLHandler {
@@ -111,10 +111,10 @@ namespace {
~HtmlAnchorHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const { return QString::null; }
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const { return TQString::null; }
};
class AttachmentURLHandler : public KMail::URLHandler {
@@ -123,8 +123,8 @@ namespace {
~AttachmentURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class ShowAuditLogURLHandler : public KMail::URLHandler {
@@ -133,8 +133,8 @@ namespace {
~ShowAuditLogURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class FallBackURLHandler : public KMail::URLHandler {
@@ -143,8 +143,8 @@ namespace {
~FallBackURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL & url, KMReaderWin * ) const {
return url.prettyURL();
}
};
@@ -164,14 +164,14 @@ public:
~BodyPartURLHandlerManager();
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
void registerHandler( const Interface::BodyPartURLHandler * handler );
void unregisterHandler( const Interface::BodyPartURLHandler * handler );
private:
- typedef QValueVector<const Interface::BodyPartURLHandler*> BodyPartHandlerList;
+ typedef TQValueVector<const Interface::BodyPartURLHandler*> BodyPartHandlerList;
BodyPartHandlerList mHandlers;
};
@@ -192,12 +192,12 @@ void KMail::URLHandlerManager::BodyPartURLHandlerManager::unregisterHandler( con
mHandlers.erase( remove( mHandlers.begin(), mHandlers.end(), handler ), mHandlers.end() );
}
-static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QString * path ) {
+static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, TQString * path ) {
assert( path );
if ( !w || url.protocol() != "x-kmail" )
return 0;
- const QString urlPath = url.path();
+ const TQString urlPath = url.path();
// urlPath format is: /bodypart/<random number>/<part id>/<path>
@@ -205,7 +205,7 @@ static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QStr
if ( !urlPath.startsWith( "/bodypart/" ) )
return 0;
- const QStringList urlParts = QStringList::split( '/', urlPath.mid( 10 ), true );
+ const TQStringList urlParts = TQStringList::split( '/', urlPath.mid( 10 ), true );
if ( urlParts.size() != 3 )
return 0;
bool ok = false;
@@ -217,7 +217,7 @@ static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QStr
}
bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleClick( const KURL & url, KMReaderWin * w ) const {
- QString path;
+ TQString path;
partNode * node = partNodeFromXKMailUrl( url, w, &path );
if ( !node )
return false;
@@ -231,8 +231,8 @@ bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleClick( const KUR
return false;
}
-bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
- QString path;
+bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
+ TQString path;
partNode * node = partNodeFromXKMailUrl( url, w, &path );
if ( !node )
return false;
@@ -244,19 +244,19 @@ bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuReque
return false;
}
-QString KMail::URLHandlerManager::BodyPartURLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
- QString path;
+TQString KMail::URLHandlerManager::BodyPartURLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
+ TQString path;
partNode * node = partNodeFromXKMailUrl( url, w, &path );
if ( !node )
- return QString::null;
+ return TQString::null;
KMail::PartNodeBodyPart part( *node, w->overrideCodec() );
for ( BodyPartHandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it ) {
- const QString msg = (*it)->statusBarMessage( &part, path );
+ const TQString msg = (*it)->statusBarMessage( &part, path );
if ( !msg.isEmpty() )
return msg;
}
- return QString::null;
+ return TQString::null;
}
//
@@ -311,20 +311,20 @@ bool KMail::URLHandlerManager::handleClick( const KURL & url, KMReaderWin * w )
return false;
}
-bool KMail::URLHandlerManager::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
+bool KMail::URLHandlerManager::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
for ( HandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it )
if ( (*it)->handleContextMenuRequest( url, p, w ) )
return true;
return false;
}
-QString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
+TQString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
for ( HandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it ) {
- const QString msg = (*it)->statusBarMessage( url, w );
+ const TQString msg = (*it)->statusBarMessage( url, w );
if ( !msg.isEmpty() )
return msg;
}
- return QString::null;
+ return TQString::null;
}
@@ -348,7 +348,7 @@ QString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWi
#include <kmessagebox.h>
#include <khtml_part.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace {
bool KMailProtocolURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const {
@@ -415,7 +415,7 @@ namespace {
return false;
}
- QString KMailProtocolURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString KMailProtocolURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
if ( url.protocol() == "kmail" )
{
if ( url.path() == "showHTML" )
@@ -431,7 +431,7 @@ namespace {
if ( url.path() == "hideSignatureDetails" )
return i18n("Hide signature details.");
}
- return QString::null ;
+ return TQString::null ;
}
}
@@ -444,7 +444,7 @@ namespace {
// kmail:levelquote/?-num -> expand all levels quote.
if ( url.protocol() == "kmail" && url.path()=="levelquote" )
{
- QString levelStr= url.query().mid( 1,url.query().length() );
+ TQString levelStr= url.query().mid( 1,url.query().length() );
bool isNumber;
int levelQuote= levelStr.toInt(&isNumber);
if ( isNumber )
@@ -453,32 +453,32 @@ namespace {
}
return false;
}
- QString ExpandCollapseQuoteURLManager::statusBarMessage(
+ TQString ExpandCollapseQuoteURLManager::statusBarMessage(
const KURL & url, KMReaderWin * ) const
{
if ( url.protocol() == "kmail" && url.path() == "levelquote" )
{
- QString query= url.query();
+ TQString query= url.query();
if ( query.length()>=2 )
if ( query[ 1 ] =='-' )
return i18n("Expand all quoted text.");
else
return i18n("Collapse quoted text.");
}
- return QString::null ;
+ return TQString::null ;
}
}
// defined in kmreaderwin.cpp...
-extern bool foundSMIMEData( const QString aUrl, QString & displayName,
- QString & libName, QString & keyId );
+extern bool foundSMIMEData( const TQString aUrl, TQString & displayName,
+ TQString & libName, TQString & keyId );
namespace {
bool SMimeURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const {
if ( !url.hasRef() )
return false;
- QString displayName, libName, keyId;
+ TQString displayName, libName, keyId;
if ( !foundSMIMEData( url.path() + '#' + url.ref(), displayName, libName, keyId ) )
return false;
KProcess cmp;
@@ -490,10 +490,10 @@ namespace {
return true;
}
- QString SMimeURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
- QString displayName, libName, keyId;
+ TQString SMimeURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString displayName, libName, keyId;
if ( !foundSMIMEData( url.path() + '#' + url.ref(), displayName, libName, keyId ) )
- return QString::null;
+ return TQString::null;
return i18n("Show certificate 0x%1").arg( keyId );
}
}
@@ -503,15 +503,15 @@ namespace {
if ( url.hasHost() || url.path() != "/" || !url.hasRef() )
return false;
if ( w && !w->htmlPart()->gotoAnchor( url.ref() ) )
- static_cast<QScrollView*>( w->htmlPart()->widget() )->ensureVisible( 0, 0 );
+ static_cast<TQScrollView*>( w->htmlPart()->widget() )->ensureVisible( 0, 0 );
return true;
}
}
namespace {
- QString MailToURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString MailToURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
if ( url.protocol() != "mailto" )
- return QString::null;
+ return TQString::null;
return KMMessage::decodeMailtoUrl( url.url() );
}
}
@@ -527,7 +527,7 @@ namespace {
return true;
}
- bool AttachmentURLHandler::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
+ bool AttachmentURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
if ( !w || !w->message() )
return false;
const int id = KMReaderWin::msgPartFromUrl( url );
@@ -537,14 +537,14 @@ namespace {
return true;
}
- QString AttachmentURLHandler::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
+ TQString AttachmentURLHandler::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
if ( !w || !w->message() )
- return QString::null;
+ return TQString::null;
const partNode * node = w->partNodeFromUrl( url );
if ( !node )
- return QString::null;
+ return TQString::null;
const KMMessagePart & msgPart = node->msgPart();
- QString name = msgPart.fileName();
+ TQString name = msgPart.fileName();
if ( name.isEmpty() )
name = msgPart.name();
if ( !name.isEmpty() )
@@ -554,29 +554,29 @@ namespace {
}
namespace {
- static QString extractAuditLog( const KURL & url ) {
+ static TQString extractAuditLog( const KURL & url ) {
if ( url.protocol() != "kmail" || url.path() != "showAuditLog" )
- return QString();
+ return TQString();
assert( !url.queryItem( "log" ).isEmpty() );
return url.queryItem( "log" );
}
bool ShowAuditLogURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const {
- const QString auditLog = extractAuditLog( url );
+ const TQString auditLog = extractAuditLog( url );
if ( auditLog.isEmpty() )
return false;
Kleo::MessageBox::auditLog( w, auditLog );
return true;
}
- bool ShowAuditLogURLHandler::handleContextMenuRequest( const KURL & url, const QPoint &, KMReaderWin * w ) const {
+ bool ShowAuditLogURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint &, KMReaderWin * w ) const {
// disable RMB for my own links:
return !extractAuditLog( url ).isEmpty();
}
- QString ShowAuditLogURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString ShowAuditLogURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
if ( extractAuditLog( url ).isEmpty() )
- return QString();
+ return TQString();
else
return i18n("Show GnuPG Audit Log for this operation");
}
@@ -589,7 +589,7 @@ namespace {
return true;
}
- bool FallBackURLHandler::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
+ bool FallBackURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
if ( w )
w->emitPopupMenu( url, p );
return true;