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

Fix: Download process not starting if qnapi is already in tray #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-sum-duma
Copy link
Contributor

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.

frmProgress *QNapiApp::progress() {
if (!f_progress) {
f_progress = new frmProgress();
if (!f_progress) abort();
connect(this, SIGNAL(request(QString)), f_progress,
SLOT(receiveRequest(QString)));
connect(this, SIGNAL(downloadFile(const QString &)), f_progress,
SLOT(receiveRequest(const QString &)));
}
return f_progress;
}

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.

...if qnapi was already in tray
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

Successfully merging this pull request may close these issues.

None yet

1 participant