From c16f0a839743af36b36aea9c35f0d5ddfda3d6ac Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Mon, 26 Jul 2010 12:42:06 +1000 Subject: Cherry pick fix for MOBILITY-1077 from Qt Mobility. 7ef45318255c5cf1f10508753c9a2c55fc2cb8c0 321bd8b7b54e34a983b1ba142af836cf3e153a66 --- examples/network/bearercloud/cloud.cpp | 5 +++++ src/network/bearer/qnetworksession.cpp | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/network/bearercloud/cloud.cpp b/examples/network/bearercloud/cloud.cpp index 2856c71..980efbf 100644 --- a/examples/network/bearercloud/cloud.cpp +++ b/examples/network/bearercloud/cloud.cpp @@ -245,6 +245,8 @@ void Cloud::stateChanged(QNetworkSession::State state) else finalOpacity = 1.0; +#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) && \ + !defined(Q_OS_SYMBIAN) && !defined(Q_OS_WINCE) QString tooltip; if (configuration.name().isEmpty()) @@ -302,6 +304,9 @@ void Cloud::stateChanged(QNetworkSession::State state) tooltip += tr("
Sent data: %1 bytes").arg(session->bytesWritten()); setToolTip(tooltip); +#else + Q_UNUSED(state); +#endif } //! [2] diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 1ed6cbb..65de539 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -629,8 +629,10 @@ void QNetworkSession::reject() If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned. - This function may not always be supported on all platforms and returns - 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + This function may not always be supported on all platforms and returns 0. + The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + + \note On some platforms this function may run the main event loop. */ quint64 QNetworkSession::bytesWritten() const { @@ -646,8 +648,10 @@ quint64 QNetworkSession::bytesWritten() const If the session is based on a service network configuration the number of sent bytes across all active member configurations are returned. - This function may not always be supported on all platforms and returns - 0. The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + This function may not always be supported on all platforms and returns 0. + The platform capability can be detected via QNetworkConfigurationManager::DataStatistics. + + \note On some platforms this function may run the main event loop. */ quint64 QNetworkSession::bytesReceived() const { -- cgit v0.12