| 267 | |
| 268 | |
| 269 | void 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 | |
| 289 | void VcsPluginHelper::diffToBase() |
| 290 | { |
nothing calls this directly
no test coverage detected