| 1091 | } |
| 1092 | |
| 1093 | void WidgetSettings::saveTreeExpandState(const QTreeView* tv, int role) |
| 1094 | { |
| 1095 | QVariantList expanded; |
| 1096 | for (auto index : flatIndex(tv->model())) { |
| 1097 | if (tv->isExpanded(index)) { |
| 1098 | expanded.append(index.data(role)); |
| 1099 | } |
| 1100 | } |
| 1101 | set(m_Settings, "Widgets", indexSettingName(tv), expanded); |
| 1102 | } |
| 1103 | |
| 1104 | void WidgetSettings::restoreTreeExpandState(QTreeView* tv, int role) const |
| 1105 | { |