summaryrefslogtreecommitdiffstats
path: root/examples/network/bearermonitor
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/bearermonitor')
-rw-r--r--examples/network/bearermonitor/sessionwidget.cpp9
-rw-r--r--examples/network/bearermonitor/sessionwidget.h2
2 files changed, 10 insertions, 1 deletions
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()
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index cc9c067..ae5cc96 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -53,7 +53,7 @@ class SessionWidget : public QWidget, public Ui_SessionWidget
Q_OBJECT
public:
- SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
+ explicit SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
~SessionWidget();
void timerEvent(QTimerEvent *);