Last Comment Bug 693422 - Make possible for Qt FF create main QGraphicsView outside of XPCOM (ala faststart static UI feature)
: Make possible for Qt FF create main QGraphicsView outside of XPCOM (ala fasts...
Status: RESOLVED FIXED
inbound
:
Product: Core
Classification: Components
Component: Widget: Qt (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: mozilla10
Assigned To: Oleg Romashin (:romaxa)
:
Mentors:
Depends on:
Blocks: 692479
  Show dependency treegraph
 
Reported: 2011-10-10 13:31 PDT by Oleg Romashin (:romaxa)
Modified: 2011-10-18 05:43 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Prepare Qt-nsWindow/Widget for fast startup static view (27.48 KB, patch)
2011-10-10 13:50 PDT, Oleg Romashin (:romaxa)
no flags Details | Diff | Review
Move QApp/Meego stuff into common place nsQAppInstance (6.44 KB, patch)
2011-10-10 17:54 PDT, Oleg Romashin (:romaxa)
no flags Details | Diff | Review
Move QApp/Meego stuff into common place nsQAppInstance (6.63 KB, patch)
2011-10-10 20:27 PDT, Oleg Romashin (:romaxa)
no flags Details | Diff | Review
Prepare Qt-nsWindow/Widget for fast startup static view (27.48 KB, patch)
2011-10-11 14:28 PDT, Oleg Romashin (:romaxa)
no flags Details | Diff | Review
Move QApp/Meego stuff into common place nsQAppInstance (6.68 KB, patch)
2011-10-11 14:28 PDT, Oleg Romashin (:romaxa)
no flags Details | Diff | Review
Prepare Qt-nsWindow/Widget for fast startup static view (27.02 KB, patch)
2011-10-17 13:52 PDT, Oleg Romashin (:romaxa)
tanya.meshkova: review+
Details | Diff | Review
Move QApp/Meego stuff into common place nsQAppInstance (7.24 KB, patch)
2011-10-17 14:04 PDT, Oleg Romashin (:romaxa)
tanya.meshkova: review+
Details | Diff | Review

Description Oleg Romashin (:romaxa) 2011-10-10 13:31:40 PDT
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)
Comment 1 Oleg Romashin (:romaxa) 2011-10-10 13:50:48 PDT
Created attachment 566022 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view
Comment 2 Oleg Romashin (:romaxa) 2011-10-10 13:52:00 PDT
I just create IMozQWidget interface which can be used by Static UI widget, and made QGraphicsView based class less dependent on widget/qt internals
Comment 3 Oleg Romashin (:romaxa) 2011-10-10 17:54:40 PDT
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
Comment 4 Oleg Romashin (:romaxa) 2011-10-10 20:27:39 PDT
Created attachment 566114 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

Fixed some typos.
Comment 5 Oleg Romashin (:romaxa) 2011-10-11 01:29:43 PDT
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...
Comment 6 Oleg Romashin (:romaxa) 2011-10-11 14:28:05 PDT
Created attachment 566354 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view

Fixed dynamic cast compile problem on maemo5
Comment 7 Oleg Romashin (:romaxa) 2011-10-11 14:28:39 PDT
Created attachment 566355 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance
Comment 8 Oleg Romashin (:romaxa) 2011-10-17 11:12:57 PDT
Comment on attachment 566354 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view

Tatiana could you review this carefully?
Comment 9 Oleg Romashin (:romaxa) 2011-10-17 11:13:23 PDT
Comment on attachment 566355 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

and this one too
Comment 10 Tatiana Meshkova (:tatiana) 2011-10-17 13:30:03 PDT
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 11 Tatiana Meshkova (:tatiana) 2011-10-17 13:43:28 PDT
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.
Comment 12 Oleg Romashin (:romaxa) 2011-10-17 13:52:58 PDT
Created attachment 567566 [details] [diff] [review]
Prepare Qt-nsWindow/Widget for fast startup static view
Comment 13 Oleg Romashin (:romaxa) 2011-10-17 14:04:50 PDT
Created attachment 567570 [details] [diff] [review]
Move QApp/Meego stuff into common place nsQAppInstance

I guess motif style is not available everywhere...

Note You need to log in before you can comment on or make changes to this bug.