mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Store default client id in credentials.hpp
This commit is contained in:
parent
8b40393023
commit
3f8c025e64
4 changed files with 13 additions and 6 deletions
10
src/credentials.hpp
Normal file
10
src/credentials.hpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
inline QByteArray getDefaultClientID()
|
||||
{
|
||||
return QByteArray("7ue61iz46fz11y3cugd0l3tawb4taal");
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
|
@ -25,8 +25,6 @@ using namespace chatterino::messages;
|
|||
|
||||
namespace chatterino {
|
||||
|
||||
const QString IrcManager::defaultClientId("7ue61iz46fz11y3cugd0l3tawb4taal");
|
||||
|
||||
IrcManager::IrcManager(ChannelManager &_channelManager, Resources &_resources,
|
||||
EmoteManager &_emoteManager, WindowManager &_windowManager)
|
||||
: channelManager(_channelManager)
|
||||
|
|
|
@ -30,8 +30,6 @@ public:
|
|||
IrcManager(ChannelManager &_channelManager, Resources &_resources, EmoteManager &_emoteManager,
|
||||
WindowManager &_windowManager);
|
||||
|
||||
static const QString defaultClientId;
|
||||
|
||||
void connect();
|
||||
void disconnect();
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "widgets/accountpopup.hpp"
|
||||
#include "channel.hpp"
|
||||
#include "credentials.hpp"
|
||||
#include "ui_accountpopupform.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
@ -42,7 +43,7 @@ void AccountPopupWidget::getUserId()
|
|||
|
||||
QNetworkRequest req(nameUrl);
|
||||
req.setRawHeader(QByteArray("Accept"), QByteArray("application/vnd.twitchtv.v5+json"));
|
||||
req.setRawHeader(QByteArray("Client-ID"), QByteArray("7ue61iz46fz11y3cugd0l3tawb4taal"));
|
||||
req.setRawHeader(QByteArray("Client-ID"), getDefaultClientID());
|
||||
|
||||
static auto manager = new QNetworkAccessManager();
|
||||
auto *reply = manager->get(req);
|
||||
|
@ -66,7 +67,7 @@ void AccountPopupWidget::getUserData()
|
|||
|
||||
QNetworkRequest req(idUrl);
|
||||
req.setRawHeader(QByteArray("Accept"), QByteArray("application/vnd.twitchtv.v5+json"));
|
||||
req.setRawHeader(QByteArray("Client-ID"), QByteArray("7ue61iz46fz11y3cugd0l3tawb4taal"));
|
||||
req.setRawHeader(QByteArray("Client-ID"), getDefaultClientID());
|
||||
|
||||
static auto manager = new QNetworkAccessManager();
|
||||
auto *reply = manager->get(req);
|
||||
|
|
Loading…
Reference in a new issue