diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-09-02 17:15:20 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-09-02 17:15:20 +0200 |
commit | 6af2fc9af52731ac3630c9019c0bfebd877666b9 (patch) | |
tree | 4bac4a651bd6bbd612f1e2174a193d8920d75913 /src/history | |
parent | Merge commit 'refs/merge-requests/196' of git://gitorious.org/rekonq/mainline... (diff) | |
download | rekonq-6af2fc9af52731ac3630c9019c0bfebd877666b9.tar.xz |
Code Review.
General clean up
let member variables have better names, starting with _ and the needed get functions
signals/slots --> Q_SIGNALS/Q_SLOTS
moc headers
Diffstat (limited to 'src/history')
-rw-r--r-- | src/history/historypanel.cpp | 21 | ||||
-rw-r--r-- | src/history/historypanel.h | 3 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/history/historypanel.cpp b/src/history/historypanel.cpp index 84f2296e..28f7f4ee 100644 --- a/src/history/historypanel.cpp +++ b/src/history/historypanel.cpp @@ -27,6 +27,7 @@ // Self Includes #include "historypanel.h" +#include "historypanel.moc" // Auto Includes #include "rekonq.h" @@ -67,22 +68,22 @@ void HistoryPanel::contextMenuItem(const QPoint &pos) KAction* action; action = new KAction(KIcon("tab-new"), i18n("Open"), this); - connect(action, SIGNAL(triggered()), m_treeView, SLOT(openInCurrentTab())); + connect(action, SIGNAL(triggered()), panelTreeView(), SLOT(openInCurrentTab())); menu.addAction(action); action = new KAction(KIcon("tab-new"), i18n("Open in New Tab"), this); - connect(action, SIGNAL(triggered()), m_treeView, SLOT(openInNewTab())); + connect(action, SIGNAL(triggered()), panelTreeView(), SLOT(openInNewTab())); menu.addAction(action); action = new KAction(KIcon("window-new"), i18n("Open in New Window"), this); - connect(action, SIGNAL(triggered()), m_treeView, SLOT(openInNewWindow())); + connect(action, SIGNAL(triggered()), panelTreeView(), SLOT(openInNewWindow())); menu.addAction(action); action = new KAction(KIcon("edit-copy"), i18n("Copy Link Address"), this); - connect(action, SIGNAL(triggered()), m_treeView, SLOT(copyToClipboard())); + connect(action, SIGNAL(triggered()), panelTreeView(), SLOT(copyToClipboard())); menu.addAction(action); - menu.exec(m_treeView->mapToGlobal(pos)); + menu.exec(panelTreeView()->mapToGlobal(pos)); } @@ -95,7 +96,7 @@ void HistoryPanel::contextMenuGroup(const QPoint &pos) connect(action, SIGNAL(triggered()), this, SLOT(openAll())); menu.addAction(action); - menu.exec(m_treeView->mapToGlobal(pos)); + menu.exec(panelTreeView()->mapToGlobal(pos)); } @@ -106,7 +107,7 @@ void HistoryPanel::contextMenuEmpty(const QPoint& /*pos*/) void HistoryPanel::openAll() { - QModelIndex index = m_treeView->currentIndex(); + QModelIndex index = panelTreeView()->currentIndex(); if (!index.isValid()) return; @@ -136,10 +137,10 @@ void HistoryPanel::setup() UrlPanel::setup(); kDebug() << "History panel..."; - m_treeView->header()->hideSection(1); + panelTreeView()->header()->hideSection(1); - const UrlFilterProxyModel *proxy = static_cast<const UrlFilterProxyModel*>(m_treeView->model()); - m_treeView->expand(proxy->index(0, 0)); + const UrlFilterProxyModel *proxy = static_cast<const UrlFilterProxyModel*>(panelTreeView()->model()); + panelTreeView()->expand(proxy->index(0, 0)); } diff --git a/src/history/historypanel.h b/src/history/historypanel.h index 9c9d4a4e..0a5ae216 100644 --- a/src/history/historypanel.h +++ b/src/history/historypanel.h @@ -44,7 +44,7 @@ public: explicit HistoryPanel(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0); virtual ~HistoryPanel(); -private slots: +private Q_SLOTS: virtual void contextMenuItem(const QPoint &pos); virtual void contextMenuGroup(const QPoint &pos); virtual void contextMenuEmpty(const QPoint &pos); @@ -53,7 +53,6 @@ private slots: private: virtual void setup(); - virtual QAbstractItemModel* getModel(); }; |