src/network/access/qnetworkaccesshttpbackend.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   942     for ( ; it != end; ++it)
   942     for ( ; it != end; ++it)
   943         setRawHeader(it->first, it->second);
   943         setRawHeader(it->first, it->second);
   944 
   944 
   945     checkForRedirect(status);
   945     checkForRedirect(status);
   946 
   946 
   947     emit metaDataChanged();
   947     // This needs to be emitted in the event loop because it can be reached at
   948 
   948     // the direct code path of qnam.get(...) before the user has a chance
   949     // invoke this asynchronously, else Arora/QtDemoBrowser don't like cached downloads
   949     // to connect any signals.
   950     // see task 250221 / 251801
   950     QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);
   951     qRegisterMetaType<QIODevice*>("QIODevice*");
   951     qRegisterMetaType<QIODevice*>("QIODevice*");
   952     QMetaObject::invokeMethod(this, "writeDownstreamData", Qt::QueuedConnection, Q_ARG(QIODevice*, contents));
   952     QMetaObject::invokeMethod(this, "writeDownstreamData", Qt::QueuedConnection, Q_ARG(QIODevice*, contents));
   953 
   953 
   954 
   954 
   955 #if defined(QNETWORKACCESSHTTPBACKEND_DEBUG)
   955 #if defined(QNETWORKACCESSHTTPBACKEND_DEBUG)