fix: avoid deprecated invalidateFilter on Qt 6.5+#1038
Conversation
|
CodeAnt AI is reviewing your PR. |
This comment has been minimized.
This comment has been minimized.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a Qt compatibility include and ensured Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/storemodel.cpp`:
- Around line 104-108: The conditional around
QSortFilterProxyModel::invalidateFilter() uses QT_VERSION_CHECK(6,5,0) but the
deprecation/remedy timeline is wrong; to fix, either remove the `#if/`#else
entirely if your minimum supported Qt is >= 6.5 (making the else dead code) or
change the version check to the actual deprecation target (e.g.
QT_VERSION_CHECK(6,11,0) or the version where
beginFilterChange()/endFilterChange() exist) and update the call to use
beginFilterChange()/endFilterChange() pairs when targeting that newer Qt; locate
the call to QSortFilterProxyModel::invalidateFilter() in storemodel.cpp and
adjust the preprocessor condition or replace the call with the proper
beginFilterChange()/endFilterChange() sequence accordingly.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7b81bca7-f27d-470c-ac8d-b90e9a68d6ee
📒 Files selected for processing (1)
src/storemodel.cpp
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Refactored the
setStoremethod inStoreModelto conditionally callinvalidateFilter(). For Qt versions 6.5.0 and newer, it now explicitly callsQSortFilterProxyModel::invalidateFilter()to avoid using the deprecated unqualifiedinvalidateFilter()method. For older Qt versions, it retains the originalinvalidateFilter()call, ensuring backward compatibility. This change prevents deprecation warnings and ensures future compatibility with Qt 6.5+ while maintaining support for earlier versions.Summary by CodeRabbit