summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2015-04-21 16:41:58 +0200
committerChristian Mollekopf <mollekopf@kolabsys.com>2015-04-28 16:15:00 +0200
commitbcbe1b8a26ca9f9eb180f7c19d334c1aa0f7fd2e (patch)
treeca26d8fca1ff5e2c36c0e0dca7cf4b0c250275f4
parent26cd390db4e64b33556cbde97053a52be13b2f13 (diff)
downloadlibkolab-bcbe1b8a26ca9f9eb180f7c19d334c1aa0f7fd2e.tar.gz
Ported away from kDebug and friends.
-rw-r--r--conversion/commonconversion.cpp1
-rw-r--r--conversion/kabcconversion.cpp5
-rw-r--r--conversion/timezoneconverter.cpp7
-rw-r--r--icalendar/icalendar.cpp4
-rw-r--r--icalendar/imip.cpp7
-rw-r--r--kolabformat/kolabobject.cpp4
-rw-r--r--kolabformat/v2helpers.cpp4
-rw-r--r--kolabformatV2/contact.cpp24
-rw-r--r--kolabformatV2/distributionlist.cpp8
-rw-r--r--kolabformatV2/event.cpp8
-rw-r--r--kolabformatV2/incidence.cpp36
-rw-r--r--kolabformatV2/journal.cpp2
-rw-r--r--kolabformatV2/kolabbase.cpp20
-rw-r--r--kolabformatV2/task.cpp6
-rw-r--r--mime/mimeutils.cpp11
-rw-r--r--tests/benchmark.cpp1
-rw-r--r--tests/formattest.cpp5
-rw-r--r--tests/kolabobjecttest.cpp5
-rw-r--r--tests/testutils.h15
-rw-r--r--tests/timezonetest.cpp13
-rw-r--r--tests/upgradetest.cpp6
21 files changed, 91 insertions, 101 deletions
diff --git a/conversion/commonconversion.cpp b/conversion/commonconversion.cpp
index 7accd22..54c8518 100644
--- a/conversion/commonconversion.cpp
+++ b/conversion/commonconversion.cpp
@@ -21,7 +21,6 @@
#include <iostream>
#include <ksystemtimezone.h>
-#include <kdebug.h>
#include <QUrl>
namespace Kolab {
diff --git a/conversion/kabcconversion.cpp b/conversion/kabcconversion.cpp
index 64d8311..b7d7235 100644
--- a/conversion/kabcconversion.cpp
+++ b/conversion/kabcconversion.cpp
@@ -18,7 +18,6 @@
#include "kabcconversion.h"
#include "commonconversion.h"
-#include <kdebug.h>
#include <qbuffer.h>
#include <qimagereader.h>
#include "kolabformat/errorhandler.h"
@@ -328,7 +327,7 @@ std::string fromPicture(const KContacts::Picture &pic, std::string &mimetype)
}
} else if ( !pic.url().isEmpty() ) {
QString tmpFile;
- kWarning() << "external pictures are currently not supported";
+ qWarning() << "external pictures are currently not supported";
//FIXME add kio support to libcalendaring or use libcurl
// if ( KIO::NetAccess::download( pic.url(), tmpFile, 0 /*no widget known*/ ) ) {
// img.load( tmpFile );
@@ -861,7 +860,7 @@ DistList fromKABC(const KContacts::ContactGroup &cg)
}
if (cg.contactGroupReferenceCount() > 0) {
- kWarning() << "Tried to save contact group references, which should have been resolved already";
+ qWarning() << "Tried to save contact group references, which should have been resolved already";
}
dl.setMembers(members);
diff --git a/conversion/timezoneconverter.cpp b/conversion/timezoneconverter.cpp
index 7a75a04..9d97b2d 100644
--- a/conversion/timezoneconverter.cpp
+++ b/conversion/timezoneconverter.cpp
@@ -18,7 +18,6 @@
#include "timezoneconverter.h"
#include <ktimezone.h>
#include <ksystemtimezone.h>
-#include <kdebug.h>
#include <QRegExp>
#include <QStringList>
#include "kolabformat/errorhandler.h"
@@ -65,7 +64,7 @@ QString TimezoneConverter::fromCityName(const QString& tz)
QHash<QString, QString> countryMap;
for(;it != zones.constEnd(); it++) {
const QString cityName = it.key().split('/').last();
-// kDebug() << it.key() << it.value().name() << cityName;
+// qDebug() << it.key() << it.value().name() << cityName;
Q_ASSERT(!countryMap.contains(cityName));
countryMap.insert(cityName, it.key());
}
@@ -78,9 +77,9 @@ QString TimezoneConverter::fromCityName(const QString& tz)
++pos;
}
const QString location = locationFinder.capturedTexts().first();
-// kDebug() << "location " << location;
+// qDebug() << "location " << location;
if (countryMap.contains(location)) {
-// kDebug() << "found match " << countryMap.value(location);
+// qDebug() << "found match " << countryMap.value(location);
return countryMap.value(location);
}
}
diff --git a/icalendar/icalendar.cpp b/icalendar/icalendar.cpp
index be7c0e6..1d59f6a 100644
--- a/icalendar/icalendar.cpp
+++ b/icalendar/icalendar.cpp
@@ -29,8 +29,8 @@
#include <kcalcore/icalformat.h>
#include <kmime/kmime_message.h>
// #include <klocalizedstring.h>
-#include <kdebug.h>
#include <iostream>
+#include <QDebug>
namespace Kolab {
@@ -92,7 +92,7 @@ std::string ITipHandler::toITip(const Event &event, ITipHandler::ITipMethod meth
if (m == KCalCore::iTIPNoMethod) {
return std::string();
}
-// kDebug() << event.start().
+// qDebug() << event.start().
/* TODO
* DTSTAMP is created
* CREATED is current timestamp
diff --git a/icalendar/imip.cpp b/icalendar/imip.cpp
index 93183ec..13e0702 100644
--- a/icalendar/imip.cpp
+++ b/icalendar/imip.cpp
@@ -26,7 +26,6 @@
#include <QDebug>
// #include <klocalizedstring.h>
#include <ksystemtimezone.h>
-#include <kdebug.h>
#include <QTime>
/*
* The code in here is copy paste work from kdepim/calendarsupport.
@@ -53,7 +52,7 @@ KMime::Message::Ptr createMessage( const QString &from, const QString &_to,
if ( to.isEmpty() ) {
to = from;
}
- kDebug() << "\nFrom:" << from
+ qDebug() << "\nFrom:" << from
<< "\nTo:" << to
<< "\nCC:" << cc
<< "\nSubject:" << subject << "\nBody: \n" << body
@@ -143,7 +142,7 @@ QByteArray mailAttendees( const KCalCore::IncidenceBase::Ptr &incidence,
{
KCalCore::Attendee::List attendees = incidence->attendees();
if ( attendees.isEmpty() ) {
- kWarning() << "There are no attendees to e-mail";
+ qWarning() << "There are no attendees to e-mail";
return QByteArray();
}
@@ -186,7 +185,7 @@ QByteArray mailAttendees( const KCalCore::IncidenceBase::Ptr &incidence,
}
if( toList.isEmpty() && ccList.isEmpty() ) {
// Not really to be called a groupware meeting, eh
- kWarning() << "There are really no attendees to e-mail";
+ qWarning() << "There are really no attendees to e-mail";
return QByteArray();
}
QString to;
diff --git a/kolabformat/kolabobject.cpp b/kolabformat/kolabobject.cpp
index 75c1cab..60ab81c 100644
--- a/kolabformat/kolabobject.cpp
+++ b/kolabformat/kolabobject.cpp
@@ -350,7 +350,7 @@ ObjectType KolabObjectReader::Private::readKolabV2(const KMime::Message::Ptr &ms
break;
}
if (!mIncidence.isNull()) {
-// kDebug() << "v2 attachments " << attachments.size() << d->mIncidence->attachments().size();
+// qDebug() << "v2 attachments " << attachments.size() << d->mIncidence->attachments().size();
mIncidence->clearAttachments();
Mime::getAttachments(mIncidence, attachments, msg);
if (mIncidence->attachments().size() != attachments.size()) {
@@ -462,7 +462,7 @@ ObjectType KolabObjectReader::Private::readKolabV3(const KMime::Message::Ptr &ms
}
if (!mIncidence.isNull()) {
-// kDebug() << "getting attachments";
+// qDebug() << "getting attachments";
Mime::getAttachmentsById(mIncidence, msg);
}
ErrorHandler::handleLibkolabxmlErrors();
diff --git a/kolabformat/v2helpers.cpp b/kolabformat/v2helpers.cpp
index ad3b7dc..1813ba2 100644
--- a/kolabformat/v2helpers.cpp
+++ b/kolabformat/v2helpers.cpp
@@ -32,8 +32,8 @@
#include <kcontacts/contactgroup.h>
#include <qdom.h>
-#include <kdebug.h>
#include <qbuffer.h>
+#include <QDebug>
#include <akonadi/notes/noteutils.h>
namespace Kolab {
@@ -184,7 +184,7 @@ KMime::Message::Ptr contactToKolabFormat(const KolabV2::Contact& contact, const
KContacts::ContactGroup contactGroupFromKolab(const QByteArray &xmlData)
{
KContacts::ContactGroup contactGroup;
- // kDebug() << "xmlData " << xmlData;
+ // qDebug() << "xmlData " << xmlData;
KolabV2::DistributionList distList(QString::fromUtf8(xmlData));
distList.saveTo(&contactGroup);
return contactGroup;
diff --git a/kolabformatV2/contact.cpp b/kolabformatV2/contact.cpp
index e25bdfb..d125bd1 100644
--- a/kolabformatV2/contact.cpp
+++ b/kolabformatV2/contact.cpp
@@ -33,8 +33,8 @@
#include "contact.h"
#include <kcontacts/addressee.h>
-#include <kdebug.h>
#include <QFile>
+#include <QDebug>
#include <float.h>
using namespace KolabV2;
@@ -397,9 +397,9 @@ bool Contact::loadNameAttribute( QDomElement& element )
setSuffix( e.text() );
else
// TODO: Unhandled tag - save for later storage
- kDebug() <<"Warning: Unhandled tag" << e.tagName();
+ qDebug() <<"Warning: Unhandled tag" << e.tagName();
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
return true;
@@ -435,9 +435,9 @@ bool Contact::loadPhoneAttribute( QDomElement& element )
number.number = e.text();
else
// TODO: Unhandled tag - save for later storage
- kDebug() <<"Warning: Unhandled tag" << e.tagName();
+ qDebug() <<"Warning: Unhandled tag" << e.tagName();
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
addPhoneNumber( number );
@@ -519,9 +519,9 @@ bool Contact::loadAddressAttribute( QDomElement& element )
address.country = e.text();
else
// TODO: Unhandled tag - save for later storage
- kDebug() <<"Warning: Unhandled tag" << e.tagName();
+ qDebug() <<"Warning: Unhandled tag" << e.tagName();
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
addAddress( address );
@@ -780,7 +780,7 @@ bool Contact::loadXML( const QDomDocument& document )
QDomElement e = n.toElement();
if ( !loadAttribute( e ) ) {
// Unhandled tag - save for later storage
- //kDebug() <<"Saving unhandled tag" << e.tagName();
+ //qDebug() <<"Saving unhandled tag" << e.tagName();
Custom c;
c.app = s_unhandledTagAppName;
c.name = e.tagName();
@@ -788,7 +788,7 @@ bool Contact::loadXML( const QDomDocument& document )
mCustomList.append( c );
}
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
return true;
@@ -1052,7 +1052,7 @@ void Contact::setFields( const KContacts::Addressee* addressee )
QString value = name.mid( pos + 1 );
name = name.left( pos );
if ( !knownCustoms.contains( name ) ) {
- //kDebug() <<"app=" << app <<" name=" << name <<" value=" << value;
+ //qDebug() <<"app=" << app <<" name=" << name <<" value=" << value;
Custom c;
if ( app != "KADDRESSBOOK" ) // that's the default
c.app = app;
@@ -1169,7 +1169,7 @@ void Contact::saveTo( KContacts::Addressee* addressee )
QString app = (*it).app.isEmpty() ? QString::fromLatin1( "KADDRESSBOOK" ) : (*it).app;
addressee->insertCustom( app, (*it).name, (*it).value );
}
- //kDebug() << addressee->customs();
+ //qDebug() << addressee->customs();
}
QImage Contact::loadPictureFromAddressee( const KContacts::Picture& picture )
@@ -1177,7 +1177,7 @@ QImage Contact::loadPictureFromAddressee( const KContacts::Picture& picture )
QImage img;
if ( !picture.isIntern() && !picture.url().isEmpty() ) {
QString tmpFile;
- kWarning() << "external pictures are currently not supported";
+ qWarning() << "external pictures are currently not supported";
//FIXME add kio support to libcalendaring or use libcurl
// if ( KIO::NetAccess::download( picture.url(), tmpFile, 0 /*no widget known*/ ) ) {
// img.load( tmpFile );
diff --git a/kolabformatV2/distributionlist.cpp b/kolabformatV2/distributionlist.cpp
index 6f7a3c5..b0c0c40 100644
--- a/kolabformatV2/distributionlist.cpp
+++ b/kolabformatV2/distributionlist.cpp
@@ -33,7 +33,7 @@
#include <kcontacts/addressee.h>
#include <kcontacts/contactgroup.h>
-#include <kdebug.h>
+#include <QDebug>
using namespace KolabV2;
@@ -151,7 +151,7 @@ bool DistributionList::loadXML( const QDomDocument& document )
QDomElement e = n.toElement();
if ( !loadAttribute( e ) ) {
// Unhandled tag - save for later storage
- //kDebug() <<"Saving unhandled tag" << e.tagName();
+ //qDebug() <<"Saving unhandled tag" << e.tagName();
Custom c;
c.app = s_unhandledTagAppName;
c.name = e.tagName();
@@ -159,7 +159,7 @@ bool DistributionList::loadXML( const QDomDocument& document )
mCustomList.append( c );
}
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
return true;
@@ -207,7 +207,7 @@ void DistributionList::setFields( const KContacts::ContactGroup* contactGroup )
mDistrListMembers.append( m );
}
if (contactGroup->contactGroupReferenceCount() > 0) {
- kWarning() << "Tried to save contact group references, which should have been resolved already";
+ qWarning() << "Tried to save contact group references, which should have been resolved already";
}
}
diff --git a/kolabformatV2/event.cpp b/kolabformatV2/event.cpp
index b439f8c..84e32ae 100644
--- a/kolabformatV2/event.cpp
+++ b/kolabformatV2/event.cpp
@@ -34,7 +34,7 @@
#include "event.h"
#include <kcalcore/event.h>
-#include <kdebug.h>
+#include <QDebug>
using namespace KolabV2;
@@ -82,7 +82,7 @@ void Event::setEndDate( const KDateTime& date )
mEndDate = date;
mHasEndDate = true;
if ( mFloatingStatus == AllDay )
- kDebug() <<"ERROR: Time on end date but no time on the event";
+ qDebug() <<"ERROR: Time on end date but no time on the event";
mFloatingStatus = HasTime;
}
@@ -91,7 +91,7 @@ void Event::setEndDate( const QDate& date )
mEndDate = KDateTime( date );
mHasEndDate = true;
if ( mFloatingStatus == HasTime )
- kDebug() <<"ERROR: No time on end date but time on the event";
+ qDebug() <<"ERROR: No time on end date but time on the event";
mFloatingStatus = AllDay;
}
@@ -168,7 +168,7 @@ bool Event::loadXML( const QDomDocument& document )
QDomElement e = n.toElement();
loadAttribute( e );
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
return true;
diff --git a/kolabformatV2/incidence.cpp b/kolabformatV2/incidence.cpp
index 9f0e381..4c184fc 100644
--- a/kolabformatV2/incidence.cpp
+++ b/kolabformatV2/incidence.cpp
@@ -37,10 +37,10 @@
#include <QList>
#include <kcalcore/journal.h>
-#include <kdebug.h>
#include <kurl.h>
#include <QBitArray>
+#include <QDebug>
using namespace KolabV2;
@@ -98,7 +98,7 @@ void Incidence::setStartDate( const KDateTime& startDate )
{
mStartDate = startDate;
if ( mFloatingStatus == AllDay )
- kDebug() <<"ERROR: Time on start date but no time on the event";
+ qDebug() <<"ERROR: Time on start date but no time on the event";
mFloatingStatus = HasTime;
}
@@ -106,7 +106,7 @@ void Incidence::setStartDate( const QDate& startDate )
{
mStartDate = KDateTime( startDate );
if ( mFloatingStatus == HasTime )
- kDebug() <<"ERROR: No time on start date but time on the event";
+ qDebug() <<"ERROR: No time on start date but time on the event";
mFloatingStatus = AllDay;
}
@@ -197,9 +197,9 @@ bool Incidence::loadAttendeeAttribute( QDomElement& element,
attendee.delegator = e.text();
else
// TODO: Unhandled tag - save for later storage
- kDebug() <<"Warning: Unhandled tag" << e.tagName();
+ qDebug() <<"Warning: Unhandled tag" << e.tagName();
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
return true;
@@ -295,7 +295,7 @@ void Incidence::saveAlarms( QDomElement& element ) const
writeString( e, "file", a->audioFile() );
break;
default:
- kWarning() << "Unhandled alarm type:" << a->type();
+ qWarning() << "Unhandled alarm type:" << a->type();
break;
}
}
@@ -360,7 +360,7 @@ void Incidence::loadRecurrence( const QDomElement& element )
mRecurrence.exclusions.append( stringToDate( e.text() ) );
} else
// TODO: Unhandled tag - save for later storage
- kDebug() <<"Warning: Unhandled tag" << e.tagName();
+ qDebug() <<"Warning: Unhandled tag" << e.tagName();
}
}
}
@@ -377,7 +377,7 @@ static void loadAddressesHelper( const QDomElement& element, const KCalCore::Ala
if ( tagName == "address" ) {
a->addMailAddress( KCalCore::Person::fromFullName( e.text() ) );
} else {
- kWarning() << "Unhandled tag" << tagName;
+ qWarning() << "Unhandled tag" << tagName;
}
}
}
@@ -395,7 +395,7 @@ static void loadAttachmentsHelper( const QDomElement& element, const KCalCore::A
if ( tagName == "attachment" ) {
a->addMailAttachment( e.text() );
} else {
- kWarning() << "Unhandled tag" << tagName;
+ qWarning() << "Unhandled tag" << tagName;
}
}
}
@@ -437,7 +437,7 @@ static void loadAlarmHelper( const QDomElement& element, const KCalCore::Alarm::
} else if ( tagName == "enabled" ) {
a->setEnabled( e.text().toInt() != 0 );
} else {
- kWarning() << "Unhandled tag" << tagName;
+ qWarning() << "Unhandled tag" << tagName;
}
}
}
@@ -465,13 +465,13 @@ void Incidence::loadAlarms( const QDomElement& element )
} else if ( type == "audio" ) {
a->setType( KCalCore::Alarm::Audio );
} else {
- kWarning() << "Unhandled alarm type:" << type;
+ qWarning() << "Unhandled alarm type:" << type;
}
loadAlarmHelper( e, a );
mAlarms << a;
} else {
- kWarning() << "Unhandled tag" << tagName;
+ qWarning() << "Unhandled tag" << tagName;
}
}
}
@@ -485,7 +485,7 @@ bool Incidence::loadAttribute( QDomElement& element )
bool ok;
int p = element.text().toInt( &ok );
if ( !ok || p < 1 || p > 9 ) {
- kWarning() << "Invalid \"priority\" value:" << element.text();
+ qWarning() << "Invalid \"priority\" value:" << element.text();
} else {
setPriority( p );
}
@@ -493,7 +493,7 @@ bool Incidence::loadAttribute( QDomElement& element )
bool ok;
int p = element.text().toInt( &ok );
if ( !ok || p < 0 || p > 9 ) {
- kWarning() << "Invalid \"x-kcal-priority\" value:" << element.text();
+ qWarning() << "Invalid \"x-kcal-priority\" value:" << element.text();
} else {
if ( priority() == 0 ) {
setPriority(p);
@@ -538,7 +538,7 @@ bool Incidence::loadAttribute( QDomElement& element )
bool ok = KolabBase::loadAttribute( element );
if ( !ok ) {
// Unhandled tag - save for later storage
- kDebug() <<"Saving unhandled tag" << element.tagName();
+ qDebug() <<"Saving unhandled tag" << element.tagName();
Custom c;
c.key = QByteArray( "X-KDE-KolabUnhandled-" ) + element.tagName().toLatin1();
c.value = element.text();
@@ -957,7 +957,7 @@ void Incidence::saveTo( const KCalCore::Incidence::Ptr &incidence )
recur->addMonthlyPos( mRecurrence.dayNumber.toInt(), daysListToBitArray( mRecurrence.days ) );
} else if ( mRecurrence.type == "daynumber" ) {
recur->addMonthlyDate( mRecurrence.dayNumber.toInt() );
- } else kWarning() <<"Unhandled monthly recurrence type" << mRecurrence.type;
+ } else qWarning() <<"Unhandled monthly recurrence type" << mRecurrence.type;
} else if ( mRecurrence.cycle == "yearly" ) {
recur->setYearly( mRecurrence.interval );
if ( mRecurrence.type == "monthday" ) {
@@ -972,8 +972,8 @@ void Incidence::saveTo( const KCalCore::Incidence::Ptr &incidence )
if ( s_monthName[ i ] == mRecurrence.month )
recur->addYearlyMonth( i+1 );
recur->addYearlyPos( mRecurrence.dayNumber.toInt(), daysListToBitArray( mRecurrence.days ) );
- } else kWarning() <<"Unhandled yearly recurrence type" << mRecurrence.type;
- } else kWarning() <<"Unhandled recurrence cycle" << mRecurrence.cycle;
+ } else qWarning() <<"Unhandled yearly recurrence type" << mRecurrence.type;
+ } else qWarning() <<"Unhandled recurrence cycle" << mRecurrence.cycle;
if ( mRecurrence.rangeType == "number" ) {
recur->setDuration( mRecurrence.range.toInt() );
diff --git a/kolabformatV2/journal.cpp b/kolabformatV2/journal.cpp
index 7568c1f..9d0ca49 100644
--- a/kolabformatV2/journal.cpp
+++ b/kolabformatV2/journal.cpp
@@ -33,8 +33,8 @@
#include "journal.h"
#include "libkolab-version.h"
+#include <QDebug>
-#include <kdebug.h>
using namespace KolabV2;
diff --git a/kolabformatV2/kolabbase.cpp b/kolabformatV2/kolabbase.cpp
index 2d753b5..7cea3a2 100644
--- a/kolabformatV2/kolabbase.cpp
+++ b/kolabformatV2/kolabbase.cpp
@@ -38,7 +38,7 @@
#include <kcalcore/incidence.h>
#include <kcalcore/journal.h>
#include <ksystemtimezone.h>
-#include <kdebug.h>
+#include <QDebug>
using namespace KolabV2;
@@ -102,15 +102,15 @@ void KolabBase::setFields( const KContacts::Addressee* addressee )
// Set creation-time and last-modification-time
const QString creationString = addressee->custom( "KOLAB", "CreationDate" );
- kDebug() <<"Creation time string:" << creationString;
+ qDebug() <<"Creation time string:" << creationString;
KDateTime creationDate;
if ( creationString.isEmpty() ) {
creationDate = KDateTime::currentDateTime(KDateTime::Spec( mTimeZone ) );
- kDebug() <<"Creation date set to current time";
+ qDebug() <<"Creation date set to current time";
}
else {
creationDate = stringToDateTime( creationString );
- kDebug() <<"Creation date loaded";
+ qDebug() <<"Creation date loaded";
}
KDateTime modified = KDateTime( addressee->revision(), mTimeZone );
if ( !modified.isValid() )
@@ -119,7 +119,7 @@ void KolabBase::setFields( const KContacts::Addressee* addressee )
if ( modified < creationDate ) {
// It's not possible that the modification date is earlier than creation
creationDate = modified;
- kDebug() <<"Creation date set to modification date";
+ qDebug() <<"Creation date set to modification date";
}
setCreationDate( creationDate );
const QString newCreationDate = dateTimeToString( creationDate );
@@ -127,7 +127,7 @@ void KolabBase::setFields( const KContacts::Addressee* addressee )
// We modified the creation date, so store it for future reference
const_cast<KContacts::Addressee*>( addressee )
->insertCustom( "KOLAB", "CreationDate", newCreationDate );
- kDebug() <<"Creation date modified. New one:" << newCreationDate;
+ qDebug() <<"Creation date modified. New one:" << newCreationDate;
}
switch( addressee->secrecy().type() ) {
@@ -176,14 +176,14 @@ void KolabBase::setFields( const KContacts::ContactGroup* contactGroup )
// Set creation-time and last-modification-time
KDateTime creationDate = KDateTime::currentDateTime( KDateTime::Spec( mTimeZone ) );
- kDebug() <<"Creation date set to current time";
+ qDebug() <<"Creation date set to current time";
KDateTime modified = KDateTime::currentUtcDateTime();
setLastModified( modified );
if ( modified < creationDate ) {
// It's not possible that the modification date is earlier than creation
creationDate = modified;
- kDebug() <<"Creation date set to modification date";
+ qDebug() <<"Creation date set to modification date";
}
setCreationDate( creationDate );
}
@@ -300,9 +300,9 @@ bool KolabBase::loadEmailAttribute( QDomElement& element, Email& email )
email.smtpAddress = e.text();
else
// TODO: Unhandled tag - save for later storage
- kDebug() <<"Warning: Unhandled tag" << e.tagName();
+ qDebug() <<"Warning: Unhandled tag" << e.tagName();
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
return true;
diff --git a/kolabformatV2/task.cpp b/kolabformatV2/task.cpp
index 80a2df3..4e751de 100644
--- a/kolabformatV2/task.cpp
+++ b/kolabformatV2/task.cpp
@@ -34,7 +34,7 @@
#include "task.h"
#include <kcalcore/todo.h>
-#include <kdebug.h>
+#include <QDebug>
using namespace KolabV2;
@@ -269,9 +269,9 @@ bool Task::loadXML( const QDomDocument& document )
QDomElement e = n.toElement();
if ( !loadAttribute( e ) )
// TODO: Unhandled tag - save for later storage
- kDebug() <<"Warning: Unhandled tag" << e.tagName();
+ qDebug() <<"Warning: Unhandled tag" << e.tagName();
} else
- kDebug() <<"Node is not a comment or an element???";
+ qDebug() <<"Node is not a comment or an element???";
}
return true;
diff --git a/mime/mimeutils.cpp b/mime/mimeutils.cpp
index f5de18e..27e0e9c 100644
--- a/mime/mimeutils.cpp
+++ b/mime/mimeutils.cpp
@@ -19,7 +19,6 @@
#include <quuid.h>
#include <QtCore/qfile.h>
#include <qdom.h>
-#include <kdebug.h>
#include <kcontacts/addressee.h>
#include "kolabformat/kolabdefinitions.h"
#include "kolabformat/errorhandler.h"
@@ -65,7 +64,7 @@ KMime::Content* findContentById(const KMime::Message::Ptr &data, const QByteArra
}
Q_ASSERT(!data->contents().isEmpty());
Q_FOREACH(KMime::Content *c, data->contents()) {
-// kDebug() << "searching: " << c->contentID()->identifier();
+// qDebug() << "searching: " << c->contentID()->identifier();
if ( c->contentID()->identifier() == id ) {
type = c->contentType()->mimeType();
name = c->contentType()->name();
@@ -250,8 +249,8 @@ void getAttachments(KCalCore::Incidence::Ptr incidence, const QStringList &attac
Error() << "Invalid incidence";
return;
}
-// kDebug() << "getting " << attachments.size() << "attachments";
-// kDebug() << mimeData->encodedContent();
+// qDebug() << "getting " << attachments.size() << "attachments";
+// qDebug() << mimeData->encodedContent();
foreach (const QString &name, attachments) {
QByteArray type;
KMime::Content *content = findContentByName(mimeData, name, type);
@@ -274,8 +273,8 @@ void getAttachmentsById(KCalCore::Incidence::Ptr incidence, const KMime::Message
Error() << "Invalid incidence";
return;
}
-// kDebug() << "getting " << attachments.size() << "attachments";
-// kDebug() << mimeData->encodedContent();
+// qDebug() << "getting " << attachments.size() << "attachments";
+// qDebug() << mimeData->encodedContent();
foreach(KCalCore::Attachment::Ptr attachment, incidence->attachments()) {
Debug() << attachment->uri();
diff --git a/tests/benchmark.cpp b/tests/benchmark.cpp
index 28bf8d7..fca9b2c 100644
--- a/tests/benchmark.cpp
+++ b/tests/benchmark.cpp
@@ -20,7 +20,6 @@
#include "conversion/kcalconversion.h"
#include <kmime/kmime_message.h>
#include <kolabformat.h>
-#include <kdebug.h>
#include "testutils.h"
KMime::Message::Ptr readMimeFile( const QString &fileName )
diff --git a/tests/formattest.cpp b/tests/formattest.cpp
index 05689a5..3d80d08 100644
--- a/tests/formattest.cpp
+++ b/tests/formattest.cpp
@@ -23,7 +23,6 @@
#include <qprocess.h>
#include <qtemporaryfile.h>
#include <QBuffer>
-#include <kdebug.h>
#include <ksystemtimezone.h>
#include <kolabcontainers.h>
#include <kolabformat.h>
@@ -428,14 +427,14 @@ void FormatTest::generateMimefile()
// KContacts::VCardConverter converter;
// const KContacts::Addressee realAddressee = converter.parseVCard( vcardFile.readAll() );
//
-// kDebug() << realAddressee.photo().data();
+// qDebug() << realAddressee.photo().data();
//
// QString result;
// QTextStream s(&result);
// Kolab::overrideTimestamp(Kolab::cDateTime(2012, 5, 5, 5,5,5, true));
// Kolab::KolabObjectWriter::writeContact(realAddressee, Kolab::KolabV3)->toStream(s);
-// kDebug() << result;
+// qDebug() << result;
}
void FormatTest::generateVCard()
diff --git a/tests/kolabobjecttest.cpp b/tests/kolabobjecttest.cpp
index 5840760..f650a76 100644
--- a/tests/kolabobjecttest.cpp
+++ b/tests/kolabobjecttest.cpp
@@ -20,7 +20,6 @@
#include <QTest>
#include "kolabformat/kolabobject.h"
-#include <kdebug.h>
#include <kolabformat/errorhandler.h>
void KolabObjectTest::preserveLatin1()
@@ -31,7 +30,7 @@ void KolabObjectTest::preserveLatin1()
QCOMPARE(event->summary(), summary);
//std::cout << event->summary().toStdString() << std::endl;
KMime::Message::Ptr msg = Kolab::KolabObjectWriter::writeEvent(event);
-// kDebug() << msg->encodedContent();
+// qDebug() << msg->encodedContent();
KCalCore::Event::Ptr readEvent = Kolab::KolabObjectReader(msg).getEvent();
QVERIFY(readEvent);
// std::cout << readEvent->summary().toStdString() << std::endl;
@@ -46,7 +45,7 @@ void KolabObjectTest::preserveUnicode()
QCOMPARE(event->summary(), summary);
// std::cout << event->summary().toStdString() << std::endl;
KMime::Message::Ptr msg = Kolab::KolabObjectWriter::writeEvent(event);
-// kDebug() << msg->encodedContent();
+// qDebug() << msg->encodedContent();
KCalCore::Event::Ptr readEvent = Kolab::KolabObjectReader(msg).getEvent();
QVERIFY(readEvent);
// std::cout << readEvent->summary().toStdString() << std::endl;
diff --git a/tests/testutils.h b/tests/testutils.h
index 6be04fd..c6f5418 100644
--- a/tests/testutils.h
+++ b/tests/testutils.h
@@ -21,7 +21,6 @@
#include <qtemporaryfile.h>
#include <qprocess.h>
#include <quuid.h>
-#include <kdebug.h>
#include <kolabevent.h>
#include <kmime/kmime_message.h>
@@ -51,11 +50,11 @@ QString getPath(const char *file) {
void showDiff(const QString &expected, const QString &converted)
{
if (expected.isEmpty() || converted.isEmpty()) {
- kWarning() << "files are emtpy";
+ qWarning() << "files are emtpy";
return;
}
if (expected == converted) {
- kWarning() << "contents are the same";
+ qWarning() << "contents are the same";
return;
}
// QTemporaryFile expectedFile("expectedFile");
@@ -67,7 +66,7 @@ void showDiff(const QString &expected, const QString &converted)
// convertedFile.close();
// QProcess::execute("kompare", QStringList() << "-c" << expectedFile.fileName() << convertedFile.fileName());
// } else {
- // kWarning() << "files are not open";
+ // qWarning() << "files are not open";
// }
qDebug() << "EXPECTED: " << expected;
@@ -80,7 +79,7 @@ KMime::Message::Ptr readMimeFile( const QString &fileName, bool &ok)
QFile file( fileName );
ok = file.open( QFile::ReadOnly );
if (!ok) {
- kWarning() << "failed to open file: " << fileName;
+ qWarning() << "failed to open file: " << fileName;
return KMime::Message::Ptr();
}
const QByteArray data = file.readAll();
@@ -163,9 +162,9 @@ bool normalizePhoneNumbers( KContacts::Addressee &addressee, KContacts::Addresse
refAddressee.insertPhoneNumber( refPhoneNumber );
}
// for ( int i = 0; i < phoneNumbers.size(); ++i ) {
-// kDebug() << "--------------------------------------";
-// kDebug() << addressee.phoneNumbers().at(i).toString();
-// kDebug() << refAddressee.phoneNumbers().at(i).toString();
+// qDebug() << "--------------------------------------";
+// qDebug() << addressee.phoneNumbers().at(i).toString();
+// qDebug() << refAddressee.phoneNumbers().at(i).toString();
// }
return true;
diff --git a/tests/timezonetest.cpp b/tests/timezonetest.cpp
index 5f60083..3188f46 100644
--- a/tests/timezonetest.cpp
+++ b/tests/timezonetest.cpp
@@ -26,7 +26,6 @@
// #include <unicode/uversion.h>
// #include <unicode/timezone.h>
// #include <iostream>
-#include <kdebug.h>
#include <kcalcore/event.h>
#include <kcalcore/icalformat.h>
#include <ksystemtimezone.h>
@@ -95,7 +94,7 @@ void TimezoneTest::testFromHardcodedList()
TimezoneConverter converter;
QFETCH(QString, timezone);
const QString tz = converter.normalizeTimezone(timezone);
- kDebug() << tz;
+ qDebug() << tz;
QVERIFY(!tz.isEmpty());
QVERIFY(tz != timezone);
}
@@ -108,7 +107,7 @@ void TimezoneTest::testKolabObjectWriter()
KMime::Message::Ptr msg = Kolab::KolabObjectWriter::writeEvent(event);
Kolab::KolabObjectReader reader(msg);
KCalCore::Event::Ptr result = reader.getEvent();
- kDebug() << result->dtStart().timeZone().name();
+ qDebug() << result->dtStart().timeZone().name();
QCOMPARE(result->dtStart().timeZone().name(), KTimeZone(QLatin1String("Africa/Lagos")).name());
}
@@ -130,7 +129,7 @@ void TimezoneTest::testKolabObjectWriter()
// QCOMPARE(Kolab::ErrorHandler::instance().error(), Kolab::ErrorHandler::Debug);
//
// KCalCore::Incidence::Ptr convertedIncidence = reader.getIncidence();
-// kDebug() << "read incidence";
+// qDebug() << "read incidence";
//
// //Parse ICalFile for comparison
// QFile icalFile( icalFileName );
@@ -159,7 +158,7 @@ void TimezoneTest::testKolabObjectWriter()
void TimezoneTest::testFindLegacyTimezone()
{
const QString normalized = TimezoneConverter::normalizeTimezone("US/Pacific");
- kDebug() << normalized;
+ qDebug() << normalized;
QEXPECT_FAIL("", "Currently broken", Continue);
QVERIFY(!normalized.isEmpty());
}
@@ -167,7 +166,7 @@ void TimezoneTest::testFindLegacyTimezone()
void TimezoneTest::testIgnoreInvalidTimezone()
{
const QString normalized = TimezoneConverter::normalizeTimezone("FOOOOBAR");
- kDebug() << normalized;
+ qDebug() << normalized;
QVERIFY(normalized.isEmpty());
}
@@ -205,7 +204,7 @@ void TimezoneTest::localTimezone()
{
KDateTime dt(QDate(2013, 10, 10), QTime(2, 0, 0), KTimeZone("/etc/localzone"));
const Kolab::cDateTime result = Kolab::Conversion::fromDate(dt);
- kDebug() << result.timezone();
+ qDebug() << result.timezone();
QVERIFY(result.timezone().empty());
QVERIFY(!Kolab::ErrorHandler::instance().errorOccured());
}
diff --git a/tests/upgradetest.cpp b/tests/upgradetest.cpp
index f32985e..fc017c3 100644
--- a/tests/upgradetest.cpp
+++ b/tests/upgradetest.cpp
@@ -81,7 +81,7 @@ void UpgradeTest::testIncidence()
//write KCalCore V3
KMime::Message::Ptr v3message = Kolab::KolabObjectWriter::writeIncidence(v2result, Kolab::KolabV3);
QVERIFY(Kolab::error() == Kolab::NoError);
-// kDebug() << v3message->encodedContent();
+// qDebug() << v3message->encodedContent();
//load KCalCore V3
Kolab::KolabObjectReader reader2;
QCOMPARE(reader2.parseMimeMessage(v3message), type);
@@ -90,7 +90,7 @@ void UpgradeTest::testIncidence()
normalizeIncidence(v2result);
//We have to override the last modified time with a specific value, so we normalize the input to the same
normalizeIncidence(v3result);
- kDebug() <<"--------------------------------------------------------";
+ qDebug() <<"--------------------------------------------------------";
KCalCore::ICalFormat format;
const QString v2 = format.toString( v2result );
const QString v3 = format.toString( v3result );
@@ -102,7 +102,7 @@ void UpgradeTest::testIncidence()
QVERIFY(!v2.isEmpty());
QVERIFY(!v3.isEmpty());
QCOMPARE(v2, v3);
- kDebug() <<"--------------------------------------------------------";
+ qDebug() <<"--------------------------------------------------------";
// if (v2result->type() == KCalCore::IncidenceBase::TypeTodo) {
// KCalCore::Todo::Ptr t1 = v2result.dynamicCast<KCalCore::Todo>();