[Webkit-unassigned] [Bug 32482] [Qt] Add support for keyboard modifiers to TouchEvent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 13 19:51:07 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32482





--- Comment #4 from Holger Freyther <zecke at selfish.org>  2009-12-13 19:51:07 PST ---
(From update of attachment 44767)
Do you plan to do dump the other modifiers in the test case too? It would be
interesting to set two modifiers at the same time... mostly to test the bit
setting, clearling logic in the Event Sender :)


>      : MouseRelatedEvent(type, true, true, view, 0, screenX, screenY, pageX, pageY,
> -                        false, false, false, false)
> +                        ctrlKey, altKey, shiftKey, metaKey)

maybe add isSimulated as well... that is the only missing one from
MouseRelatedEvent...



> +            bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
>  
>      virtual bool isTo
> +        : m_type(TouchStart)
> +        , m_shiftKey(false)
> +        , m_ctrlKey(false)
> +        , m_altKey(false)
> +        , m_metaKey(false)
> +    {}


and in Qt you change the order... but I don't see an issue with it.

> +void EventSender::setTouchModifier(const QString &modifier, bool enable)
> +{
> +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
> +    Qt::KeyboardModifier mod = Qt::NoModifier;
> +    if (!modifier.compare(QLatin1String("shift"), Qt::CaseInsensitive))
> +        mod = Qt::ShiftModifier;
> +    else if (!modifier.compare(QLatin1String("alt"), Qt::CaseInsensitive))
> +        mod = Qt::AltModifier;
> +    else if (!modifier.compare(QLatin1String("meta"), Qt::CaseInsensitive))
> +        mod = Qt::MetaModifier;
> +    else if (!modifier.compare(QLatin1String("ctrl"), Qt::CaseInsensitive))
> +        mod = Qt::ControlModifier;

I'm confused about the "!". Can you explain?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list