diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index f994fd14e..58d725d21 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -979,8 +979,3 @@ config_t OBSBasic::Config() const { return basicConfig; } - -void OBSBasic::UnloadProperties() -{ - properties = nullptr; -} diff --git a/obs/window-basic-main.hpp b/obs/window-basic-main.hpp index 62106483b..1798bed69 100644 --- a/obs/window-basic-main.hpp +++ b/obs/window-basic-main.hpp @@ -25,6 +25,8 @@ #include +#include + class QListWidgetItem; #include "ui_OBSBasic.h" @@ -45,7 +47,7 @@ private: ConfigFile basicConfig; - OBSBasicProperties *properties; + QPointer properties; void GetFPSCommon(uint32_t &num, uint32_t &den) const; void GetFPSInteger(uint32_t &num, uint32_t &den) const; @@ -103,8 +105,6 @@ public: void SaveProject(); void LoadProject(); - void UnloadProperties(); - protected: virtual void closeEvent(QCloseEvent *event) override; virtual void changeEvent(QEvent *event) override; diff --git a/obs/window-basic-properties.cpp b/obs/window-basic-properties.cpp index ec00c6f08..e5950247b 100644 --- a/obs/window-basic-properties.cpp +++ b/obs/window-basic-properties.cpp @@ -78,12 +78,6 @@ void OBSBasicProperties::DrawPreview(void *data, uint32_t cx, uint32_t cy) gs_matrix_pop(); } -void OBSBasicProperties::closeEvent(QCloseEvent *event) -{ - main->UnloadProperties(); - UNUSED_PARAMETER(event); -} - void OBSBasicProperties::resizeEvent(QResizeEvent *event) { if (isVisible()) { diff --git a/obs/window-basic-properties.hpp b/obs/window-basic-properties.hpp index fd5d01cd2..0ee633103 100644 --- a/obs/window-basic-properties.hpp +++ b/obs/window-basic-properties.hpp @@ -50,7 +50,6 @@ public: void Init(); protected: - virtual void closeEvent(QCloseEvent *event) override; virtual void resizeEvent(QResizeEvent *event) override; virtual void timerEvent(QTimerEvent *event) override; };