mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 07:55:39 +01:00
Merge #9890: Add a button to open the config file in a text editor
9ab9e7d Add a button to open the config file in a text editor (Eric Shaw Jr)
Tree-SHA512: 1d13be9ac788a05a5116dbb3e1136ef65732dc2b5634547860612658109668922c9ea80b77bde4ba5beaa762d54f2a986a6064d4e34e963cdcd3d126a4eced37
This commit is contained in:
@@ -415,6 +415,22 @@ void openDebugLogfile()
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug)));
|
||||
}
|
||||
|
||||
bool openBitcoinConf()
|
||||
{
|
||||
boost::filesystem::path pathConfig = GetConfigFile(BITCOIN_CONF_FILENAME);
|
||||
|
||||
/* Create the file */
|
||||
boost::filesystem::ofstream configFile(pathConfig, std::ios_base::app);
|
||||
|
||||
if (!configFile.good())
|
||||
return false;
|
||||
|
||||
configFile.close();
|
||||
|
||||
/* Open bitcoin.conf with the associated application */
|
||||
return QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig)));
|
||||
}
|
||||
|
||||
void SubstituteFonts(const QString& language)
|
||||
{
|
||||
#if defined(Q_OS_MAC)
|
||||
|
||||
Reference in New Issue
Block a user