From c1f7bdaba9de899df6a7ca8802635cc041159843 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Thu, 15 Sep 2016 10:30:33 +0200 Subject: [PATCH] fix(scripts/utils): display exit status in console.debug --- tests/ui/scripts/utils.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/ui/scripts/utils.js b/tests/ui/scripts/utils.js index 4c9ba4a1d..9c0027654 100644 --- a/tests/ui/scripts/utils.js +++ b/tests/ui/scripts/utils.js @@ -12,6 +12,7 @@ // signal. function openWindow (window, parent, options) { var object + if (options && options.isString) { object = Qt.createQmlObject(window, parent) } else { @@ -36,6 +37,9 @@ function openWindow (window, parent, options) { console.debug('Destroy window.') object.destroy() }) + object.exitStatus.connect(function (status) { + console.debug('Exit status: ' + status) + }) if (options && options.exitHandler) { object.exitStatus.connect( @@ -43,12 +47,14 @@ function openWindow (window, parent, options) { options.exitHandler.bind(parent) ) } + object.show() } // ------------------------------------------------------------------- -// Display a simple ConfirmDialog component. Wrap the openWindow function. +// Display a simple ConfirmDialog component. +// Wrap the openWindow function. function openConfirmDialog (parent, options) { openWindow( 'import QtQuick 2.7;' +