summaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-29 06:35:30 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-08-02 00:08:26 (GMT)
commit613bc8eb31d8a80b43aa045ab2040b7cb7e0eadf (patch)
tree78abfb5b571e6d1584f342a42806aad7c7b83d73 /examples/network
parente93d11c733bb44208089a7488c6e7a176468d407 (diff)
downloadQt-613bc8eb31d8a80b43aa045ab2040b7cb7e0eadf.zip
Qt-613bc8eb31d8a80b43aa045ab2040b7cb7e0eadf.tar.gz
Qt-613bc8eb31d8a80b43aa045ab2040b7cb7e0eadf.tar.bz2
Rename QNetworkConfiguration::bearerName() function.
bearerName() -> bearerTypeName(). bearerName() is deprecated and converted into an inline function which calls bearerTypeName(). This is required to keep existing code source compatible between Qt Mobility 1.0.x and Qt 4.7. Task-number: QTBUG-12378 Reviewed-by: Alex
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/bearercloud/cloud.cpp22
-rw-r--r--examples/network/bearermonitor/sessionwidget.cpp4
2 files changed, 13 insertions, 13 deletions
diff --git a/examples/network/bearercloud/cloud.cpp b/examples/network/bearercloud/cloud.cpp
index 980efbf..f45ae0d 100644
--- a/examples/network/bearercloud/cloud.cpp
+++ b/examples/network/bearercloud/cloud.cpp
@@ -261,9 +261,9 @@ void Cloud::stateChanged(QNetworkSession::State state)
tooltip += tr("<br>Id: %1").arg(configuration.identifier());
#endif
- const QString bearerName = configuration.bearerName();
- if (!bearerName.isEmpty())
- tooltip += tr("<br>Bearer: %1").arg(bearerName);
+ const QString bearerTypeName = configuration.bearerTypeName();
+ if (!bearerTypeName.isEmpty())
+ tooltip += tr("<br>Bearer: %1").arg(bearerTypeName);
QString s = tr("<br>State: %1 (%2)");
switch (state) {
@@ -313,17 +313,17 @@ void Cloud::stateChanged(QNetworkSession::State state)
//! [1]
void Cloud::newConfigurationActivated()
{
- const QString bearerName = configuration.bearerName();
- if (!svgCache.contains(bearerName)) {
- if (bearerName == QLatin1String("WLAN"))
- svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":wlan.svg")));
- else if (bearerName == QLatin1String("Ethernet"))
- svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":lan.svg")));
+ const QString bearerTypeName = configuration.bearerTypeName();
+ if (!svgCache.contains(bearerTypeName)) {
+ if (bearerTypeName == QLatin1String("WLAN"))
+ svgCache.insert(bearerTypeName, new QSvgRenderer(QLatin1String(":wlan.svg")));
+ else if (bearerTypeName == QLatin1String("Ethernet"))
+ svgCache.insert(bearerTypeName, new QSvgRenderer(QLatin1String(":lan.svg")));
else
- svgCache.insert(bearerName, new QSvgRenderer(QLatin1String(":unknown.svg")));
+ svgCache.insert(bearerTypeName, new QSvgRenderer(QLatin1String(":unknown.svg")));
}
- icon->setSharedRenderer(svgCache[bearerName]);
+ icon->setSharedRenderer(svgCache[bearerTypeName]);
if (configuration.name().isEmpty()) {
text->setPlainText(tr("HIDDEN NETWORK"));
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp
index 8b5693a..ecc2a93 100644
--- a/examples/network/bearermonitor/sessionwidget.cpp
+++ b/examples/network/bearermonitor/sessionwidget.cpp
@@ -111,11 +111,11 @@ void SessionWidget::updateSession()
killTimer(statsTimer);
if (session->configuration().type() == QNetworkConfiguration::InternetAccessPoint)
- bearer->setText(session->configuration().bearerName());
+ bearer->setText(session->configuration().bearerTypeName());
else {
QNetworkConfigurationManager mgr;
QNetworkConfiguration c = mgr.configurationFromIdentifier(session->sessionProperty("ActiveConfiguration").toString());
- bearer->setText(c.bearerName());
+ bearer->setText(c.bearerTypeName());
}
#ifndef QT_NO_NETWORKINTERFACE