diff options
| author | Jonas Schnelli <[email protected]> | 2017-04-10 10:45:51 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2017-04-10 10:46:21 +0200 |
| commit | 1fa4ae67a330c99a09392922f95b5efbea395a1d (patch) | |
| tree | 44e6f7d55b2577e3004933ef1556d89c73f43c7f /src/qt/guiutil.cpp | |
| parent | Merge #10166: Ignore Doxyfile generated from Doxyfile.in template. (diff) | |
| parent | Add a button to open the config file in a text editor (diff) | |
| download | discoin-1fa4ae67a330c99a09392922f95b5efbea395a1d.tar.xz discoin-1fa4ae67a330c99a09392922f95b5efbea395a1d.zip | |
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
Diffstat (limited to 'src/qt/guiutil.cpp')
| -rw-r--r-- | src/qt/guiutil.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index a2699d374..cab829500 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -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) |