| 146 | } |
| 147 | |
| 148 | void QuickOpenModel::textChanged(const QString& str) |
| 149 | { |
| 150 | if (m_filterText == str) { |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | beginResetModel(); |
| 155 | |
| 156 | m_filterText = str; |
| 157 | for (const ProviderEntry& provider : std::as_const(m_providers)) { |
| 158 | if (provider.enabled) { |
| 159 | provider.provider->setFilterText(str); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | m_cachedData.clear(); |
| 164 | clearExpanding(); |
| 165 | |
| 166 | //Get the 50 first items, so the data-providers notice changes without ui-glitches due to resetting |
| 167 | for (int a = 0; a < 50 && a < rowCount(QModelIndex()); ++a) { |
| 168 | getItem(a, true); |
| 169 | } |
| 170 | |
| 171 | endResetModel(); |
| 172 | } |
| 173 | |
| 174 | void QuickOpenModel::restart(bool keepFilterText) |
| 175 | { |
nothing calls this directly
no test coverage detected