MCPcopy Create free account
hub / github.com/ElementsProject/elements / openBitcoinConf

Function openBitcoinConf

src/qt/guiutil.cpp:440–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440bool openBitcoinConf()
441{
442 fs::path pathConfig = GetConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME));
443
444 /* Create the file */
445 std::ofstream configFile{pathConfig, std::ios_base::app};
446
447 if (!configFile.good())
448 return false;
449
450 configFile.close();
451
452 /* Open bitcoin.conf with the associated application */
453 bool res = QDesktopServices::openUrl(QUrl::fromLocalFile(PathToQString(pathConfig)));
454#ifdef Q_OS_MAC
455 // Workaround for macOS-specific behavior; see #15409.
456 if (!res) {
457 res = QProcess::startDetached("/usr/bin/open", QStringList{"-t", PathToQString(pathConfig)});
458 }
459#endif
460
461 return res;
462}
463
464ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) :
465 QObject(parent),

Callers 1

Calls 4

GetConfigFileFunction · 0.85
PathToQStringFunction · 0.85
GetArgMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected