Page MenuHomePhabricator

[Backport] gui: Fix start timer from non QThread
ClosedPublic

Authored by PiRK on Fri, Sep 25, 13:59.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABCe03979f898ff: [Backport] gui: Fix start timer from non QThread
Summary

This fixes a bug related to a QTimer that in some situation
can be started from outside a QThread.

Backport of Core PR17120

Test Plan

ninja check

Diff Detail

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

Event Timeline

Owners added a reviewer: Restricted Owners Package.Fri, Sep 25, 13:59
PiRK requested review of this revision.Fri, Sep 25, 13:59

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

deadalnix requested changes to this revision.Fri, Sep 25, 14:26
deadalnix added a subscriber: deadalnix.

The PR is not a PR.

This revision now requires changes to proceed.Fri, Sep 25, 14:26

The PR is not a PR.

Sorry about that. I updated the revision message.

PiRK requested review of this revision.Sat, Sep 26, 05:43
deadalnix added inline comments.
src/qt/walletmodel.cpp
49 ↗(On Diff #23793)

Isn't this a memory leak?

This revision is now accepted and ready to land.Sun, Sep 27, 14:27
src/qt/walletmodel.cpp
49 ↗(On Diff #23793)

QObjects are deleted when their parent is deleted. The parents chain seems to be properly set.

BitcoinApplication -> WalletController -> WalletModel -> timer