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

XMLHttpRequest does not support timeout properties

    XMLWordPrintable

Details

    Description

      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(); });
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes