Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Rolf Eike Beer
kdevelop
Commits
e4dad4e7
Commit
e4dad4e7
authored
Nov 27, 2019
by
Rolf Eike Beer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use algorithm and lambda to find launcher
parent
c79b1ba3
Pipeline
#13976
failed with stage
in 60 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
plugins/cmake/testing/ctestrunjob.cpp
plugins/cmake/testing/ctestrunjob.cpp
+8
-9
No files found.
plugins/cmake/testing/ctestrunjob.cpp
View file @
e4dad4e7
...
...
@@ -62,15 +62,14 @@ static KJob* createTestJob(const QString& launchModeId, const QStringList& argum
qCDebug
(
CMAKE
)
<<
"got mode and type:"
<<
type
<<
type
->
id
()
<<
mode
<<
mode
->
id
();
Q_ASSERT
(
type
&&
mode
);
ILauncher
*
launcher
=
nullptr
;
const
auto
launchers
=
type
->
launchers
();
for
(
ILauncher
*
l
:
launchers
)
{
//qCDebug(CMAKE) << "available launcher" << l << l->id() << l->supportedModes();
if
(
l
->
supportedModes
().
contains
(
mode
->
id
()))
{
launcher
=
l
;
break
;
}
}
ILauncher
*
launcher
=
[
type
,
mode
]()
{
const
auto
launchers
=
type
->
launchers
();
auto
it
=
std
::
find_if
(
launchers
.
begin
(),
launchers
.
end
(),
[
mode
](
ILauncher
*
l
)
{
return
l
->
supportedModes
().
contains
(
mode
->
id
());
});
Q_ASSERT
(
it
!=
launchers
.
end
());
return
*
it
;
}();
Q_ASSERT
(
launcher
);
auto
ilaunch
=
[
type
]()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment