Page MenuHomePhabricator

Merge #12928: qt: Initialize non-static class members that were previously neither initialized where defined nor in constructor

Authored by nakihito on Aug 22 2019, 17:02.



3fdc5fe Make sure initialization occurs in the constructor (practicalswift)
1e7813e Remove redundant initializations from the constructor (practicalswift)
f131872 Initialize non-static class members where they are defined (practicalswift)
73bc1b7 Initialize editStatus and autoCompleter. Previously not initialized where defined or in constructor. (practicalswift)

Pull request description:

Initialize variables previously neither defined where defined nor in constructor:
* `editStatus`
* `autoCompleter`

Also; initialize non-static class members where they are defined in accordance with developer notes.

Tree-SHA512: 84f0cb87ec8394ed7641bfa0731be2ec72e6a920e00ae206ff89e2e7c960358f603c52878311b24601a33aa7cba6ea4f9a78a8ade88112dea0f41efb08e84e25

Backport of Core PR12928

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nakihito created this revision.Aug 22 2019, 17:02
Owners added a reviewer: Restricted Owners Package.Aug 22 2019, 17:02
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 22 2019, 17:02
Fabien requested changes to this revision.Aug 23 2019, 14:11

There's a typo in the PR number

108 ↗(On Diff #10927)

Style nit: const WalletModel *walletModel;

153 ↗(On Diff #10927)


156 ↗(On Diff #10927)

This one make me bug. It is not a pointer despite what the name implies (it's an index), and it should be size_t and not int; but it's out of scope here.

159 ↗(On Diff #10927)


This revision now requires changes to proceed.Aug 23 2019, 14:11
nakihito edited the summary of this revision. (Show Details)Aug 23 2019, 15:57
nakihito added inline comments.Aug 23 2019, 20:44
108 ↗(On Diff #10927)

I think these are meant to be as they are. Rather than making the data pointed to unchangeable, it is making the address unchangeable. See: The discussion and review of the change also specifically requests <type> *const <name>.

nakihito requested review of this revision.Sep 6 2019, 17:14
Fabien accepted this revision.Sep 9 2019, 09:24
Fabien added inline comments.
108 ↗(On Diff #10927)

Yeah you're obviously right, my bad

This revision is now accepted and ready to land.Sep 9 2019, 09:24
nakihito edited the test plan for this revision. (Show Details)Sep 9 2019, 17:28