framework icon indicating copy to clipboard operation
framework copied to clipboard

Qt.ImhDigitsOnly is not handled correctly

Open mikix opened this issue 9 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

Found this as I was looking into why DigitsOnly doesn't work at all using Wayland input method protocol. It seems like fixing this the right way, probably also requires breaking ABI/API. There are also other input method hints not being handled at all by Maliit currently, which would be nice to fix.

dobey avatar Sep 10 '21 18:09 dobey

#66 fixes this as long as you were finding the problem when using the input_method_v1 source, @mikix can you confirm?

aleixpol avatar Sep 16 '21 16:09 aleixpol

#66 fixes this as long as you were finding the problem when using the input_method_v1 source, @mikix can you confirm?

No, the issue reported here is that DigitsOnly and FormatedNumberesOnly are being treated equally, while they should be different (DigitsOnly shouldn't have -, #, etc… symbols). #66 only fixes that DigitsOnly wasn't working at all with the wayland protocol. :)

dobey avatar Sep 16 '21 16:09 dobey