Clean up declaration of propagateuploadng
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 27 Jul 2023 08:37:40 +0000 (16:37 +0800)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Thu, 31 Aug 2023 13:25:00 +0000 (15:25 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/libsync/propagateupload.h

index 10f42ddc8dadb116565c404b7277a4690c9bbc40..914ad24f1678391d13af9ebbe26d08bba34591a9 100644 (file)
@@ -378,27 +378,6 @@ private slots:
 class PropagateUploadFileNG : public PropagateUploadFileCommon
 {
     Q_OBJECT
-private:
-    qint64 _sent = 0; /// amount of data (bytes) that was already sent
-    uint _transferId = 0; /// transfer id (part of the url)
-    int _currentChunk = 0; /// Id of the next chunk that will be sent
-    qint64 _currentChunkSize = 0; /// current chunk size
-    bool _removeJobError = false; /// If not null, there was an error removing the job
-
-    // Map chunk number with its size  from the PROPFIND on resume.
-    // (Only used from slotPropfindIterate/slotPropfindFinished because the LsColJob use signals to report data.)
-    struct ServerChunkInfo
-    {
-        qint64 size = 0LL;
-        QString originalName;
-    };
-    QMap<qint64, ServerChunkInfo> _serverChunks;
-
-    /**
-     * Return the URL of a chunk.
-     * If chunk == -1, returns the URL of the parent folder containing the chunks
-     */
-    QUrl chunkUrl(int chunk = -1);
 
 public:
     PropagateUploadFileNG(OwncloudPropagator *propagator, const SyncFileItemPtr &item)
@@ -408,11 +387,6 @@ public:
 
     void doStartUpload() override;
 
-private:
-    void startNewUpload();
-    void startNextChunk();
-    void finishUpload();
-
 public slots:
     void abort(OCC::PropagateUploadFileNG::AbortType abortType) override;
 
@@ -425,5 +399,31 @@ private slots:
     void slotPutFinished();
     void slotMoveJobFinished();
     void slotUploadProgress(qint64, qint64);
+
+private:
+    // Map chunk number with its size  from the PROPFIND on resume.
+    // (Only used from slotPropfindIterate/slotPropfindFinished because the LsColJob use signals to report data.)
+    struct ServerChunkInfo {
+        qint64 size = 0LL;
+        QString originalName;
+    };
+
+    /**
+     * Return the URL of a chunk.
+     * If chunk == -1, returns the URL of the parent folder containing the chunks
+     */
+    QUrl chunkUrl(int chunk = -1);
+
+    void startNewUpload();
+    void startNextChunk();
+    void finishUpload();
+
+    QMap<qint64, ServerChunkInfo> _serverChunks;
+
+    qint64 _sent = 0; /// amount of data (bytes) that was already sent
+    uint _transferId = 0; /// transfer id (part of the url)
+    int _currentChunk = 0; /// Id of the next chunk that will be sent
+    qint64 _currentChunkSize = 0; /// current chunk size
+    bool _removeJobError = false; /// If not null, there was an error removing the job
 };
 }