mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 01:02:48 +01:00
game_list: Pass the parent constructor argument to the QWidget base class
If the control was ever passed an explicit parent, a potential memory leak would happen, as the game list wouldn't be freed. However, in our case, the game list was placed within a layout, which automatically performs reparenting, avoiding this issue.
This commit is contained in:
parent
926e18d25c
commit
fd3d56740e
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@
|
||||||
#include "game_list_p.h"
|
#include "game_list_p.h"
|
||||||
#include "ui_settings.h"
|
#include "ui_settings.h"
|
||||||
|
|
||||||
GameList::GameList(QWidget* parent) {
|
GameList::GameList(QWidget* parent) : QWidget{parent} {
|
||||||
QVBoxLayout* layout = new QVBoxLayout;
|
QVBoxLayout* layout = new QVBoxLayout;
|
||||||
|
|
||||||
tree_view = new QTreeView;
|
tree_view = new QTreeView;
|
||||||
|
|
Loading…
Reference in a new issue