cf6bccbcf5
QlistWidgets with sorting enabled do not sort stable. A re-sort is triggered when any Qt::ItemDataRole is changed and not only when Qt::DisplayRole is changed. Due to an unstable optimization, the changed element gets inserted at the beginning of their respective "equivalence group". This patch disables the optimization and ensures stable sorting with std::stable_sort. Sorting is only performed, if the subset of changed items in the range [begin, end] is not already sorted in the whole list. For this purpose, it is assumed that the list has already been sorted before begin and after end. This assumption minimizes the subset to check. Limits / side effect: The patch focuses on the most common use case, which is a single item being changed. Replacing the optimization by std:stable_sort can potentially slow down the sorting performance of large data sets. Task-number: QTBUG-113123 Pick-to: 6.5 6.6 Change-Id: Ib2bd08f21422eb7d6aeff7cdd6a91be7114ebcba Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> |
||
---|---|---|
.. | ||
auto | ||
baseline | ||
benchmarks | ||
global | ||
libfuzzer | ||
manual | ||
shared | ||
testserver | ||
CMakeLists.txt | ||
README |
This directory contains autotests and benchmarks based on Qt Test. In order to run the autotests reliably, you need to configure a desktop to match the test environment that these tests are written for. Linux X11: * The user must be logged in to an active desktop; you can't run the autotests without a valid DISPLAY that allows X11 connections. * The tests are run against a KDE3 or KDE4 desktop. * Window manager uses "click to focus", and not "focus follows mouse". Many tests move the mouse cursor around and expect this to not affect focus and activation. * Disable "click to activate", i.e., when a window is opened, the window manager should automatically activate it (give it input focus) and not wait for the user to click the window.