Merge pull request #6135 from nextcloud/ci/clazyFixes

Ci/clazy fixes
This commit is contained in:
Matthieu Gallien 2023-10-17 10:02:58 +02:00 committed by GitHub
commit d1a2858f24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 11 deletions

View file

@ -490,7 +490,7 @@ AccountState *AccountManager::addAccount(const AccountPtr &newAccount)
return newAccountState;
}
void AccountManager::deleteAccount(AccountState *account)
void AccountManager::deleteAccount(OCC::AccountState *account)
{
const auto it = std::find(_accounts.begin(), _accounts.end(), account);
if (it == _accounts.end()) {

View file

@ -101,7 +101,7 @@ public slots:
void save(bool saveCredentials = true);
/// Delete the AccountState
void deleteAccount(AccountState *account);
void deleteAccount(OCC::AccountState *account);
/// Remove all accounts
void shutdown();

View file

@ -945,7 +945,7 @@ void ShareModel::toggleShareNoteToRecipientFromQml(const QVariant &share, const
toggleShareNoteToRecipient(ptr, enable);
}
void ShareModel::changePermissionModeFromQml(const QVariant &share, const SharePermissionsMode permissionMode)
void ShareModel::changePermissionModeFromQml(const QVariant &share, const OCC::ShareModel::SharePermissionsMode permissionMode)
{
const auto sharePtr = share.value<SharePtr>();
if (sharePtr.isNull() || _sharePermissionsChangeInProgress) {

View file

@ -173,7 +173,7 @@ public slots:
void toggleShareExpirationDateFromQml(const QVariant &share, const bool enable) const;
void toggleShareNoteToRecipient(const OCC::SharePtr &share, const bool enable) const;
void toggleShareNoteToRecipientFromQml(const QVariant &share, const bool enable) const;
void changePermissionModeFromQml(const QVariant &share, const SharePermissionsMode permissionMode);
void changePermissionModeFromQml(const QVariant &share, const OCC::ShareModel::SharePermissionsMode permissionMode);
void setLinkShareLabel(const QSharedPointer<OCC::LinkShare> &linkShare, const QString &label) const;
void setLinkShareLabelFromQml(const QVariant &linkShare, const QString &label) const;

View file

@ -310,7 +310,6 @@ signals:
void noteSet();
void nameSet();
void labelSet();
void hideDownloadSet();
private slots:
void slotNoteSet(const QJsonDocument &, const QVariant &value);

View file

@ -836,7 +836,7 @@ bool AvatarJob::finished()
}
}
}
emit(avatarPixmap(avImage));
emit avatarPixmap(avImage);
return true;
}
#endif

View file

@ -644,7 +644,7 @@ private slots:
signals:
void newItem(const OCC::SyncFileItemPtr &);
void itemCompleted(const SyncFileItemPtr &item, OCC::ErrorCategory category);
void itemCompleted(const OCC::SyncFileItemPtr &item, OCC::ErrorCategory category);
void progress(const OCC::SyncFileItem &, qint64 bytes);
void finished(OCC::SyncFileItem::Status status);
@ -725,7 +725,7 @@ public:
void start();
signals:
void finished();
void aborted(const QString &error, const ErrorCategory errorCategory);
void aborted(const QString &error, const OCC::ErrorCategory errorCategory);
private slots:
void slotPollFinished();
};

View file

@ -811,7 +811,7 @@ void SyncEngine::slotDiscoveryFinished()
}
if (_discoveryPhase->_hasDownloadRemovedItems && _discoveryPhase->_hasUploadErrorItems) {
for (const auto &item : _syncItems) {
for (const auto &item : qAsConst(_syncItems)) {
if (item->_instruction == CSYNC_INSTRUCTION_ERROR && item->_direction == SyncFileItem::Up) {
item->_instruction = CSYNC_INSTRUCTION_IGNORE;
}
@ -919,7 +919,7 @@ void SyncEngine::slotDiscoveryFinished()
void SyncEngine::slotCleanPollsJobAborted(const QString &error, const ErrorCategory errorCategory)
{
syncError(error, errorCategory);
emit syncError(error, errorCategory);
finalize(false);
}

View file

@ -142,7 +142,8 @@ private slots:
bool isAnyFileDropFileMissing = false;
for (const auto &key : metadata->fileDrop().keys()) {
const auto allKeys = metadata->fileDrop().keys();
for (const auto &key : allKeys) {
if (std::find_if(metadata->files().constBegin(), metadata->files().constEnd(), [&key](const EncryptedFile &encryptedFile) {
return encryptedFile.encryptedFilename == key;
}) == metadata->files().constEnd()) {