diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-03-16 01:45:50 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-03-16 01:45:50 +0100 |
commit | c4a3ac8eb53f109a3da1f53f279fc86edcb92597 (patch) | |
tree | 8ef689aac509629d33fce88c6b2ad31e8837285f /src/rekonqpage/newtabpage.cpp | |
parent | Merge commit 'refs/merge-requests/104' of git://gitorious.org/rekonq/mainline... (diff) | |
download | rekonq-c4a3ac8eb53f109a3da1f53f279fc86edcb92597.tar.xz |
First bunch of fixes for the NewTabPage + WebSnap chain.
It seems clear (to me) that they leaks memory, so they urgently need
fixes. And a complete redesign.
This is just a first (the easiest) part of it:
- Removed some unuseful methods,
- Added some documentation for the WebSnap class
- Cleaned code, in general
Diffstat (limited to 'src/rekonqpage/newtabpage.cpp')
-rw-r--r-- | src/rekonqpage/newtabpage.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/rekonqpage/newtabpage.cpp b/src/rekonqpage/newtabpage.cpp index 845dcf51..6fd5160d 100644 --- a/src/rekonqpage/newtabpage.cpp +++ b/src/rekonqpage/newtabpage.cpp @@ -56,7 +56,6 @@ NewTabPage::NewTabPage(QWebFrame *frame) : m_root(frame->documentElement()) - , m_url(KUrl()) { QString htmlFilePath = KStandardDirs::locate("data", "rekonq/htmls/home.html"); QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics"); @@ -98,7 +97,7 @@ void NewTabPage::generate(KUrl url) } QWebPage *page = m_root.webFrame()->page(); - page->mainFrame()->setHtml(m_html,m_url); + page->mainFrame()->setHtml(m_html); m_root = page->mainFrame()->documentElement().findFirst("#content"); @@ -109,7 +108,6 @@ void NewTabPage::generate(KUrl url) { favoritesPage(); title = i18n("Favorites"); - url = KUrl("about:favorites"); } else if(url == KUrl("about:closedTabs")) { @@ -127,7 +125,6 @@ void NewTabPage::generate(KUrl url) title = i18n("Bookmarks"); } - m_url = url; m_root.document().findFirst("title").setPlainText(title); } |