TestFile does not delete the file when it is not useful anymore

Denis Steckelmacher steckdenis at yahoo.fr
Mon Jun 23 18:36:15 UTC 2014


Hi,

The QML/JS plugin imports in each file all the files in the same 
directory. This way, custom QML modules and global Javascript variables 
and functions are accessible from everywhere.

The code-completion unit tests of the plugin use TestFiles, that are all 
created in the same directory. This causes problems because each test 
can see all the ones that were launched previously. Declarations are 
therefore duplicated or appear when they shouldn't.

I currently see two solutions for this problem:

* Modifying the unit test so that every symbol is unique (this way, the 
fact that every file sees the others is not a problem anymore)
* Deleting the test file as soon as possible (for instance just after 
having parsed and added it to the DUChain)

What is your preferred solution? The first one involves changing the 
test code, the second one requires changes in KDevPlatform and could be 
more invasive.

Denis


More information about the KDevelop-devel mailing list