public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/, kde-frameworks/plasma/files/
Date: Sat, 15 Apr 2017 20:31:31 +0000 (UTC)	[thread overview]
Message-ID: <1492288281.a5decb2f6b741174c2906759260db3fac6beb96d.asturm@gentoo> (raw)

commit:     a5decb2f6b741174c2906759260db3fac6beb96d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 15 19:50:26 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 15 20:31:21 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5decb2f

kde-frameworks/plasma: Add upstream fixes

- Wrong/weird toolbox icon sizes
- Wrong language locale in calendar popup
- Plasmashell runtime crashes caused by systray applets

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../files/plasma-5.33.0-calendar-locale.patch      |  49 ++++++
 .../plasma/files/plasma-5.33.0-iconsize.patch      | 164 +++++++++++++++++++++
 .../plasma-5.33.0-systray-crash-plasmashell.patch  |  55 +++++++
 kde-frameworks/plasma/plasma-5.33.0-r1.ebuild      |  76 ++++++++++
 4 files changed, 344 insertions(+)

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
new file mode 100644
index 00000000000..554ac228d65
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.33.0-calendar-locale.patch
@@ -0,0 +1,49 @@
+commit a01e4fb69efeb7a803e6d3a272c62224d7df2494
+Author: David Rosca <nowrep@gmail.com>
+Date:   Sat Apr 8 10:40:27 2017 +0200
+
+    Calendar: Use correct language for month and day names
+    
+    Apply fix for bug 353715 also on QML side.
+    
+    Differential Revision: https://phabricator.kde.org/D5345
+
+diff --git a/src/declarativeimports/calendar/qml/DaysCalendar.qml b/src/declarativeimports/calendar/qml/DaysCalendar.qml
+index 02b23b6e5..2b3ce446c 100644
+--- a/src/declarativeimports/calendar/qml/DaysCalendar.qml
++++ b/src/declarativeimports/calendar/qml/DaysCalendar.qml
+@@ -312,7 +312,7 @@ Item {
+             Components.Label {
+                 width: daysCalendar.cellWidth
+                 height: daysCalendar.cellHeight
+-                text: Qt.locale().dayName(calendarBackend.firstDayOfWeek + index, Locale.ShortFormat)
++                text: Qt.locale(Qt.locale().uiLanguages[0]).dayName(calendarBackend.firstDayOfWeek + index, Locale.ShortFormat)
+                 font.pixelSize: Math.max(theme.smallestFont.pixelSize, daysCalendar.cellHeight / 3)
+                 opacity: 0.4
+                 horizontalAlignment: Text.AlignHCenter
+diff --git a/src/declarativeimports/calendar/qml/MonthMenu.qml b/src/declarativeimports/calendar/qml/MonthMenu.qml
+index aa5d3b46d..beddf6852 100644
+--- a/src/declarativeimports/calendar/qml/MonthMenu.qml
++++ b/src/declarativeimports/calendar/qml/MonthMenu.qml
+@@ -28,7 +28,7 @@ PlasmaComponents.Menu {
+     property Instantiator items: Instantiator {
+         model: 12
+         PlasmaComponents.MenuItem {
+-            text: capitalizeFirstLetter(Qt.locale().standaloneMonthName(index))
++            text: capitalizeFirstLetter(Qt.locale(Qt.locale().uiLanguages[0]).standaloneMonthName(index))
+             onClicked: calendarBackend.displayedDate = new Date(year, index, 1)
+         }
+         onObjectAdded: testMenu.addMenuItem(object)
+diff --git a/src/declarativeimports/calendar/qml/MonthView.qml b/src/declarativeimports/calendar/qml/MonthView.qml
+index a2229e5f2..e3c0e95d0 100644
+--- a/src/declarativeimports/calendar/qml/MonthView.qml
++++ b/src/declarativeimports/calendar/qml/MonthView.qml
+@@ -143,7 +143,7 @@ PinchArea {
+         Component.onCompleted: {
+             for (var i = 0; i < 12; ++i) {
+                 append({
+-                    label: Qt.locale().standaloneMonthName(i, Locale.LongFormat),
++                    label: Qt.locale(Qt.locale().uiLanguages[0]).standaloneMonthName(i, Locale.LongFormat),
+                     monthNumber: i + 1,
+                     isCurrent: true
+                 })

diff --git a/kde-frameworks/plasma/files/plasma-5.33.0-iconsize.patch b/kde-frameworks/plasma/files/plasma-5.33.0-iconsize.patch
new file mode 100644
index 00000000000..b74c8224fde
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.33.0-iconsize.patch
@@ -0,0 +1,164 @@
+commit fb8ed07651a7101c2f9c41c6e6676ac8196c1225
+Author: Marco Martin <notmart@gmail.com>
+Date:   Mon Apr 3 15:42:29 2017 +0200
+
+    if the user did set an implicit size, keep it
+    
+    Summary:
+    if the user code did something like
+    IconItem {
+       implicitWidth: 32
+       implicitHeight: 32
+    }
+    
+    then never automatically update implicitWidth or height.
+    this favors compatibility and fixes the desktop
+    toolbox appearance
+    
+    Test Plan:
+    textbox works, other icon items in plasmashell seems properly sized.
+    applet alternatives fix is still needed
+    
+    Reviewers: #plasma, hein
+    
+    Reviewed By: #plasma, hein
+    
+    Subscribers: hein, davidedmundson, plasma-devel, #frameworks
+    
+    Tags: #plasma, #frameworks
+    
+    Differential Revision: https://phabricator.kde.org/D5243
+
+diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp
+index e1666aa32..2b96c619d 100644
+--- a/src/declarativeimports/core/iconitem.cpp
++++ b/src/declarativeimports/core/iconitem.cpp
+@@ -49,6 +49,8 @@ IconItem::IconItem(QQuickItem *parent)
+       m_sizeChanged(false),
+       m_allowNextAnimation(false),
+       m_blockNextAnimation(false),
++      m_implicitHeightSetByUser(false),
++      m_implicitWidthSetByUser(false),
+       m_colorGroup(Plasma::Theme::NormalColorGroup),
+       m_animValue(0)
+ {
+@@ -75,6 +77,9 @@ IconItem::IconItem(QQuickItem *parent)
+     connect(this, SIGNAL(overlaysChanged()),
+             this, SLOT(schedulePixmapUpdate()));
+ 
++    connect(this, &IconItem::implicitWidthChanged, this, &IconItem::implicitWidthChanged2);
++    connect(this, &IconItem::implicitHeightChanged, this, &IconItem::implicitHeightChanged2);
++
+     updateImplicitSize();
+ }
+ 
+@@ -88,7 +93,13 @@ void IconItem::updateImplicitSize()
+         const QSize &s = m_imageIcon.size();
+ 
+         if (s.isValid()) {
+-            setImplicitSize(s.width(), s.height());
++            if (!m_implicitWidthSetByUser && !m_implicitHeightSetByUser) {
++                setImplicitSize(s.width(), s.height());
++            } else if (!m_implicitWidthSetByUser) {
++                setImplicitWidth(s.width());
++            } else if (!m_implicitHeightSetByUser) {
++                setImplicitHeight(s.height());
++            }
+ 
+             return;
+         }
+@@ -105,7 +116,13 @@ void IconItem::updateImplicitSize()
+             s = m_svgIcon->size();
+         }
+         if (s.isValid()) {
+-            setImplicitSize(s.width(), s.height());
++            if (!m_implicitWidthSetByUser && !m_implicitHeightSetByUser) {
++                setImplicitSize(s.width(), s.height());
++            } else if (!m_implicitWidthSetByUser) {
++                setImplicitWidth(s.width());
++            } else if (!m_implicitHeightSetByUser) {
++                setImplicitHeight(s.height());
++            }
+ 
+             return;
+         }
+@@ -113,7 +130,14 @@ void IconItem::updateImplicitSize()
+ 
+     // Fall back to initializing implicit size to the Dialog size.
+     const int implicitSize = KIconLoader::global()->currentSize(KIconLoader::Dialog);
+-    setImplicitSize(implicitSize, implicitSize);
++
++    if (!m_implicitWidthSetByUser && !m_implicitHeightSetByUser) {
++        setImplicitSize(implicitSize, implicitSize);
++    } else if (!m_implicitWidthSetByUser) {
++        setImplicitWidth(implicitSize);
++    } else if (!m_implicitHeightSetByUser) {
++        setImplicitHeight(implicitSize);
++    }
+ }
+ 
+ void IconItem::setSource(const QVariant &source)
+@@ -418,6 +442,20 @@ Plasma::Svg::Status IconItem::status() const
+     return m_status;
+ }
+ 
++void IconItem::setImplicitHeight2(int height)
++{
++    m_implicitHeightSetByUser = true;
++    setImplicitHeight(height);
++    emit implicitHeightChanged2();
++}
++
++void IconItem::setImplicitWidth2(int width)
++{
++    m_implicitWidthSetByUser = true;
++    setImplicitWidth(width);
++    emit implicitWidthChanged2();
++}
++
+ void IconItem::updatePolish()
+ {
+     QQuickItem::updatePolish();
+diff --git a/src/declarativeimports/core/iconitem.h b/src/declarativeimports/core/iconitem.h
+index e4b2a959d..8b524e7a0 100644
+--- a/src/declarativeimports/core/iconitem.h
++++ b/src/declarativeimports/core/iconitem.h
+@@ -119,6 +119,10 @@ class IconItem : public QQuickItem
+      */
+     Q_PROPERTY(int paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
+ 
++    Q_PROPERTY(int implicitHeight READ implicitHeight WRITE setImplicitHeight2 NOTIFY implicitHeightChanged2)
++
++    Q_PROPERTY(int implicitWidth READ implicitWidth WRITE setImplicitWidth2 NOTIFY implicitWidthChanged2)
++
+ public:
+     IconItem(QQuickItem *parent = 0);
+     ~IconItem();
+@@ -155,6 +159,9 @@ public:
+     void setStatus(Plasma::Svg::Status status);
+     Plasma::Svg::Status status() const;
+ 
++    void setImplicitHeight2(int height);
++    void setImplicitWidth2(int height);
++
+     void updatePolish() Q_DECL_OVERRIDE;
+     QSGNode* updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData * updatePaintNodeData) Q_DECL_OVERRIDE;
+ 
+@@ -176,6 +183,8 @@ Q_SIGNALS:
+     void colorGroupChanged();
+     void paintedSizeChanged();
+     void statusChanged();
++    void implicitHeightChanged2();
++    void implicitWidthChanged2();
+ 
+ private Q_SLOTS:
+     void schedulePixmapUpdate();
+@@ -210,6 +219,8 @@ private:
+     bool m_sizeChanged;
+     bool m_allowNextAnimation;
+     bool m_blockNextAnimation;
++    bool m_implicitHeightSetByUser;
++    bool m_implicitWidthSetByUser;
+ 
+     QPixmap m_iconPixmap;
+     QPixmap m_oldIconPixmap;

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
new file mode 100644
index 00000000000..64a50b9c164
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.33.0-systray-crash-plasmashell.patch
@@ -0,0 +1,55 @@
+commit 1387b5efe31e330777c8ffd9029f79063cc7a7a9
+Author: David Edmundson <kde@davidedmundson.co.uk>
+Date:   Thu Apr 13 10:41:40 2017 +0100
+
+    Guard against Applet not loading AppletInterface
+    
+    Summary:
+    This can happen if an applet has invalid metadata, it doesn't have a
+    script engine set (X-Plasma-API) so it won't load the DeclarativeAppletScripts
+    Having invalid metadata could come from the applet, or from the fallback applet
+    created in Containment::Private::createApplet.
+    
+    We guard against it in appletAdded but not in appletRemoved, which is
+    inconsistent. We also apparently must have guards elsewhere otherwise
+    we'd see the crash more.
+    
+    BUG: 377050
+    
+    Test Plan: Had corrupt applet, used to crash, now doesn't
+    
+    Reviewers: #plasma
+    
+    Subscribers: plasma-devel, #frameworks
+    
+    Tags: #plasma, #frameworks
+    
+    Differential Revision: https://phabricator.kde.org/D5423
+
+diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp
+index 2ba4a8218..e311f6018 100644
+--- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp
++++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp
+@@ -821,7 +821,8 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
+ //     qDebug() << "Applet added on containment:" << m_containment->title() << contGraphicObject
+ //              << "Applet: " << applet << applet->title() << appletGraphicObject;
+ 
+-    //Every applet should have a graphics object, otherwise don't disaplay anything
++    //applets can not have a graphic object if they don't have a script engine loaded
++    //this can happen if they were loaded with an invalid metadata
+     if (!appletGraphicObject) {
+         return;
+     }
+@@ -843,8 +844,10 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet)
+ void ContainmentInterface::appletRemovedForward(Plasma::Applet *applet)
+ {
+     AppletInterface *appletGraphicObject = applet->property("_plasma_graphicObject").value<AppletInterface *>();
+-    m_appletInterfaces.removeAll(appletGraphicObject);
+-    appletGraphicObject->m_positionBeforeRemoval = appletGraphicObject->mapToItem(this, QPointF());
++    if (appletGraphicObject) {
++        m_appletInterfaces.removeAll(appletGraphicObject);
++        appletGraphicObject->m_positionBeforeRemoval = appletGraphicObject->mapToItem(this, QPointF());
++    }
+     emit appletRemoved(appletGraphicObject);
+     emit appletsChanged();
+ }

diff --git a/kde-frameworks/plasma/plasma-5.33.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.33.0-r1.ebuild
new file mode 100644
index 00000000000..c2e74f8b08e
--- /dev/null
+++ b/kde-frameworks/plasma/plasma-5.33.0-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KMNAME="${PN}-framework"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Plasma framework"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="gles2 wayland X"
+
+COMMON_DEPEND="
+	$(add_frameworks_dep kactivities)
+	$(add_frameworks_dep karchive)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kdeclarative)
+	$(add_frameworks_dep kglobalaccel)
+	$(add_frameworks_dep kguiaddons)
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep kpackage)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep kwindowsystem)
+	$(add_frameworks_dep kxmlgui)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtdeclarative)
+	$(add_qt_dep qtgui 'gles2=')
+	$(add_qt_dep qtquickcontrols)
+	$(add_qt_dep qtsql)
+	$(add_qt_dep qtsvg)
+	$(add_qt_dep qtwidgets)
+	!gles2? ( virtual/opengl )
+	wayland? (
+		$(add_frameworks_dep kwayland)
+		media-libs/mesa[egl]
+	)
+	X? (
+		$(add_qt_dep qtx11extras)
+		x11-libs/libX11
+		x11-libs/libxcb
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	$(add_frameworks_dep kdoctools)
+	X? ( x11-proto/xproto )
+"
+RDEPEND="${COMMON_DEPEND}
+	!<kde-apps/kapptemplate-15.08.3-r1:5
+"
+
+RESTRICT+=" test"
+
+PATCHES=(
+	"${FILESDIR}/${P}-iconsize.patch"
+	"${FILESDIR}/${P}-calendar-locale.patch"
+	"${FILESDIR}/${P}-systray-crash-plasmashell.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package !gles2 OpenGL)
+		$(cmake-utils_use_find_package wayland EGL)
+		$(cmake-utils_use_find_package wayland KF5Wayland)
+		$(cmake-utils_use_find_package X X11)
+		$(cmake-utils_use_find_package X XCB)
+	)
+
+	kde5_src_configure
+}


             reply	other threads:[~2017-04-15 20:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-15 20:31 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-13 11:05 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/, kde-frameworks/plasma/files/ Andreas Sturmlechner
2020-02-13 23:20 Andreas Sturmlechner
2020-04-17 20:59 Andreas Sturmlechner
2020-10-26 19:06 Andreas Sturmlechner
2020-11-16 23:41 Andreas Sturmlechner
2021-01-11 12:28 Andreas Sturmlechner
2021-08-15 18:57 Andreas Sturmlechner
2021-08-15 18:57 Andreas Sturmlechner
2021-08-26 17:28 Andreas Sturmlechner
2021-09-30 17:24 Andreas Sturmlechner
2021-10-11 11:01 Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
2021-12-08 15:08 Andreas Sturmlechner
2022-02-10  9:13 Andreas Sturmlechner
2022-03-30 14:41 Andreas Sturmlechner
2022-04-15 18:27 Andreas Sturmlechner
2022-04-21  8:56 Andreas Sturmlechner
2022-06-14 12:44 Andreas Sturmlechner
2022-07-26 12:08 Andreas Sturmlechner
2022-08-06  7:44 Andreas Sturmlechner
2022-11-27 11:20 Andreas Sturmlechner
2023-01-29  0:12 Andreas Sturmlechner
2023-02-01 19:46 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492288281.a5decb2f6b741174c2906759260db3fac6beb96d.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox