Hello all, I wanted to add QUrl to debug helper (as practice).
my function looks like
static void qDumpQUrl(QDumper &d)
{
const QUrl &url = *reinterpret_cast<const QUrl *>(d.data);
QList<QPair<QString,QString> > queryItems = url.queryItems();
d.putItem("value", url.toString());
d.putItem("valueencoded", "2");
d.putItem("type", NS"QUrl");
d.putItem("numchild", "1");
if (d.dumpChildren) {
d.beginChildren();
d.putHash("authority", url.authority());
d.putHash("fragment", url.fragment());
d.putHash("host", url.host());
d.putHash("isRelative", url.isRelative());
d.putHash("isValid", url.isValid());
d.putHash("password", url.password());
d.putHash("path", url.path());
d.putHash("port", url.port());
d.putHash("scheme", url.scheme());
d.putHash("userInfo", url.userInfo());
d.putHash("userName", url.userName());
}
d.disarm();
}
This function works well, but i'm not understand how to add queryItems
to dump.
I tried to do it via
d.beginHash();
d.putItem("addr", &queryItems);
qDumpInnerValueHelper(d, "QList<QPair<QString,QString> >",
&queryItems);
d.endHash();
but without success.
Please help me with it.
With best regards, Rudenko Eugene.
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator