From 18502ddc53dc6df0d1d5b3ce224f95b4de532b5f Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 20 Sep 2021 16:50:49 +0200 Subject: Doc: clarify case sensitivity in QCompleter This was confusing for me, being unfamiliar with the API. Change-Id: I831c6d0aa30847e069a7c21c279f147a1b24e486 Reviewed-by: Paul Wicking Reviewed-by: Volker Hilsheimer (cherry picked from commit 3fbf1f13ae4c091c15cbba873cc36e2c3e39e0fe) Reviewed-by: Qt Cherry-pick Bot --- 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 e3ab129ac9..85abcca0d7 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -1208,7 +1208,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 @@ -1216,11 +1216,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) @@ -1747,9 +1750,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) { -- cgit v1.2.3