Skip to content

Commit b62371d

Browse files
committed
fix: review comments
1 parent 5c6d5eb commit b62371d

File tree

6 files changed

+16
-25
lines changed

6 files changed

+16
-25
lines changed

src/common/vfs.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ Vfs::Mode OCC::VfsPluginManager::bestAvailableVfsMode() const
228228
{
229229
if (isVfsPluginAvailable(Vfs::WindowsCfApi)) {
230230
return Vfs::WindowsCfApi;
231-
} else if (isVfsPluginAvailable(Vfs::Off)) {
232-
return Vfs::Off;
233231
}
234232

235233
return Vfs::Off;

src/csync/csync_exclude.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -393,32 +393,33 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(QStringView path, ItemTy
393393
bnameStr = path.mid(lastSlash + 1);
394394
}
395395

396-
QRegularExpressionMatch m;
396+
QRegularExpressionMatch regularExpressionMatch;
397397
if (filetype == ItemTypeDirectory) {
398-
m = _bnameTraversalRegexDir.matchView(bnameStr);
398+
regularExpressionMatch = _bnameTraversalRegexDir.matchView(bnameStr);
399399
} else {
400-
m = _bnameTraversalRegexFile.matchView(bnameStr);
400+
regularExpressionMatch = _bnameTraversalRegexFile.matchView(bnameStr);
401401
}
402-
if (!m.hasMatch())
402+
if (!regularExpressionMatch.hasMatch())
403403
return CSYNC_NOT_EXCLUDED;
404-
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
404+
if (regularExpressionMatch.capturedStart(QStringLiteral("exclude")) != -1) {
405405
return CSYNC_FILE_EXCLUDE_LIST;
406-
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
406+
} else if (regularExpressionMatch.capturedStart(QStringLiteral("excluderemove")) != -1) {
407407
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
408408
}
409409

410410
// third capture: full path matching is triggered
411411
QStringView pathStr = path;
412412

413413
if (filetype == ItemTypeDirectory) {
414-
m = _fullTraversalRegexDir.matchView(pathStr);
414+
regularExpressionMatch = _fullTraversalRegexDir.matchView(pathStr);
415415
} else {
416-
m = _fullTraversalRegexFile.matchView(pathStr);
416+
regularExpressionMatch = _fullTraversalRegexFile.matchView(pathStr);
417417
}
418-
if (m.hasMatch()) {
419-
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
418+
if (regularExpressionMatch.hasMatch()) {
419+
if (regularExpressionMatch.capturedStart(QStringLiteral("exclude")) != -1) {
420420
return CSYNC_FILE_EXCLUDE_LIST;
421-
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
421+
}
422+
if (regularExpressionMatch.capturedStart(QStringLiteral("excluderemove")) != -1) {
422423
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
423424
}
424425
}

src/gui/folder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ void Folder::startVfs()
540540
connect(_vfs.get(), &Vfs::needSync, this, [this] {
541541
if (canSync()) {
542542
// the vfs plugin detected that its metadata is out of sync and requests a new sync
543-
// the request has a height priority as it is probably issued after a user request
543+
// the request has a higher priority as it is probably issued after a user request
544544
FolderMan::instance()->scheduler()->enqueueFolder(this, SyncScheduler::Priority::High);
545545
}
546546
});

src/gui/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ int main(int argc, char **argv)
397397
// load the resources
398398
const OCC::ResourcesLoader resource;
399399

400-
// Create a `Platform` instance so it can set up/teared down stuff for us, and do any
400+
// Create a `Platform` instance so it can set up/tear down stuff for us, and do any
401401
// initialisation that needs to be done before creating a QApplication
402402
const auto platform = Platform::create();
403403

src/gui/socketapi/socketapi.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -925,11 +925,6 @@ SocketApi::FileData SocketApi::FileData::get(const QString &localFile)
925925
return data;
926926
}
927927

928-
QString SocketApi::FileData::folderRelativePathNoVfsSuffix() const
929-
{
930-
return folderRelativePath;
931-
}
932-
933928
bool OCC::SocketApi::FileData::isSyncFolder() const
934929
{
935930
return folderRelativePath.isEmpty();

src/gui/socketapi/socketapi.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,10 @@ private Q_SLOTS:
8686
SyncJournalFileRecord journalRecord() const;
8787
FileData parentFolder() const;
8888

89-
// Relative path of the file locally, without any vfs suffix
90-
QString folderRelativePathNoVfsSuffix() const;
91-
9289
Folder *folder = nullptr;
93-
// Absolute path of the file locally. (May be a virtual file)
90+
// Absolute path of the file locally. (Maybe a virtual file)
9491
QString localPath;
95-
// Relative path of the file locally, as in the DB. (May be a virtual file)
92+
// Relative path of the file locally, as in the DB. (Maybe a virtual file)
9693
QString folderRelativePath;
9794
// Path of the file on the server (In case of virtual file, it points to the actual file)
9895
QString serverRelativePath;

0 commit comments

Comments
 (0)