aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
Commit message (Collapse)AuthorAgeFilesLines
* Create QOpenGLContext with the correct screenv5.5.0-beta1Jan Arne Petersen2015-05-021-0/+1
| | | | | Change-Id: I91169e719ac97b8e32805e08d6a1f43caa897f73 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Doc: Fix linking issues in Item QML type documentationTopi Reinio2015-04-291-5/+5
| | | | | | | | | Use explicit link commands as QDoc cannot create links to single-word QML type names automatically. Task-number: QTBUG-45827 Change-Id: I048300728356d3ae9901c5c57febc683137ce090 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix rendercontrol example for screens with different dprLaszlo Agocs2015-04-281-0/+5
| | | | | | | | | | | | | | | | renderWindow() was not reimplemented in the example. This is pretty bad since renderWindowFor() fails to find a window and thus falls back to using the default device pixel ratio (which is the highest dpr present in the system). The result is broken content from Quick because it operates with a dpr of 2 any time a retina screen is connected, even when the example's own QWindow is placed on a normal screen. Add also a note to the QQuickRenderControl docs because it is easy to overlook. Task-number: QTBUG-45613 Change-Id: I31bf92ec285f3d9867a5604a4b4e3bea73791932 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix a memory leak in the material shader cache.Robert Griebl2015-04-235-5/+39
| | | | | | | | | | | There were multiple problems in the implementation of the shader cache: 1) it was not thread-safe 2) nothing was ever removed from the hash 3) since the keys into the hash are the actual shader source code, problem #2 would lead to serious memory consumption over time Change-Id: I20d1fb2074932e23f89edddba12e68ab8adcbff0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* XCB: respect QPlatformDrag::ownsDragObject().Mitch Curtis2015-04-211-1/+5
| | | | | | | | | | | | In a Qt Quick application on X11, QDrag events were deleted before their data could be passed to an external application. There was a function introduced recently to account for this problem, so we should use that instead. Change-Id: If74dd32bb8c7aa7c2e3160448af546d2e8640528 Task-number: QTBUG-45604 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* Doc: corrected some language issuesNico Vertriest2015-04-171-1/+1
| | | | | | Task-number: QTWEBSITE-628 Change-Id: I608c4fe5e18f6494cc03377080a536a01be232ca Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Speed up object creationSimon Hausmann2015-04-162-4/+4
| | | | | | | | Avoid copying url and file name twice into the context every time we instantiate an object. Change-Id: I1c76b80b9c44f95512af5899d760151f6dcd7bb5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix regressed atlas texture log output. Broken since: a49b0ad786Gunnar Sletta2015-04-161-2/+2
| | | | | Change-Id: I5df32609b45047666ea8bde500cf771736c396e5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Make sure we have enough precision to run animations for years.Gunnar Sletta2015-04-161-3/+3
| | | | | | Task-number: QTBUG-45358 Change-Id: I4af0da937253f3ae578333c659dcbb132312a9cc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Avoid running anims at 3x speed on WindowsLaszlo Agocs2015-04-131-0/+8
| | | | | | | | | | | | | When there is no render pending, renderWindow() is not called and so there is no blocking for vsync. Advancing the animations without any sleep is wrong in this case and results in animations running at 3x speed in case there is no change in the scenegraph contents. To solve this, import the threaded render loop's sleep call. Task-number: QTBUG-42699 Change-Id: I3658a827af12d4bc2ac05c7b0b29c65e9fc99675 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Do not stall loading of local images if network is slowAlbert Astals Cid2015-04-091-10/+29
| | | | | | | | | | Without this patch it can happen that we're loading IMAGEREQUEST_MAX_REQUEST_COUNT http based images, if the next image to load is a local file it wouldn't be processed until one of the http ones finishes, which makes not much sense Change-Id: I515306005192a20722f0c4588a1db1241348407c Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix TextEdit when vertical alignment != AlignTopEskil Abrahamsen Blomfeldt2015-04-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | When the TextEdit's alignment was either AlignBottom or AlignVCenter, several things would be broken: First of all the position of all non-dirty nodes would not be updated, so if you e.g. added text to the end of the document, it would overlap with the previously added text. Also, the frame decorations were always aligned to the top, since the basePosition was not accounted for in the node for this. The fix is to translate the root node to the base position instead of baking this into the position of the text nodes. This also automatically fixes frame decorations since it's already aligned to the top of the root node. [ChangeLog][TextEdit] Fixed issues with using other vertical alignments than AlignTop. Change-Id: I11f73eab21a28658a5cbf00292fd519efd0f3e7f Task-number: QTBUG-45032 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Return the correct type from Item::mapToItem/Item::mapFromItem.Mitch Curtis2015-04-081-77/+62
| | | | | | | | | | | | | | | | | | | | | Previously we were returning a JavaScript object with x/y/width/height properties, instead of a point/rect. This meant that the type couldn't be converted to a point/rect because we don't support duck typing, where we would deduce the type based on the properties. One example of a broken use case that this patch fixes is when QML is unable to convert the return type to a point in a property declaration: property point p: mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY) Another is using the result of the function to pass to another function: child.contains(mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY)) Change-Id: I3ce82f10175f904dd02c8af6b5e42cee14b2ebb2 Task-number: QTBUG-41452 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Improve debug formatting of QAbstractAnimationJob and related classes.Friedemann Kleint2015-04-022-0/+17
| | | | | | | | | | | - Output the state. - Add output to QQuickAnimatorJob. - Add a private export to the debug operator for use by QQuickAnimatorProxyJob to format its contained job. Task-number: QTBUG-45220 Change-Id: Ic64bb5d949864de1c4fb322d53acc3e253977e5d Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Improve debug operator for QQuickItem.Friedemann Kleint2015-04-021-6/+15
| | | | | | | | | | | | | | | Use new formatting helpers and output name, z only when necessary. For example, QQuickRectangle_QML_4 (this = 0xb380e0 , name= "" , parent = 0xa4a290 , geometry = QRectF(0,0 320x480) , z = 0 ) becomes: QQuickRectangle_QML_4(0xb380e0, parent=0xa4a290, geometry=0,0 320x480) Change-Id: I5d4a8cf9f435995754f875a928fa36978418e4bf Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix Text item linkColor updateMarko Kangas2015-04-011-1/+4
| | | | | | | | Changed linkColor to update node correctly when link color is changed. Change-Id: I056811053e2287c93ba9c0afb5ceddef939f46ce Task-number: QTBUG-45356 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Liang Qi2015-04-013-10/+6
|\
| * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-313-10/+6
| |\ | | | | | | | | | Change-Id: I54e66e992f5e5d441b8b5394e7a03ec5352e7bf3
| | * Don't send deferred delete events from windowDestroyed()Andy Shaw2015-03-302-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to 657766f19b31d83f361fd3c9ad717b207e1dff8c which removed it from the destructor itself. This goes one step further and removes the calls from the windowDestroyed() calls which also sends the deferred deletes. Task-number: QTBUG-40920 Change-Id: I491b79bb600914575ba5565d2862d041726217e8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Always remove reply from replies when processing cancelledAlbert Astals Cid2015-03-301-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we if we leave the entry in replies later QQuickPixmapReader::networkRequestDone will give a potentially already deleted pointer in replies.take(reply) which will then crash when trying to post something to it Change-Id: I157a58e3ebe0a3fd6422742843eafbbdc58a7801 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Android: Work around bug on Samsung Galaxy Tab 3 10.1Eskil Abrahamsen Blomfeldt2015-03-311-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After installing the Android 4.4.2 upgrade on Samsung Galaxy Tab 3 10.1, one of the vertex shaders in Qt Quick stopped compiling. The issue seems to be that this particular shader triggers a bug in the driver, and a simple work-around is to replace the ternary conditional operator with a simple if-statement. [ChangeLog][Android] Fixed a vertex shader compilation issue on certain OpenGL drivers. Change-Id: I2f878215a753a7e222c46c0f85a84b0bc81d523a Task-number: QTBUG-43515 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | | Add inheritance documentation markup to animator classes.Friedemann Kleint2015-03-311-0/+6
|/ / | | | | | | | | | | Task-number: QTBUG-45220 Change-Id: Ie817275897f860b0d6c4dcac2f92a4f3469a4611 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Honor setFocusOnTouchRelease in QQuickTextInputKai Uwe Broulik2015-03-302-9/+20
| | | | | | | | | | | | | | [ChangeLog][QtQuick][TextInput] SetFocusOnTouchRelease is honored Change-Id: I0c5150465effadb7b1221250875aedf16a83bb2c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | add qt.quick.touch.target logging categoryShawn Rutledge2015-03-301-6/+19
| | | | | | | | | | | | | | | | | | qt.quick.touch produces a lot of output. This instead tracks only the changes to the itemForTouchPointId hash: which touchpoints are being sent to which items. Change-Id: I5119b4716a43fb35fd6c6712bf7d4ec46d762a9f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Update the shader when devicePixelRatio changesPaul Olav Tvete2015-03-271-1/+9
| | | | | | | | | | | | Task-number: QTBUG-45076 Change-Id: I03de20da2e3f436339dcf48fc7d7d3d11a509577 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Another fix to avoid detaching the m_windows list.Robert Griebl2015-03-251-3/+3
| | | | | | | | | | | | | | Just like commit 310fd3ed, this fixes another unnecessary detach. Change-Id: I5108ea5112a4b0e877f86d06868375abb9a80409 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fixed a memory-leak when changing property bindings in states.Robert Griebl2015-03-251-0/+5
| | | | | | | | | | | | | | | | | | Bindings that were still stored in the revert-list when the state was destructed were not deleted before. This could lead to considerable memory leaks in big applications. Change-Id: I73250f7d03a42c25ca729c18082125fd8f3c8989 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix disappearing text in selectionsEskil Abrahamsen Blomfeldt2015-03-242-34/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 11a595e30615943cd6c63f08cc44cde7861112eb introduced a regression where selected text might disappear randomly because we changed the order the nodes were added to the list. The order is significant in cases where there is overlap, such as for painting selections. Instead of iterating over the hash and thus getting the regular nodes in random order, we make the first node with any given key the primary node, add this to the list immediately, and then just do a look up in the hash for the nodes that should be merged with it. Change-Id: Id2208ab672294aa3dd2bc9741e6c6697c2c66746 Task-number: QTBUG-45133 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | Fix inconsistent overrides. [-Winconsistent-missing-override]Sérgio Martins2015-03-221-2/+2
| | | | | | | | | | Change-Id: Ia0f3b50fd14f846c4e36cdaa12d5579902137f1b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QQuickWindow touch event compression: retain previous positionsShawn Rutledge2015-03-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | The previous positions in the delayed touch event should be from the first touchpoint which is being delayed, not updated based on subsequent updates that are being merged into it. Clarified naming and comments in this section. Task-number: QTBUG-40167 Change-Id: Ie419267e4a33277f9154bd80f5bce104e52d773e Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Allow Flickable's grab to be stolen if dragging over bounds.Andrew den Exter2015-03-191-1/+15
| | | | | | | | | | | | | | | | | | | | This allows a parent item to intercept a drag gesture in one direction when the flickable has reached it's limit in that direction without disabling the drag over bounds for drag gestures in the opposite direction. Change-Id: I6ac60113f150dbb8da42d9b5593325b04be166f5 Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* | Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Frederik Gladhorn2015-03-171-3/+2
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-171-3/+2
| |\| | | | | | | | | | Change-Id: I4c338a44c1d64c2d8e637971ab3ec6982c40a685
| | * Make sure we deref an item from its window.Gunnar Sletta2015-03-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should compare against our own window, not our parent's. The ref/deref logic for items is there to aid us with having "property var foo: Image { }" in ShaderEffects, where the property is a parentless member of a given window. The shader effect would ref all member properties which are used as samplers, giving these items the same d->window as itself. As a consequence, it is wrong to check the old parent's window when it is the item itself that knows which window it is attached to. Change-Id: Ic34354fd86b52a7334f9757bf408bef0e25ecfd5 Task-number: QTBUG-43376 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | | Repeater: Don't rely on the createFrom variableJørgen Lind2015-03-172-51/+45
|/ / | | | | | | | | | | | | | | | | | | | | | | since this breaks for asynchronous models, because item creation order is not guaranteed. We always have the index for what item to create, so we do not need it either. Change-Id: Ib8ce25ac342f5cce4784c56e6a91cf70136566b3 Task-number: QTBUG-38879 Task-number: QTBUG-39001 Task-number: QTBUG-44250 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* | Fix usage of QtQmlDevTools private headers on OSX with framework buildsSimon Hausmann2015-03-163-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this module borrowed its private headers from QtQml, so that when writing QT += qmldevtools-private, you'd get the private headers from QtQml. This doesn't work when QtQml is built as a framework. A cleaner solution is to give this module its headers proper by letting syncqt create the forwarding headers correctly (and consequently also include them in make install). In order for this to work, the included headers themselves cannot include any headers from QtQml, which this patch also takes care of, through a centralized inclusion of qv4global_p.h. Change-Id: I9bb8337956a2774cfaca6b338369face6c6ee785 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | PathView: use qt.quick.itemview.lifecycle logging categoryShawn Rutledge2015-03-131-3/+17
| | | | | | | | | | | | | | | | It is the same for debugging delegate cycling in ListView. Task-number: QTBUG-42716 Change-Id: I54b83a25a5d8473c643cd326fe114317103bb24e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Handle context loss in the threaded render loopLaszlo Agocs2015-03-123-0/+21
| | | | | | | | | | Change-Id: I3f9219dd2fed15094c2f7d670a981406e601959b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix flickable stealing gestures when height >= contentHeight.Andrew den Exter2015-03-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or width >= contentWidth. If newY is equal to both maxY and minY then the second assignment to rejectY can clobber the first. Changing the second assignment to an |= means rejectY is true if either is true. Secondly maxY became positive when height was greater than contentHeight instead of having a maximum of 0, which ensured rejectY evaluated to false in the case newY <= maxY and the mouse was stolen. Change-Id: I6416d0e23c3ef898887a7b3e3fcdc1dc12853548 Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* | Doc: Removed the release notes for Qt Quick and Qt QmlVenugopal Shivashankar2015-03-092-456/+2
| | | | | | | | | | | | | | | | | | | | | | | | These pages were not maintained and were duplicating info. provided in the what's new page provided for each release. Change-Id: I2ee4010de22ef3fb394e3bcdb6adb15db59a2cc9 Task-number: QTBUG-43235 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Sami Makkonen <sami.makkonen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Reduce number of allocations when constructing text nodesEskil Abrahamsen Blomfeldt2015-03-092-36/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where you have a huge number of text elements that can be merged, we would do a lot of reallocations (one per node that would be merged into another). As the number of merges grew, this seemed to converge at about 50% of the time spent in updatePaintNode() in the text classes. We can almost eliminate this cost by only doing one realloc per node that will actually end up in the scene graph. This patch does a first pass where it simply bundles together nodes that can be merged. Then it does a second pass where it actually merges the nodes. In this second pass it can easily precount the required size of the arrays and we can limit it to a single realloc. Task-number: QTBUG-37365 Change-Id: I4e44c01cd83df39304cbbce34f3b8f773763e091 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Implement cache property for QQuickAnimatedImageDaiwei Li2015-03-062-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some longer and larger .gifs can consume a lot of memory if every decoded frame is cached. Just as the backing QMovie provides the ability to not cache frame, so should AnimatedImage. This also allows a workaround for some animated image types that can contain loops that aren't handled correctly (QTBUG-24869) to not leak memory. Change-Id: I0639461d75bb2c758917893e7a6ae5c215fffa9d Task-number: QTBUG-44447 Task-number: QTBUG-24869 Task-number: QTBUG-28844 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Frederik Gladhorn2015-03-063-2/+8
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-033-2/+8
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4numberobject.cpp Change-Id: I4e66a03ef4d99cec192c9da30c028fd8c1f4ac0d
| | * Fix crash in overdraw and change visualizersDaiwei Li2015-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It appears to be possible for node->element()->batch to be NULL Task-number: QTBUG-43129 Change-Id: If6e4e265a02ee305bf3aa9cad387b7a73648367a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Fix memory leak of QSGContext object in QSGThreadedRenderLoopjian liang2015-02-242-0/+6
| | | | | | | | | | | | | | | | | | | | | Add destructor for QSGThreadedRenderLoop to destory QSGContext object. Change-Id: I479947eb35a5d7888d45655a9b8e2ece5e30bc33 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | TextEdit: Block's update should update paint nodeRuslan Nigmatullin2015-03-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTextEdit::invalidateBlock method marks nodes as dirty but doesn't call QQuickItem::update(). Because of that it's impossible to rehighlight text by QSyntaxHighlighter. Task-number: QTBUG-44765 Change-Id: Ibfd973430cf00927dbec027d129c6d722634575e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | | Fix invocations of static methods of QGuiApplication/QCoreApplication.Friedemann Kleint2015-03-0514-43/+44
|/ / | | | | | | | | Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Use of fullsize distance field textures should be font-dependent.Michael Brasser2015-03-031-7/+1
| | | | | | | | | | | | | | | | | | | | This shouldn't be a static decision as the glyph count depends on the font. Change-Id: I67ea98595505df4a3a30b16e867e76f89b28c1ef Task-number: QTBUG-29264 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Avoid assert in rich text when img width is invalidEskil Abrahamsen Blomfeldt2015-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If you set the width or height of an <img> tag to something invalid, this will be registered as -2 by the HTML parser. We should treat this case the same as if there is no width/height specified and use the implicit size instead. [ChangeLog][Text] Fixed assert when setting an invalid width or height on an <img> tag in a text element. Change-Id: Iae8c33fa184316632f72318e71f26ab005645a21 Task-number: QTBUG-44743 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>