Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.18)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(VERSION.cmake)
Expand Down
5 changes: 5 additions & 0 deletions src/common/syncjournaldb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,11 @@ void SyncJournalDb::markVirtualFileForDownloadRecursively(const QByteArray &path
query.exec();
}

SyncJournalDb::PinStateInterface::PinStateInterface(SyncJournalDb *db)
: _db(db)
{
}

Optional<PinState> SyncJournalDb::PinStateInterface::rawForPath(const QByteArray &path)
{
QMutexLocker lock(&_db->_mutex);
Expand Down
1 change: 1 addition & 0 deletions src/common/syncjournaldb.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ class OCSYNC_EXPORT SyncJournalDb : public QObject
*/
struct OCSYNC_EXPORT PinStateInterface
{
PinStateInterface(SyncJournalDb *db);
PinStateInterface(const PinStateInterface &) = delete;
PinStateInterface(PinStateInterface &&) = delete;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/accountstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ UpdateUrlDialog *AccountState::updateUrlDialog(const QUrl &newUrl)

_updateUrlDialog = UpdateUrlDialog::fromAccount(_account, newUrl, ocApp()->settingsDialog());

connect(_updateUrlDialog, &UpdateUrlDialog::accepted, this, [=]() {
connect(_updateUrlDialog, &UpdateUrlDialog::accepted, this, [newUrl, this]() {
_account->setUrl(newUrl);
Q_EMIT _account->wantsAccountSaved(_account.data());
Q_EMIT urlUpdated();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/newwizard/pages/accountconfiguredwizardpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ AccountConfiguredWizardPage::AccountConfiguredWizardPage(
_ui->useVfsRadioButton->setToolTip(tr("The virtual filesystem feature is not available for this installation."));
}

connect(_ui->chooseLocalDirectoryButton, &QToolButton::clicked, this, [=]() {
connect(_ui->chooseLocalDirectoryButton, &QToolButton::clicked, this, [this]() {
auto dialog = new QFileDialog(this, tr("Select the local folder"), _ui->localDirectoryLineEdit->text());
dialog->setFileMode(QFileDialog::Directory);
dialog->setOption(QFileDialog::ShowDirsOnly);
Expand Down
4 changes: 2 additions & 2 deletions src/gui/newwizard/states/oauthcredentialssetupwizardstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ OAuthCredentialsSetupWizardState::OAuthCredentialsSetupWizardState(SetupWizardCo
// bring window up top again, as the browser may have been raised in front of it
_context->window()->raise();

auto finish = [=]() {
auto finish = [result, token, refreshToken, this] {
switch (result) {
case OAuth::Result::LoggedIn: {
_context->accountBuilder().setAuthenticationStrategy(new OAuth2AuthenticationStrategy(token, refreshToken));
Expand All @@ -64,7 +64,7 @@ OAuthCredentialsSetupWizardState::OAuthCredentialsSetupWizardState(SetupWizardCo
if (!_context->accountBuilder().webFingerAuthenticationServerUrl().isEmpty()) {
auto *job = Jobs::WebFingerInstanceLookupJobFactory(_context->accessManager(), token).startJob(_context->accountBuilder().serverUrl(), this);

connect(job, &CoreJob::finished, this, [=]() {
connect(job, &CoreJob::finished, this, [finish, job, this]() {
if (!job->success()) {
Q_EMIT evaluationFailed(QStringLiteral("Failed to look up instances: %1").arg(job->errorMessage()));
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
item->_modtime = serverEntry.modtime;
item->_size = serverEntry.size;

auto postProcessServerNew = [=]() mutable {
auto postProcessServerNew = [=, this]() mutable {
// Turn new remote files into virtual files if the option is enabled.
// TODO: move the decision to the backend
const auto &opts = _discoveryData->_syncOptions;
Expand Down Expand Up @@ -546,7 +546,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
// we need to make a request to the server to know that the original file is deleted on the server
_pendingAsyncJobs++;
auto job = new RequestEtagJob(_discoveryData->_account, _discoveryData->_baseUrl, _discoveryData->_remoteFolder + originalPath, this);
connect(job, &RequestEtagJob::finishedSignal, this, [=]() mutable {
connect(job, &RequestEtagJob::finishedSignal, this, [=, this]() mutable {
_pendingAsyncJobs--;
QTimer::singleShot(0, _discoveryData, &DiscoveryPhase::scheduleMoreJobs);
if (job->httpStatusCode() == 207 ||
Expand Down
Loading