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
|
valgrind.qrc
|
||||||
valgrindconfigwidget.cpp valgrindconfigwidget.h
|
valgrindconfigwidget.cpp valgrindconfigwidget.h
|
||||||
valgrindengine.cpp valgrindengine.h
|
valgrindengine.cpp valgrindengine.h
|
||||||
valgrindplugin.cpp valgrindplugin.h
|
valgrindplugin.cpp
|
||||||
valgrindrunner.cpp valgrindrunner.h
|
valgrindrunner.cpp valgrindrunner.h
|
||||||
valgrindsettings.cpp valgrindsettings.h
|
valgrindsettings.cpp valgrindsettings.h
|
||||||
xmlprotocol/announcethread.cpp xmlprotocol/announcethread.h
|
xmlprotocol/announcethread.cpp xmlprotocol/announcethread.h
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
#include <valgrind/callgrind/callgrindparser.h>
|
#include <valgrind/callgrind/callgrindparser.h>
|
||||||
#include <valgrind/callgrind/callgrindproxymodel.h>
|
#include <valgrind/callgrind/callgrindproxymodel.h>
|
||||||
#include <valgrind/callgrind/callgrindstackbrowser.h>
|
#include <valgrind/callgrind/callgrindstackbrowser.h>
|
||||||
#include <valgrind/valgrindplugin.h>
|
|
||||||
#include <valgrind/valgrindsettings.h>
|
#include <valgrind/valgrindsettings.h>
|
||||||
|
|
||||||
#include <debugger/debuggerconstants.h>
|
#include <debugger/debuggerconstants.h>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ QtcPlugin {
|
|||||||
"valgrind.qrc",
|
"valgrind.qrc",
|
||||||
"valgrindconfigwidget.cpp", "valgrindconfigwidget.h",
|
"valgrindconfigwidget.cpp", "valgrindconfigwidget.h",
|
||||||
"valgrindengine.cpp", "valgrindengine.h",
|
"valgrindengine.cpp", "valgrindengine.h",
|
||||||
"valgrindplugin.cpp", "valgrindplugin.h",
|
"valgrindplugin.cpp",
|
||||||
"valgrindrunner.cpp", "valgrindrunner.h",
|
"valgrindrunner.cpp", "valgrindrunner.h",
|
||||||
"valgrindsettings.cpp", "valgrindsettings.h",
|
"valgrindsettings.cpp", "valgrindsettings.h",
|
||||||
"valgrindtr.h",
|
"valgrindtr.h",
|
||||||
|
|||||||
@@ -1,35 +1,32 @@
|
|||||||
// Copyright (C) 2016 The Qt Company Ltd.
|
// Copyright (C) 2016 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "valgrindplugin.h"
|
|
||||||
|
|
||||||
#include "callgrindtool.h"
|
#include "callgrindtool.h"
|
||||||
#include "memchecktool.h"
|
#include "memchecktool.h"
|
||||||
#include "valgrindconfigwidget.h"
|
#include "valgrindconfigwidget.h"
|
||||||
#include "valgrindsettings.h"
|
#include "valgrindsettings.h"
|
||||||
#include "valgrindtr.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
|
#ifdef WITH_TESTS
|
||||||
# include "valgrindmemcheckparsertest.h"
|
# include "valgrindmemcheckparsertest.h"
|
||||||
# include "valgrindtestrunnertest.h"
|
# include "valgrindtestrunnertest.h"
|
||||||
#endif
|
#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 Core;
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace Valgrind {
|
namespace Valgrind::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class ValgrindRunConfigurationAspect : public GlobalOrProjectAspect
|
class ValgrindRunConfigurationAspect : public GlobalOrProjectAspect
|
||||||
{
|
{
|
||||||
@@ -55,26 +52,30 @@ public:
|
|||||||
ValgrindOptionsPage valgrindOptionsPage;
|
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;
|
||||||
d = new ValgrindPluginPrivate;
|
~ValgrindPlugin() final { delete d; }
|
||||||
|
|
||||||
RunConfiguration::registerAspect<ValgrindRunConfigurationAspect>();
|
void initialize() final
|
||||||
}
|
{
|
||||||
|
d = new ValgrindPluginPrivate;
|
||||||
|
|
||||||
QVector<QObject *> ValgrindPlugin::createTestObjects() const
|
RunConfiguration::registerAspect<ValgrindRunConfigurationAspect>();
|
||||||
{
|
|
||||||
QVector<QObject *> tests;
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
tests << new Test::ValgrindMemcheckParserTest << new Test::ValgrindTestRunnerTest;
|
addTest<Test::ValgrindMemcheckParserTest>();
|
||||||
|
addTest<Test::ValgrindTestRunnerTest>();
|
||||||
#endif
|
#endif
|
||||||
return tests;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internal
|
private:
|
||||||
} // namespace Valgrind
|
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