[Marble-commits] KDE/kdeedu/marble/src/plugins/network/qnam
Jens-Michael Hoffmann
jensmh at gmx.de
Mon Feb 15 18:07:17 CET 2010
SVN commit 1090619 by jmhoffmann:
Enable HTTP pipelining for Qt >= 4.6
M +10 -0 QNamDownloadJob.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/network/qnam/QNamDownloadJob.cpp #1090618:1090619
@@ -30,6 +30,9 @@
void QNamDownloadJob::execute()
{
QNetworkRequest request( sourceUrl() );
+#if QT_VERSION >= 0x40600
+ request.setAttribute( QNetworkRequest::HttpPipeliningAllowedAttribute, true );
+#endif
request.setRawHeader( "User-Agent", userAgent() );
m_networkReply = m_networkAccessManager->get( request );
@@ -60,6 +63,13 @@
// mDebug() << "finished" << destinationFileName()
// << "error" << error;
+#if QT_VERSION >= 0x40600
+ const QVariant httpPipeliningWasUsed =
+ m_networkReply->attribute( QNetworkRequest::HttpPipeliningWasUsedAttribute );
+ if ( !httpPipeliningWasUsed.isNull() )
+ mDebug() << "http pipelining used:" << httpPipeliningWasUsed.toBool();
+#endif
+
switch ( error ) {
case QNetworkReply::NoError: {
// check if we are redirected
More information about the Marble-commits
mailing list