Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77419

[Regression] QTreeView::sortByColumn(-1, Qt::AscendingOrder) is ignored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.14.0 Alpha
    • 5.13.0
    • Widgets: Itemviews
    • None
    • Reproduced on macOS (Qt 5.13.0 via Homebrew), Arch Linux (Qt 5.13.0 via package repositories)
    • All
    • de26ea6a7ff921995b6229f1f683821adb95e973 (qt/qtbase/5.13)

    Description

      Presumably since Qt 5.13.0, a QTreeView subclass that calls sortByColumn with -1 as parameter seems to have no effect. For some reason it now always adds a sorting indicator to the first column. This is a change in behavior compared to Qt 5.12.0 and before, previously it would maintain the natural sorting order.

      The documentation explicitly permits -1 as column: https://doc.qt.io/qt-5/qtreeview.html#sortByColumn

      The same application (Wireshark) has worked without issues before.

      Most likely introduced via https://codereview.qt-project.org/c/qt/qtbase/+/243900

      Downstream bug report: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15979

      CC chehrlic, srutledg, richard

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              chehrlic Christian Ehrlicher
              Lekensteyn Peter Wu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes