Added self-update
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
/* Copyright 2018 WobLight
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.9
|
||||
import GitAddonsManager.engine 1.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
ApplicationWindow {
|
||||
visible: true
|
||||
title: "Updating..."
|
||||
width: errorDialog.visible?errorDialog.implicitWidth:bar.implicitWidth
|
||||
height: errorDialog.visible?errorDialog.implicitHeight:bar.implicitHeight
|
||||
flags: Qt.FramelessWindowHint
|
||||
color: "transparent"
|
||||
ProgressBar {
|
||||
visible: Engine.status !== Engine.Error
|
||||
id: bar
|
||||
anchors.fill: parent
|
||||
to: Engine.total
|
||||
value: Engine.progress
|
||||
indeterminate: to <= 0
|
||||
}
|
||||
Dialog {
|
||||
id: errorDialog
|
||||
visible: Engine.status === Engine.Error
|
||||
standardButtons: Dialog.Close
|
||||
onClosed: Qt.exit(-2)
|
||||
title: qsTr("GitAddonsManager update error")
|
||||
Label {
|
||||
text: Engine.statusMessage
|
||||
}
|
||||
}
|
||||
|
||||
onClosing: {}
|
||||
}
|
||||
Reference in New Issue
Block a user