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

Method revert

kdevplatform/vcs/vcspluginhelper.cpp:221–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221void VcsPluginHelper::revert()
222{
223 Q_D(VcsPluginHelper);
224
225 VcsJob* job=d->vcs->revert(d->ctxUrls);
226 connect(job, &VcsJob::finished, this, &VcsPluginHelper::revertDone);
227
228 for (const QUrl& url : std::as_const(d->ctxUrls)) {
229 IDocument* doc=ICore::self()->documentController()->documentForUrl(url);
230
231 if(doc && doc->textDocument()) {
232 doc->textDocument()->setModifiedOnDiskWarning(false);
233 doc->textDocument()->setModified(false);
234 }
235 }
236 job->setProperty("urls", QVariant::fromValue(d->ctxUrls));
237
238 d->plugin->core()->runController()->registerJob(job);
239}
240
241void VcsPluginHelper::revertDone(KJob* job)
242{

Callers

nothing calls this directly

Calls 7

documentForUrlMethod · 0.80
documentControllerMethod · 0.80
setPropertyMethod · 0.80
registerJobMethod · 0.80
runControllerMethod · 0.80
textDocumentMethod · 0.45
coreMethod · 0.45

Tested by

no test coverage detected