Bug 94148 - [Qt] Failure to build with --no-inspector
Summary: [Qt] Failure to build with --no-inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Lauro Moura Maranhao Neto
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 14:28 PDT by Lauro Moura Maranhao Neto
Modified: 2012-08-16 23:11 PDT (History)
6 users (show)

See Also:


Attachments
Add guards for inspector usage (1.85 KB, patch)
2012-08-15 14:52 PDT, Lauro Moura Maranhao Neto
no flags Details | Formatted Diff | Diff
Patch (1.86 KB, patch)
2012-08-16 12:25 PDT, Lauro Moura Maranhao Neto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura Maranhao Neto 2012-08-15 14:28:26 PDT
QtWebKit fails to build with --no-inspector.

Output:

/home/lauro/dev/webkit/webkit/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp: In member function 'QUrl QQuickWebViewExperimental::remoteInspectorUrl() const':
/home/lauro/dev/webkit/webkit/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:1334:17: error: 'WebInspectorServer' was not declared in this scope
In file included from /home/lauro/dev/webkit/webkit/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:1953:0:
/home/lauro/dev/webkit/webkit/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:1335:1: error: control reaches end of non-void function [-Werror=return-type]
Comment 1 Lauro Moura Maranhao Neto 2012-08-15 14:52:52 PDT
Created attachment 158640 [details]
Add guards for inspector usage
Comment 2 Jesus Sanchez-Palencia 2012-08-15 15:06:43 PDT
Comment on attachment 158640 [details]
Add guards for inspector usage

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

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:1339
> +    return QUrl();

What about outputting some sort of Warning message saying that this feature is not available due to build options or something like that?
Comment 3 Jocelyn Turcotte 2012-08-16 01:29:04 PDT
Comment on attachment 158640 [details]
Add guards for inspector usage

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

> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:36
> +#if ENABLE(INSPECTOR)

It would be nice to use ENABLE(INSPECTOR_SERVER) to match with ::initInspectorServer in Source/WebKit2/UIProcess/qt/QtWebContext.cpp.
It might then not solve your build issue, if it doesn't you could define ENABLE_INSPECTOR_SERVER in Source/WebKit2/config.h conditionally to ENABLE_INSPECTOR being defined.
Comment 4 Lauro Moura Maranhao Neto 2012-08-16 12:25:31 PDT
Created attachment 158874 [details]
Patch

INSPECTOR_SERVER is disabled by features.prf when INSPECTOR is disabled. Updated patch by replacing it in the guards.
Comment 5 Lauro Moura Maranhao Neto 2012-08-16 12:34:33 PDT
(In reply to comment #2)
> (From update of attachment 158640 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=158640&action=review
> 
> > Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:1339
> > +    return QUrl();
> 
> What about outputting some sort of Warning message saying that this feature is not available due to build options or something like that?

Something like qWarning("WebInspector support is disabled.")?
Comment 6 WebKit Review Bot 2012-08-16 23:10:48 PDT
Comment on attachment 158874 [details]
Patch

Clearing flags on attachment: 158874

Committed r125859: <http://trac.webkit.org/changeset/125859>
Comment 7 WebKit Review Bot 2012-08-16 23:11:12 PDT
All reviewed patches have been landed.  Closing bug.