From ab1e2829562b90cf77447d137a05f3f24815c369 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 24 Aug 2024 14:35:52 +0200 Subject: [PATCH] fix: benchmarks segfaulting --- CHANGELOG.md | 1 + benchmarks/src/Highlights.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f250de55c01..728cbfb2b03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ - Dev: Refactored a few `#define`s into `const(expr)` and cleaned includes. (#5527) - Dev: Added `FlagsEnum::isEmpty`. (#5550) - Dev: Prepared for Qt 6.8 by addressing some deprecations. (#5529) +- Dev: Fixed benchmarks segfaulting on run. (#5559) - Dev: Refactored `MessageBuilder` to be a single class. (#5548) - Dev: Recent changes are now shown in the nightly release description. (#5553, #5554) diff --git a/benchmarks/src/Highlights.cpp b/benchmarks/src/Highlights.cpp index f6126ecaecf..69c69db4928 100644 --- a/benchmarks/src/Highlights.cpp +++ b/benchmarks/src/Highlights.cpp @@ -6,6 +6,7 @@ #include "messages/Message.hpp" #include "messages/MessageBuilder.hpp" #include "mocks/BaseApplication.hpp" +#include "mocks/UserData.hpp" #include "util/Helpers.hpp" #include @@ -64,8 +65,14 @@ class MockApplication : public mock::BaseApplication return &this->highlights; } + IUserDataController *getUserData() override + { + return &this->userData; + } + AccountController accounts; HighlightController highlights; + mock::UserDataController userData; }; static void BM_HighlightTest(benchmark::State &state)