2023-01-27 14:17:46 +01:00
|
|
|
// Copyright (c) 2018 Artur Shepilko
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2016-11-16 12:51:32 -06:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ui_fossilcommitpanel.h"
|
|
|
|
|
|
|
|
|
|
#include <vcsbase/submiteditorwidget.h>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QValidator;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2022-11-11 08:15:45 +01:00
|
|
|
namespace Utils { class FilePath; }
|
2016-11-16 12:51:32 -06:00
|
|
|
|
|
|
|
|
namespace Fossil {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class BranchInfo;
|
|
|
|
|
|
|
|
|
|
/*submit editor widget based on git SubmitEditor
|
|
|
|
|
Some extra fields have been added to the standard SubmitEditorWidget,
|
|
|
|
|
to help to conform to the commit style that is used by both git and Fossil*/
|
|
|
|
|
|
|
|
|
|
class FossilCommitWidget : public VcsBase::SubmitEditorWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
FossilCommitWidget();
|
|
|
|
|
|
2022-11-11 08:15:45 +01:00
|
|
|
void setFields(const Utils::FilePath &repoPath, const BranchInfo &newBranch,
|
|
|
|
|
const QStringList &tags, const QString &userName);
|
2016-11-16 12:51:32 -06:00
|
|
|
|
|
|
|
|
QString newBranch() const;
|
|
|
|
|
QStringList tags() const;
|
|
|
|
|
QString committer() const;
|
|
|
|
|
bool isPrivateOptionEnabled() const;
|
|
|
|
|
|
|
|
|
|
protected:
|
2019-05-13 16:05:28 +02:00
|
|
|
bool canSubmit(QString *whyNot = nullptr) const;
|
2016-11-16 12:51:32 -06:00
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void branchChanged();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool isValidBranch() const;
|
|
|
|
|
|
|
|
|
|
QWidget *m_commitPanel;
|
|
|
|
|
Ui::FossilCommitPanel m_commitPanelUi;
|
|
|
|
|
QValidator *m_branchValidator;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Fossil
|