diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete/kopeteutils.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/kopeteutils.cpp')
-rw-r--r-- | kopete/libkopete/kopeteutils.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kopete/libkopete/kopeteutils.cpp b/kopete/libkopete/kopeteutils.cpp index d7d8eb0f..6fe46529 100644 --- a/kopete/libkopete/kopeteutils.cpp +++ b/kopete/libkopete/kopeteutils.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qmap.h> +#include <tqmap.h> #include <kmessagebox.h> #include <knotifyclient.h> @@ -35,22 +35,22 @@ #include "kopeteutils.h" #include "kopeteuiglobal.h" -static const QString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); -static const QString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); -static const QString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); +static const TQString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); +static const TQString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); +static const TQString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); -static const QString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); -static const QString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); -static const QString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); +static const TQString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); +static const TQString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); +static const TQString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); namespace Kopete { namespace Utils { -void notify( QPixmap pic, const QString &eventid, const QString &caption, const QString &message, const QString explanation, const QString debugInfo) +void notify( TQPixmap pic, const TQString &eventid, const TQString &caption, const TQString &message, const TQString explanation, const TQString debugInfo) { - QString action; + TQString action; if ( !explanation.isEmpty() ) action = i18n( "More Information..." ); kdDebug( 14010 ) << k_funcinfo << endl; @@ -60,63 +60,63 @@ void notify( QPixmap pic, const QString &eventid, const QString &caption, const info.debugInfo = debugInfo; NotifyHelper::self()->registerNotification(n, info); - QObject::connect( n, SIGNAL(activated(unsigned int )) , NotifyHelper::self() , SLOT( slotEventActivated(unsigned int) ) ); - QObject::connect( n, SIGNAL(closed()) , NotifyHelper::self() , SLOT( slotEventClosed() ) ); + TQObject::connect( n, TQT_SIGNAL(activated(unsigned int )) , NotifyHelper::self() , TQT_SLOT( slotEventActivated(unsigned int) ) ); + TQObject::connect( n, TQT_SIGNAL(closed()) , NotifyHelper::self() , TQT_SLOT( slotEventClosed() ) ); } -void notifyConnectionLost( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionLost( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; - notify( account->accountIcon(32), QString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); } -bool isHostReachable(const QString &host) +bool isHostReachable(const TQString &host) { const int NetWorkStatusUnknown = 1; const int NetWorkStatusOnline = 8; - QCString replyType; - QByteArray params; - QByteArray reply; + TQCString replyType; + TQByteArray params; + TQByteArray reply; - QDataStream stream(params, IO_WriteOnly); + TQDataStream stream(params, IO_WriteOnly); stream << host; - if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(QString)", params, replyType, reply ) && (replyType == "int") ) + if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && (replyType == "int") ) { int result; - QDataStream stream2( reply, IO_ReadOnly ); + TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; return (result != NetWorkStatusUnknown) && (result != NetWorkStatusOnline); } return false; // On error, assume we are online } -void notifyCannotConnect( const Account *account, const QString &explanation, const QString &debugInfo) +void notifyCannotConnect( const Account *account, const TQString &explanation, const TQString &debugInfo) { if (!account) return; - notify( account->accountIcon(), QString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); + notify( account->accountIcon(), TQString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); } -void notifyConnectionError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default connection error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); } -void notifyServerError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyServerError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default server error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("server_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("server_error"), caption, message, explanation, debugInfo); } } // end ns ErrorNotifier |