File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -388,17 +388,23 @@ fn (mut g Generator) gen_signals() ! {
388388 mut clause := 'if f is ${sig_name} {'
389389 mut arg_list := []string {cap: signal.arguments.len}
390390 for a, arg in signal.arguments {
391- type := convert_type (arg.type )
391+ type := convert_strings ( convert_type (arg.type ) )
392392 match type {
393393 'bool' {
394394 clause + = '\n | arg${a} := unsafe { args[${a} ].to_bool() }'
395395 }
396+ 'string' {
397+ clause + = '\n | arg${a} := unsafe { args[${a} ].to_string() }'
398+ }
396399 'i64' {
397400 clause + = '\n | arg${a} := unsafe { args[${a} ].to_i64() }'
398401 }
399402 'f64' {
400403 clause + = '\n | arg${a} := unsafe { args[${a} ].to_f64() }'
401404 }
405+ 'Variant' {
406+ clause + = '\n | arg${a} := unsafe { args[${a} ] }'
407+ }
402408 else {
403409 clause + = '\n | arg${a} := unsafe { ${type} .from_variant(args[${a} ]) }'
404410 }
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ struct SignatureCfg {
4747fn signature (args []APIArg, cfg SignatureCfg) (string , string ) {
4848 ret_sig := ' ${cfg.return} ' .trim_space_right ()
4949 args_sig := args.map (fn [cfg] (arg APIArg) string {
50- type := convert_type (arg.type )
50+ type := convert_strings ( convert_type (arg.type ) )
5151 if cfg.strip_names {
5252 return type
5353 }
You can’t perform that action at this time.
0 commit comments