Skip to content

test: Add tests for tableView in AddressBookPage dialog - #591

Merged
hebasto merged 2 commits into
bitcoin-core:masterfrom
hebasto:220423-test-ab
May 9, 2022
Merged

test: Add tests for tableView in AddressBookPage dialog#591
hebasto merged 2 commits into
bitcoin-core:masterfrom
hebasto:220423-test-ab

Conversation

@hebasto

@hebastohebasto commented Apr 23, 2022

Copy link
Copy Markdown
Member

This PR is a prerequisite for more thorough testing of filtering in the AddressBookPage class in context of #578 and #585.

Required for #592.

@hebasto

Copy link
Copy Markdown
MemberAuthor

Friendly ping @promag@prusnak

@jarolrodjarolrod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

in edae3ab, we can do this because when not specifying the connection type; there is an invokeMethod overload that uses Qt:AutoConnection. In this context Qt::AutoConnection will really be Qt::QueuedConnection1 because the receiver and emitter are in different threads.

https://doc.qt.io/qt-5/qt.html#ConnectionType-enum

@promagpromag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK 1506913.


qDebug() << "NotifyAddressBookChanged: " + strAddress + " " + strLabel + " isMine=" + QString::number(isMine) + " purpose=" + strPurpose + " status=" + QString::number(status);
bool invoked = QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection,
bool invoked = QMetaObject::invokeMethod(walletmodel, "updateAddressBook",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edae3ab

Could replace with lambda while touching this code.

@hebasto
hebasto merged commit 3dd95cb into bitcoin-core:masterMay 9, 2022
@hebasto
hebasto deleted the 220423-test-ab branch May 9, 2022 20:21
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 9, 2022
…ssBookPage` dialog
1506913 qt, test: Add tests for `tableView` in `AddressBookPage` dialog (Hennadii Stepanov)
edae3ab qt: No need to force Qt::QueuedConnection for NotifyAddressBookChanged (Hennadii Stepanov)
Pull request description:
This PR is a prerequisite for more thorough testing of filtering in the `AddressBookPage` class in context of bitcoin-core/gui#578 and bitcoin-core/gui#585.
Required for bitcoin-core/gui#592.
ACKs for top commit:
promag:
Code review ACK 1506913.
Tree-SHA512: 86986d47606cbd54d813436c7afb21894e2200b6d3042a7aa0b5e84821c765bd68b14ad38a445069891ab33f2d7bcd4933b8373e14e9afb0c91f1a6ddf4da740
@bitcoin-corebitcoin-core locked and limited conversation to collaborators May 9, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hebasto@promag@jarolrod