diff --git a/.arcconfig b/.arcconfig deleted file mode 100644 index bc0df43f..00000000 --- a/.arcconfig +++ /dev/null @@ -1,4 +0,0 @@ -{ - "phabricator.uri" : "https://phabricator.kde.org/" -} - diff --git a/CMakeLists.txt b/CMakeLists.txt index 771e0c3d..7c1c3349 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,94 +1,94 @@ project(discover) -set(PROJECT_VERSION "5.18.90") +set(PROJECT_VERSION "5.19.80") set(PROJECT_VERSION_MAJOR 5) cmake_minimum_required(VERSION 2.8.12) set(QT_MIN_VERSION "5.14.0") set(KF5_MIN_VERSION "5.70.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_SOURCE_DIR}/cmake") find_package(Qt5 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets Test Network Xml Concurrent DBus Quick) include(KDEInstallDirs) include(KDECMakeSettings) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(ECMInstallIcons) include(ECMMarkAsTest) include(ECMAddTests) include(GenerateExportHeader) include(ECMQtDeclareLoggingCategory) include(KDEClangFormat) find_package(PkgConfig REQUIRED) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED CoreAddons Config Crash DBusAddons I18n Archive XmlGui ItemModels KIO Declarative) find_package(KF5Kirigami2 2.7.0) find_package(packagekitqt5 1.0.1 CONFIG) find_package(AppStreamQt 0.11.1 CONFIG) find_package(KF5Attica 5.23 CONFIG) find_package(KF5NewStuff 5.53 CONFIG) pkg_check_modules(Flatpak IMPORTED_TARGET flatpak>=0.11.8) pkg_check_modules(Fwupd IMPORTED_TARGET fwupd>=1.0.6) pkg_check_modules(Markdown IMPORTED_TARGET libmarkdown) find_package(KUserFeedback) if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. # 3.10+ lets us provide more macro names that require automoc. list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "DISCOVER_BACKEND_PLUGIN") endif() configure_file(DiscoverVersion.h.in DiscoverVersion.h) add_subdirectory(libdiscover) add_subdirectory(discover) add_subdirectory(exporter) add_subdirectory(update) option(WITH_NOTIFIER "Build and install the notifier plasmoid" ON) if(WITH_NOTIFIER) find_package(KF5 REQUIRED Notifications KIO) add_subdirectory(notifier) endif() set_package_properties(KF5Attica PROPERTIES DESCRIPTION "KDE Framework that implements the Open Collaboration Services API" PURPOSE "Required to build the KNewStuff3 backend" TYPE OPTIONAL) set_package_properties(KF5Kirigami2 PROPERTIES DESCRIPTION "KDE's lightweight user interface framework for mobile and convergent applications" URL "https://techbase.kde.org/Kirigami" PURPOSE "Required by discover qml components" TYPE RUNTIME) set_package_properties(KF5NewStuff PROPERTIES DESCRIPTION "Qt library that allows to interact with KNewStuff implementations" PURPOSE "Required to build the KNS backend" TYPE OPTIONAL) set_package_properties(packagekitqt5 PROPERTIES DESCRIPTION "Library that exposes PackageKit resources" URL "https://www.freedesktop.org/software/PackageKit/" PURPOSE "Required to build the PackageKit backend" TYPE OPTIONAL) set_package_properties(AppStreamQt PROPERTIES DESCRIPTION "Library that lists Appstream resources" URL "https://www.freedesktop.org" PURPOSE "Required to build the PackageKit and Flatpak backends" TYPE OPTIONAL) add_feature_info(Flatpak Flatpak_FOUND "Library that exposes flatpak repositories. Required to build the Flatpak backend" ) add_feature_info(Fwupd Fwupd_FOUND "Exposes fwupd") feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) # add clang-format target for all our real source files file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) install(FILES discover.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) diff --git a/discover/qml/ApplicationsListPage.qml b/discover/qml/ApplicationsListPage.qml index 77fae2a0..69ca1572 100644 --- a/discover/qml/ApplicationsListPage.qml +++ b/discover/qml/ApplicationsListPage.qml @@ -1,172 +1,178 @@ /* * Copyright (C) 2012 Aleix Pol Gonzalez * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library/Lesser General Public License * version 2, or (at your option) any later version, as published by the * Free Software Foundation * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU Library/Lesser General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.5 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 import "navigation.js" as Navigation import org.kde.discover.app 1.0 import org.kde.discover 2.0 import org.kde.kirigami 2.12 as Kirigami DiscoverPage { id: page readonly property var model: appsModel property alias category: appsModel.filteredCategory property alias sortRole: appsModel.sortRole property alias sortOrder: appsModel.sortOrder property alias originFilter: appsModel.originFilter property alias mimeTypeFilter: appsModel.mimeTypeFilter property alias stateFilter: appsModel.stateFilter property alias extending: appsModel.extending property alias search: appsModel.search property alias resourcesUrl: appsModel.resourcesUrl property alias isBusy: appsModel.isBusy property alias allBackends: appsModel.allBackends property alias count: apps.count property alias listHeader: apps.header property alias listHeaderPositioning: apps.headerPositioning property string sortProperty: "appsListPageSorting" property bool compact: page.width < 550 || !applicationWindow().wideScreen property bool showRating: true property bool canNavigate: true readonly property alias subcategories: appsModel.subcategories function stripHtml(input) { var regex = /(<([^>]+)>)/ig return input.replace(regex, ""); } title: search.length>0 ? i18n("Search: %1", stripHtml(search)) : category ? category.name : "" signal clearSearch() supportsRefreshing: true onRefreshingChanged: if (refreshing) { appsModel.invalidateFilter() refreshing = false } ActionGroup { id: sortGroup exclusive: true } contextualActions: [ Kirigami.Action { visible: !appsModel.sortByRelevancy text: i18n("Sort: %1", sortGroup.checkedAction.text) Action { ActionGroup.group: sortGroup text: i18n("Name") onTriggered: { DiscoverSettings[page.sortProperty] = ResourcesProxyModel.NameRole } checkable: true checked: appsModel.sortRole === ResourcesProxyModel.NameRole } Action { ActionGroup.group: sortGroup text: i18n("Rating") onTriggered: { DiscoverSettings[page.sortProperty] = ResourcesProxyModel.SortableRatingRole } checkable: true checked: appsModel.sortRole === ResourcesProxyModel.SortableRatingRole } Action { ActionGroup.group: sortGroup text: i18n("Size") onTriggered: { DiscoverSettings[page.sortProperty] = ResourcesProxyModel.SizeRole } checkable: true checked: appsModel.sortRole === ResourcesProxyModel.SizeRole } Action { ActionGroup.group: sortGroup text: i18n("Release Date") onTriggered: { DiscoverSettings[page.sortProperty] = ResourcesProxyModel.ReleaseDateRole } checkable: true checked: appsModel.sortRole === ResourcesProxyModel.ReleaseDateRole } } ] Kirigami.CardsListView { id: apps section.delegate: Label { text: section anchors { right: parent.right } } model: ResourcesProxyModel { id: appsModel sortRole: DiscoverSettings.appsListPageSorting sortOrder: sortRole === ResourcesProxyModel.SortableRatingRole || sortRole === ResourcesProxyModel.ReleaseDateRole ? Qt.DescendingOrder : Qt.AscendingOrder onBusyChanged: if (isBusy) { apps.currentIndex = -1 } } currentIndex: -1 delegate: ApplicationDelegate { application: model.application compact: !applicationWindow().wideScreen showRating: page.showRating } Kirigami.PlaceholderMessage { anchors.centerIn: parent width: parent.width - (Kirigami.Units.largeSpacing * 4) opacity: apps.count == 0 && !appsModel.isBusy ? 1 : 0 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad } } icon.name: "edit-none" text: i18n("Sorry, nothing found") } footer: ColumnLayout { anchors.horizontalCenter: parent.horizontalCenter visible: appsModel.isBusy && apps.atYEnd - opacity: visible ? 1 : 0 + opacity: visible ? 0.5 : 0 - Label { + Item { + Layout.preferredHeight: units.gridUnit + } + Kirigami.Heading { + level: 2 Layout.alignment: Qt.AlignCenter text: i18n("Still looking...") } BusyIndicator { running: parent.visible Layout.alignment: Qt.AlignCenter + Layout.preferredWidth: Kirigami.Units.gridUnit * 4 + Layout.preferredHeight: Kirigami.Units.gridUnit * 4 } Behavior on opacity { PropertyAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad } } } } } diff --git a/discover/qml/BrowsingPage.qml b/discover/qml/BrowsingPage.qml index 30b7e815..2a27e72f 100644 --- a/discover/qml/BrowsingPage.qml +++ b/discover/qml/BrowsingPage.qml @@ -1,76 +1,87 @@ /* * Copyright (C) 2015 Aleix Pol Gonzalez * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library/Lesser General Public License * version 2, or (at your option) any later version, as published by the * Free Software Foundation * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU Library/Lesser General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.4 import QtQuick.Controls 2.4 import QtQuick.Layouts 1.1 import org.kde.discover 2.0 import org.kde.discover.app 1.0 import "navigation.js" as Navigation import org.kde.kirigami 2.12 as Kirigami DiscoverPage { id: page title: i18n("Featured") leftPadding: 0 rightPadding: 0 topPadding: 0 bottomPadding: 0 readonly property bool isHome: true function searchFor(text) { if (text.length === 0) return; Navigation.openCategory(null, "") } - BusyIndicator { - id: indicator + ColumnLayout { anchors.centerIn: parent - width: Kirigami.Units.gridUnit * 8 - height: width + opacity: 0.5 + visible: apps.count === 0 && apps.model.isFetching + + Kirigami.Heading { + level: 2 + Layout.alignment: Qt.AlignCenter + text: i18n("Loading...") + } + BusyIndicator { + id: indicator + Layout.alignment: Qt.AlignCenter + Layout.preferredWidth: Kirigami.Units.gridUnit * 4 + Layout.preferredHeight: Kirigami.Units.gridUnit * 4 + } } Kirigami.PlaceholderMessage { anchors.centerIn: parent width: parent.width - (Kirigami.Units.largeSpacing * 4) visible: apps.count === 0 && !apps.model.isFetching icon.name: "network-disconnect" text: xi18nc("@info", "Unable to load applications.Please verify Internet connectivity.") } signal clearSearch() readonly property bool compact: page.width < 550 || !applicationWindow().wideScreen Kirigami.CardsListView { id: apps model: FeaturedModel {} currentIndex: -1 delegate: ApplicationDelegate { application: model.application compact: page.compact } } } diff --git a/libdiscover/backends/FlatpakBackend/sc-apps-flatpak-discover.svg b/libdiscover/backends/FlatpakBackend/sc-apps-flatpak-discover.svg index fc53a658..2b8494e3 100644 --- a/libdiscover/backends/FlatpakBackend/sc-apps-flatpak-discover.svg +++ b/libdiscover/backends/FlatpakBackend/sc-apps-flatpak-discover.svg @@ -1,73 +1,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + diff --git a/libdiscover/backends/PackageKitBackend/runservice/CMakeLists.txt b/libdiscover/backends/PackageKitBackend/runservice/CMakeLists.txt index 17c644e1..1e5d3200 100644 --- a/libdiscover/backends/PackageKitBackend/runservice/CMakeLists.txt +++ b/libdiscover/backends/PackageKitBackend/runservice/CMakeLists.txt @@ -1,3 +1,3 @@ add_executable(runservice main.cpp) -target_link_libraries(runservice KF5::Service KF5::KIOWidgets) +target_link_libraries(runservice KF5::Service KF5::KIOGui) install(TARGETS runservice DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF5}/discover) diff --git a/libdiscover/backends/PackageKitBackend/runservice/main.cpp b/libdiscover/backends/PackageKitBackend/runservice/main.cpp index c0d2c64a..5230310c 100644 --- a/libdiscover/backends/PackageKitBackend/runservice/main.cpp +++ b/libdiscover/backends/PackageKitBackend/runservice/main.cpp @@ -1,43 +1,45 @@ /*************************************************************************** * Copyright © 2016 Aleix Pol Gonzalez * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License as * * published by the Free Software Foundation; either version 2 of * * the License or (at your option) version 3 or any later version * * accepted by the membership of KDE e.V. (or its successor approved * * by the membership of KDE e.V.), which shall act as a proxy * * defined in Section 14 of version 3 of the license. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * ***************************************************************************/ -#include +#include #include #include #include #include #include -#include +#include int main(int argc, char** argv) { - QApplication app(argc, argv); + QGuiApplication app(argc, argv); if (app.arguments().size() != 2) return 1; - KService service(app.arguments().constLast()); - if (!service.isValid()) + KService::Ptr service(new KService(app.arguments().constLast())); + if (!service->isValid()) return 2; - if (KRun::runApplication(service, {}, nullptr) == 0) - return 3; - - return 0; + KIO::ApplicationLauncherJob *job = new KIO::ApplicationLauncherJob(service); + job->start(); + QObject::connect(job, &KIO::ApplicationLauncherJob::finished, &app, [&] { + app.exit(job->error()); + }); + return app.exec(); } diff --git a/logo.png b/logo.png new file mode 100644 index 00000000..88346494 Binary files /dev/null and b/logo.png differ