On at least the GTK and gen plugins, iter_n_children was returning 1 when the node has children on demand but then iter_children will return false in order to ignore the dummy node. This was causing an infinite recursion when iter_previous is called and the previous node has on-demand children because that uses the result of iter_n_children to determine if the node has children and then uses iter_children to move to a child node without checking the return value. That meant the iterator wouldn’t move and it would keep searching from the same place forever. This patch fixes it by making iter_n_children non-virtual and making it bail out early with 0 if the node has children on demand. Otherwise it will ask the backend via a virtual function which has been renamed to do_iter_n_children so that it is similar to how do_iter_children works. Change-Id: Ie9a3d5d51c9eae0789048fa5240441663642595d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207589 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
63 lines
1.4 KiB
Makefile
63 lines
1.4 KiB
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
|
|
$(eval $(call gb_CppunitTest_CppunitTest,vcl_treeview))
|
|
|
|
$(eval $(call gb_CppunitTest_set_include,vcl_treeview,\
|
|
$$(INCLUDE) \
|
|
-I$(SRCDIR)/vcl/inc \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,vcl_treeview, \
|
|
vcl/qa/cppunit/treeviewtest \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_externals,vcl_treeview, \
|
|
boost_headers \
|
|
harfbuzz \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_libraries,vcl_treeview, \
|
|
comphelper \
|
|
cppu \
|
|
cppuhelper \
|
|
sal \
|
|
svt \
|
|
test \
|
|
tk \
|
|
tl \
|
|
unotest \
|
|
vcl \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_sdk_api,vcl_treeview))
|
|
|
|
$(eval $(call gb_CppunitTest_use_ure,vcl_treeview))
|
|
$(eval $(call gb_CppunitTest_use_vcl,vcl_treeview))
|
|
|
|
$(eval $(call gb_CppunitTest_use_components,vcl_treeview,\
|
|
configmgr/source/configmgr \
|
|
framework/util/fwk \
|
|
i18npool/util/i18npool \
|
|
sax/source/expatwrap/expwrap \
|
|
sfx2/util/sfx \
|
|
ucb/source/core/ucb1 \
|
|
ucb/source/ucp/file/ucpfile1 \
|
|
unotools/util/utl \
|
|
unoxml/source/service/unoxml \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_configuration,vcl_treeview))
|
|
|
|
$(eval $(call gb_CppunitTest_use_uiconfigs,vcl_treeview, \
|
|
vcl \
|
|
))
|
|
|
|
# vim: set noet sw=4 ts=4:
|