Ref T529, deterministic sort order when column values are equal

* the Qt model sorts by column
* when multiple values have the same column value the order among those is more or less random
* added additional property indexes to determine the order among the equal values
This commit is contained in:
Klaus Basan
2019-01-30 16:37:32 +01:00
committed by Mat Sutcliffe
parent 17f67d6106
commit 8c15f45007
8 changed files with 50 additions and 15 deletions

View File

@@ -163,6 +163,7 @@ namespace BlackGui
bool m_modelDestroyed = false; //!< model is about to be destroyed
Qt::SortOrder m_sortOrder; //!< sort order (asc/desc)
Qt::DropActions m_dropActions = Qt::IgnoreAction; //!< drop actions
BlackMisc::CPropertyIndexList m_sortTieBreakers; //!< how column values are sorted if equal, if no value is given this is random
private:
BlackMisc::CDigestSignal m_dsModelsChanged { this, &CListModelBaseNonTemplate::changed, &CListModelBaseNonTemplate::onChangedDigest, 500, 10 };