| 259 | } |
| 260 | |
| 261 | void ClangFixitAction::execute() |
| 262 | { |
| 263 | DocumentChangeSet changes; |
| 264 | { |
| 265 | DUChainReadLocker lock; |
| 266 | |
| 267 | DocumentChange change(m_fixit.range.document, m_fixit.range, |
| 268 | m_fixit.currentText, m_fixit.replacementText); |
| 269 | change.m_ignoreOldText = !m_fixit.currentText.isEmpty(); |
| 270 | changes.addChange(change); |
| 271 | } |
| 272 | |
| 273 | changes.setReplacementPolicy(DocumentChangeSet::WarnOnFailedChange); |
| 274 | changes.applyAllChanges(); |
| 275 | emit executed(this); |
| 276 | } |
| 277 | |
| 278 | #include "moc_clangproblem.cpp" |