From 76918c1f280cd050d0711e014c8dc8921c26608c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 1 Apr 2025 07:07:30 +0200 Subject: [PATCH] tst_QComboBox: ignore two warnings from setCompleter() in getSetCheck() Tidies up the test output by removing expected warnings from the log (and alerting us if they're missing). Amends 64f6169f61ce8c982a1b92b20f930518a5f0d477, which introduced the warning. Pick-to: 6.8 6.5 5.15 Change-Id: Idcef99d556b11035307e6e207cf31fc2f13ed291 Reviewed-by: Richard Moe Gustavsen (cherry picked from commit e55479ea4a2dca266b73a2a17ff77ec44e1c2135) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index bb05a94386b..2c9b5e1dc47 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -250,9 +250,11 @@ void tst_QComboBox::getSetCheck() // QCompleter *QComboBox::completer() // void QComboBox::setCompleter(QCompleter *) + QTest::ignoreMessage(QtWarningMsg, "Setting a QCompleter on non-editable QComboBox is not allowed."); obj1.setCompleter(nullptr); QCOMPARE(nullptr, obj1.completer()); QCompleter completer; + QTest::ignoreMessage(QtWarningMsg, "Setting a QCompleter on non-editable QComboBox is not allowed."); obj1.setCompleter(&completer); QVERIFY(obj1.completer() == nullptr); // no QLineEdit is set