| 436 | } |
| 437 | |
| 438 | bool 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 | |
| 462 | ToolTipToRichTextFilter::ToolTipToRichTextFilter(int _size_threshold, QObject *parent) : |
| 463 | QObject(parent), |
no test coverage detected