diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 0e906a4203c66..f9cb8cfe00f63 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -914,6 +914,8 @@ void Folder::slotItemCompleted(const SyncFileItemPtr &item) _folderWatcher->removePath(path() + item->_file); _folderWatcher->addPath(path() + item->destination()); break; + default: + break; } } diff --git a/src/gui/tray/ActivityListModel.h b/src/gui/tray/ActivityListModel.h index 1c8ae6ee24e93..37a766907fb29 100644 --- a/src/gui/tray/ActivityListModel.h +++ b/src/gui/tray/ActivityListModel.h @@ -85,7 +85,7 @@ private slots: void activityJobStatusCode(int statusCode); protected: - QHash roleNames() const; + QHash roleNames() const override; private: void startFetchJob(); diff --git a/src/gui/tray/UserModel.cpp b/src/gui/tray/UserModel.cpp index 9a6c9e3121614..2c66894e63ef5 100644 --- a/src/gui/tray/UserModel.cpp +++ b/src/gui/tray/UserModel.cpp @@ -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 { diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index c728172e6a8a1..03d1dbf7244a7 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -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)); diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 24732d9753b06..42e45b5c85966 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -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) {