Project

General

Profile

Bug #1753

WDoubleValidator does not show correct messages when value is invalid.

Added by Стойчо Стефанов Stoycho Stefanov over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
03/19/2013
Due date:
% Done:

0%

Estimated time:

Description

Hey,

the behaviour described in the documentation seems not to work entirely correct:

Depending on whether bottom() and top() are real bounds, the default message is "The number must be between {1} and {2}" or "The number must be smaller than {2}".

I tested it with this code and it uses the first default message despite I didn't set a lower bound (a bottom value), see the screenshot:

WLineEdit *input = new WLineEdit();
WDoubleValidator *validator = new WDoubleValidator(input);
validator->setTop(0);
input->setValidator(validator);

In the opposite case the right messages are shown, i.e., when the bottom is set and the top not (see second screanshot).

validator->setBottom(0);

regards,

Stoycho


Files

validator_range.png (14 KB) validator_range.png whrong tooltip(title) Стойчо Стефанов Stoycho Stefanov, 03/19/2013 09:25 AM
validator_range_bottom.png (14.8 KB) validator_range_bottom.png ok Стойчо Стефанов Stoycho Stefanov, 03/19/2013 09:25 AM
#1

Updated by Koen Deforche over 7 years ago

  • Status changed from New to InProgress
  • Assignee set to Michael Vilsker
  • Target version set to 3.3.0

Michael,

Can you take a look at this, is probably a typo in WDoubleValidator ?

Can you also check similar code in WIntValidator and WDateValidator ?

Regards,

koen

#2

Updated by Michael Vilsker over 7 years ago

  • Status changed from InProgress to Resolved
#3

Updated by Koen Deforche over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF