-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix linking when configured with -DENABLE_WALLET=OFF
(Qt 6)
#837
base: master
Are you sure you want to change the base?
Conversation
This change is required for Qt 6, but it is meaningful on its own.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
What is the error? Why does it only happen with Qt6? |
I put it to the PR description.
Differences in Qt implementation between Qt 5 and Qt 6? (did not dig into the exact code change though) |
#ifdef ENABLE_WALLET | ||
#include <qt/walletmodel.h> | ||
#endif // ENABLE_WALLET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How the RPCExecutor::request
method compiles when this line doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because the compiler only needs to know WalletModel
, it doesn't need the full definition unless you dereference the pointer (eg as in RPCConsole::RPCParseCommandLine
-> wallet_model->getWalletName()
- which is guarded).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 5be34ba
It builds correctly on Qt5 and qt runs fine, with both -DENABLE_WALLET=OFF
& -DENABLE_WALLET=ON
. When wallet support
is off
also tested the rpc console and several rpc commands.
This PR is a part of the transition to Qt 6.
When building with Qt 6 in my dev branch, I encountered a linker error when configured with
-DENABLE_WALLET=OFF
:This PR resolves the issue.