diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-11-06 21:49:16 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-11-06 21:49:16 +0000 |
commit | 32074376acc8400f808688660a518d2e827d2edc (patch) | |
tree | 3792eff3813ee6e177d1a9ed6ff18e547b57ae9e /ui/qt/proto_tree.cpp | |
parent | 5d6e03f71b3063d3bfe3b9f868d7553ec6eb4504 (diff) |
Show the byte view when we select a packet. Update some method and
variable names.
svn path=/trunk/; revision=45953
Diffstat (limited to 'ui/qt/proto_tree.cpp')
-rw-r--r-- | ui/qt/proto_tree.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp index 180c87c8d6..e115ea5fbb 100644 --- a/ui/qt/proto_tree.cpp +++ b/ui/qt/proto_tree.cpp @@ -178,31 +178,31 @@ void ProtoTree::updateSelectionStatus(QTreeWidgetItem* item) { if (item) { field_info *fi; - QString itemInfo; + QString item_info; fi = item->data(0, Qt::UserRole).value<field_info *>(); if (!fi || !fi->hfinfo) return; if (fi->hfinfo->blurb != NULL && fi->hfinfo->blurb[0] != '\0') { - itemInfo.append(QString().fromUtf8(fi->hfinfo->blurb)); + item_info.append(QString().fromUtf8(fi->hfinfo->blurb)); } else { - itemInfo.append(QString().fromUtf8(fi->hfinfo->name)); + item_info.append(QString().fromUtf8(fi->hfinfo->name)); } - if (!itemInfo.isEmpty()) { + if (!item_info.isEmpty()) { int finfo_length; - itemInfo.append(" (" + QString().fromUtf8(fi->hfinfo->abbrev) + ")"); + item_info.append(" (" + QString().fromUtf8(fi->hfinfo->abbrev) + ")"); finfo_length = fi->length + fi->appendix_length; if (finfo_length == 1) { - itemInfo.append(tr(", 1 byte")); + item_info.append(tr(", 1 byte")); } else if (finfo_length > 1) { - itemInfo.append(QString(tr(", %1 bytes")).arg(finfo_length)); + item_info.append(QString(tr(", %1 bytes")).arg(finfo_length)); } emit protoItemSelected(*new QString()); emit protoItemSelected(NULL); - emit protoItemSelected(itemInfo); + emit protoItemSelected(item_info); emit protoItemSelected(fi); } // else the GTK+ version pushes an empty string as described below. /* @@ -277,25 +277,25 @@ void ProtoTree::collapse(const QModelIndex & index) { void ProtoTree::expandSubtrees() { - QTreeWidgetItem *topSel; + QTreeWidgetItem *top_sel; if (selectedItems().length() < 1) { return; } - topSel = selectedItems()[0]; + top_sel = selectedItems()[0]; - if (!topSel) { + if (!top_sel) { return; } - while (topSel->parent()) { - topSel = topSel->parent(); + while (top_sel->parent()) { + top_sel = top_sel->parent(); } - QTreeWidgetItemIterator iter(topSel); + QTreeWidgetItemIterator iter(top_sel); while (*iter) { - if ((*iter) != topSel && (*iter)->parent() == NULL) { + if ((*iter) != top_sel && (*iter)->parent() == NULL) { // We found the next top-level item break; } |