Commit graph

16 commits

Author SHA1 Message Date
Chocobo1
8d6b9b6181
Revise sort model and delegate code 2019-08-08 22:17:18 +08:00
thalieht
4370a7eb12 Forward declare in a few places 2019-06-04 17:48:55 +03:00
thalieht
1f36b8b89f Combine qAsConst() with copyAsConst() to asConst() 2018-11-28 23:41:23 +02:00
thalieht
6b1d26d555 Convert all foreach() to range-based for() 2018-11-28 23:40:12 +02:00
thalieht
d668a4fe6d Fix coding style for various things 2018-11-28 23:37:35 +02:00
sledgehammer999
de8050701d
Revert email address changes in copyright notices 2018-07-10 00:37:44 +03:00
thalieht
356d6a6589 Fix coding style 2018-05-31 19:45:09 +03:00
sledgehammer999
99abc21dab
Simplify sorting code. 2017-12-21 15:26:38 +02:00
Chocobo1
86c5a8df75
Partial revert eac8838dc2. Fixes #7952.
mapFromSource() didn't work as expected, when used in lessThan(), it sometimes
returns an invalid QModelIndex.
A crash is observed when filtering source model via filterAcceptsRow() in #7952,
the crash is due to endless recursive of filterAcceptsRow() & lessThan() calling
each other and mapFromSource() is the culprit of it.
2017-12-04 17:40:44 +08:00
Mike Tzou
eac8838dc2
[GUI] Implement stable sort (#7703)
* NaturalCompare now returns compare result instead of "less than" result
* Change to stable sort in GUI components
* Add Utils::String::naturalLessThan() helper function
* Use Qt::CaseSensitivity type
2017-11-30 17:10:30 +08:00
Chocobo1
42c17ea5ce Fix argument name differ in definition & declaration 2017-05-09 14:12:36 +08:00
Chocobo1
4669a99617 Use case-insensitive sort for Name column in Search tab. Closes #407. 2017-01-22 11:48:01 +08:00
Chocobo1
5906a4a2de Add case-sensitive & case-insensitive natural sort helper function
Fix helper function not being thread-safe
Use QBT_USES_QT5 define
2016-05-08 23:59:06 +08:00
Chocobo1
d65ff87148 Replace naturalSort() with naturalCompare(). 2016-04-18 14:27:44 +08:00
Eugene Shalygin
1336cb7a61 Implement search filters in the proxy model. Partially closes #972 2016-04-04 02:09:32 +02:00
Vladimir Golovnev (Glassez)
ac365c5efb Fix coding style (Issue #2192). 2015-12-20 21:52:26 +03:00