Skip to content

Commit

Permalink
Fix compilation. Small improvements.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed Feb 12, 2024
1 parent 1762761 commit 3d20058
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/common/utility_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@

QVector<Utility::ProcessInfosForOpenFile> Utility::queryProcessInfosKeepingFileOpen(const QString &filePath)
{
return {};
Q_UNUSED(filePath)
return {};
}

void Utility::setupFavLink(const QString &folder)
Expand Down
1 change: 1 addition & 0 deletions src/common/utility_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace OCC {

QVector<Utility::ProcessInfosForOpenFile> Utility::queryProcessInfosKeepingFileOpen(const QString &filePath)
{
Q_UNUSED(filePath)
return {};
}

Expand Down
6 changes: 4 additions & 2 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ namespace
{
constexpr auto editorForSigningName = "PowerPDF";
constexpr auto fileExtensionToCheckIfOpenForSigning = ".pdf";
constexpr auto delayIntervalForSyncRetryForOpenedForSigningFilesSeconds = 60;
}

namespace OCC {
Expand Down Expand Up @@ -1033,7 +1034,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
item->_errorString = tr("Could not upload file, because it is open in \"%1\".").arg(editorForSigningName);
item->_status = SyncFileItem::Status::SoftError;
_discoveryData->_anotherSyncNeeded = true;
_discoveryData->_filesNeedingScheduledSync.insert(path._original, 30);
_discoveryData->_filesNeedingScheduledSync.insert(path._original, delayIntervalForSyncRetryForOpenedForSigningFilesSeconds);
}

if (dbEntry.isValid() && item->isDirectory()) {
Expand Down Expand Up @@ -1865,7 +1866,8 @@ bool ProcessDirectoryJob::isAnyEditorKeepingFileBusy(const SyncFileItemPtr &item
const auto isAnyEditorsKeepingFileBusyFound = std::find_if(
std::cbegin(editorsKeepingFileBusy),
std::cend(editorsKeepingFileBusy),
[](const Utility::ProcessInfosForOpenFile &processInfosForFile) { return processInfosForFile.processName.startsWith(editorForSigningName);
[](const Utility::ProcessInfosForOpenFile &processInfosForFile) {
return processInfosForFile.processName.startsWith(editorForSigningName, Qt::CaseInsensitive);
}) != std::cend(editorsKeepingFileBusy);

return isAnyEditorsKeepingFileBusyFound;
Expand Down

0 comments on commit 3d20058

Please sign in to comment.