MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / rejectFileEdit

Method rejectFileEdit

context/ChangesManager.cpp:196–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196bool 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
223bool ChangesManager::undoFileEdit(const QString &editId)
224{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected