MCPcopy Create free account
hub / github.com/comaps/comaps / FillTree

Method FillTree

qt/update_dialog.cpp:357–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void UpdateDialog::FillTree(optional<Filter> const & filter, uint64_t timestamp)
358{
359 CHECK_THREAD_CHECKER(m_threadChecker, ());
360
361 if (m_fillTreeTimestamp != timestamp)
362 return;
363
364 m_tree->setSortingEnabled(false);
365 m_tree->clear();
366 m_treeItemByCountryId.clear();
367
368 auto const rootId = m_framework.GetStorage().GetRootId();
369 FillTreeImpl(nullptr /* parent */, rootId, filter);
370
371 // Expand the root.
372 ASSERT_EQUAL(m_tree->topLevelItemCount(), 1, ());
373 m_tree->topLevelItem(0)->setExpanded(true);
374
375 m_tree->sortItems(KColumnIndexPositionInRanking, Qt::AscendingOrder);
376 m_tree->setSortingEnabled(true);
377}
378
379void UpdateDialog::FillTreeImpl(QTreeWidgetItem * parent, CountryId const & countryId, optional<Filter> const & filter)
380{

Callers

nothing calls this directly

Calls 2

GetRootIdMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected