Merge lp:~yofel/kubuntu-packaging/kdelibs-active-4.7 into lp:~kubuntu-packagers/kubuntu-packaging/kdelibs
- kdelibs-active-4.7
- Merge into kdelibs
Proposed by
Philip Muškovac
Status: | Merged |
---|---|
Merged at revision: | 371 |
Proposed branch: | lp:~yofel/kubuntu-packaging/kdelibs-active-4.7 |
Merge into: | lp:~kubuntu-packagers/kubuntu-packaging/kdelibs |
Diff against target: |
3852 lines (+3678/-15) 19 files modified
debian/changelog (+8/-1) debian/control (+26/-0) debian/kdelibs5-dev.install (+13/-0) debian/libkactivities5.install (+2/-0) debian/libkdeclarative5.install (+2/-0) debian/libnepomukquery4a.symbols (+4/-1) debian/not-installed (+0/-13) debian/patches/kubuntu_mobile_a-new-packagestructure-type-genericcomponent.diff (+62/-0) debian/patches/kubuntu_mobile_add-a-findqtmobility.cmake-file.diff (+149/-0) debian/patches/kubuntu_mobile_correctly-concatenate-the-patch.diff (+26/-0) debian/patches/kubuntu_mobile_document-the-findqtmobility.cmake-file-a-bit-more.diff (+79/-0) debian/patches/kubuntu_mobile_fix-resolution-of-paths-w-only-a-packageroot-name.diff (+74/-0) debian/patches/kubuntu_mobile_openreason-accessreason.diff (+120/-0) debian/patches/kubuntu_mobile_ported-the-new-libkactivities.diff (+2710/-0) debian/patches/kubuntu_mobile_remoe-the-static-hash-of-packagestructure.diff (+80/-0) debian/patches/kubuntu_mobile_serviceavailabilitchanged-bool-signal.diff (+100/-0) debian/patches/kubuntu_mobile_style-fixes.diff (+188/-0) debian/patches/kubuntu_mobile_use-plsmoidpackage-for-generic-packages-too.diff (+24/-0) debian/patches/series (+11/-0) |
To merge this branch: | bzr merge lp:~yofel/kubuntu-packaging/kdelibs-active-4.7 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kubuntu Packagers | Pending | ||
Review via email: mp+71555@code.launchpad.net |
Commit message
Description of the change
Fixed version of the mobile branch from rbelem.
To post a comment you must log in.
- 374. By Philip Muškovac
-
fix changelog
- 375. By Philip Muškovac
-
description fix
- 376. By Philip Muškovac
-
explain that libkactivities and libkdeclarative are experimental
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2011-08-05 11:38:47 +0000 |
3 | +++ debian/changelog 2011-08-15 15:42:29 +0000 |
4 | @@ -1,9 +1,16 @@ |
5 | kde4libs (4:4.7.0-0ubuntu3) UNRELEASED; urgency=low |
6 | |
7 | + [ Felix Geyer ] |
8 | * Build-dep on libjpeg-dev again now that libjpeg8-dev no longer provides it. |
9 | * Refresh symbols. |
10 | |
11 | - -- Felix Geyer <debfx-pkg@fobos.de> Wed, 03 Aug 2011 15:54:41 +0200 |
12 | + [ Rodrigo Belem ] |
13 | + * Added plasma-active upstream patches |
14 | + * Added entries in debian/control for libkdeclarative and libkactivities |
15 | + * Added kspell_aspell plugins to install files |
16 | + * Added FindQtMobility to install files |
17 | + |
18 | + -- Rodrigo Belem <rclbelem@gmail.com> Sun, 07 Aug 2011 09:11:47 -0400 |
19 | |
20 | kde4libs (4:4.7.0-0ubuntu2) oneiric; urgency=low |
21 | |
22 | |
23 | === modified file 'debian/control' |
24 | --- debian/control 2011-08-03 13:56:19 +0000 |
25 | +++ debian/control 2011-08-15 15:42:29 +0000 |
26 | @@ -23,6 +23,32 @@ |
27 | Vcs-Browser: http://bazaar.launchpad.net/~kubuntu-packagers/kubuntu-packaging/kdelibs |
28 | Vcs-Bzr: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/kdelibs |
29 | |
30 | +Package: libkactivities5 |
31 | +Architecture: any |
32 | +Depends: ${shlibs:Depends}, ${misc:Depends} |
33 | +Replaces: kdelibs5 (<< 4:4.4.60) |
34 | +Breaks: kdelibs5 (<< 4:4.4.60) |
35 | +Description: Activities library |
36 | + This library provides functionality for managing Activities. |
37 | + . |
38 | + This package contains experimental software and should not be used in |
39 | + production environment |
40 | + . |
41 | + This package is part of the KDE Development Platform libraries module. |
42 | + |
43 | +Package: libkdeclarative5 |
44 | +Architecture: any |
45 | +Depends: ${shlibs:Depends}, ${misc:Depends} |
46 | +Replaces: kdelibs5 (<< 4:4.4.60) |
47 | +Breaks: kdelibs5 (<< 4:4.4.60) |
48 | +Description: Declarative library for plasma |
49 | + This library provides plasma bindings for Qt Quick |
50 | + . |
51 | + This package contains experimental software and should not be used in |
52 | + production environment |
53 | + . |
54 | + This package is part of the KDE Development Platform libraries module. |
55 | + |
56 | Package: libkdecore5 |
57 | Architecture: any |
58 | Depends: ${shlibs:Depends}, ${misc:Depends} |
59 | |
60 | === modified file 'debian/kdelibs5-dev.install' |
61 | --- debian/kdelibs5-dev.install 2011-06-24 12:31:08 +0000 |
62 | +++ debian/kdelibs5-dev.install 2011-08-15 15:42:29 +0000 |
63 | @@ -2,6 +2,14 @@ |
64 | usr/bin/kconfig_compiler |
65 | usr/bin/kunittestmodrunner |
66 | usr/bin/makekdewidgets |
67 | +usr/include/kactivities/consumer.h |
68 | +usr/include/kactivities/controller.h |
69 | +usr/include/kactivities/info.h |
70 | +usr/include/kactivities/resourceinstance.h |
71 | +usr/include/KDE/Activities/Consumer |
72 | +usr/include/KDE/Activities/Controller |
73 | +usr/include/KDE/Activities/Info |
74 | +usr/include/KDE/Activities/ResourceInstance |
75 | usr/include/KDE/ConversionCheck/QVconvertible |
76 | usr/include/KDE/ConversionCheck/type_toQString |
77 | usr/include/KDE/ConversionCheck/type_toQVariant |
78 | @@ -1172,6 +1180,8 @@ |
79 | usr/include/kde_terminal_interface.h |
80 | usr/include/kde_terminal_interface_v2.h |
81 | usr/include/kdebug.h |
82 | +usr/include/kdeclarative.h |
83 | +usr/include/kdeclarative_export.h |
84 | usr/include/kdecore_export.h |
85 | usr/include/kdedmodule.h |
86 | usr/include/kdefakes.h |
87 | @@ -1883,8 +1893,10 @@ |
88 | usr/include/threadweaver/threadweaver_export.h |
89 | usr/lib/kde4/libexec/kauth-policy-gen |
90 | usr/lib/kde4/plugins/script/libkrossqtsplugin.so |
91 | +usr/lib/libkactivities.so |
92 | usr/lib/libkcmutils.so |
93 | usr/lib/libkde3support.so |
94 | +usr/lib/libkdeclarative.so |
95 | usr/lib/libkdecore.so |
96 | usr/lib/libkdefakes.so |
97 | usr/lib/libkdesu.so |
98 | @@ -2032,6 +2044,7 @@ |
99 | usr/share/kde4/apps/cmake/modules/FindQCA2.cmake |
100 | usr/share/kde4/apps/cmake/modules/FindQImageBlitz.cmake |
101 | usr/share/kde4/apps/cmake/modules/FindQt4.cmake |
102 | +usr/share/kde4/apps/cmake/modules/FindQtMobility.cmake |
103 | usr/share/kde4/apps/cmake/modules/FindRUBY.cmake |
104 | usr/share/kde4/apps/cmake/modules/FindSIP.cmake |
105 | usr/share/kde4/apps/cmake/modules/FindSIP.py |
106 | |
107 | === added file 'debian/libkactivities5.install' |
108 | --- debian/libkactivities5.install 1970-01-01 00:00:00 +0000 |
109 | +++ debian/libkactivities5.install 2011-08-15 15:42:29 +0000 |
110 | @@ -0,0 +1,2 @@ |
111 | +usr/lib/libkactivities.so.5 |
112 | +usr/lib/libkactivities.so.5.7.0 |
113 | |
114 | === added file 'debian/libkdeclarative5.install' |
115 | --- debian/libkdeclarative5.install 1970-01-01 00:00:00 +0000 |
116 | +++ debian/libkdeclarative5.install 2011-08-15 15:42:29 +0000 |
117 | @@ -0,0 +1,2 @@ |
118 | +usr/lib/libkdeclarative.so.5 |
119 | +usr/lib/libkdeclarative.so.5.7.0 |
120 | |
121 | === modified file 'debian/libnepomukquery4a.symbols' |
122 | --- debian/libnepomukquery4a.symbols 2011-05-29 14:18:14 +0000 |
123 | +++ debian/libnepomukquery4a.symbols 2011-08-15 15:42:29 +0000 |
124 | @@ -1,4 +1,4 @@ |
125 | -# SymbolsHelper-Confirmed: 4:4.5.86 amd64 |
126 | +# SymbolsHelper-Confirmed: 4:4.7.0-0ubuntu3 i386 |
127 | libnepomukquery.so.4 libnepomukquery4a #MINVER# |
128 | * Build-Depends-Package: kdelibs5-dev |
129 | _ZN7Nepomuk5Query10SimpleTerm10setSubTermERKNS0_4TermE@Base 4:4.4.0 |
130 | @@ -87,12 +87,15 @@ |
131 | _ZN7Nepomuk5Query18QueryServiceClient16syncDesktopQueryERK7QStringPb@Base 4:4.4.95 |
132 | _ZN7Nepomuk5Query18QueryServiceClient19blockingSparqlQueryERK7QStringRK5QHashIS2_NS_5Types8PropertyEE@Base 4:4.4.0 |
133 | _ZN7Nepomuk5Query18QueryServiceClient20blockingDesktopQueryERK7QString@Base 4:4.4.0 |
134 | + _ZN7Nepomuk5Query18QueryServiceClient26serviceAvailabilityChangedEb@Base 4:4.7.0-0ubuntu3 |
135 | _ZN7Nepomuk5Query18QueryServiceClient5closeEv@Base 4:4.4.0 |
136 | _ZN7Nepomuk5Query18QueryServiceClient5errorERK7QString@Base 4:4.5.86 |
137 | _ZN7Nepomuk5Query18QueryServiceClient5queryERKNS0_5QueryE@Base 4:4.4.0 |
138 | _ZN7Nepomuk5Query18QueryServiceClient7Private17_k_entriesRemovedERK11QStringList@Base 4:4.4.0 |
139 | _ZN7Nepomuk5Query18QueryServiceClient7Private18_k_finishedListingEv@Base 4:4.4.0 |
140 | _ZN7Nepomuk5Query18QueryServiceClient7Private19_k_handleQueryReplyEP23QDBusPendingCallWatcher@Base 4:4.5.86 |
141 | + _ZN7Nepomuk5Query18QueryServiceClient7Private20_k_serviceRegisteredERK7QString@Base 4:4.7.0-0ubuntu3 |
142 | + _ZN7Nepomuk5Query18QueryServiceClient7Private22_k_serviceUnregisteredERK7QString@Base 4:4.7.0-0ubuntu3 |
143 | _ZN7Nepomuk5Query18QueryServiceClient9syncQueryERKNS0_5QueryEPb@Base 4:4.4.95 |
144 | _ZN7Nepomuk5Query18QueryServiceClientC1EP7QObject@Base 4:4.4.0 |
145 | _ZN7Nepomuk5Query18QueryServiceClientC2EP7QObject@Base 4:4.4.0 |
146 | |
147 | === modified file 'debian/not-installed' |
148 | --- debian/not-installed 2011-06-11 01:55:07 +0000 |
149 | +++ debian/not-installed 2011-08-15 15:42:29 +0000 |
150 | @@ -23,16 +23,3 @@ |
151 | |
152 | # KUBUNTU: in pkg-kde-tools |
153 | ./usr/bin/preparetips |
154 | - |
155 | -# experimental |
156 | -./usr/include/kdeclarative.h |
157 | -./usr/include/kdeclarative_export.h |
158 | -./usr/lib/libkdeclarative.so |
159 | -./usr/lib/libkdeclarative.so.5 |
160 | -./usr/lib/libkdeclarative.so.5.7.0 |
161 | -./usr/include/kactivityconsumer.h |
162 | -./usr/include/kactivitycontroller.h |
163 | -./usr/include/kactivityinfo.h |
164 | -./usr/lib/libkactivities.so |
165 | -./usr/lib/libkactivities.so.5 |
166 | -./usr/lib/libkactivities.so.5.7.0 |
167 | |
168 | === added file 'debian/patches/kubuntu_mobile_a-new-packagestructure-type-genericcomponent.diff' |
169 | --- debian/patches/kubuntu_mobile_a-new-packagestructure-type-genericcomponent.diff 1970-01-01 00:00:00 +0000 |
170 | +++ debian/patches/kubuntu_mobile_a-new-packagestructure-type-genericcomponent.diff 2011-08-15 15:42:29 +0000 |
171 | @@ -0,0 +1,62 @@ |
172 | +From 09e306c0175d3b07b16683da180dfde72f9c4260 Mon Sep 17 00:00:00 2001 |
173 | +From: Marco Martin <notmart@gmail.com> |
174 | +Date: Wed, 13 Jul 2011 20:32:25 +0200 |
175 | +Subject: [PATCH 02/11] a new PackageStructure type: GenericComponent |
176 | + |
177 | +this component will be used for loading generic repositories of files, |
178 | +usually will be repositories of QML files |
179 | +--- |
180 | + plasma/package.cpp | 6 +++++- |
181 | + plasma/packagestructure.cpp | 4 ++++ |
182 | + plasma/plasma.h | 3 ++- |
183 | + 3 files changed, 11 insertions(+), 2 deletions(-) |
184 | + |
185 | +diff --git a/plasma/package.cpp b/plasma/package.cpp |
186 | +index 1ff0380..3473571 100644 |
187 | +--- a/plasma/package.cpp |
188 | ++++ b/plasma/package.cpp |
189 | +@@ -757,7 +757,11 @@ PackagePrivate::PackagePrivate(const PackageStructure::Ptr st, const QString &p) |
190 | + service(0) |
191 | + { |
192 | + if (structure) { |
193 | +- structure->setPath(p); |
194 | ++ if (p.isEmpty()) { |
195 | ++ structure->setPath(structure->defaultPackageRoot()); |
196 | ++ } else { |
197 | ++ structure->setPath(p); |
198 | ++ } |
199 | + } |
200 | + |
201 | + valid = structure && !structure->path().isEmpty(); |
202 | +diff --git a/plasma/packagestructure.cpp b/plasma/packagestructure.cpp |
203 | +index 4fb78c3..8bfb124 100644 |
204 | +--- a/plasma/packagestructure.cpp |
205 | ++++ b/plasma/packagestructure.cpp |
206 | +@@ -145,6 +145,10 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) |
207 | + } else if (packageFormat == "Plasma/Theme") { |
208 | + structure = Theme::packageStructure(); |
209 | + structure->d->type = "Plasma/Theme"; |
210 | ++ } else if (packageFormat == "Plasma/Generic") { |
211 | ++ structure = defaultPackageStructure(GenericComponent); |
212 | ++ structure->d->type = "Plasma/Generic"; |
213 | ++ structure->setDefaultPackageRoot(KStandardDirs::locate("data", "plasmapackages")); |
214 | + } |
215 | + |
216 | + if (structure) { |
217 | +diff --git a/plasma/plasma.h b/plasma/plasma.h |
218 | +index d6b9f8b..e4a1c7b 100644 |
219 | +--- a/plasma/plasma.h |
220 | ++++ b/plasma/plasma.h |
221 | +@@ -234,7 +234,8 @@ enum ComponentType { |
222 | + RunnerComponent = 4, /**< Plasma::AbstractRunner based plugsin **/ |
223 | + AnimatorComponent = 8, /**< Plasma::Animator based plugins **/ |
224 | + ContainmentComponent = 16,/**< Plasma::Containment based plugins **/ |
225 | +- WallpaperComponent = 32 /**< Plasma::Wallpaper based plugins **/ |
226 | ++ WallpaperComponent = 32, /**< Plasma::Wallpaper based plugins **/ |
227 | ++ GenericComponent = 64 /** Generic repositories of files, usually they keep QML files and their assets **/ |
228 | + }; |
229 | + Q_DECLARE_FLAGS(ComponentTypes, ComponentType) |
230 | + |
231 | +-- |
232 | +1.7.5.4 |
233 | + |
234 | |
235 | === added file 'debian/patches/kubuntu_mobile_add-a-findqtmobility.cmake-file.diff' |
236 | --- debian/patches/kubuntu_mobile_add-a-findqtmobility.cmake-file.diff 1970-01-01 00:00:00 +0000 |
237 | +++ debian/patches/kubuntu_mobile_add-a-findqtmobility.cmake-file.diff 2011-08-15 15:42:29 +0000 |
238 | @@ -0,0 +1,149 @@ |
239 | +From b8a825a6c8783ab6f96c4ebc8436cc9f08ac76ff Mon Sep 17 00:00:00 2001 |
240 | +From: Arjen Hiemstra <ahiemstra@heimr.nl> |
241 | +Date: Tue, 21 Jun 2011 13:43:53 +0200 |
242 | +Subject: [PATCH 09/11] Add a FindQtMobility.cmake file. |
243 | + |
244 | +This file can be used to find QtMobility related include files and |
245 | +libraries. |
246 | +--- |
247 | + cmake/modules-tests/QtMobility/CMakeLists.txt | 5 + |
248 | + cmake/modules/CMakeLists.txt | 1 + |
249 | + cmake/modules/FindQtMobility.cmake | 102 +++++++++++++++++++++++++ |
250 | + 3 files changed, 108 insertions(+), 0 deletions(-) |
251 | + create mode 100644 cmake/modules-tests/QtMobility/CMakeLists.txt |
252 | + create mode 100644 cmake/modules/FindQtMobility.cmake |
253 | + |
254 | +diff --git a/cmake/modules-tests/QtMobility/CMakeLists.txt b/cmake/modules-tests/QtMobility/CMakeLists.txt |
255 | +new file mode 100644 |
256 | +index 0000000..3aa5216 |
257 | +--- /dev/null |
258 | ++++ b/cmake/modules-tests/QtMobility/CMakeLists.txt |
259 | +@@ -0,0 +1,5 @@ |
260 | ++include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") |
261 | ++ |
262 | ++set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) |
263 | ++ |
264 | ++test_find_package(QtMobility QTMOBILITY INCLUDE_DIR INCLUDE_DIRS LIBRARIES) |
265 | +diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt |
266 | +index 65379db..5dad740 100644 |
267 | +--- a/cmake/modules/CMakeLists.txt |
268 | ++++ b/cmake/modules/CMakeLists.txt |
269 | +@@ -106,6 +106,7 @@ set(cmakeFiles CheckCXXSourceCompiles.cmake |
270 | + FindQCA2.cmake |
271 | + FindQImageBlitz.cmake |
272 | + FindQt4.cmake |
273 | ++ FindQtMobility.cmake |
274 | + FindRUBY.cmake |
275 | + FindSIP.cmake |
276 | + FindSamba.cmake |
277 | +diff --git a/cmake/modules/FindQtMobility.cmake b/cmake/modules/FindQtMobility.cmake |
278 | +new file mode 100644 |
279 | +index 0000000..b47fad2 |
280 | +--- /dev/null |
281 | ++++ b/cmake/modules/FindQtMobility.cmake |
282 | +@@ -0,0 +1,102 @@ |
283 | ++# - Try to find the QtMobility libraries |
284 | ++# |
285 | ++# This module will search for the QtMobility libraries. |
286 | ++# |
287 | ++# It supports both a minimum version and searching for individual |
288 | ++# components. For the minimum version, use |
289 | ++# find_package(QtMobility 1.2.0). For specific components, use |
290 | ++# find_package(QtMobility COMPONENTS ...). See below for a list of known |
291 | ++# components. |
292 | ++# |
293 | ++# Once done this will define |
294 | ++# QTMOBILITY_FOUND - QtMobility and all specified components were found. |
295 | ++# QTMOBILITY_INCLUDE_DIR - Include directory for global QtMobility files. |
296 | ++# QTMOBILITY_INCLUDE_DIRS - All found QtMobility components' include dirs. |
297 | ++# QTMOBILITY_LIBRARIES - All found QtMobility components' libraries. |
298 | ++# QTMOBILITY_VERSION - The version of QtMobility that was found. |
299 | ++# |
300 | ++# For each found component the following will be defined: |
301 | ++# QTMOBILITY_{COMPONENT}_INCLUDE_DIR - The include directory for the component. |
302 | ++# QTMOBILITY_{COMPONENT}_LIBRARY - The location of the library for the component. |
303 | ++# |
304 | ++# Note that searching for components will be limited to the specified components |
305 | ++# if the components option is used. |
306 | ++# |
307 | ++# Copyright (c) 2011 Arjen Hiemstra <ahiemstra@heimr.nl> |
308 | ++# Redistribution and use is allowed according to the terms of the BSD license. |
309 | ++ |
310 | ++set(QTMOBILITY_COMPONENTS |
311 | ++ Bearer |
312 | ++ Connectivity |
313 | ++ Contacts |
314 | ++ Feedback |
315 | ++ Gallery |
316 | ++ Location |
317 | ++ Messaging |
318 | ++ MultimediaKit |
319 | ++ Organizer |
320 | ++ PublishSubscribe |
321 | ++ Sensors |
322 | ++ ServiceFramework |
323 | ++ SystemInfo |
324 | ++ Versit |
325 | ++) |
326 | ++ |
327 | ++if (QtMobility_FIND_COMPONENTS) |
328 | ++ foreach (component ${QtMobility_FIND_COMPONENTS}) |
329 | ++ string(TOUPPER ${component} _COMPONENT) |
330 | ++ set(QTMOBILITY_USE_${_COMPONENT} 1) |
331 | ++ endforeach (component) |
332 | ++endif (QtMobility_FIND_COMPONENTS) |
333 | ++ |
334 | ++find_path(QTMOBILITY_INCLUDE_DIR qmobilityglobal.h PATH_SUFFIXES QtMobility) |
335 | ++ |
336 | ++#Find the mobility version |
337 | ++if(QTMOBILITY_INCLUDE_DIR) |
338 | ++ file(READ "${QTMOBILITY_INCLUDE_DIR}/qmobilityglobal.h" _qtmobility_global_header LIMIT 2000) |
339 | ++ string(REGEX MATCH "#define QTM_VERSION_STR \"([0-9.]*)\"" _qtmobility_version_match "${_qtmobility_global_header}") |
340 | ++ set(QTMOBILITY_VERSION "${CMAKE_MATCH_1}") |
341 | ++ message(STATUS "QtMobility Version ${QTMOBILITY_VERSION} detected") |
342 | ++endif(QTMOBILITY_INCLUDE_DIR) |
343 | ++ |
344 | ++set(QTMOBILITY_VARIABLES "QTMOBILITY_INCLUDE_DIR") |
345 | ++set(QTMOBILITY_INCLUDE_DIRS ${QTMOBILITY_INCLUDE_DIR}) |
346 | ++ |
347 | ++#A list of files to find for specific components |
348 | ++set(QTMOBILITY_FIND_FILES |
349 | ++ QNetworkConfiguration #Bearer |
350 | ++ QBluetoothSocket #Connectivity |
351 | ++ QContact #Contacts |
352 | ++ QFeedbackInterface #Feedback |
353 | ++ QAbstractGallery #Gallery |
354 | ++ QLandmark #Location |
355 | ++ QMessage #Messaging |
356 | ++ QMediaPlayer #MultimediaKit |
357 | ++ QOrganizerItem #Organizer |
358 | ++ QValueSpace #PublishSubscribe |
359 | ++ QSensor #Sensors |
360 | ++ QService #ServiceFramework |
361 | ++ QSystemInfo #SystemInfo |
362 | ++ QVersitDocument #Versit |
363 | ++) |
364 | ++ |
365 | ++list(LENGTH QTMOBILITY_COMPONENTS _component_count) |
366 | ++math(EXPR _component_count "${_component_count} - 1") |
367 | ++foreach (index RANGE ${_component_count}) |
368 | ++ list(GET QTMOBILITY_COMPONENTS ${index} component) |
369 | ++ list(GET QTMOBILITY_FIND_FILES ${index} file) |
370 | ++ string(TOUPPER ${component} _COMPONENT) |
371 | ++ if (NOT QtMobility_FIND_COMPONENTS OR QTMOBILITY_USE_${_COMPONENT}) |
372 | ++ message(STATUS "Looking for QtMobility Component \"${component}\"") |
373 | ++ find_path(QTMOBILITY_${_COMPONENT}_INCLUDE_DIR ${file} PATH_SUFFIXES Qt${component}) |
374 | ++ find_library(QTMOBILITY_${_COMPONENT}_LIBRARY NAMES Qt${component}) |
375 | ++ list(APPEND QTMOBILITY_VARIABLES "QTMOBILITY_${_COMPONENT}_INCLUDE_DIR" "QTMOBILITY_${_COMPONENT}_LIBRARY") |
376 | ++ list(APPEND QTMOBILITY_INCLUDE_DIRS ${QTMOBILITY_${_COMPONENT}_INCLUDE_DIR}) |
377 | ++ list(APPEND QTMOBILITY_LIBRARIES ${QTMOBILITY_${_COMPONENT}_LIBRARY}) |
378 | ++ endif (NOT QtMobility_FIND_COMPONENTS OR QTMOBILITY_USE_${_COMPONENT}) |
379 | ++endforeach (index) |
380 | ++ |
381 | ++include(FindPackageHandleStandardArgs) |
382 | ++find_package_handle_standard_args(QtMobility REQUIRED_VARS ${QTMOBILITY_VARIABLES} VERSION_VAR QTMOBILITY_VERSION) |
383 | ++ |
384 | ++mark_as_advanced(${QTMOBILITY_VARIABLES}) |
385 | +-- |
386 | +1.7.5.4 |
387 | + |
388 | |
389 | === added file 'debian/patches/kubuntu_mobile_correctly-concatenate-the-patch.diff' |
390 | --- debian/patches/kubuntu_mobile_correctly-concatenate-the-patch.diff 1970-01-01 00:00:00 +0000 |
391 | +++ debian/patches/kubuntu_mobile_correctly-concatenate-the-patch.diff 2011-08-15 15:42:29 +0000 |
392 | @@ -0,0 +1,26 @@ |
393 | +From d4ca27b1e4e9374f8e89b7dedaf36aff729488d0 Mon Sep 17 00:00:00 2001 |
394 | +From: Marco Martin <notmart@gmail.com> |
395 | +Date: Sun, 17 Jul 2011 12:46:17 +0200 |
396 | +Subject: [PATCH 07/11] correctly concatenate the path. |
397 | + |
398 | +package is valid again (and passes plasmoidpackagetest) |
399 | +--- |
400 | + plasma/package.cpp | 2 +- |
401 | + 1 files changed, 1 insertions(+), 1 deletions(-) |
402 | + |
403 | +diff --git a/plasma/package.cpp b/plasma/package.cpp |
404 | +index e24fa17..4c00d36 100644 |
405 | +--- a/plasma/package.cpp |
406 | ++++ b/plasma/package.cpp |
407 | +@@ -775,7 +775,7 @@ PackagePrivate::PackagePrivate(const PackageStructure::Ptr st, const QString &pa |
408 | + if (packageRoot.isEmpty()) { |
409 | + structure->setPath(structure->defaultPackageRoot()%"/"%path); |
410 | + } else { |
411 | +- structure->setPath(packageRoot%path); |
412 | ++ structure->setPath(packageRoot%"/"%path); |
413 | + } |
414 | + } |
415 | + |
416 | +-- |
417 | +1.7.5.4 |
418 | + |
419 | |
420 | === added file 'debian/patches/kubuntu_mobile_document-the-findqtmobility.cmake-file-a-bit-more.diff' |
421 | --- debian/patches/kubuntu_mobile_document-the-findqtmobility.cmake-file-a-bit-more.diff 1970-01-01 00:00:00 +0000 |
422 | +++ debian/patches/kubuntu_mobile_document-the-findqtmobility.cmake-file-a-bit-more.diff 2011-08-15 15:42:29 +0000 |
423 | @@ -0,0 +1,79 @@ |
424 | +From 7b856b6dfc4e2dd4de4b6d4560b65c8cda77f6b9 Mon Sep 17 00:00:00 2001 |
425 | +From: Arjen Hiemstra <ahiemstra@heimr.nl> |
426 | +Date: Tue, 21 Jun 2011 14:00:17 +0200 |
427 | +Subject: [PATCH 10/11] Document the FindQtMobility.cmake file a bit more and |
428 | + remove some superfluous message lines. |
429 | + |
430 | +--- |
431 | + cmake/modules/FindQtMobility.cmake | 20 ++++++++++++++++---- |
432 | + 1 files changed, 16 insertions(+), 4 deletions(-) |
433 | + |
434 | +diff --git a/cmake/modules/FindQtMobility.cmake b/cmake/modules/FindQtMobility.cmake |
435 | +index b47fad2..33c0f64 100644 |
436 | +--- a/cmake/modules/FindQtMobility.cmake |
437 | ++++ b/cmake/modules/FindQtMobility.cmake |
438 | +@@ -42,6 +42,7 @@ set(QTMOBILITY_COMPONENTS |
439 | + Versit |
440 | + ) |
441 | + |
442 | ++#Enable searching for specific components if requested |
443 | + if (QtMobility_FIND_COMPONENTS) |
444 | + foreach (component ${QtMobility_FIND_COMPONENTS}) |
445 | + string(TOUPPER ${component} _COMPONENT) |
446 | +@@ -49,20 +50,28 @@ if (QtMobility_FIND_COMPONENTS) |
447 | + endforeach (component) |
448 | + endif (QtMobility_FIND_COMPONENTS) |
449 | + |
450 | ++#QtMobility uses one single global include file that should always be available. |
451 | + find_path(QTMOBILITY_INCLUDE_DIR qmobilityglobal.h PATH_SUFFIXES QtMobility) |
452 | + |
453 | +-#Find the mobility version |
454 | ++# Find the mobility version |
455 | + if(QTMOBILITY_INCLUDE_DIR) |
456 | + file(READ "${QTMOBILITY_INCLUDE_DIR}/qmobilityglobal.h" _qtmobility_global_header LIMIT 2000) |
457 | + string(REGEX MATCH "#define QTM_VERSION_STR \"([0-9.]*)\"" _qtmobility_version_match "${_qtmobility_global_header}") |
458 | + set(QTMOBILITY_VERSION "${CMAKE_MATCH_1}") |
459 | +- message(STATUS "QtMobility Version ${QTMOBILITY_VERSION} detected") |
460 | + endif(QTMOBILITY_INCLUDE_DIR) |
461 | + |
462 | ++#This variable holds which variables should be checked to find out whether |
463 | ++#QtMobility was found. |
464 | + set(QTMOBILITY_VARIABLES "QTMOBILITY_INCLUDE_DIR") |
465 | ++ |
466 | ++#The Global QtMobility directory is always needed. |
467 | + set(QTMOBILITY_INCLUDE_DIRS ${QTMOBILITY_INCLUDE_DIR}) |
468 | + |
469 | +-#A list of files to find for specific components |
470 | ++#A list of files to find for specific components. |
471 | ++#Unfortunately, the individual modules do not have a global include file, |
472 | ++#so instead we resort to this manual list of files to check. At least the |
473 | ++#libraries are named the same as their respective component, so we do not |
474 | ++#need yet another list. |
475 | + set(QTMOBILITY_FIND_FILES |
476 | + QNetworkConfiguration #Bearer |
477 | + QBluetoothSocket #Connectivity |
478 | +@@ -80,6 +89,7 @@ set(QTMOBILITY_FIND_FILES |
479 | + QVersitDocument #Versit |
480 | + ) |
481 | + |
482 | ++#Loop over the list of components and look for specific components. |
483 | + list(LENGTH QTMOBILITY_COMPONENTS _component_count) |
484 | + math(EXPR _component_count "${_component_count} - 1") |
485 | + foreach (index RANGE ${_component_count}) |
486 | +@@ -87,10 +97,12 @@ foreach (index RANGE ${_component_count}) |
487 | + list(GET QTMOBILITY_FIND_FILES ${index} file) |
488 | + string(TOUPPER ${component} _COMPONENT) |
489 | + if (NOT QtMobility_FIND_COMPONENTS OR QTMOBILITY_USE_${_COMPONENT}) |
490 | +- message(STATUS "Looking for QtMobility Component \"${component}\"") |
491 | ++ #Look for the file and library. |
492 | + find_path(QTMOBILITY_${_COMPONENT}_INCLUDE_DIR ${file} PATH_SUFFIXES Qt${component}) |
493 | + find_library(QTMOBILITY_${_COMPONENT}_LIBRARY NAMES Qt${component}) |
494 | ++ #Append the variables to the list of variables to check. |
495 | + list(APPEND QTMOBILITY_VARIABLES "QTMOBILITY_${_COMPONENT}_INCLUDE_DIR" "QTMOBILITY_${_COMPONENT}_LIBRARY") |
496 | ++ #Append the values of the variables to the relevant lists. |
497 | + list(APPEND QTMOBILITY_INCLUDE_DIRS ${QTMOBILITY_${_COMPONENT}_INCLUDE_DIR}) |
498 | + list(APPEND QTMOBILITY_LIBRARIES ${QTMOBILITY_${_COMPONENT}_LIBRARY}) |
499 | + endif (NOT QtMobility_FIND_COMPONENTS OR QTMOBILITY_USE_${_COMPONENT}) |
500 | +-- |
501 | +1.7.5.4 |
502 | + |
503 | |
504 | === added file 'debian/patches/kubuntu_mobile_fix-resolution-of-paths-w-only-a-packageroot-name.diff' |
505 | --- debian/patches/kubuntu_mobile_fix-resolution-of-paths-w-only-a-packageroot-name.diff 1970-01-01 00:00:00 +0000 |
506 | +++ debian/patches/kubuntu_mobile_fix-resolution-of-paths-w-only-a-packageroot-name.diff 2011-08-15 15:42:29 +0000 |
507 | @@ -0,0 +1,74 @@ |
508 | +From 35a061ed45efb9e67b4a35bd9c6ec12a89d468b2 Mon Sep 17 00:00:00 2001 |
509 | +From: Marco Martin <notmart@gmail.com> |
510 | +Date: Thu, 14 Jul 2011 14:53:57 +0200 |
511 | +Subject: [PATCH 05/11] fix resolution of paths w/ only a packageRoot+name |
512 | + |
513 | +--- |
514 | + plasma/package.cpp | 17 ++++++++++++++++- |
515 | + plasma/packagestructure.cpp | 2 +- |
516 | + plasma/private/package_p.h | 1 + |
517 | + 3 files changed, 18 insertions(+), 2 deletions(-) |
518 | + |
519 | +diff --git a/plasma/package.cpp b/plasma/package.cpp |
520 | +index 3473571..e24fa17 100644 |
521 | +--- a/plasma/package.cpp |
522 | ++++ b/plasma/package.cpp |
523 | +@@ -128,7 +128,7 @@ Package::Package() |
524 | + |
525 | + Package::Package(const QString &packageRoot, const QString &package, |
526 | + PackageStructure::Ptr structure) |
527 | +- : d(new PackagePrivate(structure, packageRoot + '/' + package)) |
528 | ++ : d(new PackagePrivate(structure, packageRoot, package)) |
529 | + { |
530 | + } |
531 | + |
532 | +@@ -767,6 +767,21 @@ PackagePrivate::PackagePrivate(const PackageStructure::Ptr st, const QString &p) |
533 | + valid = structure && !structure->path().isEmpty(); |
534 | + } |
535 | + |
536 | ++PackagePrivate::PackagePrivate(const PackageStructure::Ptr st, const QString &packageRoot, const QString &path) |
537 | ++ : structure(st), |
538 | ++ service(0) |
539 | ++{ |
540 | ++ if (structure) { |
541 | ++ if (packageRoot.isEmpty()) { |
542 | ++ structure->setPath(structure->defaultPackageRoot()%"/"%path); |
543 | ++ } else { |
544 | ++ structure->setPath(packageRoot%path); |
545 | ++ } |
546 | ++ } |
547 | ++ |
548 | ++ valid = structure && !structure->path().isEmpty(); |
549 | ++} |
550 | ++ |
551 | + PackagePrivate::PackagePrivate(const PackagePrivate &other) |
552 | + : structure(other.structure), |
553 | + service(other.service), |
554 | +diff --git a/plasma/packagestructure.cpp b/plasma/packagestructure.cpp |
555 | +index 8bfb124..ede94a6e 100644 |
556 | +--- a/plasma/packagestructure.cpp |
557 | ++++ b/plasma/packagestructure.cpp |
558 | +@@ -148,7 +148,7 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) |
559 | + } else if (packageFormat == "Plasma/Generic") { |
560 | + structure = defaultPackageStructure(GenericComponent); |
561 | + structure->d->type = "Plasma/Generic"; |
562 | +- structure->setDefaultPackageRoot(KStandardDirs::locate("data", "plasmapackages")); |
563 | ++ structure->setDefaultPackageRoot(KStandardDirs::locate("data", "plasma/packages/")); |
564 | + } |
565 | + |
566 | + if (structure) { |
567 | +diff --git a/plasma/private/package_p.h b/plasma/private/package_p.h |
568 | +index 92203b0..a572c12 100644 |
569 | +--- a/plasma/private/package_p.h |
570 | ++++ b/plasma/private/package_p.h |
571 | +@@ -32,6 +32,7 @@ class PackagePrivate |
572 | + { |
573 | + public: |
574 | + PackagePrivate(const PackageStructure::Ptr st, const QString &p); |
575 | ++ PackagePrivate(const PackageStructure::Ptr st, const QString &packageRoot, const QString &path); |
576 | + PackagePrivate(const PackagePrivate &other); |
577 | + ~PackagePrivate(); |
578 | + |
579 | +-- |
580 | +1.7.5.4 |
581 | + |
582 | |
583 | === added file 'debian/patches/kubuntu_mobile_openreason-accessreason.diff' |
584 | --- debian/patches/kubuntu_mobile_openreason-accessreason.diff 1970-01-01 00:00:00 +0000 |
585 | +++ debian/patches/kubuntu_mobile_openreason-accessreason.diff 2011-08-15 15:42:29 +0000 |
586 | @@ -0,0 +1,120 @@ |
587 | +From ae0fb83c3ba87cc87a92ad85034ba42f6248246f Mon Sep 17 00:00:00 2001 |
588 | +From: Aaron Seigo <aseigo@kde.org> |
589 | +Date: Tue, 12 Jul 2011 18:16:06 +0200 |
590 | +Subject: [PATCH 04/11] OpenReason->AccessReason |
591 | + |
592 | +--- |
593 | + experimental/libkactivities/resourceinstance.cpp | 10 +++++----- |
594 | + experimental/libkactivities/resourceinstance.h | 14 +++++++------- |
595 | + 2 files changed, 12 insertions(+), 12 deletions(-) |
596 | + |
597 | +diff --git a/experimental/libkactivities/resourceinstance.cpp b/experimental/libkactivities/resourceinstance.cpp |
598 | +index 723017c..ce87fd5 100644 |
599 | +--- a/experimental/libkactivities/resourceinstance.cpp |
600 | ++++ b/experimental/libkactivities/resourceinstance.cpp |
601 | +@@ -40,7 +40,7 @@ __inline int toInt(WId wid) |
602 | + class ResourceInstancePrivate { |
603 | + public: |
604 | + WId wid; |
605 | +- ResourceInstance::OpenReason reason; |
606 | ++ ResourceInstance::AccessReason reason; |
607 | + QUrl uri; |
608 | + QString mimetype; |
609 | + QString application; |
610 | +@@ -57,7 +57,7 @@ public: |
611 | + FocusedOut = 5 |
612 | + }; |
613 | + |
614 | +- static void registerResourceEvent(const QString &application, WId wid, const QUrl &uri, Type event, ResourceInstance::OpenReason reason) |
615 | ++ static void registerResourceEvent(const QString &application, WId wid, const QUrl &uri, Type event, ResourceInstance::AccessReason reason) |
616 | + { |
617 | + Manager::self()->RegisterResourceEvent(application, toInt(wid), uri.toString(), uint(event), uint(reason)); |
618 | + } |
619 | +@@ -73,7 +73,7 @@ void ResourceInstancePrivate::openResource() |
620 | + registerResourceEvent(application, wid, uri, Opened, reason); |
621 | + } |
622 | + |
623 | +-ResourceInstance::ResourceInstance(WId wid, OpenReason reason, const QString &application, QObject *parent) |
624 | ++ResourceInstance::ResourceInstance(WId wid, AccessReason reason, const QString &application, QObject *parent) |
625 | + : QObject(parent), d(new ResourceInstancePrivate()) |
626 | + { |
627 | + d->wid = wid; |
628 | +@@ -82,7 +82,7 @@ ResourceInstance::ResourceInstance(WId wid, OpenReason reason, const QString &ap |
629 | + |
630 | + } |
631 | + |
632 | +-ResourceInstance::ResourceInstance(WId wid, QUrl resourceUri, const QString &mimetype, OpenReason reason, const QString &application, QObject *parent) |
633 | ++ResourceInstance::ResourceInstance(WId wid, QUrl resourceUri, const QString &mimetype, AccessReason reason, const QString &application, QObject *parent) |
634 | + : QObject(parent), d(new ResourceInstancePrivate()) |
635 | + { |
636 | + d->wid = wid; |
637 | +@@ -151,7 +151,7 @@ WId ResourceInstance::winId() const |
638 | + return d->wid; |
639 | + } |
640 | + |
641 | +-ResourceInstance::OpenReason ResourceInstance::openReason() const |
642 | ++ResourceInstance::AccessReason ResourceInstance::accessReason() const |
643 | + { |
644 | + return d->reason; |
645 | + } |
646 | +diff --git a/experimental/libkactivities/resourceinstance.h b/experimental/libkactivities/resourceinstance.h |
647 | +index ba08a80..ba1ecb3 100644 |
648 | +--- a/experimental/libkactivities/resourceinstance.h |
649 | ++++ b/experimental/libkactivities/resourceinstance.h |
650 | +@@ -57,20 +57,20 @@ class KDE_EXPORT ResourceInstance: public QObject |
651 | + Q_PROPERTY(QUrl uri READ uri WRITE setUri) |
652 | + Q_PROPERTY(QString mimetype READ mimetype WRITE setMimetype) |
653 | + Q_PROPERTY(WId winId READ winId) |
654 | +- Q_PROPERTY(OpenReason openReason READ openReason) |
655 | ++ Q_PROPERTY(AccessReason accessReason READ accessReason) |
656 | + |
657 | + public: |
658 | + /*** |
659 | + * The reason for opening the resource |
660 | + */ |
661 | +- enum OpenReason { |
662 | ++ enum AccessReason { |
663 | + User = 0, ///< Due to an explicit user request |
664 | + Scheduled = 1, ///< As a result of a user-scheduled action |
665 | + Heuristic = 2, ///< Deduced from user's activity, or indirectly requested |
666 | + System = 3, ///< Due to a system event |
667 | + World = 4 ///< Due to an action performed by an external entity |
668 | + }; |
669 | +- Q_ENUMS(OpenReason) |
670 | ++ Q_ENUMS(AccessReason) |
671 | + |
672 | + /** |
673 | + * Creates a new resource instance |
674 | +@@ -80,7 +80,7 @@ public: |
675 | + * If not specified, QCoreApplication::applicationName is used |
676 | + * @param parent pointer to the parent object |
677 | + */ |
678 | +- ResourceInstance(WId wid, OpenReason reason = User, const QString &application = QString(), QObject *parent = 0); |
679 | ++ ResourceInstance(WId wid, AccessReason reason = User, const QString &application = QString(), QObject *parent = 0); |
680 | + |
681 | + /** |
682 | + * Creates a new resource instance and automatically |
683 | +@@ -104,7 +104,7 @@ public: |
684 | + * If not specified, QCoreApplication::applicationName is used |
685 | + * @param parent pointer to the parent object |
686 | + */ |
687 | +- ResourceInstance(WId wid, QUrl resourceUri, const QString &mimetype = QString(), OpenReason reason = User, const QString &application = QString(), QObject *parent = 0); |
688 | ++ ResourceInstance(WId wid, QUrl resourceUri, const QString &mimetype = QString(), AccessReason reason = User, const QString &application = QString(), QObject *parent = 0); |
689 | + |
690 | + /** |
691 | + * Destroys the ResourceInstance and notifies the system |
692 | +@@ -177,9 +177,9 @@ public: |
693 | + WId winId() const; |
694 | + |
695 | + /** |
696 | +- * @returns the reason for opening the resource |
697 | ++ * @returns the reason for accessing the resource |
698 | + */ |
699 | +- OpenReason openReason() const; |
700 | ++ AccessReason accessReason() const; |
701 | + |
702 | + /** |
703 | + * If there's no way to tell for how long an application is keeping |
704 | +-- |
705 | +1.7.5.4 |
706 | + |
707 | |
708 | === added file 'debian/patches/kubuntu_mobile_ported-the-new-libkactivities.diff' |
709 | --- debian/patches/kubuntu_mobile_ported-the-new-libkactivities.diff 1970-01-01 00:00:00 +0000 |
710 | +++ debian/patches/kubuntu_mobile_ported-the-new-libkactivities.diff 2011-08-15 15:42:29 +0000 |
711 | @@ -0,0 +1,2710 @@ |
712 | +From 0683b3a4d2a0ee8d348e5e6009f528ca9ec4bb2c Mon Sep 17 00:00:00 2001 |
713 | +From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= <ivan.cukic@kde.org> |
714 | +Date: Fri, 8 Jul 2011 17:49:23 +0200 |
715 | +Subject: [PATCH 01/11] Ported the new libkactivities |
716 | + |
717 | +--- |
718 | + experimental/libkactivities/CMakeLists.txt | 32 +++- |
719 | + experimental/libkactivities/consumer.cpp | 90 +++++++++ |
720 | + experimental/libkactivities/consumer.h | 123 ++++++++++++ |
721 | + experimental/libkactivities/consumer_p.h | 31 +++ |
722 | + experimental/libkactivities/controller.cpp | 93 +++++++++ |
723 | + experimental/libkactivities/controller.h | 122 ++++++++++++ |
724 | + .../libkactivities/includes/Activities/Consumer | 1 + |
725 | + .../libkactivities/includes/Activities/Controller | 1 + |
726 | + .../libkactivities/includes/Activities/Info | 1 + |
727 | + .../includes/Activities/ResourceInstance | 1 + |
728 | + experimental/libkactivities/info.cpp | 183 ++++++++++++++++++ |
729 | + experimental/libkactivities/info.h | 176 +++++++++++++++++ |
730 | + experimental/libkactivities/info_p.h | 46 +++++ |
731 | + experimental/libkactivities/kactivityconsumer.cpp | 86 --------- |
732 | + experimental/libkactivities/kactivityconsumer.h | 118 ------------ |
733 | + experimental/libkactivities/kactivityconsumer_p.h | 27 --- |
734 | + .../libkactivities/kactivitycontroller.cpp | 89 --------- |
735 | + experimental/libkactivities/kactivitycontroller.h | 117 ------------ |
736 | + experimental/libkactivities/kactivityinfo.cpp | 180 ------------------ |
737 | + experimental/libkactivities/kactivityinfo.h | 169 ----------------- |
738 | + experimental/libkactivities/kactivityinfo_p.h | 42 ---- |
739 | + experimental/libkactivities/kactivitymanager_p.cpp | 83 -------- |
740 | + experimental/libkactivities/kactivitymanager_p.h | 49 ----- |
741 | + experimental/libkactivities/manager_p.cpp | 89 +++++++++ |
742 | + experimental/libkactivities/manager_p.h | 52 +++++ |
743 | + .../libkactivities/org.kde.ActivityManager.xml | 37 +--- |
744 | + experimental/libkactivities/prettyheaders.sh | 4 + |
745 | + experimental/libkactivities/resourceinstance.cpp | 166 ++++++++++++++++ |
746 | + experimental/libkactivities/resourceinstance.h | 200 ++++++++++++++++++++ |
747 | + kio/kfile/krecentdocument.cpp | 9 + |
748 | + 30 files changed, 1417 insertions(+), 1000 deletions(-) |
749 | + create mode 100644 experimental/libkactivities/consumer.cpp |
750 | + create mode 100644 experimental/libkactivities/consumer.h |
751 | + create mode 100644 experimental/libkactivities/consumer_p.h |
752 | + create mode 100644 experimental/libkactivities/controller.cpp |
753 | + create mode 100644 experimental/libkactivities/controller.h |
754 | + create mode 100644 experimental/libkactivities/includes/Activities/Consumer |
755 | + create mode 100644 experimental/libkactivities/includes/Activities/Controller |
756 | + create mode 100644 experimental/libkactivities/includes/Activities/Info |
757 | + create mode 100644 experimental/libkactivities/includes/Activities/ResourceInstance |
758 | + create mode 100644 experimental/libkactivities/info.cpp |
759 | + create mode 100644 experimental/libkactivities/info.h |
760 | + create mode 100644 experimental/libkactivities/info_p.h |
761 | + delete mode 100644 experimental/libkactivities/kactivityconsumer.cpp |
762 | + delete mode 100644 experimental/libkactivities/kactivityconsumer.h |
763 | + delete mode 100644 experimental/libkactivities/kactivityconsumer_p.h |
764 | + delete mode 100644 experimental/libkactivities/kactivitycontroller.cpp |
765 | + delete mode 100644 experimental/libkactivities/kactivitycontroller.h |
766 | + delete mode 100644 experimental/libkactivities/kactivityinfo.cpp |
767 | + delete mode 100644 experimental/libkactivities/kactivityinfo.h |
768 | + delete mode 100644 experimental/libkactivities/kactivityinfo_p.h |
769 | + delete mode 100644 experimental/libkactivities/kactivitymanager_p.cpp |
770 | + delete mode 100644 experimental/libkactivities/kactivitymanager_p.h |
771 | + create mode 100644 experimental/libkactivities/manager_p.cpp |
772 | + create mode 100644 experimental/libkactivities/manager_p.h |
773 | + create mode 100755 experimental/libkactivities/prettyheaders.sh |
774 | + create mode 100644 experimental/libkactivities/resourceinstance.cpp |
775 | + create mode 100644 experimental/libkactivities/resourceinstance.h |
776 | + |
777 | +diff --git a/experimental/libkactivities/CMakeLists.txt b/experimental/libkactivities/CMakeLists.txt |
778 | +index 50cd86e..fae3471 100644 |
779 | +--- a/experimental/libkactivities/CMakeLists.txt |
780 | ++++ b/experimental/libkactivities/CMakeLists.txt |
781 | +@@ -10,10 +10,11 @@ include_directories( |
782 | + set( |
783 | + kactivities_LIB_SRCS |
784 | + |
785 | +- kactivityconsumer.cpp |
786 | +- kactivitycontroller.cpp |
787 | +- kactivityinfo.cpp |
788 | +- kactivitymanager_p.cpp |
789 | ++ consumer.cpp |
790 | ++ controller.cpp |
791 | ++ info.cpp |
792 | ++ manager_p.cpp |
793 | ++ resourceinstance.cpp |
794 | + ) |
795 | + |
796 | + qt4_add_dbus_interface( |
797 | +@@ -45,14 +46,29 @@ target_link_libraries( |
798 | + |
799 | + set( |
800 | + kactivities_LIB_HEADERS |
801 | +- kactivityconsumer.h |
802 | +- kactivitycontroller.h |
803 | +- kactivityinfo.h |
804 | ++ consumer.h |
805 | ++ controller.h |
806 | ++ info.h |
807 | ++ resourceinstance.h |
808 | ++ ) |
809 | ++ |
810 | ++set( |
811 | ++ kactivities_LIB_PRETTY_HEADERS |
812 | ++ includes/Activities/Consumer |
813 | ++ includes/Activities/Controller |
814 | ++ includes/Activities/Info |
815 | ++ includes/Activities/ResourceInstance |
816 | + ) |
817 | + |
818 | + install( |
819 | + FILES ${kactivities_LIB_HEADERS} |
820 | +- DESTINATION ${INCLUDE_INSTALL_DIR}/ |
821 | ++ DESTINATION ${INCLUDE_INSTALL_DIR}/kactivities |
822 | ++ COMPONENT Devel |
823 | ++ ) |
824 | ++ |
825 | ++install( |
826 | ++ FILES ${kactivities_LIB_PRETTY_HEADERS} |
827 | ++ DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/Activities |
828 | + COMPONENT Devel |
829 | + ) |
830 | + |
831 | +diff --git a/experimental/libkactivities/consumer.cpp b/experimental/libkactivities/consumer.cpp |
832 | +new file mode 100644 |
833 | +index 0000000..8acbd8b |
834 | +--- /dev/null |
835 | ++++ b/experimental/libkactivities/consumer.cpp |
836 | +@@ -0,0 +1,90 @@ |
837 | ++/* |
838 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
839 | ++ * |
840 | ++ * This library is free software; you can redistribute it and/or |
841 | ++ * modify it under the terms of the GNU Library General Public |
842 | ++ * License version 2 as published by the Free Software Foundation. |
843 | ++ * |
844 | ++ * This library is distributed in the hope that it will be useful, |
845 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
846 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
847 | ++ * Library General Public License for more details. |
848 | ++ * |
849 | ++ * You should have received a copy of the GNU Library General Public License |
850 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
851 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
852 | ++ * Boston, MA 02110-1301, USA. |
853 | ++ */ |
854 | ++ |
855 | ++#include "consumer.h" |
856 | ++#include "consumer_p.h" |
857 | ++#include "manager_p.h" |
858 | ++ |
859 | ++#include <kdebug.h> |
860 | ++ |
861 | ++namespace Activities { |
862 | ++ |
863 | ++Consumer::Consumer(QObject * parent) |
864 | ++ : QObject(parent), d(new ConsumerPrivate()) |
865 | ++{ |
866 | ++ connect( |
867 | ++ Manager::self(), SIGNAL(CurrentActivityChanged(const QString &)), |
868 | ++ this, SIGNAL(currentActivityChanged(const QString &)) |
869 | ++ ); |
870 | ++} |
871 | ++ |
872 | ++Consumer::~Consumer() |
873 | ++{ |
874 | ++ delete d; |
875 | ++} |
876 | ++ |
877 | ++// macro defines a shorthand for validating and returning a d-bus result |
878 | ++// @param TYPE type of the result |
879 | ++// @param METHOD invocation of the d-bus method |
880 | ++// @param DEFAULT value to be used if the reply was not valid |
881 | ++#define KACTIVITYCONSUMER_DBUS_RETURN(TYPE, METHOD, DEFAULT) \ |
882 | ++ QDBusReply < TYPE > dbusReply = METHOD; \ |
883 | ++ if (dbusReply.isValid()) { \ |
884 | ++ return dbusReply.value(); \ |
885 | ++ } else { \ |
886 | ++ kDebug() << "d-bus reply was invalid" \ |
887 | ++ << dbusReply.value() \ |
888 | ++ << dbusReply.error(); \ |
889 | ++ return DEFAULT; \ |
890 | ++ } |
891 | ++ |
892 | ++QString Consumer::currentActivity() const |
893 | ++{ |
894 | ++ KACTIVITYCONSUMER_DBUS_RETURN( |
895 | ++ QString, Manager::self()->CurrentActivity(), QString() ); |
896 | ++} |
897 | ++ |
898 | ++QStringList Consumer::listActivities(Info::State state) const |
899 | ++{ |
900 | ++ KACTIVITYCONSUMER_DBUS_RETURN( |
901 | ++ QStringList, Manager::self()->ListActivities(state), QStringList() ); |
902 | ++} |
903 | ++ |
904 | ++QStringList Consumer::listActivities() const |
905 | ++{ |
906 | ++ KACTIVITYCONSUMER_DBUS_RETURN( |
907 | ++ QStringList, Manager::self()->ListActivities(), QStringList() ); |
908 | ++} |
909 | ++ |
910 | ++#undef KACTIVITYCONSUMER_DBUS_RETURN |
911 | ++ |
912 | ++Consumer::ServiceStatus Consumer::serviceStatus() |
913 | ++{ |
914 | ++ if (!Manager::isActivityServiceRunning()) { |
915 | ++ return NotRunning; |
916 | ++ } |
917 | ++ |
918 | ++ if (!Manager::self()->IsBackstoreAvailable()) { |
919 | ++ return BareFunctionality; |
920 | ++ } |
921 | ++ |
922 | ++ return FullFunctionality; |
923 | ++} |
924 | ++ |
925 | ++} // namespace Activities |
926 | ++ |
927 | +diff --git a/experimental/libkactivities/consumer.h b/experimental/libkactivities/consumer.h |
928 | +new file mode 100644 |
929 | +index 0000000..b25c9f5 |
930 | +--- /dev/null |
931 | ++++ b/experimental/libkactivities/consumer.h |
932 | +@@ -0,0 +1,123 @@ |
933 | ++/* |
934 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
935 | ++ * |
936 | ++ * This library is free software; you can redistribute it and/or |
937 | ++ * modify it under the terms of the GNU Library General Public |
938 | ++ * License version 2 as published by the Free Software Foundation. |
939 | ++ * |
940 | ++ * This library is distributed in the hope that it will be useful, |
941 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
942 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
943 | ++ * Library General Public License for more details. |
944 | ++ * |
945 | ++ * You should have received a copy of the GNU Library General Public License |
946 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
947 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
948 | ++ * Boston, MA 02110-1301, USA. |
949 | ++ */ |
950 | ++ |
951 | ++#ifndef ACTIVITIES_CONSUMER_H_ |
952 | ++#define ACTIVITIES_CONSUMER_H_ |
953 | ++ |
954 | ++#include <QObject> |
955 | ++#include <QWidget> |
956 | ++#include <QString> |
957 | ++#include <QStringList> |
958 | ++ |
959 | ++#include "info.h" |
960 | ++ |
961 | ++#include <kurl.h> |
962 | ++#include <kdemacros.h> |
963 | ++ |
964 | ++namespace Activities { |
965 | ++ |
966 | ++class ConsumerPrivate; |
967 | ++ |
968 | ++/** |
969 | ++ * Contextual information can be, from the user's point of view, divided |
970 | ++ * into three aspects - "who am I?", "where am I?" (what are my surroundings?) |
971 | ++ * and "what am I doing?". |
972 | ++ * |
973 | ++ * Activities deal with the last one - "what am I doing?". The current activity |
974 | ++ * refers to what the user is doing at the moment, while the other activities represent |
975 | ++ * things that he/she was doing before, and probably will be doing again. |
976 | ++ * |
977 | ++ * Activity is an abstract concept whose meaning can differ from one user to another. |
978 | ++ * Typical examples of activities are "developing a KDE project", "studying the |
979 | ++ * 19th century art", "composing music", "lazing on a Sunday afternoon" etc. |
980 | ++ * |
981 | ++ * Every activity can have applications, documents, or other types of resources |
982 | ++ * assigned to it. |
983 | ++ * |
984 | ++ * Consumer provides an entry-level API for supporting activities in an |
985 | ++ * application - to react to the changes to the current activity as well as |
986 | ++ * registering the resources with its windows. |
987 | ++ * |
988 | ++ * Resource can be anything that is identifiable by an URI (for example, |
989 | ++ * a local file or a web page) |
990 | ++ * |
991 | ++ * @since 4.5 |
992 | ++ */ |
993 | ++class KDE_EXPORT Consumer: public QObject { |
994 | ++ Q_OBJECT |
995 | ++ |
996 | ++ Q_PROPERTY(QString currentActivity READ currentActivity) |
997 | ++ Q_PROPERTY(QStringList activities READ listActivities) |
998 | ++ |
999 | ++public: |
1000 | ++ /** |
1001 | ++ * Different states of the activities service |
1002 | ++ */ |
1003 | ++ enum ServiceStatus { |
1004 | ++ NotRunning, ///< Service is not running |
1005 | ++ BareFunctionality, ///< Service is running without a sane backend |
1006 | ++ FullFunctionality ///< Service is running, and a backend is available |
1007 | ++ }; |
1008 | ++ |
1009 | ++ explicit Consumer(QObject * parent = 0); |
1010 | ++ |
1011 | ++ ~Consumer(); |
1012 | ++ |
1013 | ++ /** |
1014 | ++ * @returns the id of the current activity |
1015 | ++ */ |
1016 | ++ QString currentActivity() const; |
1017 | ++ |
1018 | ++ /** |
1019 | ++ * @returns the list of activities filtered by state |
1020 | ++ * @param state state of the activity |
1021 | ++ */ |
1022 | ++ QStringList listActivities(Info::State state) const; |
1023 | ++ |
1024 | ++ /** |
1025 | ++ * @returns the list of all existing activities |
1026 | ++ */ |
1027 | ++ QStringList listActivities() const; |
1028 | ++ |
1029 | ++ /** |
1030 | ++ * @returns status of the activities service |
1031 | ++ */ |
1032 | ++ static ServiceStatus serviceStatus(); |
1033 | ++ |
1034 | ++Q_SIGNALS: |
1035 | ++ /** |
1036 | ++ * This signal is emitted when the global |
1037 | ++ * activity is changed |
1038 | ++ * @param id id of the new current activity |
1039 | ++ */ |
1040 | ++ void currentActivityChanged(const QString & id); |
1041 | ++ |
1042 | ++ /** |
1043 | ++ * This signal is emitted when the activity service |
1044 | ++ * goes online or offline |
1045 | ++ * @param status new status of the service |
1046 | ++ */ |
1047 | ++ void serviceStatusChanged(Consumer::ServiceStatus status); |
1048 | ++ |
1049 | ++private: |
1050 | ++ ConsumerPrivate * const d; |
1051 | ++}; |
1052 | ++ |
1053 | ++} // namespace Activities |
1054 | ++ |
1055 | ++#endif // ACTIVITIES_CONSUMER_H_ |
1056 | +diff --git a/experimental/libkactivities/consumer_p.h b/experimental/libkactivities/consumer_p.h |
1057 | +new file mode 100644 |
1058 | +index 0000000..69c253a |
1059 | +--- /dev/null |
1060 | ++++ b/experimental/libkactivities/consumer_p.h |
1061 | +@@ -0,0 +1,31 @@ |
1062 | ++/* |
1063 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1064 | ++ * |
1065 | ++ * This library is free software; you can redistribute it and/or |
1066 | ++ * modify it under the terms of the GNU Library General Public |
1067 | ++ * License version 2 as published by the Free Software Foundation. |
1068 | ++ * |
1069 | ++ * This library is distributed in the hope that it will be useful, |
1070 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1071 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1072 | ++ * Library General Public License for more details. |
1073 | ++ * |
1074 | ++ * You should have received a copy of the GNU Library General Public License |
1075 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
1076 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1077 | ++ * Boston, MA 02110-1301, USA. |
1078 | ++ */ |
1079 | ++ |
1080 | ++#ifndef ACTIVITIES_CONSUMER_P_H_ |
1081 | ++#define ACTIVITIES_CONSUMER_P_H_ |
1082 | ++ |
1083 | ++#include "activitymanager_interface.h" |
1084 | ++ |
1085 | ++namespace Activities { |
1086 | ++ |
1087 | ++class ConsumerPrivate { |
1088 | ++}; |
1089 | ++ |
1090 | ++} // namespace Activities |
1091 | ++ |
1092 | ++#endif // ACTIVITIES_CONSUMER_P_H_ |
1093 | +diff --git a/experimental/libkactivities/controller.cpp b/experimental/libkactivities/controller.cpp |
1094 | +new file mode 100644 |
1095 | +index 0000000..9ba422f |
1096 | +--- /dev/null |
1097 | ++++ b/experimental/libkactivities/controller.cpp |
1098 | +@@ -0,0 +1,93 @@ |
1099 | ++/* |
1100 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1101 | ++ * |
1102 | ++ * This library is free software; you can redistribute it and/or |
1103 | ++ * modify it under the terms of the GNU Library General Public |
1104 | ++ * License version 2 as published by the Free Software Foundation. |
1105 | ++ * |
1106 | ++ * This library is distributed in the hope that it will be useful, |
1107 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1108 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1109 | ++ * Library General Public License for more details. |
1110 | ++ * |
1111 | ++ * You should have received a copy of the GNU Library General Public License |
1112 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
1113 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1114 | ++ * Boston, MA 02110-1301, USA. |
1115 | ++ */ |
1116 | ++ |
1117 | ++#include "controller.h" |
1118 | ++#include "consumer_p.h" |
1119 | ++#include "manager_p.h" |
1120 | ++ |
1121 | ++#include <QObject> |
1122 | ++ |
1123 | ++#include <kdebug.h> |
1124 | ++ |
1125 | ++namespace Activities { |
1126 | ++ |
1127 | ++class ControllerPrivate: public QObject { |
1128 | ++public: |
1129 | ++ ControllerPrivate(Controller * parent) |
1130 | ++ : q(parent) |
1131 | ++ { |
1132 | ++ } |
1133 | ++ |
1134 | ++private: |
1135 | ++ Controller * const q; |
1136 | ++}; |
1137 | ++ |
1138 | ++Controller::Controller(QObject * parent) |
1139 | ++ : Consumer(parent), d(new ControllerPrivate(this)) |
1140 | ++{ |
1141 | ++ connect(Manager::self(), SIGNAL(ActivityAdded(QString)), |
1142 | ++ this, SIGNAL(activityAdded(QString))); |
1143 | ++ |
1144 | ++ connect(Manager::self(), SIGNAL(ActivityRemoved(QString)), |
1145 | ++ this, SIGNAL(activityRemoved(QString))); |
1146 | ++ |
1147 | ++} |
1148 | ++ |
1149 | ++Controller::~Controller() |
1150 | ++{ |
1151 | ++ delete d; |
1152 | ++} |
1153 | ++ |
1154 | ++void Controller::setActivityName(const QString & id, const QString & name) |
1155 | ++{ |
1156 | ++ Manager::self()->SetActivityName(id, name); |
1157 | ++} |
1158 | ++ |
1159 | ++void Controller::setActivityIcon(const QString & id, const QString & icon) |
1160 | ++{ |
1161 | ++ Manager::self()->SetActivityIcon(id, icon); |
1162 | ++} |
1163 | ++ |
1164 | ++bool Controller::setCurrentActivity(const QString & id) |
1165 | ++{ |
1166 | ++ return Manager::self()->SetCurrentActivity(id); |
1167 | ++} |
1168 | ++ |
1169 | ++QString Controller::addActivity(const QString & name) |
1170 | ++{ |
1171 | ++ return Manager::self()->AddActivity(name); |
1172 | ++} |
1173 | ++ |
1174 | ++void Controller::removeActivity(const QString & id) |
1175 | ++{ |
1176 | ++ Manager::self()->RemoveActivity(id); |
1177 | ++} |
1178 | ++ |
1179 | ++void Controller::stopActivity(const QString & id) |
1180 | ++{ |
1181 | ++ Manager::self()->StopActivity(id); |
1182 | ++} |
1183 | ++ |
1184 | ++void Controller::startActivity(const QString & id) |
1185 | ++{ |
1186 | ++ Manager::self()->StartActivity(id); |
1187 | ++} |
1188 | ++ |
1189 | ++} // namespace Activities |
1190 | ++ |
1191 | ++#include "controller.moc" |
1192 | +diff --git a/experimental/libkactivities/controller.h b/experimental/libkactivities/controller.h |
1193 | +new file mode 100644 |
1194 | +index 0000000..8e7fe8a |
1195 | +--- /dev/null |
1196 | ++++ b/experimental/libkactivities/controller.h |
1197 | +@@ -0,0 +1,122 @@ |
1198 | ++/* |
1199 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1200 | ++ * |
1201 | ++ * This library is free software; you can redistribute it and/or |
1202 | ++ * modify it under the terms of the GNU Library General Public |
1203 | ++ * License version 2 as published by the Free Software Foundation. |
1204 | ++ * |
1205 | ++ * This library is distributed in the hope that it will be useful, |
1206 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1207 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1208 | ++ * Library General Public License for more details. |
1209 | ++ * |
1210 | ++ * You should have received a copy of the GNU Library General Public License |
1211 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
1212 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1213 | ++ * Boston, MA 02110-1301, USA. |
1214 | ++ */ |
1215 | ++ |
1216 | ++#ifndef ACTIVITIES_CONTROLLER_H_ |
1217 | ++#define ACTIVITIES_CONTROLLER_H_ |
1218 | ++ |
1219 | ++#include <QObject> |
1220 | ++#include <QWidget> |
1221 | ++#include <QString> |
1222 | ++#include <QStringList> |
1223 | ++ |
1224 | ++#include "consumer.h" |
1225 | ++ |
1226 | ++#include <kurl.h> |
1227 | ++#include <kdemacros.h> |
1228 | ++ |
1229 | ++namespace Activities { |
1230 | ++ |
1231 | ++class ControllerPrivate; |
1232 | ++ |
1233 | ++/** |
1234 | ++ * This class provides methods for controlling and managing |
1235 | ++ * the activities. |
1236 | ++ * |
1237 | ++ * @see Consumer for info about activities |
1238 | ++ * |
1239 | ++ * @since 4.5 |
1240 | ++ */ |
1241 | ++class KDE_EXPORT Controller: public Consumer |
1242 | ++{ |
1243 | ++ Q_OBJECT |
1244 | ++ |
1245 | ++ Q_PROPERTY(QString currentActivity READ currentActivity WRITE setCurrentActivity) |
1246 | ++ |
1247 | ++public: |
1248 | ++ explicit Controller(QObject * parent = 0); |
1249 | ++ |
1250 | ++ ~Controller(); |
1251 | ++ |
1252 | ++ /** |
1253 | ++ * Sets the name of the specified activity |
1254 | ++ * @param id id of the activity |
1255 | ++ * @param name name to be set |
1256 | ++ */ |
1257 | ++ void setActivityName(const QString & id, const QString & name); |
1258 | ++ |
1259 | ++ /** |
1260 | ++ * Sets the icon of the specified activity |
1261 | ++ * @param id id of the activity |
1262 | ++ * @param icon icon to be set - freedesktop.org name or file path |
1263 | ++ */ |
1264 | ++ void setActivityIcon(const QString & id, const QString & icon); |
1265 | ++ |
1266 | ++ /** |
1267 | ++ * Sets the current activity |
1268 | ++ * @param id id of the activity to make current |
1269 | ++ * @returns true if successful |
1270 | ++ */ |
1271 | ++ bool setCurrentActivity(const QString & id); |
1272 | ++ |
1273 | ++ /** |
1274 | ++ * Adds a new activity |
1275 | ++ * @param name name of the activity |
1276 | ++ * @returns id of the newly created activity |
1277 | ++ */ |
1278 | ++ QString addActivity(const QString & name); |
1279 | ++ |
1280 | ++ /** |
1281 | ++ * Removes the specified activity |
1282 | ++ * @param id id of the activity to delete |
1283 | ++ */ |
1284 | ++ void removeActivity(const QString & id); |
1285 | ++ |
1286 | ++ /** |
1287 | ++ * Stops the activity |
1288 | ++ * @param id id of the activity to stop |
1289 | ++ */ |
1290 | ++ void stopActivity(const QString & id); |
1291 | ++ |
1292 | ++ /** |
1293 | ++ * Starts the activity |
1294 | ++ * @param id id of the activity to start |
1295 | ++ */ |
1296 | ++ void startActivity(const QString & id); |
1297 | ++ |
1298 | ++Q_SIGNALS: |
1299 | ++ /** |
1300 | ++ * This signal is emitted when the global |
1301 | ++ * activity is changed |
1302 | ++ * @param id id of the new current activity |
1303 | ++ */ |
1304 | ++ void activityAdded(const QString & id); |
1305 | ++ |
1306 | ++ /** |
1307 | ++ * This signal is emitted when the activity |
1308 | ++ * is removed |
1309 | ++ * @param id id of the removed activity |
1310 | ++ */ |
1311 | ++ void activityRemoved(const QString & id); |
1312 | ++ |
1313 | ++private: |
1314 | ++ ControllerPrivate * const d; |
1315 | ++}; |
1316 | ++ |
1317 | ++} // namespace Activities |
1318 | ++ |
1319 | ++#endif // ACTIVITIES_CONTROLLER_H_ |
1320 | +diff --git a/experimental/libkactivities/includes/Activities/Consumer b/experimental/libkactivities/includes/Activities/Consumer |
1321 | +new file mode 100644 |
1322 | +index 0000000..066d6dd |
1323 | +--- /dev/null |
1324 | ++++ b/experimental/libkactivities/includes/Activities/Consumer |
1325 | +@@ -0,0 +1 @@ |
1326 | ++#include "../../kactivities/consumer.h" |
1327 | +diff --git a/experimental/libkactivities/includes/Activities/Controller b/experimental/libkactivities/includes/Activities/Controller |
1328 | +new file mode 100644 |
1329 | +index 0000000..e51ff61 |
1330 | +--- /dev/null |
1331 | ++++ b/experimental/libkactivities/includes/Activities/Controller |
1332 | +@@ -0,0 +1 @@ |
1333 | ++#include "../../kactivities/controller.h" |
1334 | +diff --git a/experimental/libkactivities/includes/Activities/Info b/experimental/libkactivities/includes/Activities/Info |
1335 | +new file mode 100644 |
1336 | +index 0000000..fdafd5f |
1337 | +--- /dev/null |
1338 | ++++ b/experimental/libkactivities/includes/Activities/Info |
1339 | +@@ -0,0 +1 @@ |
1340 | ++#include "../../kactivities/info.h" |
1341 | +diff --git a/experimental/libkactivities/includes/Activities/ResourceInstance b/experimental/libkactivities/includes/Activities/ResourceInstance |
1342 | +new file mode 100644 |
1343 | +index 0000000..92ec053 |
1344 | +--- /dev/null |
1345 | ++++ b/experimental/libkactivities/includes/Activities/ResourceInstance |
1346 | +@@ -0,0 +1 @@ |
1347 | ++#include "../../kactivities/resourceinstance.h" |
1348 | +diff --git a/experimental/libkactivities/info.cpp b/experimental/libkactivities/info.cpp |
1349 | +new file mode 100644 |
1350 | +index 0000000..a8bd791 |
1351 | +--- /dev/null |
1352 | ++++ b/experimental/libkactivities/info.cpp |
1353 | +@@ -0,0 +1,183 @@ |
1354 | ++/* |
1355 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1356 | ++ * |
1357 | ++ * This library is free software; you can redistribute it and/or |
1358 | ++ * modify it under the terms of the GNU Library General Public |
1359 | ++ * License version 2 as published by the Free Software Foundation. |
1360 | ++ * |
1361 | ++ * This library is distributed in the hope that it will be useful, |
1362 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1363 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1364 | ++ * Library General Public License for more details. |
1365 | ++ * |
1366 | ++ * You should have received a copy of the GNU Library General Public License |
1367 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
1368 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1369 | ++ * Boston, MA 02110-1301, USA. |
1370 | ++ */ |
1371 | ++ |
1372 | ++#include <kdebug.h> |
1373 | ++ |
1374 | ++#include "info.h" |
1375 | ++#include "info_p.h" |
1376 | ++#include "manager_p.h" |
1377 | ++ |
1378 | ++namespace Activities { |
1379 | ++ |
1380 | ++// Private |
1381 | ++ |
1382 | ++InfoPrivate::InfoPrivate(Info *info, const QString &activityId) |
1383 | ++ : q(info), |
1384 | ++ state(Info::Invalid), |
1385 | ++ id(activityId) |
1386 | ++{ |
1387 | ++ Manager::self(); |
1388 | ++} |
1389 | ++ |
1390 | ++#define IMPLEMENT_SIGNAL_HANDLER(ORIGINAL, INTERNAL) \ |
1391 | ++ void InfoPrivate::INTERNAL(const QString & _id) const \ |
1392 | ++ { \ |
1393 | ++ if (id == _id) emit q->INTERNAL(); \ |
1394 | ++ } |
1395 | ++ |
1396 | ++IMPLEMENT_SIGNAL_HANDLER(ActivityAdded, added) |
1397 | ++IMPLEMENT_SIGNAL_HANDLER(ActivityRemoved, removed) |
1398 | ++IMPLEMENT_SIGNAL_HANDLER(ActivityStarted, started) |
1399 | ++IMPLEMENT_SIGNAL_HANDLER(ActivityStopped, stopped) |
1400 | ++IMPLEMENT_SIGNAL_HANDLER(ActivityChanged, infoChanged) |
1401 | ++ |
1402 | ++#undef IMPLEMENT_SIGNAL_HANDLER |
1403 | ++ |
1404 | ++void InfoPrivate::activityStateChanged(const QString & idChanged, int newState) |
1405 | ++{ |
1406 | ++ if (idChanged == id) { |
1407 | ++ state = static_cast<Info::State>(newState); |
1408 | ++ emit q->stateChanged(state); |
1409 | ++ } |
1410 | ++} |
1411 | ++ |
1412 | ++// Info |
1413 | ++Info::Info(const QString &activityId, QObject *parent) |
1414 | ++ : QObject(parent), |
1415 | ++ d(new InfoPrivate(this, activityId)) |
1416 | ++{ |
1417 | ++ d->id = activityId; |
1418 | ++ connect(Manager::self(), SIGNAL(ActivityStateChanged(const QString &, int)), |
1419 | ++ this, SLOT(activityStateChanged(const QString &, int))); |
1420 | ++ |
1421 | ++ connect(Manager::self(), SIGNAL(ActivityChanged(const QString &)), |
1422 | ++ this, SLOT(infoChanged(const QString &))); |
1423 | ++ |
1424 | ++ connect(Manager::self(), SIGNAL(ActivityAdded(const QString &)), |
1425 | ++ this, SLOT(added(const QString &))); |
1426 | ++ |
1427 | ++ connect(Manager::self(), SIGNAL(ActivityRemoved(const QString &)), |
1428 | ++ this, SLOT(removed(const QString &))); |
1429 | ++ |
1430 | ++ connect(Manager::self(), SIGNAL(ActivityStarted(const QString &)), |
1431 | ++ this, SLOT(started(const QString &))); |
1432 | ++ |
1433 | ++ connect(Manager::self(), SIGNAL(ActivityStopped(const QString &)), |
1434 | ++ this, SLOT(stopped(const QString &))); |
1435 | ++} |
1436 | ++ |
1437 | ++Info::~Info() |
1438 | ++{ |
1439 | ++ delete d; |
1440 | ++} |
1441 | ++ |
1442 | ++bool Info::isValid() const |
1443 | ++{ |
1444 | ++ return (state() != Invalid); |
1445 | ++} |
1446 | ++ |
1447 | ++// macro defines a shorthand for validating and returning a d-bus result |
1448 | ++// @param REPLY_TYPE type of the d-bus result |
1449 | ++// @param CAST_TYPE type to which to cast the result |
1450 | ++// @param METHOD invocation of the d-bus method |
1451 | ++#define KACTIVITYINFO_DBUS_CAST_RETURN(REPLY_TYPE, CAST_TYPE, METHOD) \ |
1452 | ++ QDBusReply < REPLY_TYPE > dbusReply = METHOD; \ |
1453 | ++ if (dbusReply.isValid()) { \ |
1454 | ++ return (CAST_TYPE)(dbusReply.value()); \ |
1455 | ++ } else { \ |
1456 | ++ return CAST_TYPE(); \ |
1457 | ++ } |
1458 | ++ |
1459 | ++ |
1460 | ++KUrl Info::uri() const |
1461 | ++{ |
1462 | ++ // TODO: |
1463 | ++ return KUrl(); |
1464 | ++ // KACTIVITYINFO_DBUS_CAST_RETURN( |
1465 | ++ // QString, KUrl, Private::s_store->uri(d->id)); |
1466 | ++} |
1467 | ++ |
1468 | ++KUrl Info::resourceUri() const |
1469 | ++{ |
1470 | ++ // TODO: |
1471 | ++ return KUrl(); |
1472 | ++ // KACTIVITYINFO_DBUS_CAST_RETURN( |
1473 | ++ // QString, KUrl, Private::s_store->resourceUri(d->id)); |
1474 | ++} |
1475 | ++ |
1476 | ++QString Info::id() const |
1477 | ++{ |
1478 | ++ return d->id; |
1479 | ++} |
1480 | ++ |
1481 | ++QString Info::name() const |
1482 | ++{ |
1483 | ++ KACTIVITYINFO_DBUS_CAST_RETURN( |
1484 | ++ QString, QString, Manager::self()->ActivityName(d->id)); |
1485 | ++} |
1486 | ++ |
1487 | ++QString Info::icon() const |
1488 | ++{ |
1489 | ++ KACTIVITYINFO_DBUS_CAST_RETURN( |
1490 | ++ QString, QString, Manager::self()->ActivityIcon(d->id)); |
1491 | ++} |
1492 | ++ |
1493 | ++Info::State Info::state() const |
1494 | ++{ |
1495 | ++ if (d->state == Invalid) { |
1496 | ++ QDBusReply < int > dbusReply = Manager::self()->ActivityState(d->id); |
1497 | ++ |
1498 | ++ if (dbusReply.isValid()) { |
1499 | ++ d->state = (State)(dbusReply.value()); |
1500 | ++ } |
1501 | ++ } |
1502 | ++ |
1503 | ++ return d->state; |
1504 | ++} |
1505 | ++ |
1506 | ++QString Info::name(const QString & id) |
1507 | ++{ |
1508 | ++ KACTIVITYINFO_DBUS_CAST_RETURN( |
1509 | ++ QString, QString, Manager::self()->ActivityName(id)); |
1510 | ++} |
1511 | ++ |
1512 | ++#undef KACTIVITYINFO_DBUS_CAST_RETURN |
1513 | ++ |
1514 | ++Info::Availability Info::availability() const |
1515 | ++{ |
1516 | ++ Availability result = Nothing; |
1517 | ++ |
1518 | ++ if (!Manager::isActivityServiceRunning()) { |
1519 | ++ return result; |
1520 | ++ } |
1521 | ++ |
1522 | ++ if (Manager::self()->ListActivities().value().contains(d->id)) { |
1523 | ++ result = BasicInfo; |
1524 | ++ |
1525 | ++ if (Manager::self()->IsBackstoreAvailable()) { |
1526 | ++ result = Everything; |
1527 | ++ } |
1528 | ++ } |
1529 | ++ |
1530 | ++ return result; |
1531 | ++} |
1532 | ++ |
1533 | ++} // namespace Activities |
1534 | ++ |
1535 | ++#include "info.moc" |
1536 | ++ |
1537 | +diff --git a/experimental/libkactivities/info.h b/experimental/libkactivities/info.h |
1538 | +new file mode 100644 |
1539 | +index 0000000..37524c6 |
1540 | +--- /dev/null |
1541 | ++++ b/experimental/libkactivities/info.h |
1542 | +@@ -0,0 +1,176 @@ |
1543 | ++/* |
1544 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1545 | ++ * |
1546 | ++ * This library is free software; you can redistribute it and/or |
1547 | ++ * modify it under the terms of the GNU Library General Public |
1548 | ++ * License version 2 as published by the Free Software Foundation. |
1549 | ++ * |
1550 | ++ * This library is distributed in the hope that it will be useful, |
1551 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1552 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1553 | ++ * Library General Public License for more details. |
1554 | ++ * |
1555 | ++ * You should have received a copy of the GNU Library General Public License |
1556 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
1557 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1558 | ++ * Boston, MA 02110-1301, USA. |
1559 | ++ */ |
1560 | ++ |
1561 | ++#ifndef ACTIVITIES_INFO_H_ |
1562 | ++#define ACTIVITIES_INFO_H_ |
1563 | ++ |
1564 | ++#include <QObject> |
1565 | ++#include <QWidget> |
1566 | ++#include <QString> |
1567 | ++#include <QStringList> |
1568 | ++ |
1569 | ++#include <kurl.h> |
1570 | ++#include <kdemacros.h> |
1571 | ++ |
1572 | ++namespace Activities { |
1573 | ++ |
1574 | ++class InfoPrivate; |
1575 | ++ |
1576 | ++/** |
1577 | ++ * This class provides info about an activity. Most methods in it |
1578 | ++ * require a Nepomuk backend running. |
1579 | ++ * |
1580 | ++ * @see Consumer for info about activities |
1581 | ++ * |
1582 | ++ * @since 4.5 |
1583 | ++ */ |
1584 | ++class KDE_EXPORT Info: public QObject |
1585 | ++{ |
1586 | ++ Q_OBJECT |
1587 | ++ |
1588 | ++ Q_PROPERTY(KUrl uri READ uri) |
1589 | ++ Q_PROPERTY(KUrl resourceUri READ resourceUri) |
1590 | ++ Q_PROPERTY(QString id READ id) |
1591 | ++ Q_PROPERTY(QString name READ name) |
1592 | ++ |
1593 | ++public: |
1594 | ++ explicit Info(const QString & activityId, QObject *parent=0); |
1595 | ++ ~Info(); |
1596 | ++ |
1597 | ++ /** |
1598 | ++ * @return true if the activity represented by this object exists and is valid |
1599 | ++ */ |
1600 | ++ bool isValid() const; |
1601 | ++ |
1602 | ++ /** |
1603 | ++ * Specifies which parts of this class are functional |
1604 | ++ */ |
1605 | ++ enum Availability { |
1606 | ++ Nothing = 0, ///< No activity info provided (isValid is false) |
1607 | ++ BasicInfo = 1, ///< Basic info is provided |
1608 | ++ Everything = 2 ///< Everything is available |
1609 | ++ }; |
1610 | ++ |
1611 | ++ /** |
1612 | ++ * State of the activity |
1613 | ++ */ |
1614 | ++ enum State { |
1615 | ++ Invalid = 0, |
1616 | ++ Running = 2, |
1617 | ++ Starting = 3, |
1618 | ++ Stopped = 4, |
1619 | ++ Stopping = 5 |
1620 | ++ }; |
1621 | ++ |
1622 | ++ /** |
1623 | ++ * @returns what info is provided by this instance of Info |
1624 | ++ */ |
1625 | ++ Availability availability() const; |
1626 | ++ |
1627 | ++ /** |
1628 | ++ * @returns the URI of this activity. The same URI is used by |
1629 | ++ * activities KIO slave. |
1630 | ++ * @note Functional only when availability is Everything |
1631 | ++ */ |
1632 | ++ KUrl uri() const; |
1633 | ++ |
1634 | ++ /** |
1635 | ++ * @returns the Nepomuk resource URI of this activity |
1636 | ++ * @note Functional only when availability is Everything |
1637 | ++ */ |
1638 | ++ KUrl resourceUri() const; |
1639 | ++ |
1640 | ++ /** |
1641 | ++ * @returns the id of the activity |
1642 | ++ */ |
1643 | ++ QString id() const; |
1644 | ++ |
1645 | ++ /** |
1646 | ++ * @returns the name of the activity |
1647 | ++ * @note Functional when availability is BasicInfo or Everything |
1648 | ++ */ |
1649 | ++ QString name() const; |
1650 | ++ |
1651 | ++ /** |
1652 | ++ * @returns the icon of the activity. Icon can be a |
1653 | ++ * freedesktop.org name or a file path. Or empty if |
1654 | ++ * no icon is set. |
1655 | ++ * @note Functional only when availability is Everything |
1656 | ++ */ |
1657 | ++ QString icon() const; |
1658 | ++ |
1659 | ++ /** |
1660 | ++ * @returns the state of the activity |
1661 | ++ */ |
1662 | ++ State state() const; |
1663 | ++ |
1664 | ++ /** |
1665 | ++ * This function is provided for convenience. |
1666 | ++ * @returns the name of the specified activity |
1667 | ++ * @param id id of the activity |
1668 | ++ */ |
1669 | ++ static QString name(const QString & id); |
1670 | ++ |
1671 | ++Q_SIGNALS: |
1672 | ++ /** |
1673 | ++ * Emitted when the activity's name, icon or description is changed |
1674 | ++ */ |
1675 | ++ void infoChanged(); |
1676 | ++ |
1677 | ++ /** |
1678 | ++ * Emitted when the activity is added |
1679 | ++ */ |
1680 | ++ void added(); |
1681 | ++ |
1682 | ++ /** |
1683 | ++ * Emitted when the activity is removed |
1684 | ++ */ |
1685 | ++ void removed(); |
1686 | ++ |
1687 | ++ /** |
1688 | ++ * Emitted when the activity is started |
1689 | ++ */ |
1690 | ++ void started(); |
1691 | ++ |
1692 | ++ /** |
1693 | ++ * Emitted when the activity is stopped |
1694 | ++ */ |
1695 | ++ void stopped(); |
1696 | ++ |
1697 | ++ /** |
1698 | ++ * Emitted when the activity changes state |
1699 | ++ * @param state new state of the activity |
1700 | ++ */ |
1701 | ++ void stateChanged(Info::State state); |
1702 | ++ |
1703 | ++private: |
1704 | ++ InfoPrivate * const d; |
1705 | ++ |
1706 | ++ Q_PRIVATE_SLOT(d, void activityStateChanged(const QString &, int)) |
1707 | ++ Q_PRIVATE_SLOT(d, void added(const QString &)) |
1708 | ++ Q_PRIVATE_SLOT(d, void removed(const QString &)) |
1709 | ++ Q_PRIVATE_SLOT(d, void started(const QString &)) |
1710 | ++ Q_PRIVATE_SLOT(d, void stopped(const QString &)) |
1711 | ++ Q_PRIVATE_SLOT(d, void infoChanged(const QString &)) |
1712 | ++ |
1713 | ++ friend class InfoPrivate; |
1714 | ++}; |
1715 | ++ |
1716 | ++} // namespace Activities |
1717 | ++ |
1718 | ++#endif // ACTIVITIES_INFO_H_ |
1719 | +diff --git a/experimental/libkactivities/info_p.h b/experimental/libkactivities/info_p.h |
1720 | +new file mode 100644 |
1721 | +index 0000000..724fe18 |
1722 | +--- /dev/null |
1723 | ++++ b/experimental/libkactivities/info_p.h |
1724 | +@@ -0,0 +1,46 @@ |
1725 | ++/* |
1726 | ++ * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1727 | ++ * |
1728 | ++ * This library is free software; you can redistribute it and/or |
1729 | ++ * modify it under the terms of the GNU Library General Public |
1730 | ++ * License version 2 as published by the Free Software Foundation. |
1731 | ++ * |
1732 | ++ * This library is distributed in the hope that it will be useful, |
1733 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1734 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1735 | ++ * Library General Public License for more details. |
1736 | ++ * |
1737 | ++ * You should have received a copy of the GNU Library General Public License |
1738 | ++ * along with this library; see the file COPYING.LIB. If not, write to |
1739 | ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1740 | ++ * Boston, MA 02110-1301, USA. |
1741 | ++ */ |
1742 | ++ |
1743 | ++#ifndef KACTIVITIESINFO_P_H_ |
1744 | ++#define KACTIVITIESINFO_P_H_ |
1745 | ++ |
1746 | ++#include "activitymanager_interface.h" |
1747 | ++#include "info.h" |
1748 | ++ |
1749 | ++namespace Activities { |
1750 | ++ |
1751 | ++class InfoPrivate { |
1752 | ++public: |
1753 | ++ InfoPrivate(Info * info, const QString & activityId); |
1754 | ++ |
1755 | ++ void activityStateChanged(const QString &, int); |
1756 | ++ |
1757 | ++ void added(const QString &) const; |
1758 | ++ void removed(const QString &) const; |
1759 | ++ void started(const QString &) const; |
1760 | ++ void stopped(const QString &) const; |
1761 | ++ void infoChanged(const QString &) const; |
1762 | ++ |
1763 | ++ Info *q; |
1764 | ++ Info::State state; |
1765 | ++ QString id; |
1766 | ++}; |
1767 | ++ |
1768 | ++} // namespace Activities |
1769 | ++ |
1770 | ++#endif // ACTIVITIES_INFO_P_H_ |
1771 | +diff --git a/experimental/libkactivities/kactivityconsumer.cpp b/experimental/libkactivities/kactivityconsumer.cpp |
1772 | +deleted file mode 100644 |
1773 | +index 5ce5443..0000000 |
1774 | +--- a/experimental/libkactivities/kactivityconsumer.cpp |
1775 | ++++ /dev/null |
1776 | +@@ -1,86 +0,0 @@ |
1777 | +-/* |
1778 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1779 | +- * |
1780 | +- * This library is free software; you can redistribute it and/or |
1781 | +- * modify it under the terms of the GNU Library General Public |
1782 | +- * License version 2 as published by the Free Software Foundation. |
1783 | +- * |
1784 | +- * This library is distributed in the hope that it will be useful, |
1785 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1786 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1787 | +- * Library General Public License for more details. |
1788 | +- * |
1789 | +- * You should have received a copy of the GNU Library General Public License |
1790 | +- * along with this library; see the file COPYING.LIB. If not, write to |
1791 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1792 | +- * Boston, MA 02110-1301, USA. |
1793 | +- */ |
1794 | +- |
1795 | +-#include "kactivityconsumer.h" |
1796 | +-#include "kactivityconsumer_p.h" |
1797 | +-#include "kactivitymanager_p.h" |
1798 | +- |
1799 | +-#include <kdebug.h> |
1800 | +- |
1801 | +-KActivityConsumer::KActivityConsumer(QObject * parent) |
1802 | +- : QObject(parent), d(new KActivityConsumerPrivate()) |
1803 | +-{ |
1804 | +- connect( |
1805 | +- KActivityManager::self(), SIGNAL(CurrentActivityChanged(const QString &)), |
1806 | +- this, SIGNAL(currentActivityChanged(const QString &)) |
1807 | +- ); |
1808 | +-} |
1809 | +- |
1810 | +-KActivityConsumer::~KActivityConsumer() |
1811 | +-{ |
1812 | +- delete d; |
1813 | +-} |
1814 | +- |
1815 | +-// macro defines a shorthand for validating and returning a d-bus result |
1816 | +-// @param TYPE type of the result |
1817 | +-// @param METHOD invocation of the d-bus method |
1818 | +-// @param DEFAULT value to be used if the reply was not valid |
1819 | +-#define KACTIVITYCONSUMER_DBUS_RETURN(TYPE, METHOD, DEFAULT) \ |
1820 | +- QDBusReply < TYPE > dbusReply = METHOD; \ |
1821 | +- if (dbusReply.isValid()) { \ |
1822 | +- return dbusReply.value(); \ |
1823 | +- } else { \ |
1824 | +- kDebug() << "d-bus reply was invalid" \ |
1825 | +- << dbusReply.value() \ |
1826 | +- << dbusReply.error(); \ |
1827 | +- return DEFAULT; \ |
1828 | +- } |
1829 | +- |
1830 | +-QString KActivityConsumer::currentActivity() const |
1831 | +-{ |
1832 | +- KACTIVITYCONSUMER_DBUS_RETURN( |
1833 | +- QString, KActivityManager::self()->CurrentActivity(), QString() ); |
1834 | +-} |
1835 | +- |
1836 | +-QStringList KActivityConsumer::listActivities(KActivityInfo::State state) const |
1837 | +-{ |
1838 | +- KACTIVITYCONSUMER_DBUS_RETURN( |
1839 | +- QStringList, KActivityManager::self()->ListActivities(state), QStringList() ); |
1840 | +-} |
1841 | +- |
1842 | +-QStringList KActivityConsumer::listActivities() const |
1843 | +-{ |
1844 | +- KACTIVITYCONSUMER_DBUS_RETURN( |
1845 | +- QStringList, KActivityManager::self()->ListActivities(), QStringList() ); |
1846 | +-} |
1847 | +- |
1848 | +-#undef KACTIVITYCONSUMER_DBUS_RETURN |
1849 | +- |
1850 | +-KActivityConsumer::ServiceStatus KActivityConsumer::serviceStatus() |
1851 | +-{ |
1852 | +- if (!KActivityManager::isActivityServiceRunning()) { |
1853 | +- return NotRunning; |
1854 | +- } |
1855 | +- |
1856 | +- if (!KActivityManager::self()->IsBackstoreAvailable()) { |
1857 | +- return BareFunctionality; |
1858 | +- } |
1859 | +- |
1860 | +- return FullFunctionality; |
1861 | +-} |
1862 | +- |
1863 | +diff --git a/experimental/libkactivities/kactivityconsumer.h b/experimental/libkactivities/kactivityconsumer.h |
1864 | +deleted file mode 100644 |
1865 | +index 9be996b..0000000 |
1866 | +--- a/experimental/libkactivities/kactivityconsumer.h |
1867 | ++++ /dev/null |
1868 | +@@ -1,118 +0,0 @@ |
1869 | +-/* |
1870 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1871 | +- * |
1872 | +- * This library is free software; you can redistribute it and/or |
1873 | +- * modify it under the terms of the GNU Library General Public |
1874 | +- * License version 2 as published by the Free Software Foundation. |
1875 | +- * |
1876 | +- * This library is distributed in the hope that it will be useful, |
1877 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1878 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1879 | +- * Library General Public License for more details. |
1880 | +- * |
1881 | +- * You should have received a copy of the GNU Library General Public License |
1882 | +- * along with this library; see the file COPYING.LIB. If not, write to |
1883 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
1884 | +- * Boston, MA 02110-1301, USA. |
1885 | +- */ |
1886 | +- |
1887 | +-#ifndef ACTIVITY_CONSUMER_H |
1888 | +-#define ACTIVITY_CONSUMER_H |
1889 | +- |
1890 | +-#include <QObject> |
1891 | +-#include <QWidget> |
1892 | +-#include <QString> |
1893 | +-#include <QStringList> |
1894 | +- |
1895 | +-#include "kactivityinfo.h" |
1896 | +- |
1897 | +-#include <kurl.h> |
1898 | +-#include <kdemacros.h> |
1899 | +- |
1900 | +-class KActivityConsumerPrivate; |
1901 | +-/** |
1902 | +- * Contextual information can be, from the user's point of view, divided |
1903 | +- * into three aspects - "who am I?", "where am I?" (what are my surroundings?) |
1904 | +- * and "what am I doing?". |
1905 | +- * |
1906 | +- * Activities deal with the last one - "what am I doing?". The current activity |
1907 | +- * refers to what the user is doing at the moment, while the other activities represent |
1908 | +- * things that he/she was doing before, and probably will be doing again. |
1909 | +- * |
1910 | +- * Activity is an abstract concept whose meaning can differ from one user to another. |
1911 | +- * Typical examples of activities are "developing a KDE project", "studying the |
1912 | +- * 19th century art", "composing music", "lazing on a Sunday afternoon" etc. |
1913 | +- * |
1914 | +- * Every activity can have applications, documents, or other types of resources |
1915 | +- * assigned to it. |
1916 | +- * |
1917 | +- * KActivityConsumer provides an entry-level API for supporting activities in an |
1918 | +- * application - to react to the changes to the current activity as well as |
1919 | +- * registering the resources with its windows. |
1920 | +- * |
1921 | +- * Resource can be anything that is identifiable by an URI (for example, |
1922 | +- * a local file or a web page) |
1923 | +- * |
1924 | +- * @since 4.5 |
1925 | +- */ |
1926 | +-class KDE_EXPORT KActivityConsumer: public QObject { |
1927 | +- Q_OBJECT |
1928 | +- |
1929 | +- Q_PROPERTY(QString currentActivity READ currentActivity) |
1930 | +- Q_PROPERTY(QStringList activities READ listActivities) |
1931 | +- |
1932 | +-public: |
1933 | +- /** |
1934 | +- * Different states of the activities service |
1935 | +- */ |
1936 | +- enum ServiceStatus { |
1937 | +- NotRunning, ///< Service is not running |
1938 | +- BareFunctionality, ///< Service is running without a sane backend |
1939 | +- FullFunctionality ///< Service is running, and a backend is available |
1940 | +- }; |
1941 | +- |
1942 | +- explicit KActivityConsumer(QObject * parent = 0); |
1943 | +- |
1944 | +- ~KActivityConsumer(); |
1945 | +- |
1946 | +- /** |
1947 | +- * @returns the id of the current activity |
1948 | +- */ |
1949 | +- QString currentActivity() const; |
1950 | +- |
1951 | +- /** |
1952 | +- * @returns the list of activities filtered by state |
1953 | +- * @param state state of the activity |
1954 | +- */ |
1955 | +- QStringList listActivities(KActivityInfo::State state) const; |
1956 | +- |
1957 | +- /** |
1958 | +- * @returns the list of all existing activities |
1959 | +- */ |
1960 | +- QStringList listActivities() const; |
1961 | +- |
1962 | +- /** |
1963 | +- * @returns status of the activities service |
1964 | +- */ |
1965 | +- static ServiceStatus serviceStatus(); |
1966 | +- |
1967 | +-Q_SIGNALS: |
1968 | +- /** |
1969 | +- * This signal is emitted when the global |
1970 | +- * activity is changed |
1971 | +- * @param id id of the new current activity |
1972 | +- */ |
1973 | +- void currentActivityChanged(const QString & id); |
1974 | +- |
1975 | +- /** |
1976 | +- * This signal is emitted when the activity service |
1977 | +- * goes online or offline |
1978 | +- * @param status new status of the service |
1979 | +- */ |
1980 | +- void serviceStatusChanged(KActivityConsumer::ServiceStatus status); |
1981 | +- |
1982 | +-private: |
1983 | +- KActivityConsumerPrivate * const d; |
1984 | +-}; |
1985 | +- |
1986 | +-#endif // ACTIVITY_CONSUMER_H |
1987 | +diff --git a/experimental/libkactivities/kactivityconsumer_p.h b/experimental/libkactivities/kactivityconsumer_p.h |
1988 | +deleted file mode 100644 |
1989 | +index 3e78120..0000000 |
1990 | +--- a/experimental/libkactivities/kactivityconsumer_p.h |
1991 | ++++ /dev/null |
1992 | +@@ -1,27 +0,0 @@ |
1993 | +-/* |
1994 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
1995 | +- * |
1996 | +- * This library is free software; you can redistribute it and/or |
1997 | +- * modify it under the terms of the GNU Library General Public |
1998 | +- * License version 2 as published by the Free Software Foundation. |
1999 | +- * |
2000 | +- * This library is distributed in the hope that it will be useful, |
2001 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2002 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2003 | +- * Library General Public License for more details. |
2004 | +- * |
2005 | +- * You should have received a copy of the GNU Library General Public License |
2006 | +- * along with this library; see the file COPYING.LIB. If not, write to |
2007 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
2008 | +- * Boston, MA 02110-1301, USA. |
2009 | +- */ |
2010 | +- |
2011 | +-#ifndef ACTIVITYCONSUMER_P_H |
2012 | +-#define ACTIVITYCONSUMER_P_H |
2013 | +- |
2014 | +-#include "activitymanager_interface.h" |
2015 | +- |
2016 | +-class KActivityConsumerPrivate { |
2017 | +-}; |
2018 | +- |
2019 | +-#endif // ACTIVITY_CONSUMER_H |
2020 | +diff --git a/experimental/libkactivities/kactivitycontroller.cpp b/experimental/libkactivities/kactivitycontroller.cpp |
2021 | +deleted file mode 100644 |
2022 | +index 8a6aa3e..0000000 |
2023 | +--- a/experimental/libkactivities/kactivitycontroller.cpp |
2024 | ++++ /dev/null |
2025 | +@@ -1,89 +0,0 @@ |
2026 | +-/* |
2027 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2028 | +- * |
2029 | +- * This library is free software; you can redistribute it and/or |
2030 | +- * modify it under the terms of the GNU Library General Public |
2031 | +- * License version 2 as published by the Free Software Foundation. |
2032 | +- * |
2033 | +- * This library is distributed in the hope that it will be useful, |
2034 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2035 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2036 | +- * Library General Public License for more details. |
2037 | +- * |
2038 | +- * You should have received a copy of the GNU Library General Public License |
2039 | +- * along with this library; see the file COPYING.LIB. If not, write to |
2040 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
2041 | +- * Boston, MA 02110-1301, USA. |
2042 | +- */ |
2043 | +- |
2044 | +-#include "kactivitycontroller.h" |
2045 | +-#include "kactivityconsumer_p.h" |
2046 | +-#include "kactivitymanager_p.h" |
2047 | +- |
2048 | +-#include <QObject> |
2049 | +- |
2050 | +-#include <kdebug.h> |
2051 | +- |
2052 | +-class KActivityController::Private: public QObject { |
2053 | +-public: |
2054 | +- Private(KActivityController * parent) |
2055 | +- : q(parent) |
2056 | +- { |
2057 | +- } |
2058 | +- |
2059 | +-private: |
2060 | +- KActivityController * const q; |
2061 | +-}; |
2062 | +- |
2063 | +-KActivityController::KActivityController(QObject * parent) |
2064 | +- : KActivityConsumer(parent), d(new Private(this)) |
2065 | +-{ |
2066 | +- connect(KActivityManager::self(), SIGNAL(ActivityAdded(QString)), |
2067 | +- this, SIGNAL(activityAdded(QString))); |
2068 | +- |
2069 | +- connect(KActivityManager::self(), SIGNAL(ActivityRemoved(QString)), |
2070 | +- this, SIGNAL(activityRemoved(QString))); |
2071 | +- |
2072 | +-} |
2073 | +- |
2074 | +-KActivityController::~KActivityController() |
2075 | +-{ |
2076 | +- delete d; |
2077 | +-} |
2078 | +- |
2079 | +-void KActivityController::setActivityName(const QString & id, const QString & name) |
2080 | +-{ |
2081 | +- KActivityManager::self()->SetActivityName(id, name); |
2082 | +-} |
2083 | +- |
2084 | +-void KActivityController::setActivityIcon(const QString & id, const QString & icon) |
2085 | +-{ |
2086 | +- KActivityManager::self()->SetActivityIcon(id, icon); |
2087 | +-} |
2088 | +- |
2089 | +-bool KActivityController::setCurrentActivity(const QString & id) |
2090 | +-{ |
2091 | +- return KActivityManager::self()->SetCurrentActivity(id); |
2092 | +-} |
2093 | +- |
2094 | +-QString KActivityController::addActivity(const QString & name) |
2095 | +-{ |
2096 | +- return KActivityManager::self()->AddActivity(name); |
2097 | +-} |
2098 | +- |
2099 | +-void KActivityController::removeActivity(const QString & id) |
2100 | +-{ |
2101 | +- KActivityManager::self()->RemoveActivity(id); |
2102 | +-} |
2103 | +- |
2104 | +-void KActivityController::stopActivity(const QString & id) |
2105 | +-{ |
2106 | +- KActivityManager::self()->StopActivity(id); |
2107 | +-} |
2108 | +- |
2109 | +-void KActivityController::startActivity(const QString & id) |
2110 | +-{ |
2111 | +- KActivityManager::self()->StartActivity(id); |
2112 | +-} |
2113 | +- |
2114 | +-#include "kactivitycontroller.moc" |
2115 | +diff --git a/experimental/libkactivities/kactivitycontroller.h b/experimental/libkactivities/kactivitycontroller.h |
2116 | +deleted file mode 100644 |
2117 | +index 766152d..0000000 |
2118 | +--- a/experimental/libkactivities/kactivitycontroller.h |
2119 | ++++ /dev/null |
2120 | +@@ -1,117 +0,0 @@ |
2121 | +-/* |
2122 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2123 | +- * |
2124 | +- * This library is free software; you can redistribute it and/or |
2125 | +- * modify it under the terms of the GNU Library General Public |
2126 | +- * License version 2 as published by the Free Software Foundation. |
2127 | +- * |
2128 | +- * This library is distributed in the hope that it will be useful, |
2129 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2130 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2131 | +- * Library General Public License for more details. |
2132 | +- * |
2133 | +- * You should have received a copy of the GNU Library General Public License |
2134 | +- * along with this library; see the file COPYING.LIB. If not, write to |
2135 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
2136 | +- * Boston, MA 02110-1301, USA. |
2137 | +- */ |
2138 | +- |
2139 | +-#ifndef ACTIVITY_CONTROLLER_H |
2140 | +-#define ACTIVITY_CONTROLLER_H |
2141 | +- |
2142 | +-#include <QObject> |
2143 | +-#include <QWidget> |
2144 | +-#include <QString> |
2145 | +-#include <QStringList> |
2146 | +- |
2147 | +-#include "kactivityconsumer.h" |
2148 | +- |
2149 | +-#include <kurl.h> |
2150 | +-#include <kdemacros.h> |
2151 | +- |
2152 | +-/** |
2153 | +- * This class provides methods for controlling and managing |
2154 | +- * the activities. |
2155 | +- * |
2156 | +- * @see KActivityConsumer for info about activities |
2157 | +- * |
2158 | +- * @since 4.5 |
2159 | +- */ |
2160 | +-class KDE_EXPORT KActivityController: public KActivityConsumer |
2161 | +-{ |
2162 | +- Q_OBJECT |
2163 | +- |
2164 | +- Q_PROPERTY(QString currentActivity READ currentActivity WRITE setCurrentActivity) |
2165 | +- |
2166 | +-public: |
2167 | +- explicit KActivityController(QObject * parent = 0); |
2168 | +- |
2169 | +- ~KActivityController(); |
2170 | +- |
2171 | +- /** |
2172 | +- * Sets the name of the specified activity |
2173 | +- * @param id id of the activity |
2174 | +- * @param name name to be set |
2175 | +- */ |
2176 | +- void setActivityName(const QString & id, const QString & name); |
2177 | +- |
2178 | +- /** |
2179 | +- * Sets the icon of the specified activity |
2180 | +- * @param id id of the activity |
2181 | +- * @param icon icon to be set - freedesktop.org name or file path |
2182 | +- */ |
2183 | +- void setActivityIcon(const QString & id, const QString & icon); |
2184 | +- |
2185 | +- /** |
2186 | +- * Sets the current activity |
2187 | +- * @param id id of the activity to make current |
2188 | +- * @returns true if successful |
2189 | +- */ |
2190 | +- bool setCurrentActivity(const QString & id); |
2191 | +- |
2192 | +- /** |
2193 | +- * Adds a new activity |
2194 | +- * @param name name of the activity |
2195 | +- * @returns id of the newly created activity |
2196 | +- */ |
2197 | +- QString addActivity(const QString & name); |
2198 | +- |
2199 | +- /** |
2200 | +- * Removes the specified activity |
2201 | +- * @param id id of the activity to delete |
2202 | +- */ |
2203 | +- void removeActivity(const QString & id); |
2204 | +- |
2205 | +- /** |
2206 | +- * Stops the activity |
2207 | +- * @param id id of the activity to stop |
2208 | +- */ |
2209 | +- void stopActivity(const QString & id); |
2210 | +- |
2211 | +- /** |
2212 | +- * Starts the activity |
2213 | +- * @param id id of the activity to start |
2214 | +- */ |
2215 | +- void startActivity(const QString & id); |
2216 | +- |
2217 | +-Q_SIGNALS: |
2218 | +- /** |
2219 | +- * This signal is emitted when the global |
2220 | +- * activity is changed |
2221 | +- * @param id id of the new current activity |
2222 | +- */ |
2223 | +- void activityAdded(const QString & id); |
2224 | +- |
2225 | +- /** |
2226 | +- * This signal is emitted when the activity |
2227 | +- * is removed |
2228 | +- * @param id id of the removed activity |
2229 | +- */ |
2230 | +- void activityRemoved(const QString & id); |
2231 | +- |
2232 | +-private: |
2233 | +- class Private; |
2234 | +- Private * const d; |
2235 | +-}; |
2236 | +- |
2237 | +-#endif // ACTIVITY_CONTROLLER_H |
2238 | +diff --git a/experimental/libkactivities/kactivityinfo.cpp b/experimental/libkactivities/kactivityinfo.cpp |
2239 | +deleted file mode 100644 |
2240 | +index 5987e9d..0000000 |
2241 | +--- a/experimental/libkactivities/kactivityinfo.cpp |
2242 | ++++ /dev/null |
2243 | +@@ -1,180 +0,0 @@ |
2244 | +-/* |
2245 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2246 | +- * |
2247 | +- * This library is free software; you can redistribute it and/or |
2248 | +- * modify it under the terms of the GNU Library General Public |
2249 | +- * License version 2 as published by the Free Software Foundation. |
2250 | +- * |
2251 | +- * This library is distributed in the hope that it will be useful, |
2252 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2253 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2254 | +- * Library General Public License for more details. |
2255 | +- * |
2256 | +- * You should have received a copy of the GNU Library General Public License |
2257 | +- * along with this library; see the file COPYING.LIB. If not, write to |
2258 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
2259 | +- * Boston, MA 02110-1301, USA. |
2260 | +- */ |
2261 | +- |
2262 | +-#include "kactivityinfo.h" |
2263 | +-#include "kactivityinfo_p.h" |
2264 | +- |
2265 | +-#include <kdebug.h> |
2266 | +- |
2267 | +-#include "kactivitymanager_p.h" |
2268 | +- |
2269 | +-// Private |
2270 | +- |
2271 | +-KActivityInfo::Private::Private(KActivityInfo *info, const QString &activityId) |
2272 | +- : q(info), |
2273 | +- state(KActivityInfo::Invalid), |
2274 | +- id(activityId) |
2275 | +-{ |
2276 | +- KActivityManager::self(); |
2277 | +-} |
2278 | +- |
2279 | +-#define IMPLEMENT_SIGNAL_HANDLER(ORIGINAL, INTERNAL) \ |
2280 | +- void KActivityInfo::Private::INTERNAL(const QString & _id) const \ |
2281 | +- { \ |
2282 | +- if (id == _id) emit q->INTERNAL(); \ |
2283 | +- } |
2284 | +- |
2285 | +-IMPLEMENT_SIGNAL_HANDLER(ActivityAdded, added) |
2286 | +-IMPLEMENT_SIGNAL_HANDLER(ActivityRemoved, removed) |
2287 | +-IMPLEMENT_SIGNAL_HANDLER(ActivityStarted, started) |
2288 | +-IMPLEMENT_SIGNAL_HANDLER(ActivityStopped, stopped) |
2289 | +-IMPLEMENT_SIGNAL_HANDLER(ActivityChanged, infoChanged) |
2290 | +- |
2291 | +-#undef IMPLEMENT_SIGNAL_HANDLER |
2292 | +- |
2293 | +-void KActivityInfo::Private::activityStateChanged(const QString & idChanged, int newState) |
2294 | +-{ |
2295 | +- if (idChanged == id) { |
2296 | +- state = static_cast<KActivityInfo::State>(newState); |
2297 | +- emit q->stateChanged(state); |
2298 | +- } |
2299 | +-} |
2300 | +- |
2301 | +-// KActivityInfo |
2302 | +-KActivityInfo::KActivityInfo(const QString &activityId, QObject *parent) |
2303 | +- : QObject(parent), |
2304 | +- d(new Private(this, activityId)) |
2305 | +-{ |
2306 | +- d->id = activityId; |
2307 | +- connect(KActivityManager::self(), SIGNAL(ActivityStateChanged(const QString &, int)), |
2308 | +- this, SLOT(activityStateChanged(const QString &, int))); |
2309 | +- |
2310 | +- connect(KActivityManager::self(), SIGNAL(ActivityChanged(const QString &)), |
2311 | +- this, SLOT(infoChanged(const QString &))); |
2312 | +- |
2313 | +- connect(KActivityManager::self(), SIGNAL(ActivityAdded(const QString &)), |
2314 | +- this, SLOT(added(const QString &))); |
2315 | +- |
2316 | +- connect(KActivityManager::self(), SIGNAL(ActivityRemoved(const QString &)), |
2317 | +- this, SLOT(removed(const QString &))); |
2318 | +- |
2319 | +- connect(KActivityManager::self(), SIGNAL(ActivityStarted(const QString &)), |
2320 | +- this, SLOT(started(const QString &))); |
2321 | +- |
2322 | +- connect(KActivityManager::self(), SIGNAL(ActivityStopped(const QString &)), |
2323 | +- this, SLOT(stopped(const QString &))); |
2324 | +-} |
2325 | +- |
2326 | +-KActivityInfo::~KActivityInfo() |
2327 | +-{ |
2328 | +- delete d; |
2329 | +-} |
2330 | +- |
2331 | +-bool KActivityInfo::isValid() const |
2332 | +-{ |
2333 | +- return (state() != Invalid); |
2334 | +-} |
2335 | +- |
2336 | +-// macro defines a shorthand for validating and returning a d-bus result |
2337 | +-// @param REPLY_TYPE type of the d-bus result |
2338 | +-// @param CAST_TYPE type to which to cast the result |
2339 | +-// @param METHOD invocation of the d-bus method |
2340 | +-#define KACTIVITYINFO_DBUS_CAST_RETURN(REPLY_TYPE, CAST_TYPE, METHOD) \ |
2341 | +- QDBusReply < REPLY_TYPE > dbusReply = METHOD; \ |
2342 | +- if (dbusReply.isValid()) { \ |
2343 | +- return (CAST_TYPE)(dbusReply.value()); \ |
2344 | +- } else { \ |
2345 | +- return CAST_TYPE(); \ |
2346 | +- } |
2347 | +- |
2348 | +- |
2349 | +-KUrl KActivityInfo::uri() const |
2350 | +-{ |
2351 | +- // TODO: |
2352 | +- return KUrl(); |
2353 | +- // KACTIVITYINFO_DBUS_CAST_RETURN( |
2354 | +- // QString, KUrl, Private::s_store->uri(d->id)); |
2355 | +-} |
2356 | +- |
2357 | +-KUrl KActivityInfo::resourceUri() const |
2358 | +-{ |
2359 | +- // TODO: |
2360 | +- return KUrl(); |
2361 | +- // KACTIVITYINFO_DBUS_CAST_RETURN( |
2362 | +- // QString, KUrl, Private::s_store->resourceUri(d->id)); |
2363 | +-} |
2364 | +- |
2365 | +-QString KActivityInfo::id() const |
2366 | +-{ |
2367 | +- return d->id; |
2368 | +-} |
2369 | +- |
2370 | +-QString KActivityInfo::name() const |
2371 | +-{ |
2372 | +- KACTIVITYINFO_DBUS_CAST_RETURN( |
2373 | +- QString, QString, KActivityManager::self()->ActivityName(d->id)); |
2374 | +-} |
2375 | +- |
2376 | +-QString KActivityInfo::icon() const |
2377 | +-{ |
2378 | +- KACTIVITYINFO_DBUS_CAST_RETURN( |
2379 | +- QString, QString, KActivityManager::self()->ActivityIcon(d->id)); |
2380 | +-} |
2381 | +- |
2382 | +-KActivityInfo::State KActivityInfo::state() const |
2383 | +-{ |
2384 | +- if (d->state == Invalid) { |
2385 | +- QDBusReply < int > dbusReply = KActivityManager::self()->ActivityState(d->id); |
2386 | +- |
2387 | +- if (dbusReply.isValid()) { |
2388 | +- d->state = (State)(dbusReply.value()); |
2389 | +- } |
2390 | +- } |
2391 | +- |
2392 | +- return d->state; |
2393 | +-} |
2394 | +- |
2395 | +-QString KActivityInfo::name(const QString & id) |
2396 | +-{ |
2397 | +- KACTIVITYINFO_DBUS_CAST_RETURN( |
2398 | +- QString, QString, KActivityManager::self()->ActivityName(id)); |
2399 | +-} |
2400 | +- |
2401 | +-#undef KACTIVITYINFO_DBUS_CAST_RETURN |
2402 | +- |
2403 | +-KActivityInfo::Availability KActivityInfo::availability() const |
2404 | +-{ |
2405 | +- Availability result = Nothing; |
2406 | +- |
2407 | +- if (!KActivityManager::isActivityServiceRunning()) { |
2408 | +- return result; |
2409 | +- } |
2410 | +- |
2411 | +- if (KActivityManager::self()->ListActivities().value().contains(d->id)) { |
2412 | +- result = BasicInfo; |
2413 | +- |
2414 | +- if (KActivityManager::self()->IsBackstoreAvailable()) { |
2415 | +- result = Everything; |
2416 | +- } |
2417 | +- } |
2418 | +- |
2419 | +- return result; |
2420 | +-} |
2421 | +- |
2422 | +-#include "kactivityinfo.moc" |
2423 | +- |
2424 | +diff --git a/experimental/libkactivities/kactivityinfo.h b/experimental/libkactivities/kactivityinfo.h |
2425 | +deleted file mode 100644 |
2426 | +index 3637c93..0000000 |
2427 | +--- a/experimental/libkactivities/kactivityinfo.h |
2428 | ++++ /dev/null |
2429 | +@@ -1,169 +0,0 @@ |
2430 | +-/* |
2431 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2432 | +- * |
2433 | +- * This library is free software; you can redistribute it and/or |
2434 | +- * modify it under the terms of the GNU Library General Public |
2435 | +- * License version 2 as published by the Free Software Foundation. |
2436 | +- * |
2437 | +- * This library is distributed in the hope that it will be useful, |
2438 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2439 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2440 | +- * Library General Public License for more details. |
2441 | +- * |
2442 | +- * You should have received a copy of the GNU Library General Public License |
2443 | +- * along with this library; see the file COPYING.LIB. If not, write to |
2444 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
2445 | +- * Boston, MA 02110-1301, USA. |
2446 | +- */ |
2447 | +- |
2448 | +-#ifndef ACTIVITY_INFO_H |
2449 | +-#define ACTIVITY_INFO_H |
2450 | +- |
2451 | +-#include <QObject> |
2452 | +-#include <QWidget> |
2453 | +-#include <QString> |
2454 | +-#include <QStringList> |
2455 | +- |
2456 | +-#include <kurl.h> |
2457 | +-#include <kdemacros.h> |
2458 | +- |
2459 | +-/** |
2460 | +- * This class provides info about an activity. Most methods in it |
2461 | +- * require a Nepomuk backend running. |
2462 | +- * |
2463 | +- * @see KActivityConsumer for info about activities |
2464 | +- * |
2465 | +- * @since 4.5 |
2466 | +- */ |
2467 | +-class KDE_EXPORT KActivityInfo: public QObject |
2468 | +-{ |
2469 | +- Q_OBJECT |
2470 | +- |
2471 | +- Q_PROPERTY(KUrl uri READ uri) |
2472 | +- Q_PROPERTY(KUrl resourceUri READ resourceUri) |
2473 | +- Q_PROPERTY(QString id READ id) |
2474 | +- Q_PROPERTY(QString name READ name) |
2475 | +- |
2476 | +-public: |
2477 | +- explicit KActivityInfo(const QString & activityId, QObject *parent=0); |
2478 | +- ~KActivityInfo(); |
2479 | +- |
2480 | +- /** |
2481 | +- * @return true if the activity represented by this object exists and is valid |
2482 | +- */ |
2483 | +- bool isValid() const; |
2484 | +- |
2485 | +- /** |
2486 | +- * Specifies which parts of this class are functional |
2487 | +- */ |
2488 | +- enum Availability { |
2489 | +- Nothing = 0, ///< No activity info provided (isValid is false) |
2490 | +- BasicInfo = 1, ///< Basic info is provided |
2491 | +- Everything = 2 ///< Everything is available |
2492 | +- }; |
2493 | +- |
2494 | +- /** |
2495 | +- * State of the activity |
2496 | +- */ |
2497 | +- enum State { |
2498 | +- Invalid = 0, |
2499 | +- Running = 2, |
2500 | +- Starting = 3, |
2501 | +- Stopped = 4, |
2502 | +- Stopping = 5 |
2503 | +- }; |
2504 | +- |
2505 | +- /** |
2506 | +- * @returns what info is provided by this instance of KActivityInfo |
2507 | +- */ |
2508 | +- Availability availability() const; |
2509 | +- |
2510 | +- /** |
2511 | +- * @returns the URI of this activity. The same URI is used by |
2512 | +- * activities KIO slave. |
2513 | +- * @note Functional only when availability is Everything |
2514 | +- */ |
2515 | +- KUrl uri() const; |
2516 | +- |
2517 | +- /** |
2518 | +- * @returns the Nepomuk resource URI of this activity |
2519 | +- * @note Functional only when availability is Everything |
2520 | +- */ |
2521 | +- KUrl resourceUri() const; |
2522 | +- |
2523 | +- /** |
2524 | +- * @returns the id of the activity |
2525 | +- */ |
2526 | +- QString id() const; |
2527 | +- |
2528 | +- /** |
2529 | +- * @returns the name of the activity |
2530 | +- * @note Functional when availability is BasicInfo or Everything |
2531 | +- */ |
2532 | +- QString name() const; |
2533 | +- |
2534 | +- /** |
2535 | +- * @returns the icon of the activity. Icon can be a |
2536 | +- * freedesktop.org name or a file path. Or empty if |
2537 | +- * no icon is set. |
2538 | +- * @note Functional only when availability is Everything |
2539 | +- */ |
2540 | +- QString icon() const; |
2541 | +- |
2542 | +- /** |
2543 | +- * @returns the state of the activity |
2544 | +- */ |
2545 | +- State state() const; |
2546 | +- |
2547 | +- /** |
2548 | +- * This function is provided for convenience. |
2549 | +- * @returns the name of the specified activity |
2550 | +- * @param id id of the activity |
2551 | +- */ |
2552 | +- static QString name(const QString & id); |
2553 | +- |
2554 | +-Q_SIGNALS: |
2555 | +- /** |
2556 | +- * Emitted when the activity's name, icon or description is changed |
2557 | +- */ |
2558 | +- void infoChanged(); |
2559 | +- |
2560 | +- /** |
2561 | +- * Emitted when the activity is added |
2562 | +- */ |
2563 | +- void added(); |
2564 | +- |
2565 | +- /** |
2566 | +- * Emitted when the activity is removed |
2567 | +- */ |
2568 | +- void removed(); |
2569 | +- |
2570 | +- /** |
2571 | +- * Emitted when the activity is started |
2572 | +- */ |
2573 | +- void started(); |
2574 | +- |
2575 | +- /** |
2576 | +- * Emitted when the activity is stopped |
2577 | +- */ |
2578 | +- void stopped(); |
2579 | +- |
2580 | +- /** |
2581 | +- * Emitted when the activity changes state |
2582 | +- * @param state new state of the activity |
2583 | +- */ |
2584 | +- void stateChanged(KActivityInfo::State state); |
2585 | +- |
2586 | +-private: |
2587 | +- class Private; |
2588 | +- Private * const d; |
2589 | +- |
2590 | +- Q_PRIVATE_SLOT(d, void activityStateChanged(const QString &, int)) |
2591 | +- Q_PRIVATE_SLOT(d, void added(const QString &)) |
2592 | +- Q_PRIVATE_SLOT(d, void removed(const QString &)) |
2593 | +- Q_PRIVATE_SLOT(d, void started(const QString &)) |
2594 | +- Q_PRIVATE_SLOT(d, void stopped(const QString &)) |
2595 | +- Q_PRIVATE_SLOT(d, void infoChanged(const QString &)) |
2596 | +-}; |
2597 | +- |
2598 | +-#endif // ACTIVITY_INFO_H |
2599 | +diff --git a/experimental/libkactivities/kactivityinfo_p.h b/experimental/libkactivities/kactivityinfo_p.h |
2600 | +deleted file mode 100644 |
2601 | +index fe3772a..0000000 |
2602 | +--- a/experimental/libkactivities/kactivityinfo_p.h |
2603 | ++++ /dev/null |
2604 | +@@ -1,42 +0,0 @@ |
2605 | +-/* |
2606 | +- * Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2607 | +- * |
2608 | +- * This library is free software; you can redistribute it and/or |
2609 | +- * modify it under the terms of the GNU Library General Public |
2610 | +- * License version 2 as published by the Free Software Foundation. |
2611 | +- * |
2612 | +- * This library is distributed in the hope that it will be useful, |
2613 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2614 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2615 | +- * Library General Public License for more details. |
2616 | +- * |
2617 | +- * You should have received a copy of the GNU Library General Public License |
2618 | +- * along with this library; see the file COPYING.LIB. If not, write to |
2619 | +- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
2620 | +- * Boston, MA 02110-1301, USA. |
2621 | +- */ |
2622 | +- |
2623 | +-#ifndef KACTIVITYINFO_P_H |
2624 | +-#define KACTIVITYINFO_P_H |
2625 | +- |
2626 | +-#include "activitymanager_interface.h" |
2627 | +-#include "kactivityinfo.h" |
2628 | +- |
2629 | +-class KActivityInfo::Private { |
2630 | +-public: |
2631 | +- Private(KActivityInfo *info, const QString &activityId); |
2632 | +- |
2633 | +- void activityStateChanged(const QString &, int); |
2634 | +- |
2635 | +- void added(const QString &) const; |
2636 | +- void removed(const QString &) const; |
2637 | +- void started(const QString &) const; |
2638 | +- void stopped(const QString &) const; |
2639 | +- void infoChanged(const QString &) const; |
2640 | +- |
2641 | +- KActivityInfo *q; |
2642 | +- KActivityInfo::State state; |
2643 | +- QString id; |
2644 | +-}; |
2645 | +- |
2646 | +-#endif // KACTIVITYINFO_P_H |
2647 | +diff --git a/experimental/libkactivities/kactivitymanager_p.cpp b/experimental/libkactivities/kactivitymanager_p.cpp |
2648 | +deleted file mode 100644 |
2649 | +index 1e2db56..0000000 |
2650 | +--- a/experimental/libkactivities/kactivitymanager_p.cpp |
2651 | ++++ /dev/null |
2652 | +@@ -1,83 +0,0 @@ |
2653 | +-/* |
2654 | +- * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2655 | +- * |
2656 | +- * This program is free software; you can redistribute it and/or modify |
2657 | +- * it under the terms of the GNU General Public License version 2, |
2658 | +- * or (at your option) any later version, as published by the Free |
2659 | +- * Software Foundation |
2660 | +- * |
2661 | +- * This program is distributed in the hope that it will be useful, |
2662 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2663 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2664 | +- * GNU General Public License for more details |
2665 | +- * |
2666 | +- * You should have received a copy of the GNU General Public |
2667 | +- * License along with this program; if not, write to the |
2668 | +- * Free Software Foundation, Inc., |
2669 | +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2670 | +- */ |
2671 | +- |
2672 | +-#include "kactivitymanager_p.h" |
2673 | +- |
2674 | +-#include <QDBusConnection> |
2675 | +- |
2676 | +-#include <ktoolinvocation.h> |
2677 | +-#include <kdebug.h> |
2678 | +- |
2679 | +-KActivityManager * KActivityManager::s_instance = NULL; |
2680 | +- |
2681 | +-// #define ACTIVITY_MANAGER_DBUS_PATH "org.kde.ActivityManager" |
2682 | +-#define ACTIVITY_MANAGER_DBUS_PATH "org.kde.kactivitymanagerd" |
2683 | +-#define ACTIVITY_MANAGER_DBUS_OBJECT "/ActivityManager" |
2684 | +- |
2685 | +-KActivityManager::KActivityManager() |
2686 | +- : org::kde::ActivityManager( |
2687 | +- ACTIVITY_MANAGER_DBUS_PATH, |
2688 | +- ACTIVITY_MANAGER_DBUS_OBJECT, |
2689 | +- QDBusConnection::sessionBus() |
2690 | +- ) |
2691 | +-{ |
2692 | +- connect(&m_watcher, SIGNAL(serviceOwnerChanged(const QString &, const QString &, const QString &)), |
2693 | +- this, SLOT(serviceOwnerChanged(const QString &, const QString &, const QString &))); |
2694 | +-} |
2695 | +- |
2696 | +-KActivityManager * KActivityManager::self() |
2697 | +-{ |
2698 | +- if (!s_instance) { |
2699 | +- // check if the activity manager is already running |
2700 | +- if (!isActivityServiceRunning()) { |
2701 | +- |
2702 | +- // not running, trying to launch it |
2703 | +- QString error; |
2704 | +- |
2705 | +- int ret = KToolInvocation::startServiceByDesktopPath("kactivitymanagerd.desktop", QStringList(), &error); |
2706 | +- if (ret > 0) { |
2707 | +- kDebug() << "Activity: Couldn't start kactivitymanagerd: " << error << endl; |
2708 | +- } |
2709 | +- |
2710 | +- if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(ACTIVITY_MANAGER_DBUS_PATH)) { |
2711 | +- kDebug() << "Activity: The kactivitymanagerd service is still not registered"; |
2712 | +- } else { |
2713 | +- kDebug() << "Activity: The kactivitymanagerd service has been registered"; |
2714 | +- } |
2715 | +- } |
2716 | +- |
2717 | +- // creating a new instance of the class |
2718 | +- s_instance = new KActivityManager(); |
2719 | +- } |
2720 | +- |
2721 | +- return s_instance; |
2722 | +-} |
2723 | +- |
2724 | +-bool KActivityManager::isActivityServiceRunning() |
2725 | +-{ |
2726 | +- return QDBusConnection::sessionBus().interface()->isServiceRegistered(ACTIVITY_MANAGER_DBUS_PATH); |
2727 | +-} |
2728 | +- |
2729 | +-void KActivityManager::serviceOwnerChanged(const QString & serviceName, const QString & oldOwner, const QString & newOwner) |
2730 | +-{ |
2731 | +- if (serviceName == ACTIVITY_MANAGER_DBUS_PATH) { |
2732 | +- emit presenceChanged(!newOwner.isEmpty()); |
2733 | +- } |
2734 | +-} |
2735 | +- |
2736 | +diff --git a/experimental/libkactivities/kactivitymanager_p.h b/experimental/libkactivities/kactivitymanager_p.h |
2737 | +deleted file mode 100644 |
2738 | +index 8c24ae7..0000000 |
2739 | +--- a/experimental/libkactivities/kactivitymanager_p.h |
2740 | ++++ /dev/null |
2741 | +@@ -1,49 +0,0 @@ |
2742 | +-/* |
2743 | +- * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2744 | +- * |
2745 | +- * This program is free software; you can redistribute it and/or modify |
2746 | +- * it under the terms of the GNU General Public License version 2, |
2747 | +- * or (at your option) any later version, as published by the Free |
2748 | +- * Software Foundation |
2749 | +- * |
2750 | +- * This program is distributed in the hope that it will be useful, |
2751 | +- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2752 | +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2753 | +- * GNU General Public License for more details |
2754 | +- * |
2755 | +- * You should have received a copy of the GNU General Public |
2756 | +- * License along with this program; if not, write to the |
2757 | +- * Free Software Foundation, Inc., |
2758 | +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2759 | +- */ |
2760 | +- |
2761 | +-#ifndef ACTIVITY_MANAGER_P_ |
2762 | +-#define ACTIVITY_MANAGER_P_ |
2763 | +- |
2764 | +-#include "activitymanager_interface.h" |
2765 | +- |
2766 | +-#include <QDBusServiceWatcher> |
2767 | +- |
2768 | +-class KActivityManager: public org::kde::ActivityManager { |
2769 | +- Q_OBJECT |
2770 | +-public: |
2771 | +- static KActivityManager * self(); |
2772 | +- |
2773 | +- static bool isActivityServiceRunning(); |
2774 | +- |
2775 | +-public Q_SLOTS: |
2776 | +- void serviceOwnerChanged(const QString & serviceName, const QString & oldOwner, const QString & newOwner); |
2777 | +- |
2778 | +-Q_SIGNALS: |
2779 | +- void presenceChanged(bool present); |
2780 | +- |
2781 | +-private: |
2782 | +- KActivityManager(); |
2783 | +- |
2784 | +- QDBusServiceWatcher m_watcher; |
2785 | +- |
2786 | +- static KActivityManager * s_instance; |
2787 | +-}; |
2788 | +- |
2789 | +- |
2790 | +-#endif // ACTIVITY_MANAGER_P_ |
2791 | +diff --git a/experimental/libkactivities/manager_p.cpp b/experimental/libkactivities/manager_p.cpp |
2792 | +new file mode 100644 |
2793 | +index 0000000..6318f68 |
2794 | +--- /dev/null |
2795 | ++++ b/experimental/libkactivities/manager_p.cpp |
2796 | +@@ -0,0 +1,89 @@ |
2797 | ++/* |
2798 | ++ * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2799 | ++ * |
2800 | ++ * This program is free software; you can redistribute it and/or modify |
2801 | ++ * it under the terms of the GNU General Public License version 2, |
2802 | ++ * or (at your option) any later version, as published by the Free |
2803 | ++ * Software Foundation |
2804 | ++ * |
2805 | ++ * This program is distributed in the hope that it will be useful, |
2806 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2807 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2808 | ++ * GNU General Public License for more details |
2809 | ++ * |
2810 | ++ * You should have received a copy of the GNU General Public |
2811 | ++ * License along with this program; if not, write to the |
2812 | ++ * Free Software Foundation, Inc., |
2813 | ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2814 | ++ */ |
2815 | ++ |
2816 | ++#include "manager_p.h" |
2817 | ++ |
2818 | ++#include <QDBusConnection> |
2819 | ++ |
2820 | ++#include <ktoolinvocation.h> |
2821 | ++#include <kdebug.h> |
2822 | ++ |
2823 | ++namespace Activities { |
2824 | ++ |
2825 | ++Manager * Manager::s_instance = NULL; |
2826 | ++ |
2827 | ++// #define ACTIVITY_MANAGER_DBUS_PATH "org.kde.ActivityManager" |
2828 | ++#define ACTIVITY_MANAGER_DBUS_PATH "org.kde.kactivitymanagerd" |
2829 | ++#define ACTIVITY_MANAGER_DBUS_OBJECT "/ActivityManager" |
2830 | ++ |
2831 | ++Manager::Manager() |
2832 | ++ : org::kde::ActivityManager( |
2833 | ++ ACTIVITY_MANAGER_DBUS_PATH, |
2834 | ++ ACTIVITY_MANAGER_DBUS_OBJECT, |
2835 | ++ QDBusConnection::sessionBus() |
2836 | ++ ) |
2837 | ++{ |
2838 | ++ connect(&m_watcher, SIGNAL(serviceOwnerChanged(const QString &, const QString &, const QString &)), |
2839 | ++ this, SLOT(serviceOwnerChanged(const QString &, const QString &, const QString &))); |
2840 | ++} |
2841 | ++ |
2842 | ++Manager * Manager::self() |
2843 | ++{ |
2844 | ++ if (!s_instance) { |
2845 | ++ // check if the activity manager is already running |
2846 | ++ if (!isActivityServiceRunning()) { |
2847 | ++ |
2848 | ++ // not running, trying to launch it |
2849 | ++ QString error; |
2850 | ++ |
2851 | ++ int ret = KToolInvocation::startServiceByDesktopPath("kactivitymanagerd.desktop", QStringList(), &error); |
2852 | ++ if (ret > 0) { |
2853 | ++ kDebug() << "Activity: Couldn't start kactivitymanagerd: " << error << endl; |
2854 | ++ } |
2855 | ++ |
2856 | ++ if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(ACTIVITY_MANAGER_DBUS_PATH)) { |
2857 | ++ kDebug() << "Activity: The kactivitymanagerd service is still not registered"; |
2858 | ++ } else { |
2859 | ++ kDebug() << "Activity: The kactivitymanagerd service has been registered"; |
2860 | ++ } |
2861 | ++ } |
2862 | ++ |
2863 | ++ // creating a new instance of the class |
2864 | ++ s_instance = new Manager(); |
2865 | ++ } |
2866 | ++ |
2867 | ++ return s_instance; |
2868 | ++} |
2869 | ++ |
2870 | ++bool Manager::isActivityServiceRunning() |
2871 | ++{ |
2872 | ++ return QDBusConnection::sessionBus().interface()->isServiceRegistered(ACTIVITY_MANAGER_DBUS_PATH); |
2873 | ++} |
2874 | ++ |
2875 | ++void Manager::serviceOwnerChanged(const QString & serviceName, const QString & oldOwner, const QString & newOwner) |
2876 | ++{ |
2877 | ++ Q_UNUSED(oldOwner) |
2878 | ++ |
2879 | ++ if (serviceName == ACTIVITY_MANAGER_DBUS_PATH) { |
2880 | ++ emit presenceChanged(!newOwner.isEmpty()); |
2881 | ++ } |
2882 | ++} |
2883 | ++ |
2884 | ++} // namespace Activities |
2885 | ++ |
2886 | +diff --git a/experimental/libkactivities/manager_p.h b/experimental/libkactivities/manager_p.h |
2887 | +new file mode 100644 |
2888 | +index 0000000..5d92eeb |
2889 | +--- /dev/null |
2890 | ++++ b/experimental/libkactivities/manager_p.h |
2891 | +@@ -0,0 +1,52 @@ |
2892 | ++/* |
2893 | ++ * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
2894 | ++ * |
2895 | ++ * This program is free software; you can redistribute it and/or modify |
2896 | ++ * it under the terms of the GNU General Public License version 2, |
2897 | ++ * or (at your option) any later version, as published by the Free |
2898 | ++ * Software Foundation |
2899 | ++ * |
2900 | ++ * This program is distributed in the hope that it will be useful, |
2901 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2902 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2903 | ++ * GNU General Public License for more details |
2904 | ++ * |
2905 | ++ * You should have received a copy of the GNU General Public |
2906 | ++ * License along with this program; if not, write to the |
2907 | ++ * Free Software Foundation, Inc., |
2908 | ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
2909 | ++ */ |
2910 | ++ |
2911 | ++#ifndef ACTIVITIES_MANAGER_P_ |
2912 | ++#define ACTIVITIES_MANAGER_P_ |
2913 | ++ |
2914 | ++#include "activitymanager_interface.h" |
2915 | ++ |
2916 | ++#include <QDBusServiceWatcher> |
2917 | ++ |
2918 | ++namespace Activities { |
2919 | ++ |
2920 | ++class Manager: public org::kde::ActivityManager { |
2921 | ++ Q_OBJECT |
2922 | ++public: |
2923 | ++ static Manager * self(); |
2924 | ++ |
2925 | ++ static bool isActivityServiceRunning(); |
2926 | ++ |
2927 | ++public Q_SLOTS: |
2928 | ++ void serviceOwnerChanged(const QString & serviceName, const QString & oldOwner, const QString & newOwner); |
2929 | ++ |
2930 | ++Q_SIGNALS: |
2931 | ++ void presenceChanged(bool present); |
2932 | ++ |
2933 | ++private: |
2934 | ++ Manager(); |
2935 | ++ |
2936 | ++ QDBusServiceWatcher m_watcher; |
2937 | ++ |
2938 | ++ static Manager * s_instance; |
2939 | ++}; |
2940 | ++ |
2941 | ++} // namespace Activities |
2942 | ++ |
2943 | ++#endif // ACTIVITIES_MANAGER_P_ |
2944 | +diff --git a/experimental/libkactivities/org.kde.ActivityManager.xml b/experimental/libkactivities/org.kde.ActivityManager.xml |
2945 | +index b03e826..a09252b 100644 |
2946 | +--- a/experimental/libkactivities/org.kde.ActivityManager.xml |
2947 | ++++ b/experimental/libkactivities/org.kde.ActivityManager.xml |
2948 | +@@ -23,23 +23,6 @@ |
2949 | + <arg name="id" type="s" direction="out"/> |
2950 | + <arg name="state" type="i" direction="out"/> |
2951 | + </signal> |
2952 | +- <signal name="ResourceAccessed"> |
2953 | +- <arg name="application" type="s" direction="out"/> |
2954 | +- <arg name="uri" type="s" direction="out"/> |
2955 | +- </signal> |
2956 | +- <signal name="ResourceOpened"> |
2957 | +- <arg name="application" type="s" direction="out"/> |
2958 | +- <arg name="windowId" type="u" direction="out"/> |
2959 | +- <arg name="uri" type="s" direction="out"/> |
2960 | +- </signal> |
2961 | +- <signal name="ResourceModified"> |
2962 | +- <arg name="windowId" type="u" direction="out"/> |
2963 | +- <arg name="uri" type="s" direction="out"/> |
2964 | +- </signal> |
2965 | +- <signal name="ResourceClosed"> |
2966 | +- <arg name="windowId" type="u" direction="out"/> |
2967 | +- <arg name="uri" type="s" direction="out"/> |
2968 | +- </signal> |
2969 | + <method name="Start"> |
2970 | + </method> |
2971 | + <method name="Stop"> |
2972 | +@@ -102,26 +85,16 @@ |
2973 | + <method name="IsBackstoreAvailable"> |
2974 | + <arg type="b" direction="out"/> |
2975 | + </method> |
2976 | +- <method name="NotifyResourceAccessed"> |
2977 | +- <arg name="application" type="s" direction="in"/> |
2978 | +- <arg name="uri" type="s" direction="in"/> |
2979 | +- </method> |
2980 | +- <method name="NotifyResourceOpened"> |
2981 | ++ <method name="RegisterResourceEvent"> |
2982 | + <arg name="application" type="s" direction="in"/> |
2983 | + <arg name="windowId" type="u" direction="in"/> |
2984 | + <arg name="uri" type="s" direction="in"/> |
2985 | ++ <arg name="event" type="u" direction="in"/> |
2986 | ++ <arg name="reason" type="u" direction="in"/> |
2987 | + </method> |
2988 | +- <method name="NotifyResourceModified"> |
2989 | +- <arg name="windowId" type="u" direction="in"/> |
2990 | +- <arg name="uri" type="s" direction="in"/> |
2991 | +- </method> |
2992 | +- <method name="NotifyResourceClosed"> |
2993 | +- <arg name="windowId" type="u" direction="in"/> |
2994 | +- <arg name="uri" type="s" direction="in"/> |
2995 | +- </method> |
2996 | +- <method name="ActivitiesForResource"> |
2997 | +- <arg type="as" direction="out"/> |
2998 | ++ <method name="RegisterResourceMimeType"> |
2999 | + <arg name="uri" type="s" direction="in"/> |
3000 | ++ <arg name="mimetype" type="s" direction="in"/> |
3001 | + </method> |
3002 | + </interface> |
3003 | + </node> |
3004 | +diff --git a/experimental/libkactivities/prettyheaders.sh b/experimental/libkactivities/prettyheaders.sh |
3005 | +new file mode 100755 |
3006 | +index 0000000..469be8f |
3007 | +--- /dev/null |
3008 | ++++ b/experimental/libkactivities/prettyheaders.sh |
3009 | +@@ -0,0 +1,4 @@ |
3010 | ++#!/bin/bash |
3011 | ++ |
3012 | ++grep KDE_EXPORT *.h | sed 's/:.*KDE_EXPORT//' | sed 's/:.*//g' | sed 's/\([^ ]*\) \(.*\)/echo "#include \\"..\/..\/kactivities\/\1\\"" > includes\/Activities\/\2/g' |
3013 | ++ |
3014 | +diff --git a/experimental/libkactivities/resourceinstance.cpp b/experimental/libkactivities/resourceinstance.cpp |
3015 | +new file mode 100644 |
3016 | +index 0000000..c1352e9 |
3017 | +--- /dev/null |
3018 | ++++ b/experimental/libkactivities/resourceinstance.cpp |
3019 | +@@ -0,0 +1,166 @@ |
3020 | ++/* |
3021 | ++ * Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org> |
3022 | ++ * |
3023 | ++ * This program is free software; you can redistribute it and/or modify |
3024 | ++ * it under the terms of the GNU General Public License version 2, |
3025 | ++ * or (at your option) any later version, as published by the Free |
3026 | ++ * Software Foundation |
3027 | ++ * |
3028 | ++ * This program is distributed in the hope that it will be useful, |
3029 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3030 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3031 | ++ * GNU General Public License for more details |
3032 | ++ * |
3033 | ++ * You should have received a copy of the GNU General Public |
3034 | ++ * License along with this program; if not, write to the |
3035 | ++ * Free Software Foundation, Inc., |
3036 | ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
3037 | ++ */ |
3038 | ++ |
3039 | ++#include "resourceinstance.h" |
3040 | ++#include "manager_p.h" |
3041 | ++ |
3042 | ++#include <QCoreApplication> |
3043 | ++ |
3044 | ++namespace Activities { |
3045 | ++ |
3046 | ++#ifdef Q_OS_WIN64 |
3047 | ++__inline int toInt(WId wid) |
3048 | ++{ |
3049 | ++ return (int)((__int64)wid); |
3050 | ++} |
3051 | ++ |
3052 | ++#else |
3053 | ++__inline int toInt(WId wid) |
3054 | ++{ |
3055 | ++ return (int)wid; |
3056 | ++} |
3057 | ++#endif |
3058 | ++ |
3059 | ++class ResourceInstancePrivate { |
3060 | ++public: |
3061 | ++ WId wid; |
3062 | ++ ResourceInstance::OpenReason reason; |
3063 | ++ QUrl uri; |
3064 | ++ QString mimetype; |
3065 | ++ QString application; |
3066 | ++ |
3067 | ++ void closeResource(); |
3068 | ++ void openResource(); |
3069 | ++ |
3070 | ++ enum Type { |
3071 | ++ Accessed = 0, |
3072 | ++ Opened = 1, |
3073 | ++ Modified = 2, |
3074 | ++ Closed = 3, |
3075 | ++ FocussedIn = 4, |
3076 | ++ FocussedOut = 5 |
3077 | ++ }; |
3078 | ++ |
3079 | ++ static void registerResourceEvent(const QString & application, WId wid, const QUrl & uri, Type event, ResourceInstance::OpenReason reason) |
3080 | ++ { |
3081 | ++ Manager::self()->RegisterResourceEvent(application, toInt(wid), uri.toString(), uint(event), uint(reason)); |
3082 | ++ } |
3083 | ++}; |
3084 | ++ |
3085 | ++void ResourceInstancePrivate::closeResource() |
3086 | ++{ |
3087 | ++ registerResourceEvent(application, wid, uri, Closed, reason); |
3088 | ++} |
3089 | ++ |
3090 | ++void ResourceInstancePrivate::openResource() |
3091 | ++{ |
3092 | ++ registerResourceEvent(application, wid, uri, Opened, reason); |
3093 | ++} |
3094 | ++ |
3095 | ++ResourceInstance::ResourceInstance(WId wid, OpenReason reason, const QString & application, QObject * parent) |
3096 | ++ : QObject(parent), d(new ResourceInstancePrivate()) |
3097 | ++{ |
3098 | ++ d->wid = wid; |
3099 | ++ d->reason = reason; |
3100 | ++ d->application = application.isEmpty() ? QCoreApplication::instance()->applicationName() : application; |
3101 | ++ |
3102 | ++} |
3103 | ++ |
3104 | ++ResourceInstance::ResourceInstance(WId wid, QUrl resourceUri, const QString & mimetype, OpenReason reason, const QString & application, QObject * parent) |
3105 | ++ : QObject(parent), d(new ResourceInstancePrivate()) |
3106 | ++{ |
3107 | ++ d->wid = wid; |
3108 | ++ d->reason = reason; |
3109 | ++ d->uri = resourceUri; |
3110 | ++ d->mimetype = mimetype; |
3111 | ++ d->application = application.isEmpty() ? QCoreApplication::instance()->applicationName() : application; |
3112 | ++ |
3113 | ++ d->openResource(); |
3114 | ++} |
3115 | ++ |
3116 | ++ResourceInstance::~ResourceInstance() |
3117 | ++{ |
3118 | ++ d->closeResource(); |
3119 | ++ delete d; |
3120 | ++} |
3121 | ++ |
3122 | ++void ResourceInstance::notifyModified() |
3123 | ++{ |
3124 | ++ d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::Modified, d->reason); |
3125 | ++} |
3126 | ++ |
3127 | ++void ResourceInstance::notifyFocussedIn() |
3128 | ++{ |
3129 | ++ d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::FocussedIn, d->reason); |
3130 | ++} |
3131 | ++ |
3132 | ++void ResourceInstance::notifyFocussedOut() |
3133 | ++{ |
3134 | ++ d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::FocussedOut, d->reason); |
3135 | ++} |
3136 | ++ |
3137 | ++void ResourceInstance::setUri(const QUrl & newUri) |
3138 | ++{ |
3139 | ++ if (d->uri == newUri) |
3140 | ++ return; |
3141 | ++ |
3142 | ++ if (!d->uri.isEmpty()) { |
3143 | ++ d->closeResource(); |
3144 | ++ } |
3145 | ++ |
3146 | ++ d->uri = newUri; |
3147 | ++ |
3148 | ++ d->openResource(); |
3149 | ++} |
3150 | ++ |
3151 | ++void ResourceInstance::setMimetype(const QString & mimetype) |
3152 | ++{ |
3153 | ++ d->mimetype = mimetype; |
3154 | ++ // TODO: update the service info |
3155 | ++ Manager::self()->RegisterResourceMimeType(d->uri.toString(), mimetype); |
3156 | ++} |
3157 | ++ |
3158 | ++QUrl ResourceInstance::uri() |
3159 | ++{ |
3160 | ++ return d->uri; |
3161 | ++} |
3162 | ++ |
3163 | ++QString ResourceInstance::mimetype() const |
3164 | ++{ |
3165 | ++ return d->mimetype; |
3166 | ++} |
3167 | ++ |
3168 | ++WId ResourceInstance::winId() const |
3169 | ++{ |
3170 | ++ return d->wid; |
3171 | ++} |
3172 | ++ |
3173 | ++ResourceInstance::OpenReason ResourceInstance::openReason() const |
3174 | ++{ |
3175 | ++ return d->reason; |
3176 | ++} |
3177 | ++ |
3178 | ++void ResourceInstance::notifyAccessed(const QUrl & uri, const QString & application) |
3179 | ++{ |
3180 | ++ ResourceInstancePrivate::registerResourceEvent( |
3181 | ++ application.isEmpty() ? QCoreApplication::instance()->applicationName() : application, |
3182 | ++ 0, uri, ResourceInstancePrivate::Accessed, User); |
3183 | ++} |
3184 | ++ |
3185 | ++} // namespace Activities |
3186 | +diff --git a/experimental/libkactivities/resourceinstance.h b/experimental/libkactivities/resourceinstance.h |
3187 | +new file mode 100644 |
3188 | +index 0000000..ea0d286 |
3189 | +--- /dev/null |
3190 | ++++ b/experimental/libkactivities/resourceinstance.h |
3191 | +@@ -0,0 +1,200 @@ |
3192 | ++/* |
3193 | ++ * Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org> |
3194 | ++ * |
3195 | ++ * This program is free software; you can redistribute it and/or modify |
3196 | ++ * it under the terms of the GNU General Public License version 2, |
3197 | ++ * or (at your option) any later version, as published by the Free |
3198 | ++ * Software Foundation |
3199 | ++ * |
3200 | ++ * This program is distributed in the hope that it will be useful, |
3201 | ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3202 | ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3203 | ++ * GNU General Public License for more details |
3204 | ++ * |
3205 | ++ * You should have received a copy of the GNU General Public |
3206 | ++ * License along with this program; if not, write to the |
3207 | ++ * Free Software Foundation, Inc., |
3208 | ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
3209 | ++ */ |
3210 | ++ |
3211 | ++#ifndef ACTIVITIES_RESOURCEINSTANCE_H_ |
3212 | ++#define ACTIVITIES_RESOURCEINSTANCE_H_ |
3213 | ++ |
3214 | ++#include <QObject> |
3215 | ++#include <QWidget> |
3216 | ++#include <QUrl> |
3217 | ++ |
3218 | ++#include <kdemacros.h> |
3219 | ++ |
3220 | ++namespace Activities { |
3221 | ++ |
3222 | ++class ResourceInstancePrivate; |
3223 | ++ |
3224 | ++/** |
3225 | ++ * This class is used to notify the system that a file, web page |
3226 | ++ * or some other resource has been accessed. |
3227 | ++ * |
3228 | ++ * It provides methods to notify the system when the resource was |
3229 | ++ * opened, modified and closed, along with in what window the |
3230 | ++ * resource is shown. |
3231 | ++ * |
3232 | ++ * You should create an instance of this class for every resource |
3233 | ++ * you open. |
3234 | ++ * |
3235 | ++ * "The system" in this case can be the backend for tracking |
3236 | ++ * and automatically scoring files that are being accessed, the |
3237 | ++ * system to show the open files per window in the taskbar, |
3238 | ++ * the share-like-connect, etc. |
3239 | ++ * |
3240 | ++ * The user of this class shouldn't care about the backend |
3241 | ++ * systems - everything is done under-the-hood automatically. |
3242 | ++ * |
3243 | ++ */ |
3244 | ++class KDE_EXPORT ResourceInstance: public QObject { |
3245 | ++ Q_OBJECT |
3246 | ++ |
3247 | ++ Q_PROPERTY(QUrl uri READ uri WRITE setUri) |
3248 | ++ Q_PROPERTY(QString mimetype READ mimetype WRITE setMimetype) |
3249 | ++ Q_PROPERTY(WId winId READ winId) |
3250 | ++ Q_PROPERTY(OpenReason openReason READ openReason) |
3251 | ++ |
3252 | ++public: |
3253 | ++ /*** |
3254 | ++ * The reason for opening the resource |
3255 | ++ */ |
3256 | ++ enum OpenReason { |
3257 | ++ User = 0, ///< Due to an explicit user request |
3258 | ++ Scheduled = 1, ///< As a result of a user-scheduled action |
3259 | ++ Heuristic = 2, ///< Deduced from user's activity, or indirectly requested |
3260 | ++ System = 3, ///< Due to a system event |
3261 | ++ World = 4 ///< Due to an action performed by an external entity |
3262 | ++ }; |
3263 | ++ |
3264 | ++ /** |
3265 | ++ * Creates a new resource instance |
3266 | ++ * @param wid id of the window that will show the resource |
3267 | ++ * @param reason reason for opening the resource |
3268 | ++ * @param application application's name (the name used for the .desktop file). |
3269 | ++ * If not specified, QCoreApplication::applicationName is used |
3270 | ++ * @param parent pointer to the parent object |
3271 | ++ */ |
3272 | ++ ResourceInstance(WId wid, OpenReason reason = User, const QString & application = QString(), QObject * parent = 0); |
3273 | ++ |
3274 | ++ /** |
3275 | ++ * Creates a new resource instance and automatically |
3276 | ++ * notifies the system that it was opened. |
3277 | ++ * |
3278 | ++ * In some special cases, where the URI of the resource is |
3279 | ++ * being constantly changed (for example, in the world globe, |
3280 | ++ * street map applications) you have two options: |
3281 | ++ * - to pass an empty resourceUri while passing the mimetype |
3282 | ++ * - to update the uri from time to time (in the example of |
3283 | ++ * the world map - to send URIs for major objects - cities |
3284 | ++ * or main streets. |
3285 | ++ * and in both cases reimplementing the currentUri() method |
3286 | ++ * which will return the exact URI shown at that specific moment. |
3287 | ++ * |
3288 | ++ * @param wid window id in which the resource is shown |
3289 | ++ * @param resourceUri URI of the resource that is shown |
3290 | ++ * @param mimetype the mime type of the resource |
3291 | ++ * @param reason reason for opening the resource |
3292 | ++ * @param application application's name (the name used for the .desktop file). |
3293 | ++ * If not specified, QCoreApplication::applicationName is used |
3294 | ++ * @param parent pointer to the parent object |
3295 | ++ */ |
3296 | ++ ResourceInstance(WId wid, QUrl resourceUri, const QString & mimetype = QString(), OpenReason reason = User, const QString & application = QString(), QObject * parent = 0); |
3297 | ++ |
3298 | ++ /** |
3299 | ++ * Destroys the ResourceInstance and notifies the system |
3300 | ++ * that the resource has been closed |
3301 | ++ */ |
3302 | ++ ~ResourceInstance(); |
3303 | ++ |
3304 | ++public Q_SLOTS: |
3305 | ++ /** |
3306 | ++ * Call this method to notify the system that you modified |
3307 | ++ * (the contents of) the resource |
3308 | ++ */ |
3309 | ++ void notifyModified(); |
3310 | ++ |
3311 | ++ /** |
3312 | ++ * Call this method to notify the system that the resource |
3313 | ++ * has the focus in your application |
3314 | ++ * @note You only need to call this in MDI applications |
3315 | ++ */ |
3316 | ++ void notifyFocussedIn(); |
3317 | ++ |
3318 | ++ /** |
3319 | ++ * Call this method to notify the system that the resource |
3320 | ++ * lost the focus in your application |
3321 | ++ * @note You only need to call this in MDI applications |
3322 | ++ */ |
3323 | ++ void notifyFocussedOut(); |
3324 | ++ |
3325 | ++ /** |
3326 | ++ * This is a convenience method that sets the new URI. |
3327 | ++ * This is usually handled by sending the close event for |
3328 | ++ * the previous URI, and an open event for the new one. |
3329 | ++ */ |
3330 | ++ void setUri(const QUrl & newUri); |
3331 | ++ |
3332 | ++ /** |
3333 | ++ * Sets the mimetype for this resource |
3334 | ++ */ |
3335 | ++ void setMimetype(const QString & mimetype); |
3336 | ++ |
3337 | ++Q_SIGNALS: |
3338 | ++ /** |
3339 | ++ * Emitted when the system wants to show the resource |
3340 | ++ * represented by this ResourceInstance. |
3341 | ++ * |
3342 | ++ * You should listen to this signal if you have multiple |
3343 | ++ * resources shown in one window (MDI). On catching it, show |
3344 | ++ * the resource and give it focus. |
3345 | ++ */ |
3346 | ++ void requestsFocus(); |
3347 | ++ |
3348 | ++public: |
3349 | ++ /** |
3350 | ++ * @returns the current uri |
3351 | ++ * The default implementation returns the URI that was passed |
3352 | ++ * to the constructor. |
3353 | ++ * You need to reimplement it only for the applications with |
3354 | ++ * frequently updated URIs. |
3355 | ++ */ |
3356 | ++ virtual QUrl uri(); |
3357 | ++ |
3358 | ++ /** |
3359 | ++ * @returns mimetype of the resource |
3360 | ++ */ |
3361 | ++ QString mimetype() const; |
3362 | ++ |
3363 | ++ /** |
3364 | ++ * @returns the window id |
3365 | ++ */ |
3366 | ++ WId winId() const; |
3367 | ++ |
3368 | ++ /** |
3369 | ++ * @returns the reason for opening the resource |
3370 | ++ */ |
3371 | ++ OpenReason openReason() const; |
3372 | ++ |
3373 | ++ /** |
3374 | ++ * If there's no way to tell for how long an application is keeping |
3375 | ++ * the resource open, you can just call this static method - it |
3376 | ++ * will notify the system that the application has accessed the |
3377 | ++ * resource |
3378 | ++ * @param uri URI of the resource |
3379 | ++ * @param application application's name (the name used for the .desktop file). |
3380 | ++ * If not specified, QCoreApplication::applicationName is used |
3381 | ++ * |
3382 | ++ */ |
3383 | ++ static void notifyAccessed(const QUrl & uri, const QString & application = QString()); |
3384 | ++ |
3385 | ++private: |
3386 | ++ ResourceInstancePrivate * const d; |
3387 | ++}; |
3388 | ++ |
3389 | ++} |
3390 | ++ |
3391 | ++#endif // ACTIVITIES_RESOURCEINSTANCE_H_ |
3392 | +diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp |
3393 | +index a7f9283..00b7bd5 100644 |
3394 | +--- a/kio/kfile/krecentdocument.cpp |
3395 | ++++ b/kio/kfile/krecentdocument.cpp |
3396 | +@@ -40,6 +40,7 @@ |
3397 | + #include <QtCore/QTextIStream> |
3398 | + #include <QtCore/QMutableStringListIterator> |
3399 | + #include <QtCore/QRegExp> |
3400 | ++#include <QDBusInterface> |
3401 | + |
3402 | + #include <sys/types.h> |
3403 | + #include <kconfiggroup.h> |
3404 | +@@ -96,6 +97,14 @@ void KRecentDocument::add(const KUrl& url, const QString& desktopEntryName) |
3405 | + if ( url.isLocalFile() && KGlobal::dirs()->relativeLocation( "tmp", url.toLocalFile() ) != url.toLocalFile() ) |
3406 | + return; // inside tmp resource, do not save |
3407 | + |
3408 | ++ // Passing the info to the activity manager |
3409 | ++ // Activities::ResourceInstance::notifyAccessed(url, desktopEntryName); |
3410 | ++ QDBusInterface kamd("org.kde.kactivitymanagerd", "/ActivityManager", "org.kde.ActivityManager"); |
3411 | ++ |
3412 | ++ kamd.call("RegisterResourceEvent", desktopEntryName, (uint)0, url.url(), (uint)0, (uint)0); |
3413 | ++ |
3414 | ++ kDebug(250) << "KAMD DBus last error " << kamd.lastError(); |
3415 | ++ |
3416 | + QString openStr = url.url(); |
3417 | + openStr.replace( QRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded |
3418 | + |
3419 | +-- |
3420 | +1.7.5.4 |
3421 | + |
3422 | |
3423 | === added file 'debian/patches/kubuntu_mobile_remoe-the-static-hash-of-packagestructure.diff' |
3424 | --- debian/patches/kubuntu_mobile_remoe-the-static-hash-of-packagestructure.diff 1970-01-01 00:00:00 +0000 |
3425 | +++ debian/patches/kubuntu_mobile_remoe-the-static-hash-of-packagestructure.diff 2011-08-15 15:42:29 +0000 |
3426 | @@ -0,0 +1,80 @@ |
3427 | +From d1342710be8594bfe0ddfac386ba3816ef593d75 Mon Sep 17 00:00:00 2001 |
3428 | +From: Marco Martin <notmart@gmail.com> |
3429 | +Date: Tue, 19 Jul 2011 21:40:25 +0200 |
3430 | +Subject: [PATCH 08/11] remove the static hash of packagestructure |
3431 | + |
3432 | +unfortunately they are stateful with a state per-package, so sharing them leads to an incorrect state |
3433 | +--- |
3434 | + plasma/packagestructure.cpp | 14 +------------- |
3435 | + 1 files changed, 1 insertions(+), 13 deletions(-) |
3436 | + |
3437 | +diff --git a/plasma/packagestructure.cpp b/plasma/packagestructure.cpp |
3438 | +index ede94a6e..5eaab5b 100644 |
3439 | +--- a/plasma/packagestructure.cpp |
3440 | ++++ b/plasma/packagestructure.cpp |
3441 | +@@ -92,8 +92,6 @@ public: |
3442 | + void createPackageMetadata(const QString &path); |
3443 | + QStringList entryList(const QString &prefix, const QString &requestedPath); |
3444 | + |
3445 | +- static QHash<QString, PackageStructure::Ptr> structures; |
3446 | +- |
3447 | + QString type; |
3448 | + QString path; |
3449 | + QStringList contentsPrefixPaths; |
3450 | +@@ -105,8 +103,6 @@ public: |
3451 | + bool externalPaths; |
3452 | + }; |
3453 | + |
3454 | +-QHash<QString, PackageStructure::Ptr> PackageStructurePrivate::structures; |
3455 | +- |
3456 | + PackageStructure::PackageStructure(QObject *parent, const QString &type) |
3457 | + : QObject(parent), |
3458 | + d(new PackageStructurePrivate(type)) |
3459 | +@@ -124,11 +120,7 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) |
3460 | + return Ptr(new PackageStructure()); |
3461 | + } |
3462 | + |
3463 | +- PackageStructure::Ptr structure = PackageStructurePrivate::structures[packageFormat]; |
3464 | +- |
3465 | +- if (structure) { |
3466 | +- return structure; |
3467 | +- } |
3468 | ++ PackageStructure::Ptr structure; |
3469 | + |
3470 | + if (packageFormat == "Plasma/Applet") { |
3471 | + structure = defaultPackageStructure(AppletComponent); |
3472 | +@@ -152,7 +144,6 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) |
3473 | + } |
3474 | + |
3475 | + if (structure) { |
3476 | +- PackageStructurePrivate::structures[packageFormat] = structure; |
3477 | + return structure; |
3478 | + } |
3479 | + |
3480 | +@@ -183,7 +174,6 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) |
3481 | + if (!configPath.isEmpty()) { |
3482 | + KConfig config(configPath); |
3483 | + structure->read(&config); |
3484 | +- PackageStructurePrivate::structures[packageFormat] = structure; |
3485 | + return structure; |
3486 | + } |
3487 | + |
3488 | +@@ -192,7 +182,6 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) |
3489 | + if (url.isLocalFile()) { |
3490 | + KConfig config(url.toLocalFile(), KConfig::SimpleConfig); |
3491 | + structure->read(&config); |
3492 | +- PackageStructurePrivate::structures[structure->type()] = structure; |
3493 | + } |
3494 | + #ifndef PLASMA_NO_KIO |
3495 | + else { |
3496 | +@@ -203,7 +192,6 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) |
3497 | + if (job->exec()) { |
3498 | + KConfig config(tmp.fileName(), KConfig::SimpleConfig); |
3499 | + structure->read(&config); |
3500 | +- PackageStructurePrivate::structures[structure->type()] = structure; |
3501 | + } |
3502 | + } |
3503 | + } |
3504 | +-- |
3505 | +1.7.5.4 |
3506 | + |
3507 | |
3508 | === added file 'debian/patches/kubuntu_mobile_serviceavailabilitchanged-bool-signal.diff' |
3509 | --- debian/patches/kubuntu_mobile_serviceavailabilitchanged-bool-signal.diff 1970-01-01 00:00:00 +0000 |
3510 | +++ debian/patches/kubuntu_mobile_serviceavailabilitchanged-bool-signal.diff 2011-08-15 15:42:29 +0000 |
3511 | @@ -0,0 +1,100 @@ |
3512 | +From 14dab4662024b336280dd85e93b37dbebeef9c11 Mon Sep 17 00:00:00 2001 |
3513 | +From: Marco Martin <notmart@gmail.com> |
3514 | +Date: Fri, 29 Jul 2011 21:15:15 +0200 |
3515 | +Subject: [PATCH 11/11] serviceAvailabilityChanged(bool) signal |
3516 | + |
3517 | +when the query service gets started, queryserviceclients emit this signal, to let client applications know they can now do a query |
3518 | +REVIEW:102112 |
3519 | +--- |
3520 | + nepomuk/query/queryserviceclient.cpp | 30 ++++++++++++++++++++++++++++++ |
3521 | + nepomuk/query/queryserviceclient.h | 9 +++++++++ |
3522 | + 2 files changed, 39 insertions(+), 0 deletions(-) |
3523 | + |
3524 | +diff --git a/nepomuk/query/queryserviceclient.cpp b/nepomuk/query/queryserviceclient.cpp |
3525 | +index cd402e1..71c4246 100644 |
3526 | +--- a/nepomuk/query/queryserviceclient.cpp |
3527 | ++++ b/nepomuk/query/queryserviceclient.cpp |
3528 | +@@ -100,9 +100,12 @@ public: |
3529 | + void _k_entriesRemoved( const QStringList& ); |
3530 | + void _k_finishedListing(); |
3531 | + void _k_handleQueryReply(QDBusPendingCallWatcher*); |
3532 | ++ void _k_serviceRegistered( const QString& ); |
3533 | ++ void _k_serviceUnregistered( const QString& ); |
3534 | + |
3535 | + org::kde::nepomuk::QueryService* queryServiceInterface; |
3536 | + org::kde::nepomuk::Query* queryInterface; |
3537 | ++ QDBusServiceWatcher *queryServiceWatcher; |
3538 | + |
3539 | + QueryServiceClient* q; |
3540 | + |
3541 | +@@ -169,6 +172,27 @@ void Nepomuk::Query::QueryServiceClient::Private::_k_handleQueryReply(QDBusPendi |
3542 | + } |
3543 | + |
3544 | + |
3545 | ++void Nepomuk::Query::QueryServiceClient::Private::_k_serviceRegistered(const QString &service) |
3546 | ++{ |
3547 | ++ if (service == "org.kde.nepomuk.services.nepomukqueryservice") { |
3548 | ++ delete queryServiceInterface; |
3549 | ++ queryServiceInterface = new org::kde::nepomuk::QueryService( "org.kde.nepomuk.services.nepomukqueryservice", |
3550 | ++ "/nepomukqueryservice", |
3551 | ++ dbusConnection ); |
3552 | ++ emit q->serviceAvailabilityChanged(true); |
3553 | ++ } |
3554 | ++} |
3555 | ++ |
3556 | ++ |
3557 | ++void Nepomuk::Query::QueryServiceClient::Private::_k_serviceUnregistered(const QString &service) |
3558 | ++{ |
3559 | ++ if (service == "org.kde.nepomuk.services.nepomukqueryservice") { |
3560 | ++ emit q->serviceAvailabilityChanged(false); |
3561 | ++ } |
3562 | ++} |
3563 | ++ |
3564 | ++ |
3565 | ++ |
3566 | + |
3567 | + Nepomuk::Query::QueryServiceClient::QueryServiceClient( QObject* parent ) |
3568 | + : QObject( parent ), |
3569 | +@@ -182,6 +206,12 @@ Nepomuk::Query::QueryServiceClient::QueryServiceClient( QObject* parent ) |
3570 | + d->queryServiceInterface = new org::kde::nepomuk::QueryService( "org.kde.nepomuk.services.nepomukqueryservice", |
3571 | + "/nepomukqueryservice", |
3572 | + d->dbusConnection ); |
3573 | ++ d->queryServiceWatcher = new QDBusServiceWatcher(QLatin1String("org.kde.nepomuk.services.nepomukqueryservice"), |
3574 | ++ QDBusConnection::sessionBus(), |
3575 | ++ QDBusServiceWatcher::WatchForOwnerChange, |
3576 | ++ this); |
3577 | ++ connect(d->queryServiceWatcher, SIGNAL(serviceRegistered(QString)), this, SLOT(_k_serviceRegistered(QString))); |
3578 | ++ connect(d->queryServiceWatcher, SIGNAL(serviceUnregistered(QString)), this, SLOT(_k_serviceUnregistered(QString))); |
3579 | + } |
3580 | + |
3581 | + |
3582 | +diff --git a/nepomuk/query/queryserviceclient.h b/nepomuk/query/queryserviceclient.h |
3583 | +index 234d4b0..d41bfc0 100644 |
3584 | +--- a/nepomuk/query/queryserviceclient.h |
3585 | ++++ b/nepomuk/query/queryserviceclient.h |
3586 | +@@ -320,6 +320,13 @@ namespace Nepomuk { |
3587 | + */ |
3588 | + void error( const QString& errorMessage ); |
3589 | + |
3590 | ++ /** |
3591 | ++ * Emitted when the availability of the query service changes |
3592 | ++ * |
3593 | ++ * \since 4.8 |
3594 | ++ */ |
3595 | ++ void serviceAvailabilityChanged( bool running ); |
3596 | ++ |
3597 | + private: |
3598 | + class Private; |
3599 | + Private* const d; |
3600 | +@@ -327,6 +334,8 @@ namespace Nepomuk { |
3601 | + Q_PRIVATE_SLOT( d, void _k_entriesRemoved( const QStringList& ) ) |
3602 | + Q_PRIVATE_SLOT( d, void _k_finishedListing() ) |
3603 | + Q_PRIVATE_SLOT( d, void _k_handleQueryReply(QDBusPendingCallWatcher*) ) |
3604 | ++ Q_PRIVATE_SLOT( d, void _k_serviceRegistered( const QString& ) ) |
3605 | ++ Q_PRIVATE_SLOT( d, void _k_serviceUnregistered( const QString& ) ) |
3606 | + }; |
3607 | + } |
3608 | + } |
3609 | +-- |
3610 | +1.7.5.4 |
3611 | + |
3612 | |
3613 | === added file 'debian/patches/kubuntu_mobile_style-fixes.diff' |
3614 | --- debian/patches/kubuntu_mobile_style-fixes.diff 1970-01-01 00:00:00 +0000 |
3615 | +++ debian/patches/kubuntu_mobile_style-fixes.diff 2011-08-15 15:42:29 +0000 |
3616 | @@ -0,0 +1,188 @@ |
3617 | +From 472ce4097154660a9cb4b25614a43122546a9dcd Mon Sep 17 00:00:00 2001 |
3618 | +From: Aaron Seigo <aseigo@kde.org> |
3619 | +Date: Tue, 12 Jul 2011 18:08:50 +0200 |
3620 | +Subject: [PATCH 03/11] style fixes |
3621 | + |
3622 | +--- |
3623 | + experimental/libkactivities/resourceinstance.cpp | 26 +++++++++++----------- |
3624 | + experimental/libkactivities/resourceinstance.h | 20 +++++++++------- |
3625 | + 2 files changed, 24 insertions(+), 22 deletions(-) |
3626 | + |
3627 | +diff --git a/experimental/libkactivities/resourceinstance.cpp b/experimental/libkactivities/resourceinstance.cpp |
3628 | +index c1352e9..723017c 100644 |
3629 | +--- a/experimental/libkactivities/resourceinstance.cpp |
3630 | ++++ b/experimental/libkactivities/resourceinstance.cpp |
3631 | +@@ -53,11 +53,11 @@ public: |
3632 | + Opened = 1, |
3633 | + Modified = 2, |
3634 | + Closed = 3, |
3635 | +- FocussedIn = 4, |
3636 | +- FocussedOut = 5 |
3637 | ++ FocusedIn = 4, |
3638 | ++ FocusedOut = 5 |
3639 | + }; |
3640 | + |
3641 | +- static void registerResourceEvent(const QString & application, WId wid, const QUrl & uri, Type event, ResourceInstance::OpenReason reason) |
3642 | ++ static void registerResourceEvent(const QString &application, WId wid, const QUrl &uri, Type event, ResourceInstance::OpenReason reason) |
3643 | + { |
3644 | + Manager::self()->RegisterResourceEvent(application, toInt(wid), uri.toString(), uint(event), uint(reason)); |
3645 | + } |
3646 | +@@ -73,7 +73,7 @@ void ResourceInstancePrivate::openResource() |
3647 | + registerResourceEvent(application, wid, uri, Opened, reason); |
3648 | + } |
3649 | + |
3650 | +-ResourceInstance::ResourceInstance(WId wid, OpenReason reason, const QString & application, QObject * parent) |
3651 | ++ResourceInstance::ResourceInstance(WId wid, OpenReason reason, const QString &application, QObject *parent) |
3652 | + : QObject(parent), d(new ResourceInstancePrivate()) |
3653 | + { |
3654 | + d->wid = wid; |
3655 | +@@ -82,7 +82,7 @@ ResourceInstance::ResourceInstance(WId wid, OpenReason reason, const QString & a |
3656 | + |
3657 | + } |
3658 | + |
3659 | +-ResourceInstance::ResourceInstance(WId wid, QUrl resourceUri, const QString & mimetype, OpenReason reason, const QString & application, QObject * parent) |
3660 | ++ResourceInstance::ResourceInstance(WId wid, QUrl resourceUri, const QString &mimetype, OpenReason reason, const QString &application, QObject *parent) |
3661 | + : QObject(parent), d(new ResourceInstancePrivate()) |
3662 | + { |
3663 | + d->wid = wid; |
3664 | +@@ -105,17 +105,17 @@ void ResourceInstance::notifyModified() |
3665 | + d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::Modified, d->reason); |
3666 | + } |
3667 | + |
3668 | +-void ResourceInstance::notifyFocussedIn() |
3669 | ++void ResourceInstance::notifyFocusedIn() |
3670 | + { |
3671 | +- d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::FocussedIn, d->reason); |
3672 | ++ d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::FocusedIn, d->reason); |
3673 | + } |
3674 | + |
3675 | +-void ResourceInstance::notifyFocussedOut() |
3676 | ++void ResourceInstance::notifyFocusedOut() |
3677 | + { |
3678 | +- d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::FocussedOut, d->reason); |
3679 | ++ d->registerResourceEvent(d->application, d->wid, d->uri, ResourceInstancePrivate::FocusedOut, d->reason); |
3680 | + } |
3681 | + |
3682 | +-void ResourceInstance::setUri(const QUrl & newUri) |
3683 | ++void ResourceInstance::setUri(const QUrl &newUri) |
3684 | + { |
3685 | + if (d->uri == newUri) |
3686 | + return; |
3687 | +@@ -129,14 +129,14 @@ void ResourceInstance::setUri(const QUrl & newUri) |
3688 | + d->openResource(); |
3689 | + } |
3690 | + |
3691 | +-void ResourceInstance::setMimetype(const QString & mimetype) |
3692 | ++void ResourceInstance::setMimetype(const QString &mimetype) |
3693 | + { |
3694 | + d->mimetype = mimetype; |
3695 | + // TODO: update the service info |
3696 | + Manager::self()->RegisterResourceMimeType(d->uri.toString(), mimetype); |
3697 | + } |
3698 | + |
3699 | +-QUrl ResourceInstance::uri() |
3700 | ++QUrl ResourceInstance::uri() const |
3701 | + { |
3702 | + return d->uri; |
3703 | + } |
3704 | +@@ -156,7 +156,7 @@ ResourceInstance::OpenReason ResourceInstance::openReason() const |
3705 | + return d->reason; |
3706 | + } |
3707 | + |
3708 | +-void ResourceInstance::notifyAccessed(const QUrl & uri, const QString & application) |
3709 | ++void ResourceInstance::notifyAccessed(const QUrl &uri, const QString &application) |
3710 | + { |
3711 | + ResourceInstancePrivate::registerResourceEvent( |
3712 | + application.isEmpty() ? QCoreApplication::instance()->applicationName() : application, |
3713 | +diff --git a/experimental/libkactivities/resourceinstance.h b/experimental/libkactivities/resourceinstance.h |
3714 | +index ea0d286..ba08a80 100644 |
3715 | +--- a/experimental/libkactivities/resourceinstance.h |
3716 | ++++ b/experimental/libkactivities/resourceinstance.h |
3717 | +@@ -50,7 +50,8 @@ class ResourceInstancePrivate; |
3718 | + * systems - everything is done under-the-hood automatically. |
3719 | + * |
3720 | + */ |
3721 | +-class KDE_EXPORT ResourceInstance: public QObject { |
3722 | ++class KDE_EXPORT ResourceInstance: public QObject |
3723 | ++{ |
3724 | + Q_OBJECT |
3725 | + |
3726 | + Q_PROPERTY(QUrl uri READ uri WRITE setUri) |
3727 | +@@ -69,6 +70,7 @@ public: |
3728 | + System = 3, ///< Due to a system event |
3729 | + World = 4 ///< Due to an action performed by an external entity |
3730 | + }; |
3731 | ++ Q_ENUMS(OpenReason) |
3732 | + |
3733 | + /** |
3734 | + * Creates a new resource instance |
3735 | +@@ -78,7 +80,7 @@ public: |
3736 | + * If not specified, QCoreApplication::applicationName is used |
3737 | + * @param parent pointer to the parent object |
3738 | + */ |
3739 | +- ResourceInstance(WId wid, OpenReason reason = User, const QString & application = QString(), QObject * parent = 0); |
3740 | ++ ResourceInstance(WId wid, OpenReason reason = User, const QString &application = QString(), QObject *parent = 0); |
3741 | + |
3742 | + /** |
3743 | + * Creates a new resource instance and automatically |
3744 | +@@ -102,7 +104,7 @@ public: |
3745 | + * If not specified, QCoreApplication::applicationName is used |
3746 | + * @param parent pointer to the parent object |
3747 | + */ |
3748 | +- ResourceInstance(WId wid, QUrl resourceUri, const QString & mimetype = QString(), OpenReason reason = User, const QString & application = QString(), QObject * parent = 0); |
3749 | ++ ResourceInstance(WId wid, QUrl resourceUri, const QString &mimetype = QString(), OpenReason reason = User, const QString &application = QString(), QObject *parent = 0); |
3750 | + |
3751 | + /** |
3752 | + * Destroys the ResourceInstance and notifies the system |
3753 | +@@ -122,26 +124,26 @@ public Q_SLOTS: |
3754 | + * has the focus in your application |
3755 | + * @note You only need to call this in MDI applications |
3756 | + */ |
3757 | +- void notifyFocussedIn(); |
3758 | ++ void notifyFocusedIn(); |
3759 | + |
3760 | + /** |
3761 | + * Call this method to notify the system that the resource |
3762 | + * lost the focus in your application |
3763 | + * @note You only need to call this in MDI applications |
3764 | + */ |
3765 | +- void notifyFocussedOut(); |
3766 | ++ void notifyFocusedOut(); |
3767 | + |
3768 | + /** |
3769 | + * This is a convenience method that sets the new URI. |
3770 | + * This is usually handled by sending the close event for |
3771 | + * the previous URI, and an open event for the new one. |
3772 | + */ |
3773 | +- void setUri(const QUrl & newUri); |
3774 | ++ void setUri(const QUrl &newUri); |
3775 | + |
3776 | + /** |
3777 | + * Sets the mimetype for this resource |
3778 | + */ |
3779 | +- void setMimetype(const QString & mimetype); |
3780 | ++ void setMimetype(const QString &mimetype); |
3781 | + |
3782 | + Q_SIGNALS: |
3783 | + /** |
3784 | +@@ -162,7 +164,7 @@ public: |
3785 | + * You need to reimplement it only for the applications with |
3786 | + * frequently updated URIs. |
3787 | + */ |
3788 | +- virtual QUrl uri(); |
3789 | ++ virtual QUrl uri() const; |
3790 | + |
3791 | + /** |
3792 | + * @returns mimetype of the resource |
3793 | +@@ -189,7 +191,7 @@ public: |
3794 | + * If not specified, QCoreApplication::applicationName is used |
3795 | + * |
3796 | + */ |
3797 | +- static void notifyAccessed(const QUrl & uri, const QString & application = QString()); |
3798 | ++ static void notifyAccessed(const QUrl &uri, const QString &application = QString()); |
3799 | + |
3800 | + private: |
3801 | + ResourceInstancePrivate * const d; |
3802 | +-- |
3803 | +1.7.5.4 |
3804 | + |
3805 | |
3806 | === added file 'debian/patches/kubuntu_mobile_use-plsmoidpackage-for-generic-packages-too.diff' |
3807 | --- debian/patches/kubuntu_mobile_use-plsmoidpackage-for-generic-packages-too.diff 1970-01-01 00:00:00 +0000 |
3808 | +++ debian/patches/kubuntu_mobile_use-plsmoidpackage-for-generic-packages-too.diff 2011-08-15 15:42:29 +0000 |
3809 | @@ -0,0 +1,24 @@ |
3810 | +From 33a40e76b99659ea954bcd291c892c8d2dce956e Mon Sep 17 00:00:00 2001 |
3811 | +From: Marco Martin <notmart@gmail.com> |
3812 | +Date: Thu, 14 Jul 2011 17:19:40 +0200 |
3813 | +Subject: [PATCH 06/11] use plsmoidpackage for generic packages too |
3814 | + |
3815 | +--- |
3816 | + plasma/scripting/scriptengine.cpp | 1 + |
3817 | + 1 files changed, 1 insertions(+), 0 deletions(-) |
3818 | + |
3819 | +diff --git a/plasma/scripting/scriptengine.cpp b/plasma/scripting/scriptengine.cpp |
3820 | +index 3ca5ee1..fb8cd1a 100644 |
3821 | +--- a/plasma/scripting/scriptengine.cpp |
3822 | ++++ b/plasma/scripting/scriptengine.cpp |
3823 | +@@ -253,6 +253,7 @@ PackageStructure::Ptr defaultPackageStructure(ComponentType type) |
3824 | + case AppletComponent: |
3825 | + case WallpaperComponent: |
3826 | + case RunnerComponent: |
3827 | ++ case GenericComponent: |
3828 | + return PackageStructure::Ptr(new PlasmoidPackage()); |
3829 | + break; |
3830 | + case DataEngineComponent: |
3831 | +-- |
3832 | +1.7.5.4 |
3833 | + |
3834 | |
3835 | === modified file 'debian/patches/series' |
3836 | --- debian/patches/series 2011-06-24 12:31:08 +0000 |
3837 | +++ debian/patches/series 2011-08-15 15:42:29 +0000 |
3838 | @@ -23,3 +23,14 @@ |
3839 | kubuntu_cmake_install_paths.diff |
3840 | kubuntu_CVE-2009-2702.diff |
3841 | kubuntu_no_kbookmark_write_error.diff |
3842 | +kubuntu_mobile_ported-the-new-libkactivities.diff |
3843 | +kubuntu_mobile_a-new-packagestructure-type-genericcomponent.diff |
3844 | +kubuntu_mobile_style-fixes.diff |
3845 | +kubuntu_mobile_openreason-accessreason.diff |
3846 | +kubuntu_mobile_fix-resolution-of-paths-w-only-a-packageroot-name.diff |
3847 | +kubuntu_mobile_use-plsmoidpackage-for-generic-packages-too.diff |
3848 | +kubuntu_mobile_correctly-concatenate-the-patch.diff |
3849 | +kubuntu_mobile_remoe-the-static-hash-of-packagestructure.diff |
3850 | +kubuntu_mobile_add-a-findqtmobility.cmake-file.diff |
3851 | +kubuntu_mobile_document-the-findqtmobility.cmake-file-a-bit-more.diff |
3852 | +kubuntu_mobile_serviceavailabilitchanged-bool-signal.diff |