Adds option to make editor not scroll on debugging

Added an option to change the behavior of the debuggercore so that
the current editor isn't always centered on the current line, to stop
unnecessary jumping of the code.

Change-Id: I9406df518bb1b977e39a0265ee7fd6fae2069ed9
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Wiebe Cazemier
2014-05-02 12:08:44 +02:00
committed by hjk
parent 97ece795e0
commit b63d9c6df0
8 changed files with 32 additions and 7 deletions

View File

@@ -98,6 +98,13 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
checkBoxWarnOnReleaseBuilds->setToolTip(tr("Shows a warning when starting the debugger "
"on a binary with insufficient debug information."));
checkBoxKeepEditorStationaryWhileStepping = new QCheckBox(behaviorBox);
checkBoxKeepEditorStationaryWhileStepping->setText(tr("Keep editor stationary when stepping"));
checkBoxKeepEditorStationaryWhileStepping->setToolTip(tr("Scrolls the editor only when it is necessary "
"to keep the current line in view, "
"instead of keeping the next statement centered at "
"all times."));
labelMaximalStackDepth = new QLabel(tr("Maximum stack depth:"), behaviorBox);
spinBoxMaximalStackDepth = new QSpinBox(behaviorBox);
@@ -139,7 +146,8 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
gridLayout->addWidget(checkBoxListSourceFiles, 1, 1, 1, 1);
gridLayout->addWidget(checkBoxSwitchModeOnExit, 2, 1, 1, 1);
gridLayout->addWidget(checkBoxShowQmlObjectTree, 3, 1, 1, 1);
gridLayout->addWidget(checkBoxRegisterForPostMortem, 4, 1, 1, 1);
gridLayout->addWidget(checkBoxKeepEditorStationaryWhileStepping, 4, 1, 1, 1);
gridLayout->addWidget(checkBoxRegisterForPostMortem, 5, 1, 1, 1);
gridLayout->addLayout(horizontalLayout2, 6, 1, 1, 2);
QVBoxLayout *verticalLayout = new QVBoxLayout(this);
@@ -168,6 +176,8 @@ CommonOptionsPageWidget::CommonOptionsPageWidget
checkBoxShowQmlObjectTree);
m_group->insert(dc->action(WarnOnReleaseBuilds),
checkBoxWarnOnReleaseBuilds);
m_group->insert(dc->action(StationaryEditorWhileStepping),
checkBoxKeepEditorStationaryWhileStepping);
m_group->insert(dc->action(FontSizeFollowsEditor),
checkBoxFontSizeFollowsEditor);
m_group->insert(dc->action(AutoDerefPointers), 0);