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/urlpanel.cpp | |
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/urlpanel.cpp')
-rw-r--r-- | src/urlpanel.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/urlpanel.cpp b/src/urlpanel.cpp index 86246fd9..cf6aec7b 100644 --- a/src/urlpanel.cpp +++ b/src/urlpanel.cpp @@ -27,6 +27,7 @@ // Self Includes #include "urlpanel.h" +#include "urlpanel.moc" // Auto Includes #include "rekonq.h" @@ -47,7 +48,7 @@ UrlPanel::UrlPanel(const QString &title, QWidget *parent, Qt::WindowFlags flags) : QDockWidget(title, parent, flags) - , m_treeView(new PanelTreeView(this)) + , _treeView(new PanelTreeView(this)) , _loaded(false) { setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); @@ -88,14 +89,14 @@ void UrlPanel::setup() searchLabel->setBuddy(search); // setup tree view - m_treeView->setUniformRowHeights(true); - m_treeView->header()->hide(); + _treeView->setUniformRowHeights(true); + _treeView->header()->hide(); // put everything together QVBoxLayout *vBoxLayout = new QVBoxLayout; vBoxLayout->setContentsMargins(0, 0, 0, 0); vBoxLayout->addLayout(searchLayout); - vBoxLayout->addWidget(m_treeView); + vBoxLayout->addWidget(_treeView); // add it to the UI ui->setLayout(vBoxLayout); @@ -104,11 +105,11 @@ void UrlPanel::setup() QAbstractItemModel *model = getModel(); UrlFilterProxyModel *proxy = new UrlFilterProxyModel(this); proxy->setSourceModel(model); - m_treeView->setModel(proxy); + _treeView->setModel(proxy); connect(search, SIGNAL(textChanged(QString)), proxy, SLOT(setFilterFixedString(QString))); - connect(m_treeView, SIGNAL(contextMenuItemRequested(const QPoint &)), this, SLOT(contextMenuItem(const QPoint &))); - connect(m_treeView, SIGNAL(contextMenuGroupRequested(const QPoint &)), this, SLOT(contextMenuGroup(const QPoint &))); - connect(m_treeView, SIGNAL(contextMenuEmptyRequested(const QPoint &)), this, SLOT(contextMenuEmpty(const QPoint &))); + connect(_treeView, SIGNAL(contextMenuItemRequested(const QPoint &)), this, SLOT(contextMenuItem(const QPoint &))); + connect(_treeView, SIGNAL(contextMenuGroupRequested(const QPoint &)), this, SLOT(contextMenuGroup(const QPoint &))); + connect(_treeView, SIGNAL(contextMenuEmptyRequested(const QPoint &)), this, SLOT(contextMenuEmpty(const QPoint &))); } |