Qt: select a better default Decode As table
authorPeter Wu <peter@lekensteyn.nl>
Sat, 26 May 2018 10:15:16 +0000 (12:15 +0200)
committerAnders Broman <a.broman58@gmail.com>
Mon, 28 May 2018 08:19:43 +0000 (08:19 +0000)
commitea763a96387d9f56d5325d5dcd96048666636aab
treee3be976a52898acb4401a1e60dde59ce705cbfd0
parent2ef7e8cf42f43fbdcf23b3bd7eff671703b91f61
Qt: select a better default Decode As table

USB has three possible tables, usb.device, usb.product and usb.protocol
(shown in that order in the Decode As dialog). For single packets with
no prior device descriptors, the last two tables have no valid selector
(integer zero). In such cases it seems more reasonable to use tables for
which a valid selector exists (for example, "usb.device").

Bug: 14717
Change-Id: I2319817fa11318a97519d8cfc912343b16224c12
Reviewed-on: https://code.wireshark.org/review/27820
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
ui/qt/models/decode_as_model.cpp