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

Method clearSearchHistory

plugins/grepview/grepoutputview.cpp:448–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448void GrepOutputView::clearSearchHistory()
449{
450 GrepJob *runningJob = m_plugin->grepJob();
451 if(runningJob)
452 {
453 connect(runningJob, &GrepJob::finished, this, [=]() {updateButtonState(false);});
454 runningJob->kill();
455 }
456 while(modelSelector->count() > 0)
457 {
458 QVariant var = modelSelector->itemData(0);
459 qvariant_cast<QObject*>(var)->deleteLater();
460 modelSelector->removeItem(0);
461 }
462
463 m_settingsHistory.clear();
464
465 applyButton->setEnabled(false);
466
467 updateButtonState(false);
468 m_refresh->setEnabled(false);
469 m_clearSearchHistory->setEnabled(false);
470 m_statusLabel->setText(QString());
471}
472
473void GrepOutputView::modelSelectorContextMenu(const QPoint& pos)
474{

Callers

nothing calls this directly

Calls 9

grepJobMethod · 0.80
removeItemMethod · 0.80
QStringClass · 0.50
killMethod · 0.45
countMethod · 0.45
itemDataMethod · 0.45
clearMethod · 0.45
setEnabledMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected