| 44 | |
| 45 | |
| 46 | void ProjectTargetsComboBox::setBaseItem(ProjectFolderItem* item, bool exec) |
| 47 | { |
| 48 | clear(); |
| 49 | |
| 50 | QList<ProjectFolderItem*> items; |
| 51 | if(item) { |
| 52 | items += item; |
| 53 | } else { |
| 54 | const auto projects = ICore::self()->projectController()->projects(); |
| 55 | items.reserve(projects.size()); |
| 56 | for (auto* p : projects) { |
| 57 | items += p->projectItem(); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | ExecutablePathsVisitor walker(exec); |
| 62 | for (ProjectFolderItem* item : std::as_const(items)) { |
| 63 | walker.visit(item); |
| 64 | } |
| 65 | walker.sort(); |
| 66 | |
| 67 | const auto executableItems = walker.paths(); |
| 68 | for (const QString& item : executableItems) { |
| 69 | addItem(QIcon::fromTheme(QStringLiteral("system-run")), item); |
| 70 | } |
| 71 | |
| 72 | } |
| 73 | |
| 74 | QStringList ProjectTargetsComboBox::currentItemPath() const |
| 75 | { |
no test coverage detected