Closed martin-ejdestig closed 5 years ago
Thanks Martin! I have only a small objection, about the suppression of warnings for unused parameters: I would prefer if we used something similar to what Qt has:
#define Q_UNUSED(x) (void)x;
The advantage of doing this is that we don't need to complicate the header files, because this is done in the .cpp parts. You can define an UNUSED()
macro at the top of the files, or just write
(void)x; // possibly unused
for each variable. Extra points if you are able to add these lines only when necessary, but it might not be so easy, so no need to waste a lot of time on this.
The pragmas are not put in the headers. But I will replace them with a cast without a macro (more local).
Found another warning (catch by value) when testing properties and added a fix for that as well.
Oh, one thing I am wondering about is what the empty:
void {{ class_name_with_namespace }}::{{ prop.name }}_set_finish(const Glib::RefPtr
is about. Noticed it was empty when commenting out "res". Should it just be removed? Or why is it there if it is just empty and not abstract? Unsure if it is a mistake or left over to be backwards compatible.
So, apparently the proxy object inherits from Glib::ObjectBase but does not wrap a GObject. Updated "templates: fix hiding of overloaded virtual function warnings" commit.
I have fiddled around a bunch with trying to get whitespacing right. This was the best I could do. There is still a missing \n in the generated code before the common.pragma_warnings_pop block. Perhaps someone can clue me in on why that is removed.