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

Method execWithSelection

launcher/ui/dialogs/IconPickerDialog.cpp:151–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151int IconPickerDialog::execWithSelection(QString selection)
152{
153 auto list = APPLICATION->icons();
154 auto contentsWidget = ui->iconView;
155 selectedIconKey = selection;
156
157 int index_nr = list->getIconIndex(selection);
158 auto model_index = list->index(index_nr);
159 contentsWidget->selectionModel()->select(model_index, QItemSelectionModel::Current | QItemSelectionModel::Select);
160
161 QMetaObject::invokeMethod(this, "delayed_scroll", Qt::QueuedConnection, Q_ARG(QModelIndex, model_index));
162 return QDialog::exec();
163}
164
165void IconPickerDialog::delayed_scroll(QModelIndex model_index)
166{

Callers 4

on_iconButton_clickedMethod · 0.80
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