HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8665

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jun 3 2019, 21:19
majcostaCommitted on Dec 12 2020, 20:57
majcostaPushed on Dec 12 2020, 20:57
Reviewer
Restricted Project
Differential Revision
D8665: [backport#16044] qt: fix opening bitcoin.conf via Preferences on macOS
Parents
rABC8099bc1028b2: [seeder] Request headers from new connections
Branches
Unknown
Tags
Unknown