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

Method updateProviders

plugins/quickopen/quickopenwidget.cpp:269–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269void QuickOpenWidget::updateProviders()
270{
271 if (QAction* action = (sender() ? qobject_cast<QAction*>(sender()) : nullptr)) {
272 auto* const menu = qobject_cast<QMenu*>(action->parent());
273 if (menu) {
274 menu->show();
275 menu->setActiveAction(action);
276 }
277 }
278
279 QStringList checkedItems;
280
281 if (ui.itemsButton->menu()) {
282 for (QObject* obj : ui.itemsButton->menu()->children()) {
283 auto* box = qobject_cast<QAction*>(obj);
284 if (box) {
285 if (box->isChecked()) {
286 checkedItems << box->text().remove(QLatin1Char('&'));
287 }
288 }
289 }
290
291 ui.itemsButton->setText(checkedItems.join(QLatin1String(", ")));
292 }
293
294 QStringList checkedScopes;
295
296 if (ui.scopesButton->menu()) {
297 for (QObject* obj : ui.scopesButton->menu()->children()) {
298 auto* box = qobject_cast<QAction*>(obj);
299 if (box) {
300 if (box->isChecked()) {
301 checkedScopes << box->text().remove(QLatin1Char('&'));
302 }
303 }
304 }
305
306 ui.scopesButton->setText(checkedScopes.join(QLatin1String(", ")));
307 }
308
309 emit itemsChanged(checkedItems);
310 emit scopesChanged(checkedScopes);
311 m_model->enableProviders(checkedItems, checkedScopes);
312}
313
314void QuickOpenWidget::textChanged(const QString& str)
315{

Callers

nothing calls this directly

Calls 9

showMethod · 0.80
menuMethod · 0.80
joinMethod · 0.80
enableProvidersMethod · 0.80
parentMethod · 0.45
childrenMethod · 0.45
removeMethod · 0.45
textMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected