author | Felix Yan
<felixonmars@archlinux.org> 2015-02-25 10:30:54 UTC |
committer | Felix Yan
<felixonmars@archlinux.org> 2015-02-25 10:30:54 UTC |
parent | 96a32d4b52621c514804f82505aa96b5240bdbe7 |
PKGBUILD | +9 | -3 |
b0a6df6fbd9117b41a7f4e3bc861e20fbadb1956.patch | +32 | -0 |
diff --git a/PKGBUILD b/PKGBUILD index 670d21c..d8c7d48 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname=kiconthemes pkgver=5.7.0 -pkgrel=1 +pkgrel=2 pkgdesc='Support for icon themes' arch=('i686' 'x86_64') url='https://projects.kde.org/projects/frameworks/kiconthemes' @@ -11,11 +11,17 @@ license=('LGPL') depends=('qt5-svg' 'kconfigwidgets' 'kitemviews') makedepends=('extra-cmake-modules' 'python') groups=('kf5') -source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz") -md5sums=('d41b5a4f68e350b1d36e05c99f060e53') +source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz" + 'b0a6df6fbd9117b41a7f4e3bc861e20fbadb1956.patch') +md5sums=('d41b5a4f68e350b1d36e05c99f060e53' + 'd0b13de27754ed275b0a6ab8d41eb47a') prepare() { mkdir -p build + + cd ${pkgname}-${pkgver} + # FS#43940 + patch -p1 -i ../b0a6df6fbd9117b41a7f4e3bc861e20fbadb1956.patch } build() { diff --git a/b0a6df6fbd9117b41a7f4e3bc861e20fbadb1956.patch b/b0a6df6fbd9117b41a7f4e3bc861e20fbadb1956.patch new file mode 100644 index 0000000..8ad758d --- /dev/null +++ b/b0a6df6fbd9117b41a7f4e3bc861e20fbadb1956.patch @@ -0,0 +1,32 @@ +commit b0a6df6fbd9117b41a7f4e3bc861e20fbadb1956 +Author: Olivier Goffart <ogoffart@woboq.com> +Date: Tue Feb 17 15:24:08 2015 +0100 + + Fix QIcon::fromTheme(xxx, someFallback) would not return the fallback + + because KIconEngine::availableSize always return something even if the icon + is not there + + BUG: 342906 + REVIEW: 122608 + +diff --git a/src/kiconengine.cpp b/src/kiconengine.cpp +index 530403e..6dff533 100644 +--- a/src/kiconengine.cpp ++++ b/src/kiconengine.cpp +@@ -111,6 +111,15 @@ QList<QSize> KIconEngine::availableSizes(QIcon::Mode mode, QIcon::State state) c + { + Q_UNUSED(mode); + Q_UNUSED(state); ++ ++ if (!mIconLoader) { ++ return QList<QSize>(); ++ } ++ ++ if (mIconLoader->iconPath(mIconName, KIconLoader::Desktop, KIconLoader::MatchBest).isEmpty()) { ++ return QList<QSize>(); ++ } ++ + return QList<QSize>() << QSize(16, 16) + << QSize(22, 22) + << QSize(32, 32)