Enable HTTP/2 for update checking and mapping updates

This commit is contained in:
Cameron Gutman
2020-11-23 18:35:46 -06:00
parent 3485983553
commit 46940eb15a
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -39,7 +39,9 @@ void AutoUpdateChecker::start()
// We'll get a callback when this is finished // We'll get a callback when this is finished
QUrl url("https://moonlight-stream.org/updates/qt.json"); QUrl url("https://moonlight-stream.org/updates/qt.json");
m_Nam.get(QNetworkRequest(url)); QNetworkRequest request(url);
request.setAttribute(QNetworkRequest::Http2AllowedAttribute, true);
m_Nam.get(request);
#endif #endif
} }
+1
View File
@@ -29,6 +29,7 @@ void MappingFetcher::start()
QUrl url("https://moonlight-stream.org/SDL_GameControllerDB/gamecontrollerdb.txt"); QUrl url("https://moonlight-stream.org/SDL_GameControllerDB/gamecontrollerdb.txt");
QNetworkRequest request(url); QNetworkRequest request(url);
request.setAttribute(QNetworkRequest::Http2AllowedAttribute, true);
// Only download the file if it's newer than what we have // Only download the file if it's newer than what we have
QFileInfo existingFileInfo = Path::getCacheFileInfo("gamecontrollerdb.txt"); QFileInfo existingFileInfo = Path::getCacheFileInfo("gamecontrollerdb.txt");