From 4660839379a6d10ac1d2724f6ac7cf209d9e9449 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Sun, 29 Mar 2026 13:28:40 +0200 Subject: [PATCH] fix: update message length when completing (#6856) When the completer completes, we block all signals. However, we do want to broadcast a text-changed signal. Since we can't unblock individual signals, we unconditionally emit a signal after we unblock all signals. This might come with some side-effects when the user uses certain combinations of settings. I'm merging this in with the hope that these concerns, if any real ones exist, pop up as issues. Reported-by: 4rneee Reviewed-by: Mm2PL Reviewed-by: pajlada --- .clang-tidy | 1 + src/widgets/helper/ResizingTextEdit.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index f2df52ac3..5f3462806 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -16,6 +16,7 @@ Checks: "-*, clazy-*, -clazy-qstring-allocations, -clazy-missing-qobject-macro, + -clazy-incorrect-emit, -clazy-ctor-missing-parent-argument, cppcoreguidelines-*, -cppcoreguidelines-pro-type-cstyle-cast, diff --git a/src/widgets/helper/ResizingTextEdit.cpp b/src/widgets/helper/ResizingTextEdit.cpp index 59e9f09e5..35577fa6e 100644 --- a/src/widgets/helper/ResizingTextEdit.cpp +++ b/src/widgets/helper/ResizingTextEdit.cpp @@ -181,6 +181,7 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event) QSignalBlocker dontTriggerCursorMovement(this); this->completer_->complete(); } + this->textChanged(); return; } @@ -210,6 +211,7 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event) QSignalBlocker dontTriggerCursorMovement(this); this->completer_->complete(); } + this->textChanged(); return; }