test: Add tests for tableView in AddressBookPage dialog #591

pull hebasto wants to merge 2 commits into bitcoin-core:master from hebasto:220423-test-ab changing 2 files +12 −5
  1. hebasto commented at 5:57 pm on April 23, 2022: member

    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.

  2. qt: No need to force Qt::QueuedConnection for NotifyAddressBookChanged
    This change simplifies tests for `AddressBookPage` class.
    No user-faced behavior change.
    edae3ab699
  3. qt, test: Add tests for `tableView` in `AddressBookPage` dialog 15069130c6
  4. hebasto added the label Tests on Apr 23, 2022
  5. hebasto commented at 5:57 pm on April 23, 2022: member
    Friendly ping @promag @prusnak
  6. jarolrod commented at 7:18 am on April 27, 2022: member

    Concept ACK

    in edae3ab6999ee9e6efabd8403d31e9bd7c84f8a3, 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

  7. in src/qt/walletmodel.cpp:372 in edae3ab699 outdated
    368@@ -369,7 +369,7 @@ static void NotifyAddressBookChanged(WalletModel *walletmodel,
    369     QString strPurpose = QString::fromStdString(purpose);
    370 
    371     qDebug() << "NotifyAddressBookChanged: " + strAddress + " " + strLabel + " isMine=" + QString::number(isMine) + " purpose=" + strPurpose + " status=" + QString::number(status);
    372-    bool invoked = QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection,
    373+    bool invoked = QMetaObject::invokeMethod(walletmodel, "updateAddressBook",
    


    promag commented at 1:44 pm on May 9, 2022:

    edae3ab6999ee9e6efabd8403d31e9bd7c84f8a3

    Could replace with lambda while touching this code.

  8. promag commented at 1:45 pm on May 9, 2022: contributor
    Code review ACK 15069130c6ca5273f3a593a404f60f11caa7d950.
  9. hebasto merged this on May 9, 2022
  10. hebasto closed this on May 9, 2022

  11. hebasto deleted the branch on May 9, 2022
  12. sidhujag referenced this in commit 049283e67f on May 9, 2022
  13. bitcoin-core locked this on May 9, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-23 00:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me