| 73 | } |
| 74 | |
| 75 | void 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 |
| 110 | void IBreakpointController::breakpointAdded(int row) |
nothing calls this directly
no test coverage detected