Bug 36270

Summary: [Qt] QtLauncher needs an option to Enable/Disable a QGLWidget as Viewport
Product: WebKit Reporter: Jesus Sanchez-Palencia <jesus>
Component: Tools / TestsAssignee: Jesus Sanchez-Palencia <jesus>
Status: CLOSED FIXED    
Severity: Normal CC: hausmann, ossy
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 35303, 35784    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch hausmann: review+

Description Jesus Sanchez-Palencia 2010-03-17 20:09:08 PDT
[Qt] QtLauncher needs an option to Enable/Disable a QGLWidget as Viewport
Comment 1 Jesus Sanchez-Palencia 2010-03-17 20:17:07 PDT
Created attachment 50999 [details]
Patch
Comment 2 Simon Hausmann 2010-03-18 00:24:53 PDT
Comment on attachment 50999 [details]
Patch

No general objections, but this needs to be #ifdef, as it breaks the build with Qt configuration where there is no OpenGL support. Symbian is one of those platforms where OpenGL is not available.
Comment 3 Jesus Sanchez-Palencia 2010-03-18 08:16:01 PDT
Created attachment 51024 [details]
Patch
Comment 4 Jesus Sanchez-Palencia 2010-03-18 08:19:59 PDT
(In reply to comment #3)
> Created an attachment (id=51024) [details]
> Patch

Thanks for the review. :)

I didn't find any macro or global define on Qt's 4.7 documentation to handle this, so what I did was just to ensure that we are not building on Symbian.

Is that ok?
Comment 5 Simon Hausmann 2010-03-19 00:53:46 PDT
Comment on attachment 51024 [details]
Patch

I'm sorry, I should've been more specific :(. I didn't mean to disable OpenGl for S60 but when it's not enabled in Qt in general. S60 was just an example.

For example it's not unusual that Qt fo Embedded Linux is compiled without OpenGL support, too.

You can verify that OpenGL support is available in the .pro file using

contains(QT_CONFIG, opengl) {
    do opengl things
}

In addition there's a QT_NO_OPENGL define set when Qt is configured without OpenGL support.
Comment 6 Jesus Sanchez-Palencia 2010-03-23 11:40:07 PDT
Created attachment 51442 [details]
Patch
Comment 7 Jesus Sanchez-Palencia 2010-03-23 11:45:21 PDT
(In reply to comment #5)
> (From update of attachment 51024 [details])
> I'm sorry, I should've been more specific :(. I didn't mean to disable OpenGl
> for S60 but when it's not enabled in Qt in general. S60 was just an example.

I'm sorry that I didn't understand it correctly at first place. :)

> You can verify that OpenGL support is available in the .pro file using
> 
> contains(QT_CONFIG, opengl) {
>     do opengl things
> }
> 
> In addition there's a QT_NO_OPENGL define set when Qt is configured without
> OpenGL support.

Thanks for the tips! I didn't find this QT_NO_OPENGL define documented anywhere besides Qt src itself, so I sticked to the .pro approach.
Comment 8 Csaba Osztrogonác 2010-03-23 12:10:44 PDT
Attachment 51442 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/1087005
Comment 9 Jesus Sanchez-Palencia 2010-03-23 13:16:20 PDT
Created attachment 51447 [details]
Patch

Trying to fix the build failure.
Comment 10 Jesus Sanchez-Palencia 2010-03-26 06:00:50 PDT
Rebased and Committed as r56618 by Antonio.
Thanks!
Comment 11 Simon Hausmann 2010-03-26 08:42:46 PDT
cherry-pick-for-backport: <r56618>
Comment 12 Simon Hausmann 2010-03-26 08:45:38 PDT
Revision r56618 cherry-picked into qtwebkit-2.0 with commit 8221def16a71a7ec51d582ce69f1bfdd6bab8a18