summaryrefslogtreecommitdiff
path: root/ui/qt/column_preferences_frame.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2015-01-01 11:41:03 -0800
committerGerald Combs <gerald@wireshark.org>2015-01-06 15:22:04 +0000
commit5fb2f274280c9a9bd9c89c9b1904a12d877e155c (patch)
tree428650756971ee3f5355a82d6b3723c15002ae09 /ui/qt/column_preferences_frame.cpp
parentcbca7eeb712c7365bf46ed3de8ed5c633a662bc2 (diff)
downloadwireshark-5fb2f274280c9a9bd9c89c9b1904a12d877e155c.tar.gz
Qt: Add a context menu to the packet list header.
Don't carry over the sort items from the GTK+ UI (for now, at least). Update some names. Add a column editor frame similar to the "Go to Packet" and "Search" frames. Change-Id: I1bd3834a26994de96894d2b7512bce2c19915c77 Reviewed-on: https://code.wireshark.org/review/6277 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/column_preferences_frame.cpp')
-rw-r--r--ui/qt/column_preferences_frame.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/ui/qt/column_preferences_frame.cpp b/ui/qt/column_preferences_frame.cpp
index f272a15dee..550f64da38 100644
--- a/ui/qt/column_preferences_frame.cpp
+++ b/ui/qt/column_preferences_frame.cpp
@@ -279,7 +279,7 @@ void ColumnPreferencesFrame::on_columnTreeWidget_itemActivated(QTreeWidgetItem *
SyntaxLineEdit *syntax_edit = new SyntaxLineEdit();
saved_col_string_ = item->text(custom_occurrence_col_);
connect(syntax_edit, SIGNAL(textChanged(QString)),
- this, SLOT(customOccurrenceTextChanged(QString)));
+ syntax_edit, SLOT(checkInteger(QString)));
connect(syntax_edit, SIGNAL(editingFinished()), this, SLOT(customOccurrenceEditingFinished()));
editor = cur_line_edit_ = syntax_edit;
@@ -363,25 +363,6 @@ void ColumnPreferencesFrame::customFieldEditingFinished()
ui->columnTreeWidget->removeItemWidget(item, custom_field_col_);
}
-void ColumnPreferencesFrame::customOccurrenceTextChanged(QString)
-{
- SyntaxLineEdit *syntax_edit = qobject_cast<SyntaxLineEdit *>(cur_line_edit_);
- QTreeWidgetItem *item = ui->columnTreeWidget->currentItem();
- if (!syntax_edit || !item) return;
-
- if (syntax_edit->text().isEmpty()) {
- syntax_edit->setSyntaxState(SyntaxLineEdit::Empty);
- } else {
- bool ok;
- syntax_edit->text().toInt(&ok);
- if (ok) {
- syntax_edit->setSyntaxState(SyntaxLineEdit::Valid);
- } else {
- syntax_edit->setSyntaxState(SyntaxLineEdit::Invalid);
- }
- }
-}
-
void ColumnPreferencesFrame::customOccurrenceEditingFinished()
{
QTreeWidgetItem *item = ui->columnTreeWidget->currentItem();