summaryrefslogtreecommitdiff
path: root/app-text/kjots/files/kjots-5.1.0-akonadi-21.12.0.patch
blob: 3f0c4e52779bfe7a3b9f9dcedd7986be45475042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
From 581548a1de9449efc0c77e9ac85c23066bac983e Mon Sep 17 00:00:00 2001
From: "Friedrich W. H. Kossebau" <kossebau@kde.org>
Date: Wed, 8 Sep 2021 00:58:25 +0200
Subject: [PATCH] Adapt to new Akonadi libraries includes using the C++
 namespace as prefix

GIT_SILENT
---
 src/kjotsedit.cpp                            |  5 +++++
 src/kjotsmodel.cpp                           |  6 ++++++
 src/kjotsmodel.h                             |  6 ++++++
 src/kjotswidget.cpp                          | 20 +++++++++++++++++++-
 src/kjotswidget.h                            |  5 +++++
 src/noteshared/notecreatorandselector.cpp    |  7 +++++++
 src/noteshared/notecreatorandselector.h      |  6 ++++++
 src/noteshared/notelockattribute.h           |  6 ++++++
 src/noteshared/notepinattribute.h            |  6 ++++++
 src/noteshared/standardnoteactionmanager.cpp |  8 ++++++++
 src/noteshared/standardnoteactionmanager.h   |  9 +++++++--
 src/notesortproxymodel.cpp                   |  5 +++++
 12 files changed, 86 insertions(+), 3 deletions(-)

diff --git a/src/kjotsedit.cpp b/src/kjotsedit.cpp
index f1d61bd..c20bc42 100644
--- a/src/kjotsedit.cpp
+++ b/src/kjotsedit.cpp
@@ -33,7 +33,12 @@
 #include <KPIMTextEdit/RichTextComposerActions>
 #include <KPIMTextEdit/RichTextComposerImages>
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/Item>
+#else
 #include <AkonadiCore/Item>
+#endif
 
 #include "kjotslinkdialog.h"
 #include "kjotsmodel.h"
diff --git a/src/kjotsmodel.cpp b/src/kjotsmodel.cpp
index e35c94f..99ee14f 100644
--- a/src/kjotsmodel.cpp
+++ b/src/kjotsmodel.cpp
@@ -13,8 +13,14 @@
 #include <QTextDocument>
 #include <QIcon>
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/ChangeRecorder>
+#include <Akonadi/EntityDisplayAttribute>
+#else
 #include <AkonadiCore/ChangeRecorder>
 #include <AkonadiCore/EntityDisplayAttribute>
+#endif
 #include <Akonadi/Notes/NoteUtils>
 
 #include <KMime/Message>
diff --git a/src/kjotsmodel.h b/src/kjotsmodel.h
index 71e0ca6..ec564a7 100644
--- a/src/kjotsmodel.h
+++ b/src/kjotsmodel.h
@@ -10,7 +10,13 @@
 #ifndef KJOTSMODEL_H
 #define KJOTSMODEL_H
 
+#include <akonadi_version.h>
+#include <QtGlobal> // for QT_VERSION_CHECK
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/EntityTreeModel>
+#else
 #include <AkonadiCore/EntityTreeModel>
+#endif
 
 class QTextDocument;
 
diff --git a/src/kjotswidget.cpp b/src/kjotswidget.cpp
index 3a3abd0..834fc33 100644
--- a/src/kjotswidget.cpp
+++ b/src/kjotswidget.cpp
@@ -35,6 +35,24 @@
 
 // Akonadi
 #include <Akonadi/Notes/NoteUtils>
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/AttributeFactory>
+#include <Akonadi/CollectionCreateJob>
+#include <Akonadi/CollectionDeleteJob>
+#include <Akonadi/ChangeRecorder>
+#include <Akonadi/EntityDisplayAttribute>
+#include <Akonadi/EntityMimeTypeFilterModel>
+#include <Akonadi/Item>
+#include <Akonadi/ItemCreateJob>
+#include <Akonadi/ItemModifyJob>
+#include <Akonadi/ItemDeleteJob>
+#include <Akonadi/ItemFetchScope>
+#include <Akonadi/EntityOrderProxyModel>
+#include <Akonadi/EntityTreeView>
+#include <Akonadi/ETMViewStateSaver>
+#include <Akonadi/ControlGui>
+#else
 #include <AkonadiCore/AttributeFactory>
 #include <AkonadiCore/CollectionCreateJob>
 #include <AkonadiCore/CollectionDeleteJob>
@@ -50,7 +68,7 @@
 #include <AkonadiWidgets/EntityTreeView>
 #include <AkonadiWidgets/ETMViewStateSaver>
 #include <AkonadiWidgets/ControlGui>
-
+#endif
 // Grantlee
 #include <grantlee/template.h>
 #include <grantlee/engine.h>
diff --git a/src/kjotswidget.h b/src/kjotswidget.h
index 7fe91ed..00a41b5 100644
--- a/src/kjotswidget.h
+++ b/src/kjotswidget.h
@@ -18,7 +18,12 @@
 #include <QAbstractItemDelegate>
 #include <QPrinter>
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/Collection>
+#else
 #include <AkonadiCore/Collection>
+#endif
 
 #include <grantlee/templateloader.h>
 
diff --git a/src/noteshared/notecreatorandselector.cpp b/src/noteshared/notecreatorandselector.cpp
index 2172cbf..6d58c83 100644
--- a/src/noteshared/notecreatorandselector.cpp
+++ b/src/noteshared/notecreatorandselector.cpp
@@ -14,9 +14,16 @@
 
 #include <KMime/Message>
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/EntityDisplayAttribute>
+#include <Akonadi/EntityTreeModel>
+#include <Akonadi/ItemCreateJob>
+#else
 #include <AkonadiCore/EntityDisplayAttribute>
 #include <AkonadiCore/EntityTreeModel>
 #include <AkonadiCore/ItemCreateJob>
+#endif
 #include <Akonadi/Notes/NoteUtils>
 
 #include "noteshared_debug.h"
diff --git a/src/noteshared/notecreatorandselector.h b/src/noteshared/notecreatorandselector.h
index 90055cf..986d042 100644
--- a/src/noteshared/notecreatorandselector.h
+++ b/src/noteshared/notecreatorandselector.h
@@ -14,8 +14,14 @@
 #include <QItemSelectionModel>
 #include <QTimer>
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/Collection>
+#include <Akonadi/Item>
+#else
 #include <AkonadiCore/Collection>
 #include <AkonadiCore/Item>
+#endif
 
 class KJob;
 
diff --git a/src/noteshared/notelockattribute.h b/src/noteshared/notelockattribute.h
index 9bdd8a2..b0ee819 100644
--- a/src/noteshared/notelockattribute.h
+++ b/src/noteshared/notelockattribute.h
@@ -11,7 +11,13 @@
 #ifndef KJOTS_LOCK_ATTRIBUTE_H
 #define KJOTS_LOCK_ATTRIBUTE_H
 
+#include <akonadi_version.h>
+#include <QtGlobal> // for QT_VERSION_CHECK
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/Attribute>
+#else
 #include <AkonadiCore/Attribute>
+#endif
 
 namespace NoteShared
 {
diff --git a/src/noteshared/notepinattribute.h b/src/noteshared/notepinattribute.h
index 3026dea..5f3903c 100644
--- a/src/noteshared/notepinattribute.h
+++ b/src/noteshared/notepinattribute.h
@@ -9,7 +9,13 @@
 #ifndef NOTE_PIN_ATTRIBUTE_H
 #define NOTE_PIN_ATTRIBUTE_H
 
+#include <akonadi_version.h>
+#include <QtGlobal> // for QT_VERSION_CHECK
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/Attribute>
+#else
 #include <AkonadiCore/Attribute>
+#endif
 
 namespace NoteShared
 {
diff --git a/src/noteshared/standardnoteactionmanager.cpp b/src/noteshared/standardnoteactionmanager.cpp
index a3f4b8b..2a2f4ce 100644
--- a/src/noteshared/standardnoteactionmanager.cpp
+++ b/src/noteshared/standardnoteactionmanager.cpp
@@ -13,10 +13,18 @@
 #include <QColorDialog>
 #include <QItemSelectionModel>
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/EntityDisplayAttribute>
+#include <Akonadi/EntityTreeModel>
+#include <Akonadi/CollectionModifyJob>
+#include <Akonadi/ItemModifyJob>
+#else
 #include <AkonadiCore/EntityDisplayAttribute>
 #include <AkonadiCore/EntityTreeModel>
 #include <AkonadiCore/CollectionModifyJob>
 #include <AkonadiCore/ItemModifyJob>
+#endif
 #include <Akonadi/Notes/NoteUtils>
 
 #include <KXmlGui/KActionCollection>
diff --git a/src/noteshared/standardnoteactionmanager.h b/src/noteshared/standardnoteactionmanager.h
index fe80dae..6605820 100644
--- a/src/noteshared/standardnoteactionmanager.h
+++ b/src/noteshared/standardnoteactionmanager.h
@@ -10,10 +10,15 @@
 #ifndef AKONADI_STANDARDNOTESACTIONMANAGER_H
 #define AKONADI_STANDARDNOTESACTIONMANAGER_H
 
-#include <AkonadiWidgets/StandardActionManager>
-
 #include <QObject>
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/StandardActionManager>
+#else
+#include <AkonadiWidgets/StandardActionManager>
+#endif
+
 class QAction;
 class KActionCollection;
 class QItemSelectionModel;
diff --git a/src/notesortproxymodel.cpp b/src/notesortproxymodel.cpp
index 89def1c..dbe582f 100644
--- a/src/notesortproxymodel.cpp
+++ b/src/notesortproxymodel.cpp
@@ -8,7 +8,12 @@
 
 #include "notesortproxymodel.h"
 
+#include <akonadi_version.h>
+#if AKONADI_VERSION >= QT_VERSION_CHECK(5, 18, 41)
+#include <Akonadi/EntityTreeModel>
+#else
 #include <AkonadiCore/EntityTreeModel>
+#endif
 
 #include "noteshared/notepinattribute.h"
 
-- 
GitLab