From bac44956191b1b67139caec011878711635386ad Mon Sep 17 00:00:00 2001 From: Dong Rui Date: Tue, 9 Mar 2021 10:41:31 +0800 Subject: [PATCH] Delete duplicate condition in QComboBox::setPlaceholderText There is a duplicate condition judgment in QComboBox::setPlaceholderText, just delete it. Change-Id: I570415c5930372866f290216a89260353d3992b7 Reviewed-by: Christian Ehrlicher --- src/widgets/widgets/qcombobox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 0194b7bf52..4f626f7428 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1704,7 +1704,7 @@ void QComboBox::setPlaceholderText(const QString &placeholderText) d->placeholderText = placeholderText; if (currentIndex() == -1) { - if (d->placeholderText.isEmpty() && currentIndex() == -1) + if (d->placeholderText.isEmpty()) setCurrentIndex(0); else update();