summaryrefslogtreecommitdiffstats
path: root/examples/xml/dombookmarks/xbeltree.h
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2020-10-23 19:07:05 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-10-28 17:58:10 +0000
commitdfa856a0e8d848f4a80d28142e3c999a734e11c0 (patch)
tree1a46c6cc32bb259525a95d8c5eebd1cc0ed04f1b /examples/xml/dombookmarks/xbeltree.h
parent9fbc5f148910dfb3fcca5f242a88f4726a72e484 (diff)
QAbstractItemModelTester: don't rely on hasChildren()
Dynamic models which use fetchMore to asynchronously fill subdirs (like KDirModel) return true in hasChildren() for dirs that are expected to have children (so that the "+" shows in the treeview) but do not actually have children readily available. They will be inserted later on once the async listing job is done (as a result of fetchMore triggering that job). So QAbstractItemModelTester should use rowCount instead, to find out if there are children present. This detected a bug in QConcatenateTablesProxyModel: it returned a non-zero rowCount for its items, while it's flat. Change-Id: Idcdc86159f1fc79ed5297075dfcf30c09896287a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 72e0d699cec09458ca9325035d477d4899e8e47b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/xml/dombookmarks/xbeltree.h')
0 files changed, 0 insertions, 0 deletions