Skip to content

Qt.ImhDigitsOnly is not handled correctly #31

@mikix

Description

@mikix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions