HomePhabricator

Use Qt signal for macOS Dock icon click event

Description

Use Qt signal for macOS Dock icon click event

Summary:

This moves the Dock icon click reaction code to the common place and
allows some cleanup in obj_c code.

According to the Apple's docs `class_replaceMethod` behaves as
`class_addMethod`, if the method identified by name does not yet exist;
or as `method_setImplementation`, if it does exist.

Partial backport of core PR14123 (commit ):
https://github.com/bitcoin/bitcoin/pull/14123/commits/2464925e7be832d4926b6204169bbbc1646c6368

Test Plan:
Build and run on OSX.
Check the dock icon is working as expected.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Oct 31 2018, 19:15
FabienCommitted on Nov 20 2019, 16:29
FabienPushed on Nov 20 2019, 16:33
Reviewer
Restricted Project
Differential Revision
D4480: Use Qt signal for macOS Dock icon click event
Parents
rSTAGINGb0d68c3ce535: [CMAKE] Use a NSIS custom template
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/14243