framework icon indicating copy to clipboard operation
framework copied to clipboard

Qt.ImhDigitsOnly is not handled correctly

Open mikix opened this issue 8 years ago • 3 comments

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.

mikix avatar Jun 03 '16 17:06 mikix