aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move syncTimer measurment to the correct place.5.3Josh Arenson2014-09-121-4/+4
| | | | | | | | | syncTimer was including the time spent waiting for VSYNC on unchanged frames. This was causing the reported value to be much higher than expected. Task-number: QTBUG-40556 Change-Id: Ife759b4e27faf2124ab330be8d1f42d15c4d2d33 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix crash with foreach on arguments objectSimon Hausmann2014-09-112-14/+37
| | | | | | | | | | | | We call fullyCreate() on the arguments object when it's initialized on an foreach iterator. That itself however might trigger an allocation, which in turn might collect the ForEachIteratorObject, which is missing a "ProtectThis" in its constructor. Change-Id: Ib8f7e39201e727cde91cbbe8a82cba78aa980f0d Task-number: QTBUG-40844 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QML: parse .js files as JavaScript, not QML.Erik Verbruggen2014-09-054-1/+29
| | | | | | | | | When importing a JS library into a QML file with the "import" keyword, that JS file was parsed in QML mode, disallowing QML keywords like "as". Task-number: QTBUG-40143 Change-Id: Ie98adceb27544732c2e96657d41170db36bff288 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix crashes when calling Array.sort with imperfect sort functionsLars Knoll2014-09-013-2/+75
| | | | | | | | | | | | | | | | | | | We can't use std::sort to implement Array.sort. The reason is that std::sort expects a conformant compare function, and can do weird things (esp. crash) when the sort function isn't conformant. Falling back to qSort is not possible, as the method has been deprecated. So add a copy of the qSort implementation here, and use that one instead. Fix the sortint test in tst_qqmlecmascript to have a consistent sort function for strings, as the result of calling sort is otherwise undefined according to the ecma standard. Task-number: QTBUG-39072 Change-Id: I0602b3aa1ffa4de5006da58396f166805cf4a5e2 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Support padding in images stored in atlas textureEskil Abrahamsen Blomfeldt2014-08-301-1/+10
| | | | | | | | If the stride does not match the width of the image, we upload it line-by-line instead of as one big rect. Change-Id: I5e08afcf5c35dc810fed25e45255d55d932b2a4c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix crash with cleanup of animators.Gunnar Sletta2014-08-303-5/+14
| | | | | | | | | | | | | | | | | | | | | | We had several separate issues relating to how the jobs were cleaned up. The first was that upon getting setWindow(0), the animator did not reset m_controller to 0, leading to the starts() coming after that to post null jobs to the controller. This would later crash in beforeNodeSync as the starting job was null. The second issue was that during shutdown, QQuickAnimatorProxy would try to delete jobs on the controller which was already deleted. The controller is deleted on the GUI thread regardless of render loop, so this was solved with a QPointer. The third was that we were a bit too aggressive in trying to clean up jobs on the GUI thread, so we introduced a new bool which gets set to true in startJob() so that Proxy::deleteJob() knows who owns the job. Task-number: QTBUG-37833 Change-Id: I1b6221a2c1ce2bfd0758801b950cda00ff6899d0 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Bump versionFrederik Gladhorn2014-08-291-1/+1
| | | | Change-Id: I54ace3320d63c54119084b27eb2c1797166f0b37
* Use QtQuick.Window 2.2v5.3.2Kai Koehne2014-08-275-15/+12
| | | | | | | | | | | | | Use version 2.2 in the documentation and for the .qmltypes file. The revision for properties got dropped in commit 7ceca6ac0 , and is now dropped from the .qmltypes file, too. The removed signals are also dropped because of that (because they are implicitly declared by the property, anyway). Change-Id: Ia14dd403ce1f098cb378bd7940e8f80f32b770a0 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: Added a link to the QML advanced tutorialVenu2014-08-261-0/+3
| | | | | | | | | This avoids the need to duplicate the example details that are already covered in the tutorial. Task-number: QTBUG-37203 Change-Id: If7e762dc1d9a572b83bddffe7982aec9a6363408 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Don't use d->instanceModel after free'ing itLars Knoll2014-08-262-2/+3
| | | | | | | | | prevModel points to d->instanceModel and is being used further down in the code. So reset the pointer to 0 after freeing the old instanceModel. Change-Id: I8854ae3e09c8b2fe50ad311f3dbc7b8ed26805e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix crash with early QObject property accessSimon Hausmann2014-08-254-5/+48
| | | | | | | | | | | | | | | | | | | | In the reported bug, it can happen that we try to access the compile-time resolved QObject property of an object that is referenced by id. The binding that uses this is triggered when the property changes but _also_ when the id referenced object gets either created or deleted. The first time the binding is evaluated is very early on, when the id referenced object is not created yet, so the binding evaluation fails. However the dependency is set up, and so later then the id referenced object is created and the id property is set on the context, the notification triggers and the binding is re-evaluated. During that binding evaluation a QObject property access happens by index on an object that doesn't have its VME meta-object set up yet. Therefore the property access fails and a crash occurs or the Q_ASSERT(property) assertion fails. The fix is to set register the id named object in the context _after_ the VME meta-object is setup. Task-number: QTBUG-40018 Change-Id: Ic2d7b4a0c49635efe68e93f2f6c316eb65f0c309 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix typo in DelegateModelGroup documentationAlbert Astals Cid2014-08-251-1/+1
| | | | | Change-Id: Ic01f0935c469f85f32699aebaeb1fc6f8b2279fb Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Protect some members in QQmlObjectCreatorLars Knoll2014-08-252-5/+7
| | | | | | | | Avoid dangling pointers when nested incubators are being used. Task-number: QTBUG-40437 Change-Id: I73922d2f373b2efbc00983305cdea9e8d60f0c41 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Initialize variableLars Knoll2014-08-241-1/+1
| | | | | Change-Id: Ia54dc43d22b8edaa49634c6a364f87b4a06d659d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't abuse new to do a reinterpret_castLars Knoll2014-08-241-4/+4
| | | | | | | | | Using new to do a reinterpret_cast is rather confusing. Also protect the list model case against self-assignment which could lead to memory corruption. Change-Id: I10b81644d0004d4a50a5a74e5b8c58e27cbe6934 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Protect incubation against its creator being deleted.Gunnar Sletta2014-08-231-1/+1
| | | | | Change-Id: Ica7ed02c9b67243310ddce3feaf91935b699086d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add 5.3.2 changelog for qtdeclarativeAlan Alpert2014-08-221-0/+41
| | | | | Change-Id: I33e8149ec9e2f7ecfebb7f55de0dbb291805be93 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix crash with recursively loading cached compilation unitsSimon Hausmann2014-08-222-4/+17
| | | | | | | | | | | | | | When a cached compilation unit depends on an import that is implemented as a Qml C++ plugin and that plugin in turn loads an asynchronous component that is cached, we would get a crash in the typeloader and a failing assertion (ASSERT: "d->m_mainThreadWaiting == false" in file qml/ftw/qqmlthread.cpp, line 300) This is because we did not implement the asynchronous loading within the loader thread for cached compilation units. This is simply done using a posted event, using the same mechanism used for other async load methods. Change-Id: Iefce67ab634ce26122c348dcdfc8e66b00fec671 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix typo in StateChangeScript documentation.Mitch Curtis2014-08-191-1/+1
| | | | | Change-Id: Iec72331c183ea02680bad01f04eae82ebd815cdb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Added the QtSQL dependency info. to the project fileVenu2014-08-151-1/+1
| | | | | | | | | Without this information the app fails to find the plugin required to load the QtQuick.LocalStorage module on Android. Task-number: QTBUG-37203 Change-Id: I245012e78ab8d1fe3205e08939f4baec58c20759 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* tst_dialogs: verify that rootObject is validRobin Burchell2014-08-151-0/+3
| | | | | | | | if there's an error during loading, it's much easier to spot if this fails rather than crashes. Change-Id: If0106729e18768819da8a877959a095398af8547 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* tst_dialogs: QTRY_ on the expression (spyVisibilityChanged.count) not the ↵Robin Burchell2014-08-151-1/+1
| | | | | | | | | variable. We only assign to the variable once, so the value may not change in time. Change-Id: I54ac7faad60d3984bfde4606aaf7e30a2340ba3e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* The cached objects can be deleted, so keep them in a QPointer.Gunnar Sletta2014-08-142-1/+104
| | | | | | Change-Id: Ieaebd2e7b9823cbe22efc331e42ceab8fbbda0e8 Task-number: QTBUG-40201 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix potential deadlook in threaded renderloop.Gunnar Sletta2014-08-141-0/+12
| | | | | | Change-Id: I415e632aa4e584c8fca745581f25a676db0eae42 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Added a signal handlerVenu2014-08-141-0/+1
| | | | | | | | | | | | Without the onHeightChanged signal handler the transition of the NumberPad from left to right is incomplete especially on a mobile device where the window is scaled to fit the view. So the NumberPad ends up hidden behind the Display. Task-number: QTBUG-36086 Change-Id: Iab021c9f2572a4ac83bc393dddc24ddd31849cb4 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix typo in Context2D documentation.Mitch Curtis2014-08-141-1/+1
| | | | | | Change-Id: Ib6e2436ba383a2caf78ac359883338016c2b7668 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Disable threaded FBO canvas drawing when not supported.Gunnar Sletta2014-08-141-0/+10
| | | | | | | Change-Id: I1e8300c61ba31a5400fc43f85a9c39d2245b4518 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* V4 JIT: fix JS stack frame size calculation.Erik Verbruggen2014-08-131-3/+2
| | | | | | | | | | | | | | | | StackLayout::calculateJSStackFrameSize now returns the size in number of QV4::Value items, instead of bytes. The value is then multiplied in the assembler by sizeof(Value) to get the number of bytes. Previously, the return value was number of bytes, which also got multiplied. A direct effect is that the JS stack size will be ~87% smaller, with the nice effect that the GC will run faster (less roots on the stack). It also won't retain objects whose reference accidentally ended up on the stack below the used portion for the current function, so possibly freeing (more) objects (earlier) than before. Change-Id: Idd5a9c173e641c03e6b8a6fe743e403eda34dfe0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Correct strokeRect documentation.Mitch Curtis2014-08-121-1/+1
| | | | | Change-Id: I81c61f3b32819e45e15b2be472e71e48fac0c148 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Silence harmless compiler warning.Gunnar Sletta2014-08-121-3/+2
| | | | | | | | AlignJustify is not a tested value, but the compiler warning can throw you off, so best to keep it quiet. Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* benchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that ↵Robin Burchell2014-08-122-2/+2
| | | | | | | don't build. Change-Id: I4d2e9bf3a520636c568a6b58e311994693446c97 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* benchmarks/particles: fix projects to actually buildRobin Burchell2014-08-122-2/+2
| | | | | Change-Id: I3edb05279119b921b50a0329dfd47f0ff2cdb9bc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix compilation of tst_compilation (:-P) benchmark.Robin Burchell2014-08-122-31/+1
| | | | | Change-Id: I7bbf24d816a356f100d7e2c5a8e7a81218f0f54d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Avoid double deletion when deleting an incubating component.Martin Jones2014-08-112-8/+3
| | | | | | | | | | | | | | | The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing the guards in QQmlIncubatorPrivate::incubate() when a deletion was detected. If we detect a deletion, leave the guards in place, to be handled in QQmlIncubatorPrivate::clear(). Task-number: QTBUG-40685 Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Invalidate the scenegraph properly in the rendercontrolLaszlo Agocs2014-08-084-19/+13
| | | | | | | | | | | | | | | | | | Taking the persistent flags from the QQuickWindow was a bad idea. These are not applicable to the case when an application drives the scene via QQuickRenderControl. Once stop() is called, all resources must be released since the context itself will typically be destroyed afterwards. This is a backport of 0b0bb319578bb2e2eced3a80ce3876a4408b72a7 in dev. On top of this, stop() becomes invalidate() since the original invalidate() function is never used by anyone. This naming is much cleaner and is consistent with QSGContext and friends. Task-number: QTBUG-40505 Task-number: QTBUG-40435 Change-Id: I398f1bda31f335c3508b238f0328305d3cd79ffd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix crash when loading invalid QML with behavior on invalid group propertySimon Hausmann2014-08-084-6/+15
| | | | | | | | | | | | | | | Behaviors require the creation of a meta-object. However when trying to create a behavior on a non-existent group property, we don't have a base meta-object to base the "new" meta-object on, therefore this patch adds a null pointer check. The error in the QML file itself will be caught later on. The added test ensures that as well as that it doesn't crash of course. Change-Id: If73116053464e7e69b02ef59e8387060835083c8 Task-number: QTBUG-40369 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix crash when animators are deleted just after being started.Gunnar Sletta2014-08-081-2/+4
| | | | | Change-Id: I35850e279dae596edb9a1b93143d6aa195221b41 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Don't try to reload QQuick images when changing to null screenTaylor Braun-Jones2014-08-062-3/+3
| | | | | | | | | | | | | When a QGuiApplication is destructing, a screen change occurs causing QQuickImageBase to reload images ultimately resulting in "QPixmap: Must construct a QGuiApplication before a QPixmap". This patch fixes the issue (except for systems which multiple screens, which is a separate issue). Task-number: QTBUG-40539 Change-Id: I4bafc9790741204e90190a4491ac7a9393d0d0a7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Clarify Component.onCompleted/onDestruction docsGunnar Sletta2014-08-061-5/+4
| | | | | Change-Id: I86bb6b85043282f4f46a685e30b435a2f7430430 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix fbo creation and resize logic in QQuickWidgetLaszlo Agocs2014-08-061-2/+13
| | | | | | | | | | | | | | | | | | This corrects two issues: 1. Recreating the fbo twice when the widget is shown. Calling createFramebufferObject() is not necessary in this case since createContext() will trigger this anyhow due to scenegraphInitialized(). 2. Avoid recreating the fbo when the size is the same as before. Some platforms are keen on sending resize events with the same size. These should be ignored. What's worse, some platforms (cocoa) generate a resize on exitting (Cmd-Q) and not ignoring the resize at that stage is dangerous since the scenegraph is already invalidated. Task-number: QTBUG-40505 Change-Id: I21ff418fde449aa15eef4d6593e7a518861fcde1 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix Qt.include with cached compilation units and resourcesSimon Hausmann2014-08-064-8/+43
| | | | | | | | | Similar to the worker scripts we also need to do a lookup for cached scripts here. Added also a test to ensure that Qt.include works correctly from Qt resources. Change-Id: Idb67af3da4b0cc91edbd3d2746d074fd68ed8bf0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Synchronize PathView gesture grabbing with other items.Martin Jones2014-08-065-9/+150
| | | | | | | | | | | PathView didn't attempt to grab the gesture at the same event as other items. This prevented PathView from rightfully claiming the gesture before lower items in the stack. Use the same threshold test for PathView as used elsewhere. Task-number: QTBUG-37859 Change-Id: Ic57cb805ac979e41c3e35d86b2e7db781e61d69d Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix FBO recreated every time the QSG node is updated under some conditionsTaylor Braun-Jones2014-08-051-5/+6
| | | | | | | | | | | When textureFollowsItemsSize is true and the item width/height are (1) not precise integer values or (2) less than the minimum FBO width/height, then QQuickFramebufferObject will delete and recreate the FBO every time the QSG node is updated. This patch fixes the issue. Task-number: QTBUG-40548 Change-Id: I532aaaa88a5c604ee7cc1fd8f0acb0601c5a94fb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Run autotests for Canvas.renderTarget == FramebufferObject also.Gunnar Sletta2014-08-021-2/+2
| | | | | Change-Id: Id1729966b3b2b75a3bd4ad387b3d7914266fb3a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* More QQuickCanvas cleanup handling.Gunnar Sletta2014-08-014-28/+47
| | | | | | | | | | | | | | | | Avoid calling into QQuickContext2D from QQuickContext2DTexture after QQuickContext2D has been deleted. We acheive this by 1. Giving the texture a direct pointer to the gl context and and surface, so that it doesn't need to go through m_context to get to them (which may have been deleted). 2. Protect access to QQuickContext2DTexture::m_context with a mutex and make sure it is set to 0 in a safe manner when the QQuickContext2D object is deleted. Change-Id: Ie0a30f9fc46f844224838a7cdf2f28a62e8ce322 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Make canvas cleanup work propertly...Gunnar Sletta2014-08-013-2/+48
| | | | | | | | | | | | | | | | | | | | | Depending on which mode we are in, we need to run cleanup on the right thread and in the right way. Image canvas doesn't contain any GL resources and can be nuked right away. The actual QSGTexture is managed by the node, so we don't need to worry about it. For FBO it is a bit more complicated. - Threaded: We create a cleanup handler that runs makeCurrent deleteTexture and doneCurrent and then release the surface on the GUI thread. - Immediate: Same as threaded, just right away - Cooperative: Schedule the texture to be deleted on the next sync. The Context doesn't have its own GL context in this case, so don't worry about it. Change-Id: I2d0ae7acfa05561faa52f3cacd767eb18cabaf02 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Use the current context to resolve extensions.Gunnar Sletta2014-08-011-1/+1
| | | | | | | | | | | When updating the code to not use direct gl calls, this code was changed to use the context's gl context. The context doesn't have a context when the rendering happens on the same thread as the scene graph rendering and we get a crash. Change-Id: I8adf62c0ed12bb055982a71ba59af76afeefcca1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* qmlplugindumper: do not pop up a window if an assert is triggeredFawzi Mohamed2014-08-011-0/+11
| | | | | | | | | | On windows the debug version of qmlplugindumper used to show a panel on assert failure. Failure should be silent. Done-with: Thomas Hartmann <thomas.hartmann@digia.com> Task-number: QTCREATORBUG-12644 Change-Id: Ib5036754b37cdd5e3820e0cfd60b3ef7df3f1fb6 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix assertion: ASSERT: "hasException" in file jsruntime/qv4engine.cpp, line 933Robin Burchell2014-07-311-1/+0
| | | | | | | | | | This was seemingly tripped by trying to catch the exception twice: once with catchException and once with catchExceptionAsQmlError. Change-Id: I7176d56fe6e6f748e80d0894e314ed2b8f6e751d Done-by: Mikko Harju <mikko.harju@jollamobile.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge remote-tracking branch 'origin/stable' into 5.3J-P Nurmi2014-07-305-4/+145
|\ | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I80584b4f7d62cd86d3449e19176118e3bed886c1