Changeset 846 for trunk/demos/embedded/anomaly/src/BrowserView.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/demos/embedded/anomaly/src/BrowserView.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 52 52 #include "ZoomStrip.h" 53 53 54 #if defined (Q_OS_SYMBIAN)55 #include "sym_iap_util.h"56 #endif57 58 54 BrowserView::BrowserView(QWidget *parent) 59 55 : QWidget(parent) … … 71 67 m_zoomLevels << 100; 72 68 m_zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300; 69 70 QNetworkConfigurationManager manager; 71 if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { 72 // Get saved network configuration 73 QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); 74 settings.beginGroup(QLatin1String("QtNetwork")); 75 const QString id = 76 settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); 77 settings.endGroup(); 78 79 // If the saved network configuration is not currently discovered use the system 80 // default 81 QNetworkConfiguration config = manager.configurationFromIdentifier(id); 82 if ((config.state() & QNetworkConfiguration::Discovered) != 83 QNetworkConfiguration::Discovered) { 84 config = manager.defaultConfiguration(); 85 } 86 87 m_webView->page()->networkAccessManager()->setConfiguration(config); 88 } 73 89 74 90 QTimer::singleShot(0, this, SLOT(initialize())); … … 101 117 m_webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 102 118 m_webView->setFocus(); 103 #ifdef Q_OS_SYMBIAN104 QTimer::singleShot(0, this, SLOT(setDefaultIap()));105 #endif106 119 } 107 120 … … 174 187 m_zoomStrip->move(width() - zw, (height() - zh) / 2); 175 188 } 176 #ifdef Q_OS_SYMBIAN177 void BrowserView::setDefaultIap()178 {179 qt_SetDefaultIap();180 m_webView->load(QUrl("http://news.bbc.co.uk/text_only.stm"));181 }182 #endif183 189 184 190 void BrowserView::navigate(const QUrl &url)
Note:
See TracChangeset
for help on using the changeset viewer.