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 <rasmus.karlsson@pajlada.com>
This commit is contained in:
Nerixyz
2026-03-29 11:28:40 +00:00
committed by GitHub
parent d3b32333d9
commit 4660839379
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -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,
+2
View File
@@ -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;
}