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

Method updateActionState

plugins/projectmanagerview/projectmanagerviewplugin.cpp:208–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void ProjectManagerViewPlugin::updateActionState( KDevelop::Context* ctx )
209{
210 bool isEmpty = ICore::self()->projectController()->buildSetModel()->items().isEmpty();
211 if( isEmpty )
212 {
213 isEmpty = !ctx || ctx->type() != Context::ProjectItemContext || static_cast<ProjectItemContext*>(ctx)->items().isEmpty();
214 }
215 d->m_build->setEnabled( !isEmpty );
216 d->m_install->setEnabled( !isEmpty );
217 d->m_clean->setEnabled( !isEmpty );
218 d->m_configure->setEnabled( !isEmpty );
219 d->m_prune->setEnabled( !isEmpty );
220}
221
222ProjectManagerViewPlugin::~ProjectManagerViewPlugin()
223{

Callers

nothing calls this directly

Calls 6

buildSetModelMethod · 0.80
projectControllerMethod · 0.80
isEmptyMethod · 0.45
itemsMethod · 0.45
typeMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected