Bug 34519 - [Qt] Applications using QtWebKit fail to build if Qt was built with -no-script
Summary: [Qt] Applications using QtWebKit fail to build if Qt was built with -no-script
Status: RESOLVED DUPLICATE of bug 52469
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
: 33104 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-03 04:17 PST by Bernhard Rosenkraenzer
Modified: 2011-04-19 05:15 PDT (History)
5 users (show)

See Also:


Attachments
Fix (1.43 KB, patch)
2010-02-03 04:29 PST, Bernhard Rosenkraenzer
hausmann: review-
hausmann: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkraenzer 2010-02-03 04:17:58 PST
If Qt was built with -no-script, applications using QtWebKit (which does work with -no-script) fail to build because qwebframe.h unconditionally does
#include <QtScript/qscriptengine.h>
(which doesn't exist in a -no-script build).
Comment 1 Bernhard Rosenkraenzer 2010-02-03 04:29:51 PST
Created attachment 48013 [details]
Fix

Attaching fix
Comment 2 WebKit Review Bot 2010-02-03 05:12:13 PST
Attachment 48013 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/232341
Comment 3 Bernhard Rosenkraenzer 2010-02-03 12:22:21 PST
Not sure what's causing the build bot failure... The command line from its report shows -DBUILD_WEBKIT is on the command line, and the modification is in

#if !defined(QT_NO_SCRIPT) && !defined(BUILD_WEBKIT)

I only tested the patch for building inside of Qt rather than the separate webkit tree though
Comment 4 Eric Seidel (no email) 2010-02-03 16:18:07 PST
This looks like it fails to build on the Qt Early Warning System (EWS) builder.
Comment 5 Simon Hausmann 2010-02-04 02:49:29 PST
Comment on attachment 48013 [details]
Fix


> +#if !defined(QT_NO_SCRIPT) && !defined(BUILD_WEBKIT)
>      void addToJavaScriptWindowObject(const QString &name, QObject *object, QScriptEngine::ValueOwnership ownership);
> +#endif

Why the check for BUILD_WEBKIT?

Also the Qt EWS bot indicates that this breaks the build because there's the equivalent #ifdef missing in qwebframe.cpp.

(Yay for the EWS :)
Comment 6 Bernhard Rosenkraenzer 2010-02-04 03:03:03 PST
The check for BUILD_WEBKIT is there because at build time (still talking about building QtWebKit inside the Qt tree, not about building it in the standalone tree), QtScript includes are available and the code can actually be built (that's also the reason for the absence of an equivalent ifdef in qwebframe.cpp -- at build time, QScriptEngine::ValueOwnership is availableand therefore it can be built).

The thought behind allowing the 3-arg version of addToJavaScriptWindowObject to be built into the library even with -no-script was to try to preserve binary compatibility between versions built with -no-script and those built without -no-script -- but given the function is not very likely to actually work in -no-script mode, that may have been overly cautious.
Comment 7 Kent Hansen 2010-03-10 06:05:15 PST
*** Bug 33104 has been marked as a duplicate of this bug. ***
Comment 8 Simon Hausmann 2010-05-18 13:21:31 PDT
No update on this bug for a while. This isn't blocking the release anymore, but any patches will be welcomed for inclusion in the release branch :)
Comment 9 Benjamin Poulain 2011-01-30 09:06:55 PST

*** This bug has been marked as a duplicate of bug 52469 ***