Skip to content

Commit

Permalink
Remove projectId from logFailedDownload and fix its signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsenD98 committed Dec 27, 2024
1 parent a6fc253 commit abca708
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/core/qfieldcloudprojectsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -2084,7 +2084,7 @@ void QFieldCloudProjectsModel::insertProjects( const QList<CloudProject *> &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++;

Expand All @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qfieldcloudprojectsmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<CloudProject *> &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 )
Expand Down

0 comments on commit abca708

Please sign in to comment.