Hello community,

here is the log from the commit of package kdelibs4 for openSUSE:13.1 checked 
in at 2013-10-22 10:18:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1/kdelibs4 (Old)
 and      /work/SRC/openSUSE:13.1/.kdelibs4.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdelibs4"

Changes:
--------
--- /work/SRC/openSUSE:13.1/kdelibs4/kdelibs4.changes   2013-10-19 
16:49:04.000000000 +0200
+++ /work/SRC/openSUSE:13.1/.kdelibs4.new/kdelibs4.changes      2013-10-22 
10:18:15.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Oct 21 14:30:48 UTC 2013 - wba...@tmo.at
+
+- Added 0001-Improve-fix-for-association-with-derived-mimetypes.patch,
+  improves the last fix for mimetype handling (kde#321706)
+
+-------------------------------------------------------------------

New:
----
  0001-Improve-fix-for-association-with-derived-mimetypes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kdelibs4.spec ++++++
--- /var/tmp/diff_new_pack.Us2fCr/_old  2013-10-22 10:18:16.000000000 +0200
+++ /var/tmp/diff_new_pack.Us2fCr/_new  2013-10-22 10:18:16.000000000 +0200
@@ -110,6 +110,8 @@
 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
+# PATCH-FIX-UPSTREAM 
0001-Improve-fix-for-association-with-derived-mimetypes.patch -- followup fix 
for resolving kde#321706.
+Patch2001:      0001-Improve-fix-for-association-with-derived-mimetypes.patch
 PreReq:         permissions
 Requires:       soprano >= %( echo `rpm -q --queryformat '%{VERSION}' 
libsoprano-devel`)
 Recommends:     strigi >= %( echo `rpm -q --queryformat '%{VERSION}' 
strigi-devel`)
@@ -176,6 +178,7 @@
 %patch11 -p1
 %patch1000 -p1
 %patch2000 -p1
+%patch2001 -p1
 
 %build
   EXTRA_FLAGS="-DLIB_INSTALL_DIR=%{_kde4_libdir} \

++++++ 0001-Improve-fix-for-association-with-derived-mimetypes.patch ++++++
commit 8bfcace7efc0feea8899f70dfc15c3050c90ea99
Author: David Faure <fa...@kde.org>
Date:   Sat Oct 19 10:15:35 2013 +0200

    Improve fix for association with derived mimetypes (f723e2e7d36)
    
    If a desktop file was mentionning two aliases, they would both get
    removed, due to is() returning true for aliases as well.
    
    CCBUG: 321706

diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp
index b4564bd..7a2a2fc 100644
--- a/kded/kbuildservicefactory.cpp
+++ b/kded/kbuildservicefactory.cpp
@@ -269,8 +269,13 @@ void KBuildServiceFactory::populateServiceTypes()
                 } else {
                     bool shouldAdd = true;
                     foreach (const QString &otherType, 
service->serviceTypes()) {
+                        // Skip derived types if the base class is listed 
(#321706)
                         if (stName != otherType && mime->is(otherType)) {
-                            shouldAdd = false;
+                            // But don't skip aliases (they got resolved into 
mime->name() already, but don't let two aliases cancel out)
+                            if 
(KMimeTypeRepository::self()->canonicalName(otherType) != mime->name()) {
+                                //kDebug() << "Skipping" << mime->name() << 
"because of" << otherType << "(canonical" << 
KMimeTypeRepository::self()->canonicalName(otherType) << ") while parsing" << 
service->entryPath();
+                                shouldAdd = false;
+                            }
                         }
                     }
                     if (shouldAdd) {
diff --git a/kded/tests/kmimeassociationstest.cpp 
b/kded/tests/kmimeassociationstest.cpp
index a07637f..342a8fd 100644
--- a/kded/tests/kmimeassociationstest.cpp
+++ b/kded/tests/kmimeassociationstest.cpp
@@ -140,10 +140,12 @@ private Q_SLOTS:
         // This interacted badly with mimeapps.list listing another app for 
text/plain, but the
         // lookup found this app first, due to c-src. The fix: ignoring 
derived mimetypes when
         // the base mimetype is already listed.
+        //
+        // Also include aliases (msword), to check they don't cancel each 
other out.
         fakeCSrcApplication = m_localApps + "fakecsrcapplication.desktop";
         if (!QFile::exists(fakeCSrcApplication)) {
             mustUpdateKSycoca = true;
-            writeAppDesktopFile(fakeCSrcApplication, QStringList() << 
"text/plain" << "text/c-src", 8);
+            writeAppDesktopFile(fakeCSrcApplication, QStringList() << 
"text/plain" << "text/c-src" << "application/vnd.ms-word" << 
"application/msword", 8);
         }
 
         fakeJpegApplication = m_localApps + "fakejpegapplication.desktop";
@@ -200,6 +202,7 @@ private Q_SLOTS:
         preferredApps["text/plain"] << "faketextapplication.desktop" << 
"kde4-kwrite.desktop";
         preferredApps["text/x-csrc"] << "faketextapplication.desktop" << 
"kde4-kwrite.desktop";
         preferredApps["text/html"] << "fakehtmlapplication.desktop";
+        preferredApps["application/msword"] << "fakecsrcapplication.desktop";
         removedApps["image/jpeg"] << "firefox.desktop";
         removedApps["text/html"] << "kde4-dolphin.desktop" << 
"kde4-kwrite.desktop";
 
@@ -231,14 +234,17 @@ private Q_SLOTS:
         for (ExpectedResultsMap::const_iterator it = 
preferredApps.constBegin(),
                                                end = preferredApps.constEnd() 
; it != end ; ++it) {
             const QString mime = it.key();
-            // Derived mimetypes are handled outside KMimeAssociations
-            if (mime == QLatin1String("text/x-csrc"))
+            // The data for derived types and aliases isn't for this test 
(which only looks at mimeapps.list)
+            if (mime == QLatin1String("text/x-csrc") || mime == 
QLatin1String("application/msword"))
                 continue;
             const QList<KServiceOffer> offers = offerHash.offersFor(mime);
             Q_FOREACH(const QString& service, it.value()) {
                 KService::Ptr serv = KService::serviceByStorageId(service);
                 if (serv && !offersContains(offers, serv)) {
-                    kDebug() << serv.data() << serv->entryPath() << "does not 
have" << mime;
+                    kDebug() << "expected offer" << serv->entryPath() << "not 
in offers for" << mime << ":";
+                    Q_FOREACH(const KServiceOffer& offer, offers) {
+                        kDebug() << offer.service()->storageId();
+                    }
                     QFAIL("offer does not have servicetype");
                 }
             }

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to