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

Method init

src/plugins/debugger/reversedebug/reversedebugger.cpp:27–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void ReverseDebugger::init()
28{
29 auto mTools = ActionManager::instance()->actionContainer(M_TOOLS);
30 auto mReverseDbg = ActionManager::instance()->createContainer(M_TOOLS_REVERSEDEBUG);
31 mReverseDbg->menu()->setTitle(tr("Reverse debug"));
32 mTools->addMenu(mReverseDbg);
33
34 auto actionInit = [&](QAction *action, QString actionID) {
35 auto cmd = ActionManager::instance()->registerAction(action, actionID);
36 mReverseDbg->addAction(cmd);
37 };
38
39 auto recoredAction = new QAction(tr("Record"), mReverseDbg);
40 actionInit(recoredAction, A_REVERSE_DEBUG_RECORD);
41 auto replayAction = new QAction(tr("Replay"), mReverseDbg);
42 actionInit(replayAction, A_REVERSE_DEBUG_REPLAY);
43
44 connect(recoredAction, &QAction::triggered, this, &ReverseDebugger::record);
45 connect(replayAction, &QAction::triggered, this, &ReverseDebugger::replay);
46 connect(this, &ReverseDebugger::recordDone, this, [=]() {
47 QMessageBox::information(nullptr, tr("Reverse Debug"), tr("Recored done."));
48 });
49 connect(this, &ReverseDebugger::recordFailed, this, [=](const QString &err) {
50 QMessageBox::warning(nullptr, tr("Reverse Debug"), tr("Recored Failed.\n%1").arg(err));
51 });
52}
53
54void ReverseDebugger::record()
55{

Callers

nothing calls this directly

Calls 10

connectFunction · 0.85
informationFunction · 0.85
warningFunction · 0.85
actionContainerMethod · 0.80
createContainerMethod · 0.80
menuMethod · 0.80
registerActionMethod · 0.80
setTitleMethod · 0.45
addMenuMethod · 0.45
addActionMethod · 0.45

Tested by

no test coverage detected