From 9e6ec3a244220285be43514d4c2465e2267f7126 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 23 Feb 2012 11:51:17 -0600 Subject: [PATCH] Terminate kdDebug calls with newlines This closes Bug 631 --- kresources/caldav/config.cpp | 4 ++-- kresources/caldav/job.cpp | 2 +- kresources/caldav/preferences.cpp | 6 ++--- kresources/caldav/preferences.h | 2 +- kresources/caldav/reader.cpp | 34 ++++++++++++++-------------- kresources/caldav/resource.cpp | 2 +- kresources/caldav/writer.cpp | 36 +++++++++++++++--------------- kresources/carddav/config.cpp | 4 ++-- kresources/carddav/job.cpp | 2 +- kresources/carddav/preferences.cpp | 6 ++--- kresources/carddav/preferences.h | 2 +- kresources/carddav/reader.cpp | 8 +++---- kresources/carddav/resource.cpp | 2 +- kresources/carddav/writer.cpp | 12 +++++----- 14 files changed, 61 insertions(+), 61 deletions(-) diff --git a/kresources/caldav/config.cpp b/kresources/caldav/config.cpp index f3cf57fd..0a07aafc 100644 --- a/kresources/caldav/config.cpp +++ b/kresources/caldav/config.cpp @@ -47,7 +47,7 @@ using namespace KCal; ResourceCalDav* ResourceCalDavConfig::getCalDavResource(KRES::Resource* resource) { ResourceCalDav *res = dynamic_cast( resource ); if (!res) { - kdDebug() << "invalid resource type"; + kdDebug() << "invalid resource type" << '\n'; } return res; @@ -59,7 +59,7 @@ CalDavPrefs* ResourceCalDavConfig::getPrefs(ResourceCalDav* res) { if (res) { p = res->prefs(); if (!p) { - kdDebug() << "CalDAV: res->prefs() returned NULL"; + kdDebug() << "CalDAV: res->prefs() returned NULL" << '\n'; } } diff --git a/kresources/caldav/job.cpp b/kresources/caldav/job.cpp index 8e49041f..93f91cd5 100644 --- a/kresources/caldav/job.cpp +++ b/kresources/caldav/job.cpp @@ -20,7 +20,7 @@ #include -#define log(s) kdDebug() << s; +#define log(s) kdDebug() << s << '\n'; /*========================================================================= | NAMESPACE diff --git a/kresources/caldav/preferences.cpp b/kresources/caldav/preferences.cpp index 6eb87e45..87d9c972 100644 --- a/kresources/caldav/preferences.cpp +++ b/kresources/caldav/preferences.cpp @@ -69,7 +69,7 @@ Wallet* CalDavPrefs::getWallet() { // the wallet is not marked as inaccessible if (NULL == mWallet) { - kdDebug() << "creating wallet for " + mPrefix; + kdDebug() << "creating wallet for " + mPrefix << '\n'; mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0); if (NULL == mWallet) { @@ -182,13 +182,13 @@ TQString CalDavPrefs::getusername() { } void CalDavPrefs::setRememberPassword(bool v) { - kdDebug() << "remember: " << v; + kdDebug() << "remember: " << v << '\n'; CalDavPrefsSkel::setRememberPassword(v); if (!v) { // we should not remember password. If there is one already stored, it must be removed. - kdDebug() << "removing password from wallet"; + kdDebug() << "removing password from wallet" << '\n'; removePasswordFromWallet(); } } diff --git a/kresources/caldav/preferences.h b/kresources/caldav/preferences.h index 98245e6b..d21be84c 100644 --- a/kresources/caldav/preferences.h +++ b/kresources/caldav/preferences.h @@ -54,7 +54,7 @@ public: } virtual ~CalDavPrefs() { - kdDebug() << "removing wallet"; + kdDebug() << "removing wallet" << '\n'; removeWallet(); } diff --git a/kresources/caldav/reader.cpp b/kresources/caldav/reader.cpp index 892b490c..92501e4f 100644 --- a/kresources/caldav/reader.cpp +++ b/kresources/caldav/reader.cpp @@ -44,26 +44,26 @@ void CalDavReader::cleanJournalsJob() { } int CalDavReader::runJob(runtime_info* RT) { - kdDebug() << "reader::run, url: " << url(); + kdDebug() << "reader::run, url: " << url() << '\n'; response* result = caldav_get_response(); CALDAV_RESPONSE res = OK; if ((OK == res) && (url() != "")) { if (mGetAll) { - kdDebug() << "getting all objects"; + kdDebug() << "getting all objects" << '\n'; res = caldav_getall_object(result, std::string(url().ascii()).c_str(), RT); } else { - kdDebug() << "getting object from the specified time range"; + kdDebug() << "getting object from the specified time range" << '\n'; res = caldav_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(url().ascii()).c_str(), RT); } if (OK == res) { - kdDebug() << "success"; + kdDebug() << "success" << '\n'; if (result->msg) { mData = result->msg; } else { - kdDebug() << "empty collection"; + kdDebug() << "empty collection" << '\n'; // empty collection mData = ""; } @@ -76,28 +76,28 @@ int CalDavReader::runJob(runtime_info* RT) { } int CalDavReader::runTasksJob(runtime_info* RT) { - kdDebug() << "reader::run, tasksUrl: " << tasksUrl(); + kdDebug() << "reader::run, tasksUrl: " << tasksUrl() << '\n'; response* result = caldav_get_response(); CALDAV_RESPONSE tasksres = OK; if ((OK == tasksres) && (tasksUrl() != "")) { - kdDebug() << "reader::run, url: " << tasksUrl(); + kdDebug() << "reader::run, url: " << tasksUrl() << '\n'; if (mGetAll) { - kdDebug() << "getting all objects"; + kdDebug() << "getting all objects" << '\n'; tasksres = caldav_tasks_getall_object(result, std::string(tasksUrl().ascii()).c_str(), RT); } else { - kdDebug() << "getting object from the specified time range"; + kdDebug() << "getting object from the specified time range" << '\n'; tasksres = caldav_tasks_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(tasksUrl().ascii()).c_str(), RT); } if (OK == tasksres) { - kdDebug() << "success"; + kdDebug() << "success" << '\n'; if (result->msg) { mTasksData = result->msg; } else { - kdDebug() << "empty collection"; + kdDebug() << "empty collection" << '\n'; // empty collection mTasksData = ""; } @@ -110,28 +110,28 @@ int CalDavReader::runTasksJob(runtime_info* RT) { } int CalDavReader::runJournalsJob(runtime_info* RT) { - kdDebug() << "reader::run, journalsUrl: " << journalsUrl(); + kdDebug() << "reader::run, journalsUrl: " << journalsUrl() << '\n'; response* result = caldav_get_response(); CALDAV_RESPONSE journalsres = OK; if ((OK == journalsres) && (journalsUrl() != "")) { - kdDebug() << "reader::run, url: " << journalsUrl(); + kdDebug() << "reader::run, url: " << journalsUrl() << '\n'; if (mGetAll) { - kdDebug() << "getting all objects"; + kdDebug() << "getting all objects" << '\n'; journalsres = caldav_tasks_getall_object(result, std::string(journalsUrl().ascii()).c_str(), RT); } else { - kdDebug() << "getting object from the specified time range"; + kdDebug() << "getting object from the specified time range" << '\n'; journalsres = caldav_tasks_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(journalsUrl().ascii()).c_str(), RT); } if (OK == journalsres) { - kdDebug() << "success"; + kdDebug() << "success" << '\n'; if (result->msg) { mJournalsData = result->msg; } else { - kdDebug() << "empty collection"; + kdDebug() << "empty collection" << '\n'; // empty collection mJournalsData = ""; } diff --git a/kresources/caldav/resource.cpp b/kresources/caldav/resource.cpp index daf7ebde..cf36ae48 100644 --- a/kresources/caldav/resource.cpp +++ b/kresources/caldav/resource.cpp @@ -61,7 +61,7 @@ const int ResourceCalDav::DEFAULT_SAVE_POLICY = ResourceCached::SaveDelaye | UTILITY ========================================================================*/ -#define log(s) kdDebug() << identifier() << ": " << (s); +#define log(s) kdDebug() << identifier() << ": " << (s) << '\n'; /*========================================================================= | CONSTRUCTOR / DESTRUCTOR diff --git a/kresources/caldav/writer.cpp b/kresources/caldav/writer.cpp index a466322e..d9a6b2f0 100644 --- a/kresources/caldav/writer.cpp +++ b/kresources/caldav/writer.cpp @@ -50,24 +50,24 @@ int CalDavWriter::runJob(runtime_info* RT) { int res = OK; if ((OK == res) && (url() != "")) { - kdDebug() << "pushing added objects"; + kdDebug() << "pushing added objects" << '\n'; res = pushObjects(mAdded, caldav_add_object, OK, RT); if (OK == res) { #ifdef USE_CALDAV_MODIFY - kdDebug() << "pushing changed objects"; + kdDebug() << "pushing changed objects" << '\n'; res = pushObjects(mChanged, caldav_modify_object, OK, RT); if (OK == res) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; res = pushObjects(mDeleted, caldav_delete_object, OK, RT); } #else // if USE_CALDAV_MODIFY - kdDebug() << "pushing changed objects (delete)"; + kdDebug() << "pushing changed objects (delete)" << '\n'; res = pushObjects(mChanged, caldav_delete_object, OK, RT); if (OK == res) { - kdDebug() << "pushing changed objects (add)"; + kdDebug() << "pushing changed objects (add)" << '\n'; res = pushObjects(mChanged, caldav_add_object, OK, RT); if (OK == res) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; res = pushObjects(mDeleted, caldav_delete_object, OK, RT); } } @@ -78,24 +78,24 @@ int CalDavWriter::runJob(runtime_info* RT) { int tasksres = OK; if ((OK == tasksres) && (tasksUrl() != "")) { - kdDebug() << "pushing added tasks objects"; + kdDebug() << "pushing added tasks objects" << '\n'; tasksres = pushTasksObjects(mTasksAdded, caldav_add_object, OK, RT); if (OK == tasksres) { #ifdef USE_CALDAV_TASKS_MODIFY - kdDebug() << "pushing changed objects"; + kdDebug() << "pushing changed objects" << '\n'; tasksres = pushTasksObjects(mTasksChanged, caldav_tasks_modify_object, OK, RT); if (OK == tasksres) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT); } #else // if USE_CALDAV_TASKS_MODIFY - kdDebug() << "pushing changed objects (delete)"; + kdDebug() << "pushing changed objects (delete)" << '\n'; tasksres = pushTasksObjects(mTasksChanged, caldav_tasks_delete_object, OK, RT); if (OK == tasksres) { - kdDebug() << "pushing changed objects (add)"; + kdDebug() << "pushing changed objects (add)" << '\n'; tasksres = pushTasksObjects(mTasksChanged, caldav_add_object, OK, RT); if (OK == tasksres) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT); } } @@ -106,24 +106,24 @@ int CalDavWriter::runJob(runtime_info* RT) { int journalsres = OK; if ((OK == journalsres) && (tasksUrl() != "")) { - kdDebug() << "pushing added tasks objects"; + kdDebug() << "pushing added tasks objects" << '\n'; journalsres = pushJournalsObjects(mJournalsAdded, caldav_add_object, OK, RT); if (OK == journalsres) { #ifdef USE_CALDAV_TASKS_MODIFY - kdDebug() << "pushing changed objects"; + kdDebug() << "pushing changed objects" << '\n'; journalsres = pushJournalsObjects(mJournalsChanged, caldav_tasks_modify_object, OK, RT); if (OK == journalsres) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT); } #else // if USE_CALDAV_TASKS_MODIFY - kdDebug() << "pushing changed objects (delete)"; + kdDebug() << "pushing changed objects (delete)" << '\n'; journalsres = pushJournalsObjects(mJournalsChanged, caldav_tasks_delete_object, OK, RT); if (OK == journalsres) { - kdDebug() << "pushing changed objects (add)"; + kdDebug() << "pushing changed objects (add)" << '\n'; journalsres = pushJournalsObjects(mJournalsChanged, caldav_add_object, OK, RT); if (OK == journalsres) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT); } } diff --git a/kresources/carddav/config.cpp b/kresources/carddav/config.cpp index 390e3adc..9b01eb5d 100644 --- a/kresources/carddav/config.cpp +++ b/kresources/carddav/config.cpp @@ -46,7 +46,7 @@ using namespace KABC; ResourceCardDav* ResourceCardDavConfig::getCardDavResource(KRES::Resource* resource) { ResourceCardDav *res = dynamic_cast( resource ); if (!res) { - kdDebug() << "invalid resource type"; + kdDebug() << "invalid resource type" << '\n'; } return res; @@ -58,7 +58,7 @@ CardDavPrefs* ResourceCardDavConfig::getPrefs(ResourceCardDav* res) { if (res) { p = res->prefs(); if (!p) { - kdDebug() << "CardDAV: res->prefs() returned NULL"; + kdDebug() << "CardDAV: res->prefs() returned NULL" << '\n'; } } diff --git a/kresources/carddav/job.cpp b/kresources/carddav/job.cpp index 994964af..9c288650 100644 --- a/kresources/carddav/job.cpp +++ b/kresources/carddav/job.cpp @@ -19,7 +19,7 @@ #include -#define log(s) kdDebug() << s; +#define log(s) kdDebug() << s << '\n'; /*========================================================================= | NAMESPACE diff --git a/kresources/carddav/preferences.cpp b/kresources/carddav/preferences.cpp index cf2cdbc5..17e0216a 100644 --- a/kresources/carddav/preferences.cpp +++ b/kresources/carddav/preferences.cpp @@ -68,7 +68,7 @@ Wallet* CardDavPrefs::getWallet() { // the wallet is not marked as inaccessible if (NULL == mWallet) { - kdDebug() << "creating wallet for " + mPrefix; + kdDebug() << "creating wallet for " + mPrefix << '\n'; mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0); if (NULL == mWallet) { @@ -181,13 +181,13 @@ TQString CardDavPrefs::getusername() { } void CardDavPrefs::setRememberPassword(bool v) { - kdDebug() << "remember: " << v; + kdDebug() << "remember: " << v << '\n'; CardDavPrefsSkel::setRememberPassword(v); if (!v) { // we should not remember password. If there is one already stored, it must be removed. - kdDebug() << "removing password from wallet"; + kdDebug() << "removing password from wallet" << '\n'; removePasswordFromWallet(); } } diff --git a/kresources/carddav/preferences.h b/kresources/carddav/preferences.h index eab9274c..0f074b4d 100644 --- a/kresources/carddav/preferences.h +++ b/kresources/carddav/preferences.h @@ -53,7 +53,7 @@ public: } virtual ~CardDavPrefs() { - kdDebug() << "removing wallet"; + kdDebug() << "removing wallet" << '\n'; removeWallet(); } diff --git a/kresources/carddav/reader.cpp b/kresources/carddav/reader.cpp index d71d5236..62645535 100644 --- a/kresources/carddav/reader.cpp +++ b/kresources/carddav/reader.cpp @@ -33,23 +33,23 @@ void CardDavReader::cleanJob() { } int CardDavReader::runJob(runtime_info* RT) { - kdDebug() << "reader::run, url: " << url(); + kdDebug() << "reader::run, url: " << url() << '\n'; response* result = carddav_get_response(); CARDDAV_RESPONSE res = OK; - kdDebug() << "getting all objects"; + kdDebug() << "getting all objects" << '\n'; if (getUseURI() == false) res = carddav_getall_object(result, std::string(url().ascii()).c_str(), RT); else res = carddav_getall_object_by_uri(result, std::string(url().ascii()).c_str(), RT); if (OK == res) { - kdDebug() << "success"; + kdDebug() << "success" << '\n'; if (result->msg) { mData = result->msg; } else { - kdDebug() << "empty collection"; + kdDebug() << "empty collection" << '\n'; // empty collection mData = ""; } diff --git a/kresources/carddav/resource.cpp b/kresources/carddav/resource.cpp index a708eef0..8d7ad025 100644 --- a/kresources/carddav/resource.cpp +++ b/kresources/carddav/resource.cpp @@ -61,7 +61,7 @@ const int ResourceCardDav::DEFAULT_SAVE_POLICY = ResourceCached::SaveDelay | UTILITY ========================================================================*/ -#define log(s) kdDebug() << identifier() << ": " << (s); +#define log(s) kdDebug() << identifier() << ": " << (s) << '\n'; /*========================================================================= | CONSTRUCTOR / DESTRUCTOR diff --git a/kresources/carddav/writer.cpp b/kresources/carddav/writer.cpp index 7141bf30..68bf126d 100644 --- a/kresources/carddav/writer.cpp +++ b/kresources/carddav/writer.cpp @@ -47,17 +47,17 @@ int CardDavWriter::runJob(runtime_info* RT) { int res = OK; - kdDebug() << "pushing added objects"; + kdDebug() << "pushing added objects" << '\n'; res = pushObjects(mAdded, carddav_add_object, OK, RT); if (OK == res) { #ifdef USE_CARDDAV_MODIFY - kdDebug() << "pushing changed objects"; + kdDebug() << "pushing changed objects" << '\n'; if (getUseURI() == false) res = pushObjects(mChanged, carddav_modify_object, OK, RT); else res = pushObjects(mChanged, carddav_modify_object_by_uri, OK, RT); if (OK == res) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) { int endLocation = mDeleted.find("END:VCARD", 0, TRUE); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9); @@ -69,19 +69,19 @@ int CardDavWriter::runJob(runtime_info* RT) { } } #else // if USE_CARDDAV_MODIFY - kdDebug() << "pushing changed objects (delete)"; + kdDebug() << "pushing changed objects (delete)" << '\n'; if (getUseURI() == false) res = pushObjects(mChanged, carddav_delete_object, OK, RT); else res = pushObjects(mChanged, carddav_delete_object_by_uri, OK, RT); if (OK == res) { - kdDebug() << "pushing changed objects (add)"; + kdDebug() << "pushing changed objects (add)" << '\n'; if (getUseURI() == false) res = pushObjects(mChanged, carddav_add_object, OK, RT); else res = pushObjects(mChanged, carddav_add_object, OK, RT); if (OK == res) { - kdDebug() << "pushing deleted objects"; + kdDebug() << "pushing deleted objects" << '\n'; while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) { int endLocation = mDeleted.find("END:VCARD", 0, TRUE); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9);