diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-03-14 20:12:08 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-05-09 20:29:26 +0200 |
commit | 8bcc6f111b1c8f0e5c9c9da18313a16559de63a5 (patch) | |
tree | 2f0425e6a5368611cd79fb3b6e6c2f0cbe5e03d6 | |
parent | 3803b41eaecb6c1686aba88b4226486507aca094 (diff) |
QComboBox: add QT_DEPRECATED_X() for deprecated functions
QT_DEPRECATED_X() was not added with
d6d33f0b80dd85043c71f71a3ed5485d6014e6c4 for the deprecated
QComboBox functions - Add them now.
Change-Id: I8d4ea08766ae6ff052dfccac6c3f35ecf34affb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qcombobox.h | 5 | ||||
-rw-r--r-- | tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 9a403e8eef..a93c72a933 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1509,7 +1509,7 @@ int QComboBox::maxCount() const /*! \obsolete - Use setCompleter() instead. + Use completer() instead. */ bool QComboBox::autoCompletion() const { diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h index 64fbebb3c5..33686e547d 100644 --- a/src/widgets/widgets/qcombobox.h +++ b/src/widgets/widgets/qcombobox.h @@ -96,10 +96,13 @@ public: #if QT_CONFIG(completer) #if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED_X("Use completer() instead.") bool autoCompletion() const; + QT_DEPRECATED_X("Use setCompleter() instead.") void setAutoCompletion(bool enable); - + QT_DEPRECATED_X("Use completer()->caseSensitivity() instead.") Qt::CaseSensitivity autoCompletionCaseSensitivity() const; + QT_DEPRECATED_X("Use completer()->setCaseSensitivity() instead.") void setAutoCompletionCaseSensitivity(Qt::CaseSensitivity sensitivity); #endif #endif diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 5b4761ba87..a576770811 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -852,8 +852,8 @@ void tst_QComboBox::autoCompletionCaseSensitivity() // case insensitive testWidget->clearEditText(); QSignalSpy spyReturn(testWidget, SIGNAL(activated(int))); - testWidget->setAutoCompletionCaseSensitivity(Qt::CaseInsensitive); - QCOMPARE(testWidget->autoCompletionCaseSensitivity(), Qt::CaseInsensitive); + testWidget->completer()->setCaseSensitivity(Qt::CaseInsensitive); + QCOMPARE(testWidget->completer()->caseSensitivity(), Qt::CaseInsensitive); QTest::keyClick(testWidget->lineEdit(), Qt::Key_A); qApp->processEvents(); @@ -886,8 +886,8 @@ void tst_QComboBox::autoCompletionCaseSensitivity() // case sensitive testWidget->clearEditText(); - testWidget->setAutoCompletionCaseSensitivity(Qt::CaseSensitive); - QCOMPARE(testWidget->autoCompletionCaseSensitivity(), Qt::CaseSensitive); + testWidget->completer()->setCaseSensitivity(Qt::CaseSensitive); + QCOMPARE(testWidget->completer()->caseSensitivity(), Qt::CaseSensitive); QTest::keyClick(testWidget->lineEdit(), Qt::Key_A); qApp->processEvents(); QCOMPARE(testWidget->currentText(), QString("aww")); |