| 27 | using namespace KDevelop; |
| 28 | |
| 29 | PlasmoidExecutionJob::PlasmoidExecutionJob(ExecutePlasmoidPlugin* iface, ILaunchConfiguration* cfg) |
| 30 | : OutputJob( iface ) |
| 31 | { |
| 32 | QString identifier = cfg->config().readEntry("PlasmoidIdentifier", ""); |
| 33 | |
| 34 | Q_ASSERT(!identifier.isEmpty()); |
| 35 | setToolTitle(i18n("Plasmoid Viewer")); |
| 36 | setCapabilities(Killable); |
| 37 | setStandardToolView( IOutputView::RunView ); |
| 38 | setBehaviours(IOutputView::AllowUserClose | IOutputView::AutoScroll ); |
| 39 | setObjectName(QLatin1String("plasmoidviewer ")+identifier); |
| 40 | setDelegate(new OutputDelegate); |
| 41 | |
| 42 | m_process = new CommandExecutor(executable(cfg), this); |
| 43 | m_process->setArguments( arguments(cfg) ); |
| 44 | m_process->setWorkingDirectory(workingDirectory(cfg)); |
| 45 | |
| 46 | auto* model = new OutputModel(QUrl::fromLocalFile(m_process->workingDirectory()), this); |
| 47 | model->setFilteringStrategy(OutputModel::CompilerFilter); |
| 48 | setModel( model ); |
| 49 | |
| 50 | connect(m_process, &CommandExecutor::receivedStandardError, model, |
| 51 | &OutputModel::appendLines ); |
| 52 | connect(m_process, &CommandExecutor::receivedStandardOutput, model, |
| 53 | &OutputModel::appendLines ); |
| 54 | |
| 55 | connect( m_process, &CommandExecutor::failed, this, &PlasmoidExecutionJob::slotFailed ); |
| 56 | connect( m_process, &CommandExecutor::completed, this, &PlasmoidExecutionJob::slotCompleted ); |
| 57 | } |
| 58 | |
| 59 | |
| 60 | void PlasmoidExecutionJob::start() |
nothing calls this directly
no test coverage detected