debugger: implement a dumper for QAbstractItemModel

This also squashes a namespace related bug introduced by the watchutils
refactoring.
This commit is contained in:
hjk
2009-06-03 12:46:55 +02:00
parent 311ca7a074
commit d7af85a097
6 changed files with 143 additions and 12 deletions
+17
View File
@@ -48,6 +48,7 @@
#include <QtGui/QLabel>
#include <QtGui/QPainter>
#include <QtGui/QPainterPath>
#include <QtGui/QStandardItemModel>
#include <QtNetwork/QHostAddress>
@@ -787,6 +788,21 @@ void testStdVector()
vec.push_back(false);
}
void testQStandardItemModel()
{
QStandardItemModel m;
QStandardItem *i1, *i2, *i11;
m.appendRow(QList<QStandardItem *>()
<< (i1 = new QStandardItem("1")) << (new QStandardItem("a")));
m.appendRow(QList<QStandardItem *>()
<< (i2 = new QStandardItem("2")) << (new QStandardItem("b")));
i1->appendRow(QList<QStandardItem *>()
<< (i11 = new QStandardItem("11")) << (new QStandardItem("aa")));
int i = 1;
++i;
++i;
}
void testQString()
{
QString str = "Hello ";
@@ -1090,6 +1106,7 @@ int main(int argc, char *argv[])
QStringList list;
list << "aaa" << "bbb" << "cc";
testQStandardItemModel();
testQImage();
testNoArgumentName(1, 2, 3);
testIO();