| 194 | } |
| 195 | |
| 196 | bool ChangesManager::rejectFileEdit(const QString &editId) |
| 197 | { |
| 198 | QMutexLocker locker(&m_mutex); |
| 199 | |
| 200 | if (!m_fileEdits.contains(editId)) { |
| 201 | LOG_MESSAGE(QString("File edit not found: %1").arg(editId)); |
| 202 | return false; |
| 203 | } |
| 204 | |
| 205 | FileEdit &edit = m_fileEdits[editId]; |
| 206 | |
| 207 | if (edit.status == Archived) { |
| 208 | LOG_MESSAGE(QString("Cannot reject archived file edit: %1").arg(editId)); |
| 209 | edit.statusMessage = "Cannot reject archived edit from history"; |
| 210 | return false; |
| 211 | } |
| 212 | |
| 213 | edit.status = Rejected; |
| 214 | edit.statusMessage = "Rejected by user"; |
| 215 | |
| 216 | locker.unlock(); |
| 217 | emit fileEditRejected(editId); |
| 218 | |
| 219 | LOG_MESSAGE(QString("File edit rejected: %1").arg(editId)); |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | bool ChangesManager::undoFileEdit(const QString &editId) |
| 224 | { |
nothing calls this directly
no outgoing calls
no test coverage detected