2
1
Fork 0

typegen: add reference shorthand for functions and signals

This commit is contained in:
outfoxxed 2024-07-20 02:18:06 -07:00
parent 170d7d9252
commit 3fe7cf9bf9
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
2 changed files with 22 additions and 2 deletions

View file

@ -22,6 +22,20 @@
{{- else if eq .type "local" -}}
{{- $link = printf "%s#prop.%s" $link .prop -}}
{{- end -}}
{{- else if .func -}}
{{- $member = printf ".%s()" .func -}}
{{- if eq .type "qt" -}}
{{- $link = printf "%s#%s-method" $link .func -}}
{{- else if eq .type "local" -}}
{{- $link = printf "%s#func.%s" $link .func -}}
{{- end -}}
{{- else if .signal -}}
{{- $member = printf ".%s()" .signal -}}
{{- if eq .type "qt" -}}
{{- $link = printf "%s#%s-signal" $link .signal -}}
{{- else if eq .type "local" -}}
{{- $link = printf "%s#signal.%s" $link .signal -}}
{{- end -}}
{{- end -}}
<a href="{{ $link }}">{{ .name }}{{ $member }}</a>{{ $of | safeHTML -}}