Warning, /plasma/drkonqi/src/qml/MainPage.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0002 // SPDX-FileCopyrightText: 2021-2022 Harald Sitter <sitter@kde.org> 0003 0004 import QtQuick 2.15 0005 import QtQuick.Layouts 1.15 0006 import QtQuick.Controls 2.15 as QQC2 0007 import org.kde.kirigami 2.19 as Kirigami 0008 0009 import org.kde.drkonqi 1.0 0010 0011 Kirigami.Page { 0012 globalToolBarStyle: Kirigami.ApplicationHeaderStyle.None 0013 0014 title: CrashedApplication.name 0015 0016 Component.onCompleted: { 0017 if (BacktraceGenerator.state === BacktraceGenerator.NotLoaded) { 0018 BacktraceGenerator.start() 0019 } 0020 } 0021 Component.onDestruction: Settings.save() 0022 0023 ColumnLayout { 0024 anchors.fill: parent 0025 0026 QQC2.Label { 0027 Layout.fillWidth: true 0028 wrapMode: Text.WordWrap 0029 text: xi18nc("@info", "<para>We are sorry, <application>%1</application> closed unexpectedly.</para>", CrashedApplication.name) 0030 } 0031 QQC2.Label { 0032 Layout.fillWidth: true 0033 wrapMode: Text.WordWrap 0034 onLinkActivated: link => Qt.openUrlExternally(link) 0035 text: canReportText 0036 } 0037 0038 Item { 0039 Layout.fillHeight: true 0040 } 0041 0042 GridLayout { 0043 Layout.alignment: Qt.AlignHCenter 0044 0045 columns: Kirigami.Settings.isMobile ? 1 : 2 0046 rows: Kirigami.Settings.isMobile ? 2 : 1 0047 0048 MainPageButton { 0049 Layout.alignment: Qt.AlignHCenter 0050 0051 action: Kirigami.Action { 0052 enabled: Kirigami.Settings.isMobile ? true : canAutoReport 0053 visible: Kirigami.Settings.isMobile ? canAutoReport : true 0054 icon.name: "document-send-symbolic" 0055 text: i18nc("@action", "Send Automatic Report") 0056 onTriggered: { 0057 reportInterface.setSendWhenReady(true) 0058 reportInterface.sendSentryReport() 0059 pageStack.replace("qrc:/ui/SentryPage.qml") 0060 } 0061 } 0062 } 0063 0064 MainPageButton { 0065 Layout.alignment: Qt.AlignHCenter 0066 0067 action: Kirigami.Action { 0068 icon.name: "code-class-symbolic" 0069 text: i18nc("@action", "See Developer Information") 0070 onTriggered: pageStack.push("qrc:/ui/DeveloperPage.qml") 0071 } 0072 } 0073 } 0074 0075 Item { 0076 Layout.fillHeight: true 0077 } 0078 } 0079 }