configuration_shared: Use an int instead of a QString
I noticed some of the code could be reduced to just passing the function an int, since I was doing the same thing over and over. Also clang-formats configure_graphics
This commit is contained in:
parent
d75846daff
commit
df6af4e1a3
4 changed files with 28 additions and 22 deletions
|
@ -125,8 +125,8 @@ void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) {
|
|||
combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX);
|
||||
}
|
||||
|
||||
void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, const QString& global) {
|
||||
const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(global);
|
||||
void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, int global_index) {
|
||||
const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(combobox->itemText(global_index));
|
||||
combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text);
|
||||
combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue