[kdelibs] * Mon Aug 22 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.0-4 - fix Plasma::PackageMetadata::read

Kevin Kofler kkofler at fedoraproject.org
Mon Aug 22 00:11:47 UTC 2011


commit e4a0ae71135b9ec13fb9413e4b371bafb9d2ddc3
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date:   Mon Aug 22 02:11:13 2011 +0200

    * Mon Aug 22 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.0-4
    - fix Plasma::PackageMetadata::read to match the behavior of KService

 ...ma-PackageMetadata-read-Match-the-behavio.patch |   48 ++++++++++++++++++++
 kdelibs.spec                                       |    9 +++-
 2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/0004-Bugfix-Plasma-PackageMetadata-read-Match-the-behavio.patch b/0004-Bugfix-Plasma-PackageMetadata-read-Match-the-behavio.patch
new file mode 100644
index 0000000..22ef6c9
--- /dev/null
+++ b/0004-Bugfix-Plasma-PackageMetadata-read-Match-the-behavio.patch
@@ -0,0 +1,48 @@
+From 7804efbf05a08d0170c24f4d6f14b661fcfb9d9e Mon Sep 17 00:00:00 2001
+Message-Id: <7804efbf05a08d0170c24f4d6f14b661fcfb9d9e.1313971467.git.kevin.kofler at chello.at>
+From: Kevin Kofler <kevin.kofler at chello.at>
+Date: Mon, 22 Aug 2011 01:53:57 +0200
+Subject: [PATCH] Bugfix: Plasma::PackageMetadata::read: Match the behavior of
+ KService.
+
+---
+ plasma/packagemetadata.cpp |   23 +++++++++++++++++++++--
+ 1 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/plasma/packagemetadata.cpp b/plasma/packagemetadata.cpp
+index 59163b2..e6b47b6 100644
+--- a/plasma/packagemetadata.cpp
++++ b/plasma/packagemetadata.cpp
+@@ -120,8 +120,27 @@ void PackageMetadata::read(const QString &filename)
+     d->name = config.readEntry("Name", d->name);
+     d->icon = config.readEntry("Icon", d->icon);
+     d->description = config.readEntry("Comment", d->description);
+-    d->keywords = config.readEntry("Keywords", d->keywords);
+-    d->serviceType = config.readEntry("X-KDE-ServiceTypes", d->serviceType);
++    bool hasKeywords = config.hasKey("Keywords");
++    bool hasXKdeKeywords = config.hasKey("X-KDE-Keywords");
++    if (hasKeywords && hasXKdeKeywords) {
++        d->keywords = config.readEntry("Keywords", d->keywords);
++        d->keywords.append(config.readEntry("X-KDE-Keywords", d->keywords));
++    } else if (hasKeywords) {
++        d->keywords = config.readEntry("Keywords", d->keywords);
++    } else if (hasXKdeKeywords) {
++        d->keywords = config.readEntry("X-KDE-Keywords", d->keywords);
++    }
++    bool hasServiceTypes = config.hasKey("ServiceTypes");
++    bool hasXKdeServiceTypes = config.hasKey("X-KDE-ServiceTypes");
++    if (hasServiceTypes && hasXKdeServiceTypes) {
++        d->serviceType = config.readEntry("ServiceTypes", d->serviceType);
++        d->serviceType.append(',');
++        d->serviceType.append(config.readEntry("X-KDE-ServiceTypes", d->serviceType));
++    } else if (hasServiceTypes) {
++        d->serviceType = config.readEntry("ServiceTypes", d->serviceType);
++    } else if (hasXKdeServiceTypes) {
++        d->serviceType = config.readEntry("X-KDE-ServiceTypes", d->serviceType);
++    }
+     d->pluginName = config.readEntry("X-KDE-PluginInfo-Name", d->pluginName);
+     d->author = config.readEntry("X-KDE-PluginInfo-Author", d->author);
+     d->email = config.readEntry("X-KDE-PluginInfo-Email", d->email);
+-- 
+1.7.4.4
+
diff --git a/kdelibs.spec b/kdelibs.spec
index fec42a6..8e9ef34 100644
--- a/kdelibs.spec
+++ b/kdelibs.spec
@@ -16,7 +16,7 @@
 
 Summary: KDE Libraries
 Version: 4.7.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 Name: kdelibs
 Epoch: 6
@@ -109,6 +109,9 @@ Patch41: 0002-Trigger-installation-of-missing-components-when-inst.patch
 # Implement automatic scanning of source code for required data engines.
 # https://git.reviewboard.kde.org/r/102350/
 Patch42: 0003-Implement-automatic-scanning-of-source-code-for-requ.patch
+# Bugfix: Plasma::PackageMetadata::read: Match the behavior of KService.
+# https://git.reviewboard.kde.org/r/102404/
+Patch43: 0004-Bugfix-Plasma-PackageMetadata-read-Match-the-behavio.patch
 
 ## upstreamable
 # add gpg2 support to knewstuff, rough first try s/gpg/gpg2/
@@ -309,6 +312,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
 %patch40 -p1 -b .libplasma-pk-0001
 %patch41 -p1 -b .libplasma-pk-0002
 %patch42 -p1 -b .libplasma-pk-0003
+%patch43 -p1 -b .libplasma-pk-0003
 %endif
 
 # upstreamable patches
@@ -566,6 +570,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Mon Aug 22 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.0-4
+- fix Plasma::PackageMetadata::read to match the behavior of KService
+
 * Sun Aug 21 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.7.0-3
 - backport my GSoC 2011 patches for libplasma PackageKit integration (F17+)
 - package plasma-dataengine-depextractor in -devel (F17+)


More information about the scm-commits mailing list