summaryrefslogtreecommitdiffstats
path: root/examples/embedded/lightmaps
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2020-02-14 16:28:42 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2020-02-19 13:28:00 +0100
commit57a6c60fb94f6b619a4655f53c2fed8a1564131a (patch)
tree38696b6686ea8573dc86f54197545dedf7ddcf73 /examples/embedded/lightmaps
parent1576f81baa8a1c992a005397edfc5d6f9e1b44c1 (diff)
Remove usage of bearer management from lightmaps example
Because bearer management is going away Change-Id: I82f2e67a052fdcdf0dde337f9f69b414681511c4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/embedded/lightmaps')
-rw-r--r--examples/embedded/lightmaps/mapzoom.cpp43
-rw-r--r--examples/embedded/lightmaps/mapzoom.h3
2 files changed, 0 insertions, 46 deletions
diff --git a/examples/embedded/lightmaps/mapzoom.cpp b/examples/embedded/lightmaps/mapzoom.cpp
index d82b9ad473..781d4f27e3 100644
--- a/examples/embedded/lightmaps/mapzoom.cpp
+++ b/examples/embedded/lightmaps/mapzoom.cpp
@@ -81,52 +81,9 @@ MapZoom::MapZoom()
menu->addAction(nightModeAction);
menu->addAction(osmAction);
- QNetworkConfigurationManager manager;
- if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) {
- // Get saved network configuration
- QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
- settings.beginGroup(QLatin1String("QtNetwork"));
- const QString id =
- settings.value(QLatin1String("DefaultNetworkConfiguration")).toString();
- settings.endGroup();
-
- // If the saved network configuration is not currently discovered use the system
- // default
- QNetworkConfiguration config = manager.configurationFromIdentifier(id);
- if ((config.state() & QNetworkConfiguration::Discovered) !=
- QNetworkConfiguration::Discovered) {
- config = manager.defaultConfiguration();
- }
-
- networkSession = new QNetworkSession(config, this);
- connect(networkSession, SIGNAL(opened()), this, SLOT(sessionOpened()));
-
- networkSession->open();
- } else {
- networkSession = 0;
- }
-
setWindowTitle(tr("Light Maps"));
}
-void MapZoom::sessionOpened()
-{
- // Save the used configuration
- QNetworkConfiguration config = networkSession->configuration();
- QString id;
- if (config.type() == QNetworkConfiguration::UserChoice) {
- id = networkSession->sessionProperty(
- QLatin1String("UserChoiceConfiguration")).toString();
- } else {
- id = config.identifier();
- }
-
- QSettings settings(QSettings::UserScope, QLatin1String("QtProject"));
- settings.beginGroup(QLatin1String("QtNetwork"));
- settings.setValue(QLatin1String("DefaultNetworkConfiguration"), id);
- settings.endGroup();
-}
-
void MapZoom::chooseOslo()
{
map->setCenter(59.9138204, 10.7387413);
diff --git a/examples/embedded/lightmaps/mapzoom.h b/examples/embedded/lightmaps/mapzoom.h
index 30f2e63138..3844eca718 100644
--- a/examples/embedded/lightmaps/mapzoom.h
+++ b/examples/embedded/lightmaps/mapzoom.h
@@ -53,7 +53,6 @@
#include <QMainWindow>
-class QNetworkSession;
class LightMaps;
class MapZoom : public QMainWindow
@@ -64,7 +63,6 @@ public:
MapZoom();
private slots:
- void sessionOpened();
void chooseOslo();
void chooseBerlin();
void chooseJakarta();
@@ -72,7 +70,6 @@ private slots:
private:
LightMaps *map;
- QNetworkSession *networkSession;
};
#endif \ No newline at end of file