diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-26 07:30:11 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-26 07:30:11 (GMT) |
commit | 5d29928f2988c474a9b7e8554860851bef15b989 (patch) | |
tree | 829807fcbcec6fa23a1350bde98a44db777fbbeb /src/declarative/fx/qfxwebview.cpp | |
parent | 35ea0941dfd1913ec763c4f67492776034507e6c (diff) | |
parent | 28c8fe7f248d5624cd84342a660a14dd62a525f8 (diff) | |
download | Qt-5d29928f2988c474a9b7e8554860851bef15b989.zip Qt-5d29928f2988c474a9b7e8554860851bef15b989.tar.gz Qt-5d29928f2988c474a9b7e8554860851bef15b989.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/fx/qfxwebview.cpp')
-rw-r--r-- | src/declarative/fx/qfxwebview.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index 72f5c18..d3ce00c 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -326,6 +326,12 @@ QUrl QFxWebView::url() const void QFxWebView::setUrl(const QUrl &url) { + if (url.isEmpty()) { + // Make absolute. + setUrl(QUrl("about:blank")); + return; + } + Q_D(QFxWebView); if (url == page()->mainFrame()->url()) return; @@ -334,7 +340,7 @@ void QFxWebView::setUrl(const QUrl &url) d->idealwidth>0 ? d->idealwidth : width(), d->idealheight>0 ? d->idealheight : height())); - Q_ASSERT(url.isEmpty() || !url.isRelative()); + Q_ASSERT(!url.isRelative()); if (isComponentComplete()) page()->mainFrame()->load(url); @@ -1175,15 +1181,15 @@ private: QFxWebView *webview; }; -QFxWebView *QFxWebPage::view() +QFxWebView *QFxWebPage::viewItem() { return static_cast<QFxWebView*>(parent()); } QObject *QFxWebPage::createPlugin(const QString &, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues) { - QUrl comp = qmlContext(view())->resolvedUrl(url); - return new QWidget_Dummy_Plugin(comp,view(),paramNames,paramValues); + QUrl comp = qmlContext(viewItem())->resolvedUrl(url); + return new QWidget_Dummy_Plugin(comp,viewItem(),paramNames,paramValues); } QT_END_NAMESPACE |