[Qt-creator] Questions regarding the new implementation of run controls (QtC 4.4)

Pascal COMBES pascom at orange.fr
Sun Oct 1 22:11:24 CEST 2017


Hello,

    I developed (for fun and because I needed them when I was under QtC
3.*) a test runner plugin <https://github.com/pasccom/QTestLibPlugin>
and a plugin for developing QtC plugins
<https://github.com/pasccom/QtcDevPlugin>. Since then, I have been
maintaining them because I got used to them. That's for the context.

    I noticed that the signals
ProjectExplorer::ProjectExplorerPlugin::runControlStarted and
ProjectExplorer::ProjectExplorerPlugin::runControlFinished where
removed. They allowed me to start the parser whenever a test suite/case
was run. I found an alternative, i.e. using
ProjectExplorer::RunControl::registerWorker with a customized RunWorker.
However, I was surprised by the fact that the non-templated version

static void registerWorker(Core::Id runMode, const WorkerCreator &producer, const Constraint &constraint = {})
{
    addWorkerFactory({runMode, constraint, producer});
}

does not have a priority argument. This is not a big deal for me but I
was wondering if it was made on purpose? Can you explain why you did not
add the priority argument? Because this makes this version almost
useless, as it cannot override the default RunWorker registered in
ProjectExplorer (unless we use a special runMode, or a special
RunConfiguration).

    I hope I have been clear enough. Thanks for answering.

Pascal.




More information about the Qt-creator mailing list