Commit ea4d7672 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Fix the naming of the containers for statistics

parent 25a36d8e
......@@ -114,12 +114,15 @@ void Stats_window::set_container_names() {
for (Container::VectorIt it = root_containers->begin();
it != root_containers->end();
it ++) {
string name = (*it)->get_name();
string alias = (*it)->get_alias();
QStringList temp(QString::fromStdString(alias));
QTreeWidgetItem *current_node = new QTreeWidgetItem((QTreeWidgetItem *)0, temp);
QStringList str_name(QString::fromStdString(name));
QString str_alias(QString::fromStdString(alias));
QTreeWidgetItem *current_node = new QTreeWidgetItem((QTreeWidgetItem *)0, str_name);
current_node->setFlags(flg);
current_node->setCheckState(0, Qt::Checked);
current_node->setText(1, str_alias);
items.append(current_node);
// Recursivity to add the children names
......@@ -136,13 +139,17 @@ void Stats_window::set_container_names_rec(QTreeWidgetItem *current_node, Contai
for (Container::VectorIt it = children->begin();
it != children->end();
it ++) {
it ++)
{
// We create the node and we do the recursivity
string alias = (*it)->get_alias();
QStringList temp(QString::fromStdString(alias));
QTreeWidgetItem *node = new QTreeWidgetItem(current_node, temp);
string name = (*it)->get_name();
string alias = (*it)->get_alias();
QStringList str_name(QString::fromStdString(name));
QString str_alias(QString::fromStdString(alias));
QTreeWidgetItem *node = new QTreeWidgetItem(current_node, str_name);
node->setFlags(flg);
node->setCheckState(0,Qt::Checked);
node->setText(1, str_alias);
set_container_names_rec(node ,(*it));
}
}
......@@ -205,7 +212,7 @@ void Stats_window::set_selected_nodes(string kind_of_state){
QTreeWidgetItemIterator it(_nodes_selected);
for (; *it; it++) {
if ((*it)->checkState(0) == Qt::Checked){
Container *cont = _trace->search_container((*it)->text(0).toStdString());
Container *cont = _trace->search_container((*it)->text(1).toStdString());
if (!cont) {
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment