summaryrefslogtreecommitdiff
path: root/ui/qt/syntax_line_edit.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/syntax_line_edit.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/syntax_line_edit.cpp')
-rw-r--r--ui/qt/syntax_line_edit.cpp16
1 files changed, 16 insertions, 0 deletions
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);
+ }
+}