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
ba811dfb
Commit
ba811dfb
authored
Nov 23, 2010
by
hjk
Browse files
debugger: make watchers visible after project load again
parent
790648b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggerplugin.cpp
View file @
ba811dfb
...
...
@@ -467,6 +467,37 @@ void AttachRemoteParameters::clear()
attachTarget
.
clear
();
}
///////////////////////////////////////////////////////////////////////
//
// DummyEngine
//
///////////////////////////////////////////////////////////////////////
class
DummyEngine
:
public
DebuggerEngine
{
Q_OBJECT
public:
DummyEngine
()
:
DebuggerEngine
(
DebuggerStartParameters
())
{}
virtual
~
DummyEngine
()
{}
virtual
void
setupEngine
()
{}
virtual
void
setupInferior
()
{}
virtual
void
runEngine
()
{}
virtual
void
shutdownEngine
()
{}
virtual
void
shutdownInferior
()
{}
virtual
void
executeDebuggerCommand
(
const
QString
&
)
{}
virtual
unsigned
debuggerCapabilities
()
const
{
return
0
;
}
};
static
DebuggerEngine
*
dummyEngine
()
{
static
DummyEngine
dummy
;
return
&
dummy
;
}
///////////////////////////////////////////////////////////////////////
//
// DebugMode
...
...
@@ -2463,30 +2494,10 @@ void DebuggerPluginPrivate::startDebugger(RunControl *rc)
}
class
DummyEngine
:
public
DebuggerEngine
{
Q_OBJECT
public:
DummyEngine
()
:
DebuggerEngine
(
DebuggerStartParameters
())
{}
virtual
~
DummyEngine
()
{}
virtual
void
setupEngine
()
{}
virtual
void
setupInferior
()
{}
virtual
void
runEngine
()
{}
virtual
void
shutdownEngine
()
{}
virtual
void
shutdownInferior
()
{}
virtual
void
executeDebuggerCommand
(
const
QString
&
)
{}
virtual
unsigned
debuggerCapabilities
()
const
{
return
0
;
}
};
void
DebuggerPluginPrivate
::
connectEngine
(
DebuggerEngine
*
engine
)
{
static
DummyEngine
dummyEngine
;
if
(
!
engine
)
engine
=
&
dummyEngine
;
engine
=
dummyEngine
()
;
if
(
m_currentEngine
==
engine
)
return
;
...
...
@@ -2914,7 +2925,7 @@ void DebuggerPluginPrivate::activateDebugMode()
void
DebuggerPluginPrivate
::
sessionLoaded
()
{
m_breakHandler
->
loadSessionData
();
W
atchHandler
::
loadSessionData
();
dummyEngine
()
->
w
atchHandler
()
->
loadSessionData
();
synchronizeWatchers
();
}
...
...
@@ -2931,7 +2942,7 @@ void DebuggerPluginPrivate::aboutToUnloadSession()
void
DebuggerPluginPrivate
::
aboutToSaveSession
()
{
W
atchHandler
::
save
SessionData
();
dummyEngine
()
->
w
atchHandler
()
->
load
SessionData
();
m_breakHandler
->
saveSessionData
();
}
...
...
src/plugins/debugger/watchhandler.cpp
View file @
ba811dfb
...
...
@@ -1492,10 +1492,10 @@ void WatchHandler::updateWatchers()
void
WatchHandler
::
loadWatchers
()
{
m_watcherNames
.
clear
();
QVariant
value
=
debuggerCore
()
->
sessionValue
(
"Watchers"
);
foreach
(
const
QString
&
exp
,
value
.
toStringList
())
m_watcherNames
[
exp
.
toLatin1
()]
=
watcherCounter
++
;
watchExpression
(
exp
);
//qDebug() << "LOAD WATCHERS: " << m_watchers;
}
...
...
src/plugins/debugger/watchhandler.h
View file @
ba811dfb
...
...
@@ -155,8 +155,8 @@ public:
const
WatchData
*
findItem
(
const
QByteArray
&
iname
)
const
;
QModelIndex
itemIndex
(
const
QByteArray
&
iname
)
const
;
static
void
loadSessionData
();
static
void
saveSessionData
();
void
loadSessionData
();
void
saveSessionData
();
void
removeTooltip
();
bool
isExpandedIName
(
const
QByteArray
&
iname
)
const
...
...
@@ -182,8 +182,8 @@ public:
private:
friend
class
WatchModel
;
static
void
loadWatchers
();
static
void
saveWatchers
();
void
loadWatchers
();
void
saveWatchers
();
static
void
loadTypeFormats
();
static
void
saveTypeFormats
();
...
...
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