diff options
Diffstat (limited to 'demos/embedded')
-rw-r--r-- | demos/embedded/anomaly/src/BrowserView.cpp | 16 | ||||
-rw-r--r-- | demos/embedded/anomaly/src/BrowserView.h | 3 | ||||
-rw-r--r-- | demos/embedded/anomaly/src/Main.cpp | 5 | ||||
-rw-r--r-- | demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp | 2 |
4 files changed, 19 insertions, 7 deletions
diff --git a/demos/embedded/anomaly/src/BrowserView.cpp b/demos/embedded/anomaly/src/BrowserView.cpp index e81d834..4ef1920 100644 --- a/demos/embedded/anomaly/src/BrowserView.cpp +++ b/demos/embedded/anomaly/src/BrowserView.cpp @@ -32,6 +32,10 @@ #include "flickcharm.h" #include "ZoomStrip.h" +#if defined (Q_OS_SYMBIAN) +#include "sym_iap_util.h" +#endif + BrowserView::BrowserView(QWidget *parent) : QWidget(parent) , m_titleBar(0) @@ -73,9 +77,12 @@ void BrowserView::initialize() connect(m_webView, SIGNAL(loadFinished(bool)), SLOT(finish(bool))); connect(m_webView, SIGNAL(urlChanged(QUrl)), SLOT(updateTitleBar())); - m_webView->load(QUrl("http://news.bbc.co.uk/text_only.stm")); + m_webView->setHtml("Will try to load page soon!"); m_webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_webView->setFocus(); +#ifdef Q_OS_SYMBIAN + QTimer::singleShot(0, this, SLOT(setDefaultIap())); +#endif } void BrowserView::start() @@ -146,6 +153,13 @@ void BrowserView::resizeEvent(QResizeEvent *event) int zh = m_zoomStrip->sizeHint().height(); m_zoomStrip->move(width() - zw, (height() - zh) / 2); } +#ifdef Q_OS_SYMBIAN +void BrowserView::setDefaultIap() +{ + qt_SetDefaultIap(); + m_webView->load(QUrl("http://news.bbc.co.uk/text_only.stm")); +} +#endif void BrowserView::navigate(const QUrl &url) { diff --git a/demos/embedded/anomaly/src/BrowserView.h b/demos/embedded/anomaly/src/BrowserView.h index 36d3291..0dba14e 100644 --- a/demos/embedded/anomaly/src/BrowserView.h +++ b/demos/embedded/anomaly/src/BrowserView.h @@ -44,6 +44,9 @@ public slots: void navigate(const QUrl &url); void zoomIn(); void zoomOut(); +#ifdef Q_OS_SYMBIAN + void setDefaultIap(); +#endif private slots: void initialize(); diff --git a/demos/embedded/anomaly/src/Main.cpp b/demos/embedded/anomaly/src/Main.cpp index 2be6143..d861857 100644 --- a/demos/embedded/anomaly/src/Main.cpp +++ b/demos/embedded/anomaly/src/Main.cpp @@ -27,10 +27,6 @@ #include "BrowserWindow.h" -#if defined (Q_OS_SYMBIAN) -#include "sym_iap_util.h" -#endif - int main(int argc, char *argv[]) { #if !defined(Q_WS_S60) @@ -47,7 +43,6 @@ int main(int argc, char *argv[]) window.showFullScreen(); QWebSettings::globalSettings()->setObjectCacheCapacities(128*1024, 1024*1024, 1024*1024); QWebSettings::globalSettings()->setMaximumPagesInCache(3); - qt_SetDefaultIap(); #else window.resize(360, 640); window.show(); diff --git a/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp index 2393c4e..0359b13 100644 --- a/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp +++ b/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.cpp @@ -143,7 +143,7 @@ void EmbeddedSvgViewer::updateImageScale() } -void EmbeddedSvgViewer::resizeEvent ( QResizeEvent * event ) +void EmbeddedSvgViewer::resizeEvent ( QResizeEvent * /* event */ ) { qreal origZoom = m_zoomLevel; |