fix: Fixed account switch not being saved if no other settings were changed (#5558)
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
#include "messages/Message.hpp"
|
||||
#include "messages/MessageBuilder.hpp"
|
||||
#include "mocks/BaseApplication.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
#include "util/Helpers.hpp"
|
||||
|
||||
#include <benchmark/benchmark.h>
|
||||
@@ -72,8 +71,6 @@ public:
|
||||
static void BM_HighlightTest(benchmark::State &state)
|
||||
{
|
||||
MockApplication mockApplication;
|
||||
QTemporaryDir settingsDir;
|
||||
Settings settings(settingsDir.path());
|
||||
|
||||
std::string message =
|
||||
R"(@badge-info=subscriber/34;badges=moderator/1,subscriber/24;color=#FF0000;display-name=테스트계정420;emotes=41:6-13,15-22;flags=;id=a3196c7e-be4c-4b49-9c5a-8b8302b50c2a;mod=1;room-id=11148817;subscriber=1;tmi-sent-ts=1590922213730;turbo=0;user-id=117166826;user-type=mod :testaccount_420!testaccount_420@testaccount_420.tmi.twitch.tv PRIVMSG #pajlada :-tags Kreygasm,Kreygasm (no space))";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "common/Args.hpp"
|
||||
#include "singletons/Resources.hpp"
|
||||
#include "singletons/Settings.hpp"
|
||||
|
||||
@@ -16,10 +17,12 @@ int main(int argc, char **argv)
|
||||
|
||||
::benchmark::Initialize(&argc, argv);
|
||||
|
||||
Args args;
|
||||
|
||||
// Ensure settings are initialized before any benchmarks are run
|
||||
QTemporaryDir settingsDir;
|
||||
settingsDir.setAutoRemove(false); // we'll remove it manually
|
||||
chatterino::Settings settings(settingsDir.path());
|
||||
chatterino::Settings settings(args, settingsDir.path());
|
||||
|
||||
QTimer::singleShot(0, [&]() {
|
||||
::benchmark::RunSpecifiedBenchmarks();
|
||||
|
||||
Reference in New Issue
Block a user