summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-07-27 16:03:23 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-08-04 14:03:21 +0200
commit07057188e3e42246cf006b43963d0bdcdaa159f5 (patch)
tree19409bcfde608fd32d5735361f2e1ef865771a6e /CMakeLists.txt
parentfa7f4c5efd91c852341dd2e56396ee3f5fedd33a (diff)
QFileSystemModel: cache the name filters regexps
In order to filter out file names based on the user's settings, QFileSystemModel used to have a loop that tested if a given file name matched one of the filters. The problem is that each filter (a wildcard) was converted to a QRegularExpression _inside_ the loop. This causes a quadratic behavior (number of files * number of filters). Instead, build the regexps once when the filters are set (or the case sensitivity is changed, as that affects the filtering), and simply _use_ them in the loop. Simplify and correct some related code as a drive by. Done-with: Jean-Michaƫl Celerier Fixes: QTBUG-95383 Pick-to: 6.2 6.1 5.15 Change-Id: I6bc336364c145bb05793a8f867545d7715d35832 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions