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.
QRegularExpression
in AddressBookSortFilterProxyModel
class
#593
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
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.
51- return false;
52- }
53-
54- return true;
55+#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
56+ const auto pattern = filterRegularExpression().pattern();
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
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
Updated c4e8af810c8ce07c98c0d5476c461a54c9f89c86 -> e280087946184b37c8a1eb345fae30ebb07f3384 (pr593.01 -> pr593.02):
Code review ACK e280087946184b37c8a1eb345fae30ebb07f3384.
Could also have a test case-insensitivity search.
Could also have a test case-insensitivity search.
Could be a good first issue for following up :)
tACK https://github.com/bitcoin-core/gui/pull/593/commits/e280087946184b37c8a1eb345fae30ebb07f3384 on Ubuntu 21.10 Qt 5.15.2
Interesting note about QRegularExpression
class:
https://doc.qt.io/qt-5/qregularexpression.html#notes-for-qregexp-users
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: