Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #9044

Open
wants to merge 147 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
0090b2f
Run owncloud-ci/git-clang-format-lint@master
jsoref Sep 15, 2021
08d1322
spelling: accessed
jsoref Sep 15, 2021
46f28aa
spelling: acquire
jsoref Mar 27, 2022
93e5cb9
spelling: activity
jsoref Sep 15, 2021
aba16cf
spelling: actual
jsoref Mar 27, 2022
d9c0dc6
spelling: algorithm
jsoref Sep 15, 2021
fa21e8c
spelling: alphabetically
jsoref Sep 15, 2021
c6c9052
spelling: although
jsoref Sep 15, 2021
bde98a8
spelling: and
jsoref Mar 27, 2022
0c45839
spelling: announce
jsoref Sep 15, 2021
58620af
spelling: another
jsoref Mar 27, 2022
9ddf7df
spelling: appearances
jsoref Sep 15, 2021
73263a5
spelling: assigned
jsoref Sep 15, 2021
fd184bf
spelling: asynchronous
jsoref Sep 15, 2021
348aab5
spelling: asynchronously
jsoref Sep 15, 2021
a4418af
spelling: attach
jsoref Mar 27, 2022
28e22fb
spelling: attempt
jsoref Sep 15, 2021
b8cc07d
spelling: avoid
jsoref Sep 15, 2021
c8e5272
spelling: bandwidth
jsoref Sep 15, 2021
0761109
spelling: because
jsoref Sep 15, 2021
8855f43
spelling: blacklist
jsoref Sep 15, 2021
b80c6d3
spelling: build
jsoref Sep 15, 2021
518930e
spelling: cache
jsoref Mar 27, 2022
6b244bc
spelling: can
jsoref Mar 27, 2022
0e76c0a
spelling: capabilities
jsoref Sep 15, 2021
14ad273
spelling: case-sensitive
jsoref Sep 15, 2021
5effb75
spelling: checksum
jsoref Sep 15, 2021
834576a
spelling: chunking
jsoref Sep 15, 2021
72198bb
spelling: classification
jsoref Mar 27, 2022
dac371c
spelling: classifying
jsoref Sep 15, 2021
e599b9d
spelling: client
jsoref Sep 15, 2021
752448b
spelling: color
jsoref Sep 15, 2021
d782125
spelling: com/owncloud
jsoref Sep 15, 2021
08772ca
spelling: command-line
jsoref Sep 15, 2021
9c166d3
spelling: comparison
jsoref Sep 15, 2021
0bb71ad
spelling: compromise
jsoref Sep 15, 2021
ff80df5
spelling: config
jsoref Mar 27, 2022
f384484
spelling: constructor
jsoref Mar 27, 2022
ea9437f
spelling: continuous
jsoref Sep 15, 2021
c84c7e5
spelling: correct
jsoref Mar 27, 2022
85d48be
spelling: credentials
jsoref Sep 15, 2021
7cdccaf
spelling: current
jsoref Sep 15, 2021
10fe178
spelling: currently
jsoref Sep 15, 2021
16d7319
spelling: delete
jsoref Mar 27, 2022
1770a6a
spelling: deprecation
jsoref Sep 15, 2021
e280c55
spelling: destination
jsoref Mar 27, 2022
5af8127
spelling: determines
jsoref Sep 15, 2021
ad3ced1
spelling: dialog
jsoref Mar 27, 2022
bc1d535
spelling: directory
jsoref Mar 27, 2022
3c3cdda
spelling: disabled
jsoref Sep 15, 2021
2bad073
spelling: display
jsoref Sep 15, 2021
2c61f28
spelling: distributed
jsoref Sep 15, 2021
7eb5958
spelling: doesn't
jsoref Mar 27, 2022
cb7a8c0
spelling: download
jsoref Sep 15, 2021
5f49726
spelling: emitted
jsoref Sep 15, 2021
c4a888d
spelling: enforce
jsoref Sep 15, 2021
bafcf05
spelling: enqueue
jsoref Mar 27, 2022
d598703
spelling: enqueued
jsoref Mar 27, 2022
f48d0dd
spelling: ensure
jsoref Sep 15, 2021
d03d213
spelling: even
jsoref Mar 27, 2022
c8a765d
spelling: everything
jsoref Sep 15, 2021
523ab7e
spelling: existing
jsoref Sep 15, 2021
07838c7
spelling: explanation
jsoref Sep 15, 2021
213e981
spelling: extension
jsoref Sep 15, 2021
89a6b99
spelling: failed
jsoref Sep 15, 2021
170d99a
spelling: fallback
jsoref Sep 15, 2021
15ed00b
spelling: features
jsoref Sep 15, 2021
3bcb8ba
spelling: file
jsoref Mar 27, 2022
f7882ec
spelling: filetorename
jsoref Mar 27, 2022
77ef05c
spelling: finger
jsoref Mar 27, 2022
36c78e4
spelling: finished
jsoref Sep 15, 2021
7f47cfa
spelling: from
jsoref Mar 27, 2022
72e1fa8
spelling: functionality
jsoref Sep 15, 2021
281dc94
spelling: habit
jsoref Sep 15, 2021
19e22e5
spelling: happened
jsoref Sep 15, 2021
c2295a6
spelling: immediate
jsoref Sep 15, 2021
1a6fd5b
spelling: immediately
jsoref Sep 15, 2021
9a52907
spelling: implementing
jsoref Sep 15, 2021
c2f10d4
spelling: incomplete
jsoref Sep 15, 2021
20fd497
spelling: information
jsoref Sep 15, 2021
9c4a6f1
spelling: initialised
jsoref Sep 15, 2021
44f746e
spelling: interval
jsoref Sep 15, 2021
9c539d3
spelling: itself
jsoref Sep 15, 2021
fcba477
spelling: lead
jsoref Mar 27, 2022
1e6458d
spelling: least
jsoref Sep 15, 2021
1c7edfb
spelling: likelihood
jsoref Sep 15, 2021
54ae059
spelling: locally
jsoref Sep 15, 2021
70ef55d
spelling: maintenance
jsoref Sep 15, 2021
d577c1b
spelling: match
jsoref Sep 15, 2021
356ce8b
spelling: nonexistent
jsoref Sep 15, 2021
3d11d27
spelling: normally
jsoref Sep 15, 2021
e9408ab
spelling: notification
jsoref Sep 15, 2021
a005a33
spelling: notifications
jsoref Sep 15, 2021
9d669d5
spelling: oauth
jsoref Sep 15, 2021
97dfb83
spelling: occurred
jsoref Sep 15, 2021
de61ac2
spelling: occurring
jsoref Sep 15, 2021
43fe958
spelling: omitted
jsoref Sep 15, 2021
78f499c
spelling: opened
jsoref Sep 15, 2021
a52bc3a
spelling: openidconnect
jsoref Sep 15, 2021
e564993
spelling: optimization
jsoref Sep 15, 2021
2304ff3
spelling: optionally
jsoref Sep 15, 2021
9eeab3c
spelling: overridable
jsoref Sep 15, 2021
74411b9
spelling: overridden
jsoref Sep 15, 2021
2187a19
spelling: overwrite
jsoref Sep 15, 2021
5e1cf43
spelling: perform
jsoref Sep 15, 2021
662a65d
spelling: performance
jsoref Sep 15, 2021
280332b
spelling: permission
jsoref Sep 15, 2021
61cd53c
spelling: permissions
jsoref Sep 15, 2021
f0eef39
spelling: persistent
jsoref Sep 15, 2021
cc57718
spelling: possibility
jsoref Sep 15, 2021
ed542f0
spelling: possible
jsoref Sep 15, 2021
89615f3
spelling: precedence
jsoref Sep 15, 2021
6412ee8
spelling: presentation
jsoref Sep 15, 2021
547f0ae
spelling: processing
jsoref Sep 15, 2021
ed4bfab
spelling: progress
jsoref Sep 15, 2021
f1f1e0c
spelling: prompt
jsoref Sep 15, 2021
c4498f6
spelling: received
jsoref Sep 15, 2021
32d32d1
spelling: recent
jsoref Sep 15, 2021
bae6090
spelling: recursion
jsoref Sep 15, 2021
dd58f49
spelling: registry
jsoref Sep 15, 2021
30dc1b0
spelling: remaining
jsoref Sep 15, 2021
4615d6c
spelling: repositories
jsoref Sep 15, 2021
655bff2
spelling: retrieve
jsoref Sep 15, 2021
0d786b2
spelling: retrieved
jsoref Sep 15, 2021
f5296ef
spelling: returns
jsoref Sep 15, 2021
9e0d32c
spelling: separate
jsoref Sep 15, 2021
9fdc46e
spelling: separator
jsoref Sep 15, 2021
50fcc57
spelling: setups
jsoref Sep 15, 2021
592cb7c
spelling: several
jsoref Sep 15, 2021
6b4e2c1
spelling: sibling
jsoref Sep 15, 2021
2ce88b3
spelling: similarly
jsoref Sep 15, 2021
b58cccc
spelling: something
jsoref Sep 15, 2021
39c1945
spelling: successful
jsoref Sep 15, 2021
014f69e
spelling: suddenly
jsoref Sep 15, 2021
42d8f08
spelling: symmetric
jsoref Sep 15, 2021
35cfb78
spelling: symmetry
jsoref Sep 15, 2021
59b7cab
spelling: that
jsoref Mar 27, 2022
e5c959f
spelling: the
jsoref Mar 27, 2022
cc6fc0b
spelling: their
jsoref Sep 15, 2021
d73ae05
spelling: tracker
jsoref Sep 15, 2021
51fe990
spelling: transferred
jsoref Sep 15, 2021
88db0e6
spelling: truncate
jsoref Sep 15, 2021
6fb88e7
spelling: upscaling
jsoref Sep 15, 2021
6d43b56
spelling: useful
jsoref Sep 15, 2021
abd39ee
spelling: variable
jsoref Sep 15, 2021
f817670
spelling: whether
jsoref Sep 15, 2021
74cbfe9
spelling: written
jsoref Sep 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .craft.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Branch = master
ShallowClone = False

# Variables defined here override the default value
# The variable names are casesensitive
# The variable names are case-sensitive
[Variables]
#Values need to be overwritten to create a chache
#Values need to be overwritten to create a cache
UseCache = True
CreateCache = True

Expand All @@ -17,7 +17,7 @@ QtVersion = 5.15.2
CachePatchLvl = 5

# set WORKSPACE to cwd, override on ci
# with legacy fallbac APPVEYOR_BUILD_FOLDER
# with legacy fallback APPVEYOR_BUILD_FOLDER
WORKSPACE = ${Variables:APPVEYOR_BUILD_FOLDER}
APPVEYOR_BUILD_FOLDER = ${Variables:Root}
CiBuild = True
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We are also available on [IRC][irc].
* __Important__: When reporting an issue provide as much requested information as possible, we :heart: log files.
* __SECURITY__: Report any potential security bug to security@owncloud.com following our [security policy](https://owncloud.com/security/) instead of filing an issue in our bug tracker
* This repository is *only* for issues within the ownCloud desktop client.
Issues in other components should be reported in their own repositores:
Issues in other components should be reported in their own repositories:
- [ownCloud server](https://github.com/owncloud/core/issues)
- [ownCloud apps](https://github.com/owncloud/apps/issues) (e.g. Calendar,
Contacts...)
Expand Down
2 changes: 1 addition & 1 deletion admin/osx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Check if varialbe MAC_INSTALLER_BACKGROUND_FILE is defined. That might come
# Check if variable MAC_INSTALLER_BACKGROUND_FILE is defined. That might come
# from the OEM.cmake for branded clients or from OWNCLOUD.cmake for the non
# branded client.
# Make sure that the MAC_INSTALLER_BACKGROUND_FILE contains the full path, ie.
Expand Down
4 changes: 2 additions & 2 deletions admin/osx/macosx.pkgproj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
<dict>
<key>ALIGNMENT</key>
<integer>6</integer>
<key>APPAREANCES</key>
<key>APPEARANCES</key>
<dict>
<key>DARK_AQUA</key>
<dict>
Expand Down Expand Up @@ -642,7 +642,7 @@
<integer>0</integer>
<key>SCALING</key>
<integer>0</integer>
<key>SHARED_SETTINGS_FOR_ALL_APPAREANCES</key>
<key>SHARED_SETTINGS_FOR_ALL_APPEARANCES</key>
<true/>
</dict>
<key>INSTALLATION TYPE</key>
Expand Down
2 changes: 1 addition & 1 deletion admin/osx/pre_install.sh.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# BASH_XTRACEFD=1
# set -x

# don't grep in one line, to avaoid grepping the grep process...
# don't grep in one line, to avoid grepping the grep process...
PROCESSES=$(ps aux)
OC_INSTANCE=$(echo "${PROCESSES}" | grep "/Applications/@APPLICATION_EXECUTABLE@.app/Contents/MacOS/@APPLICATION_EXECUTABLE@")

Expand Down
2 changes: 1 addition & 1 deletion changelog/2.10.1_2022-04-05/9236
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bugfix: Client warns about non exisitng files
Bugfix: Client warns about nonexistent files

We fixed a bug where the client warns about ignored files that where added to the DB in previous versions of the client and do no longer exist.

Expand Down
2 changes: 1 addition & 1 deletion changelog/2.10.1_2022-04-05/9375
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bugfix: Raise ssl issue dialoig above the wizard
Bugfix: Raise ssl issue dialog above the wizard

Under certain conditions it was possible that the ssl dialog was hidden behind the wizard.

Expand Down
2 changes: 1 addition & 1 deletion changelog/2.10.1_2022-04-05/9383
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Bugfix: Don't reset change time on upload

We fixed a bug where we reset the change time of Windows placeholder files to the value in the database during uploads.
This cold cause other applications to detect non existing changes in that file.
This cold cause other applications to detect nonexistent changes in that file.

https://github.com/owncloud/client/issues/9383
https://github.com/owncloud/client-desktop-vfs-win/pull/16
2 changes: 1 addition & 1 deletion changelog/2.10.1_2022-04-05/9533
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bugfix: Possible crash when removing non exisitng folder
Bugfix: Possible crash when removing nonexistent folder


https://github.com/owncloud/client/issues/9533
2 changes: 1 addition & 1 deletion resources/font-awesome/update_color.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $COLOR=$Args[0]
Write-Host "Color:" $COLOR
if (-not $COLOR) {
Write-Host "Please specify color"
Write-Host "update_corlor.ps1 `"#B5B6BB`""
Write-Host "update_color.ps1 `"#B5B6BB`""
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the output match the filename...

exit(1)
}
Get-ChildItem "*.svg" | % {
Expand Down
2 changes: 1 addition & 1 deletion shell_integration/dolphin/ownclouddolphinactionplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class OwncloudDolphinPluginAction : public KAbstractFileItemActionPlugin

auto menu = new QMenu(parentWidget);
QEventLoop loop;
auto con = connect(helper, &OwncloudDolphinPluginHelper::commandRecieved, this, [&](const QByteArray &cmd) {
auto con = connect(helper, &OwncloudDolphinPluginHelper::commandReceived, this, [&](const QByteArray &cmd) {
if (cmd.startsWith("GET_MENU_ITEMS:END")) {
loop.quit();
} else if (cmd.startsWith("MENU_ITEM:")) {
Expand Down
8 changes: 4 additions & 4 deletions shell_integration/dolphin/ownclouddolphinoverlayplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class OwncloudDolphinPlugin : public KOverlayIconPlugin

OwncloudDolphinPlugin() {
auto helper = OwncloudDolphinPluginHelper::instance();
QObject::connect(helper, &OwncloudDolphinPluginHelper::commandRecieved,
this, &OwncloudDolphinPlugin::slotCommandRecieved);
QObject::connect(helper, &OwncloudDolphinPluginHelper::commandReceived,
this, &OwncloudDolphinPlugin::slotCommandReceived);
}

QStringList getOverlays(const QUrl& url) override {
Expand Down Expand Up @@ -80,8 +80,8 @@ class OwncloudDolphinPlugin : public KOverlayIconPlugin
return r;
}

void slotCommandRecieved(const QByteArray &line) {

void slotCommandReceived(const QByteArray &line)
{
QList<QByteArray> tokens = line.split(':');
if (tokens.count() != 3)
return;
Expand Down
2 changes: 1 addition & 1 deletion shell_integration/dolphin/ownclouddolphinpluginhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,6 @@ void OwncloudDolphinPluginHelper::slotReadyRead()
}
}

emit commandRecieved(line);
emit commandReceived(line);
}
}
2 changes: 1 addition & 1 deletion shell_integration/dolphin/ownclouddolphinpluginhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class OWNCLOUDDOLPHINPLUGINHELPER_EXPORT OwncloudDolphinPluginHelper : public QO
QByteArray version() { return _version; }

signals:
void commandRecieved(const QByteArray &cmd);
void commandReceived(const QByteArray &cmd);

protected:
void timerEvent(QTimerEvent*) override;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# Dimensions taken from https://www.apriorit.com/dev-blog/357-shell-extentions-basics-samples-common-problems#_Toc408244375
# Dimensions taken from https://www.apriorit.com/dev-blog/357-shell-extensions-basics-samples-common-problems#_Toc408244375
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert -background transparent attention.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/Warning.ico
convert -background transparent error.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/Error.ico
convert -background transparent ok.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/OK.ico
Expand Down
2 changes: 1 addition & 1 deletion shell_integration/nautilus/syncstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _connectToSocketServer(self):
return False # Don't run again
except Exception as e:
print("Could not connect to unix socket " + sock_file + ". " + str(e))
except Exception as e: # Bad habbit
except Exception as e: # Bad habit
print("Connect could not be established, try again later.")
self._sock.close()

Expand Down
2 changes: 1 addition & 1 deletion shell_integration/windows/3rdparty/nlohmann-json/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22282,7 +22282,7 @@ class basic_json
/*!
@brief updates a JSON object from another object, overwriting existing keys

Inserts all values from from range `[first, last)` and overwrites existing
Inserts all values from range `[first, last)` and overwrites existing
keys.

@param[in] first begin of the range of elements to insert
Expand Down
6 changes: 3 additions & 3 deletions shell_integration/windows/OCContextMenu/OCContextMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ IFACEMETHODIMP OCContextMenu::Initialize(

#pragma region IContextMenu

void InsertSeperator(HMENU hMenu, UINT indexMenu)
void InsertSeparator(HMENU hMenu, UINT indexMenu)
{
// Add a separator.
MENUITEMINFO sep = { sizeof(sep) };
Expand All @@ -140,7 +140,7 @@ IFACEMETHODIMP OCContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(0));
}

InsertSeperator(hMenu, indexMenu++);
InsertSeparator(hMenu, indexMenu++);

HMENU hSubmenu = CreateMenu();
{
Expand All @@ -157,7 +157,7 @@ IFACEMETHODIMP OCContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT
if (!InsertMenuItem(hMenu, indexMenu++, TRUE, &mii))
return HRESULT_FROM_WIN32(GetLastError());
}
InsertSeperator(hMenu, indexMenu++);
InsertSeparator(hMenu, indexMenu++);

UINT indexSubMenu = 0;
for (auto &item : m_info.menuItems) {
Expand Down
4 changes: 2 additions & 2 deletions shell_integration/windows/OCOverlays/OCOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ IFACEMETHODIMP_(ULONG) OCOverlay::Release()

IFACEMETHODIMP OCOverlay::GetPriority(int *pPriority)
{
// this defines which handler has prededence, so
// we order this in terms of likelyhood
// this defines which handler has precedence, so
// we order this in terms of likelihood
switch (_state) {
case State_OK:
*pPriority = 0; break;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The below file is being renamed from deprACtion to depreCAtion:

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/common/filesystembase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ bool FileSystem::uncheckedRenameReplace(const QString &originFileName,
#ifndef Q_OS_WIN
bool success;
QFile orig(originFileName);
// We want a rename that also overwites. QFile::rename does not overwite.
// We want a rename that also overwrites. QFile::rename does not overwrite.
// Qt 5.1 has QSaveFile::renameOverwrite we could use.
// ### FIXME
success = true;
Expand Down
2 changes: 1 addition & 1 deletion src/common/fixedsizeringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace OCC {

/**
* A Fixed sized ring buffer optimized on continouous insertion
* A Fixed sized ring buffer optimized on continuous insertion
*/
template <typename TYPE>
class FixedSizeRingBuffer
Expand Down
47 changes: 25 additions & 22 deletions src/common/syncjournaldb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
*/

#include <QCryptographicHash>
#include <QDir>
#include <QElapsedTimer>
#include <QFile>
#include <QLoggingCategory>
#include <QStringList>
#include <QElapsedTimer>
#include <QUrl>
#include <QDir>
#include <sqlite3.h>
#include <cstring>
#include <sqlite3.h>
Comment on lines +20 to +27
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reordering is done in a distinct commit before my work because my work tripped on a linter. I think that I've included enough to prevent this from happening to the next hapless contributor, but I'd encourage someone to check.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheOneRing re #9044 (comment) this is:
jsoref@51b6bb7

I'd encourage you to merge that commit outside of this PR, since it really doesn't belong, but the linter failed and it was way too messy for me to handle it any other way here. -- And the only way to show it mattered was to compose this PR.


#include "common/asserts.h"
#include "common/checksums.h"
Expand Down Expand Up @@ -354,14 +354,16 @@ bool SyncJournalDb::checkConnect()
}
}

sqlite3_create_function(_db.sqliteDb(), "parent_hash", 1, SQLITE_UTF8 | SQLITE_DETERMINISTIC, nullptr,
[] (sqlite3_context *ctx,int, sqlite3_value **argv) {
auto text = reinterpret_cast<const char*>(sqlite3_value_text(argv[0]));
const char *end = std::strrchr(text, '/');
if (!end) end = text;
sqlite3_result_int64(ctx, c_jhash64(reinterpret_cast<const uint8_t*>(text),
end - text, 0));
}, nullptr, nullptr);
sqlite3_create_function(
_db.sqliteDb(), "parent_hash", 1, SQLITE_UTF8 | SQLITE_DETERMINISTIC, nullptr,
[](sqlite3_context *ctx, int, sqlite3_value **argv) {
auto text = reinterpret_cast<const char *>(sqlite3_value_text(argv[0]));
const char *end = std::strrchr(text, '/');
if (!end)
end = text;
sqlite3_result_int64(ctx, c_jhash64(reinterpret_cast<const uint8_t *>(text), end - text, 0));
},
nullptr, nullptr);

/* Because insert is so slow, we do everything in a transaction, and only need one call to commit */
startTransaction();
Expand Down Expand Up @@ -391,7 +393,7 @@ bool SyncJournalDb::checkConnect()
#ifndef SQLITE_IOERR_SHMMAP
// Requires sqlite >= 3.7.7 but old CentOS6 has sqlite-3.6.20
// Definition taken from https://sqlite.org/c3ref/c_abort_rollback.html
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21 << 8))
#endif

if (!createQuery.exec()) {
Expand Down Expand Up @@ -824,7 +826,7 @@ bool SyncJournalDb::updateErrorBlacklistTableStructure()
SqlQuery query(_db);
query.prepare("CREATE INDEX IF NOT EXISTS blacklist_index ON blacklist(path collate nocase);");
if (!query.exec()) {
sqlFail(QStringLiteral("updateErrorBlacklistTableStructure: create index blacklit"), query);
sqlFail(QStringLiteral("updateErrorBlacklistTableStructure: create index blacklist"), query);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I'm only running a spell checker. Modern practices discourage the use of this term entirely, and that's far beyond the scope of this PR.

(If you adopt a spell checker, you could add this word to a reject list to prevent people from using it going forward...)

re = false;
}

Expand Down Expand Up @@ -1081,7 +1083,7 @@ bool SyncJournalDb::getFileRecordsByFileId(const QByteArray &fileId, const std::
return true;
}

bool SyncJournalDb::getFilesBelowPath(const QByteArray &path, const std::function<void(const SyncJournalFileRecord&)> &rowCallback)
bool SyncJournalDb::getFilesBelowPath(const QByteArray &path, const std::function<void(const SyncJournalFileRecord &)> &rowCallback)
{
QMutexLocker locker(&_mutex);

Expand Down Expand Up @@ -1110,7 +1112,7 @@ bool SyncJournalDb::getFilesBelowPath(const QByteArray &path, const std::functio
return true;
};

if(path.isEmpty()) {
if (path.isEmpty()) {
// Since the path column doesn't store the starting /, the getFilesBelowPathQuery
// can't be used for the root path "". It would scan for (path > '/' and path < '0')
// and find nothing. So, unfortunately, we have to use a different query for
Expand Down Expand Up @@ -1140,8 +1142,8 @@ bool SyncJournalDb::getFilesBelowPath(const QByteArray &path, const std::functio
}
}

bool SyncJournalDb::listFilesInPath(const QByteArray& path,
const std::function<void (const SyncJournalFileRecord &)>& rowCallback)
bool SyncJournalDb::listFilesInPath(const QByteArray &path,
const std::function<void(const SyncJournalFileRecord &)> &rowCallback)
{
QMutexLocker locker(&_mutex);

Expand Down Expand Up @@ -1864,8 +1866,8 @@ int SyncJournalDb::mapChecksumType(const QByteArray &checksumType)
return 0;
}

auto it = _checksymTypeCache.find(checksumType);
if (it != _checksymTypeCache.end())
auto it = _checksumTypeCache.find(checksumType);
if (it != _checksumTypeCache.end())
return *it;

// Ensure the checksum type is in the db
Expand Down Expand Up @@ -1896,7 +1898,7 @@ int SyncJournalDb::mapChecksumType(const QByteArray &checksumType)
return 0;
}
auto value = query->intValue(0);
_checksymTypeCache[checksumType] = value;
_checksumTypeCache[checksumType] = value;
return value;
}
}
Expand Down Expand Up @@ -2046,7 +2048,8 @@ void SyncJournalDb::markVirtualFileForDownloadRecursively(const QByteArray &path
static_assert(ItemTypeVirtualFile == 4 && ItemTypeVirtualFileDownload == 5, "");
SqlQuery query("UPDATE metadata SET type=5 WHERE "
"(" IS_PREFIX_PATH_OF("?1", "path") " OR ?1 == '') "
"AND type=4;", _db);
"AND type=4;",
_db);
query.bindValue(1, path);
query.exec();

Expand Down Expand Up @@ -2202,7 +2205,7 @@ SyncJournalDb::PinStateInterface::rawList()

SyncJournalDb::PinStateInterface SyncJournalDb::internalPinStates()
{
return {this};
return { this };
}

void SyncJournalDb::commit(const QString &context, bool startTrans)
Expand Down
6 changes: 3 additions & 3 deletions src/common/syncjournaldb.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ class OCSYNC_EXPORT SyncJournalDb : public QObject
* This usually creates some temporary files next to the db file, like
* $dbfile-shm or $dbfile-wal.
*
* returns true if it could be openend or is currently opened.
* returns true if it could be opened or is currently opened.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a purely spell-checking oriented PR. Grammatically, I'd probably write is currently or could be opened.

*/
bool open();

/** Returns whether the db is currently openend. */
/** Returns whether the db is currently opened. */
bool isOpen();

/** Close the database */
Expand Down Expand Up @@ -386,7 +386,7 @@ class OCSYNC_EXPORT SyncJournalDb : public QObject
SqlDatabase _db;
QString _dbFile;
QMutex _mutex; // Public functions are protected with the mutex.
QMap<QByteArray, int> _checksymTypeCache;
QMap<QByteArray, int> _checksumTypeCache;
int _transaction;
bool _metadataTableIsEmpty;

Expand Down
2 changes: 1 addition & 1 deletion src/common/syncjournalfilerecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class OCSYNC_EXPORT SyncJournalErrorBlacklistRecord
QString _file;
QString _renameTarget;

/// The last X-Request-ID of the request that failled
/// The last X-Request-ID of the request that failed
QByteArray _requestId;

bool isValid() const;
Expand Down
2 changes: 1 addition & 1 deletion src/common/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void Utility::usleep(int usec)
QThread::usleep(usec);
}

// This can be overriden from the tests
// This can be overridden from the tests
OCSYNC_EXPORT bool fsCasePreserving_override = []() -> bool {
static bool ok = false;
static int env = qEnvironmentVariableIntValue("OWNCLOUD_TEST_CASE_PRESERVING", &ok);
Expand Down