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
da1492cf
Commit
da1492cf
authored
Mar 18, 2009
by
hjk
Browse files
debugger: start action handling refactoring
parent
cc89dcc7
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/breakwindow.cpp
View file @
da1492cf
...
...
@@ -29,6 +29,7 @@
#include
"breakwindow.h"
#include
"debuggeractions.h"
#include
"ui_breakcondition.h"
#include
<QAction>
...
...
@@ -93,7 +94,7 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
QAction
*
act3
=
new
QAction
(
"Edit condition..."
,
&
menu
);
act0
->
setEnabled
(
index
.
isValid
());
QAction
*
act4
=
new
QAction
(
"Syncronize breakpoints"
,
&
menu
);
QAction
*
act5
=
new
QAction
(
"Debugger properties..."
,
&
menu
);
QAction
*
act5
=
action
(
SettingsDialog
);
menu
.
addAction
(
act0
);
menu
.
addAction
(
act3
);
...
...
@@ -116,7 +117,7 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
else
if
(
act
==
act4
)
emit
breakpointSynchronizationRequested
();
else
if
(
act
==
act5
)
emit
settingsDialogRequested
();
act
->
trigger
();
}
void
BreakWindow
::
deleteBreakpoint
(
const
QModelIndex
&
idx
)
...
...
src/plugins/debugger/breakwindow.h
View file @
da1492cf
...
...
@@ -50,7 +50,6 @@ signals:
void
breakpointDeleted
(
int
index
);
void
breakpointActivated
(
int
index
);
void
breakpointSynchronizationRequested
();
void
settingsDialogRequested
();
private
slots
:
void
rowActivated
(
const
QModelIndex
&
index
);
...
...
src/plugins/debugger/cdb/cdbdebugengine.cpp
View file @
da1492cf
...
...
@@ -987,15 +987,6 @@ void CdbDebugEnginePrivate::handleBreakpointEvent(PDEBUG_BREAKPOINT pBP)
qDebug
()
<<
Q_FUNC_INFO
;
}
void
CdbDebugEngine
::
setDebugDumpers
(
bool
on
)
{
Q_UNUSED
(
on
)
}
void
CdbDebugEngine
::
recheckCustomDumperAvailability
()
{
}
void
CdbDebugEngine
::
reloadSourceFiles
()
{
}
...
...
src/plugins/debugger/cdb/cdbdebugengine.h
View file @
da1492cf
...
...
@@ -89,10 +89,6 @@ public:
virtual
void
loadAllSymbols
();
virtual
void
reloadRegisters
();
virtual
void
setDebugDumpers
(
bool
on
);
virtual
void
recheckCustomDumperAvailability
();
virtual
void
reloadSourceFiles
();
protected:
...
...
src/plugins/debugger/debuggermanager.cpp
View file @
da1492cf
...
...
@@ -239,8 +239,6 @@ void DebuggerManager::init()
m_breakHandler
,
SLOT
(
activateBreakpoint
(
int
)));
connect
(
breakView
,
SIGNAL
(
breakpointDeleted
(
int
)),
m_breakHandler
,
SLOT
(
removeBreakpoint
(
int
)));
connect
(
breakView
,
SIGNAL
(
settingsDialogRequested
()),
this
,
SIGNAL
(
settingsDialogRequested
()));
connect
(
breakView
,
SIGNAL
(
breakpointSynchronizationRequested
()),
this
,
SLOT
(
attemptBreakpointSynchronization
()));
connect
(
m_breakHandler
,
SIGNAL
(
gotoLocation
(
QString
,
int
,
bool
)),
...
...
@@ -295,10 +293,6 @@ void DebuggerManager::init()
this
,
SLOT
(
assignValueInDebugger
(
QString
,
QString
)));
connect
(
localsView
,
SIGNAL
(
requestWatchExpression
(
QString
)),
this
,
SLOT
(
watchExpression
(
QString
)));
connect
(
localsView
,
SIGNAL
(
settingsDialogRequested
()),
this
,
SIGNAL
(
settingsDialogRequested
()));
connect
(
localsView
,
SIGNAL
(
requestRecheckCustomDumperAvailability
()),
this
,
SLOT
(
recheckCustomDumperAvailability
()));
// Watchers
QTreeView
*
watchersView
=
qobject_cast
<
QTreeView
*>
(
m_watchersWindow
);
...
...
@@ -317,10 +311,6 @@ void DebuggerManager::init()
this
,
SIGNAL
(
sessionValueRequested
(
QString
,
QVariant
*
)));
connect
(
m_watchHandler
,
SIGNAL
(
setSessionValueRequested
(
QString
,
QVariant
)),
this
,
SIGNAL
(
setSessionValueRequested
(
QString
,
QVariant
)));
connect
(
watchersView
,
SIGNAL
(
settingsDialogRequested
()),
this
,
SIGNAL
(
settingsDialogRequested
()));
connect
(
watchersView
,
SIGNAL
(
requestRecheckCustomDumperAvailability
()),
this
,
SLOT
(
recheckCustomDumperAvailability
()));
// Tooltip
QTreeView
*
tooltipView
=
qobject_cast
<
QTreeView
*>
(
m_tooltipWindow
);
...
...
@@ -480,6 +470,8 @@ void DebuggerManager::init()
connect
(
action
(
UseDumpers
),
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
setUseDumpers
(
bool
)));
connect
(
action
(
DebugDumpers
),
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
setDebugDumpers
(
bool
)));
}
void
DebuggerManager
::
setDebuggerType
(
DebuggerType
type
)
...
...
@@ -1311,7 +1303,6 @@ void DebuggerManager::setDebugDumpers(bool on)
{
QTC_ASSERT
(
m_engine
,
return
);
m_settings
.
m_debugDumpers
=
on
;
m_engine
->
setDebugDumpers
(
on
);
}
void
DebuggerManager
::
setSkipKnownFrames
(
bool
on
)
...
...
@@ -1424,17 +1415,6 @@ void DebuggerManager::fileOpen(const QString &fileName)
}
//////////////////////////////////////////////////////////////////////
//
// Watch specific stuff
//
//////////////////////////////////////////////////////////////////////
void
DebuggerManager
::
recheckCustomDumperAvailability
()
{
m_engine
->
recheckCustomDumperAvailability
();
}
//////////////////////////////////////////////////////////////////////
//
// Disassembler specific stuff
...
...
src/plugins/debugger/debuggermanager.h
View file @
da1492cf
...
...
@@ -284,10 +284,10 @@ public slots:
void
showStatusMessage
(
const
QString
&
msg
,
int
timeout
=
-
1
);
// -1 forever
void
setDebugDumpers
(
bool
on
);
void
setSkipKnownFrames
(
bool
on
);
private
slots
:
void
setDebugDumpers
(
bool
on
);
void
setUseDumpers
(
bool
on
);
void
showDebuggerOutput
(
const
QString
&
prefix
,
const
QString
&
msg
);
void
showDebuggerInput
(
const
QString
&
prefix
,
const
QString
&
msg
);
...
...
@@ -309,7 +309,6 @@ private slots:
void
setStatus
(
int
status
);
void
clearStatusMessage
();
void
attemptBreakpointSynchronization
();
void
recheckCustomDumperAvailability
();
private:
//
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
da1492cf
...
...
@@ -287,7 +287,7 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
m_ui
.
checkBoxListSourceFiles
->
setChecked
(
m_settings
.
m_listSourceFiles
);
m_ui
.
checkBoxSkipKnownFrames
->
setChecked
(
m_settings
.
m_skipKnownFrames
);
m_ui
.
checkBoxDebugDumpers
->
setChecked
(
m_settings
.
m_debugDumpers
);
m_ui
.
checkBoxUse
Custom
Dumpers
->
setChecked
(
m_settings
.
m_useDumpers
);
m_ui
.
checkBoxUseDumpers
->
setChecked
(
m_settings
.
m_useDumpers
);
m_ui
.
checkBoxUseToolTips
->
setChecked
(
m_settings
.
m_useToolTips
);
connect
(
m_ui
.
radioButtonSelectedPluginBreakpoints
,
SIGNAL
(
toggled
(
bool
)),
...
...
@@ -310,8 +310,8 @@ QWidget *GdbOptionPage::createPage(QWidget *parent)
//m_dumpLogAction = new QAction(this);
//m_dumpLogAction->setText(tr("Dump Log File for Debugging Purposes"));
//
connect
(
m_ui
.
checkBoxUse
Custom
Dumpers
,
SIGNAL
(
clicked
(
bool
)),
action
(
UseDumpers
),
SLOT
(
trigger
(
bool
)));
connect
(
m_ui
.
checkBoxUseDumpers
,
SIGNAL
(
clicked
()),
action
(
UseDumpers
),
SLOT
(
trigger
()));
return
w
;
}
...
...
@@ -325,7 +325,7 @@ void GdbOptionPage::apply()
m_settings
.
m_skipKnownFrames
=
m_ui
.
checkBoxSkipKnownFrames
->
isChecked
();
m_settings
.
m_listSourceFiles
=
m_ui
.
checkBoxListSourceFiles
->
isChecked
();
m_settings
.
m_debugDumpers
=
m_ui
.
checkBoxDebugDumpers
->
isChecked
();
m_settings
.
m_useDumpers
=
m_ui
.
checkBoxUse
Custom
Dumpers
->
isChecked
();
m_settings
.
m_useDumpers
=
m_ui
.
checkBoxUseDumpers
->
isChecked
();
m_settings
.
m_useToolTips
=
m_ui
.
checkBoxUseToolTips
->
isChecked
();
m_settings
.
m_pluginAllBreakpoints
=
...
...
src/plugins/debugger/gdbengine.cpp
View file @
da1492cf
...
...
@@ -287,6 +287,10 @@ void GdbEngine::initializeConnections()
connect
(
action
(
UseDumpers
),
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
setUseDumpers
(
bool
)));
connect
(
action
(
DebugDumpers
),
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
setDebugDumpers
(
bool
)));
connect
(
action
(
RecheckDumpers
),
SIGNAL
(
triggered
()),
this
,
SLOT
(
recheckCustomDumperAvailability
()));
}
void
GdbEngine
::
initializeVariables
()
...
...
src/plugins/debugger/gdbengine.h
View file @
da1492cf
...
...
@@ -130,7 +130,7 @@ private:
void
loadSymbols
(
const
QString
&
moduleName
);
void
loadAllSymbols
();
void
setDebugDumpers
(
bool
on
);
Q_SLOT
void
setDebugDumpers
(
bool
on
);
Q_SLOT
void
setUseDumpers
(
bool
on
);
//
...
...
src/plugins/debugger/gdboptionpage.ui
View file @
da1492cf
...
...
@@ -132,7 +132,7 @@
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"checkBoxUse
Custom
Dumpers"
>
<widget
class=
"QCheckBox"
name=
"checkBoxUseDumpers"
>
<property
name=
"toolTip"
>
<string>
Checking this will make the debugger try to use code to format certain data (QObject, QString, std::string etc.) nicely.
</string>
</property>
...
...
src/plugins/debugger/idebuggerengine.h
View file @
da1492cf
...
...
@@ -81,8 +81,6 @@ public:
virtual
void
loadAllSymbols
()
=
0
;
virtual
void
reloadRegisters
()
=
0
;
virtual
void
setDebugDumpers
(
bool
on
)
=
0
;
virtual
void
recheckCustomDumperAvailability
()
=
0
;
virtual
void
reloadSourceFiles
()
=
0
;
};
...
...
src/plugins/debugger/scriptengine.h
View file @
da1492cf
...
...
@@ -97,9 +97,6 @@ private:
void
loadSessionData
()
{}
void
saveSessionData
()
{}
void
setDebugDumpers
(
bool
)
{}
void
recheckCustomDumperAvailability
()
{}
void
assignValueInDebugger
(
const
QString
&
expr
,
const
QString
&
value
);
void
executeDebuggerCommand
(
const
QString
&
command
);
...
...
src/plugins/debugger/watchwindow.cpp
View file @
da1492cf
...
...
@@ -106,9 +106,9 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
act2
->
setChecked
(
m_alwaysResizeColumnsToContents
);
QAction
*
act3
=
0
;
QAction
*
act4
=
0
;
QAction
*
act5
=
new
QAction
(
"Debugger properties..."
,
&
menu
);
QAction
*
act6
=
new
QAction
(
"Re-check availability of custom dumpers"
,
&
menu
);
QAction
*
act7
=
action
(
UseDumpers
);
QAction
*
act5
=
action
(
RecheckDumpers
);
QAction
*
act6
=
action
(
UseDumpers
);
QAction
*
act7
=
action
(
SettingsDialog
);
menu
.
addAction
(
act1
);
menu
.
addAction
(
act2
);
...
...
@@ -134,9 +134,10 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
// FIXME: menu.addAction(act4);
}
menu
.
addSeparator
();
menu
.
addAction
(
act5
);
menu
.
addAction
(
act6
);
menu
.
addSeparator
();
menu
.
addAction
(
act7
);
menu
.
addAction
(
act5
);
QAction
*
act
=
menu
.
exec
(
ev
->
globalPos
());
...
...
@@ -153,10 +154,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
emit
requestRemoveWatchExpression
(
exp
);
else
if
(
act
==
act4
)
model
()
->
setData
(
mi0
,
!
visual
,
VisualRole
);
else
if
(
act
==
act5
)
emit
settingsDialogRequested
();
else
if
(
act
==
act6
)
emit
requestRecheckCustomDumperAvailability
();
else
act
->
trigger
();
}
void
WatchWindow
::
resizeColumnsToContents
()
...
...
src/plugins/debugger/watchwindow.h
View file @
da1492cf
...
...
@@ -63,8 +63,6 @@ signals:
void
requestAssignValue
(
const
QString
&
exp
,
const
QString
&
value
);
void
requestExpandChildren
(
const
QModelIndex
&
idx
);
void
requestCollapseChildren
(
const
QModelIndex
&
idx
);
void
requestRecheckCustomDumperAvailability
();
void
settingsDialogRequested
();
private
slots
:
void
handleChangedItem
(
QWidget
*
);
...
...
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