aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Restore a temporary QQmlInstanceModel::object() overloadJ-P Nurmi2017-12-011-0/+1
| | | | | | | | The API change in 60d589c broke Qt3D build. Restore a temporary overload to unblock the CI. Change-Id: I4debce4dc4ec7668b75854da3dc7e1813c9c34c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add a means to unregister custom qml typesAndy Shaw2017-12-012-0/+23
| | | | | | | | | | | | | | | In cases where Qt is used in a plugin it is possible that a plugin will be unloaded while Qt itself is still loaded and as a result there is a chance that there will be conflicting types registered. Therefore, to ensure that plugins correctly clean up after themselves cleanly, we need to add a means to unregister qml types. This is intended to only be used when the user knows what they are doing. Task-number: QTBUG-56521 Task-number: QTBUG-56532 Change-Id: Ie396e522385004e6e9f3841e04f8072ff29cb15b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickListView/GridView: load items that results from model changes ↵Richard Moe Gustavsen2017-11-302-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | synchronously The current implementation created new items with default incubation mode, which is AsynchronousIfNested. But from reading the code, it seems like changes to the model were really expected to be handled synchronously, since there aren't any sections in the code that will recover from situations were requested items ends up incubating async. This is also backed by the fact that the second argument used to be a bool set to 'synchronous'. The fact that this was translated to AsynchronousIfNested later down the chain didn't seems to be taken into account. A bug with this is found in ListView when it's embedded inside an async Loader. In that case, all list items will be incubating async at startup, which is normally expected and fine. But if the model assigned to the ListView is modified before the loader has finished, async loading will also happen to the items created because of the change. And then the situation described above will occur. This patch will force any items loaded because of a model change to be synchronous. This seems to be in line with the synchronous logic that already exists. And its also quite acceptable, since changing the model before everything is completed is a corner case, and can naturally lead to some stuttering in the list view anyway. A potential for improvement on this logic is to try to recover whenever creating an item fails. But this takes a lot of work because of the way model changes are structured and stored, and can easily cause regressions. Since this is a corner case, it is probably not worth it. [ChangeLog][QtQml][ListView] Fixed a bug in ListView that sometimes make items end up with wrong geometry when changes to its model happens while the ListView is being loaded async (e.g if wrapped inside an async Loader). Task-number: QTBUG-61537 Change-Id: I8d6857beaf8ef98b02bb46282a1312749b0fb801 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQmlDelegateModel: add incubationStatus(), and use it to determine ↵Richard Moe Gustavsen2017-11-306-3/+38
| | | | | | | | | | | | | | 'requestedIndex' We used to assign the currently incubating item to 'requestedIndex' based on requested incubation mode alone. This is not sufficient, as the item can also be loaded async when the mode is AsyncIfNested. To check if the item is really loading async (and that we're not getting nullptr because of some other failure), we need to ask the incubator. Task-number: QTBUG-61537 Change-Id: Id1f458db4a7584a6b58d5bad0e7832ce4fc341dc Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQmlIntanceModel: use QQmlIncubator::IncubationMode instead of bool to ↵Richard Moe Gustavsen2017-11-3012-34/+37
| | | | | | | | | | | | | | | | | | | | | | specify incubation mode The current implementation would pass a boolean to signal if asynchronous or synchronous incubation should be used to create an item. The problem with this approach is that passing 'synchronous" would translate to QQmlIncubation::AsynchronousIfNested later down the chain. This meant that even if the caller requested synchronous incubation, it could end up with asynchronous incubation anyway, e.g if an async parent incubator was active at the time of the call. And this can easily come as an unhandled supprise for the caller, and as such, cause unforseen bugs. This patch is a first of a set of patches that is done to fix the bug reported in the task below. It will not change any behavior, it is written to preserve the logic exactly as it were, just as a preparation for subsequent patches. It makes it explicit at the call location what incubation mode will be used, and especially make it clear whenever the AsynchronousIfNested flag is in play. Task-number: QTBUG-61537 Change-Id: I8b3ba5438ebb2cd59983a098bd8ceeeb844da87b Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* don't get confused about the grabber during replayDelayedPressShawn Rutledge2017-11-292-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | If a ListView with pressDelay contains a MouseArea in a delegate, and you tap the MouseArea on a touchscreen, QQuickFlickablePrivate::replayDelayedPress() sends a saved copy of the original QMouseEvent, and then a synthetic release, without marking it as synthetic. (QQuickFlickable is not touch-aware in any way: it thinks the mouse events it receives are real ones.) As a result of sending the delayed press through, QQuickWindowPrivate::setMouseGrabber() is called and sets the touchpoint's grabber to the MouseArea, but does not set the core pointer's eventpoint's grabber. Flickable then ungrabs for itself, so we have to ensure that the ungrab affects either the actual mouse or the synth-mouse, whichever was in use. Then because the synthetic release is not known to come from a touchscreen, QQuickWindowPrivate::deliverMouseEvent() was checking the core pointer's grabber and concluding that there is no grabber. In such a case, it now checks whether touchMouseId is set, meaning that we are somewhere between sending a synthesized press and release, gets the touchpoint's grabber (which is MouseArea, because it didn't reject the press), and sends the release there. Task-number: QTBUG-61144 Change-Id: I494873e48af179bc63b618e881ba469b97dadf4d Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Check linked contexts for context objects being deletedUlf Hermann2017-11-281-1/+4
| | | | | | | | | | In QQmlObjectCreator::createInstance we can assign the new object as context object to a linkedContext of its QQmlData, not only it's ownContext. Consequently, we have to check all the linked contexts and remove the object when found on deletion. Change-Id: I09bccdb0190406245fa5a379edaff0a8f118062f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash when moving items during asynchronous creationJoni Poikelin2017-11-281-2/+9
| | | | | | | | | | | | | | | In complicated cases where the model moves rows around while the view is running slow (perhaps during high CPU load), there were cases when Repeater would call movedItem->stackBefore(deleteableItem), but deleteable items can be null, so there was often an error QQuickItem::stackBefore: Cannot stack before 0x0, which must be a sibling and occasionally a crash. Now we check both the callee and the parameter to stackBefore to make sure neither of them are null. Task-number: QTBUG-54859 Change-Id: I45a8b2939c16b9bbe3a802ddd348dc55f51061a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9.3' into 5.9" into ↵Liang Qi2017-11-253-5/+16
|\ | | | | | | refs/staging/5.9
| * Merge remote-tracking branch 'origin/5.9.3' into 5.9Liang Qi2017-11-233-5/+16
| |\ | | | | | | | | | Change-Id: Ic6457df47bed359fd43653e73726f1896944241c
| | * Fix crash when accessing pixmap on default QSGSoftwareInternalImageNodev5.9.3Allan Sandfeld Jensen2017-11-171-4/+5
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-64562 Change-Id: I52e07b0d8b7a5d1cc960431dcbd1a90dd3e7e518 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Fix crash with dangling context object pointersAndy Shaw2017-11-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced by commit e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the QML context would destroy the context upon destruction. Now the context may live longer and thus the context->contextObject pointer would become a dangling pointer. Task-number: QTBUG-64166 Change-Id: I1df631fa11187abdeff735d8891ad7907e8d4a3d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Improve encapsulation of the the IR de-serialization from QtQuick CompilerSimon Hausmann2017-11-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code used by QQC to deserialize the IR requires setting the javaScriptCompilationUnit member in order to connect the generated C++ code. Knowledge of the QmlIR::Document data structure layout on the side of the generated code (thus application) has its downsides though (see referenced bug). We can avoid that dependency easily by doing the entire de-serialization on the QtQml library side. The old "API" (load member function) is still around until the qqc change is also in. Task-number: QTBUG-63474 Change-Id: I239838afacc71474c86114b5b05679ff36e4c2e2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | More fine-grained deferred property executionJ-P Nurmi2017-11-254-13/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows Qt Quick Controls 2 to defer the execution of certain building blocks until needed. For example, a button control can defer its background item so that the default background is not executed at all when replaced by a custom background. First of all, this gives a massive performance boost for customized controls. Secondly, this avoids the most burning issue in QQC2, problems with asynchronous incubation ("Object destroyed during incubation"). Task-number: QTBUG-50992 Change-Id: If3616c9dac70e3a474a20070ad0452874d267164 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QmlInspector: Make window flags explicit when adding WindowStaysOnTopUlf Hermann2017-11-241-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | The implicitly assumed flags are removed if any explicit flag beyond Window, Dialog, or Tool is added. Thus the inspected window lost its decoration when it was WindowStaysOnTop was set. Change-Id: Ic155283fd17ed069790875679b150f2c37b7fe1a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | | Re-enable QML memory profilingUlf Hermann2017-11-235-20/+44
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-64674 Change-Id: I48ed1a51f66ef8d55cc026f140d270baaca04fbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Software Adaptation: Fix cliping logic error with empty clip regionsAndy Nichols2017-11-231-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix for nested clip regions introduced a regression which broke nested clipping cases that involved one of the clip nodes being null regions because they were offscreen. The clip region stack can either have an null QRegion or be empty as an initial state (depends on what is being rendered). We made a special check for these two states, but it is not enough to check if the top item is null for the null region case beacuse at any point in time a null clip region node could have been added. So to fix this the null initial state also requires a count of 1. Task-number: QTBUG-63743 Change-Id: Ib0d17026f1d5a663e819412e11d25d9ad8b445ff Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | watch for the actual render window if there is a QQuickRenderControlMarco Martin2017-11-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | if the scene is rendered by a QQuickRenderControl and we have a different target window (for instance QQuickWidget) we check the target window of the render control instead of the own window, this fixes window keyboard shortcuts for QQuickWidget Task-number: QTBUG-64548 Change-Id: I7614be580f2a707c752189e4c9b53a5d5f0159d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Don't reject plugin-only qmldir filesUlf Hermann2017-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | On QQmlImportsPrivate::updateQmldirContent we need to check if the new module has actually been established after figuring out that it doesn't have any components or scripts. If it has, then we shouldn't fail, as obviously a plugin has been loaded. We don't need to check the component and script versions in that case, as plugins don't have separate versions. Change-Id: Ie328b59038fe65c3f6a2eeecfe969927bba6cd68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix URL interception for qmldir filesUlf Hermann2017-11-223-17/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to intercept the URL when it is created. This relieves us of the need to hack around in it when actually retrieving the content of the qmldir file and prevents the futile attempt to load remote qmldir files via the code path that should load local ones (or vice versa). The back and forth conversion between URLs and strings is unfortunate, but can only be solved by using QUrl rather than QString where we actually mean URL. This would be a bigger change which is unsuitable for 5.9. Mind that nothing changes for code that doesn't use URL interceptors. Task-number: QTBUG-36773 Change-Id: I6bff3ae352009fdc0a17ec209691c7b390367f11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Document QQuickGrabGestureEventShawn Rutledge2017-11-172-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation has been missing since the beginning. Making it an uncreatable type provides the opportunity to associate the C++ type with the QML type so that the latter can be used in the QML documentation, as opposed to simply registering the C++ type with no QML name as was done before. Task-number: QTBUG-47290 Task-number: QTBUG-63143 Change-Id: Ib82cc7b27c9591eaf2c7997d2781a2b4246cfbff Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Make sure we remove stopped animators from the list of rootsGunnar Sletta2017-11-101-1/+3
| | | | | | | | | | Change-Id: I89b36ee7d03ac6b8d07b24c656d3311728e8f9c3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Fix tst_qquickshadereffectJ-P Nurmi2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | The expected signal counts were not matching. Since the test has not been run in the CI, it went unnoticed. Furthermore, the test crashed due to a missing null pointer check. Change-Id: Iff80a2ea17832eb7bc531ac9eb2fc482f2c69e38 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | docs and example: clarify the usage of Flickable contentX/contentYShawn Rutledge2017-11-081-1/+15
|/ | | | | | | | | | | It's such a common mistake to observe that they normally go to zero at the top-left corner, but fail to realize that they won't always do that. Task-number: QTBUG-64219 Task-number: QTBUG-22894 Task-number: QTBUG-27884 Change-Id: I6bc81d4761debdaff8fb3366bf1e944241207157 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix ListView::positionViewAtIndex with ListView.Contain modeJoni Poikelin2017-11-071-11/+16
| | | | | | | | | Sticky headers and footers weren't accounted for when calculating new view position causing the requested item to be left behind them. Task-number: QTBUG-63974 Change-Id: Id69579643a942e8558960b2c8b0fee980fa86947 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickWindow: cleanup pointer event instancesJ-P Nurmi2017-11-071-0/+2
| | | | | | | | | | | | | Pointer event instances are QObject-children of QQuickWindow, meaning that they remain alive after ~QQuickWindow(), until execution reaches ~QObject(). Make sure the pointer event instances are cleaned up in ~QQuickWindow() to avoid accessing them later during the destruction phase. Task-number: QTBUG-61434 Change-Id: Icd4576e7581524773a3eb33864fdd64df821e0e8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Never create pointer events from mouseGrabberItem()Jan Arve Saether2017-11-072-15/+24
| | | | | | | | | | | | | | | Normally, this was not a problem, but it is problematic during QQuickWindow destruction: The list of pointer event instances are destroyed, but later the grabber is removed (through call to removeGrabber()). This queries the mouseGrabberItem(), which would create a new pointer event instance. It also has the benefit that d->pointerEventInstances are now only populated due to actual incoming events. Task-number: QTBUG-61434 Change-Id: I4e7b6f5643f3b971138a1f7c7237ee734d29783c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickWidget: pass enter and leave events to the offscreen windowAndy Shaw2017-11-061-0/+9
| | | | | | | | | | By passing the enter and leave events to the offscreen window it will enable mouse areas inside a QQuickWidget to know when the mouse has actually entered or left the area if it is covering the whole item. Task-number: QTBUG-45557 Change-Id: I670ebe30e367e919c73fed449bf2bed7ca42b5fd Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix coverity reported warningLars Knoll2017-11-061-1/+1
| | | | | | | | | The variable wasn't initialized in any constructor. This didn't cause issues in practice, as it always got set in optimizeRenderList(). Change-Id: I37459bb2d51bbe2bb881aaefffd6972a5345c75d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Prevent the QML engine from registering circular dependenciesErik Verbruggen2017-11-062-1/+10
| | | | | | | | Change-Id: Ic4fd2bde745e7dfaf0909e8cc575441bb04cefa3 Task-number: QTBUG-64017 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Bhushan Shah <bshah@kde.org>
* QQmlEngineDebugService: Check QML contexts for validityUlf Hermann2017-11-051-12/+10
| | | | | | | | | We should not operate on invalid QML contexts and once we have established a context to be valid we don't have to check the result of QQmlContextData::get anymore. Change-Id: I9106115ddf925c3572048f1fd334bdfd9a9cfca7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up handling of opaqueness in the SW rendererLars Knoll2017-11-032-26/+15
| | | | | | | | And check whether nine patch pixmaps are opaque as well. Change-Id: I23f2cb675b923eace849a1c0ad71efe1446c86c4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Mark layers in the SW rasterizer as opaque if possibleLars Knoll2017-11-034-10/+22
| | | | | | | | | | If the content of a layer completely covers every pixel of it, mark that layer as opaque so that we can avoid alpha blending where possible. Change-Id: Ia0be4e7a96ecddd31a26f353509de976bcc9e397 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Fix providing correct velocity when using index based scrollingPasi Petäjäjärvi2017-11-032-5/+4
| | | | | | | | | Index based scrolling does not enable moving and flicking properties. Task-number: QTBUG-34576 Change-Id: Ief06d37115ca389027670c97ce6c0457a74d4872 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickItemView: always honor the removeDisplaced animationAlberto Mardegan2017-11-031-1/+11
| | | | | | | | | | | | | | | The animation was not being performed if the delayRemove attached property was changed by the handler of the remove() attached signal. We need to run the delayed transitions not only if we have an animation for the target item, but also if we have an animation for the items being displaced. (The flag variables can safely be obtained outside of the for loop, given that their value should not change during the loop iteration) Task-number: QTBUG-57225 Change-Id: I8c138677d7dcdf63e0932ec5cf7738c0caeb2ab8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* ListView: don't stop moving the highlight because of model updatesShawn Rutledge2017-11-031-1/+0
| | | | | | | | | | | | | | | | | In QQuickItemViewPrivate::applyModelChanges(), if moveReason = QQuickItemViewPrivate::Other, then QQuickItemView::trackedPositionChanged() will fail to call d->setPosition(pos), which is normally what keeps the Flickable moving for a while. Leave the reason as-is (it will be SetIndex in this case), so as not to forget that we were actually trying to move down. Updating the model was just a side-effect of that: either because some QML code was trying to append to the model or because fetchMore() was called. Task-number: QTBUG-61269 Task-number: QTBUG-62864 Change-Id: I3fd402469950d6c12e6a8d6e42be83ea4f54776a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickFlickable: Use QQuickItem::setSize() in resizeContent()Alexandr Akulich2017-11-031-17/+17
| | | | | | | | Sequential call of setWidth() and setHeight() results in outdated height on widthChanged() signal. Use setSize() to set width and height at once. Change-Id: I013f5e1fcfc65a8606f9596ddc196b633873dc98 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickItemView: avoid wrong repositioning of removed itemsAlberto Mardegan2017-11-031-2/+3
| | | | | | | | | | | | | If all the items currently in the view are being removed, lastVisibleIndex will be -1. This caused an unwanted repositioning of all the deleted items, which got moved to a wrong location. Therefore, when all visible items are removed, we should avoid recomputing any item's position. Task-number: QTBUG-57225 Change-Id: I9909748a9cccb5e6a3726306e250921ce69fcba9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Mark pixmaps without alpha channel as opaque in the SW rendererLars Knoll2017-10-302-3/+2
| | | | | | | | And help avoid that we draw the same pixel multiple times. Change-Id: I56dccfeffe6865d0aaa252c84ae693380c3bbb5b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Fix crash with dangling context object pointersAndy Shaw2017-10-261-0/+2
| | | | | | | | | | | | | This is a regression introduced by commit e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the QML context would destroy the context upon destruction. Now the context may live longer and thus the context->contextObject pointer would become a dangling pointer. Task-number: QTBUG-63733 Change-Id: Idc660116752d312917a0a149110b92a042ccfb17 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Minor documentation improvements for Matrix4x4Michael Brasser2017-10-242-0/+2
| | | | | Change-Id: I5340dfb214de63ad848b2c9c322c89a19b770fc2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Return "qnx" for Qt.platform.os when appropriateLiang Qi2017-10-242-0/+3
| | | | | | | | | | [ChangeLog][QtQml] Qt.platform.os returns "qnx" when running on QNX platforms. Task-number: QTBUG-52515 Change-Id: Ie46f235248f7832fff12906cf858e8527e8060b1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickAnimatorProxyJob: Disconnect from window when unsetting itUlf Hermann2017-10-241-1/+5
| | | | | | | | | | Otherwise we may get called back when the window's scene graph is ready, but we don't have a controller anymore then. This leads to a crash. Change-Id: I8075619e1fd3c69ca0f7d0b1d72952b8cc5040f8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlTypeLoader: Drain events before shutting down the threadUlf Hermann2017-10-201-10/+17
| | | | | | | | | | We take references to types when sending events to the other thread. If we don't process the events, the references are kept, which leads to memory leaks. Therefore, when shutting down a QML engine, we have to make sure the event queues are emptied. Change-Id: Id8b0440029cfd7d03a9e540747eaedbcaa7c9ff3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQuickLoader: Use setSize() to resize itemAlexandr Akulich2017-10-201-2/+7
| | | | | | | | | Sequential call of setWidth() and setHeight() results in outdated height on widthChanged() signal. Use setSize() to set width and height at once. Change-Id: I86ff5cef2da912a8855c66a614d5d7d2e71f1de8 Reviewed-by: Risto Avila <risto.avila@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Docs: VideoOutput is not supported with Software AdaptationAndy Nichols2017-10-201-0/+7
| | | | | | Task-number: QTBUG-62449 Change-Id: I523d86d5c1744ee269080cb169990fdb3d8f93ef Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update the cursor rectangle when select all is triggeredAndy Shaw2017-10-201-2/+1
| | | | | | | | | | | | | | | | | | When select all is triggered then the cursor rectangle should be updated to ensure that the selection handles are visible if they are displayed on a given platform. For instance, on iOS the loupe handles should appear in this case. This also has the added effect that when using Backspace on the iOS keyboard, it will delete the selected text as opposed to just a single character as it will handle that situation correctly. The tst_qquicktextedit::inputMethodUpdate() test is modified to account for the extra event sent now when selectAll() is called. Task-number: QTBUG-63835 Change-Id: I94fb0576b286c006dd12c65d0b322d712ed2a96f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Tell QQmlImportInstance::resolveType what kind of type we wantUlf Hermann2017-10-195-29/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | In QQmlTypeData::resolveTypes() we know if we're looking at a reference to a composite singleton type, or some other type reference. When we call resolveType() we expect the correct type to be returned, not only based on URL, but also based on its singleton property. QQmlTypeData::resolveType() eventually invokes QQmlImportInstance::resolveType() which will call fetchOrCreateTypeForUrl(), passing a parameter on whether the result should be a composite singleton. When operating on a qmldir component the component itself encodes this. When fetching a type from a local file without qmldir, we currently assume that it isn't a singleton, no matter QQmlTypeData::resolveTypes() has determined. This means that actual singletons loaded this way later get refused by the sanity check. In order to fix this, pass the information about the expected singleton property on to QQmlImportInstance. This is done using QQmlType::RegistrationType, which gets another entry for "any type". If the expected type is CompositeSingletonType QQmlTypeData::resolveType() will not create a non-singleton type. If it is any specific other type, it will not create a composite singleton. And if it is AnyRegistrationType, it will behave as it previously did. Change-Id: I6b7e082b63582e0aed946bb3d19077b94c7a45f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix execution of deferred propertiesJ-P Nurmi2017-10-186-31/+60
| | | | | | | | | | | When deferred properties were assigned in multiple contexts, only the outermost context was executed. Any deferred property assignments in other inner contexts were never executed. Collect the deferred data to a container to be able to execute them all. Task-number: QTBUG-63200 Change-Id: I88fab27c1f81b5188430ada086dcc19842507e99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qdoc files to always use FDLKai Koehne2017-10-181-31/+18
| | | | | Change-Id: If20d71aa85360ad94a2ef12a25ab37cd2d90abf9 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>