minor changes to the pr

This commit is contained in:
fourtf 2018-01-28 18:05:01 +01:00
parent 74fec12848
commit 12b30eb2ed
2 changed files with 5 additions and 7 deletions

View file

@ -12,7 +12,6 @@ QualityPopup::QualityPopup(const QString &channel, const QString &path, QStringL
{ {
this->ui.okButton.setText("OK"); this->ui.okButton.setText("OK");
this->ui.cancelButton.setText("Cancel"); this->ui.cancelButton.setText("Cancel");
this->setAttribute(Qt::WA_DeleteOnClose, true);
QObject::connect(&this->ui.okButton, &QPushButton::clicked, this, QObject::connect(&this->ui.okButton, &QPushButton::clicked, this,
&QualityPopup::okButtonClicked); &QualityPopup::okButtonClicked);
@ -36,6 +35,8 @@ void QualityPopup::showDialog(const QString &channel, const QString &path, QStri
{ {
QualityPopup *instance = new QualityPopup(channel, path, options); QualityPopup *instance = new QualityPopup(channel, path, options);
instance->setAttribute(Qt::WA_DeleteOnClose, true);
instance->show(); instance->show();
instance->activateWindow(); instance->activateWindow();
instance->raise(); instance->raise();
@ -45,8 +46,8 @@ void QualityPopup::showDialog(const QString &channel, const QString &path, QStri
void QualityPopup::okButtonClicked() void QualityPopup::okButtonClicked()
{ {
singletons::SettingManager &settings = singletons::SettingManager::getInstance(); singletons::SettingManager &settings = singletons::SettingManager::getInstance();
QProcess::startDetached(this->path, QProcess::startDetached(this->path, {"twitch.tv/" + this->channel,
{"twitch.tv/" + this->channel, this->ui.selector.currentText(), settings.streamlinkOpts}); this->ui.selector.currentText(), settings.streamlinkOpts});
this->close(); this->close();
} }

View file

@ -1,5 +1,4 @@
#ifndef QUALITYPOPUP_H #pragma once
#define QUALITYPOPUP_H
#include <QComboBox> #include <QComboBox>
#include <QDialogButtonBox> #include <QDialogButtonBox>
@ -39,5 +38,3 @@ private:
} // namespace widgets } // namespace widgets
} // namespace chatterino } // namespace chatterino
#endif // QUALITYPOPUP_H