From 6af2fc9af52731ac3630c9019c0bfebd877666b9 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 2 Sep 2010 17:15:20 +0200 Subject: 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 --- src/urlpanel.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/urlpanel.cpp') 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 &))); } -- cgit v1.2.1