forked from qt-creator/qt-creator
Analyzer: create a run control factory for all tools.
Having one factory per tool (or plugin) created some bugs: * analyzer project settings being created twice * per-project analyzer settings widget duplicated Also, most of the code from the run control factory were copied. Now, the Analyzer only creates one run control factory shared among all tools, and the IAnalyzerTool has two new virtual method: canRun and createStartParameters. It simplify the code a bit, and creating a new analyzer tool is easier (only two classes to subclass: IAnalyzerTool and IAnalyzerEngine). Change-Id: I4e180846a26b74b2b77cb99bc97534d680a80a4d Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
committed by
hjk
parent
26ae954fae
commit
4a8432112a
58
src/plugins/valgrind/valgrindtool.h
Normal file
58
src/plugins/valgrind/valgrindtool.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (C) 2011 Kläralvdalens Datakonsult AB, a KDAB Group company.
|
||||
**
|
||||
** Contact: Kläralvdalens Datakonsult AB (info@kdab.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at info@qt.nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#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,
|
||||
const QString &mode) const;
|
||||
|
||||
Analyzer::AnalyzerStartParameters createStartParameters(
|
||||
ProjectExplorer::RunConfiguration *runConfiguration,
|
||||
const QString &mode) const;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Valgrind
|
||||
|
||||
#endif // VALGRINDTOOL_H
|
||||
Reference in New Issue
Block a user