summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/accessible/widgets/qaccessiblemenu.cpp2
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp3
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp52
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h1
-rw-r--r--src/plugins/sqldrivers/symsql/main.cpp81
-rw-r--r--src/plugins/sqldrivers/symsql/symsql.pro13
6 files changed, 150 insertions, 2 deletions
diff --git a/src/plugins/accessible/widgets/qaccessiblemenu.cpp b/src/plugins/accessible/widgets/qaccessiblemenu.cpp
index 4ae1d15..e9e5ca8 100644
--- a/src/plugins/accessible/widgets/qaccessiblemenu.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblemenu.cpp
@@ -93,7 +93,7 @@ int QAccessibleMenu::childAt(int x, int y) const
QString QAccessibleMenu::text(Text t, int child) const
{
QString tx = QAccessibleWidgetEx::text(t, child);
- if (tx.size())
+ if (!child && tx.size())
return tx;
switch (t) {
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
+}
+