[Qt-creator] gdbmucros helper add dump classes

Rudenko Eugene erule.biz at gmail.com
Thu Oct 8 16:47:34 CEST 2009


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.



More information about the Qt-creator-old mailing list