From d1c5cb4fcefbb4a9f3501d1841959cf9f2af6507 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 23 Apr 2021 21:44:32 +0200 Subject: [PATCH] ui/about: Fix stack size problem --- source/ui/ui-about-entry.cpp | 3 ++- source/ui/ui-about-entry.hpp | 2 +- source/ui/ui-about.cpp | 7 ++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/source/ui/ui-about-entry.cpp b/source/ui/ui-about-entry.cpp index d34b9e77..cd6b4222 100644 --- a/source/ui/ui-about-entry.cpp +++ b/source/ui/ui-about-entry.cpp @@ -26,7 +26,8 @@ constexpr std::string_view i18n_role_friend = "UI.About.Role.Friend"; constexpr std::string_view i18n_role_supporter = "UI.About.Role.Supporter"; constexpr std::string_view i18n_role_creator = "UI.About.Role.Creator"; -streamfx::ui::about_entry::about_entry(QWidget* parent, streamfx::ui::about::entry& entry) : QWidget(parent), _link() +streamfx::ui::about_entry::about_entry(QWidget* parent, const streamfx::ui::about::entry& entry) + : QWidget(parent), _link() { setupUi(this); diff --git a/source/ui/ui-about-entry.hpp b/source/ui/ui-about-entry.hpp index e5e4ac88..2bcf24bb 100644 --- a/source/ui/ui-about-entry.hpp +++ b/source/ui/ui-about-entry.hpp @@ -40,7 +40,7 @@ namespace streamfx::ui { QUrl _link; public: - about_entry(QWidget* parent, ui::about::entry& entry); + about_entry(QWidget* parent, const ui::about::entry& entry); ~about_entry(); protected: diff --git a/source/ui/ui-about.cpp b/source/ui/ui-about.cpp index d714d0a3..6cb57002 100644 --- a/source/ui/ui-about.cpp +++ b/source/ui/ui-about.cpp @@ -44,7 +44,7 @@ static const std::vector _thankyous = { ":/thankyou/thankyou_fox", }; -static const std::list _entries = { +static const streamfx::ui::about::entry _entries[] = { // Contributers // - 2021 streamfx::ui::about::entry{"Michael \"Xaymar\" Dirks", streamfx::ui::about::role_type::CONTRIBUTOR, "", @@ -72,9 +72,6 @@ static const std::list _entries = { streamfx::ui::about::entry{"wwj402", streamfx::ui::about::role_type::CONTRIBUTOR, "", "https://github.com/wwj402"}, // - 2018 - // Separator - streamfx::ui::about::entry{"", streamfx::ui::about::role_type::THANKYOU, "", ""}, - // Translators // - TODO @@ -114,7 +111,7 @@ streamfx::ui::about::about() : QDialog(reinterpret_cast(obs_frontend_g bool column_selector = false; size_t row_selector = 0; QGridLayout* content_layout = dynamic_cast(content->layout()); - for (auto entry : _entries) { + for (const auto& entry : _entries) { if (entry.role == role_type::SPACER) { row_selector += 2; column_selector = 0;