summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/generic
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2009-12-09 06:49:06 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-01-04 01:07:39 (GMT)
commitee8b1156400791a077280138863336ea93a774a7 (patch)
tree130b5c3b3600b92bdbe44b0d9caa0bf9229f6d7c /src/plugins/bearer/generic
parent63d59200884a68e569cce9d0ee470447b8239f6b (diff)
downloadQt-ee8b1156400791a077280138863336ea93a774a7.zip
Qt-ee8b1156400791a077280138863336ea93a774a7.tar.gz
Qt-ee8b1156400791a077280138863336ea93a774a7.tar.bz2
Keep track of which QNetworkInterface is for each QNetworkConfiguration.
Diffstat (limited to 'src/plugins/bearer/generic')
-rw-r--r--src/plugins/bearer/generic/qgenericengine.cpp6
-rw-r--r--src/plugins/bearer/generic/qgenericengine.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp
index 11dfb3e..e70d23d 100644
--- a/src/plugins/bearer/generic/qgenericengine.cpp
+++ b/src/plugins/bearer/generic/qgenericengine.cpp
@@ -136,12 +136,12 @@ QGenericEngine::~QGenericEngine()
QString QGenericEngine::getInterfaceFromId(const QString &id)
{
- return configurationInterface.value(id.toUInt());
+ return configurationInterface.value(id);
}
bool QGenericEngine::hasIdentifier(const QString &id)
{
- return configurationInterface.contains(id.toUInt());
+ return configurationInterface.contains(id);
}
QString QGenericEngine::bearerName(const QString &id)
@@ -258,6 +258,7 @@ void QGenericEngine::doRequestUpdate()
ptr->type = QNetworkConfiguration::InternetAccessPoint;
accessPointConfigurations.insert(id, ptr);
+ configurationInterface.insert(id, interface.name());
emit configurationAdded(ptr);
}
@@ -267,6 +268,7 @@ void QGenericEngine::doRequestUpdate()
QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> ptr =
accessPointConfigurations.take(previous.takeFirst());
+ configurationInterface.remove(ptr->id);
emit configurationRemoved(ptr);
}
diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h
index 62f964a..32d762d 100644
--- a/src/plugins/bearer/generic/qgenericengine.h
+++ b/src/plugins/bearer/generic/qgenericengine.h
@@ -75,7 +75,7 @@ private Q_SLOTS:
void doRequestUpdate();
private:
- QMap<uint, QString> configurationInterface;
+ QMap<QString, QString> configurationInterface;
QTimer pollTimer;
};