Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/, kde-frameworks/plasma/files/
Date: Sat, 15 Apr 2017 20:31:37
Message-Id: 1492288281.a5decb2f6b741174c2906759260db3fac6beb96d.asturm@gentoo
1 commit: a5decb2f6b741174c2906759260db3fac6beb96d
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 15 19:50:26 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 15 20:31:21 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5decb2f
7
8 kde-frameworks/plasma: Add upstream fixes
9
10 - Wrong/weird toolbox icon sizes
11 - Wrong language locale in calendar popup
12 - Plasmashell runtime crashes caused by systray applets
13
14 Package-Manager: Portage-2.3.3, Repoman-2.3.1
15
16 .../files/plasma-5.33.0-calendar-locale.patch | 49 ++++++
17 .../plasma/files/plasma-5.33.0-iconsize.patch | 164 +++++++++++++++++++++
18 .../plasma-5.33.0-systray-crash-plasmashell.patch | 55 +++++++
19 kde-frameworks/plasma/plasma-5.33.0-r1.ebuild | 76 ++++++++++
20 4 files changed, 344 insertions(+)
21
22 diff --git a/kde-frameworks/plasma/files/plasma-5.33.0-calendar-locale.patch b/kde-frameworks/plasma/files/plasma-5.33.0-calendar-locale.patch
23 new file mode 100644
24 index 00000000000..554ac228d65
25 --- /dev/null
26 +++ b/kde-frameworks/plasma/files/plasma-5.33.0-calendar-locale.patch
27 @@ -0,0 +1,49 @@
28 +commit a01e4fb69efeb7a803e6d3a272c62224d7df2494
29 +Author: David Rosca <nowrep@×××××.com>
30 +Date: Sat Apr 8 10:40:27 2017 +0200
31 +
32 + Calendar: Use correct language for month and day names
33 +
34 + Apply fix for bug 353715 also on QML side.
35 +
36 + Differential Revision: https://phabricator.kde.org/D5345
37 +
38 +diff --git a/src/declarativeimports/calendar/qml/DaysCalendar.qml b/src/declarativeimports/calendar/qml/DaysCalendar.qml
39 +index 02b23b6e5..2b3ce446c 100644
40 +--- a/src/declarativeimports/calendar/qml/DaysCalendar.qml
41 ++++ b/src/declarativeimports/calendar/qml/DaysCalendar.qml
42 +@@ -312,7 +312,7 @@ Item {
43 + Components.Label {
44 + width: daysCalendar.cellWidth
45 + height: daysCalendar.cellHeight
46 +- text: Qt.locale().dayName(calendarBackend.firstDayOfWeek + index, Locale.ShortFormat)
47 ++ text: Qt.locale(Qt.locale().uiLanguages[0]).dayName(calendarBackend.firstDayOfWeek + index, Locale.ShortFormat)
48 + font.pixelSize: Math.max(theme.smallestFont.pixelSize, daysCalendar.cellHeight / 3)
49 + opacity: 0.4
50 + horizontalAlignment: Text.AlignHCenter
51 +diff --git a/src/declarativeimports/calendar/qml/MonthMenu.qml b/src/declarativeimports/calendar/qml/MonthMenu.qml
52 +index aa5d3b46d..beddf6852 100644
53 +--- a/src/declarativeimports/calendar/qml/MonthMenu.qml
54 ++++ b/src/declarativeimports/calendar/qml/MonthMenu.qml
55 +@@ -28,7 +28,7 @@ PlasmaComponents.Menu {
56 + property Instantiator items: Instantiator {
57 + model: 12
58 + PlasmaComponents.MenuItem {
59 +- text: capitalizeFirstLetter(Qt.locale().standaloneMonthName(index))
60 ++ text: capitalizeFirstLetter(Qt.locale(Qt.locale().uiLanguages[0]).standaloneMonthName(index))
61 + onClicked: calendarBackend.displayedDate = new Date(year, index, 1)
62 + }
63 + onObjectAdded: testMenu.addMenuItem(object)
64 +diff --git a/src/declarativeimports/calendar/qml/MonthView.qml b/src/declarativeimports/calendar/qml/MonthView.qml
65 +index a2229e5f2..e3c0e95d0 100644
66 +--- a/src/declarativeimports/calendar/qml/MonthView.qml
67 ++++ b/src/declarativeimports/calendar/qml/MonthView.qml
68 +@@ -143,7 +143,7 @@ PinchArea {
69 + Component.onCompleted: {
70 + for (var i = 0; i < 12; ++i) {
71 + append({
72 +- label: Qt.locale().standaloneMonthName(i, Locale.LongFormat),
73 ++ label: Qt.locale(Qt.locale().uiLanguages[0]).standaloneMonthName(i, Locale.LongFormat),
74 + monthNumber: i + 1,
75 + isCurrent: true
76 + })
77
78 diff --git a/kde-frameworks/plasma/files/plasma-5.33.0-iconsize.patch b/kde-frameworks/plasma/files/plasma-5.33.0-iconsize.patch
79 new file mode 100644
80 index 00000000000..b74c8224fde
81 --- /dev/null
82 +++ b/kde-frameworks/plasma/files/plasma-5.33.0-iconsize.patch
83 @@ -0,0 +1,164 @@
84 +commit fb8ed07651a7101c2f9c41c6e6676ac8196c1225
85 +Author: Marco Martin <notmart@×××××.com>
86 +Date: Mon Apr 3 15:42:29 2017 +0200
87 +
88 + if the user did set an implicit size, keep it
89 +
90 + Summary:
91 + if the user code did something like
92 + IconItem {
93 + implicitWidth: 32
94 + implicitHeight: 32
95 + }
96 +
97 + then never automatically update implicitWidth or height.
98 + this favors compatibility and fixes the desktop
99 + toolbox appearance
100 +
101 + Test Plan:
102 + textbox works, other icon items in plasmashell seems properly sized.
103 + applet alternatives fix is still needed
104 +
105 + Reviewers: #plasma, hein
106 +
107 + Reviewed By: #plasma, hein
108 +
109 + Subscribers: hein, davidedmundson, plasma-devel, #frameworks
110 +
111 + Tags: #plasma, #frameworks
112 +
113 + Differential Revision: https://phabricator.kde.org/D5243
114 +
115 +diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp
116 +index e1666aa32..2b96c619d 100644
117 +--- a/src/declarativeimports/core/iconitem.cpp
118 ++++ b/src/declarativeimports/core/iconitem.cpp
119 +@@ -49,6 +49,8 @@ IconItem::IconItem(QQuickItem *parent)
120 + m_sizeChanged(false),
121 + m_allowNextAnimation(false),
122 + m_blockNextAnimation(false),
123 ++ m_implicitHeightSetByUser(false),
124 ++ m_implicitWidthSetByUser(false),
125 + m_colorGroup(Plasma::Theme::NormalColorGroup),
126 + m_animValue(0)
127 + {
128 +@@ -75,6 +77,9 @@ IconItem::IconItem(QQuickItem *parent)
129 + connect(this, SIGNAL(overlaysChanged()),
130 + this, SLOT(schedulePixmapUpdate()));
131 +
132 ++ connect(this, &IconItem::implicitWidthChanged, this, &IconItem::implicitWidthChanged2);
133 ++ connect(this, &IconItem::implicitHeightChanged, this, &IconItem::implicitHeightChanged2);
134 ++
135 + updateImplicitSize();
136 + }
137 +
138 +@@ -88,7 +93,13 @@ void IconItem::updateImplicitSize()
139 + const QSize &s = m_imageIcon.size();
140 +
141 + if (s.isValid()) {
142 +- setImplicitSize(s.width(), s.height());
143 ++ if (!m_implicitWidthSetByUser && !m_implicitHeightSetByUser) {
144 ++ setImplicitSize(s.width(), s.height());
145 ++ } else if (!m_implicitWidthSetByUser) {
146 ++ setImplicitWidth(s.width());
147 ++ } else if (!m_implicitHeightSetByUser) {
148 ++ setImplicitHeight(s.height());
149 ++ }
150 +
151 + return;
152 + }
153 +@@ -105,7 +116,13 @@ void IconItem::updateImplicitSize()
154 + s = m_svgIcon->size();
155 + }
156 + if (s.isValid()) {
157 +- setImplicitSize(s.width(), s.height());
158 ++ if (!m_implicitWidthSetByUser && !m_implicitHeightSetByUser) {
159 ++ setImplicitSize(s.width(), s.height());
160 ++ } else if (!m_implicitWidthSetByUser) {
161 ++ setImplicitWidth(s.width());
162 ++ } else if (!m_implicitHeightSetByUser) {
163 ++ setImplicitHeight(s.height());
164 ++ }
165 +
166 + return;
167 + }
168 +@@ -113,7 +130,14 @@ void IconItem::updateImplicitSize()
169 +
170 + // Fall back to initializing implicit size to the Dialog size.
171 + const int implicitSize = KIconLoader::global()->currentSize(KIconLoader::Dialog);
172 +- setImplicitSize(implicitSize, implicitSize);
173 ++
174 ++ if (!m_implicitWidthSetByUser && !m_implicitHeightSetByUser) {
175 ++ setImplicitSize(implicitSize, implicitSize);
176 ++ } else if (!m_implicitWidthSetByUser) {
177 ++ setImplicitWidth(implicitSize);
178 ++ } else if (!m_implicitHeightSetByUser) {
179 ++ setImplicitHeight(implicitSize);
180 ++ }
181 + }
182 +
183 + void IconItem::setSource(const QVariant &source)
184 +@@ -418,6 +442,20 @@ Plasma::Svg::Status IconItem::status() const
185 + return m_status;
186 + }
187 +
188 ++void IconItem::setImplicitHeight2(int height)
189 ++{
190 ++ m_implicitHeightSetByUser = true;
191 ++ setImplicitHeight(height);
192 ++ emit implicitHeightChanged2();
193 ++}
194 ++
195 ++void IconItem::setImplicitWidth2(int width)
196 ++{
197 ++ m_implicitWidthSetByUser = true;
198 ++ setImplicitWidth(width);
199 ++ emit implicitWidthChanged2();
200 ++}
201 ++
202 + void IconItem::updatePolish()
203 + {
204 + QQuickItem::updatePolish();
205 +diff --git a/src/declarativeimports/core/iconitem.h b/src/declarativeimports/core/iconitem.h
206 +index e4b2a959d..8b524e7a0 100644
207 +--- a/src/declarativeimports/core/iconitem.h
208 ++++ b/src/declarativeimports/core/iconitem.h
209 +@@ -119,6 +119,10 @@ class IconItem : public QQuickItem
210 + */
211 + Q_PROPERTY(int paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
212 +
213 ++ Q_PROPERTY(int implicitHeight READ implicitHeight WRITE setImplicitHeight2 NOTIFY implicitHeightChanged2)
214 ++
215 ++ Q_PROPERTY(int implicitWidth READ implicitWidth WRITE setImplicitWidth2 NOTIFY implicitWidthChanged2)
216 ++
217 + public:
218 + IconItem(QQuickItem *parent = 0);
219 + ~IconItem();
220 +@@ -155,6 +159,9 @@ public:
221 + void setStatus(Plasma::Svg::Status status);
222 + Plasma::Svg::Status status() const;
223 +
224 ++ void setImplicitHeight2(int height);
225 ++ void setImplicitWidth2(int height);
226 ++
227 + void updatePolish() Q_DECL_OVERRIDE;
228 + QSGNode* updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData * updatePaintNodeData) Q_DECL_OVERRIDE;
229 +
230 +@@ -176,6 +183,8 @@ Q_SIGNALS:
231 + void colorGroupChanged();
232 + void paintedSizeChanged();
233 + void statusChanged();
234 ++ void implicitHeightChanged2();
235 ++ void implicitWidthChanged2();
236 +
237 + private Q_SLOTS:
238 + void schedulePixmapUpdate();
239 +@@ -210,6 +219,8 @@ private:
240 + bool m_sizeChanged;
241 + bool m_allowNextAnimation;
242 + bool m_blockNextAnimation;
243 ++ bool m_implicitHeightSetByUser;
244 ++ bool m_implicitWidthSetByUser;
245 +
246 + QPixmap m_iconPixmap;
247 + QPixmap m_oldIconPixmap;
248
249 diff --git a/kde-frameworks/plasma/files/plasma-5.33.0-systray-crash-plasmashell.patch b/kde-frameworks/plasma/files/plasma-5.33.0-systray-crash-plasmashell.patch
250 new file mode 100644
251 index 00000000000..64a50b9c164
252 --- /dev/null
253 +++ b/kde-frameworks/plasma/files/plasma-5.33.0-systray-crash-plasmashell.patch
254 @@ -0,0 +1,55 @@
255 +commit 1387b5efe31e330777c8ffd9029f79063cc7a7a9
256 +Author: David Edmundson <kde@×××××××××××××××××.uk>
257 +Date: Thu Apr 13 10:41:40 2017 +0100
258 +
259 + Guard against Applet not loading AppletInterface
260 +
261 + Summary:
262 + This can happen if an applet has invalid metadata, it doesn't have a
263 + script engine set (X-Plasma-API) so it won't load the DeclarativeAppletScripts
264 + Having invalid metadata could come from the applet, or from the fallback applet
265 + created in Containment::Private::createApplet.
266 +
267 + We guard against it in appletAdded but not in appletRemoved, which is
268 + inconsistent. We also apparently must have guards elsewhere otherwise
269 + we'd see the crash more.
270 +
271 + BUG: 377050
272 +
273 + Test Plan: Had corrupt applet, used to crash, now doesn't
274 +
275 + Reviewers: #plasma
276 +
277 + Subscribers: plasma-devel, #frameworks
278 +
279 + Tags: #plasma, #frameworks
280 +
281 + Differential Revision: https://phabricator.kde.org/D5423
282 +
283 +diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp
284 +index 2ba4a8218..e311f6018 100644
285 +--- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp
286 ++++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp
287 +@@ -821,7 +821,8 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
288 + // qDebug() << "Applet added on containment:" << m_containment->title() << contGraphicObject
289 + // << "Applet: " << applet << applet->title() << appletGraphicObject;
290 +
291 +- //Every applet should have a graphics object, otherwise don't disaplay anything
292 ++ //applets can not have a graphic object if they don't have a script engine loaded
293 ++ //this can happen if they were loaded with an invalid metadata
294 + if (!appletGraphicObject) {
295 + return;
296 + }
297 +@@ -843,8 +844,10 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
298 + void ContainmentInterface::appletRemovedForward(Plasma::Applet *applet)
299 + {
300 + AppletInterface *appletGraphicObject = applet->property("_plasma_graphicObject").value<AppletInterface *>();
301 +- m_appletInterfaces.removeAll(appletGraphicObject);
302 +- appletGraphicObject->m_positionBeforeRemoval = appletGraphicObject->mapToItem(this, QPointF());
303 ++ if (appletGraphicObject) {
304 ++ m_appletInterfaces.removeAll(appletGraphicObject);
305 ++ appletGraphicObject->m_positionBeforeRemoval = appletGraphicObject->mapToItem(this, QPointF());
306 ++ }
307 + emit appletRemoved(appletGraphicObject);
308 + emit appletsChanged();
309 + }
310
311 diff --git a/kde-frameworks/plasma/plasma-5.33.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.33.0-r1.ebuild
312 new file mode 100644
313 index 00000000000..c2e74f8b08e
314 --- /dev/null
315 +++ b/kde-frameworks/plasma/plasma-5.33.0-r1.ebuild
316 @@ -0,0 +1,76 @@
317 +# Copyright 1999-2017 Gentoo Foundation
318 +# Distributed under the terms of the GNU General Public License v2
319 +
320 +EAPI=6
321 +
322 +KMNAME="${PN}-framework"
323 +VIRTUALX_REQUIRED="test"
324 +inherit kde5
325 +
326 +DESCRIPTION="Plasma framework"
327 +LICENSE="LGPL-2+"
328 +KEYWORDS="~amd64 ~arm ~x86"
329 +IUSE="gles2 wayland X"
330 +
331 +COMMON_DEPEND="
332 + $(add_frameworks_dep kactivities)
333 + $(add_frameworks_dep karchive)
334 + $(add_frameworks_dep kconfig)
335 + $(add_frameworks_dep kconfigwidgets)
336 + $(add_frameworks_dep kcoreaddons)
337 + $(add_frameworks_dep kdeclarative)
338 + $(add_frameworks_dep kglobalaccel)
339 + $(add_frameworks_dep kguiaddons)
340 + $(add_frameworks_dep ki18n)
341 + $(add_frameworks_dep kiconthemes)
342 + $(add_frameworks_dep kio)
343 + $(add_frameworks_dep knotifications)
344 + $(add_frameworks_dep kpackage)
345 + $(add_frameworks_dep kservice)
346 + $(add_frameworks_dep kwindowsystem)
347 + $(add_frameworks_dep kxmlgui)
348 + $(add_qt_dep qtdbus)
349 + $(add_qt_dep qtdeclarative)
350 + $(add_qt_dep qtgui 'gles2=')
351 + $(add_qt_dep qtquickcontrols)
352 + $(add_qt_dep qtsql)
353 + $(add_qt_dep qtsvg)
354 + $(add_qt_dep qtwidgets)
355 + !gles2? ( virtual/opengl )
356 + wayland? (
357 + $(add_frameworks_dep kwayland)
358 + media-libs/mesa[egl]
359 + )
360 + X? (
361 + $(add_qt_dep qtx11extras)
362 + x11-libs/libX11
363 + x11-libs/libxcb
364 + )
365 +"
366 +DEPEND="${COMMON_DEPEND}
367 + $(add_frameworks_dep kdoctools)
368 + X? ( x11-proto/xproto )
369 +"
370 +RDEPEND="${COMMON_DEPEND}
371 + !<kde-apps/kapptemplate-15.08.3-r1:5
372 +"
373 +
374 +RESTRICT+=" test"
375 +
376 +PATCHES=(
377 + "${FILESDIR}/${P}-iconsize.patch"
378 + "${FILESDIR}/${P}-calendar-locale.patch"
379 + "${FILESDIR}/${P}-systray-crash-plasmashell.patch"
380 +)
381 +
382 +src_configure() {
383 + local mycmakeargs=(
384 + $(cmake-utils_use_find_package !gles2 OpenGL)
385 + $(cmake-utils_use_find_package wayland EGL)
386 + $(cmake-utils_use_find_package wayland KF5Wayland)
387 + $(cmake-utils_use_find_package X X11)
388 + $(cmake-utils_use_find_package X XCB)
389 + )
390 +
391 + kde5_src_configure
392 +}