Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
7c337614
Commit
7c337614
authored
Nov 15, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: show disabled breakpoints again
parent
a3b1ee1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
+32
-15
src/plugins/debugger/breakhandler.cpp
src/plugins/debugger/breakhandler.cpp
+29
-13
src/plugins/debugger/breakhandler.h
src/plugins/debugger/breakhandler.h
+1
-2
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.cpp
+2
-0
No files found.
src/plugins/debugger/breakhandler.cpp
View file @
7c337614
...
...
@@ -462,7 +462,9 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
type BreakHandler::getter(BreakpointId id) const \
{ \
ConstIterator it = m_storage.find(id); \
QTC_ASSERT(it != m_storage.end(), return type()); \
QTC_ASSERT(it != m_storage.end(), \
qDebug() << "ID" << id << "NOT KNOWN"; \
return type()); \
return it->data.getter(); \
}
...
...
@@ -470,7 +472,8 @@ type BreakHandler::getter(BreakpointId id) const \
void BreakHandler::setter(BreakpointId id, const type &value) \
{ \
Iterator it = m_storage.find(id); \
QTC_ASSERT(it != m_storage.end(), return); \
QTC_ASSERT(it != m_storage.end(), \
qDebug() << "ID" << id << "NOT KNOWN"; return); \
if (it->data.setter(value)) \
scheduleSynchronization(); \
}
...
...
@@ -485,7 +488,6 @@ PROPERTY(QString, markerFileName, setMarkerFileName)
PROPERTY
(
QString
,
fileName
,
setFileName
)
PROPERTY
(
QString
,
functionName
,
setFunctionName
)
PROPERTY
(
int
,
markerLineNumber
,
setMarkerLineNumber
)
PROPERTY
(
bool
,
isEnabled
,
setEnabled
)
PROPERTY
(
BreakpointType
,
type
,
setType
)
PROPERTY
(
QByteArray
,
threadSpec
,
setThreadSpec
)
PROPERTY
(
QByteArray
,
condition
,
setCondition
)
...
...
@@ -493,6 +495,25 @@ PROPERTY(int, lineNumber, setLineNumber)
PROPERTY
(
quint64
,
address
,
setAddress
)
PROPERTY
(
int
,
ignoreCount
,
setIgnoreCount
)
bool
BreakHandler
::
isEnabled
(
BreakpointId
id
)
const
{
ConstIterator
it
=
m_storage
.
find
(
id
);
QTC_ASSERT
(
it
!=
m_storage
.
end
(),
return
BreakpointDead
);
return
it
->
data
.
isEnabled
();
}
void
BreakHandler
::
setEnabled
(
BreakpointId
id
,
bool
on
)
{
Iterator
it
=
m_storage
.
find
(
id
);
QTC_ASSERT
(
it
!=
m_storage
.
end
(),
return
);
//qDebug() << "SET ENABLED: " << id << it->data.isEnabled() << on;
if
(
it
->
data
.
setEnabled
(
on
))
{
it
->
destroyMarker
();
updateMarker
(
id
);
scheduleSynchronization
();
}
}
BreakpointState
BreakHandler
::
state
(
BreakpointId
id
)
const
{
ConstIterator
it
=
m_storage
.
find
(
id
);
...
...
@@ -644,18 +665,13 @@ void BreakHandler::breakByFunction(const QString &functionName)
QIcon
BreakHandler
::
icon
(
BreakpointId
id
)
const
{
//if (!m_handler->isActive())
// return m_handler->emptyIcon();
ConstIterator
it
=
m_storage
.
find
(
id
);
QTC_ASSERT
(
it
!=
m_storage
.
end
(),
return
pendingBreakPointIcon
());
//if (!isActive())
// return emptyIcon();
switch
(
it
->
state
)
{
case
BreakpointInserted
:
if
(
!
it
->
data
.
isEnabled
())
return
m_disabledBreakpointIcon
;
if
(
it
->
state
==
BreakpointInserted
)
return
breakpointIcon
();
default:
return
pendingBreakPointIcon
();
}
return
pendingBreakPointIcon
();
}
void
BreakHandler
::
scheduleSynchronization
()
...
...
@@ -887,7 +903,7 @@ QString BreakHandler::BreakpointItem::toToolTip() const
str
<<
"<html><body><table>"
//<< "<tr><td>" << tr("Id:") << "</td><td>" << m_id << "</td></tr>"
<<
"<tr><td>"
<<
tr
(
"State:"
)
<<
"</td><td>"
<<
state
<<
"("
<<
stateToString
(
state
)
<<
")</td></tr>"
<<
"</td><td>"
<<
state
<<
"
("
<<
stateToString
(
state
)
<<
")</td></tr>"
<<
"<tr><td>"
<<
tr
(
"Engine:"
)
<<
"</td><td>"
<<
(
engine
?
engine
->
objectName
()
:
"0"
)
<<
"</td></tr>"
<<
"<tr><td>"
<<
tr
(
"Marker File:"
)
...
...
src/plugins/debugger/breakhandler.h
View file @
7c337614
...
...
@@ -116,8 +116,7 @@ public:
#undef PROPERTY
BreakpointState
state
(
BreakpointId
id
)
const
;
bool
isEnabled
(
BreakpointId
id
)
const
;
void
setEnabled
(
BreakpointId
id
,
const
bool
&
on
);
void
updateEnabled
(
BreakpointId
id
,
const
bool
&
on
);
void
setEnabled
(
BreakpointId
id
,
bool
on
);
void
updateLineNumberFromMarker
(
BreakpointId
id
,
int
lineNumber
);
DebuggerEngine
*
engine
(
BreakpointId
id
)
const
;
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
7c337614
...
...
@@ -937,6 +937,7 @@ public slots:
void
synchronizeBreakpoints
()
{
showMessage
(
"ATTEMPT SYNC"
,
LogDebug
);
for
(
int
i
=
0
,
n
=
m_snapshotHandler
->
size
();
i
!=
n
;
++
i
)
{
if
(
DebuggerRunControl
*
runControl
=
m_snapshotHandler
->
at
(
i
))
{
DebuggerEngine
*
engine
=
runControl
->
engine
();
...
...
@@ -2319,6 +2320,7 @@ void DebuggerPluginPrivate::requestContextMenu(TextEditor::ITextEditor *editor,
// Enable/disable existing breakpoint.
act
=
new
QAction
(
menu
);
act
->
setData
(
int
(
id
));
if
(
breakHandler
()
->
isEnabled
(
id
))
{
act
->
setText
(
tr
(
"Disable Breakpoint %1"
).
arg
(
id
));
connect
(
act
,
SIGNAL
(
triggered
()),
...
...
Write
Preview
Markdown
is supported
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