diff options
Diffstat (limited to 'ui/qt/capture_file_properties_dialog.cpp')
-rw-r--r-- | ui/qt/capture_file_properties_dialog.cpp | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/ui/qt/capture_file_properties_dialog.cpp b/ui/qt/capture_file_properties_dialog.cpp index 2d0ff87e60..59c5bcf6d2 100644 --- a/ui/qt/capture_file_properties_dialog.cpp +++ b/ui/qt/capture_file_properties_dialog.cpp @@ -242,33 +242,41 @@ QString CaptureFilePropertiesDialog::summaryToHtml() out << section_tmpl_.arg(tr("Capture")); out << table_begin; - QString capture_hardware(unknown); - if (summary.shb_hardware && summary.shb_hardware[0] != '\0') { - capture_hardware = summary.shb_hardware; + wtap_optionblock_t shb_inf = wtap_file_get_shb(cap_file_.capFile()->wth); + char *str; + + if (shb_inf != NULL) { + QString capture_hardware(unknown); + wtap_optionblock_get_option_string(shb_inf, OPT_SHB_HARDWARE, &str); + if (str != NULL && str[0] != '\0') { + capture_hardware = str; + } + // capture HW + out << table_row_begin + << table_vheader_tmpl.arg(tr("Hardware")) + << table_data_tmpl.arg(capture_hardware) + << table_row_end; + + QString capture_os(unknown); + wtap_optionblock_get_option_string(shb_inf, OPT_SHB_OS, &str); + if (str != NULL && str[0] != '\0') { + capture_os = str; + } + out << table_row_begin + << table_vheader_tmpl.arg(tr("OS")) + << table_data_tmpl.arg(capture_os) + << table_row_end; + + QString capture_app(unknown); + wtap_optionblock_get_option_string(shb_inf, OPT_SHB_USERAPPL, &str); + if (str != NULL && str[0] != '\0') { + capture_app = str; + } + out << table_row_begin + << table_vheader_tmpl.arg(tr("Application")) + << table_data_tmpl.arg(capture_app) + << table_row_end; } - // capture HW - out << table_row_begin - << table_vheader_tmpl.arg(tr("Hardware")) - << table_data_tmpl.arg(capture_hardware) - << table_row_end; - - QString capture_os(unknown); - if (summary.shb_os && summary.shb_os[0] != '\0') { - capture_os = summary.shb_os; - } - out << table_row_begin - << table_vheader_tmpl.arg(tr("OS")) - << table_data_tmpl.arg(capture_os) - << table_row_end; - - QString capture_app(unknown); - if (summary.shb_user_appl && summary.shb_user_appl[0] != '\0') { - capture_app = summary.shb_user_appl; - } - out << table_row_begin - << table_vheader_tmpl.arg(tr("Application")) - << table_data_tmpl.arg(capture_app) - << table_row_end; out << table_end; |