mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Qt/MainWindow: Lazy initialize child windows
This commit is contained in:
@ -27,17 +27,6 @@
|
||||
GraphicsWindow::GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindow* parent)
|
||||
: QDialog(parent), m_xrr_config(xrr_config)
|
||||
{
|
||||
// GraphicsWindow initialization is heavy due to dependencies on the graphics subsystem.
|
||||
// To prevent blocking startup, we create the layout and children at first show time.
|
||||
}
|
||||
|
||||
void GraphicsWindow::Initialize()
|
||||
{
|
||||
if (m_lazy_initialized)
|
||||
return;
|
||||
|
||||
m_lazy_initialized = true;
|
||||
|
||||
CreateMainLayout();
|
||||
|
||||
setWindowTitle(tr("Graphics"));
|
||||
|
@ -29,8 +29,6 @@ class GraphicsWindow final : public QDialog
|
||||
public:
|
||||
explicit GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindow* parent);
|
||||
|
||||
void Initialize();
|
||||
|
||||
void RegisterWidget(GraphicsWidget* widget);
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
signals:
|
||||
@ -41,8 +39,6 @@ private:
|
||||
void OnBackendChanged(const QString& backend);
|
||||
void OnDescriptionAdded(QWidget* widget, const char* description);
|
||||
|
||||
bool m_lazy_initialized = false;
|
||||
|
||||
QTabWidget* m_tab_widget;
|
||||
QLabel* m_description;
|
||||
QDialogButtonBox* m_button_box;
|
||||
|
Reference in New Issue
Block a user