Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
This PR fixes the issues with signals not being passed around properly on windows
Summary
This PR replaces the QSocketNotifier with a QThread and a worker that uses a signal in addition to a parent/child pipe because in windows to pass data around. This additional maneouver was needed because windows wasn't triggered the activated signal of the qsocketnotifier object.
The current data flow is:
child_conn
->parent_conn
->signal emit
->signal emit listener
.The signal emit listener is needed, because processing things in the Qthread object is not possible because of how Qt restricts updates from amywhere else other than the main thread. The signal emit listener is executed on the main thread, so the signal is used as a connection to send the data back to the main thread.
Checklist
How can your code be run and tested?
Run the code (in development mode) in windows, and ensure that you see the notifications and the tray text changes.
Other information