File indexing completed on 2025-01-05 05:14:48
0001 /* 0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #include "cleanupdialog.h" 0008 #include "commands/commandclean.h" 0009 0010 CleanupDialog::CleanupDialog(QWidget *parent) 0011 : AppDialog(parent) 0012 { 0013 setupUi(this); 0014 } 0015 0016 Git::CommandClean *CleanupDialog::command() const 0017 { 0018 auto cmd = new Git::CommandClean; 0019 if (radioButtonAllUntrackedFiles->isChecked()) 0020 cmd->setType(Git::CommandClean::AllUntrackedFiles); 0021 else if (radioButtonNonIgnoredUntrackedFiles->isChecked()) 0022 cmd->setType(Git::CommandClean::NonIgnoredUntrackedFiles); 0023 else 0024 cmd->setType(Git::CommandClean::IgnoredFiles); 0025 0026 cmd->setRemoveUntrackedDirectories(checkBoxRemoveDirectories->isChecked()); 0027 0028 return cmd; 0029 } 0030 0031 #include "moc_cleanupdialog.cpp"