No need to use equals here.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-03-08 10:39:55 -05:00 committed by AT
parent 26cedb83b0
commit 028a8db6ba
2 changed files with 12 additions and 12 deletions

View File

@ -211,7 +211,7 @@ void Download::removeModel(const QString &modelFile)
}
if (!shouldRemoveInstalled) {
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::InstalledRole, false },
{ ModelList::BytesReceivedRole, 0 },
{ ModelList::BytesTotalRole, 0 },
@ -360,7 +360,7 @@ void Download::handleDownloadProgress(qint64 bytesReceived, qint64 bytesTotal)
else
speedText = QString::number(static_cast<double>(speed / (1024.0 * 1024.0)), 'f', 2) + " MB/s";
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::BytesReceivedRole, currentBytesReceived },
{ ModelList::BytesTotalRole, bytesTotal },
{ ModelList::SpeedRole, speedText },
@ -468,7 +468,7 @@ void Download::handleModelDownloadFinished()
modelReply->deleteLater();
tempFile->deleteLater();
if (!hasRetry(modelFilename)) {
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::DownloadingRole, false },
{ ModelList::DownloadErrorRole, errorString }
};
@ -507,7 +507,7 @@ void Download::handleHashAndSaveFinished(bool success, const QString &error,
QString modelFilename = modelReply->request().attribute(QNetworkRequest::User).toString();
Network::globalInstance()->sendDownloadFinished(modelFilename, success);
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::CalcHashRole, false },
{ ModelList::DownloadingRole, false }
};

View File

@ -980,7 +980,7 @@ QString ModelList::clone(const ModelInfo &model)
const QString id = Network::globalInstance()->generateUniqueId();
addModel(id);
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::InstalledRole, model.installed },
{ ModelList::IsCloneRole, true },
{ ModelList::NameRole, uniqueModelName(model) },
@ -1144,7 +1144,7 @@ void ModelList::updateModelsFromDirectory()
}
for (const QString &id : modelsById) {
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ InstalledRole, true },
{ FilenameRole, filename },
// FIXME: WE should change this to use a consistent filename for online models
@ -1350,7 +1350,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
if (!contains(id))
addModel(id);
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::NameRole, modelName },
{ ModelList::FilenameRole, modelFilename },
{ ModelList::FilesizeRole, modelFilesize },
@ -1408,7 +1408,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
changeId(modelFilename, id);
if (!contains(id))
addModel(id);
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::NameRole, modelName },
{ ModelList::FilenameRole, modelFilename },
{ ModelList::FilesizeRole, "minimal" },
@ -1435,7 +1435,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
changeId(modelFilename, id);
if (!contains(id))
addModel(id);
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::NameRole, modelName },
{ ModelList::FilenameRole, modelFilename },
{ ModelList::FilesizeRole, "minimal" },
@ -1465,7 +1465,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
changeId(modelFilename, id);
if (!contains(id))
addModel(id);
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::NameRole, modelName },
{ ModelList::FilenameRole, modelFilename },
{ ModelList::FilesizeRole, "minimal" },
@ -1486,7 +1486,7 @@ void ModelList::parseModelsJsonFile(const QByteArray &jsonData, bool save)
void ModelList::updateDiscoveredInstalled(const ModelInfo &info)
{
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::InstalledRole, true },
{ ModelList::IsDiscoveredRole, true },
{ ModelList::NameRole, info.name() },
@ -1897,7 +1897,7 @@ void ModelList::handleDiscoveryItemFinished()
if (!contains(id))
addModel(id);
QVector<QPair<int, QVariant>> data = {
QVector<QPair<int, QVariant>> data {
{ ModelList::NameRole, modelName },
{ ModelList::FilenameRole, modelFilename },
{ ModelList::FilesizeRole, modelFilesize },