diff options
author | Andreas Hartmetz <andreas@ixgreen.de> | 2022-04-27 12:10:55 +0200 |
---|---|---|
committer | Andreas Hartmetz <andreas@ixgreen.de> | 2022-04-28 08:18:52 +0200 |
commit | d39bd46fa24d40e8e25baeaaf3a863ce01acd676 (patch) | |
tree | 7ccdb95ad9a4bfc2347651cb007b85d842f67223 /src | |
parent | 9a55c695c7ecb8a2154661462255423a20ef4097 (diff) |
Better document how to enable sorting in QSPFM
This can be a big time sink otherwise. Unlike reimplementing
filterAcceptsRow() for filtering, reimplementing lessThan() is
*not* sufficient to enable sorting.
As a drive-by, change \brief to \return because sortOrder() is not
a (formal) property.
Pick-to: 5.15 6.2 6.3
Change-Id: I7e7be6f1e8e6b03a9923a7f77f04005b19a69d41
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/itemmodels/qsortfilterproxymodel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp index 9ee438d699..adfcd892da 100644 --- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp +++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp @@ -2593,9 +2593,12 @@ void QSortFilterProxyModel::sort(int column, Qt::SortOrder order) /*! \since 4.5 - \brief the column currently used for sorting + \return the column currently used for sorting - This returns the most recently used sort column. + This returns the most recently used sort column. The default value is -1, + which means that this proxy model does not sort. + + \sa sort() */ int QSortFilterProxyModel::sortColumn() const { @@ -2937,6 +2940,8 @@ void QSortFilterProxyModel::setFilterFixedString(const QString &pattern) QComboBox. The default value is true. + + \sa sortColumn() */ bool QSortFilterProxyModel::dynamicSortFilter() const { |