diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-10-27 09:52:51 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-10-27 19:28:19 +0000 |
commit | e70a23f49d79ec2c6a9db25409de052d64c2ed36 (patch) | |
tree | e6888f0f8590db5392bc79cad09b311b2841842a /ui/qt/filter_expressions_preferences_frame.cpp | |
parent | 2ccb9d2d957a6c118c00a193d0fbe19712153208 (diff) |
Qt: Add a filter expression item to the display filter edit menu.
Add an item to the display filter bookmark menu which opens the filter
expression preferences. We also need an expression editor frame similar
to the column editor frame, but hopefully this will suffice until that
exists.
Change-Id: If4c159bb769f0f8e7f89db55f1c6fd7c0bf65c87
Reviewed-on: https://code.wireshark.org/review/11315
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/filter_expressions_preferences_frame.cpp')
-rw-r--r-- | ui/qt/filter_expressions_preferences_frame.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/qt/filter_expressions_preferences_frame.cpp b/ui/qt/filter_expressions_preferences_frame.cpp index 3f3e01fcdd..35beeb38fb 100644 --- a/ui/qt/filter_expressions_preferences_frame.cpp +++ b/ui/qt/filter_expressions_preferences_frame.cpp @@ -154,7 +154,7 @@ void FilterExpressionsPreferencesFrame::keyPressEvent(QKeyEvent *evt) QFrame::keyPressEvent(evt); } -void FilterExpressionsPreferencesFrame::addExpression(bool enabled, const char *label, char *expression) +void FilterExpressionsPreferencesFrame::addExpression(bool enabled, const QString label, const QString expression) { QTreeWidgetItem *item = new QTreeWidgetItem(ui->expressionTreeWidget); @@ -267,9 +267,10 @@ void FilterExpressionsPreferencesFrame::expressionEditingFinished() ui->expressionTreeWidget->removeItemWidget(item, expression_col_); } +static const QString new_button_label_ = QObject::tr("My Filter"); void FilterExpressionsPreferencesFrame::on_newToolButton_clicked() { - addExpression(true, "My Filter", NULL); //TODO : Fix Translate + addExpression(true, new_button_label_, QString()); } void FilterExpressionsPreferencesFrame::on_deleteToolButton_clicked() |