genbindings/signals: support connecting to a const signal

This commit is contained in:
mappu 2024-10-11 17:29:49 +13:00
parent a4eb43c9fd
commit f733ce29bc
1 changed files with 1 additions and 1 deletions

View File

@ -686,7 +686,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
// If there are hidden parameters, the type of the signal itself
// needs to include them
exactSignal := `static_cast<void (` + c.ClassName + `::*)(` + emitParameterTypesCpp(m, true) + `)>(&` + c.ClassName + `::` + m.CppCallTarget() + `)`
exactSignal := `static_cast<void (` + c.ClassName + `::*)(` + emitParameterTypesCpp(m, true) + `)` + ifv(m.IsConst, ` const`, ``) + `>(&` + c.ClassName + `::` + m.CppCallTarget() + `)`
paramArgs := []string{"slot"}
paramArgDefs := []string{"void* cb"}