| 1102 | } |
| 1103 | |
| 1104 | void 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 | |
| 1117 | std::optional<int> WidgetSettings::index(const QComboBox* cb) const |
| 1118 | { |
no test coverage detected