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
DBus description: Add annotations for Qt support #3112
Conversation
Skipping CI for Draft Pull Request. |
The objective is to drop the copy we have in https://invent.kde.org/plasma/discover/-/blob/master/libdiscover/backends/RpmOstreeBackend/org.projectatomic.rpmostree1.xml with the annotations. |
Looks like I have to figure out how to make it work for gdbus-codegen first:
|
Looks like it's this stray annotation:
|
71b30c0
to
92b13ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems OK to me; a bit surprising that the a{sv}
case requires annotation.
I'll most likely do one small rename before we go with this (finding something better for: |
92b13ee
to
950edb6
Compare
Rename of what? /test all |
There was a custom class specified in the annotation for the "result" received for some DBus calls. I switched it to a standard Qt class instead and it looks OK so far. I'm keeping this as a draft for now as I'm still working on the code using this and may find other improvements. |
@@ -65,13 +69,21 @@ | |||
</method> | |||
|
|||
<!-- Array of all deployments in boot order --> | |||
<property name="Deployments" type="aa{sv}" access="read"/> | |||
<property name="Deployments" type="aa{sv}" access="read"> | |||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QList<QVariantMap>"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the <
expected here? Should >
also be changed to >
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried using <
and it breaks somewhere in the code generation. Using >
is currently working. I've not tried using >
.
- Use standard Qt types for DBus interface - Simplify the interface generation logic until we make a full abstraction for the rpm-ostree DBus interface. - Rename the DBus interface generated code to a clearer name. - Prepare for the removal of the DBus interface internal copy. We will be able to switch to upstream definition once the upstream PR coreos/rpm-ostree#3112 is merged.
Add an initial set of type annotations to help with automated interface code generation for Qt based applications.
950edb6
to
f40964e
Compare
Rebased to trigger retest. I have not made any new changes on that one so far so I don't think there will be any soon even though I'm not done with rpm-ostree support in Discover. Let's get this in and we will see if more is needed later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about missing this one in the review queue!
I think we really need to set up a periodic group "PR review backlog" thing.
All good. Thanks! |
The required changes have been merged upstream: coreos/rpm-ostree#3112
Add an initial set of simple annotations to help with interface code generation for Qt base applications.