1#pragma once
2
3#include <QDialog>
4
5namespace Ui
6{
7class SquashDlg;
8}
9
10class GitCache;
11class GitBase;
12
13class SquashDlg : public QDialog
14{
15 Q_OBJECT
16
17signals:
18 void changesCommitted();
19
20public:
21 explicit SquashDlg(const QSharedPointer<GitBase> git, const QSharedPointer<GitCache> &cache, const QStringList &shas,
22 QWidget *parent = nullptr);
23 ~SquashDlg() override;
24
25 void accept() override;
26
27private:
28 QSharedPointer<GitBase> mGit;
29 QSharedPointer<GitCache> mCache;
30 QStringList mShas;
31 Ui::SquashDlg *ui;
32 int mTitleMaxLength = 50;
33
34 void updateCounter(const QString &text);
35 bool checkMsg(QString &msg);
36};
37