File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -932,12 +932,14 @@ void QFieldCloudProjectsModel::projectPackageAndDownload( const QString &project
932
932
const QStringList fileNames = project->downloadFileTransfers .keys ();
933
933
for ( const QString &fileNameKey : fileNames )
934
934
{
935
- if ( project->downloadFileTransfers [fileNameKey].networkReply
936
- && !project->downloadFileTransfers [fileNameKey].networkReply ->isFinished () )
935
+ if ( project->downloadFileTransfers [fileNameKey].networkReply )
937
936
{
938
- project->downloadFileTransfers [fileNameKey].networkReply ->abort ();
937
+ if ( !project->downloadFileTransfers [fileNameKey].networkReply ->isFinished () )
938
+ {
939
+ project->downloadFileTransfers [fileNameKey].networkReply ->abort ();
940
+ }
941
+ project->downloadFileTransfers [fileNameKey].networkReply ->deleteLater ();
939
942
}
940
- project->downloadFileTransfers [fileNameKey].networkReply ->deleteLater ();
941
943
}
942
944
943
945
mActiveProjectFilesToDownload .clear ();
Original file line number Diff line number Diff line change 17
17
#define QFIELDCLOUDPROJECTSMODEL_H
18
18
19
19
#include " deltalistmodel.h"
20
+ #include " networkreply.h"
20
21
#include " qgsgpkgflusher.h"
21
22
22
23
#include < QAbstractListModel>
23
24
#include < QJsonArray>
24
25
#include < QNetworkReply>
26
+ #include < QPointer>
25
27
#include < QSortFilterProxyModel>
26
28
#include < QTimer>
27
29
28
30
29
31
class QNetworkRequest ;
30
32
class QFieldCloudConnection ;
31
- class NetworkReply ;
32
33
class LayerObserver ;
33
34
class QgsMapLayer ;
34
35
class QgsProject ;
@@ -341,7 +342,7 @@ class QFieldCloudProjectsModel : public QAbstractListModel
341
342
long long bytesTotal;
342
343
long long bytesTransferred = 0 ;
343
344
bool isFinished = false ;
344
- NetworkReply * networkReply;
345
+ QPointer< NetworkReply> networkReply;
345
346
QNetworkReply::NetworkError error = QNetworkReply::NoError;
346
347
QStringList layerIds;
347
348
int redirectsCount = 0 ;
You can’t perform that action at this time.
0 commit comments