[utilities/kdebugsettings] src: kcm qml port is done. quickapps is not necessary now
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 5a47f2102cd7c96b42d394afedd2b5d5b41219c7 by Laurent Montel. Committed on 02/08/2026 at 06:08. Pushed by mlaurent into branch 'master'. kcm qml port is done. quickapps is not necessary now M +0 -1 src/CMakeLists.txt D +0 -58 src/quickapps/CMakeLists.txt D +0 -143 src/quickapps/main.cpp D +0 -11 src/quickapps/qml/AboutPage.qml D +0 -19 src/quickapps/qml/ActionMenuItem.qml D +0 -37 src/quickapps/qml/CategoryComboBox.qml D +0 -112 src/quickapps/qml/CustomRulesPage.qml D +0 -72 src/quickapps/qml/EditCustomRuleDialog.qml D +0 -26 src/quickapps/qml/EnvironmentVariableRulesPage.qml D +0 -16 src/quickapps/qml/GlobalMenu.qml D +0 -69 src/quickapps/qml/KDEApplicationRulesPage.qml D +0 -90 src/quickapps/qml/Main.qml D +0 -30 src/quickapps/qml/MainPage.qml https://invent.kde.org/utilities/kdebugsettings/-/commit/5a47f2102cd7c96b42d394afedd2b5d5b41219c7 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8bf87d0b..4d5e54a8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,7 +5,6 @@ add_subdirectory(core) add_subdirectory(apps) add_subdirectory(data) add_subdirectory(widgets) -add_subdirectory(quickapps) add_subdirectory(kcm) # Selenium GUI tests diff --git a/src/quickapps/CMakeLists.txt b/src/quickapps/CMakeLists.txt deleted file mode 100644 index 28e374d1..00000000 --- a/src/quickapps/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -# SPDX-License-Identifier: BSD-3-Clause - -add_executable(kdebugsettingsquick) -target_sources(kdebugsettingsquick PRIVATE main.cpp) - -ecm_add_qml_module(kdebugsettingsquick - URI "org.kde.kdebugsettings" GENERATE_PLUGIN_SOURCE DEPENDENCIES QtQuick -) - -ecm_target_qml_sources(kdebugsettingsquick SOURCES - qml/AboutPage.qml - qml/ActionMenuItem.qml - qml/CustomRulesPage.qml - qml/EditCustomRuleDialog.qml - qml/EnvironmentVariableRulesPage.qml - qml/GlobalMenu.qml - qml/KDEApplicationRulesPage.qml - qml/MainPage.qml - qml/Main.qml - qml/CategoryComboBox.qml -) - -ecm_finalize_qml_module(kdebugsettingsquick) - -if(COMPILE_WITH_UNITY_CMAKE_SUPPORT) - set_target_properties( - kdebugsettingsquick - PROPERTIES - UNITY_BUILD - ON - ) -endif() - -target_link_libraries( - kdebugsettingsquick - PRIVATE - KF6::I18n - KF6::CoreAddons - libkdebugsettingscore - Qt::Quick - Qt::QuickControls2 - Qt::Widgets - KF6::IconThemes - KF6::ConfigWidgets -) -if(TARGET KF6::DBusAddons) - target_link_libraries(kdebugsettingsquick PRIVATE KF6::DBusAddons) -else() - target_link_libraries(kdebugsettingsquick PRIVATE KDAB::kdsingleapplication) -endif() -target_link_libraries(kdebugsettingsquick PRIVATE KF6::I18nQml) - -install( - TARGETS - kdebugsettingsquick - ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} -) diff --git a/src/quickapps/main.cpp b/src/quickapps/main.cpp deleted file mode 100644 index 89d1ef7f..00000000 --- a/src/quickapps/main.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> - - SPDX-License-Identifier: LGPL-2.0-or-later - -*/ - -#include <KLocalizedQmlContext> -#include <QApplication> - -#include "config-kdebugsettings.h" -#include "jobs/changedebugmodejob.h" -#include "kdebugsettingscommandlineparser.h" -#include "loggingmanager.h" -#include "model/categorytypeproxymodel.h" -#include "model/customloggingcategorymodel.h" -#include "model/customloggingcategoryproxymodel.h" -#include "model/kdeapplicationloggingcategorymodel.h" -#include "model/kdeapplicationloggingcategoryproxymodel.h" - -#include <KAboutData> -#if WITH_DBUS -#include <KDBusService> -#else -#include <kdsingleapplication.h> -#endif -#include <KLocalizedString> -#include <QCommandLineParser> -#include <QStandardPaths> - -#include <QIcon> -#include <QQmlApplicationEngine> -#include <QQmlContext> -#include <QQuickStyle> -#include <QUrl> - -#include <iostream> - -#include <KIconTheme> - -#include <KStyleManager> - -using namespace Qt::Literals::StringLiterals; - -int main(int argc, char **argv) -{ - KIconTheme::initTheme(); - - QApplication app(argc, argv); -#if !WITH_DBUS - KDSingleApplication sapp; -#endif - // Default to org.kde.desktop style unless the user forces another style - if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) { - QQuickStyle::setStyle(u"org.kde.desktop"_s); - } - - KStyleManager::initStyle(); - - KLocalizedString::setApplicationDomain("kdebugsettings"_ba); - KAboutData aboutData(u"kdebugsettingsquick"_s, - i18n("KDebugSettings"), - QStringLiteral(KDEBUGSETTINGS_VERSION), - i18n("Configure debug settings"), - KAboutLicense::GPL_V2, - i18n("(c) 2023-%1 kdebugsettings authors", u"2026"_s)); - aboutData.addAuthor(i18nc("@info:credit", "Laurent Montel"), i18n("Maintainer"), u"[email protected]"_s); - QApplication::setWindowIcon(QIcon::fromTheme(u"debug-run"_s)); - KAboutData::setApplicationData(aboutData); - - QCommandLineParser parser; - KDebugSettingsCommandLineParser commandLineParser(&parser); - - aboutData.setupCommandLine(&parser); - - parser.process(app); - aboutData.processCommandLine(&parser); - - if (parser.isSet(KDebugSettingsCommandLineParser::optionParserFromEnum(KDebugSettingsCommandLineParser::OptionParser::TestMode))) { - QStandardPaths::setTestModeEnabled(true); - } - - if (parser.isSet(KDebugSettingsCommandLineParser::optionParserFromEnum(KDebugSettingsCommandLineParser::OptionParser::EnableFullDebug))) { - ChangeDebugModeJob job; - job.setDebugMode(u"Full"_s); - job.setWithoutArguments(true); - if (!job.start()) { - std::cout << i18n("Impossible to change debug mode").toLocal8Bit().data() << std::endl; - } - - return 1; - } - if (parser.isSet(KDebugSettingsCommandLineParser::optionParserFromEnum(KDebugSettingsCommandLineParser::OptionParser::DisableFullDebug))) { - ChangeDebugModeJob job; - job.setDebugMode(u"Off"_s); - job.setWithoutArguments(true); - if (!job.start()) { - std::cout << i18n("Impossible to change debug mode").toLocal8Bit().data() << std::endl; - } - return 1; - } - const QString changeModeValue = - parser.value(KDebugSettingsCommandLineParser::optionParserFromEnum(KDebugSettingsCommandLineParser::OptionParser::DebugMode)); - if (!changeModeValue.isEmpty() && !parser.positionalArguments().isEmpty()) { - ChangeDebugModeJob job; - job.setDebugMode(changeModeValue); - job.setLoggingCategoriesName(parser.positionalArguments()); - if (!job.start()) { - std::cout << i18n("Impossible to change debug mode").toLocal8Bit().data() << std::endl; - } - return 1; - } else { -#if WITH_DBUS - KDBusService service(KDBusService::Unique); -#else - if (!sapp.isPrimaryInstance()) { - return 0; - } -#endif - - QQmlApplicationEngine engine; - - qmlRegisterSingletonInstance("org.kde.kdebugsettings", 1, 0, "LoggingManager", &LoggingManager::self()); - qRegisterMetaType<CustomLoggingCategoryModel *>("CustomLoggingCategoryModel *"); - qRegisterMetaType<KDEApplicationLoggingCategoryModel *>("KDEApplicationLoggingCategoryModel *"); - qmlRegisterType<CategoryTypeProxyModel>("org.kde.kdebugsettings", 1, 0, "CategoryTypeProxyModel"); - qmlRegisterType<CustomLoggingCategoryProxyModel>("org.kde.kdebugsettings", 1, 0, "CustomLoggingCategoryProxyModel"); - qmlRegisterType<KDEApplicationLoggingCategoryProxyModel>("org.kde.kdebugsettings", 1, 0, "KDEApplicationLoggingCategoryProxyModel"); - - qmlRegisterSingletonType("org.kde.kdebugsettings", 1, 0, "About", [](QQmlEngine *engine, QJSEngine *) -> QJSValue { - return engine->toScriptValue(KAboutData::applicationData()); - }); - engine.rootContext()->setContextObject(new KLocalizedQmlContext(&engine)); - engine.loadFromModule("org.kde.kdebugsettings", "Main"); - - // Exit on QML load error. - if (engine.rootObjects().isEmpty()) { - qWarning() << " Error during loading Main.qml"; - return 1; - } - return app.exec(); - } -} diff --git a/src/quickapps/qml/AboutPage.qml b/src/quickapps/qml/AboutPage.qml deleted file mode 100644 index 9200783f..00000000 --- a/src/quickapps/qml/AboutPage.qml +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import org.kde.kirigami as Kirigami -import org.kde.kdebugsettings -import org.kde.kirigamiaddons.formcard 1.0 as FormCard - -FormCard.AboutPage { - aboutData: About -} diff --git a/src/quickapps/qml/ActionMenuItem.qml b/src/quickapps/qml/ActionMenuItem.qml deleted file mode 100644 index e5fde0a0..00000000 --- a/src/quickapps/qml/ActionMenuItem.qml +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import Qt.labs.platform as Platform - -Platform.MenuItem { - required property var action - - checkable: action.checkable - checked: action.checked - icon.name: action.icon.name - icon.source: action.icon.source - shortcut: action.shortcut - separator: action.separator - text: action.text - visible: action.visible - onTriggered: action.triggered(this) -} diff --git a/src/quickapps/qml/CategoryComboBox.qml b/src/quickapps/qml/CategoryComboBox.qml deleted file mode 100644 index 4cc445f4..00000000 --- a/src/quickapps/qml/CategoryComboBox.qml +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-FileCopyrightText: 2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick.Controls as QQC2 -import org.kde.kdebugsettings - -QQC2.ComboBox { - id: categoryType - - property int loggingType: -1 - property bool showOffTypeValue: true - property bool syncLoggingTypeFromSelection: true - - onLoggingTypeChanged: { - currentIndex = count > 0 ? indexOfValue(loggingType) : -1 - } - - onCountChanged: { - // Resolve initial selection once the proxy model is populated. - if (count > 0 && currentIndex < 0) { - currentIndex = indexOfValue(loggingType) - } - } - - onCurrentIndexChanged: { - if (syncLoggingTypeFromSelection && currentIndex >= 0 && currentValue !== undefined) { - loggingType = currentValue - } - } - - model: CategoryTypeProxyModel { - sourceModel: LoggingManager.categoryTypeModel - showOffType: showOffTypeValue - } - textRole: "display" - valueRole: "categoryType" -} \ No newline at end of file diff --git a/src/quickapps/qml/CustomRulesPage.qml b/src/quickapps/qml/CustomRulesPage.qml deleted file mode 100644 index a27e1e19..00000000 --- a/src/quickapps/qml/CustomRulesPage.qml +++ /dev/null @@ -1,112 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls as QQC2 -import org.kde.kirigami as Kirigami -import org.kde.kirigamiaddons.delegates 1.0 as Delegates - -import org.kde.kdebugsettings - -Kirigami.ScrollablePage { - id: page2 - title: i18nc("@title", "Custom Rules") - leftPadding: 20 - actions: [ - Kirigami.Action { - displayComponent: Kirigami.SearchField { - onAccepted: LoggingManager.customLoggingCategoryProxyModel.filterText = text - } - } - ] - EditCustomRuleDialog { - id: editCustomRuleDialog - } - - function editCustomRule(item, currentIndex) { - if (item) { - const categoryName = item.categoryName; - const categoryEnabled = item.enabled; - const categoryLoggingType = item.loggingType; - editCustomRuleDialog.editMode = true; - editCustomRuleDialog.editRowIndex = currentIndex; - editCustomRuleDialog.categoryName = categoryName; - editCustomRuleDialog.categoryEnabled = categoryEnabled; - editCustomRuleDialog.categoryType = categoryLoggingType; - editCustomRuleDialog.open(); - } - } - - ListView { - id: listviewRules - reuseItems: true - activeFocusOnTab: true // keyboard navigation - focus: true // keyboard navigation - model: LoggingManager.customLoggingCategoryProxyModel - delegate: Delegates.RoundedItemDelegate { - required property string displayRule - required property string categoryName - required property int index - required property bool enabled - required property int loggingType - - text: displayRule - highlighted: ListView.isCurrentItem - onClicked: listviewRules.currentIndex = index - onDoubleClicked: { - editCustomRule(listviewRules.currentItem, listviewRules.currentIndex) - } - } - TapHandler { - acceptedButtons: Qt.RightButton - onTapped: contextMenu.popup() - } - - QQC2.Menu { - id: contextMenu - QQC2.MenuItem { - icon.name: "list-add" - text: i18nc("@action add custom rule", "Add Rule…") - onTriggered: { - editCustomRuleDialog.editMode = false; - editCustomRuleDialog.categoryName = ""; - editCustomRuleDialog.categoryEnabled = false; - editCustomRuleDialog.categoryType = 0; - editCustomRuleDialog.open(); - } - } - QQC2.MenuItem { - visible: listviewRules.currentIndex !== -1 && listviewRules.count !== 0 - icon.name: "document-edit" - text: i18nc("@action edit custom rule", "Edit Rule…") - onTriggered: { - editCustomRule(listviewRules.currentItem, listviewRules.currentIndex) - } - } - QQC2.MenuSeparator { - visible: listviewRules.currentIndex !== -1 && listviewRules.count !== 0 - } - QQC2.MenuItem { - visible: listviewRules.currentIndex !== -1 && listviewRules.count !== 0 - icon.name: "edit-delete" - text: i18nc("@action remove custom rule", "Remove Rule") - onTriggered: { - removeRulePrompt.open(); - } - Kirigami.PromptDialog { - id: removeRulePrompt - parent: QQC2.Overlay.overlay - - title: i18nc("@title:window", "Remove Rule") - subtitle: i18n("Are you sure you want to remove rule ?") - standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel - - onAccepted: { - LoggingManager.customLoggingCategoryProxyModel.removeCategory(listviewRules.currentIndex); - } - } - } - } - } -} diff --git a/src/quickapps/qml/EditCustomRuleDialog.qml b/src/quickapps/qml/EditCustomRuleDialog.qml deleted file mode 100644 index 6d906310..00000000 --- a/src/quickapps/qml/EditCustomRuleDialog.qml +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-FileCopyrightText: 2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later -import QtQuick -import org.kde.kirigami as Kirigami -import QtQuick.Controls as QQC2 -import QtQuick.Layouts -import org.kde.kdebugsettings - -Kirigami.Dialog { - id: dialog - title: editMode ? i18nc("@title:window", "Edit Custom Rule") : i18nc("@title:window", "Create Custom Rule") - clip: true - showCloseButton: false - property alias categoryName: categoryNameField.text - property alias categoryEnabled: categoryEnabled.checked - property alias categoryType: categoryType.loggingType - property bool editMode: false - property int editRowIndex: -1 - - footer: QQC2.DialogButtonBox { - standardButtons: saveButton | QQC2.DialogButtonBox.Cancel - onAccepted: { - dialog.accept(); - } - QQC2.Button { - id: saveButton - icon.name: "document-save" - enabled: categoryNameField.text !== "" - text: i18nc("@label:button", "Save") - QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole - } - } - - RowLayout { - id: mainColumn - spacing: Kirigami.Units.smallSpacing - - QQC2.Label { - Layout.leftMargin: 4 - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - verticalAlignment: Text.AlignVCenter - text: i18nc("@label:textbox", "Category:") - } - QQC2.TextField { - id: categoryNameField - } - QQC2.Label { - Layout.leftMargin: 4 - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - verticalAlignment: Text.AlignVCenter - text: i18nc("@label:textbox", "Type:") - } - CategoryComboBox { - id: categoryType - showOffTypeValue: false - syncLoggingTypeFromSelection: true - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - } - QQC2.CheckBox { - id: categoryEnabled - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - text: i18nc("@label:textbox", "Enabled") - } - } - onAccepted: { - if (editMode) { - LoggingManager.customCategoryModel.updateCategory(editRowIndex, categoryNameField.text, categoryEnabled.checked, categoryType.loggingType); - } else { - LoggingManager.customCategoryModel.addCategory(categoryNameField.text, categoryEnabled.checked, categoryType.loggingType); - } - } -} diff --git a/src/quickapps/qml/EnvironmentVariableRulesPage.qml b/src/quickapps/qml/EnvironmentVariableRulesPage.qml deleted file mode 100644 index 30d0fb2a..00000000 --- a/src/quickapps/qml/EnvironmentVariableRulesPage.qml +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls as QQC2 -import org.kde.kirigami as Kirigami -import org.kde.kdebugsettings - -Kirigami.Page { - id: root - title: i18nc("@title", "Rules Settings with Environment Variable") - - leftPadding: 20 - - ColumnLayout { - spacing: Kirigami.Units.gridUnit - width: parent.width - (Kirigami.Units.largeSpacing * 4) - anchors.centerIn: parent - TextEdit { - text: LoggingManager.environmentrules().length === 0 ? i18n("No rules have been defined in the environment variable \"QT_LOGGING_RULES\".") : LoggingManager.environmentrules() - readOnly: true - horizontalAlignment: Qt.AlignHCenter - } - } -} diff --git a/src/quickapps/qml/GlobalMenu.qml b/src/quickapps/qml/GlobalMenu.qml deleted file mode 100644 index 0d6f28f9..00000000 --- a/src/quickapps/qml/GlobalMenu.qml +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import Qt.labs.platform as Platform -import org.kde.kirigami as Kirigami - -Platform.MenuBar { - Platform.Menu { - title: i18nc("@item:inmenu", "Help") - - ActionMenuItem { - action: aboutAction - } - } -} diff --git a/src/quickapps/qml/KDEApplicationRulesPage.qml b/src/quickapps/qml/KDEApplicationRulesPage.qml deleted file mode 100644 index 0e1d5ab9..00000000 --- a/src/quickapps/qml/KDEApplicationRulesPage.qml +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls as QQC2 -import org.kde.kirigami as Kirigami - -import org.kde.kdebugsettings -import org.kde.kirigamiaddons.delegates as Delegates - -Kirigami.ScrollablePage { - id: page - title: i18nc("@title", "KDE Application Rules") - - leftPadding: 20 - actions: [ - Kirigami.Action { - displayComponent: Kirigami.SearchField { - onAccepted: LoggingManager.kdeApplicationLoggingCategoryProxyModel.filterText = text - } - } - ] - - ListView { - id: listviewRules - focus: true // keyboard navigation - activeFocusOnTab: true // keyboard navigation - reuseItems: true - clip: true - model: LoggingManager.kdeApplicationLoggingCategoryProxyModel - delegate: Delegates.RoundedItemDelegate { - id: ruleDelegate - required property int index - required property string description - required property string generatedToolTip - required property int loggingType - - highlighted: ListView.isCurrentItem - onClicked: listviewRules.currentIndex = index - - RowLayout { - width: parent.width - - QQC2.Label { - Layout.leftMargin: 4 - text: ruleDelegate.description - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - verticalAlignment: Text.AlignVCenter - - QQC2.ToolTip.visible: hovered - QQC2.ToolTip.text: ruleDelegate.generatedToolTip - } - Item { - Layout.fillWidth: true - } - CategoryComboBox { - id: categoryType - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - syncLoggingTypeFromSelection: false - loggingType: ruleDelegate.loggingType - onActivated: () => { - listviewRules.model.setCategoryType(index, currentValue); - } - } - } - } - } -} diff --git a/src/quickapps/qml/Main.qml b/src/quickapps/qml/Main.qml deleted file mode 100644 index 757515a4..00000000 --- a/src/quickapps/qml/Main.qml +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import QtQuick.Controls as QQC2 -import org.kde.kirigami as Kirigami - -import org.kde.kdebugsettings - -Kirigami.ApplicationWindow { - id: root - - pageStack { - initialPage: MainPage {} - defaultColumnWidth: root.width - - globalToolBar { - style: Kirigami.ApplicationHeaderStyle.ToolBar - showNavigationButtons: if (applicationWindow().pageStack.currentIndex > 0) { - Kirigami.ApplicationHeaderStyle.ShowBackButton; - } else { - 0; - } - } - } - Kirigami.Action { - id: goToKdeApplicationCategories - text: i18nc("@action", "Show KDE Application Categories") - onTriggered: { - pageStack.layers.push(Qt.resolvedUrl("KDEApplicationRulesPage.qml")); - } - } - Kirigami.Action { - id: goToCustomCategories - text: i18nc("@action", "Show Custom Categories") - onTriggered: { - pageStack.layers.push(Qt.resolvedUrl("CustomRulesPage.qml")); - } - } - Kirigami.Action { - id: goToEnviromnentCategories - text: i18nc("@action", "Show Environment Categories") - onTriggered: { - pageStack.layers.push(Qt.resolvedUrl("EnvironmentVariableRulesPage.qml")); - } - } - Kirigami.Action { - id: aboutAction - displayHint: Kirigami.DisplayHint.AlwaysHide - icon.name: "debug-run" - text: i18nc("@action opens about app page", "About") - onTriggered: { - pageStack.layers.push(Qt.resolvedUrl("AboutPage.qml")); - } - } - - Kirigami.Action { - id: helpAction - displayHint: Kirigami.DisplayHint.AlwaysHide - icon.name: "help-browser" - text: i18nc("@action", "Open Handbook") - onTriggered: { - Qt.openUrlExternally("help:/kdebugsettings"); - } - } - Kirigami.Action { - id: separatorAction - displayHint: Kirigami.DisplayHint.AlwaysHide - separator: true - } - Kirigami.Action { - id: quitAction - displayHint: Kirigami.DisplayHint.AlwaysHide - text: i18nc("@menu-action", "Quit") - icon.name: "gtk-quit" - shortcut: StandardKey.Quit - onTriggered: Qt.quit() - } - Kirigami.Action { - id: saveAction - displayHint: Kirigami.DisplayHint.AlwaysHide - text: i18nc("@menu-action", "Save") - icon.name: "document-save" - shortcut: StandardKey.Save - onTriggered: { - LoggingManager.saveInQtLogging(); - } - } - GlobalMenu {} -} diff --git a/src/quickapps/qml/MainPage.qml b/src/quickapps/qml/MainPage.qml deleted file mode 100644 index f3f2fa83..00000000 --- a/src/quickapps/qml/MainPage.qml +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-FileCopyrightText: 2023-2026 Laurent Montel <[email protected]> -// SPDX-License-Identifier: LGPL-2.0-or-later - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls as QQC2 -import org.kde.kirigami as Kirigami - -Kirigami.Page { - id: root - - leftPadding: 20 - - actions: [goToKdeApplicationCategories, goToCustomCategories, goToEnviromnentCategories, saveAction, separatorAction, helpAction, aboutAction, separatorAction, quitAction] - ColumnLayout { - spacing: Kirigami.Units.gridUnit - width: parent.width - (Kirigami.Units.largeSpacing * 4) - anchors.centerIn: parent - Kirigami.Icon { - Layout.alignment: Qt.AlignHCenter - source: "debug-run" - implicitWidth: Kirigami.Units.iconSizes.enormous - implicitHeight: implicitWidth - } - Kirigami.Heading { - Layout.alignment: Qt.AlignHCenter - text: i18nc("@title", "Welcome to kdebugsettings") - } - } -}