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

Method diffJobFinished

kdevplatform/vcs/vcspluginhelper.cpp:269–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267
268
269void VcsPluginHelper::diffJobFinished(KJob* job)
270{
271 auto* vcsjob = qobject_cast<KDevelop::VcsJob*>(job);
272 Q_ASSERT(vcsjob);
273
274 if (vcsjob->status() == KDevelop::VcsJob::JobSucceeded) {
275 KDevelop::VcsDiff d = vcsjob->fetchResults().value<KDevelop::VcsDiff>();
276 if(d.isEmpty())
277 KMessageBox::information(ICore::self()->uiController()->activeMainWindow(),
278 i18n("There are no differences."),
279 i18nc("@title:window", "VCS Support"));
280 else {
281 auto* patch=new VCSDiffPatchSource(d);
282 showVcsDiff(patch);
283 }
284 } else {
285 KMessageBox::error(ICore::self()->uiController()->activeMainWindow(), vcsjob->errorString(), i18nc("@title:window", "Unable to Get Differences"));
286 }
287}
288
289void VcsPluginHelper::diffToBase()
290{

Callers

nothing calls this directly

Calls 7

showVcsDiffFunction · 0.85
uiControllerMethod · 0.80
statusMethod · 0.45
fetchResultsMethod · 0.45
isEmptyMethod · 0.45
activeMainWindowMethod · 0.45
errorStringMethod · 0.45

Tested by

no test coverage detected