summaryrefslogtreecommitdiff
path: root/client/widgets/lineedit.cc
diff options
context:
space:
mode:
authordeva <deva>2008-06-02 13:52:54 +0000
committerdeva <deva>2008-06-02 13:52:54 +0000
commit56be5c89d8121432478f58a886be5aee77a34866 (patch)
treef715e511a5347e7773a1a2a4d2ba886ac6d7e856 /client/widgets/lineedit.cc
parent322a83c48618b2f58e1014daff6f3956af8070ea (diff)
First real shot at lua validation.
Diffstat (limited to 'client/widgets/lineedit.cc')
-rw-r--r--client/widgets/lineedit.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/widgets/lineedit.cc b/client/widgets/lineedit.cc
index 26c2760..a6f2e83 100644
--- a/client/widgets/lineedit.cc
+++ b/client/widgets/lineedit.cc
@@ -56,8 +56,13 @@ void LineEdit::changed()
QPalette palette;
if(regexpValidator()) {
- // valid string
- palette.setBrush(QPalette::Base, QBrush(QColor(255, 255, 255)));
+ if(luaValidator()) {
+ // valid string
+ palette.setBrush(QPalette::Base, QBrush(QColor(255, 255, 255)));
+ } else {
+ // invalid string
+ palette.setBrush(QPalette::Base, QBrush(QColor(200, 230, 200)));
+ }
} else {
// invalid string
palette.setBrush(QPalette::Base, QBrush(QColor(230, 200, 200)));