From bff0bed07ea90f0b562d0afc615af5854fd610bf Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 22 Jun 2020 12:47:45 +0200 Subject: [PATCH] [users] Apply coding style (only CreateUserJob.cpp though) - use ci/calamaresstyle - SPDX licensing --- src/modules/users/CreateUserJob.cpp | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 2e4e7429e..776b45ce9 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -1,20 +1,9 @@ /* === This file is part of Calamares - === * - * Copyright 2014-2016, Teo Mrnjavac - * Copyright 2018, Adriaan de Groot - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . + * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-License-Identifier: GPL-3.0-or-later + * License-Filename: LICENSE */ #include "CreateUserJob.h" @@ -114,9 +103,13 @@ CreateUserJob::exec() it->truncate( indexOfFirstToDrop ); } - foreach ( const QString& group, m_defaultGroups ) + for ( const QString& group : m_defaultGroups ) + { if ( !groupsLines.contains( group ) ) + { CalamaresUtils::System::instance()->targetEnvCall( { "groupadd", group } ); + } + } QString defaultGroups = m_defaultGroups.join( ',' ); if ( m_autologin )