aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2/qquickiconimage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QQuickIconImage: fix crash with image providersJ-P Nurmi2017-10-231-2/+1
| | | | | | | | | | | | | QQuickImageBase::load() cannot call until the component creation is completed, because it requires an associated QML engine. All calls to updateIcon() are guarded with the appropriate isComponentComplete() check, but the sourceSizeChanged() signal was connected directly to updateIcon(). Establish the signal-slot connection at component completion to avoid calling updateIcon() to soon. Task-number: QTBUG-63959 Change-Id: I3c935291796dbae031d2728e1d51c55596a51cd0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIconImage: use QQuickPixmap::width/height instead of implicitSizeMitch Curtis2017-05-031-1/+1
| | | | | | | | | | | | | | QQuickPixmap's implicitSize is the original size of the image on disk before any scaling was done on it, which means that it doesn't account for the scaling that QQuickImageProviderWithOptions::loadSize() does. This was causing updateFillMode() to alternate between setting PreserveAspectFit and Pad when the icon color was changed. I was not able to come up with an auto test that reproduced the issue. Task-number: QTBUG-60528 Change-Id: I1cc31f0c50875d794c37a6fc76ff0942e44d271a Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQuickIconImage: fix file selectors for named theme iconsJ-P Nurmi2017-04-261-2/+10
| | | | | | | | | QQuickIconImage needs to be associated with a QML context to be able to call QQmlContext::resolvedUrl(), which in turn passes it to the URL interceptor aka. QQmlFileSelector. Change-Id: Iff34fb8316c765ac0ff04d5d7a6ab23002b31385 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickXxxImage: don't attempt to colorize null imagesJ-P Nurmi2017-04-191-4/+6
| | | | | | | | | | | QPainter threw such warnings: QPainter::begin: Paint device returned engine == 0, type: 3 QPainter::setCompositionMode: Painter not active Task-number: QTBUG-60200 Change-Id: I2cdedb7a547d0c069964929663297c969de9b2a7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickIconImage: only call updateIcon() when necessaryMitch Curtis2017-03-221-1/+1
| | | | | | | | Unconditionally updating the icon was causing binding loops when changing the spacing of a Button with icons. Change-Id: Ie8511afea7ebc365a28f954091d9cc22883d2e40 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add IconImageJ-P Nurmi2017-03-081-0/+211
This adds an internal helper item that will be used for showing icons on various controls (in follow-up commits). Change-Id: I792b423737023ba663211371f82fedb2b92857bb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>