Code review comment for lp:~dandrader/qtmir/keyState

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 24/03/2017 15:37, Gerry Boland wrote:
> How about using the anonymous namespace we have? I can stick this in there
>
> static qint64 msecsSinceReference()
> {
> static QElapsedTimer elapsedTimer;
> elapsedTimer.start();
> return elapsedTimer.msecsSinceReference();
> }
>
> and it works ok. After all it is just a function to return a timestamp, which is a purely internal implementation thing that doesn't need to be a class member IMO.

Yes, makes for less code. Done.

> + if (m_focused) {
> releaseAllPressedKeys();
> Why not on unfocus?

Because an unfocused surface, by definition, shouldn't be receiving
input events.

« Back to merge proposal