Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Chatterino/chatterino2 into danke…
Browse files Browse the repository at this point in the history
…rino
  • Loading branch information
Mm2PL committed Dec 8, 2023
2 parents 9503b39 + c3d3903 commit 33586a3
Show file tree
Hide file tree
Showing 61 changed files with 848 additions and 189 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,47 +37,41 @@ jobs:
plugins: false
skip-artifact: false
skip-crashpad: false
clang-tidy-review: false
# Ubuntu 22.04, Qt 5.15
- os: ubuntu-22.04
qt-version: 5.15.2
force-lto: false
plugins: false
skip-artifact: false
skip-crashpad: false
clang-tidy-review: true
# Ubuntu 22.04, Qt 6.2.4 - tests LTO & plugins
- os: ubuntu-22.04
qt-version: 6.2.4
force-lto: true
plugins: true
skip-artifact: false
skip-crashpad: false
clang-tidy-review: false
# macOS
- os: macos-latest
qt-version: 5.15.2
force-lto: false
plugins: false
skip-artifact: false
skip-crashpad: false
clang-tidy-review: false
# Windows
- os: windows-latest
qt-version: 6.5.0
force-lto: false
plugins: false
skip-artifact: false
skip-crashpad: false
clang-tidy-review: false
# Windows 7/8
- os: windows-latest
qt-version: 5.15.2
force-lto: false
plugins: false
skip-artifact: false
skip-crashpad: true
clang-tidy-review: false

fail-fast: false

Expand Down Expand Up @@ -345,38 +339,6 @@ jobs:
make -j"$(nproc)"
shell: bash

- name: clang-tidy review
if: matrix.clang-tidy-review && github.event_name == 'pull_request'
timeout-minutes: 10
uses: ZedThree/[email protected]
with:
build_dir: build-clang-tidy
config_file: ".clang-tidy"
split_workflow: true
exclude: "lib/*"
cmake_command: >-
cmake -S. -Bbuild-clang-tidy
-DCMAKE_BUILD_TYPE=Release
-DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On
-DUSE_PRECOMPILED_HEADERS=OFF
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
-DCHATTERINO_LTO=Off
-DCHATTERINO_PLUGINS=On
-DBUILD_WITH_QT6=Off
-DBUILD_TESTS=On
-DBUILD_BENCHMARKS=On
apt_packages: >-
qttools5-dev, qt5-image-formats-plugins, libqt5svg5-dev,
libsecret-1-dev,
libboost-dev, libboost-system-dev, libboost-filesystem-dev,
libssl-dev,
rapidjson-dev,
libbenchmark-dev
- name: clang-tidy-review upload
if: matrix.clang-tidy-review && github.event_name == 'pull_request'
uses: ZedThree/clang-tidy-review/[email protected]

- name: Package - AppImage (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-20.04') && !matrix.skip-artifact
run: |
Expand Down
148 changes: 148 additions & 0 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
name: clang-tidy

on:
pull_request:

concurrency:
group: clang-tidy-${{ github.ref }}
cancel-in-progress: true

env:
CHATTERINO_REQUIRE_CLEAN_GIT: On
C2_BUILD_WITH_QT6: Off

jobs:
build:
name: "clang-tidy ${{ matrix.os }}, Qt ${{ matrix.qt-version }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Ubuntu 22.04, Qt 5.15
- os: ubuntu-22.04
qt-version: 5.15.2
plugins: false

fail-fast: false

steps:
- name: Enable plugin support
if: matrix.plugins
run: |
echo "C2_PLUGINS=ON" >> "$GITHUB_ENV"
shell: bash

- name: Set BUILD_WITH_QT6
if: startsWith(matrix.qt-version, '6.')
run: |
echo "C2_BUILD_WITH_QT6=ON" >> "$GITHUB_ENV"
shell: bash

- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # allows for tags access

- name: Install Qt5
if: startsWith(matrix.qt-version, '5.')
uses: jurplel/[email protected]
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}-v2
version: ${{ matrix.qt-version }}

- name: Install Qt 6.5.3 imageformats
if: startsWith(matrix.qt-version, '6.')
uses: jurplel/[email protected]
with:
cache: false
modules: qtimageformats
set-env: false
version: 6.5.3
extra: --noarchives

- name: Install Qt6
if: startsWith(matrix.qt-version, '6.')
uses: jurplel/[email protected]
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt-version }}-v2
modules: qt5compat qtimageformats
version: ${{ matrix.qt-version }}

# LINUX
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install \
cmake \
virtualenv \
rapidjson-dev \
libfuse2 \
libssl-dev \
libboost-dev \
libxcb-randr0-dev \
libboost-system-dev \
libboost-filesystem-dev \
libpulse-dev \
libxkbcommon-x11-0 \
build-essential \
libgl1-mesa-dev \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xinerama0
- name: Apply Qt5 patches
if: startsWith(matrix.qt-version, '5.')
run: |
patch "$Qt5_DIR/include/QtConcurrent/qtconcurrentthreadengine.h" .patches/qt5-on-newer-gcc.patch
shell: bash

- name: Build
run: |
mkdir build
cd build
CXXFLAGS=-fno-sized-deallocation cmake \
-DCMAKE_INSTALL_PREFIX=appdir/usr/ \
-DCMAKE_BUILD_TYPE=Release \
-DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On \
-DUSE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \
-DCHATTERINO_LTO="$C2_ENABLE_LTO" \
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \
-DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \
..
shell: bash

- name: clang-tidy review
timeout-minutes: 20
uses: ZedThree/[email protected]
with:
build_dir: build-clang-tidy
config_file: ".clang-tidy"
split_workflow: true
exclude: "lib/*"
cmake_command: >-
cmake -S. -Bbuild-clang-tidy
-DCMAKE_BUILD_TYPE=Release
-DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On
-DUSE_PRECOMPILED_HEADERS=OFF
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
-DCHATTERINO_LTO=Off
-DCHATTERINO_PLUGINS=On
-DBUILD_WITH_QT6=Off
-DBUILD_TESTS=On
-DBUILD_BENCHMARKS=On
apt_packages: >-
qttools5-dev, qt5-image-formats-plugins, libqt5svg5-dev,
libsecret-1-dev,
libboost-dev, libboost-system-dev, libboost-filesystem-dev,
libssl-dev,
rapidjson-dev,
libbenchmark-dev
- name: clang-tidy-review upload
uses: ZedThree/clang-tidy-review/[email protected]
4 changes: 3 additions & 1 deletion .github/workflows/post-clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ name: Post clang-tidy review comments

on:
workflow_run:
workflows: ["Build"]
workflows: ["clang-tidy"]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest
# Only when a build succeeds
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- uses: ZedThree/clang-tidy-review/[email protected]
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Upstream

- Major: Allow use of Twitch follower emotes in other channels if subscribed. (#4922)
- Major: Add `/automod` split to track automod caught messages across all open channels the user moderates. (#4986)
- Minor: Migrate to the new Get Channel Followers Helix endpoint, fixing follower count not showing up in usercards. (#4809)
- Minor: The account switcher is now styled to match your theme. (#4817)
- Minor: Add an invisible resize handle to the bottom of frameless user info popups and reply thread popups. (#4795)
Expand All @@ -19,6 +20,7 @@
- Minor: The `/reply` command now replies to the latest message of the user. (#4919)
- Minor: All sound capabilities can now be disabled by setting your "Sound backend" setting to "Null" and restarting Chatterino. (#4978)
- Minor: Add an option to use new experimental smarter emote completion. (#4987)
- Minor: Add `--safe-mode` command line option that can be used for troubleshooting when Chatterino is misbehaving or is misconfigured. It disables hiding the settings button & prevents plugins from loading. (#4985)
- Bugfix: Fixed an issue where certain emojis did not send to Twitch chat correctly. (#4840)
- Bugfix: Fixed capitalized channel names in log inclusion list not being logged. (#4848)
- Bugfix: Trimmed custom streamlink paths on all platforms making sure you don't accidentally add spaces at the beginning or end of its path. (#4834)
Expand Down Expand Up @@ -49,6 +51,8 @@
- Bugfix: Fixed lookahead/-behind not working in _Ignores_. (#4965)
- Bugfix: Fixed Image Uploader accidentally deleting images with some hosts when link resolver was enabled. (#4971)
- Bugfix: Fixed rare crash with Image Uploader when closing a split right after starting an upload. (#4971)
- Bugfix: Fixed support for Windows 11 Snap layouts. (#4994)
- Bugfix: Fixed some windows appearing between screens. (#4797)
- Dev: Run miniaudio in a separate thread, and simplify it to not manage the device ourselves. There's a chance the simplification is a bad idea. (#4978)
- Dev: Change clang-format from v14 to v16. (#4929)
- Dev: Fixed UTF16 encoding of `modes` file for the installer. (#4791)
Expand All @@ -67,6 +71,7 @@
- Dev: Add a compile-time flag `CHATTERINO_UPDATER` which can be turned off to disable update checks. (#4854)
- Dev: Add a compile-time flag `USE_SYSTEM_MINIAUDIO` which can be turned on to use the system miniaudio. (#4867)
- Dev: Update vcpkg to use Qt6. (#4872)
- Dev: Update `magic_enum` to v0.9.5. (#4992)
- Dev: Replace `boost::optional` with `std::optional`. (#4877)
- Dev: Improve performance of selecting text. (#4889, #4911)
- Dev: Removed direct dependency on Qt 5 compatibility module. (#4906)
Expand All @@ -79,6 +84,7 @@
- Dev: `Details` file properties tab is now populated on Windows. (#4912)
- Dev: Removed `Outcome` from network requests. (#4959)
- Dev: Added Tests for Windows and MacOS in CI. (#4970)
- Dev: Move `clang-tidy` checker to its own CI job. (#4996)
- Dev: Refactored the Image Uploader feature. (#4971)
- Dev: Fixed deadlock and use-after-free in tests. (#4981)

Expand Down
9 changes: 3 additions & 6 deletions benchmarks/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ IncludeCategories:
# Project includes
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
Priority: 1
# Third party library includes
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
Priority: 3
# Qt includes
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: "^<Irc[a-zA-Z]+>$"
Priority: 3
# Misc libraries
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
Priority: 3
# Standard library includes
- Regex: "^<[a-zA-Z_]+>$"
Priority: 4
# Third party library includes
- Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$"
Priority: 3
NamespaceIndentation: Inner
PointerBindsToType: false
SpacesBeforeTrailingComments: 2
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindMagicEnum.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)

find_path(MagicEnum_INCLUDE_DIR magic_enum.hpp HINTS ${CMAKE_SOURCE_DIR}/lib/magic_enum/include)
find_path(MagicEnum_INCLUDE_DIR magic_enum/magic_enum.hpp HINTS ${CMAKE_SOURCE_DIR}/lib/magic_enum/include)

find_package_handle_standard_args(MagicEnum DEFAULT_MSG MagicEnum_INCLUDE_DIR)

Expand Down
2 changes: 1 addition & 1 deletion lib/magic_enum
Submodule magic_enum updated 54 files
+5 −0 .bazelignore
+10 −0 .bazelrc
+1 −0 .bazelversion
+19 −0 .github/workflows/bzlmod-archive.yml
+11 −5 .github/workflows/macos.yml
+32 −31 .github/workflows/ubuntu.yml
+12 −7 .github/workflows/windows.yml
+1 −0 .gitignore
+2 −54 BUILD.bazel
+90 −23 CMakeLists.txt
+1 −1 LICENSE
+5 −0 MODULE.bazel
+109 −41 README.md
+13 −0 SECURITY.md
+0 −0 WORKSPACE.bazel
+239 −0 cmake/GenPkgConfig/GenPkgConfig.cmake
+45 −0 cmake/GenPkgConfig/ReadMe.md
+24 −0 cmake/GenPkgConfig/UNLICENSE
+18 −0 cmake/GenPkgConfig/buildTimeScripts/getObjectFilesBaseNames.cmake
+1 −1 doc/limitations.md
+421 −19 doc/reference.md
+4 −1 example/CMakeLists.txt
+9 −8 example/enum_flag_example.cpp
+9 −2 example/example.cpp
+65 −0 example/example_containers_array.cpp
+56 −0 example/example_containers_bitset.cpp
+56 −0 example/example_containers_set.cpp
+1 −1 example/example_custom_name.cpp
+2 −2 example/example_nonascii_name.cpp
+5 −4 example/example_switch.cpp
+477 −536 include/magic_enum/magic_enum.hpp
+44 −0 include/magic_enum/magic_enum_all.hpp
+1,170 −0 include/magic_enum/magic_enum_containers.hpp
+203 −0 include/magic_enum/magic_enum_flags.hpp
+48 −14 include/magic_enum/magic_enum_format.hpp
+24 −15 include/magic_enum/magic_enum_fuse.hpp
+115 −0 include/magic_enum/magic_enum_iostream.hpp
+35 −34 include/magic_enum/magic_enum_switch.hpp
+137 −0 include/magic_enum/magic_enum_utility.hpp
+14 −3 meson.build
+13 −0 meson_options.txt
+1 −1 package.xml
+2 −0 test/.bazelrc
+25 −0 test/BUILD.bazel
+21 −4 test/CMakeLists.txt
+6 −0 test/MODULE.bazel
+0 −0 test/WORKSPACE.bazel
+17 −0 test/meson.build
+283 −233 test/test.cpp
+3 −1 test/test_aliases.cpp
+318 −0 test/test_containers.cpp
+130 −179 test/test_flags.cpp
+445 −0 test/test_nonascii.cpp
+147 −0 test/test_wchar_t.cpp
9 changes: 3 additions & 6 deletions mocks/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ IncludeCategories:
# Project includes
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
Priority: 1
# Third party library includes
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
Priority: 3
# Qt includes
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: "^<Irc[a-zA-Z]+>$"
Priority: 3
# Misc libraries
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
Priority: 3
# Standard library includes
- Regex: "^<[a-zA-Z_]+>$"
Priority: 4
# Third party library includes
- Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$"
Priority: 3
NamespaceIndentation: Inner
PointerBindsToType: false
SpacesBeforeTrailingComments: 2
Expand Down
9 changes: 3 additions & 6 deletions src/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ IncludeCategories:
# Project includes
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
Priority: 1
# Third party library includes
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
Priority: 3
# Qt includes
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: "^<Irc[a-zA-Z]+>$"
Priority: 3
# Misc libraries
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
Priority: 3
# Standard library includes
- Regex: "^<[a-zA-Z_]+>$"
Priority: 4
# Third party library includes
- Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$"
Priority: 3
NamespaceIndentation: Inner
PointerBindsToType: false
SpacesBeforeTrailingComments: 2
Expand Down
Loading

0 comments on commit 33586a3

Please sign in to comment.