File tree 4 files changed +13
-0
lines changed
4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,7 @@ void Settings::load()
189
189
docsetPath = QStringLiteral (" docsets" );
190
190
#endif
191
191
}
192
+ useGlobalDocsets = settings->value (QStringLiteral (" use_global" ), true ).toBool ();
192
193
settings->endGroup ();
193
194
194
195
// Create the docset storage directory if it doesn't exist.
@@ -268,6 +269,7 @@ void Settings::save()
268
269
269
270
settings->beginGroup (GroupDocsets);
270
271
settings->setValue (QStringLiteral (" path" ), docsetPath);
272
+ settings->setValue (QStringLiteral (" use_global" ), useGlobalDocsets);
271
273
settings->endGroup ();
272
274
273
275
settings->beginGroup (GroupState);
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ class Settings final : public QObject
98
98
99
99
// Other
100
100
QString docsetPath;
101
+ bool useGlobalDocsets;
101
102
102
103
// State
103
104
QByteArray windowGeometry;
Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ void SettingsDialog::loadSettings()
166
166
ui->toolButton ->setKeySequence (settings->showShortcut );
167
167
168
168
ui->docsetStorageEdit ->setText (QDir::toNativeSeparators (settings->docsetPath ));
169
+ ui->docsetStorageGlobalCheckBox ->setChecked (settings->useGlobalDocsets );
169
170
170
171
// Tabs Tab
171
172
ui->openNewTabAfterActive ->setChecked (settings->openNewTabAfterActive );
@@ -259,6 +260,7 @@ void SettingsDialog::saveSettings()
259
260
settings->showShortcut = ui->toolButton ->keySequence ();
260
261
261
262
settings->docsetPath = QDir::fromNativeSeparators (ui->docsetStorageEdit ->text ());
263
+ settings->useGlobalDocsets = ui->docsetStorageGlobalCheckBox ->isChecked ();
262
264
263
265
// Tabs Tab
264
266
settings->openNewTabAfterActive = ui->openNewTabAfterActive ->isChecked ();
Original file line number Diff line number Diff line change 145
145
</item >
146
146
</layout >
147
147
</item >
148
+ <item row =" 1" column =" 0" colspan =" 2" >
149
+ <widget class =" QCheckBox" name =" docsetStorageGlobalCheckBox" >
150
+ <property name =" text" >
151
+ <string >Enable global docset storage</string >
152
+ </property >
153
+ </widget >
154
+ </item >
148
155
</layout >
149
156
</widget >
150
157
</item >
797
804
<class >SettingsDialog</class >
798
805
<extends >QDialog</extends >
799
806
<header >ui/settingsdialog.h</header >
807
+ <container >1</container >
800
808
</customwidget >
801
809
</customwidgets >
802
810
<resources />
You can’t perform that action at this time.
0 commit comments