Skip to content

Commit

Permalink
Merge branch 'master' into foreground-background
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiehupp authored Nov 15, 2021
2 parents 086ed51 + df745ef commit 9f91c62
Show file tree
Hide file tree
Showing 377 changed files with 47,403 additions and 12,943 deletions.
4 changes: 3 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
BasedOnStyle: WebKit

Standard: Cpp11
ColumnLimit: 0
ColumnLimit: 120

# Disable reflow of qdoc comments: indentation rules are different.
# Translation comments are also excluded
Expand Down Expand Up @@ -61,3 +61,5 @@ ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCH
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false

SpaceBeforeCpp11BracedList: false
Cpp11BracedListStyle: true
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Checks: '-*,
modernize-use-nodiscard,
modernize-use-equals-default,
modernize-use-noexcept,
modernize-user-override,
modernize-use-override,
modernize-use-nullptr,
modernize-use-transparent-functors,
modernize-use-uncaught-exceptions,
Expand Down
32 changes: 16 additions & 16 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
kind: pipeline
name: qt-5.12
name: qt-5.15

steps:
- name: cmake
image: ghcr.io/nextcloud/continuous-integration-client:client-5.12-18
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address ../src
- cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
- name: compile
image: ghcr.io/nextcloud/continuous-integration-client:client-5.12-18
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- make -j$(nproc)
- name: test
image: ghcr.io/nextcloud/continuous-integration-client:client-5.12-18
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- useradd -m -s /bin/bash test
- chown -R test:test .
- su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test
- su -c 'ASAN_OPTIONS=detect_leaks=0 xvfb-run ctest --output-on-failure' test

volumes:
- name: build
Expand All @@ -43,37 +43,37 @@ trigger:

---
kind: pipeline
name: qt-5.12-clang
name: qt-5.15-clang

steps:
- name: cmake
image: ghcr.io/nextcloud/continuous-integration-client:client-5.12-18
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clazy -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address ../src
- cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Debug -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
- name: compile
image: ghcr.io/nextcloud/continuous-integration-client:client-5.12-18
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- ninja 2>1 | /drone/src/admin/linux/count_compiler_warnings.py /drone/src
- ninja
- name: test
image: ghcr.io/nextcloud/continuous-integration-client:client-5.12-18
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- useradd -m -s /bin/bash test
- chown -R test:test .
- su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test
- su -c 'ASAN_OPTIONS=detect_leaks=0 xvfb-run ctest --output-on-failure' test
- name: clang-tidy
image: ghcr.io/nextcloud/continuous-integration-client:client-5.12-18
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
volumes:
- name: build
path: /drone/build
Expand All @@ -98,14 +98,14 @@ name: AppImage

steps:
- name: build
image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-1
image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-3
environment:
CI_UPLOAD_GIT_TOKEN:
from_secret: CI_UPLOAD_GIT_TOKEN
CI_UPLOAD_GIT_USERNAME:
from_secret: CI_UPLOAD_GIT_USERNAME
commands:
- /bin/bash -c "./admin/linux/build-appimage.sh"
- BUILDNR=$DRONE_BUILD_NUMBER VERSION_SUFFIX=$DRONE_PULL_REQUEST BUILD_UPDATER=ON DESKTOP_CLIENT_ROOT=$DRONE_WORKSPACE /bin/bash -c "./admin/linux/build-appimage.sh"
- /bin/bash -c "./admin/linux/upload-appimage.sh" || echo "Upload failed, however this is an optional step."
trigger:
branch:
Expand Down
31 changes: 25 additions & 6 deletions .github/workflows/command-rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,44 @@
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Rebase command

on:
issue_comment:
types: [ created ]
name: Automatic Rebase
types: created

jobs:
rebase:
name: Rebase
runs-on: ubuntu-latest

# On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest

steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"

- name: Checkout the latest code
uses: actions/checkout@v2
with:
fetch-depth: 0

token: ${{ secrets.COMMAND_BOT_PAT }}

- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}

- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@v1
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"
50 changes: 50 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: SonarCloud analysis
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
env:
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Restore cache
uses: actions/cache@v2
with:
path: /cache
key: ${{ runner.os }}

- name: Run build-wrapper
run: |
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DBUILD_COVERAGE=ON
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j 2
- name: Run tests
run: |
cd build
useradd -m -s /bin/bash test
chown -R test:test .
su -c 'xvfb-run ctest --output-on-failure --output-junit testResult.xml' test
- name: Generate coverage report
run: |
cd build
su -c 'ctest -T Coverage' test
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
cp sonar-project.properties build
cd build
sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
1 change: 1 addition & 0 deletions .tx/nextcloud.client-desktop/bg_translation
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ Icon=@APPLICATION_EXECUTABLE@

# Translations
Icon[bg_BG]=@APPLICATION_ICON_NAME@
Name[bg_BG]=@APPLICATION_NAME@ десктоп клиент за синхронизиране
Comment[bg_BG]=@APPLICATION_NAME@ десктоп клиент за синхронизиране
GenericName[bg_BG]=Синхронизиране на папка
1 change: 1 addition & 0 deletions .tx/nextcloud.client-desktop/en_GB_translation
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ Icon=@APPLICATION_EXECUTABLE@

# Translations
Icon[en_GB]=@APPLICATION_ICON_NAME@
Name[en_GB]=@APPLICATION_NAME@ Desktop
Comment[en_GB]=@APPLICATION_NAME@ desktop synchronisation client
GenericName[en_GB]=Folder Sync
1 change: 1 addition & 0 deletions .tx/nextcloud.client-desktop/ru_translation
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ Icon=@APPLICATION_EXECUTABLE@

# Translations
Icon[ru]=@APPLICATION_ICON_NAME@
Name[ru]=@APPLICATION_NAME@ Desktop
Comment[ru]=Клиент синхронизации @APPLICATION_NAME@ для ПК
GenericName[ru]=Синхронизация папок
27 changes: 27 additions & 0 deletions .tx/nextcloud.client-desktop/vi_translation
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[Desktop Entry]
Categories=Utility;X-SuSE-SyncUtility;
Type=Application
Exec=@APPLICATION_EXECUTABLE@
Name=@APPLICATION_NAME@ Desktop
Comment=@APPLICATION_NAME@ desktop synchronization client
GenericName=Folder Sync
Icon=@APPLICATION_ICON_NAME@
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
X-GNOME-Autostart-Delay=3
MimeType=application/vnd.@APPLICATION_EXECUTABLE@;
Actions=Quit;

# Translations


[Desktop Action Quit]
Exec=@APPLICATION_EXECUTABLE@ --quit
Name=Quit @APPLICATION_NAME@
Icon=@APPLICATION_EXECUTABLE@


# Translations
Icon[vi]=@APPLICATION_ICON_NAME@
Name[vi]=@APPLICATION_NAME@ Máy tính
Comment[vi]=Ứng dụng đồng bộ @APPLICATION_NAME@ cho máy tính
GenericName[vi]=Đồng bộ thư mục
17 changes: 8 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ if(NOT CRASHREPORTER_EXECUTABLE)
set(CRASHREPORTER_EXECUTABLE "${APPLICATION_EXECUTABLE}_crash_reporter")
endif()

set(synclib_NAME "${APPLICATION_EXECUTABLE}sync")
set(csync_NAME "${APPLICATION_EXECUTABLE}_csync")

include(Warnings)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-fcolor-diagnostics)
endif()

include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
# For config.h
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
Expand Down Expand Up @@ -74,9 +77,9 @@ include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)

add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0x000000
-DQT_USE_QSTRINGBUILDER
-DQT_MESSAGELOGCONTEXT #enable function name and line number in debug output
-DQT_DEPRECATED_WARNINGS
)

# if we cannot get it from git, directly try .tag (packages)
Expand All @@ -93,11 +96,7 @@ endif()
message(STATUS "GIT_SHA1 ${GIT_SHA1}")

set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
set(DATADIR ${DATA_INSTALL_DIR})
if(WIN32)
set(DATADIR "share")
endif(WIN32)
set(SHAREDIR ${DATADIR})
set(SHAREDIR ${CMAKE_INSTALL_DATADIR})

#####
## handle BUILD_OWNCLOUD_OSX_BUNDLE
Expand Down
3 changes: 3 additions & 0 deletions NEXTCLOUD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set( APPLICATION_SERVER_URL "" CACHE STRING "URL for the server to use. If enter
set( APPLICATION_SERVER_URL_ENFORCE ON ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL
set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
set( APPLICATION_VIRTUALFILE_SUFFIX "nextcloud" CACHE STRING "Virtual file suffix (not including the .)")
set( APPLICATION_OCSP_STAPLING_ENABLED OFF )
set( APPLICATION_FORBID_BAD_SSL OFF )

set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
set( LINUX_APPLICATION_ID "${APPLICATION_REV_DOMAIN}.${LINUX_PACKAGE_SHORTNAME}")
Expand All @@ -32,6 +34,7 @@ option( BUILD_UPDATER "Build updater" OFF )

option( WITH_PROVIDERS "Build with providers list" ON )

option( ENFORCE_VIRTUAL_FILES_SYNC_FOLDER "Enforce use of virtual files sync folder when available" OFF )

## Theming options
set(NEXTCLOUD_BACKGROUND_COLOR "#0082c9" CACHE STRING "Default Nextcloud background color")
Expand Down
4 changes: 2 additions & 2 deletions VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
set( MIRALL_VERSION_MAJOR 3 )
set( MIRALL_VERSION_MINOR 3 )
set( MIRALL_VERSION_PATCH 50 )
set( MIRALL_VERSION_PATCH 81 )
set( MIRALL_VERSION_YEAR 2021 )
set( MIRALL_SOVERSION 0 )

# Minimum supported server version according to https://docs.nextcloud.com/server/latest/admin_manual/release_schedule.html
set(NEXTCLOUD_SERVER_VERSION_MIN_SUPPORTED_MAJOR 20)
set(NEXTCLOUD_SERVER_VERSION_MIN_SUPPORTED_MAJOR 16)
set(NEXTCLOUD_SERVER_VERSION_MIN_SUPPORTED_MINOR 0)
set(NEXTCLOUD_SERVER_VERSION_MIN_SUPPORTED_PATCH 0)

Expand Down
Loading

0 comments on commit 9f91c62

Please sign in to comment.