diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-07-07 16:30:38 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-07-08 22:14:52 +0200 |
commit | 13764280b450c90ed65197d86cb8887d62fb13cc (patch) | |
tree | 8113b6571862b9bf3159be6b882a946ea98e3a48 /src/gui/painting | |
parent | 44653cdf4cf9469003c1278691c8f449d06a5e06 (diff) |
QFixed: add implicit conversion from long long
This will come in handy when porting some GUI code to qsizetype.
Pick-to: 6.4
Task-number: QTBUG-104818
Change-Id: I426a4f425ebd7a9fdc2d2bba97dae4c640ded97e
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qfixed_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h index f18c5d9813..823351fb63 100644 --- a/src/gui/painting/qfixed_p.h +++ b/src/gui/painting/qfixed_p.h @@ -29,6 +29,7 @@ public: constexpr QFixed() : val(0) {} constexpr QFixed(int i) : val(i * 64) {} constexpr QFixed(long i) : val(i * 64) {} + constexpr QFixed(long long i) : val(i * 64) {} constexpr static QFixed fromReal(qreal r) { return fromFixed((int)(r*qreal(64))); } constexpr static QFixed fromFixed(int fixed) { return QFixed(fixed,0); } // uses private ctor |