MCPcopy Create free account
hub / github.com/KDE/kdevelop / textChanged

Method textChanged

plugins/quickopen/quickopenmodel.cpp:148–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void 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
174void QuickOpenModel::restart(bool keepFilterText)
175{

Callers

nothing calls this directly

Calls 3

QModelIndexClass · 0.50
setFilterTextMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected