aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2017-12-19 10:31:44 +0100
committerAnders Broman <a.broman58@gmail.com>2017-12-19 14:12:21 +0000
commit106e0b4ee0b5bac403a174aff7266d17c7b1b43e (patch)
tree15e15fdbeae244fd4035ce0c82c80d45d0ddc21d
parentc9b6887d8469251b15204dffcd7105490b574e27 (diff)
Qt: add initializers (CID: 1426703).
Change-Id: Ib75685a099449672b55d63b647fd0f579ad1e5f6 Reviewed-on: https://code.wireshark.org/review/24893 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--ui/qt/utils/field_information.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/qt/utils/field_information.cpp b/ui/qt/utils/field_information.cpp
index 06850bdd94..cdf69c8bbb 100644
--- a/ui/qt/utils/field_information.cpp
+++ b/ui/qt/utils/field_information.cpp
@@ -66,18 +66,27 @@ field_info * FieldInformation::fieldInfo() const
FieldInformation::HeaderInfo FieldInformation::headerInfo() const
{
HeaderInfo header;
- header.isValid = false;
if ( fi_ && fi_->hfinfo )
{
- header.isValid = true;
header.name = fi_->hfinfo->name;
header.description = fi_->hfinfo->blurb;
header.abbreviation = fi_->hfinfo->abbrev;
+ header.isValid = true;
header.type = fi_->hfinfo->type;
header.parent = fi_->hfinfo->parent;
header.id = fi_->hfinfo->id;
}
+ else
+ {
+ header.name = "";
+ header.description = "";
+ header.abbreviation = "";
+ header.isValid = false;
+ header.type = FT_NONE;
+ header.parent = 0;
+ header.id = 0;
+ }
return header;
}