diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-08-20 11:39:02 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-08-20 19:28:23 +0000 |
commit | e67098c5d0270581d7c6657b17d75b5a1227043f (patch) | |
tree | 1e7402d15440a6030ed1bd5e43ec184d647fdb5d /ui/qt/display_filter_combo.cpp | |
parent | 36a74cb13a7ee8e4e0972243d1a6a9ae641adb03 (diff) |
Squelch recent display filter warnings.
Try to keep the main display filter editor from emitting warnings when
we populate the recent item list.
Change-Id: Ib0c150093e03d4d2ca2ac6cd72c0e37d041fe98b
Ping-Bug: 11438
Reviewed-on: https://code.wireshark.org/review/10157
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/display_filter_combo.cpp')
-rw-r--r-- | ui/qt/display_filter_combo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/qt/display_filter_combo.cpp b/ui/qt/display_filter_combo.cpp index 8ed3f66a35..205781f168 100644 --- a/ui/qt/display_filter_combo.cpp +++ b/ui/qt/display_filter_combo.cpp @@ -125,8 +125,14 @@ extern "C" gboolean dfilter_combo_add_recent(const gchar *filter) { if (!cur_display_filter_combo) return FALSE; + // Adding an item to a QComboBox also sets its lineEdit. In our case + // that means we might trigger a temporary status message so we block + // the lineEdit's signals. + // Another approach would be to update QComboBox->model directly. + bool block_state = cur_display_filter_combo->lineEdit()->blockSignals(true); cur_display_filter_combo->addItem(filter); cur_display_filter_combo->clearEditText(); + cur_display_filter_combo->lineEdit()->blockSignals(block_state); return TRUE; } |