summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newtabpage.cpp')
-rw-r--r--src/newtabpage.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index 00c7f81d..a073117c 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -182,13 +182,16 @@ void NewTabPage::generate(const KUrl &url)
}
// webFrame can be null. See bug:282092
- if (!m_root.webFrame())
+ QWebFrame *parentFrame = qobject_cast<QWebFrame *>(parent());
+ if (!parentFrame)
+ {
+ kDebug() << "NULL PARENT FRAME: PAGE NOT LOADED";
return;
- WebPage *page = qobject_cast <WebPage *>(m_root.webFrame()->page());
- page->mainFrame()->setHtml(m_html);
- page->setIsOnRekonqPage(true);
+ }
+
+ parentFrame->setHtml(m_html);
- m_root = page->mainFrame()->documentElement().findFirst(QL1S("#content"));
+ m_root = parentFrame->documentElement().findFirst(QL1S("#content"));
browsingMenu(url);