Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global-shortcuts: Signal arguments are outputs #917

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions data/org.freedesktop.impl.portal.GlobalShortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@
Emitted when a shortcut is activated.
-->
<signal name="Activated">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="shortcut_id" direction="in"/>
<arg type="t" name="timestamp" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<arg type="a{sv}" name="options" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? You've given it 4 out arguments, and I infer from your other contributions of this annotation that they're using 0-based indexing, so I'd expect the annotation to be .Out3 now?

(If I'm reading correctly, this was also an attempt at a silent bug-fix for Qt consumers because the annotation used to apply to a nonexistent 5th argument (In4 in 0-based indexing), and was changed to point to the 4th argument?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleixpol, can you open a PR changing In3 to Out3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#923

Good catch!

I was thinking it could make sense to run qtdbusxmltocpp in the CI to make sure it's all sound. Do you think it would be useful?

It would also need fixing some of the files that at the moment are not entirely working with it just yet.

</signal>

<!--
Expand All @@ -147,11 +147,11 @@
Emitted when a shortcut is deactivated.
-->
<signal name="Deactivated">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="shortcut_id" direction="in"/>
<arg type="t" name="timestamp" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<arg type="a{sv}" name="options" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
</signal>

<!--
Expand Down
20 changes: 10 additions & 10 deletions data/org.freedesktop.portal.GlobalShortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@
Notifies about a shortcut becoming active.
-->
<signal name="Activated">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="shortcut_id" direction="in"/>
<arg type="t" name="timestamp" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QVariantMap"/>
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<arg type="a{sv}" name="options" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
</signal>

<!--
Expand All @@ -239,11 +239,11 @@
Notifies that a shortcut is not active anymore.
-->
<signal name="Deactivated">
<arg type="o" name="session_handle" direction="in"/>
<arg type="s" name="shortcut_id" direction="in"/>
<arg type="t" name="timestamp" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
<arg type="o" name="session_handle" direction="out"/>
<arg type="s" name="shortcut_id" direction="out"/>
<arg type="t" name="timestamp" direction="out"/>
<arg type="a{sv}" name="options" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out3" value="QVariantMap"/>
</signal>

<!--
Expand Down