Fix bug where phantom.exit wouldn't exit properly

1.2
IceArmy 2011-06-19 17:26:39 -07:00
parent 54478a1154
commit c44838227d
2 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,7 @@ class Phantom(QObject):
def _exit(self, code): def _exit(self, code):
self.m_terminated = True self.m_terminated = True
self.m_returnValue = code self.m_returnValue = code
QApplication.instance().exit(code)
@pyqtProperty('QStringList') @pyqtProperty('QStringList')
def args(self): def args(self):

View File

@ -229,6 +229,7 @@ void Phantom::_exit(int code)
{ {
m_terminated = true; m_terminated = true;
m_returnValue = code; m_returnValue = code;
QApplication::instance()->exit(code);
} }
bool Phantom::injectJs(const QString &jsFilePath) { bool Phantom::injectJs(const QString &jsFilePath) {