File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,9 @@ int GuiMain(int argc, char* argv[])
491
491
492
492
// / 5. Now that settings and translations are available, ask user for data directory
493
493
// User language is set up: pick a data directory
494
- if (!Intro::pickDataDirectory (*node))
495
- return EXIT_SUCCESS;
494
+ bool did_show_intro = false ;
495
+ // Gracefully exit if the user cancels
496
+ if (!Intro::showIfNeeded (*node, did_show_intro)) return EXIT_SUCCESS;
496
497
497
498
// / 6. Determine availability of data directory and parse bitcoin.conf
498
499
// / - Do not call GetDataDir(true) before this step finishes
Original file line number Diff line number Diff line change @@ -180,8 +180,10 @@ void Intro::setDataDirectory(const QString &dataDir)
180
180
}
181
181
}
182
182
183
- bool Intro::pickDataDirectory (interfaces::Node& node)
183
+ bool Intro::showIfNeeded (interfaces::Node& node, bool & did_show_intro )
184
184
{
185
+ did_show_intro = false ;
186
+
185
187
QSettings settings;
186
188
/* If data directory provided on command line, no need to look at settings
187
189
or show a picking dialog */
@@ -205,6 +207,7 @@ bool Intro::pickDataDirectory(interfaces::Node& node)
205
207
Intro intro (0 , node.getAssumedBlockchainSize (), node.getAssumedChainStateSize ());
206
208
intro.setDataDirectory (dataDir);
207
209
intro.setWindowIcon (QIcon (" :icons/bitcoin" ));
210
+ did_show_intro = true ;
208
211
209
212
while (true )
210
213
{
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class Intro : public QDialog
46
46
* @note do NOT call global GetDataDir() before calling this function, this
47
47
* will cause the wrong path to be cached.
48
48
*/
49
- static bool pickDataDirectory (interfaces::Node& node);
49
+ static bool showIfNeeded (interfaces::Node& node, bool & did_show_intro );
50
50
51
51
Q_SIGNALS:
52
52
void requestCheck ();
You can’t perform that action at this time.
0 commit comments