From 3ddcb2b33e664b234dca57201cc85398c4b7bbd1 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 7 Jul 2022 16:30:38 +0200 Subject: [PATCH] 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 (cherry picked from commit 13764280b450c90ed65197d86cb8887d62fb13cc) Reviewed-by: Thiago Macieira --- src/gui/painting/qfixed_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h index 4645031253a..f3718a097e5 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