MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / openBitcoinConf

Function openBitcoinConf

src/qt/guiutil.cpp:438–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 3

PathToQStringFunction · 0.85
GetConfigFilePathMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected