Changeset View
Changeset View
Standalone View
Standalone View
shell/launchconfiguration.cpp
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 121 | { | |||
---|---|---|---|---|---|
122 | if( l->id() == launchers.at( idx ) ) | 122 | if( l->id() == launchers.at( idx ) ) | ||
123 | { | 123 | { | ||
124 | return launchers.at( idx ); | 124 | return launchers.at( idx ); | ||
125 | } | 125 | } | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | } | 128 | } | ||
129 | 129 | | |||
130 | //No launcher configured, lets just try with the first one in the list and hope it works | 130 | // No launcher configured, if it's debug mode, prefer GDB if available. | ||
131 | if( mode == "debug" ) | ||||
132 | { | ||||
133 | foreach( ILauncher* l, type()->launchers() ) | ||||
134 | { | ||||
135 | if( l->supportedModes().contains( mode ) && l->id() == "gdb" ) | ||||
136 | { | ||||
137 | return l->id(); | ||||
138 | } | ||||
139 | } | ||||
140 | } | ||||
141 | // Otherwise, lets just try with the first one in the list and hope it works | ||||
131 | foreach( ILauncher* l, type()->launchers() ) | 142 | foreach( ILauncher* l, type()->launchers() ) | ||
132 | { | 143 | { | ||
133 | if( l->supportedModes().contains( mode ) ) | 144 | if( l->supportedModes().contains( mode ) ) | ||
134 | { | 145 | { | ||
135 | return l->id(); | 146 | return l->id(); | ||
136 | } | 147 | } | ||
137 | } | 148 | } | ||
138 | 149 | | |||
Show All 27 Lines |