[arch-commits] Commit in kiconthemes/trunk (PKGBUILD kdebug-365130.patch)

Antonio Rojas arojas at archlinux.org
Tue Jul 12 10:05:08 UTC 2016


    Date: Tuesday, July 12, 2016 @ 10:05:08
  Author: arojas
Revision: 271488

Fix missing icons (FS#49855)

Added:
  kiconthemes/trunk/kdebug-365130.patch
Modified:
  kiconthemes/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   12 ++++++++--
 kdebug-365130.patch |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-07-12 07:31:33 UTC (rev 271487)
+++ PKGBUILD	2016-07-12 10:05:08 UTC (rev 271488)
@@ -4,7 +4,7 @@
 
 pkgname=kiconthemes
 pkgver=5.24.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Support for icon themes'
 arch=('i686' 'x86_64')
 url='https://community.kde.org/Frameworks'
@@ -12,11 +12,17 @@
 depends=('qt5-svg' 'kconfigwidgets' 'kitemviews' 'karchive')
 makedepends=('extra-cmake-modules' 'python' 'mesa')
 groups=('kf5')
-source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
-md5sums=('74b986efc24bec1e78b9e72b4c0defcd')
+source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"
+        kdebug-365130.patch)
+md5sums=('74b986efc24bec1e78b9e72b4c0defcd'
+         '680419b1157cdd7396cd2170b0b89bc2')
 
 prepare() {
   mkdir -p build
+
+# Fix missing icons http://bugs.kde.org/show_bug.cgi?id=365130
+  cd $pkgname-$pkgver
+  patch -p1 -i ../kdebug-365130.patch
 }
 
 build() {

Added: kdebug-365130.patch
===================================================================
--- kdebug-365130.patch	                        (rev 0)
+++ kdebug-365130.patch	2016-07-12 10:05:08 UTC (rev 271488)
@@ -0,0 +1,56 @@
+From: David Rosca <nowrep at gmail.com>
+Date: Tue, 12 Jul 2016 07:54:04 +0000
+Subject: KIconEngine: Fix QIcon::hasThemeIcon always returning true
+X-Git-Url: http://quickgit.kde.org/?p=kiconthemes.git&a=commitdiff&h=0abf1b7a148cf6b27caea01a329631e0f1daa983
+---
+KIconEngine: Fix QIcon::hasThemeIcon always returning true
+
+QIcon::hasThemeIcon(name) checks if QIcon::name() == name,
+so icon engine must return empty string when icon doesn't exist.
+Also implement IsNullHook for Qt 5.7. Comes with autotest.
+
+REVIEW: 128397
+BUG: 365130
+---
+
+
+--- a/src/kiconengine.cpp
++++ b/src/kiconengine.cpp
+@@ -116,6 +116,9 @@
+ 
+ QString KIconEngine::iconName() const
+ {
++    if (!mIconLoader || !mIconLoader->hasIcon(mIconName)) {
++        return QString();
++    }
+     return mIconName;
+ }
+ 
+@@ -156,3 +159,15 @@
+     return true;
+ }
++ 
++void KIconEngine::virtual_hook(int id, void *data)
++{
++#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
++    if (id == QIconEngine::IsNullHook) {
++#else
++    if (id == 3) {
++#endif
++        *reinterpret_cast<bool*>(data) = !mIconLoader || !mIconLoader->hasIcon(mIconName);
++    }
++    QIconEngine::virtual_hook(id, data);
++}
+
+--- a/src/kiconengine.h
++++ b/src/kiconengine.h
+@@ -78,6 +78,8 @@
+     bool read(QDataStream &in) Q_DECL_OVERRIDE;
+     bool write(QDataStream &out) const Q_DECL_OVERRIDE;
+ 
++    void virtual_hook(int id, void *data) Q_DECL_OVERRIDE;
++
+ private:
+     //TODO KF6: move those into the d-pointer
+     QString mIconName;
+



More information about the arch-commits mailing list