48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
|
commit 0d3760b646d15e66f43a6a48546eae11cbf84497
|
||
|
Author: Kevin Ottens <ervin@kde.org>
|
||
|
Date: Sun Aug 25 15:38:49 2019 +0200
|
||
|
|
||
|
Make it build both with pre and post 19.08.0 KCalCore
|
||
|
|
||
|
Summary:
|
||
|
Obviously this assumes a compiler supporting __has_include in C++14
|
||
|
mode, but that should be the case in most target platforms nowadays.
|
||
|
Beside this is hopefully temporary measure.
|
||
|
|
||
|
Reviewers: dfaure
|
||
|
|
||
|
Differential Revision: https://phabricator.kde.org/D23443
|
||
|
|
||
|
diff --git a/src/akonadi/akonadiserializer.cpp b/src/akonadi/akonadiserializer.cpp
|
||
|
index 8cb60ff..593712b 100644
|
||
|
--- a/src/akonadi/akonadiserializer.cpp
|
||
|
+++ b/src/akonadi/akonadiserializer.cpp
|
||
|
@@ -30,7 +30,11 @@
|
||
|
#include <AkonadiCore/Item>
|
||
|
#include <Akonadi/Notes/NoteUtils>
|
||
|
#include <KCalCore/Todo>
|
||
|
+#if __has_include(<kcalcore_version.h>)
|
||
|
#include <kcalcore_version.h>
|
||
|
+#else
|
||
|
+#include <kcalendarcore_version.h>
|
||
|
+#endif
|
||
|
#include <KMime/Message>
|
||
|
#include <QMimeDatabase>
|
||
|
#if KCALCORE_VERSION < QT_VERSION_CHECK(5, 6, 80)
|
||
|
diff --git a/tests/units/akonadi/akonadiserializertest.cpp b/tests/units/akonadi/akonadiserializertest.cpp
|
||
|
index e380baf..936f02c 100644
|
||
|
--- a/tests/units/akonadi/akonadiserializertest.cpp
|
||
|
+++ b/tests/units/akonadi/akonadiserializertest.cpp
|
||
|
@@ -34,7 +34,11 @@
|
||
|
#include <Akonadi/Notes/NoteUtils>
|
||
|
#include <AkonadiCore/Tag>
|
||
|
#include <KCalCore/Todo>
|
||
|
+#if __has_include(<kcalcore_version.h>)
|
||
|
#include <kcalcore_version.h>
|
||
|
+#else
|
||
|
+#include <kcalendarcore_version.h>
|
||
|
+#endif
|
||
|
#include <KMime/Message>
|
||
|
|
||
|
Q_DECLARE_METATYPE(Akonadi::Item*)
|