diff --git a/src/core/qfieldcloudprojectsmodel.cpp b/src/core/qfieldcloudprojectsmodel.cpp index 16b206c1f8..11aabf2689 100644 --- a/src/core/qfieldcloudprojectsmodel.cpp +++ b/src/core/qfieldcloudprojectsmodel.cpp @@ -1841,7 +1841,7 @@ void QFieldCloudProjectsModel::downloadFileConnections( const QString &projectId // check if the code above failed with error if ( hasError ) { - logFailedDownload( project, projectId, fileName, errorMessage, errorMessageDetail ); + logFailedDownload( project, fileName, errorMessage, errorMessageDetail ); rawReply->abort(); return; } @@ -1905,7 +1905,7 @@ void QFieldCloudProjectsModel::downloadFileConnections( const QString &projectId // check if the code above failed with error if ( hasError ) { - logFailedDownload( project, projectId, fileName, errorMessage, errorMessageDetail ); + logFailedDownload( project, fileName, errorMessage, errorMessageDetail ); rawReply->abort(); return; } @@ -2084,7 +2084,7 @@ void QFieldCloudProjectsModel::insertProjects( const QList &proj endInsertRows(); } -void QFieldCloudProjectsModel::logFailedDownload( CloudProject *project, const QString &projectId, const QString &fileName, const QString &errorMessage, const QString &errorMessageDetail ) +void QFieldCloudProjectsModel::logFailedDownload( CloudProject *project, const QString &fileName, const QString &errorMessage, const QString &errorMessageDetail ) { project->downloadFilesFailed++; @@ -2099,7 +2099,7 @@ void QFieldCloudProjectsModel::logFailedDownload( CloudProject *project, const Q QgsMessageLog::logMessage( QStringLiteral( "%1\n%2" ).arg( baseMessage, errorMessageDetail ) ); - emit projectDownloadFinished( projectId, trimmedMessage ); + emit projectDownloadFinished( project->id, trimmedMessage ); } void QFieldCloudProjectsModel::loadProjects( const QJsonArray &remoteProjects, bool skipLocalProjects ) diff --git a/src/core/qfieldcloudprojectsmodel.h b/src/core/qfieldcloudprojectsmodel.h index 636d9a0870..b11bb8daf2 100644 --- a/src/core/qfieldcloudprojectsmodel.h +++ b/src/core/qfieldcloudprojectsmodel.h @@ -496,7 +496,7 @@ class QFieldCloudProjectsModel : public QAbstractListModel void downloadFileConnections( const QString &projectId, const QString &fileName ); void loadProjects( const QJsonArray &remoteProjects = QJsonArray(), bool skipLocalProjects = false ); void insertProjects( const QList &projects ); - void logFailedDownload( CloudProject *projectName, const QString &projectId, const QString &fileName, const QString &errorMessage, const QString &errorMessageDetail ); + void logFailedDownload( CloudProject *project, const QString &fileName, const QString &errorMessage, const QString &errorMessageDetail ); }; Q_DECLARE_METATYPE( QFieldCloudProjectsModel::ProjectStatus )