forked from qt-creator/qt-creator
Valgrind: De-cruft plugin setup
Change-Id: I4a41ae56f9368c65c1584752ba41e035f9184a1e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -28,7 +28,7 @@ add_qtc_plugin(Valgrind
|
||||
valgrind.qrc
|
||||
valgrindconfigwidget.cpp valgrindconfigwidget.h
|
||||
valgrindengine.cpp valgrindengine.h
|
||||
valgrindplugin.cpp valgrindplugin.h
|
||||
valgrindplugin.cpp
|
||||
valgrindrunner.cpp valgrindrunner.h
|
||||
valgrindsettings.cpp valgrindsettings.h
|
||||
xmlprotocol/announcethread.cpp xmlprotocol/announcethread.h
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <valgrind/callgrind/callgrindparser.h>
|
||||
#include <valgrind/callgrind/callgrindproxymodel.h>
|
||||
#include <valgrind/callgrind/callgrindstackbrowser.h>
|
||||
#include <valgrind/valgrindplugin.h>
|
||||
#include <valgrind/valgrindsettings.h>
|
||||
|
||||
#include <debugger/debuggerconstants.h>
|
||||
|
||||
@@ -32,7 +32,7 @@ QtcPlugin {
|
||||
"valgrind.qrc",
|
||||
"valgrindconfigwidget.cpp", "valgrindconfigwidget.h",
|
||||
"valgrindengine.cpp", "valgrindengine.h",
|
||||
"valgrindplugin.cpp", "valgrindplugin.h",
|
||||
"valgrindplugin.cpp",
|
||||
"valgrindrunner.cpp", "valgrindrunner.h",
|
||||
"valgrindsettings.cpp", "valgrindsettings.h",
|
||||
"valgrindtr.h",
|
||||
|
||||
@@ -1,35 +1,32 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "valgrindplugin.h"
|
||||
|
||||
#include "callgrindtool.h"
|
||||
#include "memchecktool.h"
|
||||
#include "valgrindconfigwidget.h"
|
||||
#include "valgrindsettings.h"
|
||||
#include "valgrindtr.h"
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <debugger/analyzer/analyzerrunconfigwidget.h>
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
# include "valgrindmemcheckparsertest.h"
|
||||
# include "valgrindtestrunnertest.h"
|
||||
#endif
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <debugger/analyzer/analyzerrunconfigwidget.h>
|
||||
#include <debugger/analyzer/analyzericons.h>
|
||||
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QPointer>
|
||||
|
||||
using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Valgrind {
|
||||
namespace Internal {
|
||||
namespace Valgrind::Internal {
|
||||
|
||||
class ValgrindRunConfigurationAspect : public GlobalOrProjectAspect
|
||||
{
|
||||
@@ -55,26 +52,30 @@ public:
|
||||
ValgrindOptionsPage valgrindOptionsPage;
|
||||
};
|
||||
|
||||
ValgrindPlugin::~ValgrindPlugin()
|
||||
class ValgrindPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Valgrind.json")
|
||||
|
||||
void ValgrindPlugin::initialize()
|
||||
{
|
||||
public:
|
||||
ValgrindPlugin() = default;
|
||||
~ValgrindPlugin() final { delete d; }
|
||||
|
||||
void initialize() final
|
||||
{
|
||||
d = new ValgrindPluginPrivate;
|
||||
|
||||
RunConfiguration::registerAspect<ValgrindRunConfigurationAspect>();
|
||||
}
|
||||
|
||||
QVector<QObject *> ValgrindPlugin::createTestObjects() const
|
||||
{
|
||||
QVector<QObject *> tests;
|
||||
#ifdef WITH_TESTS
|
||||
tests << new Test::ValgrindMemcheckParserTest << new Test::ValgrindTestRunnerTest;
|
||||
addTest<Test::ValgrindMemcheckParserTest>();
|
||||
addTest<Test::ValgrindTestRunnerTest>();
|
||||
#endif
|
||||
return tests;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Valgrind
|
||||
private:
|
||||
class ValgrindPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // Valgrind::Internal
|
||||
|
||||
#include "valgrindplugin.moc"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
namespace Valgrind::Internal {
|
||||
|
||||
class ValgrindPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Valgrind.json")
|
||||
|
||||
public:
|
||||
ValgrindPlugin() = default;
|
||||
~ValgrindPlugin() final;
|
||||
|
||||
void initialize() final;
|
||||
|
||||
private:
|
||||
QVector<QObject *> createTestObjects() const override;
|
||||
|
||||
class ValgrindPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // Valgrind::Internal
|
||||
Reference in New Issue
Block a user