From f0853eda9ffad7600c42239df311a4ef24192dc4 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 18 Apr 2017 13:43:26 +0100 Subject: [PATCH] Fix exception fetching and passing through signals --- qrenderdoc/Code/pyrenderdoc/PythonContext.cpp | 5 ++++- qrenderdoc/Code/pyrenderdoc/PythonContext.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp b/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp index b381ab68c..33e5406b0 100644 --- a/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp +++ b/qrenderdoc/Code/pyrenderdoc/PythonContext.cpp @@ -133,7 +133,7 @@ static PyMethodDef OutputRedirector_methods[] = { PyObject *PythonContext::main_dict = NULL; -void FetchException(QString &typeStr, QString &valueStr, QList frames) +void FetchException(QString &typeStr, QString &valueStr, QList &frames) { PyObject *exObj = NULL, *valueObj = NULL, *tracebackObj = NULL; @@ -200,6 +200,9 @@ void PythonContext::GlobalInit() return; } + // for the exception signal + qRegisterMetaType>("QList"); + PyImport_AppendInittab("_renderdoc", &PyInit__renderdoc); PyImport_AppendInittab("_qrenderdoc", &PyInit__qrenderdoc); diff --git a/qrenderdoc/Code/pyrenderdoc/PythonContext.h b/qrenderdoc/Code/pyrenderdoc/PythonContext.h index 0cc52fc64..a73f56582 100644 --- a/qrenderdoc/Code/pyrenderdoc/PythonContext.h +++ b/qrenderdoc/Code/pyrenderdoc/PythonContext.h @@ -84,7 +84,7 @@ public: int currentLine() { return location.line; } signals: void traceLine(const QString &file, int line); - void exception(const QString &type, const QString &value, const QList &frames); + void exception(const QString &type, const QString &value, QList frames); void textOutput(bool isStdError, const QString &output); public slots: