@@ -109,6 +109,15 @@ class GeneralPanel : public QWidget {
109
109
mStoreCredentials =
110
110
new QCheckBox (tr (" Store credentials in secure storage" ), this );
111
111
112
+ mAutoSignoffCommits =
113
+ new QCheckBox (tr (" Automatically signoff on commits" ), this );
114
+
115
+ mGpgSignCommits = new QCheckBox (tr (" Sign all commits" ), this );
116
+
117
+ mGpgSignPushes = new QCheckBox (tr (" Sign all pushes" ), this );
118
+
119
+ mGpgSignTags = new QCheckBox (tr (" Sign all tags" ), this );
120
+
112
121
QLabel *privacy = new QLabel (tr (" <a href='view'>View privacy policy</a>" ));
113
122
connect (privacy, &QLabel::linkActivated,
114
123
[] { AboutDialog::openSharedInstance (AboutDialog::Privacy); });
@@ -125,6 +134,10 @@ class GeneralPanel : public QWidget {
125
134
form->addRow (QString (), mAutoPrune );
126
135
form->addRow (tr (" Language:" ), mNoTranslation );
127
136
form->addRow (tr (" Credentials:" ), mStoreCredentials );
137
+ form->addRow (tr (" Auto Signoff:" ), mAutoSignoffCommits );
138
+ form->addRow (tr (" Sign Commits:" ), mGpgSignCommits );
139
+ form->addRow (tr (" Sign Pushes:" ), mGpgSignPushes );
140
+ form->addRow (tr (" Sign Tags:" ), mGpgSignTags );
128
141
form->addRow (QString (), privacy);
129
142
130
143
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
@@ -184,6 +197,26 @@ class GeneralPanel : public QWidget {
184
197
delete CredentialHelper::instance ();
185
198
});
186
199
200
+ connect (mAutoSignoffCommits , &QCheckBox::toggled, [](bool checked) {
201
+ git::Config config = git::Config::global ();
202
+ config.setValue (" format.signOff" , checked);
203
+ });
204
+
205
+ connect (mGpgSignCommits , &QCheckBox::toggled, [](bool checked) {
206
+ git::Config config = git::Config::global ();
207
+ config.setValue (" commit.gpgSign" , checked);
208
+ });
209
+
210
+ connect (mGpgSignPushes , &QCheckBox::toggled, [](bool checked) {
211
+ git::Config config = git::Config::global ();
212
+ config.setValue (" push.gpgSign" , checked);
213
+ });
214
+
215
+ connect (mGpgSignTags , &QCheckBox::toggled, [](bool checked) {
216
+ git::Config config = git::Config::global ();
217
+ config.setValue (" tag.gpgSign" , checked);
218
+ });
219
+
187
220
connect (mSingleInstance , &QCheckBox::toggled, [](bool checked) {
188
221
Settings::instance ()->setValue (Setting::Id::AllowSingleInstanceOnly,
189
222
checked);
@@ -213,6 +246,10 @@ class GeneralPanel : public QWidget {
213
246
settings->value (Setting::Id::DontTranslate).toBool ());
214
247
mStoreCredentials ->setChecked (
215
248
settings->value (Setting::Id::StoreCredentials).toBool ());
249
+ mAutoSignoffCommits ->setChecked (config.value <bool >(" format.signOff" ));
250
+ mGpgSignCommits ->setChecked (config.value <bool >(" commit.gpgSign" ));
251
+ mGpgSignPushes ->setChecked (config.value <bool >(" push.gpgSign" ));
252
+ mGpgSignTags ->setChecked (config.value <bool >(" tag.gpgSign" ));
216
253
217
254
mSingleInstance ->setChecked (
218
255
settings->value (Setting::Id::AllowSingleInstanceOnly).toBool ());
@@ -229,6 +266,10 @@ class GeneralPanel : public QWidget {
229
266
QCheckBox *mAutoPrune ;
230
267
QCheckBox *mNoTranslation ;
231
268
QCheckBox *mStoreCredentials ;
269
+ QCheckBox *mAutoSignoffCommits ;
270
+ QCheckBox *mGpgSignCommits ;
271
+ QCheckBox *mGpgSignPushes ;
272
+ QCheckBox *mGpgSignTags ;
232
273
QCheckBox *mSingleInstance ;
233
274
};
234
275
0 commit comments