summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/ltcg.prf
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2019-03-05 00:17:43 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2019-05-14 19:31:41 +0200
commit7ae2f47214408fb37ccb52d1fa659cc47a63443b (patch)
tree2196bc161c30fa9b9238aa828a6219e4070d857c /mkspecs/features/ltcg.prf
parent09a2a9bc4a4a5c9ef7849d3f30243cd8e2d389d1 (diff)
QHighDpi: Replace fromNative()/toNative() with scale()
We need one scale() function for each type: the scale factor can be inverted by the caller for the fromNative case. Add a generic templated implementation which will handle simple types. Add add specialization functions for compound types that don't have operator*(), as well as for position types (e.g. QPoint) which account for the origin. There's no need for fromNativePixels() and toNativePixels() overloads for each type; replace with generic implementations which call scale(). Do the same thing for fromNativeLocalPosition(). Some user code is calling fromNative()/toNative() directly, so leave a definition of those functions around for now. Also leave a couple of one-off scaling functions which do not fit the pattern. Also fix “narrowing conversion scaleFactor to int” warning for the QMargins scale function. Change-Id: Ia67accbb670a80dc1747c2e264b97aab75b1251b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'mkspecs/features/ltcg.prf')
0 files changed, 0 insertions, 0 deletions