diff --git a/0001-Fix-build-with-older-Qt.patch b/0001-Fix-build-with-older-Qt.patch new file mode 100644 index 0000000..a2e3abc --- /dev/null +++ b/0001-Fix-build-with-older-Qt.patch @@ -0,0 +1,25 @@ +From c99f300bf3e52d7be5142b333f86e8c3b8b112e2 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Thu, 15 Sep 2016 18:19:14 +0200 +Subject: [PATCH 1/4] Fix build with older Qt + +--- + libdiscover/resources/ResourcesProxyModel.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libdiscover/resources/ResourcesProxyModel.cpp b/libdiscover/resources/ResourcesProxyModel.cpp +index 6821ef5..2cd822f 100644 +--- a/libdiscover/resources/ResourcesProxyModel.cpp ++++ b/libdiscover/resources/ResourcesProxyModel.cpp +@@ -133,7 +133,7 @@ void ResourcesProxyModel::fetchSubcategories() + done.unite(res->categoryObjects()); + } + QVariantList ret; +- for (Category* cat: qAsConst(done)) ++ foreach (Category* cat, done) + ret += QVariant::fromValue(cat); + + if (ret != m_subcategories) { +-- +2.10.0 + diff --git a/0002-Don-t-artificially-require-QtQuick-5.7.patch b/0002-Don-t-artificially-require-QtQuick-5.7.patch new file mode 100644 index 0000000..e64bd96 --- /dev/null +++ b/0002-Don-t-artificially-require-QtQuick-5.7.patch @@ -0,0 +1,25 @@ +From c1cb0514dd770d4337a571cb7277b92dc4f01c28 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Thu, 15 Sep 2016 18:16:36 +0200 +Subject: [PATCH 2/4] Don't artificially require QtQuick 5.7 + +--- + discover/qml/DiscoverDrawer.qml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/discover/qml/DiscoverDrawer.qml b/discover/qml/DiscoverDrawer.qml +index c0dd621..25d77e1 100644 +--- a/discover/qml/DiscoverDrawer.qml ++++ b/discover/qml/DiscoverDrawer.qml +@@ -18,7 +18,7 @@ + * along with this program. If not, see . * + ***************************************************************************/ + +-import QtQuick 2.7 ++import QtQuick 2.6 + import QtQuick.Layouts 1.1 + import QtQuick.Controls 1.1 + import org.kde.discover 1.0 +-- +2.10.0 + diff --git a/0003-Drop-usage-of-templates-from-LinkButton.patch b/0003-Drop-usage-of-templates-from-LinkButton.patch new file mode 100644 index 0000000..ad0b819 --- /dev/null +++ b/0003-Drop-usage-of-templates-from-LinkButton.patch @@ -0,0 +1,156 @@ +From 7a3b57dfeb0f5afaa2399bcf5de04eea80603df5 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Thu, 15 Sep 2016 18:14:48 +0200 +Subject: [PATCH 3/4] Drop usage of templates from LinkButton + +--- + discover/qml/ApplicationPage.qml | 3 --- + discover/qml/LinkButton.qml | 47 ++++++++++++---------------------------- + discover/qml/PageHeader.qml | 34 ++++++++++++++++++++--------- + 3 files changed, 38 insertions(+), 46 deletions(-) + +diff --git a/discover/qml/ApplicationPage.qml b/discover/qml/ApplicationPage.qml +index e7e7bb9..e35f721 100644 +--- a/discover/qml/ApplicationPage.qml ++++ b/discover/qml/ApplicationPage.qml +@@ -155,7 +155,6 @@ DiscoverPage { + } + LinkButton { + id: button +- shadow: false + text: application.homepage + onClicked: Qt.openUrlExternally(application.homepage) + } +@@ -163,7 +162,6 @@ DiscoverPage { + + LinkButton { + id: addonsButton +- shadow: false + text: i18n("Addons") + visible: addonsView.containsAddons + onClicked: addonsView.opened = true +@@ -173,7 +171,6 @@ DiscoverPage { + readonly property QtObject rating: appInfo.application.rating + visible: rating && rating.ratingCount>0 && reviewsModel.count + text: i18n("Show comments (%1)...", rating ? rating.ratingCount : 0) +- shadow: false + + ReviewsModel { + id: reviewsModel +diff --git a/discover/qml/LinkButton.qml b/discover/qml/LinkButton.qml +index 29066dc..d00f0b4 100644 +--- a/discover/qml/LinkButton.qml ++++ b/discover/qml/LinkButton.qml +@@ -1,48 +1,29 @@ +-import QtQuick 2.6 ++import QtQuick 2.2 + import QtGraphicalEffects 1.0 +-import QtQuick.Templates 2.0 as T + import org.kde.kirigami 1.0 + +-T.ToolButton { ++Text { + id: control + +- property alias shadow: shadow.visible + property Action action: null + text: action ? action.text : "" + enabled: !action || action.enabled + onClicked: if (action) action.trigger() + +- implicitWidth: textItem.implicitWidth + leftPadding + rightPadding +- implicitHeight: textItem.implicitHeight + topPadding + bottomPadding +- baselineOffset: contentItem.y + contentItem.baselineOffset ++ font: control.font ++ color: control.shadow ? Theme.highlightedTextColor : Theme.linkColor ++ horizontalAlignment: Text.AlignHCenter ++ verticalAlignment: Text.AlignVCenter + +- readonly property alias textColor: textItem.color +- hoverEnabled: true ++ signal clicked() ++ MouseArea { ++ anchors.fill: parent ++ hoverEnabled: true + +- onHoveredChanged: { +- textItem.font.underline = hovered && enabled +- } +- +- contentItem: Text { +- id: textItem +- text: control.text +- font: control.font +- color: control.shadow ? Theme.highlightedTextColor : Theme.linkColor +- elide: Text.ElideRight +- horizontalAlignment: Text.AlignHCenter +- verticalAlignment: Text.AlignVCenter +- } ++ onContainsMouseChanged: { ++ control.font.underline = containsMouse && control.enabled ++ } + +- DropShadow { +- id: shadow +- horizontalOffset: 2 +- verticalOffset: 2 +- radius: 8.0 +- samples: 17 +- color: "#f0000000" +- source: textItem +- anchors.fill: textItem ++ onClicked: control.clicked() + } +- +- background: null + } +diff --git a/discover/qml/PageHeader.qml b/discover/qml/PageHeader.qml +index d5a3b7a..7448380 100644 +--- a/discover/qml/PageHeader.qml ++++ b/discover/qml/PageHeader.qml +@@ -76,18 +76,32 @@ ColumnLayout { + Layout.fillWidth: true + Layout.fillHeight: true + } +- LinkButton { ++ Item { + Layout.topMargin: Kirigami.Units.smallSpacing*2 + Layout.bottomMargin: Kirigami.Units.smallSpacing*2 +- shadow: root.background !== "" +- text: titleLabel.text +- font: SystemFonts.titleFont +- onClicked: { +- var flic = root._page.flickable +- if (flic.positionViewAtBeginning) +- flic.positionViewAtBeginning(); +- else +- flic.contentY = 0; ++ Layout.preferredHeight: title.paintedHeight ++ Layout.preferredWidth: title.paintedWidth ++ LinkButton { ++ id: title ++ text: titleLabel.text ++ font: SystemFonts.titleFont ++ color: Kirigami.Theme.highlightedTextColor ++ onClicked: { ++ var flic = root._page.flickable ++ if (flic.positionViewAtBeginning) ++ flic.positionViewAtBeginning(); ++ else ++ flic.contentY = 0; ++ } ++ } ++ DropShadow { ++ horizontalOffset: 2 ++ verticalOffset: 2 ++ radius: 8.0 ++ samples: 17 ++ color: "#f0000000" ++ source: title ++ anchors.fill: title + } + } + } +-- +2.10.0 + diff --git a/0004-Remove-unused-component.patch b/0004-Remove-unused-component.patch new file mode 100644 index 0000000..bcef510 --- /dev/null +++ b/0004-Remove-unused-component.patch @@ -0,0 +1,68 @@ +From 3d0d81fbf25e6511ad4e13dcfacf3dde4feca925 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Thu, 15 Sep 2016 17:56:17 +0200 +Subject: [PATCH 4/4] Remove unused component + +--- + discover/qml/HeaderButton.qml | 36 ------------------------------------ + discover/resources.qrc | 1 - + 2 files changed, 37 deletions(-) + delete mode 100644 discover/qml/HeaderButton.qml + +diff --git a/discover/qml/HeaderButton.qml b/discover/qml/HeaderButton.qml +deleted file mode 100644 +index d8add26..0000000 +--- a/discover/qml/HeaderButton.qml ++++ /dev/null +@@ -1,36 +0,0 @@ +-import QtQuick 2.6 +-import QtQuick.Templates 2.0 as T +-import org.kde.kirigami 1.0 as Kirigami +- +-T.ToolButton { +- id: control +- property QtObject menu: null +- +- implicitWidth: textItem.implicitWidth + leftPadding + rightPadding +- implicitHeight: textItem.implicitHeight + topPadding + bottomPadding +- baselineOffset: contentItem.y + contentItem.baselineOffset +- +- padding: Kirigami.Units.smallSpacing * 3 +- readonly property alias textColor: textItem.color +- hoverEnabled: true +- +- onClicked: { +- if (menu) { +- menu.popup() +- } +- } +- +- contentItem: Text { +- id: textItem +- text: control.text +- font: control.font +- color: control.hovered ? Kirigami.Theme.viewBackgroundColor : Kirigami.Theme.linkColor +- horizontalAlignment: Text.AlignHCenter +- verticalAlignment: Text.AlignVCenter +- } +- +- background: Rectangle { +- color: Kirigami.Theme.linkColor +- visible: control.hovered +- } +-} +diff --git a/discover/resources.qrc b/discover/resources.qrc +index 3130c25..d4fdcbb 100644 +--- a/discover/resources.qrc ++++ b/discover/resources.qrc +@@ -35,7 +35,6 @@ + qml/JustMessageAction.qml + qml/ConditionalLoader.qml + qml/LinkButton.qml +- qml/HeaderButton.qml + qml/ApplicationScreenshots.qml + qml/ApplicationIndicator.qml + qml/ApplicationHeader.qml +-- +2.10.0 + diff --git a/discover-5.7.5.tar.xz b/discover-5.7.5.tar.xz deleted file mode 100644 index 5e8f906..0000000 --- a/discover-5.7.5.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc5468a64bbd8669f4a06d50c53ca16b326a7a41aa3d0d1341436742bbaf78c4 -size 816988 diff --git a/discover-5.7.95.tar.xz b/discover-5.7.95.tar.xz new file mode 100644 index 0000000..d365042 --- /dev/null +++ b/discover-5.7.95.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abdf9f9ab717f5369f5dca112c423e995b5269bfff1a322723c44daf0a951657 +size 9197688 diff --git a/discover.changes b/discover.changes index 4a1cc6d..95c11e8 100644 --- a/discover.changes +++ b/discover.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Sep 15 15:53:55 UTC 2016 - fabian@ritter-vogt.de + +- Update to 5.7.95 (Plasma 5.8 Beta) + * New LTS feature release + * For more details please see: + https://www.kde.org/announcements/plasma-5.7.95.php +- Added patches: + 0001-Fix-build-with-older-Qt.patch + 0002-Don-t-artificially-require-QtQuick-5.7.patch + 0003-Drop-usage-of-templates-from-LinkButton.patch + 0004-Remove-unused-component.patch + ------------------------------------------------------------------- Tue Sep 13 17:42:09 UTC 2016 - fabian@ritter-vogt.de diff --git a/discover.spec b/discover.spec index 56d09f1..23b79c4 100644 --- a/discover.spec +++ b/discover.spec @@ -18,17 +18,23 @@ %bcond_without lang Name: discover -Version: 5.7.5 +Version: 5.7.95 Release: 0 Summary: KDE Software Installer License: GPL-2.0 Group: System/GUI/KDE Url: https://quickgit.kde.org/?p=discover.git -Source: http://download.kde.org/stable/plasma/%{version}/%{name}-%{version}.tar.xz +Source: http://download.kde.org/unstable/plasma/%{version}/%{name}-%{version}.tar.xz +# Fix build with Qt 5.6.1 +Patch1: 0001-Fix-build-with-older-Qt.patch +Patch2: 0002-Don-t-artificially-require-QtQuick-5.7.patch +Patch3: 0003-Drop-usage-of-templates-from-LinkButton.patch +Patch4: 0004-Remove-unused-component.patch BuildRequires: PackageKit-Qt5-devel BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules BuildRequires: kf5-filesystem +BuildRequires: kirigami-devel BuildRequires: libAppstreamQt-devel BuildRequires: update-desktop-files BuildRequires: cmake(KF5Archive) @@ -48,11 +54,14 @@ BuildRequires: cmake(Qca-qt5) BuildRequires: cmake(Qt5Concurrent) BuildRequires: cmake(Qt5DBus) BuildRequires: cmake(Qt5Network) +BuildRequires: cmake(Qt5Qml) BuildRequires: cmake(Qt5Quick) BuildRequires: cmake(Qt5Test) BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Xml) Requires: AppStream +Requires: kirigami +Requires: libqt5-qtquickcontrols2 Requires: libzypp-plugin-appdata %if %{with lang} Recommends: %{name}-lang @@ -75,6 +84,10 @@ This is the systray plasmoid to notify the user that updates are available %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %cmake_kf5 -d build @@ -86,8 +99,10 @@ This is the systray plasmoid to notify the user that updates are available %if %{with lang} %find_lang libdiscover %{name}.lang +# %find_lang plasma-discover-exporter %{name}.lang %find_lang plasma-discover-notifier %{name}.lang %find_lang plasma-discover %{name}.lang + %find_lang plasma_applet_org.kde.discovernotifier plasma.lang %else touch plasma.lang @@ -109,6 +124,7 @@ This is the systray plasmoid to notify the user that updates are available %{_kf5_sharedir}/plasmadiscover/ %{_kf5_appstreamdir}/ %{_kf5_configdir}/discover_ktexteditor_codesnippets_core.knsrc +%{_kf5_sharedir}/discover/ %if %{with lang} %files lang -f %{name}.lang