Commit Graph

73 Commits

Author SHA1 Message Date
nerix f285ada36c Estimate size of images to avoid layout shifts (#5192) 2024-02-25 18:19:20 +01:00
pajlada 97702e0a1f refactor: make Application::emotes private (#5109) 2024-01-20 10:49:32 +00:00
pajlada 4380ef8c5f refactor: Remove most raw accesses into Application (#5104) 2024-01-19 17:59:55 +01:00
pajlada 93e2bc18fa refactor: move Network files from src/common/ to src/common/network/ (#5089) 2024-01-15 21:28:44 +01:00
pajlada 5b6675abb4 refactor: fix clang-tidy auto*, const&, and curly braces (#5083) 2024-01-14 17:54:52 +01:00
nerix 6faf63c5c4 refactor: Remove Outcome from network requests (#4959) 2023-11-12 14:51:51 +01:00
nerix 7ecbfa0cdb refactor: debug count and popup (#4921)
* Moved implementation of the methods to the `cpp` file.
* Added `DebugCount::Flag(s)` and `DebugCount::configure(name, flags)`.
* Moved from `QMap` to `std::map` (order is important here).
* Used `QStringBuilder` for concatenations.
* Used `QLocale` for formatting (adds separators).
* Added `DebugCount::Flag::DataSize` for data sizes in bytes (and fixed language to English).
* Used `DataSize` for image sizes (maybe this should be moved somewhere else?).
* Added copy button to popup.
* Fixed Image usage reporting being eight times too large (could be another PR, but honestly it's four characters).
2023-10-28 21:17:32 +02:00
pajlada 9f23c8562a Test filters context map & message builder (#4886) 2023-10-13 15:41:23 +00:00
pajlada 9ca2578c1e Refactor Image & Image's Frames (#4773) 2023-09-13 19:26:45 +00:00
nerix b9934a4532 Refactor tests and benchmarks (#4700) 2023-06-24 15:03:27 +02:00
Mm2PL fb02d59b48 Add tools to help debug image GC (#4578)
`/debug-force-image-gc` will force garbage collection on all unused images
`/debug-force-image-unload` will force unload all images

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2023-05-27 12:18:08 +00:00
pajlada c8e1741e47 Remove CHATTERINO_TEST definition (#4526) 2023-04-09 12:18:56 +02:00
Daniel Sage cf80ae8434 Disable ImageExpirationPool during testing (#4363)
* Disable ImageExpirationPool during testing

* Update CHANGELOG.md

---------

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2023-02-11 19:20:46 +00:00
nerix 1043f9f803 Remove Unnecessary Includes in Headers (#4275)
* refactor: remove unnecessary includes in headers

* fix: formatting

* chore: changelog

* fix: scrollbar

* fix: suggestions and old appbase remains

* fix: suggestion

* fix: missing Qt forward declarations

* fix: another qt include

* fix: includes for precompiled-headers=off

* Add missing `<memory>` includes

* Add missing `#pragma once`

* Fix tests

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2022-12-31 14:41:01 +00:00
nerix 448c8622e7 Remove unused operators in Image (#4267) 2022-12-28 19:24:14 +00:00
pajlada 032f290767 Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories

In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:

    In ChatterSet.hpp, I changed lrucache to a <>include
    In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
    In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
    In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
    clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
nerix 8031f33b53 fix: Mark Bad or Invalid Images as Empty (#4151) 2022-11-14 14:32:51 +01:00
pajlada e3af865a70 Add helper function for ensuring a function is run in the GUI thread (#4091) 2022-10-30 13:01:54 +00:00
Felanbird 92301e7d72 Update gifFrameLength name as suggested by clang-tidy (#3947) 2022-09-04 17:25:34 +00:00
Daniel Sage 8ec032fc84 Periodically free memory from unused images (#3915)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2022-09-04 11:23:14 +00:00
kornes efcfb19187 Add safe checks around use of QImageReader (#3736)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2022-05-28 13:48:31 +02:00
Patrick Geneva e742860af7 Make animated image playback speed match browser (Firefox and Chrome) behaviour (#3506)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
Co-authored-by: Paweł <zneix@zneix.eu>
2022-01-15 19:23:08 +00:00
fourtf 804bc526b5 fix overflows in the max image size code (#2950)
* fix overflows in the max image size code

* Update Image.cpp
2021-07-03 20:11:10 +00:00
fourtf ed6ef0b98e add a maximum RAM usage for images 2021-06-24 22:54:36 +02:00
pajlada 6b0ce396d6 Update to Emoji v13 (2020) (#1555) 2021-02-13 19:17:22 +01:00
Steve Wills df722a72c1 Switch to QT Category logging (#2206)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
2020-11-21 16:20:10 +01:00
Leon Richardt 0eed45ae67 Chore: Proper Lambda Formatting (#2167)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2020-11-08 12:02:19 +01:00
fourtf 6052846bc3 added checks to mitigate floating point crashes 2020-04-19 21:05:40 +02:00
Leon Richardt 17aa3f71cd Remove Debug Output In Many Different Places (#1607)
* Application.cpp: Remove whisper debug output

* TwitchAccount.cpp: Remove AutoMod debug output

* BaseWindow.cpp: Remove mouse tracking debug output

* RunGui.cpp: Remove debug output for cleared cache items

* Notebook.cpp: Remove debug output for selected widgets

* LimitedQueue.hpp: Remove commented debug output

* IrcMessageHandler.cpp: Remove debug output when receiving whispers

* UserInfoPopup.cpp: Remove user name debug output

* ChannelView.cpp: Remove debug output when clicking a message

* Image.cpp: Remove commented debug output

* AttachedWindow.cpp: Remove commented debug output

* SplitOverlay.cpp: Remove commented debug output

* TwitchMessageBuilder.cpp: Remove debug output for highlights

* TwitchMessageBuilder.cpp: Remove debug output for blocked messages

* PubsubClient.cpp: Remove debug output on PubSub::listen

* PubsubClient.cpp: Remove debug output on PubSub::tryListen

* IncognitoBrowser.cpp: Remove debug output of browser command

* NativeMessaging.cpp: Remove debug output of message
2020-03-19 18:06:21 +01:00
fourtf 6229b2f434 sync gif emotes of same length 2020-02-16 14:24:11 +01:00
pajlada 3c8992cac1 Remove FMT dependency (#1472)
All occurrences of log() have been replaced with qDebug()

bonus meme: remove a bunch of std::string usages in the pubsub client

Fixes #1467
2020-01-03 20:51:37 +01:00
fourtf 2fc799f85a run destructor of Frames in gui thread 2019-10-07 20:03:15 +02:00
fourtf da4714944d small fixes in Image 2019-09-22 10:54:32 +02:00
fourtf 758a6bb41c NetworkRequest onError now uses NetworkResult 2019-09-19 19:03:50 +02:00
Rasmus Karlsson dbce128cc3 Remove "custom on success" logic from Image.
Create a new message element and message layout element type for mod badges.
2019-09-08 14:08:18 +02:00
Rasmus Karlsson 256a65a12e Load mod badge information from the FFZ API instead of assuming the URL.
This lets us load all sizes of the emote if they are available.

Channel with all versions of the mod badge: https://api.frankerfacez.com/v1/room/pajlada
Channel with only one version of the mod badge: https://api.frankerfacez.com/v1/room/apa420
Channel with no mod badge: https://api.frankerfacez.com/v1/room/forsen
2019-09-08 14:08:18 +02:00
fourtf dbc20baa65 fixed emote preview not using 3x images 2019-08-21 01:44:19 +02:00
fourtf f3e48c1325 smoll changes 2019-08-21 00:07:59 +02:00
fourtf 14222f84f2 made caller/concurrent rules tighter 2019-08-20 23:46:27 +02:00
fourtf 4713862620 load cache files async 2019-08-20 22:16:17 +02:00
fourtf 4f6c1a8519 added NetworkRequest builder functions 2019-08-20 22:16:17 +02:00
fourtf 18f3a816ed re-enabled loading recent messages concurrently
@pajlada please check if the code can stay commented out
2019-08-13 15:03:33 +02:00
fourtf 6274c05520 Fixed always loading 1x, 2x and 3x images 2019-08-13 13:51:27 +02:00
fourtf 23f1ec9ac2 Fixed using non existant 2x and 3x versions of ffz emotes and badges 2019-08-13 13:00:16 +02:00
fourtf e7d9422431 fixes for last commit 2019-08-01 13:30:58 +02:00
fourtf 2e68852768 made some things scale 2018-12-02 18:26:21 +01:00
fourtf e259b9e39f added brace wrapping after if and for 2018-10-21 13:43:02 +02:00
Rasmus Karlsson cd571a7e25 clean up warnings 2018-09-30 17:15:17 +00:00
Rasmus Karlsson 641c5822d7 fix various warnings 2018-09-20 13:09:37 +02:00
Rasmus Karlsson 4752a3a4d4 Mark image as empty if network request fails 2018-09-01 12:47:02 +00:00