| 149 | } |
| 150 | |
| 151 | int 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 | |
| 165 | void IconPickerDialog::delayed_scroll(QModelIndex model_index) |
| 166 | { |
no test coverage detected