diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-06-23 09:13:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-23 09:13:52 -0700 |
commit | 046d510134a0061c0a1fa89fda80355c9e2f11ff (patch) | |
tree | fcbceeb50d29cde8f5378246aceebea33b60bcc1 /launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | |
parent | 8df5ab8aa7ec32ee3c44e2b57dc9c9f04e093d9d (diff) | |
parent | 85bbab0e9284e35b0fec26405537c9160496974f (diff) | |
download | PrismLauncher-046d510134a0061c0a1fa89fda80355c9e2f11ff.tar.gz PrismLauncher-046d510134a0061c0a1fa89fda80355c9e2f11ff.tar.bz2 PrismLauncher-046d510134a0061c0a1fa89fda80355c9e2f11ff.zip |
Merge pull request #1200 from Trial97/net_job_crash
Made ByteSynkArray to use shared_ptr
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp index 55d287b0..e0046d88 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp @@ -131,27 +131,27 @@ void ModpackListModel::performPaginatedSearch() // TODO: Move to standalone API auto netJob = makeShared<NetJob>("Modrinth::SearchModpack", APPLICATION->network()); auto searchAllUrl = QString(BuildConfig.MODRINTH_PROD_URL + - "/search?" - "offset=%1&" - "limit=%2&" - "query=%3&" - "index=%4&" - "facets=[[\"project_type:modpack\"]]") + "/search?" + "offset=%1&" + "limit=%2&" + "query=%3&" + "index=%4&" + "facets=[[\"project_type:modpack\"]]") .arg(nextSearchOffset) .arg(m_modpacks_per_page) .arg(currentSearchTerm) .arg(currentSort); - netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchAllUrl), &m_all_response)); + netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchAllUrl), m_all_response)); QObject::connect(netJob.get(), &NetJob::succeeded, this, [this] { QJsonParseError parse_error_all{}; - QJsonDocument doc_all = QJsonDocument::fromJson(m_all_response, &parse_error_all); + QJsonDocument doc_all = QJsonDocument::fromJson(*m_all_response, &parse_error_all); if (parse_error_all.error != QJsonParseError::NoError) { qWarning() << "Error while parsing JSON response from " << debugName() << " at " << parse_error_all.offset << " reason: " << parse_error_all.errorString(); - qWarning() << m_all_response; + qWarning() << *m_all_response; return; } |