Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
add missing parent references to ensure program is closed properly
Browse files Browse the repository at this point in the history
  • Loading branch information
maltejur committed Jul 18, 2022
1 parent 46f9663 commit faf8e72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {

void MainWindow::setupWebView() {
m_webView = new QWebEngineView(this);
auto page = new DiscordPage;
auto page = new DiscordPage(this);
m_webView->setPage(page);
setCentralWidget(m_webView);
}
16 changes: 8 additions & 8 deletions src/streamdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
StreamDialog::StreamDialog() : QWidget() {
setAttribute(Qt::WA_QuitOnClose, false);

auto layout = new QVBoxLayout;
auto layout = new QVBoxLayout(this);

auto targetLabel = new QLabel;
auto targetLabel = new QLabel(this);
targetLabel->setText("Which app do you want to stream sound from?");
layout->addWidget(targetLabel);

m_targetComboBox = new QComboBox;
m_targetComboBox = new QComboBox(this);
updateTargets();
layout->addWidget(m_targetComboBox);

auto qualityLabel = new QLabel;
auto qualityLabel = new QLabel(this);
qualityLabel->setText("Stream Quality");
layout->addWidget(qualityLabel);

auto qualityHBox = new QHBoxLayout;
auto qualityHBox = new QHBoxLayout(this);
layout->addLayout(qualityHBox);

m_qualityResolutionComboBox = new QComboBox;
m_qualityResolutionComboBox = new QComboBox(this);
m_qualityResolutionComboBox->addItem("2160p", "3840x2160");
m_qualityResolutionComboBox->addItem("1440p", "2560x1440");
m_qualityResolutionComboBox->addItem("1080p", "1920x1080");
Expand All @@ -40,7 +40,7 @@ StreamDialog::StreamDialog() : QWidget() {
m_qualityResolutionComboBox->setCurrentText("720p");
qualityHBox->addWidget(m_qualityResolutionComboBox);

m_qualityFPSComboBox = new QComboBox;
m_qualityFPSComboBox = new QComboBox(this);
m_qualityFPSComboBox->addItem("144 FPS", 144);
m_qualityFPSComboBox->addItem("60 FPS", 60);
m_qualityFPSComboBox->addItem("30 FPS", 30);
Expand All @@ -49,7 +49,7 @@ StreamDialog::StreamDialog() : QWidget() {
m_qualityFPSComboBox->setCurrentText("30 FPS");
qualityHBox->addWidget(m_qualityFPSComboBox);

auto button = new QPushButton;
auto button = new QPushButton(this);
button->setText("Start Stream");
connect(button, &QPushButton::clicked, this, &StreamDialog::startStream);
layout->addWidget(button, Qt::AlignRight | Qt::AlignBottom);
Expand Down

0 comments on commit faf8e72

Please sign in to comment.