summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-06 07:12:45 +0200
committerPali Roh├ír <[email protected]>2017-12-22 09:10:29 +0100
commit1bde39f6fabc37adcc375e1b235744651f690140 (patch)
treeada009ba42462f9feb89005303c9a6abf724900e
parent563bab2b636c0100884c1ce08f47748b45b3254b (diff)
Port to qCDebug
-rw-r--r--libkopete/connectionmanager.cpp16
-rw-r--r--libkopete/contactlist/kopetecontactliststorage.h2
-rw-r--r--libkopete/kopeteaccountmanager.cpp2
-rw-r--r--libkopete/kopeteavatarmanager.cpp2
-rw-r--r--libkopete/kopetechatsession.cpp8
-rw-r--r--libkopete/kopetecommand.cpp2
-rw-r--r--libkopete/kopetecontactlist.cpp2
-rw-r--r--libkopete/kopetecontactlistelement.cpp2
-rw-r--r--libkopete/kopetefileengine.cpp2
-rw-r--r--libkopete/kopeteglobal.cpp18
-rw-r--r--libkopete/kopeteidentitymanager.cpp2
-rw-r--r--libkopete/kopeteidletimer.cpp6
-rw-r--r--libkopete/kopeteinfoevent.cpp2
-rw-r--r--libkopete/kopetemessage.cpp10
-rw-r--r--libkopete/kopetemessageevent.cpp2
-rw-r--r--libkopete/kopetemessagehandlerchain.cpp2
-rw-r--r--libkopete/kopetemetacontact.cpp2
-rw-r--r--libkopete/kopetemimetypehandler.cpp2
-rw-r--r--libkopete/kopeteonlinestatus.cpp2
-rw-r--r--libkopete/kopetepassword.cpp2
-rw-r--r--libkopete/kopetepicture.cpp2
-rw-r--r--libkopete/kopeteproperties.cpp2
-rw-r--r--libkopete/kopeteproperty.cpp12
-rw-r--r--libkopete/kopetepropertycontainer.cpp2
-rw-r--r--libkopete/kopeteprotocol.cpp2
-rw-r--r--libkopete/kopetesockettimeoutwatcher.cpp8
-rw-r--r--libkopete/kopetetransfermanager.cpp2
-rw-r--r--libkopete/kopeteutils.cpp2
-rw-r--r--libkopete/networkstatuscommon.cpp8
-rw-r--r--libkopete/private/kopeteutils_private.cpp2
-rw-r--r--libkopete/private/kopeteviewmanager.cpp14
-rw-r--r--libkopete/tasks/kopetecontacttaskbase.cpp2
-rw-r--r--libkopete/tasks/kopetedeletecontacttask.cpp2
-rw-r--r--libkopete/tasks/kopetetask.cpp2
-rw-r--r--libkopete/tests/kopetemessage_test.cpp6
-rw-r--r--libkopete/tests/kopetepasswordtest_program.cpp2
-rw-r--r--libkopete/tests/kopetetask_test.cpp2
-rw-r--r--libkopete/tests/kopetewallettest_program.cpp2
-rw-r--r--libkopete/ui/accountselector.cpp2
-rw-r--r--libkopete/ui/addressbookselectorwidget.cpp2
-rw-r--r--libkopete/ui/addresseeitem.cpp2
-rw-r--r--libkopete/ui/kopetelistview.cpp6
-rw-r--r--libkopete/ui/kopetelistviewitem.cpp12
-rw-r--r--libkopete/ui/metacontactselectorwidget.cpp2
-rw-r--r--libkopete/ui/webcamwidget.cpp2
45 files changed, 95 insertions, 95 deletions
diff --git a/libkopete/connectionmanager.cpp b/libkopete/connectionmanager.cpp
index 941204c..9f95f49 100644
--- a/libkopete/connectionmanager.cpp
+++ b/libkopete/connectionmanager.cpp
@@ -17,7 +17,7 @@
#include "connectionmanager.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <klocale.h>
#include <kmessagebox.h>
@@ -64,28 +64,28 @@ void ConnectionManager::initialise()
void ConnectionManager::updateStatus()
{
NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status(QString());
- kDebug();
+ qCDebug(LIBKOPETE_LOG);
switch (daemonStatus) {
case NetworkStatus::Offline:
case NetworkStatus::OfflineFailed:
case NetworkStatus::OfflineDisconnected:
case NetworkStatus::ShuttingDown:
if (d->m_state == Online) {
- kDebug() << "STATE IS PENDING";
+ qCDebug(LIBKOPETE_LOG) << "STATE IS PENDING";
d->m_state = Pending;
} else {
- kDebug() << "STATE IS OFFLINE";
+ qCDebug(LIBKOPETE_LOG) << "STATE IS OFFLINE";
d->m_state = Offline;
}
break;
case NetworkStatus::Establishing:
case NetworkStatus::Online:
- kDebug() << "STATE IS ONLINE";
+ qCDebug(LIBKOPETE_LOG) << "STATE IS ONLINE";
d->m_state = Online;
break;
case NetworkStatus::NoNetworks:
case NetworkStatus::Unreachable:
- kDebug() << "STATE IS INACTIVE";
+ qCDebug(LIBKOPETE_LOG) << "STATE IS INACTIVE";
d->m_state = Inactive;
break;
}
@@ -114,7 +114,7 @@ NetworkStatus::EnumStatus ConnectionManager::status(const QString &host)
NetworkStatus::EnumRequestResult ConnectionManager::requestConnection(QWidget *mainWidget, const QString &host, bool userInitiated)
{
- kDebug();
+ qCDebug(LIBKOPETE_LOG);
NetworkStatus::EnumRequestResult result;
// if offline and the user has previously indicated they didn't want any new connections, suppress it
if (d->m_state == Offline && !userInitiated && d->m_userInitiatedOnly) {
@@ -144,7 +144,7 @@ void ConnectionManager::relinquishConnection(const QString &host)
void ConnectionManager::slotStatusChanged(QString host, int status)
{
- kDebug();
+ qCDebug(LIBKOPETE_LOG);
updateStatus();
// reset user initiated only flag if we are now online
if (d->m_state == Online) {
diff --git a/libkopete/contactlist/kopetecontactliststorage.h b/libkopete/contactlist/kopetecontactliststorage.h
index 9531d55..a6cf7b8 100644
--- a/libkopete/contactlist/kopetecontactliststorage.h
+++ b/libkopete/contactlist/kopetecontactliststorage.h
@@ -61,7 +61,7 @@ public:
*
* if( !storage->isValid() )
* {
- * qDebug() << "Contact list storage failed. Reason: " << storage->errorMessage();
+ * qCDebug(LIBKOPETE_LOG) << "Contact list storage failed. Reason: " << storage->errorMessage();
* }
* @endcode
*
diff --git a/libkopete/kopeteaccountmanager.cpp b/libkopete/kopeteaccountmanager.cpp
index 8d3a4a5..abcb3b7 100644
--- a/libkopete/kopeteaccountmanager.cpp
+++ b/libkopete/kopeteaccountmanager.cpp
@@ -117,7 +117,7 @@ bool AccountManager::isAnyAccountConnected() const
void AccountManager::setOnlineStatus(uint category, const Kopete::StatusMessage &statusMessage, uint flags, bool forced)
{
- qDebug() << "category: " << category << "status title: " << statusMessage.title() << "status message: " << statusMessage.message();
+ qCDebug(LIBKOPETE_LOG) << "category: " << category << "status title: " << statusMessage.title() << "status message: " << statusMessage.message();
OnlineStatusManager::Categories categories
= (OnlineStatusManager::Categories)category;
const bool onlyChangeConnectedAccounts = (!forced && isAnyAccountConnected());
diff --git a/libkopete/kopeteavatarmanager.cpp b/libkopete/kopeteavatarmanager.cpp
index b2f1654..04b45cb 100644
--- a/libkopete/kopeteavatarmanager.cpp
+++ b/libkopete/kopeteavatarmanager.cpp
@@ -162,7 +162,7 @@ Kopete::AvatarManager::AvatarEntry AvatarManager::add(Kopete::AvatarManager::Ava
data = f.readAll();
f.close();
} else {
- qDebug() << "Warning: No valid image source!";
+ qCDebug(LIBKOPETE_LOG) << "Warning: No valid image source!";
}
// Scale avatar
diff --git a/libkopete/kopetechatsession.cpp b/libkopete/kopetechatsession.cpp
index 64cb6a5..9eebc83 100644
--- a/libkopete/kopetechatsession.cpp
+++ b/libkopete/kopetechatsession.cpp
@@ -26,7 +26,7 @@
#include <QRegExp>
#include <QPointer>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
@@ -273,7 +273,7 @@ void Kopete::ChatSession::clearChains()
Kopete::MessageHandlerChain::Ptr Kopete::ChatSession::chainForDirection(Kopete::Message::MessageDirection dir)
{
if (dir < 0 || dir >= CHAIN_COUNT) {
- kFatal(14000) << "invalid message direction " << dir;
+ qCCritical(LIBKOPETE_LOG) << "invalid message direction " << dir;
}
if (!d->chains[dir]) {
TempFactory theTempFactory;
@@ -405,7 +405,7 @@ QString Kopete::ChatSession::initLastUrl(const Kopete::Contact *c)
}
file.close();
} else {
- kDebug(14310) << "cant open lasturls file for " << c->contactId();
+ qCDebug(LIBKOPETE_LOG) << "cant open lasturls file for " << c->contactId();
}
}
if (!lastUrl.isEmpty()) {
@@ -414,7 +414,7 @@ QString Kopete::ChatSession::initLastUrl(const Kopete::Contact *c)
return QLatin1String("");
}
} else {
- kDebug(14310) << "cant find lasturls file for " << c->contactId();
+ qCDebug(LIBKOPETE_LOG) << "cant find lasturls file for " << c->contactId();
return QLatin1String("");
}
}
diff --git a/libkopete/kopetecommand.cpp b/libkopete/kopetecommand.cpp
index 027003c..25f9d5a 100644
--- a/libkopete/kopetecommand.cpp
+++ b/libkopete/kopetecommand.cpp
@@ -23,7 +23,7 @@
#include "kopeteuiglobal.h"
#include <kauthorized.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <qinputdialog.h>
#include <KLocalizedString>
#include <QIcon>
diff --git a/libkopete/kopetecontactlist.cpp b/libkopete/kopetecontactlist.cpp
index b80545b..96fad3a 100644
--- a/libkopete/kopetecontactlist.cpp
+++ b/libkopete/kopetecontactlist.cpp
@@ -29,7 +29,7 @@
// KDE includes
//#include <kcontacts/stdaddressbook.h>
#include <kapplication.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
// Kopete includes
diff --git a/libkopete/kopetecontactlistelement.cpp b/libkopete/kopetecontactlistelement.cpp
index 239bbe8..b792fda 100644
--- a/libkopete/kopetecontactlistelement.cpp
+++ b/libkopete/kopetecontactlistelement.cpp
@@ -20,7 +20,7 @@
#include "kopetecontactlistelement.h"
#include <kconfig.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include "kopeteplugin.h"
diff --git a/libkopete/kopetefileengine.cpp b/libkopete/kopetefileengine.cpp
index 36a8ced..23bada9 100644
--- a/libkopete/kopetefileengine.cpp
+++ b/libkopete/kopetefileengine.cpp
@@ -26,7 +26,7 @@
#include "kopetemetacontact.h"
#include "kopetepicture.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <kiconloader.h>
#include <QPixmap>
diff --git a/libkopete/kopeteglobal.cpp b/libkopete/kopeteglobal.cpp
index 7d98d67..72eb011 100644
--- a/libkopete/kopeteglobal.cpp
+++ b/libkopete/kopeteglobal.cpp
@@ -20,7 +20,7 @@
#include <QtCore/QLatin1String>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
#include <kio/netaccess.h>
#include <kmimetype.h>
@@ -43,7 +43,7 @@ Properties *Properties::mSelf = nullptr;
Properties *Properties::self()
{
if (!mSelf) {
- //kDebug(14000) ;
+ //qCDebug(LIBKOPETE_LOG) ;
mSelf = new Properties();
// create the templates
mSelf->fullName();
@@ -67,13 +67,13 @@ Properties *Properties::self()
Properties::Properties()
{
- kDebug(14000);
+ qCDebug(LIBKOPETE_LOG);
d = new PropertiesPrivate();
}
Properties::~Properties()
{
- kDebug(14000);
+ qCDebug(LIBKOPETE_LOG);
mSelf = nullptr;
delete d;
}
@@ -81,7 +81,7 @@ Properties::~Properties()
const PropertyTmpl &Properties::tmpl(const QString &key) const
{
if (d->mTemplates.contains(key)) {
- /*kDebug(14000) <<
+ /*qCDebug(LIBKOPETE_LOG) <<
"Found template for key = '" << key << "'" << endl;*/
return d->mTemplates[key];
} else {
@@ -92,7 +92,7 @@ const PropertyTmpl &Properties::tmpl(const QString &key) const
bool Properties::registerTemplate(const QString &key, const PropertyTmpl &tmpl)
{
if (d->mTemplates.contains(key)) {
- kDebug(14000)
+ qCDebug(LIBKOPETE_LOG)
<<"Called for EXISTING key = '" << key << "'" << endl;
return false;
} else {
@@ -103,7 +103,7 @@ bool Properties::registerTemplate(const QString &key, const PropertyTmpl &tmpl)
void Properties::unregisterTemplate(const QString &key)
{
- kDebug(14000) << "called for key: '" << key << "'";
+ qCDebug(LIBKOPETE_LOG) << "called for key: '" << key << "'";
d->mTemplates.remove(key);
}
@@ -216,11 +216,11 @@ const PropertyTmpl &Properties::photo() const
const PropertyTmpl &Properties::createProp(const QString &key, const QString &label, const QString &icon, bool persistent) const
{
- /*kDebug(14000) <<
+ /*qCDebug(LIBKOPETE_LOG) <<
"key = " << key << ", label = " << label << endl;*/
if (!d->mTemplates.contains(key)) {
-/* kDebug(14000) <<
+/* qCDebug(LIBKOPETE_LOG) <<
"CREATING NEW PropertyTmpl WITH key = " << key <<
", label = " << label << ", persisten = " << persistent << endl;*/
d->mTemplates.insert(key, PropertyTmpl(key, label, icon, persistent ? PropertyTmpl::PersistentProperty : PropertyTmpl::NoProperty));
diff --git a/libkopete/kopeteidentitymanager.cpp b/libkopete/kopeteidentitymanager.cpp
index 64e5c03..e78b060 100644
--- a/libkopete/kopeteidentitymanager.cpp
+++ b/libkopete/kopeteidentitymanager.cpp
@@ -227,7 +227,7 @@ void IdentityManager::load()
<<"Failed to create identity for '" << identityId << "'" << endl;
continue;
}
- qDebug() << "Created identity " << identityId;
+ qCDebug(LIBKOPETE_LOG) << "Created identity " << identityId;
}
// get the default identity
diff --git a/libkopete/kopeteidletimer.cpp b/libkopete/kopeteidletimer.cpp
index f27a82d..7a7f695 100644
--- a/libkopete/kopeteidletimer.cpp
+++ b/libkopete/kopeteidletimer.cpp
@@ -23,7 +23,7 @@
#include <QCursor>
#include <QDateTime>
-#include <kdebug.h>
+#include "libkopete_debug.h"
class Kopete::IdleTimer::Private
{
@@ -54,10 +54,10 @@ Kopete::IdleTimer::IdleTimer()
Kopete::IdlePlatform *p = new Kopete::IdlePlatform();
if (p->init()) {
- qDebug() << "Using platform idle timer";
+ qCDebug(LIBKOPETE_LOG) << "Using platform idle timer";
d->platform = p;
} else {
- kWarning() << "Using dummy idle timer";
+ qCWarning(LIBKOPETE_LOG) << "Using dummy idle timer";
delete p;
d->lastMousePos = QCursor::pos();
diff --git a/libkopete/kopeteinfoevent.cpp b/libkopete/kopeteinfoevent.cpp
index dcf7b28..77cd303 100644
--- a/libkopete/kopeteinfoevent.cpp
+++ b/libkopete/kopeteinfoevent.cpp
@@ -17,7 +17,7 @@
#include "kopeteinfoeventmanager.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
namespace Kopete {
class InfoEvent::Private
diff --git a/libkopete/kopetemessage.cpp b/libkopete/kopetemessage.cpp
index 071cf6c..705a958 100644
--- a/libkopete/kopetemessage.cpp
+++ b/libkopete/kopetemessage.cpp
@@ -31,7 +31,7 @@
#include <QTextDocument>
#include <QColor>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <kstringhandler.h>
#include "kopetemetacontact.h"
@@ -407,7 +407,7 @@ QString Message::escapedBody() const
QString Message::parsedBody() const
{
- //kDebug(14000) << "messageformat: " << d->format;
+ //qCDebug(LIBKOPETE_LOG) << "messageformat: " << d->format;
if (!d->parsedBodyDirty) {
return d->parsedBody;
}
@@ -776,7 +776,7 @@ QString Message::decodeString(const QByteArray &message, const QTextCodec *provi
if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= charsToCheck )
{
//All chars decodable.
- kDebug(14000) << "Using locale's codec";
+ qCDebug(LIBKOPETE_LOG) << "Using locale's codec";
return testCodec->toUnicode( message );
}
@@ -785,11 +785,11 @@ QString Message::decodeString(const QByteArray &message, const QTextCodec *provi
if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= charsToCheck )
{
//All chars decodable.
- kDebug(14000) << "Using latin1";
+ qCDebug(LIBKOPETE_LOG) << "Using latin1";
return testCodec->toUnicode( message );
}
- kDebug(14000) << "Using latin1 and cleaning string";
+ qCDebug(LIBKOPETE_LOG) << "Using latin1 and cleaning string";
//No codec decoded. Just decode latin1, and clean out any junk.
QString result = QLatin1String( message );
const uint length = message.length();
diff --git a/libkopete/kopetemessageevent.cpp b/libkopete/kopetemessageevent.cpp
index bf5e534..0a61ed7 100644
--- a/libkopete/kopetemessageevent.cpp
+++ b/libkopete/kopetemessageevent.cpp
@@ -21,7 +21,7 @@
#include "kopetemessageevent.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include "kopetemetacontact.h"
#include "kopetecontactlist.h"
diff --git a/libkopete/kopetemessagehandlerchain.cpp b/libkopete/kopetemessagehandlerchain.cpp
index 02c8cde..e0670e6 100644
--- a/libkopete/kopetemessagehandlerchain.cpp
+++ b/libkopete/kopetemessagehandlerchain.cpp
@@ -19,7 +19,7 @@
#include "kopetemessageevent.h"
#include "kopetechatsession.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <QMap>
#include <QTimer>
diff --git a/libkopete/kopetemetacontact.cpp b/libkopete/kopetemetacontact.cpp
index 8fb5532..ddc4ba3 100644
--- a/libkopete/kopetemetacontact.cpp
+++ b/libkopete/kopetemetacontact.cpp
@@ -24,7 +24,7 @@
#include <kcontacts/addressee.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
#include <kmessagebox.h>
diff --git a/libkopete/kopetemimetypehandler.cpp b/libkopete/kopetemimetypehandler.cpp
index d410622..d3dab98 100644
--- a/libkopete/kopetemimetypehandler.cpp
+++ b/libkopete/kopetemimetypehandler.cpp
@@ -21,7 +21,7 @@
#include <qwidget.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
#include <kio/netaccess.h>
#include <kmimetype.h>
diff --git a/libkopete/kopeteonlinestatus.cpp b/libkopete/kopeteonlinestatus.cpp
index 8a4ae0b..3fa2b1f 100644
--- a/libkopete/kopeteonlinestatus.cpp
+++ b/libkopete/kopeteonlinestatus.cpp
@@ -27,7 +27,7 @@
#include "kopetecontact.h"
#include <kiconloader.h>
#include <kiconeffect.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
#include <QPixmap>
#include <QIconEngineV2>
diff --git a/libkopete/kopetepassword.cpp b/libkopete/kopetepassword.cpp
index eb09695..e869277 100644
--- a/libkopete/kopetepassword.cpp
+++ b/libkopete/kopetepassword.cpp
@@ -24,7 +24,7 @@
#include <KGlobal>
#include <kconfig.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
#include <kmessagebox.h>
#include <kiconloader.h>
diff --git a/libkopete/kopetepicture.cpp b/libkopete/kopetepicture.cpp
index 5f80fdf..3c3a176 100644
--- a/libkopete/kopetepicture.cpp
+++ b/libkopete/kopetepicture.cpp
@@ -20,7 +20,7 @@
#include <QDir>
#include <kcodecs.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <qbuffer.h>
#include <QStandardPaths>
diff --git a/libkopete/kopeteproperties.cpp b/libkopete/kopeteproperties.cpp
index e6671ef..a87b3af 100644
--- a/libkopete/kopeteproperties.cpp
+++ b/libkopete/kopeteproperties.cpp
@@ -16,7 +16,7 @@
#include "kopeteproperties.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <qdom.h>
#include <qvariant.h>
diff --git a/libkopete/kopeteproperty.cpp b/libkopete/kopeteproperty.cpp
index 99a72db..5aa1c86 100644
--- a/libkopete/kopeteproperty.cpp
+++ b/libkopete/kopeteproperty.cpp
@@ -20,7 +20,7 @@
*/
#include "kopeteproperty.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include "kopeteglobal.h"
namespace Kopete {
@@ -48,7 +48,7 @@ PropertyTmpl::PropertyTmpl(const QString &key, const QString &label, const QStri
{
PropertyTmpl other = Kopete::Global::Properties::self()->tmpl(key);
if (other.isNull()) {
-// kDebug(14000) << "Creating new template for key = '" << key << "'";
+// qCDebug(LIBKOPETE_LOG) << "Creating new template for key = '" << key << "'";
d = new Private;
d->refCount = 1;
@@ -58,7 +58,7 @@ PropertyTmpl::PropertyTmpl(const QString &key, const QString &label, const QStri
d->options = options;
Kopete::Global::Properties::self()->registerTemplate(key, (*this));
} else {
-// kDebug(14000) << "Using existing template for key = '" << key << "'";
+// qCDebug(LIBKOPETE_LOG) << "Using existing template for key = '" << key << "'";
d = other.d;
d->refCount++;
}
@@ -74,11 +74,11 @@ PropertyTmpl &PropertyTmpl::operator=(
const PropertyTmpl &other)
{
if (this == &other) {
-// kDebug(14000) << "trying to assign this to itself!";
+// qCDebug(LIBKOPETE_LOG) << "trying to assign this to itself!";
return *this;
}
if (d == other.d) {
-// kDebug(14000) << "trying to assign d to itself!";
+// qCDebug(LIBKOPETE_LOG) << "trying to assign d to itself!";
return *this;
}
d->refCount--;
@@ -202,7 +202,7 @@ Property::~Property()
Property &Property::operator=(const Property &other)
{
if (this == &other) {
-// kDebug(14000) << "trying to assign this to itself!";
+// qCDebug(LIBKOPETE_LOG) << "trying to assign this to itself!";
return *this;
}
diff --git a/libkopete/kopetepropertycontainer.cpp b/libkopete/kopetepropertycontainer.cpp
index a70b4e1..db2d62b 100644
--- a/libkopete/kopetepropertycontainer.cpp
+++ b/libkopete/kopetepropertycontainer.cpp
@@ -125,7 +125,7 @@ const Kopete::Property &PropertyContainer::property(
void PropertyContainer::setProperty(const Kopete::PropertyTmpl &tmpl, const QVariant &value)
{
if (tmpl.isNull() || tmpl.key().isEmpty()) {
- kDebug(14000)
+ qCDebug(LIBKOPETE_LOG)
<<"No valid template for property passed!" << endl;
return;
}
diff --git a/libkopete/kopeteprotocol.cpp b/libkopete/kopeteprotocol.cpp
index fe8e3f7..caff1e6 100644
--- a/libkopete/kopeteprotocol.cpp
+++ b/libkopete/kopeteprotocol.cpp
@@ -19,7 +19,7 @@
#include "kopeteprotocol.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
#include <kjob.h>
diff --git a/libkopete/kopetesockettimeoutwatcher.cpp b/libkopete/kopetesockettimeoutwatcher.cpp
index 2084c70..d245b35 100644
--- a/libkopete/kopetesockettimeoutwatcher.cpp
+++ b/libkopete/kopetesockettimeoutwatcher.cpp
@@ -21,7 +21,7 @@
#include <netinet/tcp.h>
#endif
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <QAbstractSocket>
#include <QTimer>
@@ -33,7 +33,7 @@ QSet<QAbstractSocket *> SocketTimeoutWatcher::watchedSocketSet;
SocketTimeoutWatcher *SocketTimeoutWatcher::watch(QAbstractSocket *socket, quint32 msecTimeout)
{
if (watchedSocketSet.contains(socket)) {
- qDebug() << "Socket is already being watched " << socket;
+ qCDebug(LIBKOPETE_LOG) << "Socket is already being watched " << socket;
return 0;
}
@@ -91,7 +91,7 @@ void SocketTimeoutWatcher::ackTimeoutCheck()
if (info.tcpi_last_ack_recv < info.tcpi_last_data_sent || info.tcpi_last_data_sent <= 0) {
mAckCheckTimer->stop();
} else if (info.tcpi_last_ack_recv > info.tcpi_last_data_sent && info.tcpi_last_data_sent > mTimeoutThreshold) {
- kWarning() << "Connection timeout for " << mSocket->peerAddress();
+ qCWarning(LIBKOPETE_LOG) << "Connection timeout for " << mSocket->peerAddress();
mAckCheckTimer->stop();
emit error(QAbstractSocket::RemoteHostClosedError);
emit errorInt(QAbstractSocket::RemoteHostClosedError);
@@ -104,7 +104,7 @@ void SocketTimeoutWatcher::ackTimeoutCheck()
if (mActive) {
mAckCheckTimer->stop();
mActive = false;
- kWarning() << "Timeout watcher not active for " << mSocket->peerAddress();
+ qCWarning(LIBKOPETE_LOG) << "Timeout watcher not active for " << mSocket->peerAddress();
}
} else {
mAckCheckTimer->stop();
diff --git a/libkopete/kopetetransfermanager.cpp b/libkopete/kopetetransfermanager.cpp
index dcb2469..53d000d 100644
--- a/libkopete/kopetetransfermanager.cpp
+++ b/libkopete/kopetetransfermanager.cpp
@@ -178,7 +178,7 @@ void Kopete::Transfer::slotNextFile(const QString &sourceFile, const QString &de
QUrl src;
QUrl dest;
- //qDebug() << "source: " << sourceFile << " destination: " << destinationFile;
+ //qCDebug(LIBKOPETE_LOG) << "source: " << sourceFile << " destination: " << destinationFile;
if (d->info.direction() == Kopete::FileTransferInfo::Incoming) {
QUrl url(sourceFile);
src = displayURL(d->info.contact(), url.fileName());
diff --git a/libkopete/kopeteutils.cpp b/libkopete/kopeteutils.cpp
index d22cf73..c7bb09a 100644
--- a/libkopete/kopeteutils.cpp
+++ b/libkopete/kopeteutils.cpp
@@ -23,7 +23,7 @@
#include <kmessagebox.h>
#include <kmessagebox_queued.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <kiconloader.h>
#include <KLocalizedString>
diff --git a/libkopete/networkstatuscommon.cpp b/libkopete/networkstatuscommon.cpp
index b9b871f..2aace6b 100644
--- a/libkopete/networkstatuscommon.cpp
+++ b/libkopete/networkstatuscommon.cpp
@@ -1,9 +1,9 @@
#include "networkstatuscommon.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
QDataStream & operator<<(QDataStream &s, const NetworkStatus::Properties p)
{
- kDebug() << "status is: " << (int)p.status;
+ qCDebug(LIBKOPETE_LOG) << "status is: " << (int)p.status;
s << (int)p.status;
s << (int)p.onDemandPolicy;
s << p.service;
@@ -16,7 +16,7 @@ QDataStream &operator>>(QDataStream &s, NetworkStatus::Properties &p)
{
int status, onDemandPolicy, internet;
s >> status;
- kDebug() << "status is: " << status;
+ qCDebug(LIBKOPETE_LOG) << "status is: " << status;
p.status = (NetworkStatus::EnumStatus)status;
s >> onDemandPolicy;
p.onDemandPolicy = (NetworkStatus::EnumOnDemandPolicy)onDemandPolicy;
@@ -28,6 +28,6 @@ QDataStream &operator>>(QDataStream &s, NetworkStatus::Properties &p)
p.internet = false;
}
s >> p.netmasks;
- kDebug() << "enum converted status is: " << p.status;
+ qCDebug(LIBKOPETE_LOG) << "enum converted status is: " << p.status;
return s;
}
diff --git a/libkopete/private/kopeteutils_private.cpp b/libkopete/private/kopeteutils_private.cpp
index 2b4edad..742d09a 100644
--- a/libkopete/private/kopeteutils_private.cpp
+++ b/libkopete/private/kopeteutils_private.cpp
@@ -20,7 +20,7 @@
#include <kmessagebox.h>
#include <kmessagebox_queued.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include "knotification.h"
#include "kopeteuiglobal.h"
diff --git a/libkopete/private/kopeteviewmanager.cpp b/libkopete/private/kopeteviewmanager.cpp
index a23e08c..22ed986 100644
--- a/libkopete/private/kopeteviewmanager.cpp
+++ b/libkopete/private/kopeteviewmanager.cpp
@@ -20,7 +20,7 @@
#include <QtAlgorithms>
#include <kconfig.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <KLocalizedString>
#include <kplugininfo.h>
#include <knotification.h>
@@ -87,7 +87,7 @@ static QString squashMessage(const Kopete::Message &msg, const int len = 30)
fullUrl.length(), shorterUrl);
}
}
- kDebug(14000) << msgText;
+ qCDebug(LIBKOPETE_LOG) << msgText;
return msgText;
}
@@ -151,7 +151,7 @@ KopeteViewManager::KopeteViewManager()
KopeteViewManager::~KopeteViewManager()
{
-// kDebug(14000) ;
+// qCDebug(LIBKOPETE_LOG) ;
//delete all open chatwindow.
SessionMap::Iterator it;
@@ -179,7 +179,7 @@ void KopeteViewManager::slotPrefsChanged()
KopeteView *KopeteViewManager::view(Kopete::ChatSession *session, const QString &requestedPlugin)
{
- // kDebug(14000) ;
+ // qCDebug(LIBKOPETE_LOG) ;
if (d->sessionMap.contains(session) && d->sessionMap[ session ]) {
return d->sessionMap[ session ];
@@ -192,7 +192,7 @@ KopeteView *KopeteViewManager::view(Kopete::ChatSession *session, const QString
viewPlugin = (Kopete::ViewPlugin *)pluginManager->loadPlugin(pluginName);
if (!viewPlugin) {
- kWarning(14000) << "Requested view plugin, " << pluginName
+ qCWarning(LIBKOPETE_LOG) << "Requested view plugin, " << pluginName
<< ", was not found. Falling back to chat window plugin" << endl;
}
}
@@ -212,7 +212,7 @@ KopeteView *KopeteViewManager::view(Kopete::ChatSession *session, const QString
return newView;
} else {
- kError(14000) << "Could not create a view, no plugins available!" << endl;
+ qCCritical(LIBKOPETE_LOG) << "Could not create a view, no plugins available!" << endl;
return nullptr;
}
}
@@ -440,7 +440,7 @@ void KopeteViewManager::slotEventDeleted(Kopete::MessageEvent *event)
// d->eventList.remove( event );
d->eventList.removeAll(event);
-// kDebug(14000) ;
+// qCDebug(LIBKOPETE_LOG) ;
Kopete::ChatSession *kmm = event->message().manager();
if (!kmm) {
// this can be NULL for example if KopeteViewManager::slotViewActivated()
diff --git a/libkopete/tasks/kopetecontacttaskbase.cpp b/libkopete/tasks/kopetecontacttaskbase.cpp
index 1c5d34b..ac3fb9d 100644
--- a/libkopete/tasks/kopetecontacttaskbase.cpp
+++ b/libkopete/tasks/kopetecontacttaskbase.cpp
@@ -20,7 +20,7 @@
#include <QtCore/QPointer>
// KDE includes
-#include <kdebug.h>
+#include "libkopete_debug.h"
// Kopete includes
#include <kopetecontact.h>
diff --git a/libkopete/tasks/kopetedeletecontacttask.cpp b/libkopete/tasks/kopetedeletecontacttask.cpp
index 4812ee7..ea2adc4 100644
--- a/libkopete/tasks/kopetedeletecontacttask.cpp
+++ b/libkopete/tasks/kopetedeletecontacttask.cpp
@@ -19,7 +19,7 @@
// Qt includes
// KDE includes
-#include <kdebug.h>
+#include "libkopete_debug.h"
// Kopete includes
#include <kopeteaccount.h>
diff --git a/libkopete/tasks/kopetetask.cpp b/libkopete/tasks/kopetetask.cpp
index ab48b25..6cf2b77 100644
--- a/libkopete/tasks/kopetetask.cpp
+++ b/libkopete/tasks/kopetetask.cpp
@@ -18,7 +18,7 @@
#include "kopetetask.h"
-#include <kdebug.h>
+#include "libkopete_debug.h"
namespace Kopete {
class Task::Private
diff --git a/libkopete/tests/kopetemessage_test.cpp b/libkopete/tests/kopetemessage_test.cpp
index 350bbfb..a590e9c 100644
--- a/libkopete/tests/kopetemessage_test.cpp
+++ b/libkopete/tests/kopetemessage_test.cpp
@@ -30,7 +30,7 @@
#include <kcomponentdata.h>
#include <kprocess.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include "kopeteaccount_mock.h"
#include "kopeteprotocol_mock.h"
@@ -264,11 +264,11 @@ void KopeteMessage_Test::testLinkParser()
// if the test case begins with broken, we expect it to fail, then use XFAIL
// otherwise use QCOMPARE
if (fileName.section('-', 0, 0) == QString::fromLatin1("broken")) {
- //kDebug() << "checking known-broken testcase: " << fileName;
+ //qCDebug(LIBKOPETE_LOG) << "checking known-broken testcase: " << fileName;
QEXPECT_FAIL("", "Checking know-broken testcase", Continue);
QCOMPARE(result, expectedData);
} else {
- //kDebug() << "checking known-working testcase: " << fileName;
+ //qCDebug(LIBKOPETE_LOG) << "checking known-working testcase: " << fileName;
QCOMPARE(result, expectedData);
}
} else {
diff --git a/libkopete/tests/kopetepasswordtest_program.cpp b/libkopete/tests/kopetepasswordtest_program.cpp
index 0e507a1..8485aed 100644
--- a/libkopete/tests/kopetepasswordtest_program.cpp
+++ b/libkopete/tests/kopetepasswordtest_program.cpp
@@ -23,7 +23,7 @@
#include <kaboutdata.h>
#include <kcmdlineargs.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <kglobal.h>
#include <klocale.h>
diff --git a/libkopete/tests/kopetetask_test.cpp b/libkopete/tests/kopetetask_test.cpp
index 4593a67..844dd6a 100644
--- a/libkopete/tests/kopetetask_test.cpp
+++ b/libkopete/tests/kopetetask_test.cpp
@@ -21,7 +21,7 @@
#include <QTimer>
#include <kcmdlineargs.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <kopetetask.h>
#include <kopeteemoticons.h>
diff --git a/libkopete/tests/kopetewallettest_program.cpp b/libkopete/tests/kopetewallettest_program.cpp
index afd41c8..8bc1b65 100644
--- a/libkopete/tests/kopetewallettest_program.cpp
+++ b/libkopete/tests/kopetewallettest_program.cpp
@@ -21,7 +21,7 @@
#include <kaboutdata.h>
#include <kcmdlineargs.h>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <kglobal.h>
#include <dcopclient.h>
diff --git a/libkopete/ui/accountselector.cpp b/libkopete/ui/accountselector.cpp
index 92e9cd0..a3c4087 100644
--- a/libkopete/ui/accountselector.cpp
+++ b/libkopete/ui/accountselector.cpp
@@ -25,7 +25,7 @@
#include <qlayout.h>
#include <QVBoxLayout>
-#include <kdebug.h>
+#include "libkopete_debug.h"
class AccountListViewItem : public QTreeWidgetItem
{
diff --git a/libkopete/ui/addressbookselectorwidget.cpp b/libkopete/ui/addressbookselectorwidget.cpp
index e7a5f8d..ec1d5e1 100644
--- a/libkopete/ui/addressbookselectorwidget.cpp
+++ b/libkopete/ui/addressbookselectorwidget.cpp
@@ -32,7 +32,7 @@
#include <qinputdialog.h>
#include <QPushButton>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <ktreewidgetsearchline.h>
#include <qlabel.h>
#include <qcheckbox.h>
diff --git a/libkopete/ui/addresseeitem.cpp b/libkopete/ui/addresseeitem.cpp
index 5bf3813..2bbc95a 100644
--- a/libkopete/ui/addresseeitem.cpp
+++ b/libkopete/ui/addresseeitem.cpp
@@ -25,7 +25,7 @@
#include <QPixmap>
#include <QIcon>
-#include <kdebug.h>
+#include "libkopete_debug.h"
AddresseeItem::AddresseeItem(QTreeWidget *parent, const KContacts::Addressee &addressee)
: QTreeWidgetItem(parent)
diff --git a/libkopete/ui/kopetelistview.cpp b/libkopete/ui/kopetelistview.cpp
index 3d9e445..f7b487d 100644
--- a/libkopete/ui/kopetelistview.cpp
+++ b/libkopete/ui/kopetelistview.cpp
@@ -35,7 +35,7 @@
#include <QTimer>
#include <QToolTip>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <kde_file.h>
#include <utility>
@@ -182,7 +182,7 @@ ListView::~ListView()
void ListView::slotDoubleClicked(QTreeWidgetItem *item)
{
- kDebug(14000);
+ qCDebug(LIBKOPETE_LOG);
if (item) {
item->setExpanded(!item->isExpanded());
@@ -228,7 +228,7 @@ void ListView::keyPressEvent(QKeyEvent *e)
{
QTreeWidgetItem *item = currentItem();
if ((e->key() == Qt::Key_F2) && item && !(item->isHidden())) {
- qDebug() << "\nHelp !" << "\n";
+ qCDebug(LIBKOPETE_LOG) << "\nHelp !" << "\n";
//FIXME: rename( item, 0 );
} else if ((e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) && item && !(item->isHidden())) {
// must provide a point within the item; emitExecute checks for this
diff --git a/libkopete/ui/kopetelistviewitem.cpp b/libkopete/ui/kopetelistviewitem.cpp
index fdde988..6e2bed6 100644
--- a/libkopete/ui/kopetelistviewitem.cpp
+++ b/libkopete/ui/kopetelistviewitem.cpp
@@ -275,7 +275,7 @@ void Component::layout(const QRect &newRect)
d->startRect = rect();
}
d->targetRect = newRect;
- //kDebug(14000) << "At " << rect;
+ //qCDebug(LIBKOPETE_LOG) << "At " << rect;
}
void Component::setRect(const QRect &rect)
@@ -919,7 +919,7 @@ public:
if (users++ == 0) {
start(period);
}
- //kDebug(14000) << "SharedTimer::attach: users is now " << users << "\n";
+ //qCDebug(LIBKOPETE_LOG) << "SharedTimer::attach: users is now " << users << "\n";
}
void detach(QObject *target, const char *slot)
@@ -928,7 +928,7 @@ public:
if (--users == 0) {
stop();
}
- //kDebug(14000) << "SharedTimer::detach: users is now " << users << "\n";
+ //qCDebug(LIBKOPETE_LOG) << "SharedTimer::detach: users is now " << users << "\n";
}
};
@@ -1096,7 +1096,7 @@ void Item::slotLayoutItems()
int height = component(n)->heightForWidth(width);
component(n)->layout(QRect(0, 0, width, height));
- //kDebug(14000) << "Component " << n << " is " << width << " x " << height;
+ //qCDebug(LIBKOPETE_LOG) << "Component " << n << " is " << width << " x " << height;
}
if (Private::animateChanges && d->animateLayout && !d->visibilityTimer.isActive()) {
@@ -1146,7 +1146,7 @@ void Item::setSearchMatch(bool match, bool searching)
if (!match) {
mySetVisible(false);
} else {
- /*kDebug(14000) << " match: " << match << ", vis timer active: " << d->visibilityTimer.isActive()
+ /*qCDebug(LIBKOPETE_LOG) << " match: " << match << ", vis timer active: " << d->visibilityTimer.isActive()
<< ", target visibility: " << targetVisibility() << endl;*/
if (d->visibilityTimer.isActive() || searching) {
mySetVisible(true);
@@ -1235,7 +1235,7 @@ void Item::setHeight(int)
for (uint n = 0; n < components(); ++n) {
minHeight = qMax(minHeight, component(n)->rect().height());
}
- //kDebug(14000) << "Height is " << minHeight;
+ //qCDebug(LIBKOPETE_LOG) << "Height is " << minHeight;
if (Private::foldVisibility && d->visibilityTimer.isActive()) {
int vis = d->visibilityLevel;
if (vis > Private::visibilityFoldSteps) {
diff --git a/libkopete/ui/metacontactselectorwidget.cpp b/libkopete/ui/metacontactselectorwidget.cpp
index 3d49979..96cbef7 100644
--- a/libkopete/ui/metacontactselectorwidget.cpp
+++ b/libkopete/ui/metacontactselectorwidget.cpp
@@ -32,7 +32,7 @@
#include <kiconloader.h>
#include <QPushButton>
-#include <kdebug.h>
+#include "libkopete_debug.h"
#include <QTreeWidget>
#include <ktreewidgetsearchline.h>
diff --git a/libkopete/ui/webcamwidget.cpp b/libkopete/ui/webcamwidget.cpp
index 9aa5ec4..a5e81c1 100644
--- a/libkopete/ui/webcamwidget.cpp
+++ b/libkopete/ui/webcamwidget.cpp
@@ -20,7 +20,7 @@
#include <QPainter>
#include <QPaintEvent>
-#include <kdebug.h>
+#include "libkopete_debug.h"
namespace Kopete {
WebcamWidget::WebcamWidget(QWidget *parent)
: QWidget(parent)