MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / handleSwitchedFileEvent

Method handleSwitchedFileEvent

src/plugins/git/transceiver/gitreceiver.cpp:59–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void 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
74void GitReceiver::handleProjectChangedEvent(const dpf::Event &event)
75{

Callers

nothing calls this directly

Calls 8

setupFileMenuMethod · 0.80
setupInstantBlameMethod · 0.80
insertMethod · 0.80
clearInstantBlameMethod · 0.80
toStringMethod · 0.45
propertyMethod · 0.45
containsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected