MCPcopy Create free account
hub / github.com/KDE/kdevelop / notifyHit

Method notifyHit

kdevplatform/debugger/interfaces/ibreakpointcontroller.cpp:75–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void IBreakpointController::notifyHit(int row, const QString& msg)
76{
77 BreakpointModel* model = breakpointModel();
78 model->notifyHit(row);
79
80 // This is a slightly odd place to issue this notification,
81 // but then again it's not clear which place would be more natural
82 Breakpoint* breakpoint = model->breakpoint(row);
83 KNotification* ev = nullptr;
84 switch(breakpoint->kind()) {
85 case Breakpoint::CodeBreakpoint:
86 ev = new KNotification(QStringLiteral("BreakpointHit"));
87 ev->setText(i18n("Breakpoint hit: %1", breakpoint->location()) + msg);
88 break;
89 case Breakpoint::WriteBreakpoint:
90 case Breakpoint::ReadBreakpoint:
91 case Breakpoint::AccessBreakpoint:
92 ev = new KNotification(QStringLiteral("WatchpointHit"));
93 ev->setText(i18n("Watchpoint hit: %1", breakpoint->location()) + msg);
94 break;
95 default:
96 Q_ASSERT(0);
97 break;
98 }
99 if (ev) {
100 ev->setPixmap(QIcon::fromTheme(QStringLiteral("breakpoint")).pixmap(QSize(22,22)));
101 // TODO: Port
102 //ev->setComponentName(ICore::self()->aboutData().componentName());
103 ev->sendEvent();
104 }
105
106 QApplication::alert(ICore::self()->uiController()->activeMainWindow());
107}
108
109// Temporary: empty default implementation
110void IBreakpointController::breakpointAdded(int row)

Callers

nothing calls this directly

Calls 8

breakpointModelFunction · 0.85
breakpointMethod · 0.80
pixmapMethod · 0.80
uiControllerMethod · 0.80
kindMethod · 0.45
setTextMethod · 0.45
locationMethod · 0.45
activeMainWindowMethod · 0.45

Tested by

no test coverage detected