From 2e30ebc8251addfeaa24ef0cb8fc313e096a804a Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Wed, 23 Oct 2024 21:52:02 +0200 Subject: [PATCH] fix: qt5 --- src/messages/layouts/MessageLayoutElement.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/messages/layouts/MessageLayoutElement.cpp b/src/messages/layouts/MessageLayoutElement.cpp index 50b8126df..0031348d6 100644 --- a/src/messages/layouts/MessageLayoutElement.cpp +++ b/src/messages/layouts/MessageLayoutElement.cpp @@ -516,7 +516,8 @@ int TextLayoutElement::getXFromIndex(size_t index) int x = 0; for (size_t i = 0; i < index; i++) { - x += metrics.horizontalAdvance(this->getText()[i]); + x += metrics.horizontalAdvance( + this->getText()[static_cast(i)]); } return x + this->getRect().left(); }