Accepting request 391723 from home:wolfi323:branches:KDE:Applications
- Added specify-fallback-icon.patch: fixes missing icons for certain filetypes where the specified icon doesn't exist (kde#358958, kde#361034) OBS-URL: https://build.opensuse.org/request/show/391723 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/dolphin?expand=0&rev=42
This commit is contained in:
parent
96bf014e7c
commit
24f3718603
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 26 14:32:54 UTC 2016 - wbauer@tmo.at
|
||||||
|
|
||||||
|
- Added specify-fallback-icon.patch: fixes missing icons for
|
||||||
|
certain filetypes where the specified icon doesn't exist
|
||||||
|
(kde#358958, kde#361034)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Apr 17 05:50:36 UTC 2016 - tittiatcoke@gmail.com
|
Sun Apr 17 05:50:36 UTC 2016 - tittiatcoke@gmail.com
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ Url: http://www.kde.org/
|
|||||||
Source: dolphin-%{version}.tar.xz
|
Source: dolphin-%{version}.tar.xz
|
||||||
Source1: dolphinsu.desktop
|
Source1: dolphinsu.desktop
|
||||||
Patch0: dolphin-go_up.diff
|
Patch0: dolphin-go_up.diff
|
||||||
|
# PATCH-FIX-UPSTREAM specify-fallback-icon.patch kde#358958, kde#361034 -- fixes missing icons for certain filetypes where the specified icon doesn't exist
|
||||||
|
Patch1: specify-fallback-icon.patch
|
||||||
BuildRequires: baloo5-devel
|
BuildRequires: baloo5-devel
|
||||||
BuildRequires: baloo5-widgets-devel
|
BuildRequires: baloo5-widgets-devel
|
||||||
BuildRequires: extra-cmake-modules >= 1.6.0
|
BuildRequires: extra-cmake-modules >= 1.6.0
|
||||||
@ -94,6 +96,7 @@ This package contains the libraries used by Dolphin and Konqueror.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n dolphin-%{version}
|
%setup -q -n dolphin-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build
|
%cmake_kf5 -d build
|
||||||
|
39
specify-fallback-icon.patch
Normal file
39
specify-fallback-icon.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From: Wolfgang Bauer <wbauer@tmo.at>
|
||||||
|
Date: Tue, 26 Apr 2016 14:11:26 +0000
|
||||||
|
Subject: Specify a fallback icon to QIcon::fromTheme()
|
||||||
|
X-Git-Url: http://quickgit.kde.org/?p=dolphin.git&a=commitdiff&h=44d4d2ea715719a08c639541530a5b330647297d
|
||||||
|
---
|
||||||
|
Specify a fallback icon to QIcon::fromTheme()
|
||||||
|
|
||||||
|
The default fallback of QIcon::fromTheme() is QIcon(), i.e. a null icon.
|
||||||
|
Set the generic "unknown" icon as fallback to prevent missing icons for
|
||||||
|
filetypes that specify an icon name that doesn't exist.
|
||||||
|
|
||||||
|
This also gets rid of "QPixmap::scaled: Pixmap is a null pixmap"
|
||||||
|
warnings in that case.
|
||||||
|
|
||||||
|
BUG: 358958
|
||||||
|
BUG: 361034
|
||||||
|
FIXED-IN: 16.04.1
|
||||||
|
REVIEW: 127713
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
--- a/src/kitemviews/kstandarditemlistwidget.cpp
|
||||||
|
+++ b/src/kitemviews/kstandarditemlistwidget.cpp
|
||||||
|
@@ -1440,12 +1440,13 @@
|
||||||
|
|
||||||
|
QPixmap KStandardItemListWidget::pixmapForIcon(const QString& name, const QStringList& overlays, int size)
|
||||||
|
{
|
||||||
|
+ static const QIcon fallbackIcon = QIcon::fromTheme(QStringLiteral("unknown"));
|
||||||
|
size *= qApp->devicePixelRatio();
|
||||||
|
const QString key = "KStandardItemListWidget:" % name % ":" % overlays.join(QStringLiteral(":")) % ":" % QString::number(size);
|
||||||
|
QPixmap pixmap;
|
||||||
|
|
||||||
|
if (!QPixmapCache::find(key, pixmap)) {
|
||||||
|
- const QIcon icon = QIcon::fromTheme(name);
|
||||||
|
+ const QIcon icon = QIcon::fromTheme(name, fallbackIcon);
|
||||||
|
|
||||||
|
int requestedSize;
|
||||||
|
if (size <= KIconLoader::SizeSmall) {
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user