mirror of https://github.com/RPCS3/rpcs3.git
Qt: fix signal_update_available
m_update_message has to be non empty
This commit is contained in:
parent
78eb7e73bc
commit
ddd202b5ff
|
@ -41,6 +41,8 @@ update_manager::update_manager()
|
|||
|
||||
void update_manager::check_for_updates(bool automatic, bool check_only, QWidget* parent)
|
||||
{
|
||||
m_update_message.clear();
|
||||
|
||||
#ifdef __linux__
|
||||
if (automatic && !::getenv("APPIMAGE"))
|
||||
{
|
||||
|
@ -75,7 +77,7 @@ void update_manager::check_for_updates(bool automatic, bool check_only, QWidget*
|
|||
}
|
||||
}
|
||||
|
||||
Q_EMIT signal_update_available(result_json);
|
||||
Q_EMIT signal_update_available(result_json && !m_update_message.isEmpty());
|
||||
});
|
||||
|
||||
const std::string url = "https://update.rpcs3.net/?api=v1&c=" + rpcs3::get_commit_and_hash().second;
|
||||
|
@ -205,7 +207,8 @@ bool update_manager::handle_json(bool automatic, bool check_only, const QByteArr
|
|||
|
||||
void update_manager::update()
|
||||
{
|
||||
if (QMessageBox::question(m_downloader->get_progress_dialog(), tr("Update Available"), m_update_message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
if (m_update_message.isEmpty() ||
|
||||
QMessageBox::question(m_downloader->get_progress_dialog(), tr("Update Available"), m_update_message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
{
|
||||
m_downloader->close_progress_dialog();
|
||||
return;
|
||||
|
|
|
@ -14,6 +14,7 @@ private:
|
|||
downloader* m_downloader = nullptr;
|
||||
QWidget* m_parent = nullptr;
|
||||
|
||||
// This message is empty if there is no download available
|
||||
QString m_update_message;
|
||||
|
||||
std::string m_request_url;
|
||||
|
|
Loading…
Reference in New Issue