Commit Graph

70 Commits

Author SHA1 Message Date
pajlada 6e0533e1da chore: make sanitizers opt in (#6493)
Make code sanitizers opt in with the `CHATTERINO_SANITIZER_SUPPORT` CMake option. After that's enabled, use the `SANITIZE_*` flag to enable individual sanitizers.

Building tests is not required - sanitizers can be enabled in the app by itself.
2025-09-25 23:43:54 +02:00
nerix 0f11a9050a fix: take handler for sol_lua_check as function reference (#6393)
* fix: take handler for `sol_lua_check` as function reference

* changelog

* fix: includes

* uintptr type

* fix: ub and eq
2025-08-16 19:21:04 +00:00
nerix bbfe970a3e fix(clang-cl): reduce warnings in tests (#6331) 2025-07-12 21:19:19 +00:00
pajlada 7f2168a9d4 fix: correctly override user color in sub gifts (#6322) 2025-07-06 15:05:28 +02:00
pajlada f26d6d57de fix: don't post contents of unknown commands to chat (#6272) 2025-06-15 13:46:24 +00:00
nerix dd85fb09ad feat(uploader): extend JSON selectors (#6193) 2025-05-10 10:46:37 +00:00
nerix 6fe6843cbd chore: re-export Qt's string literals (#6175) 2025-04-24 23:30:54 +02:00
nerix ab66be21b3 feat(plugins): add c2.WebSocket (#6076) 2025-04-07 17:38:10 +00:00
Arne 07ad07d525 fix: don't create native messaging manifest file unless browser directory exists (#6116)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2025-03-29 11:59:10 +00:00
nerix a86df7087d feat: add snapshot tests for eventsub messages (#5965) 2025-02-21 21:33:29 +01:00
teknsl 687fb353a7 consolidate firefox incognitobrowser logic (and deprecate opera/launcher) (#5805)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2025-01-11 14:08:21 +01:00
nerix 1c827f6288 chore: use condition variable to shutdown websocket pools (#5721) 2024-11-20 22:29:47 +01:00
Mm2PL 352a4ec132 Move plugins to Sol (#5622)
Co-authored-by: Nerixyz <nerixdev@outlook.de>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2024-10-20 11:57:05 +02:00
nerix a8d60b0b05 refactor: move MessageBuilder snapshot test to IrcMessageHandler (#5654) 2024-10-18 13:41:57 +00:00
nerix 800f6df2cf refactor(message-builder): move static helper methods to functions (#5652) 2024-10-18 13:03:36 +02:00
nerix d9453313b3 test: add snapshot tests for MessageBuilder (#5598) 2024-10-13 10:38:10 +00:00
nerix 820aa12af6 refactor: load Twitch emotes from Helix (#5239) 2024-09-01 11:22:54 +02:00
pajlada 175afa8b16 refactor: make a single MessageBuilder (#5548) 2024-08-24 10:18:27 +00:00
nerix ff7cc09f8b chore: cleanup, document, and test some RTL code (#5473) 2024-07-27 11:19:26 +00:00
nerix deb4401036 chore: make FlagsEnum constexpr (#5510) 2024-07-16 16:35:44 +02:00
pajlada 9b31246502 feat: allow timeout-related commands to be used in multiple channels (#5402)
This changes the behaviour of the following commands:
 - `/ban`
 - `/timeout`
 - `/untimeout`
 - `/unban`

All of those commands now accept one or more `--channel` parameters to override which channel the action should take place in.
The `--channel` parameter accepts a channel ID or channel name with the same syntax as the other "user targets" do (e.g. `id:11148817` or `pajlada`)

examples
Ban user in the chat you're typing in:  
`/ban weeb123`

Ban user in the chat you're typing in, with a reason specified:  
`/ban weeb123 the ban reason`

Ban user in a separate chat, with a reason specified:  
`/ban --channel pajlada weeb123 the ban reason`

Ban user in two separate chats, with a reason specified:  
`/ban --channel pajlada --channel id:117166826 weeb123 the ban reason`


Timeout user in the chat you're typing in:  
`/timeout weeb123`

Timeout user in the chat you're typing in, with a reason specified:  
`/timeout weeb123 10m the timeout reason`

Timeout user in a separate chat, with a reason specified:  
`/timeout --channel pajlada weeb123 10m the timeout reason`

Timeout user in two separate chats, with a reason specified:  
`/timeout --channel pajlada --channel id:117166826 weeb123 10m the timeout reason`


Unban user in the chat you're typing in:  
`/unban weeb123`

Unban user in a separate chat:  
`/unban --channel pajlada weeb123`

Unban user in two separate chats:  
`/unban --channel pajlada --channel id:117166826 weeb123`
2024-06-16 12:22:51 +02:00
nerix 8202cd0d99 refactor: cleanup and document Scrollbar (#5334)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Co-authored-by: Daniel Sage <sagedanielr@gmail.com>
2024-05-12 10:52:58 +00:00
Mm2PL c3b84cb4b6 Add custom image functionality for inline mod buttons. (#5369)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2024-05-11 10:54:27 +00:00
pajlada 401feac0aa tests: better test initializing allowing for better printing (#5379)
Co-authored-by: Nerixyz <nerixdev@outlook.de>
2024-05-05 13:01:07 +00:00
nerix ed20e71db4 refactor: adapt magic_enum to Qt (#5258) 2024-03-23 11:22:42 +00:00
KleberPF c10e364e06 Fix double click to select full words (#5243)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2024-03-17 13:43:55 +00:00
nerix e130c48f76 refactor: Turn link-info into its own element and class (#5178) 2024-02-18 12:34:00 +00:00
pajlada 32d269dffc feat: add the ability to unit test some aspects of SplitInput (#5179) 2024-02-17 12:26:54 +00:00
pajlada fe1e498a5f chore: Run Ubuntu tests in Docker (#5170)
Co-authored-by: Wissididom <30803034+Wissididom@users.noreply.github.com>
2024-02-11 19:11:30 +01:00
pajlada 99b537ffd9 Add some tests for NotebookTab (#5070)
* EmptyApplication: Add asserts to rest of getters (except for getSeventvAPI)

* Theme: make getTheme call getIApp()->getThemes() instead

this allows it to be used in tests
realistically this should be deprecated & users of it should just call
getIApp()->getThemes() directly

* Use getIApp() instead of getApp() in a few places
2024-01-06 11:42:45 +01:00
kornes da31e47f9a Add selection unit tests (#4904) 2023-10-23 20:39:15 +00:00
pajlada 3f7671000a Fix memory leaks & data races in tests (#4772)
* Add a few pre-made sanitizer suppressions

* Test Sanitization: Fix threading issues

* Test Sanitization: Allow deletion of PubSub

We still don't delete it in main code, but this allows us to try
deleting it in tests.

* Test Sanitization: Fix some memory leaks

* fix gtest clang-tidy warning

* const emojis test :-)
2023-08-27 12:07:46 +00:00
Sam Heybey 69c983e0d9 Add support for opening links in incognito mode on Linux & BSD (#4745)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-08-06 15:57:01 +02:00
nerix 61566e2f4f Add string literal suffixes to create QStrings, QByteArrays, and QLatin1String(View)s at compile time (#4706) 2023-07-01 17:31:25 +02:00
nerix 22b290cb2d Improve network error messages (#4704) 2023-07-01 12:59:59 +00:00
nerix b9934a4532 Refactor tests and benchmarks (#4700) 2023-06-24 15:03:27 +02:00
nerix 1bc423d9c4 Make tests more platform agnostic (#4650)
Use QTemporaryDir to create the test directory
Add option to use httpbin over local docker
Increase delay for opening a connection

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-05-26 12:54:23 +00:00
Daniel Sage 51f2c4d1c0 Add input completion test suite (#4644)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-05-21 10:10:49 +00:00
pajlada e1a6c24cf3 Move mocks to their own interface (#4645) 2023-05-20 10:54:50 +00:00
Daniel Sage 34db692895 Implement type checking/validation for filters (#4364)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-04-09 23:35:06 +02:00
pajlada c8e1741e47 Remove CHATTERINO_TEST definition (#4526) 2023-04-09 12:18:56 +02:00
nerix bdab5e021c Benchmark and Test LinkParser (#4436)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-04-02 14:59:26 +00:00
pajlada bf5a5b839c Fix version checking (#4329)
https://github.com/Neargye/semver

* Use semver library for version downgrade checking

* Add test validating our current version is valid semver
2023-01-26 19:22:48 +01:00
nerix 904749cf62 feat: Add Live Emote Updates for BTTV (#4147)
This feature is enabled by default and can be disabled in settings with the "Enable BTTV live emotes updates" setting.

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-01-21 14:06:55 +00:00
pajlada 83dfb08aed Enable LTO support for Chatterino builds (#4258)
This is disabled by default, and can be enabled by passing `-DCHATTERINO_LTO=On` to your cmake invocation.
2022-12-24 18:42:59 +01:00
nerix 39f7d8ac4c feat: Live Emote Updates for 7TV (#4090)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-11-13 12:07:41 +01:00
nerix ff684fc7ed feat: Basic PubSub Manager for Live Emote Updates (#4087)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-10-29 14:01:01 +02:00
Daniel Sage 81caf1aae0 Rewrite & optimize LimitedQueue (#3798)
* Use circular buffer for LimitedQueue

* Reduce copying of snapshot

* Small optimizations

* Remove unneeded lock statements

* Add LimitedQueue tests

* Fix includes for limited queue benchmark

* Update CHANGELOG.md

* Use correct boost version iterators

* Use a shared_mutex to clarify reads and writes

* Update `find`/`rfind` to return the result as a boost::optional

* Use `[[nodiscard]]` where applicable

* Update comments

* Add a couple more doc comments

* Replace size with get

get is a safe (locked & checked) version of at

* Use std::vector in LimitedQueueSnapshot

* Update LimitedQueue benchmarks

* Add mutex guard to buffer accessors

We do not know whether T is an atomic type or not
so we can't safely say that we can copy the value
at a certain address of the buffer.

See https://stackoverflow.com/a/2252478

* Update doc comments, add first/last getters

* Make limit_ const

* Omit `else` if the if-case always returns

* Title case category comments

* Remove `at`

* Fix `get` comment

* Privatize/comment/lock property accessors

 - `limit` is now private
 - `space` is now private
 - `full` has been removed
 - `empty` now locks

* Remove `front` function

* Remove `back` method

* Add comment to `first`

* Add comment to `last`

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-06-18 10:44:48 +00:00
Kasia f3f340335f Make generic version of batcher function (#3822) 2022-06-17 20:52:20 +02:00
pajlada 7ccf60111d Overhaul highlight system (#3399)
Checks have been moved into a Controller allowing for easier tests.
2022-06-05 15:40:57 +00:00