fix: compilations

This commit is contained in:
Nerixyz 2024-10-27 21:12:36 +01:00
parent 62cf21c24a
commit 8241ea003c
No known key found for this signature in database
GPG key ID: 946BA188C5609CCC
4 changed files with 22 additions and 5 deletions

View file

@ -12,6 +12,7 @@
#include <boost/unordered/unordered_flat_map_fwd.hpp>
#include <pajlada/signals.hpp>
#include <QColor>
#include <QDateTime>
#include <QElapsedTimer>
#include <QObject>
#include <QString>

View file

@ -14,6 +14,8 @@
#include "providers/twitch/TwitchUser.hpp"
#include "util/SharedPtrElementLess.hpp"
#include <QStringBuilder>
namespace chatterino {
using namespace literals;

View file

@ -873,9 +873,15 @@ TEST(Commands, E2E)
EXPECT_CALL(mockHelix, update).Times(1);
EXPECT_CALL(mockHelix, loadBlocks).Times(1);
auto account = std::make_shared<TwitchAccount>(
testaccount420["login"].toString(), "token", "oauthclient",
testaccount420["id"].toString());
auto account = std::make_shared<TwitchAccount>(TwitchAccountData{
.username = testaccount420["login"].toString(),
.userID = testaccount420["id"].toString(),
.clientID = "oauthclient",
.oauthToken = "token",
.ty = TwitchAccount::Type::ImplicitGrant,
.refreshToken = {},
.expiresAt = {},
});
getApp()->getAccounts()->twitch.accounts.append(account);
getApp()->getAccounts()->twitch.currentUsername =
testaccount420["login"].toString();

View file

@ -10,6 +10,7 @@
#include <chrono>
#include <mutex>
#include <utility>
using namespace chatterino;
using namespace std::chrono_literals;
@ -82,8 +83,15 @@ public:
QString token = "token")
: PubSub(QString("wss://127.0.0.1:9050%1").arg(path), pingInterval)
{
auto account = std::make_shared<TwitchAccount>("testaccount_420", token,
"clientid", "123456");
auto account = std::make_shared<TwitchAccount>(TwitchAccountData{
.username = "testaccount_420",
.userID = "123456",
.clientID = "clientid",
.oauthToken = std::move(token),
.ty = TwitchAccount::Type::ImplicitGrant,
.refreshToken = {},
.expiresAt = {},
});
this->setAccount(account);
}
};