Fixed newline processing
This commit is contained in:
parent
28fbce38b4
commit
ba3e521cf3
@ -245,7 +245,7 @@ void TransmitTextEdit::on_textContentsChanged(int /*pos*/, int rem, int add){
|
|||||||
QString normalized = text.normalized(QString::NormalizationForm_KD);
|
QString normalized = text.normalized(QString::NormalizationForm_KD);
|
||||||
QString result;
|
QString result;
|
||||||
std::copy_if(normalized.begin(), normalized.end(), std::back_inserter(result), [](QChar& c) {
|
std::copy_if(normalized.begin(), normalized.end(), std::back_inserter(result), [](QChar& c) {
|
||||||
return c.toLatin1() != 0 && c > 31 && c < 128;
|
return c.toLatin1() != 0 && (c == 10 || (c > 31 && c < 128));
|
||||||
});
|
});
|
||||||
if(result != text){
|
if(result != text){
|
||||||
bool blocked = signalsBlocked();
|
bool blocked = signalsBlocked();
|
||||||
|
Loading…
Reference in New Issue
Block a user