Revision: 201017 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:58:44 +0300
branchRCL_3
changeset 3 eb34711bcc75
parent 2 87be51aa5b5b
child 4 d965ea371a4f
Revision: 201017 Kit: 201019
qtmobility/common.pri
qtmobility/config.pri
qtmobility/configure
qtmobility/configure.bat
qtmobility/data/qtmobility.sisx
qtmobility/examples/bearercloud/bearercloud.cpp
qtmobility/examples/bearercloud/bearercloud.h
qtmobility/examples/bearercloud/cloud.cpp
qtmobility/examples/bearercloud/cloud.h
qtmobility/examples/bearercloud/main.cpp
qtmobility/examples/bearermonitor/bearermonitor.cpp
qtmobility/examples/bearermonitor/bearermonitor.h
qtmobility/examples/bearermonitor/bearermonitor.pro
qtmobility/examples/bearermonitor/bearermonitor_maemo.ui
qtmobility/examples/bearermonitor/main.cpp
qtmobility/examples/bearermonitor/sessionwidget.cpp
qtmobility/examples/bearermonitor/sessionwidget.h
qtmobility/examples/bearermonitor/sessionwidget.ui
qtmobility/examples/bearermonitor/sessionwidget_maemo.ui
qtmobility/features/mobility.prf
qtmobility/features/mobility.prf.template
qtmobility/qtmobility.pro
qtmobility/src/3rdparty/icd-network-wlan/libicd-network-wlan-dev.h
qtmobility/src/bearer/qnativewifiengine_win.cpp
qtmobility/src/bearer/qnetworksession_maemo.cpp
qtmobility/src/bearer/qnetworksession_maemo_p.h
qtmobility/src/bearer/qnetworksession_s60_p.cpp
qtmobility/src/s60installs/s60installs.pro
qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp
qtmobility/tests/bearerex/bearerex.h
qtmobility/tests/bearerex/bearerex.pro
qtmobility/tests/bearerex/bearerex_maemo.ui
qtmobility/tests/bearerex/sessiondialog_maemo.ui
--- a/qtmobility/common.pri	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/common.pri	Tue May 11 16:58:44 2010 +0300
@@ -13,6 +13,10 @@
 
 include(staticconfig.pri)
 
+# use only $$QT_MOBILITY_BUILD_TREE. If you add an subfolder it will create a relative path!!!
+# $$QT_MOBILITY_BUILD_TREE/src/global will become ../global
+INCLUDEPATH += $$QT_MOBILITY_BUILD_TREE
+
 symbian:contains(symbian_symbols_unfrozen,1) {
     #see configure.bat for details
     MMP_RULES+="EXPORTUNFROZEN"
--- a/qtmobility/config.pri	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/config.pri	Tue May 11 16:58:44 2010 +0300
@@ -1,6 +1,7 @@
 build_unit_tests = no 
 build_examples = no 
 build_docs = no 
+build_tools = no
 qmf_enabled = no 
 isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include 
 isEmpty($$QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib 
@@ -12,3 +13,5 @@
 snap_enabled = yes 
 occ_enabled = yes 
 symbiancntsim_enabled = yes 
+MOBILITY_SD_MCL_BUILD = yes
+sensors_symbian_enabled = yes
\ No newline at end of file
--- a/qtmobility/configure	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/configure	Tue May 11 16:58:44 2010 +0300
@@ -42,7 +42,7 @@
 
 # return status of 1 if absolute path as first argument
 # also prints the return status
-function isAbsPath() {
+isAbsPath() {
     slash=$(echo $1 | cut -c 1)
     if [ "$slash" != "/" ]; then
         echo 0
@@ -57,7 +57,7 @@
 # This is required because when building in scratchbox for
 # maemo we do not want to follow symbolic links that are 
 # introduced by scratchbox
-function absPath() {
+absPath() {
     
     if [ "$2" = "maemo5" -o "$2" = "maemo6" ]; then
         if [ `isAbsPath $1` = '1' ]; then
@@ -89,6 +89,7 @@
 BUILD_UNITTESTS=
 BUILD_EXAMPLES=
 BUILD_DOCS=yes
+BUILD_TOOLS=yes
 RELEASEMODE=
 BUILD_SILENT=
 LINUX_TARGET=
@@ -103,7 +104,8 @@
 {
     echo "Usage: configure [-prefix <dir>] [headerdir <dir>] [libdir <dir>]"
     echo "                 [-bindir <dir>] [-tests] [-examples] [-no-docs]"
-    echo "                 [-debug] [-release] [-silent] [-modules <list>]"
+    echo "                 [-no-tools] [-debug] [-release] [-silent]"
+    echo "                 [-modules <list>]"
     echo
     echo "Options:"
     echo
@@ -123,6 +125,7 @@
     echo "                    and should not be used for release builds."
     echo "-examples ......... Build example applications"
     echo "-no-docs .......... Do not build documentation (build by default)"
+    echo "-no-tools ......... Do not build tools (build by default)"
     echo "-modules <list> ... Restrict list of modules to build (default all supported)"
     echo "                    Choose from: bearer contacts location publishsubscribe"
     echo "                    messaging multimedia systeminfo serviceframework versit"
@@ -175,6 +178,9 @@
         -no-docs)
             BUILD_DOCS=
             ;;
+        -no-tools)
+            BUILD_TOOLS=
+            ;;
         -debug)
             RELEASEMODE=debug
             ;;
@@ -352,6 +358,12 @@
     echo "build_docs = yes" >> "$CONFIG_IN"
 fi
 
+if [ -z "$BUILD_TOOLS" ]; then
+    echo "build_tools = no" >> "$CONFIG_IN"
+else
+    echo "build_tools = yes" >> "$CONFIG_IN"
+fi
+
 echo "Configuring Qt Mobility"
 echo 
 
--- a/qtmobility/configure.bat	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/configure.bat	Tue May 11 16:58:44 2010 +0300
@@ -56,6 +56,7 @@
 set BUILD_UNITTESTS=no
 set BUILD_EXAMPLES=no
 set BUILD_DOCS=yes
+set BUILD_TOOLS=yes
 set MOBILITY_MODULES=bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors
 set MOBILITY_MODULES_UNPARSED=
 set VC_TEMPLATE_OPTION=
@@ -84,6 +85,7 @@
 if "%1" == "-qt"                goto qtTag
 if "%1" == "-vc"                goto vcTag
 if "%1" == "-no-docs"           goto nodocsTag
+if "%1" == "-no-tools"          goto noToolsTag
 if "%1" == "-modules"           goto modulesTag
 if "%1" == "/?"                 goto usage
 if "%1" == "-h"                 goto usage
@@ -211,6 +213,11 @@
 shift
 goto cmdline_parsing
 
+:noToolsTag
+set BUILD_TOOLS=no
+shift
+goto cmdline_parsing
+
 :modulesTag
 shift
 :: %1 can have leading/trailing quotes, so we can't use if "%1" == ""
@@ -316,6 +323,9 @@
 echo build_docs = %BUILD_DOCS% >> %PROJECT_CONFIG%
 set BUILD_DOCS=
 
+echo build_tools = %BUILD_TOOLS% >> %PROJECT_CONFIG%
+set BUILD_TOOLS=
+
 echo qmf_enabled = no >> %PROJECT_CONFIG%
 
 echo isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include >> %PROJECT_CONFIG%
@@ -451,6 +461,8 @@
 call :compileTest SNAP snap
 call :compileTest OCC occ
 call :compileTest SymbianContactSIM symbiancntsim
+call :compileTest S60_Sensor_API sensors_s60_31
+call :compileTest Symbian_Sensor_Framework sensors_symbian
 echo End of compile tests
 echo.
 echo.
@@ -485,7 +497,6 @@
     perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include %SOURCE_PATH%\src\messaging
 ) else if %FIRST% == multimedia (
     perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include %SOURCE_PATH%\src\multimedia
-    perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include %SOURCE_PATH%\src\multimedia\experimental
 ) else if %FIRST% == publishsubscribe (
     perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include %SOURCE_PATH%\src\publishsubscribe
 ) else if %FIRST% == systeminfo (
Binary file qtmobility/data/qtmobility.sisx has changed
--- a/qtmobility/examples/bearercloud/bearercloud.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearercloud/bearercloud.cpp	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
--- a/qtmobility/examples/bearercloud/bearercloud.h	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearercloud/bearercloud.h	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
--- a/qtmobility/examples/bearercloud/cloud.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearercloud/cloud.cpp	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
--- a/qtmobility/examples/bearercloud/cloud.h	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearercloud/cloud.h	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
--- a/qtmobility/examples/bearercloud/main.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearercloud/main.cpp	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
--- a/qtmobility/examples/bearermonitor/bearermonitor.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearermonitor/bearermonitor.cpp	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
@@ -43,7 +42,7 @@
 #include "sessionwidget.h"
 
 #include <QDebug>
-
+#include <QMessageBox>
 #ifdef Q_OS_WIN
 #include <winsock2.h>
 #undef interface
@@ -57,15 +56,20 @@
 :   QWidget(parent)
 {
     setupUi(this);
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+    newSessionButton->hide();
+    deleteSessionButton->hide();
+#else
     delete tabWidget->currentWidget();
     sessionGroup->hide();
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)	
+#endif
+#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
     setWindowState(Qt::WindowMaximized);
 #endif
     updateConfigurations();
-
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
     onlineStateChanged(!manager.allConfigurations(QNetworkConfiguration::Active).isEmpty());
-
+#endif
     QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration();
     for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
         QTreeWidgetItem *item = treeWidget->topLevelItem(i);
@@ -101,9 +105,10 @@
 
     connect(newSessionButton, SIGNAL(clicked()),
             this, SLOT(createNewSession()));
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
     connect(deleteSessionButton, SIGNAL(clicked()),
             this, SLOT(deleteSession()));
-
+#endif
     connect(scanButton, SIGNAL(clicked()),
             this, SLOT(performScan()));
 }
@@ -234,15 +239,22 @@
 void BearerMonitor::onlineStateChanged(bool isOnline)
 {
     if (isOnline)
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+        QMessageBox::information(this, "Connection state changed", "Online", QMessageBox::Close);
+    else
+        QMessageBox::information(this, "Connection state changed", "Offline", QMessageBox::Close);
+#else
         onlineState->setText(tr("Online"));
     else
         onlineState->setText(tr("Offline"));
+#endif
 }
 
 #ifdef Q_OS_WIN
 void BearerMonitor::registerNetwork()
 {
     QTreeWidgetItem *item = treeWidget->currentItem();
+    if (!item) return;
 
     QNetworkConfiguration configuration =
         manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
@@ -264,6 +276,7 @@
 void BearerMonitor::unregisterNetwork()
 {
     QTreeWidgetItem *item = treeWidget->currentItem();
+    if (!item) return;
 
     QNetworkConfiguration configuration =
         manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
@@ -362,7 +375,9 @@
 
     tabWidget->addTab(session, conf.name());
 
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
     sessionGroup->show();
+#endif
 
     sessionWidgets.append(session);
 }
@@ -370,10 +385,12 @@
 void BearerMonitor::createNewSession()
 {
     QTreeWidgetItem *item = treeWidget->currentItem();
+    if (!item) return;
 
     createSessionFor(item);
 }
 
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
 void BearerMonitor::deleteSession()
 {
     SessionWidget *session = qobject_cast<SessionWidget *>(tabWidget->currentWidget());
@@ -386,6 +403,7 @@
             sessionGroup->hide();
     }
 }
+#endif
 
 void BearerMonitor::performScan()
 {
--- a/qtmobility/examples/bearermonitor/bearermonitor.h	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearermonitor/bearermonitor.h	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
@@ -46,6 +45,8 @@
 #include <qnetworksession.h>
 #if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)	
 #include "ui_bearermonitor_240_320.h"
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#include "ui_bearermonitor_maemo.h"
 #else
 #include "ui_bearermonitor_640_480.h"
 #endif
@@ -80,8 +81,9 @@
 
     void createSessionFor(QTreeWidgetItem *item);
     void createNewSession();
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
     void deleteSession();
-
+#endif
     void performScan();
 
 private:
--- a/qtmobility/examples/bearermonitor/bearermonitor.pro	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearermonitor/bearermonitor.pro	Tue May 11 16:58:44 2010 +0300
@@ -1,24 +1,27 @@
+TARGET = bearermonitor
+QT = core gui network
+
+INCLUDEPATH += ../../src/bearer
+include(../examples.pri)
+
+CONFIG += mobility
+MOBILITY = bearer
+
 HEADERS = sessionwidget.h \
           bearermonitor.h
 
 SOURCES = main.cpp \
           bearermonitor.cpp \
           sessionwidget.cpp
-          
-FORMS = bearermonitor_240_320.ui \
-        bearermonitor_640_480.ui \
-        sessionwidget.ui
 
-TARGET = bearermonitor
-
-QT = core gui network
-
-INCLUDEPATH += ../../src/bearer
-
-include(../examples.pri)
-
-CONFIG += mobility
-MOBILITY = bearer
+maemo5|maemo6 {
+  FORMS = bearermonitor_maemo.ui \
+          sessionwidget_maemo.ui
+} else {
+  FORMS = bearermonitor_240_320.ui \
+          bearermonitor_640_480.ui \
+          sessionwidget.ui
+}
 
 win32:!wince*:LIBS += -lWs2_32
 wince*:LIBS += -lWs2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobility/examples/bearermonitor/bearermonitor_maemo.ui	Tue May 11 16:58:44 2010 +0300
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BearerMonitor</class>
+ <widget class="QWidget" name="BearerMonitor">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>612</width>
+    <height>495</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_3">
+   <item>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <property name="usesScrollButtons">
+      <bool>false</bool>
+     </property>
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>Configurations</string>
+      </attribute>
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
+       <item>
+        <widget class="QTreeWidget" name="treeWidget">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <attribute name="headerVisible">
+          <bool>false</bool>
+         </attribute>
+         <column>
+          <property name="text">
+           <string>1</string>
+          </property>
+         </column>
+        </widget>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayout_2">
+         <item>
+          <layout class="QHBoxLayout" name="configurationNameLayout">
+           <item>
+            <widget class="QLabel" name="configurationNameLabel">
+             <property name="text">
+              <string>Name:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="configurationName">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="configurationStateLayout">
+           <item>
+            <widget class="QLabel" name="configurationStateLabel">
+             <property name="text">
+              <string>State:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="configurationState">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="configurationTypeLayout">
+           <item>
+            <widget class="QLabel" name="configurationTypeLabel">
+             <property name="text">
+              <string>Type:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="configurationType">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>Invalid</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="configurationPurposeLayout">
+           <item>
+            <widget class="QLabel" name="configurationPurposeLabel">
+             <property name="text">
+              <string>Purpose:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="configurationPurpose">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>Unknown</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="configurationIdentifierLayout">
+           <item>
+            <widget class="QLabel" name="configurationIdentifierLabel">
+             <property name="text">
+              <string>Identifier:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="configurationIdentifier">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="configurationRoamingLayout">
+           <item>
+            <widget class="QLabel" name="configurationRoamingLabel">
+             <property name="text">
+              <string>Roaming:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="configurationRoaming">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="configurationChildrenLayout">
+           <item>
+            <widget class="QLabel" name="configurationChildrenLabel">
+             <property name="text">
+              <string>Children:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="configurationChildren">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <widget class="QGroupBox" name="nlaGroup">
+           <property name="title">
+            <string>Network Location Awareness</string>
+           </property>
+           <layout class="QHBoxLayout" name="horizontalLayout">
+            <item>
+             <widget class="QPushButton" name="registerButton">
+              <property name="text">
+               <string>Register</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QPushButton" name="unregisterButton">
+              <property name="text">
+               <string>Unregister</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="newSessionButton">
+           <property name="text">
+            <string>New Session</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="deleteSessionButton">
+           <property name="text">
+            <string>Delete Session</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="scanButton">
+           <property name="text">
+            <string>Scan</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QProgressBar" name="progressBar">
+           <property name="maximum">
+            <number>0</number>
+           </property>
+           <property name="value">
+            <number>23280</number>
+           </property>
+           <property name="textVisible">
+            <bool>false</bool>
+           </property>
+           <property name="invertedAppearance">
+            <bool>false</bool>
+           </property>
+           <property name="format">
+            <string>%p%</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- a/qtmobility/examples/bearermonitor/main.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearermonitor/main.cpp	Tue May 11 16:58:44 2010 +0300
@@ -6,35 +6,34 @@
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
--- a/qtmobility/examples/bearermonitor/sessionwidget.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearermonitor/sessionwidget.cpp	Tue May 11 16:58:44 2010 +0300
@@ -1,40 +1,39 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
@@ -52,7 +51,7 @@
     connect(session, SIGNAL(stateChanged(QNetworkSession::State)),
             this, SLOT(updateSession()));
     connect(session, SIGNAL(error(QNetworkSession::SessionError)),
-            this, SLOT(updateSession()));
+            this, SLOT(updateSessionError(QNetworkSession::SessionError)));
 
     updateSession();
 
@@ -68,6 +67,10 @@
             this, SLOT(closeSession()));
     connect(stopSessionButton, SIGNAL(clicked()),
             this, SLOT(stopSession()));
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+    connect(deleteSessionButton, SIGNAL(clicked()),
+            this, SLOT(deleteSession()));
+#endif
 }
 
 SessionWidget::~SessionWidget()
@@ -75,10 +78,16 @@
     delete session;
 }
 
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+void SessionWidget::deleteSession()
+{
+    delete this;
+}
+#endif
+
 void SessionWidget::updateSession()
 {
     updateSessionState(session->state());
-    updateSessionError(session->error());
 
     if (session->configuration().type() == QNetworkConfiguration::InternetAccessPoint)
         bearer->setText(session->configuration().bearerName());
@@ -94,12 +103,14 @@
 
 void SessionWidget::openSession()
 {
+    clearError();
     session->open();
     updateSession();
 }
 
 void SessionWidget::openSyncSession()
 {
+    clearError();
     session->open();
     session->waitForOpened();
     updateSession();
@@ -107,12 +118,14 @@
 
 void SessionWidget::closeSession()
 {
+    clearError();
     session->close();
     updateSession();
 }
 
 void SessionWidget::stopSession()
 {
+    clearError();
     session->stop();
     updateSession();
 }
@@ -161,3 +174,8 @@
     errorString->setText(session->errorString());
 }
 
+void SessionWidget::clearError()
+{
+    lastError->clear();
+    errorString->clear();
+}
--- a/qtmobility/examples/bearermonitor/sessionwidget.h	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearermonitor/sessionwidget.h	Tue May 11 16:58:44 2010 +0300
@@ -1,40 +1,39 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
 ** This file is part of the Qt Mobility Components.
 **
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
 **
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+**     the names of its contributors may be used to endorse or promote
+**     products derived from this software without specific prior written
+**     permission.
 **
-**
-**
-**
-**
-**
-**
-**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
@@ -42,8 +41,11 @@
 #ifndef SESSIONWIDGET_H
 #define SESSIONWIDGET_H
 
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#include "ui_sessionwidget_maemo.h"
+#else
 #include "ui_sessionwidget.h"
-
+#endif
 #include <qnetworksession.h>
 
 QTM_USE_NAMESPACE
@@ -58,7 +60,7 @@
 
 private:
     void updateSessionState(QNetworkSession::State state);
-    void updateSessionError(QNetworkSession::SessionError error);
+    void clearError();
 
 private Q_SLOTS:
     void openSession();
@@ -66,6 +68,11 @@
     void closeSession();
     void stopSession();
     void updateSession();
+    void updateSessionError(QNetworkSession::SessionError error);
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+    void deleteSession();
+#endif
+
 
 private:
     QNetworkSession *session;
--- a/qtmobility/examples/bearermonitor/sessionwidget.ui	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/examples/bearermonitor/sessionwidget.ui	Tue May 11 16:58:44 2010 +0300
@@ -195,7 +195,7 @@
        <item>
         <widget class="QLabel" name="errorStringLabel">
          <property name="text">
-          <string>Error String</string>
+          <string>Error String:</string>
          </property>
         </widget>
        </item>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobility/examples/bearermonitor/sessionwidget_maemo.ui	Tue May 11 16:58:44 2010 +0300
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SessionWidget</class>
+ <widget class="QWidget" name="SessionWidget">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>497</width>
+    <height>615</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <layout class="QHBoxLayout" name="sessionIdLayout">
+       <item>
+        <widget class="QLabel" name="sessionIdLabel">
+         <property name="text">
+          <string>Session ID:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="sessionId">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="sessionStateLayout">
+       <item>
+        <widget class="QLabel" name="sessionStateLabel">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>Session State:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="sessionState">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>Invalid</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="configurationLayout">
+       <item>
+        <widget class="QLabel" name="configurationLabel">
+         <property name="text">
+          <string>Configuration:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="configuration">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="bearerLayout">
+       <item>
+        <widget class="QLabel" name="bearerLabel">
+         <property name="text">
+          <string>Bearer:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="bearer">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="interfaceNameLayout">
+       <item>
+        <widget class="QLabel" name="interfaceNameLabel">
+         <property name="text">
+          <string>Interface Name:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="interfaceName">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="interfaceGuidLayout">
+       <item>
+        <widget class="QLabel" name="interfaceGuidLabel">
+         <property name="text">
+          <string>Interface GUID:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="interfaceGuid">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="lastErrorLayout">
+       <item>
+        <widget class="QLabel" name="lastErrorLabel">
+         <property name="text">
+          <string>Last Error:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="lastError">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="errorStringLayout">
+       <item>
+        <widget class="QLabel" name="errorStringLabel">
+         <property name="text">
+          <string>Error String</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="errorString">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <widget class="QPushButton" name="openSessionButton">
+       <property name="text">
+        <string>Open</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="closeSessionButton">
+       <property name="text">
+        <string>Close</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="openSyncSessionButton">
+       <property name="text">
+        <string>Blocking Open</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="stopSessionButton">
+       <property name="text">
+        <string>Stop</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="deleteSessionButton">
+       <property name="text">
+        <string>Delete</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- a/qtmobility/features/mobility.prf	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/features/mobility.prf	Tue May 11 16:58:44 2010 +0300
@@ -13,6 +13,7 @@
 }
 mac: LIBS += -F$${MOBILITY_LIB}
 LIBS+= -L$${MOBILITY_LIB}
+QMAKE_RPATHDIR+=$${MOBILITY_LIB}
 
 contains(MOBILITY, bearer) {
     DEFINES += QT_MOBILITY_BEARER
--- a/qtmobility/features/mobility.prf.template	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/features/mobility.prf.template	Tue May 11 16:58:44 2010 +0300
@@ -13,6 +13,7 @@
 }
 mac: LIBS += -F$${MOBILITY_LIB}
 LIBS+= -L$${MOBILITY_LIB}
+QMAKE_RPATHDIR+=$${MOBILITY_LIB}
 
 contains(MOBILITY, bearer) {
     DEFINES += QT_MOBILITY_BEARER
--- a/qtmobility/qtmobility.pro	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/qtmobility.pro	Tue May 11 16:58:44 2010 +0300
@@ -19,6 +19,27 @@
     #happen if we are trying to shadow build w/o running configure
 }
 
+#creating qbuildcfg header
+!exists($$QT_MOBILITY_BUILD_TREE/src/global){
+	message("creating qbuildcfg header")
+	symbian|win32|wince*{
+		system($$QMAKE_MKDIR $$QT_MOBILITY_BUILD_TREE\src\global)
+	}
+	else{
+		system($$QMAKE_MKDIR $$QT_MOBILITY_BUILD_TREE/src/global)
+	}
+}
+	
+QCFGH_OUTPUT=$$QT_MOBILITY_BUILD_TREE/src/global/qbuildcfg.h
+mobilityprefixpath = $$QT_MOBILITY_PREFIX
+symbian|win32|wince*{
+	mobilityprefixpath = $$replace(mobilityprefixpath, \\\, \\\\)
+	system(echo static const char qt_mobility_configure_prefix_path_str [512 + 12] = \"$$mobilityprefixpath\\0\"; > $$QCFGH_OUTPUT)
+}
+else{
+	system(echo static const char qt_mobility_configure_prefix_path_str [512 + 12] = '\\\"$$mobilityprefixpath\\\0\\\"\;' > $$QCFGH_OUTPUT)
+}
+
 
 #don't build QtMobility if chosen config mismatches Qt's config
 win32:!contains(CONFIG_WIN32,build_all) {
@@ -41,28 +62,34 @@
 }
 
 
-#generate prf file for Qt integration
-#PRF_OUTPUT=$${QT_MOBILITY_BUILD_TREE}/features/mobility.prf
+# MCL builds for Symbian do not run configure and require some manual setup steps.
+# This test permits SD builds to skip installation of mobility.prf from within qmake.
+# It is installed in a separate step. MCL builds for SD must set the
+# MOBILITY_SD_MCL_BUILD flag to yes.
+!contains(MOBILITY_SD_MCL_BUILD, yes) {
+    #generate prf file for Qt integration
+    PRF_OUTPUT=$${QT_MOBILITY_BUILD_TREE}/features/mobility.prf
 
-#system(echo MOBILITY_PREFIX=$${QT_MOBILITY_PREFIX} > $$PRF_OUTPUT)
-#system(echo MOBILITY_INCLUDE=$${QT_MOBILITY_INCLUDE} >> $$PRF_OUTPUT)
-#system(echo MOBILITY_LIB=$${QT_MOBILITY_LIB} >> $$PRF_OUTPUT)
-
-#unix:!symbian:system(cat $${QT_MOBILITY_SOURCE_TREE}/features/mobility.prf.template >> $$PRF_OUTPUT)
-#win32:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
-#symbian:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
+    system(echo MOBILITY_PREFIX=$${QT_MOBILITY_PREFIX} > $$PRF_OUTPUT)
+    system(echo MOBILITY_INCLUDE=$${QT_MOBILITY_INCLUDE} >> $$PRF_OUTPUT)
+    system(echo MOBILITY_LIB=$${QT_MOBILITY_LIB} >> $$PRF_OUTPUT)
 
-#symbian does not generate make install rule. we have to copy prf manually 
-#symbian {
-#    FORMATDIR=$$[QT_INSTALL_DATA]\mkspecs\features\
-#    FORMATDIR=$$replace(FORMATDIR,/,\\ )
-#    system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobility.prf $$FORMATDIR")
-#}
+    unix:!symbian:system(cat $${QT_MOBILITY_SOURCE_TREE}/features/mobility.prf.template >> $$PRF_OUTPUT)
+    win32:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
+    symbian:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
 
-# install feature file
-#feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
-#feature.files = $$QT_MOBILITY_BUILD_TREE/features/mobility.prf
-#INSTALLS += feature
+    #symbian does not generate make install rule. we have to copy prf manually 
+    symbian {
+        FORMATDIR=$$[QT_INSTALL_DATA]\mkspecs\features
+        FORMATDIR=$$replace(FORMATDIR,/,\\ )
+        system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobility.prf $$FORMATDIR")
+    }
+
+    # install feature file
+    feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
+    feature.files = $$QT_MOBILITY_BUILD_TREE/features/mobility.prf
+    INSTALLS += feature
+}
 
 TEMPLATE = subdirs
 CONFIG+=ordered
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobility/src/3rdparty/icd-network-wlan/libicd-network-wlan-dev.h	Tue May 11 16:58:44 2010 +0300
@@ -0,0 +1,140 @@
+#ifndef WLAN_DEV_H
+#define WLAN_DEV_H
+
+/**
+ * Copyright (C) 2007,2008 Nokia Corporation. All rights reserved.
+ *
+ * @author jukka.rissanen@nokia.com
+ *
+ * @file libicd-network-wlan-dev.h
+ */
+
+#include <glib.h>
+#include <dbus/dbus.h>
+#include <wlancond.h>
+#include <icd/network_api_defines.h>
+
+
+/* Difference between network attributes value and wlan capabilities:
+ *
+ *                                    WLAN
+ *             Network             capability             Combined
+ *   LSB      attribute         (from wlancond.h)
+ *  ----      ---------            ----------             --------
+ *    0                               mode                  mode
+ *    1                               mode                  mode
+ *    2                               mode                  mode
+ *    3                          autoconnect attempt       method
+ *    4                             encrypt method         method
+ *    5                             encrypt method         method
+ *    6                             encrypt method         method
+ *    7                             encrypt method          WPA2
+ *    8                               WPA2                algorithm
+ *    9                               WPS                 algorithm
+ *   10                              WPS PIN              algorithm
+ *   11                             WPS push button       algorithm
+ *   12                             WPS configured          WPS
+ *   13                                                    WPS PIN
+ *   14                                                  WPS push button
+ *   15                                                  WPS configured 
+ *   16                               rate
+ *   17                               rate
+ *   18                               rate
+ *   19                               rate
+ *   20                               rate
+ *   21                               rate
+ *   22                               rate
+ *   23        iap name               rate                 iap name
+ *   24         silent                rate                  silent
+ *   25                               rate
+ *   26      
+ *   27
+ *   28                           security algorithm
+ *   29      always online        security algorithm      always online
+ *   30                           security algorithm
+ *   31                           security algorithm
+ *   MSB
+ *
+ *
+ * Same view from different angle.
+ *
+ *   MSB                            LSB   (of 32 bits)
+ *    10987654321098765432109876543210
+ *
+ *                    WWWWaaaaWmmmmmmm    Combined format
+ *                    PPPPllllPeeeeooo 
+ *                    SSSSggggAttttddd 
+ *                    cbp oooo2hhhheee
+ *                    fti      oooo 
+ *                    gnn      dddd
+ *
+ *    aaaa                   Wmmmm mmm    Capability format
+ *    llll                   Peeee ooo 
+ *    gggg                   Atttt ddd 
+ *    oooo                   2hhhh eee
+ *                            oooo 
+ *                            dddd
+ *
+ *
+ * Note that WPS bits in nwattrs are moved towards MSB because algorithm
+ * was there first and we do not want to break binary compatibility.
+ */
+
+/* capability bits inside network attributes var */
+#define NWATTR_WPS_MASK       0x0000F000
+#define NWATTR_ALGORITHM_MASK 0x00000F00
+#define NWATTR_WPA2_MASK      0x00000080
+#define NWATTR_METHOD_MASK    0x00000078
+#define NWATTR_MODE_MASK      0x00000007
+
+#define CAP_LOCALMASK         0x0FFFE008
+
+/* how much to shift between capability and network attributes var */
+#define CAP_SHIFT_WPS        3
+#define CAP_SHIFT_ALGORITHM 20
+#define CAP_SHIFT_WPA2       1
+#define CAP_SHIFT_METHOD     1
+#define CAP_SHIFT_MODE       0
+#define CAP_SHIFT_ALWAYS_ONLINE 26
+
+/* ------------------------------------------------------------------------- */
+/* From combined to capability */
+static inline dbus_uint32_t nwattr2cap(guint nwattrs, dbus_uint32_t *cap)
+{
+	guint oldval = *cap;
+
+	*cap &= CAP_LOCALMASK; /* clear old capabilities */
+	*cap |=
+		((nwattrs & ICD_NW_ATTR_ALWAYS_ONLINE) >> CAP_SHIFT_ALWAYS_ONLINE) |
+		((nwattrs & NWATTR_WPS_MASK) >> CAP_SHIFT_WPS) |
+		((nwattrs & NWATTR_ALGORITHM_MASK) << CAP_SHIFT_ALGORITHM) |
+		((nwattrs & NWATTR_WPA2_MASK) << CAP_SHIFT_WPA2) |
+		((nwattrs & NWATTR_METHOD_MASK) << CAP_SHIFT_METHOD) |
+		(nwattrs & NWATTR_MODE_MASK);
+
+	return oldval;
+}
+
+
+/* ------------------------------------------------------------------------- */
+/* From capability to combined */
+static inline guint cap2nwattr(dbus_uint32_t cap, guint *nwattrs)
+{
+	guint oldval = *nwattrs;
+
+	*nwattrs &= ~ICD_NW_ATTR_LOCALMASK; /* clear old capabilities */
+        *nwattrs |=
+#ifdef WLANCOND_WPS_MASK
+		((cap & WLANCOND_WPS_MASK) << CAP_SHIFT_WPS) |
+#endif
+		((cap & (WLANCOND_ENCRYPT_ALG_MASK |
+			 WLANCOND_ENCRYPT_GROUP_ALG_MASK)) >> CAP_SHIFT_ALGORITHM)|
+		((cap & WLANCOND_ENCRYPT_WPA2_MASK) >> CAP_SHIFT_WPA2) |
+		((cap & WLANCOND_ENCRYPT_METHOD_MASK) >> CAP_SHIFT_METHOD) |
+		(cap & WLANCOND_MODE_MASK);
+
+	return oldval;
+}
+
+
+#endif
--- a/qtmobility/src/bearer/qnativewifiengine_win.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/src/bearer/qnativewifiengine_win.cpp	Tue May 11 16:58:44 2010 +0300
@@ -43,7 +43,6 @@
 #include "qnetworkconfiguration_p.h"
 
 #include <QtCore/qmutex.h>
-#include <QtCore/private/qmutexpool_p.h>
 #include <QtCore/qlibrary.h>
 #include <QtCore/qstringlist.h>
 
@@ -330,13 +329,15 @@
 static WlanFreeMemoryProto local_WlanFreeMemory = 0;
 static WlanCloseHandleProto local_WlanCloseHandle = 0;
 
+Q_GLOBAL_STATIC_WITH_ARGS(QMutex, dynamicLoadMutex, (QMutex::Recursive));
+
 static void resolveLibrary()
 {
     static volatile bool triedResolve = false;
 
     if (!triedResolve) {
 #ifndef QT_NO_THREAD
-        QMutexLocker locker(QMutexPool::globalInstanceGet(&local_WlanOpenHandle));
+        QMutexLocker locker(dynamicLoadMutex());
 #endif
 
         if (!triedResolve) {
--- a/qtmobility/src/bearer/qnetworksession_maemo.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/src/bearer/qnetworksession_maemo.cpp	Tue May 11 16:58:44 2010 +0300
@@ -51,6 +51,61 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+
+QDBusArgument &operator<<(QDBusArgument &argument,
+                          const QtMobility::ICd2DetailsDBusStruct &icd2)
+{
+    argument.beginStructure();
+    argument << icd2.serviceType;
+    argument << icd2.serviceAttributes;
+    argument << icd2.setviceId;
+    argument << icd2.networkType;
+    argument << icd2.networkAttributes;
+    argument << icd2.networkId;
+    argument.endStructure();
+    return argument;
+}
+
+const QDBusArgument &operator>>(const QDBusArgument &argument,
+                                QtMobility::ICd2DetailsDBusStruct &icd2)
+{
+    argument.beginStructure();
+    argument >> icd2.serviceType;
+    argument >> icd2.serviceAttributes;
+    argument >> icd2.setviceId;
+    argument >> icd2.networkType;
+    argument >> icd2.networkAttributes;
+    argument >> icd2.networkId;
+    argument.endStructure();
+    return argument;
+}
+
+const QDBusArgument &operator>>(const QDBusArgument &argument,
+                                QtMobility::ICd2DetailsList &detailsList)
+{
+     argument.beginArray();
+     detailsList.clear();
+
+     while (!argument.atEnd()) {
+         QtMobility::ICd2DetailsDBusStruct element;
+         argument >> element;
+         detailsList.append(element);
+     }
+
+     argument.endArray();
+     return argument;
+}
+
+QDBusArgument &operator<<(QDBusArgument &argument,
+                          const QtMobility::ICd2DetailsList &detailsList)
+{
+     argument.beginArray(qMetaTypeId<QtMobility::ICd2DetailsDBusStruct>());
+     for (int i = 0; i < detailsList.count(); ++i)
+         argument << detailsList[i];
+     argument.endArray();
+     return argument;
+}
+
 QTM_BEGIN_NAMESPACE
 
 static QHash<QString, QVariant> properties;
@@ -605,208 +660,206 @@
         if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active) {
             state = QNetworkSession::Connecting;
             emit q->stateChanged(state);
-
-	    QTimer::singleShot(0, this, SLOT(do_open()));
-	    return;
+            QTimer::singleShot(0, this, SLOT(do_open()));
+            return;
         }
-
         isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
         if (isOpen)
             emit quitPendingWaitsForOpened();
     } else {
-	/* We seem to be active so inform caller */
-	emit quitPendingWaitsForOpened();
+        /* We seem to be active so inform caller */
+        emit quitPendingWaitsForOpened();
     }
 }
 
-
 void QNetworkSessionPrivate::do_open()
 {
     icd_connection_flags flags = connectFlags;
-    bool st;
-    QString result;
     QString iap = publicConfig.identifier();
 
     if (state == QNetworkSession::Connected) {
 #ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "Already connected to" << activeConfig.identifier();
+        qDebug() << "Already connected to" << activeConfig.identifier();
 #endif
         emit q->stateChanged(QNetworkSession::Connected);
-	emit quitPendingWaitsForOpened();
+        emit quitPendingWaitsForOpened();
 	return;
     }
 
-    Maemo::IcdConnectResult connect_result;
-    Maemo::Icd icd(ICD_LONG_CONNECT_TIMEOUT);
-    QNetworkConfiguration config;
     if (publicConfig.type() == QNetworkConfiguration::UserChoice)
-	config = activeConfig;
+        config = activeConfig;
     else
-	config = publicConfig;
+        config = publicConfig;
 
     if (iap == OSSO_IAP_ANY) {
 #ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "connecting to default IAP" << iap;
+        qDebug() << "connecting to default IAP" << iap;
 #endif
-	st = icd.connect(flags, connect_result);
-
+        m_connectRequestTimer.start(ICD_LONG_CONNECT_TIMEOUT);
+        m_dbusInterface->asyncCall(ICD_DBUS_API_CONNECT_REQ, (uint)flags); // Return value ignored
+        m_asynchCallActive = true;
     } else {
-
-	QList<Maemo::ConnectParams> params;
-	Maemo::ConnectParams param;
-	param.connect.service_type = config.d->service_type;
-	param.connect.service_attrs = config.d->service_attrs;
-	param.connect.service_id = config.d->service_id;
-	param.connect.network_type = config.d->iap_type;
-	param.connect.network_attrs = config.d->network_attrs;
-	if (config.d->network_attrs & ICD_NW_ATTR_IAPNAME)
-	    param.connect.network_id = QByteArray(iap.toLatin1());
-	else
-	    param.connect.network_id = config.d->network_id;
-	params.append(param);
+        ICd2DetailsDBusStruct icd2;
+        icd2.serviceType = config.d->service_type;
+        icd2.serviceAttributes = config.d->service_attrs;
+        icd2.setviceId = config.d->service_id;
+        icd2.networkType = config.d->iap_type;
+        icd2.networkAttributes = config.d->network_attrs;
+        if (config.d->network_attrs & ICD_NW_ATTR_IAPNAME) {
+            icd2.networkId  = QByteArray(iap.toLatin1());
+        } else {
+            icd2.networkId  = config.d->network_id;
+        }
 
 #ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug("connecting to %s/%s/0x%x/%s/0x%x/%s",
-	    param.connect.network_id.data(),
-	    param.connect.network_type.toAscii().constData(),
-	    param.connect.network_attrs,
-	    param.connect.service_type.toAscii().constData(),
-	    param.connect.service_attrs,
-	    param.connect.service_id.toAscii().constData());
-#endif
-	st = icd.connect(flags, params, connect_result);
-    }
-
-    if (st) {
-	result = connect_result.connect.network_id.data();
-	QString connected_iap = result;
-
-	if (connected_iap.isEmpty()) {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	    qDebug() << "connect to"<< iap << "failed, result is empty";
-#endif
-	    updateState(QNetworkSession::Disconnected);
-	    emit q->error(QNetworkSession::InvalidConfigurationError);
-	    if (publicConfig.type() == QNetworkConfiguration::UserChoice)
-                copyConfig(publicConfig, activeConfig);
-	    return;
-	}
-
-	/* If the user tried to connect to some specific connection (foo)
-	 * and we were already connected to some other connection (bar),
-	 * then we cannot activate this session although icd has a valid
-	 * connection to somewhere.
-	 */
-	if ((publicConfig.type() != QNetworkConfiguration::UserChoice) &&
-	    (connected_iap != config.identifier())) {
-	    updateState(QNetworkSession::Disconnected);
-	    emit q->error(QNetworkSession::InvalidConfigurationError);
-	    return;
-	}
-
-
-	/* Did we connect to non saved IAP? */
-	if (!(config.d->network_attrs & ICD_NW_ATTR_IAPNAME)) {
-	    /* Because the connection succeeded, the IAP is now known.
-	     */
-	    config.d->network_attrs |= ICD_NW_ATTR_IAPNAME;
-	    config.d->id = connected_iap;
-	}
-
-	/* User might have changed the IAP name when a new IAP was saved */
-	Maemo::IAPConf iap_name(config.d->id);
-	QString name = iap_name.value("name").toString();
-	if (!name.isEmpty())
-	    config.d->name = name;
-
-        config.d->iap_type = connect_result.connect.network_type;
-
-	config.d->isValid = true;
-	config.d->state = QNetworkConfiguration::Active;
-	config.d->type = QNetworkConfiguration::InternetAccessPoint;
-
-	startTime = QDateTime::currentDateTime();
-	updateState(QNetworkSession::Connected);
-
-	currentNetworkInterface = get_network_interface();
-
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "connected to" << result << config.d->name << "at" << currentNetworkInterface;
+    qDebug("connecting to %s/%s/0x%x/%s/0x%x/%s",
+        icd2.networkId.data(),
+        icd2.networkType.toAscii().constData(),
+        icd2.networkAttributes,
+        icd2.serviceType.toAscii().constData(),
+        icd2.serviceAttributes,
+        icd2.setviceId.toAscii().constData());
 #endif
 
-	/* We first check if the configuration already exists in the manager
-	 * and if it is not found there, we then insert it. Note that this
-	 * is only done for user choice config only because it can be missing
-	 * from config manager list.
-	 */
+        ICd2DetailsList paramArray;
+        paramArray.append(icd2);
+        m_connectRequestTimer.start(ICD_LONG_CONNECT_TIMEOUT);
+        m_dbusInterface->asyncCall(ICD_DBUS_API_CONNECT_REQ, (uint)flags, QVariant::fromValue(paramArray)); // Return value ignored
+        m_asynchCallActive = true;
+    }
+}
+
+ void QNetworkSessionPrivate::stateChange(const QDBusMessage& rep)
+{
+     if (m_asynchCallActive == true) {
+        if (m_connectRequestTimer.isActive())
+            m_connectRequestTimer.stop();
+        m_asynchCallActive = false;
+
+        QString result = rep.arguments().at(5).toString(); // network id or empty string
+        QString connected_iap = result;
+        if (connected_iap.isEmpty()) {
+#ifdef BEARER_MANAGEMENT_DEBUG
+            qDebug() << "connect to"<< publicConfig.identifier() << "failed, result is empty";
+#endif
+            updateState(QNetworkSession::Disconnected);
+            emit q->error(QNetworkSession::InvalidConfigurationError);
+            if (publicConfig.type() == QNetworkConfiguration::UserChoice)
+                    copyConfig(publicConfig, activeConfig);
+            return;
+        }
 
-	if (publicConfig.d->type == QNetworkConfiguration::UserChoice) {
+         /* If the user tried to connect to some specific connection (foo)
+         * and we were already connected to some other connection (bar),
+         * then we cannot activate this session although icd has a valid
+         * connection to somewhere.
+         */
+        if ((publicConfig.type() != QNetworkConfiguration::UserChoice) &&
+            (connected_iap != config.identifier())) {
+            updateState(QNetworkSession::Disconnected);
+            emit q->error(QNetworkSession::InvalidConfigurationError);
+            return;
+        }
+
+        /* Did we connect to non saved IAP? */
+        if (!(config.d->network_attrs & ICD_NW_ATTR_IAPNAME)) {
+            /* Because the connection succeeded, the IAP is now known.
+             */
+            config.d->network_attrs |= ICD_NW_ATTR_IAPNAME;
+            config.d->id = connected_iap;
+        }
 
+        /* User might have changed the IAP name when a new IAP was saved */
+        Maemo::IAPConf iap_name(config.d->id);
+        QString name = iap_name.value("name").toString();
+        if (!name.isEmpty())
+            config.d->name = name;
+
+        config.d->iap_type = rep.arguments().at(3).toString(); // connect_result.connect.network_type;
+        config.d->isValid = true;
+        config.d->state = QNetworkConfiguration::Active;
+        config.d->type = QNetworkConfiguration::InternetAccessPoint;
+
+        startTime = QDateTime::currentDateTime();
+        updateState(QNetworkSession::Connected);
+        //currentNetworkInterface = get_network_interface();
+#ifdef BEARER_MANAGEMENT_DEBUG
+        //qDebug() << "connected to" << result << config.d->name << "at" << currentNetworkInterface;
+#endif
+
+        /* We first check if the configuration already exists in the manager
+         * and if it is not found there, we then insert it. Note that this
+         * is only done for user choice config only because it can be missing
+         * from config manager list.
+         */
+        if (publicConfig.d->type == QNetworkConfiguration::UserChoice) {
 #ifdef BEARER_MANAGEMENT_DEBUG
 #if 0
-	    QList<QNetworkConfiguration> configs;
-	    QNetworkConfigurationManagerPrivate *conPriv = (QNetworkConfigurationManagerPrivate*)config.d.data()->manager;
-	    QList<QString> cpsIdents = conPriv->accessPointConfigurations.keys();
-	    foreach( QString ii, cpsIdents) {
-		QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p = 
-		    conPriv->accessPointConfigurations.value(ii);
-		QNetworkConfiguration pt;
-		pt.d = conPriv->accessPointConfigurations.value(ii);
-		configs << pt;
-	    }
+            QList<QNetworkConfiguration> configs;
+            QNetworkConfigurationManagerPrivate *conPriv = (QNetworkConfigurationManagerPrivate*)config.d.data()->manager;
+            QList<QString> cpsIdents = conPriv->accessPointConfigurations.keys();
+            foreach( QString ii, cpsIdents) {
+                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> p =
+                        conPriv->accessPointConfigurations.value(ii);
+                QNetworkConfiguration pt;
+                pt.d = conPriv->accessPointConfigurations.value(ii);
+                configs << pt;
+            }
 
-	    int all = configs.count();
-	    qDebug() << "All configurations:" << all;
-	    foreach(QNetworkConfiguration p, configs) {
-		qDebug() << p.name() <<":  isvalid->" <<p.isValid() << " type->"<< p.type() << 
-		    " roaming->" << p.isRoamingAvailable() << "identifier->" << p.identifier() <<
-		    " purpose->" << p.purpose() << " state->" << p.state();
-	    }
+            int all = configs.count();
+            qDebug() << "All configurations:" << all;
+            foreach(QNetworkConfiguration p, configs) {
+                qDebug() << p.name() <<":  isvalid->" <<p.isValid() << " type->"<< p.type() <<
+                        " roaming->" << p.isRoamingAvailable() << "identifier->" << p.identifier() <<
+                        " purpose->" << p.purpose() << " state->" << p.state();
+            }
 #endif
 #endif
             QNetworkConfigurationManagerPrivate *mgr = (QNetworkConfigurationManagerPrivate*)publicConfig.d.data()->manager;
             if (!mgr->accessPointConfigurations.contains(result)) {
-		QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = config.d;
-		mgr->accessPointConfigurations.insert(result, ptr);
+                QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr = config.d;
+                mgr->accessPointConfigurations.insert(result, ptr);
 
-		QNetworkConfiguration item;
-		item.d = ptr;
-		emit mgr->configurationAdded(item);
+                QNetworkConfiguration item;
+                item.d = ptr;
+                emit mgr->configurationAdded(item);
 
 #ifdef BEARER_MANAGEMENT_DEBUG
-		//qDebug()<<"New configuration"<<result<<"added to manager in open";
+            qDebug()<<"New configuration"<<result<<"added to manager in open";
 #endif
 
-	    } else {
+            } else {
                 QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> priv = mgr->accessPointConfigurations.value(result);
-		QNetworkConfiguration reference;
-		reference.d = priv;
+                QNetworkConfiguration reference;
+                reference.d = priv;
                 copyConfig(config, reference, false);
                 reference.d.data()->id = result; // Note: Id was not copied in copyConfig() function
                 config = reference;
                 activeConfig = reference;
 
 #ifdef BEARER_MANAGEMENT_DEBUG
-		//qDebug()<<"Existing configuration"<<result<<"updated in manager in open";
+                qDebug()<<"Existing configuration"<<result<<"updated in manager in open";
 #endif
-	    }
-	}
-
-	emit quitPendingWaitsForOpened();
+            }
+        }
 
-    } else {
-#ifdef BEARER_MANAGEMENT_DEBUG
-	qDebug() << "connect to"<< iap << "failed, status:" << connect_result.status;
-#endif
-	updateState(QNetworkSession::Disconnected);
-	if (publicConfig.type() == QNetworkConfiguration::UserChoice)
+        emit quitPendingWaitsForOpened();
+    }
+}
+
+void QNetworkSessionPrivate::connectTimeout()
+{
+    updateState(QNetworkSession::Disconnected);
+    if (publicConfig.type() == QNetworkConfiguration::UserChoice)
             copyConfig(publicConfig, activeConfig);
-	emit q->error(QNetworkSession::UnknownSessionError);
-    }
+        emit q->error(QNetworkSession::UnknownSessionError);
 }
 
 void QNetworkSessionPrivate::close()
 {
+    if (m_connectRequestTimer.isActive())
+        m_connectRequestTimer.stop();
+
     if (serviceConfig.isValid()) {
         lastError = QNetworkSession::OperationNotSupportedError;
         emit q->error(lastError);
@@ -820,6 +873,9 @@
 
 void QNetworkSessionPrivate::stop()
 {
+    if (m_connectRequestTimer.isActive())
+        m_connectRequestTimer.stop();
+
     if (serviceConfig.isValid()) {
         lastError = QNetworkSession::OperationNotSupportedError;
         emit q->error(lastError);
--- a/qtmobility/src/bearer/qnetworksession_maemo_p.h	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/src/bearer/qnetworksession_maemo_p.h	Tue May 11 16:58:44 2010 +0300
@@ -64,6 +64,18 @@
 
 QTM_BEGIN_NAMESPACE
 
+struct ICd2DetailsDBusStruct
+{
+    QString serviceType;
+    uint serviceAttributes;
+    QString setviceId;
+    QString networkType;
+    uint networkAttributes;
+    QByteArray networkId;
+};
+
+typedef QList<ICd2DetailsDBusStruct> ICd2DetailsList;
+
 class QNetworkSessionPrivate : public QObject
 {
     Q_OBJECT
@@ -71,10 +83,32 @@
     QNetworkSessionPrivate() : 
         tx_data(0), rx_data(0), m_activeTime(0), isOpen(false),
         connectFlags(ICD_CONNECTION_FLAG_USER_EVENT),
-        currentState(QNetworkSession::Invalid)
+        currentState(QNetworkSession::Invalid),
+        m_asynchCallActive(false)
     {
         m_stopTimer.setSingleShot(true);
         connect(&m_stopTimer, SIGNAL(timeout()), this, SLOT(finishStopBySendingClosedSignal()));
+
+        QDBusConnection systemBus = QDBusConnection::systemBus();
+
+        m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE,
+                                         ICD_DBUS_API_PATH,
+                                         ICD_DBUS_API_INTERFACE,
+                                         systemBus,
+                                         this);
+
+        systemBus.connect(ICD_DBUS_API_INTERFACE,
+                        ICD_DBUS_API_PATH,
+                        ICD_DBUS_API_INTERFACE,
+                        ICD_DBUS_API_CONNECT_SIG,
+                        this,
+                        SLOT(stateChange(const QDBusMessage&)));
+
+        qDBusRegisterMetaType<ICd2DetailsDBusStruct>();
+        qDBusRegisterMetaType<ICd2DetailsList>();
+
+        m_connectRequestTimer.setSingleShot(true);
+        connect(&m_connectRequestTimer, SIGNAL(timeout()), this, SLOT(connectTimeout()));
     }
 
     ~QNetworkSessionPrivate()
@@ -121,6 +155,8 @@
     void iapStateChanged(const QString& iapid, uint icd_connection_state);
     void updateProxies(QNetworkSession::State newState);
     void finishStopBySendingClosedSignal();
+    void stateChange(const QDBusMessage& rep);
+    void connectTimeout();
 
 private:
     QNetworkConfigurationManager manager;
@@ -131,6 +167,7 @@
 
     // The config set on QNetworkSession.
     QNetworkConfiguration publicConfig;
+    QNetworkConfiguration config;
 
     // If publicConfig is a ServiceNetwork this is a copy of publicConfig.
     // If publicConfig is an UserChoice that is resolved to a ServiceNetwork this is the actual
@@ -166,10 +203,24 @@
     void clearProxyInformation();
     QNetworkSession::State currentState;
 
+    QDBusInterface *m_dbusInterface;
+
     QTimer m_stopTimer;
+
+    bool m_asynchCallActive;
+    QTimer m_connectRequestTimer;
 };
 
 QTM_END_NAMESPACE
 
+// Marshall the ICd2DetailsDBusStruct data into a D-Bus argument
+QDBusArgument &operator<<(QDBusArgument &argument, const QtMobility::ICd2DetailsDBusStruct &icd2);
+
+// Retrieve the ICd2DetailsDBusStruct data from the D-Bus argument
+const QDBusArgument &operator>>(const QDBusArgument &argument, QtMobility::ICd2DetailsDBusStruct &icd2);
+
+Q_DECLARE_METATYPE(QtMobility::ICd2DetailsDBusStruct);
+Q_DECLARE_METATYPE(QtMobility::ICd2DetailsList);
+
 #endif //QNETWORKSESSIONPRIVATE_H
 
--- a/qtmobility/src/bearer/qnetworksession_s60_p.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/src/bearer/qnetworksession_s60_p.cpp	Tue May 11 16:58:44 2010 +0300
@@ -57,7 +57,10 @@
       iALREnabled(0), iConnectInBackground(false)
 {
     CActiveScheduler::Add(this);
-    
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+    iMobility = NULL;
+#endif
     TRAP_IGNORE(iConnectionMonitor.ConnectL());
 }
 
@@ -507,22 +510,26 @@
 void QNetworkSessionPrivate::migrate()
 {
 #ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    // Close global 'Open C' RConnection
-    setdefaultif(0);
-    
-    // Start migrating to new IAP
-    iMobility->MigrateToPreferredCarrier();
+    if (iMobility) {
+        // Close global 'Open C' RConnection
+        setdefaultif(0);
+        // Start migrating to new IAP
+        iMobility->MigrateToPreferredCarrier();
+    }
 #endif
 }
 
 void QNetworkSessionPrivate::ignore()
 {
 #ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    iMobility->IgnorePreferredCarrier();
-    if (!iALRUpgradingConnection) {
-        newState(QNetworkSession::Disconnected);
-    } else {
-        newState(QNetworkSession::Connected,iOldRoamingIap);
+    if (iMobility) {
+        iMobility->IgnorePreferredCarrier();
+
+        if (!iALRUpgradingConnection) {
+            newState(QNetworkSession::Disconnected);
+        } else {
+            newState(QNetworkSession::Connected,iOldRoamingIap);
+        }
     }
 #endif
 }
@@ -530,39 +537,43 @@
 void QNetworkSessionPrivate::accept()
 {
 #ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    iMobility->NewCarrierAccepted();
-    
-    QNetworkConfiguration newActiveConfig = activeConfiguration(iNewRoamingIap);
+    if (iMobility) {
+        iMobility->NewCarrierAccepted();
+
+        QNetworkConfiguration newActiveConfig = activeConfiguration(iNewRoamingIap);
 
-    // Use name of the new IAP to open global 'Open C' RConnection
-    QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
-    ifreq ifr;
-    memset(&ifr, 0, sizeof(struct ifreq));
-    strcpy(ifr.ifr_name, nameAsByteArray.constData());
-    setdefaultif(&ifr);
-    
-    newState(QNetworkSession::Connected, iNewRoamingIap);
+        // Use name of the new IAP to open global 'Open C' RConnection
+        QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
+        ifreq ifr;
+        memset(&ifr, 0, sizeof(struct ifreq));
+        strcpy(ifr.ifr_name, nameAsByteArray.constData());
+        setdefaultif(&ifr);
+
+        newState(QNetworkSession::Connected, iNewRoamingIap);
+    }
 #endif
 }
 
 void QNetworkSessionPrivate::reject()
 {
 #ifdef SNAP_FUNCTIONALITY_AVAILABLE
-    iMobility->NewCarrierRejected();
+    if (iMobility) {
+        iMobility->NewCarrierRejected();
 
-    if (!iALRUpgradingConnection) {
-        newState(QNetworkSession::Disconnected);
-    } else {
-        QNetworkConfiguration newActiveConfig = activeConfiguration(iOldRoamingIap);
+        if (!iALRUpgradingConnection) {
+            newState(QNetworkSession::Disconnected);
+        } else {
+            QNetworkConfiguration newActiveConfig = activeConfiguration(iOldRoamingIap);
 
-        // Use name of the old IAP to open global 'Open C' RConnection
-        QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
-        ifreq ifr;
-        memset(&ifr, 0, sizeof(struct ifreq));
-        strcpy(ifr.ifr_name, nameAsByteArray.constData());
-        setdefaultif(&ifr);
+            // Use name of the old IAP to open global 'Open C' RConnection
+            QByteArray nameAsByteArray = newActiveConfig.name().toUtf8();
+            ifreq ifr;
+            memset(&ifr, 0, sizeof(struct ifreq));
+            strcpy(ifr.ifr_name, nameAsByteArray.constData());
+            setdefaultif(&ifr);
 
-        newState(QNetworkSession::Connected, iOldRoamingIap);
+            newState(QNetworkSession::Connected, iOldRoamingIap);
+        }
     }
 #endif
 }
--- a/qtmobility/src/s60installs/s60installs.pro	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/src/s60installs/s60installs.pro	Tue May 11 16:58:44 2010 +0300
@@ -31,17 +31,17 @@
     isEmpty(epoc31) {
         EPOCROOT31 = $${EPOCROOT}
     } else {
-    EPOCROOT31 = $$(EPOCROOT31)
+        EPOCROOT31 = $$(EPOCROOT31)
     }
     isEmpty(epoc32) {
         EPOCROOT32 = $${EPOCROOT}
     }else {
-    EPOCROOT32 = $$(EPOCROOT32)
+        EPOCROOT32 = $$(EPOCROOT32)
     }
     isEmpty(epoc50) {
         EPOCROOT50 = $${EPOCROOT}
     } else {
-    EPOCROOT50 = $$(EPOCROOT50)
+        EPOCROOT50 = $$(EPOCROOT50)
     }
     
     contains(mobility_modules, bearer) {
--- a/qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp	Tue May 11 16:58:44 2010 +0300
@@ -72,6 +72,8 @@
 
 private slots:
 
+    void robustnessBombing();
+
     void outOfProcessSession();
     void invalidSession();
 
@@ -229,6 +231,23 @@
 #endif
 }
 
+// Robustness test for calling interfaces in nonsense order / with nonsense parameters
+void tst_QNetworkSession::robustnessBombing() 
+{
+    QNetworkConfigurationManager mgr;
+    QNetworkSession testSession(mgr.defaultConfiguration());
+    // Should not reset even session is not opened
+    testSession.migrate();
+    testSession.accept();
+    testSession.ignore();
+    testSession.reject();
+    quint64 temp;
+    temp = testSession.bytesWritten();
+    temp = testSession.bytesReceived();
+    temp = testSession.activeTime();
+}
+
+
 void tst_QNetworkSession::invalidSession()
 {
     // 1. Verify that session created with invalid configuration remains in invalid state
--- a/qtmobility/tests/bearerex/bearerex.h	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/tests/bearerex/bearerex.h	Tue May 11 16:58:44 2010 +0300
@@ -43,10 +43,15 @@
 
 #include <QtGui>
 
+#include "ui_detailedinfodialog.h"
+
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#include "ui_bearerex_maemo.h"
+#include "ui_sessiondialog_maemo.h"
+#else
 #include "ui_bearerex.h"
-#include "ui_detailedinfodialog.h"
 #include "ui_sessiondialog.h"
-
+#endif
 #include "qnetworkconfigmanager.h"
 #include "qnetworksession.h"
 #include "xqlistwidget.h"
--- a/qtmobility/tests/bearerex/bearerex.pro	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/tests/bearerex/bearerex.pro	Tue May 11 16:58:44 2010 +0300
@@ -5,9 +5,15 @@
       gui \
       network
 
-FORMS += sessiondialog.ui \
-         bearerex.ui \
-         detailedinfodialog.ui
+FORMS += detailedinfodialog.ui
+maemo5|maemo6 {
+    FORMS += sessiondialog_maemo.ui \
+        bearerex_maemo.ui
+} else {
+    FORMS += sessiondialog.ui \
+        bearerex.ui
+}
+
 include(../../common.pri)
 #not really a test case but deployment happens same way
 CONFIG += testcase
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobility/tests/bearerex/bearerex_maemo.ui	Tue May 11 16:58:44 2010 +0300
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BearerExMainWindow</class>
+ <widget class="QMainWindow" name="BearerExMainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>360</width>
+    <height>640</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Bearer Example</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QTabWidget" name="mainTabWidget">
+      <widget class="QWidget" name="tab">
+       <attribute name="title">
+        <string>Main</string>
+       </attribute>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <layout class="QVBoxLayout" name="verticalLayout_2">
+          <item>
+           <widget class="QLabel" name="label">
+            <property name="text">
+             <string>Network Configurations</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QListWidget" name="listWidget"/>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QGridLayout" name="gridLayout">
+          <item row="0" column="0">
+           <widget class="QPushButton" name="updateConfigurationsButton">
+            <property name="text">
+             <string>Update Configs</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QPushButton" name="updateListButton">
+            <property name="text">
+             <string>Update List</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <widget class="QPushButton" name="createSessionButton">
+            <property name="text">
+             <string>Create Session</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="0">
+           <widget class="QPushButton" name="showDetailsButton">
+            <property name="text">
+             <string>Show Details</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tab_2">
+       <attribute name="title">
+        <string>Events</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="QListWidget" name="eventListWidget"/>
+        </item>
+        <item>
+         <widget class="QPushButton" name="clearEventListButton">
+          <property name="text">
+           <string>Clear</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtmobility/tests/bearerex/sessiondialog_maemo.ui	Tue May 11 16:58:44 2010 +0300
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SessionTab</class>
+ <widget class="QWidget" name="SessionTab">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>423</width>
+    <height>214</height>
+   </rect>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout">
+   <item>
+    <layout class="QFormLayout" name="formLayout">
+     <property name="fieldGrowthPolicy">
+      <enum>QFormLayout::ExpandingFieldsGrow</enum>
+     </property>
+     <item row="0" column="0">
+      <widget class="QLabel" name="snapLabel">
+       <property name="text">
+        <string>SNAP</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QLineEdit" name="snapLineEdit">
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QLabel" name="iapLabel">
+       <property name="text">
+        <string>IAP</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QLineEdit" name="iapLineEdit">
+       <property name="enabled">
+        <bool>true</bool>
+       </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0">
+      <widget class="QLabel" name="bearerLabel">
+       <property name="text">
+        <string>Bearer</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1">
+      <widget class="QLineEdit" name="bearerLineEdit">
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0">
+      <widget class="QLabel" name="sentRecDataLabel">
+       <property name="text">
+        <string>Sent/Rec.</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="1">
+      <widget class="QLineEdit" name="sentRecDataLineEdit">
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="0">
+      <widget class="QLabel" name="stateLabel">
+       <property name="text">
+        <string>State</string>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="1">
+      <widget class="QLineEdit" name="stateLineEdit">
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="0">
+      <widget class="QPushButton" name="openSessionButton">
+       <property name="text">
+        <string>Open Session</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1">
+      <widget class="QPushButton" name="closeSessionButton">
+       <property name="text">
+        <string>Close Session</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <widget class="QPushButton" name="stopConnectionButton">
+       <property name="text">
+        <string>Stop Conn.</string>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1">
+      <widget class="QPushButton" name="sendRequestButton">
+       <property name="text">
+        <string>Send Test Req.</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0">
+      <widget class="QPushButton" name="createQHttpButton">
+       <property name="text">
+        <string>Create QHttp</string>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1">
+      <widget class="QPushButton" name="deleteSessionButton">
+       <property name="text">
+        <string>Delete Session</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0">
+      <widget class="QPushButton" name="alrButton">
+       <property name="text">
+        <string>Enable ALR</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>