From 3fbf1f13ae4c091c15cbba873cc36e2c3e39e0fe Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 20 Sep 2021 16:50:49 +0200 Subject: [PATCH] Doc: clarify case sensitivity in QCompleter This was confusing for me, being unfamiliar with the API. Pick-to: 6.2 5.15 Change-Id: I831c6d0aa30847e069a7c21c279f147a1b24e486 Reviewed-by: Paul Wicking Reviewed-by: Volker Hilsheimer --- src/widgets/util/qcompleter.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index 13a28b628c..ab3703abe4 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -1179,7 +1179,7 @@ QCompleter::CompletionMode QCompleter::completionMode() const /*! \property QCompleter::filterMode - \brief how the filtering is performed + \brief This property controls how filtering is performed. \since 5.2 If filterMode is set to Qt::MatchStartsWith, only those entries that start @@ -1187,11 +1187,14 @@ QCompleter::CompletionMode QCompleter::completionMode() const the entries that contain the typed characters, and Qt::MatchEndsWith the ones that end with the typed characters. - Currently, only these three modes are implemented. Setting filterMode to - any other Qt::MatchFlag will issue a warning, and no action will be - performed. + Setting filterMode to any other Qt::MatchFlag will issue a warning, and no + action will be performed. Because of this, the \c Qt::MatchCaseSensitive + flag has no effect. Use the \l caseSensitivity property to control case + sensitivity. The default mode is Qt::MatchStartsWith. + + \sa caseSensitivity */ void QCompleter::setFilterMode(Qt::MatchFlags filterMode) @@ -1719,9 +1722,9 @@ void QCompleter::setMaxVisibleItems(int maxItems) \property QCompleter::caseSensitivity \brief the case sensitivity of the matching - The default is Qt::CaseSensitive. + The default value is \c Qt::CaseSensitive. - \sa completionColumn, completionRole, modelSorting + \sa completionColumn, completionRole, modelSorting, filterMode */ void QCompleter::setCaseSensitivity(Qt::CaseSensitivity cs) {