Skip to content

fix: replace deprecated invalidateFilter in Qt6.10 - #798

Merged
hebasto merged 1 commit into
bitcoin-core:qt6from
uqlidi:fix/qt/deprecated/invalidateFilter
Jul 21, 2026
Merged

fix: replace deprecated invalidateFilter in Qt6.10#798
hebasto merged 1 commit into
bitcoin-core:qt6from
uqlidi:fix/qt/deprecated/invalidateFilter

Conversation

@uqlidi

@uqlidi uqlidi commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

replace deprecated invalidateFilter with beginFilterChange and endFilterChange in >=Qt6.10

same solution in bitcoin-core/gui#899

fix #776 #740

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach ACK b1d9377.

The testing code seems to require patching as well:

/home/hebasto/dev/bitcoin-qml/test/qml/qml_tests_main.cpp:2923:25: warning: ‘void QSortFilterProxyModel::invalidateFilter()’ is deprecated: Use begin/endFilterChange() instead [-Wdeprecated-declarations]
 2923 |         invalidateFilter();
      |         ~~~~~~~~~~~~~~~~^~
In file included from /usr/include/qt6/QtCore/QSortFilterProxyModel:1,
                 from /home/hebasto/dev/bitcoin-qml/test/qml/qml_tests_main.cpp:15:
/usr/include/qt6/QtCore/qsortfilterproxymodel.h:128:10: note: declared here
  128 |     void invalidateFilter();
      |          ^~~~~~~~~~~~~~~~
/home/hebasto/dev/bitcoin-qml/test/qml/qml_tests_main.cpp: In member function ‘void MockActivityFilterProxyModel::setDateFilter(DateFilter)’:
/home/hebasto/dev/bitcoin-qml/test/qml/qml_tests_main.cpp:2933:25: warning: ‘void QSortFilterProxyModel::invalidateFilter()’ is deprecated: Use begin/endFilterChange() instead [-Wdeprecated-declarations]
 2933 |         invalidateFilter();
      |         ~~~~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/qsortfilterproxymodel.h:128:10: note: declared here
  128 |     void invalidateFilter();
      |          ^~~~~~~~~~~~~~~~
/home/hebasto/dev/bitcoin-qml/test/qml/qml_tests_main.cpp: In member function ‘void MockActivityFilterProxyModel::setTypeFilter(TypeFilter)’:
/home/hebasto/dev/bitcoin-qml/test/qml/qml_tests_main.cpp:2943:25: warning: ‘void QSortFilterProxyModel::invalidateFilter()’ is deprecated: Use begin/endFilterChange() instead [-Wdeprecated-declarations]
 2943 |         invalidateFilter();
      |         ~~~~~~~~~~~~~~~~^~
/usr/include/qt6/QtCore/qsortfilterproxymodel.h:128:10: note: declared here
  128 |     void invalidateFilter();
      |          ^~~~~~~~~~~~~~~~

Also feel free to pick ea12a28 from #795 to ensure the CI tests Qt 6.10.

Comment thread qml/models/activityfilterproxymodel.cpp Outdated
Comment thread qml/models/activityfilterproxymodel.cpp
@uqlidi
uqlidi force-pushed the fix/qt/deprecated/invalidateFilter branch 2 times, most recently from b28ceb3 to e0f561c Compare July 20, 2026 19:23
@uqlidi
uqlidi requested a review from hebasto July 20, 2026 19:24
@hebasto

hebasto commented Jul 20, 2026

Copy link
Copy Markdown
Member

The testing code seems to require patching as well:

This still needs to be addressed. You can check the CI build log: https://github.com/bitcoin-core/gui-qml/actions/runs/29771819626/job/88455079035.

@uqlidi
uqlidi force-pushed the fix/qt/deprecated/invalidateFilter branch from e0f561c to 8d0fa5d Compare July 20, 2026 21:01
@uqlidi

uqlidi commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

The testing code seems to require patching as well:

This still needs to be addressed. You can check the CI build log: https://github.com/bitcoin-core/gui-qml/actions/runs/29771819626/job/88455079035.

should be done now

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8d0fa5d.

@hebasto
hebasto merged commit 2a998b7 into bitcoin-core:qt6 Jul 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using deprecated QSortFilterProxyModel::invalidateFilter()

2 participants