diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,8 @@ find_package(KF5Attica 5.23) find_package(KF5NewStuff 5.23) +find_package(UserFeedback) + pkg_check_modules(FLATPAK flatpak>=0.6.12) pkg_check_modules(APPSTREAM appstream) diff --git a/discover/qml/DiscoverWindow.qml b/discover/qml/DiscoverWindow.qml --- a/discover/qml/DiscoverWindow.qml +++ b/discover/qml/DiscoverWindow.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 1.1 import org.kde.discover 1.0 import org.kde.discover.app 1.0 +import org.kde.userfeedback 1.0 as UserFeedback import org.kde.kirigami 2.0 as Kirigami import "navigation.js" as Navigation @@ -43,6 +44,113 @@ showPassiveNotification(i18n("Running as root is discouraged and unnecessary.")); } + Component { + id: feedbackPage + Kirigami.OverlaySheet { + id: sheet + property QtObject provider + contentItem: ColumnLayout { + Kirigami.Heading { + Layout.fillWidth: true + text: i18n("Contribute Statistics") + } + Kirigami.Label { + Layout.fillWidth: true + wrapMode: Text.WordWrap + text: i18n("We make this application for you. You can help us improve it by contributing information on how you use it. This allows us to make sure we focus on things that matter to you.\nContributing statistics is of course entirely anonymous, will not use any kind of unique identifier and will not cover any data you process with this application.") + } + ComboBox { + id: statisticsModeCombo + Layout.fillWidth: true + currentIndex: 2 + textRole: "text" + model: ListModel { id: modeOptions } + Component.onCompleted: { + modeOptions.append({text: i18n("No Statistics"), value: UserFeedback.Provider.NoStatistics}) + modeOptions.append({text: i18n("Basic System Information"), value: UserFeedback.Provider.BasicSystemInformation}) + modeOptions.append({text: i18n("Basic Usage Information"), value: UserFeedback.Provider.BasicUsageStatistics}) + modeOptions.append({text: i18n("Detailed System Information"), value: UserFeedback.Provider.DetailedSystemInformation}) + modeOptions.append({text: i18n("Detailed Usage Information"), value: UserFeedback.Provider.DetailedUsageStatistics}) + + for(var i = 0, c=modeOptions.count; i