mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Pass application list directly to CHotkeyDialog constructor
The list of applications is already known when the CHotkeyDialog object is constructed. So there was no good reason to defer this to a later time with a setter. In contrast, supporting a setter function was much more complex, since internally all GUI signals were already connected and more carefull case handling would be necessary (e.g. the machine combobox would change its index). Therefore the setter is removed in favor of passing the application list directly to the constructor. This fixes also an issue that the machine name was not properly set up in the dialog when editing a hotkey. This also reverts the change from CIdentifier to string based machine handling. refs #881
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2ab6e7f41e
commit
3a2618fadb
@@ -67,7 +67,7 @@ namespace BlackGui
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CHotkeyDialog(const BlackMisc::Input::CActionHotkey &actionHotkey, QWidget *parent = nullptr);
|
||||
CHotkeyDialog(const BlackMisc::Input::CActionHotkey &actionHotkey, const BlackMisc::CIdentifierList &applications, QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CHotkeyDialog();
|
||||
@@ -75,9 +75,6 @@ namespace BlackGui
|
||||
//! Get hotkey selected by user
|
||||
BlackMisc::Input::CActionHotkey getSelectedActionHotkey() const { return m_actionHotkey; }
|
||||
|
||||
//! Set registered applications
|
||||
void setRegisteredApplications(const BlackMisc::CIdentifierList &applications);
|
||||
|
||||
//! Init style sheet
|
||||
void initStyleSheet();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user