Warning, /system/drkonqi-pk-debug-installer/src/qml/ErrorPage.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: 2020 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.4 as Kirigami
0008 import org.kde.drkonqi.debug.installer.pk 1.0
0009 
0010 Kirigami.Page {
0011     id: page
0012     title: i18nc("@title", "Error")
0013 
0014     footer: QQC2.DialogButtonBox {
0015         standardButtons: QQC2.DialogButtonBox.Close
0016         onRejected: Qt.quit()
0017     }
0018 
0019     ColumnLayout {
0020         anchors.fill: parent
0021         RowLayout {
0022             Kirigami.Icon {
0023                 source: "dialog-error"
0024                 width: Kirigami.Units.iconSizes.enormous
0025                 height: width
0026             }
0027             QQC2.Label {
0028                 Layout.fillWidth: true
0029                 text: i18nc("@info", "An error occurred during installation: %1",
0030                             DebugRepoEnabler.error !== "" ? DebugRepoEnabler.error : Installer.error)
0031                 wrapMode: Text.Wrap
0032             }
0033         }
0034 
0035         QQC2.ScrollView {
0036             id: view
0037             Layout.fillWidth: true
0038             Layout.fillHeight: true
0039             QQC2.TextArea {
0040                 Layout.fillWidth: true
0041                 readOnly: true
0042                 // Reverse the log so we have a good chance of finding the most recent (and ideally most
0043                 // relevant) information in a screenshot. Users tend to post screenshots right now *shrug*
0044                 text: Logger.log().reverse().join('')
0045                 wrapMode: Text.Wrap
0046             }
0047         }
0048     }
0049 }