summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 04:07:05 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 04:07:05 (GMT)
commit0f90f7bdef4b8f821b00e039038fb83a01bc217b (patch)
tree50fc75de8aea9957d5962c32198f6b627d62622f
parent0f99aa42829c1d1b29dfbd8945cc96b0d21b3939 (diff)
downloadQt-0f90f7bdef4b8f821b00e039038fb83a01bc217b.zip
Qt-0f90f7bdef4b8f821b00e039038fb83a01bc217b.tar.gz
Qt-0f90f7bdef4b8f821b00e039038fb83a01bc217b.tar.bz2
Remove debug.
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp49
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.cpp2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp10
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp1
-rw-r--r--src/plugins/bearer/nla/qnlaengine.cpp4
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp2
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp1
7 files changed, 21 insertions, 48 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 7f12fb8..7f66b25 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -242,7 +242,7 @@ void QNetworkReplyImplPrivate::_q_networkSessionOnline()
QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);
break;
default:
- qDebug() << "How do we handle replies in state" << state;
+ ;
}
}
@@ -503,8 +503,6 @@ void QNetworkReplyImplPrivate::appendDownstreamData(QByteDataBuffer &data)
int index = it->second.lastIndexOf('/');
if (index != -1)
totalSize = it->second.mid(index + 1).toLongLong() - preMigrationDownloaded;
- } else {
- qDebug() << "Could not find Content-Length or Content-Range header";
}
}
@@ -564,14 +562,7 @@ void QNetworkReplyImplPrivate::finished()
state == Working && errorCode != QNetworkReply::OperationCanceledError) {
// only content with a known size will fail with a temporary network failure error
if (!totalSize.isNull()) {
- qDebug() << "Connection broke during download.";
- qDebug() << "Don't worry, we've already started roaming :)";
-
- if (bytesDownloaded == totalSize) {
- qDebug() << "Luckily download has already finished.";
- } else {
- qDebug() << "Download hasn't finished";
-
+ if (bytesDownloaded != totalSize) {
if (migrateBackend()) {
// either we are migrating or the request is finished/aborted
if (state == Reconnecting || state == WaitingForSession) {
@@ -579,8 +570,8 @@ void QNetworkReplyImplPrivate::finished()
return; // exit early if we are migrating.
}
} else {
- qDebug() << "Could not migrate backend, application needs to send another requeset.";
- error(QNetworkReply::TemporaryNetworkFailureError, q->tr("Temporary network failure."));
+ error(QNetworkReply::TemporaryNetworkFailureError,
+ q->tr("Temporary network failure."));
}
}
}
@@ -809,38 +800,34 @@ bool QNetworkReplyImpl::event(QEvent *e)
return QObject::event(e);
}
+/*
+ Migrates the backend of the QNetworkReply to a new network connection if required. Returns
+ true if the reply is migrated or it is not required; otherwise returns false.
+*/
bool QNetworkReplyImplPrivate::migrateBackend()
{
Q_Q(QNetworkReplyImpl);
- if (state == QNetworkReplyImplPrivate::Finished ||
- state == QNetworkReplyImplPrivate::Aborted) {
- qDebug() << "Network reply is already finished/aborted.";
+ // Network reply is already finished or aborted, don't need to migrate.
+ if (state == Finished || state == Aborted)
return true;
- }
- if (!qobject_cast<QNetworkAccessHttpBackend *>(backend)) {
- qDebug() << "Resume only support by http backend, not migrating.";
+ // Resume only supported by http backend, not migrating.
+ if (!qobject_cast<QNetworkAccessHttpBackend *>(backend))
return false;
- }
- if (outgoingData) {
- qDebug() << "Request has outgoing data, not migrating.";
+ // Request has outgoing data, not migrating.
+ if (outgoingData)
return false;
- }
- if (copyDevice) {
- qDebug() << "Request is serviced from cache, not migrating.";
+ // Request is serviced from the cache, don't need to migrate.
+ if (copyDevice)
return true;
- }
+ // Range header is not supported by server/resource, can't migrate.
RawHeadersList::ConstIterator it = findRawHeader("Accept-Ranges");
- if (it == rawHeaders.constEnd() || it->second == "none") {
- qDebug() << "Range header not supported by server/resource.";
+ if (it == rawHeaders.constEnd() || it->second == "none")
return false;
- }
-
- qDebug() << "Need to check for only cacheable content.";
state = QNetworkReplyImplPrivate::Reconnecting;
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
index d88534b..e4ab0aa 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
@@ -72,7 +72,7 @@ void qNotificationCallback(WLAN_NOTIFICATION_DATA *data, QNativeWifiEngine *d)
QMetaObject::invokeMethod(d, "scanComplete", Qt::QueuedConnection);
break;
default:
- qDebug() << "wlan unknown notification";
+ ;
}
}
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 51afe3e..3f3e1bd 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -134,9 +134,6 @@ QString QNetworkManagerEngine::getInterfaceFromId(const QString &id)
if (devices.isEmpty())
continue;
- if (devices.count() > 1)
- qDebug() << "multiple network interfaces for" << id;
-
QNetworkManagerInterfaceDevice device(devices.at(0).path());
return device.interface().name();
}
@@ -328,8 +325,6 @@ void QNetworkManagerEngine::activeConnectionPropertiesChanged(const QString &pat
void QNetworkManagerEngine::devicePropertiesChanged(const QString &path,
const QMap<QString, QVariant> &properties)
{
- qDebug() << Q_FUNC_INFO << path;
- qDebug() << properties;
}
void QNetworkManagerEngine::deviceAdded(const QDBusObjectPath &path)
@@ -428,7 +423,6 @@ void QNetworkManagerEngine::updateConnection(const QNmSettingsMap &settings)
const QString service = connection->connectionInterface()->service();
const QString settingsPath = connection->connectionInterface()->path();
- qDebug() << "Should parse connection directly into existing configuration";
QNetworkConfigurationPrivate *cpPriv = parseConnection(service, settingsPath, settings);
// Check if connection is active.
@@ -457,9 +451,7 @@ void QNetworkManagerEngine::updateConnection(const QNmSettingsMap &settings)
void QNetworkManagerEngine::activationFinished(QDBusPendingCallWatcher *watcher)
{
QDBusPendingReply<QDBusObjectPath> reply = *watcher;
- if (reply.isError()) {
- qDebug() << "error connecting NM connection";
- } else {
+ if (!reply.isError()) {
QDBusObjectPath result = reply.value();
QNetworkManagerConnectionActive activeConnection(result.path());
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
index 9d603b5..f7fedbf 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
@@ -723,7 +723,6 @@ bool QNetworkManagerSettingsConnection::setConnections()
allOk = true;
} else {
QDBusError error = dbusConnection.lastError();
- qDebug() << error.name() << error.message() << error.type();
}
if (nmDBusHelper)
diff --git a/src/plugins/bearer/nla/qnlaengine.cpp b/src/plugins/bearer/nla/qnlaengine.cpp
index fbfac17..2001c0b 100644
--- a/src/plugins/bearer/nla/qnlaengine.cpp
+++ b/src/plugins/bearer/nla/qnlaengine.cpp
@@ -480,10 +480,8 @@ void QNlaThread::fetchConfigurations()
if (error == WSA_E_NO_MORE)
break;
- if (error == WSAEFAULT) {
- qDebug() << "buffer not big enough" << bufferLength;
+ if (error == WSAEFAULT)
break;
- }
qWarning("WSALookupServiceNext error %d", WSAGetLastError());
break;
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index de1c91a..3fe844a 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -316,7 +316,6 @@ void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
}
state = QNetworkSession::Connected;
- qDebug() << oldState << "->" << state;
if (state != oldState)
emit stateChanged(state);
@@ -328,7 +327,6 @@ void QNetworkSessionPrivateImpl::updateStateFromServiceNetwork()
else
state = QNetworkSession::Disconnected;
- qDebug() << oldState << "->" << state;
if (state != oldState)
emit stateChanged(state);
}
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index 2d0b5ee..e25eda4 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -663,7 +663,6 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn
startCommsDatabaseNotifications();
- qDebug() << Q_FUNC_INFO << "updateCompleted()";
emit updateCompleted();
}