backport 0055-Respect-manual-set-icon-themes.patch (kde#344469)
This commit is contained in:
parent
99408e98f2
commit
144bca6ed5
|
@ -0,0 +1,55 @@
|
|||
From a8621a3f85e64f1252a80ae81a6e22554f7b3f44 Mon Sep 17 00:00:00 2001
|
||||
From: Sune Vuorela <sune@vuorela.dk>
|
||||
Date: Mon, 15 Jun 2015 21:16:24 +0200
|
||||
Subject: [PATCH 055/299] Respect manual set icon themes.
|
||||
|
||||
Currently all icon resolving is passed thru to the platform icon engine,
|
||||
even in the case where the application developer has set their own
|
||||
requested icon theme. In that case, the application developer
|
||||
specifically does not want to follow the icon theme of the system, so
|
||||
don't ask the platform, but rely on Qt code instead.
|
||||
|
||||
It leads to bugs reported to platform icon theme providers like this:
|
||||
MMC: https://github.com/MultiMC/MultiMC5/issues/796
|
||||
KDE: https://bugs.kde.org/show_bug.cgi?id=344469
|
||||
|
||||
Thanks to the multimc people (Jan Dalheimer and Peterix) for the
|
||||
reports and testcases.
|
||||
|
||||
Change-Id: I52cda6f688b2ef9e44e060c8ae67831cb02b26c8
|
||||
Reviewed-by: Eike Hein <hein@kde.org>
|
||||
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
|
||||
---
|
||||
src/gui/image/qicon.cpp | 3 ++-
|
||||
src/gui/image/qiconloader_p.h | 1 +
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
|
||||
index 40ba84b..cafc966 100644
|
||||
--- a/src/gui/image/qicon.cpp
|
||||
+++ b/src/gui/image/qicon.cpp
|
||||
@@ -1170,7 +1170,8 @@ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
|
||||
icon = *qtIconCache()->object(name);
|
||||
} else {
|
||||
QPlatformTheme * const platformTheme = QGuiApplicationPrivate::platformTheme();
|
||||
- QIconEngine * const engine = platformTheme ? platformTheme->createIconEngine(name)
|
||||
+ bool hasUserTheme = QIconLoader::instance()->hasUserTheme();
|
||||
+ QIconEngine * const engine = (platformTheme && !hasUserTheme) ? platformTheme->createIconEngine(name)
|
||||
: new QIconLoaderEngine(name);
|
||||
QIcon *cachedIcon = new QIcon(engine);
|
||||
icon = *cachedIcon;
|
||||
diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h
|
||||
index 38cf9c1..5b0362e 100644
|
||||
--- a/src/gui/image/qiconloader_p.h
|
||||
+++ b/src/gui/image/qiconloader_p.h
|
||||
@@ -173,6 +173,7 @@ public:
|
||||
void updateSystemTheme();
|
||||
void invalidateKey() { m_themeKey++; }
|
||||
void ensureInitialized();
|
||||
+ bool hasUserTheme() const { return !m_userTheme.isEmpty(); }
|
||||
|
||||
private:
|
||||
QThemeIconInfo findIconHelper(const QString &themeName,
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
Summary: Qt5 - QtBase components
|
||||
Name: qt5-qtbase
|
||||
Version: 5.5.0
|
||||
Release: 15%{?dist}
|
||||
Release: 16%{?dist}
|
||||
|
||||
# See LGPL_EXCEPTIONS.txt, for exception details
|
||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||
|
@ -110,7 +110,10 @@ Patch100: qtbase-opensource-src-5.4.0-QTBUG-43057.patch
|
|||
|
||||
# https://bugreports.qt.io/browse/QTBUG-46310
|
||||
#SM_CLIENT_ID property is not set
|
||||
Patch123: 0123-xcb-set-SM_CLIENT_ID-property.patch
|
||||
Patch223: 0123-xcb-set-SM_CLIENT_ID-property.patch
|
||||
|
||||
# https://bugs.kde.org/show_bug.cgi?id=344469
|
||||
Patch155: 0055-Respect-manual-set-icon-themes.patch
|
||||
|
||||
# macros, be mindful to keep sync'd with macros.qt5
|
||||
Source1: macros.qt5
|
||||
|
@ -382,7 +385,8 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
|
|||
%if 0%{?rhel} == 6
|
||||
%patch100 -p1 -b .QTBUG-43057
|
||||
%endif
|
||||
%patch123 -p1 -b .QTBUG-46310
|
||||
%patch155 -p1 -b .0055
|
||||
%patch223 -p1 -b .QTBUG-46310
|
||||
|
||||
# drop -fexceptions from $RPM_OPT_FLAGS
|
||||
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
|
||||
|
@ -939,6 +943,9 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Sat Aug 15 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.0-16
|
||||
- backport 0055-Respect-manual-set-icon-themes.patch (kde#344469)
|
||||
|
||||
* Fri Aug 07 2015 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.5.0-15
|
||||
- use valgrind to debug qdoc HTML generation
|
||||
|
||||
|
|
Loading…
Reference in New Issue