Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81708

EmscriptenMouseEvent has no 'timestamp' member anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.14.1
    • QPA
    • None
    • WebAssembly

    Description

      Starting with Emscripten 1.39.5, the EmscriptenMouseEvent has no 'timestamp' anymore. The changelog quotes:

      Removed timestamp field from mouse, wheel, devicemotion and deviceorientation events. The presence of a timestamp on these events was slightly arbitrary, and populating this field caused a small profileable overhead that all users might not care about. It is easy to get a timestamp of an event by calling emscripten_get_now() or emscripten_performance_now() inside the event handler function of any event.

       

      Compiling Qt runs into:

      /qt5/qtbase/src/plugins/platforms/wasm/qwasmeventtranslator.cpp:549:34: error: no member named 'timestamp' in 'EmscriptenMouseEvent'
       auto timestamp = mouseEvent->timestamp;
       ~~~~~~~~~~ ^ 
      /qt5/qtbase/src/plugins/platforms/wasm/qwasmeventtranslator.cpp:675:33: error: no member named 'timestamp' in 'EmscriptenMouseEvent'
       auto timestamp = mouseEvent.timestamp; 
       ~~~~~~~~~~ ^
      2 errors generated.

       
       

      The attached patch fixes the compilation with Emscripten >= 1.39.5.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lpotter Lorn Potter
            cajus Cajus Pollmeier
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes