D18567: Make testActiveDocumentsGetBestPriority() clean up after itself

Milian Wolff noreply at phabricator.kde.org
Sun Jan 27 19:21:32 GMT 2019

mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.

  great initiative, but could you check if this could be done in a more generic way potentially? if not then I'm all for getting this in as-is otherwise


> test_duchain.cpp:1004
> +    // due to the TestFiles getting removed.
> +    file1.parseAndWait();
> +    file2.parseAndWait();

could we handle this generically in `~TestFile` somehow? Maybe by revoking the background parser job there, or if it was started already, waiting for that?

> test_duchain.cpp:1008
> +    
> +    doc1->close(KDevelop::IDocument::Discard);
> +    doc2->close(KDevelop::IDocument::Discard);

could you add a smartptr like handle for that which does this automatically on destruction? we do this in a few places, and it would be better if it's done via RAII

  R32 KDevelop


To: thomassc, #kdevelop, mwolff
Cc: mwolff, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190127/99a3cfe6/attachment.html>

More information about the KDevelop-devel mailing list