forked from qt-creator/qt-creator
Debugger: Make WatchItem accessible to engines
Change-Id: I1586a4c4f11cc4d622a6e164875f5b6ee2e1eb18 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -114,54 +114,6 @@ static QByteArray stripForFormat(const QByteArray &ba)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// WatchItem
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class WatchItem : public TreeItem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
WatchItem() : fetchTriggered(false) {}
|
|
||||||
|
|
||||||
WatchItem(const QByteArray &i, const QString &n)
|
|
||||||
{
|
|
||||||
fetchTriggered = false;
|
|
||||||
d.iname = i;
|
|
||||||
d.name = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
WatchItem *parentItem() const { return dynamic_cast<WatchItem *>(parent()); }
|
|
||||||
const WatchModel *watchModel() const;
|
|
||||||
WatchModel *watchModel();
|
|
||||||
|
|
||||||
QVariant data(int column, int role) const;
|
|
||||||
Qt::ItemFlags flags(int column) const;
|
|
||||||
|
|
||||||
bool canFetchMore() const;
|
|
||||||
void fetchMore();
|
|
||||||
|
|
||||||
QString displayName() const;
|
|
||||||
QString displayType() const;
|
|
||||||
QString displayValue() const;
|
|
||||||
QString formattedValue() const;
|
|
||||||
QString expression() const;
|
|
||||||
|
|
||||||
int itemFormat() const;
|
|
||||||
|
|
||||||
QVariant editValue() const;
|
|
||||||
int editType() const;
|
|
||||||
|
|
||||||
void formatRequests(QByteArray *out) const;
|
|
||||||
void showInEditorHelper(QString *contents, int depth) const;
|
|
||||||
WatchItem *findItem(const QByteArray &iname);
|
|
||||||
|
|
||||||
public:
|
|
||||||
WatchData d;
|
|
||||||
bool fetchTriggered;
|
|
||||||
};
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// SeparatedView
|
// SeparatedView
|
||||||
@@ -1891,6 +1843,33 @@ TypeFormatItem TypeFormatList::find(int format) const
|
|||||||
return TypeFormatItem();
|
return TypeFormatItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// WatchItem
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
WatchItem::WatchItem()
|
||||||
|
: fetchTriggered(false)
|
||||||
|
{}
|
||||||
|
|
||||||
|
WatchItem::WatchItem(const QByteArray &i, const QString &n)
|
||||||
|
{
|
||||||
|
fetchTriggered = false;
|
||||||
|
d.iname = i;
|
||||||
|
d.name = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
WatchItem::WatchItem(const WatchData &data)
|
||||||
|
: d(data), fetchTriggered(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
WatchItem *WatchItem::parentItem() const
|
||||||
|
{
|
||||||
|
return dynamic_cast<WatchItem *>(parent());
|
||||||
|
}
|
||||||
|
|
||||||
const WatchModel *WatchItem::watchModel() const
|
const WatchModel *WatchItem::watchModel() const
|
||||||
{
|
{
|
||||||
return static_cast<const WatchModel *>(model());
|
return static_cast<const WatchModel *>(model());
|
||||||
|
@@ -44,6 +44,43 @@ namespace Internal {
|
|||||||
class SeparatedView;
|
class SeparatedView;
|
||||||
class WatchModel;
|
class WatchModel;
|
||||||
|
|
||||||
|
class WatchItem : public Utils::TreeItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
WatchItem();
|
||||||
|
WatchItem(const QByteArray &i, const QString &n);
|
||||||
|
explicit WatchItem(const WatchData &data);
|
||||||
|
|
||||||
|
WatchItem *parentItem() const;
|
||||||
|
const WatchModel *watchModel() const;
|
||||||
|
WatchModel *watchModel();
|
||||||
|
|
||||||
|
QVariant data(int column, int role) const;
|
||||||
|
Qt::ItemFlags flags(int column) const;
|
||||||
|
|
||||||
|
bool canFetchMore() const;
|
||||||
|
void fetchMore();
|
||||||
|
|
||||||
|
QString displayName() const;
|
||||||
|
QString displayType() const;
|
||||||
|
QString displayValue() const;
|
||||||
|
QString formattedValue() const;
|
||||||
|
QString expression() const;
|
||||||
|
|
||||||
|
int itemFormat() const;
|
||||||
|
|
||||||
|
QVariant editValue() const;
|
||||||
|
int editType() const;
|
||||||
|
|
||||||
|
void formatRequests(QByteArray *out) const;
|
||||||
|
void showInEditorHelper(QString *contents, int depth) const;
|
||||||
|
WatchItem *findItem(const QByteArray &iname);
|
||||||
|
|
||||||
|
public:
|
||||||
|
WatchData d;
|
||||||
|
bool fetchTriggered;
|
||||||
|
};
|
||||||
|
|
||||||
// Special formats. Keep in sync with dumper.py.
|
// Special formats. Keep in sync with dumper.py.
|
||||||
enum DisplayFormat
|
enum DisplayFormat
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user