[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-runtime/frameworks] /: kdebug--
From: Montel Laurent <montel () kde ! org>
Date: 2014-08-04 5:29:39
Message-ID: E1XEAq3-0004eZ-3z () scm ! kde ! org
[Download RAW message or body]
Git commit 9b6f770468b8deedc7fdce9db03ee6f97845ab3e by Montel Laurent.
Committed on 04/08/2014 at 05:29.
Pushed by mlaurent into branch 'frameworks'.
kdebug--
M +1 -1 agents/invitations/invitationsagent.cpp
M +1 -1 agents/maildispatcher/maildispatcheragent.cpp
M +1 -1 agents/maildispatcher/outboxqueue.cpp
M +1 -1 agents/maildispatcher/sentactionhandler.cpp
M +1 -1 agents/maildispatcher/storeresultjob.cpp
M +4 -4 agents/migration/migrationscheduler.cpp
M +1 -1 agents/migration/migrationstatuswidget.cpp
M +1 -1 agents/newmailnotifier/newmailnotifieragent.cpp
M +1 -1 agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp
M +1 -1 agents/newmailnotifier/specialnotifierjob.cpp
M +1 -0 migration/kmail/CMakeLists.txt
M +2 -2 qml/akonadi/tests/qmltest.cpp
M +4 -4 qml/kde/kdeintegrationplugin.cpp
M +2 -2 qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp
M +1 -1 qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.h
M +5 -4 resources/contacts/contactsresource.cpp
M +1 -1 resources/dav/common/davcollectionmodifyjob.cpp
M +2 -2 resources/dav/common/davmanager.cpp
M +1 -1 resources/dav/common/davprincipalsearchjob.cpp
M +1 -1 resources/dav/common/etagcache.cpp
M +1 -1 resources/dav/resource/davgroupwareresource.cpp
M +2 -2 resources/dav/resource/searchdialog.cpp
M +1 -1 resources/dav/resource/setupwizard.cpp
M +5 -5 resources/facebook/facebookresource.cpp
M +4 -4 resources/facebook/facebookresource_friends.cpp
M +2 -2 resources/facebook/facebookresource_notifications.cpp
M +2 -2 resources/facebook/facebookresource_posts.cpp
M +1 -1 resources/facebook/serializer/akonadi_serializer_socialnotification.cpp
M +1 -1 resources/gmail/gmailpasswordrequester.cpp
M +1 -1 resources/google/common/googleaccountmanager.cpp
M +1 -1 resources/google/common/googlesettingsdialog.cpp
M +1 -1 resources/google/contacts/contactsresource.cpp
M +1 -1 resources/google/contacts/settingsdialog.cpp
M +1 -1 resources/ical/notes/notesresource.cpp
M +4 -4 resources/ical/shared/icalresource.cpp
M +10 -10 resources/ical/shared/icalresourcebase.cpp
M +4 -4 resources/icaldir/icaldirresource.cpp
M +1 -1 resources/kdeaccounts/kdeaccountsresource.cpp
M +12 -12 resources/kolab/kolabhelpers.cpp
M +2 -2 resources/kolab/kolabmessagehelper.cpp
M +2 -2 resources/kolab/kolabresourcestate.cpp
M +3 -3 resources/kolab/kolabretrievecollectionstask.cpp
M +4 -4 resources/kolabproxy/freebusyupdatehandler.cpp
M +7 -7 resources/kolabproxy/imapitemaddedjob.cpp
M +2 -2 resources/kolabproxy/itemaddedjob.cpp
M +6 -6 resources/kolabproxy/itemchangedjob.cpp
M +17 -17 resources/kolabproxy/kolabproxyresource.cpp
M +4 -4 resources/kolabproxy/revertitemchangesjob.cpp
M +5 -5 resources/kolabproxy/setupdefaultfoldersjob.cpp
M +5 -5 resources/kolabproxy/tests/proxyintegrationtest.cpp
M +1 -1 resources/kolabproxy/tests/testutils.cpp
M +11 -11 resources/kolabproxy/upgradejob.cpp
M +2 -2 resources/mailtransport_dummy/mtdummyresource.cpp
M +1 -0 resources/mixedmaildir/CMakeLists.txt
M +10 -10 resources/mixedmaildir/autotests/testdatautil.cpp
M +1 -0 resources/mixedmaildir/kmindexreader/CMakeLists.txt
M +22 -21 resources/mixedmaildir/kmindexreader/kmindexreader.cpp
A +23 -0 resources/mixedmaildir/mixedmaildir_debug.cpp [License: LGPL \
(v2+)] A +27 -0 resources/mixedmaildir/mixedmaildir_debug.h [License: LGPL \
(v2+)] M +48 -47 resources/mixedmaildir/mixedmaildirresource.cpp
M +98 -97 resources/mixedmaildir/mixedmaildirstore.cpp
M +10 -9 resources/mixedmaildir/retrieveitemsjob.cpp
M +1 -1 resources/shared/collectionannotationsattribute.cpp
M +3 -3 resources/shared/createandsettagsjob.cpp
M +73 -73 resources/shared/filestore/abstractlocalstore.cpp
M +6 -6 resources/shared/filestore/sessionimpls.cpp
M +1 -1 resources/shared/getcredentialsjob.cpp
M +2 -2 resources/shared/imapquotaattribute.cpp
M +12 -12 resources/shared/singlefileresource.h
M +1 -1 resources/shared/singlefileresourcebase.cpp
M +1 -1 resources/vcarddir/vcarddirresource.cpp
http://commits.kde.org/kdepim-runtime/9b6f770468b8deedc7fdce9db03ee6f97845ab3e
diff --git a/agents/invitations/invitationsagent.cpp \
b/agents/invitations/invitationsagent.cpp index d5ccbda..fd9cb50 100644
--- a/agents/invitations/invitationsagent.cpp
+++ b/agents/invitations/invitationsagent.cpp
@@ -44,7 +44,7 @@
#include <KCalCore/Todo>
#include <KConfig>
#include <KConfigSkeleton>
-#include <KDebug>
+#include <QDebug>
#include <KJob>
#include <KLocalizedString>
#include <KMime/Content>
diff --git a/agents/maildispatcher/maildispatcheragent.cpp \
b/agents/maildispatcher/maildispatcheragent.cpp index d385aa7..94bf813 100644
--- a/agents/maildispatcher/maildispatcheragent.cpp
+++ b/agents/maildispatcher/maildispatcheragent.cpp
@@ -34,7 +34,7 @@
#include <mailtransport/sentactionattribute.h>
#include <knotifyconfigwidget.h>
-#include <KDebug>
+#include <QDebug>
#include <QIcon>
#include <KLocalizedString>
#include <KLocalizedString>
diff --git a/agents/maildispatcher/outboxqueue.cpp \
b/agents/maildispatcher/outboxqueue.cpp index fc72323..3204bb2 100644
--- a/agents/maildispatcher/outboxqueue.cpp
+++ b/agents/maildispatcher/outboxqueue.cpp
@@ -23,7 +23,7 @@
#include <QSet>
#include <QTimer>
-#include <KDebug>
+#include <QDebug>
#include <KLocalizedString>
#include <Attribute>
diff --git a/agents/maildispatcher/sentactionhandler.cpp \
b/agents/maildispatcher/sentactionhandler.cpp index b8010eb..d37e6b9 100644
--- a/agents/maildispatcher/sentactionhandler.cpp
+++ b/agents/maildispatcher/sentactionhandler.cpp
@@ -24,7 +24,7 @@
#include <itemfetchjob.h>
#include <itemmodifyjob.h>
#include <Akonadi/KMime/MessageFlags>
-#include <KDebug>
+#include <QDebug>
using namespace MailTransport;
diff --git a/agents/maildispatcher/storeresultjob.cpp \
b/agents/maildispatcher/storeresultjob.cpp index 671b4a1..ffb4208 100644
--- a/agents/maildispatcher/storeresultjob.cpp
+++ b/agents/maildispatcher/storeresultjob.cpp
@@ -23,7 +23,7 @@
#include <ItemFetchJob>
#include <ItemModifyJob>
#include <Akonadi/KMime/MessageFlags>
-#include <KDebug>
+#include <QDebug>
#include <KLocalizedString>
#include <mailtransport/errorattribute.h>
#include <mailtransport/dispatchmodeattribute.h>
diff --git a/agents/migration/migrationscheduler.cpp \
b/agents/migration/migrationscheduler.cpp index 41e636a..8c7bc22 100644
--- a/agents/migration/migrationscheduler.cpp
+++ b/agents/migration/migrationscheduler.cpp
@@ -22,7 +22,7 @@
#include "migrationscheduler.h"
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <QIcon>
#include <KJobTrackerInterface>
@@ -62,7 +62,7 @@ void LogModel::message(MigratorBase::MessageType type, const \
QString &msg) break;
}
default:
- kError() << "unknown type " << type;
+ qCritical() << "unknown type " << type;
}
}
@@ -116,7 +116,7 @@ void MigratorModel::columnChanged(const Row &row, int col)
bool MigratorModel::addMigrator(const QSharedPointer<MigratorBase> &m)
{
if (migrator(m->identifier())) {
- kWarning() << "Model already contains a migrator with the identifier: " << \
m; + qWarning() << "Model already contains a migrator with the identifier: " \
<< m; return false;
}
const int pos = mMigrators.size();
@@ -174,7 +174,7 @@ QVariant MigratorModel::data(const QModelIndex &index, int role) \
const const Row *row = static_cast<Row*>(index.internalPointer());
const QSharedPointer<MigratorBase> migrator(row->mMigrator);
if (!migrator) {
- kWarning() << "migrator not found";
+ qWarning() << "migrator not found";
return QVariant();
}
switch (role) {
diff --git a/agents/migration/migrationstatuswidget.cpp \
b/agents/migration/migrationstatuswidget.cpp index 75d25c7..90af5c8 100644
--- a/agents/migration/migrationstatuswidget.cpp
+++ b/agents/migration/migrationstatuswidget.cpp
@@ -27,7 +27,7 @@
#include <QListView>
#include <QLabel>
#include <KToolBar>
-#include <KDebug>
+#include <QDebug>
#include <QIcon>
#include <KDialog>
#include <KLocalizedString>
diff --git a/agents/newmailnotifier/newmailnotifieragent.cpp \
b/agents/newmailnotifier/newmailnotifieragent.cpp index 5016465..4e7015d 100644
--- a/agents/newmailnotifier/newmailnotifieragent.cpp
+++ b/agents/newmailnotifier/newmailnotifieragent.cpp
@@ -49,7 +49,7 @@
#include <KNotification>
#include <KLocalizedString>
#include <KWindowSystem>
-#include <KDebug>
+#include <QDebug>
using namespace Akonadi;
diff --git a/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp \
b/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp index \
75afab3..b7ae0e5 100644
--- a/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp
+++ b/agents/newmailnotifier/newmailnotifierselectcollectionwidget.cpp
@@ -35,7 +35,7 @@
#include <KLocalizedString>
#include <QPushButton>
#include <KLineEdit>
-#include <KDebug>
+#include <QDebug>
#include <QVBoxLayout>
#include <QHBoxLayout>
diff --git a/agents/newmailnotifier/specialnotifierjob.cpp \
b/agents/newmailnotifier/specialnotifierjob.cpp index 746f4c5..49b3abe 100644
--- a/agents/newmailnotifier/specialnotifierjob.cpp
+++ b/agents/newmailnotifier/specialnotifierjob.cpp
@@ -31,7 +31,7 @@
#include <KToolInvocation>
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <QTextDocument>
#include <QDBusInterface>
diff --git a/migration/kmail/CMakeLists.txt b/migration/kmail/CMakeLists.txt
index eecbfd7..c135a68 100644
--- a/migration/kmail/CMakeLists.txt
+++ b/migration/kmail/CMakeLists.txt
@@ -11,6 +11,7 @@ set(kmail-migrator_srcs
${CMAKE_CURRENT_SOURCE_DIR}/../../resources/shared/collectionannotationsattribute.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../resources/shared/createandsettagsjob.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../resources/mixedmaildir/mixedmaildirstore.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../resources/mixedmaildir/mixedmaildir_debug.cpp
)
include_directories(
diff --git a/qml/akonadi/tests/qmltest.cpp b/qml/akonadi/tests/qmltest.cpp
index 15f722a..ac68ff8 100644
--- a/qml/akonadi/tests/qmltest.cpp
+++ b/qml/akonadi/tests/qmltest.cpp
@@ -24,7 +24,7 @@
#include <AkonadiCore/ItemFetchScope>
#include <AkonadiCore/entitymimetypefiltermodel.h>
-#include <kdebug.h>
+#include <QDebug>
#include <kselectionproxymodel.h>
#include <KStandardDirs>
#include <kapplication.h>
@@ -91,7 +91,7 @@ QmlTestWidget::QmlTestWidget(QWidget* parent)
void QmlTestWidget::collectionRowSelected(int row)
{
- kDebug() << row;
+ qDebug() << row;
}
int main( int argc, char **argv )
diff --git a/qml/kde/kdeintegrationplugin.cpp b/qml/kde/kdeintegrationplugin.cpp
index 0d5422b..7bac8e7 100644
--- a/qml/kde/kdeintegrationplugin.cpp
+++ b/qml/kde/kdeintegrationplugin.cpp
@@ -20,7 +20,7 @@
#include "kdeintegrationplugin.h"
#include "kdeintegration.h"
-#include <kdebug.h>
+#include <QDebug>
#include <QtDeclarative/qdeclarative.h>
#include <qdeclarativecontext.h>
#include <qdeclarativeengine.h>
@@ -28,18 +28,18 @@
KDEIntegrationPlugin::KDEIntegrationPlugin(QObject* parent) : \
QDeclarativeExtensionPlugin( parent ) {
qDebug() << Q_FUNC_INFO;
- kDebug();
+ qDebug();
}
void KDEIntegrationPlugin::registerTypes(const char* uri)
{
- kDebug() << uri;
+ qDebug() << uri;
// qmlRegisterType<KDEIntegration>( uri, 4, 5, "KDE" );
}
void KDEIntegrationPlugin::initializeEngine(QDeclarativeEngine *engine, const char* \
uri) {
- kDebug() << engine << uri;
+ qDebug() << engine << uri;
engine->rootContext()->setContextProperty( QLatin1String("KDE"), new \
KDEIntegration( engine ) ); }
diff --git a/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp \
b/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp index fc40a97..37f725f \
100644
--- a/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp
+++ b/qml/kde/tests/qmlbreadcrumbnavigation/dynamictreewidget.cpp
@@ -330,12 +330,12 @@ void DynamicTreeWidget::removeSelected()
{
const QItemSelectionRange &range = selection.takeFirst(); // The selection model \
will take care of updating persistent indexes. Q_ASSERT(range.isValid());
-// kDebug() << range.parent() << range.top() << range.bottom();
+// qDebug() << range.parent() << range.top() << range.bottom();
removeCommand->setAncestorRowNumbers(m_dynamicTreeModel->indexToPath(range.parent()));
removeCommand->setStartRow(range.top());
removeCommand->setEndRow(range.bottom());
-// kDebug() << m_dynamicTreeModel->indexToPath(range.parent());
+// qDebug() << m_dynamicTreeModel->indexToPath(range.parent());
removeCommand->doCommand();
}
diff --git a/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.h \
b/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.h index 18b324a..b4d5394 \
100644
--- a/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.h
+++ b/qml/kde/tests/qmlbreadcrumbnavigation/kselectionproxymodel.h
@@ -30,7 +30,7 @@
typedef KBiHash<QPersistentModelIndex, QModelIndex> SourceProxyIndexMapping;
typedef KBiHash<qint64, QModelIndex> ParentMapping;
-#define KDO(object) kDebug() << #object << object
+#define KDO(object) qDebug() << #object << object
#define SON(object) object->setObjectName(#object)
class QItemSelectionModel;
diff --git a/resources/contacts/contactsresource.cpp \
b/resources/contacts/contactsresource.cpp index 341b10c..05f9436 100644
--- a/resources/contacts/contactsresource.cpp
+++ b/resources/contacts/contactsresource.cpp
@@ -33,7 +33,7 @@
#include <itemfetchscope.h>
#include <dbusconnectionpool.h>
#include <agentfactory.h>
-#include <KDebug>
+#include <QDebug>
#include <KLocalizedString>
@@ -268,7 +268,7 @@ void ContactsResource::itemAdded( const Akonadi::Item &item, \
const Akonadi::Coll newItem.setRemoteId( group.id() + QLatin1String(".ctg") );
} else {
- kWarning() << "got item without (usable) payload, ignoring it";
+ qWarning() << "got item without (usable) payload, ignoring it";
}
changeCommitted( newItem );
@@ -510,12 +510,13 @@ Collection::Rights ContactsResource::supportedRights( bool \
isResourceCollection QString ContactsResource::directoryForCollection( const \
Collection& collection ) const {
if ( collection.remoteId().isEmpty() ) {
- kWarning() << "Got incomplete ancestor chain:" << collection;
+ qWarning() << "Got incomplete ancestor chain:" << collection;
return QString();
}
if ( collection.parentCollection() == Collection::root() ) {
- kWarning( collection.remoteId() != baseDirectoryPath() ) << "RID mismatch, is " \
<< collection.remoteId() + if (collection.remoteId() != baseDirectoryPath())
+ qWarning() << "RID mismatch, is " << collection.remoteId()
<< " expected " << \
baseDirectoryPath(); return collection.remoteId();
}
diff --git a/resources/dav/common/davcollectionmodifyjob.cpp \
b/resources/dav/common/davcollectionmodifyjob.cpp index f36f282..72184c5 100644
--- a/resources/dav/common/davcollectionmodifyjob.cpp
+++ b/resources/dav/common/davcollectionmodifyjob.cpp
@@ -23,7 +23,7 @@
#include <kio/davjob.h>
#include <kio/job.h>
#include <klocale.h>
-#include <kdebug.h>
+#include <QDebug>
DavCollectionModifyJob::DavCollectionModifyJob( const DavUtils::DavUrl &url, QObject \
*parent ) : KJob( parent ), mUrl( url )
diff --git a/resources/dav/common/davmanager.cpp \
b/resources/dav/common/davmanager.cpp index c4645b8..6acf6e7 100644
--- a/resources/dav/common/davmanager.cpp
+++ b/resources/dav/common/davmanager.cpp
@@ -23,7 +23,7 @@
#include "groupdavprotocol.h"
#include <kio/davjob.h>
-#include <KDebug>
+#include <QDebug>
#include <QtXml/QDomDocument>
@@ -112,7 +112,7 @@ bool DavManager::createProtocol( DavUtils::Protocol protocol )
mProtocols.insert( DavUtils::GroupDav, new GroupdavProtocol() );
break;
default:
- kError() << "Unknown protocol: " << static_cast<int>( protocol );
+ qCritical() << "Unknown protocol: " << static_cast<int>( protocol );
return false;
}
diff --git a/resources/dav/common/davprincipalsearchjob.cpp \
b/resources/dav/common/davprincipalsearchjob.cpp index 35702d2..ec8e1b2 100644
--- a/resources/dav/common/davprincipalsearchjob.cpp
+++ b/resources/dav/common/davprincipalsearchjob.cpp
@@ -23,7 +23,7 @@
#include <kio/job.h>
#include <kio/davjob.h>
#include <klocale.h>
-#include <kdebug.h>
+#include <QDebug>
DavPrincipalSearchJob::DavPrincipalSearchJob( const DavUtils::DavUrl& url, \
DavPrincipalSearchJob::FilterType type,
const QString& filter, QObject* parent \
)
diff --git a/resources/dav/common/etagcache.cpp b/resources/dav/common/etagcache.cpp
index a65cd78..fb96d00 100644
--- a/resources/dav/common/etagcache.cpp
+++ b/resources/dav/common/etagcache.cpp
@@ -22,7 +22,7 @@
#include <item.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
-#include <kdebug.h>
+#include <QDebug>
#include <kjob.h>
EtagCache::EtagCache()
diff --git a/resources/dav/resource/davgroupwareresource.cpp \
b/resources/dav/resource/davgroupwareresource.cpp index 3fccf32..c7b82ff 100644
--- a/resources/dav/resource/davgroupwareresource.cpp
+++ b/resources/dav/resource/davgroupwareresource.cpp
@@ -55,7 +55,7 @@
#include <kabc/vcardconverter.h>
#include <kwindowsystem.h>
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <QtCore/QSet>
#include <QtDBus/QDBusConnection>
diff --git a/resources/dav/resource/searchdialog.cpp \
b/resources/dav/resource/searchdialog.cpp index c4f24e7..db40c46 100644
--- a/resources/dav/resource/searchdialog.cpp
+++ b/resources/dav/resource/searchdialog.cpp
@@ -24,7 +24,7 @@
#include "davprotocolbase.h"
#include "davutils.h"
-#include <KDebug>
+#include <QDebug>
#include <QIcon>
#include <KMessageBox>
#include <KUrl>
@@ -95,7 +95,7 @@ QStringList SearchDialog::selection() const
QModelIndexList indexes = mUi.searchResults->selectionModel()->selectedIndexes();
QStringList ret;
foreach ( const QModelIndex &index, indexes ) {
- kError() << "SELECTED DATA: " << index.data( Qt::UserRole + 1 ).toString();
+ qCritical() << "SELECTED DATA: " << index.data( Qt::UserRole + 1 ).toString();
ret << index.data( Qt::UserRole + 1 ).toString();
}
return ret;
diff --git a/resources/dav/resource/setupwizard.cpp \
b/resources/dav/resource/setupwizard.cpp index aada536..f80b7f8 100644
--- a/resources/dav/resource/setupwizard.cpp
+++ b/resources/dav/resource/setupwizard.cpp
@@ -40,7 +40,7 @@
#include <QRegExpValidator>
#include <QTextBrowser>
-#include <kdebug.h>
+#include <QDebug>
enum GroupwareServers
{
diff --git a/resources/facebook/facebookresource.cpp \
b/resources/facebook/facebookresource.cpp index b786af4..d2c3b6d 100644
--- a/resources/facebook/facebookresource.cpp
+++ b/resources/facebook/facebookresource.cpp
@@ -92,7 +92,7 @@ void FacebookResource::configurationChanged()
#ifdef HAVE_ACCOUNTS
void FacebookResource::configureByAccount( int accountId )
{
- kDebug() << "Starting credentials job";
+ qDebug() << "Starting credentials job";
GetCredentialsJob *gc = new GetCredentialsJob( accountId, this );
connect(gc, SIGNAL(finished(KJob*)), SLOT(slotGetCredentials(KJob*)));
gc->start();
@@ -150,7 +150,7 @@ void FacebookResource::slotAbortRequested()
{
if ( !mIdle ) {
foreach ( const QPointer<KJob> &job, mCurrentJobs ) {
- kDebug() << "Killing current job:" << job;
+ qDebug() << "Killing current job:" << job;
job->kill( KJob::Quietly );
}
abort();
@@ -234,7 +234,7 @@ bool FacebookResource::retrieveItem( const Akonadi::Item &item, \
const QSet<QByte {
Q_UNUSED( parts );
- kDebug() << item.mimeType();
+ qDebug() << item.mimeType();
if ( item.mimeType() == KABC::Addressee::mimeType() ) {
// TODO: Is this ever called??
@@ -263,7 +263,7 @@ bool FacebookResource::retrieveItem( const Akonadi::Item &item, \
const QSet<QByte postJob->start();
} else if ( item.mimeType() == \
QLatin1String("text/x-vnd.akonadi.socialnotification") ) { //FIXME: Need to figure \
out how to fetch single notification
- kDebug() << "Notifications listjob";
+ qDebug() << "Notifications listjob";
}
return true;
}
@@ -400,7 +400,7 @@ void FacebookResource::itemAdded( const Akonadi::Item &item, \
const Akonadi::Coll cancelTask();
}
} else if ( collection.remoteId() == postsRID ) {
- kDebug() << "Adding new status";
+ qDebug() << "Adding new status";
QString message;
if ( item.hasPayload<KFbAPI::PostInfo>() ) {
message = item.payload<KFbAPI::PostInfo>().message();
diff --git a/resources/facebook/facebookresource_friends.cpp \
b/resources/facebook/facebookresource_friends.cpp index d993811..a8c5f95 100644
--- a/resources/facebook/facebookresource_friends.cpp
+++ b/resources/facebook/facebookresource_friends.cpp
@@ -88,13 +88,13 @@ void FacebookResource::friendListJobFinished( KJob *job )
// See http://bugs.developers.facebook.net/show_bug.cgi?id=15475
const KDateTime stampOfExisting = mExistingFriends.value( user->id(), \
KDateTime() ); if ( !stampOfExisting.isValid() ) {
- kDebug() << "Friend" << user->id() << user->name() << "is new!";
+ qDebug() << "Friend" << user->id() << user->name() << "is new!";
mNewOrChangedFriends.append( user );
} else if ( user->updatedTime() > stampOfExisting ) {
- kDebug() << "Friend" << user->id() << user->name() << "is updated!";
+ qDebug() << "Friend" << user->id() << user->name() << "is updated!";
mNewOrChangedFriends.append( user );
} else {
- //kDebug() << "Friend" << user->id() << user->name() << "is old.";
+ //qDebug() << "Friend" << user->id() << user->name() << "is old.";
}
#else
mNewOrChangedFriends.append( user );
@@ -112,7 +112,7 @@ void FacebookResource::friendListJobFinished( KJob *job )
}
}
if ( !found ) {
- kDebug() << friendId << "is no longer your friend :(";
+ qDebug() << friendId << "is no longer your friend :(";
Item removedItem;
removedItem.setRemoteId( friendId );
removedItems.append( removedItem );
diff --git a/resources/facebook/facebookresource_notifications.cpp \
b/resources/facebook/facebookresource_notifications.cpp index ee0d79a..793fd9b 100644
--- a/resources/facebook/facebookresource_notifications.cpp
+++ b/resources/facebook/facebookresource_notifications.cpp
@@ -175,7 +175,7 @@ void \
FacebookResource::displayNotificationsToUser(FbNotificationPresentation dis \
notificationCount++;
notificationConfig.writeEntry(QLatin1String("updatedTime"), \
notification.updatedTimeString()); } else {
- kDebug() << "Skipping notification" << notification.id();
+ qDebug() << "Skipping notification" << notification.id();
}
}
}
@@ -339,7 +339,7 @@ void FacebookResource::notificationLinkActivated()
void FacebookResource::notificationMarkAsReadJobFinished(KJob *job)
{
if (job->error()) {
- kWarning() << job->errorString() << job->errorText();
+ qWarning() << job->errorString() << job->errorText();
}
mCurrentJobs.removeAll( job );
diff --git a/resources/facebook/facebookresource_posts.cpp \
b/resources/facebook/facebookresource_posts.cpp index f0fe958..d2908d2 100644
--- a/resources/facebook/facebookresource_posts.cpp
+++ b/resources/facebook/facebookresource_posts.cpp
@@ -51,7 +51,7 @@ void FacebookResource::postsListFetched( KJob *job )
setItemStreamingEnabled( true );
Item::List postItems;
- kDebug() << "Going into foreach";
+ qDebug() << "Going into foreach";
Q_FOREACH ( const KFbAPI::PostInfo &postInfo, listJob->allPosts() ) {
Item post;
post.setRemoteId( postInfo.id() );
@@ -187,7 +187,7 @@ void FacebookResource::postAddJobFinished( KJob *job )
post.setRemoteId( QLatin1String("non-existing-id") );
changeCommitted( post );
resetState();
- kDebug() << "Status posted to server";
+ qDebug() << "Status posted to server";
}
addJob->deleteLater();
diff --git a/resources/facebook/serializer/akonadi_serializer_socialnotification.cpp \
b/resources/facebook/serializer/akonadi_serializer_socialnotification.cpp index \
6d7a371..6bbf595 100644
--- a/resources/facebook/serializer/akonadi_serializer_socialnotification.cpp
+++ b/resources/facebook/serializer/akonadi_serializer_socialnotification.cpp
@@ -30,7 +30,7 @@
#include <qjson/serializer.h>
#include <qjson/parser.h>
-#include <KDebug>
+#include <QDebug>
using namespace Akonadi;
diff --git a/resources/gmail/gmailpasswordrequester.cpp \
b/resources/gmail/gmailpasswordrequester.cpp index 50595cb..2264d50 100644
--- a/resources/gmail/gmailpasswordrequester.cpp
+++ b/resources/gmail/gmailpasswordrequester.cpp
@@ -26,7 +26,7 @@
#include <QJsonDocument>
-#include <KDebug>
+#include <QDebug>
/**
* See https://developers.google.com/gmail/xoauth2_protocol for protocol \
documentation
diff --git a/resources/google/common/googleaccountmanager.cpp \
b/resources/google/common/googleaccountmanager.cpp index 87e78cb..f318428 100644
--- a/resources/google/common/googleaccountmanager.cpp
+++ b/resources/google/common/googleaccountmanager.cpp
@@ -22,7 +22,7 @@
#include <QtCore/QTimer>
#include <KWallet/Wallet>
-#include <KDebug>
+#include <QDebug>
#include <KWindowSystem>
#include <KGAPI/Account>
diff --git a/resources/google/common/googlesettingsdialog.cpp \
b/resources/google/common/googlesettingsdialog.cpp index 1327ded..faf4af7 100644
--- a/resources/google/common/googlesettingsdialog.cpp
+++ b/resources/google/common/googlesettingsdialog.cpp
@@ -30,7 +30,7 @@
#include <KLocalizedString>
#include <KComboBox>
#include <QPushButton>
-#include <KDebug>
+#include <QDebug>
#include <KMessageBox>
#include <KWindowSystem>
#include <KPluralHandlingSpinBox>
diff --git a/resources/google/contacts/contactsresource.cpp \
b/resources/google/contacts/contactsresource.cpp index 3fab1e5..2769252 100644
--- a/resources/google/contacts/contactsresource.cpp
+++ b/resources/google/contacts/contactsresource.cpp
@@ -32,7 +32,7 @@
#include <KABC/Picture>
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <QtCore/QPointer>
diff --git a/resources/google/contacts/settingsdialog.cpp \
b/resources/google/contacts/settingsdialog.cpp index 1b31329..a178ca8 100644
--- a/resources/google/contacts/settingsdialog.cpp
+++ b/resources/google/contacts/settingsdialog.cpp
@@ -20,7 +20,7 @@
#include <KWindowSystem>
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <KGAPI/Account>
#include <KGAPI/AuthJob>
diff --git a/resources/ical/notes/notesresource.cpp \
b/resources/ical/notes/notesresource.cpp index 050f1ac..7d84387 100644
--- a/resources/ical/notes/notesresource.cpp
+++ b/resources/ical/notes/notesresource.cpp
@@ -26,7 +26,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <kconfigskeleton.h>
-#include <kdebug.h>
+#include <QDebug>
using namespace Akonadi;
using namespace KCalCore;
diff --git a/resources/ical/shared/icalresource.cpp \
b/resources/ical/shared/icalresource.cpp index cb2ad39..660e1ad 100644
--- a/resources/ical/shared/icalresource.cpp
+++ b/resources/ical/shared/icalresource.cpp
@@ -23,7 +23,7 @@
#include <KCalCore/MemoryCalendar>
#include <KCalCore/FreeBusy>
-#include <kdebug.h>
+#include <QDebug>
#include <klocale.h>
using namespace Akonadi;
@@ -54,7 +54,7 @@ bool ICalResource::doRetrieveItem( const Akonadi::Item &item, const \
QSet<QByteAr const QString rid = item.remoteId();
Incidence::Ptr incidence = calendar()->instance( rid );
if ( !incidence ) {
- kError() << "akonadi_ical_resource: Can't find incidence with uid "
+ qCritical() << "akonadi_ical_resource: Can't find incidence with uid "
<< rid << "; item.id() = " << item.id();
emit error( i18n( "Incidence with uid '%1' not found.", rid ) );
return false;
@@ -77,7 +77,7 @@ void ICalResource::itemAdded( const Akonadi::Item &item, const \
Akonadi::Collecti
Incidence::Ptr i = item.payload<Incidence::Ptr>();
if ( !calendar()->addIncidence( Incidence::Ptr( i->clone() ) ) ) {
- //kError() << "akonadi_ical_resource: Error adding incidence with uid "
+ //qCritical() << "akonadi_ical_resource: Error adding incidence with uid "
// << i->uid() << "; item.id() " << item.id() << i->recurrenceId();
cancelTask();
return;
@@ -114,7 +114,7 @@ void ICalResource::itemChanged( const Akonadi::Item &item,
incidence->endUpdates();
} else {
incidence->endUpdates();
- kWarning() << "akonadi_ical_resource: Item changed incidence type. Replacing \
it."; + qWarning() << "akonadi_ical_resource: Item changed incidence type. \
Replacing it.";
calendar()->deleteIncidence( incidence );
calendar()->addIncidence( Incidence::Ptr( payload->clone() ) );
diff --git a/resources/ical/shared/icalresourcebase.cpp \
b/resources/ical/shared/icalresourcebase.cpp index 820ad94..db32178 100644
--- a/resources/ical/shared/icalresourcebase.cpp
+++ b/resources/ical/shared/icalresourcebase.cpp
@@ -31,7 +31,7 @@
#include <kglobal.h>
#include <klocale.h>
-#include <kdebug.h>
+#include <QDebug>
#include <KLocale>
using namespace Akonadi;
@@ -59,10 +59,10 @@ ICalResourceBase::~ICalResourceBase()
bool ICalResourceBase::retrieveItem( const Akonadi::Item &item,
const QSet<QByteArray> &parts )
{
- kDebug( 5251 ) << "Item:" << item.url();
+ qDebug() << "Item:" << item.url();
if ( !mCalendar ) {
- kError() << "akonadi_ical_resource: Calendar not loaded";
+ qCritical() << "akonadi_ical_resource: Calendar not loaded";
emit error( i18n( "Calendar not loaded.") );
return false;
}
@@ -95,7 +95,7 @@ bool ICalResourceBase::readFromFile( const QString &fileName )
new \
KCalCore::ICalFormat() ) ); const bool result = mFileStorage->load();
if ( !result ) {
- kError() << "akonadi_ical_resource: Error loading file " << fileName;
+ qCritical() << "akonadi_ical_resource: Error loading file " << fileName;
}
return result;
@@ -104,7 +104,7 @@ bool ICalResourceBase::readFromFile( const QString &fileName )
void ICalResourceBase::itemRemoved( const Akonadi::Item &item )
{
if ( !mCalendar ) {
- kError() << "akonadi_ical_resource: mCalendar is 0!";
+ qCritical() << "akonadi_ical_resource: mCalendar is 0!";
cancelTask( i18n( "Calendar not loaded." ) );
return;
}
@@ -112,13 +112,13 @@ void ICalResourceBase::itemRemoved( const Akonadi::Item &item )
Incidence::Ptr i = mCalendar->instance( item.remoteId() );
if ( i ) {
if ( !mCalendar->deleteIncidence( i ) ) {
- kError() << "akonadi_ical_resource: Can't delete incidence with instance \
identifier " + qCritical() << "akonadi_ical_resource: Can't delete incidence \
with instance identifier " << item.remoteId() << "; item.id() = " << item.id();
cancelTask();
return;
}
} else {
- kError() << "akonadi_ical_resource: itemRemoved(): Can't find incidence with \
instance identifier " + qCritical() << "akonadi_ical_resource: itemRemoved(): \
Can't find incidence with instance identifier " << item.remoteId() << "; item.id() = \
" << item.id(); }
scheduleWrite();
@@ -131,14 +131,14 @@ void ICalResourceBase::retrieveItems( const Akonadi::Collection \
&col ) if ( mCalendar ) {
doRetrieveItems( col );
} else {
- kError() << "akonadi_ical_resource: retrieveItems(): mCalendar is 0!";
+ qCritical() << "akonadi_ical_resource: retrieveItems(): mCalendar is 0!";
}
}
bool ICalResourceBase::writeToFile( const QString &fileName )
{
if ( !mCalendar ) {
- kError() << "akonadi_ical_resource: writeToFile() mCalendar is 0!";
+ qCritical() << "akonadi_ical_resource: writeToFile() mCalendar is 0!";
return false;
}
@@ -151,7 +151,7 @@ bool ICalResourceBase::writeToFile( const QString &fileName )
bool success = true;
if ( !fileStorage->save() ) {
- kError() << QLatin1String("akonadi_ical_resource: Failed to save calendar to \
file ") + fileName; + qCritical() << QLatin1String("akonadi_ical_resource: Failed \
to save calendar to file ") + fileName; emit error( i18n( "Failed to save calendar \
file to %1", fileName ) ); success = false;
}
diff --git a/resources/icaldir/icaldirresource.cpp \
b/resources/icaldir/icaldirresource.cpp index 0676497..346cde0 100644
--- a/resources/icaldir/icaldirresource.cpp
+++ b/resources/icaldir/icaldirresource.cpp
@@ -33,7 +33,7 @@
#include <KCalCore/ICalFormat>
#include <QIcon>
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <QtCore/QDir>
@@ -54,7 +54,7 @@ static Incidence::Ptr readFromFile( const QString &fileName, const \
QString &expe
if ( incidences.count() == 1 && incidences.first()->instanceIdentifier() == \
expectedIdentifier ) incidence = incidences.first();
} else {
- kError() << "Error loading file " << fileName;
+ qCritical() << "Error loading file " << fileName;
}
return incidence;
@@ -63,7 +63,7 @@ static Incidence::Ptr readFromFile( const QString &fileName, const \
QString &expe static bool writeToFile( const QString &fileName, Incidence::Ptr \
&incidence ) {
if ( !incidence ) {
- kError() << "incidence is 0!";
+ qCritical() << "incidence is 0!";
return false;
}
@@ -74,7 +74,7 @@ static bool writeToFile( const QString &fileName, Incidence::Ptr \
&incidence )
const bool success = fileStorage->save();
if ( !success ) {
- kError() << "Failed to save calendar to file " + fileName;
+ qCritical() << "Failed to save calendar to file " + fileName;
}
return success;
diff --git a/resources/kdeaccounts/kdeaccountsresource.cpp \
b/resources/kdeaccounts/kdeaccountsresource.cpp index 9016dd2..e01f103 100644
--- a/resources/kdeaccounts/kdeaccountsresource.cpp
+++ b/resources/kdeaccounts/kdeaccountsresource.cpp
@@ -134,7 +134,7 @@ bool KDEAccountsResource::readFromFile( const QString &fileName )
QStringList parts = line.split( QLatin1Char( ' ' ) );
if ( parts.count() < 3 ) {
- kWarning() << "Failed to parse line \"" << line << "\", invalid format";
+ qWarning() << "Failed to parse line \"" << line << "\", invalid format";
continue;
}
diff --git a/resources/kolab/kolabhelpers.cpp b/resources/kolab/kolabhelpers.cpp
index 914643e..b25d247 100644
--- a/resources/kolab/kolabhelpers.cpp
+++ b/resources/kolab/kolabhelpers.cpp
@@ -40,7 +40,7 @@ bool KolabHelpers::checkForErrors(const Akonadi::Item &item)
errorMsg.append(QLatin1String("\n"));
}
- kWarning() << "Error on item with id: " << item.id() << " remote id: " << \
item.remoteId() << ":\n" << errorMsg; + qWarning() << "Error on item with id: " << \
item.id() << " remote id: " << item.remoteId() << ":\n" << errorMsg; \
Kolab::ErrorHandler::instance().clear(); return true;
}
@@ -58,7 +58,7 @@ Akonadi::Item KolabHelpers::translateFromImap(Kolab::FolderType \
folderType, cons return Akonadi::Item();
}
if (!imapItem.hasPayload<KMime::Message::Ptr>()) {
- kWarning() << "Payload is not a MessagePtr!";
+ qWarning() << "Payload is not a MessagePtr!";
Q_ASSERT(false);
ok = false;
return Akonadi::Item();
@@ -78,7 +78,7 @@ Akonadi::Item KolabHelpers::translateFromImap(Kolab::FolderType \
folderType, cons {
const KCalCore::Incidence::Ptr incidencePtr = reader.getIncidence();
if (!incidencePtr) {
- kWarning() << "Failed to read incidence.";
+ qWarning() << "Failed to read incidence.";
ok = false;
return Akonadi::Item();
}
@@ -93,7 +93,7 @@ Akonadi::Item KolabHelpers::translateFromImap(Kolab::FolderType \
folderType, cons {
const KMime::Message::Ptr note = reader.getNote();
if (!note) {
- kWarning() << "Failed to read note.";
+ qWarning() << "Failed to read note.";
ok = false;
return Akonadi::Item();
}
@@ -138,7 +138,7 @@ Akonadi::Item KolabHelpers::translateFromImap(Kolab::FolderType \
folderType, cons }
break;
default:
- kWarning() << "Object type not handled";
+ qWarning() << "Object type not handled";
ok = false;
break;
}
@@ -216,7 +216,7 @@ Akonadi::Item KolabHelpers::translateToImap(const Akonadi::Item \
&item, bool &ok) case Kolab::JournalObject:
{
Q_ASSERT(item.hasPayload<KCalCore::Incidence::Ptr>());
- kDebug() << "converted event";
+ qDebug() << "converted event";
const KMime::Message::Ptr message = \
Kolab::KolabObjectWriter::writeIncidence( item.payload<KCalCore::Incidence::Ptr>(),
Kolab::KolabV3, productId, QLatin1String("UTC") );
@@ -226,7 +226,7 @@ Akonadi::Item KolabHelpers::translateToImap(const Akonadi::Item \
&item, bool &ok) case Kolab::NoteObject:
{
Q_ASSERT(item.hasPayload<KMime::Message::Ptr>());
- kDebug() << "converted note";
+ qDebug() << "converted note";
const KMime::Message::Ptr message = Kolab::KolabObjectWriter::writeNote(
item.payload<KMime::Message::Ptr>(), Kolab::KolabV3, productId);
imapItem.setPayload( message );
@@ -235,7 +235,7 @@ Akonadi::Item KolabHelpers::translateToImap(const Akonadi::Item \
&item, bool &ok) case Kolab::ContactObject:
{
Q_ASSERT(item.hasPayload<KABC::Addressee>());
- kDebug() << "converted contact";
+ qDebug() << "converted contact";
const KMime::Message::Ptr message = \
Kolab::KolabObjectWriter::writeContact(
item.payload<KABC::Addressee>(), Kolab::KolabV3, productId);
imapItem.setPayload( message );
@@ -245,21 +245,21 @@ Akonadi::Item KolabHelpers::translateToImap(const Akonadi::Item \
&item, bool &ok) {
Q_ASSERT(item.hasPayload<KABC::ContactGroup>());
const KABC::ContactGroup contactGroup = \
convertToGidOnly(item.payload<KABC::ContactGroup>());
- kDebug() << "converted distlist";
+ qDebug() << "converted distlist";
const KMime::Message::Ptr message = \
Kolab::KolabObjectWriter::writeDistlist( contactGroup, Kolab::KolabV3, productId);
imapItem.setPayload( message );
}
break;
default:
- kWarning() << "object type not handled: " << item.id() << \
item.mimeType(); + qWarning() << "object type not handled: " << item.id() \
<< item.mimeType(); ok = false;
return Akonadi::Item();
}
if (checkForErrors(item)) {
- kWarning() << "an error occured while trying to translate the item to the \
kolab format: " << item.id(); + qWarning() << "an error occured while trying \
to translate the item to the kolab format: " << item.id(); ok = false;
return Akonadi::Item();
}
@@ -322,7 +322,7 @@ QStringList KolabHelpers::getContentMimeTypes(Kolab::FolderType \
type) contentTypes << KMime::Message::mimeType();
break;
default:
- kDebug() << "unhandled folder type: " << type;
+ qDebug() << "unhandled folder type: " << type;
}
return contentTypes;
}
diff --git a/resources/kolab/kolabmessagehelper.cpp \
b/resources/kolab/kolabmessagehelper.cpp index 493d291..20e02bb 100644
--- a/resources/kolab/kolabmessagehelper.cpp
+++ b/resources/kolab/kolabmessagehelper.cpp
@@ -23,7 +23,7 @@
#include <kolabdefinitions.h> //libkolab
#include "kolabhelpers.h"
-#include <KDebug>
+#include <QDebug>
KolabMessageHelper::KolabMessageHelper(const Akonadi::Collection &col)
: mCollection(col)
@@ -46,7 +46,7 @@ Akonadi::Item \
KolabMessageHelper::createItemFromMessage(KMime::Message::Ptr mess {
const Akonadi::Item item = MessageHelper::createItemFromMessage(message, uid, \
size, attrs, flags, scope, ok); if (!ok) {
- kWarning() << "Failed to read imap message";
+ qWarning() << "Failed to read imap message";
return item;
}
Kolab::FolderType folderType = Kolab::MailType;
diff --git a/resources/kolab/kolabresourcestate.cpp \
b/resources/kolab/kolabresourcestate.cpp index 9d4726c..fb695d0 100644
--- a/resources/kolab/kolabresourcestate.cpp
+++ b/resources/kolab/kolabresourcestate.cpp
@@ -28,7 +28,7 @@
#include <AkonadiCore/CachePolicy>
#include <noselectattribute.h>
#include <Akonadi/KMime/MessageParts>
-#include <KDebug>
+#include <QDebug>
KolabResourceState::KolabResourceState(ImapResource* resource, const TaskArguments& \
arguments) : ResourceState(resource, arguments)
@@ -51,7 +51,7 @@ void KolabResourceState::collectionAttributesRetrieved(const \
Akonadi::Collection
const QString icon = KolabHelpers::getIcon(folderType);
if (!icon.isEmpty()) {
- kDebug() << " setting icon " << icon;
+ qDebug() << " setting icon " << icon;
Akonadi::EntityDisplayAttribute *attr = \
col.attribute<Akonadi::EntityDisplayAttribute>(Akonadi::Collection::AddIfMissing); \
attr->setIconName(icon); }
diff --git a/resources/kolab/kolabretrievecollectionstask.cpp \
b/resources/kolab/kolabretrievecollectionstask.cpp index 3a1a8f5..8b72e81 100644
--- a/resources/kolab/kolabretrievecollectionstask.cpp
+++ b/resources/kolab/kolabretrievecollectionstask.cpp
@@ -34,7 +34,7 @@
#include <kmime/kmime_message.h>
-#include <KDebug>
+#include <QDebug>
#include <KLocale>
KolabRetrieveCollectionsTask::KolabRetrieveCollectionsTask(ResourceStateInterface::Ptr \
resource, QObject* parent) @@ -238,13 +238,13 @@ void \
KolabRetrieveCollectionsTask::createCollection(const QString &mailbox, cons
// If this folder is a noinferiors folder, it is not allowed to create \
subfolders inside. if (currentFlags.contains("\\noinferiors")) {
- //kDebug() << "Noinferiors: " << currentPath;
+ //qDebug() << "Noinferiors: " << currentPath;
c.addAttribute(new NoInferiorsAttribute(true));
c.setRights(c.rights() & ~Akonadi::Collection::CanCreateCollection);
}
c.setEnabled(isSubscribed);
- kDebug() << "creating collection " << mailbox << " with parent " << parentPath;
+ qDebug() << "creating collection " << mailbox << " with parent " << parentPath;
mMailCollections.insert(mailbox, c);
//This is no longer required
mSubscribedMailboxes.remove(mailbox);
diff --git a/resources/kolabproxy/freebusyupdatehandler.cpp \
b/resources/kolabproxy/freebusyupdatehandler.cpp index ca3147c..e8b0525 100644
--- a/resources/kolabproxy/freebusyupdatehandler.cpp
+++ b/resources/kolabproxy/freebusyupdatehandler.cpp
@@ -19,7 +19,7 @@
#include "freebusyupdatehandler.h"
-#include <KDebug>
+#include <QDebug>
#include <KLocalizedString>
#include <KPassivePopup>
#include <KIO/Job>
@@ -57,12 +57,12 @@ void FreeBusyUpdateHandler::updateFolder( const QString \
&folderPath, const QStri //FIXME this assumption is no longer true. Kolabfolders can \
also be toplevel. if ( !path.startsWith( QLatin1Char('/') ) ) {
//The path separator can i.e. also be '.' on a different imap server
- kWarning() << "Unsupported path separator";
+ qWarning() << "Unsupported path separator";
return;
}
const int secondSlash = path.indexOf( QLatin1Char('/'), 1 );
if ( secondSlash == -1 ) {
- kWarning() << "path is too short: " << path;
+ qWarning() << "path is too short: " << path;
return;
}
@@ -89,7 +89,7 @@ void FreeBusyUpdateHandler::updateFolder( const QString \
&folderPath, const QStri void FreeBusyUpdateHandler::timeout()
{
foreach ( const KUrl &url, mUrls ) {
- kDebug() << "Triggering PFB update for " << url;
+ qDebug() << "Triggering PFB update for " << url;
KIO::Job *job = KIO::get( url, KIO::NoReload, KIO::HideProgressInfo );
// we want an error in case of 404
diff --git a/resources/kolabproxy/imapitemaddedjob.cpp \
b/resources/kolabproxy/imapitemaddedjob.cpp index 6951c3a..11bfc0a 100644
--- a/resources/kolabproxy/imapitemaddedjob.cpp
+++ b/resources/kolabproxy/imapitemaddedjob.cpp
@@ -73,7 +73,7 @@ void ImapItemAddedJob::onCollectionFetchDone( KJob *job )
itemFetchJob->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent);
connect(itemFetchJob, SIGNAL(result(KJob*)), this, \
SLOT(onItemFetchJobDone(KJob*))); } else {
- kDebug() << "no gid, creating directly";
+ qDebug() << "no gid, creating directly";
Akonadi::ItemCreateJob *cjob = new \
Akonadi::ItemCreateJob(mTranslatedItem, mKolabCollection);
connect( cjob, SIGNAL(result(KJob*)), this, SLOT(itemCreatedDone(KJob*)) \
); }
@@ -98,9 +98,9 @@ void ImapItemAddedJob::onCollectionFetchDone( KJob *job )
conflictingItems << item;
}
if (conflictingItems.size() > 1) {
- kWarning() << "Multiple conflicting items detected in col " << \
mKolabCollection.id() << ", this should never happen: "; + qWarning() << \
"Multiple conflicting items detected in col " << mKolabCollection.id() << ", this \
should never happen: "; foreach (const Akonadi::Item &item, conflictingItems) {
- kWarning() << "Conflicting kolab item: " << item.id();
+ qWarning() << "Conflicting kolab item: " << item.id();
}
}
if (!conflictingItems.isEmpty()) {
@@ -109,12 +109,12 @@ void ImapItemAddedJob::onCollectionFetchDone( KJob *job )
mTranslatedItem.setId(conflictingKolabItem.id());
imapToKolab(mImapItem, mTranslatedItem);
//TODO ensure the modifyjob doesn't collide with a removejob due to the \
original imap item vanishing.
- kDebug() << "conflict, modifying existing item: " << \
conflictingKolabItem.id(); + qDebug() << "conflict, modifying existing \
item: " << conflictingKolabItem.id();
Akonadi::ItemModifyJob *modJob = new \
Akonadi::ItemModifyJob(mTranslatedItem, this); modJob->disableRevisionCheck();
connect(modJob, SIGNAL(result(KJob*)), this, \
SLOT(itemCreatedDone(KJob*))); } else {
- kDebug() << "creating new item";
+ qDebug() << "creating new item";
Akonadi::ItemCreateJob *cjob = new \
Akonadi::ItemCreateJob(mTranslatedItem, mKolabCollection, this);
connect(cjob, SIGNAL(result(KJob*)), this, \
SLOT(itemCreatedDone(KJob*))); }
@@ -123,8 +123,8 @@ void ImapItemAddedJob::onCollectionFetchDone( KJob *job )
void ImapItemAddedJob::itemCreatedDone(KJob *job)
{
if (job->error()) {
- kWarning() << "Error on creating item:" << job->errorText();
- kWarning() << "imap item: " << mImapItem.id() << " in collection " << \
mImapCollection.id(); + qWarning() << "Error on creating item:" << \
job->errorText(); + qWarning() << "imap item: " << mImapItem.id() << " in \
collection " << mImapCollection.id(); }
emitResult();
}
diff --git a/resources/kolabproxy/itemaddedjob.cpp \
b/resources/kolabproxy/itemaddedjob.cpp index 794d530..09aa4d3 100644
--- a/resources/kolabproxy/itemaddedjob.cpp
+++ b/resources/kolabproxy/itemaddedjob.cpp
@@ -38,10 +38,10 @@ void ItemAddedJob::start()
void ItemAddedJob::doStart()
{
const Akonadi::Collection imapCollection = kolabToImap(mParentCollection);
- kDebug() << imapCollection.id();
+ qDebug() << imapCollection.id();
Akonadi::Item imapItem( "message/rfc822" );
if (!mHandler.toKolabFormat(mKolabItem, imapItem)) {
- kWarning() << "Failed to convert item to kolab format: " << mKolabItem.id();
+ qWarning() << "Failed to convert item to kolab format: " << mKolabItem.id();
setError(KJob::UserDefinedError);
emitResult();
return;
diff --git a/resources/kolabproxy/itemchangedjob.cpp \
b/resources/kolabproxy/itemchangedjob.cpp index 2f036e5..c0bf3ee 100644
--- a/resources/kolabproxy/itemchangedjob.cpp
+++ b/resources/kolabproxy/itemchangedjob.cpp
@@ -41,7 +41,7 @@ void ItemChangedJob::onKolabCollectionFetched(KJob* job)
{
Akonadi::CollectionFetchJob *fetchjob = \
static_cast<Akonadi::CollectionFetchJob*>(job); if (job->error() || \
fetchjob->collections().isEmpty()) {
- kWarning() << "collection fetch job failed " << job->errorString() << \
fetchjob->collections().isEmpty(); + qWarning() << "collection fetch job \
failed " << job->errorString() << fetchjob->collections().isEmpty(); \
setError(KJob::UserDefinedError); emitResult();
return;
@@ -49,7 +49,7 @@ void ItemChangedJob::onKolabCollectionFetched(KJob* job)
const Akonadi::Collection imapCollection = \
kolabToImap(fetchjob->collections().first()); mHandler = \
mHandlerManager.getHandler(imapCollection.id()); if (!mHandler) {
- kWarning() << "Couldn't find a handler for the collection, but we should \
have one: " << imapCollection.id(); + qWarning() << "Couldn't find a handler \
for the collection, but we should have one: " << imapCollection.id(); \
setError(KJob::UserDefinedError); emitResult();
return;
@@ -69,17 +69,17 @@ void ItemChangedJob::onImapItemFetchDone(KJob* job)
Akonadi::ItemFetchJob *fetchJob = qobject_cast<Akonadi::ItemFetchJob*>(job);
if (fetchJob->items().isEmpty()) { //The corresponding imap item hasn't been \
created yet
- kDebug() << "item is not yet created in imap resource";
+ qDebug() << "item is not yet created in imap resource";
Akonadi::CollectionFetchJob *fetch =
new Akonadi::CollectionFetchJob( Akonadi::Collection( \
mKolabItem.storageCollectionId() ),
Akonadi::CollectionFetchJob::Base, this );
connect( fetch, SIGNAL(result(KJob*)), SLOT(onCollectionFetchDone(KJob*)) );
} else {
- kDebug() << "item is in imap resource";
+ qDebug() << "item is in imap resource";
Akonadi::Item imapItem = fetchJob->items().first();
if (!mHandler->toKolabFormat(mKolabItem, imapItem)) {
- kWarning() << "Failed to convert item to kolab format: " << \
mKolabItem.id(); + qWarning() << "Failed to convert item to kolab format: \
" << mKolabItem.id(); setError(KJob::UserDefinedError);
emitResult();
return;
@@ -93,7 +93,7 @@ void ItemChangedJob::onCollectionFetchDone(KJob *job)
{
Akonadi::CollectionFetchJob *fetchJob = \
static_cast<Akonadi::CollectionFetchJob*>(job); if ( job->error() || \
fetchJob->collections().isEmpty() ) {
- kWarning() << "Collection fetch job failed" << fetchJob->errorString();
+ qWarning() << "Collection fetch job failed" << fetchJob->errorString();
setError(KJob::UserDefinedError);
emitResult();
return;
diff --git a/resources/kolabproxy/kolabproxyresource.cpp \
b/resources/kolabproxy/kolabproxyresource.cpp index e761195..545a56a 100644
--- a/resources/kolabproxy/kolabproxyresource.cpp
+++ b/resources/kolabproxy/kolabproxyresource.cpp
@@ -74,7 +74,7 @@ static QString mailBoxForImapCollection( const Akonadi::Collection \
&imapCollecti {
if ( imapCollection.remoteId().isEmpty() ) {
if ( showWarnings ) {
- kWarning() << "Got incomplete ancestor chain:" << imapCollection;
+ qWarning() << "Got incomplete ancestor chain:" << imapCollection;
}
return QString();
}
@@ -212,7 +212,7 @@ void KolabProxyResource::retrieveItems( const Akonadi::Collection \
&collection ) const Akonadi::Collection imapCollection = kolabToImap( collection );
if ( !mHandlerManager->isMonitored( imapCollection.id() ) ) {
//This should never happen
- kWarning() << "received a retrieveItems request for a collection without imap \
counterpart" << collection.id(); + qWarning() << "received a retrieveItems request \
for a collection without imap counterpart" << collection.id(); cancelTask();
return;
}
@@ -266,7 +266,7 @@ void KolabProxyResource::retrieveItemFetchDone( KJob *job )
}
const Akonadi::Item::List items = \
qobject_cast<Akonadi::ItemFetchJob*>(job)->items(); if ( items.isEmpty() ) {
- kWarning() << "Items is emtpy";
+ qWarning() << "Items is emtpy";
cancelTask();
return;
}
@@ -277,7 +277,7 @@ void KolabProxyResource::retrieveItemFetchDone( KJob *job )
}
const Akonadi::Item::List newItems = handler->translateItems( items );
if ( newItems.isEmpty() ) {
- kWarning() << "Could not translate item";
+ qWarning() << "Could not translate item";
cancelTask();
return;
}
@@ -323,7 +323,7 @@ void KolabProxyResource::itemAdded( const Akonadi::Item \
&kolabItem, const Akonadi::Collection imapCollection = kolabToImap( collection );
const KolabHandler::Ptr handler = mHandlerManager->getHandler( imapCollection.id() \
); if ( !handler ) {
- kWarning() << "Couldn't find a handler for the collection, but we should have \
one: " << imapCollection.id(); + qWarning() << "Couldn't find a handler for the \
collection, but we should have one: " << imapCollection.id();
showErrorMessage(i18n("An error occured while writing the item to the \
backend.")); cancelTask();
new Akonadi::ItemDeleteJob(kolabItem);
@@ -340,7 +340,7 @@ void KolabProxyResource::onItemAddedDone(KJob* job)
Akonadi::Item kolabItem = itemAddedJob->kolabItem();
const Akonadi::Item imapItem = itemAddedJob->imapItem();
if (job->error()) {
- kWarning() << "Failed to create imap item: " << job->errorString();
+ qWarning() << "Failed to create imap item: " << job->errorString();
showErrorMessage(i18n("An error occured while writing the item to the \
backend.")); cancelTask();
new Akonadi::ItemDeleteJob(kolabItem);
@@ -367,7 +367,7 @@ void KolabProxyResource::onItemChangedDone(KJob* job)
if ( job->error() ) {
showErrorMessage(i18n("An error occured while writing the item to the \
backend.")); cancelTask( job->errorText() );
- kWarning() << "Failed to modify item, reverting to state of imap item: " << \
itemChangedJob->item().id(); + qWarning() << "Failed to modify item, reverting to \
state of imap item: " << itemChangedJob->item().id();
RevertItemChangesJob *revertJob = new \
RevertItemChangesJob(itemChangedJob->item(), *mHandlerManager, this);
connect(revertJob, SIGNAL(result(KJob*)), this, SLOT(checkResult(KJob*)));
revertJob->start();
@@ -398,7 +398,7 @@ void KolabProxyResource::collectionAdded( const \
Akonadi::Collection &collection,
const Akonadi::Collection &parent )
{
if ( KolabHandler::kolabTypeForMimeType( collection.contentMimeTypes() ).isEmpty() \
) {
- kWarning() << "Collection " << collection.name() << collection.id() << \
collection.isValid() + qWarning() << "Collection " << collection.name() << \
collection.id() << collection.isValid() << "doesn't have kolab type set. isValid = "
<< "; parent is " << parent.name() << parent.id() << \
parent.isValid(); cancelTask( QLatin1String( "Collection doesn't have kolab type." ) \
); @@ -532,25 +532,25 @@ void KolabProxyResource::updateFreeBusyInformation( const \
Akonadi::Collection &i
QLatin1String( "/Settings" ), QLatin1String( "org.kde.Akonadi.Imap.Wallet" ) );
if ( !settingsInterface.isValid() || !walletInterface.isValid() ) {
- kWarning() << "unable to retrieve imap resource settings interface";
+ qWarning() << "unable to retrieve imap resource settings interface";
return;
}
const QDBusReply<QString> userNameReply = settingsInterface.call( QLatin1String( \
"userName" ) ); if ( !userNameReply.isValid() ) {
- kWarning() << "unable to retrieve user name from imap resource settings";
+ qWarning() << "unable to retrieve user name from imap resource settings";
return;
}
const QDBusReply<QString> passwordReply = walletInterface.call( QLatin1String( \
"password" ) ); if ( !passwordReply.isValid() ) {
- kWarning() << "unable to retrieve password from imap resource settings";
+ qWarning() << "unable to retrieve password from imap resource settings";
return;
}
const QDBusReply<QString> hostReply = settingsInterface.call( QLatin1String( \
"imapServer" ) ); if ( !hostReply.isValid() ) {
- kWarning() << "unable to retrieve host from imap resource settings";
+ qWarning() << "unable to retrieve host from imap resource settings";
return;
}
@@ -604,7 +604,7 @@ void KolabProxyResource::imapItemAdded( const Akonadi::Item \
&item, return;
}
if ( m_excludeAppend.contains( item.id() ) ) {
- kDebug() << "item already present";
+ qDebug() << "item already present";
m_excludeAppend.removeAll( item.id() );
return;
}
@@ -623,7 +623,7 @@ void KolabProxyResource::imapItemRemoved( const Akonadi::Item \
&item ) handler->imapItemRemoved(item);
} else {
//The handler is already gone,
- kWarning() << "Couldn't find handler for collection " << \
item.storageCollectionId(); + qWarning() << "Couldn't find handler for collection \
" << item.storageCollectionId(); ImapItemRemovedJob *job = new \
ImapItemRemovedJob(item, this); connect(job, SIGNAL(result(KJob*)), this, \
SLOT(checkResult(KJob*))); job->start();
@@ -653,7 +653,7 @@ void KolabProxyResource::imapCollectionAdded( const \
Akonadi::Collection &collect }
if ( mHandlerManager->isMonitored( collection.id() ) ) {
// something is wrong, so better reload out collection tree
- kWarning() << "IMAPCOLLECTIONADDED ABORT";
+ qWarning() << "IMAPCOLLECTIONADDED ABORT";
synchronizeCollectionTree();
return;
}
@@ -722,7 +722,7 @@ void KolabProxyResource::kolabFolderChangeResult( KJob *job )
if ( job->error() ) {
// something went wrong or the change was too complex to handle in the above \
slots, // so re-sync the entire tree.
- kWarning() << "Re-syncing collection tree as incremental changes did not \
succeed." + qWarning() << "Re-syncing collection tree as incremental changes did \
not succeed." << job->errorText();
synchronizeCollectionTree();
}
@@ -825,7 +825,7 @@ void KolabProxyResource::updateHiddenAttribute( const \
Akonadi::Collection &imapC void KolabProxyResource::checkResult(KJob* job)
{
if ( job->error() ) {
- kWarning() << "Error occurred: " << job->errorString();
+ qWarning() << "Error occurred: " << job->errorString();
}
}
diff --git a/resources/kolabproxy/revertitemchangesjob.cpp \
b/resources/kolabproxy/revertitemchangesjob.cpp index 008d1e2..6778112 100644
--- a/resources/kolabproxy/revertitemchangesjob.cpp
+++ b/resources/kolabproxy/revertitemchangesjob.cpp
@@ -48,15 +48,15 @@ void RevertItemChangesJob::onImapItemFetchDone(KJob* job)
Akonadi::ItemFetchJob *fetchJob = qobject_cast<Akonadi::ItemFetchJob*>(job);
if (fetchJob->items().isEmpty()) { //The corresponding imap item hasn't been \
created yet
- kDebug() << "item is not yet created in imap resource, deleting the kolab \
item"; + qDebug() << "item is not yet created in imap resource, deleting the \
kolab item";
Akonadi::ItemDeleteJob *deleteJob = new Akonadi::ItemDeleteJob(mKolabItem, \
this);
connect(deleteJob, SIGNAL(result(KJob*)), SLOT(onItemModifyDone(KJob*)));
} else {
- kDebug() << "reverting to state of imap item";
+ qDebug() << "reverting to state of imap item";
Akonadi::Item imapItem = fetchJob->items().first();
const KolabHandler::Ptr handler = \
mHandlerManager.getHandler(imapItem.parentCollection().id()); if (!handler) {
- kWarning() << "No handler: " << imapItem.parentCollection().id();
+ qWarning() << "No handler: " << imapItem.parentCollection().id();
setError(KJob::UserDefinedError);
emitResult();
return;
@@ -64,7 +64,7 @@ void RevertItemChangesJob::onImapItemFetchDone(KJob* job)
const Akonadi::Item::List translatedItems = \
handler->translateItems(fetchJob->items());
if (translatedItems.isEmpty()) {
- kWarning() << "Failed to reload item: " << mKolabItem.id();
+ qWarning() << "Failed to reload item: " << mKolabItem.id();
setError(KJob::UserDefinedError);
emitResult();
return;
diff --git a/resources/kolabproxy/setupdefaultfoldersjob.cpp \
b/resources/kolabproxy/setupdefaultfoldersjob.cpp index 0037bd0..a7fe034 100644
--- a/resources/kolabproxy/setupdefaultfoldersjob.cpp
+++ b/resources/kolabproxy/setupdefaultfoldersjob.cpp
@@ -87,7 +87,7 @@ void SetupDefaultFoldersJob::collectionFetchResult( KJob *job )
setErrorText(i18n("Could not find valid parent collection."));
emitResult();
}
- kDebug() << "default parent " << defaultParent.id();
+ qDebug() << "default parent " << defaultParent.id();
// look for existing folders
QVector<Akonadi::Collection> existingDefaultFolders( KolabV2::FolderTypeSize );
@@ -129,12 +129,12 @@ void SetupDefaultFoldersJob::collectionFetchResult( KJob *job )
}
if ( existingDefaultFolders[ i ].isValid() ) {
- kDebug() << "Existing collection ok: " << iconName;
+ qDebug() << "Existing collection ok: " << iconName;
continue; // all good
} else if ( recoveryCandidates[ i ].isValid() ) {
Akonadi::Collection col = recoveryCandidates[ i ];
if ( !( col.rights() & Akonadi::Collection::CanChangeCollection ) ) {
- kWarning() << "no change rights on collection";
+ qWarning() << "no change rights on collection";
continue;
}
Akonadi::CollectionAnnotationsAttribute *attr =
@@ -148,7 +148,7 @@ void SetupDefaultFoldersJob::collectionFetchResult( KJob *job )
col.attribute<Akonadi::EntityDisplayAttribute>( \
Akonadi::Entity::AddIfMissing ); attribute->setIconName( iconName );
}
- kDebug() << "Fixing collection: " << col.id() << iconName;
+ qDebug() << "Fixing collection: " << col.id() << iconName;
new Akonadi::CollectionModifyJob( col, 0 );
} else {
Akonadi::Collection col;
@@ -165,7 +165,7 @@ void SetupDefaultFoldersJob::collectionFetchResult( KJob *job )
col.attribute<Akonadi::EntityDisplayAttribute>( \
Akonadi::Entity::AddIfMissing ); attribute->setIconName( iconName );
}
- kDebug() << "Creating new collection: " << iconName;
+ qDebug() << "Creating new collection: " << iconName;
new Akonadi::CollectionCreateJob( col, 0 );
}
}
diff --git a/resources/kolabproxy/tests/proxyintegrationtest.cpp \
b/resources/kolabproxy/tests/proxyintegrationtest.cpp index beeda9d..12569f5 100644
--- a/resources/kolabproxy/tests/proxyintegrationtest.cpp
+++ b/resources/kolabproxy/tests/proxyintegrationtest.cpp
@@ -87,11 +87,11 @@ private slots:
}
for (int i = 0; i < expectedCollections.size(); i++) {
const Collection &expectedCol = expectedCollections.at(i);
-// kDebug() << col.name() << expectedCol.name();
-// kDebug() << \
col.attribute<CollectionAnnotationsAttribute>()->annotations();
-// kDebug() << \
expectedCol.attribute<CollectionAnnotationsAttribute>()->annotations(); +// \
qDebug() << col.name() << expectedCol.name(); +// qDebug() << \
col.attribute<CollectionAnnotationsAttribute>()->annotations(); +// \
qDebug() << expectedCol.attribute<CollectionAnnotationsAttribute>()->annotations(); \
if (col.name() == expectedCol.name()) {
- kDebug() << " found " << col.name();
+ qDebug() << " found " << col.name();
\
QCOMPARE(col.attribute<CollectionAnnotationsAttribute>()->annotations(), \
expectedCol.attribute<CollectionAnnotationsAttribute>()->annotations()); \
QCOMPARE(col.rights(), expectedCol.rights()); expectedCollections.removeAt(i);
@@ -145,7 +145,7 @@ private slots:
QTest::qWait(10);
}
if (!kolabCollectionsAreGone) {
- kDebug() << rootCollections;
+ qDebug() << rootCollections;
}
QVERIFY(kolabCollectionsAreGone);
}
diff --git a/resources/kolabproxy/tests/testutils.cpp \
b/resources/kolabproxy/tests/testutils.cpp index e308b10..ea49469 100644
--- a/resources/kolabproxy/tests/testutils.cpp
+++ b/resources/kolabproxy/tests/testutils.cpp
@@ -52,7 +52,7 @@ TestUtils::MonitorPair TestUtils::monitor(Akonadi::Collection col, \
const char *s bool TestUtils::wait(const MonitorPair &pair) {
for (int i = 0; i < TIMEOUT/10 ; i++) {
if (pair.first->count() >= 1) {
- kDebug() << pair.first->first();
+ qDebug() << pair.first->first();
return true;
}
QTest::qWait(10);
diff --git a/resources/kolabproxy/upgradejob.cpp \
b/resources/kolabproxy/upgradejob.cpp index 16c497a..0799c43 100644
--- a/resources/kolabproxy/upgradejob.cpp
+++ b/resources/kolabproxy/upgradejob.cpp
@@ -40,12 +40,12 @@ UpgradeJob::UpgradeJob( Kolab::Version targetVersion,
m_agentInstance( instance ),
m_targetVersion( targetVersion )
{
- kDebug() << targetVersion;
+ qDebug() << targetVersion;
}
void UpgradeJob::doStart()
{
- kDebug();
+ qDebug();
//Get all subdirectories of kolab resource
Akonadi::CollectionFetchJob *job =
new Akonadi::CollectionFetchJob( Akonadi::Collection::root(),
@@ -56,9 +56,9 @@ void UpgradeJob::doStart()
void UpgradeJob::collectionFetchResult( KJob *job )
{
- kDebug();
+ qDebug();
if ( job->error() ) {
- kDebug() << job->errorString();
+ qDebug() << job->errorString();
emitResult();
return;
}
@@ -72,7 +72,7 @@ void UpgradeJob::collectionFetchResult( KJob *job )
// but that's just a workaround.
if ( !( col.rights() & Akonadi::Collection::CanCreateCollection ) ||
!( col.rights() & Akonadi::Collection::CanChangeItem ) ) {
- kDebug() << "skipping shared/non-editable folder";
+ qDebug() << "skipping shared/non-editable folder";
continue;
}
KolabV2::FolderType folderType = KolabV2::Mail;
@@ -82,12 +82,12 @@ void UpgradeJob::collectionFetchResult( KJob *job )
KolabV2::folderTypeFromString( Kolab::getFolderTypeAnnotation( \
attr->annotations() ) ); }
if ( folderType == KolabV2::Mail ) {
- //kWarning() << "Wrong folder annotation "
+ //qWarning() << "Wrong folder annotation "
// << "(this should never happen, the annotation is probably not \
available)"; continue;
}
- kDebug() << "upgrading " << col.id();
+ qDebug() << "upgrading " << col.id();
collCount++;
Akonadi::ItemFetchJob *itemFetchJob = new Akonadi::ItemFetchJob( col, this );
itemFetchJob->fetchScope().fetchFullPayload( true );
@@ -106,7 +106,7 @@ void UpgradeJob::collectionFetchResult( KJob *job )
void UpgradeJob::itemFetchResult( KJob *job )
{
if ( job->error() ) {
- kDebug() << job->errorString();
+ qDebug() << job->errorString();
checkResult();
return; // Akonadi::Job propagates that automatically
}
@@ -142,7 +142,7 @@ void UpgradeJob::itemFetchResult( KJob *job )
qWarning() << "invalid item";
continue;
}
- kDebug() << "updating item " << imapItem.id();
+ qDebug() << "updating item " << imapItem.id();
const Akonadi::Item::List &translatedItems =
handler->translateItems( Akonadi::Item::List() << imapItem );
@@ -168,9 +168,9 @@ void UpgradeJob::checkResult()
void UpgradeJob::itemModifyResult( KJob *job )
{
if ( job->error() ) {
- kDebug() << job->errorString();
+ qDebug() << job->errorString();
return; // Akonadi::Job propagates that automatically
}
- kDebug() << "modjob done";
+ qDebug() << "modjob done";
}
diff --git a/resources/mailtransport_dummy/mtdummyresource.cpp \
b/resources/mailtransport_dummy/mtdummyresource.cpp index 6b01e20..6ceecbb 100644
--- a/resources/mailtransport_dummy/mtdummyresource.cpp
+++ b/resources/mailtransport_dummy/mtdummyresource.cpp
@@ -30,7 +30,7 @@
#include <ItemCopyJob>
#include <KGlobal>
-#include <KDebug>
+#include <QDebug>
#include <KLocale>
using namespace Akonadi;
@@ -90,7 +90,7 @@ void MTDummyResource::configure( WId windowId )
void MTDummyResource::sendItem( const Item &message )
{
- kDebug() << "id" << message.id();
+ qDebug() << "id" << message.id();
Q_ASSERT( currentlySending == -1 );
currentlySending = message.id();
ItemCopyJob *job = new ItemCopyJob( message, Collection( Settings::self()->sink() \
) );
diff --git a/resources/mixedmaildir/CMakeLists.txt \
b/resources/mixedmaildir/CMakeLists.txt index 8b4fb6b..bc14506 100644
--- a/resources/mixedmaildir/CMakeLists.txt
+++ b/resources/mixedmaildir/CMakeLists.txt
@@ -24,6 +24,7 @@ set( mixedmaildirresource_SRCS
mixedmaildirstore.cpp
retrieveitemsjob.cpp
../shared/createandsettagsjob.cpp
+ mixedmaildir_debug.cpp
)
install( FILES mixedmaildirresource.desktop DESTINATION \
"${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" )
diff --git a/resources/mixedmaildir/autotests/testdatautil.cpp \
b/resources/mixedmaildir/autotests/testdatautil.cpp index 58f6f18..2de037d 100644
--- a/resources/mixedmaildir/autotests/testdatautil.cpp
+++ b/resources/mixedmaildir/autotests/testdatautil.cpp
@@ -20,7 +20,7 @@
#include "testdatautil.h"
-#include <KDebug>
+#include <QDebug>
#include <QDir>
#include <QFile>
@@ -34,12 +34,12 @@ static bool copyFile( const QString &sourceFileName, const \
QString &targetFileNa QFile targetFile( targetFileName );
if ( !sourceFile.open( QIODevice::ReadOnly ) ) {
- kError() << "Cannot open source file" << sourceFileName;
+ qCritical() << "Cannot open source file" << sourceFileName;
return false;
}
if ( !targetFile.open( QIODevice::WriteOnly ) ) {
- kError() << "Cannot open target file" << targetFileName;
+ qCritical() << "Cannot open target file" << targetFileName;
return false;
}
@@ -53,7 +53,7 @@ static bool copyFiles( const QDir &sourceDir, const QDir &targetDir \
) const QFileInfo sourceFileInfo( sourceDir, file );
const QFileInfo targetFileInfo( targetDir, file );
if ( !copyFile( sourceFileInfo.absoluteFilePath(), \
targetFileInfo.absoluteFilePath() ) ) {
- kError() << "Failed to copy" << sourceFileInfo.absoluteFilePath()
+ qCritical() << "Failed to copy" << sourceFileInfo.absoluteFilePath()
<< "to" << targetFileInfo.absoluteFilePath();
return false;
}
@@ -97,12 +97,12 @@ bool TestDataUtil::installFolder( const QString &testDataName, \
const QString &in {
const FolderType type = TestDataUtil::folderType( testDataName );
if ( type == InvalidFolder ) {
- kError() << "testDataName" << testDataName << "is not a valid mail folder type";
+ qCritical() << "testDataName" << testDataName << "is not a valid mail folder \
type"; return false;
}
if ( !QDir::current().mkpath( installPath ) ) {
- kError() << "Couldn't create installPath" << installPath;
+ qCritical() << "Couldn't create installPath" << installPath;
return false;
}
@@ -112,14 +112,14 @@ bool TestDataUtil::installFolder( const QString &testDataName, \
const QString &in switch ( type ) {
case MaildirFolder:
if ( !installFileInfo.isDir() ) {
- kError() << "Target file name" << folderName << "already exists but is not \
a directory"; + qCritical() << "Target file name" << folderName << "already \
exists but is not a directory"; return false;
}
break;
case MBoxFolder:
if ( !installFileInfo.isFile() ) {
- kError() << "Target file name" << folderName << "already exists but is not \
a directory"; + qCritical() << "Target file name" << folderName << "already \
exists but is not a directory"; return false;
}
break;
@@ -139,7 +139,7 @@ bool TestDataUtil::installFolder( const QString &testDataName, \
const QString &in
if ( !installDir.mkpath( subPathPattern.arg( folderName, QLatin1String( "new" \
) ) ) ||
!installDir.mkpath( subPathPattern.arg( folderName, QLatin1String( "cur" \
) ) ) ||
!installDir.mkpath( subPathPattern.arg( folderName, QLatin1String( "tmp" \
) ) ) ) {
- kError() << "Couldn't create maildir directory structure";
+ qCritical() << "Couldn't create maildir directory structure";
return false;
}
@@ -179,7 +179,7 @@ bool TestDataUtil::installFolder( const QString &testDataName, \
const QString &in case MBoxFolder: {
const QFileInfo mboxFileInfo( testDataDir, testDataName );
if ( !copyFile( mboxFileInfo.absoluteFilePath(), \
installFileInfo.absoluteFilePath() ) ) {
- kError() << "Failed to copy" << mboxFileInfo.absoluteFilePath()
+ qCritical() << "Failed to copy" << mboxFileInfo.absoluteFilePath()
<< "to" << installFileInfo.absoluteFilePath();
return false;
}
diff --git a/resources/mixedmaildir/kmindexreader/CMakeLists.txt \
b/resources/mixedmaildir/kmindexreader/CMakeLists.txt index 8a54f71..40cb05a 100644
--- a/resources/mixedmaildir/kmindexreader/CMakeLists.txt
+++ b/resources/mixedmaildir/kmindexreader/CMakeLists.txt
@@ -8,6 +8,7 @@ add_subdirectory(tests)
set(kmindexreader_LIB_SRCS
kmindexreader.cpp
+ ../mixedmaildir_debug.cpp
)
add_library(kmindexreader ${LIBRARY_TYPE} ${kmindexreader_LIB_SRCS})
diff --git a/resources/mixedmaildir/kmindexreader/kmindexreader.cpp \
b/resources/mixedmaildir/kmindexreader/kmindexreader.cpp index 5fed5a5..de1d1b8 \
100644
--- a/resources/mixedmaildir/kmindexreader/kmindexreader.cpp
+++ b/resources/mixedmaildir/kmindexreader/kmindexreader.cpp
@@ -24,7 +24,8 @@
#include "kmindexreader.h"
-#include <KDebug>
+#include <QDebug>
+#include "../mixedmaildir_debug.h"
#include <kde_file.h>
#include <akonadi/kmime/messagestatus.h>
using Akonadi::MessageStatus;
@@ -181,12 +182,12 @@ KMIndexReader::KMIndexReader(const QString& indexFile)
, mError( false )
{
if( !mIndexFile.exists() ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "file doesn't exist";
+ qCDebug(MIXEDMAILDIR_LOG) << "file doesn't exist";
mError = true;
}
if( !mIndexFile.open( QIODevice::ReadOnly ) ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "file cant be open";
+ qCDebug(MIXEDMAILDIR_LOG) << "file cant be open";
mError = true;
}
@@ -238,17 +239,17 @@ bool KMIndexReader::readHeader( int *version )
*version = indexVersion;
if ( indexVersion < 1505 ) {
if( indexVersion == 1503 ) {
- kWarning() << "Need to convert old index file" << mIndexFileName << "to \
utf-8"; + qWarning() << "Need to convert old index file" << mIndexFileName << \
"to utf-8"; mConvertToUtf8 = true;
}
return true;
} else if ( indexVersion == 1505 ) {
} else if ( indexVersion < INDEX_VERSION ) {
- kFatal() << "Index file" << mIndexFileName << "is out of date. What to do?";
+ qCritical() << "Index file" << mIndexFileName << "is out of date. What to \
do?"; // createIndexFromContents();
return false;
} else if( indexVersion > INDEX_VERSION ) {
- kFatal() << "index file of newer version";
+ qFatal("index file of newer version");
return false;
} else {
// Header
@@ -258,7 +259,7 @@ bool KMIndexReader::readHeader( int *version )
quint32 header_length = 0;
KDE_fseek( mFp, sizeof( char ), SEEK_CUR );
if ( fread( &header_length, sizeof( header_length ), readCount, mFp ) != \
readCount ) {
- kWarning() << "Failed to read header_length";
+ qWarning() << "Failed to read header_length";
return false;
}
if ( header_length > 0xFFFF )
@@ -270,7 +271,7 @@ bool KMIndexReader::readHeader( int *version )
// Process available header parts
if ( header_length >= sizeof( byteOrder ) ) {
if ( fread( &byteOrder, sizeof( byteOrder ), readCount, mFp ) != readCount \
) {
- kWarning() << "Failed to read byteOrder";
+ qWarning() << "Failed to read byteOrder";
return false;
}
mIndexSwapByteOrder = ( byteOrder == 0x78563412 );
@@ -278,7 +279,7 @@ bool KMIndexReader::readHeader( int *version )
if ( header_length >= sizeof( sizeOfLong ) ) {
if ( fread( &sizeOfLong, sizeof( sizeOfLong ), readCount, mFp ) != \
readCount ) {
- kWarning() << "Failed to read sizeOfLong";
+ qWarning() << "Failed to read sizeOfLong";
return false;
}
if ( mIndexSwapByteOrder )
@@ -289,17 +290,17 @@ bool KMIndexReader::readHeader( int *version )
}
}
if ( needs_update || mIndexSwapByteOrder || ( mIndexSizeOfLong != sizeof( long \
) ) ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "DIRTY!";
+ qCDebug(MIXEDMAILDIR_LOG) << "DIRTY!";
// setDirty( true );
}
// Seek to end of header
KDE_fseek( mFp, endOfHeader, SEEK_SET );
if ( mIndexSwapByteOrder ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Index File has byte order swapped!";
+ qCDebug(MIXEDMAILDIR_LOG) << "Index File has byte order swapped!";
}
if ( mIndexSizeOfLong != sizeof( long ) ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Index File sizeOfLong is" << \
mIndexSizeOfLong << "while sizeof(long) is" << sizeof(long) << "!"; + \
qCDebug(MIXEDMAILDIR_LOG) << "Index File sizeOfLong is" << mIndexSizeOfLong << "while \
sizeof(long) is" << sizeof(long) << "!"; }
}
@@ -326,12 +327,12 @@ bool KMIndexReader::readIndex()
// loop through the entire index
while ( !feof( mFp ) ) {
- //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "NEW MSG!";
+ //qCDebug(MIXEDMAILDIR_LOG) << "NEW MSG!";
msg = 0;
// check version (parsed by readHeader)
// because different versions must be
// parsed differently
- //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "parsing version" << version;
+ //qCDebug(MIXEDMAILDIR_LOG) << "parsing version" << version;
if( version >= 1505 ) {
// parse versions >= 1505
if( !fread( &len, sizeof( len ), 1, mFp ) )
@@ -357,8 +358,8 @@ bool KMIndexReader::readIndex()
if ( *line.data() == '\0' ) {
// really, i have no idea when or how this would occur
// but we probably want to know if it does - Casey
- kWarning() << "Unknowable bad occurred";
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "fclose(mFp = " << mFp << ")";
+ qWarning() << "Unknowable bad occurred";
+ qCDebug(MIXEDMAILDIR_LOG) << "fclose(mFp = " << mFp << ")";
fclose( mFp );
mFp = 0;
mMsgList.clear();
@@ -460,7 +461,7 @@ namespace {
template < typename T > void copy_from_stream( T & x ) {
if( g_chunk_offset + int( sizeof( T ) ) > g_chunk_length ) {
g_chunk_offset = g_chunk_length;
- kWarning() << "This should never happen..";
+ qWarning() << "This should never happen..";
x = 0;
} else {
// the memcpy is optimized out by the compiler for the values
@@ -475,14 +476,14 @@ bool KMIndexReader::fillPartsCache( KMIndexData* msg, off_t \
indexOff, short int {
if( !msg )
return false;
- //kDebug( KDE_DEFAULT_DEBUG_AREA );
+ //qCDebug(MIXEDMAILDIR_LOG);
if ( g_chunk_length < indexLen )
g_chunk = (uchar *)realloc( g_chunk, g_chunk_length = indexLen );
off_t first_off = KDE_ftell( mFp );
KDE_fseek( mFp, indexOff, SEEK_SET );
if ( fread( g_chunk, indexLen, readCount, mFp ) != readCount ) {
- kWarning() << "Failed to read index";
+ qWarning() << "Failed to read index";
return false;
}
KDE_fseek( mFp, first_off, SEEK_SET );
@@ -500,7 +501,7 @@ bool KMIndexReader::fillPartsCache( KMIndexData* msg, off_t \
indexOff, short int }
type = (MsgPartType) tmp;
if ( g_chunk_offset + len > indexLen ) {
- kWarning() << "g_chunk_offset + len > indexLen" << "This should never \
happen.."; + qWarning() << "g_chunk_offset + len > indexLen" << "This should \
never happen.."; return false;
}
// Only try to create strings if the part is really a string part, see \
declaration of @@ -526,7 +527,7 @@ bool KMIndexReader::fillPartsCache( KMIndexData* \
msg, off_t indexOff, short int
} else if( ( type >= 7 && type <= 10 ) || type == 12 || type == 13 || ( type >= \
16 && type <= 18 ) ) { Q_ASSERT( mIndexSizeOfLong == len );
if ( mIndexSizeOfLong == sizeof( ret ) ) {
- //kDebug( KDE_DEFAULT_DEBUG_AREA ) << "mIndexSizeOfLong == sizeof(ret)";
+ //qCDebug(MIXEDMAILDIR_LOG) << "mIndexSizeOfLong == sizeof(ret)";
// this memcpy replaces the original call to copy_from_stream
// so that g_chunk_offset is not changed
memcpy( &ret, g_chunk + g_chunk_offset, sizeof( ret ) );
diff --git a/resources/mixedmaildir/mixedmaildir_debug.cpp \
b/resources/mixedmaildir/mixedmaildir_debug.cpp new file mode 100644
index 0000000..6f1c568
--- /dev/null
+++ b/resources/mixedmaildir/mixedmaildir_debug.cpp
@@ -0,0 +1,23 @@
+/* This file is part of the KDE project
+ Copyright (C) 2014 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "mixedmaildir_debug.h"
+Q_LOGGING_CATEGORY(MIXEDMAILDIR_LOG, "log_mixedmaildir")
+
+
diff --git a/resources/mixedmaildir/mixedmaildir_debug.h \
b/resources/mixedmaildir/mixedmaildir_debug.h new file mode 100644
index 0000000..76572ed
--- /dev/null
+++ b/resources/mixedmaildir/mixedmaildir_debug.h
@@ -0,0 +1,27 @@
+/* This file is part of the KDE project
+ Copyright (C) 2014 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef MIXEDMAILDIR_DEBUG_H
+#define MIXEDMAILDIR_DEBUG_H
+
+#include <QLoggingCategory>
+Q_DECLARE_LOGGING_CATEGORY(MIXEDMAILDIR_LOG)
+
+#endif
+
diff --git a/resources/mixedmaildir/mixedmaildirresource.cpp \
b/resources/mixedmaildir/mixedmaildirresource.cpp index 4d56932..0af1d55 100644
--- a/resources/mixedmaildir/mixedmaildirresource.cpp
+++ b/resources/mixedmaildir/mixedmaildirresource.cpp
@@ -21,6 +21,7 @@
*/
#include "mixedmaildirresource.h"
+#include "mixedmaildir_debug.h"
#include "compactchangehelper.h"
#include "configdialog.h"
@@ -55,7 +56,7 @@
#include <kmime/kmime_message.h>
-#include <KDebug>
+#include <QDebug>
#include <KLocalizedString>
#include <KWindowSystem>
@@ -149,10 +150,10 @@ void MixedMaildirResource::configure( WId windowId )
void MixedMaildirResource::itemAdded( const Item &item, const Collection& collection \
) {
-/* kDebug() << "item.id=" << item.id() << "col=" << collection.remoteId();*/
+/* qDebug() << "item.id=" << item.id() << "col=" << collection.remoteId();*/
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -163,11 +164,11 @@ void MixedMaildirResource::itemAdded( const Item &item, const \
Collection& collec
void MixedMaildirResource::itemChanged( const Item &item, const QSet<QByteArray>& \
parts ) {
-/* kDebug() << "item.id=" << item.id() << "col=" << \
item.parentCollection().remoteId() +/* qDebug() << "item.id=" << item.id() << "col=" \
<< item.parentCollection().remoteId() << "parts=" << parts;*/
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -189,7 +190,7 @@ void MixedMaildirResource::itemChanged( const Item &item, const \
QSet<QByteArray>
void MixedMaildirResource::itemMoved( const Item &item, const Collection &source, \
const Collection &destination ) {
-/* kDebug() << "item.id=" << item.id() << "remoteId=" << item.remoteId()
+/* qDebug() << "item.id=" << item.id() << "remoteId=" << item.remoteId()
<< "source=" << source.remoteId() << "dest=" << destination.remoteId();*/
if ( source == destination ) {
changeProcessed();
@@ -198,7 +199,7 @@ void MixedMaildirResource::itemMoved( const Item &item, const \
Collection &source
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -214,11 +215,11 @@ void MixedMaildirResource::itemMoved( const Item &item, const \
Collection &source
void MixedMaildirResource::itemRemoved(const Item &item)
{
-/* kDebug() << "item.id=" << item.id() << "col=" << collection.remoteId()
+/* qDebug() << "item.id=" << item.id() << "col=" << collection.remoteId()
<< "collection.remoteRevision=" << \
item.parentCollection().remoteRevision();*/ if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -233,7 +234,7 @@ void MixedMaildirResource::retrieveCollections()
{
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -248,7 +249,7 @@ void MixedMaildirResource::retrieveItems( const Collection & col \
) {
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -280,7 +281,7 @@ void MixedMaildirResource::collectionAdded(const Collection \
&collection, const C {
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -293,7 +294,7 @@ void MixedMaildirResource::collectionChanged(const Collection \
&collection) {
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -302,7 +303,7 @@ void MixedMaildirResource::collectionChanged(const Collection \
&collection) // but rename the resource.
if ( collection.remoteId() == mStore->topLevelCollection().remoteId() ) {
if ( collection.name() != name() ) {
- kDebug() << "TopLevel collection name differs from resource name: collection="
+ qDebug() << "TopLevel collection name differs from resource name: collection="
<< collection.name() << "resource=" << name() << ". Renaming \
resource"; setName( collection.name() );
}
@@ -320,7 +321,7 @@ void MixedMaildirResource::collectionChanged(const Collection \
&collection, const {
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -329,7 +330,7 @@ void MixedMaildirResource::collectionChanged(const Collection \
&collection, const // but rename the resource.
if ( collection.remoteId() == mStore->topLevelCollection().remoteId() ) {
if ( collection.name() != name() ) {
- kDebug() << "TopLevel collection name differs from resource name: collection="
+ qDebug() << "TopLevel collection name differs from resource name: collection="
<< collection.name() << "resource=" << name() << ". Renaming \
resource"; setName( collection.name() );
}
@@ -347,18 +348,18 @@ void MixedMaildirResource::collectionChanged(const Collection \
&collection, const
void MixedMaildirResource::collectionMoved( const Collection &collection, const \
Collection &source, const Collection &dest ) {
- //kDebug( KDE_DEFAULT_DEBUG_AREA ) << collection << source << dest;
+ //qCDebug(MIXEDMAILDIR_LOG) << collection << source << dest;
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
if ( collection.parentCollection() == Collection::root() ) {
const QString message = i18nc( "@info:status", "Cannot move root maildir folder \
'%1'." ,collection.remoteId() );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -379,7 +380,7 @@ void MixedMaildirResource::collectionRemoved( const Collection \
&collection ) {
if ( !ensureSaneConfiguration() ) {
const QString message = i18nc( "@info:status", "Unusable configuration." );
- kError() << message;
+ qCritical() << message;
cancelTask( message );
return;
}
@@ -400,7 +401,7 @@ bool MixedMaildirResource::ensureDirExists()
if ( !dir.exists() ) {
if ( !dir.mkpath( Settings::self()->path() ) ) {
const QString message = i18nc( "@info:status", "Unable to create maildir \
'%1'.", Settings::self()->path() );
- kError() << message;
+ qCritical() << message;
status( Broken, message );
return false;
}
@@ -412,7 +413,7 @@ bool MixedMaildirResource::ensureSaneConfiguration()
{
if ( Settings::self()->path().isEmpty() ) {
const QString message = i18nc( "@info:status", "No usable storage location \
configured." );
- kError() << message;
+ qCritical() << message;
status( NotConfigured, message );
return false;
}
@@ -426,13 +427,13 @@ void MixedMaildirResource::checkForInvalidatedIndexCollections( \
KJob * job ) const QVariant var = job->property( "onDiskIndexInvalidated" );
if ( var.isValid() ) {
const Collection::List collections = var.value<Collection::List>();
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "On disk index of" << collections.count()
+ qCDebug(MIXEDMAILDIR_LOG) << "On disk index of" << collections.count()
<< "collections invalidated after" << job->metaObject()->className();
Q_FOREACH( const Collection &collection, collections ) {
const Collection::Id id = collection.id();
if ( !mSynchronizedCollections.contains( id ) && \
!mPendingSynchronizeCollections.contains( id ) ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Requesting sync of collection" << \
collection.name() + qCDebug(MIXEDMAILDIR_LOG) << "Requesting sync of \
collection" << collection.name() << ", id=" << collection.id();
mPendingSynchronizeCollections << id;
synchronizeCollection( id );
@@ -458,7 +459,7 @@ void MixedMaildirResource::reapplyConfiguration()
void MixedMaildirResource::retrieveCollectionsResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -481,7 +482,7 @@ void MixedMaildirResource::retrieveCollectionsResult( KJob *job )
void MixedMaildirResource::retrieveItemsResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -493,7 +494,7 @@ void MixedMaildirResource::retrieveItemsResult( KJob *job )
// messages marked as deleted have been deleted from mbox files but never got \
purged // TODO FileStore could provide deleteItems() to deleted all filtered items \
in one go KJob* deleteJob = 0;
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << retrieveJob->itemsMarkedAsDeleted().count()
+ qCDebug(MIXEDMAILDIR_LOG) << retrieveJob->itemsMarkedAsDeleted().count()
<< "items marked as Deleted";
Q_FOREACH( const Item &item, retrieveJob->itemsMarkedAsDeleted() ) {
deleteJob = mStore->deleteItem( item );
@@ -513,7 +514,7 @@ void MixedMaildirResource::retrieveItemsResult( KJob *job )
if ( var.isValid() ) {
const QHash<QString, QVariant> tagListHash = var.value< QHash<QString, QVariant> \
>(); if ( !tagListHash.isEmpty() ) {
- kDebug() << tagListHash.count() << "of" << items.count()
+ qDebug() << tagListHash.count() << "of" << items.count()
<< "items in collection" << retrieveJob->collection().remoteId() << \
"have tags";
TagContextList taggedItems;
@@ -548,7 +549,7 @@ void MixedMaildirResource::retrieveItemsResult( KJob *job )
void MixedMaildirResource::retrieveItemResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -564,7 +565,7 @@ void MixedMaildirResource::retrieveItemResult( KJob *job )
void MixedMaildirResource::itemAddedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -573,7 +574,7 @@ void MixedMaildirResource::itemAddedResult( KJob *job )
FileStore::ItemCreateJob *itemJob = qobject_cast<FileStore::ItemCreateJob*>( job \
); Q_ASSERT( itemJob != 0 );
-/* kDebug() << "item.id=" << itemJob->item().id() << "remoteId=" << \
itemJob->item().remoteId();*/ +/* qDebug() << "item.id=" << itemJob->item().id() << \
"remoteId=" << itemJob->item().remoteId();*/ changeCommitted( itemJob->item() );
checkForInvalidatedIndexCollections( job );
@@ -582,7 +583,7 @@ void MixedMaildirResource::itemAddedResult( KJob *job )
void MixedMaildirResource::itemChangedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -606,7 +607,7 @@ void MixedMaildirResource::itemChangedResult( KJob *job )
void MixedMaildirResource::itemMovedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -618,7 +619,7 @@ void MixedMaildirResource::itemMovedResult( KJob *job )
changeCommitted( itemJob->item() );
const QString remoteId = itemJob->property( "originalRemoteId" ).value<QString>();
-// kDebug() << "item.id=" << itemJob->item().id() << "remoteId=" << \
itemJob->item().remoteId() +// qDebug() << "item.id=" << itemJob->item().id() << \
"remoteId=" << itemJob->item().remoteId() // << "old remoteId=" << \
remoteId;
const QVariant compactStoreVar = itemJob->property( "compactStore" );
@@ -632,7 +633,7 @@ void MixedMaildirResource::itemMovedResult( KJob *job )
void MixedMaildirResource::itemRemovedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -662,7 +663,7 @@ void MixedMaildirResource::itemsDeleted( KJob *job )
void MixedMaildirResource::collectionAddedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -677,7 +678,7 @@ void MixedMaildirResource::collectionAddedResult( KJob *job )
void MixedMaildirResource::collectionChangedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -694,7 +695,7 @@ void MixedMaildirResource::collectionChangedResult( KJob *job )
void MixedMaildirResource::collectionMovedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -711,7 +712,7 @@ void MixedMaildirResource::collectionMovedResult( KJob *job )
void MixedMaildirResource::collectionRemovedResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -734,7 +735,7 @@ void MixedMaildirResource::compactStore( const QVariant &arg )
void MixedMaildirResource::compactStoreResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
status( Broken, job->errorString() );
cancelTask( job->errorString() );
return;
@@ -744,7 +745,7 @@ void MixedMaildirResource::compactStoreResult( KJob *job )
Q_ASSERT( compactJob != 0 );
const Item::List items = compactJob->changedItems();
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Compacting store resulted in" << \
items.count() << "changed items"; + qCDebug(MIXEDMAILDIR_LOG) << "Compacting store \
resulted in" << items.count() << "changed items";
mCompactHelper->addChangedItems( items );
@@ -756,14 +757,14 @@ void MixedMaildirResource::compactStoreResult( KJob *job )
void MixedMaildirResource::restoreTags( const QVariant &arg )
{
if ( !arg.isValid() ) {
- kError() << "Given variant is not valid";
+ qCritical() << "Given variant is not valid";
cancelTask();
return;
}
const Collection collection = arg.value<Collection>();
if ( !collection.isValid() ) {
- kError() << "Given variant is not valid";
+ qCritical() << "Given variant is not valid";
cancelTask();
return;
}
@@ -777,7 +778,7 @@ void MixedMaildirResource::restoreTags( const QVariant &arg )
void MixedMaildirResource::processNextTagContext()
{
- kDebug() << mPendingTagContexts.count() << "items to go";
+ qDebug() << mPendingTagContexts.count() << "items to go";
if ( mPendingTagContexts.isEmpty() ) {
return;
}
@@ -793,7 +794,7 @@ void MixedMaildirResource::processNextTagContext()
void MixedMaildirResource::tagFetchJobResult( KJob *job )
{
if ( job->error() != 0 ) {
- kError() << job->errorString();
+ qCritical() << job->errorString();
processNextTagContext();
return;
}
@@ -805,12 +806,12 @@ void MixedMaildirResource::tagFetchJobResult( KJob *job )
const Item item = fetchJob->items()[ 0 ];
const QStringList tagList = job->property( "tagList" ).value<QStringList>();
- kDebug() << "Tagging item" << item.url() << "with" << tagList;
+ qDebug() << "Tagging item" << item.url() << "with" << tagList;
Akonadi::Tag::List tags;
Q_FOREACH( const QString &tag, tagList ) {
if ( tag.isEmpty() ) {
- kWarning() << "TagList for item" << item.url() << "contains an empty tag";
+ qWarning() << "TagList for item" << item.url() << "contains an empty tag";
} else {
tags << Akonadi::Tag(tag);
}
diff --git a/resources/mixedmaildir/mixedmaildirstore.cpp \
b/resources/mixedmaildir/mixedmaildirstore.cpp index 969029a..a21cb9b 100644
--- a/resources/mixedmaildir/mixedmaildirstore.cpp
+++ b/resources/mixedmaildir/mixedmaildirstore.cpp
@@ -21,6 +21,7 @@
#include "mixedmaildirstore.h"
#include "kmindexreader/kmindexreader.h"
+#include "mixedmaildir_debug.h"
#include "filestore/collectioncreatejob.h"
#include "filestore/collectiondeletejob.h"
@@ -49,7 +50,7 @@
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <QDir>
#include <QFileInfo>
@@ -71,7 +72,7 @@ static bool indexFileForFolder( const QFileInfo &folderDirInfo, \
QFileInfo &index indexFileInfo = QFileInfo( folderDirInfo.dir(), QString::fromUtf8( \
".%1.index" ).arg( folderDirInfo.fileName() ) );
if ( !indexFileInfo.exists() || !indexFileInfo.isReadable() ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "No index file" << \
indexFileInfo.absoluteFilePath() << "or not readable"; + qCDebug(MIXEDMAILDIR_LOG) \
<< "No index file" << indexFileInfo.absoluteFilePath() << "or not readable"; return \
false; }
@@ -280,7 +281,7 @@ void MBoxContext::readIndexData()
}
if ( mboxFileInfo.lastModified() > indexFileInfo.lastModified() ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "MBox file " << \
mboxFileInfo.absoluteFilePath() + qCDebug(MIXEDMAILDIR_LOG) << "MBox file " << \
mboxFileInfo.absoluteFilePath()
<< "newer than the index: mbox modified at"
<< mboxFileInfo.lastModified() << ", index \
modified at" << indexFileInfo.lastModified();
@@ -289,7 +290,7 @@ void MBoxContext::readIndexData()
KMIndexReader indexReader( indexFileInfo.absoluteFilePath() );
if ( indexReader.error() || !indexReader.readIndex() ) {
- kError() << "Index file" << indexFileInfo.path() << "could not be read";
+ qCritical() << "Index file" << indexFileInfo.path() << "could not be read";
return;
}
@@ -304,7 +305,7 @@ void MBoxContext::readIndexData()
}
}
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Read" << mIndexData.count() << "index entries \
from" + qCDebug(MIXEDMAILDIR_LOG) << "Read" << mIndexData.count() << "index entries \
from" << indexFileInfo.absoluteFilePath();
}
@@ -332,7 +333,7 @@ class MaildirContext
Q_ASSERT( mIndexData.value( result )->isEmpty() );
} else {
//TODO: use the error string?
- kWarning() << mMaildir.lastError();
+ qWarning() << mMaildir.lastError();
}
return result;
@@ -366,7 +367,7 @@ class MaildirContext
}
} else {
//TODO error handling?
- kWarning() << mMaildir.lastError();
+ qWarning() << mMaildir.lastError();
}
return result;
@@ -445,14 +446,14 @@ void MaildirContext::readIndexData()
const QFileInfo newDirFileInfo( maildirBaseDir, QLatin1String( "new" ) );
if ( curDirFileInfo.lastModified() > indexFileInfo.lastModified() ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Maildir " << \
maildirFileInfo.absoluteFilePath() + qCDebug(MIXEDMAILDIR_LOG) << "Maildir " << \
maildirFileInfo.absoluteFilePath()
<< "\"cur\" directory newer than the index: cur \
modified at"
<< curDirFileInfo.lastModified() << ", index \
modified at" << indexFileInfo.lastModified();
return;
}
if ( newDirFileInfo.lastModified() > indexFileInfo.lastModified() ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Maildir \"new\" directory newer than the \
index: cur modified at" + qCDebug(MIXEDMAILDIR_LOG) << "Maildir \"new\" directory \
newer than the index: cur modified at"
<< newDirFileInfo.lastModified() << ", index \
modified at" << indexFileInfo.lastModified();
return;
@@ -460,7 +461,7 @@ void MaildirContext::readIndexData()
KMIndexReader indexReader( indexFileInfo.absoluteFilePath() );
if ( indexReader.error() || !indexReader.readIndex() ) {
- kError() << "Index file" << indexFileInfo.path() << "could not be read";
+ qCritical() << "Index file" << indexFileInfo.path() << "could not be read";
return;
}
@@ -474,7 +475,7 @@ void MaildirContext::readIndexData()
}
}
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Read" << mIndexData.count() << "index entries \
from" + qCDebug(MIXEDMAILDIR_LOG) << "Read" << mIndexData.count() << "index entries \
from" << indexFileInfo.absoluteFilePath();
}
@@ -540,7 +541,7 @@ MixedMaildirStore::Private::FolderType \
MixedMaildirStore::Private::folderForColl
if ( col.remoteId().isEmpty() ) {
errorText = i18nc( "@info:status", "Given folder name is empty" );
- kWarning() << "Incomplete ancestor chain for collection.";
+ qWarning() << "Incomplete ancestor chain for collection.";
Q_ASSERT( !col.remoteId().isEmpty() ); // abort! Look at backtrace to see where \
we came from. return InvalidFolder;
}
@@ -548,7 +549,7 @@ MixedMaildirStore::Private::FolderType \
MixedMaildirStore::Private::folderForColl if ( col.parentCollection() == \
Collection::root() ) { path = q->path();
if ( col.remoteId() != path )
- kWarning() << "RID mismatch, is" << col.remoteId() << "expected" << path;
+ qWarning() << "RID mismatch, is" << col.remoteId() << "expected" << path;
return TopLevelFolder;
}
@@ -747,13 +748,13 @@ void MixedMaildirStore::Private::listCollection( FileStore::Job \
*job, MBoxPtr &m
quint64 uid = indexData->uid();
if ( uid != 0 ) {
- kDebug() << "item" << item.remoteId() << "has UID" << uid;
+ qDebug() << "item" << item.remoteId() << "has UID" << uid;
uidHash.insert( item.remoteId(), QString::number( uid ) );
}
const QStringList tagList = indexData->tagList();
if ( !tagList.isEmpty() ) {
- kDebug() << "item" << item.remoteId() << "has"
+ qDebug() << "item" << item.remoteId() << "has"
<< tagList.count() << "tags:" << tagList;
tagListHash.insert( item.remoteId(), tagList );
}
@@ -761,7 +762,7 @@ void MixedMaildirStore::Private::listCollection( FileStore::Job \
*job, MBoxPtr &m Akonadi::MessageStatus status;
status.setDeleted( true ),
item.setFlags( status.statusFlags() );
- kDebug() << "no index for item" << item.remoteId() << "in MBox" << \
mbox->fileName() + qDebug() << "no index for item" << item.remoteId() << "in \
MBox" << mbox->fileName()
<< "so it has been deleted but not purged. Marking it as"
<< item.flags();
}
@@ -806,13 +807,13 @@ void MixedMaildirStore::Private::listCollection( FileStore::Job \
*job, MaildirPtr
const quint64 uid = indexData->uid();
if ( uid != 0 ) {
- kDebug() << "item" << item.remoteId() << "has UID" << uid;
+ qDebug() << "item" << item.remoteId() << "has UID" << uid;
uidHash.insert( item.remoteId(), QString::number( uid ) );
}
const QStringList tagList = indexData->tagList();
if ( !tagList.isEmpty() ) {
- kDebug() << "item" << item.remoteId() << "has"
+ qDebug() << "item" << item.remoteId() << "has"
<< tagList.count() << "tags:" << tagList;
tagListHash.insert( item.remoteId(), tagList );
}
@@ -843,7 +844,7 @@ void MixedMaildirStore::Private::listCollection( FileStore::Job \
*job, MaildirPtr
bool MixedMaildirStore::Private::fillItem( MBoxPtr &mbox, bool includeHeaders, bool \
includeBody, Item &item ) const {
-// kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Filling item" << item.remoteId() << "from \
MBox: includeBody=" << includeBody; +// qCDebug(MIXEDMAILDIR_LOG) << "Filling item" \
<< item.remoteId() << "from MBox: includeBody=" << includeBody; bool ok = false;
const quint64 offset = item.remoteId().toULongLong( &ok );
if ( !ok || !mbox->isValidOffset( offset ) ) {
@@ -872,7 +873,7 @@ bool MixedMaildirStore::Private::fillItem( MBoxPtr &mbox, bool \
includeHeaders, b
bool MixedMaildirStore::Private::fillItem( const MaildirPtr &md, bool \
includeHeaders, bool includeBody, Item &item ) const {
-/* kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Filling item" << item.remoteId() << "from \
Maildir: includeBody=" << includeBody;*/ +/* qCDebug(MIXEDMAILDIR_LOG) << "Filling \
item" << item.remoteId() << "from Maildir: includeBody=" << includeBody;*/
const qint64 entrySize = md->maildir().size( item.remoteId() );
if ( entrySize < 0 )
@@ -907,7 +908,7 @@ bool MixedMaildirStore::Private::fillItem( const MaildirPtr &md, \
bool includeHea
void MixedMaildirStore::Private::updateContextHashes( const QString &oldPath, const \
QString &newPath ) {
- //kDebug() << "oldPath=" << oldPath << "newPath=" << newPath;
+ //qDebug() << "oldPath=" << oldPath << "newPath=" << newPath;
const QString oldSubDirPath = Maildir::subDirPathForFolderPath( oldPath );
const QString newSubDirPath = Maildir::subDirPathForFolderPath( newPath );
@@ -934,7 +935,7 @@ void MixedMaildirStore::Private::updateContextHashes( const \
QString &oldPath, co mboxes.insert( key, mboxPtr );
}
}
- //kDebug() << "mbox: old keys=" << mMBoxes.keys() << "new keys" << mboxes.keys();
+ //qDebug() << "mbox: old keys=" << mMBoxes.keys() << "new keys" << mboxes.keys();
mMBoxes = mboxes;
MaildirHash maildirs;
@@ -960,14 +961,14 @@ void MixedMaildirStore::Private::updateContextHashes( const \
QString &oldPath, co maildirs.insert( key, mdPtr );
}
}
- //kDebug() << "maildir: old keys=" << mMaildirs.keys() << "new keys" << \
maildirs.keys(); + //qDebug() << "maildir: old keys=" << mMaildirs.keys() << "new \
keys" << maildirs.keys(); mMaildirs = maildirs;
}
bool MixedMaildirStore::Private::visit( FileStore::Job *job )
{
const QString message = i18nc( "@info:status", "Unhandled operation %1", \
QLatin1String(job->metaObject()->className()) );
- kError() << message;
+ qCritical() << message;
q->notifyError( FileStore::Job::InvalidJobContext, message );
return false;
}
@@ -981,7 +982,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionCreateJob *job ) if ( folderType == InvalidFolder ) {
errorText = i18nc( "@info:status", "Cannot create folder %1 inside folder %2",
job->collection().name(), job->targetParent().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -995,7 +996,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionCreateJob *job ) if ( dirInfo.exists() && !dirInfo.isDir() ) {
errorText = i18nc( "@info:status", "Cannot create folder %1 inside folder %2",
job->collection().name(), job->targetParent().name() );
- kError() << errorText << "FolderType=" << folderType << ", dirInfo exists and \
it not a dir"; + qCritical() << errorText << "FolderType=" << folderType << ", \
dirInfo exists and it not a dir"; q->notifyError( FileStore::Job::InvalidJobContext, \
errorText ); return false;
}
@@ -1003,7 +1004,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionCreateJob *job ) if ( !dir.mkpath( collectionName ) ) {
errorText = i18nc( "@info:status", "Cannot create folder %1 inside folder %2",
job->collection().name(), job->targetParent().name() );
- kError() << errorText << "FolderType=" << folderType << ", mkpath failed";
+ qCritical() << errorText << "FolderType=" << folderType << ", mkpath failed";
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1012,7 +1013,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionCreateJob *job ) if ( !md.create() ) {
errorText = i18nc( "@info:status", "Cannot create folder %1 inside folder %2",
job->collection().name(), job->targetParent().name() );
- kError() << errorText << "FolderType=" << folderType << ", maildir create \
failed"; + qCritical() << errorText << "FolderType=" << folderType << ", maildir \
create failed"; q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1024,7 +1025,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionCreateJob *job ) if ( parentMd.addSubFolder( collectionName \
).isEmpty() ) {
errorText = i18nc( "@info:status", "Cannot create folder %1 inside folder %2",
job->collection().name(), job->targetParent().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1053,7 +1054,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionDeleteJob *job ) if ( folderType == InvalidFolder ) {
errorText = i18nc( "@info:status", "Cannot remove folder %1 from folder %2",
job->collection().name(), \
job->collection().parentCollection().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1063,7 +1064,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionDeleteJob *job ) if ( parentFolderType == InvalidFolder ) {
errorText = i18nc( "@info:status", "Cannot remove folder %1 from folder %2",
job->collection().name(), \
job->collection().parentCollection().name() );
- kError() << errorText << "Parent FolderType=" << parentFolderType;
+ qCritical() << errorText << "Parent FolderType=" << parentFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1072,7 +1073,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionDeleteJob *job ) if ( !QFile::remove( path ) ) {
errorText = i18nc( "@info:status", "Cannot remove folder %1 from folder %2",
job->collection().name(), \
job->collection().parentCollection().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1080,7 +1081,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionDeleteJob *job ) if ( \
!KPIMUtils::removeDirAndContentsRecursively( path ) ) {
errorText = i18nc( "@info:status", "Cannot remove folder %1 from folder %2",
job->collection().name(), \
job->collection().parentCollection().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1100,7 +1101,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionFetchJob *job ) const FolderType folderType = \
folderForCollection( job->collection(), path, errorText );
if ( folderType == InvalidFolder ) {
- kError() << errorText << "collection:" << job->collection();
+ qCritical() << errorText << "collection:" << job->collection();
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1116,7 +1117,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionFetchJob *job ) mbox = MBoxPtr( new MBoxContext );
if ( !mbox->load( path ) ) {
errorText = i18nc( "@info:status", "Failed to load MBox folder %1", path \
);
- kError() << errorText << "collection=" << collection;
+ qCritical() << errorText << "collection=" << collection;
q->notifyError( FileStore::Job::InvalidJobContext, errorText ); // TODO \
should be a different error code return false;
}
@@ -1172,7 +1173,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionModifyJob *job )
// we also only do renames
if ( collection.remoteId() == collection.name() ) {
- kWarning() << "CollectionModifyJob with name still identical to remoteId. \
Ignoring"; + qWarning() << "CollectionModifyJob with name still identical to \
remoteId. Ignoring"; return true;
}
@@ -1182,7 +1183,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionModifyJob *job ) if ( folderType == InvalidFolder ) {
errorText = i18nc( "@info:status", "Cannot rename folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1199,7 +1200,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionModifyJob *job ) if ( targetFileInfo.exists() || ( \
subDirInfo.exists() && targetSubDirInfo.exists() ) ) { errorText = i18nc( \
"@info:status", "Cannot rename folder %1", collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1214,7 +1215,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionModifyJob *job ) if ( findIt == mMBoxes.constEnd() ) {
mbox = MBoxPtr( new MBoxContext );
if ( !mbox->load( path ) ) {
- kWarning() << "Failed to load mbox" << path;
+ qWarning() << "Failed to load mbox" << path;
}
mbox->mCollection = collection;
@@ -1235,7 +1236,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionModifyJob *job ) if ( !parentDir.rename( \
fileInfo.absoluteFilePath(), targetFileInfo.fileName() ) ) { errorText = i18nc( \
"@info:status", "Cannot rename folder %1", collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1244,7 +1245,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionModifyJob *job )
if ( !parentDir.rename( subDirInfo.absoluteFilePath(), \
targetSubDirInfo.fileName() ) ) { errorText = i18nc( "@info:status", "Cannot rename \
folder %1", collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
// try to recover the previous rename
@@ -1305,12 +1306,12 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionMoveJob *job ) if ( moveFolderType == InvalidFolder || \
moveFolderType == TopLevelFolder ) {
errorText = i18nc( "@info:status", "Cannot move folder %1 from folder %2 to \
folder %3",
moveCollection.name(), \
moveCollection.parentCollection().name(), targetCollection.name() );
- kError() << errorText << "FolderType=" << moveFolderType;
+ qCritical() << errorText << "FolderType=" << moveFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
-// kDebug( KDE_DEFAULT_DEBUG_AREA ) << "moveCollection" << \
moveCollection.remoteId() +// qCDebug(MIXEDMAILDIR_LOG) << "moveCollection" << \
moveCollection.remoteId() // << "movePath=" << \
movePath // << "moveType=" << moveFolderType;
@@ -1319,12 +1320,12 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionMoveJob *job ) if ( targetFolderType == InvalidFolder ) {
errorText = i18nc( "@info:status", "Cannot move folder %1 from folder %2 to \
folder %3",
moveCollection.name(), \
moveCollection.parentCollection().name(), targetCollection.name() );
- kError() << errorText << "FolderType=" << targetFolderType;
+ qCritical() << errorText << "FolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
-// kDebug( KDE_DEFAULT_DEBUG_AREA ) << "targetCollection" << \
targetCollection.remoteId() +// qCDebug(MIXEDMAILDIR_LOG) << "targetCollection" << \
targetCollection.remoteId() // << "targetPath=" \
<< targetPath // << "targetType=" << \
targetFolderType;
@@ -1337,7 +1338,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionMoveJob *job ) if ( !topDir.mkpath( \
targetSubDirInfo.absoluteFilePath() ) ) {
errorText = i18nc( "@info:status", "Cannot move folder %1 from folder %2 to \
folder %3",
moveCollection.name(), \
moveCollection.parentCollection().name(), targetCollection.name() );
- kError() << errorText << "MoveFolderType=" << moveFolderType
+ qCritical() << errorText << "MoveFolderType=" << moveFolderType
<< "TargetFolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
@@ -1355,7 +1356,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionMoveJob *job ) if ( findIt == mMBoxes.constEnd() ) {
mbox = MBoxPtr( new MBoxContext );
if ( !mbox->load( movePath ) ) {
- kWarning() << "Failed to load mbox" << movePath;
+ qWarning() << "Failed to load mbox" << movePath;
}
mbox->mCollection = moveCollection;
@@ -1377,7 +1378,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionMoveJob *job )
!targetDir.rename( moveFileInfo.absoluteFilePath(), moveFileInfo.fileName() \
) ) {
errorText = i18nc( "@info:status", "Cannot move folder %1 from folder %2 to \
folder %3",
moveCollection.name(), \
moveCollection.parentCollection().name(), targetCollection.name() );
- kError() << errorText << "MoveFolderType=" << moveFolderType
+ qCritical() << errorText << "MoveFolderType=" << moveFolderType
<< "TargetFolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
@@ -1388,7 +1389,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionMoveJob *job )
!targetDir.rename( moveSubDirInfo.absoluteFilePath(), \
moveSubDirInfo.fileName() ) ) {
errorText = i18nc( "@info:status", "Cannot move folder %1 from folder %2 to \
folder %3",
moveCollection.name(), \
moveCollection.parentCollection().name(), targetCollection.name() );
- kError() << errorText << "MoveFolderType=" << moveFolderType
+ qCritical() << errorText << "MoveFolderType=" << moveFolderType
<< "TargetFolderType=" << targetFolderType;
// try to revert the other rename
@@ -1420,7 +1421,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::CollectionMoveJob *job ) if ( !moveMd.moveTo( targetMd ) ) {
errorText = i18nc( "@info:status", "Cannot move folder %1 from folder %2 to \
folder %3",
moveCollection.name(), \
moveCollection.parentCollection().name(), targetCollection.name() );
- kError() << errorText << "MoveFolderType=" << moveFolderType
+ qCritical() << errorText << "MoveFolderType=" << moveFolderType
<< "TargetFolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
@@ -1461,7 +1462,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemCreateJob *job ) if ( folderType == InvalidFolder || folderType == \
TopLevelFolder ) { errorText = i18nc( "@info:status", "Cannot add emails to folder \
%1", job->collection().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1476,7 +1477,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemCreateJob *job ) if ( !mbox->load( path ) ) {
errorText = i18nc( "@info:status", "Cannot add emails to folder %1",
job->collection().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1502,7 +1503,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemCreateJob *job ) if ( result < 0 ) {
errorText = i18nc( "@info:status", "Cannot add emails to folder %1",
job->collection().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1533,7 +1534,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemCreateJob *job ) if ( result.isEmpty() ) {
errorText = i18nc( "@info:status", "Cannot add emails to folder %1",
job->collection().name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1557,7 +1558,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemDeleteJob *job ) if ( folderType == InvalidFolder || folderType == \
TopLevelFolder ) {
errorText = i18nc( "@info:status", "Cannot remove emails from folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1570,7 +1571,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemDeleteJob *job ) if ( !mbox->load( path ) ) {
errorText = i18nc( "@info:status", "Cannot remove emails from folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1585,7 +1586,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemDeleteJob *job ) if ( !ok || offset < 0 || !mbox->isValidOffset( \
offset ) ) {
errorText = i18nc( "@info:status", "Cannot remove emails from folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1618,7 +1619,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemDeleteJob *job ) if ( !mdPtr->removeEntry( item.remoteId() ) ) {
errorText = i18nc( "@info:status", "Cannot remove emails from folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1645,7 +1646,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemFetchJob \
*job ) const FolderType folderType = folderForCollection( collection, path, \
errorText );
if ( folderType == InvalidFolder ) {
- kError() << errorText << "collection:" << job->collection();
+ qCritical() << errorText << "collection:" << job->collection();
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1656,7 +1657,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemFetchJob \
*job )
MBoxPtr mbox = findIt != mMBoxes.end() ? findIt.value() : MBoxPtr( new \
MBoxContext ); if ( !mbox->load( path ) ) {
errorText = i18nc( "@info:status", "Failed to load MBox folder %1", path );
- kError() << errorText << "collection=" << collection;
+ qCritical() << errorText << "collection=" << collection;
q->notifyError( FileStore::Job::InvalidJobContext, errorText ); // TODO \
should be a different error code if ( findIt != mMBoxes.end() ) {
mMBoxes.erase( findIt );
@@ -1683,7 +1684,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemFetchJob \
*job ) const QString errorText =
i18nc( "@info:status", "Error while reading mails from folder %1", \
collection.name() );
q->notifyError( FileStore::Job::InvalidJobContext, errorText ); // TODO \
should be a different error code
- kError() << "Failed to read item" << (*it).remoteId() << "in MBox file" << \
path; + qCritical() << "Failed to read item" << (*it).remoteId() << "in MBox \
file" << path; return false;
}
}
@@ -1703,7 +1704,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemFetchJob \
*job )
if ( !mdPtr->isValid( errorText ) ) {
errorText = i18nc( "@info:status", "Failed to load Maildirs folder %1", path \
);
- kError() << errorText << "collection=" << collection;
+ qCritical() << errorText << "collection=" << collection;
q->notifyError( FileStore::Job::InvalidJobContext, errorText ); // TODO should \
be a different error code return false;
}
@@ -1722,7 +1723,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemFetchJob \
*job ) const QString errorText =
i18nc( "@info:status", "Error while reading mails from folder %1", \
collection.name() );
q->notifyError( FileStore::Job::InvalidJobContext, errorText ); // TODO \
should be a different error code
- kError() << "Failed to read item" << (*it).remoteId() << "in Maildir" << \
path; + qCritical() << "Failed to read item" << (*it).remoteId() << "in \
Maildir" << path; return false;
}
}
@@ -1763,7 +1764,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemModifyJob *job ) if ( folderType == InvalidFolder || folderType == \
TopLevelFolder ) {
errorText = i18nc( "@info:status", "Cannot modify emails in folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1776,7 +1777,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemModifyJob *job ) if ( !mbox->load( path ) ) {
errorText = i18nc( "@info:status", "Cannot modify emails in folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1791,14 +1792,14 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemModifyJob *job ) if ( !ok || offset < 0 || !mbox->isValidOffset( \
offset ) ) {
errorText = i18nc( "@info:status", "Cannot modify emails in folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
// if we can ignore payload, or we have nothing else to change, then we are \
finished if ( ignoreModifyIfValid ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "ItemModifyJob for item" << \
item.remoteId() + qCDebug(MIXEDMAILDIR_LOG) << "ItemModifyJob for item" << \
item.remoteId() << "in collection" << collection.remoteId()
<< "skipped: nothing of interest changed (" << nothingChanged
<< ") or only payload changed but should be ignored ("
@@ -1829,7 +1830,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemModifyJob *job ) if ( newOffset < 0 ) {
errorText = i18nc( "@info:status", "Cannot modify emails in folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1854,14 +1855,14 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemModifyJob *job ) if ( !mdPtr->isValidEntry( item.remoteId() ) ) {
errorText = i18nc( "@info:status", "Cannot modify emails in folder %1",
collection.name() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
// if we can ignore payload, or we have nothing else to change, then we are \
finished if ( ignoreModifyIfValid ) {
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "ItemModifyJob for item" << \
item.remoteId() + qCDebug(MIXEDMAILDIR_LOG) << "ItemModifyJob for item" << \
item.remoteId() << "in collection" << collection.remoteId()
<< "skipped: nothing of interest changed (" << nothingChanged
<< ") or only payload changed but should be ignored ("
@@ -1889,7 +1890,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemModifyJob *job ) if ( newKey.isEmpty() ) {
errorText = i18nc( "@info:status", "Cannot modify emails in folder %1. %2",
collection.name(), md.lastError() );
- kError() << errorText << "FolderType=" << folderType;
+ qCritical() << errorText << "FolderType=" << folderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1915,12 +1916,12 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemMoveJob *job ) if ( sourceFolderType == InvalidFolder || \
sourceFolderType == TopLevelFolder ) {
errorText = i18nc( "@info:status", "Cannot move emails from folder %1",
sourceCollection.name() );
- kError() << errorText << "FolderType=" << sourceFolderType;
+ qCritical() << errorText << "FolderType=" << sourceFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
-// kDebug( KDE_DEFAULT_DEBUG_AREA ) << "sourceCollection" << \
sourceCollection.remoteId() +// qCDebug(MIXEDMAILDIR_LOG) << "sourceCollection" << \
sourceCollection.remoteId() // << "sourcePath=" \
<< sourcePath // << "sourceType=" << \
sourceFolderType;
@@ -1930,25 +1931,25 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemMoveJob *job ) if ( targetFolderType == InvalidFolder || \
targetFolderType == TopLevelFolder ) { errorText = i18nc( "@info:status", "Cannot \
move emails to folder %1", targetCollection.name() );
- kError() << errorText << "FolderType=" << targetFolderType;
+ qCritical() << errorText << "FolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
-// kDebug( KDE_DEFAULT_DEBUG_AREA ) << "targetCollection" << \
targetCollection.remoteId() +// qCDebug(MIXEDMAILDIR_LOG) << "targetCollection" << \
targetCollection.remoteId() // << "targetPath=" \
<< targetPath // << "targetType=" << \
targetFolderType;
Item item = job->item();
if ( sourceFolderType == MBoxFolder ) {
-/* kDebug( KDE_DEFAULT_DEBUG_AREA ) << "source is MBox";*/
+/* qCDebug(MIXEDMAILDIR_LOG) << "source is MBox";*/
bool ok= false;
quint64 offset = item.remoteId().toULongLong( &ok );
if ( !ok ) {
errorText = i18nc( "@info:status", "Cannot move emails from folder %1",
sourceCollection.name() );
- kError() << errorText << "FolderType=" << sourceFolderType;
+ qCritical() << errorText << "FolderType=" << sourceFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1960,7 +1961,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) if ( !mbox->load( sourcePath ) ) {
errorText = i18nc( "@info:status", "Cannot move emails to folder %1",
sourceCollection.name() );
- kError() << errorText << "FolderType=" << sourceFolderType;
+ qCritical() << errorText << "FolderType=" << sourceFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1974,7 +1975,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) if ( !mbox->isValidOffset( offset ) ) {
errorText = i18nc( "@info:status", "Cannot move emails from folder %1",
sourceCollection.name() );
- kError() << errorText << "FolderType=" << sourceFolderType;
+ qCritical() << errorText << "FolderType=" << sourceFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -1984,7 +1985,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) if ( !fillItem( mbox, true, true, item ) ) {
errorText = i18nc( "@info:status", "Cannot move email from folder %1",
sourceCollection.name() );
- kError() << errorText << "FolderType=" << sourceFolderType;
+ qCritical() << errorText << "FolderType=" << sourceFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -2001,7 +2002,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) }
if ( targetFolderType == MBoxFolder ) {
-/* kDebug( KDE_DEFAULT_DEBUG_AREA ) << "target is MBox";*/
+/* qCDebug(MIXEDMAILDIR_LOG) << "target is MBox";*/
MBoxPtr targetMBox;
MBoxHash::const_iterator findIt = mMBoxes.constFind( targetPath );
if ( findIt == mMBoxes.constEnd() ) {
@@ -2009,7 +2010,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) if ( !targetMBox->load( targetPath ) ) {
errorText = i18nc( "@info:status", "Cannot move emails to folder %1",
targetCollection.name() );
- kError() << errorText << "FolderType=" << targetFolderType;
+ qCritical() << errorText << "FolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -2034,7 +2035,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) if ( remoteId < 0 ) {
errorText = i18nc( "@info:status", "Cannot move emails to folder %1",
targetCollection.name() );
- kError() << errorText << "FolderType=" << targetFolderType;
+ qCritical() << errorText << "FolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -2042,14 +2043,14 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemMoveJob *job ) if ( !targetMBox->save() ) {
errorText = i18nc( "@info:status", "Cannot move emails to folder %1",
targetCollection.name() );
- kError() << errorText << "FolderType=" << targetFolderType;
+ qCritical() << errorText << "FolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
item.setRemoteId( QString::number( remoteId ) );
} else {
-/* kDebug( KDE_DEFAULT_DEBUG_AREA ) << "target is Maildir";*/
+/* qCDebug(MIXEDMAILDIR_LOG) << "target is Maildir";*/
MaildirPtr targetMdPtr = getOrCreateMaildirPtr( targetPath, false );
// make sure to read the index (if available) before modifying the data, which \
would @@ -2066,7 +2067,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemMoveJob *job ) if ( remoteId.isEmpty() ) {
errorText = i18nc( "@info:status", "Cannot move email from folder %1 to \
folder %2",
sourceCollection.name(), targetCollection.name() );
- kError() << errorText << "SourceFolderType=" << sourceFolderType << \
"TargetFolderType=" << targetFolderType; + qCritical() << errorText << \
"SourceFolderType=" << sourceFolderType << "TargetFolderType=" << targetFolderType; \
q->notifyError( FileStore::Job::InvalidJobContext, errorText ); return false;
}
@@ -2083,13 +2084,13 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemMoveJob *job ) mbox->deleteEntry( offset );
job->setProperty( "compactStore", true );
} else {
-/* kDebug( KDE_DEFAULT_DEBUG_AREA ) << "source is Maildir";*/
+/* qCDebug(MIXEDMAILDIR_LOG) << "source is Maildir";*/
MaildirPtr sourceMdPtr = getOrCreateMaildirPtr( sourcePath, false );
if ( !sourceMdPtr->isValidEntry( item.remoteId() ) ) {
errorText = i18nc( "@info:status", "Cannot move email from folder %1",
sourceCollection.name() );
- kError() << errorText << "FolderType=" << sourceFolderType;
+ qCritical() << errorText << "FolderType=" << sourceFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -2107,13 +2108,13 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemMoveJob *job ) }
if ( targetFolderType == MBoxFolder ) {
-/* kDebug( KDE_DEFAULT_DEBUG_AREA ) << "target is MBox";*/
+/* qCDebug(MIXEDMAILDIR_LOG) << "target is MBox";*/
if ( !item.hasPayload<KMime::Message::Ptr>() ||
!item.loadedPayloadParts().contains( MessagePart::Body ) ) {
if ( !fillItem( sourceMdPtr, true, true, item ) ) {
errorText = i18nc( "@info:status", "Cannot move email from folder %1",
sourceCollection.name() );
- kError() << errorText << "FolderType=" << sourceFolderType;
+ qCritical() << errorText << "FolderType=" << sourceFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -2126,7 +2127,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) if ( !mbox->load( targetPath ) ) {
errorText = i18nc( "@info:status", "Cannot move emails to folder %1",
targetCollection.name() );
- kError() << errorText << "FolderType=" << targetFolderType;
+ qCritical() << errorText << "FolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -2151,7 +2152,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) if ( remoteId < 0 ) {
errorText = i18nc( "@info:status", "Cannot move emails to folder %1",
targetCollection.name() );
- kError() << errorText << "FolderType=" << targetFolderType;
+ qCritical() << errorText << "FolderType=" << targetFolderType;
q->notifyError( FileStore::Job::InvalidJobContext, errorText );
return false;
}
@@ -2160,7 +2161,7 @@ bool MixedMaildirStore::Private::visit( FileStore::ItemMoveJob \
*job ) mbox->save();
item.setRemoteId( QString::number( remoteId ) );
} else {
-/* kDebug( KDE_DEFAULT_DEBUG_AREA ) << "target is Maildir";*/
+/* qCDebug(MIXEDMAILDIR_LOG) << "target is Maildir";*/
MaildirPtr targetMdPtr = getOrCreateMaildirPtr( targetPath, false );
// make sure to read the index (if available) before modifying the data, which \
would @@ -2177,7 +2178,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::ItemMoveJob *job ) if ( remoteId.isEmpty() ) {
errorText = i18nc( "@info:status", "Cannot move email from folder %1 to \
folder %2",
sourceCollection.name(), targetCollection.name() );
- kError() << errorText << "SourceFolderType=" << sourceFolderType << \
"TargetFolderType=" << targetFolderType; + qCritical() << errorText << \
"SourceFolderType=" << sourceFolderType << "TargetFolderType=" << targetFolderType; \
q->notifyError( FileStore::Job::InvalidJobContext, errorText ); return false;
}
@@ -2220,7 +2221,7 @@ bool MixedMaildirStore::Private::visit( \
FileStore::StoreCompactJob *job ) if ( result > 0 ) {
if ( movedEntries.count() > 0 ) {
qint64 revision = mbox->mCollection.remoteRevision().toLongLong();
- kDebug() << "purge of" << mbox->mCollection.name() << "caused item move: \
oldRevision=" + qDebug() << "purge of" << mbox->mCollection.name() << "caused \
item move: oldRevision="
<< revision << "(stored)," << mbox->mRevision << "(local)";
revision = qMax( revision, mbox->mRevision ) + 1;
@@ -2310,13 +2311,13 @@ void MixedMaildirStore::processJob( FileStore::Job *job )
if ( !job->accept( d ) ) {
// check that an error has been set
if ( job->error() == 0 || job->errorString().isEmpty() ) {
- kError() << "visitor did not set either error code or error string when \
returning false"; + qCritical() << "visitor did not set either error code or \
error string when returning false"; Q_ASSERT( job->error() == 0 || \
job->errorString().isEmpty() ); }
} else {
// check that no error has been set
if ( job->error() != 0 || !job->errorString().isEmpty() ) {
- kError() << "visitor did set either error code or error string when returning \
true"; + qCritical() << "visitor did set either error code or error string when \
returning true"; Q_ASSERT( job->error() != 0 || !job->errorString().isEmpty() );
}
}
diff --git a/resources/mixedmaildir/retrieveitemsjob.cpp \
b/resources/mixedmaildir/retrieveitemsjob.cpp index afe46a1..c675da4 100644
--- a/resources/mixedmaildir/retrieveitemsjob.cpp
+++ b/resources/mixedmaildir/retrieveitemsjob.cpp
@@ -20,6 +20,7 @@
#include "retrieveitemsjob.h"
#include "mixedmaildirstore.h"
+#include "mixedmaildir_debug.h"
#include "filestore/itemfetchjob.h"
@@ -36,7 +37,7 @@
#include <AkonadiCore/itemmodifyjob.h>
#include <AkonadiCore/transactionsequence.h>
-#include <KDebug>
+#include <QDebug>
#include <QDateTime>
#include <QQueue>
@@ -101,7 +102,7 @@ class RetrieveItemsJob::Private
void RetrieveItemsJob::Private::itemCreateJobResult( KJob *job )
{
if ( job->error() ) {
- kError() << "Error running ItemCreateJob: " << job->errorText();
+ qCritical() << "Error running ItemCreateJob: " << job->errorText();
}
mNumItemCreateJobs--;
@@ -111,7 +112,7 @@ void RetrieveItemsJob::Private::itemCreateJobResult( KJob *job )
void RetrieveItemsJob::Private::itemModifyJobResult( KJob *job )
{
if ( job->error() ) {
- kError() << "Error running ItemModifyJob: " << job->errorText();
+ qCritical() << "Error running ItemModifyJob: " << job->errorText();
}
mNumItemModifyJobs--;
@@ -127,7 +128,7 @@ void RetrieveItemsJob::Private::akonadiFetchResult( KJob *job )
Item::List items = itemFetch->items();
itemFetch->clearItems(); // save memory
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Akonadi fetch got" << items.count() << \
"items"; + qCDebug(MIXEDMAILDIR_LOG) << "Akonadi fetch got" << items.count() << \
"items";
mServerItemsByRemoteId.reserve( items.size() );
for ( int i = 0 ; i < items.count() ; ++i ) {
@@ -140,7 +141,7 @@ void RetrieveItemsJob::Private::akonadiFetchResult( KJob *job )
}
}
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "of which" << mServerItemsByRemoteId.count() \
<< "have remoteId"; + qCDebug(MIXEDMAILDIR_LOG) << "of which" << \
mServerItemsByRemoteId.count() << "have remoteId";
FileStore::ItemFetchJob *storeFetch = mStore->fetchItems( mCollection );
// just basic items, no data
@@ -150,7 +151,7 @@ void RetrieveItemsJob::Private::akonadiFetchResult( KJob *job )
void RetrieveItemsJob::Private::storeListResult( KJob *job )
{
- kDebug() << "storeList->error=" << job->error();
+ qDebug() << "storeList->error=" << job->error();
FileStore::ItemFetchJob *storeList = qobject_cast<FileStore::ItemFetchJob*>( job \
); Q_ASSERT( storeList != 0 );
@@ -199,7 +200,7 @@ void RetrieveItemsJob::Private::storeListResult( KJob *job )
}
}
- kDebug( KDE_DEFAULT_DEBUG_AREA ) << "Store fetch got" << storedItems.count() << \
"items" + qCDebug(MIXEDMAILDIR_LOG) << "Store fetch got" << storedItems.count() << \
"items"
<< "of which" << mNewItems.count() << "are new \
and" << mChangedItems.count()
<< "are changed and" << \
mServerItemsByRemoteId.count() << "need to be removed";
@@ -235,7 +236,7 @@ void RetrieveItemsJob::Private::fetchNewResult( KJob *job )
if ( fetchJob->items().count() != 1 ) {
const Item item = fetchJob->item();
- kWarning() << "Store fetch for new item" << item.remoteId()
+ qWarning() << "Store fetch for new item" << item.remoteId()
<< "in collection" << item.parentCollection().id()
<< "," << item.parentCollection().remoteId()
<< "did not return the expected item. error="
@@ -292,7 +293,7 @@ void RetrieveItemsJob::Private::fetchChangedResult( KJob *job )
if ( fetchJob->items().count() != 1 ) {
const Item item = fetchJob->item();
- kWarning() << "Store fetch for changed item" << item.remoteId()
+ qWarning() << "Store fetch for changed item" << item.remoteId()
<< "in collection" << item.parentCollection().id()
<< "," << item.parentCollection().remoteId()
<< "did not return the expected item. error="
diff --git a/resources/shared/collectionannotationsattribute.cpp \
b/resources/shared/collectionannotationsattribute.cpp index b1f7891..d869c32 100644
--- a/resources/shared/collectionannotationsattribute.cpp
+++ b/resources/shared/collectionannotationsattribute.cpp
@@ -19,7 +19,7 @@
#include "collectionannotationsattribute.h"
-#include <KDebug>
+#include <QDebug>
#include <QByteArray>
#include <attribute.h>
diff --git a/resources/shared/createandsettagsjob.cpp \
b/resources/shared/createandsettagsjob.cpp index 734c1ab..ea6f962 100644
--- a/resources/shared/createandsettagsjob.cpp
+++ b/resources/shared/createandsettagsjob.cpp
@@ -20,7 +20,7 @@
#include <AkonadiCore/tagcreatejob.h>
#include <AkonadiCore/itemmodifyjob.h>
-#include <KDebug>
+#include <QDebug>
using namespace Akonadi;
@@ -49,7 +49,7 @@ void CreateAndSetTagsJob::onCreateDone(KJob *job)
{
mCount++;
if (job->error()) {
- kWarning() << "Failed to create tag " << job->errorString();
+ qWarning() << "Failed to create tag " << job->errorString();
} else {
Akonadi::TagCreateJob *createJob = static_cast<Akonadi::TagCreateJob*>(job);
mCreatedTags << createJob->tag();
@@ -66,7 +66,7 @@ void CreateAndSetTagsJob::onCreateDone(KJob *job)
void CreateAndSetTagsJob::onModifyDone(KJob *job)
{
if (job->error()) {
- kWarning() << "Failed to modify item " << job->errorString();
+ qWarning() << "Failed to modify item " << job->errorString();
setError(KJob::UserDefinedError);
}
emitResult();
diff --git a/resources/shared/filestore/abstractlocalstore.cpp \
b/resources/shared/filestore/abstractlocalstore.cpp index 500ad5c..9573b8e 100644
--- a/resources/shared/filestore/abstractlocalstore.cpp
+++ b/resources/shared/filestore/abstractlocalstore.cpp
@@ -37,7 +37,7 @@
#include <entitydisplayattribute.h>
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
#include <QFileInfo>
using namespace Akonadi;
@@ -130,7 +130,7 @@ class CollectionsProcessedNotifier : public JobProcessingAdaptor
{
Q_ASSERT( !mCollections.isEmpty() );
if ( mCollections.count() > 1 ) {
- kError() << "Processing collections for CollectionCreateJob "
+ qCritical() << "Processing collections for CollectionCreateJob "
"encountered more than one collection. Just processing the first \
one."; }
@@ -142,7 +142,7 @@ class CollectionsProcessedNotifier : public JobProcessingAdaptor
{
Q_ASSERT( !mCollections.isEmpty() );
if ( mCollections.count() > 1 ) {
- kError() << "Processing collections for CollectionDeleteJob "
+ qCritical() << "Processing collections for CollectionDeleteJob "
"encountered more than one collection. Just processing the first \
one."; }
@@ -160,7 +160,7 @@ class CollectionsProcessedNotifier : public JobProcessingAdaptor
{
Q_ASSERT( !mCollections.isEmpty() );
if ( mCollections.count() > 1 ) {
- kError() << "Processing collections for CollectionModifyJob "
+ qCritical() << "Processing collections for CollectionModifyJob "
"encountered more than one collection. Just processing the first \
one."; }
@@ -172,7 +172,7 @@ class CollectionsProcessedNotifier : public JobProcessingAdaptor
{
Q_ASSERT( !mCollections.isEmpty() );
if ( mCollections.count() > 1 ) {
- kError() << "Processing collections for CollectionMoveJob "
+ qCritical() << "Processing collections for CollectionMoveJob "
"encountered more than one collection. Just processing the first \
one."; }
@@ -215,7 +215,7 @@ class ItemsProcessedNotifier : public JobProcessingAdaptor
{
Q_ASSERT( !mItems.isEmpty() );
if ( mItems.count() > 1 ) {
- kError() << "Processing items for ItemCreateJob encountered more than one \
item. " + qCritical() << "Processing items for ItemCreateJob encountered more \
than one item. " "Just processing the first one.";
}
@@ -233,7 +233,7 @@ class ItemsProcessedNotifier : public JobProcessingAdaptor
{
Q_ASSERT( !mItems.isEmpty() );
if ( mItems.count() > 1 ) {
- kError() << "Processing items for ItemModifyJob encountered more than one \
item. " + qCritical() << "Processing items for ItemModifyJob encountered more \
than one item. " "Just processing the first one.";
}
@@ -245,7 +245,7 @@ class ItemsProcessedNotifier : public JobProcessingAdaptor
{
Q_ASSERT( !mItems.isEmpty() );
if ( mItems.count() > 1 ) {
- kError() << "Processing items for ItemMoveJob encountered more than one \
item. " + qCritical() << "Processing items for ItemMoveJob encountered more \
than one item. " "Just processing the first one.";
}
@@ -358,18 +358,18 @@ FileStore::CollectionCreateJob \
*FileStore::AbstractLocalStore::createCollection(
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << collection << targetParent;
+ qCritical() << message;
+ qCritical() << collection << targetParent;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( targetParent.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << collection << targetParent;
+ qCritical() << message;
+ qCritical() << collection << targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( targetParent.rights() & Collection::CanCreateCollection ) == 0 ) {
const QString message = i18nc( "@info:status", "Access control prohibits folder \
creation in folder %1", targetParent.name() );
- kError() << message;
- kError() << collection << targetParent;
+ qCritical() << message;
+ qCritical() << collection << targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -389,19 +389,19 @@ FileStore::CollectionDeleteJob \
*FileStore::AbstractLocalStore::deleteCollection(
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( collection.remoteId().isEmpty() ||
collection.parentCollection().remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( collection.rights() & Collection::CanDeleteCollection ) == 0 ) {
const QString message = i18nc( "@info:status", "Access control prohibits folder \
deletion in folder %1", collection.name() );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -421,13 +421,13 @@ FileStore::CollectionFetchJob \
*FileStore::AbstractLocalStore::fetchCollections(
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << collection << "FetchType=" << type;
+ qCritical() << message;
+ qCritical() << collection << "FetchType=" << type;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( collection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << collection << "FetchType=" << type;
+ qCritical() << message;
+ qCritical() << collection << "FetchType=" << type;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -447,18 +447,18 @@ FileStore::CollectionModifyJob \
*FileStore::AbstractLocalStore::modifyCollection(
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( collection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( collection.rights() & Collection::CanChangeCollection ) == 0 ) {
const QString message = i18nc( "@info:status", "Access control prohibits \
folder modification in folder %1", collection.name() );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -478,20 +478,20 @@ FileStore::CollectionMoveJob \
*FileStore::AbstractLocalStore::moveCollection( con
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << collection << targetParent;
+ qCritical() << message;
+ qCritical() << collection << targetParent;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( collection.remoteId().isEmpty() ||
collection.parentCollection().remoteId().isEmpty() ||
targetParent.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << collection << targetParent;
+ qCritical() << message;
+ qCritical() << collection << targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( targetParent.rights() & Collection::CanCreateCollection ) == 0 ) {
const QString message = i18nc( "@info:status", "Access control prohibits folder \
creation in folder %1", targetParent.name() );
- kError() << message;
- kError() << collection << targetParent;
+ qCritical() << message;
+ qCritical() << collection << targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -511,13 +511,13 @@ FileStore::ItemFetchJob \
*FileStore::AbstractLocalStore::fetchItems( const Collec
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( collection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << collection;
+ qCritical() << message;
+ qCritical() << collection;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -537,14 +537,14 @@ FileStore::ItemFetchJob \
*FileStore::AbstractLocalStore::fetchItem( const Item &i
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( item.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given item identifier is empty" \
);
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -565,22 +565,22 @@ FileStore::ItemCreateJob \
*FileStore::AbstractLocalStore::createItem( const Item
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << collection
+ qCritical() << message;
+ qCritical() << collection
<< "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() << ")";
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( collection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << collection
+ qCritical() << message;
+ qCritical() << collection
<< "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() << ")";
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( collection.rights() & Collection::CanCreateItem ) == 0 ) {
const QString message = i18nc( "@info:status", "Access control prohibits item \
creation in folder %1", collection.name() );
- kError() << message;
- kError() << collection
+ qCritical() << message;
+ qCritical() << collection
<< "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() << ")";
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
@@ -602,20 +602,20 @@ FileStore::ItemModifyJob \
*FileStore::AbstractLocalStore::modifyItem( const Item
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( item.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given item identifier is empty" \
);
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( item.parentCollection().rights() & Collection::CanChangeItem ) == 0 \
) {
const QString message = i18nc( "@info:status", "Access control prohibits item \
modification in folder %1", item.parentCollection().name() );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -636,20 +636,20 @@ FileStore::ItemDeleteJob \
*FileStore::AbstractLocalStore::deleteItem( const Item
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( item.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given item identifier is empty" \
);
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( item.parentCollection().rights() & Collection::CanDeleteItem ) == 0 \
) {
const QString message = i18nc( "@info:status", "Access control prohibits item \
deletion in folder %1", item.parentCollection().name() );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")";
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
}
@@ -670,37 +670,37 @@ FileStore::ItemMoveJob \
*FileStore::AbstractLocalStore::moveItem( const Item &ite
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")"
<< targetParent;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
} else if ( item.parentCollection().remoteId().isEmpty() ||
targetParent.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given folder name is empty" );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")"
<< targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( targetParent.rights() & Collection::CanCreateItem ) == 0 ) {
const QString message = i18nc( "@info:status", "Access control prohibits item \
creation in folder %1", targetParent.name() );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")"
<< targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( ( item.parentCollection().rights() & Collection::CanDeleteItem ) == 0 \
) {
const QString message = i18nc( "@info:status", "Access control prohibits item \
deletion in folder %1", item.parentCollection().name() );
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")"
<< targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
} else if ( item.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Given item identifier is empty" \
);
- kError() << message;
- kError() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType() + qCritical() << message;
+ qCritical() << "Item(remoteId=" << item.remoteId() << ", mimeType=" << \
item.mimeType()
<< ", parentCollection=" << item.parentCollection().remoteId() << ")"
<< targetParent;
d->mSession->setError( job, FileStore::Job::InvalidJobContext, message );
@@ -722,7 +722,7 @@ FileStore::StoreCompactJob \
*FileStore::AbstractLocalStore::compactStore()
if ( d->mTopLevelCollection.remoteId().isEmpty() ) {
const QString message = i18nc( "@info:status", "Configured storage location is \
empty" );
- kError() << message;
+ qCritical() << message;
d->mSession->setError( job, FileStore::Job::InvalidStoreState, message );
}
diff --git a/resources/shared/filestore/sessionimpls.cpp \
b/resources/shared/filestore/sessionimpls.cpp index 6c3b98b..91c62f7 100644
--- a/resources/shared/filestore/sessionimpls.cpp
+++ b/resources/shared/filestore/sessionimpls.cpp
@@ -31,7 +31,7 @@
#include "itemmovejob.h"
#include "storecompactjob.h"
-#include <KDebug>
+#include <QDebug>
#include <QQueue>
#include <QTimer>
@@ -116,7 +116,7 @@ class FileStore::FiFoQueueJobSession::Private : public \
AbstractEnqueueVisitor
void runNextJob()
{
-/* kDebug() << "Queue with" << mJobQueue.count() << "entries";*/
+/* qDebug() << "Queue with" << mJobQueue.count() << "entries";*/
if ( mJobQueue.isEmpty() ) {
mJobRunTimer.stop();
return;
@@ -124,7 +124,7 @@ class FileStore::FiFoQueueJobSession::Private : public \
AbstractEnqueueVisitor
FileStore::Job *job = mJobQueue.dequeue();
while ( job != 0 && job->error() != 0 ) {
-/* kDebug() << "Dequeued job" << job << "has error ("
+/* qDebug() << "Dequeued job" << job << "has error ("
<< job->error() << "," << job->errorText() << ")";*/
mParent->emitResult( job );
if ( !mJobQueue.isEmpty() ) {
@@ -135,13 +135,13 @@ class FileStore::FiFoQueueJobSession::Private : public \
AbstractEnqueueVisitor }
if ( job != 0 ) {
-/* kDebug() << "Dequeued job" << job << "is ready";*/
+/* qDebug() << "Dequeued job" << job << "is ready";*/
QList<FileStore::Job*> jobs;
jobs << job;
emit mParent->jobsReady( jobs );
} else {
-/* kDebug() << "Queue now empty";*/
+/* qDebug() << "Queue now empty";*/
mJobRunTimer.stop();
}
}
@@ -157,7 +157,7 @@ class FileStore::FiFoQueueJobSession::Private : public \
AbstractEnqueueVisitor Q_UNUSED( className );
mJobQueue.enqueue( job );
-// kDebug() << "adding" << className << ". Queue now with"
+// qDebug() << "adding" << className << ". Queue now with"
// << mJobQueue.count() << "entries";
mJobRunTimer.start( 0 );
diff --git a/resources/shared/getcredentialsjob.cpp \
b/resources/shared/getcredentialsjob.cpp index 768088c..a30cde2 100644
--- a/resources/shared/getcredentialsjob.cpp
+++ b/resources/shared/getcredentialsjob.cpp
@@ -25,7 +25,7 @@
#include <SignOn/Identity>
-#include <KDebug>
+#include <QDebug>
GetCredentialsJob::GetCredentialsJob(const Accounts::AccountId &id, QObject *parent)
: KJob(parent)
diff --git a/resources/shared/imapquotaattribute.cpp \
b/resources/shared/imapquotaattribute.cpp index ce9a280..2587536 100644
--- a/resources/shared/imapquotaattribute.cpp
+++ b/resources/shared/imapquotaattribute.cpp
@@ -23,7 +23,7 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
-#include <KDebug>
+#include <QDebug>
using namespace Akonadi;
@@ -140,7 +140,7 @@ void ImapQuotaAttribute::deserialize( const QByteArray &data )
// We expect exactly three members (roots, limits and usages), otherwise something \
is funky if ( members.size() != 3 ) {
- kWarning() << "We didn't find exactly three members in this quota \
serialization"; + qWarning() << "We didn't find exactly three members in this \
quota serialization"; return;
}
diff --git a/resources/shared/singlefileresource.h \
b/resources/shared/singlefileresource.h index 4ef4f94..aa0cadc 100644
--- a/resources/shared/singlefileresource.h
+++ b/resources/shared/singlefileresource.h
@@ -36,7 +36,7 @@
#include <QFile>
#include <QDir>
#include <QPointer>
-#include <KDebug>
+#include <QDebug>
namespace Akonadi
{
@@ -70,7 +70,7 @@ class SingleFileResource : public SingleFileResourceBase
if ( mSettings->path().isEmpty() ) {
const QString message = i18n( "No file selected." );
- kWarning() << message;
+ qWarning() << message;
emit status( NotConfigured, i18n("The resource not configured yet") );
if ( taskContext )
cancelTask();
@@ -105,7 +105,7 @@ class SingleFileResource : public SingleFileResourceBase
emit status( Idle, i18nc( "@info:status", "Ready" ) );
} else {
const QString message = i18n( "Could not create file '%1'.", \
mCurrentUrl.prettyUrl() );
- kWarning() << message;
+ qWarning() << message;
emit status( Broken, message );
mCurrentUrl.clear();
if ( taskContext )
@@ -118,7 +118,7 @@ class SingleFileResource : public SingleFileResourceBase
const QString localFileName = mCurrentUrl.toLocalFile();
if ( !readLocalFile( mCurrentUrl.toLocalFile() ) ) {
const QString message = i18n( "Could not read file '%1'", localFileName );
- kWarning() << message;
+ qWarning() << message;
emit status( Broken, message );
if ( taskContext )
cancelTask();
@@ -135,7 +135,7 @@ class SingleFileResource : public SingleFileResourceBase
if ( mDownloadJob )
{
const QString message = i18n( "Another download is still in progress." );
- kWarning() << message;
+ qWarning() << message;
emit error( message );
if ( taskContext )
cancelTask();
@@ -145,7 +145,7 @@ class SingleFileResource : public SingleFileResourceBase
if ( mUploadJob )
{
const QString message = i18n( "Another file upload is still in progress." \
);
- kWarning() << message;
+ qWarning() << message;
emit error( message );
if ( taskContext )
cancelTask();
@@ -182,7 +182,7 @@ class SingleFileResource : public SingleFileResourceBase
{
if ( mSettings->readOnly() ) {
const QString message = i18n( "Trying to write to a read-only file: '%1'.", \
mSettings->path() );
- kWarning() << message;
+ qWarning() << message;
emit error( message );
if ( taskContext )
cancelTask();
@@ -193,7 +193,7 @@ class SingleFileResource : public SingleFileResourceBase
// and in that case it would probably cause data lose.
if ( mCurrentUrl.isEmpty() ) {
const QString message = i18n( "No file specified." );
- kWarning() << message;
+ qWarning() << message;
emit status( Broken, message );
if ( taskContext )
cancelTask();
@@ -210,7 +210,7 @@ class SingleFileResource : public SingleFileResourceBase
KDirWatch::self()->startScan();
if ( !writeResult )
{
- kWarning() << "Error writing to file...";
+ qWarning() << "Error writing to file...";
if ( taskContext )
cancelTask();
return;
@@ -221,7 +221,7 @@ class SingleFileResource : public SingleFileResourceBase
// Check if there is a download or an upload in progress.
if ( mDownloadJob ) {
const QString message = i18n( "A download is still in progress." );
- kWarning() << message;
+ qWarning() << message;
emit error( message );
if ( taskContext )
cancelTask();
@@ -230,7 +230,7 @@ class SingleFileResource : public SingleFileResourceBase
if ( mUploadJob ) {
const QString message = i18n( "Another file upload is still in progress." \
);
- kWarning() << message;
+ qWarning() << message;
emit error( message );
if ( taskContext )
cancelTask();
@@ -240,7 +240,7 @@ class SingleFileResource : public SingleFileResourceBase
// Write te items to the locally cached file.
if ( !writeToFile( cacheFile() ) )
{
- kWarning() << "Error writing to file";
+ qWarning() << "Error writing to file";
if ( taskContext )
cancelTask();
return;
diff --git a/resources/shared/singlefileresourcebase.cpp \
b/resources/shared/singlefileresourcebase.cpp index baa88f0..a48eba0 100644
--- a/resources/shared/singlefileresourcebase.cpp
+++ b/resources/shared/singlefileresourcebase.cpp
@@ -26,7 +26,7 @@
#include <kio/job.h>
#include <kio/jobuidelegate.h>
-#include <KDebug>
+#include <QDebug>
#include <KDirWatch>
#include <KLocalizedString>
#include <KLocale>
diff --git a/resources/vcarddir/vcarddirresource.cpp \
b/resources/vcarddir/vcarddirresource.cpp index 663480a..9a1d205 100644
--- a/resources/vcarddir/vcarddirresource.cpp
+++ b/resources/vcarddir/vcarddirresource.cpp
@@ -33,7 +33,7 @@
#include <QIcon>
#include <KLocalizedString>
-#include <KDebug>
+#include <QDebug>
using namespace Akonadi;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic