forked from qt-creator/qt-creator
Debugger: Dont show invalid hit count
The CDB Engine cannot report the hit count. Instead of showing "0", we don't show the hit count at all. Task-number: QTCREATORBUG-20069 Change-Id: Ie8b5478ba85c7255b13070cb488599a2b2ca4537 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1940,10 +1940,13 @@ QString BreakpointItem::toolTip() const
|
||||
<< "<tr><td>" << Tr::tr("Marker File:")
|
||||
<< "</td><td>" << markerFileName().toUserOutput() << "</td></tr>"
|
||||
<< "<tr><td>" << Tr::tr("Marker Line:")
|
||||
<< "</td><td>" << markerLineNumber() << "</td></tr>"
|
||||
<< "<tr><td>" << Tr::tr("Hit Count:")
|
||||
<< "</td><td>" << m_parameters.hitCount << "</td></tr>"
|
||||
<< "</table><br><table>"
|
||||
<< "</td><td>" << markerLineNumber() << "</td></tr>";
|
||||
if (m_parameters.hitCount) {
|
||||
str << "<tr><td>" << Tr::tr("Hit Count:")
|
||||
<< "</td><td>" << *m_parameters.hitCount << "</td></tr>";
|
||||
}
|
||||
|
||||
str << "</table><br><table>"
|
||||
<< "<tr><th>" << Tr::tr("Property")
|
||||
<< "</th><th>" << Tr::tr("Requested")
|
||||
<< "</th><th>" << Tr::tr("Obtained") << "</th></tr>";
|
||||
|
@@ -207,7 +207,8 @@ QString BreakpointParameters::toString() const
|
||||
ts << " [pending]";
|
||||
if (!functionName.isEmpty())
|
||||
ts << " Function: " << functionName;
|
||||
ts << " Hit: " << hitCount << " times";
|
||||
if (hitCount)
|
||||
ts << " Hit: " << *hitCount << " times";
|
||||
ts << ' ';
|
||||
|
||||
return result;
|
||||
|
@@ -155,7 +155,7 @@ public:
|
||||
bool oneShot; //!< Should this breakpoint trigger only once?
|
||||
|
||||
bool pending = true; //!< Breakpoint not fully resolved.
|
||||
int hitCount = 0; //!< Number of times this has been hit.
|
||||
std::optional<int> hitCount; //!< Number of times this has been hit.
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
Reference in New Issue
Block a user