Commit 15f1ca90 authored by hjk's avatar hjk

Debugger: Remove some only MI related code

Change-Id: I18d247efe2bcf0815e7867148b62fdecdd9af7be
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 3fd6e9e7
......@@ -260,7 +260,6 @@ void WatchData::setType(const QByteArray &str, bool guessChildrenFromType)
else
changed = false;
}
setTypeUnneeded();
if (guessChildrenFromType) {
switch (guessChildren(type)) {
case HasChildren:
......@@ -320,7 +319,7 @@ QString WatchData::toString() const
if (isValueNeeded())
str << "value=<needed>,";
if (isValueKnown() && !value.isEmpty())
if (!value.isEmpty())
str << "value=\"" << value << doubleQuoteComma;
if (elided)
......@@ -333,15 +332,9 @@ QString WatchData::toString() const
if (!dumperFlags.isEmpty())
str << "dumperFlags=\"" << dumperFlags << doubleQuoteComma;
if (isTypeNeeded())
str << "type=<needed>,";
if (isTypeKnown() && !type.isEmpty())
str << "type=\"" << type << doubleQuoteComma;
str << "type=\"" << type << doubleQuoteComma;
if (isHasChildrenNeeded())
str << "hasChildren=<needed>,";
if (isHasChildrenKnown())
str << "hasChildren=\"" << (hasChildren ? "true" : "false") << doubleQuoteComma;
str << "hasChildren=\"" << (hasChildren ? "true" : "false") << doubleQuoteComma;
if (isChildrenNeeded())
str << "children=<needed>,";
......@@ -511,8 +504,6 @@ void WatchData::updateType(const GdbMi &item)
{
if (item.isValid())
setType(item.data());
else if (type.isEmpty())
setTypeNeeded();
}
void WatchData::updateDisplayedType(const GdbMi &item)
......
......@@ -48,19 +48,15 @@ public:
enum State
{
Complete = 0,
HasChildrenNeeded = 1,
ValueNeeded = 2,
TypeNeeded = 4,
ChildrenNeeded = 8,
NeededMask = ValueNeeded
| TypeNeeded
| ChildrenNeeded
| HasChildrenNeeded,
InitialState = ValueNeeded
| TypeNeeded
| ChildrenNeeded
| HasChildrenNeeded
};
......@@ -69,27 +65,14 @@ public:
void setAllNeeded() { state = NeededMask; }
void setAllUnneeded() { state = State(0); }
bool isTypeNeeded() const { return state & TypeNeeded; }
bool isTypeKnown() const { return !(state & TypeNeeded); }
void setTypeNeeded() { state = State(state | TypeNeeded); }
void setTypeUnneeded() { state = State(state & ~TypeNeeded); }
bool isValueNeeded() const { return state & ValueNeeded; }
bool isValueKnown() const { return !(state & ValueNeeded); }
void setValueNeeded() { state = State(state | ValueNeeded); }
void setValueUnneeded() { state = State(state & ~ValueNeeded); }
bool isChildrenNeeded() const { return state & ChildrenNeeded; }
bool isChildrenKnown() const { return !(state & ChildrenNeeded); }
void setChildrenNeeded() { state = State(state | ChildrenNeeded); }
void setChildrenUnneeded() { state = State(state & ~ChildrenNeeded); }
bool isHasChildrenNeeded() const { return state & HasChildrenNeeded; }
bool isHasChildrenKnown() const { return !(state & HasChildrenNeeded); }
void setHasChildrenNeeded() { state = State(state | HasChildrenNeeded); }
void setHasChildrenUnneeded() { state = State(state & ~HasChildrenNeeded); }
void setHasChildren(bool c) { hasChildren = c; setHasChildrenUnneeded();
if (!c) setChildrenUnneeded(); }
void setHasChildren(bool c) { hasChildren = c; if (!c) setChildrenUnneeded(); }
bool isLocal() const { return iname.startsWith("local."); }
bool isWatcher() const { return iname.startsWith("watch."); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment