| 165 | } |
| 166 | |
| 167 | void DeferredTreeView::sectionCountChanged() |
| 168 | { |
| 169 | const int sections = header()->count(); |
| 170 | |
| 171 | if (sections == 0) { |
| 172 | resetDeferredInitialized(); |
| 173 | return; |
| 174 | } |
| 175 | |
| 176 | for (auto it = m_sectionsProperties.begin(), end = m_sectionsProperties.end(); it != end; |
| 177 | ++it) { |
| 178 | if ((*it).initialized) |
| 179 | continue; |
| 180 | |
| 181 | if (it.key() < sections) { |
| 182 | if ((*it).resizeMode != -1) |
| 183 | setSectionResizeMode(header(), it.key(), QHeaderView::ResizeMode((*it).resizeMode)); |
| 184 | |
| 185 | if ((*it).hidden) |
| 186 | header()->setSectionHidden(it.key(), (*it).hidden == 1); |
| 187 | |
| 188 | (*it).initialized = true; |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | void DeferredTreeView::triggerExpansion(const QModelIndex &parent) |
| 194 | { |
nothing calls this directly
no test coverage detected