Make the retrieval/parsing of models.json sync on startup. We were jumping to many hoops to mitigate the async behavior.

This commit is contained in:
Adam Treat
2023-06-28 11:13:33 -04:00
committed by AT
parent 9560336490
commit e70899a26c
5 changed files with 172 additions and 182 deletions

View File

@@ -57,12 +57,10 @@ public:
Q_INVOKABLE bool isFirstStart() const;
public Q_SLOTS:
void updateModelList();
void updateReleaseNotes();
private Q_SLOTS:
void handleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
void handleModelsJsonDownloadFinished();
void handleReleaseJsonDownloadFinished();
void handleErrorOccurred(QNetworkReply::NetworkError code);
void handleDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
@@ -78,7 +76,6 @@ Q_SIGNALS:
QFile *tempFile, QNetworkReply *modelReply);
private:
void parseModelsJsonFile(const QByteArray &jsonData);
void parseReleaseJsonFile(const QByteArray &jsonData);
QString incompleteDownloadPath(const QString &modelFile);