From 8e7d7a6064ff3038270b1dc19d2feb7814f63db2 Mon Sep 17 00:00:00 2001 From: Xnuk Shuman Date: Fri, 5 Jul 2024 08:44:32 +0900 Subject: [PATCH] fix qt6 build --- src/frontends/qt5/src/input_context.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt5/src/input_context.cc b/src/frontends/qt5/src/input_context.cc index 8ac34f12..0f157b6f 100644 --- a/src/frontends/qt5/src/input_context.cc +++ b/src/frontends/qt5/src/input_context.cc @@ -99,7 +99,9 @@ void KimeInputContext::preedit_str(kime::RustStr s) { fmt.setFontUnderline(true); QString qs = QString::fromUtf8((const char *)(s.ptr), s.len); this->attributes.push_back(QInputMethodEvent::Attribute{ - QInputMethodEvent::AttributeType::TextFormat, 0, qs.length(), fmt}); + QInputMethodEvent::AttributeType::TextFormat, + 0, static_cast(qs.length()), fmt + }); QInputMethodEvent e(qs, this->attributes); this->attributes.clear(); QCoreApplication::sendEvent(this->focus_object, &e);