Merge pull request #7207 from spycrab/qt_lazy_hotkey
Qt/MainWindow: Lazily initialize hotkey mapping window
This commit is contained in:
commit
806c1ee8f0
|
@ -258,8 +258,6 @@ void MainWindow::CreateComponents()
|
||||||
m_wii_tas_input_windows[controller_id]->GetValues(input_data, rptf, ext, key);
|
m_wii_tas_input_windows[controller_id]->GetValues(input_data, rptf, ext, key);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_hotkey_window = new MappingWindow(this, MappingWindow::Type::MAPPING_HOTKEYS, 0);
|
|
||||||
|
|
||||||
m_jit_widget = new JITWidget(this);
|
m_jit_widget = new JITWidget(this);
|
||||||
m_log_widget = new LogWidget(this);
|
m_log_widget = new LogWidget(this);
|
||||||
m_log_config_widget = new LogConfigWidget(this);
|
m_log_config_widget = new LogConfigWidget(this);
|
||||||
|
@ -304,7 +302,6 @@ void MainWindow::CreateComponents()
|
||||||
m_graphics_window = new GraphicsWindow(nullptr, this);
|
m_graphics_window = new GraphicsWindow(nullptr, this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
InstallHotkeyFilter(m_hotkey_window);
|
|
||||||
InstallHotkeyFilter(m_controllers_window);
|
InstallHotkeyFilter(m_controllers_window);
|
||||||
InstallHotkeyFilter(m_settings_window);
|
InstallHotkeyFilter(m_settings_window);
|
||||||
InstallHotkeyFilter(m_graphics_window);
|
InstallHotkeyFilter(m_graphics_window);
|
||||||
|
@ -928,9 +925,13 @@ void MainWindow::ShowAboutDialog()
|
||||||
|
|
||||||
void MainWindow::ShowHotkeyDialog()
|
void MainWindow::ShowHotkeyDialog()
|
||||||
{
|
{
|
||||||
m_hotkey_window->show();
|
auto* hotkey_window = new MappingWindow(this, MappingWindow::Type::MAPPING_HOTKEYS, 0);
|
||||||
m_hotkey_window->raise();
|
|
||||||
m_hotkey_window->activateWindow();
|
InstallHotkeyFilter(hotkey_window);
|
||||||
|
|
||||||
|
hotkey_window->show();
|
||||||
|
hotkey_window->raise();
|
||||||
|
hotkey_window->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::ShowGraphicsWindow()
|
void MainWindow::ShowGraphicsWindow()
|
||||||
|
|
|
@ -33,7 +33,6 @@ class HotkeyScheduler;
|
||||||
class JITWidget;
|
class JITWidget;
|
||||||
class LogConfigWidget;
|
class LogConfigWidget;
|
||||||
class LogWidget;
|
class LogWidget;
|
||||||
class MappingWindow;
|
|
||||||
class MemoryWidget;
|
class MemoryWidget;
|
||||||
class NetPlayClient;
|
class NetPlayClient;
|
||||||
class NetPlayDialog;
|
class NetPlayDialog;
|
||||||
|
@ -182,7 +181,6 @@ private:
|
||||||
HotkeyScheduler* m_hotkey_scheduler;
|
HotkeyScheduler* m_hotkey_scheduler;
|
||||||
ControllersWindow* m_controllers_window;
|
ControllersWindow* m_controllers_window;
|
||||||
SettingsWindow* m_settings_window;
|
SettingsWindow* m_settings_window;
|
||||||
MappingWindow* m_hotkey_window;
|
|
||||||
NetPlayDialog* m_netplay_dialog;
|
NetPlayDialog* m_netplay_dialog;
|
||||||
NetPlaySetupDialog* m_netplay_setup_dialog;
|
NetPlaySetupDialog* m_netplay_setup_dialog;
|
||||||
GraphicsWindow* m_graphics_window;
|
GraphicsWindow* m_graphics_window;
|
||||||
|
|
Loading…
Reference in New Issue