forked from qt-creator/qt-creator
Git: Only allow commit if author information is valid
Check author information to be valid before enableing the commit button. Task-number: QTCREATORBUG-2410
This commit is contained in:
@@ -31,8 +31,13 @@
|
||||
#define GITSUBMITEDITORWIDGET_H
|
||||
|
||||
#include "ui_gitsubmitpanel.h"
|
||||
|
||||
#include <utils/submiteditorwidget.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QValidator;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Git {
|
||||
namespace Internal {
|
||||
|
||||
@@ -49,6 +54,7 @@ struct GitSubmitEditorPanelData;
|
||||
|
||||
class GitSubmitEditorWidget : public Utils::SubmitEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GitSubmitEditorWidget(QWidget *parent = 0);
|
||||
@@ -59,9 +65,18 @@ public:
|
||||
|
||||
void setPanelInfo(const GitSubmitEditorPanelInfo &info);
|
||||
|
||||
protected:
|
||||
bool canSubmit() const;
|
||||
|
||||
private slots:
|
||||
void authorInformationChanged();
|
||||
|
||||
private:
|
||||
bool emailIsValid() const;
|
||||
|
||||
QWidget *m_gitSubmitPanel;
|
||||
Ui::GitSubmitPanel m_gitSubmitPanelUi;
|
||||
QValidator *m_emailValidator;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user