diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-25 00:56:37 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-25 05:53:00 (GMT) |
commit | 3ccbfc46ef2647421608522aa38c12958e4ea3c3 (patch) | |
tree | 874721600ffa38985ee99a98b6ce5043eae122a3 /examples | |
parent | af5501d2bef7242d3949d639e2bab7e326654bb2 (diff) | |
download | Qt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.zip Qt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.tar.gz Qt-3ccbfc46ef2647421608522aa38c12958e4ea3c3.tar.bz2 |
Compile with QT_NO_NETWORKINTERFACE defined.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/network/bearercloud/bearercloud.h | 4 | ||||
-rw-r--r-- | examples/network/bearercloud/cloud.cpp | 4 | ||||
-rw-r--r-- | examples/network/bearercloud/cloud.h | 6 | ||||
-rw-r--r-- | examples/network/bearermonitor/sessionwidget.cpp | 9 |
4 files changed, 17 insertions, 6 deletions
diff --git a/examples/network/bearercloud/bearercloud.h b/examples/network/bearercloud/bearercloud.h index f09cb53..09de4c6 100644 --- a/examples/network/bearercloud/bearercloud.h +++ b/examples/network/bearercloud/bearercloud.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** 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) ** @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <qnetworkconfigmanager.h> +#include <QNetworkConfigurationManager> #include <QGraphicsScene> #include <QMap> diff --git a/examples/network/bearercloud/cloud.cpp b/examples/network/bearercloud/cloud.cpp index 81e13a6..d041034 100644 --- a/examples/network/bearercloud/cloud.cpp +++ b/examples/network/bearercloud/cloud.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** 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) ** @@ -253,10 +253,12 @@ void Cloud::stateChanged(QNetworkSession::State state) else tooltip += tr("<b>%1</b><br>").arg(configuration.name()); +#ifndef QT_NO_NETWORKINTERFACE const QNetworkInterface interface = session->interface(); if (interface.isValid()) tooltip += tr("<br>Interface: %1").arg(interface.humanReadableName()); tooltip += tr("<br>Id: %1").arg(configuration.identifier()); +#endif const QString bearerName = configuration.bearerName(); if (!bearerName.isEmpty()) diff --git a/examples/network/bearercloud/cloud.h b/examples/network/bearercloud/cloud.h index 5d4e52a..9e25fb6 100644 --- a/examples/network/bearercloud/cloud.h +++ b/examples/network/bearercloud/cloud.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** 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) ** @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include <qnetworkconfiguration.h> -#include <qnetworksession.h> +#include <QNetworkConfiguration> +#include <QNetworkSession> #include <QGraphicsItem> QT_USE_NAMESPACE diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp index 46ffb20..655c1ac 100644 --- a/examples/network/bearermonitor/sessionwidget.cpp +++ b/examples/network/bearermonitor/sessionwidget.cpp @@ -47,6 +47,13 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren { setupUi(this); +#ifdef QT_NO_NETWORKINTERFACE + interfaceName->setVisible(false); + interfaceNameLabel->setVisible(false); + interfaceGuid->setVisible(false); + interfaceGuidLabel->setVisible(false); +#endif + session = new QNetworkSession(config, this); connect(session, SIGNAL(stateChanged(QNetworkSession::State)), @@ -102,8 +109,10 @@ void SessionWidget::updateSession() bearer->setText(c.bearerName()); } +#ifndef QT_NO_NETWORKINTERFACE interfaceName->setText(session->interface().humanReadableName()); interfaceGuid->setText(session->interface().name()); +#endif } void SessionWidget::openSession() |