File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,16 @@ void Intro::setDataDirectory(const QString &dataDir)
182
182
}
183
183
}
184
184
185
+ int64_t Intro::getPruneMiB () const
186
+ {
187
+ switch (ui->prune ->checkState ()) {
188
+ case Qt::Checked:
189
+ return PruneGBtoMiB (m_prune_target_gb);
190
+ case Qt::Unchecked: default :
191
+ return 0 ;
192
+ }
193
+ }
194
+
185
195
bool Intro::showIfNeeded (bool & did_show_intro, int64_t & prune_MiB)
186
196
{
187
197
did_show_intro = false ;
@@ -233,7 +243,7 @@ bool Intro::showIfNeeded(bool& did_show_intro, int64_t& prune_MiB)
233
243
}
234
244
235
245
// Additional preferences:
236
- prune_MiB = intro.ui -> prune -> isChecked () ? PruneGBtoMiB (intro. m_prune_target_gb ) : int64_t ( 0 );
246
+ prune_MiB = intro.getPruneMiB ( );
237
247
238
248
settings.setValue (" strDataDir" , dataDir);
239
249
settings.setValue (" fReset" , false );
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class Intro : public QDialog
36
36
37
37
QString getDataDirectory ();
38
38
void setDataDirectory (const QString &dataDir);
39
+ int64_t getPruneMiB () const ;
39
40
40
41
/* *
41
42
* Determine data directory. Let the user choose if the current one doesn't exist.
You can’t perform that action at this time.
0 commit comments