Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
3b280a3a
Commit
3b280a3a
authored
Sep 30, 2009
by
hjk
Browse files
debugger: fix 'Detach debugger' action
parent
163150e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggermanager.cpp
View file @
3b280a3a
...
@@ -1695,8 +1695,6 @@ void DebuggerManager::setState(DebuggerState state)
...
@@ -1695,8 +1695,6 @@ void DebuggerManager::setState(DebuggerState state)
d
->
m_actions
.
runToFunctionAction
->
setEnabled
(
stopped
);
d
->
m_actions
.
runToFunctionAction
->
setEnabled
(
stopped
);
d
->
m_actions
.
jumpToLineAction
->
setEnabled
(
stopped
);
d
->
m_actions
.
jumpToLineAction
->
setEnabled
(
stopped
);
d
->
m_actions
.
nextAction
->
setEnabled
(
stopped
);
d
->
m_actions
.
nextAction
->
setEnabled
(
stopped
);
//showStatusMessage(QString("stoppable: %1, running: %2")
// .arg(stoppable).arg(running));
emit
stateChanged
(
d
->
m_state
);
emit
stateChanged
(
d
->
m_state
);
const
bool
notbusy
=
state
==
InferiorStopped
const
bool
notbusy
=
state
==
InferiorStopped
||
state
==
DebuggerNotReady
||
state
==
DebuggerNotReady
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
3b280a3a
...
@@ -898,6 +898,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
...
@@ -898,6 +898,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
connect
(
theDebuggerAction
(
SettingsDialog
),
SIGNAL
(
triggered
()),
connect
(
theDebuggerAction
(
SettingsDialog
),
SIGNAL
(
triggered
()),
this
,
SLOT
(
showSettingsDialog
()));
this
,
SLOT
(
showSettingsDialog
()));
handleStateChanged
(
DebuggerNotReady
);
return
true
;
return
true
;
}
}
...
@@ -1120,8 +1121,8 @@ void DebuggerPlugin::handleStateChanged(int state)
...
@@ -1120,8 +1121,8 @@ void DebuggerPlugin::handleStateChanged(int state)
const
bool
starting
=
state
==
EngineStarting
;
const
bool
starting
=
state
==
EngineStarting
;
//const bool running = state == InferiorRunning;
//const bool running = state == InferiorRunning;
const
bool
ready
=
state
==
InferiorStopped
const
bool
detachable
=
state
==
InferiorStopped
&&
m_manager
->
startParameters
()
->
startMode
!=
AttachCore
;
&&
m_manager
->
startParameters
()
->
startMode
!=
AttachCore
;
m_startExternalAction
->
setEnabled
(
!
started
&&
!
starting
);
m_startExternalAction
->
setEnabled
(
!
started
&&
!
starting
);
m_attachExternalAction
->
setEnabled
(
!
started
&&
!
starting
);
m_attachExternalAction
->
setEnabled
(
!
started
&&
!
starting
);
...
@@ -1131,7 +1132,7 @@ void DebuggerPlugin::handleStateChanged(int state)
...
@@ -1131,7 +1132,7 @@ void DebuggerPlugin::handleStateChanged(int state)
m_attachCoreAction
->
setEnabled
(
!
started
&&
!
starting
);
m_attachCoreAction
->
setEnabled
(
!
started
&&
!
starting
);
#endif
#endif
m_startRemoteAction
->
setEnabled
(
!
started
&&
!
starting
);
m_startRemoteAction
->
setEnabled
(
!
started
&&
!
starting
);
m_detachAction
->
setEnabled
(
ready
);
m_detachAction
->
setEnabled
(
detachable
);
}
}
void
DebuggerPlugin
::
writeSettings
()
const
void
DebuggerPlugin
::
writeSettings
()
const
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
3b280a3a
...
@@ -1444,7 +1444,11 @@ void GdbEngine::shutdown()
...
@@ -1444,7 +1444,11 @@ void GdbEngine::shutdown()
void
GdbEngine
::
detachDebugger
()
void
GdbEngine
::
detachDebugger
()
{
{
QTC_ASSERT
(
startMode
()
==
AttachExternal
,
/**/
);
QTC_ASSERT
(
state
()
==
InferiorStopped
,
/**/
);
QTC_ASSERT
(
startMode
()
!=
AttachCore
,
/**/
);
postCommand
(
_
(
"detach"
));
setState
(
InferiorShuttingDown
);
setState
(
InferiorShutDown
);
shutdown
();
shutdown
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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