Fixed popups in viewer list. (#110)

This commit is contained in:
Cranken
2017-09-12 22:10:30 +02:00
committed by fourtf
parent 6ce13db443
commit 4ac811f2a9
6 changed files with 51 additions and 6 deletions
+7 -1
View File
@@ -14,7 +14,7 @@
namespace chatterino {
namespace widgets {
AccountPopupWidget::AccountPopupWidget(std::shared_ptr<Channel> &channel)
AccountPopupWidget::AccountPopupWidget(std::shared_ptr<Channel> channel)
: QWidget(nullptr)
, _ui(new Ui::AccountPopup)
, _channel(channel)
@@ -37,8 +37,14 @@ void AccountPopupWidget::setName(const QString &name)
getUserId();
}
void AccountPopupWidget::setChannel(std::shared_ptr<Channel> channel)
{
this->_channel = channel;
}
void AccountPopupWidget::getUserId()
{
qDebug() << this->_channel.get()->name;
QUrl nameUrl("https://api.twitch.tv/kraken/users?login=" + _ui->lblUsername->text());
QNetworkRequest req(nameUrl);