From b001e886b35d06ca2551709280f0541cdc75c34a Mon Sep 17 00:00:00 2001
From: Xizhi Zhu <xizhi.zhu@nokia.com>
Date: Tue, 24 May 2011 13:43:45 +0300
Subject: Fix the state of default network configuration.

PMO Bug 257336 - Default configuration remains in QNetworkConfiguration::Active state even when device moves out of WLAN coverage
This fix sets the default network configuration (of type UserChoice) back to Discovered when the network session is disconnected.

Reviewed-by: Cristiano di Flora
---
 src/plugins/bearer/icd/qnetworksession_impl.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
index f08d8bf..a99c0a7 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -183,6 +183,12 @@ void QNetworkSessionPrivateImpl::updateState(QNetworkSession::State newState)
                 icdConfig->mutex.lock();
                 icdConfig->state = QNetworkConfiguration::Defined;
                 icdConfig->mutex.unlock();
+
+                // Reset the state of the default configuration to Discovered
+                icdConfig = toIcdConfig(privateConfiguration(publicConfig));
+                icdConfig->mutex.lock();
+                icdConfig->state = QNetworkConfiguration::Discovered;
+                icdConfig->mutex.unlock();
             } else {
                 if (!activeConfig.isValid()) {
                     // Active configuration (IAP) was removed from system
-- 
cgit v0.12


From 67ed18497705fa938728c505d165173dc5d3de68 Mon Sep 17 00:00:00 2001
From: Martin Jones <martin.jones@nokia.com>
Date: Wed, 25 May 2011 13:01:33 +1000
Subject: Flickable could flick in wrong direction if given too few touch
 samples

If we got <= QML_FLICK_DISCARDSAMPLES the previous velocity was not
cleared, so the view would continue flicking with the previous
velocity, and therefore the previous direction.

Change-Id: I876610f4522f32c814449309b01ec3787c5f6cc6
Task-number: QT-4903
Reviewed-by: Andrew den Exter
---
 src/declarative/graphicsitems/qdeclarativeflickable.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 82ed18c..2bf863b 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -232,8 +232,8 @@ void QDeclarativeFlickablePrivate::AxisData::addVelocitySample(qreal v, qreal ma
 
 void QDeclarativeFlickablePrivate::AxisData::updateVelocity()
 {
+    velocity = 0;
     if (velocityBuffer.count() > QML_FLICK_DISCARDSAMPLES) {
-        velocity = 0;
         int count = velocityBuffer.count()-QML_FLICK_DISCARDSAMPLES;
         for (int i = 0; i < count; ++i) {
             qreal v = velocityBuffer.at(i);
-- 
cgit v0.12

