mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +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
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		|  | @ -35,7 +35,7 @@ void ConfigureHotkeys::EmitHotkeysChanged() { | ||||||
|     emit HotkeysChanged(GetUsedKeyList()); |     emit HotkeysChanged(GetUsedKeyList()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QList<QKeySequence> ConfigureHotkeys::GetUsedKeyList() { | QList<QKeySequence> ConfigureHotkeys::GetUsedKeyList() const { | ||||||
|     QList<QKeySequence> list; |     QList<QKeySequence> list; | ||||||
|     for (int r = 0; r < model->rowCount(); r++) { |     for (int r = 0; r < model->rowCount(); r++) { | ||||||
|         QStandardItem* parent = model->item(r, 0); |         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); |     return input_keys_list.contains(key_sequence) || GetUsedKeyList().contains(key_sequence); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -42,8 +42,8 @@ signals: | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     void Configure(QModelIndex index); |     void Configure(QModelIndex index); | ||||||
|     bool IsUsedKey(QKeySequence key_sequence); |     bool IsUsedKey(QKeySequence key_sequence) const; | ||||||
|     QList<QKeySequence> GetUsedKeyList(); |     QList<QKeySequence> GetUsedKeyList() const; | ||||||
| 
 | 
 | ||||||
|     std::unique_ptr<Ui::ConfigureHotkeys> ui; |     std::unique_ptr<Ui::ConfigureHotkeys> ui; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue