summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-07-10 14:02:30 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-07-10 14:04:28 +0200
commit147c481052b49857b769ea00be8518698365578e (patch)
treea4a8afb4d22acfc5791682bbb7c3e14e4bbbc6ac /kde-plasma/plasma-pa
parentkde-plasma: Add KDE Plasma 5.13.3 (diff)
downloadgentoo-147c481052b49857b769ea00be8518698365578e.tar.gz
gentoo-147c481052b49857b769ea00be8518698365578e.tar.bz2
gentoo-147c481052b49857b769ea00be8518698365578e.zip
kde-plasma/plasma-pa: Fix wrong availability of profiles and ports
Upstream commit b97846017df57698f9e77c8aab077d5a3f17e7ea Package-Manager: Portage-2.3.41, Repoman-2.3.9
Diffstat (limited to 'kde-plasma/plasma-pa')
-rw-r--r--kde-plasma/plasma-pa/files/plasma-pa-5.13.3-wrong-port-avail.patch100
-rw-r--r--kde-plasma/plasma-pa/plasma-pa-5.13.3.ebuild2
2 files changed, 102 insertions, 0 deletions
diff --git a/kde-plasma/plasma-pa/files/plasma-pa-5.13.3-wrong-port-avail.patch b/kde-plasma/plasma-pa/files/plasma-pa-5.13.3-wrong-port-avail.patch
new file mode 100644
index 000000000000..7670ec7c7d0d
--- /dev/null
+++ b/kde-plasma/plasma-pa/files/plasma-pa-5.13.3-wrong-port-avail.patch
@@ -0,0 +1,100 @@
+From b97846017df57698f9e77c8aab077d5a3f17e7ea Mon Sep 17 00:00:00 2001
+From: Andreas Krutzler <andi.krutzler@gmail.com>
+Date: Fri, 29 Jun 2018 09:39:28 +0200
+Subject: Fix wrong availability of profiles and ports.
+
+Summary: Fixed bug where available ports are displayed as unavailable/unplugged and vice versa. It seems that this bug was introduced with D9671.
+
+Reviewers: nicolasfella, broulik, drosca
+
+Subscribers: plasma-devel
+
+Tags: #plasma
+
+Differential Revision: https://phabricator.kde.org/D13694
+---
+ src/port.h | 13 ++++++++++++-
+ src/profile.h | 30 ++++++++++++++++++------------
+ 2 files changed, 30 insertions(+), 13 deletions(-)
+
+diff --git a/src/port.h b/src/port.h
+index 8a8126e..bbf32db 100644
+--- a/src/port.h
++++ b/src/port.h
+@@ -40,7 +40,18 @@ public:
+ template<typename PAInfo>
+ void setInfo(const PAInfo *info)
+ {
+- Profile::setInfo(info);
++ Availability newAvailability;
++ switch (info->available) {
++ case PA_PORT_AVAILABLE_NO:
++ newAvailability = Unavailable;
++ break;
++ case PA_PORT_AVAILABLE_YES:
++ newAvailability = Available;
++ break;
++ default:
++ newAvailability = Unknown;
++ }
++ setCommonInfo(info, newAvailability);
+ }
+ };
+
+diff --git a/src/profile.h b/src/profile.h
+index d8188a2..cd29c62 100644
+--- a/src/profile.h
++++ b/src/profile.h
+@@ -49,6 +49,24 @@ public:
+ template<typename PAInfo>
+ void setInfo(const PAInfo *info)
+ {
++ setCommonInfo(info, info->available ? Available : Unavailable);
++ }
++
++ QString name() const;
++ QString description() const;
++ quint32 priority() const;
++ Availability availability() const;
++
++signals:
++ void nameChanged();
++ void descriptionChanged();
++ void priorityChanged();
++ void availabilityChanged();
++
++protected:
++ template<typename PAInfo>
++ void setCommonInfo(const PAInfo *info, Availability newAvailability)
++ {
+ // Description is optional. Name not so much as we need some ID.
+ Q_ASSERT(info->name);
+ QString infoName = QString::fromUtf8(info->name);
+@@ -68,24 +86,12 @@ public:
+ emit priorityChanged();
+ }
+
+- Availability newAvailability = info->available ? Available : Unavailable;
+ if (m_availability != newAvailability) {
+ m_availability = newAvailability;
+ emit availabilityChanged();
+ }
+ }
+
+- QString name() const;
+- QString description() const;
+- quint32 priority() const;
+- Availability availability() const;
+-
+-signals:
+- void nameChanged();
+- void descriptionChanged();
+- void priorityChanged();
+- void availabilityChanged();
+-
+ private:
+ QString m_name;
+ QString m_description;
+--
+cgit v0.11.2
+
diff --git a/kde-plasma/plasma-pa/plasma-pa-5.13.3.ebuild b/kde-plasma/plasma-pa/plasma-pa-5.13.3.ebuild
index aae43ea14cd3..5b563ea9d021 100644
--- a/kde-plasma/plasma-pa/plasma-pa-5.13.3.ebuild
+++ b/kde-plasma/plasma-pa/plasma-pa-5.13.3.ebuild
@@ -27,3 +27,5 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-wrong-port-avail.patch" )