MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / restoreTreeExpandState

Method restoreTreeExpandState

src/settings.cpp:1104–1115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1102}
1103
1104void WidgetSettings::restoreTreeExpandState(QTreeView* tv, int role) const
1105{
1106 if (auto expanded =
1107 getOptional<QVariantList>(m_Settings, "Widgets", indexSettingName(tv))) {
1108 tv->collapseAll();
1109 for (auto index : flatIndex(tv->model())) {
1110 if (expanded->contains(index.data(role))) {
1111 tv->expand(index);
1112 }
1113 }
1114 }
1115}
1116
1117std::optional<int> WidgetSettings::index(const QComboBox* cb) const
1118{

Callers 1

restoreStateMethod · 0.80

Calls 5

indexSettingNameFunction · 0.85
flatIndexFunction · 0.85
collapseAllMethod · 0.80
modelMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected