| 328 | } |
| 329 | |
| 330 | void ProjectSelectionPage::handleNewStuffDialogFinished(const QList<KNSCore::Entry>& changedEntries) |
| 331 | { |
| 332 | if (changedEntries.isEmpty()) { |
| 333 | return; |
| 334 | } |
| 335 | |
| 336 | m_templatesModel->refresh(); |
| 337 | bool updated = false; |
| 338 | |
| 339 | for (const auto& entry : changedEntries) { |
| 340 | if (!entry.installedFiles().isEmpty()) |
| 341 | { |
| 342 | updated = true; |
| 343 | setCurrentTemplate(entry.installedFiles().at(0)); |
| 344 | break; |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | if (!updated) |
| 349 | { |
| 350 | ui->listView->setCurrentIndex(QModelIndex()); |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | void ProjectSelectionPage::setCurrentTemplate (const QString& fileName) |
| 355 | { |
nothing calls this directly
no test coverage detected