Skip to content

Commit e0f00a9

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

File tree

7 files changed

+17
-26
lines changed

7 files changed

+17
-26
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: 2 additions & 2 deletions
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 high priority as it is probably issued after a user request
544544
FolderMan::instance()->scheduler()->enqueueFolder(this, SyncScheduler::Priority::High);
545545
}
546546
});
@@ -930,7 +930,7 @@ void Folder::startSync()
930930
// propose: remove the param from the def, and when Folder:setIgnoreHiddenFiles is called it updates the
931931
// ENGINE, not the def. the value should not be stored in the folder def but in the general area of the config.
932932
// if we ever graduate to allowing the user to set this value *per folder* we can refactor it, but the overhead
933-
// of saving this val for every folder in the config is just silly when it's de-facto a global setting.
933+
// of saving this val for every folder in the config is just silly when it's de facto a global setting.
934934
// Erik has no objections
935935
// generally when we change settings we pause syncs, update whatever values,
936936
// then reschedule the newly paused syncs with top prio and start sync - see handling for changing vfs mode

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: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ 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;
9390
// Absolute path of the file locally. (May be a virtual file)
9491
QString localPath;

src/libsync/theme.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject
119119
* name in the GUI, redefine appNameGUI.
120120
*
121121
* By default, the name is derived from the APPLICATION_SHORTNAME
122-
* cmake variable, and should be the same. This method is only
123-
* re-implementable for legacy reasons.
122+
* cmake variable, and should be the same. This method exists only for
123+
* legacy reasons.
124124
*
125125
* Warning: Do not modify this value, as many things, e.g. settings
126126
* depend on it! You most likely want to modify \ref appNameGUI().

0 commit comments

Comments
 (0)