summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-07-15 07:16:32 +0200
committerMontel Laurent <[email protected]>2016-07-15 07:16:32 +0200
commite00a7abc6115888b17ae768ad0c056584df9aaa8 (patch)
tree9c443c9092cc7c29ce1e1b09ca96c9696a7ea6da
parent020a7e795a154a4afb4d2253b48883d995027fd0 (diff)
Minor
-rw-r--r--resources/tomboynotes/CMakeLists.txt2
-rw-r--r--resources/tomboynotes/tomboycollectionsdownloadjob.cpp10
-rw-r--r--resources/tomboynotes/tomboyitemdownloadjob.cpp8
-rw-r--r--resources/tomboynotes/tomboyitemsdownloadjob.cpp6
-rw-r--r--resources/tomboynotes/tomboyitemuploadjob.cpp4
-rw-r--r--resources/tomboynotes/tomboynotesresource.cpp20
-rw-r--r--resources/tomboynotes/tomboyserverauthenticatejob.cpp4
7 files changed, 27 insertions, 27 deletions
diff --git a/resources/tomboynotes/CMakeLists.txt b/resources/tomboynotes/CMakeLists.txt
index 5738b8b..676aa81 100644
--- a/resources/tomboynotes/CMakeLists.txt
+++ b/resources/tomboynotes/CMakeLists.txt
@@ -35,7 +35,7 @@ set(tomboynotesresource_SRCS
ecm_qt_declare_logging_category(tomboynotesresource_SRCS
HEADER debug.h
- IDENTIFIER log_tomboynotesresource
+ IDENTIFIER TOMBOYNOTESRESOURCE_LOG
CATEGORY_NAME log_tomboynotesresource
)
diff --git a/resources/tomboynotes/tomboycollectionsdownloadjob.cpp b/resources/tomboynotes/tomboycollectionsdownloadjob.cpp
index 43756a9..75be13f 100644
--- a/resources/tomboynotes/tomboycollectionsdownloadjob.cpp
+++ b/resources/tomboynotes/tomboycollectionsdownloadjob.cpp
@@ -42,12 +42,12 @@ void TomboyCollectionsDownloadJob::start()
mReply = mRequestor->get(request, QList<O0RequestParameter>());
connect(mReply, &QNetworkReply::finished, this, &TomboyCollectionsDownloadJob::onRequestFinished);
- qCDebug(log_tomboynotesresource) << "TomboyCollectionsDownloadJob: Start network request";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyCollectionsDownloadJob: Start network request";
}
void TomboyCollectionsDownloadJob::onRequestFinished()
{
- qCDebug(log_tomboynotesresource) << "TomboyCollectionsDownloadJob: Network request finished";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyCollectionsDownloadJob: Network request finished";
checkReplyError();
if (error() != TomboyJobError::NoError) {
setErrorText(mReply->errorString());
@@ -59,16 +59,16 @@ void TomboyCollectionsDownloadJob::onRequestFinished()
const QJsonDocument document = QJsonDocument::fromJson(mReply->readAll(), Q_NULLPTR);
const QJsonObject jo = document.object();
- qCDebug(log_tomboynotesresource) << "TomboyCollectionsDownloadJob: " << jo;
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyCollectionsDownloadJob: " << jo;
const QJsonValue collectionRevision = jo[QLatin1String("latest-sync-revision")];
- qCDebug(log_tomboynotesresource) << "TomboyCollectionsDownloadJob: " << collectionRevision;
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyCollectionsDownloadJob: " << collectionRevision;
Akonadi::Collection c;
c.setParentCollection(Akonadi::Collection::root());
c.setRemoteId(mContentURL);
c.setName(mCollectionName);
c.setRemoteRevision(QString::number(collectionRevision.toInt()));
- qCDebug(log_tomboynotesresource) << "TomboyCollectionsDownloadJob: Sync revision " << collectionRevision.toString();
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyCollectionsDownloadJob: Sync revision " << collectionRevision.toString();
c.setContentMimeTypes({ Akonadi::NoteUtils::noteMimeType() });
diff --git a/resources/tomboynotes/tomboyitemdownloadjob.cpp b/resources/tomboynotes/tomboyitemdownloadjob.cpp
index 0b40e79..fc55b9c 100644
--- a/resources/tomboynotes/tomboyitemdownloadjob.cpp
+++ b/resources/tomboynotes/tomboyitemdownloadjob.cpp
@@ -43,7 +43,7 @@ void TomboyItemDownloadJob::start()
mReply = mRequestor->get(request, QList<O0RequestParameter>());
connect(mReply, &QNetworkReply::finished, this, &TomboyItemDownloadJob::onRequestFinished);
- qCDebug(log_tomboynotesresource) << "TomboyItemDownloadJob: Start network request";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemDownloadJob: Start network request";
}
void TomboyItemDownloadJob::onRequestFinished()
@@ -54,17 +54,17 @@ void TomboyItemDownloadJob::onRequestFinished()
emitResult();
return;
}
- qCDebug(log_tomboynotesresource) << "TomboyItemDownloadJob: Network request finished. No error occured";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemDownloadJob: Network request finished. No error occured";
// Parse received data as JSON
const QJsonDocument document = QJsonDocument::fromJson(mReply->readAll(), Q_NULLPTR);
const QJsonObject jsonNote = document.object();
- qCDebug(log_tomboynotesresource) << "TomboyItemDownloadJob: JSON note: " << jsonNote;
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemDownloadJob: JSON note: " << jsonNote;
mResultItem.setRemoteRevision(QString::number(jsonNote[QLatin1String("last-sync-revision")].toInt()));
- qCDebug(log_tomboynotesresource) << "TomboyItemDownloadJob: Sync revision " << mResultItem.remoteRevision();
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemDownloadJob: Sync revision " << mResultItem.remoteRevision();
// Set timestamp
const QString timeStampJson = jsonNote[QLatin1String("last-change-date")].toString();
diff --git a/resources/tomboynotes/tomboyitemsdownloadjob.cpp b/resources/tomboynotes/tomboyitemsdownloadjob.cpp
index 4cef268..11ba033 100644
--- a/resources/tomboynotes/tomboyitemsdownloadjob.cpp
+++ b/resources/tomboynotes/tomboyitemsdownloadjob.cpp
@@ -42,12 +42,12 @@ void TomboyItemsDownloadJob::start()
mReply = mRequestor->get(request, QList<O0RequestParameter>());
connect(mReply, &QNetworkReply::finished, this, &TomboyItemsDownloadJob::onRequestFinished);
- qCDebug(log_tomboynotesresource) << "TomboyItemsDownloadJob: Start network request";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemsDownloadJob: Start network request";
}
void TomboyItemsDownloadJob::onRequestFinished()
{
- qCDebug(log_tomboynotesresource) << "TomboyItemsDownloadJob: Network request finished";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemsDownloadJob: Network request finished";
checkReplyError();
if (error() != TomboyJobError::NoError) {
setErrorText(mReply->errorString());
@@ -65,7 +65,7 @@ void TomboyItemsDownloadJob::onRequestFinished()
Akonadi::Item item(Akonadi::NoteUtils::noteMimeType());
item.setRemoteId(note.toObject()[QLatin1String("guid")].toString());
mResultItems << item;
- qCDebug(log_tomboynotesresource) << "TomboyItemsDownloadJob: Retriving note with id" << item.remoteId();
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemsDownloadJob: Retriving note with id" << item.remoteId();
}
setError(TomboyJobError::NoError);
diff --git a/resources/tomboynotes/tomboyitemuploadjob.cpp b/resources/tomboynotes/tomboyitemuploadjob.cpp
index 7d29eb4..3437de4 100644
--- a/resources/tomboynotes/tomboyitemuploadjob.cpp
+++ b/resources/tomboynotes/tomboyitemuploadjob.cpp
@@ -87,7 +87,7 @@ void TomboyItemUploadJob::start()
request.setHeader(QNetworkRequest::ContentLengthHeader, postData.toJson().length());
mReply = mRequestor->put(request, QList<O0RequestParameter>(), postData.toJson());
connect(mReply, &QNetworkReply::finished, this, &TomboyItemUploadJob::onRequestFinished);
- qCDebug(log_tomboynotesresource) << "TomboyItemUploadJob: Start network request";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemUploadJob: Start network request";
}
void TomboyItemUploadJob::onRequestFinished()
@@ -98,7 +98,7 @@ void TomboyItemUploadJob::onRequestFinished()
emitResult();
return;
}
- qCDebug(log_tomboynotesresource) << "TomboyItemUploadJob: Network request finished. No error occured";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyItemUploadJob: Network request finished. No error occured";
// Parse received data as JSON
const QJsonDocument document = QJsonDocument::fromJson(mReply->readAll(), Q_NULLPTR);
diff --git a/resources/tomboynotes/tomboynotesresource.cpp b/resources/tomboynotes/tomboynotesresource.cpp
index a959e2a..4849d97 100644
--- a/resources/tomboynotes/tomboynotesresource.cpp
+++ b/resources/tomboynotes/tomboynotesresource.cpp
@@ -61,7 +61,7 @@ TomboyNotesResource::TomboyNotesResource(const QString &id)
mManager = new KIO::AccessManager(this);
connect(mManager, &KIO::AccessManager::sslErrors, this, &TomboyNotesResource::onSslError);
- qCDebug(log_tomboynotesresource) << "Resource started";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Resource started";
}
TomboyNotesResource::~TomboyNotesResource()
@@ -70,7 +70,7 @@ TomboyNotesResource::~TomboyNotesResource()
void TomboyNotesResource::retrieveCollections()
{
- qCDebug(log_tomboynotesresource) << "Retrieving collections started";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Retrieving collections started";
if (configurationNotValid()) {
cancelTask(i18n("Resource configuration is not valid"));
@@ -83,7 +83,7 @@ void TomboyNotesResource::retrieveCollections()
// connect to its result() signal
connect(job, &KJob::result, this, &TomboyNotesResource::onCollectionsRetrieved);
job->start();
- qCDebug(log_tomboynotesresource) << "Retriving collections job started";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Retriving collections job started";
}
void TomboyNotesResource::retrieveItems(const Akonadi::Collection &collection)
@@ -100,7 +100,7 @@ void TomboyNotesResource::retrieveItems(const Akonadi::Collection &collection)
// connect to its result() signal
connect(job, &KJob::result, this, &TomboyNotesResource::onItemsRetrieved);
job->start();
- qCDebug(log_tomboynotesresource) << "Retriving items job started";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Retriving items job started";
}
bool TomboyNotesResource::retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts)
@@ -119,7 +119,7 @@ bool TomboyNotesResource::retrieveItem(const Akonadi::Item &item, const QSet<QBy
// connect to its result() signal
connect(job, &KJob::result, this, &TomboyNotesResource::onItemRetrieved);
job->start();
- qCDebug(log_tomboynotesresource) << "Retriving item data job started";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Retriving item data job started";
return true;
}
@@ -127,7 +127,7 @@ bool TomboyNotesResource::retrieveItem(const Akonadi::Item &item, const QSet<QBy
void TomboyNotesResource::onAuthorizationFinished(KJob *kjob)
{
// Saves the received client authentication data in the settings
- qCDebug(log_tomboynotesresource) << "Authorization job finished";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Authorization job finished";
auto job = qobject_cast<TomboyServerAuthenticateJob*>(kjob);
if (job->error() == TomboyJobError::NoError) {
Settings::setRequestToken(job->getRequestToken());
@@ -185,7 +185,7 @@ void TomboyNotesResource::onItemRetrieved(KJob *kjob)
}
itemRetrieved(job->item());
- qCDebug(log_tomboynotesresource) << "Retriving item data job with remoteId " << job->item().remoteId() << " finished";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Retriving item data job with remoteId " << job->item().remoteId() << " finished";
}
void TomboyNotesResource::onItemsRetrieved(KJob *kjob)
@@ -198,7 +198,7 @@ void TomboyNotesResource::onItemsRetrieved(KJob *kjob)
}
itemsRetrieved(job->items());
- qCDebug(log_tomboynotesresource) << "Retriving items job finished";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Retriving items job finished";
}
void TomboyNotesResource::onSslError(QNetworkReply *reply, const QList<QSslError> &errors)
@@ -217,7 +217,7 @@ void TomboyNotesResource::aboutToQuit()
void TomboyNotesResource::configure(WId windowId)
{
- qCDebug(log_tomboynotesresource) << "Resource configuration started";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Resource configuration started";
ConfigDialog dialog(Settings::self());
@@ -238,7 +238,7 @@ void TomboyNotesResource::configure(WId windowId)
job->setServerURL(Settings::serverURL(), QString());
connect(job, &KJob::result, this, &TomboyNotesResource::onAuthorizationFinished);
job->start();
- qCDebug(log_tomboynotesresource) << "Authorization job started";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "Authorization job started";
} else {
synchronize();
}
diff --git a/resources/tomboynotes/tomboyserverauthenticatejob.cpp b/resources/tomboynotes/tomboyserverauthenticatejob.cpp
index e0ddae0..c5117fb 100644
--- a/resources/tomboynotes/tomboyserverauthenticatejob.cpp
+++ b/resources/tomboynotes/tomboyserverauthenticatejob.cpp
@@ -78,7 +78,7 @@ void TomboyServerAuthenticateJob::onLinkingSucceeded()
mReply = mRequestor->get(request, QList<O0RequestParameter>());
connect(mReply, &QNetworkReply::finished, this, &TomboyServerAuthenticateJob::onApiRequestFinished);
- qCDebug(log_tomboynotesresource) << "TomboyServerAuthenticateJob: Start network request";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyServerAuthenticateJob: Start network request";
}
void TomboyServerAuthenticateJob::onOpenBrowser(const QUrl &url)
@@ -105,7 +105,7 @@ void TomboyServerAuthenticateJob::onApiRequestFinished()
mReply = mRequestor->get(request, QList<O0RequestParameter>());
connect(mReply, &QNetworkReply::finished, this, &TomboyServerAuthenticateJob::onUserRequestFinished);
- qCDebug(log_tomboynotesresource) << "TomboyServerAuthenticateJob: Start network request";
+ qCDebug(TOMBOYNOTESRESOURCE_LOG) << "TomboyServerAuthenticateJob: Start network request";
}
void TomboyServerAuthenticateJob::onUserRequestFinished()