summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyimpl.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-18 06:31:10 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-18 06:31:10 (GMT)
commita4d33d8c3cd206b982962014323abb673f5c64e3 (patch)
tree2bd6a5e2b3dba061cdbb610c46789f78696063b3 /src/network/access/qnetworkreplyimpl.cpp
parent45e3500d8a34bee9893eff95b494497d29f7a61b (diff)
parent6e74302238fbac8783eab36f7553eb30dc5ca352 (diff)
downloadQt-a4d33d8c3cd206b982962014323abb673f5c64e3.zip
Qt-a4d33d8c3cd206b982962014323abb673f5c64e3.tar.gz
Qt-a4d33d8c3cd206b982962014323abb673f5c64e3.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: (163 commits) QLocale: Fixed double to currency string conversion on Mac. Fix qstringbuilder4 test on mac Compile on Mac. Revert "HTTP caching internals: fix logic for PreferNetwork and PreferCache" Use the qt_static_metacall in QueuedConnection Fix crash after merge of the native symbian thread branch. Fix bad merge Re-apply part of ba8e5eedf5f40091eb67dd391a7dcaf9299db2f5 Removed useless comment SSL code: introduce new error value for blacklisted certificates Disable DEF files by default for symbian-gcce. HTTP caching internals: fix logic for PreferNetwork and PreferCache Added a consistency check for number of missing symbols in elf2e32. Updated def file after symbol removal. QLocalSocket: fix abort on Windows. QStringBuilder: add operator += for QString and QByteArray Dummy commit to trigger pulse. Fix QMetaObject::indexOfSlot Fix compilation Documentation for the initilize_list constructor ...
Diffstat (limited to 'src/network/access/qnetworkreplyimpl.cpp')
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 1c9fa3e..c3f75a5 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -178,9 +178,11 @@ void QNetworkReplyImplPrivate::_q_copyReadyRead()
if (preMigrationDownloaded != Q_INT64_C(-1))
totalSize = totalSize.toLongLong() + preMigrationDownloaded;
pauseNotificationHandling();
+ // emit readyRead before downloadProgress incase this will cause events to be
+ // processed and we get into a recursive call (as in QProgressDialog).
+ emit q->readyRead();
emit q->downloadProgress(bytesDownloaded,
totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong());
- emit q->readyRead();
resumeNotificationHandling();
}
@@ -586,11 +588,13 @@ void QNetworkReplyImplPrivate::appendDownstreamDataSignalEmissions()
if (preMigrationDownloaded != Q_INT64_C(-1))
totalSize = totalSize.toLongLong() + preMigrationDownloaded;
pauseNotificationHandling();
- emit q->downloadProgress(bytesDownloaded,
- totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong());
// important: At the point of this readyRead(), the data parameter list must be empty,
// else implicit sharing will trigger memcpy when the user is reading data!
emit q->readyRead();
+ // emit readyRead before downloadProgress incase this will cause events to be
+ // processed and we get into a recursive call (as in QProgressDialog).
+ emit q->downloadProgress(bytesDownloaded,
+ totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong());
resumeNotificationHandling();
// do we still have room in the buffer?
@@ -691,10 +695,12 @@ void QNetworkReplyImplPrivate::appendDownstreamDataDownloadBuffer(qint64 bytesRe
downloadBufferCurrentSize = bytesReceived;
- emit q->downloadProgress(bytesDownloaded, bytesTotal);
// Only emit readyRead when actual data is there
+ // emit readyRead before downloadProgress incase this will cause events to be
+ // processed and we get into a recursive call (as in QProgressDialog).
if (bytesDownloaded > 0)
emit q->readyRead();
+ emit q->downloadProgress(bytesDownloaded, bytesTotal);
}
void QNetworkReplyImplPrivate::finished()