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

XMLHttpRequest does not support timeout properties

XMLWordPrintable

      While there are workarounds, none are as ideal as supporting the properties directly:

      hxr.timeout = 1000; //ms
      hxr.ontimeout = function(){ hxr.abort();
      // No root needed, timer is cleaned up at the same time as XHR object.
      

      Work-around :

      //Sub optimal: 
      // 1. I need a "root" object, 
      // 2. I need to cleanup the dynamically allocated timer. 
      var timer = Qt.createQmlObject("import QtQuick 2.3; Timer {interval: 1000; repeat: false; running: true;}",root,"MyTimer");
                      timer.triggered.connect(function(){ hxr.abort(); });
      

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

            w00t Robin Burchell
            scorp1us Jason Hihn
            Votes:
            12 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes