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 <boost/unordered/unordered_flat_map_fwd.hpp>
#include <pajlada/signals.hpp> #include <pajlada/signals.hpp>
#include <QColor> #include <QColor>
#include <QDateTime>
#include <QElapsedTimer> #include <QElapsedTimer>
#include <QObject> #include <QObject>
#include <QString> #include <QString>

View file

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

View file

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

View file

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