Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 4b40cdae authored by Laurent Montel's avatar Laurent Montel 😁

use debug categories

parent 9ea44f09
......@@ -16,6 +16,7 @@
*/
#include "calendaring.h"
#include "pimkolab_debug.h"
#include <kcalcore/event.h>
#include <kcalcore/todo.h>
......@@ -88,7 +89,7 @@ void Calendar::addEvent(const Kolab::Event &event)
{
KCalCore::Event::Ptr k = Kolab::Conversion::toKCalCore(event);
if (!mCalendar->addEvent(k)) {
qWarning() << "failed to add event";
qCWarning(PIMKOLAB_LOG) << "failed to add event";
}
}
......
......@@ -17,7 +17,6 @@
#include "datetimeutils.h"
#include <qdebug.h>
#include <QTimeZone>
#include "conversion/commonconversion.h"
......
......@@ -16,17 +16,15 @@
*/
#include "commonconversion.h"
#include "pimkolab_debug.h"
#include "timezoneconverter.h"
#include "utils/porting.h"
#include <kolabformat/errorhandler.h>
#include <iostream>
#include <KTimeZone>
#include <QUrl>
#include <QTimeZone>
#include <QDebug>
namespace Kolab {
namespace Conversion {
QTimeZone getTimeZone(const std::string &timezone)
......@@ -83,7 +81,6 @@ QDateTime toDate(const Kolab::cDateTime &dt)
cDateTime fromDate(const KDateTime &dt)
{
if (!dt.isValid()) {
// qDebug() << "invalid datetime converted";
return cDateTime();
}
cDateTime date;
......@@ -111,11 +108,11 @@ cDateTime fromDate(const KDateTime &dt)
if (!timezone.isEmpty()) {
date.setTimezone(toStdString(timezone));
} else {
Warning() << "invalid timezone: " << dt.timeZone().name() << ", assuming floating time";
qCWarning(PIMKOLAB_LOG) << "invalid timezone: " << dt.timeZone().name() << ", assuming floating time";
return date;
}
} else if (dt.timeType() != KDateTime::ClockTime) {
Error() << "invalid timespec, assuming floating time. Type: " << dt.timeType() << "dt: " << dt.toString();
qCCritical(PIMKOLAB_LOG) << "invalid timespec, assuming floating time. Type: " << dt.timeType() << "dt: " << dt.toString();
return date;
}
}
......@@ -151,7 +148,7 @@ cDateTime fromDate(const QDateTime &dt, bool isAllDay)
if (!timezone.isEmpty()) {
date.setTimezone(toStdString(timezone));
} else {
Warning() << "invalid timezone: " << dt.timeZone().id() << ", assuming floating time";
qCWarning(PIMKOLAB_LOG) << "invalid timezone: " << dt.timeZone().id() << ", assuming floating time";
return date;
}
}
......@@ -209,13 +206,13 @@ QPair<std::string, std::string> fromMailto(const std::string &mailto)
}
std::size_t begin = decoded.find('<', 7);
if (begin == std::string::npos) {
WARNING("no mailto address");
qCDebug(PIMKOLAB_LOG) << "no mailto address";
std::cout << decoded << std::endl;
return qMakePair(decoded, std::string());
}
std::size_t end = decoded.find('>', begin);
if (end == std::string::npos) {
WARNING("no mailto address");
qCWarning(PIMKOLAB_LOG) << "no mailto address";
std::cout << decoded << std::endl;
return qMakePair(decoded, std::string());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment