Closed Bug 693422 Opened 13 years ago Closed 13 years ago

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

Categories

(Core Graveyard :: Widget: Qt, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla10

People

(Reporter: romaxa, Assigned: romaxa)

References

Details

(Whiteboard: inbound)

Attachments

(2 files, 5 obsolete files)

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: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #566022 - Flags: review?(doug.turner)
I just create IMozQWidget interface which can be used by Static UI widget, and made QGraphicsView based class less dependent on widget/qt internals
Blocks: 692479
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)
Fixed some typos.
Attachment #566097 - Attachment is obsolete: true
Attachment #566097 - Flags: review?(doug.turner)
Attachment #566114 - Flags: review?(doug.turner)
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)
Fixed dynamic cast compile problem on maemo5
Attachment #566022 - Attachment is obsolete: true
Attachment #566022 - Flags: review?(doug.turner)
Attachment #566114 - Attachment is obsolete: true
Attachment #566354 - Flags: review?(doug.turner)
Attachment #566355 - Flags: review?(doug.turner)
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)
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.
Attachment #566354 - Attachment is obsolete: true
Attachment #566354 - Flags: review?(tanya.meshkova)
Attachment #567566 - Flags: review?(tanya.meshkova)
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+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b1561460dffb
https://hg.mozilla.org/mozilla-central/rev/09c76e77d57c
Status: ASSIGNED → RESOLVED
Closed: 13 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.

Attachment

General

Created:
Updated:
Size: