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

Method checkState

kdevplatform/shell/runcontroller.cpp:668–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668void KDevelop::RunController::checkState()
669{
670 Q_D(RunController);
671
672 bool running = false;
673
674 int jobCount = 0;
675 int totalProgress = 0;
676
677 for (auto it = d->jobs.constBegin(), end = d->jobs.constEnd(); it != end; ++it) {
678 KJob *job = it.key();
679
680 if (!job->isSuspended()) {
681 running = true;
682
683 ++jobCount;
684 totalProgress += job->percent();
685 }
686 }
687
688 d->unityLauncher->setProgressVisible(running);
689 if (jobCount > 0) {
690 d->unityLauncher->setProgress((totalProgress + 1) / jobCount);
691 } else {
692 d->unityLauncher->setProgress(0);
693 }
694
695 if ( ( d->state != Running ? false : true ) == running ) {
696 d->state = running ? Running : Idle;
697 emit runStateChanged(d->state);
698 }
699
700 if (Core::self()->setupFlags() != Core::NoUi) {
701 d->stopAction->setEnabled(running);
702 d->stopJobsMenu->setEnabled(running);
703 }
704}
705
706void KDevelop::RunController::stopAllProcesses()
707{

Callers 15

checkedUrlsMethod · 0.80
setChecksDbMethod · 0.80
levelChecksFunction · 0.80
setStateMethod · 0.80
GlobalConfigPageMethod · 0.80
indentObjectsChangedMethod · 0.80
updatePatchFromEditMethod · 0.80
openMethod · 0.80
fileItemChangedMethod · 0.80
refreshStateMethod · 0.80
doReplacementsMethod · 0.80
changeModelMethod · 0.80

Calls 8

constBeginMethod · 0.80
constEndMethod · 0.80
isSuspendedMethod · 0.80
setProgressVisibleMethod · 0.80
setupFlagsMethod · 0.80
keyMethod · 0.45
setProgressMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected