Qt: add OS interface description to 'Manage Local Interfaces' window
authorPascal Quantin <pascal.quantin@gmail.com>
Tue, 23 Feb 2016 16:01:16 +0000 (18:01 +0200)
committerAlexis La Goutte <alexis.lagoutte@gmail.com>
Tue, 23 Feb 2016 18:01:42 +0000 (18:01 +0000)
In case the user did not provide a custom name for the interface, display the
OS description in the 'Comment' column as how it is done in GTK UI.

Bug: 12156
Change-Id: If9da58980169df3eaf25f74e7b81676cbc4f6ebd
Reviewed-on: https://code.wireshark.org/review/14095
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
ui/qt/manage_interfaces_dialog.cpp

index 5a3e263b5c950256ee44a3e363e1fac426614450..9cdae345d78c64ccf522430fbf4b9077a17b5ccb 100644 (file)
@@ -342,9 +342,11 @@ void ManageInterfacesDialog::showLocalInterfaces()
             if (comment) {
                 item->setText(col_l_comment_, comment);
                 g_free(comment);
+            } else if (device.if_info.vendor_description) {
+                item->setText(col_l_comment_, device.if_info.vendor_description);
             }
         } else {
-          continue;
+            continue;
         }
     }
     g_free(pr_descr);