[Qbs] How to reload a parent project after inserting a sub-project
Christian.Kandeler at qt.io
Mon Jul 8 12:22:24 CEST 2019
On Mon, 8 Jul 2019 22:13:48 +1200
Christian Gagneraud <chgans at gmail.com> wrote:
> On Mon, 8 Jul 2019 at 22:09, Christian Kandeler
> <Christian.Kandeler at qt.io> wrote:
> > I don't know what you mean by "simulating a full project reload". Lots of tst_api test cases do project reloads.
> I just meant a convenience function that would handle:
> project = qbs::Project();
> QDir::cleanPath(m_workingDataDir +
> job.reset(project.setupProject(setupParams, m_logSink, nullptr));
> QVERIFY2(!job->error().hasError(), qPrintable(job->error().toString()));
> So far, that how my "full reload" is implemented (read: copy/pasted),
> and i will want to do that b/w 5 and 10 times.
*shrug* Whatever you need there. But note that you cannot use any
QVERIFYs etc in such functions, as they won't be able to abort your test. Perhaps take a look at
doBuildProject() for inspiration.
More information about the Qbs