Test setting signal handler and a few fix to make it work

We were not parsing CodeBlock node from the signal handler correctly,
we wer eonly taking the first expression instead of the whole codeblock

In JS, emitting signal before the show() did not update the GLOBAL_CONTEXT
needed to emit signals defined in JS
This commit is contained in:
Olivier Goffart 2020-08-03 14:58:57 +02:00
parent b8d440a6db
commit 5f38f03a1b
4 changed files with 32 additions and 10 deletions

View file

@ -21,7 +21,7 @@ struct Signal
[](void *user_data) {
(*reinterpret_cast<F *>(user_data))();
},
new F(binding), [](void *user_data) { delete reinterpret_cast<F *>(user_data); });
new F(std::move(binding)), [](void *user_data) { delete reinterpret_cast<F *>(user_data); });
}
void emit() const