-
Notifications
You must be signed in to change notification settings - Fork 60
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
Simple Q_PLUGIN_METADATA support ? #27
Comments
oh well, it seems that even this is converted to JSON anyways :) https://github.com/qt/qtbase/blob/5.11/src/tools/moc/generator.cpp#L1559 is the JSON binary format used by qt defined somewhere ? |
Well, there could be a way, but it won't be easy. The question is whether this is really worth it. Q_PLUGIN_METADATA is only used for the main plugin class. You really could use moc for this. This can even be placed in a separate .h file which is there only for moc to generate the data. If one wanted really wanted to have the equivalent feature, the macro would probably be placed outside of the class, in the .cpp file. We could have somehting like that
And parse the json at compile time (I think there are already libraries out there that do that.) But I guess it would be best not to parse json and have some kind of DSL
Either way, we need do get a constexpr data scructure containing the "JSON" data that we need to stream in the metadata. Over all, I think it is a lot of work and not really worth it. |
that's what I feared ! however, looking at your code in moc-ng it looks like |
Is there a way to have support for Q_PLUGIN_METADATA, even without the JSON parsing stuff ?
that is, only the part generated by a call such as
?
The text was updated successfully, but these errors were encountered: