Skip to content

Commit

Permalink
Merge branch 'nextcloud:master' into nmc/2027-custom-build
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenMCloud authored Mar 18, 2024
2 parents 64b102e + 3ea60ee commit 204fa98
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 44 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linux-clang-compile-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
jobs:
build:
name: Linux Clang compilation and tests
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-15
steps:
- uses: actions/checkout@v4
Expand All @@ -15,11 +15,11 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake .. -G Ninja -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
ninja
- name: Run tests
run: |
cd build
useradd -m -s /bin/bash test
chown -R test:test .
su -c 'ASAN_OPTIONS=detect_odr_violation=0,detect_leaks=0 xvfb-run ctest --output-on-failure' test
su -c 'xvfb-run ctest --output-on-failure' test
6 changes: 3 additions & 3 deletions .github/workflows/linux-gcc-compile-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
jobs:
build:
name: Linux GCC compilation and tests
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-15
steps:
- uses: actions/checkout@v4
Expand All @@ -15,11 +15,11 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake .. -G Ninja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64
ninja
- name: Run tests
run: |
cd build
useradd -m -s /bin/bash test
chown -R test:test .
su -c 'ASAN_OPTIONS=detect_odr_violation=0,detect_leaks=0 xvfb-run ctest --output-on-failure' test
su -c 'xvfb-run ctest --output-on-failure' test
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
jobs:
build:
name: SonarCloud analysis
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-15
env:
SONAR_SERVER_URL: "https://sonarcloud.io"
Expand All @@ -25,7 +25,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DBUILD_COVERAGE=ON -DOPENSSL_ROOT_DIR=/usr/local/lib64
cmake .. -G Ninja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 -DBUILD_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions src/gui/accountstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ void AccountState::setState(State state)

if (_state == SignedOut) {
_connectionStatus = ConnectionValidator::Undefined;
_connectionErrors.clear();
} else if (oldState == SignedOut && _state == Disconnected) {
// If we stop being voluntarily signed-out, try to connect and
// auth right now!
Expand Down Expand Up @@ -297,8 +296,9 @@ void AccountState::checkConnectivity()
return;
}

auto *conValidator = new ConnectionValidator(AccountStatePtr(this));
auto *conValidator = new ConnectionValidator(AccountStatePtr(this), _connectionErrors);
_connectionValidator = conValidator;
_connectionErrors.clear();
connect(conValidator, &ConnectionValidator::connectionResult,
this, &AccountState::slotConnectionValidatorResult);
if (isConnected()) {
Expand Down
5 changes: 3 additions & 2 deletions src/gui/connectionvalidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Q_LOGGING_CATEGORY(lcConnectionValidator, "nextcloud.sync.connectionvalidator",
// This makes sure we get tried often enough without "ConnectionValidator already running"
static qint64 timeoutToUseMsec = qMax(1000, ConnectionValidator::DefaultCallingIntervalMsec - 5 * 1000);

ConnectionValidator::ConnectionValidator(AccountStatePtr accountState, QObject *parent)
ConnectionValidator::ConnectionValidator(AccountStatePtr accountState, const QStringList &previousErrors, QObject *parent)
: QObject(parent)
, _previousErrors(previousErrors)
, _accountState(accountState)
, _account(accountState->account())
{
Expand Down Expand Up @@ -331,7 +332,7 @@ void ConnectionValidator::reportResult(Status status)
emit connectionResult(status, _errors);

// notify user of errors
if (!_errors.isEmpty()) {
if (!_errors.isEmpty() && _previousErrors != _errors) {
showSystrayErrorMessage();
}

Expand Down
5 changes: 4 additions & 1 deletion src/gui/connectionvalidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ class ConnectionValidator : public QObject
{
Q_OBJECT
public:
explicit ConnectionValidator(AccountStatePtr accountState, QObject *parent = nullptr);
explicit ConnectionValidator(AccountStatePtr accountState,
const QStringList &previousErrors,
QObject *parent = nullptr);

enum Status {
Undefined,
Expand Down Expand Up @@ -142,6 +144,7 @@ protected slots:
*/
bool setAndCheckServerVersion(const QString &version);

const QStringList _previousErrors;
QStringList _errors;
AccountStatePtr _accountState;
AccountPtr _account;
Expand Down
4 changes: 2 additions & 2 deletions translations/client_en_GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3962,7 +3962,7 @@ This is a new, experimental mode. If you decide to use it, please report any iss
<location filename="../src/libsync/owncloudpropagator.cpp" line="1469"/>
<location filename="../src/libsync/owncloudpropagator.cpp" line="1494"/>
<source>The folder %1 cannot be made read-only: %2</source>
<translation type="unfinished"/>
<translation>The folder %1 cannot be made read-only: %2</translation>
</message>
<message>
<location filename="../src/libsync/owncloudpropagator.cpp" line="1387"/>
Expand Down Expand Up @@ -4084,7 +4084,7 @@ This is a new, experimental mode. If you decide to use it, please report any iss
<message>
<location filename="../src/libsync/propagatorjobs.cpp" line="222"/>
<source>The folder %1 cannot be made read-only: %2</source>
<translation type="unfinished"/>
<translation>The folder %1 cannot be made read-only: %2</translation>
</message>
<message>
<location filename="../src/libsync/propagatorjobs.cpp" line="200"/>
Expand Down
14 changes: 7 additions & 7 deletions translations/client_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,25 +226,25 @@
<message>
<location filename="../src/gui/macOS/ui/FileProviderEvictionDialog.qml" line="49"/>
<source>Materialised items</source>
<translation type="unfinished"/>
<translation>Elementos materializados</translation>
</message>
<message>
<location filename="../src/gui/macOS/ui/FileProviderEvictionDialog.qml" line="61"/>
<source>Reload</source>
<translation type="unfinished"/>
<translation>Recargar</translation>
</message>
</context>
<context>
<name>FileProviderFastEnumerationSettings</name>
<message>
<location filename="../src/gui/macOS/ui/FileProviderFastEnumerationSettings.qml" line="38"/>
<source>Enable fast sync</source>
<translation type="unfinished"/>
<translation>Habilitar sincronización rápida</translation>
</message>
<message>
<location filename="../src/gui/macOS/ui/FileProviderFastEnumerationSettings.qml" line="53"/>
<source>Fast sync will only sync changes in files and folders within folders that have been explored. This can significantly increase responsiveness on initial configuration of virtual files. However, it will cause redundant downloads of files moved to an unexplored folder. </source>
<translation type="unfinished"/>
<translation>La sincronización rápida sólo sincronizará los cambios en archivos y carpetas dentro de las carpetas que se han explorado. Esto puede incrementar significativamente la capacidad de respuesta en la configuración inicial de archivos virtuales. Sin embargo, esto provocará descargas redundantes de archivos movidos a carpetas inexploradas.</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -303,7 +303,7 @@
<message>
<location filename="../src/gui/macOS/ui/FileProviderStorageInfo.qml" line="58"/>
<source>Evict local copies...</source>
<translation type="unfinished"/>
<translation>Desalojar las copias locales...</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -3964,7 +3964,7 @@ Esta es un modo nuevo y experimental. Si decides usarlo, por favor, informa de c
<location filename="../src/libsync/owncloudpropagator.cpp" line="1469"/>
<location filename="../src/libsync/owncloudpropagator.cpp" line="1494"/>
<source>The folder %1 cannot be made read-only: %2</source>
<translation type="unfinished"/>
<translation>La carpeta %1 no se puede hacer de sólo lectura: %2</translation>
</message>
<message>
<location filename="../src/libsync/owncloudpropagator.cpp" line="1387"/>
Expand Down Expand Up @@ -4086,7 +4086,7 @@ Esta es un modo nuevo y experimental. Si decides usarlo, por favor, informa de c
<message>
<location filename="../src/libsync/propagatorjobs.cpp" line="222"/>
<source>The folder %1 cannot be made read-only: %2</source>
<translation type="unfinished"/>
<translation>La carpeta %1 no se puede hacer de sólo lectura: %2</translation>
</message>
<message>
<location filename="../src/libsync/propagatorjobs.cpp" line="200"/>
Expand Down
Loading

0 comments on commit 204fa98

Please sign in to comment.