Bug 36538 - [Qt] Add mechanism to detect QtWebKit 2.0 via the preprocessor
Summary: [Qt] Add mechanism to detect QtWebKit 2.0 via the preprocessor
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Diego Gonzalez
URL:
Keywords: Qt
Depends on:
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-03-24 09:43 PDT by Simon Hausmann
Modified: 2010-04-07 00:30 PDT (History)
9 users (show)

See Also:


Attachments
Proposed patch (1.71 KB, patch)
2010-03-29 13:14 PDT, Diego Gonzalez
no flags Details | Formatted Diff | Diff
Changed to use QT_WEBKIT_VERSION (1.74 KB, patch)
2010-04-01 13:56 PDT, Diego Gonzalez
no flags Details | Formatted Diff | Diff
Using QTWEBKIT (1.73 KB, patch)
2010-04-06 07:01 PDT, Diego Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hausmann 2010-03-24 09:43:32 PDT
We need a #define in qtwebkitglobal.h that contains the version of QtWebKit, so that application developers can detect it.
Comment 1 Kenneth Rohde Christiansen 2010-03-24 12:21:01 PDT
We might need to change our User Agent as well as it currently shows the Qt version. I do not know if this still makes sense.
Comment 2 Diego Gonzalez 2010-03-29 13:14:40 PDT
Created attachment 51957 [details]
Proposed patch

Is something like this patch the required?
Comment 3 Simon Hausmann 2010-03-30 08:16:01 PDT
Comment on attachment 51957 [details]
Proposed patch

Thanks Diego!!
Comment 4 Simon Hausmann 2010-03-30 08:17:14 PDT
Jocelyn, Tor Arne: Would be great if you could double check this trivial patch. Thanks :)

I recall discussing the name/location of this macro, but it doesn't hurt to double check.
Comment 5 Jocelyn Turcotte 2010-03-30 11:19:37 PDT
(In reply to comment #4)
> Jocelyn, Tor Arne: Would be great if you could double check this trivial patch.
> Thanks :)
> 
> I recall discussing the name/location of this macro, but it doesn't hurt to
> double check.

I remember having a concern about the ambiguity of QtWebKit's version vs. WebKit's version.
The function to get the WebKit's version is called qWebKitVersion().

I would prefer these macros to be called QTWEBKIT_VERSION, QT_WEBKIT_VERSION, QQTWEBKIT_VERSION or QWEBKIT_QTWEBKIT_VERSION instead of QWEBKIT_VERSION.
Comment 6 Diego Gonzalez 2010-03-30 17:07:50 PDT
> I would prefer these macros to be called QTWEBKIT_VERSION, QT_WEBKIT_VERSION,
> QQTWEBKIT_VERSION or QWEBKIT_QTWEBKIT_VERSION instead of QWEBKIT_VERSION.

So, in this case I vote for QT_WEBKIT_VERSION. What do you thing guys?
Comment 7 Diego Gonzalez 2010-04-01 13:56:22 PDT
Created attachment 52331 [details]
Changed to use QT_WEBKIT_VERSION

using QT_WEBKIT_VERSION
Comment 8 Eric Seidel (no email) 2010-04-01 15:57:32 PDT
Comment on attachment 51957 [details]
Proposed patch

Looks like there was a new version of this patch posted.  Obsoleting this one.
Comment 9 Diego Gonzalez 2010-04-06 07:01:09 PDT
Created attachment 52632 [details]
Using QTWEBKIT
Comment 10 WebKit Commit Bot 2010-04-06 10:29:45 PDT
Comment on attachment 52632 [details]
Using QTWEBKIT

Clearing flags on attachment: 52632

Committed r57155: <http://trac.webkit.org/changeset/57155>
Comment 11 WebKit Commit Bot 2010-04-06 10:29:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Simon Hausmann 2010-04-07 00:30:31 PDT
Revision r57155 cherry-picked into qtwebkit-2.0 with commit ce3cdb4157cea4f4d80e6498307ea65de2c36b93