summaryrefslogtreecommitdiff
path: root/src/newtabpage.h
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-08-11 13:45:34 +0200
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-08-11 15:23:57 +0200
commit9b4b9d048968dcc670344f5c24fa212c5428aec3 (patch)
tree3cbcaefe67dae5ef3c2d559ad69916e7a05aa673 /src/newtabpage.h
parentFix the file scheme of NewTabPage::browsingMenu() (diff)
downloadrekonq-9b4b9d048968dcc670344f5c24fa212c5428aec3.tar.xz
Refactor NewTabPage::browsingMenu() to clean the creation of item
Almost identical code was copied 5 times. It has been replaced by a private function.
Diffstat (limited to 'src/newtabpage.h')
-rw-r--r--src/newtabpage.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newtabpage.h b/src/newtabpage.h
index ad4941d3..c4e48f5c 100644
--- a/src/newtabpage.h
+++ b/src/newtabpage.h
@@ -107,7 +107,7 @@ private:
* It works for all elements defined here.
*
*/
- inline QWebElement markup(const QString &selector)
+ inline QWebElement markup(const QString &selector) const
{
return m_root.document().findFirst("#models > " + selector).clone();
}
@@ -115,6 +115,8 @@ private:
QString checkTitle(const QString &title);
private:
+ QWebElement createNavItem(const QString &title, const QString &urlString, const QString &iconPath) const;
+
QString m_html;
QWebElement m_root;
};