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[])
491491
492492 // / 5. Now that settings and translations are available, ask user for data directory
493493 // 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;
496497
497498 // / 6. Determine availability of data directory and parse bitcoin.conf
498499 // / - 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)
180180 }
181181}
182182
183- bool Intro::pickDataDirectory (interfaces::Node& node)
183+ bool Intro::showIfNeeded (interfaces::Node& node, bool & did_show_intro )
184184{
185+ did_show_intro = false ;
186+
185187 QSettings settings;
186188 /* If data directory provided on command line, no need to look at settings
187189 or show a picking dialog */
@@ -205,6 +207,7 @@ bool Intro::pickDataDirectory(interfaces::Node& node)
205207 Intro intro (0 , node.getAssumedBlockchainSize (), node.getAssumedChainStateSize ());
206208 intro.setDataDirectory (dataDir);
207209 intro.setWindowIcon (QIcon (" :icons/bitcoin" ));
210+ did_show_intro = true ;
208211
209212 while (true )
210213 {
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class Intro : public QDialog
4646 * @note do NOT call global GetDataDir() before calling this function, this
4747 * will cause the wrong path to be cached.
4848 */
49- static bool pickDataDirectory (interfaces::Node& node);
49+ static bool showIfNeeded (interfaces::Node& node, bool & did_show_intro );
5050
5151Q_SIGNALS:
5252 void requestCheck ();
You can’t perform that action at this time.
0 commit comments