SHA256
1
0
forked from pool/discover

Accepting request 591820 from KDE:Frameworks5

(forwarded request 591716 from Vogtinator)

OBS-URL: https://build.opensuse.org/request/show/591820
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/discover?expand=0&rev=36
This commit is contained in:
Dominique Leuenberger 2018-03-30 10:03:15 +00:00 committed by Git OBS Bridge
commit 3d2ec89060
5 changed files with 83 additions and 4 deletions

View File

@ -0,0 +1,44 @@
From 74a4eff529e6b71f6a822841d9112d9b71b44d24 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Sat, 13 Jan 2018 15:16:39 +0100
Subject: [PATCH] Warning for FlatHub
---
.../backends/FlatpakBackend/FlatpakSourcesBackend.cpp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp b/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp
index e96dd5bc..77646179 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp
+++ b/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp
@@ -24,6 +24,8 @@
#include "FlatpakBackend.h"
#include <KLocalizedString>
#include <QDebug>
+#include <QAbstractButton>
+#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QAction>
@@ -57,7 +59,17 @@ FlatpakSourcesBackend::FlatpakSourcesBackend(const QVector<FlatpakInstallation *
m_flathubAction->setToolTip(QStringLiteral("flathub"));
connect(m_flathubAction, &QAction::triggered, this, [this](){
- addSource(QStringLiteral("https://flathub.org/repo/flathub.flatpakrepo"));
+ auto *warnBox = new QMessageBox(QMessageBox::Information, i18n("Adding a third-party source"),
+ i18n("FlatHub is not part of the openSUSE distribution.\n"
+ "It contains packages of unknown quality which might not be tested to work correctly "
+ "on openSUSE. Prefer to install software from the official openSUSE repository."),
+ QMessageBox::Ok | QMessageBox::Abort);
+ connect(warnBox, &QMessageBox::buttonClicked, this, [this, warnBox](QAbstractButton *button) {
+ if (warnBox->standardButton(button) == QMessageBox::Ok)
+ addSource(QStringLiteral("https://flathub.org/repo/flathub.flatpakrepo"));
+ });
+ warnBox->setAttribute(Qt::WA_DeleteOnClose);
+ warnBox->show();
});
for (auto installation : installations) {
if (!listRepositories(installation)) {
--
2.16.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:adcd8f9c05cd5f676a139d06ded53d1049238d69017a44bff726907c6d5e508c
size 10214444

3
discover-5.12.4.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:981be31dac5d18007d5d8eef0e7ec1b65fa498dc1ffc1620743ee8e8d46dcdbf
size 10214992

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Tue Mar 27 15:40:47 CEST 2018 - fabian@ritter-vogt.de
- Update to 5.12.4
* New bugfix release
* For more details please see:
* https://www.kde.org/announcements/plasma-5.12.4.php
- Changes since 5.12.3:
* Simplify the tasks view (kde#391760)
* Remove unneeded includes
* Fix dbus path
* Include a test for cancelling flatpak installations
* Improve status of FlatpakTransaction
* Remove pointless i18n call
* KNS: Only indicate that it's fetching if already fetching reviews
* Include a test that makes sure we can list origins
* Solve some inconsistencies found when testing flatpak
* Introduce a flatpak test
* No need to pass the extra arguments on the Update Action (kde#391801)
* Add Qt5::Xml
* Simplify KNSTransaction creation (kde#390236)
* Fix test
* Add a test to make sure we don't add resources with the wrong URL
* kns: Fix logic for adding screenshots (kde#391190)
* Add debug information when the searched URI is wrong
-------------------------------------------------------------------
Fri Mar 23 20:42:00 UTC 2018 - fabian@ritter-vogt.de
- Add patch to show an informative warning when adding FlatHub:
* 0001-Warning-for-FlatHub.patch
-------------------------------------------------------------------
Tue Mar 6 16:07:11 CET 2018 - fabian@ritter-vogt.de

View File

@ -18,13 +18,15 @@
%bcond_without lang
Name: discover
Version: 5.12.3
Version: 5.12.4
Release: 0
Summary: KDE Software Installer
License: GPL-2.0 and GPL-3.0 and GPL-3.0+
Group: System/GUI/KDE
Url: https://quickgit.kde.org/?p=discover.git
Source: http://download.kde.org/stable/plasma/%{version}/discover-%{version}.tar.xz
# PATCH-FIX-OPENSUSE
Patch1: 0001-Warning-for-FlatHub.patch
%if 0%{?suse_version} < 1330
# It does not build with the default compiler (GCC 4.8) on Leap 42.x
%if 0%{?sle_version} < 120300
@ -96,6 +98,7 @@ This is the systray plasmoid to notify the user that updates are available
%prep
%setup -q
%autopatch -p1
%build
%if 0%{?suse_version} < 1330