Commit a8a85765 authored by Luigi Toscano's avatar Luigi Toscano

Port the Jabber directory to categorized logging

Use a specific logging category, trying to use the same naming
used in the port of the original code for Jabber (taken from Kopete).
parent eb8386fb
...@@ -98,6 +98,11 @@ ecm_qt_declare_logging_category(ksirk_SRCS ...@@ -98,6 +98,11 @@ ecm_qt_declare_logging_category(ksirk_SRCS
IDENTIFIER KSIRK_LOG IDENTIFIER KSIRK_LOG
CATEGORY_NAME org.kde.ksirk) CATEGORY_NAME org.kde.ksirk)
ecm_qt_declare_logging_category(ksirk_SRCS
HEADER jabber_protocol_debug.h
IDENTIFIER JABBER_PROTOCOL_LOG
CATEGORY_NAME org.kde.ksirk.jabber)
set(ksirk_UI set(ksirk_UI
Dialogs/qplayersetupdialog.ui Dialogs/qplayersetupdialog.ui
Dialogs/newGameDialog.ui Dialogs/newGameDialog.ui
......
This diff is collapsed.
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
* ************************************************************************* * *************************************************************************
*/ */
#include <kdebug.h>
#include <KLocalizedString> #include <KLocalizedString>
#include <kiconloader.h> #include <kiconloader.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
...@@ -91,7 +90,7 @@ bool JabberBaseContact::isReachable () ...@@ -91,7 +90,7 @@ bool JabberBaseContact::isReachable ()
void JabberBaseContact::updateContact ( const XMPP::RosterItem & item ) void JabberBaseContact::updateContact ( const XMPP::RosterItem & item )
{ {
kDebug ( JABBER_DEBUG_GLOBAL ) << "Synchronizing local copy of " << contactId() << " with information received from server. (name='" << item.name() << "' groups='" << item.groups() << "')"; qCDebug(JABBER_PROTOCOL_LOG) << "Synchronizing local copy of " << contactId() << " with information received from server. (name='" << item.name() << "' groups='" << item.groups() << "')";
mRosterItem = item; mRosterItem = item;
...@@ -114,7 +113,7 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item ) ...@@ -114,7 +113,7 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item )
if ( !item.name().isEmpty () && item.name() != item.jid().bare() if ( !item.name().isEmpty () && item.name() != item.jid().bare()
&& metaContact()->customDisplayName() != item.name () ) && metaContact()->customDisplayName() != item.name () )
{ {
kDebug ( JABBER_DEBUG_GLOBAL ) << "setting display name of " << contactId () << " to " << item.name(); qCDebug(JABBER_PROTOCOL_LOG) << "setting display name of " << contactId () << " to " << item.name();
metaContact()->setDisplayName ( item.name () ); metaContact()->setDisplayName ( item.name () );
} }
} }
...@@ -196,13 +195,13 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item ) ...@@ -196,13 +195,13 @@ void JabberBaseContact::updateContact ( const XMPP::RosterItem & item )
foreach ( Kopete::Group *group, groupsToRemoveFrom ) foreach ( Kopete::Group *group, groupsToRemoveFrom )
{ {
kDebug ( JABBER_DEBUG_GLOBAL ) << "Removing " << contactId() << " from group " << group->displayName (); qCDebug(JABBER_PROTOCOL_LOG) << "Removing " << contactId() << " from group " << group->displayName ();
metaContact()->removeFromGroup ( group ); metaContact()->removeFromGroup ( group );
} }
foreach ( Kopete::Group *group, groupsToAddTo ) foreach ( Kopete::Group *group, groupsToAddTo )
{ {
kDebug ( JABBER_DEBUG_GLOBAL ) << "Adding " << contactId() << " to group " << group->displayName (); qCDebug(JABBER_PROTOCOL_LOG) << "Adding " << contactId() << " to group " << group->displayName ();
metaContact()->addToGroup ( group ); metaContact()->addToGroup ( group );
} }
} }
...@@ -293,7 +292,7 @@ void JabberBaseContact::updateResourceList () ...@@ -293,7 +292,7 @@ void JabberBaseContact::updateResourceList ()
void JabberBaseContact::reevaluateStatus () void JabberBaseContact::reevaluateStatus ()
{ {
kDebug (JABBER_DEBUG_GLOBAL) << "Determining new status for " << contactId (); qCDebug(JABBER_PROTOCOL_LOG) << "Determining new status for " << contactId ();
Kopete::OnlineStatus status; Kopete::OnlineStatus status;
XMPP::Resource resource = account()->resourcePool()->bestResource ( mRosterItem.jid () ); XMPP::Resource resource = account()->resourcePool()->bestResource ( mRosterItem.jid () );
...@@ -316,7 +315,7 @@ void JabberBaseContact::reevaluateStatus () ...@@ -316,7 +315,7 @@ void JabberBaseContact::reevaluateStatus ()
updateResourceList (); updateResourceList ();
kDebug (JABBER_DEBUG_GLOBAL) << "New status for " << contactId () << " is " << status.description (); qCDebug(JABBER_PROTOCOL_LOG) << "New status for " << contactId () << " is " << status.description ();
setOnlineStatus ( status ); setOnlineStatus ( status );
/* /*
...@@ -398,7 +397,7 @@ void JabberBaseContact::slotUserInfo( ) ...@@ -398,7 +397,7 @@ void JabberBaseContact::slotUserInfo( )
void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
{ {
kDebug ( JABBER_DEBUG_GLOBAL ) << "Updating vCard for " << contactId (); qCDebug(JABBER_PROTOCOL_LOG) << "Updating vCard for " << contactId ();
// update vCard cache timestamp if this is not a temporary contact // update vCard cache timestamp if this is not a temporary contact
if ( metaContact() && !metaContact()->isTemporary () ) if ( metaContact() && !metaContact()->isTemporary () )
...@@ -626,7 +625,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) ...@@ -626,7 +625,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
// photo() is a QByteArray // photo() is a QByteArray
if ( !vCard.photo().isEmpty() ) if ( !vCard.photo().isEmpty() )
{ {
kDebug( JABBER_DEBUG_GLOBAL ) << "Contact has a photo embedded into his vCard."; qCDebug(JABBER_PROTOCOL_LOG) << "Contact has a photo embedded into his vCard.";
// QImage is used to save to disk in PNG later. // QImage is used to save to disk in PNG later.
contactPhoto = QImage::fromData( vCard.photo() ); contactPhoto = QImage::fromData( vCard.photo() );
...@@ -644,7 +643,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) ...@@ -644,7 +643,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
} }
kDebug( JABBER_DEBUG_GLOBAL ) << "Contact photo is a URI."; qCDebug(JABBER_PROTOCOL_LOG) << "Contact photo is a URI.";
contactPhoto = QImage( tempPhotoPath ); contactPhoto = QImage( tempPhotoPath );
...@@ -662,7 +661,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard ) ...@@ -662,7 +661,7 @@ void JabberBaseContact::setPropertiesFromVCard ( const XMPP::VCard &vCard )
// Save the image to the disk, then set the property. // Save the image to the disk, then set the property.
if(!entry.path.isNull()) if(!entry.path.isNull())
{ {
kDebug( JABBER_DEBUG_GLOBAL ) << "Setting photo for contact: " << contactId(); qCDebug(JABBER_PROTOCOL_LOG) << "Setting photo for contact: " << contactId();
setProperty( protocol()->propPhoto, entry.path ); setProperty( protocol()->propPhoto, entry.path );
} }
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <kopetecontact.h> #include <kopetecontact.h>
#include <kdebug.h>
#include <QAction> #include <QAction>
#include <kselectaction.h> #include <kselectaction.h>
#include <KLocalizedString> #include <KLocalizedString>
......
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
***************************************************************************/ ***************************************************************************/
#include <qobject.h> #include <qobject.h>
#include <kdebug.h>
#include <ksocketfactory.h> #include <ksocketfactory.h>
#include "jabber_protocol_debug.h"
#include "jabberbytestream.h" #include "jabberbytestream.h"
// #include "jabberprotocol.h" // #include "jabberprotocol.h"
JabberByteStream::JabberByteStream ( QObject *parent ) JabberByteStream::JabberByteStream ( QObject *parent )
: ByteStream ( parent ) : ByteStream ( parent )
{ {
kDebug ( ) << "Instantiating new Jabber byte stream."; qCDebug(JABBER_PROTOCOL_LOG) << "Instantiating new Jabber byte stream.";
// reset close tracking flag // reset close tracking flag
mClosing = false; mClosing = false;
...@@ -36,7 +36,7 @@ JabberByteStream::JabberByteStream ( QObject *parent ) ...@@ -36,7 +36,7 @@ JabberByteStream::JabberByteStream ( QObject *parent )
void JabberByteStream::connect ( QString host, int port ) void JabberByteStream::connect ( QString host, int port )
{ {
kDebug ( ) << k_funcinfo << "Connecting to " << host << ", port " << port << endl; qCDebug(JABBER_PROTOCOL_LOG) << Q_FUNC_INFO << "Connecting to " << host << ", port " << port << endl;
mClosing = false; mClosing = false;
...@@ -59,14 +59,14 @@ bool JabberByteStream::isOpen () const ...@@ -59,14 +59,14 @@ bool JabberByteStream::isOpen () const
void JabberByteStream::close () void JabberByteStream::close ()
{ {
kDebug ( ) << "Closing stream."; qCDebug(JABBER_PROTOCOL_LOG) << "Closing stream.";
// close the socket and set flag that we are closing it ourselves // close the socket and set flag that we are closing it ourselves
mClosing = true; mClosing = true;
if (mSocket) { if (mSocket) {
kDebug ( ) << k_funcinfo << "socket is not null" << endl; qCDebug(JABBER_PROTOCOL_LOG) << Q_FUNC_INFO << "socket is not null" << endl;
mSocket->close(); mSocket->close();
kDebug ( ) << k_funcinfo << "socket closed" << endl; qCDebug(JABBER_PROTOCOL_LOG) << Q_FUNC_INFO << "socket closed" << endl;
delete mSocket; delete mSocket;
mSocket=NULL; mSocket=NULL;
} }
...@@ -106,7 +106,7 @@ void JabberByteStream::slotConnected () ...@@ -106,7 +106,7 @@ void JabberByteStream::slotConnected ()
void JabberByteStream::slotConnectionClosed () void JabberByteStream::slotConnectionClosed ()
{ {
kDebug ( ) << "Socket has been closed."; qCDebug(JABBER_PROTOCOL_LOG) << "Socket has been closed.";
// depending on who closed the socket, emit different signals // depending on who closed the socket, emit different signals
if ( !mClosing ) if ( !mClosing )
...@@ -124,7 +124,7 @@ void JabberByteStream::slotConnectionClosed () ...@@ -124,7 +124,7 @@ void JabberByteStream::slotConnectionClosed ()
void JabberByteStream::slotReadyRead () void JabberByteStream::slotReadyRead ()
{ {
kDebug ( ) << "called: available: " << socket()->bytesAvailable (); qCDebug(JABBER_PROTOCOL_LOG) << "called: available: " << socket()->bytesAvailable ();
appendRead ( socket()->readAll() ); appendRead ( socket()->readAll() );
emit readyRead (); emit readyRead ();
...@@ -140,7 +140,7 @@ void JabberByteStream::slotBytesWritten ( qint64 bytes ) ...@@ -140,7 +140,7 @@ void JabberByteStream::slotBytesWritten ( qint64 bytes )
void JabberByteStream::slotError ( QAbstractSocket::SocketError code ) void JabberByteStream::slotError ( QAbstractSocket::SocketError code )
{ {
kDebug ( ) << "Socket error '" << mSocket->errorString() << "' - Code : " << code; qCDebug(JABBER_PROTOCOL_LOG) << "Socket error '" << mSocket->errorString() << "' - Code : " << code;
emit error ( code ); emit error ( code );
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
************************************************************************* *************************************************************************
*/ */
#include "jabbercapabilitiesmanager.h" #include "jabbercapabilitiesmanager.h"
#include "jabber_protocol_debug.h"
#include <qstring.h> #include <qstring.h>
#include <qstringlist.h> #include <qstringlist.h>
...@@ -28,7 +29,6 @@ ...@@ -28,7 +29,6 @@
#include <qtextstream.h> #include <qtextstream.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kdebug.h>
#include <xmpp_tasks.h> #include <xmpp_tasks.h>
...@@ -171,7 +171,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid, ...@@ -171,7 +171,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::addJid(const Jid& jid,
void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& jid) void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& jid)
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Unregistering " << QString(jid.full()).replace('%',"%%"); qCDebug(JABBER_PROTOCOL_LOG) << "Unregistering " << QString(jid.full()).replace('%',"%%");
JidList::Iterator it = m_jids.begin(); JidList::Iterator it = m_jids.begin();
while( it != m_jids.end() ) while( it != m_jids.end() )
...@@ -189,7 +189,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& ji ...@@ -189,7 +189,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::removeJid(const Jid& ji
QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::nextJid(const Jid& jid, const Task* t) QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::nextJid(const Jid& jid, const Task* t)
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Looking for next JID"; qCDebug(JABBER_PROTOCOL_LOG) << "Looking for next JID";
JidList::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd(); JidList::ConstIterator it = m_jids.constBegin(), itEnd = m_jids.constEnd();
for( ; it != itEnd; ++it) for( ; it != itEnd; ++it)
...@@ -199,14 +199,14 @@ QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::ne ...@@ -199,14 +199,14 @@ QPair<Jid,JabberAccount*> JabberCapabilitiesManager::CapabilitiesInformation::ne
it++; it++;
if (it == itEnd) if (it == itEnd)
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "No more JIDs"; qCDebug(JABBER_PROTOCOL_LOG) << "No more JIDs";
return QPair<Jid,JabberAccount*>(Jid(),0L); return QPair<Jid,JabberAccount*>(Jid(),0L);
} }
else if( (*it).second->isConnected() ) else if( (*it).second->isConnected() )
{ {
//qDebug("caps.cpp: Account isn't active"); //qDebug("caps.cpp: Account isn't active");
kDebug(JABBER_DEBUG_GLOBAL) << "Account isn't connected."; qCDebug(JABBER_PROTOCOL_LOG) << "Account isn't connected.";
return QPair<Jid,JabberAccount*>( (*it).first,(*it).second ); return QPair<Jid,JabberAccount*>( (*it).first,(*it).second );
} }
...@@ -270,7 +270,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme ...@@ -270,7 +270,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme
{ {
if( element.tagName() != "info") if( element.tagName() != "info")
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Invalid info element"; qCDebug(JABBER_PROTOCOL_LOG) << "Invalid info element";
return; return;
} }
...@@ -282,7 +282,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme ...@@ -282,7 +282,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme
QDomElement infoElement = node.toElement(); QDomElement infoElement = node.toElement();
if( infoElement.isNull() ) if( infoElement.isNull() )
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Null element"; qCDebug(JABBER_PROTOCOL_LOG) << "Null element";
continue; continue;
} }
...@@ -300,7 +300,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme ...@@ -300,7 +300,7 @@ void JabberCapabilitiesManager::CapabilitiesInformation::fromXml(const QDomEleme
} }
else else
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Unknown element"; qCDebug(JABBER_PROTOCOL_LOG) << "Unknown element";
} }
m_discovered = true; m_discovered = true;
...@@ -335,7 +335,7 @@ JabberCapabilitiesManager::~JabberCapabilitiesManager() ...@@ -335,7 +335,7 @@ JabberCapabilitiesManager::~JabberCapabilitiesManager()
void JabberCapabilitiesManager::removeAccount(JabberAccount *account) void JabberCapabilitiesManager::removeAccount(JabberAccount *account)
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Removing account " << account->accountId(); qCDebug(JABBER_PROTOCOL_LOG) << "Removing account " << account->accountId();
QList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values(); QList<CapabilitiesInformation> info = d->capabilitiesInformationMap.values();
...@@ -394,7 +394,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const ...@@ -394,7 +394,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
{ {
if( !d->capabilitiesInformationMap[*newCapsIt].discovered() && d->capabilitiesInformationMap[*newCapsIt].pendingRequests() == 0 ) if( !d->capabilitiesInformationMap[*newCapsIt].discovered() && d->capabilitiesInformationMap[*newCapsIt].pendingRequests() == 0 )
{ {
kDebug(JABBER_DEBUG_GLOBAL) << QString("Sending disco request to %1, node=%2").arg(QString(jid.full()).replace('%',"%%")).arg(node + '#' + (*newCapsIt).extensions()); qCDebug(JABBER_PROTOCOL_LOG) << QString("Sending disco request to %1, node=%2").arg(QString(jid.full()).replace('%',"%%")).arg(node + '#' + (*newCapsIt).extensions());
d->capabilitiesInformationMap[*newCapsIt].setPendingRequests(1); d->capabilitiesInformationMap[*newCapsIt].setPendingRequests(1);
requestDiscoInfo(account, jid, node + '#' + (*newCapsIt).extensions()); requestDiscoInfo(account, jid, node + '#' + (*newCapsIt).extensions());
...@@ -404,7 +404,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const ...@@ -404,7 +404,7 @@ void JabberCapabilitiesManager::updateCapabilities(JabberAccount *account, const
else else
{ {
// Remove all caps specifications // Remove all caps specifications
kDebug(JABBER_DEBUG_GLOBAL) << QString("Illegal caps info from %1: node=%2, ver=%3").arg(QString(jid.full()).replace('%',"%%")).arg(node).arg(version); qCDebug(JABBER_PROTOCOL_LOG) << QString("Illegal caps info from %1: node=%2, ver=%3").arg(QString(jid.full()).replace('%',"%%")).arg(node).arg(version);
d->jidCapabilitiesMap.remove( jid.full() ); d->jidCapabilitiesMap.remove( jid.full() );
} }
...@@ -442,7 +442,7 @@ void JabberCapabilitiesManager::discoRequestFinished() ...@@ -442,7 +442,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
DiscoItem item = discoInfo->item(); DiscoItem item = discoInfo->item();
Jid jid = discoInfo->jid(); Jid jid = discoInfo->jid();
kDebug(JABBER_DEBUG_GLOBAL) << QString("Disco response from %1, node=%2, success=%3").arg(QString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success()); qCDebug(JABBER_PROTOCOL_LOG) << QString("Disco response from %1, node=%2, success=%3").arg(QString(jid.full()).replace('%',"%%")).arg(discoInfo->node()).arg(discoInfo->success());
const QString &tokens = discoInfo->node(); const QString &tokens = discoInfo->node();
int idx = tokens.lastIndexOf('#'); int idx = tokens.lastIndexOf('#');
...@@ -472,7 +472,7 @@ void JabberCapabilitiesManager::discoRequestFinished() ...@@ -472,7 +472,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
// Notify affected jids. // Notify affected jids.
QStringList jids = d->capabilitiesInformationMap[capabilities].jids(); QStringList jids = d->capabilitiesInformationMap[capabilities].jids();
kDebug(JABBER_DEBUG_GLOBAL) << "notify affected jids"; qCDebug(JABBER_PROTOCOL_LOG) << "notify affected jids";
foreach( QString jid , jids ) foreach( QString jid , jids )
{ {
emit capabilitiesChanged(jid); emit capabilitiesChanged(jid);
...@@ -483,18 +483,18 @@ void JabberCapabilitiesManager::discoRequestFinished() ...@@ -483,18 +483,18 @@ void JabberCapabilitiesManager::discoRequestFinished()
QPair<Jid,JabberAccount*> jidAccountPair = d->capabilitiesInformationMap[capabilities].nextJid(jid,discoInfo->parent()); QPair<Jid,JabberAccount*> jidAccountPair = d->capabilitiesInformationMap[capabilities].nextJid(jid,discoInfo->parent());
if( jidAccountPair.second ) if( jidAccountPair.second )
{ {
kDebug(JABBER_DEBUG_GLOBAL) << QString("Falling back on %1.").arg(QString(jidAccountPair.first.full()).replace('%',"%%")); qCDebug(JABBER_PROTOCOL_LOG) << QString("Falling back on %1.").arg(QString(jidAccountPair.first.full()).replace('%',"%%"));
requestDiscoInfo( jidAccountPair.second, jidAccountPair.first, discoInfo->node() ); requestDiscoInfo( jidAccountPair.second, jidAccountPair.first, discoInfo->node() );
} }
else else
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "No valid disco request avalable."; qCDebug(JABBER_PROTOCOL_LOG) << "No valid disco request avalable.";
d->capabilitiesInformationMap[capabilities].setPendingRequests(0); d->capabilitiesInformationMap[capabilities].setPendingRequests(0);
} }
} }
} }
else else
kDebug(JABBER_DEBUG_GLOBAL) << QString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node); qCDebug(JABBER_PROTOCOL_LOG) << QString("Current client node '%1' does not match response '%2'").arg(jidCapabilities.node()).arg(node);
//for (unsigned int i = 0; i < item.features().list().count(); i++) //for (unsigned int i = 0; i < item.features().list().count(); i++)
// printf(" Feature: %s\n",item.features().list()[i].toLatin1()); // printf(" Feature: %s\n",item.features().list()[i].toLatin1());
...@@ -517,12 +517,12 @@ void JabberCapabilitiesManager::loadCachedInformation() ...@@ -517,12 +517,12 @@ void JabberCapabilitiesManager::loadCachedInformation()
QFile cacheFile(capsFileName); QFile cacheFile(capsFileName);
if( !cacheFile.open(QIODevice::ReadOnly) ) if( !cacheFile.open(QIODevice::ReadOnly) )
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Could not open the Capabilities cache from disk."; qCDebug(JABBER_PROTOCOL_LOG) << "Could not open the Capabilities cache from disk.";
return; return;
} }
if( !doc.setContent(&cacheFile) ) if( !doc.setContent(&cacheFile) )
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Could not set the Capabilities cache from file."; qCDebug(JABBER_PROTOCOL_LOG) << "Could not set the Capabilities cache from file.";
return; return;
} }
cacheFile.close(); cacheFile.close();
...@@ -530,7 +530,7 @@ void JabberCapabilitiesManager::loadCachedInformation() ...@@ -530,7 +530,7 @@ void JabberCapabilitiesManager::loadCachedInformation()
QDomElement caps = doc.documentElement(); QDomElement caps = doc.documentElement();
if( caps.tagName() != "capabilities" ) if( caps.tagName() != "capabilities" )
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Invalid capabilities element."; qCDebug(JABBER_PROTOCOL_LOG) << "Invalid capabilities element.";
return; return;
} }
...@@ -540,7 +540,7 @@ void JabberCapabilitiesManager::loadCachedInformation() ...@@ -540,7 +540,7 @@ void JabberCapabilitiesManager::loadCachedInformation()
QDomElement element = node.toElement(); QDomElement element = node.toElement();
if( element.isNull() ) if( element.isNull() )
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Found a null element."; qCDebug(JABBER_PROTOCOL_LOG) << "Found a null element.";
continue; continue;
} }
...@@ -553,7 +553,7 @@ void JabberCapabilitiesManager::loadCachedInformation() ...@@ -553,7 +553,7 @@ void JabberCapabilitiesManager::loadCachedInformation()
} }
else else
{ {
kDebug(JABBER_DEBUG_GLOBAL) << "Unknow element"; qCDebug(JABBER_PROTOCOL_LOG) << "Unknow element";
} }
} }
} }
...@@ -639,7 +639,7 @@ void JabberCapabilitiesManager::saveInformation() ...@@ -639,7 +639,7 @@ void JabberCapabilitiesManager::saveInformation()
QFile capsFile(capsFileName); QFile capsFile(capsFileName);
if( !capsFile.open(QIODevice::WriteOnly) ) if( !capsFile.open(QIODevice::WriteOnly) )
{ {
kDebug(JABBER_DEBUG_GLOBAL ) << "Error while opening Capabilities cache file."; qCDebug(JABBER_PROTOCOL_LOG) << "Error while opening Capabilities cache file.";
return; return;
} }
......
...@@ -21,13 +21,12 @@ ...@@ -21,13 +21,12 @@
***************************************************************************/ ***************************************************************************/
#include "jabberclient.h" #include "jabberclient.h"
#include "jabber_protocol_debug.h"
#include <QTimer> #include <QTimer>
#include <QRegExp> #include <QRegExp>
#include <QtCrypto> #include <QtCrypto>
#include <KDebug>
#include <bsocket.h> #include <bsocket.h>
#include <filetransfer.h> #include <filetransfer.h>
#include <xmpp_tasks.h> #include <xmpp_tasks.h>
...@@ -620,7 +619,7 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr ...@@ -620,7 +619,7 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
*/ */
if ( ( forceTLS () || useSSL () || probeSSL () ) && !QCA::isSupported ("tls" ) ) if ( ( forceTLS () || useSSL () || probeSSL () ) && !QCA::isSupported ("tls" ) )
{ {
kDebug() << "no TLS"; qCDebug(JABBER_PROTOCOL_LOG) << "no TLS";
return NoTLS; return NoTLS;
} }
...@@ -652,7 +651,7 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr ...@@ -652,7 +651,7 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr
*/ */
if ( QCA::isSupported ("tls") ) if ( QCA::isSupported ("tls") )
{ {
kDebug() << "QCA tls"; qCDebug(JABBER_PROTOCOL_LOG) << "QCA tls";
if (d->jabberTLS == 0) if (d->jabberTLS == 0)
d->jabberTLS = new QCA::TLS; d->jabberTLS = new QCA::TLS;
d->jabberTLS->setTrustedCertificates(QCA::systemStore()); d->jabberTLS->setTrustedCertificates(QCA::systemStore());
...@@ -702,7 +701,7 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr ...@@ -702,7 +701,7 @@ JabberClient::ErrorCode JabberClient::connect ( const XMPP::Jid &jid, const QStr