1 |
dilfridge 12/08/01 22:45:45 |
2 |
|
3 |
Added: |
4 |
0002-Implement-readOnly-for-Akonadi-kresources.patch |
5 |
0001-Less-warnings-when-building-against-a-new-kdepimlibs.patch |
6 |
Log: |
7 |
Add upstream bugfixes |
8 |
|
9 |
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.1 kde-base/kdepim-runtime/files/4.4/0002-Implement-readOnly-for-Akonadi-kresources.patch |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdepim-runtime/files/4.4/0002-Implement-readOnly-for-Akonadi-kresources.patch?rev=1.1&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdepim-runtime/files/4.4/0002-Implement-readOnly-for-Akonadi-kresources.patch?rev=1.1&content-type=text/plain |
16 |
|
17 |
Index: 0002-Implement-readOnly-for-Akonadi-kresources.patch |
18 |
=================================================================== |
19 |
From 8f85db2a32cab4bad987b2100424fbaf42f6ed26 Mon Sep 17 00:00:00 2001 |
20 |
From: Thomas McGuire <mcguire@×××.org> |
21 |
Date: Mon, 25 Apr 2011 00:50:43 +0100 |
22 |
Subject: [PATCH 2/2] Implement readOnly() for Akonadi kresources. |
23 |
|
24 |
Now it doesn't ask me if I want to save in my local calendar |
25 |
or in my Facebook folder anymore, since only the local calendar |
26 |
is writeable. |
27 |
|
28 |
REVIEW: 101229 |
29 |
--- |
30 |
kresources/kabc/resourceakonadi.cpp | 5 +++++ |
31 |
kresources/kabc/resourceakonadi.h | 2 ++ |
32 |
kresources/kcal/resourceakonadi.cpp | 5 +++++ |
33 |
kresources/kcal/resourceakonadi.h | 2 ++ |
34 |
kresources/shared/sharedresourceprivate.h | 5 +++++ |
35 |
kresources/shared/subresourcemodel.h | 13 +++++++++++++ |
36 |
6 files changed, 32 insertions(+) |
37 |
|
38 |
diff --git a/kresources/kabc/resourceakonadi.cpp b/kresources/kabc/resourceakonadi.cpp |
39 |
index d2ea349..39edf6e 100644 |
40 |
--- a/kresources/kabc/resourceakonadi.cpp |
41 |
+++ b/kresources/kabc/resourceakonadi.cpp |
42 |
@@ -249,5 +249,10 @@ void ResourceAkonadi::setSubresourceCompletionWeight( const QString &subResource |
43 |
} |
44 |
} |
45 |
|
46 |
+bool ResourceAkonadi::readOnly() const |
47 |
+{ |
48 |
+ return d->isReadOnly(); |
49 |
+} |
50 |
+ |
51 |
#include "resourceakonadi.moc" |
52 |
// kate: space-indent on; indent-width 2; replace-tabs on; |
53 |
diff --git a/kresources/kabc/resourceakonadi.h b/kresources/kabc/resourceakonadi.h |
54 |
index f2075a4..747a0c1 100644 |
55 |
--- a/kresources/kabc/resourceakonadi.h |
56 |
+++ b/kresources/kabc/resourceakonadi.h |
57 |
@@ -73,6 +73,8 @@ class ResourceAkonadi : public ResourceABC, public SharedResourceIface |
58 |
virtual QStringList subresources() const; |
59 |
virtual QMap<QString, QString> uidToResourceMap() const; |
60 |
|
61 |
+ virtual bool readOnly() const; |
62 |
+ |
63 |
StoreConfigIface &storeConfig(); |
64 |
|
65 |
public Q_SLOTS: |
66 |
diff --git a/kresources/kcal/resourceakonadi.cpp b/kresources/kcal/resourceakonadi.cpp |
67 |
index d2c9415..9552ffa 100644 |
68 |
--- a/kresources/kcal/resourceakonadi.cpp |
69 |
+++ b/kresources/kcal/resourceakonadi.cpp |
70 |
@@ -432,6 +432,11 @@ void ResourceAkonadi::doClose() |
71 |
d->doClose(); |
72 |
} |
73 |
|
74 |
+bool ResourceAkonadi::readOnly() const |
75 |
+{ |
76 |
+ return d->isReadOnly(); |
77 |
+} |
78 |
+ |
79 |
#include "resourceakonadi.moc" |
80 |
|
81 |
// kate: space-indent on; indent-width 2; replace-tabs on; |
82 |
diff --git a/kresources/kcal/resourceakonadi.h b/kresources/kcal/resourceakonadi.h |
83 |
index a220616..f7ee77d 100644 |
84 |
--- a/kresources/kcal/resourceakonadi.h |
85 |
+++ b/kresources/kcal/resourceakonadi.h |
86 |
@@ -140,6 +140,8 @@ class ResourceAkonadi : public ResourceCalendar, public SharedResourceIface |
87 |
|
88 |
virtual QString infoText() const; |
89 |
|
90 |
+ virtual bool readOnly() const; |
91 |
+ |
92 |
protected: |
93 |
virtual bool doLoad( bool syncCache ); |
94 |
|
95 |
diff --git a/kresources/shared/sharedresourceprivate.h b/kresources/shared/sharedresourceprivate.h |
96 |
index 8019204..ea551d5 100644 |
97 |
--- a/kresources/shared/sharedresourceprivate.h |
98 |
+++ b/kresources/shared/sharedresourceprivate.h |
99 |
@@ -68,6 +68,11 @@ class SharedResourcePrivate : public ResourcePrivateBase |
100 |
return mModel.subResource( id ); |
101 |
} |
102 |
|
103 |
+ bool isReadOnly() const |
104 |
+ { |
105 |
+ return !mModel.hasWritableSubResource(); |
106 |
+ } |
107 |
+ |
108 |
protected: |
109 |
SubResourceModelClass mModel; |
110 |
|
111 |
diff --git a/kresources/shared/subresourcemodel.h b/kresources/shared/subresourcemodel.h |
112 |
index b6f4dc2..956a0ff 100644 |
113 |
--- a/kresources/shared/subresourcemodel.h |
114 |
+++ b/kresources/shared/subresourcemodel.h |
115 |
@@ -97,6 +97,19 @@ class SubResourceModel : public AbstractSubResourceModel |
116 |
return result; |
117 |
} |
118 |
|
119 |
+ bool hasWritableSubResource() const |
120 |
+ { |
121 |
+ Akonadi::MimeTypeChecker mimeChecker; |
122 |
+ mimeChecker.setWantedMimeTypes( SubResourceClass::supportedMimeTypes() ); |
123 |
+ |
124 |
+ foreach ( const SubResourceClass *subResource, mSubResourcesByColId ) { |
125 |
+ if ( subResource->isWritable() && mimeChecker.isWantedCollection( subResource->collection() ) ) { |
126 |
+ return true; |
127 |
+ } |
128 |
+ } |
129 |
+ return false; |
130 |
+ } |
131 |
+ |
132 |
SubResourceClass *findSubResourceForMappedItem( const QString &kresId ) const |
133 |
{ |
134 |
foreach ( SubResourceClass *subResource, mSubResourcesByColId ) { |
135 |
-- |
136 |
1.7.9.2 |
137 |
|
138 |
|
139 |
|
140 |
|
141 |
1.1 kde-base/kdepim-runtime/files/4.4/0001-Less-warnings-when-building-against-a-new-kdepimlibs.patch |
142 |
|
143 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdepim-runtime/files/4.4/0001-Less-warnings-when-building-against-a-new-kdepimlibs.patch?rev=1.1&view=markup |
144 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kdepim-runtime/files/4.4/0001-Less-warnings-when-building-against-a-new-kdepimlibs.patch?rev=1.1&content-type=text/plain |
145 |
|
146 |
Index: 0001-Less-warnings-when-building-against-a-new-kdepimlibs.patch |
147 |
=================================================================== |
148 |
From ab29b74fe8ec830c6d4c896900939c98d22c0e96 Mon Sep 17 00:00:00 2001 |
149 |
From: Thomas McGuire <mcguire@×××.org> |
150 |
Date: Mon, 25 Apr 2011 00:36:43 +0100 |
151 |
Subject: [PATCH 1/2] Less warnings when building against a new kdepimlibs. |
152 |
|
153 |
--- |
154 |
kresources/CMakeLists.txt | 3 +++ |
155 |
1 file changed, 3 insertions(+) |
156 |
|
157 |
diff --git a/kresources/CMakeLists.txt b/kresources/CMakeLists.txt |
158 |
index 9fd1b37..a746796 100644 |
159 |
--- a/kresources/CMakeLists.txt |
160 |
+++ b/kresources/CMakeLists.txt |
161 |
@@ -1,4 +1,7 @@ |
162 |
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) |
163 |
+add_definitions(-DWANT_DEPRECATED_KCAL_API) |
164 |
+add_definitions(-DWANT_DEPRECATED_KABC_API) |
165 |
+add_definitions(-DWANT_DEPRECATED_KRESOURCE_API) |
166 |
include_directories (${kdepim-runtime_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES} ${QT_QTDBUS_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/shared) |
167 |
|
168 |
# include (ConfigureChecks.cmake) |
169 |
-- |
170 |
1.7.9.2 |