| 67 | } |
| 68 | |
| 69 | void IDocument::notifyActivated() |
| 70 | { |
| 71 | // DocumentController::cleanup() closes open documents one by one on shutdown. When the active document is closed, |
| 72 | // another still-open document is activated and this function is called. Emitting the documentActivated signal then |
| 73 | // results in useless work, such as UI updates and parsing activated documents with higher priority. It also causes |
| 74 | // undesirable side effects, for example, a wrong ProjectTreeView row is selected, then saved and restored on next |
| 75 | // KDevelop start. Don't emit the signal while shutting down to speed up shutdown and prevent bugs. cleanup() closes |
| 76 | // documents without checking whether they should be saved (Discard mode), so temporary UI inconsistencies caused by |
| 77 | // skipped signals should be brief and harmless. |
| 78 | if (!core()->shuttingDown()) { |
| 79 | emit core()->documentController()->documentActivated(this); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | void IDocument::notifyContentChanged() |
| 84 | { |
nothing calls this directly
no test coverage detected