Fix: Download process not starting if qnapi is already in tray #188
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.
Steps to reproduce:
Cause:
When starting QNapi process with a movie file passed as a command line argument, QNapi first tries to find out if another instance is running. If that's the case, it notifies the other instance about requested movie file and quits. When the other instance receives the request it starts the download process. However, the signal-slot connection that binds the request to the download process is created when frmProgress form is first created.
qnapi/gui/src/qnapiapp.cpp
Lines 79 to 89 in d4e0378
If the form wasn't created yet (and that's the case if QNapi was only started in the tray), the request doesn't go through.
Proposed solution (implemented in this PR):
Create frmProgress form when receiving a request from other QNapi instance.