aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickicon.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QQuickIcon: prevent detach-ing when there is nothing to changeKonstantin Ritt2019-09-101-0/+13
| | | | | | | saves a bunch of pointless detach attempts on each deep-copy Change-Id: Ibb1ae99bd54b2d35f9c9aa9e541fb03891ad94ec Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: properly resolve implicit values - take 2Konstantin Ritt2019-09-101-6/+6
| | | | | | | | | | | This is a follow up of 382531ab5e2270833d3805c57c00ebcf6b24d635, and amends 1241c80eca725c9ac46a0b94d6bdec11a5d00302 . when the property has not been set explicitly, the resolved mask must not contain a respective bit set either Change-Id: I45a334b51fce09ead8e30fe3326a94f35b0f4f56 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-5/+5
|\ | | | | | | Change-Id: Ifa88045268cdaa1adc0b1e206d5e20a3721d3837
| * QQuickIcon: properly resolve implicit valuesKonstantin Ritt2019-09-061-5/+5
| | | | | | | | | | | | | | | | when the property has not been set explicitly, the resolved mask must not contain a respective bit set either Change-Id: Iab0bd600b5bf458e26ed4601d4d2f608021f1518 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickIcon: Add support to cache a pixmapMikhail Svetkin2019-01-221-1/+27
|/ | | | | | | [ChangeLog][Controls] Added cache property to icon. Change-Id: I9b3410e74ab8962d039939a8e005a2aff8e026cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Templates: use C++11 default member initializationJ-P Nurmi2018-05-041-12/+4
| | | | | | | | | | | The code is more readable and less error-prone (this patch caught a few uninitialized members) when the members are initialized in the same place where they are declared. In many cases, empty default destructors can be entirely removed, and we get faster implicitly declared inline default constructors defined by the compiler. Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make AbstractButton's icon properties win over Action's when both are setMitch Curtis2018-02-051-1/+81
| | | | | | Task-number: QTBUG-65193 Change-Id: Idff23dcc35f3c3fe41406678613b022098149318 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Make QQuickIcon a value typeJ-P Nurmi2017-05-101-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickIcon no longer inherits QObject, but becomes a light-weight implicitly shared Q_GADGET-type, that is passed by value the same way fonts and colors are. Before: SUB: OS: Fedora 25 (Workstation Edition) SUB: QPA: xcb SUB: GL_VENDOR: Intel Open Source Technology Center SUB: GL_RENDERER: Mesa DRI Intel(R) Haswell Desktop SUB: GL_VERSION: 3.0 Mesa 13.0.4 SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 110 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: 109 frames SUB: Average: SUB: 109.2 frames; using samples; MedianAll=109; StdDev=0.447214, CoV=0.00409536 After: [...] SUB: running: benchmarks/auto/creation/controls/delegates_buttoncontrol2.qml SUB: 123 frames SUB: 124 frames SUB: 124 frames SUB: 122 frames SUB: 125 frames SUB: Average: SUB: 123.6 frames; using samples; MedianAll=124; StdDev=1.14018, CoV=0.00922472 Change-Id: I604532204fb94fc0726d0c9b8b6097f9ebc265e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: fix the type of the source propertyJ-P Nurmi2017-04-241-3/+3
| | | | | | | | | | | | | | | | | | | For example, something like: Button { icon.source: "../images/drawer.png" } did not work in the Gallery example, even though it works fine for Image elements etc. The URL needs to be resolved relative to the caller. By making the property an URL instead of a plain string, the QML engine does the correct thing automatically. Note: icon.source.length no longer works in auto tests, so it got replaced by a compare(). Change-Id: I5fdb3aa55003d2f04e5458b7636e4dae3fa9857c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIcon: pass signal argumentsJ-P Nurmi2017-04-031-5/+5
| | | | | | | | This makes it possible for QQuickAbstractButton to sync its icon with the icon from QQuickAction by simply connecting signals to the setters. Change-Id: I6b944dd598d66389bdb06f4f2874aa813c1246c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickIcon::colorJ-P Nurmi2017-02-201-1/+24
| | | | | | | | | This will be used by the built-in styles to visualize various states (gray when disabled, accent color when active...) and can be also set or overridden by the users. Change-Id: I293348415d7e66dea163190cdf35d60ce5407b5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickIconMitch Curtis2017-02-091-0/+128
This adds the initial API needed to add support for setting icons on buttons, etc., and is also necessary for action support. Follow up commits will add the actual support for icons. Change-Id: I9ab892aa4fe43210e7b18bed3e0ebcec2edb9c91 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>