UI: Fix undo stack uninitialized ui warning

Moving the declaration of `ui` above `undo_stack` fix the warning.

Co-authored-by: Richard Stanway <r1ch@r1ch.net>
master
tytan652 2022-07-17 14:54:46 +02:00 committed by Ryan Foster
parent 317780ca1b
commit 91c353c774
1 changed files with 7 additions and 4 deletions

View File

@ -817,7 +817,6 @@ private:
OBSSource prevFTBSource = nullptr;
public:
undo_stack undo_s;
OBSSource GetProgramSource();
OBSScene GetCurrentScene();
@ -1149,7 +1148,14 @@ public slots:
void UpdateContextBarDeferred(bool force = false);
void UpdateContextBarVisibility();
private:
std::unique_ptr<Ui::OBSBasic> ui;
public:
/* `undo_s` needs to be declared after `ui` to prevent an uninitialized
* warning for `ui` while initializing `undo_s`. */
undo_stack undo_s;
explicit OBSBasic(QWidget *parent = 0);
virtual ~OBSBasic();
@ -1161,9 +1167,6 @@ public:
const char *file) const override;
static void InitBrowserPanelSafeBlock();
private:
std::unique_ptr<Ui::OBSBasic> ui;
};
class SceneRenameDelegate : public QStyledItemDelegate {