Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
5f020eeb
Commit
5f020eeb
authored
Sep 24, 2010
by
hjk
Browse files
debugger: somewhat more restrictive enabling of debugger related actions
parent
9bf97a2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerplugin.cpp
View file @
5f020eeb
...
...
@@ -2002,7 +2002,7 @@ void DebuggerPluginPrivate::showToolTip(ITextEditor *editor, const QPoint &point
return
;
if
(
!
theDebuggerBoolSetting
(
UseToolTipsInMainEditor
))
return
;
if
(
state
()
=
=
DebuggerNotReady
)
if
(
state
()
!
=
InferiorStopOk
)
return
;
QList
<
QVariant
>
list
;
...
...
@@ -2271,13 +2271,6 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
core
->
updateAdditionalContexts
(
m_interruptibleContext
,
Core
::
Context
());
}
const
bool
started
=
m_state
==
InferiorRunOk
||
m_state
==
InferiorRunRequested
||
m_state
==
InferiorStopRequested
||
m_state
==
InferiorStopOk
;
const
bool
starting
=
m_state
==
EngineSetupRequested
;
const
bool
canStartOrContinue
=
m_state
==
DebuggerNotReady
||
m_state
==
InferiorStopOk
;
...
...
@@ -2286,10 +2279,11 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
#ifdef Q_OS_WIN
m_attachCoreAction
->
setEnabled
(
false
);
#else
m_attachCoreAction
->
setEnabled
(
!
started
&&
!
starting
);
m_attachCoreAction
->
setEnabled
(
true
);
#endif
m_startRemoteAction
->
setEnabled
(
!
started
&&
!
starting
);
m_startRemoteAction
->
setEnabled
(
true
);
const
bool
stopped
=
m_state
==
InferiorStopOk
;
const
bool
detachable
=
m_state
==
InferiorStopOk
&&
engine
->
startParameters
().
startMode
!=
AttachCore
;
m_detachAction
->
setEnabled
(
detachable
);
...
...
@@ -2298,9 +2292,6 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
||
m_state
==
InferiorStopOk
||
m_state
==
InferiorUnrunnable
;
const
bool
running
=
m_state
==
InferiorRunOk
;
const
bool
stopped
=
m_state
==
InferiorStopOk
;
if
(
stopped
)
QApplication
::
alert
(
mainWindow
(),
3000
);
...
...
@@ -2310,11 +2301,12 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_actions
.
snapshotAction
->
setEnabled
(
stopped
&&
(
m_capabilities
&
SnapshotCapability
));
theDebuggerAction
(
OperateByInstruction
)
->
setEnabled
(
!
running
);
theDebuggerAction
(
OperateByInstruction
)
->
setEnabled
(
m_state
==
InferiorStopOk
);
m_actions
.
stopAction
->
setEnabled
(
stopped
);
m_actions
.
interruptAction
->
setEnabled
(
stoppable
);
m_actions
.
resetAction
->
setEnabled
(
m_state
!=
DebuggerNotReady
);
m_actions
.
resetAction
->
setEnabled
(
m_state
!=
DebuggerNotReady
&&
m_state
!=
DebuggerFinished
);
#if 1
// This is only needed when we insist on using Shift-F5 for Interrupt.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment