forked from qt-creator/qt-creator
debugger: cleanup
This commit is contained in:
@@ -45,13 +45,6 @@
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
enum GuessChildrenResult
|
||||
{
|
||||
HasChildren,
|
||||
HasNoChildren,
|
||||
HasPossiblyChildren
|
||||
};
|
||||
|
||||
static QString htmlEscape(const QString &plain)
|
||||
{
|
||||
QString rich;
|
||||
@@ -127,19 +120,6 @@ bool isIntOrFloatType(const QByteArray &type)
|
||||
return isIntType(type) || isFloatType(type);
|
||||
}
|
||||
|
||||
GuessChildrenResult guessChildren(const QByteArray &type)
|
||||
{
|
||||
if (isIntOrFloatType(type))
|
||||
return HasNoChildren;
|
||||
if (isCharPointerType(type))
|
||||
return HasNoChildren;
|
||||
if (isPointerType(type))
|
||||
return HasChildren;
|
||||
if (type.endsWith("QString"))
|
||||
return HasNoChildren;
|
||||
return HasPossiblyChildren;
|
||||
}
|
||||
|
||||
WatchData::WatchData() :
|
||||
id(0),
|
||||
state(InitialState),
|
||||
@@ -234,6 +214,21 @@ void WatchData::setValueToolTip(const QString &tooltip)
|
||||
valuetooltip = tooltip;
|
||||
}
|
||||
|
||||
enum GuessChildrenResult { HasChildren, HasNoChildren, HasPossiblyChildren };
|
||||
|
||||
static GuessChildrenResult guessChildren(const QByteArray &type)
|
||||
{
|
||||
if (isIntOrFloatType(type))
|
||||
return HasNoChildren;
|
||||
if (isCharPointerType(type))
|
||||
return HasNoChildren;
|
||||
if (isPointerType(type))
|
||||
return HasChildren;
|
||||
if (type.endsWith("QString"))
|
||||
return HasNoChildren;
|
||||
return HasPossiblyChildren;
|
||||
}
|
||||
|
||||
void WatchData::setType(const QByteArray &str, bool guessChildrenFromType)
|
||||
{
|
||||
type = str.trimmed();
|
||||
|
||||
Reference in New Issue
Block a user