Changeset View
Changeset View
Standalone View
Standalone View
vcs/vcspluginhelper.cpp
Show All 36 Lines | |||||
37 | #include <interfaces/iplugin.h> | 37 | #include <interfaces/iplugin.h> | ||
38 | #include <interfaces/iplugincontroller.h> | 38 | #include <interfaces/iplugincontroller.h> | ||
39 | #include <interfaces/iproject.h> | 39 | #include <interfaces/iproject.h> | ||
40 | #include <interfaces/iprojectcontroller.h> | 40 | #include <interfaces/iprojectcontroller.h> | ||
41 | #include <interfaces/iruncontroller.h> | 41 | #include <interfaces/iruncontroller.h> | ||
42 | #include <interfaces/isession.h> | 42 | #include <interfaces/isession.h> | ||
43 | #include <interfaces/iuicontroller.h> | 43 | #include <interfaces/iuicontroller.h> | ||
44 | #include <util/path.h> | 44 | #include <util/path.h> | ||
45 | #include <util/scopeddialog.h> | ||||
45 | #include <vcs/interfaces/ibasicversioncontrol.h> | 46 | #include <vcs/interfaces/ibasicversioncontrol.h> | ||
46 | #include <vcs/models/vcsannotationmodel.h> | 47 | #include <vcs/models/vcsannotationmodel.h> | ||
47 | #include <vcs/widgets/vcseventwidget.h> | 48 | #include <vcs/widgets/vcseventwidget.h> | ||
48 | #include <vcs/widgets/vcscommitdialog.h> | 49 | #include <vcs/widgets/vcscommitdialog.h> | ||
49 | #include <vcs/vcsjob.h> | 50 | #include <vcs/vcsjob.h> | ||
50 | #include <vcs/vcsrevision.h> | 51 | #include <vcs/vcsrevision.h> | ||
51 | #include <vcs/vcsdiff.h> | 52 | #include <vcs/vcsdiff.h> | ||
52 | 53 | | |||
▲ Show 20 Lines • Show All 399 Lines • ▼ Show 20 Line(s) | 449 | { | |||
452 | QUrl url = d->ctxUrls.first(); | 453 | QUrl url = d->ctxUrls.first(); | ||
453 | 454 | | |||
454 | // We start the commit UI no matter whether there is real differences, as it can also be used to commit untracked files | 455 | // We start the commit UI no matter whether there is real differences, as it can also be used to commit untracked files | ||
455 | VCSCommitDiffPatchSource* patchSource = new VCSCommitDiffPatchSource(new VCSStandardDiffUpdater(d->vcs, url)); | 456 | VCSCommitDiffPatchSource* patchSource = new VCSCommitDiffPatchSource(new VCSStandardDiffUpdater(d->vcs, url)); | ||
456 | 457 | | |||
457 | bool ret = showVcsDiff(patchSource); | 458 | bool ret = showVcsDiff(patchSource); | ||
458 | 459 | | |||
459 | if(!ret) { | 460 | if(!ret) { | ||
460 | VcsCommitDialog *commitDialog = new VcsCommitDialog(patchSource); | 461 | ScopedDialog<VcsCommitDialog> commitDialog(patchSource); | ||
461 | commitDialog->setCommitCandidates(patchSource->infos()); | 462 | commitDialog->setCommitCandidates(patchSource->infos()); | ||
462 | commitDialog->exec(); | 463 | commitDialog->exec(); | ||
463 | } | 464 | } | ||
croick: mh, I guess it should be deleted, right? | |||||
croick: it might delete itself, but not necessarily | |||||
464 | } | 465 | } | ||
465 | 466 | | |||
466 | void VcsPluginHelper::push() | 467 | void VcsPluginHelper::push() | ||
467 | { | 468 | { | ||
468 | foreach(const QUrl &url, d->ctxUrls) { | 469 | foreach(const QUrl &url, d->ctxUrls) { | ||
469 | VcsJob* job = d->plugin->extension<IDistributedVersionControl>()->push(url, VcsLocation()); | 470 | VcsJob* job = d->plugin->extension<IDistributedVersionControl>()->push(url, VcsLocation()); | ||
470 | ICore::self()->runController()->registerJob(job); | 471 | ICore::self()->runController()->registerJob(job); | ||
471 | } | 472 | } | ||
Show All 13 Lines |
mh, I guess it should be deleted, right?