Bug 731547 - Support renamed signals and properties
Support renamed signals and properties
Status: NEW
Product: vala
Classification: Core
Component: Code Generator: GObject
unspecified
Other Linux
: High normal
: 1.0
Assigned To: Vala maintainers
Vala maintainers
:
: 618930 652533 (view as bug list)
Depends on:
Blocks: 684358
  Show dependency tree
 
Reported: 2014-06-12 04:15 UTC by Evan Nemerson
Modified: 2017-06-07 06:16 UTC (History)
5 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
codegen: Support renamed signals (12.57 KB, patch)
2017-06-06 15:41 UTC, Rico Tzschichholz
none Details | Diff | Review
codegen: Support renamed signals (15.25 KB, patch)
2017-06-06 21:27 UTC, Rico Tzschichholz
committed Details | Diff | Review

Description Evan Nemerson 2014-06-12 04:15:29 UTC
When we have a signal which conflicts with a property, such as DBusConnection.closed in GIO, we currently have to choose one because renaming either will result in incorrect C being generated.  AFAIK there is no annotation for property or signal names.
Comment 1 Luca Bruno 2014-06-12 07:33:14 UTC
The behavior is to always prefer properties. What do you want to do exactly instead? Rename the signal to something else?
Comment 2 Evan Nemerson 2014-06-12 07:34:23 UTC
Yep.  See bug #684358.
Comment 3 Luca Bruno 2014-06-12 07:39:58 UTC
You should be able to rename with something like .close#signal name="foo", or .close#virtual_signal name="foo", or whatever is the tag name in the .gir.
Comment 4 Evan Nemerson 2014-06-12 07:42:40 UTC
I can, the problem is the vapi just says something like

  public signal void foo ();

With no CCode annotation or anything to tell the compiler that the real name is "closed".
Comment 5 Rico Tzschichholz 2017-03-08 14:02:00 UTC
*** Bug 618930 has been marked as a duplicate of this bug. ***
Comment 6 Rico Tzschichholz 2017-03-08 14:02:32 UTC
*** Bug 652533 has been marked as a duplicate of this bug. ***
Comment 7 Rico Tzschichholz 2017-06-06 15:41:55 UTC
Created attachment 353266 [details] [review]
codegen: Support renamed signals

The CCode attribute 'cname' needs to be given as canonical representation
as it is expected in C.
Comment 8 Rico Tzschichholz 2017-06-06 21:27:58 UTC
Created attachment 353277 [details] [review]
codegen: Support renamed signals

The CCode attribute 'cname' needs to be given as canonical representation
as it is expected in C.
Comment 9 Rico Tzschichholz 2017-06-07 06:16:18 UTC
Comment on attachment 353277 [details] [review]
codegen: Support renamed signals

Attachment 353277 [details] pushed as 9bee488 - codegen: Support renamed signals

Note You need to log in before you can comment on or make changes to this bug.