From 0d9c24084859d19eb5a97ecd1486be6264c728a3 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 30 May 2011 01:40:03 +0000 Subject: have the gui quit if the interpreter quits --- src/gui/debate.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gui/debate.cc') diff --git a/src/gui/debate.cc b/src/gui/debate.cc index 24608c0f..92209db8 100644 --- a/src/gui/debate.cc +++ b/src/gui/debate.cc @@ -29,6 +29,7 @@ // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include #include #include "debate.h" #include @@ -56,6 +57,9 @@ namespace OpenAxiom { setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); adjustSize(); start_interpreter(exchanges()); + connect(conv.oracle(), + SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(done(int))); } Debate::~Debate() { } @@ -68,4 +72,10 @@ namespace OpenAxiom { QSizePolicy::MinimumExpanding); } + void Debate::done(int exit_code) { + // For the time being, shut done the whole application + // if the interpreter quits. FIXME. + QApplication::exit(exit_code); + } + } -- cgit v1.2.3