MCPcopy Create free account
hub / github.com/MultiMC/Launcher / execWithSelection

Method execWithSelection

launcher/ui/dialogs/IconPickerDialog.cpp:134–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134int IconPickerDialog::execWithSelection(QString selection)
135{
136 auto list = APPLICATION->icons();
137 auto contentsWidget = ui->iconView;
138 selectedIconKey = selection;
139
140 int index_nr = list->getIconIndex(selection);
141 auto model_index = list->index(index_nr);
142 contentsWidget->selectionModel()->select(
143 model_index, QItemSelectionModel::Current | QItemSelectionModel::Select);
144
145 QMetaObject::invokeMethod(this, "delayed_scroll", Qt::QueuedConnection, Q_ARG(QModelIndex, model_index));
146 return QDialog::exec();
147}
148
149void IconPickerDialog::delayed_scroll(QModelIndex model_index)
150{

Callers 3

on_iconButton_clickedMethod · 0.80
on_iconButton_clickedMethod · 0.80

Calls 3

iconsMethod · 0.80
getIconIndexMethod · 0.80
indexMethod · 0.45

Tested by

no test coverage detected