aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrectangle_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QQuickRectanglePrivate: set gradient QJSValue to undefinedMitch Curtis2019-04-041-1/+1
| | | | | | | | | | | When 1771d298 changed gradient from a QQuickGradient* to a QJSValue, it forgot to also change how it was initialised, with 0 causing QJSValue to consider itself a number, and hence trigger the warning added to QGradient in 3b7db8ac90b. Change-Id: I83377c40984f596f56645aea467b74de1a152b62 Fixes: QTBUG-74911 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Teach Rectangle's gradient property to accept QGradient::PresetTor Arne Vestbø2018-07-101-1/+1
| | | | | Change-Id: Id640b596c1d8d52221f2f2be8807d6e245971bdc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Revert "QQuickRectangle: Optimize setGradient"Robin Burchell2017-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9709d04ba7787c853a1ddbeed0347eab27c0924f. We changed this from using a signal for notification to using parenting. But this cannot be done for two related reasons: the first: QtObject { property Gradient someGradient: Gradient { id: someGradient } } ... Rectangle { gradient: someGradient } ... should work, and no longer did, because the Gradient's parent was the QtObject, not the Rectangle it was tied to. And secondly: Rectangle { id: rectOne gradient: Gradient { id: someGradient } } Rectangle { id: rectTwo gradient: someGradient } ... also didn't work anymore, as the Gradient was only notifying a single Item about changes to it. The easiest way to fix this is to just revert back to using a signal connection. This also caused problems in qtquickcontrols autotests. Change-Id: Ic07dd02e9920596d0c047bfc23995b3be8c96c49 Task-number: QTBUG-60268 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickRectangle: Optimize setGradientRobin Burchell2017-04-281-1/+0
| | | | | | | | | | | | | | | | | Similarly to the QQuickPen optimization, we can avoid a signal connection by using the parent pointer of the QQuickGradient. This improves qmlbench's delegates_rect_gradient.qml by ~6% for me: Before: 300.6 frames; using samples; MedianAll=301; StdDev=4.61519, CoV=0.01535 After: 320.4 frames; using samples; MedianAll=321; StdDev=1.94936, CoV=0.00608414 Again, hopefully, the resulting lessening in allocations and improvement in performance will help stabilize the benchmark a little on some systems, as well as the improvement to performance and memory use. Change-Id: Id8e0399f5a4a0ef55d7fc9b8f100af229f389ddd Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* QQuickRectangle: Use parenting on QQuickPen to speed up pen changesRobin Burchell2017-04-281-1/+0
| | | | | | | | | | | | | | | | | | We know that signal connections are slow, so let's not use them. QObject has a parent pointer sitting there that looks nice and ripe, so: let's set the parent pointer ourselves, and call update() via QQuickPen. This improves delegates_rect_border.qml on my mbp by ~5%: Before: 394.6 frames; using samples; MedianAll=395; StdDev=2.30217, CoV=0.00583419 After: 417.4 frames; using samples; MedianAll=417; StdDev=1.67332, CoV=0.00400891 ... and should additionally decrease memory (no more signal connection). Hopefully, the decrease in allocation and increase in performance might also help with stability, since some systems seem a little flappy with this one. Change-Id: I885654d606bc77d2949b9db81217426cf367b081 Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* QQuickRectangle: Inline a method into its sole callerRobin Burchell2017-04-251-14/+0
| | | | | | | No point separating this out, and prepares us for a cleanup. Change-Id: I051d94a3a8f00525123de6d47d328cafe7623bba Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make Rectangle border be inner instead of centered on the outline.Samuel Rødal2012-10-221-3/+1
| | | | | | | | | | | | | This avoids awkward situations such as when clipping to a parent item of the same size and makes it easier to reason about the bounding rectangle of the item. Task-number: QTBUG-21341 Change-Id: If015cfbc5792429f4a407fc0547ea71eca779eda Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Avoid string-based lookup of signalsKent Hansen2012-06-011-1/+2
| | | | | Change-Id: I5b83b5d07b6a5d2de86d0f37471cf59baa7b0e43 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-1/+1
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove commit headersAaron Kennedy2012-02-201-1/+0
| | | | | | | | These were used when we were porting from QtQuick 1 to QtQuick 2 but are no longer necessary. Change-Id: I0eeb7e13b4affdd6ab6c6dddea760afcdf38ee4f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+103
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>