[kde] RomDataView: QTreeView is defaulting to sorting by column 0, descending.

Make it sort in ascending order by default instead.

NOTE: Using column -1 to suppress the sort indicator visibility.

Might want to guard this with QT_VERSION_CHECK(6, 0, 0), but it seems
to have no effect on KF5 on my system, but it might on some other
systems with weird shenanigans happening...
This commit is contained in:
David Korth 2025-04-26 12:33:44 -04:00
parent 48a98edc13
commit 02d7fbfdfa
2 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,9 @@
* The SparseDiscReader changes in v2.3 broke this, so anything that
uses an ISO-9660 format showed 2048-byte sectors, even if this
wasn't the case.
* KDE: On KF6, ListData widgets that didn't specify a default sorting
method ended up being sorted in reverse-order by default. Not sure
why this changed in Qt6. A workaround has been applied to fix it.
* Other changes:
* Added support for localsearch-3.8, the new name of Tracker.

View File

@ -565,6 +565,10 @@ QTreeView *RomDataViewPrivate::initListData(QLabel *lblDesc,
}
col++;
}
// FIXME: Qt6 is defaulting to sorting by column 0, descending.
// Qt5 didn't have this issue...
treeView->header()->setSortIndicator(-1, Qt::AscendingOrder);
} else {
// Hide the header.
treeView->header()->hide();