Update gpt4all-chat/download.cpp

Co-authored-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: AT <manyoso@users.noreply.github.com>
This commit is contained in:
AT 2024-03-07 14:44:21 -05:00
parent 08b5dc8598
commit 8474d76fec

View File

@ -109,9 +109,7 @@ void Download::downloadModel(const QString &modelFile)
= QString("ERROR: Could not open temp file: %1 %2").arg(tempFile->fileName()).arg(modelFile);
qWarning() << error;
clearRetry(modelFile);
QVector<QPair<int, QVariant>> data;
data.append(qMakePair(ModelList::DownloadErrorRole, error));
ModelList::globalInstance()->updateDataByFilename(modelFile, data);
ModelList::globalInstance()->updateDataByFilename(modelFile, {{ ModelList::DownloadErrorRole, error }});
return;
}
tempFile->flush();