| 76 | } |
| 77 | |
| 78 | void FileEditController::applyFileEdit(const QString &editId) |
| 79 | { |
| 80 | LOG_MESSAGE(QString("Applying file edit: %1").arg(editId)); |
| 81 | if (Context::ChangesManager::instance().applyFileEdit(editId)) { |
| 82 | emit infoMessage(QString("File edit applied successfully")); |
| 83 | updateFileEditStatus(editId, "applied"); |
| 84 | } else { |
| 85 | auto edit = Context::ChangesManager::instance().getFileEdit(editId); |
| 86 | emit errorOccurred( |
| 87 | edit.statusMessage.isEmpty() |
| 88 | ? QString("Failed to apply file edit") |
| 89 | : QString("Failed to apply file edit: %1").arg(edit.statusMessage)); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | void FileEditController::rejectFileEdit(const QString &editId) |
| 94 | { |
nothing calls this directly
no test coverage detected