aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/gitgrep.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-02-07 21:59:50 +0200
committerOrgad Shaneh <orgads@gmail.com>2016-02-08 14:49:02 +0000
commit71166d06d04fcf5de72b28290fc701ca223a082f (patch)
tree8362c418f824011845cf618daf1b06f5513fda3f /src/plugins/git/gitgrep.cpp
parent974070d2c848fd5c8e1798c97662bccbe77b3307 (diff)
Git: Minor cleanup
* Remove unused includes * Remove QObject qualification * Use a raw pointer for widget instead of QPointer. It is owned by GitGrep. Change-Id: I4e2c9878289ed3491bfd7b0565a683bc01e485f3 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/git/gitgrep.cpp')
-rw-r--r--src/plugins/git/gitgrep.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp
index a1c54f7700d..bfeb27f2579 100644
--- a/src/plugins/git/gitgrep.cpp
+++ b/src/plugins/git/gitgrep.cpp
@@ -45,12 +45,11 @@
#include <QSettings>
#include <QTextStream>
-using namespace Utils;
-
namespace Git {
namespace Internal {
using namespace Core;
+using namespace Utils;
using VcsBase::VcsCommand;
namespace {
@@ -187,8 +186,8 @@ GitGrep::GitGrep()
"that are managed by source control."));
TextEditor::FindInFiles *findInFiles = TextEditor::FindInFiles::instance();
QTC_ASSERT(findInFiles, return);
- QObject::connect(findInFiles, &TextEditor::FindInFiles::pathChanged,
- m_widget.data(), [this](const QString &path) {
+ connect(findInFiles, &TextEditor::FindInFiles::pathChanged,
+ m_widget, [this](const QString &path) {
m_widget->setEnabled(validateDirectory(path));
});
findInFiles->setFindExtension(this);
@@ -196,7 +195,7 @@ GitGrep::GitGrep()
GitGrep::~GitGrep()
{
- delete m_widget.data();
+ delete m_widget;
}
QString GitGrep::title() const
@@ -206,7 +205,7 @@ QString GitGrep::title() const
QWidget *GitGrep::widget() const
{
- return m_widget.data();
+ return m_widget;
}
bool GitGrep::isEnabled() const