MCPcopy Create free account
hub / github.com/KDE/kdevelop / TestViewPlugin

Method TestViewPlugin

plugins/testview/testviewplugin.cpp:54–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54TestViewPlugin::TestViewPlugin(QObject* parent, const KPluginMetaData& metaData, const QVariantList& args)
55 : IPlugin(QStringLiteral("kdevtestview"), parent, metaData)
56{
57 Q_UNUSED(args)
58
59 auto* runAll = new QAction( QIcon::fromTheme(QStringLiteral("system-run")), i18nc("@action", "Run All Tests"), this );
60 connect(runAll, &QAction::triggered, this, &TestViewPlugin::runAllTests);
61 actionCollection()->addAction(QStringLiteral("run_all_tests"), runAll);
62
63 auto* stopTest = new QAction( QIcon::fromTheme(QStringLiteral("process-stop")), i18nc("@action", "Stop Running Tests"), this );
64 connect(stopTest, &QAction::triggered, this, &TestViewPlugin::stopRunningTests);
65 actionCollection()->addAction(QStringLiteral("stop_running_tests"), stopTest);
66
67 setXMLFile(QStringLiteral("kdevtestview.rc"));
68
69 m_viewFactory = new TestToolViewFactory(this);
70 core()->uiController()->addToolView(i18nc("@title:window", "Unit Tests"), m_viewFactory);
71
72 connect(core()->runController(),&IRunController::jobRegistered, this, &TestViewPlugin::jobStateChanged);
73 connect(core()->runController(),&IRunController::jobUnregistered, this, &TestViewPlugin::jobStateChanged);
74
75 jobStateChanged();
76}
77
78TestViewPlugin::~TestViewPlugin()
79{

Callers

nothing calls this directly

Calls 4

uiControllerMethod · 0.80
runControllerMethod · 0.80
addActionMethod · 0.45
addToolViewMethod · 0.45

Tested by

no test coverage detected