mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Remove direct bitcoin calls from qt/intro.cpp
This commit is contained in:
committed by
John Newbery
parent
fe6f27e6ea
commit
d7c2c95948
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <qt/guiutil.h>
|
||||
|
||||
#include <interface/node.h>
|
||||
#include <util.h>
|
||||
|
||||
#include <QFileDialog>
|
||||
@@ -186,7 +187,7 @@ QString Intro::getDefaultDataDirectory()
|
||||
return GUIUtil::boostPathToQString(GetDefaultDataDir());
|
||||
}
|
||||
|
||||
bool Intro::pickDataDirectory()
|
||||
bool Intro::pickDataDirectory(interface::Node& node)
|
||||
{
|
||||
QSettings settings;
|
||||
/* If data directory provided on command line, no need to look at settings
|
||||
@@ -233,8 +234,9 @@ bool Intro::pickDataDirectory()
|
||||
* override -datadir in the bitcoin.conf file in the default data directory
|
||||
* (to be consistent with bitcoind behavior)
|
||||
*/
|
||||
if(dataDir != getDefaultDataDirectory())
|
||||
gArgs.SoftSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting
|
||||
if(dataDir != getDefaultDataDirectory()) {
|
||||
node.softSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user