Always set TabSupervisor as parent in Tab subclasses (#5449)

* refactor closeTab

* always set tab parent to tabSupervisor

* set tabSupervisor parent

* use close instead of deleteLater

* be more clear about overloads
This commit is contained in:
RickyRister 2025-01-11 23:34:11 -08:00 committed by GitHub
parent 3a4ec1062b
commit a6fc88c79a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 25 additions and 41 deletions

View file

@ -1,13 +1,14 @@
#include "tab.h"
#include "../ui/widgets/cards/card_info_display_widget.h"
#include "./tab_supervisor.h"
#include <QApplication>
#include <QDebug>
#include <QScreen>
Tab::Tab(TabSupervisor *_tabSupervisor, QWidget *parent)
: QMainWindow(parent), tabSupervisor(_tabSupervisor), contentsChanged(false), infoPopup(0)
Tab::Tab(TabSupervisor *_tabSupervisor)
: QMainWindow(_tabSupervisor), tabSupervisor(_tabSupervisor), contentsChanged(false), infoPopup(0)
{
setAttribute(Qt::WA_DeleteOnClose);
}