subsurface/desktop-widgets
Berthold Stoeger f2f18b4e16 Dive list: split reload() in reload() and setSortOrder()
The DiveListView code had a very fundamental problem with its
header: Each had its own idea of who is responsible for sorting.
Since we can't easily change QHeaderView, accept QHeaderView
as the authority on sort-column and order.

To make this possible, split the reload() function in two
distinct functions:
 - reload() reloads the model and sorts according to the
   current sort criterion.
 - setSortOrder() tells the header to display a certain
   sort criterion. If this is a new criterion, it will then
   emit a signal. In this signal, resort according to that
   criterion.

Thus, the actual sorting code has to be moved from the
headerClicked() to a new sortIndicatorChanged() slot.
Morover, the sorting of the QHeaderView has to be used.

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-11-05 07:55:53 -08:00
..
css
plugins Cleanup: Turn widget accessor-functions into simple pointers 2018-10-13 21:42:53 -04:00
preferences Fix bug in for loop that can lead to segfault 2018-10-25 23:23:03 +01:00
statistics Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
tab-widgets Dive list: split reload() in reload() and setSortOrder() 2018-11-05 07:55:53 -08:00
about.cpp
about.h
about.ui
btdeviceselectiondialog.cpp Bluetooth: use standard Qt code on Windows 2018-09-30 08:09:37 -07:00
btdeviceselectiondialog.h Bluetooth: use standard Qt code on Windows 2018-09-30 08:09:37 -07:00
btdeviceselectiondialog.ui
CMakeLists.txt Undo: isolate undo-commands 2018-10-11 16:22:27 -07:00
command.cpp Undo: make adding of planned dive undo-able 2018-10-11 16:22:27 -07:00
command.h Undo: make adding of planned dive undo-able 2018-10-11 16:22:27 -07:00
command_base.cpp Undo: isolate undo-commands 2018-10-11 16:22:27 -07:00
command_base.h Undo: isolate undo-commands 2018-10-11 16:22:27 -07:00
command_divelist.cpp Undo: make adding of planned dive undo-able 2018-10-11 16:22:27 -07:00
command_divelist.h Undo: make adding of planned dive undo-able 2018-10-11 16:22:27 -07:00
configuredivecomputerdialog.cpp Cleanup: we don't support configuring a Uemis SDA 2018-08-28 12:03:03 -07:00
configuredivecomputerdialog.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
configuredivecomputerdialog.ui Configure ostc3: Remove obsoleted setting 2018-04-27 21:33:47 +03:00
divecomponentselection.ui
divecomputermanagementdialog.cpp Dive computers: turn QMultiMap into sorted vector 2018-06-17 06:53:13 +09:00
divecomputermanagementdialog.h Cleanup: fold DiveComputerManagementDialog::update() into init() 2018-06-17 06:53:13 +09:00
divecomputermanagementdialog.ui
divelistview.cpp Dive list: split reload() in reload() and setSortOrder() 2018-11-05 07:55:53 -08:00
divelistview.h Dive list: split reload() in reload() and setSortOrder() 2018-11-05 07:55:53 -08:00
divelogexportdialog.cpp Dive site: replace dive->dive_site_uuid by dive_site 2018-10-29 00:09:31 +00:00
divelogexportdialog.h Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
divelogexportdialog.ui Desktop UI: small layout correction export dialog 2018-09-16 08:07:33 -07:00
divelogimportdialog.cpp Undo: isolate undo-commands 2018-10-11 16:22:27 -07:00
divelogimportdialog.h Import: Make DiveLogImportDialog modal 2018-10-04 10:22:11 +02:00
divelogimportdialog.ui
divepicturewidget.cpp Dive media: transport dive-id in drag'n'drop events 2018-07-18 09:06:37 -07:00
divepicturewidget.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
diveplanner.cpp core/settings: change bestmixend to int, to allow qml to work 2018-09-11 17:25:00 -07:00
diveplanner.h Cleanup: replace virtual by override where appropriate 2018-07-31 11:02:34 +02:00
diveplanner.ui Choose water presets from a qcombobox in planner, custom value possible 2018-03-02 08:38:22 -08:00
diveshareexportdialog.cpp Revert "desktop-widgets: remove QSettings from desktop-widgets" 2018-08-29 03:09:10 -07:00
diveshareexportdialog.h
diveshareexportdialog.ui
downloadfromdivecomputer.cpp Dowload: Deselect dives only if at least one dive was downloaded 2018-10-15 20:55:58 -04:00
downloadfromdivecomputer.h Bluetooth: run a discovery agent for BT/BLE dive computers on macOS 2018-10-12 08:22:44 -07:00
downloadfromdivecomputer.ui Desktop/remember DCs: avoid highlighted button 2018-09-23 11:49:30 -07:00
filterwidget.ui
findmovedimagesdialog.cpp UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
findmovedimagesdialog.h Dive pictures: implement FindMovedImagesDialog 2018-07-04 02:27:36 +08:00
findmovedimagesdialog.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
groupedlineedit.cpp
groupedlineedit.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
kmessagewidget.cpp
kmessagewidget.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
listfilter.ui
locationinformation.cpp Dive site: fix oversight in 920eb7576f 2018-10-30 22:24:07 +00:00
locationinformation.h Dive site: remove [start|stop]FilterDiveSite signals 2018-10-29 00:09:31 +00:00
locationInformation.ui
mainwindow.cpp Dive list: split reload() in reload() and setSortOrder() 2018-11-05 07:55:53 -08:00
mainwindow.h Desktop: Enable next/prev DCs only for applicable dives 2018-10-14 20:46:02 +02:00
mainwindow.ui Desktop: remove "edit dive" from log menu 2018-09-14 13:18:42 -07:00
mapwidget.cpp Dive site: pass pointer-to-dive_site via QVariant 2018-10-29 00:09:31 +00:00
mapwidget.h Dive site: pass pointer to updateDiveSiteCoordinates() 2018-10-29 00:09:31 +00:00
modeldelegates.cpp Dive site: pass pointer-to-dive_site via QVariant 2018-10-29 00:09:31 +00:00
modeldelegates.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
notificationwidget.cpp
notificationwidget.h Use queued connection to thread-safe MainWindow error handling 2018-01-31 14:47:26 +01:00
plannerDetails.ui
plannerSettings.ui
printdialog.cpp desktop-widgets: Change Q_UNUSED to no parameter name 2018-05-21 12:48:04 -07:00
printdialog.h Cleanup: replace virtual by override where appropriate 2018-07-31 11:02:34 +02:00
printer.cpp Cleanup: Turn widget accessor-functions into simple pointers 2018-10-13 21:42:53 -04:00
printer.h
printoptions.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
printoptions.h
printoptions.ui
qtwaitingspinner.cpp
qtwaitingspinner.h
renumber.ui
searchbar.ui
setpoint.ui
shiftimagetimes.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
shifttimes.ui
simplewidgets.cpp Cleanup: rename MainWindow member variables 2018-10-13 21:42:53 -04:00
simplewidgets.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
starwidget.cpp Cleanup: remove parameter from currentDiveChanged signal 2018-07-30 12:20:26 -07:00
starwidget.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
subsurfacewebservices.cpp Dive site: replace dive->dive_site_uuid by dive_site 2018-10-29 00:09:31 +00:00
subsurfacewebservices.h Cleanup: Devirtualize WebServices::downloadTimedOut() 2018-09-29 15:16:11 -07:00
tableview.cpp
tableview.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
tableview.ui
tagwidget.cpp Cleanup: rename MainWindow member variables 2018-10-13 21:42:53 -04:00
tagwidget.h
templateedit.cpp Fix includes for building against Qt-5.11.0 2018-05-23 13:29:37 +03:00
templateedit.h
templateedit.ui
templatelayout.cpp Statistics: only consider selected dives in HTML export statistics 2018-10-07 17:50:51 +03:00
templatelayout.h Translations: unify gettextFromC::tr() and QObject::tr() 2018-07-04 05:33:31 +08:00
updatemanager.cpp update-manager: actually remember that we asked the user 2018-10-02 13:20:44 -07:00
updatemanager.h
urldialog.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
usermanual.cpp Cleanup: fold core/helpers.h into core/qthelper.h 2018-06-04 08:50:10 -07:00
usermanual.h Desktop: Derive UserManual from QDialog 2018-05-31 21:29:29 +03:00
usersurvey.cpp Revert "desktop-widgets: remove QSettings from desktop-widgets" 2018-08-29 03:09:10 -07:00
usersurvey.h
usersurvey.ui
webservices.ui