Bug 67098 - [GTK] introspection: fix some gtk-doc annotations
: [GTK] introspection: fix some gtk-doc annotations
Status: UNCONFIRMED
Product: WebKit
Classification: Unclassified
Component: WebKit Gtk
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-28 20:00 PDT by Diego Escalante Urrelo
Modified: 2013-04-25 09:37 PDT (History)
2 users (show)

See Also:


Attachments
fix some gtk-doc annotations (5.73 KB, patch)
2011-08-28 20:06 PDT, Diego Escalante Urrelo
mrobinson: review-
Details | Formatted Diff | Diff
updated patch: fix gtk-doc annotations (6.55 KB, patch)
2012-02-15 17:33 PST, Diego Escalante Urrelo
pnormand: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Escalante Urrelo 2011-08-28 20:00:25 PDT
some small nitpicks i hit while trying to fix bug #67097
Comment 1 Diego Escalante Urrelo 2011-08-28 20:06:50 PDT
Created attachment 105455 [details]
fix some gtk-doc annotations

more annotations need some love in the build:

Source/WebKit/gtk/webkit/webkitwebview.cpp:4171: Warning: WebKit: webkit_web_view_select_all: unknown parameter 'webView' in documentation comment, should be 'web_view'
Source/WebKit/gtk/webkit/webkitwebview.cpp:4100: Warning: WebKit: webkit_web_view_cut_clipboard: unknown parameter 'webView' in documentation comment, should be 'web_view'
Source/WebKit/gtk/webkit/webkitwebview.cpp:4114: Warning: WebKit: webkit_web_view_copy_clipboard: unknown parameter 'webView' in documentation comment, should be 'web_view'
Source/WebKit/gtk/webkit/webkitwebview.cpp:4128: Warning: WebKit: webkit_web_view_paste_clipboard: unknown parameter 'webView' in documentation comment, should be 'web_view'
Source/WebKit/gtk/webkit/webkitwebview.cpp:4693: Warning: WebKit: webkit_web_view_undo: unknown parameter 'webView' in documentation comment, should be 'web_view'
Source/WebKit/gtk/webkit/webkitwebview.cpp:4728: Warning: WebKit: webkit_web_view_redo: unknown parameter 'webView' in documentation comment, should be 'web_view'
Source/WebKit/gtk/webkit/webkitspellchecker.cpp:42: Warning: WebKit: webkit_spell_checker_check_spelling_of_string: unknown parameter 'string' in documentation comment, should be one of 'checker', 'word', 'misspelling_location', 'misspelling_length'


^^^ These seem to be a bug in g-i confusing signals with functions, ignoring for now.

<unknown>:: Warning: WebKit: (ErrorQuarkFunction)network_error_quark: context=ErrorQuarkFunction('network_error_quark') webkit_network_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit: (ErrorQuarkFunction)policy_error_quark: context=ErrorQuarkFunction('policy_error_quark') webkit_policy_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit: (ErrorQuarkFunction)plugin_error_quark: context=ErrorQuarkFunction('plugin_error_quark') webkit_plugin_error_quark: Couldn't find corresponding enumeration

Source/WebKit/gtk/webkit/webkitglobals.cpp:261: Warning: WebKit: webkit_get_text_checker: return value: Missing (transfer) annotation
Source/WebKit/gtk/webkit/webkitwebframe.cpp:704: Warning: WebKit: webkit_web_frame_get_global_context: return value: Unresolved type: 'JSGlobalContextRef'
Source/WebKit/gtk/webkit/webkitwebframe.cpp:1008: Warning: WebKit: webkit_web_frame_get_range_for_word_around_caret: return value: Missing (transfer) annotation
DerivedSources/webkit/WebKitDOMEventTarget.h:62: Warning: WebKit: webkit_dom_event_target_add_event_listener: argument handler: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
DerivedSources/webkit/WebKitDOMEventTarget.h:68: Warning: WebKit: webkit_dom_event_target_remove_event_listener: argument handler: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)


^^^ Someone who actually knows that code should add a transfer annotation.
Comment 2 Martin Robinson 2011-08-30 09:40:27 PDT
Comment on attachment 105455 [details]
fix some gtk-doc annotations

View in context: https://bugs.webkit.org/attachment.cgi?id=105455&action=review

> Source/WebKit/gtk/webkit/webkitwebplugin.h:56
> -typedef struct _WebKitWebPluginMIMEType {
> +struct _WebKitWebPluginMIMEType {
>      char* name;
>      char* description;
>      char** extensions;
> -} WebKitWebPluginMIMEType;
> +};
>  

I don't understand how this works if you remove the typedef. How can you refer to WebKitWebPluginMIMEType when you're using the API?
Comment 3 Diego Escalante Urrelo 2011-09-02 19:15:24 PDT
(In reply to comment #2)
> (From update of attachment 105455 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=105455&action=review
> 
> > Source/WebKit/gtk/webkit/webkitwebplugin.h:56
> > -typedef struct _WebKitWebPluginMIMEType {
> > +struct _WebKitWebPluginMIMEType {
> >      char* name;
> >      char* description;
> >      char** extensions;
> > -} WebKitWebPluginMIMEType;
> > +};
> >  
> 
> I don't understand how this works if you remove the typedef. How can you refer to WebKitWebPluginMIMEType when you're using the API?

Damn, I made a mistake with git add. The other half of this is in bug #67097. I'll attach new patches.
Comment 4 Diego Escalante Urrelo 2012-02-15 17:33:20 PST
Created attachment 127282 [details]
updated patch: fix gtk-doc annotations

Here is another patch, updated for a much more recent master.

The warnings are not life or death, but I guess it is better to shut them up.

I could not resolve this ones:

Source/WebKit/gtk/webkit/webkitversion.h:33: Warning: WebKit: symbol='WEBKITGTK_API_VERSION': Unknown namespace for symbol 'WEBKITGTK_API_VERSION'

<unknown>:: Warning: WebKit: (ErrorQuarkFunction)network_error_quark: context=ErrorQuarkFunction('network_error_quark') webkit_network_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit: (ErrorQuarkFunction)policy_error_quark: context=ErrorQuarkFunction('policy_error_quark') webkit_policy_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit: (ErrorQuarkFunction)plugin_error_quark: context=ErrorQuarkFunction('plugin_error_quark') webkit_plugin_error_quark: Couldn't find corresponding enumeration

Source/WebKit/gtk/webkit/webkitwebframe.cpp:832: Warning: WebKit: webkit_web_frame_get_global_context: return value: Unresolved type: 'JSGlobalContextRef'

DerivedSources/webkit/WebKitDOMCustom.h:32: Warning: WebKit: webkit_dom_blob_slice: return value: Missing (transfer) annotation
DerivedSources/webkit/WebKitDOMEventTarget.h:62: Warning: WebKit: webkit_dom_event_target_add_event_listener: argument handler: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
DerivedSources/webkit/WebKitDOMEventTarget.h:68: Warning: WebKit: webkit_dom_event_target_remove_event_listener: argument handler: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
Comment 5 Claudio Saavedra 2013-04-24 00:20:25 PDT
Is this patch still useful?
Comment 6 Alberto Garcia 2013-04-24 23:06:48 PDT
I'm getting a build error because of this:

  GEN    WebKit2-3.0.gir

(process:9420): GLib-GObject-CRITICAL **: g_object_class_install_property: assertion `class->set_property != NULL' failed
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)network_error_quark: context=ErrorQuarkFunction('network_error_quark') webkit_network_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)policy_error_quark: context=ErrorQuarkFunction('policy_error_quark') webkit_policy_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)plugin_error_quark: context=ErrorQuarkFunction('plugin_error_quark') webkit_plugin_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)download_error_quark: context=ErrorQuarkFunction('download_error_quark') webkit_download_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)print_error_quark: context=ErrorQuarkFunction('print_error_quark') webkit_print_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)javascript_error_quark: context=ErrorQuarkFunction('javascript_error_quark') webkit_javascript_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)snapshot_error_quark: context=ErrorQuarkFunction('snapshot_error_quark') webkit_snapshot_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit2: (ErrorQuarkFunction)favicon_database_error_quark: context=ErrorQuarkFunction('favicon_database_error_quark') webkit_favicon_database_error_quark: Couldn't find corresponding enumeration
<unknown>:: Fatal: WebKit2: warnings configured as fatal
<unknown>:: Fatal: WebKit2: warnings configured as fatal

make[1]: *** [WebKit2-3.0.gir] Error 1
Comment 7 Alberto Garcia 2013-04-25 09:37:46 PDT
(In reply to comment #6)
> I'm getting a build error because of this:

This seems to be a g-i bug:

https://bugzilla.gnome.org/show_bug.cgi?id=656506