aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a QQuickWidget - QQuickView comparison exampleLaszlo Agocs2014-06-1911-1/+1201
| | | | | | | | | | Besides serving as a side-by-side test tool for QQuickView and QQuickWidget (including multisampling), it also demonstrates some useful practices for rendering 3D content via QQuickFramebufferObject. Done-with: Paul Olav Tvete <paul.tvete@digia.com> Change-Id: Ie73e998ee91e32ef1535dd6f0f65c8a69addcc5e Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix crash in QObjectWrapperOleg Shparber2014-06-191-0/+2
| | | | | | | | | | | This can happen during QObject destruction, when QObjectPrivate::deleteChildren() itself sets entries in the children list to zero when deleting. These zeros cause crash in markChildQObjectsRecursively(). Task-number: QTBUG-38635 Change-Id: I29ad9e793b78ca4e8d73fbb125f46db1b8292f20 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Use QSignalSpy instead of waitFor in tst_qpacketprotocolUlf Hermann2014-06-191-2/+7
| | | | | | | | | | | | | | | | | QTcpServer::waitForNewConnection() blocks the event loop and prevents the client, that runs in the same event loop, from sending anything. Also, if the connection is established before waitForNewConnection() is called we're going to wait for another connection, which will never happen. It's not clear if this is actually the cause of the test failures but blocking the event loop is generally a bad idea and the last change to the test that actually made a difference to the functionality added exactly that line, see b36bbe3626bc68ac267d7653fa6408a8f258251d. Task-number: QTBUG-39655 Change-Id: Ic03a4e7cac78155532588476b99449664c343ee2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Bump versionOswald Buddenhagen2014-06-181-1/+1
| | | | Change-Id: I48d18a93971f4595b295aa6a1f70dfbe2b2266a1
* Separate renderer out in "OpenGL under QML" example.Gunnar Sletta2014-06-163-104/+115
| | | | | | | The example was promoting very bad practice. Change-Id: Ibb83780ec33e59ee5aabf65a775705dd0da681e6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Use newest QtQuick in rssnews demoNiels Weber2014-06-165-10/+10
| | | | | | Task-number: QTBUG-37203 Change-Id: I720e510b875f63eb5c184cd7d8b9eb127674d505 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Merge remote-tracking branch 'origin/stable' into 5.3Sergio Ahumada2014-06-141-0/+8
|\ | | | | | | Change-Id: Id783915b0139a90ecfb99f8298b1ff5cf506a1dd
| * Fix copy-paste errors.Richard J. Moore2014-06-140-0/+0
| | | | | | | | | | | | | | | | | | | | Fix two copy-paste errors identified by static analysis at http://www.viva64.com/en/b/0251/ Change-Id: I359a4635a4a837995f9ed9bf0182a1ca543725df Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Fix Stmt:Data object leakLiang Jian2014-06-131-0/+8
| | | | | | | | | | | | | | | | | | call Stmt::destroyData() whenever a Stmt object is to be removed in BasicBlock to delete the Stmt::Data object hold in the Stmt object. Change-Id: I59c939d79b935153e6f8613e54f149120f5198f5 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Merge remote-tracking branch 'origin/stable' into 5.3Simon Hausmann2014-06-133-73/+136
|\| | | | | | | Change-Id: I9cff3f4d42d58157fd8d17ec172b6a74dc386508
| * Fix EllipseShape for Affectors in QtQuick.ParticleDaniel Oberländer2014-06-121-1/+7
| | | | | | | | | | | | | | | | | | EllipseShape was theated like rectangles if set as shape in an Affector due to an unimplemented containment check (was marked as TODO in source code). This fix implements the missing check. Change-Id: I8df1406f147c56e799531fccf4963110c9fdd8ef Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| * Further improve the StocQt demoTopi Reinio2014-06-112-72/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Display the price scale on y-axis, highest trade volume on x-axis - Adjust grid size for the chart based on the active view - Fix incorrect drawing of volume data - Correctly scale the chart based on the price/volume ranges - Align the volume graph to the price chart and improve its look - Use Date.toDateString() instead of hardcoded month names - Minor fixes to layout Task-number: QTBUG-38254 Change-Id: I0e7ef18a152c7678371fb9c01f86d3d91a289472 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
* | Set StrongFocus on QQuickWidgetLaszlo Agocs2014-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Make text input functional out of the box. Both QGraphicsView and QDeclarativeView (QQuick1) do this so there is no reason to do this differently for QQuickWidget. For QQuickWindow and QQuickView the issue does not exist in the first place, they will accept the focus by default. Task-number: QTBUG-39605 Change-Id: I74f01b85342df51aa3c0e80baf58ba1619c63438 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Doc: Clarify where JavaScript fits in QML codeSze Howe Koh2014-06-132-47/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rewrite the introductory list. - Rewrite the section about application startup code. - Flatten sections. Previously, there were two \section1 headings: "JavaScript Expressions in QML Objects" and "Running JavaScript at Startup". This split wasn't very natural, as startup code needs to be called from an object, while imported JS files aren't in objects. - Some minor formatting/wording changes in unrelated areas. Change-Id: Ie08f94e2ea77ca84f80491c782bc30612f7ef698 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Initialize QSGPaintedNode with an empty size.Gunnar Sletta2014-06-121-1/+0
| | | | | | | | | | | | | | | | | | | | Failing to do so would cause it to not update its size when set to 1x1 which in turn would cause it to never update its texture, causing crashes later during rendering. Task-number: QTBUG-39555 Change-Id: I099d9ef2d6968ece21f7c03819abfd6685bec430 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Add node description to painted items.Gunnar Sletta2014-06-121-0/+4
| | | | | | | | | | Change-Id: I47ad9df1550649131ac5379acbf7d133088c60a8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Make sure shader rewriter stops immediately on an empty string.Gunnar Sletta2014-06-121-3/+1
| | | | | | | | | | | | | | | | | | The 'invalid' token didn't really serve a purpose. If a string contains 0 for any reason, it one has reached the end. Task-number: QTBUG-39505 Change-Id: I3fc9b8f28dc223386a72bbfa28f70fcca0fde223 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Fix forwarding of keyboard events to multiple target itemsJoni Poikelin2014-06-112-1/+7
| | | | | | | | | | | | | | | | | | | | Fix regression when multiple items are set to Keys.forwardTo attached property. QML items accept key events automatically and event should be by default in accepted state when entering handler. Task-number: QTBUG-39168 Change-Id: Ibf6c163c4059269996113634efa48ad2fe4d838d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into 5.3Sergio Ahumada2014-06-1110-75/+204
|\| | | | | | | Change-Id: I595002245ffee7aa739ce6ee9806cf509a5e7405
| * Drag&Drop support for child items in QQuickWidgetPaul Olav Tvete2014-06-101-1/+6
| | | | | | | | | | | | | | | | This is a quick-fix. The real issue is that QWidget and QWindow reacts differently when a QDragEnterEvent is rejected. Change-Id: I3e3e50610c14acfaada9c1b243b88cfe9eae54b2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Stop polish-and-sync timer when the window is destroyedLaszlo Agocs2014-06-101-0/+2
| | | | | | | | | | | | | | | | | | | | The threaded render loop continues to run the polish-and-sync timer for ever in case the QQuickWindow is destroyed while the timer is active. Instead of pumping the timer events on the render thread for ever, the timer has to be killed somewhere. Change-Id: I8e458624e26ebfacb6cc69a4f2fbb3da57ae5e0e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * add missing signal declaration in Exposing Attributes to QML exampleShawn Rutledge2014-06-101-0/+2
| | | | | | | | | | | | Task-number: QTBUG-33985 Change-Id: Id6a2a51467ee5de44bf51fb48e3f9346a832f8f2 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Add support for multisampling in QQuickWidgetLaszlo Agocs2014-06-063-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Keep QML and JS messages separate in QQmlProfilerService testUlf Hermann2014-06-061-46/+52
| | | | | | | | | | | | | | | | | | Like that we can deal with misbehaving clocks in the tested application. Task-number: QTBUG-39169 Change-Id: Ia9f9844efb6f20508bccac3ca2d593d01d55fc83 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * V4 Yarr JIT: push/pop addressTempRegister.Erik Verbruggen2014-06-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | Change 6572d4e50d73ac60a8974d07de74c27a7f99ebef moved the addressTempRegister from r3 to r10, so that calculated calls would not overwrite the fourth argument of a call. However, JSC's Yarr JIT might also use it for certain loads, so it also needs to save r10. Task-number: QTBUG-39289 Change-Id: I0a4e725b6b11ab5e772330662049668bed009c05 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix opacity issue in the renderer.Gunnar Sletta2014-06-053-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given the following tree: OpacityNode | TransformNode (which is a batch root) | GeometryNode If both opacity and transform nodes were changed this frame, we would hit the optimized "scrolling" path while traversing the tree and abort updating that subtree. As a result the opacity change was not propegated to the geometry node and it would be rendered incorrectly. Fix this by skipping the optimized path when there are opacity changes in an ancestor. Task-number: QTBUG-39190 Change-Id: Ieaebfe3de62b961204bd3103fe9913d60e75e412 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix QQuickWidget offscreen surface format and creation orderLaszlo Agocs2014-06-052-16/+10
|/ | | | | | | | | | | | | | | | | | | 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>
* Doc: Removed redundant link to section in the same page.Jerome Pasion2014-06-051-5/+3
| | | | | | | | There is no need to refer to a different section as it is understood that those instructions apply to all examples. Change-Id: I2d0d2d6cbf84790bc4ca2f3deda57ab5d3d1c6c1 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Updated "Qt Quick Examples" pages.Jerome Pasion2014-06-0519-188/+448
| | | | | | | | | | | -added instructions about running the example (using \include) -used the example names as sections in the collection pages -general editing and documentation polishing -updated copyright information Change-Id: I044f29fcc1921a541040505d5821acb06dc4cb35 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Detect and warn when using QQuickWidget as a native childLaszlo Agocs2014-06-051-0/+6
| | | | | | | This is not supported. Change-Id: I19ed485ee629baa4f3631770ab0c730e0ef6748e Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Use the correct precision specifier in visualizer GLSL.Gunnar Sletta2014-06-041-1/+1
| | | | | | | Task-number: QTBUG-39119 Change-Id: I0ec4909167f5694ce4229df8202c89742be21d0a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Fix bindings to when property of States not always workingSimon Hausmann2014-06-041-0/+1
| | | | | | | | | | | | | | | | | | The "when" property is of type QQmlBinding* and we special case that type when writing property bindings. However in order for that to work, the meta-type for QQmlBinding* needs to be registered at the point in time when resolving properties in the type compiler. In Qt 5.1/5.2 this worked by accident due to a different code paths that implicitly registered the meta-type earlier from a different location. There are a couple of property types for which we have special handling, such as QQmlV4Handler and QJSvalue, besides QQmlBinding*. We do register them explicitly at engine initialization time, and therefore we should also initialize the meta-type for QQmlBinding* there. Task-number: QTBUG-39421 Change-Id: Iec8609848b632afa52aa42cf0b807330c74f6f3a Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
* Fix method overload calling of Qt slots from JavaScriptkh12014-06-042-4/+53
| | | | | | | | | | | | | | | | | | | | After commit ac57f185d1a2203cd4b585df7bd7af01c3ec33ed we succeed in selecting the correct overload based on the supplied arguments. However when calling slots on objects without a property cache, we end up using the local "dummy" variable to store the synthetic propert data. We also store the currently best patch in the "best" variable, which is a _pointer_ to the property data of the match. Suppose we have 5 overloads to choose from, we find that the 3rd is the best. Then we try the fourth but find it unsufficient and break out of the loop. Unfortunately the "dummy" property data at this point contains the data of the fourth (wrong) overload, and our best match variable points to it. So then when we finally call the method, we do it based on the wrong property data. The easy patch is to simply copy the few bytes of property data, so "best" is stored by value instead of pointer. Change-Id: Ie2ebbdb88a117770b6c7b9490e1c634077020e9d Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
* Make ItemViews displayMargin work correctly when set to negative valuesAlbert Astals Cid2014-06-046-3/+322
| | | | | | | | | We need to call forceLayoutPolish instead of refillOrLayout so that the visibility is correctly updated. Also update one line that sets visibility in GridView Change-Id: I29fa67cdd5196a744fab9507b4104cb83ad4bf5e Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix worker scripts with cached compilation unitsSimon Hausmann2014-06-041-23/+31
| | | | | | | | | | | | Try to retrieve them from the compilation unit cache instead of from the file system if possible. The evaluation code can be shared. In the long run it would be nice to use the type loader here and allow for worker scripts to have dependencies/imports. But that is a more intrusive change given the typeloader's dependency on the engine. Change-Id: I7f9d6be1ff31433d4b14607cf0c25acdf466ac67 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QQuickRenderControl usable (still private)Paul Olav Tvete2014-06-034-2/+22
| | | | | | | | | | | | QQuickRenderControl needs a QQuickWindow in order to function. This required the use of a private QQuickWindow constructor, meaning that only friend classes of QQuickWindow could use QQuickRenderControl. This change adds a factory function, QQuickRenderControl::createOffscreenWindow(). Task-number: QTBUG-38996 Change-Id: I92f6f1f60045934f3dd33c300352247852463c73 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix crash in QSGRenderContext::invalidate().Yoann Lopes2014-06-031-0/+3
| | | | | | | | | | | QSGRenderContext was holding pointers to QFontEngines without increasing the font engine's ref count, allowing them to be deleted before QSGRenderContext could make use of them. Task-number: QTBUG-36573 Task-number: QTBUG-38313 Change-Id: I0ed28bb44882c55f330c27c23b533b7999d7e04b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Prevent initial clipping in Context2DUlf Hermann2014-06-033-11/+9
| | | | | | | | | Don't set an initial clip path and only start clipping once a clip path has manually been set. Task-number: QTBUG-39114 Change-Id: Id277775d6eb0be87bead0e5d076f32a07ebdfe5c Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Recognize "in" keyword in vertex shadersLaszlo Agocs2014-06-031-2/+8
| | | | | | | | | Checking only for "attribute" is not sufficient: with newer GLSL versions "in" is used. Task-number: QTBUG-39143 Change-Id: Ibdb5940f5aba1485ecaad2e2c4a3aa7150af6d99 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Destroy the FBO in QQuickWidget while a context is currentLaszlo Agocs2014-06-031-2/+2
| | | | | | | | | | | | | When creating the new FBO, it will try to restore the previous FBO after initialization. The internal tracking of the current FBO goes horribly wrong when a QOpenGLFramebufferObject is destroyed with no context current. In 5.4 the problem is solved by removing the tracking altogether. Here QQuickWidget is fixed to play nice and destroy QOpenGLFramebufferObject always with the context current. Task-number: QTBUG-39389 Change-Id: Ic6917696ed61f284d661a578c9c7f2e0673c412d Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix QQuickWidget cleanup and invalidation sequenceLaszlo Agocs2014-06-033-18/+27
| | | | | | | | | 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>
* Dump all received messages if tst_QQmlProfilerService failsUlf Hermann2014-06-021-0/+21
| | | | | | | | Without all the context we can't really tell what happened. Task-number: QTBUG-39169 Change-Id: Ic5192498440a0d55c279549243dfce65f8168317 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Disable qmlscene and qmlplugindump when doing static buildsSimon Hausmann2014-06-021-1/+1
| | | | | | | | | | | Both of these tools rely on the ability to load plugins in order to function. QmlScene in particular can theoretically be used with just "QtQml" imports and QObjects, but that's not very useful for the _scene_ type of applications qmlscene is intended for ;-). And in a static build it can't load QtQuick. Task-number: QTBUG-39003 Change-Id: I0d4328dc4eb5c4e3153668e65a12f8eb3757f660 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Keep the internal state about the bound fbo up to dateLaszlo Agocs2014-06-021-1/+3
| | | | | | | | | | | | | | | | When binding an FBO directly via glBindFramebuffer, the QOpenGLContext's internal current_fbo, that is maintained by QOpenGLFramebufferObject, becomes out of sync. This will lead to QOpenGLFramebufferObjects thinking they are still bound. This fix prevents ShaderEffect items in QQuickWidget from complaining about "'recursive' must be set to true when rendering recursively". Ideally the entire tracking of the current fbo should be removed, since it cannot be done robustly enough, but that will likely happen in 5.4 only. Task-number: QTBUG-38994 Change-Id: I39015d90bb2e0985d2a084b79ffe2004a9bc9f07 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QNX: Fix qquicktext auto testBernd Weimer2014-05-302-2/+7
| | | | | Change-Id: I06acf7dcd6e83c6b665163f4eb9e5ee55ecf85b2 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix potential null pointer dereferencingFrederik Gladhorn2014-05-306-11/+17
| | | | | | | | | These were found by http://www.viva64.com/en/b/025 most issues are rather cosmetic. Change-Id: I7cc12610aae6a43d26bedb9b480863c0695ddfa3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix copy and paste errorFrederik Gladhorn2014-05-301-5/+0
| | | | | | | | | Fix first error "Null pointer dereferencing" identified by static analysis from http://www.viva64.com/en/b/0251/ Change-Id: I984d6ac2c22fddfe5ccb507f5d95d3329bed0563 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix AccessibleAttached property documentationFrederik Gladhorn2014-05-301-55/+102
| | | | | | Task-number: QTBUG-37908 Change-Id: Ib8cfa284c2be522628359f7585b0a96addfd5ed4 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Don't add the database before verificationRob Hoelz2014-05-291-1/+1
| | | | | | | | | | | | | | | | The local storage facility exposed to QML has a bug; if you attempt to open a versioned connection, the version is wrong, and you try to handle that error, the connection is still stored in a connection pool, but in an unopened state. The next time you attempt to connect, no matter if you have the version right or not, the database handle will complain about being unopened. See also http://qt-project.org/forums/viewthread/38458/ Task-number: QTBUG-38543 Change-Id: I921b94621009f4968144e1cc513c17b4924a792a Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix emission of QQmlListModel::rowsAboutToBeXxx() signalsJ-P Nurmi2014-05-293-4/+172
| | | | | | | | | | | | | | | Call beginInsertRows(), beginMoveRows() and beginRemoveRows() before the change to ensure that rowsAboutToBeInserted(), rowsAboutToBeMoved() and rowsAboutToBeRemoved() get emitted before the change as appropriate. NOTE: This patch solves the problem for the most common use case, when ListModel is used without WorkerScript. QQmlListModelWorkerAgent needs similar changes in order to fix the signals when ListModel is used with WorkerScript (QTBUG-39321). Task-number: QTBUG-39279 Change-Id: Idec5167d70b242f6f7d8b7cff008e130afc62505 Reviewed-by: Alan Alpert <aalpert@blackberry.com>