summaryrefslogtreecommitdiff
path: root/ui/qt/syntax_line_edit.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-01-07 09:27:13 -0800
committerGerald Combs <gerald@wireshark.org>2016-01-08 17:53:28 +0000
commit0ce9ac4137429ce4d632c1cddd48ef6f36d9d4c2 (patch)
tree49811f182cf5b45d924f2864895860bcb142f173 /ui/qt/syntax_line_edit.h
parent35a79ffebb1dfa89b92a84482cf7326fddbe6fba (diff)
downloadwireshark-0ce9ac4137429ce4d632c1cddd48ef6f36d9d4c2.tar.gz
Add a Busy status to SyntaxLineEdit.
For CaptureFilterEdit it's possible to have an indeterminate state while we're waiting on name resolution. Add a Busy status to SyntaxLineEdit and set the text color to a mix of the normal foreground and background colors (gray on most platforms). Make the Busy state valid so that we don't have to wait on an annoyingly-long name resolution to start capturing. Update the global capture option filters using the main welcome capture filter when we start a capture instead of when we've finished checking the filter syntax. Connect the CaptureFilterEdit returnPressed signal no matter what so that we can start a capture by pressing return in the welcome screen CaptureFilterEdit. Add a fake resolution timeout to the CaptureFilterSyntaxWorker debug code to make testing the different states easier. Bug: 11950 Change-Id: I0cf01c0fbc0dd8065cdf5a91f1d6b224291b1ce6 Reviewed-on: https://code.wireshark.org/review/13110 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/syntax_line_edit.h')
-rw-r--r--ui/qt/syntax_line_edit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/qt/syntax_line_edit.h b/ui/qt/syntax_line_edit.h
index f76e6bc626..3184e7a81d 100644
--- a/ui/qt/syntax_line_edit.h
+++ b/ui/qt/syntax_line_edit.h
@@ -38,7 +38,7 @@ class SyntaxLineEdit : public QLineEdit
Q_ENUMS(SyntaxState)
public:
explicit SyntaxLineEdit(QWidget *parent = 0);
- enum SyntaxState { Empty, Invalid, Deprecated, Valid };
+ enum SyntaxState { Empty, Busy, Invalid, Deprecated, Valid };
SyntaxState syntaxState() const { return syntax_state_; }
void setSyntaxState(SyntaxState state = Empty);
@@ -79,6 +79,7 @@ private:
QString deprecated_token_;
QString syntax_error_message_;
QString token_chars_;
+ QColor busy_fg_;
private slots:
void insertFieldCompletion(const QString &completion_text);