Accepting request 324136 from KDE:Frameworks5

- Added show-custom-folder-icons-sgain.patch (kde#350612)

- Update to 5.13.0
  * The Qt version requirement has been bumped from 5.2 to 5.3
  * Debug output has been ported to categorized output, for less
    noise by default
  * Docbook documentation has been reviewed and updated
  * Kill unneeded QUrl wrappers
  * For more details please see:
    https://www.kde.org/announcements/kde-frameworks-5.13.0.php

OBS-URL: https://build.opensuse.org/request/show/324136
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kio?expand=0&rev=21
This commit is contained in:
Stephan Kulow 2015-09-02 05:50:03 +00:00 committed by Git OBS Bridge
commit 2084640386
5 changed files with 127 additions and 15 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fcd81e8ddeee72ac3b4802d974b5591985b6d2943b028953093507a5fcb3328d
size 2848908

3
kio-5.13.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c31fde0c554859f9241a1dbdc854405d7cb358085ac7c703c7bb4105748bdbd4
size 2848760

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Tue Aug 18 16:16:22 UTC 2015 - hrvoje.senjan@gmail.com
- Added show-custom-folder-icons-sgain.patch (kde#350612)
-------------------------------------------------------------------
Tue Aug 4 19:20:31 UTC 2015 - hrvoje.senjan@gmail.com
- Update to 5.13.0
* The Qt version requirement has been bumped from 5.2 to 5.3
* Debug output has been ported to categorized output, for less
noise by default
* Docbook documentation has been reviewed and updated
* Kill unneeded QUrl wrappers
* For more details please see:
https://www.kde.org/announcements/kde-frameworks-5.13.0.php
-------------------------------------------------------------------
Sun Jul 5 18:45:11 UTC 2015 - hrvoje.senjan@gmail.com

View File

@ -17,9 +17,9 @@
%bcond_without lang
%define _tar_path 5.12
%define _tar_path 5.13
Name: kio
Version: 5.12.0
Version: 5.13.0
Release: 0
%define kf5_version %{version}
BuildRequires: cmake >= 2.8.12
@ -49,15 +49,15 @@ BuildRequires: kxmlgui-devel >= %{_tar_path}
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: solid-devel >= %{_tar_path}
BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2.0
BuildRequires: pkgconfig(Qt5Core) >= 5.2.0
BuildRequires: pkgconfig(Qt5DBus) >= 5.2.0
BuildRequires: pkgconfig(Qt5Network) >= 5.2.0
BuildRequires: pkgconfig(Qt5Script) >= 5.2.0
BuildRequires: pkgconfig(Qt5Test) >= 5.2.0
BuildRequires: pkgconfig(Qt5Widgets) >= 5.2.0
BuildRequires: pkgconfig(Qt5X11Extras) >= 5.2.0
BuildRequires: pkgconfig(Qt5Xml) >= 5.2.0
BuildRequires: cmake(Qt5Concurrent) >= 5.3.0
BuildRequires: cmake(Qt5Core) >= 5.3.0
BuildRequires: cmake(Qt5DBus) >= 5.3.0
BuildRequires: cmake(Qt5Network) >= 5.3.0
BuildRequires: cmake(Qt5Script) >= 5.3.0
BuildRequires: cmake(Qt5Test) >= 5.3.0
BuildRequires: cmake(Qt5Widgets) >= 5.3.0
BuildRequires: cmake(Qt5X11Extras) >= 5.3.0
BuildRequires: cmake(Qt5Xml) >= 5.3.0
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(x11)
Requires: %{name}-core = %{version}
@ -75,6 +75,8 @@ Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5
Patch0: kio_help-fallback-to-kde4-docs.patch
# PATCH-FIX-UPSTREAM show-custom-folder-icons-sgain.patch
Patch1: show-custom-folder-icons-sgain.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -109,7 +111,7 @@ Requires: kjobwidgets-devel >= %{_tar_path}
Requires: kservice-devel >= %{_tar_path}
Requires: kxmlgui-devel >= %{_tar_path}
Requires: solid-devel >= %{_tar_path}
Requires: pkgconfig(Qt5Network) >= 5.2.0
Requires: cmake(Qt5Network) >= 5.3.0
%description devel
This framework implements almost all the file management functions you
@ -121,6 +123,7 @@ Development files.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%cmake_kf5 -d build

View File

@ -0,0 +1,92 @@
From: Emmanuel Pescosta <emmanuelpescosta099@gmail.com>
Date: Tue, 11 Aug 2015 18:13:52 +0000
Subject: Show custom folder icons again
---
Show custom folder icons again
Set mimetype as known when we assign the mime type for inode/directory
This bug was introduced by commit 46cd152f
BUG: 350612
FIXED-IN: 5.14
REVIEW: 124690
---
--- a/autotests/kfileitemtest.cpp
+++ b/autotests/kfileitemtest.cpp
@@ -25,6 +25,8 @@
#include <qtemporarydir.h>
#include <qtemporaryfile.h>
#include <kuser.h>
+#include <kdesktopfile.h>
+#include <kconfiggroup.h>
QTEST_MAIN(KFileItemTest)
@@ -472,6 +474,25 @@
QCOMPARE(fileItem.currentMimeType().name(), udsMimeType);
}
+void KFileItemTest::testIconNameForCustomFolderIcons()
+{
+ // Custom folder icons should be displayed (bug 350612)
+
+ const QString iconName = QStringLiteral("folder-music");
+
+ QTemporaryDir tempDir;
+ const QUrl url = QUrl::fromLocalFile(tempDir.path());
+ KDesktopFile cfg(tempDir.path() + QString::fromLatin1("/.directory"));
+ cfg.desktopGroup().writeEntry("Icon", iconName);
+ cfg.sync();
+
+ KIO::UDSEntry entry;
+ entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
+ KFileItem fileItem(entry, url);
+
+ QCOMPARE(fileItem.iconName(), iconName);
+}
+
#ifndef Q_OS_WIN // user/group/other write permissions are not handled on windows
void KFileItemTest::testIsReadable_data()
--- a/autotests/kfileitemtest.h
+++ b/autotests/kfileitemtest.h
@@ -41,6 +41,7 @@
void testMimetypeForRemoteFolderWithFileType();
void testCurrentMimetypeForRemoteFolder();
void testCurrentMimetypeForRemoteFolderWithFileType();
+ void testIconNameForCustomFolderIcons();
#ifndef Q_OS_WIN
void testIsReadable_data();
--- a/src/core/kfileitem.cpp
+++ b/src/core/kfileitem.cpp
@@ -732,15 +732,15 @@
QMimeDatabase db;
if (isDir()) {
d->m_mimeType = db.mimeTypeForName("inode/directory");
- return d->m_mimeType;
- }
- bool isLocalUrl;
- const QUrl url = mostLocalUrl(&isLocalUrl);
- d->m_mimeType = db.mimeTypeForUrl(url);
- // was: d->m_mimeType = KMimeType::findByUrl( url, d->m_fileMode, isLocalUrl );
- // => we are no longer using d->m_fileMode for remote URLs.
- Q_ASSERT(d->m_mimeType.isValid());
- //qDebug() << d << "finding final mimetype for" << url << ":" << d->m_mimeType.name();
+ } else {
+ bool isLocalUrl;
+ const QUrl url = mostLocalUrl(&isLocalUrl);
+ d->m_mimeType = db.mimeTypeForUrl(url);
+ // was: d->m_mimeType = KMimeType::findByUrl( url, d->m_fileMode, isLocalUrl );
+ // => we are no longer using d->m_fileMode for remote URLs.
+ Q_ASSERT(d->m_mimeType.isValid());
+ //qDebug() << d << "finding final mimetype for" << url << ":" << d->m_mimeType.name();
+ }
d->m_bMimeTypeKnown = true;
}