Warning, /plasma/drkonqi/src/qml/DuplicatesLoadingPage.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: 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 id: page 0013 0014 title: i18nc("@title", "Look for Possible Duplicate Reports") 0015 0016 property bool hasPerfectDuplicate: reportInterface.duplicateId > 0 0017 property bool loading: true 0018 onLoadingChanged: { 0019 if (loading) { 0020 return 0021 } 0022 0023 if (hasPerfectDuplicate) { 0024 pageStack.pop() 0025 pageStack.push("qrc:/ui/PerfectDuplicatePage.qml") 0026 } else { 0027 pageStack.pop() 0028 pageStack.push("qrc:/ui/DuplicatesPage.qml") 0029 } 0030 } 0031 0032 Connections { 0033 id: connectors 0034 target: loading ? duplicateModel : null 0035 onSearchingChanged: { 0036 if (!duplicateModel.searching) { 0037 loading = false 0038 } 0039 } 0040 enabled: false // enabled when searching starts 0041 } 0042 0043 Kirigami.PlaceholderMessage { 0044 anchors.centerIn: parent 0045 width: parent.width - (Kirigami.Units.largeSpacing * 8) 0046 text: i18nc("@info", "Searching bug database for duplicates…") 0047 0048 QQC2.BusyIndicator { 0049 Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 0050 } 0051 } 0052 0053 Component.onCompleted: { 0054 connectors.enabled = true 0055 duplicateModel.searchBugs(reportInterface.relatedBugzillaProducts(), "crash", reportInterface.firstBacktraceFunctions().join(' ')) 0056 } 0057 }