Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/gui/filedetails/filedetails.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <QDateTime>

Check failure on line 6 in src/gui/filedetails/filedetails.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/filedetails/filedetails.cpp:6:10 [clang-diagnostic-error]

'QDateTime' file not found

#include "accountstate.h"
#include "filedetails.h"
Expand Down Expand Up @@ -61,7 +61,7 @@

const auto file = _localPath.mid(_folder->cleanPath().length() + 1);

if (!_folder->journalDb()->getFileRecord(file, &_fileRecord)) {

Check warning on line 64 in src/gui/filedetails/filedetails.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use the init-statement to declare "file" inside the if statement.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ5FokgrhGXS72AcYkVx&open=AZ5FokgrhGXS72AcYkVx&pullRequest=10067
qCWarning(lcFileDetails) << "Invalid file record for path:"
<< _localPath
<< "will not load file details.";
Expand Down Expand Up @@ -177,7 +177,6 @@
void FileDetails::updateFileTagModel()
{
const auto localPath = _fileRecord.path();
const auto relPath = localPath.mid(_folder->cleanPath().length() + 1);
QString serverPath = _folder->remotePathTrailingSlash() + _fileRecord.path();

if (const auto vfsMode = _folder->vfs().mode(); _fileRecord.isVirtualFile() && vfsMode == Vfs::WithSuffix) {
Expand All @@ -186,7 +185,7 @@
}
}

_fileTagModel = std::make_unique<FileTagModel>(relPath, _folder->accountState()->account());
_fileTagModel = std::make_unique<FileTagModel>(serverPath, _folder->accountState()->account());
Q_EMIT fileTagModelChanged();
}

Expand Down
Loading