Terminate kdDebug calls with newlines

This closes Bug 631
(cherry picked from commit 9e6ec3a244)
v3.5.13-sru
Timothy Pearson 13 years ago committed by Slávek Banko
parent f4b37d7631
commit 7a3c5f4774

@ -47,7 +47,7 @@ using namespace KCal;
ResourceCalDav* ResourceCalDavConfig::getCalDavResource(KRES::Resource* resource) { ResourceCalDav* ResourceCalDavConfig::getCalDavResource(KRES::Resource* resource) {
ResourceCalDav *res = dynamic_cast<ResourceCalDav *>( resource ); ResourceCalDav *res = dynamic_cast<ResourceCalDav *>( resource );
if (!res) { if (!res) {
kdDebug() << "invalid resource type"; kdDebug() << "invalid resource type" << '\n';
} }
return res; return res;
@ -59,7 +59,7 @@ CalDavPrefs* ResourceCalDavConfig::getPrefs(ResourceCalDav* res) {
if (res) { if (res) {
p = res->prefs(); p = res->prefs();
if (!p) { if (!p) {
kdDebug() << "CalDAV: res->prefs() returned NULL"; kdDebug() << "CalDAV: res->prefs() returned NULL" << '\n';
} }
} }

@ -20,7 +20,7 @@
#include <tqmutex.h> #include <tqmutex.h>
#define log(s) kdDebug() << s; #define log(s) kdDebug() << s << '\n';
/*========================================================================= /*=========================================================================
| NAMESPACE | NAMESPACE

@ -69,7 +69,7 @@ Wallet* CalDavPrefs::getWallet() {
// the wallet is not marked as inaccessible // the wallet is not marked as inaccessible
if (NULL == mWallet) { if (NULL == mWallet) {
kdDebug() << "creating wallet for " + mPrefix; kdDebug() << "creating wallet for " + mPrefix << '\n';
mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0); mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0);
if (NULL == mWallet) { if (NULL == mWallet) {
@ -182,13 +182,13 @@ TQString CalDavPrefs::getusername() {
} }
void CalDavPrefs::setRememberPassword(bool v) { void CalDavPrefs::setRememberPassword(bool v) {
kdDebug() << "remember: " << v; kdDebug() << "remember: " << v << '\n';
CalDavPrefsSkel::setRememberPassword(v); CalDavPrefsSkel::setRememberPassword(v);
if (!v) { if (!v) {
// we should not remember password. If there is one already stored, it must be removed. // 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(); removePasswordFromWallet();
} }
} }

@ -54,7 +54,7 @@ public:
} }
virtual ~CalDavPrefs() { virtual ~CalDavPrefs() {
kdDebug() << "removing wallet"; kdDebug() << "removing wallet" << '\n';
removeWallet(); removeWallet();
} }

@ -44,26 +44,26 @@ void CalDavReader::cleanJournalsJob() {
} }
int CalDavReader::runJob(runtime_info* RT) { int CalDavReader::runJob(runtime_info* RT) {
kdDebug() << "reader::run, url: " << url(); kdDebug() << "reader::run, url: " << url() << '\n';
response* result = caldav_get_response(); response* result = caldav_get_response();
CALDAV_RESPONSE res = OK; CALDAV_RESPONSE res = OK;
if ((OK == res) && (url() != "")) { if ((OK == res) && (url() != "")) {
if (mGetAll) { if (mGetAll) {
kdDebug() << "getting all objects"; kdDebug() << "getting all objects" << '\n';
res = caldav_getall_object(result, std::string(url().ascii()).c_str(), RT); res = caldav_getall_object(result, std::string(url().ascii()).c_str(), RT);
} else { } 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); res = caldav_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(url().ascii()).c_str(), RT);
} }
if (OK == res) { if (OK == res) {
kdDebug() << "success"; kdDebug() << "success" << '\n';
if (result->msg) { if (result->msg) {
mData = result->msg; mData = result->msg;
} else { } else {
kdDebug() << "empty collection"; kdDebug() << "empty collection" << '\n';
// empty collection // empty collection
mData = ""; mData = "";
} }
@ -76,28 +76,28 @@ int CalDavReader::runJob(runtime_info* RT) {
} }
int CalDavReader::runTasksJob(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(); response* result = caldav_get_response();
CALDAV_RESPONSE tasksres = OK; CALDAV_RESPONSE tasksres = OK;
if ((OK == tasksres) && (tasksUrl() != "")) { if ((OK == tasksres) && (tasksUrl() != "")) {
kdDebug() << "reader::run, url: " << tasksUrl(); kdDebug() << "reader::run, url: " << tasksUrl() << '\n';
if (mGetAll) { if (mGetAll) {
kdDebug() << "getting all objects"; kdDebug() << "getting all objects" << '\n';
tasksres = caldav_tasks_getall_object(result, std::string(tasksUrl().ascii()).c_str(), RT); tasksres = caldav_tasks_getall_object(result, std::string(tasksUrl().ascii()).c_str(), RT);
} else { } 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); tasksres = caldav_tasks_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(tasksUrl().ascii()).c_str(), RT);
} }
if (OK == tasksres) { if (OK == tasksres) {
kdDebug() << "success"; kdDebug() << "success" << '\n';
if (result->msg) { if (result->msg) {
mTasksData = result->msg; mTasksData = result->msg;
} else { } else {
kdDebug() << "empty collection"; kdDebug() << "empty collection" << '\n';
// empty collection // empty collection
mTasksData = ""; mTasksData = "";
} }
@ -110,28 +110,28 @@ int CalDavReader::runTasksJob(runtime_info* RT) {
} }
int CalDavReader::runJournalsJob(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(); response* result = caldav_get_response();
CALDAV_RESPONSE journalsres = OK; CALDAV_RESPONSE journalsres = OK;
if ((OK == journalsres) && (journalsUrl() != "")) { if ((OK == journalsres) && (journalsUrl() != "")) {
kdDebug() << "reader::run, url: " << journalsUrl(); kdDebug() << "reader::run, url: " << journalsUrl() << '\n';
if (mGetAll) { if (mGetAll) {
kdDebug() << "getting all objects"; kdDebug() << "getting all objects" << '\n';
journalsres = caldav_tasks_getall_object(result, std::string(journalsUrl().ascii()).c_str(), RT); journalsres = caldav_tasks_getall_object(result, std::string(journalsUrl().ascii()).c_str(), RT);
} else { } 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); journalsres = caldav_tasks_get_object(result, mTimeStart.toTime_t(), mTimeEnd.toTime_t(), std::string(journalsUrl().ascii()).c_str(), RT);
} }
if (OK == journalsres) { if (OK == journalsres) {
kdDebug() << "success"; kdDebug() << "success" << '\n';
if (result->msg) { if (result->msg) {
mJournalsData = result->msg; mJournalsData = result->msg;
} else { } else {
kdDebug() << "empty collection"; kdDebug() << "empty collection" << '\n';
// empty collection // empty collection
mJournalsData = ""; mJournalsData = "";
} }

@ -61,7 +61,7 @@ const int ResourceCalDav::DEFAULT_SAVE_POLICY = ResourceCached::SaveDelaye
| UTILITY | UTILITY
========================================================================*/ ========================================================================*/
#define log(s) kdDebug() << identifier() << ": " << (s); #define log(s) kdDebug() << identifier() << ": " << (s) << '\n';
/*========================================================================= /*=========================================================================
| CONSTRUCTOR / DESTRUCTOR | CONSTRUCTOR / DESTRUCTOR

@ -50,24 +50,24 @@ int CalDavWriter::runJob(runtime_info* RT) {
int res = OK; int res = OK;
if ((OK == res) && (url() != "")) { if ((OK == res) && (url() != "")) {
kdDebug() << "pushing added objects"; kdDebug() << "pushing added objects" << '\n';
res = pushObjects(mAdded, caldav_add_object, OK, RT); res = pushObjects(mAdded, caldav_add_object, OK, RT);
if (OK == res) { if (OK == res) {
#ifdef USE_CALDAV_MODIFY #ifdef USE_CALDAV_MODIFY
kdDebug() << "pushing changed objects"; kdDebug() << "pushing changed objects" << '\n';
res = pushObjects(mChanged, caldav_modify_object, OK, RT); res = pushObjects(mChanged, caldav_modify_object, OK, RT);
if (OK == res) { if (OK == res) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
res = pushObjects(mDeleted, caldav_delete_object, OK, RT); res = pushObjects(mDeleted, caldav_delete_object, OK, RT);
} }
#else // if USE_CALDAV_MODIFY #else // if USE_CALDAV_MODIFY
kdDebug() << "pushing changed objects (delete)"; kdDebug() << "pushing changed objects (delete)" << '\n';
res = pushObjects(mChanged, caldav_delete_object, OK, RT); res = pushObjects(mChanged, caldav_delete_object, OK, RT);
if (OK == res) { if (OK == res) {
kdDebug() << "pushing changed objects (add)"; kdDebug() << "pushing changed objects (add)" << '\n';
res = pushObjects(mChanged, caldav_add_object, OK, RT); res = pushObjects(mChanged, caldav_add_object, OK, RT);
if (OK == res) { if (OK == res) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
res = pushObjects(mDeleted, caldav_delete_object, OK, RT); res = pushObjects(mDeleted, caldav_delete_object, OK, RT);
} }
} }
@ -78,24 +78,24 @@ int CalDavWriter::runJob(runtime_info* RT) {
int tasksres = OK; int tasksres = OK;
if ((OK == tasksres) && (tasksUrl() != "")) { if ((OK == tasksres) && (tasksUrl() != "")) {
kdDebug() << "pushing added tasks objects"; kdDebug() << "pushing added tasks objects" << '\n';
tasksres = pushTasksObjects(mTasksAdded, caldav_add_object, OK, RT); tasksres = pushTasksObjects(mTasksAdded, caldav_add_object, OK, RT);
if (OK == tasksres) { if (OK == tasksres) {
#ifdef USE_CALDAV_TASKS_MODIFY #ifdef USE_CALDAV_TASKS_MODIFY
kdDebug() << "pushing changed objects"; kdDebug() << "pushing changed objects" << '\n';
tasksres = pushTasksObjects(mTasksChanged, caldav_tasks_modify_object, OK, RT); tasksres = pushTasksObjects(mTasksChanged, caldav_tasks_modify_object, OK, RT);
if (OK == tasksres) { if (OK == tasksres) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT); tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT);
} }
#else // if USE_CALDAV_TASKS_MODIFY #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); tasksres = pushTasksObjects(mTasksChanged, caldav_tasks_delete_object, OK, RT);
if (OK == tasksres) { if (OK == tasksres) {
kdDebug() << "pushing changed objects (add)"; kdDebug() << "pushing changed objects (add)" << '\n';
tasksres = pushTasksObjects(mTasksChanged, caldav_add_object, OK, RT); tasksres = pushTasksObjects(mTasksChanged, caldav_add_object, OK, RT);
if (OK == tasksres) { if (OK == tasksres) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT); tasksres = pushTasksObjects(mTasksDeleted, caldav_tasks_delete_object, OK, RT);
} }
} }
@ -106,24 +106,24 @@ int CalDavWriter::runJob(runtime_info* RT) {
int journalsres = OK; int journalsres = OK;
if ((OK == journalsres) && (tasksUrl() != "")) { if ((OK == journalsres) && (tasksUrl() != "")) {
kdDebug() << "pushing added tasks objects"; kdDebug() << "pushing added tasks objects" << '\n';
journalsres = pushJournalsObjects(mJournalsAdded, caldav_add_object, OK, RT); journalsres = pushJournalsObjects(mJournalsAdded, caldav_add_object, OK, RT);
if (OK == journalsres) { if (OK == journalsres) {
#ifdef USE_CALDAV_TASKS_MODIFY #ifdef USE_CALDAV_TASKS_MODIFY
kdDebug() << "pushing changed objects"; kdDebug() << "pushing changed objects" << '\n';
journalsres = pushJournalsObjects(mJournalsChanged, caldav_tasks_modify_object, OK, RT); journalsres = pushJournalsObjects(mJournalsChanged, caldav_tasks_modify_object, OK, RT);
if (OK == journalsres) { if (OK == journalsres) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT); journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT);
} }
#else // if USE_CALDAV_TASKS_MODIFY #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); journalsres = pushJournalsObjects(mJournalsChanged, caldav_tasks_delete_object, OK, RT);
if (OK == journalsres) { if (OK == journalsres) {
kdDebug() << "pushing changed objects (add)"; kdDebug() << "pushing changed objects (add)" << '\n';
journalsres = pushJournalsObjects(mJournalsChanged, caldav_add_object, OK, RT); journalsres = pushJournalsObjects(mJournalsChanged, caldav_add_object, OK, RT);
if (OK == journalsres) { if (OK == journalsres) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT); journalsres = pushJournalsObjects(mJournalsDeleted, caldav_tasks_delete_object, OK, RT);
} }
} }

@ -46,7 +46,7 @@ using namespace KABC;
ResourceCardDav* ResourceCardDavConfig::getCardDavResource(KRES::Resource* resource) { ResourceCardDav* ResourceCardDavConfig::getCardDavResource(KRES::Resource* resource) {
ResourceCardDav *res = dynamic_cast<ResourceCardDav *>( resource ); ResourceCardDav *res = dynamic_cast<ResourceCardDav *>( resource );
if (!res) { if (!res) {
kdDebug() << "invalid resource type"; kdDebug() << "invalid resource type" << '\n';
} }
return res; return res;
@ -58,7 +58,7 @@ CardDavPrefs* ResourceCardDavConfig::getPrefs(ResourceCardDav* res) {
if (res) { if (res) {
p = res->prefs(); p = res->prefs();
if (!p) { if (!p) {
kdDebug() << "CardDAV: res->prefs() returned NULL"; kdDebug() << "CardDAV: res->prefs() returned NULL" << '\n';
} }
} }

@ -19,7 +19,7 @@
#include <tqmutex.h> #include <tqmutex.h>
#define log(s) kdDebug() << s; #define log(s) kdDebug() << s << '\n';
/*========================================================================= /*=========================================================================
| NAMESPACE | NAMESPACE

@ -68,7 +68,7 @@ Wallet* CardDavPrefs::getWallet() {
// the wallet is not marked as inaccessible // the wallet is not marked as inaccessible
if (NULL == mWallet) { if (NULL == mWallet) {
kdDebug() << "creating wallet for " + mPrefix; kdDebug() << "creating wallet for " + mPrefix << '\n';
mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0); mWallet = Wallet::openWallet(Wallet::NetworkWallet(), 0);
if (NULL == mWallet) { if (NULL == mWallet) {
@ -181,13 +181,13 @@ TQString CardDavPrefs::getusername() {
} }
void CardDavPrefs::setRememberPassword(bool v) { void CardDavPrefs::setRememberPassword(bool v) {
kdDebug() << "remember: " << v; kdDebug() << "remember: " << v << '\n';
CardDavPrefsSkel::setRememberPassword(v); CardDavPrefsSkel::setRememberPassword(v);
if (!v) { if (!v) {
// we should not remember password. If there is one already stored, it must be removed. // 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(); removePasswordFromWallet();
} }
} }

@ -53,7 +53,7 @@ public:
} }
virtual ~CardDavPrefs() { virtual ~CardDavPrefs() {
kdDebug() << "removing wallet"; kdDebug() << "removing wallet" << '\n';
removeWallet(); removeWallet();
} }

@ -33,23 +33,23 @@ void CardDavReader::cleanJob() {
} }
int CardDavReader::runJob(runtime_info* RT) { int CardDavReader::runJob(runtime_info* RT) {
kdDebug() << "reader::run, url: " << url(); kdDebug() << "reader::run, url: " << url() << '\n';
response* result = carddav_get_response(); response* result = carddav_get_response();
CARDDAV_RESPONSE res = OK; CARDDAV_RESPONSE res = OK;
kdDebug() << "getting all objects"; kdDebug() << "getting all objects" << '\n';
if (getUseURI() == false) if (getUseURI() == false)
res = carddav_getall_object(result, std::string(url().ascii()).c_str(), RT); res = carddav_getall_object(result, std::string(url().ascii()).c_str(), RT);
else else
res = carddav_getall_object_by_uri(result, std::string(url().ascii()).c_str(), RT); res = carddav_getall_object_by_uri(result, std::string(url().ascii()).c_str(), RT);
if (OK == res) { if (OK == res) {
kdDebug() << "success"; kdDebug() << "success" << '\n';
if (result->msg) { if (result->msg) {
mData = result->msg; mData = result->msg;
} else { } else {
kdDebug() << "empty collection"; kdDebug() << "empty collection" << '\n';
// empty collection // empty collection
mData = ""; mData = "";
} }

@ -61,7 +61,7 @@ const int ResourceCardDav::DEFAULT_SAVE_POLICY = ResourceCached::SaveDelay
| UTILITY | UTILITY
========================================================================*/ ========================================================================*/
#define log(s) kdDebug() << identifier() << ": " << (s); #define log(s) kdDebug() << identifier() << ": " << (s) << '\n';
/*========================================================================= /*=========================================================================
| CONSTRUCTOR / DESTRUCTOR | CONSTRUCTOR / DESTRUCTOR

@ -47,17 +47,17 @@ int CardDavWriter::runJob(runtime_info* RT) {
int res = OK; int res = OK;
kdDebug() << "pushing added objects"; kdDebug() << "pushing added objects" << '\n';
res = pushObjects(mAdded, carddav_add_object, OK, RT); res = pushObjects(mAdded, carddav_add_object, OK, RT);
if (OK == res) { if (OK == res) {
#ifdef USE_CARDDAV_MODIFY #ifdef USE_CARDDAV_MODIFY
kdDebug() << "pushing changed objects"; kdDebug() << "pushing changed objects" << '\n';
if (getUseURI() == false) if (getUseURI() == false)
res = pushObjects(mChanged, carddav_modify_object, OK, RT); res = pushObjects(mChanged, carddav_modify_object, OK, RT);
else else
res = pushObjects(mChanged, carddav_modify_object_by_uri, OK, RT); res = pushObjects(mChanged, carddav_modify_object_by_uri, OK, RT);
if (OK == res) { if (OK == res) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) { while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) {
int endLocation = mDeleted.find("END:VCARD", 0, TRUE); int endLocation = mDeleted.find("END:VCARD", 0, TRUE);
TQString deletedCurSeq = mDeleted.mid(0, endLocation+9); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9);
@ -69,19 +69,19 @@ int CardDavWriter::runJob(runtime_info* RT) {
} }
} }
#else // if USE_CARDDAV_MODIFY #else // if USE_CARDDAV_MODIFY
kdDebug() << "pushing changed objects (delete)"; kdDebug() << "pushing changed objects (delete)" << '\n';
if (getUseURI() == false) if (getUseURI() == false)
res = pushObjects(mChanged, carddav_delete_object, OK, RT); res = pushObjects(mChanged, carddav_delete_object, OK, RT);
else else
res = pushObjects(mChanged, carddav_delete_object_by_uri, OK, RT); res = pushObjects(mChanged, carddav_delete_object_by_uri, OK, RT);
if (OK == res) { if (OK == res) {
kdDebug() << "pushing changed objects (add)"; kdDebug() << "pushing changed objects (add)" << '\n';
if (getUseURI() == false) if (getUseURI() == false)
res = pushObjects(mChanged, carddav_add_object, OK, RT); res = pushObjects(mChanged, carddav_add_object, OK, RT);
else else
res = pushObjects(mChanged, carddav_add_object, OK, RT); res = pushObjects(mChanged, carddav_add_object, OK, RT);
if (OK == res) { if (OK == res) {
kdDebug() << "pushing deleted objects"; kdDebug() << "pushing deleted objects" << '\n';
while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) { while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) {
int endLocation = mDeleted.find("END:VCARD", 0, TRUE); int endLocation = mDeleted.find("END:VCARD", 0, TRUE);
TQString deletedCurSeq = mDeleted.mid(0, endLocation+9); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9);

Loading…
Cancel
Save