Make possible for Qt FF create main QGraphicsView outside of XPCOM (ala faststart static UI feature)

RESOLVED FIXED in mozilla10

Status

Core Graveyard
Widget: Qt
RESOLVED FIXED
6 years ago
a year ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
mozilla10
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: inbound)

Attachments

(2 attachments, 5 obsolete attachments)

(Assignee)

Description

6 years ago
In order to fix bug 692479, we should create Qt widget structure before XPCOM created with statically painted fake UI, and when XUL started be able to replace toplevel widget with real nsIWidget.

In order to do that we should make MozQGraphicsView more universal and compilable outside of widget code (in faststartup component)
(Assignee)

Comment 1

6 years ago
Created attachment 566022 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #566022 - Flags: review?(doug.turner)
(Assignee)

Comment 2

6 years ago
I just create IMozQWidget interface which can be used by Static UI widget, and made QGraphicsView based class less dependent on widget/qt internals
(Assignee)

Updated

6 years ago
Blocks: 692479
(Assignee)

Comment 3

6 years ago
Created attachment 566097 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

Always wanted to do this, but now it seems needed. in order to create QApp outside of xpcom, and don't duplicate code
Attachment #566097 - Flags: review?(doug.turner)
(Assignee)

Comment 4

6 years ago
Created attachment 566114 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

Fixed some typos.
Attachment #566097 - Attachment is obsolete: true
Attachment #566097 - Flags: review?(doug.turner)
Attachment #566114 - Flags: review?(doug.turner)
(Assignee)

Comment 5

6 years ago
Comment on attachment 566114 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

ok, this need some more work to do, because we cannot use XRE stuff outside of XPCOM...
Attachment #566114 - Flags: review?(doug.turner)
(Assignee)

Comment 6

6 years ago
Created attachment 566354 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view

Fixed dynamic cast compile problem on maemo5
Attachment #566022 - Attachment is obsolete: true
Attachment #566022 - Flags: review?(doug.turner)
(Assignee)

Comment 7

6 years ago
Created attachment 566355 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance
Attachment #566114 - Attachment is obsolete: true
(Assignee)

Updated

6 years ago
Attachment #566354 - Flags: review?(doug.turner)
(Assignee)

Updated

6 years ago
Attachment #566355 - Flags: review?(doug.turner)
(Assignee)

Comment 8

6 years ago
Comment on attachment 566354 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view

Tatiana could you review this carefully?
Attachment #566354 - Flags: review?(doug.turner) → review?(tanya.meshkova)
(Assignee)

Comment 9

6 years ago
Comment on attachment 566355 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

and this one too
Attachment #566355 - Flags: review?(doug.turner) → review?(tanya.meshkova)
Comment on attachment 566354 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view


> #ifdef MOZ_PLATFORM_MAEMO
>         if (GetShouldAccelerate()) {
>-            newView->setViewport(new QGLWidget());
>+            QGLWidget *glWidget = qobject_cast<QGLWidget*>(newView->viewport());
>+            if (!glWidget) {
>+                newView->setViewport(new QGLWidget());
>+            }

I guess this should go as separate patch and maybe bug.
Also explain why you are trying to reuse existing viewport now.
Comment on attachment 566355 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance


> #if (MOZ_PLATFORM_MAEMO == 6)
>-    QApplication::setStyle(QLatin1String("windows"));
>-    if (!gArgc) {
>-      gArgv[gArgc] = strdup("nsQAppInstance");
>-      gArgc++;
>+    // Should create simple windows style for non chrome process
>+    if (!aDefaultProcess) {
>+      QApplication::setStyle(QLatin1String("windows"));

motif? ;)
Please explain, why it's bad to run with platform default style.

>+    }
>+    if (!aArgc) {
>+      aArgv[aArgc] = strdup("nsQAppInstance");
>+      aArgc++;
>     }
> #endif
>-    sQAppInstance = new QApplication(gArgc, gArgv);
>+    sQAppInstance = new QApplication(aArgc, aArgv);
>+#ifdef MOZ_ENABLE_MEEGOTOUCH
>+    if (aDefaultProcess)
>+    {
>+      gArgv[gArgc] = strdup("-software");
>+      gArgc++;
>+      sMComponentData = new MComponentData(aArgc, aArgv, "", new MApplicationService(""));
>+    }
>+#endif

I guess, these style and -software should be separated together with viewport thing from first patch.
Also explain this -software flag from viewport trick perspective.
Using -software flag together with QGLWidget viewport might confuse.
(Assignee)

Comment 12

6 years ago
Created attachment 567566 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view
Attachment #566354 - Attachment is obsolete: true
Attachment #566354 - Flags: review?(tanya.meshkova)
Attachment #567566 - Flags: review?(tanya.meshkova)
(Assignee)

Comment 13

6 years ago
Created attachment 567570 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

I guess motif style is not available everywhere...
Attachment #566355 - Attachment is obsolete: true
Attachment #566355 - Flags: review?(tanya.meshkova)
Attachment #567570 - Flags: review?(tanya.meshkova)
Attachment #567566 - Flags: review?(tanya.meshkova) → review+
Attachment #567570 - Flags: review?(tanya.meshkova) → review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
(Assignee)

Comment 14

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/09c76e77d57c
https://hg.mozilla.org/integration/mozilla-inbound/rev/b1561460dffb
Keywords: checkin-needed
Whiteboard: inbound
https://hg.mozilla.org/mozilla-central/rev/b1561460dffb
https://hg.mozilla.org/mozilla-central/rev/09c76e77d57c
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.