Commit c1f7bdab authored by Ronan Abhamon's avatar Ronan Abhamon

fix(scripts/utils): display exit status in console.debug

parent 05d701fa
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
// signal. // signal.
function openWindow (window, parent, options) { function openWindow (window, parent, options) {
var object var object
if (options && options.isString) { if (options && options.isString) {
object = Qt.createQmlObject(window, parent) object = Qt.createQmlObject(window, parent)
} else { } else {
...@@ -36,6 +37,9 @@ function openWindow (window, parent, options) { ...@@ -36,6 +37,9 @@ function openWindow (window, parent, options) {
console.debug('Destroy window.') console.debug('Destroy window.')
object.destroy() object.destroy()
}) })
object.exitStatus.connect(function (status) {
console.debug('Exit status: ' + status)
})
if (options && options.exitHandler) { if (options && options.exitHandler) {
object.exitStatus.connect( object.exitStatus.connect(
...@@ -43,12 +47,14 @@ function openWindow (window, parent, options) { ...@@ -43,12 +47,14 @@ function openWindow (window, parent, options) {
options.exitHandler.bind(parent) options.exitHandler.bind(parent)
) )
} }
object.show() object.show()
} }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// Display a simple ConfirmDialog component. Wrap the openWindow function. // Display a simple ConfirmDialog component.
// Wrap the openWindow function.
function openConfirmDialog (parent, options) { function openConfirmDialog (parent, options) {
openWindow( openWindow(
'import QtQuick 2.7;' + 'import QtQuick 2.7;' +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment