| 179 | } |
| 180 | |
| 181 | void DebugController::setupActions() |
| 182 | { |
| 183 | KActionCollection* ac = actionCollection(); |
| 184 | |
| 185 | QAction* action = m_continueDebugger = new QAction(this); |
| 186 | setContinueStartsDebug(true); |
| 187 | ac->addAction(QStringLiteral("debug_continue"), action); |
| 188 | connect(action, &QAction::triggered, this, &DebugController::run); |
| 189 | |
| 190 | #if 0 |
| 191 | m_restartDebugger = action = new QAction(QIcon::fromTheme("media-seek-backward"), i18n("&Restart"), this); |
| 192 | action->setToolTip( i18n("Restart program") ); |
| 193 | action->setWhatsThis( i18n("Restarts applications from the beginning.") ); |
| 194 | action->setEnabled(false); |
| 195 | connect(action, SIGNAL(triggered(bool)), this, SLOT(restartDebugger())); |
| 196 | ac->addAction("debug_restart", action); |
| 197 | #endif |
| 198 | |
| 199 | m_interruptDebugger = action = new QAction(QIcon::fromTheme(QStringLiteral("media-playback-pause")), i18nc("@action", "Interrupt"), this); |
| 200 | action->setToolTip( i18nc("@info:tooltip", "Interrupt application") ); |
| 201 | action->setWhatsThis(i18nc("@info:whatsthis", "Interrupts the debugged process or current debugger command.")); |
| 202 | connect(action, &QAction::triggered, this, &DebugController::interruptDebugger); |
| 203 | ac->addAction(QStringLiteral("debug_pause"), action); |
| 204 | |
| 205 | m_runToCursor = action = new QAction(QIcon::fromTheme(QStringLiteral("debug-run-cursor")), i18nc("@action", "Run to &Cursor"), this); |
| 206 | action->setToolTip( i18nc("@info:tooltip", "Run to cursor") ); |
| 207 | action->setWhatsThis(i18nc("@info:whatsthis", "Continues execution until the cursor position is reached.")); |
| 208 | connect(action, &QAction::triggered, this, &DebugController::runToCursor); |
| 209 | ac->addAction(QStringLiteral("debug_runtocursor"), action); |
| 210 | |
| 211 | |
| 212 | m_jumpToCursor = action = new QAction(QIcon::fromTheme(QStringLiteral("debug-execute-to-cursor")), i18nc("@action", "Set E&xecution Position to Cursor"), this); |
| 213 | action->setToolTip( i18nc("@info:tooltip", "Jump to cursor") ); |
| 214 | action->setWhatsThis(i18nc("@info:whatsthis", "Continue execution from the current cursor position.")); |
| 215 | connect(action, &QAction::triggered, this, &DebugController::jumpToCursor); |
| 216 | ac->addAction(QStringLiteral("debug_jumptocursor"), action); |
| 217 | |
| 218 | m_stepOver = action = new QAction(QIcon::fromTheme(QStringLiteral("debug-step-over")), i18nc("@action", "Step &Over"), this); |
| 219 | ac->setDefaultShortcut( action, Qt::Key_F10); |
| 220 | action->setToolTip( i18nc("@info:tooltip", "Step over the next line") ); |
| 221 | action->setWhatsThis( i18nc("@info:whatsthis", "Executes one line of source in the current source file. " |
| 222 | "If the source line is a call to a function the whole " |
| 223 | "function is executed and the app will stop at the line " |
| 224 | "following the function call.") ); |
| 225 | connect(action, &QAction::triggered, this, &DebugController::stepOver); |
| 226 | ac->addAction(QStringLiteral("debug_stepover"), action); |
| 227 | |
| 228 | |
| 229 | m_stepOverInstruction = action = new QAction(QIcon::fromTheme(QStringLiteral("debug-step-instruction")), i18nc("@action", "Step over Ins&truction"), this); |
| 230 | action->setToolTip( i18nc("@info:tooltip", "Step over instruction") ); |
| 231 | action->setWhatsThis(i18nc("@info:whatsthis", "Steps over the next assembly instruction.")); |
| 232 | connect(action, &QAction::triggered, this, &DebugController::stepOverInstruction); |
| 233 | ac->addAction(QStringLiteral("debug_stepoverinst"), action); |
| 234 | |
| 235 | |
| 236 | m_stepInto = action = new QAction(QIcon::fromTheme(QStringLiteral("debug-step-into")), i18nc("@action", "Step &Into"), this); |
| 237 | ac->setDefaultShortcut( action, Qt::Key_F11); |
| 238 | action->setToolTip( i18nc("@info:tooltip", "Step into the next statement") ); |
nothing calls this directly
no test coverage detected