| 219 | |
| 220 | |
| 221 | void 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 | |
| 241 | void VcsPluginHelper::revertDone(KJob* job) |
| 242 | { |
nothing calls this directly
no test coverage detected