diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-03 10:06:09 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-09 08:16:43 +0000 |
commit | ee8b61bcf56e03aae0f8e346e70330276e221843 (patch) | |
tree | 5cb98c8157ff31ce916f0c94437094c820fede86 /examples/widgets/tools/regularexpression/regularexpressiondialog.h | |
parent | c1e7d0795b1cc5b5b6a6ee0030f550f6e0f80e5c (diff) |
QRegularExpression example: Handle empty patterns
Previously, when clearing the pattern by clicking the clear
button, the result match list would display a list of empty
matches since apparently an empty pattern matches as many
times as the subject is long. This is confusing when using the
tool.
Restructure RegularExpressionDialog::refresh() so that it bails
out if the pattern is empty or invalid.
Change-Id: I8119a75db50cead3f64394016e3390a9bf7d0bf7
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/widgets/tools/regularexpression/regularexpressiondialog.h')
-rw-r--r-- | examples/widgets/tools/regularexpression/regularexpressiondialog.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/widgets/tools/regularexpression/regularexpressiondialog.h b/examples/widgets/tools/regularexpression/regularexpressiondialog.h index e75abc83e8..f7d64085fc 100644 --- a/examples/widgets/tools/regularexpression/regularexpressiondialog.h +++ b/examples/widgets/tools/regularexpression/regularexpressiondialog.h @@ -78,6 +78,7 @@ private: void setupUi(); QWidget *setupLeftUi(); QWidget *setupRightUi(); + void setResultUiEnabled(bool enabled); QLineEdit *patternLineEdit; QLineEdit *escapedPatternLineEdit; |