diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-07-07 16:30:38 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-08-05 22:01:36 +0200 |
commit | 3ddcb2b33e664b234dca57201cc85398c4b7bbd1 (patch) | |
tree | c15ac82258211b25b930de3a0139fe3e022ae571 | |
parent | bb07d03e2a17fb25801f04d5b59e3ccaf827eeb2 (diff) | |
download | qtbase-3ddcb2b33e664b234dca57201cc85398c4b7bbd1.tar.gz |
QFixed: add implicit conversion from long long
This will come in handy when porting some GUI code to qsizetype.
Task-number: QTBUG-104818
Change-Id: I426a4f425ebd7a9fdc2d2bba97dae4c640ded97e
Reviewed-by: Lars Knoll <lars.knoll@gmail.com>
(cherry picked from commit 13764280b450c90ed65197d86cb8887d62fb13cc)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-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 4645031253..f3718a097e 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 |