aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow_p.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | QQuickWindow: keep a collection of devices which own event instancesShawn Rutledge2016-07-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That will allow the event instances to hold state, even between events. So now every QQuickWindow has its own set of them, per device. Hopefully that means we won't have any trouble delivering events in parallel in case each window has its own thread. Otherwise maybe it's slightly wasteful in multi-window apps. Change-Id: I766b580e1c177255905cc04b5de7d33ae503c6fd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Add pointerTargets to determine list of items at a positionFrederik Gladhorn2016-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: If4e040063f0141ef745a4ee335cdec0640a73c64 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Re-factor deliverInitialMousePressFrederik Gladhorn2016-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use pointerTargets to get a list of relevant QQuickItems, try delivering the event to them. Change-Id: Ib45f05ce84181c9a0c092dbc255f75e5f1f220af Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | qquickwindow_p.h: group and sort the forward declarationsShawn Rutledge2016-07-131-14/+10
| | | | | | | | | | | | | | | | | | | | Change-Id: I3e260b592174254ce7b2fdc1b7c205cbca0babd1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Sort pointer event delivery functionsFrederik Gladhorn2016-07-131-6/+13
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib21a2c4f762a53f2f1d386a40380a68a5383dbe3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | deliver touch events as QQuickPointerEventsShawn Rutledge2016-07-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickPointerEvent::touchEventForItem should replace QQuickWindow::touchEventWithPoints, but the latter is still called from one place. This can be fixed when we redo parent-filtering using a presorted delivery list. Change-Id: I350a912a9801294d4f44d3d56b53fe3be5302a60 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Move delivery of pointer event into deliverTouchEventFrederik Gladhorn2016-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ie014105668e6cbba60203af988948249e2e0228c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Generalize the touchRecursionGuard to pointer eventsFrederik Gladhorn2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we want to do mouse event compression, this makes sense. It's also a small step towards more unified event delivery. Change-Id: Ia889e21ce2834ef4fa26b4c5906cbce04850bf38 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | PointerEvents: start unified delivery code pathFrederik Gladhorn2016-07-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This really does nothing but join all incoming events, package them into pointer events and then unpack them to send them on their separate ways again. Change-Id: Iad87b86051963c064d7a41d9a64b4551efe1f039 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | Simplify parameters to QQuickPointerEvent::resetFrederik Gladhorn2016-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need the device passed in, but can infer it. Change-Id: I95479493431f8ca8047bcf124c295081d4895d6c Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | QQuickWindow: add QQuickPointerDevice instances for pointer eventsShawn Rutledge2016-07-071-0/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | The device objects are long-lived; every QQuickPointerEvent needs a pointer to one of them. Change-Id: I39e4b8ddefd4a62521c7837c4bafb84ee13ce519 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Move touch event compression into a functionFrederik Gladhorn2016-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | This makes it easier to understand what's going on. Change-Id: I7846178d791b12fc3b78a5790419fe7fb32601f2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge mouse handling functionsFrederik Gladhorn2016-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to clean up the pointer input handling in Qt Quick, handle all mouse events in one place. Keep the functions in QQuickWindow to allow overriding them. Change-Id: Id413d440a5ea1a77cc7b9b135790e776a7c554bf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickWindowPrivate::removeGrabber: take params for mouse and touchShawn Rutledge2016-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickItem::ungrabTouchPoints() wasn't intended to ungrab mouse and QQuickItem::ungrabMouse() wasn't intended to ungrab touch. This seems to make the tests more likely to pass. Change-Id: I2d39028dc8267b7c8b0e1bac721f1a12014f0b25 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | add QQuickWindowPrivate::removeGrabber()Shawn Rutledge2016-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to eventually avoid accessing QQuickWindowPrivate's own variables inside QQuickItemPrivate, and to use itemForTouchPointId instead of mouseGrabberItem. PinchArea relies on some strange behavior: when one touch point is released, it ungrabs the mouse, but keeps the touch point grab. This seems somewhat inconsistent, but for now we keep one place (QQuickItem::ungrabMouse) that does the mouse ungrab only. Change-Id: I46389475da2ecb157508e092f9f3f0cf923881e3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Minor touch event function renamingFrederik Gladhorn2016-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename reallyDeliverTouchEvent back to deliverTouchEvent. To have one entry point for the whole touch handling, have a single function which already didn't call itself recursively: handleTouchEvent. That function optionally compresses and calls deliverTouchEvent. Change-Id: Id3624d3a2ee041cf07b47da36bb3fbb80886a676 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-301-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quickwidgets/qquickwidget.cpp tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp Change-Id: Idf279cb88e0df2a383489af5b6afdf04d04ae611
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-291-2/+0
| |\| | | | | | | | | | Change-Id: I70c0c672708522f7157849365cc53ee271d8e460
| | * Remove misleading out of date comments in QQuickWindowPrivateLaszlo Agocs2016-06-231-2/+0
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-54133 Change-Id: I68e41c3d6c066745058db0c15984d680d6c05ee9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | QQuickWindow: Process a synthetic hover once per frameRobin Burchell2016-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the limitation that hover only changes when the mouse moves, and (in my opinion) is required to make hover functionality even remotely useful. QtQuick scenes are a dynamic medium, items can move (or change) frequently, so only changing this in response to a user action means it will frequently end up out of date. A very simple example of this is a ListView of delegates that each have a background set on hover: when flicking the list, it won't reset the hover to actually match the item under the mouse. This is now not a (very) expensive operation to do, as deliverHoverEvent does nothing if the item tree in question doesn't have hover enabled. [ChangeLog][QtQuick][MouseArea] Hover state is now updated once per frame. This means that MouseArea::containsMouse property will now be correct even if the mouse is not moving, but items move under the cursor. Likewise the mouse position properties and positionChanged signal will act as if the mouse had moved. Task-number: QTBUG-40475 Task-number: QTBUG-42194 Task-number: QTBUG-33982 Task-number: QTBUG-42578 Task-number: QTBUG-52537 Change-Id: Ic2dcbb45339e11c07f5c6a9c95eb7f64957968eb Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | QQuickWindow: prerequisites for handling multi-point touchShawn Rutledge2016-03-071-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In touchEventForItem, we want to include only touchpoints that occur inside the target item if the touchpoint is freshly pressed; but if the touchpoint is being updated or released, in most cases we want to keep sending it to the same item, because the item must be able to change state. But in sendFilteredTouchEvent, we need to check the bounds of all touchpoints. Making touchEventForItem and touchEventWithPoints static also avoids needing to get the QQuickWindowPrivate instance, since these functions do not use any private data. And we will need a version of dragOverThreshold which works with TouchPoints since it doesn't share a common ancestor class with QMouseEvent. Change-Id: I022c6bcf36382741b31baeb020d3104d502a11e8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-191-0/+3
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp tests/auto/quick/qquickgridview/tst_qquickgridview.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I3cf47faa2fe567d62fffd985aeecbefe5811cc42
| * Rerender natively rendered text items when DPI scaling changes.Andreas Hartmetz2016-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whole purpose of native rendering is to optimize precisely for a given pixel grid. DPI scaling can change when either settings of the current screen are changed, or when the window is moved to a different screen. Details: - add an ItemDevicePixelRatioHasChanged item change event - detect DPI scaling changes by watching screen (identity) and screen config changes - when DPI scaling changes, recursively send an ItemDevicePixelRatioHasChanged signal to all items with content - when a natively renderet TextItem catches such an event, call updateLayout() which automatically picks up the new logical DPI Task-number: QTBUG-49019 Change-Id: I9f4f8d1a7f2c172ed26c276294ab143161c4a48b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-0/+1
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * Preparations for re-rendering native text on DPI scaling changes.Andreas Hartmetz2016-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes only non-functional changes so the next patch can make mostly functional changes. QQuickText: rename q_imageLoaded() to q_updateLayout(). Says what it does, not when it is called. QQuickWindow: split QQuickWindow::forcePolish() into QQuickWindow::handleScreenChanged() and QQuickWindowPrivate::forcePolish(). Change-Id: Ief2ae30cd9f27ee8083b2c75765fb5278bde5ea8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | 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>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+2
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| * Fix compilation of QtDeclarative with QT_NO_GESTURESTobias Koenig2015-09-221-0/+2
| | | | | | | | | | | | | | | | Allow to compile QtDeclarative module with QT_NO_GESTURES define enabled. Change-Id: I5335f97c675d75c71c81edcc8307338ed3571663 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | QQuickWindow: Move itemsToPolish from a QSet to QVector.Robin Burchell2015-06-061-1/+1
|/ | | | | | | | | | | | | | QQuickItem already keeps track of whether the polish flag has been set, so the set provided no functional advantage here, and would have served to pessimize processing of polish if anything - now adding items to polish and processing them becomes constant-time operations. The only operation that is pessimised is removing polish off an existing item: but this should not be too horrid, unless the number of items to polish stacks up tremendously. Change-Id: I5d26dc899570a1e0186018850c21659e1f60a6b3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* qquickwindow: ensure we delete the correct delayed touch event after deliveryRichard Moe Gustavsen2015-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delivering a delayed touch event from QQuickWindow can cause the event loop to recurse (e.g if it starts a drag'n'drop). This again can cause new touch events to be delivered to QQuickWindow, and new delayed touch events to be stored. This results in the following: (1) Receive new touch press event in QQuickWindow, and set delayedTouch to be a copy of it (2) Deliver delayedTouch to items. This can cause an event loop recursion. (3) While inside the recursion, QQuickWindow receives another new touch press event. We then redeliver and delete the current delayedTouch event created in (1), and set delayedTouch to be a copy of the new event. (4) Later we return back from (2), and try to access delayedTouch (or actually a reference to the touchpoints inside it, qquickwindow.cpp:1958). Since the event was deleted in (3), we have a crash. This patch will ensure that we set delayedTouch to 0 before delivering it (so it cannot be redelivered), and that we safely delete it afterwards when it goes out of scope. By converting delayedTouch to a QScopedPointer we also ensure that the event is not leaked upon destruction. Task-number: QTBUG-45877 Change-Id: Ic372a39a0eb127abfd12cec2d51b3743ad83194d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Handle context loss in the threaded render loopLaszlo Agocs2015-03-121-0/+4
| | | | | Change-Id: I3f9219dd2fed15094c2f7d670a981406e601959b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickWindow: rename deliverGestureEvent to deliverNativeGestureEventShawn Rutledge2015-02-271-1/+1
| | | | | | | | | Native gestures are distinct from QGestureEvent, and we might need another deliver method for those eventually. Change-Id: I969c9b830d1dc7a91ffbc6cae2bdb68552a58344 Reviewed-by: Andrew Knight <qt@panimo.net> Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
* PinchArea: handle native gestures when availableShawn Rutledge2015-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | PinchArea is the first Item where we handle a QNativeGestureEvent, so QQuickWindowPrivate::deliverGestureEvent is added to deliver these events in the same way as the other deliverXEvent methods. For now there is not a separate virtual event handler in QQuickItem, because QNativeGestureEvent is not universally available, so it's necessary to handle this event type in QQuickPinchArea::event(). updatePinchTarget() contains code factored out from updatePinch() to do the necessary tranformations on the Item which was set as pinch.target in QML. So far the QNativeGestureEvents are generated only on OSX, so the behavior of the PinchArea on other platforms is unmodified. On OSX the intention is that we do not need to enable multiple-touch events in order to use any of the common 2-finger gestures, and the "feel" will be similar to that of gestures in native applications. [ChangeLog][QtQuick][PinchArea] Pinch gestures are recognized by the operating system on OSX Change-Id: I693526ea120a9144beb7666afeab6256caa73e51 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* No need to include qsgbatchrenderer_p.h from qquickwindow_p.hGunnar Sletta2015-01-141-1/+0
| | | | | Change-Id: Iba97717ae8d485c217613475524a762949ea1dae Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Introduced QQuickCustomRenderStage.Gunnar Sletta2014-10-161-0/+9
| | | | | | | | | The purpose of this concept is to make it possible to plug in an external rendering stage, like replacing the GL rendering with a composition step performed by a hardware compositor in QtCompositor. Change-Id: I994b93af443f68a77ca73cf310b5910c49e014c3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* 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>
* Introduce QQuickWindowQObjectCleanupJob.Gunnar Sletta2014-08-241-0/+14
| | | | | | | | Convenience for cleaning up texture providers. Private class for now, we can maybe make it public in 5.5. Change-Id: I3489fde2a268bc988634a16f87ee558b9ac5dba2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Remove setDefaultFormat() from QQuickWindowLaszlo Agocs2014-08-111-3/+0
| | | | | | | Replaced by QSurfaceFormat::setDefaultFormat(). Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix touch/mouse propagation bugsMartin Jones2014-08-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filtered mouse release was not delivered if another touch started after a touchMouseId was activated. This meant that any filters expecting a release event would not receive it if another touch was made before release of the touchMouseId. We prevented a touch becoming the touchMouseId in the child mouse filters if there were any existing touches. The normal event delivery, however, does not require a single touch. Further to the previous, a touch could become the touchMouseId, even if the initial press happened when there was an existing touchMouseId. This meant that a touch could turn into a mouse when the existing mouse event was released, resulting in a new touchMouseId which hadn't been through child mouse filters. Flickable delayed press should be sent via normal event processing, as other touch/mouse events are now delivered in this way. We often called childMouseEventFilter() multiple times for each event. This is bad because the gesture handling relies on claiming a gesture in one event, then stealing it in the next. Instead of sending touch to mouse candidate points already determined to be within the item bounds and already transformed, we sent all of the points to the mouse recipient. PinchArea did not store the starting position at the original touch points, so other items could pass the dragThreshold before PinchArea and steal a gesture meant for PinchArea. Task-number: QTBUG-40330 Change-Id: Ic0009c176d3d1cb7cff0b5eda076a2c3ca864136 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QQuickWindow: fix resetOpenGLState handling of vertex arraysGiuseppe D'Angelo2014-07-311-0/+4
| | | | | | | | | | | In the core profile it's forbidden to set vertex attributes (via glVertexAttribPointer and similar) when there's no VAO bound. Similarly, if there's a VAO bound when calling resetOpenGLState, then we need to unbind it or those operations will affect its status. Change-Id: Id7db028ddde9f9429f5a210b8b3d1468888dbce4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Introducing QQuickWindow::scheduleRenderJob()Gunnar Sletta2014-07-291-0/+9
| | | | | | | | | [ChangeLog][QtQuick][QQuickWindow] Added QQuickWindow::scheduleRenderJob(), a convenience alternative to the equivalent signals for one-shot tasks. Change-Id: I5e4f0d67d5223f7fd77bca394e2a85810fadd335 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Store information about focus reason in QQuickWindowPrivateBerthold Krevert2014-05-061-0/+2
| | | | | | | | | | | | | QtQuickControl's Desktop style needs to know whether the last focus change was requested by keyboard or not. With this information the Desktop style is able to set the QStyleOption accordingly. Without the flag, some of the QStyles (QFusionStyle, QGtkStyle) don't render a focus rectangle. This patch is needed by #change,84389 in QtQuickControls Change-Id: Ia06f56b018cd35eea933892a4c50e0aa7328042d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Compress touch events in QQuickWindow.Gunnar Sletta2014-05-051-1/+5
| | | | | | | | | | | | | | Instead of sending multiple touch updates per frame, we store the last one and flush the pending events just before we enter into the scene graph sync phase. [ChangeLog][QtQuick] QQuickWindow will compresses touch events and delivers at most one touch event per frame. Done-with: Robin Burchell <robin.burchell@jollamobile.com> Change-Id: Ia0169bc4a3f0da67709b91ca65c326934b55d372 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add defaultSurfaceFormat to QQuickWindowLaszlo Agocs2014-03-201-0/+3
| | | | | | | | | | | | | | | | | | | | This static function can be used to set a surface format that is then picked up by all QQuickWindows, including the ones instantiated from QML. This introduces the ability to request higher OpenGL versions, core profile and other options also for windows that are created from QML via the ApplicationWindow element in Quick Controls applications. [ChangeLog] Added QQuickWindow::setDefaultSurfaceFormat() to set a surface format that applies to all Quick windows, including the ones created from QML. The OpenGL shading language version is now exposed to QML too in order to allow components to provide the correct shader source so shader effect items. Task-number: QTBUG-36392 Change-Id: I75a4718243d835894461f7ee0b4a383988840f9b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Consolidate context creation failure handling in Quick.Friedemann Kleint2014-03-131-0/+5
| | | | | | | | | Add QQuickWidget::sceneGraphError() equivalent to QQuickWindow::sceneGraphError(), move message formatting code to QQuickWindowPrivate. Change-Id: I18cd4d7e0f6ee1011c29375218dc6a044b0d2cf2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickWindow cleanup: Remove forceRendering flagPaul Olav Tvete2014-03-121-1/+0
| | | | | | | | | | | forceRendering was introduced for QQuickWidget, but QQuickWidget now has full control of when the rendering functions are called. It makes more sense to not call the QQuickRenderControl functions, than to set a flag on QQuickWidget that decides whether those functions have any effect. Change-Id: I69819b13000120c04cecd1a467c08e8df9330df8 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QQuickWindow: fix content item sizeJ-P Nurmi2014-02-281-1/+0
| | | | | | | | | | | | | | | | | | | | Resize content item in QQuickWindow::resizeEvent() instead of using signals and slots. The signal-slot connections were only established when child items were added in QML. It should work in C++ too, since QQuickWindow and QQuickItem are part of the public C++ API and using them in C++ is a perfectly valid use case. Resizing the content item in resizeEvent() is not only faster than using signals and slots, but also in theory a bit more flexible as one would be able to override the event handler and implement their own layouting. Task-number: QTBUG-36938 Change-Id: Id05d4cf6d547021803050633e6f0a3359129a9f3 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Introduced a few more signals to QQuickWindow.Gunnar Sletta2014-02-251-0/+2
| | | | | | | | | | | | Also marked the new afterAnimation() signal as \since 5.3 and introduced proper revisioning on the new signals. [Changelog][QtQuick] Added QQuickWindow::afterSynchronizing(), openglContextCreated(), sceneGraphAboutToStop(). Useful for deeper integration with the rendering. Change-Id: I5532b310506c2432325595e55ef9307b8934abee Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add an error signal to QQuickWindowLaszlo Agocs2014-02-211-0/+2
| | | | | | | | | | | | | | When nothing is connected to this signal, an error will be printed or, in case of Windows, a message box will be shown. If there is something connected, it is up to the application to handle the error. [ChangeLog] Added a new sceneGraphError() signal to QQuickWindow which applications can use to detect errors like OpenGL context creation failures and react in their own custom ways. Task-number: QTBUG-36138 Change-Id: I33b1e5e0e3f25872af67c5bb5ae937e3470b25f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>