mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
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>
This commit is contained in:
parent
317780ca1b
commit
91c353c774
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user