mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
Update Logger for displaying array
This commit is contained in:
@@ -258,7 +258,17 @@ void SeerVariableLoggerBrowserWidget::handleItemCreate (QTreeWidgetItem* parentI
|
||||
parentItem->setText(3, id_text);
|
||||
|
||||
// Convert to a list of name/value pairs.
|
||||
QStringList nv_pairs = Seer::parseCommaList(text, '{', '}');
|
||||
QStringList nv_pairs;
|
||||
if (text.startsWith("{"))
|
||||
{
|
||||
// String might describe an array: {a=1, b=1},{a=1, b=1},{a=1, b=1},{a=1, b=1}
|
||||
// parentItem->text(0) is timestamp -> parent name should be parentItem->text(1)
|
||||
nv_pairs = Seer::parseArray(parentItem->text(1), text);
|
||||
}
|
||||
else
|
||||
{
|
||||
nv_pairs = Seer::parseCommaList(text, '{', '}');
|
||||
}
|
||||
|
||||
// Go through each pair and add the name and its value to the tree.
|
||||
for (const auto& nv : nv_pairs) {
|
||||
|
||||
Reference in New Issue
Block a user