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

Please provide example of creating google::protobuf::Any member #167

Open
gmabey opened this issue Oct 10, 2020 · 2 comments
Open

Please provide example of creating google::protobuf::Any member #167

gmabey opened this issue Oct 10, 2020 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@gmabey
Copy link
Contributor

gmabey commented Oct 10, 2020

Hello,

I've been extracting data from a google::protobuf::Any field for several versions, and it works great thank you.

Now, I need to populate a Any field with qtprotobuf. I understand how to serialize the target to a QByteArray, and then assign it with Any::setValue(), but I do not see a clear way to retrieve the value to be assigned with Any::setTypeUrl() and I don't see any appropriate (static) data members in the message that I wish to store.

Could you please provide an example of how to do that?

Thank you!

@gmabey gmabey added the question Further information is requested label Oct 10, 2020
@semlanik
Copy link
Owner

Hi @gmabey , hope you're doing well :) I think you request functionality that I didn't implement yet. Please look at #83 . I had feeling that this functionality is not required by anyone, so I postponed it. This release I already focused on your previous requests, so will add it to next release schedule if you don't mind.

@gmabey
Copy link
Contributor Author

gmabey commented Oct 10, 2020

Yes, what I've done for now is to just copy the string as it was produced by the python protobuf tools. So, it's not generic, but it's working, so yes it will be fine to push that down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants