From d39fefc0ebc8481dd695be031d9479a6ee397612 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 17 Apr 2020 11:51:14 +0200 Subject: QComboBox: Remove deprecated auto-completion properties The replacement is to set, and configure, a QCompleter directly via setCompleter. With the removal of the separate properties in QComboBox, the configuration of the completer is not maintained if the line edit is replaced. A QCompleter is created and set implicitly when the line edit is set, unless the line edit came with a completer. This is what the auto test verifies as well. Change-Id: I9a4c73db5e39a2558aad346c0904be6deb4f1cd2 Reviewed-by: Shawn Rutledge --- tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'tests/auto/widgets') diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 444bf9d624..a4b2066087 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -263,15 +263,6 @@ void tst_QComboBox::getSetCheck() obj1.setCompleter(&completer); QVERIFY(obj1.completer() == nullptr); // no QLineEdit is set -#if QT_DEPRECATED_SINCE(5, 13) - // bool QComboBox::autoCompletion() - // void QComboBox::setAutoCompletion(bool) - obj1.setAutoCompletion(false); - QCOMPARE(false, obj1.autoCompletion()); - obj1.setAutoCompletion(true); - QCOMPARE(true, obj1.autoCompletion()); -#endif - // bool QComboBox::duplicatesEnabled() // void QComboBox::setDuplicatesEnabled(bool) obj1.setDuplicatesEnabled(false); @@ -805,9 +796,6 @@ void tst_QComboBox::virtualAutocompletion() QVERIFY(QTest::qWaitForWindowExposed(&topLevel)); QComboBox *testWidget = topLevel.comboBox(); testWidget->clear(); -#if QT_DEPRECATED_SINCE(5, 13) - testWidget->setAutoCompletion(true); -#endif testWidget->addItem("Foo"); testWidget->addItem("Bar"); testWidget->addItem("Boat"); @@ -870,9 +858,6 @@ void tst_QComboBox::autoCompletionCaseSensitivity() QCOMPARE(qApp->focusWidget(), (QWidget *)testWidget); testWidget->clear(); -#if QT_DEPRECATED_SINCE(5, 13) - testWidget->setAutoCompletion(true); -#endif testWidget->addItem("Cow"); testWidget->addItem("irrelevant1"); testWidget->addItem("aww"); @@ -3093,9 +3078,6 @@ void tst_QComboBox::task_QTBUG_31146_popupCompletion() QComboBox comboBox; comboBox.setEditable(true); -#if QT_DEPRECATED_SINCE(5, 13) - comboBox.setAutoCompletion(true); -#endif comboBox.setInsertPolicy(QComboBox::NoInsert); comboBox.completer()->setCaseSensitivity(Qt::CaseInsensitive); comboBox.completer()->setCompletionMode(QCompleter::PopupCompletion); -- cgit v1.2.3