Hello community, here is the log from the commit of package kdelibs4 for openSUSE:Factory checked in at 2013-10-19 11:11:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdelibs4 (Old) and /work/SRC/openSUSE:Factory/.kdelibs4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kdelibs4" Changes: -------- --- /work/SRC/openSUSE:Factory/kdelibs4/kdelibs4-apidocs.changes 2013-10-03 15:54:06.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdelibs4.new/kdelibs4-apidocs.changes 2013-10-19 11:15:56.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Oct 18 15:40:44 UTC 2013 - hrvoje.senjan@gmail.com + +- Added 0001-Fix-association-with-derived-mimetype-again.patch, fixes + remaining issues in mimetype handling, see e.g. kde#324502 + +------------------------------------------------------------------- kdelibs4.changes: same change New: ---- 0001-Fix-association-with-derived-mimetype-again.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdelibs4.spec ++++++ --- /var/tmp/diff_new_pack.J93iYU/_old 2013-10-19 11:16:11.000000000 +0200 +++ /var/tmp/diff_new_pack.J93iYU/_new 2013-10-19 11:16:11.000000000 +0200 @@ -108,6 +108,8 @@ # when e.g. starting dolphin from CLI # NOTE patch is from master, aka 4.12 branch Patch1000: 0001-verbose.patch +# PATCH-FIX-UPSTREAM 0001-Fix-association-with-derived-mimetype-again.patch -- fixup for resolving kde#321706. resolves kde#324502 +Patch2000: 0001-Fix-association-with-derived-mimetype-again.patch PreReq: permissions Requires: soprano >= %( echo `rpm -q --queryformat '%{VERSION}' libsoprano-devel`) Recommends: strigi >= %( echo `rpm -q --queryformat '%{VERSION}' strigi-devel`) @@ -173,6 +175,7 @@ %patch10 %patch11 -p1 %patch1000 -p1 +%patch2000 -p1 %build EXTRA_FLAGS="-DLIB_INSTALL_DIR=%{_kde4_libdir} \ ++++++ 0001-Fix-association-with-derived-mimetype-again.patch ++++++
From f723e2e7d36b597c5262bf63dde380d89ec6bfcb Mon Sep 17 00:00:00 2001 From: David Faure
Date: Fri, 18 Oct 2013 09:44:17 +0200 Subject: [PATCH 1/1] Fix association-with-derived-mimetype again.
871cccc8a88a made it impossible to re-order file type associations.
7f42bf253009 fixed that, but changed the value of KService::mimeTypes(), which
broke okular. This new fix works the same way, but only inside kbuildsycoca
when it processes the mimetypes. The value of KService::mimeTypes() is now
restored to be exactly what's in the desktop file.
CCBUG: 321706
FIXED-IN: 4.11.3
---
kdecore/services/kservice.cpp | 45 +++++++++---------------------------------
kdecore/tests/kservicetest.cpp | 7 ++++---
kded/kbuildservicefactory.cpp | 11 ++++++++++-
3 files changed, 23 insertions(+), 40 deletions(-)
diff --git a/kdecore/services/kservice.cpp b/kdecore/services/kservice.cpp
index d7945bf..8e81929 100644
--- a/kdecore/services/kservice.cpp
+++ b/kdecore/services/kservice.cpp
@@ -227,44 +227,17 @@ void KServicePrivate::init( const KDesktopFile *config, KService* q )
<< "has an empty mimetype!";
continue;
}
-
- // The following searches through the list for duplicate, inherited mimetypes
- // For example, if application/rtf and text/plain are both listed application/rtf is removed
- // since it is inherited from text/plain
- // This is a reworked fix for revision 871cccc8a88a600c8f850a020d44bfc5f5858caa
- bool shouldAdd = true;
- KMimeType::Ptr mimeType1 = KMimeTypeRepository::self()->findMimeTypeByName(st);
- if (mimeType1) {
- foreach(const QString mime2, lstServiceTypes) {
- // Don't compare the mimetype with itself
- if (st == mime2) {
- continue;
- }
-
- // is checks for inheritance and aliases, so this should suffice
- if (mimeType1->is(mime2)) {
- shouldAdd = false;
- break;
- }
+ int initialPreference = m_initialPreference;
+ if ( st_it.hasNext() ) {
+ // TODO better syntax - separate group with mimetype=number entries?
+ bool isNumber;
+ const int val = st_it.peekNext().toInt(&isNumber);
+ if (isNumber) {
+ initialPreference = val;
+ st_it.next();
}
}
-
- // Only add unique mimetypes
- if (shouldAdd) {
- int initialPreference = m_initialPreference;
- if (st_it.hasNext()) {
- // TODO better syntax - separate group with mimetype=number entries?
- bool isNumber;
- const int val = st_it.peekNext().toInt(&isNumber);
- if (isNumber) {
- initialPreference = val;
- st_it.next();
- }
- }
- m_serviceTypes.push_back(KService::ServiceTypeAndPreference(initialPreference, st));
- } else {
- //kDebug(servicesDebugArea())<<"Not adding"<