Make sure the stack test interface gets cleaned up

This commit is contained in:
Clement 2018-08-01 13:29:07 -07:00
parent 949c7f8c19
commit 9c89aa9f90
2 changed files with 3 additions and 1 deletions

View file

@ -751,7 +751,7 @@ void ScriptEngine::init() {
registerGlobalObject("UserActivityLogger", DependencyManager::get<UserActivityLoggerScriptingInterface>().data());
#if DEV_BUILD || PR_BUILD
registerGlobalObject("StackTest", new StackTestScriptingInterface());
registerGlobalObject("StackTest", new StackTestScriptingInterface(this));
#endif
}

View file

@ -20,6 +20,8 @@ class StackTestScriptingInterface : public QObject {
Q_OBJECT
public:
StackTestScriptingInterface(QObject* parent = nullptr) : QObject(parent) {}
Q_INVOKABLE void pass(QString message = QString());
Q_INVOKABLE void fail(QString message = QString());