From 5fb2f274280c9a9bd9c89c9b1904a12d877e155c Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 1 Jan 2015 11:41:03 -0800 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte Reviewed-by: Gerald Combs --- ui/qt/syntax_line_edit.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ui/qt/syntax_line_edit.cpp') diff --git a/ui/qt/syntax_line_edit.cpp b/ui/qt/syntax_line_edit.cpp index 6264c13b4a..f1edfdbca6 100644 --- a/ui/qt/syntax_line_edit.cpp +++ b/ui/qt/syntax_line_edit.cpp @@ -122,3 +122,19 @@ void SyntaxLineEdit::checkFieldName(QString field) checkDisplayFilter(field); } } + +void SyntaxLineEdit::checkInteger(QString number) +{ + if (number.isEmpty()) { + setSyntaxState(SyntaxLineEdit::Empty); + return; + } + + bool ok; + text().toInt(&ok); + if (ok) { + setSyntaxState(SyntaxLineEdit::Valid); + } else { + setSyntaxState(SyntaxLineEdit::Invalid); + } +} -- cgit v1.2.1