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

Method actionHandler

src/plugins/git/utils/gitmenumanager.cpp:31–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void GitMenuManager::actionHandler(Command *cmd, GitType type)
32{
33 const auto &filePath = cmd->property(GitFilePath).toString();
34 bool isProject = cmd->property(GitIsProject).toBool();
35 bool ret = false;
36 switch (type) {
37 case GitLog:
38 ret = GitClient::instance()->gitLog(filePath, isProject);
39 break;
40 case GitBlame:
41 ret = GitClient::instance()->blameFile(filePath);
42 break;
43 case GitDiff:
44 ret = GitClient::instance()->gitDiff(filePath, isProject);
45 default:
46 break;
47 }
48
49 if (ret) {
50 if (!editSrv)
51 editSrv = dpfGetService(EditorService);
52
53 editSrv->switchWidget(GitWindow);
54 }
55}
56
57GitMenuManager *GitMenuManager::instance()
58{

Callers

nothing calls this directly

Calls 6

gitLogMethod · 0.80
blameFileMethod · 0.80
gitDiffMethod · 0.80
switchWidgetMethod · 0.80
toStringMethod · 0.45
propertyMethod · 0.45

Tested by

no test coverage detected