Code maintenance - correct some syntax, fix some warnings.
authorDominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Sat, 18 Jan 2020 09:30:34 +0000 (10:30 +0100)
committerDominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Sat, 18 Jan 2020 09:30:34 +0000 (10:30 +0100)
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
src/gui/folder.cpp
src/gui/tray/ActivityListModel.h
src/gui/tray/UserModel.cpp
src/libsync/owncloudpropagator.cpp
src/libsync/syncengine.cpp

index 0e906a4203c66e0b30b4d683f84c35dc48fcf1f1..f9cb8cfe00f6331738ead7051ecebf2fe9bb2f2c 100644 (file)
@@ -914,6 +914,8 @@ void Folder::slotItemCompleted(const SyncFileItemPtr &item)
                 _folderWatcher->removePath(path() + item->_file);
                 _folderWatcher->addPath(path() + item->destination());
            break;
+        default:
+        break;
        }
     }
 
index 1c8ae6ee24e935c4b60464534a02190c57fcb32b..37a766907fb29ed08085faeca8cb70aafcfc5190 100644 (file)
@@ -85,7 +85,7 @@ signals:
     void activityJobStatusCode(int statusCode);
 
 protected:
-    QHash<int, QByteArray> roleNames() const;
+    QHash<int, QByteArray> roleNames() const override;
 
 private:
     void startFetchJob();
index 9a6c9e3121614297e5c0e49028ffe64b10eaeeb3..2c66894e63ef5f664695fc86f5bde955ad203f9d 100644 (file)
@@ -780,6 +780,9 @@ ImageProvider::ImageProvider()
 
 QImage ImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
 {
+    Q_UNUSED(size)
+    Q_UNUSED(requestedSize)
+
     if (id == "currentUser") {
         return UserModel::instance()->currentUserAvatar();
     } else {
index c728172e6a8a199b029879b24dec0f4843982f42..03d1dbf7244a7f71fdb240034c5579455b085d1b 100644 (file)
@@ -376,14 +376,14 @@ void OwncloudPropagator::start(const SyncFileItemVector &items,
         Q_ASSERT(std::is_sorted(items.begin(), items.end()));
     } else if (hasChange) {
         Q_ASSERT(std::is_sorted(items.begin(), items.end(),
-            [](const SyncFileItemVector::const_reference &a, const SyncFileItemVector::const_reference &b) -> bool {
+            [](SyncFileItemVector::const_reference &a, SyncFileItemVector::const_reference &b) -> bool {
                 return ((a->_instruction == CSYNC_INSTRUCTION_TYPE_CHANGE) && (b->_instruction != CSYNC_INSTRUCTION_TYPE_CHANGE));
             }));
         Q_ASSERT(std::is_sorted(items.begin(), items.begin() + lastChangeInstruction));
 
         if (hasDelete) {
             Q_ASSERT(std::is_sorted(items.begin() + (lastChangeInstruction + 1), items.end(),
-                [](const SyncFileItemVector::const_reference &a, const SyncFileItemVector::const_reference &b) -> bool {
+                [](SyncFileItemVector::const_reference &a, SyncFileItemVector::const_reference &b) -> bool {
                     return ((a->_instruction == CSYNC_INSTRUCTION_REMOVE) && (b->_instruction != CSYNC_INSTRUCTION_REMOVE));
                 }));
             Q_ASSERT(std::is_sorted(items.begin() + (lastChangeInstruction + 1), items.begin() + lastDeleteInstruction));
index 24732d9753b0601a48840e4b07546007aff610ff..42e45b5c859662485cd45f1c38ed8f4ac1fdb696 100644 (file)
@@ -1078,7 +1078,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
     // Get CHANGE instructions to the top first
     if (syncItems.count() > 0) {
         std::sort(syncItems.begin(), syncItems.end(),
-            [](const SyncFileItemVector::const_reference &a, const SyncFileItemVector::const_reference &b) -> bool {
+            [](SyncFileItemVector::const_reference &a, SyncFileItemVector::const_reference &b) -> bool {
                                return ((a->_instruction == CSYNC_INSTRUCTION_TYPE_CHANGE) && (b->_instruction != CSYNC_INSTRUCTION_TYPE_CHANGE));
             });
         if (syncItems.at(0)->_instruction == CSYNC_INSTRUCTION_TYPE_CHANGE) {
@@ -1089,7 +1089,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
             std::sort(syncItems.begin(), syncItems.begin() + lastChangeInstruction);
             if (syncItems.count() > lastChangeInstruction) {
                 std::sort(syncItems.begin() + (lastChangeInstruction + 1), syncItems.end(),
-                    [](const SyncFileItemVector::const_reference &a, const SyncFileItemVector::const_reference &b) -> bool {
+                    [](SyncFileItemVector::const_reference &a, SyncFileItemVector::const_reference &b) -> bool {
                         return ((a->_instruction == CSYNC_INSTRUCTION_REMOVE) && (b->_instruction != CSYNC_INSTRUCTION_REMOVE));
                     });
                 if (syncItems.at(lastChangeInstruction + 1)->_instruction == CSYNC_INSTRUCTION_REMOVE) {