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.
On 24/03/2017 15:37, Gerry Boland wrote: ence() start() ; msecsSinceRefer ence();
> How about using the anonymous namespace we have? I can stick this in there
>
> static qint64 msecsSinceRefer
> {
> static QElapsedTimer elapsedTimer;
> elapsedTimer.
> return elapsedTimer.
> }
>
> 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) { edKeys( );
> releaseAllPress
> Why not on unfocus?
Because an unfocused surface, by definition, shouldn't be receiving
input events.