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

Method runTests

plugins/patchreview/patchreviewtoolview.cpp:535–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533}
534
535void PatchReviewToolView::runTests()
536{
537 IPatchSource::Ptr ipatch = m_plugin->patch();
538 if ( !ipatch ) {
539 return;
540 }
541
542 IProject* project = nullptr;
543 QMap<QUrl, VcsStatusInfo::State> files = ipatch->additionalSelectableFiles();
544 QMap<QUrl, VcsStatusInfo::State>::const_iterator it = files.constBegin();
545
546 for (; it != files.constEnd(); ++it) {
547 project = ICore::self()->projectController()->findProjectForUrl(it.key());
548 if (project) {
549 break;
550 }
551 }
552
553 if (!project) {
554 return;
555 }
556
557 m_editPatch.testProgressBar->setFormat(i18n("Running tests: %p%"));
558 m_editPatch.testProgressBar->setValue(0);
559 m_editPatch.testProgressBar->show();
560
561 auto* job = new ProjectTestJob(project, this);
562 connect(job, &ProjectTestJob::finished, this, &PatchReviewToolView::testJobResult);
563 connect(job, &KJob::percentChanged, this, &PatchReviewToolView::testJobPercent);
564 ICore::self()->runController()->registerJob(job);
565}
566
567void PatchReviewToolView::testJobPercent(KJob* job, unsigned long percent)
568{

Callers 2

testObjectFunction · 0.80
runTestsFunction · 0.80

Calls 12

patchMethod · 0.80
constBeginMethod · 0.80
constEndMethod · 0.80
findProjectForUrlMethod · 0.80
projectControllerMethod · 0.80
showMethod · 0.80
registerJobMethod · 0.80
runControllerMethod · 0.80
keyMethod · 0.45
setFormatMethod · 0.45
setValueMethod · 0.45

Tested by 2

testObjectFunction · 0.64
runTestsFunction · 0.64