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
Marco Bubke
flatpak-qt-creator
Commits
7cd8ba8a
Commit
7cd8ba8a
authored
Aug 28, 2009
by
hjk
Browse files
debugger: disable bulk updates
parent
da76dcc3
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggermanager.cpp
View file @
7cd8ba8a
...
...
@@ -318,6 +318,8 @@ void DebuggerManager::init()
//tooltipView->setModel(m_watchHandler->model(TooltipsWatch));
//qRegisterMetaType<WatchData>("Debugger::Internal::WatchData");
qRegisterMetaType
<
WatchData
>
(
"WatchData"
);
connect
(
m_watchHandler
,
SIGNAL
(
watchDataUpdateNeeded
(
WatchData
)),
this
,
SLOT
(
updateWatchDataAnnounce
()));
connect
(
m_watchHandler
,
SIGNAL
(
watchDataUpdateNeeded
(
WatchData
)),
this
,
SLOT
(
updateWatchData
(
WatchData
)),
Qt
::
QueuedConnection
);
...
...
@@ -693,6 +695,12 @@ void DebuggerManager::updateWatchData(const WatchData &data)
m_engine
->
updateWatchData
(
data
);
}
void
DebuggerManager
::
updateWatchDataAnnounce
()
{
if
(
m_engine
)
m_engine
->
updateWatchDataAnnounce
();
}
static
inline
QString
msgEngineNotAvailable
(
const
char
*
engine
)
{
return
DebuggerManager
::
tr
(
"The application requires the debugger engine '%1', which is disabled."
).
arg
(
QLatin1String
(
engine
));
...
...
src/plugins/debugger/debuggermanager.h
View file @
7cd8ba8a
...
...
@@ -304,6 +304,7 @@ public slots:
void
detachDebugger
();
void
addToWatchWindow
();
void
updateWatchDataAnnounce
();
void
updateWatchData
(
const
WatchData
&
data
);
void
sessionLoaded
();
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
7cd8ba8a
...
...
@@ -83,7 +83,7 @@ namespace Internal {
using
namespace
Debugger
::
Constants
;
//#define DEBUG_PENDING 1
#define DEBUG_SUBITEM 1
//
#define DEBUG_SUBITEM 1
#if DEBUG_PENDING
# define PENDING_DEBUG(s) qDebug() << s
...
...
@@ -3127,6 +3127,13 @@ void GdbEngine::updateSubItem(const WatchData &data0)
QTC_ASSERT
(
false
,
return
);
}
void
GdbEngine
::
updateWatchDataAnnounce
()
{
// Bump requests to avoid model rebuilding during the nested
// updateWatchModel runs.
++
m_pendingRequests
;
}
void
GdbEngine
::
updateWatchData
(
const
WatchData
&
data
)
{
//m_pendingRequests = 0;
...
...
@@ -3137,9 +3144,6 @@ void GdbEngine::updateWatchData(const WatchData &data)
//qDebug() << data.toString();
#endif
// Bump requests to avoid model rebuilding during the nested
// updateWatchModel runs.
++
m_pendingRequests
;
updateSubItem
(
data
);
//PENDING_DEBUG("INTERNAL TRIGGERING UPDATE WATCH MODEL");
--
m_pendingRequests
;
...
...
@@ -3449,7 +3453,7 @@ void GdbEngine::handleChildren(const WatchData &data0, const GdbMi &item,
WatchData
childtemplate
;
setWatchDataType
(
childtemplate
,
item
.
findChild
(
"childtype"
));
setWatchDataChildCount
(
childtemplate
,
item
.
findChild
(
"childnumchild"
));
qDebug
()
<<
"CHILD TEMPLATE:"
<<
childtemplate
.
toString
();
//
qDebug() << "CHILD TEMPLATE:" << childtemplate.toString();
int
i
=
0
;
foreach
(
GdbMi
child
,
children
.
children
())
{
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
7cd8ba8a
...
...
@@ -332,6 +332,7 @@ private:
void
updateSubItem
(
const
WatchData
&
data
);
void
updateWatchData
(
const
WatchData
&
data
);
void
updateWatchDataAnnounce
();
void
rebuildModel
();
void
insertData
(
const
WatchData
&
data
);
...
...
src/plugins/debugger/idebuggerengine.h
View file @
7cd8ba8a
...
...
@@ -63,6 +63,7 @@ public:
virtual
bool
startDebugger
(
const
QSharedPointer
<
DebuggerStartParameters
>
&
startParameters
)
=
0
;
virtual
void
exitDebugger
()
=
0
;
virtual
void
detachDebugger
()
{}
virtual
void
updateWatchDataAnnounce
()
{}
virtual
void
updateWatchData
(
const
WatchData
&
data
)
=
0
;
virtual
void
stepExec
()
=
0
;
...
...
src/plugins/debugger/watchhandler.cpp
View file @
7cd8ba8a
...
...
@@ -806,6 +806,8 @@ static int findInsertPosition(const QList<WatchItem *> &list, const WatchItem *i
void
WatchModel
::
insertData
(
const
WatchData
&
data
)
{
// qDebug() << "WMI:" << data.toString();
static
int
bulk
=
0
;
//qDebug() << "SINGLE: " << ++bulk << data.toString();
QTC_ASSERT
(
!
data
.
iname
.
isEmpty
(),
return
);
WatchItem
*
parent
=
findItem
(
parentName
(
data
.
iname
),
m_root
);
if
(
!
parent
)
{
...
...
@@ -844,8 +846,9 @@ void WatchModel::insertData(const WatchData &data)
void
WatchModel
::
insertBulkData
(
const
QList
<
WatchData
>
&
list
)
{
//qDebug() << "WMI:" << list.toString();
static
int
bulk
=
0
;
//foreach (const WatchItem &data, list)
// qDebug() << data.toString();
// qDebug() <<
"BULK: " << ++bulk <<
data.toString();
QTC_ASSERT
(
!
list
.
isEmpty
(),
return
);
QString
parentIName
=
parentName
(
list
.
at
(
0
).
iname
);
WatchItem
*
parent
=
findItem
(
parentIName
,
m_root
);
...
...
@@ -1001,6 +1004,12 @@ void WatchHandler::insertData(const WatchData &data)
// bulk-insertion
void
WatchHandler
::
insertBulkData
(
const
QList
<
WatchData
>
&
list
)
{
#if 1
foreach
(
const
WatchItem
&
data
,
list
)
insertData
(
data
);
return
;
#endif
if
(
list
.
isEmpty
())
return
;
QMap
<
QString
,
QList
<
WatchData
>
>
hash
;
...
...
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