PackageKit::Offline::Results: Make castable to QDBusPendingCall#68
PackageKit::Offline::Results: Make castable to QDBusPendingCall#68arrowd wants to merge 1 commit into
Conversation
This makes it possible to feed the Results object into QDBusPendingCallWatcher
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAn implicit conversion operator to QDBusPendingCall is added to the Offline::Results nested class in src/offline.h, allowing Results instances to be used directly as QDBusPendingCall by returning the internal m_reply member. ChangesOffline Results Conversion Operator
Estimated code review effort: 1 (Trivial) | ~2 minutes Related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
aleixpol
left a comment
There was a problem hiding this comment.
Do you have a usage change counter-part to review together?
| Transaction::Error error() const; | ||
| QString errorDescription() const; | ||
|
|
||
| operator QDBusPendingCall() const { return m_reply; } |
There was a problem hiding this comment.
Why not add a getter? Explicit is often clearer, I can see how it would seem magical in this case.
There was a problem hiding this comment.
My take is that PackageKit::Offline::Results is a QDBusPendingCall. It wraps this single value, so making it act as plain QDBusPendingCall makes sense to me.
Not yet, but I plan to use to together with QDBusPendingCallWatcher in Discover to fix https://invent.kde.org/plasma/discover/-/merge_requests/1354 the right way. |
I thought so and hence my asking. ::prepare is somewhat blocking right now, we might need refactoring in the interface. |
This makes it possible to feed the Results object into QDBusPendingCallWatcher