mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 03:27:40 +01:00
Test for string length
This commit is contained in:
parent
509a6af788
commit
d46e0bacc6
@ -151,7 +151,9 @@ void LineEdit::set_text(const QString& text) {
|
||||
|
||||
// For some reason Qt will detect any text with LTR at the end as LTR, so instead
|
||||
// compare only the first character
|
||||
set_rtl(QString(1, text.at(0)).isRightToLeft());
|
||||
if (text.length()) {
|
||||
set_rtl(QString(text.at(0)).isRightToLeft());
|
||||
}
|
||||
}
|
||||
|
||||
void LineEdit::paintEvent(QPaintEvent* e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user