| 57 | } |
| 58 | |
| 59 | void GitReceiver::handleSwitchedFileEvent(const dpf::Event &event) |
| 60 | { |
| 61 | const auto &fileName = event.property("fileName").toString(); |
| 62 | GitMenuManager::instance()->setupFileMenu(fileName); |
| 63 | |
| 64 | bool ret = GitClient::instance()->setupInstantBlame(fileName); |
| 65 | if (ret) { |
| 66 | if (!eventHandleMap.contains(editor.cursorPositionChanged.name)) |
| 67 | eventHandleMap.insert(editor.cursorPositionChanged.name, std::bind(&GitReceiver::handleCursorPositionChangedEvent, this, std::placeholders::_1)); |
| 68 | } else if (eventHandleMap.contains(editor.cursorPositionChanged.name)) { |
| 69 | eventHandleMap.remove(editor.cursorPositionChanged.name); |
| 70 | GitClient::instance()->clearInstantBlame(); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | void GitReceiver::handleProjectChangedEvent(const dpf::Event &event) |
| 75 | { |
nothing calls this directly
no test coverage detected