3 commits - CMakeLists.txt tests/testfiles tests/testhelpers.h

Christian Mollekopf mollekopf at kolabsys.com
Wed Oct 2 10:59:07 CEST 2013


 CMakeLists.txt                      |    4 +++-
 tests/testfiles/v2/task/complex.ics |    1 -
 tests/testhelpers.h                 |   22 ++++++++++++++++++++++
 3 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit dfa3f1bedb4927fa7b9bd5a97497ec7b6ca2a868
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Wed Oct 2 10:45:13 2013 +0200

    Duration serializer for debugging.

diff --git a/tests/testhelpers.h b/tests/testhelpers.h
index 546bc30..f0e3889 100644
--- a/tests/testhelpers.h
+++ b/tests/testhelpers.h
@@ -312,6 +312,21 @@ namespace QTest {
         return qstrdup(ba.data());
     }
 
+    template<>
+    char *toString(const Kolab::Duration &p)
+    {
+        QByteArray ba = "Kolab::Duration";
+        ba += p.isNegative() ? "-": "+";
+        ba += "(";
+        ba += QString::number(p.weeks())+ ", ";
+        ba += QString::number(p.days())+ ", ";
+        ba += QString::number(p.hours())+ ", ";
+        ba += QString::number(p.minutes())+ ", ";
+        ba += QString::number(p.seconds());
+        ba += ")";
+        return qstrdup(ba.data());
+    }
+
 }
 
 #endif


commit 12bbe54305986dcd80d6ce037879d368b8052354
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Wed Oct 2 10:45:00 2013 +0200

    kolabv2 doesn't support RECURRENCE-ID

diff --git a/tests/testfiles/v2/task/complex.ics b/tests/testfiles/v2/task/complex.ics
index 0188830..82e879e 100644
--- a/tests/testfiles/v2/task/complex.ics
+++ b/tests/testfiles/v2/task/complex.ics
@@ -39,7 +39,6 @@ ATTACH;VALUE=BINARY;FMTTYPE=image/png;ENCODING=BASE64;X-LABEL=akonadi.png:
 DUE;TZID=Europe/Berlin:20090908T160000
 DTSTART;TZID=Europe/Berlin:20090901T160000
 PERCENT-COMPLETE:50
-RECURRENCE-ID;TZID=Europe/Berlin:20090908T160000
 BEGIN:VALARM
 DESCRIPTION:
 ACTION:DISPLAY


commit a3b5b0e970dabf0578fcf442e52abf1e9bad6b66
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Tue Oct 1 15:02:38 2013 +0200

    Do not declare the metatype with recent kdepimlibs as it has been defined there now.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae6c684..6f24001 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,8 +73,10 @@ find_package(SWIG)
 #Show summary of found libraries
 macro_display_feature_log()
 
-# add_definitions(-DKDEPIMLIBS_VERSION=0x${KdepimLibs_VERSION_MAJOR}0${KdepimLibs_VERSION_MINOR}${KDEPIMLIBS_VERSION_PATCH})
 # add_definitions( -DKDEPIMLIBS_VERSION=((${KdepimLibs_VERSION_MAJOR}<<16)|(${KdepimLibs_VERSION_MINOR}<<8)|(${KDEPIMLIBS_VERSION_PATCH})) )
+add_definitions( -DKDEPIMLIBS_VERSION_MAJOR=${KdepimLibs_VERSION_MAJOR} )
+add_definitions( -DKDEPIMLIBS_VERSION_MINOR=${KdepimLibs_VERSION_MINOR} )
+add_definitions( -DKDEPIMLIBS_VERSION_PATCH=${KdepimLibs_VERSION_PATCH} )
 
 if("${KdepimLibs_VERSION}" VERSION_GREATER "4.8.40" OR USE_LIBCALENDARING)
     add_definitions(-DKDEPIMLIBS_VERSION_DEVEL)
diff --git a/tests/testhelpers.h b/tests/testhelpers.h
index 84a2e46..546bc30 100644
--- a/tests/testhelpers.h
+++ b/tests/testhelpers.h
@@ -44,7 +44,14 @@ Q_DECLARE_METATYPE(std::vector<Kolab::FreebusyPeriod>);
 Q_DECLARE_METATYPE(KCalCore::Event);
 Q_DECLARE_METATYPE(KCalCore::Todo);
 Q_DECLARE_METATYPE(KCalCore::Journal);
+
+#if KDEPIMLIBS_VERSION_MAJOR <= 4
+#if KDEPIMLIBS_VERSION_MINOR <= 11
+#if KDEPIMLIBS_VERSION_PATCH < 52
 Q_DECLARE_METATYPE(KCalCore::Duration);
+#endif
+#endif
+#endif
 
 namespace QTest {
     




More information about the commits mailing list