Skip to content
  • Orgad Shaneh's avatar
    Revert "QmlJS: Exchange unsafe meta calls with QTimer::singleShot" · a6e6c88e
    Orgad Shaneh authored
    QTimer::singleShot with a member function pointer or a lambda does
    not schedule the invocation directly on the receivers event loop,
    even if the timeout is 0. It actually creates a timer in the thread
    where QTimer::singleShot is called, which requires an event dispatcher
    to be available. Only the timer's timeout() signal then schedules the
    invocation on the receivers thread.
    
    We do not want to actually run an event loop here until a timer fires.
    Even if a timer with timeout 0 might directly schedule the timeout
    event on the event dispatcher without involving actual timers, and
    even if that event dispatcher makes sure all events are handled before
    deleting itself, it would feel like relying on an implementation
    detail.
    
    This reverts commit a2e19ba1
    
    .
    
    Task-number: QTCREATORBUG-15681
    Change-Id: I19846ce089d72c971d3cc5927c2ddf563e06de14
    Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
    a6e6c88e