v30.3-roots.1 · Commit 5: [PATCH 05/68] feat(qt): preserve Roots identity and GUI support on Core 30.3
src/qt/addressbookpage.cpp
Before: src/qt/addressbookpage.cpp · After: src/qt/addressbookpage.cpp
File metadata
index 26e93bf2acf7d87b8099a606eb384db7c3574dc0..b27d30dbf0fb3bfcf80fe7b5b4e83fba18e0a440 100644
Download original patch · Release notes
Diff rows 1–20 of 20. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/qt/addressbookpage.cpp
CHANGED
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
#include <QMessageBox>
|
|
17
17
|
#include <QSortFilterProxyModel>
|
|
18
18
|
#include <QRegularExpression>
|
|
19
|
+
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
20
|
+
#include <QRegExp>
|
|
21
|
+
#endif
|
|
19
22
|
|
|
20
23
|
class AddressBookSortFilterProxyModel final : public QSortFilterProxyModel
|
|
21
24
|
{
|
|
@@ -43,7 +46,11 @@ protected:
|
|
|
43
46
|
|
|
44
47
|
auto address = model->index(row, AddressTableModel::Address, parent);
|
|
45
48
|
|
|
49
|
+
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
46
50
|
const auto pattern = filterRegularExpression();
|
|
51
|
+
#else
|
|
52
|
+
const auto pattern = filterRegExp();
|
|
53
|
+
#endif
|
|
47
54
|
return (model->data(address).toString().contains(pattern) ||
|
|
48
55
|
model->data(label).toString().contains(pattern));
|
|
49
56
|
}
|