| 52 | }; |
| 53 | |
| 54 | TestViewPlugin::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 | |
| 78 | TestViewPlugin::~TestViewPlugin() |
| 79 | { |
nothing calls this directly
no test coverage detected