Page MenuHomePhabricator

[backport#16044] qt: fix opening bitcoin.conf via Preferences on macOS
ClosedPublic

Authored by majcosta on Dec 11 2020, 19:27.

Details

Summary

6e6494b3fb345848025494cb7a79c5bf8f35e417 qt: fix opening bitcoin.conf via Preferences on macOS; see #15409 (shannon1916)

Pull request description:

Fix #15409. The QT wallet fail to open the configuration file on Mac, when these is no default application for `*.conf` files.

Here is a feasible way to solve this bug. When `QDesktopServices::openUrl` fails to open `file:///path/bitcoin.conf` with its default application, use `QProcess::startDetached` to run `open -t /path/bitcoin.conf` command instead, so as to open the configuration file with system's default text editor.

Backport of Core PR16044

Test Plan
ninja all check check-functional

I don't have a mac to test this unfortunately

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable