framework
framework copied to clipboard
Qt.ImhDigitsOnly is not handled correctly
In MInputContext::contentType(), the following lines of code treat Qt.ImhDigitsOnly and Qt::ImhFormattedNumbersOnly the same:
if (hints == Qt::ImhFormattedNumbersOnly || hints == Qt::ImhDigitsOnly) {
type = Maliit::NumberContentType;
} else ...
This can't be correct.
The docs have the following:
ImhDigitsOnly: Only digits are allowed. ImhFormattedNumbersOnly: Only number input is allowed. This includes decimal point and minus sign.
To correctly handle both flags, maliit needs a new contentType. Something like Maliit::DigitContentType maybe.