Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilines scripts improvment #322

Open
Nibor62 opened this issue Jan 13, 2017 · 0 comments
Open

Multilines scripts improvment #322

Nibor62 opened this issue Jan 13, 2017 · 0 comments

Comments

@Nibor62
Copy link

Nibor62 commented Jan 13, 2017

Hi there,

Needing more complex things I have tried to use multi-lines filter scripts, but DT actually do not parse them correctly. I am not sure if it is wanted in DT, it is why I'am putting it here.
It is possible to hack it by onelining the script by putting it inside a anonymous function and executing it
(function() { -- fun stuff here -- })()

It seem that the problem come from the dwarfmodelproxy.cpp
matches = matches && m_engine->evaluate("(" + scripts.join(") && (") + ")").toBool();

as the multilines get put between parenthesis. I could be fixed by replacing this line by the following :
for (int i = 0; i < scripts.size(); ++i) { matches = matches && m_engine->evaluate( scripts.at(i) ).toBool(); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant