Date: Tuesday, December 8, 2015 @ 13:42:59 Author: foutrelis Revision: 253774
Add patch to svn Added: plasma-framework/trunk/bug355577.patch Modified: plasma-framework/trunk/PKGBUILD -----------------+ PKGBUILD | 4 +-- bug355577.patch | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-12-08 12:41:08 UTC (rev 253773) +++ PKGBUILD 2015-12-08 12:42:59 UTC (rev 253774) @@ -13,9 +13,9 @@ makedepends=('extra-cmake-modules' 'qt5-tools' 'kdoctools') groups=('kf5') source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz" - "bug355577.patch::https://quickgit.kde.org/?p=plasma-framework.git&a=commitdiff&h=9ccc62&o=plain") + 'bug355577.patch') md5sums=('bf64d612d33c73c51841d74540cc119f' - '0494f166e36aec137472057120abcf3c') + '64e1544f397fcc210bd93a184a181903') prepare() { mkdir -p build Added: bug355577.patch =================================================================== --- bug355577.patch (rev 0) +++ bug355577.patch 2015-12-08 12:42:59 UTC (rev 253774) @@ -0,0 +1,55 @@ +From: Kai Uwe Broulik <k...@privat.broulik.de> +Date: Wed, 25 Nov 2015 17:17:57 +0000 +Subject: [IconItem] Don't crash on null KIconLoader theme +X-Git-Tag: v5.17.0-rc1 +X-Git-Url: http://quickgit.kde.org/?p=plasma-framework.git&a=commitdiff&h=9ccc6293f792bb5a5cae624568c0073a73064b88 +--- +[IconItem] Don't crash on null KIconLoader theme + +REVIEW: 126168 +BUG: 355577 +FIXED-IN: 5.17 +--- + + +--- a/src/declarativeimports/core/iconitem.cpp ++++ b/src/declarativeimports/core/iconitem.cpp +@@ -134,9 +134,15 @@ + //ok, svg not available from the plasma theme + } else { + //try to load from iconloader an svg with Plasma::Svg +- QString iconPath = KIconLoader::global()->theme()->iconPath(source.toString() + ".svg", qMin(width(), height()), KIconLoader::MatchBest); +- if (iconPath.isEmpty()) { +- iconPath = KIconLoader::global()->theme()->iconPath(source.toString() + ".svgz", qMin(width(), height()), KIconLoader::MatchBest); ++ const auto *iconTheme = KIconLoader::global()->theme(); ++ QString iconPath; ++ if (iconTheme) { ++ iconTheme->iconPath(source.toString() + ".svg", qMin(width(), height()), KIconLoader::MatchBest); ++ if (iconPath.isEmpty()) { ++ iconPath = iconTheme->iconPath(source.toString() + ".svgz", qMin(width(), height()), KIconLoader::MatchBest); ++ } ++ } else { ++ qWarning() << "KIconLoader has no theme set"; + } + m_svgFromIconLoader = !iconPath.isEmpty(); + +@@ -339,9 +345,15 @@ + if (m_svgIcon->hasElement(m_source.toString())) { + result = m_svgIcon->pixmap(m_source.toString()); + } else if (m_svgFromIconLoader) { +- QString iconPath = KIconLoader::global()->theme()->iconPath(source().toString() + ".svg", qMin(width(), height()), KIconLoader::MatchBest); +- if (iconPath.isEmpty()) { +- iconPath = KIconLoader::global()->theme()->iconPath(source().toString() + ".svgz", qMin(width(), height()), KIconLoader::MatchBest); ++ const auto *iconTheme = KIconLoader::global()->theme(); ++ QString iconPath; ++ if (iconTheme) { ++ QString iconPath = iconTheme->iconPath(source().toString() + ".svg", qMin(width(), height()), KIconLoader::MatchBest); ++ if (iconPath.isEmpty()) { ++ iconPath = iconTheme->iconPath(source().toString() + ".svgz", qMin(width(), height()), KIconLoader::MatchBest); ++ } ++ } else { ++ qWarning() << "KIconLoader has no theme set"; + } + + if (!iconPath.isEmpty()) { +