aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickwidgets/qquickwidget_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Lazy create QmlEngine on accessing rootContextAllan Sandfeld Jensen2016-06-271-2/+2
| | | | | | | | | A common usecase appears to be to set variables in the rootContext before loading a url in a QQuickWidget. We there need to ensure there is a QmlEngine to set variables on when this is attempted. Change-Id: I07aff2104313eeb3fab902ea3c6043c3c82c50f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Create QmlEngine lazy in case one is not neededAllan Sandfeld Jensen2016-06-241-0/+1
| | | | | | | | | QQuickWidget may be used with just a root item, and won't need a QmlEngine in that case. So if one isn't given to the constructor, only create one when one is needed for evaluating source. Change-Id: I96cfe5e2473d5d53fc2d52d4646d36c43f4ccb8a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-181-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv4debugservice.cpp src/qml/jsruntime/qv4value_inl_p.h src/qml/jsruntime/qv4value_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/qml/qqmlnotifier_p.h src/qml/qml/qqmlproperty.cpp src/quick/items/qquickflickable.cpp src/quick/items/qquicktextedit.cpp tests/auto/quick/qquickwindow/BLACKLIST The extra changes in qqmlbinding.cpp are ported from changes to qqmlproperty.cpp that occurred in parallel with writeBinding() being moved to qqmlbinding.cpp. Change-Id: I16d1920abf448c29a01822256f52153651a56356
| * Consistently use the override keywordThiago Macieira2015-07-191-2/+2
| | | | | | | | | | | | | | Clang doesn't like when it's inconsistent. Change-Id: Ib306f8f647014b399b87ffff13f23eebda07757b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Avoid multisampled contexts in QQuickWidgetLaszlo Agocs2015-08-041-0/+2
|/ | | | | | | | | | Like with QOpenGLWidget, not requesting a multisampled context unnecessarily avoids crashing with Mesa/Intel/EGL (f.ex. in the qquickviewcomparison example when enabling multisampling). Task-number: QTBUG-47509 Change-Id: Ia22110332f639a238cfb3b2c36916f65c00a7bbc Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-161-1/+1
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qv4profilerservice/qv4profilerservice.pro tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler.pro Change-Id: I76d87e3df97ebdba902ca3d7488c1582eca2a83c
| * Use qt_subtract_from_timeout instead of duplicating qt_timeout_valueDaniel Teske2015-04-141-1/+1
| | | | | | | | | | | | | | | | The same function was duplicated 5 times in qtbase, so create one copy to rule them all and use it also in QtDeclarative. Change-Id: I4e39a7ee0541ce4fe9710cea344e537ee011bbe9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Match the offscreen windows position to the QQuickWidget position.Christian Strømme2015-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | The position of the offscreen window would always be set to 0,0, making it impossible to get the actual position of the scene. With this change, it will be possible for child windows or items in the scene to correctly calculate their global position. Change-Id: Ibd3ff03880209047776e86ad889b40cbf79c3e6e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-121-7/+7
|/ | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Input method support for QQuickWidgetPaul Olav Tvete2014-12-111-0/+2
| | | | | | | | | | Make sure QGuiApplication::focusObject() returns the QQuickItem that has focus, and forward input method events. Task-number: QTBUG-42677 Change-Id: Ic07f93a2529c3dde67272b489bdc61fd25582a69 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Recreate the fbo on screen change in QQuickWidget when neededLaszlo Agocs2014-09-231-0/+1
| | | | | | | | | | | | Move the rendering code out into a separate function since it is now called from three places. Like in QOpenGLWidget, the FBO may need to be recreated with a different size in case the window is moved onto a screen with a different device pixel ratio. Change-Id: Iaaa42a06dab9e02710b0a7dafb0ea8c018b69ec2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Finish render() support for QQuickWidgetLaszlo Agocs2014-08-111-0/+1
| | | | | | | | | The enablers are already in. Now we just need to use the virtual in QQuickWidgetPrivate and test it. Task-number: QTBUG-39562 Change-Id: I1faf5a0a244ba4169fb8f9b0dae657304038b60e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Rename QQuickRenderControl::stop() to invalidate()Laszlo Agocs2014-08-071-1/+1
| | | | | | | To be consistent. Change-Id: Ia78bf4a27e8ccb1a4f0a44865e810f1070c39e5d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add support for multisampling in QQuickWidgetLaszlo Agocs2014-06-061-0/+1
| | | | | | | | | | | | | | | | | Use a multisampled fbo when the requested format has samples > 0. Resolving happens after each rendering of the scene. The blit to the temporary non-multisampled fbo could be avoided, in theory, by sending the fbo instead of the texture id down the stack and performing a blit directly to fbo #0. This however involves a number of potential issues, for example due to the non-sharability of FBOs between contexts. Hence it is left as a future exercise. Task-number: QTBUG-39187 Change-Id: Iae98b969bcbc3bb57e6d73288496f5428913c826 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix QQuickWidget offscreen surface format and creation orderLaszlo Agocs2014-06-051-1/+0
| | | | | | | | | | | | | | | | | | | Create the QOffscreenSurface together with, and after, the QOpenGLContext. This is essential to get a surface that is compatible with the context and is in line with the QOffscreenSurface usage recommendation from the docs. Otherwise, if the offscreen surface gets created first, without knowing what _actual_ format (e.g. EGL configuration) the context will use, the result is an incompatible surface and context on systems that offer a different set of configurations for window and pbuffer surfaces. This fixes QQuickWidget on EGL implementations that offer both 16 and 24 bit pbuffer configs, but only 24 (or 32) bit window configs. Task-number: QTBUG-39474 Change-Id: I43925d2b25e28d26d172ce9d22651c25b281b832 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix QQuickWidget cleanup and invalidation sequenceLaszlo Agocs2014-06-031-0/+1
| | | | | | | | | Make sure the context/surface are still alive and current while destroying the render control. Task-number: QTBUG-39034 Change-Id: I6ff0069985a9121a63025bfb165493b3f003391d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QQuickWidget: Fix SizeViewToRootObjectPaul Olav Tvete2014-03-191-1/+1
| | | | | | | | | There were two problems: 1) QWidget does not have a default size of (0,0) or (1,1), but uses WA_Resized. 2) event() would eat timer events without checking the timerId. Change-Id: I355acbb10d3d5073e117c29de18bb94857881141 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add surface format to QQuickWidget.Laszlo Agocs2014-03-181-0/+1
| | | | | Change-Id: Id72a042588e37832a0d3757bad935c531ef8275a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Consolidate context creation failure handling in Quick.Friedemann Kleint2014-03-131-0/+1
| | | | | | | | | Add QQuickWidget::sceneGraphError() equivalent to QQuickWindow::sceneGraphError(), move message formatting code to QQuickWindowPrivate. Change-Id: I18cd4d7e0f6ee1011c29375218dc6a044b0d2cf2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickWidget: handle resize to empty sizePaul Olav Tvete2014-03-101-0/+1
| | | | | | | | | | | Resizing to an empty size needs to be handled as if the widget was hidden. Restoring to a non-empty size is like a show, except that we are rendering synchronously. Task-number: QTBUG-37046 Change-Id: I572e4763c4a28bfe7347868e109acca5b357db50 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QQuickWidget: handle windowChangePaul Olav Tvete2014-03-071-1/+3
| | | | | | | | When the toplevel window changes, QQuickWidget needs to recreate the context so it is compatible with the new window. Change-Id: Ic7c3410061a33f223e20e3d1f93437917abcff18 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickWidget: make sure to use the proper GL formatPaul Olav Tvete2014-03-071-0/+2
| | | | | | | | | | We cannot be sure that the toplevel widget has the correct GL format, and we do not want to force depth and stencil buffers on surfaces that do not need them. Therefore, we have to create an offscreen surface for the FBO. Change-Id: I7dfc3a6f84bf79125f3ab811a204972e95e245a3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Introducing QQuickWidgetLars Knoll2014-02-171-0/+117
Renders into an FBO, and provides a texture that is composed by the QPA/widget kernel compositor. Also introducing QQuickRenderControl, which is private API for now. Change-Id: I710c16e1506124a17f91e87344496471803a448b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>