diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-26 18:36:02 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-26 18:36:02 (GMT) |
commit | 2f86072e5daf318a2aa9d400f045eae9563b2ae6 (patch) | |
tree | fbbab0660e99cea257d63ef65795afced1e0d02f /src/plugins | |
parent | e2e2ee6684931bb0325d4b973709a315f7477cb2 (diff) | |
parent | 24a5178d9d995afdee118ca3452bff0255ece97e (diff) | |
download | Qt-2f86072e5daf318a2aa9d400f045eae9563b2ae6.zip Qt-2f86072e5daf318a2aa9d400f045eae9563b2ae6.tar.gz Qt-2f86072e5daf318a2aa9d400f045eae9563b2ae6.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging:
Improve sbsv2 whatlog support.
Modified SymSQL documentation in sql-driver.qdoc according review comments
Added correct licence headers to symsql source files
Documentation modifications for SymbianSQL added into sql-driver.qdoc
Release Symbian SQL driver
Fixed a typo found by static checker
Added SQL driver plugin implementation for Symbian.
Symbian: Fix qmdiarea autotest regressions
Fix memory leaks in schema validation
Symbian: Added copy-paste functionality to FEP input context
symbian: Implement QNetworkConfiguration::purpose()
symbian bearer: fix tst_qnetworksession test failures
Fix the incorrect sizeHint given by QLabel on Symbian
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.cpp | 3 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/symbianengine.cpp | 52 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/symbianengine.h | 1 | ||||
-rw-r--r-- | src/plugins/sqldrivers/symsql/main.cpp | 81 | ||||
-rw-r--r-- | src/plugins/sqldrivers/symsql/symsql.pro | 13 |
5 files changed, 149 insertions, 1 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index fc65b86..a7dad2b 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -1377,6 +1377,9 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne newState(QNetworkSession::Closing,accessPointId); break; + // Connection stopped + case KConfigDaemonFinishedDeregistrationStop: //this comes if this is the last session, instead of KLinkLayerClosed + case KConfigDaemonFinishedDeregistrationPreserve: // Connection closed case KConnectionClosed: case KLinkLayerClosed: diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index fdfe94a..ee80297 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -329,7 +329,27 @@ void SymbianEngine::updateConfigurationsL() cpPriv->connectionId = 0; cpPriv->state = QNetworkConfiguration::Defined; cpPriv->type = QNetworkConfiguration::ServiceNetwork; - cpPriv->purpose = QNetworkConfiguration::UnknownPurpose; + + // determine purpose of this SNAP + TUint32 purpose = CMManager::ESnapPurposeUnknown; + TRAP_IGNORE(purpose = destination.MetadataL(CMManager::ESnapMetadataPurpose)); + switch (purpose) { + case CMManager::ESnapPurposeInternet: + cpPriv->purpose = QNetworkConfiguration::PublicPurpose; + break; + case CMManager::ESnapPurposeIntranet: + cpPriv->purpose = QNetworkConfiguration::PrivatePurpose; + break; + case CMManager::ESnapPurposeMMS: + case CMManager::ESnapPurposeOperator: + cpPriv->purpose = QNetworkConfiguration::ServiceSpecificPurpose; + break; + case CMManager::ESnapPurposeUnknown: + default: + cpPriv->purpose = QNetworkConfiguration::UnknownPurpose; + break; + } + cpPriv->roamingSupported = false; QNetworkConfigurationPrivatePointer ptr(cpPriv); @@ -482,9 +502,39 @@ void SymbianEngine::updateConfigurationsL() #ifdef SNAP_FUNCTIONALITY_AVAILABLE updateStatesToSnaps(); + updatePurposeToIaps(); #endif } +//copy purpose from SNAP to child IAPs, unless child is contained in more than one SNAP with conflicting purposes. +void SymbianEngine::updatePurposeToIaps() +{ + QMutexLocker lock(&mutex); + QHash<QString,int> purposes; + foreach (QNetworkConfigurationPrivatePointer snap, snapConfigurations.values()) { + QMutexLocker snaplock(&snap->mutex); + foreach (QNetworkConfigurationPrivatePointer iap, snap->serviceNetworkMembers.values()) { + QMutexLocker iaplock(&iap->mutex); + QString id = iap->id; + if (purposes.contains(id) && purposes.value(id) != snap->purpose) + purposes[id] = -1; //conflict detected + else + purposes[id] = snap->purpose; + } + } + + for (QHash<QString,int>::const_iterator it = purposes.constBegin(); it != purposes.constEnd(); ++it) { + if (accessPointConfigurations.contains(it.key())) { + QNetworkConfigurationPrivatePointer iap = accessPointConfigurations.value(it.key()); + QMutexLocker iaplock(&iap->mutex); + int purpose = it.value(); + if (purpose == -1) //resolve conflicts as unknown + purpose = QNetworkConfiguration::UnknownPurpose; + iap->purpose = (QNetworkConfiguration::Purpose)purpose; + } + } +} + #ifdef SNAP_FUNCTIONALITY_AVAILABLE SymbianNetworkConfigurationPrivate *SymbianEngine::configFromConnectionMethodL( RCmConnectionMethod& connectionMethod) diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h index a205c97..b75f27e 100644 --- a/src/plugins/bearer/symbian/symbianengine.h +++ b/src/plugins/bearer/symbian/symbianengine.h @@ -155,6 +155,7 @@ public Q_SLOTS: private: void updateStatesToSnaps(); + void updatePurposeToIaps(); bool changeConfigurationStateTo(QNetworkConfigurationPrivatePointer ptr, QNetworkConfiguration::StateFlags newState); bool changeConfigurationStateAtMinTo(QNetworkConfigurationPrivatePointer ptr, diff --git a/src/plugins/sqldrivers/symsql/main.cpp b/src/plugins/sqldrivers/symsql/main.cpp new file mode 100644 index 0000000..5dfa9f4 --- /dev/null +++ b/src/plugins/sqldrivers/symsql/main.cpp @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtSql module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <qsqldriverplugin.h> +#include <QStringList> +#include "../../../sql/drivers/symsql/qsql_symsql.h" + +QT_BEGIN_NAMESPACE + +class QSymSQLDriverPlugin : public QSqlDriverPlugin +{ +public: + QSymSQLDriverPlugin(); + + QSqlDriver* create(const QString &); + QStringList keys() const; +}; + +QSymSQLDriverPlugin::QSymSQLDriverPlugin() + : QSqlDriverPlugin() +{ +} + +QSqlDriver* QSymSQLDriverPlugin::create(const QString &name) +{ + if (name == QLatin1String("QSYMSQL")) { + QSymSQLDriver* driver = new QSymSQLDriver(); + return driver; + } + return 0; +} + +QStringList QSymSQLDriverPlugin::keys() const +{ + QStringList l; + l.append(QLatin1String("QSYMSQL")); + return l; +} + +Q_EXPORT_STATIC_PLUGIN(QSymSQLDriverPlugin) +Q_EXPORT_PLUGIN2(qsymsql, QSymSQLDriverPlugin) + +QT_END_NAMESPACE diff --git a/src/plugins/sqldrivers/symsql/symsql.pro b/src/plugins/sqldrivers/symsql/symsql.pro new file mode 100644 index 0000000..8b8434c --- /dev/null +++ b/src/plugins/sqldrivers/symsql/symsql.pro @@ -0,0 +1,13 @@ +TARGET = qsymsql +PLUGIN_TYPE = sqldrivers +SOURCES = main.cpp + +include(../../../sql/drivers/symsql/qsql_symsql.pri) +include(../qsqldriverbase.pri) + +symbian: { +pluginDep.sources = $${TARGET}.dll +pluginDep.path = $${QT_PLUGINS_BASE_DIR}/$${PLUGIN_TYPE} +DEPLOYMENT += pluginDep +} + |