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
a181b45d
Commit
a181b45d
authored
Nov 08, 2010
by
hjk
Browse files
debugger: rename 'stop/quit' to exitDebugger
parent
033a3aba
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerengine.cpp
View file @
a181b45d
...
...
@@ -1240,8 +1240,9 @@ void DebuggerEngine::detachDebugger()
{
}
void
DebuggerEngine
::
exit
Inferio
r
()
void
DebuggerEngine
::
exit
Debugge
r
()
{
QTC_ASSERT
(
d
->
m_state
==
InferiorStopOk
,
qDebug
()
<<
d
->
m_state
);
d
->
queueShutdownInferior
();
}
...
...
src/plugins/debugger/debuggerengine.h
View file @
a181b45d
...
...
@@ -199,6 +199,7 @@ public:
protected:
friend
class
DebuggerPluginPrivate
;
virtual
void
detachDebugger
();
virtual
void
exitDebugger
();
virtual
void
executeStep
();
virtual
void
executeStepOut
()
;
virtual
void
executeNext
();
...
...
@@ -208,8 +209,6 @@ protected:
virtual
void
continueInferior
();
virtual
void
interruptInferior
();
virtual
void
exitInferior
();
virtual
void
requestInterruptInferior
();
virtual
void
executeRunToLine
(
const
QString
&
fileName
,
int
lineNumber
);
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
a181b45d
...
...
@@ -833,7 +833,7 @@ static bool isDebuggable(Core::IEditor *editor)
struct
DebuggerActions
{
QAction
*
continueAction
;
QAction
*
stop
Action
;
// on the application output button if "Stop" is possible
QAction
*
exit
Action
;
// on the application output button if "Stop" is possible
QAction
*
interruptAction
;
// on the fat debug button if "Pause" is possible
QAction
*
undisturbableAction
;
// on the fat debug button if nothing can be done
QAction
*
resetAction
;
// FIXME: Should not be needed in a stable release
...
...
@@ -1153,7 +1153,7 @@ public slots:
void
handleExecExit
()
{
currentEngine
()
->
exit
Inferio
r
();
currentEngine
()
->
exit
Debugge
r
();
}
void
handleFrameDown
()
...
...
@@ -1207,7 +1207,7 @@ public:
QToolButton
*
m_reverseToolButton
;
QIcon
m_startIcon
;
QIcon
m_
stop
Icon
;
QIcon
m_
exit
Icon
;
QIcon
m_continueIcon
;
QIcon
m_interruptIcon
;
QIcon
m_locationMarkIcon
;
...
...
@@ -1330,8 +1330,8 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
m_startIcon
=
QIcon
(
_
(
":/debugger/images/debugger_start_small.png"
));
m_startIcon
.
addFile
(
__
(
":/debugger/images/debugger_start.png"
));
m_
stop
Icon
=
QIcon
(
_
(
":/debugger/images/debugger_stop_small.png"
));
m_
stop
Icon
.
addFile
(
__
(
":/debugger/images/debugger_stop.png"
));
m_
exit
Icon
=
QIcon
(
_
(
":/debugger/images/debugger_stop_small.png"
));
m_
exit
Icon
.
addFile
(
__
(
":/debugger/images/debugger_stop.png"
));
m_continueIcon
=
QIcon
(
__
(
":/debugger/images/debugger_continue_small.png"
));
m_continueIcon
.
addFile
(
__
(
":/debugger/images/debugger_continue.png"
));
m_interruptIcon
=
QIcon
(
_
(
":/debugger/images/debugger_interrupt_small.png"
));
...
...
@@ -1396,8 +1396,8 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
act
->
setIcon
(
m_continueIcon
);
connect
(
act
,
SIGNAL
(
triggered
()),
SLOT
(
handleExecContinue
()));
act
=
m_actions
.
stop
Action
=
new
QAction
(
tr
(
"
Stop
Debugger"
),
this
);
act
->
setIcon
(
m_
stop
Icon
);
act
=
m_actions
.
exit
Action
=
new
QAction
(
tr
(
"
Exit
Debugger"
),
this
);
act
->
setIcon
(
m_
exit
Icon
);
connect
(
act
,
SIGNAL
(
triggered
()),
SLOT
(
handleExecExit
()));
act
=
m_actions
.
interruptAction
=
new
QAction
(
tr
(
"Interrupt"
),
this
);
...
...
@@ -1630,7 +1630,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
cmd
->
setAttribute
(
Command
::
CA_Hide
);
m_uiSwitcher
->
addMenuAction
(
cmd
,
AnyLanguage
,
CC
::
G_DEFAULT_ONE
);
cmd
=
am
->
registerAction
(
m_actions
.
stop
Action
,
cmd
=
am
->
registerAction
(
m_actions
.
exit
Action
,
Constants
::
STOP
,
globalcontext
);
//cmd->setDefaultKeySequence(QKeySequence(Constants::STOP_KEY));
cmd
->
setDefaultText
(
tr
(
"Stop Debugger"
));
...
...
@@ -2530,7 +2530,7 @@ void DebuggerPluginPrivate::setInitialState()
//m_actions.snapshotAction->setEnabled(false);
theDebuggerAction
(
OperateByInstruction
)
->
setEnabled
(
false
);
m_actions
.
stop
Action
->
setEnabled
(
false
);
m_actions
.
exit
Action
->
setEnabled
(
false
);
m_actions
.
resetAction
->
setEnabled
(
false
);
m_actions
.
stepAction
->
setEnabled
(
false
);
...
...
@@ -2581,7 +2581,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
// F5 starts debugging. It is "startable".
m_actions
.
interruptAction
->
setEnabled
(
false
);
m_actions
.
continueAction
->
setEnabled
(
false
);
m_actions
.
stop
Action
->
setEnabled
(
false
);
m_actions
.
exit
Action
->
setEnabled
(
false
);
am
->
command
(
Constants
::
STOP
)
->
setKeySequence
(
QKeySequence
());
am
->
command
(
PE
::
DEBUG
)
->
setKeySequence
(
QKeySequence
(
PE
::
DEBUG_KEY
));
core
->
updateAdditionalContexts
(
m_anyContext
,
Context
());
...
...
@@ -2589,7 +2589,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
// F5 continues, Shift-F5 kills. It is "continuable".
m_actions
.
interruptAction
->
setEnabled
(
false
);
m_actions
.
continueAction
->
setEnabled
(
true
);
m_actions
.
stop
Action
->
setEnabled
(
true
);
m_actions
.
exit
Action
->
setEnabled
(
true
);
am
->
command
(
Constants
::
STOP
)
->
setKeySequence
(
QKeySequence
(
STOP_KEY
));
am
->
command
(
PE
::
DEBUG
)
->
setKeySequence
(
QKeySequence
(
PE
::
DEBUG_KEY
));
core
->
updateAdditionalContexts
(
m_anyContext
,
m_continuableContext
);
...
...
@@ -2597,7 +2597,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
// Shift-F5 interrupts. It is also "interruptible".
m_actions
.
interruptAction
->
setEnabled
(
true
);
m_actions
.
continueAction
->
setEnabled
(
false
);
m_actions
.
stop
Action
->
setEnabled
(
false
);
m_actions
.
exit
Action
->
setEnabled
(
false
);
am
->
command
(
Constants
::
STOP
)
->
setKeySequence
(
QKeySequence
());
am
->
command
(
PE
::
DEBUG
)
->
setKeySequence
(
QKeySequence
(
STOP_KEY
));
core
->
updateAdditionalContexts
(
m_anyContext
,
m_interruptibleContext
);
...
...
@@ -2605,7 +2605,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
// We don't want to do anything anymore.
m_actions
.
interruptAction
->
setEnabled
(
false
);
m_actions
.
continueAction
->
setEnabled
(
false
);
m_actions
.
stop
Action
->
setEnabled
(
false
);
m_actions
.
exit
Action
->
setEnabled
(
false
);
am
->
command
(
Constants
::
STOP
)
->
setKeySequence
(
QKeySequence
());
am
->
command
(
PE
::
DEBUG
)
->
setKeySequence
(
QKeySequence
(
PE
::
DEBUG_KEY
));
//core->updateAdditionalContexts(m_anyContext, m_finishedContext);
...
...
@@ -2617,7 +2617,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
// We don't want to do anything anymore.
m_actions
.
interruptAction
->
setEnabled
(
false
);
m_actions
.
continueAction
->
setEnabled
(
false
);
m_actions
.
stop
Action
->
setEnabled
(
true
);
m_actions
.
exit
Action
->
setEnabled
(
true
);
am
->
command
(
Constants
::
STOP
)
->
setKeySequence
(
QKeySequence
(
STOP_KEY
));
am
->
command
(
PE
::
DEBUG
)
->
setKeySequence
(
QKeySequence
(
STOP_KEY
));
core
->
updateAdditionalContexts
(
m_anyContext
,
m_finishedContext
);
...
...
@@ -2625,7 +2625,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
// Everything else is "undisturbable".
m_actions
.
interruptAction
->
setEnabled
(
false
);
m_actions
.
continueAction
->
setEnabled
(
false
);
m_actions
.
stop
Action
->
setEnabled
(
false
);
m_actions
.
exit
Action
->
setEnabled
(
false
);
am
->
command
(
Constants
::
STOP
)
->
setKeySequence
(
QKeySequence
());
am
->
command
(
PE
::
DEBUG
)
->
setKeySequence
(
QKeySequence
());
core
->
updateAdditionalContexts
(
m_anyContext
,
m_undisturbableContext
);
...
...
src/plugins/debugger/snapshothandler.cpp
View file @
a181b45d
...
...
@@ -234,7 +234,7 @@ void SnapshotHandler::removeSnapshot(int index)
setState(EngineSetupRequested);
postCommand("set stack-cache off");
#endif
QString
fileName
=
engine
->
startParameters
().
coreFile
;
//
QString fileName = engine->startParameters().coreFile;
//if (!fileName.isEmpty())
// QFile::remove(fileName);
m_snapshots
.
removeAt
(
index
);
...
...
@@ -242,7 +242,7 @@ void SnapshotHandler::removeSnapshot(int index)
m_currentIndex
=
-
1
;
else
if
(
index
<
m_currentIndex
)
--
m_currentIndex
;
engine
->
quitDebugger
();
//
engine->quitDebugger();
reset
();
}
...
...
src/plugins/debugger/snapshotwindow.cpp
View file @
a181b45d
...
...
@@ -32,6 +32,7 @@
#include "debuggeractions.h"
#include "debuggerconstants.h"
#include "debuggerrunner.h"
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
...
...
@@ -96,7 +97,7 @@ void SnapshotWindow::keyPressEvent(QKeyEvent *ev)
if
(
si
.
isEmpty
())
si
.
append
(
currentIndex
().
sibling
(
currentIndex
().
row
(),
0
));
foreach
(
const
QModelIndex
&
idx
,
normalizeIndexes
(
si
))
m_snapshotHandler
->
removeSnapshot
(
idx
.
row
());
removeSnapshot
(
idx
.
row
());
}
QTreeView
::
keyPressEvent
(
ev
);
}
...
...
@@ -133,13 +134,18 @@ void SnapshotWindow::contextMenuEvent(QContextMenuEvent *ev)
if
(
act
==
actCreate
)
m_snapshotHandler
->
createSnapshot
(
idx
.
row
());
else
if
(
act
==
actRemove
)
m_snapshotHandler
->
removeSnapshot
(
idx
.
row
());
removeSnapshot
(
idx
.
row
());
else
if
(
act
==
actAdjust
)
resizeColumnsToContents
();
else
if
(
act
==
actAlwaysAdjust
)
setAlwaysResizeColumnsToContents
(
!
m_alwaysResizeColumnsToContents
);
}
void
SnapshotWindow
::
removeSnapshot
(
int
i
)
{
m_snapshotHandler
->
at
(
i
)
->
stop
();
}
void
SnapshotWindow
::
resizeColumnsToContents
()
{
for
(
int
i
=
model
()
->
columnCount
();
--
i
>=
0
;
)
...
...
src/plugins/debugger/snapshotwindow.h
View file @
a181b45d
...
...
@@ -53,6 +53,7 @@ private slots:
void
setAlternatingRowColorsHelper
(
bool
on
)
{
setAlternatingRowColors
(
on
);
}
private:
void
removeSnapshot
(
int
i
);
void
keyPressEvent
(
QKeyEvent
*
ev
);
void
contextMenuEvent
(
QContextMenuEvent
*
ev
);
...
...
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