Page MenuHomePhabricator

Use Qt signal for macOS Dock icon click event
ClosedPublic

Authored by Fabien on Nov 20 2019, 08:38.

Details

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.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR14123_part2
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8170
Build 14369: Default Diff Build & Tests
Build 14368: arc lint + arc unit

Event Timeline

deadalnix added inline comments.
src/qt/macdockiconhandler.h
15

Fix layout

This revision is now accepted and ready to land.Nov 20 2019, 14:09
This revision was landed with ongoing or failed builds.Nov 20 2019, 16:29
This revision was automatically updated to reflect the committed changes.