forked from qt-creator/qt-creator
Analyzer: Remove intermediate "ValgrindTool" inheritance level
It's an empty shell nowadays. Change-Id: I661735eccf035b58cc405905a58bd74e787e6abc Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
@@ -95,6 +95,7 @@
|
|||||||
using namespace Analyzer;
|
using namespace Analyzer;
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace Valgrind::Callgrind;
|
using namespace Valgrind::Callgrind;
|
||||||
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace Valgrind {
|
namespace Valgrind {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -499,7 +500,7 @@ static QToolButton *createToolButton(QAction *action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CallgrindTool::CallgrindTool(QObject *parent)
|
CallgrindTool::CallgrindTool(QObject *parent)
|
||||||
: ValgrindTool(parent)
|
: IAnalyzerTool(parent)
|
||||||
{
|
{
|
||||||
d = new CallgrindToolPrivate(this);
|
d = new CallgrindToolPrivate(this);
|
||||||
setObjectName(QLatin1String("CallgrindTool"));
|
setObjectName(QLatin1String("CallgrindTool"));
|
||||||
@@ -518,9 +519,14 @@ Core::Id CallgrindTool::id() const
|
|||||||
return Core::Id("Callgrind");
|
return Core::Id("Callgrind");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::RunMode CallgrindTool::runMode() const
|
RunMode CallgrindTool::runMode() const
|
||||||
{
|
{
|
||||||
return ProjectExplorer::CallgrindRunMode;
|
return CallgrindRunMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CallgrindTool::canRun(RunConfiguration *, RunMode mode) const
|
||||||
|
{
|
||||||
|
return mode == CallgrindRunMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CallgrindTool::displayName() const
|
QString CallgrindTool::displayName() const
|
||||||
@@ -564,13 +570,13 @@ void CallgrindTool::extensionsInitialized()
|
|||||||
}
|
}
|
||||||
|
|
||||||
IAnalyzerEngine *CallgrindTool::createEngine(const AnalyzerStartParameters &sp,
|
IAnalyzerEngine *CallgrindTool::createEngine(const AnalyzerStartParameters &sp,
|
||||||
ProjectExplorer::RunConfiguration *runConfiguration)
|
RunConfiguration *runConfiguration)
|
||||||
{
|
{
|
||||||
return d->createEngine(sp, runConfiguration);
|
return d->createEngine(sp, runConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
IAnalyzerEngine *CallgrindToolPrivate::createEngine(const AnalyzerStartParameters &sp,
|
IAnalyzerEngine *CallgrindToolPrivate::createEngine(const AnalyzerStartParameters &sp,
|
||||||
ProjectExplorer::RunConfiguration *runConfiguration)
|
RunConfiguration *runConfiguration)
|
||||||
{
|
{
|
||||||
CallgrindEngine *engine = new CallgrindEngine(sp, runConfiguration);
|
CallgrindEngine *engine = new CallgrindEngine(sp, runConfiguration);
|
||||||
|
|
||||||
|
@@ -30,14 +30,14 @@
|
|||||||
#ifndef CALLGRINDTOOL_H
|
#ifndef CALLGRINDTOOL_H
|
||||||
#define CALLGRINDTOOL_H
|
#define CALLGRINDTOOL_H
|
||||||
|
|
||||||
#include "valgrindtool.h"
|
#include <analyzerbase/ianalyzertool.h>
|
||||||
|
|
||||||
namespace Valgrind {
|
namespace Valgrind {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class CallgrindToolPrivate;
|
class CallgrindToolPrivate;
|
||||||
|
|
||||||
class CallgrindTool : public ValgrindTool
|
class CallgrindTool : public Analyzer::IAnalyzerTool
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -50,6 +50,7 @@ public:
|
|||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
QString description() const;
|
QString description() const;
|
||||||
ToolMode toolMode() const;
|
ToolMode toolMode() const;
|
||||||
|
bool canRun(ProjectExplorer::RunConfiguration *, ProjectExplorer::RunMode mode) const;
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
|
|
||||||
|
@@ -179,7 +179,7 @@ static void initKindFilterAction(QAction *action, const QList<int> &kinds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MemcheckTool::MemcheckTool(QObject *parent)
|
MemcheckTool::MemcheckTool(QObject *parent)
|
||||||
: ValgrindTool(parent)
|
: IAnalyzerTool(parent)
|
||||||
{
|
{
|
||||||
m_settings = 0;
|
m_settings = 0;
|
||||||
m_errorModel = 0;
|
m_errorModel = 0;
|
||||||
@@ -286,6 +286,11 @@ RunMode MemcheckTool::runMode() const
|
|||||||
return MemcheckRunMode;
|
return MemcheckRunMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MemcheckTool::canRun(RunConfiguration *, RunMode mode) const
|
||||||
|
{
|
||||||
|
return mode == MemcheckRunMode;
|
||||||
|
}
|
||||||
|
|
||||||
QString MemcheckTool::displayName() const
|
QString MemcheckTool::displayName() const
|
||||||
{
|
{
|
||||||
return tr("Valgrind Memory Analyzer");
|
return tr("Valgrind Memory Analyzer");
|
||||||
|
@@ -31,18 +31,13 @@
|
|||||||
#ifndef MEMCHECKTOOL_H
|
#ifndef MEMCHECKTOOL_H
|
||||||
#define MEMCHECKTOOL_H
|
#define MEMCHECKTOOL_H
|
||||||
|
|
||||||
#include "valgrindtool.h"
|
#include <analyzerbase/ianalyzertool.h>
|
||||||
|
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
#include <QSharedPointer>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QItemSelection;
|
|
||||||
class QTreeView;
|
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
class QAction;
|
class QAction;
|
||||||
class QSpinBox;
|
|
||||||
class QCheckBox;
|
|
||||||
class QMenu;
|
class QMenu;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -82,7 +77,7 @@ private:
|
|||||||
bool m_filterExternalIssues;
|
bool m_filterExternalIssues;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MemcheckTool : public ValgrindTool
|
class MemcheckTool : public Analyzer::IAnalyzerTool
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -93,6 +88,7 @@ public:
|
|||||||
ProjectExplorer::RunMode runMode() const;
|
ProjectExplorer::RunMode runMode() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
QString description() const;
|
QString description() const;
|
||||||
|
bool canRun(ProjectExplorer::RunConfiguration *, ProjectExplorer::RunMode mode) const;
|
||||||
|
|
||||||
// Create the valgrind settings (for all valgrind tools)
|
// Create the valgrind settings (for all valgrind tools)
|
||||||
Analyzer::AbstractAnalyzerSubConfig *createGlobalSettings();
|
Analyzer::AbstractAnalyzerSubConfig *createGlobalSettings();
|
||||||
|
@@ -29,7 +29,6 @@ HEADERS += \
|
|||||||
memcheckengine.h \
|
memcheckengine.h \
|
||||||
memcheckerrorview.h \
|
memcheckerrorview.h \
|
||||||
suppressiondialog.h \
|
suppressiondialog.h \
|
||||||
valgrindtool.h \
|
|
||||||
valgrindruncontrolfactory.h
|
valgrindruncontrolfactory.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
@@ -53,7 +52,6 @@ SOURCES += \
|
|||||||
memcheckengine.cpp \
|
memcheckengine.cpp \
|
||||||
memcheckerrorview.cpp \
|
memcheckerrorview.cpp \
|
||||||
suppressiondialog.cpp \
|
suppressiondialog.cpp \
|
||||||
valgrindtool.cpp \
|
|
||||||
valgrindruncontrolfactory.cpp
|
valgrindruncontrolfactory.cpp
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
|
@@ -54,8 +54,6 @@ QtcPlugin {
|
|||||||
"valgrindrunner.h",
|
"valgrindrunner.h",
|
||||||
"valgrindsettings.cpp",
|
"valgrindsettings.cpp",
|
||||||
"valgrindsettings.h",
|
"valgrindsettings.h",
|
||||||
"valgrindtool.cpp",
|
|
||||||
"valgrindtool.h",
|
|
||||||
"workarounds.cpp",
|
"workarounds.cpp",
|
||||||
"workarounds.h",
|
"workarounds.h",
|
||||||
"callgrind/callgrindabstractmodel.h",
|
"callgrind/callgrindabstractmodel.h",
|
||||||
|
@@ -1,48 +0,0 @@
|
|||||||
/**************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2013 Kläralvdalens Datakonsult AB, a KDAB Group company.
|
|
||||||
** Contact: Kläralvdalens Datakonsult AB (info@kdab.com)
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and Digia. For licensing terms and
|
|
||||||
** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "valgrindtool.h"
|
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
|
||||||
|
|
||||||
namespace Valgrind {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
ValgrindTool::ValgrindTool(QObject *parent) :
|
|
||||||
Analyzer::IAnalyzerTool(parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ValgrindTool::canRun(RunConfiguration *, RunMode mode) const
|
|
||||||
{
|
|
||||||
return mode == runMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Valgrind
|
|
@@ -1,51 +0,0 @@
|
|||||||
/**************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2013 Kläralvdalens Datakonsult AB, a KDAB Group company.
|
|
||||||
** Contact: Kläralvdalens Datakonsult AB (info@kdab.com)
|
|
||||||
**
|
|
||||||
** This file is part of Qt Creator.
|
|
||||||
**
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and Digia. For licensing terms and
|
|
||||||
** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef VALGRINDTOOL_H
|
|
||||||
#define VALGRINDTOOL_H
|
|
||||||
|
|
||||||
#include <analyzerbase/ianalyzertool.h>
|
|
||||||
|
|
||||||
namespace Valgrind {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class ValgrindTool : public Analyzer::IAnalyzerTool
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit ValgrindTool(QObject *parent);
|
|
||||||
|
|
||||||
bool canRun(ProjectExplorer::RunConfiguration *runConfiguration,
|
|
||||||
ProjectExplorer::RunMode mode) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Valgrind
|
|
||||||
|
|
||||||
#endif // VALGRINDTOOL_H
|
|
Reference in New Issue
Block a user