Use isEmpty() instead of length()
This commit is contained in:
parent
f201a9925b
commit
a11270f749
|
@ -150,7 +150,7 @@ void LineEdit::set_text(const QString& text) {
|
||||||
|
|
||||||
// For some reason Qt will detect any text with LTR at the end as LTR, so instead
|
// For some reason Qt will detect any text with LTR at the end as LTR, so instead
|
||||||
// compare only the first character
|
// compare only the first character
|
||||||
if (text.length()) {
|
if (!text.isEmpty()) {
|
||||||
set_rtl(QString(text.at(0)).isRightToLeft());
|
set_rtl(QString(text.at(0)).isRightToLeft());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue