Getting ready to Qt 6 (8/n). Use QRegularExpression in AddressBookSortFilterProxyModel class #593

pull hebasto wants to merge 2 commits into bitcoin-core:master from hebasto:220423-re changing 2 files +61 −9
  1. hebasto commented at 7:43 pm on April 23, 2022: member

    This is a step in migration to Qt 6.

    Related:

    • bitcoin-core/gui#578
    • bitcoin-core/gui#585

    No behavior change. To ensure this, tests have been added.

  2. hebasto added the label Qt 6 on Apr 23, 2022
  3. DrahtBot commented at 3:50 am on April 24, 2022: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #585 (Replace QRegExp with QRegularExpression by prusnak)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. in src/qt/addressbookpage.cpp:50 in c4e8af810c outdated
    51-            return false;
    52-        }
    53-
    54-        return true;
    55+#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
    56+        const auto pattern = filterRegularExpression().pattern();
    


    promag commented at 11:22 am on May 21, 2022:

    Considering https://github.com/bitcoin-core/gui/pull/592/files#r878677419, I think the only required change is:

    0#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
    1    const auto pattern = filterRegularExpression()
    2#else
    3    const auto pattern = filterRegExp();
    4#endif
    

    hebasto commented at 1:41 pm on May 21, 2022:

    @promag

    ~Unfortunately, it does not work for me (~


    hebasto commented at 3:49 pm on May 21, 2022:
    Thank you! Updated.
  5. promag commented at 11:24 am on May 21, 2022: contributor
    Concept ACK.
  6. qt, test: Add tests for searching in `AddressBookPage` dialog 5c5d8f2465
  7. qt: Use `QRegularExpression` in `AddressBookSortFilterProxyModel` class
    Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
    e280087946
  8. hebasto force-pushed on May 21, 2022
  9. promag commented at 3:48 pm on May 21, 2022: contributor
    I think we can now close #592?
  10. hebasto commented at 3:49 pm on May 21, 2022: member

    Updated c4e8af810c8ce07c98c0d5476c461a54c9f89c86 -> e280087946184b37c8a1eb345fae30ebb07f3384 (pr593.01 -> pr593.02):

  11. promag approved
  12. promag commented at 3:56 pm on May 21, 2022: contributor

    Code review ACK e280087946184b37c8a1eb345fae30ebb07f3384.

    Could also have a test case-insensitivity search.

  13. hebasto commented at 3:58 pm on May 21, 2022: member

    Could also have a test case-insensitivity search.

    Could be a good first issue for following up :)

  14. hebasto commented at 8:19 am on May 23, 2022: member
  15. w0xlt approved
  16. w0xlt commented at 1:10 pm on May 23, 2022: contributor
  17. hebasto commented at 1:34 pm on May 23, 2022: member

    @w0xlt

    tACK e280087 on Ubuntu 21.10 Qt 5.15.2

    Thank you for your review and testing!

    FWIW, to test with Qt 6, the branch from bitcoin/bitcoin#24798 could be used.

  18. promag commented at 11:10 pm on May 23, 2022: contributor
    Tested ACK e280087946184b37c8a1eb345fae30ebb07f3384 with Qt6 on macOS 12 M1.
  19. jarolrod approved
  20. jarolrod commented at 0:42 am on May 24, 2022: member

    Tested ACK https://github.com/bitcoin-core/gui/commit/e280087946184b37c8a1eb345fae30ebb07f3384 on M1 mac, x86 mac, x86 Linux with Qt5 and separately with Qt6

    The added tests in 5c5d8f2465be70cbc256ec59913ac0a3c7c958be are useful for verifying there’s nothing being messed up by the changes. I also manually tested the address book for:

    • The ability to still search effectively after the change
    • That additions to the address book appear in the same order before and after the change
  21. hebasto merged this on May 24, 2022
  22. hebasto closed this on May 24, 2022

  23. hebasto deleted the branch on May 24, 2022
  24. sidhujag referenced this in commit c24c674950 on May 28, 2022
  25. bitcoin-core locked this on May 24, 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 02:20 UTC

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