aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/models
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-06-25 19:23:22 -0700
committerGuy Harris <guy@alum.mit.edu>2018-06-26 03:24:53 +0000
commit74d0be82017513e99cc0ecdc994e3c1c99fc74f7 (patch)
tree5e99ea0ac69a6df73b487f352c51b9246413ed88 /ui/qt/models
parent168ddd45c4cde86756e8472b1a674ddb69eecdde (diff)
Disable coloring rules with invalid packet-testing expressions.
If the packet-testing expression for a coloring rule is set to an invalid expression, disable the filter; this should provide at least *some* indication to the user that it's not valid, although we should really pop up a dialog or something - the little small-type notice below the list of filters is *really* not all that obvious. Ping-Bug: 14906 Change-Id: I3c036c3509520913db0a64c30bc1c57c0c7667bc Reviewed-on: https://code.wireshark.org/review/28444 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/models')
-rw-r--r--ui/qt/models/coloring_rules_delegate.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/models/coloring_rules_delegate.cpp b/ui/qt/models/coloring_rules_delegate.cpp
index 4dd3fd3b11..b3aaa7b4db 100644
--- a/ui/qt/models/coloring_rules_delegate.cpp
+++ b/ui/qt/models/coloring_rules_delegate.cpp
@@ -87,6 +87,7 @@ void ColoringRulesDelegate::setModelData(QWidget *editor, QAbstractItemModel *mo
if ((displayEdit->syntaxState() == SyntaxLineEdit::Invalid) &&
(model->data(model->index(index.row(), ColoringRulesModel::colName), Qt::CheckStateRole) == Qt::Checked))
{
+ model->setData(model->index(index.row(), ColoringRulesModel::colName), Qt::Unchecked, Qt::CheckStateRole);
emit invalidField(index, displayEdit->syntaxErrorMessage());
}
else