diff options
author | Adriaan de Groot <groot@kde.org> | 2020-04-06 11:08:16 +0200 |
---|---|---|
committer | Adriaan de Groot <groot@kde.org> | 2020-04-06 11:08:16 +0200 |
commit | 88c75fb5dc70fe3ab0a1aadbc241ea6df4bac177 (patch) | |
tree | 77dd21bd8c28f3353d24c5b1566430f4bf551b3c | |
parent | 21f060c3fd506bf733ae19da9c1b3f587a50799b (diff) |
[libcalamares] Simplify program-arguments creation
-rw-r--r-- | src/libcalamares/utils/CalamaresUtilsSystem.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index c464e93f6..9e3cad4f9 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -137,7 +137,7 @@ System::runCommand( System::RunLocation location, QProcess process; QString program; - QStringList arguments; + QStringList arguments( args ); if ( location == System::RunLocation::RunInTarget ) { @@ -149,13 +149,11 @@ System::runCommand( System::RunLocation location, } program = "chroot"; - arguments = QStringList( { destDir } ); - arguments << args; + arguments.prepend( destDir ); } else { program = "env"; - arguments << args; } process.setProgram( program ); |