Skip to content
Bitcoin Roots

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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

src/qt/addressbookpage.cpp CHANGED
@@ -16,6 +16,9 @@
16
  #include <QMessageBox>
17
  #include <QSortFilterProxyModel>
18
  #include <QRegularExpression>
 
 
 
19
 
20
  class AddressBookSortFilterProxyModel final : public QSortFilterProxyModel
21
  {
@@ -43,7 +46,11 @@ protected:
43
 
44
  auto address = model->index(row, AddressTableModel::Address, parent);
45
 
 
46
  const auto pattern = filterRegularExpression();
 
 
 
47
  return (model->data(address).toString().contains(pattern) ||
48
  model->data(label).toString().contains(pattern));
49
  }
 
16
  #include <QMessageBox>
17
  #include <QSortFilterProxyModel>
18
  #include <QRegularExpression>
19
+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
20
+ #include <QRegExp>
21
+ #endif
22
 
23
  class AddressBookSortFilterProxyModel final : public QSortFilterProxyModel
24
  {
 
46
 
47
  auto address = model->index(row, AddressTableModel::Address, parent);
48
 
49
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
50
  const auto pattern = filterRegularExpression();
51
+ #else
52
+ const auto pattern = filterRegExp();
53
+ #endif
54
  return (model->data(address).toString().contains(pattern) ||
55
  model->data(label).toString().contains(pattern));
56
  }