diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-06-26 01:57:23 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-07-01 17:03:11 -0700 |
commit | 671d3c1c80b7d6fbe8910a2070b156c25962b2c9 (patch) | |
tree | e36e0f2a227810fe1d6a4088509b42fb02dcd25b /launcher/translations | |
parent | df18d8560dd4648d21cfdddb463e5e9770a822f7 (diff) | |
parent | c523765c197cf63d6830d205f1554cd73e38109e (diff) | |
download | PrismLauncher-671d3c1c80b7d6fbe8910a2070b156c25962b2c9.tar.gz PrismLauncher-671d3c1c80b7d6fbe8910a2070b156c25962b2c9.tar.bz2 PrismLauncher-671d3c1c80b7d6fbe8910a2070b156c25962b2c9.zip |
Merge branch 'develop' into chore/add-compiler-warnings
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/translations')
-rw-r--r-- | launcher/translations/TranslationsModel.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp index 8a004315..6054b4b6 100644 --- a/launcher/translations/TranslationsModel.cpp +++ b/launcher/translations/TranslationsModel.cpp @@ -190,7 +190,7 @@ struct TranslationsModel::Private std::unique_ptr<QTranslator> m_qt_translator; std::unique_ptr<QTranslator> m_app_translator; - Net::Download::Ptr m_index_task; + Net::Download* m_index_task; QString m_downloadingTranslation; NetJob::Ptr m_dl_job; NetJob::Ptr m_index_job; @@ -671,8 +671,9 @@ void TranslationsModel::downloadIndex() d->m_index_job.reset(new NetJob("Translations Index", APPLICATION->network())); MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("translations", "index_v2.json"); entry->setStale(true); - d->m_index_task = Net::Download::makeCached(QUrl(BuildConfig.TRANSLATIONS_BASE_URL + "index_v2.json"), entry); - d->m_index_job->addNetAction(d->m_index_task); + auto task = Net::Download::makeCached(QUrl(BuildConfig.TRANSLATIONS_BASE_URL + "index_v2.json"), entry); + d->m_index_task = task.get(); + d->m_index_job->addNetAction(task); connect(d->m_index_job.get(), &NetJob::failed, this, &TranslationsModel::indexFailed); connect(d->m_index_job.get(), &NetJob::succeeded, this, &TranslationsModel::indexReceived); d->m_index_job->start(); |