mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-01 12:08:12 +00:00
Qt: don't close the progress dialog if it is already being closed anyway
Maybe this fixes some strange crashes that appear for some people.
This commit is contained in:
parent
86ad4ed6c1
commit
be5b982e45
@ -122,10 +122,13 @@ void downloader::start(const std::string& url, bool follow_location, bool show_p
|
||||
connect(m_progress_dialog, &QProgressDialog::canceled, this, [this]()
|
||||
{
|
||||
m_curl_abort = true;
|
||||
close_progress_dialog();
|
||||
m_progress_dialog = nullptr; // The progress dialog deletes itself on close
|
||||
Q_EMIT signal_download_canceled();
|
||||
});
|
||||
connect(m_progress_dialog, &QProgressDialog::finished, this, &downloader::close_progress_dialog);
|
||||
connect(m_progress_dialog, &QProgressDialog::finished, this, [this]()
|
||||
{
|
||||
m_progress_dialog = nullptr; // The progress dialog deletes itself on close
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,12 +25,10 @@ public:
|
||||
usz update_buffer(char* data, usz size);
|
||||
|
||||
void update_progress_dialog(const QString& title) const;
|
||||
void close_progress_dialog();
|
||||
|
||||
progress_dialog* get_progress_dialog() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void close_progress_dialog();
|
||||
|
||||
private Q_SLOTS:
|
||||
void handle_buffer_update(int size, int max) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user