Commit a3167ce6 authored by David Narváez's avatar David Narváez

Add All Top-Level Targets to the Menu

The previous code did not handle folders with
multiple actions but no parent.

Test Plan:
Create a project with two toplevel targets (e.g.
a CMakeLists.txt with two add_executable calls), add the
project to a KDevelo session, go to Configure Launches and
try adding a compiled binary by clicking on the Add button
at the top-left corner. Before this patch, only one of the
two toplevel targets would show in the menu.

Reviewers: #kdevelop, apol

Reviewed By: #kdevelop, apol

Subscribers: kfunk, apol, arrowd, kdevelop-devel

Tags: #kdevelop

Differential Revision:
parent 97a1bbfb
......@@ -337,7 +337,7 @@ QMenu* NativeAppConfigType::launcherSuggestions()
foreach(KDevelop::ProjectBaseItem* folder, targetsContainer.keys()) {
QList<QAction*> actions = targetsContainer.value(folder);
if(actions.size()==1 || !folder->parent()) {
separateActions += actions.first();
} else {
foreach(QAction* a, actions) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment