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

QtCollider: fix method linking #4937

Merged
merged 3 commits into from May 21, 2020
Merged

Conversation

mossheim
Copy link
Contributor

@mossheim mossheim commented May 16, 2020

Purpose and Motivation

Fixes #4933.

We need to use the fully qualified "QtCollider::QcCallback", otherwise the qt metatype system
doesn't find the function signature. this seems to be a deficiency in the way qt matches function
signatures, but solving it more cleverly might be difficult and introduce other bugs, so i'm just
doing the straightforward thing for now.

another problem (maybe?) raised by this is that findText on a web view that isn't visible will
lock up the interpreter. same with findText(""). i don't know why.

Types of changes

  • Documentation
  • Bug fix

To-do list

  • Code is tested
  • All tests are passing
  • Updated documentation
  • This PR is ready for review

otherwise QMetaType can't find it
@mossheim mossheim added the comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead label May 16, 2020
@mossheim
Copy link
Contributor Author

FYI this has been tested by the issue reporter and found to work: #4933 (comment)

@dyfer
Copy link
Member

dyfer commented May 19, 2020

Thanks @brianlheim
The fix seems to be working.
Unfortunately, tests are hit-or-miss on my system, because of timing I assume (it worked fine when I increase wait times). I was only vaguely following conversations in the past about a) async behavior in tests b) gui timing in tests, but it seems to be an issue here. Is there any way to improve this?

0.1.wait;
cond.unhang;
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I saved this file in scide I think this whitespace was automatically deleted... also in line 27.

@mossheim
Copy link
Contributor Author

thanks for the review @dyfer -- through some experimentation i found that the 'load finished' callback always fires when the html is updated, so i updated my tests to use that instead of a direct wait. also removed the whitespace, thanks for pointing that out.

@mossheim
Copy link
Contributor Author

should be ready for another review now!

@dyfer
Copy link
Member

dyfer commented May 19, 2020

Thanks @brianlheim

This is better, however the test still times out on my system, and when it does, I get an error:

FAIL: a TestWebView: test_findText_found - test timeout check

ERROR: Message 'not' not understood.
RECEIVER:
   nil
ARGS:
(...)

I believe this is because wasFound is still nil, maybe if could be initialized to false?
Also, would you consider increasing the timeout? For reference 0.2 seems to work on my system.

@mossheim
Copy link
Contributor Author

maybe if could be initialized to false?

i specifically want nil to indicate a timeout. updated so these asserts are run conditionally

Also, would you consider increasing the timeout?

sure, i updated it to 2 seconds

thanks @dyfer ! ready for more review.

Copy link
Member

@dyfer dyfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @brianlheim ! works great

@mossheim mossheim merged commit 695e776 into supercollider:3.11 May 21, 2020
@mossheim mossheim deleted the topic/4933 branch May 21, 2020 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants