mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 10:00:06 +00:00
configure_hotkey: Make IsUsedKey() a const member function
This doesn't actually modify instance state of the dialog, so this can be made const.
This commit is contained in:
parent
46b015befd
commit
35281b4b3b
@ -35,7 +35,7 @@ void ConfigureHotkeys::EmitHotkeysChanged() {
|
||||
emit HotkeysChanged(GetUsedKeyList());
|
||||
}
|
||||
|
||||
QList<QKeySequence> ConfigureHotkeys::GetUsedKeyList() {
|
||||
QList<QKeySequence> ConfigureHotkeys::GetUsedKeyList() const {
|
||||
QList<QKeySequence> list;
|
||||
for (int r = 0; r < model->rowCount(); r++) {
|
||||
QStandardItem* parent = model->item(r, 0);
|
||||
@ -94,7 +94,7 @@ void ConfigureHotkeys::Configure(QModelIndex index) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ConfigureHotkeys::IsUsedKey(QKeySequence key_sequence) {
|
||||
bool ConfigureHotkeys::IsUsedKey(QKeySequence key_sequence) const {
|
||||
return input_keys_list.contains(key_sequence) || GetUsedKeyList().contains(key_sequence);
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,8 @@ signals:
|
||||
|
||||
private:
|
||||
void Configure(QModelIndex index);
|
||||
bool IsUsedKey(QKeySequence key_sequence);
|
||||
QList<QKeySequence> GetUsedKeyList();
|
||||
bool IsUsedKey(QKeySequence key_sequence) const;
|
||||
QList<QKeySequence> GetUsedKeyList() const;
|
||||
|
||||
std::unique_ptr<Ui::ConfigureHotkeys> ui;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user