summaryrefslogtreecommitdiffstats
path: root/examples/embedded/lightmaps
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-26 01:00:25 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-02-26 18:39:21 +0100
commit75c0ffaf6d2b92cdf26092e01acdd5af4afeac97 (patch)
treebb9e85c21248790ec99b3665928872e39b14db64 /examples/embedded/lightmaps
parent4753d69d8934258de7fb64550e50a5cbb9b5603f (diff)
parent462c2745a5168a5b57381d05779b5d16aebe018e (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
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