Fix issue with Python debugger when leaving application

This commit is contained in:
wmayer 2012-09-11 11:12:02 +02:00
parent 7a999faa06
commit 3958c53cb3

View File

@ -1235,7 +1235,9 @@ QString PythonConsole::readline( void )
this->_sourceDrain = &inputBuffer; //< enable source drain ...
// ... and wait until we get notified about pendingSource
QObject::connect( this, SIGNAL(pendingSource()), &loop, SLOT(quit()) );
loop.exec();
// application is about to quit
if (loop.exec() < 0)
inputBuffer = QLatin1String("quit()");
this->_sourceDrain = NULL; //< disable source drain
return inputBuffer.append(QChar::fromAscii('\n')); //< pass a newline here, since the readline-caller may need it!
}