qnapi
qnapi copied to clipboard
Fix: Download process not starting if qnapi is already in tray
Steps to reproduce:
- start QNapi, it should appear in tray
- start QNapi again, this time passing a movie file either by using "open with" in a file manager or by command line
- observe the fact that download process is not starting
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.
https://github.com/QNapi/qnapi/blob/d4e0378a601838a96b7ee25ff48a8eaf18388fcd/gui/src/qnapiapp.cpp#L79-L89
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.