File indexing completed on 2025-01-19 04:22:43
0001 /* 0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 #include "abstractcommand.h" 0009 #include "libkommit_export.h" 0010 0011 namespace Git 0012 { 0013 0014 class LIBKOMMIT_EXPORT AddSubmoduleCommand : public AbstractCommand 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 explicit AddSubmoduleCommand(Manager *git); 0020 0021 Q_REQUIRED_RESULT QStringList generateArgs() const override; 0022 0023 Q_REQUIRED_RESULT bool force() const; 0024 void setForce(bool newForce); 0025 0026 Q_REQUIRED_RESULT QString branch() const; 0027 void setbranch(const QString &newbranch); 0028 0029 Q_REQUIRED_RESULT const QString &url() const; 0030 void setUrl(const QString &newUrl); 0031 0032 Q_REQUIRED_RESULT const QString &localPath() const; 0033 void setLocalPath(const QString &newLocalPath); 0034 0035 private: 0036 bool mForce{false}; 0037 QString mBranch; 0038 QString mUrl; 0039 QString mLocalPath; 0040 }; 0041 0042 }