Add support for aborting python execution at the next traceback call

This commit is contained in:
baldurk
2017-04-18 14:57:50 +01:00
parent f0853eda9f
commit b904b28187
2 changed files with 19 additions and 5 deletions
@@ -80,6 +80,8 @@ public:
static PyObject *QWidgetToPy(QWidget *widget) { return QtObjectToPython("QWidget", widget); }
static QWidget *QWidgetFromPy(PyObject *widget);
void abort() { m_Abort = true; }
bool shouldAbort() { return m_Abort; }
QString currentFile() { return location.file; }
int currentLine() { return location.line; }
signals:
@@ -115,6 +117,8 @@ private:
int line = 0;
} location;
bool m_Abort = false;
static PyObject *QtObjectToPython(const char *typeName, QObject *object);
// Python callbacks