Hi,
i am currently in the process of maintaining a legacy app. This has quite a few structures like:
QMap<QString, QMap<QString, QMap<QString, QMap<QString, QVariant> > > > Dep;
As interfaces are hardly used and I only need to make minor adjustments, I would like to keep the structure as it is, although some refactoring might be needed anyway. But to be able to understand what is going on, currently I just put some qDebug() << Dep; in there, and try to understand the output.
Problem is that it has no formatting at all. Does anyone know of a little script to create a better understandable display format? Or maybe of some patches to Qt?
To give you an example for my suffering:
QMap(("Test enable|test enable block", QMap(("disabled", QMap(("testblock1", QMap(("enableblock", QVariant(QString, "false") ) ) ) ) ) ( "enabled" , QMap(("testblock1", QMap(("enableblock", QVariant(QString, "true") ) ) ) ) ) ) ) ( "Test enable|test enable key" , QMap(("disabled", QMap(("testblock1|testkey", QMap(("enablekey", QVariant(QString, "false") ) ) ) ) ) ( "enabled" , QMap(("testblock1|testkey", QMap(("enablekey", QVariant(QString, "true") ) ) ) ) ) ) ) ( "testinsertitems|Insert item" , QMap(("test1", QMap(("testinsertitems|testinsert", QMap(("insertitems", QVariant(QVariantMap, QMap(("test1", QVariant(QString, "test1") ) ) ) ) ) ) ( "testinsertitems|testremove" , QMap(("removeitems", QVariant(QVariantMap, QMap(("test1", QVariant(QString, "test1") ) ) ) ) ) ) ) ) ( "test2" , QMap(("testinsertitems|testinsert", QMap(("insertitems", QVariant(QVariantMap, QMap(("test2", QVariant(QString, "test2") ) ) ) ) ) ) ( "testinsertitems|testremove" , QMap(("removeitems", QVariant(QVariantMap, QMap(("test2", QVariant(QString, "test2") ) ) ) ) ) ) ) ) ) ) ( "testsetminmax|test setmin" , QMap(("2", QMap(("testsetminmax|testkey1", QMap(("setmin", QVariant(int, 2) ) ) ) ( "testsetminmax|testkey2" , QMap(("setmax", QVariant(int, 2) ) ) ) ) ) ( "3" , QMap(("testsetminmax|testkey1", QMap(("setmin", QVariant(int, 3) ) ) ) ( "testsetminmax|testkey2" , QMap(("setmax", QVariant(int, 3) ) ) ) ) ) ) ) ( "testsetvalue|test set value" , QMap(("2", QMap(("testsetvalue|testkey1", QMap(("setvalue", QVariant(QString, "2") ) ) ) ( "testsetvalue|testkey2" , QMap(("setvalue", QVariant(QString, "2") ) ) ) ( "testsetvalue|testkey3" , QMap(("setvalue", QVariant(QString, "2") ) ) ) ) ) ( "3" , QMap(("testsetvalue|testkey1", QMap(("setvalue", QVariant(QString, "3") ) ) ) ( "testsetvalue|testkey2" , QMap(("setvalue", QVariant(QString, "3") ) ) ) ( "testsetvalue|testkey3" , QMap(("setvalue", QVariant(QString, "3") ) ) ) ) ) ) ) )
Thanks